Skip to content

Instantly share code, notes, and snippets.

@shermozle
Created November 6, 2019 03:35
Show Gist options
  • Save shermozle/30111b0cf89113d454b3acfa833a913c to your computer and use it in GitHub Desktop.
Save shermozle/30111b0cf89113d454b3acfa833a913c to your computer and use it in GitHub Desktop.
;
(function() {
var dfltPluginCfg = {
"sourceFile": "download",
"info": true
};
var dfltGlobalCfg = {
"site": 596068,
"log": "",
"logSSL": "",
"domain": "ati-host.net",
"collectDomain": "logw363.ati-host.net",
"collectDomainSSL": "logws1363.ati-host.net",
"secure": true,
"pixelPath": "/hit.xiti",
"disableCookie": false,
"disableStorage": false,
"cookieSecure": false,
"cookieDomain": "",
"preview": false,
"plgs": ["Campaigns", "Clicks", "ClientSideUserId", "ContextVariables", "Offline", "OnSiteAds", "Page", "RichMedia"],
"lazyLoadingPath": "",
"documentLevel": "document",
"redirect": false,
"activateCallbacks": true,
"medium": "",
"ignoreEmptyChapterValue": true,
"base64Storage": false,
"sendHitWhenOptOut": true
};
(function(a) {
a.ATInternet = a.ATInternet || {};
a.ATInternet.Tracker = a.ATInternet.Tracker || {};
a.ATInternet.Tracker.Plugins = a.ATInternet.Tracker.Plugins || {}
})(window);
var Utils = function() {
function a(q) {
var c = typeof q;
if ("object" !== c || null === q) return "string" === c && (q = '"' + q + '"'), String(q);
var f, b, h = [],
s = q && q.constructor === Array;
for (f in q) q.hasOwnProperty(f) && (b = q[f], c = typeof b, "function" !== c && "undefined" !== c && ("string" === c ? b = '"' + b.replace(/[^\\]"/g, '\\"') + '"' : "object" === c && null !== b && (b = a(b)), h.push((s ? "" : '"' + f + '":') + String(b))));
return (s ? "[" : "{") + String(h) + (s ? "]" : "}")
}
function k(a) {
return null === a ? "" : (a + "").replace(n, "")
}
function l(a) {
var c, f = null;
return (a = k(a + "")) &&
!k(a.replace(e, function(a, h, q, r) {
c && h && (f = 0);
if (0 === f) return a;
c = q || h;
f += !r - !q;
return ""
})) ? Function("return " + a)() : null
}
var d = this,
e = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g,
n = RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$", "g");
d.isLocalStorageAvailable = function() {
try {
var a = localStorage;
a.setItem("__storage_test__", "__storage_test__");
a.removeItem("__storage_test__");
return !0
} catch (c) {
return !1
}
};
d.Base64 = {
_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
encode: function(a) {
var c = "",
f, b, h, s, r, e, g = 0;
for (a = d.Base64._utf8_encode(a); g < a.length;) f = a.charCodeAt(g++), b = a.charCodeAt(g++), h = a.charCodeAt(g++), s = f >> 2, f = (f & 3) << 4 | b >> 4, r = (b & 15) << 2 | h >> 6, e = h & 63, isNaN(b) ? r = e = 64 : isNaN(h) && (e = 64), c = c + this._keyStr.charAt(s) + this._keyStr.charAt(f) + this._keyStr.charAt(r) + this._keyStr.charAt(e);
return c
},
decode: function(a) {
var c = "",
f, b, h, e, r, g = 0;
for (a = a.replace(/[^A-Za-z0-9\+\/\=]/g, ""); g <
a.length;) f = this._keyStr.indexOf(a.charAt(g++)), b = this._keyStr.indexOf(a.charAt(g++)), e = this._keyStr.indexOf(a.charAt(g++)), r = this._keyStr.indexOf(a.charAt(g++)), f = f << 2 | b >> 4, b = (b & 15) << 4 | e >> 2, h = (e & 3) << 6 | r, c += String.fromCharCode(f), 64 != e && (c += String.fromCharCode(b)), 64 != r && (c += String.fromCharCode(h));
return c = d.Base64._utf8_decode(c)
},
_utf8_encode: function(a) {
a = a.replace(/\r\n/g, "\n");
for (var c = "", f = 0; f < a.length; f++) {
var b = a.charCodeAt(f);
128 > b ? c += String.fromCharCode(b) : (127 < b && 2048 > b ? c += String.fromCharCode(b >>
6 | 192) : (c += String.fromCharCode(b >> 12 | 224), c += String.fromCharCode(b >> 6 & 63 | 128)), c += String.fromCharCode(b & 63 | 128))
}
return c
},
_utf8_decode: function(a) {
for (var c = "", f = 0, b, h, e; f < a.length;) b = a.charCodeAt(f), 128 > b ? (c += String.fromCharCode(b), f++) : 191 < b && 224 > b ? (h = a.charCodeAt(f + 1), c += String.fromCharCode((b & 31) << 6 | h & 63), f += 2) : (h = a.charCodeAt(f + 1), e = a.charCodeAt(f + 2), c += String.fromCharCode((b & 15) << 12 | (h & 63) << 6 | e & 63), f += 3);
return c
}
};
d.loadScript = function(a, c) {
var f;
c = c || function() {};
f = document.createElement("script");
f.type = "text/javascript";
f.src = a.url;
f.async = !1;
f.defer = !1;
f.onload = f.onreadystatechange = function(a) {
a = a || window.event;
if ("load" === a.type || /loaded|complete/.test(f.readyState) && (!document.documentMode || 9 > document.documentMode)) f.onload = f.onreadystatechange = f.onerror = null, c(null, a)
};
f.onerror = function(a) {
f.onload = f.onreadystatechange = f.onerror = null;
c({
msg: "script not loaded",
event: a
})
};
var b = document.head || document.getElementsByTagName("head")[0];
b.insertBefore(f, b.lastChild)
};
d.cloneSimpleObject =
function(a, c) {
if ("object" !== typeof a || null === a || a instanceof Date) return a;
var f = new a.constructor,
b;
for (b in a) a.hasOwnProperty(b) && (void 0 === b || c && void 0 === a[b] || (f[b] = d.cloneSimpleObject(a[b])));
return f
};
d.jsonSerialize = function(e) {
try {
return "undefined" !== typeof JSON && JSON.stringify ? JSON.stringify(e) : a(e)
} catch (c) {
return null
}
};
d.jsonParse = function(a) {
try {
return "undefined" !== typeof JSON && JSON.parse ? JSON.parse(a + "") : l(a)
} catch (c) {
return null
}
};
d.arrayIndexOf = function(a, c) {
return Array.indexOf ?
a.indexOf(c) : function(a) {
if (null == this) throw new TypeError;
var b = Object(this),
c = b.length >>> 0;
if (0 === c) return -1;
var e = 0;
1 < arguments.length && (e = Number(arguments[1]), e != e ? e = 0 : 0 != e && Infinity != e && -Infinity != e && (e = (0 < e || -1) * Math.floor(Math.abs(e))));
if (e >= c) return -1;
for (e = 0 <= e ? e : Math.max(c - Math.abs(e), 0); e < c; e++)
if (e in b && b[e] === a) return e;
return -1
}.apply(a, [c])
};
d.uuid = function() {
return {
v4: function() {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(a) {
var c = 16 * Math.random() | 0;
return ("x" ===
a ? c : c & 3 | 8).toString(16)
})
},
num: function(a) {
var c = new Date,
f = function(a) {
a -= 100 * Math.floor(a / 100);
return 10 > a ? "0" + a : String(a)
};
return f(c.getHours()) + "" + f(c.getMinutes()) + "" + f(c.getSeconds()) + "" + function(a) {
return Math.floor((9 * Math.random() + 1) * Math.pow(10, a - 1))
}(a - 6)
}
}
};
d.getObjectKeys = function(a) {
var c = [],
f;
for (f in a) a.hasOwnProperty(f) && c.push(f);
return c
};
d.completeFstLevelObj = function(a, c, f) {
if (a) {
if (c)
for (var b in c) !c.hasOwnProperty(b) || a[b] && !f || (a[b] = c[b])
} else a = c;
return a
};
d.isPreview =
function() {
return window.navigator && "preview" === window.navigator.loadPurpose
};
d.isPrerender = function(a) {
var c, f = !1,
b = ["webkit", "ms"];
if ("prerender" === document.visibilityState) c = "visibilitychange";
else
for (var h = 0; h < b.length; h++) "prerender" === document[b[h] + "VisibilityState"] && (c = b[h] + "visibilitychange");
if ("undefined" !== typeof c) {
var e = function(b) {
a(b);
d.removeEvtListener(document, c, e)
};
d.addEvtListener(document, c, e);
f = !0
}
return f
};
var m = d.addEvtListener = function(a, c, f) {
a.addEventListener ? a.addEventListener(c,
f, !1) : a.attachEvent && a.attachEvent("on" + c, f)
},
g = d.removeEvtListener = function(a, c, f) {
a.removeEventListener ? a.removeEventListener(c, f, !1) : a.detachEvent && a.detachEvent("on" + c, f)
};
d.hashcode = function(a) {
var c = 0;
if (0 === a.length) return c;
for (var f = 0; f < a.length; f++) var b = a.charCodeAt(f),
c = (c << 5) - c + b,
c = c | 0;
return c
};
d.setLocation = function(a) {
var c = a.location;
a = window[a.target] || window;
c && (a.location.href = c)
};
d.dispatchCallbackEvent = function(a) {
var c;
if ("function" === typeof window.Event) c = new Event("ATCallbackEvent");
else try {
c = document.createEvent("Event"), c.initEvent && c.initEvent("ATCallbackEvent", !0, !0)
} catch (f) {}
c && "function" === typeof document.dispatchEvent && (c.name = a, document.dispatchEvent(c))
};
d.addCallbackEvent = function(a) {
m(document, "ATCallbackEvent", a)
};
d.removeCallbackEvent = function(a) {
d.removeEvent("ATCallbackEvent", a)
};
(function() {
function a(c, f) {
f = f || {
bubbles: !1,
cancelable: !1,
detail: void 0
};
var b;
try {
b = document.createEvent("CustomEvent"), b.initCustomEvent(c, f.bubbles, f.cancelable, f.detail)
} catch (h) {}
return b
}
"function" === typeof window.CustomEvent ? window.ATCustomEvent = window.CustomEvent : ("function" === typeof window.Event && (a.prototype = window.Event.prototype), window.ATCustomEvent = a)
})();
d.addEvent = function(a, c, f, b) {
d[a] = new ATCustomEvent(a, {
detail: {
name: c,
id: f
}
});
m(document, a, b)
};
d.removeEvent = function(a, c) {
g(document, a, c)
};
d.dispatchEvent = function(a, c) {
d[a] = d[a] || new ATCustomEvent(a, {
detail: {
name: c,
id: -1
}
});
try {
document.dispatchEvent(d[a])
} catch (f) {}
};
d.addOptOutEvent = function(a, c) {
d.addEvent("ATOptOutEvent",
"clientsideuserid", a, c)
};
d.removeOptOutEvent = function(a) {
d.removeEvent("ATOptOutEvent", a)
};
d.dispatchOptOutEvent = function(a) {
d.optedOut = a;
d.dispatchEvent("ATOptOutEvent", "clientsideuserid")
};
d.userOptedOut = function() {
d.dispatchOptOutEvent(!0)
};
d.userOptedIn = function() {
d.dispatchOptOutEvent(!1)
};
d.isOptedOut = function() {
if (null === d.optedOut) {
var a;
a: {
a = null;d.isLocalStorageAvailable() && (a = localStorage.getItem("atoptedout"));
if (null === a) {
var c = /(?:^| )atoptedout=([^;]+)/.exec(document.cookie);
null !==
c && (a = c[1])
}
if (null !== a) try {
a = decodeURIComponent(a)
} catch (f) {}
if (a && (a = d.jsonParse(a) || d.jsonParse(d.Base64.decode(a)), null !== a)) {
a = !!a.val;
break a
}
a = !1
}
d.optedOut = a
}
return !!d.optedOut
};
d.optedOut = null;
d.consentReceived = function(a) {
d.consent = !!a
};
d.consent = !0;
d.isTabOpeningAction = function(a) {
var c = !1;
a && (a.ctrlKey || a.shiftKey || a.metaKey || a.button && 1 === a.button) && (c = !0);
return c
}
};
window.ATInternet.Utils = new Utils;
var BuildManager = function(a) {
var k = this,
l = 1600,
d = ["dz"],
e = function(a, f, b, h, e, r, g) {
a = "&" + a + "=";
return {
param: a,
paramSize: a.length,
str: f,
strSize: f.length,
truncate: b,
multihit: h,
separator: e || "",
encode: r,
last: g
}
},
n = function(a, f) {
var b = "",
h = 0,
e = 0,
r = 0,
g = null,
p = null,
d;
for (d in a) a.hasOwnProperty(d) && (g = a[d]) && (h = f - e, g.last && null !== p ? p[d] = g : g.strSize + g.paramSize <= h ? (b += g.param + g.str, e += g.paramSize + g.strSize) : (p = p || {}, p[d] = g, g.truncate && (r = h - g.paramSize, g.separator && (h = g.str.substring(0, h), r = g.encode ? h.lastIndexOf(encodeURIComponent(g.separator)) ||
r : h.lastIndexOf(g.separator) || r), b += g.param + g.str.substring(0, r), e += g.paramSize + g.str.substring(0, r).size, p[d].str = g.str.substring(r, g.strSize), p[d].strSize = p[d].str.length)));
return [b, p]
},
m = function(c, f, b, h) {
var g = "",
r = function(b) {
if (b === {}) return [];
var c = [],
h;
h = {};
var f = !1,
r = void 0,
p, m, q, k, w, t, v, y, z = "",
x;
for (x in b)
if (b.hasOwnProperty(x))
if (t = w = k = q = !1, p = b[x].value, m = b[x].options || {}, "boolean" === typeof m.encode && (q = m.encode), "function" === typeof p && (p = p()), p = p instanceof Array ? p.join(m.separator ||
",") : "object" === typeof p ? ATInternet.Utils.jsonSerialize(p) : "undefined" === typeof p ? "undefined" : p.toString(), q && (p = encodeURIComponent(p)), -1 < ATInternet.Utils.arrayIndexOf(d, x) ? k = !0 : "boolean" === typeof m.truncate && (k = m.truncate), "boolean" === typeof m.multihit && (w = m.multihit), "boolean" === typeof m.last && (t = m.last), p = e(x, p, k, w, m.separator, q, t), w) l -= p.paramSize + p.strSize, z += p.param + p.str;
else if (t) p.paramSize + p.strSize > l && (p.str = p.str.substring(0, l - p.paramSize), p.strSize = p.str.length), v = x, y = p;
else if (h[x] =
p, h[x].paramSize + h[x].strSize > l && !h[x].truncate) {
a.emit("Tracker:Hit:Build:Error", {
lvl: "ERROR",
msg: 'Too long parameter: "' + h[x].param + '"',
details: {
value: h[x].str
}
});
f = !0;
r = x;
break
}
v && (h[v] = y);
h = [h, f, r, z];
b = h[0];
f = h[1];
g = h[3];
f && (h = h[2], b = b[h], b.str = b.str.substring(0, l - b.paramSize), b.strSize = b.str.length, f = {}, f.mherr = e("mherr", "1", !1, !1, "", !1), f[h] = b, b = f);
b = n(b, l);
if (null === b[1]) c = b[0];
else
for (c.push(b[0]); null !== b[1];) b = n(b[1], l), c.push(b[0]);
return c
},
m = "";
a.buffer.presentInFilters(b, "hitType") ||
(b = a.buffer.addInFilters(b, "hitType", ["page"]));
b = a.buffer.addInFilters(b, "hitType", ["all"]);
var p;
if ("object" === typeof c && null !== c) {
b = a.buffer.addInFilters(b, "permanent", !0);
b = a.buffer.get(b, !0);
var q, k, z, t;
for (p in c)
if (c.hasOwnProperty(p)) {
m = c[p];
q = {};
if (f && "object" === typeof c[p]) {
z = k = !1;
for (t in c[p]) c[p].hasOwnProperty(t) && ("value" === t ? k = !0 : "options" === t && "object" === typeof c[p].options && null !== c[p].options && (z = !0));
k && z && (m = c[p].value, q = c[p].options)
}
b[p] = {
value: m,
options: q
}
}
m = r(b)
} else
for (p in b =
a.buffer.get(b, !0), m = r(b), b) !b.hasOwnProperty(p) || b[p].options && b[p].options.permanent || a.buffer.del(p);
h && h(m, g)
},
g = function(c, f) {
var b = a.getConfig("secure"),
h = "";
if (c) h = c;
else var h = "https:" === document.location.protocol,
e = (h = b || h) ? a.getConfig("logSSL") : a.getConfig("log"),
r = a.getConfig("domain"),
h = e && r ? e + "." + r : h ? a.getConfig("collectDomainSSL") : a.getConfig("collectDomain");
e = a.getConfig("baseURL");
r = (r = a.getConfig("pixelPath")) || "/";
"/" !== r.charAt(0) && (r = "/" + r);
var g = a.getConfig("site");
if ((e || h &&
r) && g) {
var p = "//";
b && (p = "https:" + p);
f && f(null, (e ? e : p + h + r) + ("?s=" + g))
} else f && f({
message: "Config error"
})
},
q = function(a, f, b, h, e) {
g(h, function(h, g) {
h ? e && e(h) : (l = 1600 - (g.length + 27), m(a, f, b, function(a, b) {
var c = [],
h = ATInternet.Utils.uuid().num(13);
if (a instanceof Array)
for (var f = 1; f <= a.length; f++) c.push(g + b + "&mh=" + f + "-" + a.length + "-" + h + a[f - 1]);
else c.push(g + b + a);
e && e(null, c)
}))
})
};
k.send = function(c, f, b, h, e) {
q(c, e, f, h, function(c, h) {
if (c) a.emit("Tracker:Hit:Build:Error", {
lvl: "ERROR",
msg: c.message,
details: {}
}),
b && b();
else
for (var f = 0; f < h.length; f++) k.sendUrl(h[f], b)
})
};
k.sendUrl = function(c, f) {
var b = function(b, c, h) {
return function() {
return function(e) {
var g = "";
if ("/" === c.charAt(0)) var g = a.getConfig("secure"),
m = "https:" === document.location.protocol,
g = g || m ? "https:" : "http:";
a.emit(b, {
lvl: h,
details: {
hit: g + c,
event: e
}
});
f && f()
}
}()
};
if (ATInternet.Utils.isOptedOut() && !a.getConfig("sendHitWhenOptOut")) b("Tracker:Hit:Sent:NoTrack", c, "INFO")();
else {
var h = new Image;
h.onload = b("Tracker:Hit:Sent:Ok", c, "INFO");
h.onerror =
b("Tracker:Hit:Sent:Error", c, "ERROR");
h.src = c
}
}
},
TriggersManager = function() {
function a(a, d, m) {
for (var g = [], q = 0; q < a.length; q++) a[q].callback(d, m), a[q].singleUse || g.push(a[q]);
return g
}
function k(a, d, m, g) {
var q = a.shift();
if ("*" === q) return d["*"] = d["*"] || [], d["*"].push({
callback: m,
singleUse: g
}), d["*"].length - 1;
if (0 === a.length) return k([q, "*"], d, m, g);
d["*"] = d["*"] || [];
d[q] = d[q] || {};
return k(a, d[q], m, g)
}
function l(e, d, m, g) {
var q = d.shift();
"*" !== q && (0 === d.length ? l(e, [q, "*"], m, g) : m[q] && (m[q]["*"] = a(m[q]["*"],
e, g), l(e, d, m[q], g)))
}
var d = {};
this.on = function(a, n, m) {
m = m || !1;
return k(a.split(":"), d, n, m)
};
this.emit = function(e, n) {
d["*"] && (d["*"] = a(d["*"], e, n));
l(e, e.split(":"), d, n)
}
},
PluginsManager = function(a) {
var k = {},
l = {},
d = 0,
e = {},
n = 0,
m = function(a) {
var b = !1;
k[a] && (b = !0);
return b
},
g = this.unload = function(b) {
m(b) ? (k[b] = void 0, a.emit("Tracker:Plugin:Unload:" + b + ":Ok", {
lvl: "INFO"
})) : a.emit("Tracker:Plugin:Unload:" + b + ":Error", {
lvl: "ERROR",
msg: "not a known plugin"
});
return a
},
q = this.load = function(b, c) {
"function" ===
typeof c ? "undefined" === typeof a.getConfig.plgAllowed || 0 === a.getConfig.plgAllowed.length || -1 < a.getConfig.plgAllowed.indexOf(b) ? (k[b] = new c(a), l[b] && m(b) && (l[b] = !1, d--, m(b + "_ll") && g(b + "_ll"), 0 === d && a.emit("Tracker:Plugin:Lazyload:File:Complete", {
lvl: "INFO",
msg: "LazyLoading triggers are finished"
})), a.emit("Tracker:Plugin:Load:" + b + ":Ok", {
lvl: "INFO"
})) : a.emit("Tracker:Plugin:Load:" + b + ":Error", {
lvl: "ERROR",
msg: "Plugin not allowed",
details: {}
}) : a.emit("Tracker:Plugin:Load:" + b + ":Error", {
lvl: "ERROR",
msg: "not a function",
details: {
obj: c
}
});
return a
},
c = this.isLazyloading = function(a) {
return a ? !0 === l[a] : 0 !== d
},
f = function(a) {
return !m(a) && !c(a) && m(a + "_ll")
},
b = function(b) {
l[b] = !0;
d++;
ATInternet.Utils.loadScript({
url: a.getConfig("lazyLoadingPath") + b + ".js"
})
},
h = function(a) {
return f(a) ? (b(a), !0) : !1
},
s = function(a) {
e[a] ? e[a]++ : e[a] = 1;
n++
};
this.isExecWaitingLazyloading = function() {
return 0 !== n
};
a.exec = this.exec = function(h, g, p, d) {
var q = null,
l = function(a, b, c, h) {
b = b.split(".");
m(a) && k[a][b[0]] && (q = 1 < b.length && k[a][b[0]][b[1]] ? k[a][b[0]][b[1]].apply(k[a],
c) : k[a][b[0]].apply(k[a], c));
h && h(q)
},
t = function(b, c, h, f) {
s(b);
a.onTrigger("Tracker:Plugin:Load:" + b + ":Ok", function() {
l(b, c, h, function(c) {
e[b]--;
n--;
0 === n && a.emit("Tracker:Plugin:Lazyload:Exec:Complete", {
lvl: "INFO",
msg: "All exec waiting for lazyloading are done"
});
f && f(c)
})
}, !0)
};
f(h) ? (t(h, g, p, d), b(h)) : c(h) ? t(h, g, p, d) : l(h, g, p, d)
};
this.waitForDependencies = function(b, c) {
var f = function(a) {
for (var b = {
mcount: 0,
plugins: {}
}, c = 0; c < a.length; c++) k.hasOwnProperty(a[c]) || (b.mcount++, b.plugins[a[c]] = !0);
return b
}(b);
if (0 === f.mcount) a.emit("Tracker:Plugin:Dependencies:Loaded", {
lvl: "INFO",
details: {
dependencies: b
}
}), c();
else
for (var e in f.plugins) f.plugins.hasOwnProperty(e) && (a.emit("Tracker:Plugin:Dependencies:Error", {
lvl: "WARNING",
msg: "Missing plugin " + e
}), a.onTrigger("Tracker:Plugin:Load:" + e, function(a, b) {
var h = a.split(":"),
e = h[3];
"Ok" === h[4] && (f.plugins[e] = !1, f.mcount--, 0 === f.mcount && c())
}, !0), h(e))
};
this.init = function() {
for (var a in ATInternet.Tracker.pluginProtos) ATInternet.Tracker.pluginProtos.hasOwnProperty(a) &&
q(a, ATInternet.Tracker.pluginProtos[a])
}
},
CallbacksManager = function(a) {
var k = this,
l = {},
d = function(a) {
if (a.name) {
var d = !0;
"undefined" !== typeof configuration && (configuration.include instanceof Array && -1 === ATInternet.Utils.arrayIndexOf(configuration.include, a.name) && (d = !1), configuration.exclude instanceof Array && -1 !== ATInternet.Utils.arrayIndexOf(configuration.exclude, a.name) && (d = !1));
if (ATInternet.Callbacks && ATInternet.Callbacks.hasOwnProperty(a.name)) {
var m = {};
m[a.name] = {
"function": ATInternet.Callbacks[a.name]
};
d && k.load(a.name, m[a.name]["function"]);
ATInternet.Tracker.callbackProtos[a.name] || (ATInternet.Tracker.callbackProtos[a.name] = m[a.name])
}
}
};
k.load = function(e, d) {
"function" === typeof d ? (new d(a), a.emit("Tracker:Callback:Load:" + e + ":Ok", {
lvl: "INFO",
details: {
obj: d
}
})) : a.emit("Tracker:Callback:Load:" + e + ":Error", {
lvl: "ERROR",
msg: "not a function",
details: {
obj: d
}
});
return a
};
k.init = function() {
if (a.getConfig("activateCallbacks")) {
var e = a.getConfig("callbacks");
if ("undefined" !== typeof e && e.include instanceof Array)
for (var n = 0; n < e.include.length; n++) ATInternet.Callbacks && ATInternet.Callbacks.hasOwnProperty(e.include[n]) && (l[e.include[n]] = {
"function": ATInternet.Callbacks[e.include[n]]
}, ATInternet.Tracker.callbackProtos[e.include[n]] || (ATInternet.Tracker.callbackProtos[e.include[n]] = l[e.include[n]]));
else
for (n in ATInternet.Callbacks) ATInternet.Callbacks.hasOwnProperty(n) && (l[n] = {
"function": ATInternet.Callbacks[n]
}, ATInternet.Tracker.callbackProtos[n] || (ATInternet.Tracker.callbackProtos[n] = l[n]));
if ("undefined" !==
typeof e && e.exclude instanceof Array)
for (n = 0; n < e.exclude.length; n++) l[e.exclude[n]] && (l[e.exclude[n]] = void 0);
for (var m in l) l.hasOwnProperty(m) && l[m] && k.load(m, l[m]["function"]);
ATInternet.Utils.addCallbackEvent(d)
}
};
k.removeCallbackEvent = function() {
ATInternet.Utils.removeCallbackEvent(d)
}
},
BufferManager = function(a) {
var k = {};
this.set = function(a, d, m) {
m = m || {};
m.hitType = m.hitType || ["page"];
k[a] = {
value: d,
options: m
}
};
var l = function(a, d, m) {
return (a = window.ATInternet.Utils.cloneSimpleObject(a[d])) && !m ?
a.value : a
},
d = function n(a, g) {
if (!(a && g instanceof Array && a instanceof Array)) return [];
if (0 === a.length) return g;
var d = a[0],
c, f = [],
b = window.ATInternet.Utils.cloneSimpleObject(a);
b.shift();
for (var h = 0; h < g.length; h++)
if ("object" !== typeof d[1]) k[g[h]] && k[g[h]].options[d[0]] === d[1] && f.push(g[h]);
else {
c = d[1].length;
for (var s = 0; s < c; s++)
if (k[g[h]] && k[g[h]].options[d[0]] instanceof Array && 0 <= window.ATInternet.Utils.arrayIndexOf(k[g[h]].options[d[0]], d[1][s])) {
f.push(g[h]);
break
}
}
return n(b, f)
};
this.get = function(a,
m) {
var g = {};
if ("string" === typeof a) g = l(k, a, m);
else
for (var q = d(a, window.ATInternet.Utils.getObjectKeys(k)), c = 0; c < q.length; c++) g[q[c]] = l(k, q[c], m);
return g
};
this.presentInFilters = function m(a, d) {
return a && 0 !== a.length ? a[0][0] === d ? !0 : m(a.slice(1), d) : !1
};
this.addInFilters = function g(a, c, f, b) {
if (!a || 0 === a.length) return b ? [] : [
[c, f]
];
var h = a[0][0],
d = a[0][1];
h === c && (d instanceof Array && -1 === window.ATInternet.Utils.arrayIndexOf(d, f[0]) && d.push(f[0]), b = !0);
return [
[h, d]
].concat(g(a.slice(1), c, f, b))
};
this.del =
function(a) {
k[a] = void 0
};
this.clear = function() {
k = {}
}
},
Tag = function(a, k, l) {
k = k || {};
var d = this;
d.version = "5.17.1";
var e = window.ATInternet.Utils.cloneSimpleObject(k);
d.triggers = new TriggersManager(d);
d.emit = d.triggers.emit;
d.onTrigger = d.triggers.on;
var n = window.ATInternet.Utils.cloneSimpleObject(dfltGlobalCfg) || {},
m;
for (m in a) a.hasOwnProperty(m) && (n[m] = a[m]);
d.getConfig = function(a) {
return n[a]
};
d.setConfig = function(a, e, c) {
void 0 !== n[a] && c || (d.emit("Tracker:Config:Set:" + a, {
lvl: "INFO",
details: {
bef: n[a],
aft: e
}
}), n[a] = e)
};
d.configPlugin = function(a, e, c) {
n[a] = n[a] || {};
for (var f in e) e.hasOwnProperty(f) && void 0 === n[a][f] && (n[a][f] = e[f]);
c && (c(n[a]), d.onTrigger("Tracker:Config:Set:" + a, function(a, h) {
c(h.details.aft)
}));
return n[a]
};
d.getContext = function(a) {
return e[a]
};
d.setContext = function(a, m) {
d.emit("Tracker:Context:Set:" + a, {
lvl: "INFO",
details: {
bef: e[a],
aft: m
}
});
e[a] = m
};
d.delContext = function(a, m) {
d.emit("Tracker:Context:Deleted:" + a + ":" + m, {
lvl: "INFO",
details: {
key1: a,
key2: m
}
});
if (a) e.hasOwnProperty(a) &&
(m ? e[a] && e[a].hasOwnProperty(m) && (e[a][m] = void 0) : e[a] = void 0);
else if (m)
for (var c in e) e.hasOwnProperty(c) && e[c] && e[c].hasOwnProperty(m) && (e[c][m] = void 0)
};
d.plugins = new PluginsManager(d);
d.buffer = new BufferManager(d);
d.setParam = d.buffer.set;
d.getParams = function(a) {
return d.buffer.get(a, !1)
};
d.getParam = d.buffer.get;
d.delParam = d.buffer.del;
d.builder = new BuildManager(d);
d.sendHit = d.builder.send;
d.sendUrl = d.builder.sendUrl;
d.callbacks = new CallbacksManager(d);
d.setParam("ts", function() {
return (new Date).getTime()
}, {
permanent: !0,
hitType: ["all"]
});
(d.getConfig("disableCookie") || d.getConfig("disableStorage")) && d.setParam("idclient", "Consent-NO", {
permanent: !0,
hitType: ["all"]
});
d.getConfig("medium") && d.setParam("medium", d.getConfig("medium"), {
permanent: !0,
hitType: ["all"]
});
d.plugins.init();
d.callbacks.init();
ATInternet.Tracker.instances.push(d);
d.emit("Tracker:Ready", {
lvl: "INFO",
msg: "Tracker initialized",
details: {
tracker: d,
args: {
config: a,
context: k,
callback: l
}
}
});
l && l(d)
};
ATInternet.Tracker.Tag = Tag;
ATInternet.Tracker.instances = [];
ATInternet.Tracker.pluginProtos = {};
ATInternet.Tracker.addPlugin = function(a, k) {
k = k || ATInternet.Tracker.Plugins[a];
if (!ATInternet.Tracker.pluginProtos[a]) {
ATInternet.Tracker.pluginProtos[a] = k;
for (var l = 0; l < ATInternet.Tracker.instances.length; l++) ATInternet.Tracker.instances[l].plugins.load(a, k)
}
};
ATInternet.Tracker.delPlugin = function(a) {
if (ATInternet.Tracker.pluginProtos[a]) {
ATInternet.Tracker.pluginProtos[a] = void 0;
for (var k = 0; k < ATInternet.Tracker.instances.length; k++) ATInternet.Tracker.instances[k].plugins.unload(a)
}
};
ATInternet.Tracker.callbackProtos = {};
}).call(window);;
(function() {
var dfltPluginCfg = {
"lifetime": 30,
"lastPersistence": true,
"listEventsForExec": [],
"domainAttribution": true,
"info": true
};
var dfltGlobalCfg = {
"visitLifetime": 30,
"redirectionLifetime": 30
};
window.ATInternet.Tracker.Plugins.Campaigns = function(a) {
a.setConfig("visitLifetime", dfltGlobalCfg.visitLifetime, !0);
a.setConfig("redirectionLifetime", dfltGlobalCfg.redirectionLifetime, !0);
var k = {},
l, d;
a.configPlugin("Campaigns", dfltPluginCfg || {}, function(a) {
k = a
});
var e, n, m, g, q, c, f, b, h, s, r, w, p, y = function() {
var b = function(a) {
var b = "";
a && (b = isNaN(a) && -1 === a.search(/\[(.*?)\]/g) ? "[" + a + "]" : a);
return b
},
c = function(a) {
for (;
"-" === a.charAt(a.length - 1);) a = a.substring(0, a.length - 1);
return a
};
this.SponsoredLinks =
function() {
var h = {
google: "goo",
yahoo: "ysm",
miva: "miv",
orange: "wan",
msn: "msn",
mirago: "mir",
sklik: "skl",
adfox: "adf",
etarget: "etg",
yandex: "yan",
ebay: "eba",
searchalliance: "sal",
bing: "bin",
naver: "nav",
baidu: "bdu",
qwant: "qwt"
},
f = {
search: "s",
content: "c"
};
this.at_medium = "sl";
this.at_term = this.at_network = this.at_variant = this.at_creation = this.at_platform = this.at_campaign = "";
this.format = function() {
var a = "sec",
e = b(this.at_campaign),
g = h[this.at_platform] || "",
d = b(this.at_creation),
p = b(this.at_variant),
r = f[this.at_network] ||
"",
m = b(this.at_term);
return c(a + ("-" + e + "-" + g + "-" + d + "-" + p + "-" + r + "-" + m))
};
this.setProperties = function(b) {
this.at_campaign = a.utils.getQueryStringValue("at_campaign", b) || "";
this.at_platform = a.utils.getQueryStringValue("at_platform", b) || "";
this.at_creation = a.utils.getQueryStringValue("at_creation", b) || "";
this.at_variant = a.utils.getQueryStringValue("at_variant", b) || "";
this.at_network = a.utils.getQueryStringValue("at_network", b) || "";
this.at_term = a.utils.getQueryStringValue("at_term", b) || ""
}
};
this.Email = function() {
var h = {
acquisition: "erec",
retention: "epr",
promotion: "es"
};
this.at_medium = "email";
this.at_send_time = this.at_recipient_list = this.at_recipient_id = this.at_link = this.at_send_date = this.at_creation = this.at_campaign = this.at_emailtype = "";
this.format = function() {
var a = h[this.at_emailtype] || h.promotion,
f = b(this.at_campaign),
e = b(this.at_creation),
g = this.at_send_date,
d = b(this.at_link),
a = a + ("-" + f + "-" + e + "-" + g + "-" + d + "-" + (this.at_recipient_id + (this.at_recipient_list ? "@" + this.at_recipient_list : "")) + "-" + this.at_send_time);
return c(a)
};
this.setProperties = function(b) {
this.at_emailtype = a.utils.getQueryStringValue("at_emailtype", b) || "";
this.at_campaign = a.utils.getQueryStringValue("at_campaign", b) || "";
this.at_creation = a.utils.getQueryStringValue("at_creation", b) || "";
this.at_send_date = a.utils.getQueryStringValue("at_send_date", b) || "";
this.at_link = a.utils.getQueryStringValue("at_link", b) || "";
this.at_recipient_id = a.utils.getQueryStringValue("at_recipient_id", b) || "";
this.at_recipient_list = a.utils.getQueryStringValue("at_recipient_list",
b) || "";
this.at_send_time = a.utils.getQueryStringValue("at_send_time", b) || ""
}
};
this.Affiliate = function() {
this.at_medium = "affiliate";
this.at_variant = this.at_creation = this.at_format = this.at_identifier = this.at_type = this.at_campaign = "";
this.format = function() {
var a = "al",
h = b(this.at_campaign),
f = b(this.at_type),
e = b(this.at_identifier),
g = b(this.at_format),
d = b(this.at_creation),
p = b(this.at_variant);
return c(a + ("-" + h + "-" + f + "-" + e + "-" + g + "-" + d + "-" + p))
};
this.setProperties = function(b) {
this.at_campaign = a.utils.getQueryStringValue("at_campaign",
b) || "";
this.at_type = a.utils.getQueryStringValue("at_type", b) || "";
this.at_identifier = a.utils.getQueryStringValue("at_identifier", b) || "";
this.at_format = a.utils.getQueryStringValue("at_format", b) || "";
this.at_creation = a.utils.getQueryStringValue("at_creation", b) || "";
this.at_variant = a.utils.getQueryStringValue("at_variant", b) || ""
}
};
this.Display = function() {
this.at_medium = "display";
this.at_detail_placement = this.at_general_placement = this.at_channel = this.at_format = this.at_variant = this.at_creation = this.at_campaign =
"";
this.format = function() {
var a = "ad",
h = b(this.at_campaign),
f = b(this.at_creation),
e = b(this.at_variant),
g = b(this.at_format),
d = b(this.at_channel),
p = b(this.at_general_placement),
r = b(this.at_detail_placement);
return c(a + ("-" + h + "-" + f + "-" + e + "-" + g + "-" + d + "-" + p + "-" + r))
};
this.setProperties = function(b) {
this.at_campaign = a.utils.getQueryStringValue("at_campaign", b) || "";
this.at_creation = a.utils.getQueryStringValue("at_creation", b) || "";
this.at_variant = a.utils.getQueryStringValue("at_variant", b) || "";
this.at_format =
a.utils.getQueryStringValue("at_format", b) || "";
this.at_channel = a.utils.getQueryStringValue("at_channel", b) || "";
this.at_general_placement = a.utils.getQueryStringValue("at_general_placement", b) || "";
this.at_detail_placement = a.utils.getQueryStringValue("at_detail_placement", b) || ""
}
};
this.Custom = function() {
this.at_custom4 = this.at_custom3 = this.at_custom2 = this.at_custom1 = this.at_campaign = this.at_medium = "";
this.format = function() {
var a = "";
/\d+$/.test(this.at_medium) && (a = /\d+$/.exec(this.at_medium)[0]);
var a =
"cs" + a,
h = b(this.at_campaign),
f = b(this.at_custom1),
e = b(this.at_custom2),
g = b(this.at_custom3),
d = b(this.at_custom4);
return c(a + ("-" + h + "-" + f + "-" + e + "-" + g + "-" + d))
};
this.setProperties = function(b) {
this.at_medium = a.utils.getQueryStringValue("at_medium", b) || "";
this.at_campaign = a.utils.getQueryStringValue("at_campaign", b) || "";
this.at_custom1 = a.utils.getQueryStringValue("at_custom1", b) || "";
this.at_custom2 = a.utils.getQueryStringValue("at_custom2", b) || "";
this.at_custom3 = a.utils.getQueryStringValue("at_custom3",
b) || "";
this.at_custom4 = a.utils.getQueryStringValue("at_custom4", b) || ""
}
};
this.medium = {
sl: this.SponsoredLinks,
email: this.Email,
affiliate: this.Affiliate,
display: this.Display
}
},
v = function(b, c) {
var h = a.storage[d](b);
if (null !== h) return "object" === typeof h && !(h instanceof Array);
a.storage[l](b, {}, c);
return !0
},
z = function(b, c) {
var h = a.getContext("campaigns") || {};
h[b] = c;
a.setContext("campaigns", h)
};
(function() {
a.plugins.waitForDependencies(["Storage", "Utils"], function() {
l = "set" + (k.domainAttribution ? "" : "Private");
d = "get" + (k.domainAttribution ? "" : "Private");
e = a.storage[d](["atredir", "gopc"]);
n = a.storage[d](["atredir", "gopc_err"]);
m = a.storage[d](["atredir", "camp"]);
a.storage.del(["atredir", "gopc"]);
a.storage.del(["atredir", "gopc_err"]);
a.storage.del(["atredir", "camp"]);
g = a.storage[d](["atsession", "histo_camp"]);
q = a.storage[d](["atreman", "camp"]);
c = a.storage[d](["atreman", "date"]);
var t = a.utils.getLocation(),
u = a.utils.getQueryStringValue("at_medium", t);
if (u) {
var B = new y,
u = "function" === typeof B.medium[u] ? new B.medium[u] :
new B.Custom;
u.setProperties(t);
f = u.format()
} else f = a.utils.getQueryStringValue("xtor", t);
b = a.utils.getQueryStringValue("xtdt", t);
h = a.utils.getQueryStringValue("xts", t);
s = a.getContext("forcedCampaign");
r = !!a.getConfig("redirect");
w = !!(f && b && h);
p = !1;
w && (t = (new Date).getTime() / 6E4, p = !r && h !== a.getConfig("site") || 0 > t - b || t - b >= a.getConfig("visitLifetime"));
t = s || m || f;
r && t && v("atredir", {
path: "/",
end: a.getConfig("redirectionLifetime")
}) && (a.storage[l](["atredir", "camp"], t), u = t = !1, s || (m ? (t = e, u = n) : (t = w, u = p)),
a.storage[l](["atredir", "gopc"], t), a.storage[l](["atredir", "gopc_err"], u));
!r && q && (z("xtor", q), t = (new Date).getTime() / 36E5, t = Math.floor(t - c), z("roinbh", 0 <= t ? t : 0));
r || (t = null, t = m ? e ? s || t : s || m : w ? s : s || f || t, g && g instanceof Array && -1 < g.indexOf(t) && (t = null), t && z("xto", t));
if (!r && !s) {
var A;
m ? n && (A = m) : p && (A = f);
A && z("pgt", A)
}
if (!r && (A = m ? s || m : s || f || null) && !(!s && !m && w && p || !s && m && e && n)) {
if ((!g || g instanceof Array && 0 > g.indexOf(A)) && v("atsession", {
path: "/",
session: 60 * a.getConfig("visitLifetime")
})) a.storage[l](["atsession",
"histo_camp"
], g && g.push(A) ? g : [A]);
q && !k.lastPersistence || !v("atreman", {
path: "/",
session: 86400 * k.lifetime
}) || (a.storage[l](["atreman", "camp"], A), a.storage[l](["atreman", "date"], (new Date).getTime() / 36E5))
}
a.emit("Campaigns:process:done", {
lvl: "INFO"
})
})
})()
};
window.ATInternet.Tracker.addPlugin("Campaigns");
}).call(window);;
(function() {
var dfltPluginCfg = {
"info": true
};
var dfltGlobalCfg = {};
window.ATInternet.Tracker.Plugins.Clicks = function(a) {
var k = function(a) {
var d = "";
switch (a) {
case "exit":
d = "S";
break;
case "download":
d = "T";
break;
case "action":
d = "A";
break;
case "navigation":
d = "N"
}
return d
},
l = function(e) {
var d = e.name;
a.exec("Utils", "manageChapters", [e, "chapter", 3], function(a) {
d = a + (d ? d : "")
});
return d
},
d = function(e) {
var d = {
p: l(e),
s2: e.level2 || "",
click: k(e.type) || ""
},
m = ["click"],
g = a.getContext("page") || {};
d.pclick = l(g);
d.s2click = g.level2 || "";
var g = e.customObject,
q = !1;
g && (q = !0, g = a.processTagObject("stc",
m, g), d.stc = {
value: ATInternet.Utils.jsonSerialize(g),
options: {
hitType: m,
encode: !0,
separator: ",",
truncate: !0
}
});
a.sendHit(d, [
["hitType", m]
], e.callback, null, q)
};
a.click = {};
a.clickListener = this.clickListener = {};
a.click.send = this.send = function(e) {
var k = !0,
m = null;
e && e.hasOwnProperty("event") && (m = e.event || window.event);
!ATInternet.Utils.isTabOpeningAction(m) && e.elem && (k = a.techClicks.manageClick(e.elem, m));
d(e);
return k
};
a.clickListener.send = this.clickListener.send = function(e) {
if (e.elem) {
var k = "click";
a.plugins.exec("TechClicks",
"isFormSubmit", [e.elem],
function(a) {
k = a ? "submit" : "click"
});
ATInternet.Utils.addEvtListener(e.elem, k, function(m) {
ATInternet.Utils.isTabOpeningAction(m) || a.techClicks.manageClick(e.elem, m);
d(e)
})
}
};
a.click.set = this.set = function(e) {
a.dispatchSubscribe("click");
a.setContext("click", {
name: l(e),
level2: e.level2 || "",
customObject: e.customObject
});
a.setParam("click", k(e.type) || "", {
hitType: ["click"]
})
};
a.click.onDispatch = this.onDispatch = function(e) {
var d = ["click"],
m = a.getContext("click") || {},
g = a.getContext("page") || {};
a.setParam("pclick", l(g), {
hitType: d
});
a.setParam("s2click", g.level2 || "", {
hitType: d
});
a.setParam("p", m.name, {
hitType: d
});
a.setParam("s2", m.level2, {
hitType: d
});
(m = m.customObject) ? a.processContextObjectAndSendHit("stc", {
hitType: d,
encode: !0,
separator: ",",
truncate: !0
}, m, e): a.manageSend(function() {
a.sendHit(null, [
["hitType", d]
], e)
});
a.setContext("click", void 0)
}
};
window.ATInternet.Tracker.addPlugin("Clicks");
}).call(window);;
(function() {
var dfltPluginCfg = {
"clientSideMode": "always",
"userIdCookieDuration": 397,
"userIdExpirationMode": "relative",
"optOut": "OPT-OUT",
"userIdStorageName": "atuserid",
"optOutStorageName": "atoptedout",
"info": true
};
var dfltGlobalCfg = {};
window.ATInternet.Tracker.Plugins.ClientSideUserId = function(a) {
var k = {},
l = void 0,
d = null,
e = !1,
n = !1,
m = !1,
g = "",
q = "",
c = !1,
f = !1,
b = -1;
a.configPlugin("ClientSideUserId", dfltPluginCfg || {}, function(a) {
k = a
});
var h = function() {
if ("relative" === k.userIdExpirationMode || "fixed" === k.userIdExpirationMode && null === d || c) {
var b = new Date;
b.setTime(b.getTime() + 864E5 * k.userIdCookieDuration);
a.storage.set(q, g, {
end: b,
path: "/"
}, f);
b = a.storage.get(q, !0);
ATInternet.Utils.consent && !c && g !== b && a.setParam("idclient", g + "-NO", {
multihit: !0,
permanent: !0,
hitType: ["all"]
})
}
},
s = function() {
a.setParam("idclient", g, {
multihit: !0,
permanent: !0,
hitType: ["all"]
});
h()
},
r = function() {
l = a.getContext("userIdentifier");
d = a.storage.get("atuserid");
var b = !1;
if ("required" === k.clientSideMode) {
var h = "";
window.navigator && (h = window.navigator.userAgent);
if (/Safari/.test(h) && !/Chrome/.test(h) || /iPhone|iPod|iPad/.test(h)) b = !0
} else "always" === k.clientSideMode && (b = !0);
e = b;
b = !1;
h = ATInternet.Utils.optedOut;
!1 === h && (a.storage.del("atoptedout"), a.getParam("idclient") ===
k.optOut && a.delParam("idclient"));
var r = a.storage.get("atoptedout", !0);
if (!0 === h || r === k.optOut) b = !0;
b && (ATInternet.Utils.optedOut = !0);
n = b;
m = "undefined" !== typeof l;
if (e || n || m) q = k.userIdStorageName, f = c = !1, n ? (g = k.optOut, q = k.optOutStorageName, f = c = !0) : a.getConfig("disableCookie") || a.getConfig("disableStorage") ? (g = a.getParam("idclient"), c = !0) : m ? (g = l, c = !0) : g = null !== d ? d : ATInternet.Utils.uuid().v4(), s()
},
w = function(a) {
a && (a = a.detail) && "clientsideuserid" === a.name && a.id === b && r()
};
(function() {
a.plugins.waitForDependencies(["Storage"],
function() {
var a = ATInternet.Utils.uuid();
b = parseInt(a.num(8));
ATInternet.Utils.removeOptOutEvent(w);
ATInternet.Utils.addOptOutEvent(b, w);
r()
})
})();
a.clientSideUserId = {};
a.clientSideUserId.set = function(a) {
n || (g = a, c = !0, q = k.userIdStorageName, f = !1, s())
};
a.clientSideUserId.store = function() {
f = c = !0;
h()
};
a.clientSideUserId.get = function() {
return g
}
};
window.ATInternet.Tracker.addPlugin("ClientSideUserId");
}).call(window);;
(function() {
var dfltPluginCfg = {
"domainAttribution": true,
"info": true
};
var dfltGlobalCfg = {
"redirectionLifetime": 30
};
window.ATInternet.Tracker.Plugins.ContextVariables = function(a) {
var k = "",
l = null,
d, e = "",
n = "",
m = {};
a.configPlugin("ContextVariables", dfltPluginCfg || {}, function(a) {
m = a
});
a.setConfig("redirectionLifetime", dfltGlobalCfg.redirectionLifetime, !0);
var g = function(b, c, f) {
var e = null;
a.plugins.exec(b, c, f, function(a) {
e = a
});
return e
},
q = function(a, b) {
return g("Utils", a, b)
},
c = function(b, c) {
var f = null;
a.plugins.exec("Storage", b, c, function(a) {
f = a
});
return f
},
f = function() {
a.setParam("hl", function() {
var a = new Date;
return a.getHours() +
"x" + a.getMinutes() + "x" + a.getSeconds()
}, {
permanent: !0,
hitType: ["all"]
})
},
b = function(a) {
(a = d ? d : "acc_dir" === k ? "" : null !== k ? k : "acc_dir" === l ? "" : l ? l : a ? a.referrer : "") && (a = a.replace(/[<>]/g, "").substring(0, 1600).replace(/&/g, "$"));
return a
};
a.plugins.waitForDependencies(["Storage", "Utils"], function() {
e = "set" + (m.domainAttribution ? "" : "Private");
n = "get" + (m.domainAttribution ? "" : "Private");
var h = q("getLocation", []);
k = q("getQueryStringValue", ["xtref", h]);
void 0 === k && (k = "");
d = a.getContext("forcedReferer");
if (a.getConfig("redirect")) {
var h =
q("getDocumentLevel", []),
h = d ? d : null !== k ? k : h ? h.referrer : "acc_dir",
g;
if (g = h) {
g = {
path: "/",
end: a.getConfig("redirectionLifetime")
};
var r = c(n, ["atredir"]);
null !== r ? g = "object" === typeof r && !(r instanceof Array) : (c(e, ["atredir", {}, g]), g = !0)
}
g && c(e, [
["atredir", "ref"], h
])
} else {
l = c(n, [
["atredir", "ref"]
]);
c("del", [
["atredir", "ref"]
]);
a.setParam("vtag", a.version, {
permanent: !0,
hitType: ["all"]
});
a.setParam("ptag", "js", {
permanent: !0,
hitType: ["all"]
});
h = "";
try {
h += window.screen.width + "x" + window.screen.height + "x" + window.screen.pixelDepth +
"x" + window.screen.colorDepth
} catch (w) {}
a.setParam("r", h, {
permanent: !0,
hitType: ["all"]
});
h = "";
window.innerWidth ? h += window.innerWidth + "x" + window.innerHeight : document.body && document.body.offsetWidth && (h += document.body.offsetWidth + "x" + document.body.offsetHeight);
a.setParam("re", h, {
permanent: !0,
hitType: ["all"]
});
f();
window.navigator && a.setParam("lng", window.navigator.language || window.navigator.userLanguage, {
permanent: !0,
hitType: ["all"]
});
h = ATInternet.Utils.uuid().num(13);
a.setParam("idp", h, {
permanent: !0,
hitType: ["page", "clickzone"]
});
window.navigator && a.setParam("jv", window.navigator.javaEnabled() ? "1" : "0", {
hitType: ["page"]
});
h = q("getDocumentLevel", []);
a.setParam("ref", b(h), {
permanent: !0,
last: !0,
hitType: ["page"]
})
}
a.emit("ContextVariables:Ready", {
lvl: "INFO"
})
})
};
window.ATInternet.Tracker.addPlugin("ContextVariables");
}).call(window);;
(function() {
var dfltPluginCfg = {
"storageCapacity": 1,
"timeout": 500,
"info": true
};
var dfltGlobalCfg = {};
window.ATInternet.Tracker.Plugins.Offline = function(a) {
var k = {};
a.configPlugin("Offline", dfltPluginCfg || {}, function(a) {
k = a
});
var l = function() {
var a = localStorage.getItem("ATOffline"),
f = {
hits: [],
length: 0
};
if (a) {
var b = ATInternet.Utils.jsonParse(a) || {
hits: []
};
f.hits = b.hits;
f.length = a.length
}
return f
},
d = function(a) {
try {
localStorage.setItem("ATOffline", ATInternet.Utils.jsonSerialize(a))
} catch (f) {}
},
e = function() {
return l().hits
},
n = function(a) {
if (a) {
a = a.split(/&ref=\.*/i);
var f = "&cn=offline&olt=" + String(Math.floor((new Date).getTime() /
1E3));
a = a[0] + f + "&ref=" + (a[1] || "")
}
return a
},
m = function(a) {
var f = l(),
b = a.length,
e = !0;
if (4 * ((f.length || 11) + b) > 1048576 * k.storageCapacity) {
var e = !1,
g = f.hits.shift();
if ("undefined" !== typeof g)
for (var e = !0, r = g.length; r < b;)
if (g = f.hits.shift(), "undefined" !== typeof g) r += g.length;
else {
e = !1;
break
}
}
e && (f.hits.push(a), d({
hits: f.hits
}))
},
g = function(c, f) {
if (window.navigator && window.navigator.onLine) {
var b = e();
if (0 < b.length) {
var h = b.shift();
d({
hits: b
});
a.onTrigger("Tracker:Hit:Sent:Ok", function() {
g(c, f)
}, !0);
a.onTrigger("Tracker:Hit:Sent:Error",
function() {
g(c, f)
}, !0);
a.sendUrl(h)
} else if (c) {
var l = null;
a.plugins.exec("Utils", "getQueryStringValue", ["a", c], function(a) {
l = a
});
l ? setTimeout(function() {
a.sendUrl(c, f)
}, k.timeout) : a.sendUrl(c, f)
}
} else c && (m(n(c)), f && f())
},
q = function(c) {
a.builder.sendUrl = function(a, b) {
c || window.navigator && !window.navigator.onLine ? (m(n(a)), b && b()) : g(a, b)
}
};
a.offline = {};
a.offline.getLength = function() {
return 4 * l().length
};
a.offline.remove = function() {
d({
hits: []
})
};
a.offline.get = e;
a.offline.send = function() {
g(null, null)
};
a.plugins.waitForDependencies(["Utils"], function() {
var c = ATInternet.Utils.isLocalStorageAvailable(),
f;
window.navigator && (f = window.navigator.onLine);
c && "undefined" !== typeof f && ("required" === k.storageMode ? q(!1) : "always" === k.storageMode && q(!0));
a.emit("Offline:Ready", {
lvl: "INFO",
details: {
isLocalStorageAvailable: c,
storageMode: k.storageMode,
isOnline: f
}
})
})
};
window.ATInternet.Tracker.addPlugin("Offline");
}).call(window);;
(function() {
var dfltPluginCfg = {
"info": true
};
var dfltGlobalCfg = {};
window.ATInternet.Tracker.Plugins.OnSiteAds = function(a) {
var k = "",
l = function(c) {
var f = c.name;
a.exec("Utils", "manageChapters", [c, "chapter", 3], function(a) {
f = a + (f ? f : "")
});
return f
},
d = function(a, f) {
return a[f] ? a[f] : ""
},
e = function(a, f) {
var b = d(a, f);
if (b) {
var e = d(a, "prefix");
if (b.campaignId) {
var e = e || "PUB",
g = d(b, "campaignId"),
k = d(b, "creation"),
m = d(b, "variant"),
p = d(b, "format"),
l = d(b, "generalPlacement"),
n = d(b, "detailedPlacement"),
q = d(b, "advertiserId"),
b = d(b, "url");
return e + "-" + g + "-" + k + "-" + m + "-" + p + "-" + l + "-" +
n + "-" + q + "-" + b
}
if (b.adId) return e = e || "INT", g = d(b, "adId"), k = d(b, "format"), b = d(b, "productId"), e + "-" + g + "-" + k + "||" + b
}
return ""
},
n = function(c) {
var f = ["onSiteAdsImpression"],
b = {};
b.ati = {
value: e(c, "impression"),
options: {
hitType: f,
truncate: !0
}
};
b.type = "AT";
ATInternet.Utils.isPreview() && a.getConfig("preview") && (b.pvw = 1);
var d = c.customObject;
d && (d = a.processTagObject("stc", f, d), b.stc = {
value: ATInternet.Utils.jsonSerialize(d),
options: {
hitType: f,
encode: !0,
separator: ",",
truncate: !0
}
});
a.manageSend(function() {
a.sendHit(b, [
["hitType", f]
], c.callback, null, !0)
})
},
m = function(c, f) {
var b = a.buffer.get("ati", !0) || {};
b.value = "string" === typeof b.value ? [b.value] : b.value || [];
b.options = b.options || {
truncate: !0,
hitType: [f, "page"]
};
b.value.push(c);
a.buffer.set("ati", b.value, b.options)
},
g = function(c, f) {
c.click ? a.setParam("atc", e(c, "click"), {
truncate: !0,
hitType: [f, "page"]
}) : c.impression && a.setParam("ati", e(c, "impression"), {
truncate: !0,
hitType: [f, "page"]
});
if (c.customObject) {
a.setContext("onsiteads", {
customObject: c.customObject
});
var b =
a.getContext("page") || {};
b.customObject = ATInternet.Utils.completeFstLevelObj(b.customObject, c.customObject, !1);
a.setContext("page", b)
}
a.dispatchSubscribe("onSiteAds")
};
a.selfPromotion = this.selfPromotion = {};
a.publisher = this.publisher = {};
a.publisher.set = this.publisher.set = function(a) {
g(a, "publisher")
};
a.selfPromotion.set = this.selfPromotion.set = function(a) {
g(a, "selfPromotion")
};
a.publisher.add = this.publisher.add = function(c) {
m(e(c, "impression"), "publisher");
a.dispatchSubscribe("onSiteAds")
};
a.selfPromotion.add =
this.selfPromotion.add = function(c) {
m(e(c, "impression"), "selfPromotion");
a.dispatchSubscribe("onSiteAds")
};
var q = this.advertEvent = function(c) {
var f = !0,
b = null;
c && c.hasOwnProperty("event") && (b = c.event || window.event);
!ATInternet.Utils.isTabOpeningAction(b) && c.elem && (f = a.techClicks.manageClick(c.elem, b));
if (c.click) {
var b = ["onSiteAdsClick"],
d = a.getContext("page") || {},
g = {};
g.atc = {
value: e(c, "click"),
options: {
truncate: !0
}
};
g.type = "AT";
g.patc = l(d);
g.s2atc = d.level2 || "";
if (d = c.customObject) d = a.processTagObject("stc",
b, d), g.stc = {
value: ATInternet.Utils.jsonSerialize(d),
options: {
hitType: b,
encode: !0,
separator: ",",
truncate: !0
}
};
a.sendHit(g, [
["hitType", b]
], c.callback, null, !0)
} else c.impression && n(c);
return f
};
a.publisher.send = this.publisher.send = function(a) {
return q(a)
};
a.selfPromotion.send = this.selfPromotion.send = function(a) {
return q(a)
};
a.onSiteAds = {};
a.onSiteAds.onDispatch = this.onDispatch = function(c) {
if (!a.dispatchSubscribed("page")) {
a.setParam("type", "AT", {
hitType: ["publisher", "selfPromotion"]
});
var f = a.getContext("page") || {};
a.getParam("atc") && (a.setParam("patc", l(f), {
hitType: ["publisher", "selfPromotion"]
}), a.setParam("s2atc", f.level2 || "", {
hitType: ["publisher", "selfPromotion"]
}));
ATInternet.Utils.isPreview() && a.getConfig("preview") && a.setParam("pvw", 1);
var b = ["publisher", "selfPromotion"];
(f = (a.getContext("onsiteads") || {}).customObject) ? a.processContextObjectAndSendHit("stc", {
hitType: b,
encode: !0,
separator: ",",
truncate: !0
}, f, c): a.manageSend(function() {
a.sendHit(null, [
["hitType", b]
], c)
})
}
};
a.plugins.waitForDependencies(["Utils",
"TechClicks"
], function() {
k = document.location.href;
a.plugins.exec("Utils", "getQueryStringValue", ["xtatc", k], function(c) {
c && a.setParam("atc", c, {
hitType: ["publisher", "selfPromotion", "page"]
})
});
a.emit("OnSiteAds:Ready", {
lvl: "INFO",
details: {
href: k
}
})
})
};
window.ATInternet.Tracker.addPlugin("OnSiteAds");
}).call(window);;
(function() {
var dfltPluginCfg = {
"info": true
};
var dfltGlobalCfg = {};
window.ATInternet.Tracker.Plugins.Page = function(a) {
var k = ["pageId", "chapterLabel", "update"],
l = ["pid", "pchap", "pidt"],
d = ["page", "site"],
e = ["f", "x"],
n = function(b) {
var c = b.name;
a.exec("Utils", "manageChapters", [b, "chapter", 3], function(a) {
c = a + (c ? c : "")
});
return c
},
m = function(a, b, c) {
b ? a = b : a || "undefined" === typeof c || (a = c);
return a
},
g = function(a, b, c) {
b.hasOwnProperty(c) && (a[c] = m(a[c], b[c]))
},
q = function(b, c, f) {
if (c)
for (var h = 0; h < d.length; h++)
if (c.hasOwnProperty(d[h]) && c[d[h]])
for (var g in c[d[h]]) c[d[h]].hasOwnProperty(g) &&
(f ? b[e[h] + g] = c[d[h]][g] : a.setParam(e[h] + g, c[d[h]][g]))
},
c = function(b, c, f) {
if (c) {
a.exec("Utils", "manageChapters", [c, "chapter", 3], function(a) {
a && (c.chapterLabel = a.replace(/::$/gi, ""))
});
for (var d = 0; d < l.length; d++) c.hasOwnProperty(k[d]) && (f ? b[l[d]] = c[k[d]] : a.setParam(l[d], c[k[d]]))
}
},
f = function(b, c, f) {
if (c && c.keywords instanceof Array) {
var d = c.keywords.length;
if (0 < d) {
for (var e = "", h = 0; h < d; h++) e += "[" + c.keywords[h] + "]" + (h < d - 1 ? "|" : "");
f ? b.tag = e : a.setParam("tag", e)
}
}
},
b = function(b, c, f) {
if (c) {
var d, e = function(a) {
return a ?
a : "0"
};
d = "" + (e(c.category1) + "-");
d += e(c.category2) + "-";
d += e(c.category3);
f ? b.ptype = d : a.setParam("ptype", d)
}
},
h = function(b, c, f) {
if (c)
for (var d in c) c.hasOwnProperty(d) && "undefined" !== typeof c[d] && (f ? b[d] = c[d] : a.setParam(d, c[d]))
};
a.customVars = this.customVars = {};
a.customVars.set = this.customVars.set = function(b) {
var c = a.getContext("page") || {},
f = c.customVars;
if (f) {
if (b)
for (var d in b) b.hasOwnProperty(d) && (f[d] = ATInternet.Utils.completeFstLevelObj(f[d], b[d], !0))
} else f = b;
c.customVars = f;
a.setContext("page",
c)
};
a.dynamicLabel = this.dynamicLabel = {};
a.dynamicLabel.set = this.dynamicLabel.set = function(b) {
var c = a.getContext("page") || {};
c.dynamicLabel = ATInternet.Utils.completeFstLevelObj(c.dynamicLabel, b, !0);
a.setContext("page", c)
};
a.tags = this.tags = {};
a.tags.set = this.tags.set = function(b) {
var c = a.getContext("page") || {};
c.tags = ATInternet.Utils.completeFstLevelObj(c.tags, b, !0);
a.setContext("page", c)
};
a.customTreeStructure = this.customTreeStructure = {};
a.customTreeStructure.set = this.customTreeStructure.set = function(b) {
var c =
a.getContext("page") || {};
c.customTreeStructure = ATInternet.Utils.completeFstLevelObj(c.customTreeStructure, b, !0);
a.setContext("page", c)
};
a.page = {};
a.page.reset = this.reset = function() {
a.setContext("page", void 0)
};
a.page.set = this.set = function(b) {
a.dispatchSubscribe("page");
var c = a.getContext("page") || {};
c.name = m(c.name, b.name, "");
c.level2 = m(c.level2, b.level2, "");
g(c, b, "chapter1");
g(c, b, "chapter2");
g(c, b, "chapter3");
c.customObject = ATInternet.Utils.completeFstLevelObj(c.customObject, b.customObject, !0);
a.setContext("page", c)
};
a.page.send = this.send = function(d) {
var e = !0,
k = {
p: n(d),
s2: d.level2 || ""
},
p = d.customObject,
l = !1;
if (p) {
var l = !0,
v = ["page"],
p = a.processTagObject("stc", v, p);
k.stc = {
value: ATInternet.Utils.jsonSerialize(p),
options: {
hitType: v,
encode: !0,
separator: ",",
truncate: !0
}
}
}
p = a.getContext("page") || {};
p.vrn && (k.vrn = p.vrn, p.vrn = void 0, a.setContext("page", p));
v = a.getContext("InternalSearch") || {};
"undefined" !== typeof v.keyword && (k.mc = ATInternet.Utils.cloneSimpleObject(v.keyword), "undefined" !== typeof v.resultPageNumber &&
(k.np = ATInternet.Utils.cloneSimpleObject(v.resultPageNumber)), a.setContext("InternalSearch", void 0));
ATInternet.Utils.isPreview() && a.getConfig("preview") && (k.pvw = 1);
q(k, d.customVars, !0);
c(k, d.dynamicLabel, !0);
f(k, d.tags, !0);
b(k, d.customTreeStructure, !0);
v = a.getContext("campaigns") || {};
h(k, v, !0);
a.setContext("campaigns", void 0);
v = null;
d && d.hasOwnProperty("event") && (v = d.event || window.event);
!ATInternet.Utils.isTabOpeningAction(v) && d.elem && (e = a.techClicks.manageClick(d.elem, v));
a.manageSend(function() {
a.sendHit(k,
null, d.callback, null, l)
});
p.name = m(p.name, d.name, "");
p.level2 = m(p.level2, d.level2, "");
g(p, d, "chapter1");
g(p, d, "chapter2");
g(p, d, "chapter3");
a.setContext("page", p);
return e
};
a.page.onDispatch = this.onDispatch = function(d) {
var e = a.getContext("page") || {},
g = a.getContext("InternalSearch") || {};
a.setParam("p", n(e));
a.setParam("s2", e.level2 || "");
e.vrn && (a.setParam("vrn", e.vrn), e.vrn = void 0, a.setContext("page", e));
"undefined" !== typeof g.keyword && (a.setParam("mc", ATInternet.Utils.cloneSimpleObject(g.keyword)),
"undefined" !== typeof g.resultPageNumber && a.setParam("np", ATInternet.Utils.cloneSimpleObject(g.resultPageNumber)), a.setContext("InternalSearch", void 0));
ATInternet.Utils.isPreview() && a.getConfig("preview") && a.setParam("pvw", 1);
q(null, e.customVars, !1);
c(null, e.dynamicLabel, !1);
f(null, e.tags, !1);
b(null, e.customTreeStructure, !1);
g = a.getContext("campaigns") || {};
h(null, g, !1);
a.setContext("campaigns", void 0);
var k = ["page"];
(e = e.customObject) ? a.processContextObjectAndSendHit("stc", {
hitType: k,
encode: !0,
separator: ",",
truncate: !0
}, e, d): a.manageSend(function() {
a.sendHit(null, [
["hitType", k]
], d)
})
}
};
window.ATInternet.Tracker.addPlugin("Page");
}).call(window);;
(function() {
var dfltPluginCfg = {
"info": true
};
var dfltGlobalCfg = {};
window.ATInternet.Tracker.Plugins.RichMedia = function(a) {
var k = function(a, f) {
var b = parseInt(a, 10);
return b ? Math.max(b, f) : 0
},
l = new function() {
this.media = function() {
this.type = void 0;
this.plyr = 0;
this.clnk = this.s2 = void 0;
this.p = "";
this.m9 = this.m6 = this.m5 = this.m1 = this.rfsh = this.buf = this.a = void 0
};
this.mediaAll = {};
this.setMediaValue = function(a, f, b, d) {
"undefined" !== typeof d && (this.mediaAll[a] = this.mediaAll[a] || {}, this.mediaAll[a][f] = this.mediaAll[a][f] || new this.media, this.mediaAll[a][f][b] = d)
};
this.getMediaValue =
function(a, d, b) {
if (this.mediaAll[a] && this.mediaAll[a][d]) return this.mediaAll[a][d][b]
};
this.removePlayer = function(a) {
this.mediaAll[a] = {}
};
this.removeAll = function() {
this.mediaAll = {}
}
},
d = new function() {
this.timeout = {};
this.setTimeout = function(c, d, b) {
this.timeout[c] = this.timeout[c] || {};
this.timeout[c][d] && window.clearTimeout(this.timeout[c][d]);
this.timeout[c][d] = window.setTimeout(function() {
a.richMedia.send({
action: "refresh",
playerId: c,
mediaLabel: d
})
}, 1E3 * b)
};
this.setTimeoutObject = function(c, d, b) {
this.timeout[c] =
this.timeout[c] || {};
if ("undefined" === typeof this.timeout[c][d]) {
var e = [],
g;
for (g in b) b.hasOwnProperty(g) && e.push({
delay: k(g, 0),
refresh: k(b[g], 5)
});
e.sort(function(a, b) {
return a.delay < b.delay ? -1 : a.delay > b.delay ? 1 : 0
});
this.timeout[c][d] = {
refreshTab: e,
backupRefreshTab: ATInternet.Utils.cloneSimpleObject(e),
delayConfiguration: {}
}
}
b = this.timeout[c][d];
if (0 < b.refreshTab.length && (e = b.refreshTab[0].delay, g = b.refreshTab[0].refresh, "number" === typeof e && "number" === typeof g && 0 < g)) {
b.delayConfiguration[e] = b.delayConfiguration[e] || {};
var m = void 0;
"undefined" !== typeof b.refreshTab[1] && (m = b.refreshTab[1].delay);
var n = 0;
"undefined" === typeof m ? n = 1 : "number" === typeof b.delayConfiguration[e].number ? n = "refresh" === l.getMediaValue(c, d, "a") ? Math.max(b.delayConfiguration[e].number - 1, 0) : b.delayConfiguration[e].number : "number" === typeof m && (n = Math.floor(60 * (m - e) / g) - 1);
b.delayConfiguration[e].number = n;
b.delayConfiguration[e].timeout && window.clearTimeout(b.delayConfiguration[e].timeout);
0 < n ? b.delayConfiguration[e].timeout = window.setTimeout(function() {
a.richMedia.send({
action: "refresh",
playerId: c,
mediaLabel: d
})
}, 1E3 * g) : (b.delayConfiguration[e].number = void 0, b.delayConfiguration[e].timeout = void 0, b.refreshTab.splice(0, 1), window.setTimeout(function() {
a.richMedia.send({
action: "refresh",
playerId: c,
mediaLabel: d
})
}, 1E3 * g));
this.timeout[c][d] = b
}
};
this.clearTimeout = function(a, d, b) {
this.timeout[a] = this.timeout[a] || {};
var e = this.timeout[a][d];
if ("object" === typeof e) {
if ("object" === typeof e.delayConfiguration) {
var g, k;
for (k in e.delayConfiguration) e.delayConfiguration.hasOwnProperty(k) && (g =
e.delayConfiguration[k].number, "undefined" !== typeof g && 0 < g && (e.delayConfiguration[k].timeout && window.clearTimeout(e.delayConfiguration[k].timeout), e.delayConfiguration[k].timeout = void 0));
b && (e.refreshTab = ATInternet.Utils.cloneSimpleObject(e.backupRefreshTab));
this.timeout[a][d] = e
}
} else e && window.clearTimeout(e)
};
this.removePlayer = function(c) {
for (var d in this.timeout[c])
if (this.timeout[c].hasOwnProperty(d)) {
this.clearTimeout(c, d, !1);
var b = l.getMediaValue(c, d, "a");
"undefined" !== typeof this.timeout[c][d] &&
"stop" !== b && a.richMedia.send({
action: "stop",
playerId: c,
mediaLabel: d
})
}
this.timeout[c] = {}
};
this.removeAll = function() {
for (var a in this.timeout) this.timeout.hasOwnProperty(a) && this.removePlayer(a);
this.timeout = {}
}
},
e = function(c, d, b) {
var e = c[b] || "";
a.exec("Utils", "manageChapters", [c, d, 3], function(a) {
e = a + e
});
return e
},
n = function(a, d, b, e) {
var g = a[d];
"boolean" === typeof a[d] && (g = a[d] ? e : b);
return g
},
m = function(a) {
var d = 0;
/^(\-|\+)?([0-9]+)$/.test(a) && (d = Number(a));
return d
},
g = function(a, d, b, e, g) {
d = l.getMediaValue(d,
b, e);
"undefined" !== typeof d && (a[e] = g ? encodeURIComponent(d) : d)
},
q = function(a, d, b) {
"undefined" !== typeof b && (a[d] = b)
};
a.richMedia = {};
a.richMedia.add = function(a) {
a = a || {};
var d = m(a.playerId),
b = e(a, "mediaTheme", "mediaLabel"),
g = n(a, "isEmbedded", "int", "ext");
l.setMediaValue(d, b, "plyr", d);
l.setMediaValue(d, b, "type", a.mediaType);
l.setMediaValue(d, b, "s2", a.mediaLevel2);
l.setMediaValue(d, b, "p", b);
l.setMediaValue(d, b, "clnk", a.linkedContent || a.previousMedia);
l.setMediaValue(d, b, "a", a.action);
l.setMediaValue(d,
b, "rfsh", a.refreshDuration);
l.setMediaValue(d, b, "m1", a.duration);
l.setMediaValue(d, b, "m5", g);
l.setMediaValue(d, b, "m6", a.broadcastMode);
l.setMediaValue(d, b, "m9", a.webdomain)
};
a.richMedia.send = function(c) {
c = c || {};
var f = m(c.playerId),
b = e(c, "mediaTheme", "mediaLabel"),
h = c.action;
l.setMediaValue(f, b, "a", h);
var s = {
plyr: f,
p: b
};
g(s, f, b, "a", !1);
g(s, f, b, "type", !1);
g(s, f, b, "s2", !1);
g(s, f, b, "m1", !1);
g(s, f, b, "m5", !1);
g(s, f, b, "m6", !1);
if ("play" === h || "info" === h) {
c = n(c, "isBuffering", "0", "1");
var r = a.getContext("page") || {},
w = e(r, "chapter", "name") || void 0,
r = r.level2 || void 0;
q(s, "buf", c);
q(s, "prich", w);
q(s, "s2rich", r);
g(s, f, b, "clnk", !1);
g(s, f, b, "m9", !0)
}
a.sendHit(s, [
["hitType", ["richmedia"]]
]);
"pause" === h ? d.clearTimeout(f, b, !1) : "stop" === h && d.clearTimeout(f, b, !0);
if ("play" === h || "refresh" === h) h = l.getMediaValue(f, b, "rfsh"), "object" === typeof h && null !== h ? d.setTimeoutObject(f, b, h) : (h = k(h, 5), 0 !== h && d.setTimeout(f, b, h))
};
a.richMedia.remove = function(a) {
d.removePlayer(a);
l.removePlayer(a)
};
a.richMedia.removeAll = function() {
d.removeAll();
l.removeAll()
}
};
window.ATInternet.Tracker.addPlugin("RichMedia");
}).call(window);;
(function() {
var dfltPluginCfg = {
"info": false
};
var dfltGlobalCfg = {
"storageMode": "cookie"
};
ATInternet.Tracker.Plugins.Cookies = ATInternet.Tracker.Plugins.Storage = function(a) {
var k = this,
l = {},
d = !1,
e = null;
a.configPlugin("Storage", dfltPluginCfg || {}, function(a) {
l = a;
"localStorage" === l.storageMode && (d = ATInternet.Utils.isLocalStorageAvailable())
});
var n = {},
m = function(b) {
return a.getConfig("base64Storage") ? ATInternet.Utils.Base64.encode(b) : encodeURIComponent(b)
},
g = function(b) {
return a.getConfig("base64Storage") ? ATInternet.Utils.Base64.decode(b) : decodeURIComponent(b)
},
q = function() {
this.getData = function(a) {
var b =
null;
(a = RegExp("(?:^| )" + a + "=([^;]+)").exec(document.cookie) || null) && (b = g(a[1]));
return b
};
this.setData = function(b) {
var c = !1;
if (b.name && "string" === typeof b.name) {
var d = b.options || {},
e = d.end || {},
f = d.domain || a.getConfig("cookieDomain"),
g = d.secure || a.getConfig("cookieSecure"),
h = ATInternet.Utils.jsonSerialize(b),
h = b.name + "=" + m(h),
h = h + (d.path && "string" === typeof d.path ? ";path=" + d.path : ""),
h = h + (f && "string" === typeof f ? ";domain=" + f : "") + (g && "boolean" === typeof g ? ";secure" : "");
"function" === typeof e.toUTCString ?
h += ";expires=" + e.toUTCString() : "number" === typeof e && (h += ";max-age=" + e.toString());
document.cookie = h;
this.getData(b.name) && (c = !0)
}
return c
}
};
e = d ? new function() {
var a = function(a) {
var b = +new Date,
c = !1,
d;
a.options && ("undefined" !== typeof a.options.expires ? d = a.options.expires : (a = a.options.end || {}, "function" === typeof a.getTime ? d = a.getTime() : "number" === typeof a && (d = b + 1E3 * a)));
"number" === typeof d && b >= d && (c = !0);
return {
itemToDelete: c,
timestamp: d
}
},
b = function(a) {
var b = !1;
try {
localStorage.removeItem(a), b = !0
} catch (c) {}
return b
};
this.getData = function(c) {
var d = null,
e = localStorage.getItem(c);
if (e) {
var e = g(e),
f = ATInternet.Utils.jsonParse(e);
f && "object" === typeof f ? a(f).itemToDelete && b(c) || (delete f.options.expires, d = ATInternet.Utils.jsonSerialize(f)) : d = e
}
return d
};
this.setData = function(c) {
var d = !1;
if (c.name && "string" === typeof c.name) {
var e = a(c);
"number" === typeof e.timestamp && (c.options.expires = e.timestamp);
var f = ATInternet.Utils.jsonSerialize(c);
if (e.itemToDelete) d = b(c.name);
else try {
localStorage.setItem(c.name, m(f)), d = !0
} catch (g) {}
}
return d
}
} :
new q;
var c = function(b, c) {
var d = !1;
!ATInternet.Utils.consent && !c || a.getConfig("disableCookie") || a.getConfig("disableStorage") || !b || "object" !== typeof b || (d = e.setData(b));
return d
},
f = function(a, b, c) {
a = {
name: a,
val: b
};
c && c.session && "number" === typeof c.session && (c.end = c.session);
a.options = c || {};
return a
},
b = function(b) {
var c = null,
d = null;
a.getConfig("disableCookie") || a.getConfig("disableStorage") || !b || "string" !== typeof b || (d = e.getData(b));
(b = d) && (c = ATInternet.Utils.jsonParse(b));
return c
},
h = function(a, b) {
var d =
ATInternet.Utils.cloneSimpleObject(a);
return c(d, b) ? ATInternet.Utils.jsonParse(ATInternet.Utils.jsonSerialize(a)) : null
},
s = function(a, c, d) {
if (!d && n[a]) d = n[a];
else if (d = b(a)) d.options = d.options || {}, d.options.session && "number" === typeof d.options.session && (d.options.end = d.options.session, h(d, !1)), n[a] = d;
return d ? c ? (a = null, !d || "object" !== typeof d.val || d.val instanceof Array || void 0 === d.val[c] || (a = d.val[c]), a) : d.val : null
},
r = function(a, c, d, e, g) {
if (c) {
if (g = b(a)) !g || "object" !== typeof g.val || g.val instanceof
Array ? g = null : "undefined" === typeof d ? delete g.val[c] : g.val[c] = d, g && (g = h(g, e))
} else g = g || {}, g = f(a, d, g), g = h(g, e);
return g ? (n[a] = g, g.val) : null
},
w = function(a, b) {
if (b) r(a, b, void 0, !1, null);
else {
n[a] = void 0;
var d = f(a, "", {
end: new Date("Thu, 01 Jan 1970 00:00:00 UTC"),
path: "/"
});
c(d, !1)
}
};
a.storage = {};
a.storage.get = k.get = function(a, b) {
b = !!b;
return a instanceof Array ? s(a[0], a[1], b) : s(a, "", b)
};
a.storage.getPrivate = k.getPrivate = function(b, c) {
b instanceof Array ? b[0] += a.getConfig("site") : b += a.getConfig("site");
return k.get(b, c)
};
a.storage.set = k.set = function(a, b, c, d) {
return a instanceof Array ? r(a[0], a[1], b, d, null) : r(a, null, b, d, c)
};
a.storage.setPrivate = k.setPrivate = function(b, c, d) {
b instanceof Array ? b[0] += a.getConfig("site") : b += a.getConfig("site");
return k.set(b, c, d)
};
a.storage.del = k.del = function(a) {
a instanceof Array ? w(a[0], a[1]) : w(a, "")
};
a.storage.delPrivate = k.delPrivate = function(b) {
b instanceof Array ? b[0] += a.getConfig("site") : b += a.getConfig("site");
k.del(b)
};
a.storage.cacheInvalidation = k.cacheInvalidation =
function() {
n = {}
}
};
ATInternet.Tracker.addPlugin("Storage");
ATInternet.Tracker.addPlugin("Cookies");
}).call(window);;
(function() {
var dfltPluginCfg = {
"clicksAutoManagementEnabled": true,
"clicksAutoManagementTimeout": 500,
"info": false
};
var dfltGlobalCfg = {};
window.ATInternet.Tracker.Plugins.TechClicks = function(a) {
var k = this,
l, d;
a.configPlugin("TechClicks", dfltPluginCfg || {}, function(a) {
l = a.clicksAutoManagementEnabled;
d = a.clicksAutoManagementTimeout
});
k.deactivateAutoManagement = function() {
l = !1
};
var e = function(a) {
switch (a.target) {
case "_top":
window.top.location.href = a.url;
break;
case "_parent":
window.parent.location.href = a.url;
break;
default:
window.location.href = a.url
}
},
n = function(a) {
var b = a.timeout;
a.mailto ? k.timeout = setTimeout(function() {
window.location.href =
a.mailto
}, b) : a.form ? k.timeout = setTimeout(function() {
a.form.submit()
}, b) : a.url && (k.timeout = setTimeout(function() {
e({
url: a.url,
target: a.target
})
}, b))
},
m = function(c) {
for (var b, g = "_self", m = c.timeoutonly; c;) {
if (c.href && 0 === c.href.indexOf("http")) {
b = c.href.split('"').join('\\"');
g = c.target ? c.target : g;
break
}
c = c.parentNode
}
if (b) {
if (!m) a.onTrigger("Tracker:Hit:Sent:Ok", function() {
k.timeout && clearTimeout(k.timeout);
e({
url: b,
target: g
})
});
n({
url: b,
target: g,
timeout: d
})
}
},
g = function(c) {
var b = c;
for (c = b.timeoutonly; b &&
"FORM" !== b.nodeName;) b = b.parentNode;
if (b) {
if (!c) a.onTrigger("Tracker:Hit:Sent:Ok", function() {
k.timeout && clearTimeout(k.timeout);
b.submit()
});
n({
form: b,
timeout: d
})
}
},
q = function(c) {
var b = c;
for (c = b.timeoutonly; b && !(b.href && 0 <= b.href.indexOf("mailto:"));) b = b.parentNode;
if (b) {
if (!c) a.onTrigger("Tracker:Hit:Sent:Ok", function() {
k.timeout && clearTimeout(k.timeout);
window.location.href = b.href
});
n({
mailto: b.href,
timeout: d
})
}
},
c = function(a) {
for (; a;) {
if (a.href) {
if (0 <= a.href.indexOf("mailto:")) return "mailto";
if (0 ===
a.href.indexOf("http")) return "redirection"
} else if ("FORM" === a.nodeName) return "form";
a = a.parentNode
}
return ""
};
a.techClicks = {};
a.techClicks.manageClick = k.manageClick = function(a, b) {
var d = !0;
if (l && a) {
var e;
a: {
for (e = a; e;) {
if ("function" === typeof e.getAttribute && ("_blank" === e.getAttribute("target") || "no" === e.getAttribute("data-atclickmanagement"))) {
e = !0;
break a
}
e = e.parentNode
}
e = a;
for (var k = window.location.href, n; e;) {
if ((n = e.href) && 0 <= n.indexOf("#") && k.substring(0, 0 <= k.indexOf("#") ? k.indexOf("#") : k.length) ===
n.substring(0, n.indexOf("#"))) {
e = !0;
break a
}
e = e.parentNode
}
e = !1
}
k = c(a);
if (!e && k) {
switch (k) {
case "mailto":
q(a);
d = !1;
break;
case "form":
g(a);
d = !1;
break;
case "redirection":
m(a), d = !1
}
b && (e = b.defaultPrevented, "function" === typeof b.isDefaultPrevented && (e = b.isDefaultPrevented()), e || b.preventDefault && b.preventDefault())
}
}
return d
}
};
window.ATInternet.Tracker.addPlugin("TechClicks");
}).call(window);;
(function() {
var dfltPluginCfg = {
"info": false
};
var dfltGlobalCfg = {};
window.ATInternet.Tracker.Plugins.Utils = function(a) {
var k = this,
l = {};
a.utils = {};
a.utils.getQueryStringValue = k.getQueryStringValue = function(a, d) {
var e = ATInternet.Utils.hashcode(d).toString();
if (!l[e]) {
l[e] = {};
var k = RegExp("[&#?]{1}([^&=#?]*)=([^&#]*)?", "g"),
c = k.exec(d);
if (null !== c)
for (; null !== c;) l[e][c[1]] = c[2], c = k.exec(d)
}
return l[e].hasOwnProperty(a) ? l[e][a] : null
};
k.manageChapters = function(d, e, g) {
var k = a.getConfig("ignoreEmptyChapterValue"),
c = "";
if (d) {
g = parseInt(g, 10);
for (var f = 1; f < g + 1; f++) var b =
d[e + f] || "",
c = k ? c + (b ? b + "::" : "") : c + (d.hasOwnProperty(e + f) ? b + "::" : "")
}
return c
};
k.getDocumentLevel = function() {
var d = a.getConfig("documentLevel");
if (0 > d.indexOf(".")) return window[d] || document;
d = d.split(".");
return window[d[0]][d[1]] || document
};
a.utils.getLocation = k.getLocation = function() {
return k.getDocumentLevel().location.href
};
a.dispatchIndex = {};
a.dispatchStack = [];
a.dispatchEventFor = {};
var d = 0;
a.dispatchSubscribe = function(d) {
return a.dispatchIndex[d] ? !1 : (a.dispatchStack.push(d), a.dispatchIndex[d] = !0)
};
a.dispatchSubscribed = function(d) {
return !0 === a.dispatchIndex[d]
};
a.addSpecificDispatchEventFor = function(e) {
return a.dispatchEventFor[e] ? !1 : (a.dispatchEventFor[e] = !0, d++, !0)
};
a.processSpecificDispatchEventFor = function(e) {
a.dispatchEventFor[e] && (a.dispatchEventFor[e] = !1, d--, 0 === d && (a.dispatchEventFor = {}, a.emit("Tracker:Plugin:SpecificEvent:Exec:Complete", {
lvl: "INFO"
})))
};
a.dispatch = function(e) {
var k = function() {
for (var d = "", c = null; 0 < a.dispatchStack.length;) d = a.dispatchStack.pop(), 0 === a.dispatchStack.length &&
(c = e), a[d].onDispatch(c);
a.dispatchIndex = {};
a.delContext(void 0, "customObject")
},
g = function() {
if (a.plugins.isExecWaitingLazyloading()) a.onTrigger("Tracker:Plugin:Lazyload:Exec:Complete", function() {
k()
}, !0);
else k()
};
if (0 === d) g();
else a.onTrigger("Tracker:Plugin:SpecificEvent:Exec:Complete", function() {
g()
}, !0)
};
a.dispatchRedirect = function(d) {
var e = !0,
g = null;
d && (g = null, d && d.hasOwnProperty("event") && (g = d.event || window.event), !ATInternet.Utils.isTabOpeningAction(g) && d.elem && (d.elem.timeoutonly = !0, a.plugins.exec("TechClicks",
"manageClick", [d.elem, g],
function(a) {
e = a
})), g = d.callback);
a.dispatch(g);
return e
};
var e = a.manageSend = function(d) {
if (!ATInternet.Utils.isPreview() || a.getConfig("preview")) ATInternet.Utils.isPrerender(function(a) {
d(a)
}) || d()
};
a.processTagObject = function(d, e, g) {
if ((d = a.getParam(d, !0)) && d.options.permanent) {
for (var k = !1, c = d.options.hitType || [], f = 0; f < c.length; f++)
if (-1 !== ATInternet.Utils.arrayIndexOf(e.concat("all"), c[f])) {
k = !0;
break
}
k && (g = ATInternet.Utils.completeFstLevelObj(d.value || {}, g, !0))
}
return g
};
a.processContextObjectAndSendHit = function(d, k, g, l) {
var c = a.getParam(d, !0);
if (c) {
for (var f = !1, b = c.options.hitType || [], h = 0; h < b.length; h++)
if (-1 !== ATInternet.Utils.arrayIndexOf(k.hitType.concat("all"), b[h])) {
f = !0;
break
}
f ? (f = ATInternet.Utils.cloneSimpleObject(c), f.value = ATInternet.Utils.completeFstLevelObj(f.value || {}, g, !0), a.setParam(d, f.value, {
hitType: k.hitType,
encode: k.encode,
separator: k.separator,
truncate: k.truncate
}), e(function() {
a.sendHit(null, [
["hitType", k.hitType]
], l, null, !0)
}), c.options.permanent &&
a.setParam(d, c.value, c.options)) : (a.setParam(d, g, {
hitType: k.hitType,
encode: k.encode,
separator: k.separator,
truncate: k.truncate
}), e(function() {
a.sendHit(null, [
["hitType", k.hitType]
], l, null, !0)
}), a.setParam(d, c.value, c.options))
} else a.setParam(d, g, {
hitType: k.hitType,
encode: k.encode,
separator: k.separator,
truncate: k.truncate
}), e(function() {
a.sendHit(null, [
["hitType", k.hitType]
], l, null, !0)
})
}
};
window.ATInternet.Tracker.addPlugin("Utils");
}).call(window);
if (typeof window.ATInternet.onTrackerLoad === 'function') {
window.ATInternet.onTrackerLoad();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment