/* * (c) Copyright Ascensio System SIA 2010-2015 * * This program is a free software product. You can redistribute it and/or * modify it under the terms of the GNU Affero General Public License (AGPL) * version 3 as published by the Free Software Foundation. In accordance with * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement * of any third-party rights. * * This program is distributed WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html * * You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, * EU, LV-1021. * * The interactive user interfaces in modified source and object code versions * of the Program must display Appropriate Legal Notices, as required under * Section 5 of the GNU AGPL version 3. * * Pursuant to Section 7(b) of the License you must retain the original Product * logo when distributing the program. Pursuant to Section 7(e) we decline to * grant you any rights under trademark law for use of our trademarks. * * All the Product's GUI elements, including illustrations and icon sets, as * well as technical writing content are licensed under the terms of the * Creative Commons Attribution-ShareAlike 4.0 International. See the License * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ var JSON; JSON || (JSON = {}), function () { function str(a, b) { var c, d, e, f, g = gap, h, i = b[a]; i && typeof i == "object" && typeof i.toJSON == "function" && (i = i.toJSON(a)), typeof rep == "function" && (i = rep.call(b, a, i)); switch (typeof i) { case "string": return quote(i); case "number": return isFinite(i) ? String(i) : "null"; case "boolean": case "null": return String(i); case "object": if (!i) { return "null"; } gap += indent, h = []; if (Object.prototype.toString.apply(i) === "[object Array]") { f = i.length; for (c = 0; c < f; c += 1) { h[c] = str(c, i) || "null"; } e = h.length === 0 ? "[]" : gap ? "[\n" + gap + h.join(",\n" + gap) + "\n" + g + "]" : "[" + h.join(",") + "]", gap = g; return e; } if (rep && typeof rep == "object") { f = rep.length; for (c = 0; c < f; c += 1) { typeof rep[c] == "string" && (d = rep[c], e = str(d, i), e && h.push(quote(d) + (gap ? ": ": ":") + e)); } } else { for (d in i) { Object.prototype.hasOwnProperty.call(i, d) && (e = str(d, i), e && h.push(quote(d) + (gap ? ": ": ":") + e)); } } e = h.length === 0 ? "{}" : gap ? "{\n" + gap + h.join(",\n" + gap) + "\n" + g + "}" : "{" + h.join(",") + "}", gap = g; return e; } } function quote(a) { escapable.lastIndex = 0; return escapable.test(a) ? '"' + a.replace(escapable, function (a) { var b = meta[a]; return typeof b == "string" ? b : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4); }) + '"' : '"' + a + '"'; } function f(a) { return a < 10 ? "0" + a : a; } "use strict", typeof Date.prototype.toJSON != "function" && (Date.prototype.toJSON = function (a) { return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + f(this.getUTCMonth() + 1) + "-" + f(this.getUTCDate()) + "T" + f(this.getUTCHours()) + ":" + f(this.getUTCMinutes()) + ":" + f(this.getUTCSeconds()) + "Z": null; }, String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function (a) { return this.valueOf(); }); var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, gap, indent, meta = { "\b": "\\b", "\t": "\\t", "\n": "\\n", "\f": "\\f", "\r": "\\r", '"': '\\"', "\\": "\\\\" }, rep; typeof JSON.stringify != "function" && (JSON.stringify = function (a, b, c) { var d; gap = "", indent = ""; if (typeof c == "number") { for (d = 0; d < c; d += 1) { indent += " "; } } else { typeof c == "string" && (indent = c); } rep = b; if (!b || typeof b == "function" || typeof b == "object" && typeof b.length == "number") { return str("", { "": a }); } throw new Error("JSON.stringify"); }), typeof JSON.parse != "function" && (JSON.parse = function (text, reviver) { function walk(a, b) { var c, d, e = a[b]; if (e && typeof e == "object") { for (c in e) { Object.prototype.hasOwnProperty.call(e, c) && (d = walk(e, c), d !== undefined ? e[c] = d : delete e[c]); } } return reviver.call(a, b, e); } var j; text = String(text), cx.lastIndex = 0, cx.test(text) && (text = text.replace(cx, function (a) { return "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4); })); if (/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) { j = eval("(" + text + ")"); return typeof reviver == "function" ? walk({ "": j }, "") : j; } throw new SyntaxError("JSON.parse"); }); } (); SockJS = function () { var a = document, b = window, c = {}, d = function () {}; d.prototype.addEventListener = function (a, b) { this._listeners || (this._listeners = {}), a in this._listeners || (this._listeners[a] = []); var d = this._listeners[a]; c.arrIndexOf(d, b) === -1 && d.push(b); return; }, d.prototype.removeEventListener = function (a, b) { if (! (this._listeners && a in this._listeners)) { return; } var d = this._listeners[a], e = c.arrIndexOf(d, b); if (e !== -1) { d.length > 1 ? this._listeners[a] = d.slice(0, e).concat(d.slice(e + 1)) : delete this._listeners[a]; return; } return; }, d.prototype.dispatchEvent = function (a) { var b = a.type, c = Array.prototype.slice.call(arguments, 0); this["on" + b] && this["on" + b].apply(this, c); if (this._listeners && b in this._listeners) { for (var d = 0; d < this._listeners[b].length; d++) { this._listeners[b][d].apply(this, c); } } }; var e = function (a, b) { this.type = a; if (typeof b != "undefined") { for (var c in b) { if (!b.hasOwnProperty(c)) { continue; } this[c] = b[c]; } } }; e.prototype.toString = function () { var a = []; for (var b in this) { if (!this.hasOwnProperty(b)) { continue; } var c = this[b]; typeof c == "function" && (c = "[function]"), a.push(b + "=" + c); } return "SimpleEvent(" + a.join(", ") + ")"; }; var f = function (a) { var b = this; b._events = a || [], b._listeners = {}; }; f.prototype.emit = function (a) { var b = this; b._verifyType(a); if (b._nuked) { return; } var c = Array.prototype.slice.call(arguments, 1); b["on" + a] && b["on" + a].apply(b, c); if (a in b._listeners) { for (var d = 0; d < b._listeners[a].length; d++) { b._listeners[a][d].apply(b, c); } } }, f.prototype.on = function (a, b) { var c = this; c._verifyType(a); if (c._nuked) { return; } a in c._listeners || (c._listeners[a] = []), c._listeners[a].push(b); }, f.prototype._verifyType = function (a) { var b = this; c.arrIndexOf(b._events, a) === -1 && c.log("Event " + JSON.stringify(a) + " not listed " + JSON.stringify(b._events) + " in " + b); }, f.prototype.nuke = function () { var a = this; a._nuked = !0; for (var b = 0; b < a._events.length; b++) { delete a[a._events[b]]; } a._listeners = {}; }; var g = "abcdefghijklmnopqrstuvwxyz0123456789_"; c.random_string = function (a, b) { b = b || g.length; var c, d = []; for (c = 0; c < a; c++) { d.push(g.substr(Math.floor(Math.random() * b), 1)); } return d.join(""); }, c.random_number = function (a) { return Math.floor(Math.random() * a); }, c.random_number_string = function (a) { var b = ("" + (a - 1)).length, d = Array(b + 1).join("0"); return (d + c.random_number(a)).slice(-b); }, c.getOrigin = function (a) { a += "/"; var b = a.split("/").slice(0, 3); return b.join("/"); }, c.isSameOriginUrl = function (a, c) { return c || (c = b.location.href), a.split("/").slice(0, 3).join("/") === c.split("/").slice(0, 3).join("/"); }, c.getParentDomain = function (a) { if (/^[0-9.]*$/.test(a)) { return a; } if (/^\[/.test(a)) { return a; } if (!/[.]/.test(a)) { return a; } var b = a.split(".").slice(1); return b.join("."); }, c.objectExtend = function (a, b) { for (var c in b) { b.hasOwnProperty(c) && (a[c] = b[c]); } return a; }; var h = "_jp"; c.polluteGlobalNamespace = function () { h in b || (b[h] = {}); }, c.closeFrame = function (a, b) { return "c" + JSON.stringify([a, b]); }, c.userSetCode = function (a) { return a === 1000 || a >= 3000 && a <= 4999; }, c.countRTO = function (a) { var b; return a > 100 ? b = 3 * a : b = a + 200, b; }, c.log = function () { b.console && console.log && console.log.apply && console.log.apply(console, arguments); }, c.bind = function (a, b) { return a.bind ? a.bind(b) : function () { return a.apply(b, arguments); }; }, c.flatUrl = function (a) { return a.indexOf("?") === -1 && a.indexOf("#") === -1; }, c.amendUrl = function (b) { var d = a.location; if (!b) { throw new Error("Wrong url for SockJS"); } if (!c.flatUrl(b)) { throw new Error("Only basic urls are supported in SockJS"); } return b.indexOf("//") === 0 && (b = d.protocol + b), b.indexOf("/") === 0 && (b = d.protocol + "//" + d.host + b), b = b.replace(/[/]+$/, ""), b; }, c.arrIndexOf = function (a, b) { for (var c = 0; c < a.length; c++) { if (a[c] === b) { return c; } } return -1; }, c.arrSkip = function (a, b) { var d = c.arrIndexOf(a, b); if (d === -1) { return a.slice(); } var e = a.slice(0, d); return e.concat(a.slice(d + 1)); }, c.isArray = Array.isArray || function (a) { return {}.toString.call(a).indexOf("Array") >= 0; }, c.delay = function (a, b) { return typeof a == "function" && (b = a, a = 0), setTimeout(b, a); }; var i = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, j = { "\0": "\\u0000", "\x01": "\\u0001", "\x02": "\\u0002", "\x03": "\\u0003", "\x04": "\\u0004", "\x05": "\\u0005", "\x06": "\\u0006", "\x07": "\\u0007", "\b": "\\b", "\t": "\\t", "\n": "\\n", "\x0b": "\\u000b", "\f": "\\f", "\r": "\\r", "\x0e": "\\u000e", "\x0f": "\\u000f", "\x10": "\\u0010", "\x11": "\\u0011", "\x12": "\\u0012", "\x13": "\\u0013", "\x14": "\\u0014", "\x15": "\\u0015", "\x16": "\\u0016", "\x17": "\\u0017", "\x18": "\\u0018", "\x19": "\\u0019", "\x1a": "\\u001a", "\x1b": "\\u001b", "\x1c": "\\u001c", "\x1d": "\\u001d", "\x1e": "\\u001e", "\x1f": "\\u001f", '"': '\\"', "\\": "\\\\", "\x7f": "\\u007f", "\x80": "\\u0080", "\x81": "\\u0081", "\x82": "\\u0082", "\x83": "\\u0083", "\x84": "\\u0084", "\x85": "\\u0085", "\x86": "\\u0086", "\x87": "\\u0087", "\x88": "\\u0088", "\x89": "\\u0089", "\x8a": "\\u008a", "\x8b": "\\u008b", "\x8c": "\\u008c", "\x8d": "\\u008d", "\x8e": "\\u008e", "\x8f": "\\u008f", "\x90": "\\u0090", "\x91": "\\u0091", "\x92": "\\u0092", "\x93": "\\u0093", "\x94": "\\u0094", "\x95": "\\u0095", "\x96": "\\u0096", "\x97": "\\u0097", "\x98": "\\u0098", "\x99": "\\u0099", "\x9a": "\\u009a", "\x9b": "\\u009b", "\x9c": "\\u009c", "\x9d": "\\u009d", "\x9e": "\\u009e", "\x9f": "\\u009f", "\xad": "\\u00ad", "\u0600": "\\u0600", "\u0601": "\\u0601", "\u0602": "\\u0602", "\u0603": "\\u0603", "\u0604": "\\u0604", "\u070f": "\\u070f", "\u17b4": "\\u17b4", "\u17b5": "\\u17b5", "\u200c": "\\u200c", "\u200d": "\\u200d", "\u200e": "\\u200e", "\u200f": "\\u200f", "\u2028": "\\u2028", "\u2029": "\\u2029", "\u202a": "\\u202a", "\u202b": "\\u202b", "\u202c": "\\u202c", "\u202d": "\\u202d", "\u202e": "\\u202e", "\u202f": "\\u202f", "\u2060": "\\u2060", "\u2061": "\\u2061", "\u2062": "\\u2062", "\u2063": "\\u2063", "\u2064": "\\u2064", "\u2065": "\\u2065", "\u2066": "\\u2066", "\u2067": "\\u2067", "\u2068": "\\u2068", "\u2069": "\\u2069", "\u206a": "\\u206a", "\u206b": "\\u206b", "\u206c": "\\u206c", "\u206d": "\\u206d", "\u206e": "\\u206e", "\u206f": "\\u206f", "\ufeff": "\\ufeff", "\ufff0": "\\ufff0", "\ufff1": "\\ufff1", "\ufff2": "\\ufff2", "\ufff3": "\\ufff3", "\ufff4": "\\ufff4", "\ufff5": "\\ufff5", "\ufff6": "\\ufff6", "\ufff7": "\\ufff7", "\ufff8": "\\ufff8", "\ufff9": "\\ufff9", "\ufffa": "\\ufffa", "\ufffb": "\\ufffb", "\ufffc": "\\ufffc", "\ufffd": "\\ufffd", "\ufffe": "\\ufffe", "\uffff": "\\uffff" }, k = /[\x00-\x1f\ud800-\udfff\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0b5c-\u0b5d\u0e38-\u0e39\u0f43\u0f4d\u0f52\u0f57\u0f5c\u0f69\u0f72-\u0f76\u0f78\u0f80-\u0f83\u0f93\u0f9d\u0fa2\u0fa7\u0fac\u0fb9\u1939-\u193a\u1a17\u1b6b\u1cda-\u1cdb\u1dc0-\u1dcf\u1dfc\u1dfe\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d\u1fbb\u1fbe\u1fc9\u1fcb\u1fd3\u1fdb\u1fe3\u1feb\u1fee-\u1fef\u1ff9\u1ffb\u1ffd\u2000-\u2001\u20d0-\u20d1\u20d4-\u20d7\u20e7-\u20e9\u2126\u212a-\u212b\u2329-\u232a\u2adc\u302b-\u302c\uaab2-\uaab3\uf900-\ufa0d\ufa10\ufa12\ufa15-\ufa1e\ufa20\ufa22\ufa25-\ufa26\ufa2a-\ufa2d\ufa30-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufb4e\ufff0-\uffff]/g, l, m = JSON && JSON.stringify || function (a) { return i.lastIndex = 0, i.test(a) && (a = a.replace(i, function (a) { return j[a]; })), '"' + a + '"'; }, n = function (a) { var b, c = {}, d = []; for (b = 0; b < 65536; b++) { d.push(String.fromCharCode(b)); } return a.lastIndex = 0, d.join("").replace(a, function (a) { return c[a] = "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4), ""; }), a.lastIndex = 0, c; }; c.quote = function (a) { var b = m(a); return k.lastIndex = 0, k.test(b) ? (l || (l = n(k)), b.replace(k, function (a) { return l[a]; })) : b; }; var o = ["websocket", "xdr-streaming", "xhr-streaming", "iframe-eventsource", "iframe-htmlfile", "xdr-polling", "xhr-polling", "iframe-xhr-polling", "jsonp-polling"]; c.probeProtocols = function () { var a = {}; for (var b = 0; b < o.length; b++) { var c = o[b]; a[c] = y[c] && y[c].enabled(); } return a; }, c.detectProtocols = function (a, b, c) { var d = {}, e = []; b || (b = o); for (var f = 0; f < b.length; f++) { var g = b[f]; d[g] = a[g]; } var h = function (a) { var b = a.shift(); d[b] ? e.push(b) : a.length > 0 && h(a); }; return c.websocket !== !1 && h(["websocket"]), d["xhr-streaming"] && !c.null_origin ? e.push("xhr-streaming") : d["xdr-streaming"] && !c.cookie_needed && !c.null_origin ? e.push("xdr-streaming") : h(["iframe-eventsource", "iframe-htmlfile"]), d["xhr-polling"] && !c.null_origin ? e.push("xhr-polling") : d["xdr-polling"] && !c.cookie_needed && !c.null_origin ? e.push("xdr-polling") : h(["iframe-xhr-polling", "jsonp-polling"]), e; }; var p = "_sockjs_global"; c.createHook = function () { var a = "a" + c.random_string(8); if (! (p in b)) { var d = {}; b[p] = function (a) { return a in d || (d[a] = { id: a, del: function () { delete d[a]; } }), d[a]; }; } return b[p](a); }, c.attachMessage = function (a) { c.attachEvent("message", a); }, c.attachEvent = function (c, d) { typeof b.addEventListener != "undefined" ? b.addEventListener(c, d, !1) : (a.attachEvent("on" + c, d), b.attachEvent("on" + c, d)); }, c.detachMessage = function (a) { c.detachEvent("message", a); }, c.detachEvent = function (c, d) { typeof b.addEventListener != "undefined" ? b.removeEventListener(c, d, !1) : (a.detachEvent("on" + c, d), b.detachEvent("on" + c, d)); }; var q = {}, r = !1, s = function () { for (var a in q) { q[a](), delete q[a]; } }, t = function () { if (r) { return; } r = !0, s(); }; c.attachEvent("unload", t), c.unload_add = function (a) { var b = c.random_string(8); return q[b] = a, r && c.delay(s), b; }, c.unload_del = function (a) { a in q && delete q[a]; }, c.createIframe = function (b, d) { var e = a.createElement("iframe"), f, g, h = function () { clearTimeout(f); try { e.onload = null; } catch(a) {} e.onerror = null; }, i = function () { e && (h(), setTimeout(function () { e && e.parentNode.removeChild(e), e = null; }, 0), c.unload_del(g)); }, j = function (a) { e && (i(), d(a)); }, k = function (a, b) { try { e && e.contentWindow && e.contentWindow.postMessage(a, b); } catch(c) {} }; return e.src = b, e.style.display = "none", e.style.position = "absolute", e.onerror = function () { j("onerror"); }, e.onload = function () { clearTimeout(f), f = setTimeout(function () { j("onload timeout"); }, 2000); }, a.body.appendChild(e), f = setTimeout(function () { j("timeout"); }, 15000), g = c.unload_add(i), { post: k, cleanup: i, loaded: h }; }, c.createHtmlfile = function (a, d) { var e = new ActiveXObject("htmlfile"), f, g, i, j = function () { clearTimeout(f); }, k = function () { e && (j(), c.unload_del(g), i.parentNode.removeChild(i), i = e = null, CollectGarbage()); }, l = function (a) { e && (k(), d(a)); }, m = function (a, b) { try { i && i.contentWindow && i.contentWindow.postMessage(a, b); } catch(c) {} }; e.open(), e.write('