diff --git a/ChangeLog b/ChangeLog index fc11de07..80e7a41a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ +12-JUL-2019: 10.9.6 + +- Adds local files, Google Drive in Office Add-in + 11-JUL-2019: 10.9.5 +- Improves error handling for saving files - Fixes desktop startup 11-JUL-2019: 10.9.4 diff --git a/VERSION b/VERSION index 785719b5..9e7c47cf 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.9.5 \ No newline at end of file +10.9.6 \ No newline at end of file diff --git a/src/main/java/com/mxgraph/online/AbsAuthServlet.java b/src/main/java/com/mxgraph/online/AbsAuthServlet.java new file mode 100644 index 00000000..fca25177 --- /dev/null +++ b/src/main/java/com/mxgraph/online/AbsAuthServlet.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) 2006-2019, JGraph Ltd + */ +package com.mxgraph.online; + +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.PrintWriter; +import java.net.HttpURLConnection; +import java.net.URL; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +@SuppressWarnings("serial") +abstract public class AbsAuthServlet extends HttpServlet +{ + + static public class Config + { + public String DEV_CLIENT_SECRET = null, CLIENT_SECRET = null, DEV_CLIENT_ID = null, CLIENT_ID = null, + DEV_REDIRECT_URI = null, REDIRECT_URI = null, AUTH_SERVICE_URL = null; + } + + protected Config getConfig() + { + return null; + } + + protected String processAuthResponse(String authRes, boolean jsonResponse) + { + return ""; + } + + /** + * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) + */ + protected void doGet(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException + { + String code = request.getParameter("code"); + String refreshToken = request.getParameter("refresh_token"); + Config CONFIG = getConfig(); + String secret, client, redirectUri; + + if ("127.0.0.1".equals(request.getServerName())) + { + secret = CONFIG.DEV_CLIENT_SECRET; + client = CONFIG.DEV_CLIENT_ID; + redirectUri = CONFIG.DEV_REDIRECT_URI; + } + else + { + secret = CONFIG.CLIENT_SECRET; + client = CONFIG.CLIENT_ID; + redirectUri = CONFIG.REDIRECT_URI; + } + + if (code == null && refreshToken == null) + { + response.setStatus(HttpServletResponse.SC_BAD_REQUEST); + } + else + { + HttpURLConnection con = null; + + try + { + String url = CONFIG.AUTH_SERVICE_URL; + URL obj = new URL(url); + con = (HttpURLConnection) obj.openConnection(); + + con.setRequestMethod("POST"); + con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); + + boolean jsonResponse = false; + StringBuilder urlParameters = new StringBuilder(); + + urlParameters.append("client_id="); + urlParameters.append(client); + urlParameters.append("&redirect_uri="); + urlParameters.append(redirectUri); + urlParameters.append("&client_secret="); + urlParameters.append(secret); + + if (code != null) + { + urlParameters.append("&code="); + urlParameters.append(code); + urlParameters.append("&grant_type=authorization_code"); + } + else + { + urlParameters.append("&refresh_token="); + urlParameters.append(refreshToken); + urlParameters.append("&grant_type=refresh_token"); + jsonResponse = true; + } + + // Send post request + con.setDoOutput(true); + DataOutputStream wr = new DataOutputStream(con.getOutputStream()); + wr.writeBytes(urlParameters.toString()); + wr.flush(); + wr.close(); + + BufferedReader in = new BufferedReader( + new InputStreamReader(con.getInputStream())); + String inputLine; + StringBuffer authRes = new StringBuffer(); + + while ((inputLine = in.readLine()) != null) + { + authRes.append(inputLine); + } + in.close(); + + response.setStatus(con.getResponseCode()); + + OutputStream out = response.getOutputStream(); + + PrintWriter writer = new PrintWriter(out); + + // Writes JavaScript code + writer.println(processAuthResponse(authRes.toString(), jsonResponse)); + + writer.flush(); + writer.close(); + } + catch(IOException e) + { + e.printStackTrace(); + + if (con != null) + { + try + { + BufferedReader in = new BufferedReader( + new InputStreamReader(con.getErrorStream())); + + String inputLine; + + while ((inputLine = in.readLine()) != null) + { + System.err.println(inputLine); + } + in.close(); + } + catch (Exception e2) + { + // Ignore + } + } + + if (e.getMessage().contains("401")) + { + response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); + } + else + { + response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); + } + } + catch (Exception e) + { + response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); + } + } + } + +} diff --git a/src/main/java/com/mxgraph/online/GoogleAuthServlet.java b/src/main/java/com/mxgraph/online/GoogleAuthServlet.java new file mode 100644 index 00000000..7de08c88 --- /dev/null +++ b/src/main/java/com/mxgraph/online/GoogleAuthServlet.java @@ -0,0 +1,80 @@ +/** + * Copyright (c) 2006-2019, JGraph Ltd + */ +package com.mxgraph.online; + +import java.io.IOException; + +@SuppressWarnings("serial") +public class GoogleAuthServlet extends AbsAuthServlet +{ + public static String CLIENT_SECRET_FILE_PATH = "/WEB-INF/google_client_secret"; + public static String CLIENT_ID_FILE_PATH = "/WEB-INF/google_client_id"; + private static Config CONFIG = null; + + protected Config getConfig() + { + if (CONFIG == null) + { + CONFIG = new Config(); + + try + { + CONFIG.CLIENT_SECRET = Utils + .readInputStream(getServletContext() + .getResourceAsStream(CLIENT_SECRET_FILE_PATH)) + .replaceAll("\n", ""); + CONFIG.DEV_CLIENT_SECRET = CONFIG.CLIENT_SECRET; + } + catch (IOException e) + { + throw new RuntimeException("Client secret path invalid"); + } + + try + { + CONFIG.CLIENT_ID = Utils + .readInputStream(getServletContext() + .getResourceAsStream(CLIENT_ID_FILE_PATH)) + .replaceAll("\n", ""); + CONFIG.DEV_CLIENT_ID = CONFIG.CLIENT_ID; + } + catch (IOException e) + { + throw new RuntimeException("Client ID path invalid"); + } + + CONFIG.AUTH_SERVICE_URL = "https://www.googleapis.com/oauth2/v4/token"; + CONFIG.DEV_REDIRECT_URI = "https://test.draw.io/google"; + CONFIG.REDIRECT_URI = "https://www.draw.io/google"; + } + + return CONFIG; + } + + protected String processAuthResponse(String authRes, boolean jsonResponse) + { + StringBuffer res = new StringBuffer(); + + //Call the opener callback function directly with the given json + if (!jsonResponse) + { + res.append(""); + res.append(""); + res.append(""); + res.append(""); + } + + return res.toString(); + } +} diff --git a/src/main/java/com/mxgraph/online/MSGraphAuthServlet.java b/src/main/java/com/mxgraph/online/MSGraphAuthServlet.java index b174cd04..27a6c093 100644 --- a/src/main/java/com/mxgraph/online/MSGraphAuthServlet.java +++ b/src/main/java/com/mxgraph/online/MSGraphAuthServlet.java @@ -3,92 +3,27 @@ */ package com.mxgraph.online; -import java.io.BufferedReader; -import java.io.DataOutputStream; import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.io.PrintWriter; -import java.net.HttpURLConnection; -import java.net.URL; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; @SuppressWarnings("serial") -public class MSGraphAuthServlet extends HttpServlet +public class MSGraphAuthServlet extends AbsAuthServlet { - - /** - * - */ - public static final String DEV_CLIENT_SECRET_FILE_PATH = "/WEB-INF/msgraph_dev_client_secret"; - - /** - * - */ - private static String DEV_CLIENT_SECRET = null; - - /** - * - */ - public static final String CLIENT_SECRET_FILE_PATH = "/WEB-INF/msgraph_client_secret"; - - /** - * - */ - private static String CLIENT_SECRET = null; - - /** - * - */ - public static final String DEV_CLIENT_ID_FILE_PATH = "/WEB-INF/msgraph_dev_client_id"; - - /** - * - */ - private static String DEV_CLIENT_ID = null; - - /** - * - */ - public static final String CLIENT_ID_FILE_PATH = "/WEB-INF/msgraph_client_id"; - - /** - * - */ - private static String CLIENT_ID = null; - - /** - * - */ - public static final String DEV_REDIRECT_URI = "https://test.draw.io/microsoft"; - - /** - * - */ - public static final String REDIRECT_URI = "https://www.draw.io/microsoft"; - - /** - * @see HttpServlet#HttpServlet() - */ - public MSGraphAuthServlet() + public static String DEV_CLIENT_SECRET_FILE_PATH = "/WEB-INF/msgraph_dev_client_secret"; + public static String CLIENT_SECRET_FILE_PATH = "/WEB-INF/msgraph_client_secret"; + public static String DEV_CLIENT_ID_FILE_PATH = "/WEB-INF/msgraph_dev_client_id"; + public static String CLIENT_ID_FILE_PATH = "/WEB-INF/msgraph_client_id"; + + private static Config CONFIG = null; + + protected Config getConfig() { - super(); - } - - /** - * Loads the key. - */ - protected void updateKeys() - { - if (DEV_CLIENT_SECRET == null) + if (CONFIG == null) { + CONFIG = new Config(); + try { - DEV_CLIENT_SECRET = Utils + CONFIG.DEV_CLIENT_SECRET = Utils .readInputStream(getServletContext() .getResourceAsStream(DEV_CLIENT_SECRET_FILE_PATH)) .replaceAll("\n", ""); @@ -97,13 +32,10 @@ public class MSGraphAuthServlet extends HttpServlet { throw new RuntimeException("Dev client secret path invalid."); } - } - - if (CLIENT_SECRET == null) - { + try { - CLIENT_SECRET = Utils + CONFIG.CLIENT_SECRET = Utils .readInputStream(getServletContext() .getResourceAsStream(CLIENT_SECRET_FILE_PATH)) .replaceAll("\n", ""); @@ -112,13 +44,10 @@ public class MSGraphAuthServlet extends HttpServlet { throw new RuntimeException("Client secret path invalid."); } - } - - if (DEV_CLIENT_ID == null) - { + try { - DEV_CLIENT_ID = Utils + CONFIG.DEV_CLIENT_ID = Utils .readInputStream(getServletContext() .getResourceAsStream(DEV_CLIENT_ID_FILE_PATH)) .replaceAll("\n", ""); @@ -127,13 +56,10 @@ public class MSGraphAuthServlet extends HttpServlet { throw new RuntimeException("Dev client ID invalid."); } - } - - if (CLIENT_ID == null) - { + try { - CLIENT_ID = Utils + CONFIG.CLIENT_ID = Utils .readInputStream(getServletContext() .getResourceAsStream(CLIENT_ID_FILE_PATH)) .replaceAll("\n", ""); @@ -142,139 +68,40 @@ public class MSGraphAuthServlet extends HttpServlet { throw new RuntimeException("Client ID invalid."); } + + CONFIG.DEV_REDIRECT_URI = "https://test.draw.io/microsoft"; + CONFIG.REDIRECT_URI = "https://www.draw.io/microsoft"; + CONFIG.AUTH_SERVICE_URL = "https://login.microsoftonline.com/common/oauth2/v2.0/token"; } - } + + return CONFIG; + } - /** - * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) - */ - protected void doGet(HttpServletRequest request, - HttpServletResponse response) throws ServletException, IOException + protected String processAuthResponse(String authRes, boolean jsonResponse) { - String code = request.getParameter("code"); - String refreshToken = request.getParameter("refresh_token"); - updateKeys(); - String secret, client, redirectUri; + StringBuffer res = new StringBuffer(); - if ("127.0.0.1".equals(request.getServerName())) + //Call the opener callback function directly with the given json + if (!jsonResponse) { - secret = DEV_CLIENT_SECRET; - client = DEV_CLIENT_ID; - redirectUri = DEV_REDIRECT_URI; - } - else - { - secret = CLIENT_SECRET; - client = CLIENT_ID; - redirectUri = REDIRECT_URI; + res.append(""); - } - - response.setStatus(con.getResponseCode()); - - OutputStream out = response.getOutputStream(); - - PrintWriter writer = new PrintWriter(out); - - // Writes JavaScript code - writer.println(res.toString()); - - writer.flush(); - writer.close(); - } - catch(IOException e) - { - if (e.getMessage().contains("401")) - { - response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); - } - else - { - response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); - } - } - catch (Exception e) - { - response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); - } + res.append(";"); + res.append("if (window.opener != null && window.opener.onOneDriveCallback != null)"); + res.append("{"); + res.append(" window.opener.onOneDriveCallback(authInfo, window);"); + res.append("} else {"); + res.append(" Office.initialize = function () { Office.context.ui.messageParent(JSON.stringify(authInfo));}"); + res.append("}"); + res.append(""); } + + return res.toString(); } - } diff --git a/src/main/webapp/WEB-INF/google_client_id b/src/main/webapp/WEB-INF/google_client_id new file mode 100644 index 00000000..3379637d --- /dev/null +++ b/src/main/webapp/WEB-INF/google_client_id @@ -0,0 +1 @@ +Replace_with_your_own_google_client_id \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/google_client_secret b/src/main/webapp/WEB-INF/google_client_secret new file mode 100644 index 00000000..6c4579b2 --- /dev/null +++ b/src/main/webapp/WEB-INF/google_client_secret @@ -0,0 +1 @@ +Replace_with_your_own_google_client_secret \ No newline at end of file diff --git a/src/main/webapp/cache.manifest b/src/main/webapp/cache.manifest index 74f5eca2..cae6792f 100644 --- a/src/main/webapp/cache.manifest +++ b/src/main/webapp/cache.manifest @@ -1,7 +1,7 @@ CACHE MANIFEST # THIS FILE WAS GENERATED. DO NOT MODIFY! -# 07/11/2019 05:18 PM +# 07/12/2019 05:22 PM app.html index.html?offline=1 diff --git a/src/main/webapp/export3.html b/src/main/webapp/export3.html index 520e6e4b..e604f9c3 100644 --- a/src/main/webapp/export3.html +++ b/src/main/webapp/export3.html @@ -53,11 +53,7 @@ //PNG+XML format if (data.xml.substring(0, 5) == 'iVBOR' || (extras != null && extras.isPng)) { - var pngData = 'data:image/png;base64,' + data.xml; - //A hacky way to invoke extractGraphModelFromPng without EditorUi instance - data.xml = EditorUi.prototype.extractGraphModelFromPng.call({ - editor: {graph: {bytesToString: Graph.prototype.bytesToString}} - }, pngData); + data.xml = Editor.extractGraphModelFromPng('data:image/png;base64,' + data.xml); } // Parses XML diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index d2e03dc7..37c347ef 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -8274,7 +8274,7 @@ a}function A(a,b,c){function f(){ca.innerHTML=b?mxUtils.htmlEntities(mxResources mxUtils.htmlEntities(mxResources.get("changedBy",null,"Changed By"));l.appendChild(e);e=document.createElement("th");e.style.width="25%";e.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn",null,"Last modified on"));l.appendChild(e);d.appendChild(l);T.appendChild(d)}for(l=0;lg&&(e=e.substring(0,g)+"…");if(c){var B=document.createElement("tr"),k=document.createElement("td"),n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramListPreviewBtn";n.setAttribute("title",mxResources.get("preview"));k.appendChild(n);x=document.createElement("span");x.className="geTempDlgDiagramTitle";x.innerHTML=e;k.appendChild(x);B.appendChild(k);k=document.createElement("td"); k.innerHTML=z;B.appendChild(k);k=document.createElement("td");k.innerHTML=m;B.appendChild(k);d.appendChild(B);null==E&&(f(),u(B,"geTempDlgDiagramsListGridActive",a[l]));(function(a,b){mxEvent.addListener(B,"click",function(){E!=b&&(f(),u(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(B,"dblclick",v);mxEvent.addListener(n,"click",function(){p(a)})})(a[l],B)}else{var y=document.createElement("div");y.className="geTempDlgDiagramTile";y.setAttribute("title",x);null==E&&(f(),u(y,"geTempDlgDiagramTileActive", -a[l]));z=document.createElement("div");z.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var A=document.createElement("img");A.style.display="none";(function(a,b){A.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};A.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(A,z);A.src=k;z.appendChild(A);y.appendChild(z);z=document.createElement("div");z.className="geTempDlgDiagramTileLbl";z.innerHTML=null!=e?e:"";y.appendChild(z); +a[l]));z=document.createElement("div");z.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var q=document.createElement("img");q.style.display="none";(function(a,b){q.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};q.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(q,z);q.src=k;z.appendChild(q);y.appendChild(z);z=document.createElement("div");z.className="geTempDlgDiagramTileLbl";z.innerHTML=null!=e?e:"";y.appendChild(z); n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramPreviewBtn";n.setAttribute("title",mxResources.get("preview"));y.appendChild(n);(function(a,b){mxEvent.addListener(y,"click",function(){E!=b&&(f(),u(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(y,"dblclick",v);mxEvent.addListener(n,"click",function(){p(a)})})(a[l],y);T.appendChild(y)}}}function y(a,b){Z.innerHTML="";u();for(var c=!b&&5a.length?"none":""}function C(a){var b=D.querySelector(".geTemplatesList"), @@ -8314,56 +8314,57 @@ dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"M dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1}];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%
%position%
Email\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## 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## 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## 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## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\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## 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 or a JSON string as used in Layout, Apply.\n## 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\nEvan 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-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan 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\nRon Donovan,System Admin,rdo,Office 3,Evan 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\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n'; Editor.extractGraphModel=function(a,b){if(null!=a&&"undefined"!==typeof pako){var c=a.ownerDocument.getElementsByTagName("div"),f=[];if(null!=c&&0> -2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);b+="==";break}l=a.charCodeAt(c++);if(c==f){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(l&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2);b+="=";break}p=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>> -2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(l&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2|(p&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(p&63)}return b};Editor.prototype.loadUrl=function(a,b,c,f,d,l){try{var p=f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);d=null!=d?d:!0;var e=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this, -function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var f=a.getText();if(p){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),d=0;d>24&255,a>>16&255,a>>8&255,a&255)} -a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var g=0;if(l(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(l(a,4),"IHDR"!=l(a,4))null!=d&&d();else{l(a,17);d=a.substring(0,g);do{var t=p(a);if("IDAT"==l(a,4)){d=a.substring(0,g-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+f;f=4294967295;f=EditorUi.prototype.updateCRC(f,b,0,4);f=EditorUi.prototype.updateCRC(f,c,0,c.length);d+=e(c.length)+b+c+e(f^4294967295); -d+=a.substring(g-8,a.length);break}d+=a.substring(g-8,g-4+t);l(a,t);l(a,4)}while(t);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";var e=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var g=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors= -function(){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,b){var c=null;null!=a.editor.graph.getModel().getParent(b)?c=b.getId():null!=a.currentPage&&(c=a.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var k=Format.prototype.init;Format.prototype.init=function(){k.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var m=Format.prototype.refresh; -Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?m.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var n=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=n.apply(this,arguments); -this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var b=this.editorUi,c=b.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return c.shadowVisible},function(a){var f=new ChangePageSetup(b);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=a;c.model.execute(f)},{install:function(a){this.listener=function(){a(c.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});Editor.shadowOptionEnabled|| -(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=q.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;if(c.isEnabled()){var f=b.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var d=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a);b.editor.autosave&& -f.isModified()&&f.fileChanged()},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}});a.appendChild(d)}}if(this.isMathOptionVisible()&&c.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener= -function(){a(c.mathEnabled)};b.addListener("mathEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var l=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");l.style.position="relative";l.style.marginLeft="6px";l.style.top="2px";d.appendChild(l)}return a};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=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line", -type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20}, -{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.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.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size", -type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width", -type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left", -dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0, -defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties= +Math.min(c.length-1,urlParams.page||0))])),null!=f&&(c=Graph.decompress(mxUtils.getTextContent(f)),null!=c&&0>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);b+="==";break}l=a.charCodeAt(c++);if(c==f){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(l&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l& +15)<<2);b+="=";break}p=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(l&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2|(p&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(p&63)}return b};Editor.prototype.loadUrl=function(a,b,c,f,d,l){try{var p=f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)|| +/(\.gif)($|\?)/i.test(a);d=null!=d?d:!0;var e=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var f=a.getText();if(p){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),d=0;d>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var g=0;if(l(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(l(a,4),"IHDR"!=l(a,4))null!=d&&d();else{l(a,17);d=a.substring(0,g);do{var k=p(a);if("IDAT"==l(a,4)){d=a.substring(0,g-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+f;f=4294967295; +f=EditorUi.prototype.updateCRC(f,b,0,4);f=EditorUi.prototype.updateCRC(f,c,0,c.length);d+=e(c.length)+b+c+e(f^4294967295);d+=a.substring(g-8,a.length);break}d+=a.substring(g-8,g-4+k);l(a,k);l(a,4)}while(k);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";var e=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors); +mxSettings.save()};var g=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,b){var c=null;null!=a.editor.graph.getModel().getParent(b)?c=b.getId():null!=a.currentPage&&(c=a.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var k=Format.prototype.init;Format.prototype.init=function(){k.apply(this,arguments); +this.editorUi.editor.addListener("fileLoaded",this.update)};var m=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?m.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var n=DiagramFormatPanel.prototype.addView; +DiagramFormatPanel.prototype.addView=function(a){a=n.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var b=this.editorUi,c=b.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return c.shadowVisible},function(a){var f=new ChangePageSetup(b);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=a;c.model.execute(f)},{install:function(a){this.listener=function(){a(c.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)}, +destroy:function(){b.removeListener(this.listener)}});Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=q.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;if(c.isEnabled()){var f=b.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var d=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave}, +function(a){b.editor.setAutosave(a);b.editor.autosave&&f.isModified()&&f.fileChanged()},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}});a.appendChild(d)}}if(this.isMathOptionVisible()&&c.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()}, +{install:function(a){this.listener=function(){a(c.mathEnabled)};b.addListener("mathEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var l=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");l.style.position="relative";l.style.marginLeft="6px";l.style.top="2px";d.appendChild(l)}return a};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=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size", +type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties= +[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.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.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties= +[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}, +{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position", +type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent", +type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties= [{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle", dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties= [{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float", @@ -8380,19 +8381,19 @@ this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this b,a))}};var l=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this, function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return l.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,b,c){function f(a,b,c,f){u.getModel().beginUpdate();try{var d=[],l=[];if(null!=c.index){for(var p=[],e=c.parentRow.nextSibling;e&& e.getAttribute("data-pName")==a;)p.push(e.getAttribute("data-pValue")),e=e.nextSibling;c.indexc.size&&(p=p.slice(0,c.size));b=p.join(",");null!=c.countProperty&&(u.setCellStyles(c.countProperty,p.length,u.getSelectionCells()),d.push(c.countProperty),l.push(p.length))}u.setCellStyles(a,b,u.getSelectionCells());d.push(a);l.push(b);if(null!=c.dependentProps)for(a=0;ab)t=t.slice(0,b);else for(var z=t.length;zt.max&&(a=t.max);a=mxUtils.htmlEntities(("int"==v?parseInt(a):a)+"");f(b,a,t)}var p=document.createElement("input");d(B,p,!0);p.value=c;p.className="gePropEditor";"int"!=v&&"float"!=v||t.allowAuto||(p.type="number",p.step= -"int"==v?"1":"any",null!=t.min&&(p.min=parseFloat(t.min)),null!=t.max&&(p.max=parseFloat(t.max)));a.appendChild(p);mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&l()});p.focus();mxEvent.addListener(p,"blur",function(){l()})})));t.isDeletable&&(z=mxUtils.button("-",mxUtils.bind(k,function(a){f(b,"",t,t.index);mxEvent.consume(a)})),z.style.height="16px",z.style.width="25px",z.style["float"]="right",z.className="geColorBtn",B.appendChild(z));x.appendChild(B);return x}var k=this,u=this.editorUi.editor.graph, -z=[];a.style.position="relative";a.style.padding="0";var v=document.createElement("table");v.style.whiteSpace="nowrap";v.style.width="100%";var m=document.createElement("tr");m.className="gePropHeader";var x=document.createElement("th");x.className="gePropHeaderCell";var B=document.createElement("img");B.src=Sidebar.prototype.expandedImage;x.appendChild(B);mxUtils.write(x,mxResources.get("property"));m.style.cursor="pointer";var n=function(){var b=v.querySelectorAll(".gePropNonHeaderRow"),c;if(k.editorUi.propertiesCollapsed){B.src= -Sidebar.prototype.collapsedImage;c="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],l=d.nodeName.toUpperCase();"INPUT"!=l&&"SELECT"!=l||a.removeChild(d)}catch(ga){}}else B.src=Sidebar.prototype.expandedImage,c="";for(f=0;fb)k=k.slice(0,b);else for(var z=k.length;zk.max&&(a=k.max);a=mxUtils.htmlEntities(("int"==m?parseInt(a):a)+"");f(b,a,k)}var p=document.createElement("input");d(x,p,!0);p.value=c;p.className="gePropEditor";"int"!=m&&"float"!=m||k.allowAuto||(p.type="number",p.step= +"int"==m?"1":"any",null!=k.min&&(p.min=parseFloat(k.min)),null!=k.max&&(p.max=parseFloat(k.max)));a.appendChild(p);mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&l()});p.focus();mxEvent.addListener(p,"blur",function(){l()})})));k.isDeletable&&(z=mxUtils.button("-",mxUtils.bind(t,function(a){f(b,"",k,k.index);mxEvent.consume(a)})),z.style.height="16px",z.style.width="25px",z.style["float"]="right",z.className="geColorBtn",x.appendChild(z));B.appendChild(x);return B}var t=this,u=this.editorUi.editor.graph, +z=[];a.style.position="relative";a.style.padding="0";var m=document.createElement("table");m.style.whiteSpace="nowrap";m.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader";var B=document.createElement("th");B.className="gePropHeaderCell";var x=document.createElement("img");x.src=Sidebar.prototype.expandedImage;B.appendChild(x);mxUtils.write(B,mxResources.get("property"));v.style.cursor="pointer";var n=function(){var b=m.querySelectorAll(".gePropNonHeaderRow"),c;if(t.editorUi.propertiesCollapsed){x.src= +Sidebar.prototype.collapsedImage;c="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],l=d.nodeName.toUpperCase();"INPUT"!=l&&"SELECT"!=l||a.removeChild(d)}catch(ga){}}else x.src=Sidebar.prototype.expandedImage,c="";for(f=0;f=a.length){for(var k=t=0;k=a.length){for(var t=k=0;t'),b.writeln(a.editor.fontCss),b.writeln(""))};if("undefined"!==typeof MathJax){var v=c.renderPage;c.renderPage=function(a,b,c,f,d,l){var p=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var e=v.apply(this,arguments);mxClient.NO_FO= -p;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:e.className="geDisableMathJax";return e}}c.open(null,null,d,!0)}else{g=b.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";c.backgroundColor=g;c.autoOrigin=k;c.appendGraph(b,t,p,e,d,!0)}return c}var f=parseInt(ba.value)/100;isNaN(f)&&(f=1,ba.value="100 %");var f=.75*f,l=z.value,p=m.value,e=!k.checked,t=null;e&&(e=l==g&&p==g);if(!e&&null!=a.pages&&a.pages.length){var u=0,e=a.pages.length-1;k.checked||(u=parseInt(l)-1,e=parseInt(p)- -1);for(var v=u;v<=e;v++){var B=a.pages[v],l=B==a.currentPage?d:null;if(null==l){var l=a.createTemporaryGraph(d.getStylesheet()),p=!0,u=!1,x=null,A=null;null==B.viewState&&null==B.root&&a.updatePageRoot(B);null!=B.viewState&&(p=B.viewState.pageVisible,u=B.viewState.mathEnabled,x=B.viewState.background,A=B.viewState.backgroundImage);l.background=x;l.backgroundImage=null!=A?new mxImage(A.src,A.width,A.height):null;l.pageVisible=p;l.mathEnabled=u;var q=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"== -a?B.getName():"pagenumber"==a?v+1:q.apply(this,arguments)};document.body.appendChild(l.container);a.updatePageRoot(B);l.model.setRoot(B.root)}t=c(l,t,v!=e);l!=d&&l.container.parentNode.removeChild(l.container)}}else t=c(d);null==t?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(t.mathEnabled&&(e=t.wnd.document,e.writeln('