zendesk-chat-sdk
Version:
Zendesk Chat Web SDK with types
2,124 lines (2,112 loc) • 125 kB
JavaScript
/*!
* Copyright Zendesk, Inc.
*
* By downloading or accessing this software, You agree to the Zendesk Terms of Service (https://www.zendesk.com/company/terms) and Application Developer and API License Agreement (https://www.zendesk.com/company/application-developer-and-api-license-agreement) and acknowledge that such terms govern Your use of and access to the software.
*
*/
!function(e, t) {
"object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.zChat = t() : e.zChat = t();
}(window, function() {
return function(e) {
function t(i) {
if (n[i]) return n[i].exports;
var o = n[i] = {
i: i,
l: !1,
exports: {}
};
e[i].call(o.exports, o, o.exports, t);
o.l = !0;
return o.exports;
}
var n = {};
t.m = e;
t.c = n;
t.d = function(e, n, i) {
t.o(e, n) || Object.defineProperty(e, n, {
enumerable: !0,
get: i
});
};
t.r = function(e) {
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
value: "Module"
});
Object.defineProperty(e, "__esModule", {
value: !0
});
};
t.t = function(e, n) {
1 & n && (e = t(e));
if (8 & n) return e;
if (4 & n && "object" == typeof e && e && e.__esModule) return e;
var i = Object.create(null);
t.r(i);
Object.defineProperty(i, "default", {
enumerable: !0,
value: e
});
if (2 & n && "string" != typeof e) for (var o in e) t.d(i, o, function(t) {
return e[t];
}.bind(null, o));
return i;
};
t.n = function(e) {
var n = e && e.__esModule ? function() {
return e.default;
} : function() {
return e;
};
t.d(n, "a", n);
return n;
};
t.o = function(e, t) {
return Object.prototype.hasOwnProperty.call(e, t);
};
t.p = "../../bin/";
return t(t.s = 50);
}([ function(e, t, n) {
function i(e, t) {
var n = {}, i = {}, o = function(t) {
return !e.nodeType && e != window && e != document || ("FORM" != e.tagName || "submit" != t) && (!d.isCustomEvents && (d.isFF && d.isFF < 9 ? !document.createEvent("event")[t.toUpperCase()] : void 0 === e["on" + t]));
}, r = function(t, i) {
if (!t && "function" != typeof i) throw "bad arguments to on / addEventListener";
if (!(t in n)) {
n[t] = [];
o(t) || s(t);
}
n[t].push(i);
return e;
}, s = function(t) {
if (!(t in i)) {
i[t] = function(i) {
i && (i.stopPropagation || h(i));
var o, r = n[t], s = r.length, a = !0;
r._active = !0;
for (o = 0; o < s; o++) try {
if (!r[o]) continue;
!1 === r[o].call(e, d.isCustomEvents && i instanceof d.CustomEvent ? i.detail : i) && (a = !1);
} catch (e) {
f.fire("error", e);
}
r._active = !1;
if (r._dirty) {
for (o = 0; o < s; o++) if (!r[o]) {
o == s - 1 ? r.pop() : r[o--] = r.pop();
s--;
}
r._dirty = !1;
}
if (!1 === a) {
if (i) {
i.preventDefault();
i.returnValue = !1;
}
return !1;
}
};
e.attachEvent ? e.attachEvent("on" + t, i[t]) : e.addEventListener && e.addEventListener(t, i[t], !1);
}
}, a = function(t) {
var o = i[t];
if (o) {
e.attachEvent ? e.detachEvent("on" + t, o) : e.addEventListener && e.removeEventListener(t, o, !1);
delete i[t];
delete n[t];
}
}, c = function(t, o) {
var r = n[t];
if (r) {
for (var s = 0, c = r.length; s < c; s++) if (r[s] === o) {
1 == r.length ? i[t] ? a(t) : delete n[t] : r._active ? (r[s] = null, r._dirty = !0) : s == c - 1 ? r.pop() : r[s] = r.pop();
break;
}
return e;
}
}, u = function() {
if (n && i) {
for (var e in i) i.hasOwnProperty(e) && a(e);
n = i = null;
}
}, l = function(t, i) {
if (!d.isCustomEvents || o(t)) {
var r = n[t], s = !0;
if (r && r.length) {
r._active = !0;
var a, c, u;
for (a = 0, c = r.length; a < c; a++) try {
if (!r[a]) continue;
u = r[a].call(e, i);
!1 === u && (s = !1);
} catch (e) {
f.fire("error", e);
}
r._active = !1;
if (r._dirty) {
for (a = 0; a < c; a++) if (!r[a]) {
a == c - 1 ? r.pop() : r[a--] = r.pop();
c--;
}
r._dirty = !1;
}
}
return s;
}
return e.dispatchEvent(new d.CustomEvent(t, {
bubbles: !1,
cancelable: !0,
detail: i
}));
}, h = function(e) {
e.preventDefault = h.preventDefault;
e.stopPropagation = h.stopPropagation;
e.target = e.srcElement;
};
h.preventDefault = function() {
this.returnValue = !1;
};
h.stopPropagation = function() {
this.cancelBubble = !0;
};
var p = {
fire: l,
on: r,
un: c,
unextendEvents: u
};
if (t) return p;
for (var m in p) p.hasOwnProperty(m) && (e[m] = p[m]);
d.bugs.leaksMemory && d.bugs.leaksMemory(function() {
for (var t in p) p.hasOwnProperty(t) && (e[t] = null);
});
return e;
}
function o(e) {
a(0, e);
}
function r(e) {
a(1, e);
}
function s(e) {
a(2, e);
}
function a(e, t) {
e <= h ? t() : p[e].push(t);
}
function c(e) {
for (;h < e; ) {
h++;
for (var t = 0; t < p[h].length; t++) p[h][t]();
p[h] = null;
}
}
function u() {
h > 0 || (document.body && document.body.firstChild ? c(1) : window.setTimeout(u, 200));
}
function l() {
c(2);
}
var d = n(2), f = {
extend: i,
body: i(document.body, !0),
window: i(window, !0),
document: i(document, !0),
runAfterScriptReady: o,
runAfterFirstChildReady: r,
runAfterDomReady: s
};
f.extend(f);
var h = 0, p = [ [], [], [], [] ];
u();
!function() {
var e;
if (d.isSafari) e = window.setInterval(function() {
if (/loaded|complete/i.test(document.readyState)) {
window.clearInterval(e);
l();
}
}, 20); else if (document.addEventListener) /loaded|complete/i.test(document.readyState) ? l() : document.addEventListener("DOMContentLoaded", l, !1); else if (d.isIE) {
window.attachEvent("onload", l);
var t = document.createElement("document:ready");
e = window.setInterval(function() {
if (/loaded|complete/i.test(document.readyState)) {
t = null;
window.clearInterval(e);
l();
} else {
try {
t.doScroll("left");
} catch (e) {
return;
}
t = null;
window.clearInterval(e);
l();
}
}, 200);
}
}();
e.exports = f;
}, function(e, t) {
var n = function(e) {
return function(e, t) {
return t ? null == e : void 0 === e;
};
}();
e.exports = n;
}, function(e, t, n) {
function i() {
function e(e) {
return e.replace(/^http:/, N ? "https:" : "http:");
}
function t() {
if (void 0 !== window.innerHeight) return window.innerHeight;
if (document.documentElement) return document.documentElement.offsetHeight;
var e = document.getElementsByTagName("body");
return e.length ? e[0].clientHeight : 0;
}
function n() {
if (void 0 !== window.innerWidth) return window.innerWidth;
if (document.documentElement) return document.documentElement.offsetWidth;
var e = document.getElementsByTagName("body");
return e.length ? e[0].clientWidth : 0;
}
function i() {
if (!r(s)) return s;
var e = document.createElement("div"), t = document.createElement("div"), n = e.style, i = t.style;
n.overflow = "auto";
n.width = n.height = "100px";
n.position = "absolute";
n.top = "-1000px";
i.width = "100%";
i.height = "200px";
e.appendChild(t);
document.body.appendChild(e);
s = e.offsetWidth - e.clientWidth;
document.body.removeChild(e);
return s;
}
var s, a, c = navigator, u = c.userAgent.toLowerCase(), l = +(/trident.*rv:? *([0-9]+)/.exec(u) || [])[1] || !1, d = function() {
for (var e = 3, t = document.createElement("div"), n = t.getElementsByTagName("i"); t.innerHTML = "<!--[if gt IE " + ++e + "]><i></i><![endif]-->",
n[0]; ) ;
return e > 4 ? e : document.documentMode;
}(), f = 8 === d, h = 7 === d, p = 6 === d, m = !!window.opera && "[object Opera]" === Object.prototype.toString.call(window.opera), g = u.indexOf("edge") > -1, _ = "Google Inc." === c.vendor, v = "Apple Computer, Inc." === c.vendor, y = !g && !d && !m && (_ || v || /webkit|khtml/.test(u)), w = +/\d+/.exec(/firefox\/\d+/i.exec(c.userAgent) || ""), b = -1 !== u.indexOf("iphone"), $ = -1 !== u.indexOf("ipod"), E = -1 !== u.indexOf("ipad"), k = b || E || $, T = -1 !== u.indexOf("android"), O = -1 !== u.indexOf("wp7"), L = k || T || O, x = d && "msie" || w && "firefox" || m && "opera" || _ && "chrome" || v && "safari", A = "CSS1Compat" === document.compatMode, I = !A, R = d && I && document.documentElement && !!document.documentElement.style.setExpression, C = document.documentMode || d, S = -1 !== u.indexOf("windows") || -1 !== u.indexOf("win32"), D = -1 !== u.indexOf("macintosh") || -1 !== u.indexOf("mac os x"), N = "https:" === document.location.protocol, P = c.language || c.browserLanguage || c.userLanguage || c.systemLanguage, M = {
noBoxSizing: C <= 7,
ie: {
cssBottomRight: p,
cssFixed: p || R,
buggyCSS: p || R
}
}, V = "textContent" in document.createElement("div"), j = !1, U = null;
try {
if (window.CustomEvent && /\[native code\]|\[object CustomEventConstructor\]/.test(window.CustomEvent.toString())) {
new window.CustomEvent("testevent", {
bubbles: !1,
cancelable: !0,
detail: !0
});
j = !0;
U = window.CustomEvent;
}
} catch (e) {}
switch (x) {
case "msie":
case "firefox":
case "chrome":
a = +/\d+/.exec(new RegExp(x + "[ /]\\d+").exec(u) || "");
break;
default:
a = +/\d+/.exec(/version[ \/]\d+/.exec(u) || "");
}
var q = !1;
try {
var z = {
get passive() {
q = !0;
}
}, K = function() {};
window.addEventListener("test", K, z);
window.removeEventListener("test", K, z);
} catch (e) {
q = !1;
}
if (p) {
var F = [];
M.leaksMemory = function(e) {
o.isFunction(e);
F.push(e);
};
var W = function() {
for (var e = 0; e < F.length; e++) F[e]();
};
M.leaksMemory.remove = function(e) {
for (var t = F.length - 1; t >= 0; t--) e == F[t] && F.splice(t, 1);
};
window.attachEvent("onunload", W);
}
var H = "Shockwave Flash", B = "ShockwaveFlash.ShockwaveFlash", G = "application/x-shockwave-flash", Y = "application/x-java-vm";
return {
browser: x,
version: a,
isStrict: A,
isQuirks: I,
isOpera: m,
isSafari: v,
isWebKit: y,
isChrome: _,
isAndroid: T,
isIPhone: b,
isIPod: $,
isIPad: E,
isIOS: k,
isWP7: O,
isMobile: L,
isNewIE: l,
isEdge: g,
isIE: d,
isIE6: p,
isIE7: h,
isIE8: f,
isFF: w,
isCustomEvents: j,
CustomEvent: U,
engineIE: C,
bugs: M,
isWindows: S,
isMac: D,
isSecure: N,
secureURL: e,
hasFlash: function() {
var e, t = c.plugins && c.plugins[H];
if (t) {
e = c.mimeTypes && c.mimeTypes[G];
return e && !e.enabledPlugin ? null : t.description;
}
if (window.ActiveXObject) try {
t = new window.ActiveXObject(B);
t.AllowScriptAccess = "always";
return t.GetVariable("$version");
} catch (e) {}
}(),
hasJava: function() {
var e = c.mimeTypes;
return d ? !O && ("javaEnabled" in c && c.javaEnabled()) : e && (e = e[Y]) && (e = e.enabledPlugin) ? e.name : void 0;
}(),
language: P,
getScrollbarSize: i,
getWindowClientHeight: t,
getWindowClientWidth: n,
isTextContent: V,
hasPassiveListeners: q
};
}
var o = n(23), r = n(1), s = i();
s.sniffBrowser = i;
e.exports = s;
}, function(e, t, n) {
function i() {
if (window.$zopim && window.$zopim.s) return window.$zopim.s.src;
for (var e, t = document.getElementsByTagName("script"), n = /.*zopim.(com|net|org)\//, i = 0, o = t.length; i < o; i++) {
e = t[i].src || "";
if (n.test(e)) return e;
}
return "";
}
function o(e) {
e && !m.test(e) && (e = null);
var t = "id." + (d.brandDomain || "zopim.com");
return "https://" + (e || t) + "/authenticated/web/jwt";
}
function r(e) {
if (e) {
if (g.test(e)) return e.replace(g, "$1.zopim.com$2");
m.test(e) || (e = null);
}
var t = "widget-mediator." + (d.brandDomain && d.brandDomain.replace(/:[0-9]+/, "") || "zopim.com");
return e || t;
}
var s = n(1), a = n(4), c = n(2), u = n(46), l = n(21), d = function() {
for (var e = i(), t = [ /\/?[?]/, /\/livechat\// ], n = [], o = 0; o < t.length; o++) {
n = e.split(t[o]);
if (n.length) break;
}
var r = n[1], s = n[0], a = /^(https?:)?\/\/[^\/]+/.exec(s), c = s.replace(/^(https?:)?\/\//i, "").split("/")[0], u = c.replace(/(.+\.)(?=.+\..+)/, ""), l = n[0].split("/");
l = l.pop() == c ? n[0] : l.join("/");
a = a && "zopim.com" !== c ? a[0] : "https://v2.zopim.com";
return {
accountKey: r,
brandDomain: u,
baseURL: l,
rootURL: a
};
}(), f = "https://v2.zopim.com/widget", h = f + "/images", p = u.map([ ".zopim.com", ".zopim.org", ".zdch.at", ".zd-dev.com", ".bre-zd.com" ], l.escape), m = new RegExp("^[a-z][a-z0-9_-]*(\\.[a-z][a-z0-9_-]*)*(" + p.join("|") + ")(:\\d+)?$", "i"), g = /^([a-z][a-z0-9_-]*)(:\d+)?$/i;
s(a.baseURL, !0) && (a.baseURL = c.secureURL(d.baseURL));
var _ = {
ASSETS_URL: f,
IMAGES_URL: h,
SOUNDS_URL: "https://v2.zopim.com/widget/sounds",
FONTS_URL: "https://v2.zopim.com/widget/fonts",
ASSETS_LEGACY: document.location.protocol + "//cdn.zopim.com/assets",
BRANDING_URL: "https://www.zopim.com",
AVATARS: {
CONCIERGE: h + "/avatar_simple_agent.png",
AGENT: h + "/avatar_simple_agent.png",
VISITOR: h + "/avatar_simple_visitor.png",
DEFAULT: h + "/avatar_simple_visitor.png"
},
ACCOUNT_KEY: d.accountKey,
BRAND_DOMAIN: d.brandDomain,
COUNTRY_CODE: function() {
var e = '<!--# echo var="http_cf_ipcountry" default="geo" -->'.toUpperCase();
"<" == e.charAt(0) && (e = "geo");
return e;
}(),
AUTH_URL: "https://www.zopim.com/auth/$NAME/$KEY-$MID",
AUTH_LOGOUT_URL: "https://www.zopim.com/auth/logout/$KEY-$MID",
AUTH_SERVER_URL: o(),
IS_POPOUT: window.$zopim_popout,
POPOUT_WINDOW_PREFIX: "zlivechatpopout_",
POPOUT_URL: d.rootURL + "/widget/livechat.html",
CALLBACK_FILE_UPLOAD_PATH: "/client/widget/upload",
FILE_UPLOAD_PATH: "/client/widget/uploads",
FILE_UPLOAD_MAX: 20971520,
RESEND_MSG_TIMEOUT: 5e3,
FILE_REPLACE_SOURCE: /^(\s*https?\:\/\/v2(?:assets|uploads)\.zopim\.)com(\/)/i,
FILE_REPLACE_RESULT: "$1io$2",
CHAT_LOG_REMEMBER_COUNT: 10,
getAuthServerURL: o,
getMediatorHost: r
};
e.exports = _;
}, function(e, t) {
var n = {
build_number: "20200423.075440",
git_commit: "a2e84ec3fc0a7507e1dcc0cd9c0b4c7c6519e194",
release_tag: "1.11.2"
};
e.exports = n;
}, function(e, t) {
function n(e) {
return "function" == typeof e;
}
e.exports = n;
}, function(e, t, n) {
function i(e, t) {
for (var n, i = document.createElement("div"), o = 0, r = P.length; o < r; o++) if (void 0 !== i.style[P[o]]) {
n = t[o];
break;
}
return n ? e ? function(e, t, i) {
e.autobind(t, n, i);
} : function(e, t, i) {
M && e.autounbind(t, n, i);
} : function() {};
}
function o(e, t) {
for (var n = {}, i = 0, o = t.length; i < o; i++) {
var r = t[i];
r in e && (n[r] = e[r]);
}
return n;
}
function r() {
for (var e, t, n = arguments.length, i = 1, o = arguments[0] || {}; i < n; i++) if (null != (e = arguments[i])) for (t in e) Object.prototype.hasOwnProperty.call(e, t) && o !== e[t] && (o[t] = e[t]);
return o;
}
function s(e, t) {
for (var n in t) if (Object.prototype.hasOwnProperty.call(t, n)) if (t[n] && t[n].constructor && t[n].constructor === Object) {
e[n] = e[n] || {};
s(e[n], t[n]);
} else e[n] = t[n];
return e;
}
function a(e, t) {
for (var n in t) if (Object.prototype.hasOwnProperty.call(t, n)) {
if (!(n in e)) continue;
t[n] && t[n].constructor && t[n].constructor === Object ? a(e[n], t[n]) : delete e[n];
}
return e;
}
function c() {
if (void 0 === x) try {
x = u();
} catch (e) {}
return x;
}
function u() {
if (!window.getComputedStyle) return !1;
var e = document.createElement("div"), t = "border-box";
document.body.appendChild(e);
e.style.height = "10px";
e.style.padding = "5px";
e.style.boxSizing = t;
e.style.webkitBoxSizing = t;
e.style.mozBoxSizing = t;
var n = parseInt(window.getComputedStyle(e).height, 10);
document.body.removeChild(e);
return 10 != n;
}
function l(e) {
var t = e.getComputedStyle();
if ("auto" == t.height) return e.getHeight();
var n = parseInt(t.height, 10) || 0;
j.computedHeightBoxSizingBug() && (n += (parseInt(t.paddingTop, 10) || 0) + (parseInt(t.paddingBottom, 10) || 0) + (parseInt(t.borderTopWidth, 10) || 0) + (parseInt(t.borderBottomWidth, 10) || 0));
return n + "px";
}
function d(e) {
function t() {
this.addClass("hover");
}
function n() {
this.removeClass("hover");
}
if (A.bugs.noBoxSizing) {
e.on("mouseover", t);
e.on("mouseout", n);
}
}
function f(e, t) {
for (var n, i = t.split("."); i.length; ) {
n = i.shift();
I(e[n], !0) && (e[n] = {});
e = e[n];
}
return e;
}
function h(e, t) {
if (0 === t.indexOf(e.path)) {
for (var n, i = e.path.split(".").length, o = t.split(".").slice(i), r = e.update; o.length; ) {
n = o.shift();
if (!(n in r)) return;
r = r[n];
}
return r;
}
}
function p(e, t, n) {
e = e.split(".");
var i = e.pop();
if (i) {
for (var o = 0, r = e.length; o < r; o++) {
e[o] in n || (n[e[o]] = {});
n = n[e[o]];
}
n[i] = t;
}
}
function m(e) {
for (var t = e.split("."), n = "." + t.splice(t.length - 2, 2).join("."); t.length; ) {
var i = {
domain: n,
path: "/"
};
C.set("zte2095", "1", i);
if ("1" == C.get("zte2095")) {
C.remove("zte2095", i);
break;
}
n = "." + t.pop() + n;
}
return n;
}
function g(e) {
return q.test(e);
}
function _(e) {
return U.test(e);
}
function v(e) {
if (e && "object" == typeof e) {
var t = [];
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.push(n);
return t;
}
}
function y(e) {
if (window.Image) try {
var t = new window.Image();
t.onload = t.onerror = function() {
e(!(1 != this.width || 1 != this.height));
};
t.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";
} catch (t) {
e();
} else e();
}
function w(e, t) {
e = parseInt(e, 10);
isNaN(e) && (e = 0);
var n = e < 0;
e = Math.abs(e).toString().split("");
for (var i = Math.max(t - e.length, 0); i--; ) e.unshift("0");
n && e.unshift("-");
return e.join("");
}
function b(e, t) {
function n(e, t, n) {
return n.replace("<hours>", e).replace("<minutes>", t);
}
var i = R("<hours>:<minutes>"), o = R("<hours>:<minutes> am"), r = R("<hours>:<minutes> pm"), s = "24" === t ? 24 : 12, a = function(e, t) {
return e - Math[e > 0 ? "floor" : "ceil"](e / t) * t;
}(Math[e > 0 ? "floor" : "ceil"](e / 60), s), c = j.pad(Math.abs(e) % 60, 2);
if (24 === s) return n(j.pad(a, 2), c, i);
var u = 0 === a ? 12 : a;
return Math.abs(e / 60) % 24 < 12 ? n(u, c, o) : n(u, c, r);
}
function $(e) {
return e && e.replace(S.FILE_REPLACE_SOURCE, S.FILE_REPLACE_RESULT);
}
function E(e, t) {
t = parseInt(t, 10);
if (!t) return e.getValue();
var n = e.getKeys(), i = n.length, o = {};
if (i <= t) return e.getValue() || o;
for (var r = 0; r < i; r++) n[r] = parseInt(n[r], 10);
n = n.sort().slice(-t);
var s, a = e.getValue();
if (!a) return o;
for (r = 0, i = n.length; r < i; r++) {
s = n[r];
o[s] = a[s];
}
return o;
}
function k(e, t) {
var n;
if (e.leaf && e.parentNode) {
n = {};
n[e.name] = t;
e.parentNode.write(n);
} else e.write(t);
}
function T() {
if (A.isNewIE) try {
"body" !== document.activeElement.nodeName.toLowerCase() && document.activeElement.focus();
} catch (e) {}
}
function O() {
window.console && window.console.warn && window.console.warn("The Zopim widget embed code is invalid. Please email chat@zendesk.com with your account key: " + S.ACCOUNT_KEY);
}
function L(e, t, n) {
return S.AUTH_URL.replace("$NAME", e).replace("$KEY", t).replace("$MID", n);
}
var x, A = n(2), I = n(1), R = n(11), C = n(16), S = n(3), D = "-webkit- -moz- -o- -ms- ".split(" "), N = "webkit Moz O ms ".split(" "), P = [ "transition", "MozTransition", "OTransition", "WebkitTransition" ], M = [ "transitionend", "transitionend", "otransitionend", "webkitTransitionEnd" ], V = [ "animationend", "animationend", "oanimationend", "webkitAnimationEnd" ], j = {
contains: function() {
var e = document.documentElement;
return e.compareDocumentPosition ? function(e, t) {
e = e.dom || e;
t = t.dom || t;
return !!(16 & e.compareDocumentPosition(t));
} : e.contains ? function(e, t) {
e = e.dom || e;
t = t.dom || t;
var n = 9 === e.nodeType ? e.documentElement : e, i = t.parentNode;
return e === i || !!(i && 1 === i.nodeType && n.contains && n.contains(i));
} : function(e, t) {
e = e.dom || e;
t = t.dom || t;
for (;t = t.parentNode; ) if (t === e) return !0;
return !1;
};
}(),
onTransitionEnd: i(!0, M),
unTransitionEnd: i(!1, M),
onAnimationEnd: i(!0, V),
unAnimationEnd: i(!1, V),
css_prefixes: D,
cssom_prefixes: N,
isStyleSupported: function() {
function e(e) {
for (var t = e.charAt(0).toUpperCase() + e.slice(1), i = (e + " " + N.join(t + " ") + t).split(" "), o = 0; o < i.length; o++) if (void 0 !== n[i[o]]) return !0;
return !1;
}
var t = document.createElement("div"), n = t.style;
return e;
}(),
pick: o,
shallowExtend: r,
fullyExtend: s,
fullyDelete: a,
computedHeightBoxSizingBug: c,
getComputedHeight: l,
hoverFix: d,
getEffectiveTLD: m,
descendsObj: f,
insertObj: p,
getValueByReference: h,
isDefaultName: _,
getKeys: v,
supportsDataURI: y,
isIE: function() {
return A.isIE || /Trident\//.test(window.navigator.userAgent);
}(),
pad: w,
formatMinutesAsHours: b,
replaceFileHostname: $,
getLastLogEntries: E,
writeNode: k,
isAgentNick: g,
refocusActiveElement: T,
warnBadEmbed: O,
getAuthLoginUrl: L
}, U = /^Visitor [0-9]{3,}$/, q = /^agent:[0-9]+/i;
e.exports = j;
}, function(e, t) {
function n(e) {
return "[object Array]" == Object.prototype.toString.call(e);
}
e.exports = n;
}, function(e, t, n) {
function i(e) {
if (!(this instanceof i)) {
c || i._initSingleton(window);
return c;
}
if (e) return i.parseQuery(e);
this.store = {};
}
function o(e, t, n) {
if (void 0 === t && void 0 === n) return e;
void 0 === t && (t = "string");
if (!(t in a)) throw "invalid type requested";
return void 0 === e ? void 0 !== n ? n : a[t] : "boolean" === t ? s.test(e) : "integer" === t ? !0 === e ? 1 : parseInt(e, 10) : "float" === t ? !0 === e ? 1 : parseFloat(e) : e;
}
var r = n(7), s = /^(1|on|true)$/i, a = {
boolean: !1,
integer: 0,
float: 0,
string: ""
}, c = null;
i._initSingleton = function(e) {
c = new i(e.location.search);
};
i.buildQuery = function(e) {
var t, n, i, o, s, a, c = [], u = [];
for (s in e) Object.prototype.hasOwnProperty.call(e, s) && c.push(s);
c.sort();
for (t = 0, i = c.length; t < i; t++) {
s = c[t];
a = e[s];
s = window.encodeURIComponent(s);
if (r(a)) if (1 !== a.length || !0 !== a[0]) for (n = 0, o = a.length; n < o; n++) u.push(s + "=" + window.encodeURIComponent(a[n] + "")); else u.push(s); else u.push(s + "=" + window.encodeURIComponent(a + ""));
}
return u.join("&");
};
i.parseQuery = function(e) {
var t, n, o = new i();
e = e.replace(/^\?|\/+$/g, "");
var r, s, a = e.split("&");
for (t = 0, n = a.length; t < n; t++) {
var c = a[t];
if (c.length) {
var u = c.indexOf("=");
if (u <= -1) {
r = c;
s = !0;
} else {
r = c.slice(0, u);
s = window.decodeURIComponent(c.slice(u + 1));
}
o.add(window.decodeURIComponent(r), s);
}
}
return o;
};
i.getHash = function(e, t) {
var n = t || window.location.hash;
return i.parseQuery(n.replace(/^#/, "")).get(e);
};
var u = i.prototype;
u.add = function(e, t) {
this.has(e) ? this.store[e].push(t) : this.store[e] = [ t ];
};
u.has = function(e) {
return Object.prototype.hasOwnProperty.call(this.store, e);
};
u.getLast = function(e, t, n) {
return this.has(e) ? this.getAt(e, this.store[e].length - 1, t, n) : o(void 0, t, n);
};
u.getFirst = function(e, t, n) {
return this.getAt(e, 0, t, n);
};
u.getAt = function(e, t, n, i) {
return o(this.has(e) ? this.store[e][t] : void 0, n, i);
};
u.getRaw = function(e) {
return this.has(e) ? this.store[e].concat() : [];
};
u.get = u.getLast;
u.toString = function() {
return i.buildQuery(this.store);
};
e.exports = i;
}, function(e, t, n) {
function i(e, t) {
if (!r(e)) throw new TypeError("FunctionUtils.bind - what is trying to be bound is not callable");
if (r(e.bind) && !("prototype" in e.bind)) return e.bind.apply(e, a.call(arguments, 1));
var n = a.call(arguments, 2), i = function() {}, o = function() {
return e.apply(this instanceof i && t ? this : t, n.concat(a.call(arguments)));
};
i.prototype = o.prototype;
o.prototype = new i();
return o;
}
function o(e) {
var t;
return function() {
if (!t) {
t = !0;
return e.apply(this, a.call(arguments));
}
};
}
var r = n(5), s = {
bind: i,
once: o
}, a = Array.prototype.slice;
e.exports = s;
}, function(e, t, n) {
function i(e) {
return '"' + e.replace(d, o) + '"';
}
function o(e) {
return f[e] || "\\u" + ("0000" + e.charCodeAt(0).toString(16)).slice(-4);
}
function r(e) {
switch (typeof e) {
case "string":
return i(e);
case "number":
return isFinite(e) ? e.toString() : "null";
case "boolean":
return String(e);
case "object":
if (!e) return "null";
var t, n, o = [];
if (u(e)) {
for (t = 0, n = e.length; t < n; t++) o[t] = r(e[t]) || "null";
return "[" + o.join(",") + "]";
}
var s, a, c = [];
for (s in e) e.hasOwnProperty(s) && c.push(s);
c.sort();
for (t = 0, n = c.length; t < n; t++) {
s = c[t];
a = r(e[s]);
a && o.push(i(s) + ":" + a);
}
if (o.length) return "{" + o.join(",") + "}";
}
}
function s(e, t, n) {
return t ? m[t] : String.fromCharCode(parseInt(n, 16));
}
function a(e) {
var t, n, i, o, r, a = e.match(h), c = a.length, u = a[0];
"{" == u ? (t = {}, r = 1) : "[" == u ? (t = [], r = 1) : (t = [], r = 0, n = !0);
var l = [ t ];
for (c = a.length; r < c; ++r) {
u = a[r];
switch (u.charCodeAt(0)) {
case 91:
o = l[0];
l.unshift(o[i || o.length] = []);
i = void 0;
break;
case 93:
l.shift();
break;
case 123:
o = l[0];
l.unshift(o[i || o.length] = {});
i = void 0;
break;
case 125:
l.shift();
break;
case 102:
o = l[0];
o[i || o.length] = !1;
i = void 0;
break;
case 110:
o = l[0];
o[i || o.length] = null;
i = void 0;
break;
case 116:
o = l[0];
o[i || o.length] = !0;
i = void 0;
break;
case 34:
u = u.substring(1, u.length - 1);
-1 !== u.indexOf(_) && (u = u.replace(p, s));
o = l[0];
if (void 0 == i) {
if (!(o instanceof Array)) {
i = u || g;
break;
}
i = o.length;
}
o[i] = u;
i = void 0;
break;
default:
o = l[0];
o[i || o.length] = +u;
i = void 0;
}
}
if (n) {
if (1 == l.length) return t[0];
} else if (!l.length) return t;
throw "error";
}
var c = n(1), u = n(7), l = !c(window) && window.JSON || {
parse: a,
stringify: r
}, d = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, f = {
"\b": "\\b",
"\t": "\\t",
"\n": "\\n",
"\f": "\\f",
"\r": "\\r",
"\\": "\\\\",
'"': '\\"'
}, h = new RegExp('(?:false|true|null|[\\{\\}\\[\\]]|(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)|(?:"(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))*"))', "g"), p = new RegExp("\\\\(?:([^u])|u(.{4}))", "g"), m = {
'"': '"',
"/": "/",
"\\": "\\",
b: "\b",
f: "\f",
n: "\n",
r: "\r",
t: "\t"
}, g = new String(""), _ = "\\";
e.exports = l;
}, function(e, t, n) {
function i(e, t) {
if (isNaN(e)) {
var n = new o();
n.add("_", e);
return n;
}
-1 == e && (e = y.length);
var i = y[e];
i || (y[e] = i = new o());
if ("string" == typeof t) i.add("_", t); else for (var r in t) t.hasOwnProperty(r) && i.add(r, t[r]);
return i;
}
function o() {
function e(e, t) {
u[e] = t;
}
function t(e) {
r(e, d);
}
function n(e) {
l.push(e);
}
function i() {
return s();
}
function s(e) {
return u[e || w] || u._;
}
function a(e) {
var t, n = s(e);
for (t = 0; t < l.length; t++) l[t](n);
}
function c(e, t) {
var n, i = new o();
y[u._] = i;
for (var r in u) if (u.hasOwnProperty(r)) {
n = u[r];
if ("string" != typeof n) continue;
n = n[e].apply(n, t);
i.add(r, n);
}
return i;
}
for (var u = {}, l = [], d = {
add: e,
bind: t,
onTranslate: n,
toJSON: i,
toString: s,
update: a
}, f = [ "concat", "replace", "toLowerCase", "toUpperCase" ], h = 0; h < f.length; h++) d[f[h]] = function(e) {
return function() {
return c(e, arguments);
};
}(f[h]);
return d;
}
function r(e, t) {
for (var n = 0; n < b.length; n++) if (b[n] == e) {
$[n] = t;
return;
}
b.push(e);
$.push(t);
}
function s(e) {
for (var t = 0; t < b.length; t++) if (b[t] == e) {
b.splice(t, 1);
$.splice(t, 1);
return;
}
}
function a(e) {
e = e.split(/-|_/).slice(0, 2);
var t = e[0] = e[0].toLowerCase();
e[1] && (e[1] = e[1].toUpperCase());
e = e.join("_");
return g.languages ? e in g.languages ? e : t in g.languages ? t : null : null;
}
function c(e) {
var t, n, o, r, s, c;
e = a(e);
if (e) {
s = g.languages[e];
if (s) {
c = _[g.languages[e]];
if (c) {
i.language = w = e;
v.ensureLoaded(c, function(i) {
i && u(e);
if (e == w) {
for (t = 0, n = y.length; t < n; t++) y[t].update instanceof Function && y[t].update(e);
for (t = 0, n = b.length; t < n; t++) {
o = b[t];
r = $[t].toString();
if (k) o.textContent = r; else if ("string" == typeof o.innerText) o.innerText = r; else if ("string" == typeof o.nodeValue) try {
o.data = r;
} catch (e) {}
}
E._active = !0;
n = E.length;
for (t = 0; t < n; t++) try {
E[t] && E[t](e);
} catch (e) {}
E._active = !1;
if (E._dirty) {
for (t = 0; t < n; t++) if (!E[t]) {
t == n - 1 ? E.pop() : E[t--] = E.pop();
n--;
}
E._dirty = !1;
}
}
});
}
}
}
}
function u(e) {
var t, n = _[g.languages[e]];
for (t = 0; t < n.length; t++) 0 !== n[t] && y[t].add(e, n[t]);
}
function l(e) {
E.push(e);
}
function d(e) {
for (var t = 0, n = E.length; t < n; t++) if (E[t] == e) {
E._active ? (E[t] = null, E._dirty = !0) : t == n - 1 ? E.pop() : E[t] = E.pop();
break;
}
}
function f() {
return !(-1 == w.search(T));
}
function h(e) {
return f() ? e.replace(/left/, "%left%").replace(/right/, "left").replace(/%left%/, "right").replace(/ltr/, "%ltr%").replace(/rtl/, "ltr").replace(/%ltr%/, "rtl") : e;
}
function p() {
var e = g.strings;
if (e) for (var t = 0; t < e.length; t++) i(t, e[t]);
}
var m = n(2), g = n(4), _ = n(19), v = n(43), y = [], w = "_", b = [], $ = [], E = [], k = m.isTextContent, T = /^ar|^fa|^he|^ur/;
i.bind = r;
i.flip = h;
i.onLanguage = l;
i.unLanguage = d;
i.update = c;
i.unbind = s;
i.rtl = f;
i.findClosestLanguage = a;
i.loadDefaultStrings = p;
p();
e.exports = i;
}, function(e, t) {
function n(e) {
return "string" == typeof e;
}
e.exports = n;
}, function(e, t, n) {
function i(e) {
p = e;
}
function o(e) {
E = e ? v.getAuthServerURL(e) : v.AUTH_SERVER_URL;
}
function r(e) {
f = e;
}
function s() {
return f;
}
function a(e) {
if (h) {
+new Date() - h.issued_at >= h.expires_in - 6e4 ? y.authenticate(function(t) {
if (t) {
p && p.$("visitor").$("auth_status$string").update("failed");
e(t, null);
} else e(null, h.id_token);
}) : e(null, h.id_token);
} else e(null, null);
}
function c() {
f = void 0;
h = void 0;
p && p.$("visitor").$("authenticated$bool").update(!1);
}
function u() {
return !!h;
}
function l(e) {
f && f(g.once(function(t) {
t && m(t) ? y.exchangeToken({
account_key: v.ACCOUNT_KEY,
auth_url: E,
site_jwt: t,
state: h && h.state ? h.state : null
}, function(t, n) {
h = n;
p && p.$("visitor").$("authenticated$bool").update(!t);
e(t);
}) : e({
reason: "invalid jwt in callback"
});
}));
}
function d(e, t) {
var n = new XMLHttpRequest();
n.open("POST", e.auth_url, !0);
n.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
n.onload = function() {
if (t) {
var e;
try {
var i = n.response;
if ("" === i) throw w;
e = JSON.parse(i);
} catch (e) {
t({
reason: w
});
return;
}
200 === n.status ? t(void 0, {
issued_at: +new Date(),
id_token: e.id_token,
expires_in: 1e3 * e.expires_in,
state: e.state
}) : t({
reason: $,
details: e.details
});
}
};
n.onerror = function() {
t && t({
reason: b
});
};
var i = {
account_key: e.account_key,
token: e.site_jwt,
format: "json"
};
e.state && (i.state = e.state);
var o = _.buildQuery(i);
n.send(o);
}
var f, h, p, m = n(12), g = n(9), _ = n(8), v = n(3), y = {
authenticate: l,
isAuthenticated: u,
getSiteJWTFunc: s,
retrieveIDToken: a,
clearIdentity: c,
setOverrideHost: o,
setSiteJWTFunc: r,
setDataNode: i,
exchangeToken: d
}, w = "format error", b = "network/security error", $ = "jwt verification error", E = v.AUTH_SERVER_URL;
e.exports = y;
}, function(e, t, n) {
function i(e) {
b.setActivityWindow(e);
T = $.ACCOUNT_KEY;
g = (e || window).location.hostname;
_ = /\b(?:\d{1,3}\.){3}\d{1,3}/.test(g) ? g : E.getEffectiveTLD(g);
}
function o() {
if ($.IS_POPOUT) return b.get(x) || y().get("mid");
var e = d();
return e || (b.get(L) || "");
}
function r(e) {
b.set(L, e, {
path: "/",
ttl: 365,
domain: _
});
}
function s() {
b.remove(L, {
path: "/",
domain: _
});
}
function a() {
var e = f();
if ("boolean" == typeof e) return e;
var t = b.get(A);
t = parseInt(t, 10);
return 0 !== t && (1 === t || void 0);
}
function c() {
b.remove(A, {
path: "/",
domain: _
});
}
function u(e) {
e = v(e);
e = e ? 1 : 0;
b.set(A, e, {
path: "/",
ttl: 365,
domain: _
});
}
function l() {
s();
w.remove(O);
}
function d() {
var e = b.getJSONCookie("__zlcid");
b.remove("__zlcid", {
path: "/"
});
if (e.mID) return e.mID;
var t = h("__zlcstore");
b.remove("__zlcstore", {
path: "/",
domain: _
});
return t && t.mID ? t.mID : void 0;
}
function f() {
var e, t = h("__zlcprivacy");
if ("boolean" == typeof t) {
e = t;
u(t);
}
return e;
}
function h(e) {
return b.getJSONCookie(e)[T];
}
function p(e, t) {
var n = w.get(O) || {};
n[T] || (n[T] = {});
var i = n[T];
i[e] = t;
i.timestamp = +new Date();
w.set(O, n);
}
function m(e) {
var t = w.get(O) || {};
if (!t[T]) return {};
var n = t[T];
return n.timestamp ? +new Date() - n.timestamp > k ? {} : n[e] : n[e] || {};
}
var g, _, v = n(38), y = n(8), w = n(37), b = n(16), $ = n(3), E = n(6), k = 48e4, T = $.ACCOUNT_KEY, O = "__zlcstore", L = "__zlcmid", x = "__zlcpomid", A = "__zlcprivacy", I = {
init: i,
DOM: {
saveVariable: p,
getVariable: m
},
Cookie: b,
clearAll: l,
setIdentity: r,
getIdentity: o,
clearIdentity: s,
clearAllowCookieLaw: c,
getAllowCookieLaw: a,
setAllowCookieLaw: u
};
e.exports = I;
}, function(e, t, n) {
function i() {
var e = this;
this.arr = [];
this.validate = y.bind(this.validate, this);
$.concat([ "validateAndThrow", "validateAndLog" ]).forEach(function(t) {
e.validate[t] = e[t].bind(e);
});
return this.validate;
}
function o(e) {
return function(t) {
if (0 === e.length) return !1;
for (var n = 0, i = e.length; n < i; n++) {
if (!(0, e[n])(t)) return !1;
}
return new _('Expect "' + t + '" to fulfill at least one condition', t);
};
}
function r(e) {
return function(t) {
if (t !== e) return new _('expect "' + t + '" to equal "' + e + '"', t);
};
}
function s(e, t) {
return function(n) {
if ("object" != typeof n || !n) return new _('Expect "' + n + '" to be an object', n);
if (t && t.requiredKeys) for (var i = 0, o = t.requiredKeys.length; i < o; i++) {
var r = t.requiredKeys[i];
if (!(r in n)) {
var s = new _('Expect key "' + r + '" to be defined', n);
return s.unshiftPath(r);
}
}
for (var a in n) if (Object.prototype.hasOwnProperty.call(n, a)) {
var c, u = n[a], l = e[a];
if (l) c = l(u); else {
if (t && !t.whitelistedKeysOnly) continue;
c = new _('The key "' + a + '" is not whitelisted', n);
}
if (c) return c.unshiftPath(a);
}
};
}
function a(e) {
return function(t) {
if (typeof t !== e) return new _('Expect "' + t + '" to have type "' + e + '"', t);
};
}
function c() {
return function(e) {
if (!e) return new _('Expect "' + e + '" to be truthty', e);
};
}
function u(e) {
return function(t) {
e.lastIndex = 0;
if (!e.test(t)) return new _('Expect "' + t + '" to match predefined format', t);
};
}
function l(e) {
return function(t) {
if (t.length < e) return new _('Expect the length of "' + t + '" to be at least ' + e, t);
};
}
function d(e) {
return function(t) {
if (t.length > e) return new _('Expect the length of "' + t + '" to be at most ' + e, t);
};
}
function f() {
return function(e) {
if (!v(e)) return new _('Expect "' + e + '" to be an Array', e);
};
}
function h(e) {
return function(t) {
var n;
if (!v(t)) return new _('Expect "' + t + '" to be an Array', t);
for (var i = 0, o = t.length; i < o; i++) {
n = e(t[i]);
if (n) return n.unshiftPath(i);
}
};
}
function p(e, t) {
return function(n) {
if (!e(n)) return new _('Expect "' + n + '" to ' + t, n);
};
}
function m(e) {
return e;
}
function g(e) {
var t = window.console;
t.error ? t.error(e) : t.log && t.log(e);
}
function _(e, t) {
this.message = e;
this.actual = t;
this.paths = void 0;
this.unshiftPath = function(e) {
this.paths || (this.paths = []);
this.paths.unshift(e);
return this;
};
}
var v = n(7), y = n(9), w = window.Error, b = {
any: o,
equal: r,
obj: s,
type: a,
ok: c,
chain: m,
regex: u,
minLength: l,
maxLength: d,
array: f,
each: h,
predicate: p
}, $ = Object.keys(b), E = i.prototype;
$.forEach(function(e) {
var t = b[e];
i[e] = E[e] = function() {
if (!(this instanceof i)) {
var n = new i();
return n[e].apply(n, arguments);
}
var o = t.apply(null, arguments);
this.arr.push(o);
return this.validate;
};
});
E.validate = function(e) {
for (var t, n, i = 0, o = this.arr.length; i < o; i++) {
t = this.arr[i];
n = t(e);
if (n) return n;
}
};
E.validateAndThrow = function(e, t) {
var n = this.validate(e);
t = t ? t + " - " : "";
if (n) throw new w(t + n.message);
};
E.validateAndLog = function(e, t) {
var n = this.validate(e);
t = t ? t + " - " : "";
if (n) {
g(new w(t + n.message));
return n;
}
};
e.exports = i;
_.prototype = Object.create(w.prototype);
_.prototype.name = "ValidationError";
}, function(e, t, n) {
function i(e) {
m = e || window;
h = m.encodeURIComponent;
p = m.decodeURIComponent;
}
function o(e) {
return "string" == typeof e && "" != e;
}
function r() {
var e, t, n, i, o = m.document.cookie, r = {};
if (!o || "string" != typeof o) return {};
o = o.split(/;\s/);
for (e = o.length; e--; ) try {
t = o[e].match(/^([^=]+)(=(.*))?$/);
if (!t) continue;
n = p(t[1]);
i = p(t[3] || "");
r[n] = i;
} catch (e) {}
return r;
}
function s(e) {
return o(e) ? r()[e] || null : null;
}
function a(e) {
var t = s(e), n = {};
try {
n = d.parse(t);
} catch (e) {}
return n && "object" == typeof n ? n : {};
}
function c(e, t, n) {
n = n || {};
var i = h(e) + "=" + h(t);
if ("ttl" in n) {
var o = new Date(), r = 24 * n.ttl * 60 * 60 * 1e3;
o.setTime(o.getTime() + r);
i += "; expires=" + o.toGMTString();
}
"path" in n && (i += "; path=" + n.path);
"domain" in n && (i += "; domain=" + n.domain);
n.secure && (i += "; secure");
i += "; SameSite=" + (n.samesite || "Lax");
m.document.cookie = i;
}
function u(e, t, n) {
"object" != typeof t && (t = {});
c(e, d.stringify(t), n);
}
function l(e, t) {
t = t || {};
t.ttl = -1;
c(e, "", t);
}
var d = n(10), f = {
set: c,
get: s,
getJSONCookie: a,
setJSONCookie: u,
remove: l,
setActivityWindow: i
}, h = window.encodeURIComponent, p = window.decodeURIComponent, m = window;
e.exports = f;
}, function(e, t, n) {
function i(e, t, n) {
s.ok("function" == typeof e, "1st argument to nextTick must be a function");
if (n) for (var i = u.length; i-- > 0; ) if (u[i][0] === e && u[i][1] === t) return;
u.push([ e, t ]);
r || (r = setTimeout(o, 0));
}
function o() {
var e = +new Date() + c, t = u;
u = [];
r && (r = clearTimeout(r));
for (var n = 0, i = t.length; n < i; n++) {
try {
t[n][0].apply(t[n][1]);
} catch (e) {
a.fire("error", e);
}
if (+new Date() > e) {
if (n < i - 1) {
t.splice(0, n + 1);
if (u.length) u = t.concat(u); else {
u = t;
r = setTimeout(o, 0);
}
}
break;
}
}
}
var r, s = n(23), a = n(0), c = 100, u = [];
i.tick = o;
e.exports = i;
}, function(e, t, n) {
function i(e) {
var t, n, i = r.extend(this);
try {
t = new window.ActiveXObject("htmlfile");
t.open();
t.write("<script>document.win = window</script>");
t.close();
n = t.win;
} catch (e) {}
if (!n) {
var o = this.iframe = document.createElement("iframe"), a = o.style;
i.allowTransparency = "true";
i.frameBorder = "0";
a.backgroundColor = "transparent";
a.position = "absolute";
a.width = a.height = "1px";
a.left = a.top = "-9999px";
a.border = 0;
document.body.appendChild(o);
try {
n = o.contentWindow;
t = n.document;
t.open();
t.close();
} catch (e) {
i.fire("error");
i.destroy();
return;
}
}
i.doc = t;
i.win = n;
i.$Loader = {
cleanup: function() {
s(function() {
i.$Loader.payload ? i.fire("success", i.$Loader.payload) : i.fire("error");
i.$Loader.payload = null;
e || i.destroy();
});
}
};
i.reusable = e;
}
function o(e) {
return e && e.replace(a, function(e) {
return "&#" + e.charCodeAt(0) + ";";
});
}
var r = n(0), s = n(17);
i.prototype.setScope = function(e) {
this.scope = e;
};
var a = /[&<>"']/g;
i.prototype.load = function(e) {
if (/^(?:https?:)?\/\//i.test(e)) {
e = o(e);
try {
this.doc.open();
this.win.$Loader = this.$Loader;
this.win.$Loader.scope = this.scope || {};
this.doc.write('<html><head><script src="' + e + '"></script><script>document.addEventListener && document.addEventListener("DOMContentLoaded", function() {try { $Loader.cleanup() } catch(e) {}})</script></head><body></body></html>');
this.doc.close();
} catch (e) {
this.$Loader.cleanup();
}
} else this.$Loader.cleanup();
};
i.prototype.destroy = function() {
try {
this.iframe && document.body.removeChild(this.iframe);
this.doc = this.win = this.iframe = this.win.$Loader = null;
} catch (e) {}
};
e.exports = i;
}, function(e, t, n) {
var i = n(4), o = {};
o.$Data = i;
e.exports = o;
}, function(e, t) {
function n(e, t) {
function n() {
a = !a;
e.apply(o, i);
}
var i, o, r, s, a = !0;
return function() {
i = Array.prototype.slice.call(arguments);
o = this;
if (a) {
s = setTimeout(function() {
a = !0;
}, t);
return n();
}
s && clearTimeout(s);
r && clearTimeout(r);
r = setTimeout(n, t);
};
}
function i(e, t) {
function n() {
e.apply(o, i);
}
var i, o, r;
return function() {
r && clearTimeout(r);
i = Array.prototype.slice.call(arguments);
o = this;
r = setTimeout(n, t);
};
}
function o(e, t) {
function n() {
s = +new Date();
r = null;
e.apply(o, i);
}
var i, o, r, s = 0;
return function() {
i = Array.prototype.slice.call(arguments);
o = this;
if (!r) {
var e = +new Date() - s;
e >= t ? n() : r = setTimeout(n, t - e);
}
};
}
function r(e, t) {
function n() {
s = +new Date();
i = o.length > 1 ? setTimeout(n, t) : null;
e.apply(r.shift(), o.shift());
}
var i, o = [], r = [], s = 0;
return function() {
o.push(Array.prototype.slice.call(arguments));
r.push(this);
if (!i) {
var e = +new Date() - s;
e >= t ? n() : i = setTimeout(n, t - e);
}
};
}
var s = {
debounceExceptFirst: n,
debounce: i,
throttle: o,
queue: r
};
e.exports = s;
}, function(e, t) {
var n = "[a-z0-9!#$%&'*+\\/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+\\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+([a-z0-9][a-z0-9-]*[a-z0-9])", i = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)", o = {
email: new RegExp("^" + n + "$", "i"),
ip_token: new RegExp("^" + i + "$"),
ip: new RegExp("^(?:" + i + "\\.){3}" + i + "$"),
tld: /^(AERO|ARPA|ASIA|A[CDEFGILMNOQRSTUWXZ]|BIZ|B[ABDEFGHIJMNORSTVWYZ]|CAT|COM|COOP|C[ACDFGHIKLMNORUVXYZ]|D[EJKMOZ]|EDU|E[CEGRSTU]|F[IJKMOR]|GOV|G[ABDEFGHILMNPQRSTUWY]|H[KMNRTU]|INFO|INT|I[DELMNOQRST]|JOBS|J[EMOP]|K[EGHIMNPRWYZ]|L[ABCIKRSTUVY]||MIL|MOBI|MUSEUM|M[ACDEGHKLMNOPQRSTUVWXYZ]|NAME|NET|N[ACEFGILOPRUZ]|ORG|OM|PRO|P[AEFGHKLMNRSTWY]|QA|R[EOSUW]|S[ABCDEGHIJKLMNORTUVYZ]|TEL|TRAVEL|T[CDFGHJKLMNOPRTVWZ]|U[AGKSYZ]|V[ACEGINU]|W[FS]|XN|Y[ET]|Z[AMW])$/i,
search: {
email: new RegExp(n, "ig"),
email_lws: new RegExp("(^|\\s+)" + n, "ig"),
hurl: /(^|\s+)(?:(?:https?|ftps?):\/\/)(?:\S+)/gi,
url: /(^|\s+)(?:[\w-]+\.)+(\w{2,})(?::[0-9]+)?(?:\/\S*)?/g,
phone_number: /(?:^|\s+)(?:(?:\+?\d{1,3}|\(\d{1,3}\))([-.\s])?)?\d{3,10}(?:([-.\s])\d{3,10})?/gi
},
escape: function(e) {
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
};
e.exports = o;
}, function(e, t) {
function n(e) {
return "number" == typeof e;
}
e.exports = n;
}, function(e, t, n) {
function i(e, t) {
e || r.log(t);
}
var o = n(5), r = {
ok: i,
isFunction: function(e, t) {
i(o(e), t);
}
};
r.log = function() {};
e.exports = r;
}, function(e, t) {
function n(e, t) {
c = e.$("connection");
u = t.$("tmp");
f = c.$("status$string");
h = c.$("socket_status$string");
p = c.$("disconnection_status$string");
m = c.$("socket_resume_timestamp$int");
g = c.$("socket_open_timestamp$int");
_ = c.$("client_reattached_timestamp$int");
v = e.$("livechat").$("account").$("status$string");
y = e.$("visitor").$("auth_status$string");
c.bindValue(r);
}
function i() {
c && c.unbindValue(r);
}
function o() {
i();
l = clearTimeout(l);
c = u = null;
f = h = p = m = g = _ = v = y = null;
d = void 0;
}
function r(e) {
e && "resume" == e.socket_status$string && (l = setTimeout(r, 1e3));
var t = s();
if (t && t !== d) {
u.update({
friendly_connection_status$string: t
});
d = t;
}
}
function s() {
var e = +new Date(), t = f.getValue(), n = h.getValue(), i = p.getValue(), o = m.getValue(), r = g.getValue(), s = _.getValue();
if ((n || t || i) && "disconnecting" !== i) {
if ("break" == n) {
if (w.indexOf(t) > -1) return "closed";
if ("disconnected" === i) return "closed";
}
return (null === n || "reconnect" == n || "resume" == n && e - o >= 1e3) && "reattached" === t && r <= s ? "connected" : "connecting";
}
}
function a() {
var e = f.getValue(), t = v.getValue(), n = p.getValue(), i = y.getValue();
return "banned" === t ? "banned" : "disconnected" === n ? "failed" === i ? "authentication_failed" : "logged_out" : "idle_disconnect" === e ? "idle_disconnect" : "error" === e || "shutdown" === e ? "server_error" : "unknown";
}
var c, u, l, d, f, h, p, m, g, _, v, y, w = [ "idle_disconnect", "shutdown", "error" ], b = {
init: n,
reset: o,
destroy: i,
getConnectionClosedReason: a
};
e.exports = b;
}, function(e, t, n) {
function i(e, t) {
t = t || window;
r = e.$("livechat").$("profile");
var n = {
window: s.extend(t, !0),
document: s.extend(t.document, !0)
}, i = a.throttle(o, u);
n.document.on("mousemove", i);
n.window.on("click", i);
n.window.on("scroll", i);
n.window.on("keypress", i);
i();
}
function o() {
r.write({
active$int: +new Date()
});
}
var r, s = n(0), a = n(20), c = {
init: i
}, u = 3e5;
e.exports = c;
}, function(e, t, n) {
var i = n(11), o = {
livechat: {
timestamp$int: +new Date(),
settings: {
file_sending: {
enabled$bool: !0
},
behavior: {
do_not_display$bool: !1
},
theme: {
name$string: "simple",
message_type$string: "bubble_avatar",
colors: {
placeholder$string: "_"
},
chat_button: {
position$string: "br",
position_mobile$string: "br"
},
chat_window: {
position$string: "br",
size$string: "medium",
profile_card: {
display_avatar$bool: !0,
display_rating$bool: !0,
display_title_name$bool: !0
},
use_banner$bool: !0,
title_bar: {
hide_minimize$bool: !1,
hide_popout$bool: !1
}
},
branding: {
type$string: "icon_font_zopim"
}
},
greetings: {
online$string: i("Chat With Us"),
offline$string: i("Leave a Message")
},
banner: {
enabled$bool: !0,
layout$string: "image_right",
text$string: i("Chat with us"),
image_path$string: "",
image_data$string: ""
},
chat_button: {
hide_when_offline$bool: !1
},
chat_window: {
mobile_mode$string: "popout",
title_bar: {
title$string: i("support"),
status_messages: {
online$string: i("We're online."),
away$string: i("We're away."),
offline$string: i("We're offline.")
}
}
},
login: {
allowed_types: {
email$bool: !0,
facebook$bool: !0,
twitter$bool: !1,
google$bool: !0
},
phone_display$bool: !1,
restrict_profile$bool: !1
},
concierge: {
display_name$string: i("Live Support"),
title$string: i("Ask us anything"),
avatar_path$string: "",
avatar_data$string: "",
greeting: {
enabled$bool: !1,
message$string: i("Hi, welcome to our website!")
}
},
branding: {
hide_branding$bool: !1,
hide_favicon$bool: !1,
custom_favicon_path$string: ""
},
language: {
language$string: "--"
},
cookie_law: {
enabled$bool: !1
},
sound: {
disabled$bool: !1
},
popout: {
enabled$bool: !0
},
rating: {
enabled$bool: !0
},
end_chat_menu: {
enabled$bool: !0,
message$string: ""
},
emoticons: {
enabled$bool: !1
},
bubble: {
enabled$bool: !0,
title$string: i("Questions?"),
text$string: i("Click here to chat with us")
},
forms: {
pre_chat_form: {
required$bool: !1,
profile_required$bool: !1,
message$string: "",
form: {
0: {
name$string: "name",
required$bool: 0
},
1: {
name$string: "email",
required$bool: 0
},
2: {
label$string: i("Choose a department"),
name$string: "department",
required$bool: 0,
type$string: "department"
},
3: {
label$string: i("Message"),
name$string: "message",
required$bool: 0,
type$string: "textarea"
},
4: {
label$string: i("Phone"),
name$string: "phone",
required$bool: 0,
type$string: "text",
hidden$bool: !0
}
}
},
offline_form: {
message$string: i("Sorry, we aren't online at the moment. Leave a message and we'll get back to you."),
message_disabled$string: i("Sorry, we aren't online at the moment."),
post_submit_message$string: i("Thanks for the message! We'll get back to you as soon as we can."),
profile_required$bool: !0,
form: {
0: {
name$string: "name",
required$bool: 1
},
1: {
name$string: "email",
required$bool: 1
},
2: {
label$string: i("Message"),
name$string: "message",
required$bool: 1,
type$string: "textarea"
},
3: {
label$string: i("Phone"),
name$string: "phone",
required$bool: 0,
type$string: "text",
hidden$bool: !0
}
}
},
post_chat_form: {
header$string: i("Nice chatting with you!"),
message$string: i("How would you rate the chat experience you just had?"),
comments_enabled$bool: !0,
comments_messages: {
good: {
message$string: i("Thanks for the good rating! Would you like to leave a comment?"),
placeholder$string: i("What did you like about this chat?")
},
bad: {
message$string: i("Sorry that we disappointed you. We'd appreciate it if you could tell us how to improve."),
placeholder$string: i("What did you dislike about this chat?")
}
}
},
card_form: {}
}
}
}
};
e.exports = o;
}, function(e, t) {
function n(e) {
"use strict";
if (null == this) throw new TypeError();
var t = Object(this), n = t.length >>> 0;
if (0 === n) return -1;
var i = 0;
if (arguments.length > 0) {
i = Number(arguments[1]);
i != i ? i = 0 : 0 != i && i != 1 / 0 && i != -1 / 0 && (i = (i > 0 || -1) * Math.floor(Math.abs(i)));
}
if (i >= n) return -1;
for (var o = i >= 0 ? i : Math.max(n - Math.abs(i), 0); o < n; o++) if (o in t && t[o] === e) return o;
return -1;
}
function i(e, t, n) {
return o.call(t, e, n);
}
var o = Array.prototype.indexOf;
"function" == typeof o && /\[native code\]/.test(o.toString()) || (o = n);
e.exports = i;
}, function(e, t, n) {
var i = n(11), o = n(27), r = n(1), s = i("File size too large. Maximum limit is <size>."), a = i("The file you are trying to send is not supported."), c = i("File sending is temporarily disabled. Please try again later."), u = i("<size> bytes"), l = i("<size> KB"), d = i("<size> MB"), f = {};
f.ERR_SIZE = "TOO_LARGE";
f.ERR_FORMAT = "ILLEGAL_TYPE";
f.ERR_DISABLED = "FILE_UPLOADS_TEMPORARILY_DISABLED";
var h = /^(x-|vnd\.)/i, p = [ "png", "jpg", "jpeg", "gif", "txt", "pdf" ], m = {}, g = i("Failed to send. Please try again.");
m[f.ERR_SIZE] = s;
m[f.ERR_FORMAT] = a;
m[f.ERR_DISABLED] = c;
f.prettySize = function() {
var e = [ u, l, d ], t = [ 0, 1, 2 ];
return function(n, i) {
n = Math.max(parseInt(n, 10) || 0, 0);
i = i || {};
for (var o, r = i.base2 ? 1024 : 1e3, s = e.length; s--; ) {
o = Math.pow(r, s);
if (n >= o) return e[s].replace("<size>", (n / o).toFixed(t[s]));
}
};
}();
f.