Skip to content

Instantly share code, notes, and snippets.

@fraszczakszymon
Last active December 2, 2016 15:40
Show Gist options
  • Save fraszczakszymon/aa0ef8de07ab084975a60010c936fb33 to your computer and use it in GitHub Desktop.
Save fraszczakszymon/aa0ef8de07ab084975a60010c936fb33 to your computer and use it in GitHub Desktop.
(function() {
var h, aa = "function" == typeof Object.defineProperties ? Object.defineProperty : function(b, c, d) {
if (d.get || d.set) throw new TypeError("ES3 does not support getters and setters.");
b != Array.prototype && b != Object.prototype && (b[c] = d.value)
},
l = "undefined" != typeof window && window === this ? this : "undefined" != typeof global && null != global ? global : this;
function m() {
m = function() {};
l.Symbol || (l.Symbol = ba)
}
var ca = 0;
function ba(b) {
return "jscomp_symbol_" + (b || "") + ca++
}
function p() {
m();
var b = l.Symbol.iterator;
b || (b = l.Symbol.iterator = l.Symbol("iterator"));
"function" != typeof Array.prototype[b] && aa(Array.prototype, b, {
configurable: !0,
writable: !0,
value: function() {
return da(this)
}
});
p = function() {}
}
function da(b) {
var c = 0;
return ea(function() {
return c < b.length ? {
done: !1,
value: b[c++]
} : {
done: !0
}
})
}
function ea(b) {
p();
b = {
next: b
};
b[l.Symbol.iterator] = function() {
return this
};
return b
}
function q(b) {
p();
m();
p();
var c = b[Symbol.iterator];
return c ? c.call(b) : da(b)
}
function r(b, c) {
function d() {}
d.prototype = c.prototype;
b.prototype = new d;
b.prototype.constructor = b;
for (var e in c)
if (Object.defineProperties) {
var f = Object.getOwnPropertyDescriptor(c, e);
f && Object.defineProperty(b, e, f)
} else b[e] = c[e]
}
function t(b, c) {
if (c) {
var d = l;
b = b.split(".");
for (var e = 0; e < b.length - 1; e++) {
var f = b[e];
f in d || (d[f] = {});
d = d[f]
}
b = b[b.length - 1];
e = d[b];
c = c(e);
c != e && null != c && aa(d, b, {
configurable: !0,
writable: !0,
value: c
})
}
}
t("Array.prototype.find", function(b) {
return b ? b : function(b, d) {
a: {
var c = this;c instanceof String && (c = String(c));
for (var f = c.length, g = 0; g < f; g++) {
var k = c[g];
if (b.call(d, k, g, c)) {
b = k;
break a
}
}
b = void 0
}
return b
}
});
function fa(b, c, d) {
if (null == b) throw new TypeError("The 'this' value for String.prototype." + d + " must not be null or undefined");
if (c instanceof RegExp) throw new TypeError("First argument to String.prototype." + d + " must not be a regular expression");
return b + ""
}
t("String.prototype.startsWith", function(b) {
return b ? b : function(b, d) {
var c = fa(this, b, "startsWith");
b += "";
var f = c.length,
g = b.length;
d = Math.max(0, Math.min(d | 0, c.length));
for (var k = 0; k < g && d < f;)
if (c[d++] != b[k++]) return !1;
return k >= g
}
});
t("Promise", function(b) {
function c(b) {
this.c = 0;
this.o = void 0;
this.a = [];
var c = this.g();
try {
b(c.resolve, c.reject)
} catch (n) {
c.reject(n)
}
}
function d() {
this.a = null
}
if (b) return b;
d.prototype.c = function(b) {
this.a || (this.a = [], this.g());
this.a.push(b)
};
d.prototype.g = function() {
var b = this;
this.f(function() {
b.o()
})
};
var e = l.setTimeout;
d.prototype.f = function(b) {
e(b, 0)
};
d.prototype.o = function() {
for (; this.a && this.a.length;) {
var b = this.a;
this.a = [];
for (var c = 0; c < b.length; ++c) {
var d = b[c];
delete b[c];
try {
d()
} catch (y) {
this.i(y)
}
}
}
this.a =
null
};
d.prototype.i = function(b) {
this.f(function() {
throw b;
})
};
c.prototype.g = function() {
function b(b) {
return function(e) {
d || (d = !0, b.call(c, e))
}
}
var c = this,
d = !1;
return {
resolve: b(this.ta),
reject: b(this.i)
}
};
c.prototype.ta = function(b) {
if (b === this) this.i(new TypeError("A Promise cannot resolve to itself"));
else if (b instanceof c) this.ua(b);
else {
var d;
a: switch (typeof b) {
case "object":
d = null != b;
break a;
case "function":
d = !0;
break a;
default:
d = !1
}
d ? this.la(b) : this.A(b)
}
};
c.prototype.la = function(b) {
var c = void 0;
try {
c = b.then
} catch (n) {
this.i(n);
return
}
"function" == typeof c ? this.va(c, b) : this.A(b)
};
c.prototype.i = function(b) {
this.B(2, b)
};
c.prototype.A = function(b) {
this.B(1, b)
};
c.prototype.B = function(b, c) {
if (0 != this.c) throw Error("Cannot settle(" + b + ", " + c | "): Promise already settled in state" + this.c);
this.c = b;
this.o = c;
this.D()
};
c.prototype.D = function() {
if (this.a) {
for (var b = this.a, c = 0; c < b.length; ++c) b[c].call(), b[c] = null;
this.a = null
}
};
var f = new d;
c.prototype.ua = function(b) {
var c = this.g();
b.f(c.resolve, c.reject)
};
c.prototype.va = function(b, c) {
var d = this.g();
try {
b.call(c, d.resolve, d.reject)
} catch (y) {
d.reject(y)
}
};
c.prototype.then = function(b, d) {
function e(b, c) {
return "function" == typeof b ? function(c) {
try {
f(b(c))
} catch (Ua) {
g(Ua)
}
} : c
}
var f, g, k = new c(function(b, c) {
f = b;
g = c
});
this.f(e(b, f), e(d, g));
return k
};
c.prototype.catch = function(b) {
return this.then(void 0, b)
};
c.prototype.f = function(b, c) {
function d() {
switch (e.c) {
case 1:
b(e.o);
break;
case 2:
c(e.o);
break;
default:
throw Error("Unexpected state: " + e.c);
}
}
var e = this;
this.a ?
this.a.push(function() {
f.c(d)
}) : f.c(d)
};
c.resolve = function(b) {
return b instanceof c ? b : new c(function(c) {
c(b)
})
};
c.reject = function(b) {
return new c(function(c, d) {
d(b)
})
};
c.c = function(b) {
return new c(function(d, e) {
for (var f = q(b), g = f.next(); !g.done; g = f.next()) c.resolve(g.value).f(d, e)
})
};
c.a = function(b) {
var d = q(b),
e = d.next();
return e.done ? c.resolve([]) : new c(function(b, f) {
function g(c) {
return function(d) {
k[c] = d;
n--;
n || b(k)
}
}
var k = [],
n = 0;
do k.push(void 0), n++, c.resolve(e.value).f(g(k.length - 1), f), e = d.next();
while (!e.done)
})
};
c.$jscomp$new$AsyncExecutor = function() {
return new d
};
return c
});
t("String.prototype.includes", function(b) {
return b ? b : function(b, d) {
return -1 !== fa(this, b, "includes").indexOf(b, d || 0)
}
});
t("Object.assign", function(b) {
return b ? b : function(b, d) {
for (var c = 1; c < arguments.length; c++) {
var f = arguments[c];
if (f)
for (var g in f) Object.prototype.hasOwnProperty.call(f, g) && (b[g] = f[g])
}
return b
}
});
function u() {
this.id = "";
this.ma = {};
this.type = "";
this.H = this.K = 0;
this.oa = this.na = "";
this.ra = this.sa = 0;
this.qa = !1;
this.$a = this.Za = 0;
this.Ea = this.Da = "0";
this.J = this.I = ""
};
function v() {
u.call(this);
this.V = 0;
this.action = this.Hc = "";
this.controller = null;
this.ib = [];
this.Db = [];
this.ja = []
}
r(v, u);
l.Object.defineProperties(v.prototype, {
yb: {
configurable: !0,
enumerable: !0,
get: function() {
return this.ja.find(function(b) {
return b.type.startsWith("promoted_video") && "video/mp4" === b.fa
})
}
},
Ja: {
configurable: !0,
enumerable: !0,
get: function() {
return this.ja.filter(function(b) {
return !b.type.startsWith("promoted_video")
})
}
}
});
function w() {
u.call(this);
this.id = "";
this.ma = {};
this.fa = this.Ya = this.uc = this.pvId = this.detail = "";
this.Ra = this.S = this.Jc = this.ka = 0;
this.yc = 1;
this.controller = {};
this.Ga = this.paused = !1
}
r(w, u);
l.Object.defineProperties(w.prototype, {
x: {
configurable: !0,
enumerable: !0,
set: function(b) {
this.Za = b;
this.controller.M && this.controller.M.call(this.controller)
},
get: function() {
return this.Za
}
},
y: {
configurable: !0,
enumerable: !0,
set: function(b) {
this.$a = b;
this.controller.M && this.controller.M.call(this.controller)
},
get: function() {
return this.$a
}
},
width: {
configurable: !0,
enumerable: !0,
set: function(b) {
this.H = b;
void 0;
this.controller.M && this.controller.M.call(this.controller)
},
get: function() {
return this.H
}
},
height: {
configurable: !0,
enumerable: !0,
set: function(b) {
this.K = b;
this.controller.M && this.controller.M.call(this.controller)
},
get: function() {
return this.K
}
},
xa: {
configurable: !0,
enumerable: !0,
set: function(b) {
this.Ya = b;
"" != b && (this.Ga = !0)
},
get: function() {
return this.Ya
}
}
});
function x(b) {
this.b = b
}
h = x.prototype;
h.load = function() {
return new Promise(function() {})
};
h.L = function() {};
h.W = function() {
return new Promise(function() {})
};
h.addEventListener = function() {
return !1
};
h.pause = function() {
return !1
};
h.resume = function() {
return !1
};
h.show = function() {
return !1
};
h.da = function() {
return !1
};
function z(b) {
b.style.cursor = "pointer";
b.addEventListener("mouseover", function() {
b.style.cursor = "none";
setTimeout(function() {
b.style.cursor = "pointer"
}, 100)
})
};
function ga(b) {
return "BODY" === b.tagName ? b.previousElementSibling : b.parentElement ? ga(b.parentElement) : null
};
m();
var A = Symbol("PubPlayerModel");
m();
var ha = Symbol("PubPlayerModel");
function B(b) {
if (b === ha) void 0;
else throw "PubPlayerModel is a singleton: Cannot construct directly. Use 'PubPlayerModel.instance'";
this.g = this.f = null;
this.A = 0;
this.c = {};
this.K = this.H = 0;
this.o = "";
this.i = 0
}
l.Object.defineProperties(B.prototype, {
D: {
configurable: !0,
enumerable: !0,
get: function() {
return this.c
},
set: function(b) {
this.c = b;
this.f = b.slot;
this.g = b.videoSlot
}
},
a: {
configurable: !0,
enumerable: !0,
get: function() {
return this.f
},
set: function(b) {
this.f = b;
this.c.slot = this.f
}
},
v: {
configurable: !0,
enumerable: !0,
get: function() {
return this.g
},
set: function(b) {
this.g = b;
this.c.videoSlot = this.g
}
},
width: {
configurable: !0,
enumerable: !0,
get: function() {
return this.H
},
set: function(b) {
this.H = b
}
},
height: {
configurable: !0,
enumerable: !0,
get: function() {
return this.K
},
set: function(b) {
this.K = b
}
},
B: {
configurable: !0,
enumerable: !0,
get: function() {
return this.o
},
set: function(b) {
this.o = b
}
},
A: {
configurable: !0,
enumerable: !0,
get: function() {
return this.i
},
set: function(b) {
this.i = b || 0
}
}
});
l.Object.defineProperties(B, {
a: {
configurable: !0,
enumerable: !0,
get: function() {
this[A] || (this[A] = new B(ha));
return this[A]
}
},
c: {
configurable: !0,
enumerable: !0,
get: function() {
return "noPubSlot"
}
},
f: {
configurable: !0,
enumerable: !0,
get: function() {
return "noPubVideoSlot"
}
}
});
function C(b) {
this.b = b;
this.s = null
}
r(C, x);
h = C.prototype;
h.load = function() {
var b = this;
return new Promise(function(c) {
var d = B.a.a;
b.s = document.createElement("div");
b.s.id = b.b.id;
b.W.call(b);
b.s.innerHTML = b.b.detail;
b.s.style.visibility = "hidden";
d.appendChild(b.s);
var e, f = Array.prototype.slice.call(b.s.getElementsByTagName("script"));
d ? e = ga(d) : e = document.getElementsByTagName("head")[0] || document.documentElement;
for (d = 0; f[d]; d++) {
var g = f[d];
g.parentNode && g.parentNode.removeChild(g);
var g = f[d],
k = document.createElement("script"),
n = g.text || g.textContent || g.innerHTML ||
"";
if (g.src) k.src = g.src;
else try {
k.appendChild(document.createTextNode(n))
} catch (y) {
k.text = n
}
e.appendChild(k);
e.removeChild(k)
}
c()
})
};
h.W = function() {
var b = this;
return new Promise(function(c) {
b.s.style.top = b.b.y + "px";
b.s.style.left = b.b.x + "px";
b.s.style.width = b.b.width + "px";
b.s.style.height = b.b.height + "px";
b.s.style.zIndex = b.b.ka;
b.s.style.position = "absolute";
b.b.Ga ? z(b.s) : b.s.style.cursor = "default";
c()
})
};
h.addEventListener = function(b, c) {
this.s.addEventListener(b, c)
};
h.pause = function() {};
h.resume = function() {};
h.show = function() {
this.s.style.visibility = "visible"
};
h.da = function() {
this.s.style.visibility = "hidden"
};
h.L = function() {
this.s.parentNode.removeChild(this.s)
};
function ia(b) {
this.b = b;
this.m = null
}
r(ia, x);
h = ia.prototype;
h.load = function() {
var b = this;
return new Promise(function(c, d) {
var e = B.a.a;
b.m = document.createElement("img");
b.m.onload = function() {
b.b.sa = parseInt(b.m.width, 10);
b.b.ra = parseInt(b.m.height, 10);
void 0;
c()
};
b.m.onerror = function() {
d()
};
b.W.call(b);
b.m.src = b.b.detail;
b.m.id = b.b.id;
b.m.style.visibility = "hidden";
e.appendChild(b.m)
})
};
h.W = function() {
var b = this;
return new Promise(function(c) {
b.m.style.top = b.b.y + "px";
b.m.style.left = b.b.x + "px";
b.m.style.width = b.b.width + "px";
b.m.style.height = b.b.height + "px";
b.m.style.zIndex = b.b.ka;
b.m.style.position = "absolute";
b.b.Ga ? z(b.m) : b.m.style.cursor = "default";
c()
})
};
h.addEventListener = function(b, c) {
this.m.addEventListener(b, c)
};
h.pause = function() {};
h.resume = function() {};
h.show = function() {
this.m.style.visibility = "visible"
};
h.da = function() {
this.m.style.visibility = "hidden"
};
h.L = function() {
this.m.parentNode.removeChild(this.m)
};
m();
var ja = Symbol("AdModel");
m();
var ka = Symbol("AdModel");
function D(b) {
if (b === ka) void 0;
else throw "AdModel is a singleton: Cannot construct directly. Use 'AdModel.instance'";
this.version = "20160920";
this.ba = [];
this.a = {};
this.Ic = null;
this.K = this.H = 0;
this.Vb = "";
this.ia = this.paused = !1;
this.Aa = 1;
this.j = {};
this.rb = function() {
void 0
};
this.ya = {};
this.l = null
}
D.prototype.fail = function() {
this.ia = !0;
this.rb()
};
l.Object.defineProperties(D.prototype, {
aa: {
configurable: !0,
enumerable: !0,
get: function() {
return this.a
},
set: function(b) {
this.a = b
}
},
width: {
configurable: !0,
enumerable: !0,
set: function(b) {
void 0;
this.H = b;
this.ba.forEach(function(b) {
return b.controller.Pa.call(b.controller)
})
},
get: function() {
return this.H
}
},
height: {
configurable: !0,
enumerable: !0,
set: function(b) {
void 0;
this.K = b;
this.ba.forEach(function(b) {
return b.controller.Pa.call(b.controller)
})
},
get: function() {
return this.K
}
}
});
l.Object.defineProperties(D, {
a: {
configurable: !0,
enumerable: !0,
get: function() {
this[ja] || (this[ja] = new D(ka));
return this[ja]
}
}
});
function la(b) {
var c = new w;
c.id = "built-inBtIcon";
c.type = "overlay";
c.S = 0;
c.ka = 999;
c.fa = "HTML5";
c.ma = b;
c.width = B.a.width;
c.height = B.a.height - 8;
var d = c.width,
e = c.height;
c.detail = '<img width="' + d + '" height="' + e + '" src="#" style="visibility:hidden"/><span id="te-clearads-js-truste01cont1"><script type="text/javascri pt" src="' + ("http:" === document.location.protocol ? "http:" : "https:") + "//choices.truste.com/ca?pid=tubemogul01&aid=tubemogul01&cid=0811tm300x250&c=truste01cont1&w=" + d + "&h=" + e + '&plc=tr&js=10">\x3c/script></span>';
c.qa = !0;
b.ja.push(c)
};
function ma() {}
function na() {
var b, c = "";
b = Array.prototype.slice.call(document.querySelectorAll("script")).filter(function(b) {
return -1 < b.src.indexOf("feedURL=")
});
b.length ? 1 == b.length && (c = b[0].src) : c = ma.a;
return c
}
function E(b) {
var c;
c = void 0 === c ? na() : c;
var d = "";
if (c.includes("?")) {
c = c.split("?")[1].split("&");
for (var e, f = 0; f < c.length; f++)
if (e = c[f].split("="), e[0] == b) {
d = e[1];
break
}
}
return d
}
l.Object.defineProperties(ma, {
a: {
configurable: !0,
enumerable: !0,
get: function() {
return "http://mock.url.for.unit.test/?feedURL=&tm_auction_id=tm_auction_id_123&ad_id=ad_id_123&psId=psId_123&id=id_123"
}
}
});
function oa() {}
function pa(b, c) {
return new Promise(function(d, e) {
void 0;
null == c ? (void 0, e("null feed")) : (void 0, qa(c), ra(c), D.a.Z = c.viewabilityStandard, c.hasOwnProperty("adParts") && c.adParts.forEach(function(c) {
sa(b, c)
}), void 0, d())
})
}
function qa(b) {
var c = D.a.j;
c.Tb = b.adClass;
c.Fc = b.session.host;
c.sessId = b.session.sessId;
c.psId = b.psId;
c.fb = b.bt;
c.Ka = c.Ka.concat(b.pixels);
c.Ca = b.feedId;
b.zeroTime && (c.Kc = b.zeroTime);
c.paId = b.paId;
c.Fb = b.statsBaseURL;
c.za = b.cpId || E("cpId");
c.Ma = b.plcId || E("plcId");
c.Ac = b.page_url || E("page_url");
c.did = b.did || E("did");
c.didtype = b.didtype || E("didtype");
c.nc = b.nc || E("nc");
c.bi = b.bi || E("bi");
c.price = E("price");
c.jb = b.expaId || E("expaId")
}
function ra(b) {
void 0;
D.a.Vb = b.assetBaseURL
}
function sa(b, c) {
var d = new v;
d.V = c.sequence;
d.Hc = c.trigger;
d.action = c.action;
c.assets.forEach(function(b) {
if (-1 == ["companion"].indexOf(b.type)) {
var c = new w;
c.id = b.id;
c.ma = d;
c.detail = b.detail;
c.type = b.type;
c.qa = "t" == b.preserveAspectRatio.toLowerCase() ? !0 : !1;
c.pvId = b.pvId;
c.uc = b.inplayCall;
c.xa = b.clickURL;
c.fa = b.mimeType;
F(b.width, c, "w");
F(b.height, c, "h");
F(b.x, c, "x");
F(b.y, c, "y");
c.ka = b.layer;
c.S = Number(b.delay);
c.Ra = Number(b.showDuration);
c.yc = b.loops;
c.Jc = b.videoDuration;
0 < c.S && d.ib.push(c);
0 < c.Ra &&
d.Db.push(c);
d.ja.push(c)
}
});
D.a.j.fb && new la(d);
D.a.ba.push(d)
}
function F(b, c, d) {
var e, f;
null != b && "" != b && (parseInt(b.toString(), 10) != Number(b) || isNaN(Number(b)) ? "%" != b.toString().charAt(b.toString().length - 1) && ta(b.toString()) ? (e = [], b = b.toString(), 0 < b.indexOf("+") ? (e = b.split("+"), e[1] = parseInt(e[1], 10).toString()) : 0 < b.indexOf("-") && (e = b.split("-"), e[1] = (-1 * parseInt(e[1], 10)).toString()), f = Number(e[1]), e = String(e[0])) : e = b : f = parseInt(b, 10));
var g;
switch (d) {
case "w":
g = {
oa: e,
width: f
};
break;
case "h":
g = {
na: e,
height: f
};
break;
case "x":
g = {
I: e,
Da: f
};
break;
case "y":
g = {
J: e,
Ea: f
}
}
Object.assign(c, g)
}
function ta(b) {
var c = !1;
b.split("").forEach(function(b) {
48 <= b.toString().charCodeAt(0) && 57 >= b.toString().charCodeAt(0) && (c = !0)
});
return c
};
function ua(b) {
return new Promise(function(c, d) {
var e = new XMLHttpRequest;
e.open("GET", b);
e.onload = function() {
200 == e.status ? c(e.response) : d(Error(e.statusText))
};
e.onerror = function() {
d(Error("Network Error"))
};
e.send()
})
};
function va() {
this.lb = new oa;
var b = this;
this.Xb = function() {
return new Promise(function(c, d) {
void 0;
wa(b).then(function(c) {
return c ? pa(b.lb, c) : function(b) {
return new Promise(function(c, d) {
var e = xa();
void 0;
ua(e).then(function(c) {
return pa(b.lb, JSON.parse(c)[0])
}).catch(function() {
d()
}).then(c)
})
}(b)
}).then(function() {
void 0;
void 0
}).then(c).catch(d)
})
}
}
function wa(b) {
return function() {
return new Promise(function(b) {
try {
void 0;
var c = D.a.aa.tm_feed;
c ? b(c) : b(!1)
} catch (e) {
b(!1)
}
})
}(b)
}
function xa() {
void 0;
void 0;
var b = E("feedURL");
return decodeURIComponent(b)
};
var ya = null;
function G() {}
function za(b, c) {
c = {
count: c.count,
burl: c.burl,
rurl: c.rurl,
$: c.$,
Y: c.Y
};
var d, e, f, g, k;
b || (b = window, c.burl = window.location.href, c.count = 0, c.$ = Infinity, c.Y = Infinity);
try {
b.location && b.location.href && (e = b.location.href) && (c.burl = e)
} catch (n) {}
try {
d = b.document.referrer, c.count = 0
} catch (n) {
c.count++
}
d && (c.rurl = d);
try {
k = g = Infinity, !isNaN(b.document.body.clientWidth) && 0 < b.document.body.clientWidth && (g = b.document.body.clientWidth), !isNaN(b.document.body.clientHeight) && 0 < b.document.body.clientHeight && (k = b.document.body.clientHeight),
b.document.documentElement && b.document.documentElement.clientWidth && !isNaN(b.document.documentElement.clientWidth) && (g = b.document.documentElement.clientWidth), b.document.documentElement && b.document.documentElement.clientHeight && !isNaN(b.document.documentElement.clientHeight) && (k = b.document.documentElement.clientHeight), b.innerWidth && !isNaN(b.innerWidth) && (g = Math.min(g, b.innerWidth)), b.innerHeight && !isNaN(b.innerHeight) && (k = Math.min(k, b.innerHeight)), Infinity != k && Infinity != g && (c.$ = Math.min(c.$, g),
c.Y = Math.min(c.Y, k))
} catch (n) {}
b != top ? f = za(b.parent, c) : f = c;
return f
}
function Aa(b) {
-1 < b.indexOf("facebook.com/") && (b = b.split("?")[0] + "---REDACTED_FOR_PRIVACY---");
return b
}
l.Object.defineProperties(G, {
c: {
configurable: !0,
enumerable: !0,
get: function() {
return "Unknown"
}
},
f: {
configurable: !0,
enumerable: !0,
get: function() {
ya || (ya = za(null, {
count: 0,
burl: null,
rurl: null,
$: null,
Y: null
}));
return ya
}
},
rurl: {
configurable: !0,
enumerable: !0,
get: function() {
var b;
try {
b = Aa(G.f.rurl.toString())
} catch (c) {
b = G.c
}
return b
}
},
burl: {
configurable: !0,
enumerable: !0,
get: function() {
var b;
try {
b = Aa(G.f.burl.toString())
} catch (c) {
b = G.c
}
return b
}
},
g: {
configurable: !0,
enumerable: !0,
get: function() {
var b;
1 < G.a ?
b = G.c : 1 == G.a ? b = G.rurl : G.a || (b = G.burl);
return b
}
},
a: {
configurable: !0,
enumerable: !0,
get: function() {
var b = -1;
try {
b = parseInt(G.f.count, 10)
} catch (c) {}
return b
}
}
});
function H() {}
function I(b, c, d, e) {
for (var f = [], g = 3; g < arguments.length; ++g) f[g - 3] = arguments[g];
d = void 0 === d ? null : d;
g = q(Date().split(" "));
g.next();
g.next();
g.next();
g.next();
g = g.next().value;
void 0;
if (!(b in H.c)) void 0;
else if (b !== H.f && (b === H.ERROR && D.a.j.qb && (b = H.a), g = Math.pow(10, H.c[b]), 1 == Math.ceil(Math.random() * g) || "invalid_pct" === c)) {
void 0;
var k = Ba(),
n = Ca(encodeURIComponent(c),
k);
d && (n += "&msg=" + encodeURIComponent(d));
var y = 0;
f.forEach(function(b) {
n += "&p" + (++y).toString() + "=" + encodeURIComponent(b)
});
n += "&smpl=" + g.toString();
void 0;
f = new Image;
b == H.ERROR && (f.onload = function() {
D.a.fail()
});
f.src = n
}
}
function Da(b) {
void 0;
b = b.split("?")[1].split("&");
var c = {
ver: D.a.version
};
b.forEach(function(b) {
b = b.split("=");
c[b[0]] = b[1]
});
return c
}
function Ba() {
var b = {
ver: D.a.version
};
Object.assign(b, Da(xa()), Da(na()));
return b
}
function Ca(b, c) {
void 0;
b = "https://stats.tubemogul.com/stats/1/" + b + "?" + ("sessId=" + c.tm_auction_id);
b += "&paId=" + c.ad_id;
b += "&psId=" + c.psId;
b += "&feedId=" + c.id;
b += "&rurl=" + G.rurl;
b += "&burl=" + G.burl;
b += "&bi=" + c.bi;
b += "&price=" + c.price;
return b + "&rt=HTML5"
}
l.Object.defineProperties(H, {
ERROR: {
configurable: !0,
enumerable: !0,
get: function() {
return 0
}
},
a: {
configurable: !0,
enumerable: !0,
get: function() {
return 1
}
},
B: {
configurable: !0,
enumerable: !0,
get: function() {
return 2
}
},
f: {
configurable: !0,
enumerable: !0,
get: function() {
return 3
}
},
i: {
configurable: !0,
enumerable: !0,
get: function() {
return 0
}
},
A: {
configurable: !0,
enumerable: !0,
get: function() {
return 4
}
},
o: {
configurable: !0,
enumerable: !0,
get: function() {
return 4
}
},
g: {
configurable: !0,
enumerable: !0,
get: function() {
return -1
}
},
c: {
configurable: !0,
enumerable: !0,
get: function() {
return [H.i, H.A, H.o, H.g]
}
}
});
m();
var Ea = Symbol("PubPlayerControl");
m();
var Fa = Symbol("PubPlayerControl");
function J(b) {
if (b === Fa) void 0;
else throw "PubPlayerControl is a singleton: Cannot construct directly. Use 'PubPlayerControl.instance'";
this.b = B.a
}
J.prototype.a = function(b) {
this.b.v.setAttribute("src", b);
this.b.v.load()
};
function Ga(b, c, d) {
b.b.v.width = b.b.a.width = c;
b.b.v.height = b.b.a.height = d
}
l.Object.defineProperties(J, {
a: {
configurable: !0,
enumerable: !0,
get: function() {
this[Ea] || (this[Ea] = new J(Fa));
return this[Ea]
}
}
});
function K(b) {
void 0;
this.b = b;
this.reject = this.resolve = null
}
r(K, x);
h = K.prototype;
h.load = function() {
void 0;
var b = this;
return new Promise(function(c, d) {
b.resolve = c;
b.reject = d;
try {
J.a.a.call(J.a, b.b.detail)
} catch (e) {
void 0, b.reject(e)
}
})
};
h.Dc = function() {
this.resolve()
};
h.L = function() {};
h.W = function() {
return Promise.resolve()
};
h.show = function() {};
h.da = function() {};
function Ha(b) {
this.b = b;
this.b.controller = this;
this.u = null
}
h = Ha.prototype;
h.M = function() {
this.u.W()
};
h.load = function() {
var b = this;
return new Promise(function(c, d) {
if (b.b.detail && "" != b.b.detail) {
switch (b.b.fa.toLowerCase()) {
case "video/mp4":
b.u = new K(b.b);
break;
case "image/gif":
case "text/html":
case "image/png":
case "image/jpeg":
b.u = new ia(b.b);
break;
case "html5":
b.u = new C(b.b);
break;
default:
I(H.ERROR, "4015", "Unknown Mimetype", [b.b.fa]), d()
}
b.u.load().then(c(b.b))
} else I(H.ERROR, "4011", "Missing asset URL", [b.b.id]), d()
})
};
h.L = function() {
this.u.L()
};
h.pause = function() {};
h.resume = function() {};
h.eb = function(b) {
this.u.addEventListener("click", b)
};
function Ia(b) {
void 0;
this.b = b;
this.u = null;
this.a = B.a.v;
this.b.controller = this;
this.f = this.b.ma.controller;
D.a.Ic = this
}
h = Ia.prototype;
h.load = function() {
void 0;
var b = this;
Ja(this);
return new Promise(function(c, d) {
b.b.detail && "" != b.b.detail ? (b.u = new K(b.b), b.u.load().then(function() {
c(b.b)
}).catch(d.bind(null, "AssetControlVideo::load : AssetRendererVideo:load() failed"))) : (I(0, "4011", "Missing asset URL", [b.b.id]), d())
})
};
h.L = function() {
this.u.L()
};
function Ja(b) {
for (var c in b.c) b.a.addEventListener(c, b.c[c].bind(b))
}
h.start = function() {
void 0;
this.a.play()
};
h.pause = function() {
this.a.pause()
};
h.resume = function() {
this.a.play()
};
h.Zb = function() {
void 0
};
h.mb = function() {
void 0;
this.Hb.call(this)
};
h.nb = function() {
void 0;
this.Hb.call(this)
};
h.$b = function() {
void 0
};
h.ac = function() {
void 0;
this.Bb.call(this)
};
h.Nb = function() {
void 0;
this.u.reject("Ad video failed to load. Unsupported src attribute on video element.")
};
h.dc = function() {
void 0
};
h.cc = function() {
void 0
};
h.gc = function() {
void 0
};
h.hc = function() {
void 0
};
h.mc = function() {
var b = D.a.j.l;
b.C.call(b, "AdVolumeChange")
};
h.fc = function() {
void 0
};
h.jc = function() {
void 0
};
h.kc = function() {
void 0
};
h.lc = function() {
if (this.a.ended) this.Bb.call(this);
else if (D.a.j.controller.ob.call(D.a.j.controller, this.b.pvId, this.a.currentTime, this.a.duration), this.f) {
var b = this.f,
c = this.a.currentTime;
b.b.ib.forEach(Ka(c));
b.b.Db.forEach(La(c))
}
};
h.oc = function() {
void 0
};
h.Hb = function() {
this.a.removeEventListener("canplaythrough", this.nb);
this.a.removeEventListener("canplay", this.mb);
void 0;
this.u.Dc.call(this.u)
};
h.Bb = function() {
for (var b in this.c) this.a.removeEventListener(b, this.c[b]);
this.g || (this.g = !0, D.a.j.controller.ob.call(D.a.j.controller, this.b.pvId, this.a.duration, this.a.duration))
};
h.eb = function(b) {
var c = this;
B.a.a.style.width = "" + B.a.width + "px";
B.a.a.style.height = "" + B.a.height + "px";
B.a.a.addEventListener("click", function() {
return Ma(c, b)
});
z(B.a.a)
};
function Ma(b, c) {
b.a.paused ? b.resume() : c({
stopPropagation: function() {},
currentTarget: {
id: b.b.id
}
})
}
l.Object.defineProperties(Ia.prototype, {
c: {
configurable: !0,
enumerable: !0,
get: function() {
return {
abort: this.Zb,
canplay: this.mb,
canplaythrough: this.nb,
durationchange: this.$b,
ended: this.ac,
error: this.Nb,
loadedmetadata: this.dc,
loadstart: this.cc,
pause: this.fc,
play: this.gc,
playing: this.hc,
volumechange: this.mc,
stalled: this.jc,
suspend: this.kc,
timeupdate: this.lc,
waiting: this.oc
}
}
}
});
function Na(b) {
void 0;
this.b = b;
this.b.controller = this;
this.ea = []
}
h = Na.prototype;
h.xc = function() {
var b = this;
return new Promise(function(c) {
var d = [],
e = new Ia(b.b.yb);
d.push(e.load());
b.b.Ja.forEach(function(b) {
Object.keys(b.controller).length || (b.controller = new Ha(b));
d.push(b.controller.load())
});
Promise.all(d).then(function(c) {
void 0;
b.ea = c;
void 0;
b.Pa.call(b)
}).then(b.Ub.bind(b)).then(function() {
c()
})
})
};
h.Pa = function() {
this.b.Ja.forEach(function(b) {
var c = b.width,
d = b.height,
e;
b.qa && 0 != b.ra && 0 != b.sa && (e = b.sa / b.ra);
null != b.oa && 0 < b.oa.indexOf("%") && (c = parseInt(b.oa, 10) / 100 * B.a.width);
null != b.na && 0 < b.na.indexOf("%") && (d = parseInt(b.na, 10) / 100 * B.a.height);
if (b.width != c || b.height != d) b.qa && (1 < e ? (d = Math.floor(c / e), d > B.a.height && (d = B.a.height, c = Math.floor(d * e))) : (c = Math.floor(d * e), c > B.a.width && (c = B.a.width, d = Math.floor(c / e)))), b.width = c, b.height = d;
b.J && "%" == b.J.charAt(b.J.length - 1) ? b.y = B.a.height * parseInt(b.J,
10) / 100 : null != b.J ? ("top" == b.J ? b.y = 0 : "bottom" == b.J ? b.y = B.a.height - b.height : "center" == b.J && (b.y = (B.a.height - b.height) / 2), b.y += b.Ea) : b.y = b.Ea;
b.I && "%" == b.I.charAt(b.I.length - 1) ? b.x = B.a.width * parseInt(b.I, 10) / 100 : null != b.I ? ("left" == b.I ? b.x = 0 : "right" == b.I ? b.x = B.a.width - b.width : "center" == b.I && (b.x = (B.a.width - b.width) / 2), b.x += b.Da) : b.x = b.Da
})
};
function Oa() {
var b = L(M.a, M.a.G).controller;
b.b.Ja.forEach(function(b) {
b.controller.u.show()
});
b.b.yb.controller.start()
}
h.Ub = function() {
var b = this;
this.ea.forEach(function(c) {
c.xa && c.controller.eb(b.ec.bind(b))
})
};
h.ec = function(b) {
b.stopPropagation();
this.pause();
var c = b.currentTarget.id;
b = this.ea.find(function(b) {
return b.id == c
});
Pa(b)
};
h.pause = function() {
this.ea.forEach(function(b) {
b.controller.pause()
})
};
function Qa(b) {
b.ea.forEach(function(b) {
void 0;
b.controller.L()
})
}
function Ka(b) {
return function(c) {
c.S < b ? c.controller.u.show() : c.controller.u.da()
}
}
function La(b) {
return function(c) {
var d = c.Ra;
isNaN(c.S) || (d += c.S);
b > d && c.controller.u.da()
}
};
m();
var Ra = Symbol("AdControl");
m();
var Sa = Symbol("AdControl");
function M(b) {
if (b === Sa) void 0;
else throw "AdControl is a singleton: Cannot construct directly. Use 'AdControl.instance'";
this.b = D.a;
this.G = -1;
this.a = null
}
M.prototype.f = function() {
var b = J.a;
b.b.a || (void 0, b.b.a = document.createElement("div"), document.body.appendChild(b.b.a), I(H.a, B.c, ""));
b.b.a.style.width = b.b.width + "px";
b.b.a.style.height = b.b.height + "px";
if (!b.b.v) {
void 0;
var c = b.b,
d = document.createElement("video");
d.style.width = b.b.width;
d.style.height = b.b.height;
d.style.visibility =
"visible";
c.v = d;
b.b.a.appendChild(b.b.v);
Ga(b, B.a.width, B.a.height);
I(H.a, B.f, "")
}
this.b.l.vpaidObj.subscribe(this.c, "AdVideoComplete", this);
this.G = -1;
void 0;
this.G = Ta(this);
return Va(this, L(this, this.G))
};
function L(b, c) {
var d;
b.b.ba.forEach(function(b) {
b.V == c && (d = b)
});
return d
}
function Ta(b) {
var c = Number.MAX_VALUE,
d = b.G;
b.b.ba.forEach(function(b) {
void 0;
b.V > d && b.V < c && (c = b.V)
});
void 0;
void 0;
return c
}
function Va(b, c) {
return new Promise(function(d, e) {
b.b.ia ? (void 0, e()) : (void 0, b.a = c, c.controller = new Na(c), c.controller.xc.call(c.controller).then(d).catch(function(c) {
void 0;
b.a = null
}))
})
}
M.prototype.c = function() {
void 0;
this.a && (Qa(this.a.controller), this.b.l.C.call(this.b.l, "AdStopped"))
};
l.Object.defineProperties(M, {
a: {
configurable: !0,
enumerable: !0,
get: function() {
this[Ra] || (this[Ra] = new M(Sa));
return this[Ra]
}
}
});
function Wa() {};
function N() {}
l.Object.defineProperties(N, {
c: {
configurable: !0,
enumerable: !0,
get: function() {
return "CH"
}
},
g: {
configurable: !0,
enumerable: !0,
get: function() {
return "FF"
}
},
A: {
configurable: !0,
enumerable: !0,
get: function() {
return "SF"
}
},
i: {
configurable: !0,
enumerable: !0,
get: function() {
return "IE"
}
},
o: {
configurable: !0,
enumerable: !0,
get: function() {
return "OP"
}
},
f: {
configurable: !0,
enumerable: !0,
get: function() {
return "ME"
}
},
B: {
configurable: !0,
enumerable: !0,
get: function() {
try {
if (window.top == window) return "NO";
if (window.top.document.domain == window.document.domain) return "SD"
} catch (b) {}
return "XD"
}
},
a: {
configurable: !0,
enumerable: !0,
get: function() {
var b;
a: {
for (var c = [{
U: "Edge",
X: "Edge.([0-9]+)",
name: "MicroSoftEdge",
code: "ME"
}, {
U: "Chrome",
X: "Chrome.([0-9]+)",
name: "chrome",
code: "CH"
}, {
zc: navigator.vendor,
U: "Apple",
X: "(?:Version|Safari).([1-9]?\\d)[^0-9]",
name: "safari",
code: "SF"
}, {
U: "Opera",
X: "Version.([0-9]+)",
name: "opera",
code: "OP"
}, {
U: "Firefox",
X: "Firefox.([0-9]+)",
name: "firefox",
code: "FF"
}, {
U: "MSIE|Trident.7",
X: "(?:MSIE| rv).([0-9]+)",
name: "internet explorer",
code: "IE"
}], d = 0; d < c.length; d++)
if ((new RegExp(c[d].U)).test(c[d].zc ||
navigator.userAgent)) {
b = new RegExp(".*" + c[d].X + ".*");
c = {
name: c[d].name,
code: c[d].code
};
c.version = navigator.userAgent.replace(b, "$1");
b = c;
break a
}
b = void 0
}
b = b || {
name: "Unknown",
code: "??",
version: 0
};
b.Lc = b.code === N.c;
b.wc = b.code === N.A;
b.vc = b.code === N.g;
b.Nc = b.code === N.i;
b.Oc = b.code === N.o;
b.Mc = b.code === N.f;
return b
}
},
D: {
configurable: !0,
enumerable: !0,
get: function() {
[{
test: "Mac",
ga: "Mac"
}, {
test: "Win",
ga: "Win"
}, {
test: "i(Phone|Pad)",
ga: "iOS"
}, {
test: "Linux arm",
ga: "Android"
}, {
test: "Linux",
ga: "Linux"
}].forEach(function(b) {
if ((new RegExp(b.test)).test(navigator.platform)) return b.ga
});
return "Other"
}
}
});
function O() {}
l.Object.defineProperties(O, {
a: {
configurable: !0,
enumerable: !0,
get: function() {
return {
GROUPM: {
sb: 100,
Kb: !0,
pa: 200,
Jb: !1,
Ia: null,
Ha: 50
},
MRC: {
sb: 50,
Kb: !1,
pa: 200,
Jb: !0,
Ia: 2,
Ha: null
}
}
}
},
f: {
configurable: !0,
enumerable: !0,
get: function() {
return "MRC"
}
},
c: {
configurable: !0,
enumerable: !0,
get: function() {
return 15
}
},
i: {
configurable: !0,
enumerable: !0,
get: function() {
return "MRC"
}
},
g: {
configurable: !0,
enumerable: !0,
get: function() {
return "GROUPM"
}
}
});
m();
var Xa = Symbol("Observer");
m();
var Ya = Symbol("Observer");
function P(b) {
if (b === Ya) void 0;
else throw "Observer is a singleton: Cannot construct directly. Use 'Observer.instance'";
}
P.prototype.start = function(b, c) {
this.target = B.a.a;
this.g = b;
this.a = c;
this.c = new window.IntersectionObserver(this.i.bind(this), {
threshold: [b]
});
this.c.observe(this.target)
};
P.prototype.f = function() {
this.c.unobserve(this.target)
};
P.prototype.i = function(b) {
var c = this;
0 == b.length ? this.a(!1) : b.forEach(function(b) {
b.intersectionRatio >= c.g ? c.a(!0) : c.a(!1)
})
};
l.Object.defineProperties(P, {
a: {
configurable: !0,
enumerable: !0,
get: function() {
this[Xa] || (this[Xa] = new P(Ya));
return this[Xa]
}
},
c: {
configurable: !0,
enumerable: !0,
get: function() {
return "function" !== typeof window.IntersectionObserver ? !1 : !0
}
}
});
m();
var Za = Symbol("Geometry");
m();
var $a = Symbol("Geometry");
function Q(b) {
if (b === $a) void 0;
else throw "Geometry is a singleton: Cannot construct directly. Use 'Geometry.instance'";
this.g = B.a.v;
this.i = function() {
for (var b = this.a(window), d = b.O, e = window, f; e != window.top;) e = e.parent, f = this.a(e), f.O < d && (d = f.O, b = f);
return b
};
this.a = function(b) {
var c = {
width: Infinity,
height: Infinity,
O: Infinity
};
!isNaN(b.document.body.clientWidth) && 0 < b.document.body.clientWidth && (c.width = b.document.body.clientWidth);
!isNaN(b.document.body.clientHeight) &&
0 < b.document.body.clientHeight && (c.height = b.document.body.clientHeight);
b.document.documentElement && b.document.documentElement.clientWidth && !isNaN(b.document.documentElement.clientWidth) && (c.width = b.document.documentElement.clientWidth);
b.document.documentElement && b.document.documentElement.clientHeight && !isNaN(b.document.documentElement.clientHeight) && (c.height = b.document.documentElement.clientHeight);
b.innerWidth && !isNaN(b.innerWidth) && (c.width = Math.min(c.width, b.innerWidth));
b.innerHeight && !isNaN(b.innerHeight) &&
(c.height = Math.min(c.height, b.innerHeight));
c.O = c.height * c.width;
return c
};
this.c = function(b, d) {
var c = d.parent,
f = {
width: 0,
height: 0,
left: 0,
right: 0,
top: 0,
bottom: 0
};
b && (f = this.f(b, d), f.width = f.right - f.left, f.height = f.bottom - f.top, d != c && (d = this.c(d.frameElement, c), d.bottom < f.bottom && (d.bottom < f.top && (f.top = d.bottom), f.bottom = d.bottom), d.right < f.right && (d.right < f.left && (f.left = d.right), f.right = d.right), f.width = f.right - f.left, f.height = f.bottom - f.top));
return f
};
this.f = function(b, d) {
var c = d.parent,
f = {
left: 0,
right: 0,
top: 0,
bottom: 0
};
b && (b = b.getBoundingClientRect(), d != c ? f = this.f(d.frameElement, c) : f = {
left: b.left + f.left,
right: b.right + f.left,
top: b.top + f.top,
bottom: b.bottom + f.top
});
return f
}
}
l.Object.defineProperties(Q, {
c: {
configurable: !0,
enumerable: !0,
get: function() {
this[Za] || (this[Za] = new Q($a));
return this[Za]
}
},
a: {
configurable: !0,
enumerable: !0,
get: function() {
try {
if (window.top == window) return !0;
for (var b = window; b.parent != b;) {
if (b.parent.document.domain != b.document.domain) return !1;
b = b.parent
}
return !0
} catch (c) {}
return !1
}
}
});
m();
var ab = Symbol("Beacons");
m();
var bb = Symbol("Beacons");
function R(b) {
if (b === bb) void 0;
else throw "Beacons is a singleton: Cannot construct directly. Use 'Observer.instance'";
}
R.prototype.Pb = function(b, c) {
this.Sb = b;
this.P = c;
window.addEventListener("message", this.Rb.bind(this), !1);
this.Qb = B.a.a.ownerDocument.body;
this.f = B.a.width;
this.c = B.a.height;
this.D = [];
this.a = Array(14);
var d = Math.sqrt(2);
b = this.f / (1 + d);
c = this.c / (1 + d);
var e = this.f / d,
d = this.c / d;
this.g = 1;
this.A = 2;
this.B = 3;
this.i = 4;
this.o = 5;
this.Wa = 6;
this.Xa = 7;
this.Ua = 8;
this.Va = 9;
this.va = 10;
this.Ta = 11;
this.ta = 12;
this.ua = 13;
this.la = [{
name: "CONTROL",
left: -1E4,
top: -1E4
}, {
name: "CENTER",
left: (this.f - 1) / 2,
top: (this.c - 1) / 2
}, {
name: "OUTER_TOP_LEFT",
left: 1,
top: 1
}, {
name: "OUTER_TOP_RIGHT",
left: this.f - 1 - 1,
top: 1
}, {
name: "OUTER_BOTTOM_LEFT",
left: 1,
top: this.c - 1 - 1
}, {
name: "OUTER_BOTTOM_RIGHT",
left: this.f - 1 - 1,
top: this.c - 1 - 1
}, {
name: "MIDDLE_TOP_LEFT",
left: (this.f - e - 1) / 2,
top: (this.c - d - 1) / 2
}, {
name: "MIDDLE_TOP_RIGHT",
left: (this.f + e - 1) / 2,
top: (this.c - d - 1) / 2
}, {
name: "MIDDLE_BOTTOM_LEFT",
left: (this.f - e - 1) / 2,
top: (this.c + d - 1) / 2
}, {
name: "MIDDLE_BOTTOM_RIGHT",
left: (this.f + e - 1) / 2,
top: (this.c + d - 1) / 2
}, {
name: "INNER_TOP_LEFT",
left: (this.f - b - 1) / 2,
top: (this.c - c - 1) / 2
}, {
name: "INNER_TOP_RIGHT",
left: (this.f + b - 1) / 2,
top: (this.c - c - 1) / 2
}, {
name: "INNER_BOTTOM_LEFT",
left: (this.f - b - 1) / 2,
top: (this.c + c - 1) / 2
}, {
name: "INNER_BOTTOM_RIGHT",
left: (this.f + b - 1) / 2,
top: (this.c + c - 1) / 2
}];
var f = this;
return new Promise(function(b, c) {
for (var d = [], e = 0; e < f.la.length; e++) {
var g = new cb(f.Qb, e, f.Sb + "-" + e, f.la[e]);
f.D.push(g);
d.push(db(g))
}
Promise.all(d).then(b).catch(c)
})
};
R.prototype.Rb = function(b) {
switch (b.data.type) {
case "ready":
this.D[b.data.index].resolve();
break;
case "inview":
this.a[b.data.index] = !0;
break;
case "outofview":
this.a[b.data.index] = !1
}
};
R.prototype.Ob = function() {
for (var b = 0, c = 0, d = 0, e = 0, f = this.D.length - 1, g = 1; g < this.a.length; g++)
if (this.a[g]) switch (b++, g) {
case this.A:
case this.B:
case this.i:
case this.o:
c++;
break;
case this.Wa:
case this.Xa:
case this.Ua:
case this.Va:
d++;
break;
case this.va:
case this.Ta:
case this.ta:
case this.ua:
e++
}
if (b === f) d = "viewable";
else if (100 == this.P) d = "unviewable";
else {
a: {
e = [
[this.A, this.Wa, this.va, this.g, this.ua, this.Va, this.o],
[this.B, this.Xa, this.Ta, this.g, this.ta, this.Ua, this.i]
];
for (f = 0; 2 > f; f++)
for (var g = e[f],
k = c = 0; k < g.length; k++)
if (b = this.a[g[k]], !0 === b && !c) c++;
else if (!1 === b && 1 == c) c++;
else if (!0 === b && 2 == c) {
b = !0;
break a
}
b = !1
}
d = b ? "unmeasurable" : !0 === this.a[this.g] && (!0 === this.a[this.A] && !0 === this.a[this.B] || !0 === this.a[this.A] && !0 === this.a[this.i] || !0 === this.a[this.B] && !0 === this.a[this.o] || !0 === this.a[this.i] && !0 === this.a[this.o]) || !0 === this.a[this.g] && 4 == d ? "viewable" : "unviewable"
}
return d
};
l.Object.defineProperties(R, {
a: {
configurable: !0,
enumerable: !0,
get: function() {
this[ab] || (this[ab] = new R(bb));
return this[ab]
}
},
c: {
configurable: !0,
enumerable: !0,
get: function() {
return N.a.vc && "number" === typeof window.mozPaintCount || N.a.wc && "function" === typeof window.requestAnimationFrame ? !0 : !1
}
}
});
function cb(b, c, d, e) {
this.c = b;
this.index = c;
this.f = d;
this.a = e;
this.resolve = null;
this.g = '<html><head><script>function initFrameBeacon(index, threshold ) {\tvar started = false;\tvar isInView = false;\tvar prevPaintCount = window.mozPaintCount;\tsetInterval(function() {\t\tvar currPaintCount = window.mozPaintCount;\t\tif (!isInView && (currPaintCount - prevPaintCount) > threshold) {\t\t\tisInView = true;\t\t\twindow.adCodeWindow.postMessage({\t\t\t\ttype: "inview",\t\t\t\tindex: index\t\t\t}, "*");\t\t} else if (isInView && (currPaintCount - prevPaintCount) <= threshold) {\t\t\tisInView = false;\t\t\twindow.adCodeWindow.postMessage({\t\t\t\ttype: "outofview",\t\t\t\tindex: index\t\t\t}, "*");\t\t}\t\tprevPaintCount = currPaintCount;\t\tvar rnd1 = (16 + Math.round(Math.random() * 0x34)).toString(16);\t\tvar rnd2 = (16 + Math.round(Math.random() * 0x34)).toString(16);\t\tif (isInView === true) {\t\t\tdocument.body.style.background = "#" + rnd1 + "ff" + rnd2;\t\t} else {\t\t\tdocument.body.style.background = "#ff" + rnd1 + rnd2;\t\t}\t\tif (started === false) {\t\t\twindow.adCodeWindow.postMessage({\t\t\t\ttype: "ready",\t\t\t\tindex: index\t\t\t}, "*");\t\t\tstarted = true;\t\t}\t}.bind(this), 200)};\x3c/script></head><body onload=\'' + ("number" ===
typeof window.mozPaintCount ? "initFrameBeacon(" + c + ", 0 )" : "window.mozPaintCount = 0;var render = function(){ window.mozPaintCount++; requestAnimationFrame(render.bind(this));};render();initFrameBeacon(" + c + ", 4 )") + "'></body></html>"
}
function db(b) {
return new Promise(function(c) {
b.resolve = c;
c = document.createElement("iframe");
b.c.appendChild(c);
c.id = b.f;
c.style.cssText = "position:absolute;border:none;z-index:-9999;opacity:0.01;width:1px;height:1px;top:" + b.a.top + "px;left:" + b.a.left + "px;";
c.contentWindow.adCodeWindow = window;
c.contentWindow.document.open().write(b.g);
c.contentWindow.document.close()
})
};
m();
var eb = Symbol("ViewabilityControl");
m();
var fb = Symbol("ViewabilityControl");
function S(b) {
if (b === fb) void 0;
else throw "ViewabilityControl is a singleton: Cannot construct directly. Use 'ViewabilityControl.instance'";
this.Z = D.a.Z;
this.B = !1;
this.Aa = -1;
this.c = NaN;
this.P = this.Sa = -1;
this.D = this.A = 0;
this.f = this.a = this.g = !1;
this.R = "NONE";
this.F = {};
this.ub = "";
self.N = null;
this.i = 0;
this.o = 1
}
h = S.prototype;
h.rc = function(b) {
var c = this;
return new Promise(function(d) {
c.ub = "tm_ovv_" + Math.round(4294967295 * Math.random()).toString(16);
c.N = b;
"string" === typeof c.Z && c.Z in O.a || (c.Z = O.f);
c.F = O.a[c.Z];
c.P = c.F.sb;
null !== c.F.Ia && (c.Sa = Math.ceil(1E3 * c.F.Ia / c.F.pa));
"undefined" === typeof window.a && (window.a = new Wa);
c.N.subscribe(c.Eb, "AdImpression", c);
c.N.subscribe(c.Gb, "AdStopped", c);
P.c ? (c.R = T.a, d(!0)) : R.c ? (c.R = T.f, R.a.Pb.call(R.a, c.ub, c.P).then(d.bind(null, !0)).catch(d.bind(null, !1))) : Q.a ? (c.R = T.c, d(!0)) : (gb(c),
d(!1))
})
};
h.bc = function(b) {
this.a = b
};
h.ic = function() {
var b = !document.hidden,
c, d = window.getComputedStyle(B.a.a);
c = d.getPropertyValue("visibility");
d = d.getPropertyValue("display");
c = "hidden" == c || "none" == d ? !1 : !0;
d = !this.F.Kb || 0 < B.a.v.volume;
if (!this.g) {
var e;
switch (this.R) {
case T.f:
e = R.a.Ob.call(R.a);
this.a = "viewable" === e;
this.f = "unmeasurable" === e;
this.i = 0;
break;
case T.c:
var f = this.P / 100,
g = Q.c,
k = g.i();
if (Infinity == k.O) e = {
error: "unmeasurable"
};
else {
var n = g.g.getBoundingClientRect(),
n = n.width * n.height;
k.O / n < f ? f = Math.floor(100 * k.O / n) : (e = g.a(window.top),
f = g.c(g.g, window), f.bottom > e.height && (f.height -= f.bottom - e.height), 0 > f.top && (f.height += f.top), 0 > f.left && (f.width += f.left), f.right > e.width && (f.width -= f.right - e.width), f = Math.floor(100 * f.width * f.height / n));
e = {
clientWidth: e.width,
clientHeight: e.height,
vb: f
}
}
this.a = e.vb >= this.P;
this.f = "unmeasurable" === e.error;
this.i = e.vb
}
b && c && d && this.a ? (null === this.F.Ha || this.B || (0 < this.N.getAdDuration() ? (this.B = !0, b = this.N.getAdDuration()) : b = O.c, this.Sa = Math.ceil(10 * b * this.F.Ha / this.F.pa)), ++this.A >= this.Sa && (D.a.j.controller.Na("vimp",
null, hb(this, "t")), this.g = !0)) : this.F.Jb && (this.A = 0);
this.f && 5 < ++this.D && (gb(this), this.g = !0)
}
};
function gb(b) {
D.a.j.controller.Na("vimp", null, hb(b, "ifr"))
}
h.Eb = function() {
this.N.unsubscribe(this.Eb, "AdImpression");
this.R === T.a && P.a.start.call(P.a, this.P / 100, this.bc.bind(this));
ib(this);
this.c = setInterval(this.ic.bind(this), this.F.pa)
};
h.Gb = function() {
ib(this);
this.N.unsubscribe(this.Gb, "AdStopped");
this.R === T.a && P.a.f.call(P.a)
};
function ib(b) {
isNaN(b.c) || (clearInterval(b.c), b.c = NaN)
}
function hb(b, c) {
var d = b.o,
e = b.N.getAdDuration(),
f;
try {
var g = N.a;
f = [N.D, g.code + ":" + g.version, "IF:" + N.B].join(":::")
} catch (k) {
f = "error in ViewabilityEnv::getEnvStr()"
}
return {
vinst: "t",
inc: "vview",
vwbl: c,
vver: d,
dur: e,
vpct: b.i,
vw: document.body.clientWidth,
vh: document.body.clientHeight,
vol: B.a.v.volume,
venv: f,
ifr: window == window.top ? "f" : "t"
}
}
l.Object.defineProperties(S, {
a: {
configurable: !0,
enumerable: !0,
get: function() {
this[eb] || (this[eb] = new S(fb));
return this[eb]
}
}
});
function T() {}
l.Object.defineProperties(T, {
a: {
configurable: !0,
enumerable: !0,
get: function() {
return "INTERSECTION_OBSERVER"
}
},
f: {
configurable: !0,
enumerable: !0,
get: function() {
return "IFRAME_BEACONS"
}
},
c: {
configurable: !0,
enumerable: !0,
get: function() {
return "BROWSER_GEOMETRY"
}
}
});
function jb(b, c, d, e) {
e = void 0 === e ? null : e;
this.ver = D.a.version;
this.sessId = c.sessId;
this.paId = c.paId;
this.psId = c.psId;
this.rt = "HTML5";
this.burl = G.burl;
this.rurl = G.rurl;
this.w = B.a.width;
this.h = B.a.height;
this.bi = c.bi;
this.price = c.price;
this.date = Number(new Date).toString();
this.auth = c.auth;
this.did = c.did;
this.didtype = c.didtype;
this.jb = c.jb;
this.Mb = c.Mb.toString();
this.nc = c.nc;
this.vinst = "t";
switch (b) {
case "imp":
this.inc = "prxy" == d ? "none" : "view";
this.o = S.o;
this.$ = document.body.clientWidth;
this.Y = document.body.clientHeight;
break;
case "view":
this.dur = kb(c, d);
this.pvId = d;
this.volume = D.a.Aa;
break;
case "pct25":
case "pct50":
case "pct75":
case "pct100":
this.dur = kb(c, d), this.pvId = d, this.volume = D.a.Aa, "prxy" != d && (this.st = parseInt(U(c, d).xb, 10), this.end = parseInt(U(c, d).wb, 10), this.end < this.st ? (this.pct = 0, I(0, "invalid_pct", "Negative pct", [this.st, this.end, this.dur], !0)) : this.pct = Math.floor((this.end - this.st) / this.dur))
}
if (e)
for (var f in e) this[f] = e[f]
}
function kb(b, c) {
void 0;
void 0;
void 0;
return Math.floor(U(b, c).duration)
};
function lb(b) {
this.pvId = b;
this.xb = this.a = this.c = -1;
this.La = [];
this.zb = [!1, !1, !1, !1, !1];
this.controller = {}
}
l.Object.defineProperties(lb.prototype, {
duration: {
configurable: !0,
enumerable: !0,
set: function(b) {
this.c = b
},
get: function() {
return this.c
}
},
wb: {
configurable: !0,
enumerable: !0,
set: function(b) {
this.a = b
},
get: function() {
return this.a
}
}
});
function mb(b) {
this.b = b;
this.c = {
view: "AdVideoStart",
pct25: "AdVideoFirstQuartile",
pct50: "AdVideoMidpoint",
pct75: "AdVideoThirdQuartile",
pct100: "AdVideoComplete",
eng: "AdInteraction"
};
this.f = {
imp: "Impression",
view: "View",
ct: "ClickThrough",
pct25: "Complete25",
pct50: "Complete50",
pct75: "Complete75",
pct100: "Completion"
};
this.a = ["imp", "pct25", "pct50", "pct75", "pct100"]
}
function Pa(b) {
var c = D.a.j.controller;
b = b.xa;
c.b.hb || (c.b.hb = !0, b = c.gb("ct") + "&redir=" + encodeURIComponent(b), c.Oa("ct"), c.b.l.C && c.b.l.Ec.call(c.b.l, b, c.b.paId));
window.open(b)
}
h = mb.prototype;
h.ob = function(b, c, d) {
if (0 < d && !D.a.ia) {
var e = U(this.b, b);
null == e && ("prxy" == b && (this.a.shift(), this.a.unshift("view")), e = new lb(b), e.duration = d, e.La[Math.floor(d)] = !1, this.b.Ib.push(e));
e.wb = c;
e.La[Math.floor(c)] = !0;
e = nb(this, b, d);
ob(this, b, e, c);
this.b.Ab = Math.floor(d - c);
this.b.Lb = d
}
};
function nb(b, c, d) {
b = U(b.b, c).La.filter(function(b) {
return b
}).length;
return Math.min(b / Math.floor(d), 1)
}
function ob(b, c, d, e) {
d = Math.floor(d / .25);
U(b.b, c).zb[d] || (pb(b, b.a[d], c).catch(function() {
void 0
}), U(b.b, c).xb = e, U(b.b, c).zb[d] = !0)
}
function pb(b, c, d) {
d = void 0 === d ? null : d;
return new Promise(function(e) {
void 0;
var f = [];
f.push(b.Na.call(b, c, d));
f.push(b.Oa.call(b, c));
"imp" == c && b.Oa("view");
Promise.all(f).then(function() {
void 0;
b.c[c] && (void 0, b.b.l.C.call(b.b.l, b.c[c]));
e()
}).catch(e)
})
}
h.Na = function(b, c, d) {
var e = this;
return new Promise(function(f) {
var g = e.gb.call(e, b, c, d);
"imp" == b && (e.b.qb = !0);
void 0;
e.Cb.call(e, g).then(function() {
void 0
}).then(f).catch(f)
})
};
h.gb = function(b, c, d) {
var e = this.b.protocol + this.b.Fb + "/" + b + "?";
c = new jb(b, this.b, void 0 === c ? null : c, void 0 === d ? null : d);
var f = d = "",
g;
for (g in c)
if ("number" === typeof c[g] || c[g]) f += d + g + "=" + encodeURIComponent(c[g]), d = "&";
e += f;
void 0;
"imp" == b && "" != this.b.bb && (e += "&" + this.b.bb);
"ct" == b && "" != this.b.ab && (e += "&" + this.b.ab);
"view" == b && "" != this.b.cb && (e += "&" + this.b.cb);
"view" != b && "imp" != b || "" == this.b.Fa || (e += "&ias_vid_mon=" + this.b.Fa);
return e
};
h.Oa = function(b) {
var c = this;
return new Promise(function(d) {
var e = [],
f = c.f[b],
g = c.b.Ka.filter(function(b) {
return b.trigger == f
}),
k = g.filter(function(b) {
return "flash" == b.type.toLowerCase() || "image" == b.type.toLowerCase()
}),
n = g.filter(function(b) {
return "javascript" == b.type.toLowerCase()
}),
g = g.filter(function(b) {
return "html" == b.type.toLowerCase()
});
k.forEach(function(b) {
return e.push(c.Cb.call(c, b.detail))
});
n.forEach(function(b) {
return e.push(c.Cc.call(c, b.detail))
});
g.forEach(function(b) {
return e.push(c.Bc.call(c,
b.detail))
});
Promise.all(e).then(function() {
void 0
}).then(d).catch(d)
})
};
h.Cb = function(b) {
return new Promise(function(c) {
var d = new Image;
d.onload = c;
d.onerror = c;
try {
void 0, d.src = b
} catch (e) {
c()
}
})
};
h.Cc = function(b) {
return new Promise(function(c) {
var d = document.createElement("script");
d.type = "text/javascript";
d.onload = c;
d.onerror = c;
try {
d.src = b, document.getElementsByTagName("head")[0].appendChild(d)
} catch (e) {
c()
}
})
};
h.Bc = function(b) {
return new Promise(function(c) {
var d = document.createElement("div");
d.style.visibility = "hidden";
document.body.appendChild(d);
try {
d.innerHTML = b, c()
} catch (e) {
c()
}
})
};
function V(b) {
this.pb = new __IASVANS;
this.Ba = {
ad_duration: void 0,
volume: void 0
};
this.pc = {
pubId: D.a.j.psId,
campId: D.a.j.za,
advId: void 0,
bidurl: D.a.j.Ac,
chanId: D.a.j.Ca,
partner: V.a,
placementId: D.a.j.Ma,
anId: b.qc
}
}
l.Object.defineProperties(V, {
a: {
configurable: !0,
enumerable: !0,
get: function() {
return "7203"
}
}
});
function qb() {
this.protocol = "https://";
this.psId = this.sessId = this.Fc = this.Tb = "";
this.fb = !1;
this.Fa = this.ab = this.cb = this.bb = this.price = this.bi = "";
this.Ka = [];
this.Kc = new Date;
this.Ma = this.za = this.paId = this.Ca = "";
this.Mb = G.a;
this.Fb = "stats.tubemogul.com/stats/1";
this.controller = new mb(this);
this.Ib = [];
this.l = {};
this.c = this.a = -2;
this.hb = this.qb = !1;
this.nc = this.didtype = this.did = null
}
function U(b, c) {
return b.Ib.filter(function(b) {
return b.pvId == c
})[0]
}
l.Object.defineProperties(qb.prototype, {
Ab: {
configurable: !0,
enumerable: !0,
set: function(b) {
b != this.a && (this.a = b, this.l.C("AdRemainingTimeChange"))
},
get: function() {
return this.a
}
},
Lb: {
configurable: !0,
enumerable: !0,
set: function(b) {
b != this.c && (this.c = b, this.l.C("AdDurationChange"))
},
get: function() {
return this.c
}
}
});
m();
Symbol("VastModel");
m();
Symbol("VastModel");
function rb() {
this.a = {};
D.a.ya.fbd && (this.a = Object.assign({}, D.a.ya.fbd));
this.c = G.g
}
function sb(b, c, d) {
return new Promise(function(e, f) {
var g = Ca("reject", Ba()),
g = g + ("&code=" + d),
g = g + ("&p1=" + b),
g = g + ("&p2=" + c),
g = g + "&msg=Rejected%20Ad&ssb=true" + ("&wd=" + G.a),
k = new Image;
k.onload = e;
try {
k.src = g
} catch (n) {
f()
}
})
}
function tb(b, c, d) {
return new Promise(function(e, f) {
b = b.split("${du}").join(encodeURIComponent(c)).split("${pd}").join(d);
var g = new Image;
g.onload = e;
try {
g.src = b
} catch (k) {
f()
}
})
}
function ub(b, c) {
var d = !1;
b.indexOf(c) && "." != b.charAt(b.indexOf(c) - 1) && "://" != b.charAt(b.indexOf(c) - 3) || b.substring(b.indexOf(c), b.length) != c || (d = !0);
return d
};
function W(b, c) {
this.c = "https://ud.tubemogul.com/js/lib/3rdparty/Ias_3.2.1.js";
this.T = null;
this.a = b;
this.aa = D.a.aa;
this.qc = "t" === c ? V.a : c;
this.load()
}
W.prototype.load = function() {
var b = document.createElement("script");
b.src = this.c;
b.type = "text/javascript";
b.onload = this.g.bind(this);
b.onerror = this.f.bind(this);
document.getElementsByTagName("head")[0].appendChild(b)
};
W.prototype.g = function() {
try {
D.a.T = new V(this);
this.T = D.a.T;
try {
this.T.pb.initCM(this.T.pc, B.a.v), vb(this)
} catch (b) {
void 0
}
this.a(null)
} catch (b) {
void 0, this.a(null)
}
};
W.prototype.f = function(b) {
void 0;
this.a(null)
};
function vb(b) {
"AdLoaded AdStarted AdVideoStart AdImpression AdStopped AdLinearChange AdExpandedChange AdRemainingTimeChange AdVolumeChange AdVideoFirstQuartile AdVideoMidpoint AdVideoThirdQuartile AdVideoComplete AdClickThru AdUserAcceptInvitation AdSkippableStateChange AdUserMinimize AdDurationChange AdUserClose AdPaused AdPlaying AdSizeChange AdSkipped AdError".split(" ").forEach(function(c) {
return D.a.j.l.vpaidObj.subscribe(wb(b, c).bind(b), c)
})
}
function wb(b, c) {
var d = b.T;
return function() {
d.Ba.volume = B.a.v.volume;
d.Ba.ad_duration = D.a.j.Lb;
d.pb.sendEvent(c, d.Ba)
}
};
function X(b, c) {
this.a = b;
this.i = c;
this.g = {
level1: D.a.j.za,
level2: D.a.j.Ma,
level3: D.a.j.Ca,
level4: D.a.j.paId,
slicer1: D.a.j.psId,
slicer2: null
};
this.load()
}
X.prototype.load = function() {
var b = document.createElement("script");
b.src = X.a;
b.type = "application/javascript";
b.onload = this.f.bind(this);
b.onerror = this.c.bind(this);
document.getElementsByTagName("head")[0].appendChild(b)
};
X.prototype.f = function() {
try {
initMoatTracking(this.i, B.a.v, this.g, "tubemoguljsvideo627208760992")
} catch (b) {
void 0
}
this.a(null)
};
X.prototype.c = function(b) {
void 0;
this.a(null)
};
l.Object.defineProperties(X, {
a: {
configurable: !0,
enumerable: !0,
get: function() {
return "https://ud.tubemogul.com/js/lib/3rdparty/Moat_2.0.js"
}
}
});
function Y() {
D.a.l = this;
this.Qa = function() {};
this.a = new Promise(function(b) {
return function(c, d) {
b.Qa = function(b, f) {
f = void 0 === f ? null : f;
void 0;
b ? c() : d(f)
}
}
}(this));
this.tb = "";
this.ha = [];
this.vpaidObj = null
}
Y.prototype.Ec = function(b, c) {
void 0;
var d = this.ha.filter(function(b) {
return "AdClickThru" == b.wa
})[0];
d.hasOwnProperty("listenerScope") ? d.ca.call(d.listenerScope, b, c, !1) : d.ca(b, c, !1)
};
Y.prototype.C = function(b, c) {
for (var d = [], e = 1; e < arguments.length; ++e) d[e - 1] = arguments[e];
var f = this,
g = 0,
k = !1;
this.ha.forEach(function(c) {
c.wa == b && ("AdRemainingTimeChange" == c.wa || void 0, k = c.hasOwnProperty("listenerScope") ? c.ca.apply(c.listenerScope, d) : c.ca.apply(f, d));
k && g++
});
return 0 < g
};
l.Object.defineProperties(Y, {
a: {
configurable: !0,
enumerable: !0,
get: function() {
return "2.0"
}
}
});
void 0;
void 0;
function xb() {
I(H.B, "AdStarted...", "");
D.a.j = new qb;
D.a.rb = this.Yb.bind(this);
if ("undefined" == typeof Promise || "undefined" == typeof Promise.all) I(H.ERROR, "2001", "Promises not supported");
else {
var b = D.a,
c = E("cd"),
d = {};
c && (d = JSON.parse(decodeURIComponent(c)));
b.ya = d;
this.a = new rb;
this.l = new Y;
yb.call(this.l);
this.kb = new va
}
}
h = xb.prototype;
h.Yb = function() {
void 0; - 1 < M.a.G && L(M.a, M.a.G) && L(M.a, M.a.G).controller.pause();
this.l.C.call(this.l, "AdError");
this.l.C.call(this.l, "AdStopped")
};
h.Wb = function() {
D.a.j.l = this.l
};
h.tc = function() {
var b = E("moatenabled").toLowerCase();
return new Promise(function(c) {
var d = window.getVPAIDAd;
"t" === b && "function" === typeof d ? new X(c, d()) : c(null)
})
};
h.Gc = function() {
var b = this;
return new Promise(function(c, d) {
var e = b.a,
f = "";
if (e.a && "T" == e.a.ssb) {
var g, k = e.c,
n = e.a;
if (k && k != G.c) {
k = k.substring(k.indexOf("://") + 3, k.length);
k.includes("/") && (k = k.substring(0, k.indexOf("/")));
var n = n.pd,
y = !1;
"" != n && null != n && (-1 != k.indexOf(n) ? y = ub(k, n) : -1 != n.indexOf(k) && (y = ub(n, k)));
y || (g = "DM")
} else g = "DI";
g && (f = g)
}!D.a.ia && 0 < f.length && (g = [], g.push(tb(e.a.aburl, e.c, e.a.pd)), g.push(sb(e.c, e.a.pd, f)), Promise.all(g).then(D.a.fail.bind(D.a, "Rejected")));
f.length ? d("SSB Rejected.") :
c()
})
};
h.sc = function() {
var b = E("iasMon").toLowerCase();
return new Promise(function(c) {
b && "f" !== b ? (D.a.j.Fa = "t" === b ? "tm" : "account", new W(c, b)) : c(null)
})
};
function yb() {
var b = this;
this.vpaidObj = {
getAdLinear: function() {
void 0;
return !0
},
getAdVolume: function() {
void 0;
return B.a.v.volume
},
setAdVolume: function(x) {
void 0;
B.a.v.volume = x;
b.C("AdVolumeChange");
},
getAdWidth: function() {
void 0;
return B.a.width
},
getAdHeight: function() {
void 0;
return B.a.height
},
setAdWidth: function(b) {
void 0
},
setAdHeight: function(b) {
void 0
},
getAdExpanded: function(b) {
void 0;
return !1
},
getAdSkippableState: function() {
void 0;
return !1
},
getAdRemainingTime: function() {
return D.a.j.Ab
},
getAdDuration: function() {
return Math.floor(B.a.v.duration)
},
getAdCompanions: function() {
void 0;
return ""
},
getAdIcons: function() {
return !1
},
handshakeVersion: function(b) {
return this.tb =
parseInt(b, 10) >= parseInt(Y.a, 10) ? Y.a : b
},
initAd: function(c, d, e, f, g, k) {
g = void 0 === g ? null : g;
k = void 0 === k ? null : k;
void 0;
B.a.width = c;
B.a.height = d;
B.a.B = e;
B.a.A = f || 0;
void 0;
if (g && null != g.AdParameters) try {
D.a.aa = JSON.parse(g.AdParameters), void 0, void 0
} catch (n) {
void 0
}
k ? (B.a.D = k, Ga(J.a, c, d), b.Qa(!0)) :
(void 0, I(H.ERROR, "1009", "Player data missing", "environmentVars"), b.Qa(!1, ""))
},
startAd: function() {
void 0;
b.C("AdStarted");
b.C("AdImpression");
b.C("AdVideoStart");
Oa()
},
stopAd: function() {
void 0;
M.a.c()
},
pauseAd: function() {
D.a.paused = !0;
L(D.a, D.a.G).controller.pause()
},
resumeAd: function() {
D.a.paused = !1;
L(D.a, D.a.G).controller.resume()
},
expandAd: function() {
void 0
},
collapseAd: function() {},
skipAd: function() {},
resizeAd: function(c, d, e) {
B.a.B = e;
Ga(J.a, c, d);
b.C("AdSizeChange")
},
subscribe: function(c, d, e) {
e = void 0 === e ? null : e;
void 0;
c = {
wa: d,
ca: c
};
"undefined" != typeof e && (c.listenerScope = e);
b.ha.push(c)
},
unsubscribe: function(c, d) {
b.ha = b.ha.filter(function(b) {
return b.wa != d && b.ca != c
})
}
}
}
var Z = new xb;
(function() {
void 0;
var b = Z.l.vpaidObj;
window.getVPAIDAd = function() {
void 0;
return b
};
return Z.l.a
})().then(Z.Gc.bind(Z)).then(Z.kb.Xb.bind(Z.kb)).then(Z.Wb.bind(Z)).then(Z.tc.bind(Z)).then(Z.sc.bind(Z)).then(M.a.f.bind(M.a)).then(S.a.rc.bind(S.a, Z.l.vpaidObj)).then(Z.l.C.bind(Z.l, "AdLoaded")).catch(function(b) {
void 0;
void 0
});
}).call(this)
//# sourceMappingURL=vpaid.js.map
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment