Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mamayaya1
GitHub Repository: mamayaya1/game
Path: blob/main/projects/crossy-road/poki-sdk-core-v2.234.2.js
4626 views
1
(() => {
2
var e = {
3
564: (e, t, i) => {
4
var n, r, a;
5
! function(i, o) {
6
if (i) {
7
var s = {},
8
d = i.TraceKit,
9
A = [].slice,
10
c = "?",
11
l = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;
12
s.noConflict = function() {
13
return i.TraceKit = d, s
14
}, s.wrap = function(e) {
15
return function() {
16
try {
17
return e.apply(this, arguments)
18
} catch (e) {
19
throw s.report(e), e
20
}
21
}
22
}, s.report = function() {
23
var e, t, n, r, a = [],
24
o = null,
25
d = null;
26
27
function A(e, t, i) {
28
var n = null;
29
if (!t || s.collectWindowErrors) {
30
for (var r in a)
31
if (p(a, r)) try {
32
a[r](e, t, i)
33
} catch (e) {
34
n = e
35
}
36
if (n) throw n
37
}
38
}
39
40
function c(t, i, n, r, a) {
41
if (d) s.computeStackTrace.augmentStackTraceWithInitialElement(d, i, n, t), h();
42
else if (a) A(s.computeStackTrace(a), !0, a);
43
else {
44
var o, c = {
45
url: i,
46
line: n,
47
column: r
48
},
49
p = t;
50
if ("[object String]" === {}.toString.call(t)) {
51
var u = t.match(l);
52
u && (o = u[1], p = u[2])
53
}
54
c.func = s.computeStackTrace.guessFunctionName(c.url, c.line), c.context = s.computeStackTrace.gatherContext(c.url, c.line), A({
55
name: o,
56
message: p,
57
mode: "onerror",
58
stack: [c]
59
}, !0, null)
60
}
61
return !!e && e.apply(this, arguments)
62
}
63
64
function u(e) {
65
A(s.computeStackTrace(e.reason), !0, e.reason)
66
}
67
68
function h() {
69
var e = d,
70
t = o;
71
d = null, o = null, A(e, !1, t)
72
}
73
74
function m(e) {
75
if (d) {
76
if (o === e) return;
77
h()
78
}
79
var t = s.computeStackTrace(e);
80
throw d = t, o = e, setTimeout((function() {
81
o === e && h()
82
}), t.incomplete ? 2e3 : 0), e
83
}
84
return m.subscribe = function(o) {
85
! function() {
86
if (!0 === t) return;
87
e = i.onerror, i.onerror = c, t = !0
88
}(),
89
function() {
90
if (!0 === r) return;
91
n = i.onunhandledrejection, i.onunhandledrejection = u, r = !0
92
}(), a.push(o)
93
}, m.unsubscribe = function(o) {
94
for (var s = a.length - 1; s >= 0; --s) a[s] === o && a.splice(s, 1);
95
0 === a.length && (t && (i.onerror = e, t = !1), r && (i.onunhandledrejection = n, r = !1))
96
}, m
97
}(), s.computeStackTrace = function() {
98
var e = !1,
99
t = {};
100
101
function n(e) {
102
if ("string" != typeof e) return [];
103
if (!p(t, e)) {
104
var n = "",
105
r = "";
106
try {
107
r = i.document.domain
108
} catch (e) {}
109
var a = /(.*)\:\/\/([^:\/]+)([:\d]*)\/{0,1}([\s\S]*)/.exec(e);
110
a && a[2] === r && (n = function(e) {
111
if (!s.remoteFetching) return "";
112
try {
113
var t = function() {
114
try {
115
return new i.XMLHttpRequest
116
} catch (e) {
117
return new i.ActiveXObject("Microsoft.XMLHTTP")
118
}
119
}();
120
return t.open("GET", e, !1), t.send(""), t.responseText
121
} catch (e) {
122
return ""
123
}
124
}(e)), t[e] = n ? n.split("\n") : []
125
}
126
return t[e]
127
}
128
129
function r(e, t) {
130
var i, r = /function ([^(]*)\(([^)]*)\)/,
131
a = /['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,
132
o = "",
133
s = n(e);
134
if (!s.length) return c;
135
for (var d = 0; d < 10; ++d)
136
if (!u(o = s[t - d] + o)) {
137
if (i = a.exec(o)) return i[1];
138
if (i = r.exec(o)) return i[1]
139
} return c
140
}
141
142
function a(e, t) {
143
var i = n(e);
144
if (!i.length) return null;
145
var r = [],
146
a = Math.floor(s.linesOfContext / 2),
147
o = a + s.linesOfContext % 2,
148
d = Math.max(0, t - a - 1),
149
A = Math.min(i.length, t + o - 1);
150
t -= 1;
151
for (var c = d; c < A; ++c) u(i[c]) || r.push(i[c]);
152
return r.length > 0 ? r : null
153
}
154
155
function o(e) {
156
return e.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g, "\\$&")
157
}
158
159
function d(e) {
160
return o(e).replace("<", "(?:<|&lt;)").replace(">", "(?:>|&gt;)").replace("&", "(?:&|&amp;)").replace('"', '(?:"|&quot;)').replace(/\s+/g, "\\s+")
161
}
162
163
function A(e, t) {
164
for (var i, r, a = 0, o = t.length; a < o; ++a)
165
if ((i = n(t[a])).length && (i = i.join("\n"), r = e.exec(i))) return {
166
url: t[a],
167
line: i.substring(0, r.index).split("\n").length,
168
column: r.index - i.lastIndexOf("\n", r.index) - 1
169
};
170
return null
171
}
172
173
function l(e, t, i) {
174
var r, a = n(t),
175
s = new RegExp("\\b" + o(e) + "\\b");
176
return i -= 1, a && a.length > i && (r = s.exec(a[i])) ? r.index : null
177
}
178
179
function h(e) {
180
if (!u(i && i.document)) {
181
for (var t, n, r, a, s = [i.location.href], c = i.document.getElementsByTagName("script"), l = "" + e, p = 0; p < c.length; ++p) {
182
var h = c[p];
183
h.src && s.push(h.src)
184
}
185
if (r = /^function(?:\s+([\w$]+))?\s*\(([\w\s,]*)\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/.exec(l)) {
186
var m = r[1] ? "\\s+" + r[1] : "",
187
g = r[2].split(",").join("\\s*,\\s*");
188
t = o(r[3]).replace(/;$/, ";?"), n = new RegExp("function" + m + "\\s*\\(\\s*" + g + "\\s*\\)\\s*{\\s*" + t + "\\s*}")
189
} else n = new RegExp(o(l).replace(/\s+/g, "\\s+"));
190
if (a = A(n, s)) return a;
191
if (r = /^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/.exec(l)) {
192
var v = r[1];
193
if (t = d(r[2]), a = A(n = new RegExp("on" + v + "=[\\'\"]\\s*" + t + "\\s*[\\'\"]", "i"), s[0])) return a;
194
if (a = A(n = new RegExp(t), s)) return a
195
}
196
return null
197
}
198
}
199
200
function m(e) {
201
if (!e.stack) return null;
202
for (var t, i, n, o = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, s = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i, d = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i, A = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i, p = /\((\S*)(?::(\d+))(?::(\d+))\)/, h = e.stack.split("\n"), m = [], g = /^(.*) is undefined$/.exec(e.message), v = 0, f = h.length; v < f; ++v) {
203
if (i = o.exec(h[v])) {
204
var b = i[2] && 0 === i[2].indexOf("native");
205
i[2] && 0 === i[2].indexOf("eval") && (t = p.exec(i[2])) && (i[2] = t[1], i[3] = t[2], i[4] = t[3]), n = {
206
url: b ? null : i[2],
207
func: i[1] || c,
208
args: b ? [i[2]] : [],
209
line: i[3] ? +i[3] : null,
210
column: i[4] ? +i[4] : null
211
}
212
} else if (i = d.exec(h[v])) n = {
213
url: i[2],
214
func: i[1] || c,
215
args: [],
216
line: +i[3],
217
column: i[4] ? +i[4] : null
218
};
219
else {
220
if (!(i = s.exec(h[v]))) continue;
221
i[3] && i[3].indexOf(" > eval") > -1 && (t = A.exec(i[3])) ? (i[3] = t[1], i[4] = t[2], i[5] = null) : 0 !== v || i[5] || u(e.columnNumber) || (m[0].column = e.columnNumber + 1), n = {
222
url: i[3],
223
func: i[1] || c,
224
args: i[2] ? i[2].split(",") : [],
225
line: i[4] ? +i[4] : null,
226
column: i[5] ? +i[5] : null
227
}
228
}!n.func && n.line && (n.func = r(n.url, n.line)), n.context = n.line ? a(n.url, n.line) : null, m.push(n)
229
}
230
return m.length ? (m[0] && m[0].line && !m[0].column && g && (m[0].column = l(g[1], m[0].url, m[0].line)), {
231
mode: "stack",
232
name: e.name,
233
message: e.message,
234
stack: m
235
}) : null
236
}
237
238
function g(e, t, i, n) {
239
var o = {
240
url: t,
241
line: i
242
};
243
if (o.url && o.line) {
244
e.incomplete = !1, o.func || (o.func = r(o.url, o.line)), o.context || (o.context = a(o.url, o.line));
245
var s = / '([^']+)' /.exec(n);
246
if (s && (o.column = l(s[1], o.url, o.line)), e.stack.length > 0 && e.stack[0].url === o.url) {
247
if (e.stack[0].line === o.line) return !1;
248
if (!e.stack[0].line && e.stack[0].func === o.func) return e.stack[0].line = o.line, e.stack[0].context = o.context, !1
249
}
250
return e.stack.unshift(o), e.partial = !0, !0
251
}
252
return e.incomplete = !0, !1
253
}
254
255
function v(e, t) {
256
for (var i, n, a, o = /function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i, d = [], A = {}, p = !1, u = v.caller; u && !p; u = u.caller)
257
if (u !== f && u !== s.report) {
258
if (n = {
259
url: null,
260
func: c,
261
args: [],
262
line: null,
263
column: null
264
}, u.name ? n.func = u.name : (i = o.exec(u.toString())) && (n.func = i[1]), void 0 === n.func) try {
265
n.func = i.input.substring(0, i.input.indexOf("{"))
266
} catch (e) {}
267
if (a = h(u)) {
268
n.url = a.url, n.line = a.line, n.func === c && (n.func = r(n.url, n.line));
269
var m = / '([^']+)' /.exec(e.message || e.description);
270
m && (n.column = l(m[1], a.url, a.line))
271
}
272
A["" + u] ? p = !0 : A["" + u] = !0, d.push(n)
273
} t && d.splice(0, t);
274
var b = {
275
mode: "callers",
276
name: e.name,
277
message: e.message,
278
stack: d
279
};
280
return g(b, e.sourceURL || e.fileName, e.line || e.lineNumber, e.message || e.description), b
281
}
282
283
function f(t, o) {
284
var s = null;
285
o = null == o ? 0 : +o;
286
try {
287
if (s = function(e) {
288
var t = e.stacktrace;
289
if (t) {
290
for (var i, n = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i, o = / line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i, s = t.split("\n"), d = [], A = 0; A < s.length; A += 2) {
291
var c = null;
292
if ((i = n.exec(s[A])) ? c = {
293
url: i[2],
294
line: +i[1],
295
column: null,
296
func: i[3],
297
args: []
298
} : (i = o.exec(s[A])) && (c = {
299
url: i[6],
300
line: +i[1],
301
column: +i[2],
302
func: i[3] || i[4],
303
args: i[5] ? i[5].split(",") : []
304
}), c) {
305
if (!c.func && c.line && (c.func = r(c.url, c.line)), c.line) try {
306
c.context = a(c.url, c.line)
307
} catch (e) {}
308
c.context || (c.context = [s[A + 1]]), d.push(c)
309
}
310
}
311
return d.length ? {
312
mode: "stacktrace",
313
name: e.name,
314
message: e.message,
315
stack: d
316
} : null
317
}
318
}(t), s) return s
319
} catch (t) {
320
e
321
}
322
try {
323
if (s = m(t)) return s
324
} catch (t) {
325
e
326
}
327
try {
328
if (s = function(e) {
329
var t = e.message.split("\n");
330
if (t.length < 4) return null;
331
var o, s = /^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,
332
c = /^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,
333
l = /^\s*Line (\d+) of function script\s*$/i,
334
u = [],
335
h = i && i.document && i.document.getElementsByTagName("script"),
336
m = [];
337
for (var g in h) p(h, g) && !h[g].src && m.push(h[g]);
338
for (var v = 2; v < t.length; v += 2) {
339
var f = null;
340
if (o = s.exec(t[v])) f = {
341
url: o[2],
342
func: o[3],
343
args: [],
344
line: +o[1],
345
column: null
346
};
347
else if (o = c.exec(t[v])) {
348
f = {
349
url: o[3],
350
func: o[4],
351
args: [],
352
line: +o[1],
353
column: null
354
};
355
var b = +o[1],
356
y = m[o[2] - 1];
357
if (y) {
358
var k = n(f.url);
359
if (k) {
360
var w = (k = k.join("\n")).indexOf(y.innerText);
361
w >= 0 && (f.line = b + k.substring(0, w).split("\n").length)
362
}
363
}
364
} else if (o = l.exec(t[v])) {
365
var I = i.location.href.replace(/#.*$/, ""),
366
S = A(new RegExp(d(t[v + 1])), [I]);
367
f = {
368
url: I,
369
func: "",
370
args: [],
371
line: S ? S.line : o[1],
372
column: null
373
}
374
}
375
if (f) {
376
f.func || (f.func = r(f.url, f.line));
377
var E = a(f.url, f.line),
378
_ = E ? E[Math.floor(E.length / 2)] : null;
379
E && _.replace(/^\s*/, "") === t[v + 1].replace(/^\s*/, "") ? f.context = E : f.context = [t[v + 1]], u.push(f)
380
}
381
}
382
return u.length ? {
383
mode: "multiline",
384
name: e.name,
385
message: t[0],
386
stack: u
387
} : null
388
}(t), s) return s
389
} catch (t) {
390
e
391
}
392
try {
393
if (s = v(t, o + 1)) return s
394
} catch (t) {
395
e
396
}
397
return {
398
name: t.name,
399
message: t.message,
400
mode: "failed"
401
}
402
}
403
return f.augmentStackTraceWithInitialElement = g, f.computeStackTraceFromStackProp = m, f.guessFunctionName = r, f.gatherContext = a, f.ofCaller = function(e) {
404
e = 1 + (null == e ? 0 : +e);
405
try {
406
throw new Error
407
} catch (t) {
408
return f(t, e + 1)
409
}
410
}, f.getSource = n, f
411
}(), s.extendToAsynchronousCallbacks = function() {
412
var e = function(e) {
413
var t = i[e];
414
i[e] = function() {
415
var e = A.call(arguments),
416
i = e[0];
417
return "function" == typeof i && (e[0] = s.wrap(i)), t.apply ? t.apply(this, e) : t(e[0], e[1])
418
}
419
};
420
e("setTimeout"), e("setInterval")
421
}, s.remoteFetching || (s.remoteFetching = !0), s.collectWindowErrors || (s.collectWindowErrors = !0), (!s.linesOfContext || s.linesOfContext < 1) && (s.linesOfContext = 11), r = [], void 0 === (a = "function" == typeof(n = s) ? n.apply(t, r) : n) || (e.exports = a)
422
}
423
424
function p(e, t) {
425
return Object.prototype.hasOwnProperty.call(e, t)
426
}
427
428
function u(e) {
429
return void 0 === e
430
}
431
}("undefined" != typeof window ? window : i.g)
432
}
433
},
434
t = {};
435
436
function i(n) {
437
if (t[n]) return t[n].exports;
438
var r = t[n] = {
439
exports: {}
440
};
441
return e[n](r, r.exports, i), r.exports
442
}
443
i.n = e => {
444
var t = e && e.__esModule ? () => e.default : () => e;
445
return i.d(t, {
446
a: t
447
}), t
448
}, i.d = (e, t) => {
449
for (var n in t) i.o(t, n) && !i.o(e, n) && Object.defineProperty(e, n, {
450
enumerable: !0,
451
get: t[n]
452
})
453
}, i.g = function() {
454
if ("object" == typeof globalThis) return globalThis;
455
try {
456
return this || new Function("return this")()
457
} catch (e) {
458
if ("object" == typeof window) return window
459
}
460
}(), i.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), (() => {
461
"use strict";
462
var e = i(564),
463
t = i.n(e);
464
const n = {
465
ready: "pokiAppReady",
466
adblocked: "pokiAppAdblocked",
467
ads: {
468
completed: "pokiAdsCompleted",
469
error: "pokiAdsError",
470
impression: "pokiAdsImpression",
471
durationChange: "pokiAdsDurationChange",
472
limit: "pokiAdsLimit",
473
ready: "pokiAdsReady",
474
requested: "pokiAdsRequested",
475
prebidRequested: "pokiAdsPrebidRequested",
476
skipped: "pokiAdsSkipped",
477
started: "pokiAdsStarted",
478
stopped: "pokiAdsStopped",
479
busy: "pokiAdsBusy",
480
position: {
481
preroll: "PP",
482
midroll: "PM",
483
rewarded: "PR",
484
display: "DP"
485
},
486
video: {
487
clicked: "pokiVideoAdsClicked",
488
firstQuartile: "pokiVideoAdsFirstQuartile",
489
midPoint: "pokiVideoAdsMidPoint",
490
thirdQuartile: "pokiVideoAdsThirdQuartile",
491
error: "pokiVideoAdsError",
492
loaderError: "pokiVideoAdsLoaderError",
493
paused: "pokiVideoAdsPauseTriggered",
494
resumed: "pokiVideoAdsResumedTriggered",
495
progress: "pokiVideoAdsProgress",
496
buffering: "pokiVideoAdsBuffering"
497
}
498
},
499
info: {
500
messages: {
501
timeLimit: "The ad-request was not processed, because of a time constraint",
502
prerollLimit: "The ad-request was cancelled, because we're not allowed to show a preroll"
503
}
504
},
505
message: {
506
event: "pokiMessageEvent",
507
sdkDetails: "pokiMessageSdkDetails",
508
toggleProgrammaticAds: "pokiMessageToggleProgrammaticAds"
509
},
510
tracking: {
511
custom: "pokiTrackingCustom",
512
togglePlayerAdvertisingConsent: "pokiTrackingTogglePlayerAdvertisingConsent",
513
debugTrueInProduction: "pokiMessageDebugTrueProduction",
514
screen: {
515
gameplayStart: "pokiTrackingScreenGameplayStart",
516
gameplayStop: "pokiTrackingScreenGameplayStop",
517
gameLoadingStarted: "pokiTrackingScreenGameLoadingStarted",
518
gameLoadingProgress: "pokiTrackingScreenGameLoadingProgress",
519
gameLoadingFinished: "pokiTrackingScreenGameLoadingFinished",
520
commercialBreak: "pokiTrackingScreenCommercialBreak",
521
rewardedBreak: "pokiTrackingScreenRewardedBreak",
522
happyTime: "pokiTrackingScreenHappyTime",
523
firstRound: "pokiTrackingScreenFirstRound",
524
roundStart: "pokiTrackingScreenRoundStart",
525
roundEnd: "pokiTrackingScreenRoundEnd",
526
gameInteractive: "pokiTrackingScreenGameInteractive",
527
displayAd: "pokiTrackingScreenDisplayAdRequest",
528
destroyAd: "pokiTrackingScreenDisplayAdDestroy"
529
},
530
sdk: {
531
status: {
532
initialized: "pokiTrackingSdkStatusInitialized",
533
failed: "pokiTrackingSdkStatusFailed"
534
}
535
},
536
ads: {
537
status: {
538
busy: "pokiTrackingAdsStatusBusy",
539
completed: "pokiTrackingAdsStatusCompleted",
540
error: "pokiTrackingAdsStatusError",
541
displayError: "pokiTrackingAdsStatusDisplayError",
542
impression: "pokiTrackingAdsStatusImpression",
543
limit: "pokiTrackingAdsStatusLimit",
544
ready: "pokiTrackingAdsStatusReady",
545
requested: "pokiTrackingAdsStatusRequested",
546
prebidRequested: "pokiTrackingAdsStatusPrebidRequested",
547
skipped: "pokiTrackingAdsStatusSkipped",
548
started: "pokiTrackingAdsStatusStarted",
549
buffering: "pokiTrackingAdsStatusBuffering"
550
},
551
video: {
552
clicked: "pokiTrackingAdsVideoClicked",
553
error: "pokiTrackingAdsVideoError",
554
loaderError: "pokiTrackingAdsVideoLoaderError",
555
progress: "pokiTrackingAdsVideoProgress",
556
paused: "pokiTrackingAdsVideoPaused",
557
resumed: "pokiTrackingAdsVideoResumed"
558
},
559
display: {
560
requested: "pokiTrackingScreenDisplayAdRequested",
561
impression: "pokiTrackingScreenDisplayAdImpression",
562
viewable: "pokiTrackingScreenDisplayAdViewable"
563
}
564
}
565
}
566
};
567
const r = function() {
568
function e() {}
569
return e.debug = !1, e.log = !1, e
570
}();
571
var a = function() {
572
return a = Object.assign || function(e) {
573
for (var t, i = 1, n = arguments.length; i < n; i++)
574
for (var r in t = arguments[i]) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
575
return e
576
}, a.apply(this, arguments)
577
};
578
const o = function() {
579
function e() {}
580
return e.clearEventListeners = function() {
581
this.listeners = {}
582
}, e.removeEventListener = function(e, t) {
583
if (Object.prototype.hasOwnProperty.call(this.listeners, e)) {
584
var i = this.listeners[e].indexOf(t); - 1 !== i && this.listeners[e].splice(i, 1)
585
}
586
}, e.addEventListener = function(e, t, i) {
587
var n = this;
588
if (void 0 === i && (i = !1), i = !!i, Object.prototype.hasOwnProperty.call(this.listeners, e) || (this.listeners[e] = []), i) {
589
var r = function(i) {
590
n.removeEventListener.bind(n)(e, r), t(i)
591
};
592
this.listeners[e].push(r)
593
} else this.listeners[e].push(t)
594
}, e.dispatchEvent = function(e, t) {
595
void 0 === t && (t = {}), !r.debug || window.process && window.process.env && "test" === window.process.env.NODE_ENV || console.info(e, t);
596
for (var i = Object.keys(this.listeners), n = 0; n < i.length; n++) {
597
var o = i[n];
598
if (e === o)
599
for (var s = this.listeners[o], d = 0; d < s.length; d++) s[d](a(a({}, this.dataAnnotations), t))
600
}
601
}, e.setDataAnnotations = function(e) {
602
this.dataAnnotations = a(a({}, this.dataAnnotations), e)
603
}, e.getDataAnnotations = function() {
604
return this.dataAnnotations
605
}, e.clearAnnotations = function() {
606
this.dataAnnotations = {}
607
}, e.listeners = {}, e.dataAnnotations = {}, e
608
}();
609
const s = function(e, t) {
610
var i = !1;
611
return Object.keys(t).forEach((function(n) {
612
t[n] === e && (i = !0)
613
})), i
614
};
615
616
function d() {
617
var e, t = (null === (e = null === window || void 0 === window ? void 0 : window.location) || void 0 === e ? void 0 : e.hostname) || "";
618
return "game-cdn.poki.com" === t || t.endsWith(".poki-gdn.com"), !1
619
}
620
var A = {
621
adTagUrl: "",
622
adTiming: {
623
preroll: !1,
624
timeBetweenAds: 12e4,
625
timePerTry: 7e3,
626
startAdsAfter: 12e4
627
},
628
waterfallRetries: d() ? 1 : 2
629
},
630
c = {
631
AE: {
632
video: {
633
amazon: .7,
634
appnexus: .76
635
}
636
},
637
AL: {
638
video: {
639
amazon: .75
640
}
641
},
642
AT: {
643
video: {
644
appnexus: .6,
645
onetag: .81,
646
pubmatic: .82
647
}
648
},
649
AU: {
650
video: {
651
pubmatic: .43,
652
rubicon: .38
653
}
654
},
655
AZ: {
656
video: {
657
amazon: .72,
658
onetag: .84
659
}
660
},
661
BE: {
662
video: {
663
amazon: .83,
664
appnexus: .79
665
}
666
},
667
BG: {
668
video: {
669
appnexus: .72
670
}
671
},
672
BO: {
673
video: {
674
ix: .84
675
}
676
},
677
CA: {
678
video: {
679
amazon: .84,
680
pubmatic: .81
681
}
682
},
683
CL: {
684
video: {
685
amazon: .78
686
}
687
},
688
CO: {
689
video: {
690
amazon: .85
691
}
692
},
693
CZ: {
694
video: {
695
appnexus: .77
696
}
697
},
698
DE: {
699
video: {
700
appnexus: .21,
701
onetag: .81
702
}
703
},
704
DO: {
705
video: {
706
onetag: .84
707
}
708
},
709
DZ: {
710
video: {
711
amazon: .41
712
}
713
},
714
EG: {
715
video: {
716
amazon: .15,
717
rubicon: .63
718
}
719
},
720
ES: {
721
video: {
722
appnexus: .66,
723
ix: .84,
724
onetag: .82,
725
openx: .84,
726
pubmatic: .79
727
}
728
},
729
FI: {
730
video: {
731
appnexus: .43
732
}
733
},
734
FR: {
735
video: {
736
appnexus: .26,
737
ix: .53,
738
onetag: .81
739
}
740
},
741
GB: {
742
video: {
743
districtm: .83,
744
onetag: .8
745
}
746
},
747
GT: {
748
video: {
749
amazon: .74
750
}
751
},
752
HU: {
753
video: {
754
amazon: .55,
755
appnexus: .65
756
}
757
},
758
IE: {
759
video: {
760
onetag: .66
761
}
762
},
763
IN: {
764
video: {
765
appnexus: .72
766
}
767
},
768
IT: {
769
video: {
770
appnexus: .46,
771
onetag: .46
772
}
773
},
774
JP: {
775
video: {
776
onetag: .84
777
}
778
},
779
KE: {
780
video: {
781
onetag: .84
782
}
783
},
784
KW: {
785
video: {
786
onetag: .83
787
}
788
},
789
KZ: {
790
video: {
791
onetag: .8
792
}
793
},
794
LU: {
795
video: {
796
onetag: .82
797
}
798
},
799
MA: {
800
video: {
801
amazon: .68
802
}
803
},
804
MD: {
805
video: {
806
onetag: .7
807
}
808
},
809
MX: {
810
video: {
811
amazon: .47,
812
pubmatic: .75
813
}
814
},
815
NL: {
816
video: {
817
ix: .39,
818
onetag: .81,
819
openx: .71,
820
richaudience: .72
821
}
822
},
823
NZ: {
824
video: {
825
amazon: .76,
826
openx: .83
827
}
828
},
829
OM: {
830
video: {
831
onetag: .84
832
}
833
},
834
PE: {
835
video: {
836
amazon: .82
837
}
838
},
839
PL: {
840
video: {
841
appnexus: .84,
842
districtm: .71,
843
onetag: .73
844
}
845
},
846
PR: {
847
video: {
848
amazon: .83
849
}
850
},
851
RU: {
852
video: {
853
amazon: .78,
854
onetag: .84
855
}
856
},
857
SA: {
858
video: {
859
amazon: .83,
860
appnexus: .74
861
}
862
},
863
SK: {
864
video: {
865
appnexus: .79
866
}
867
},
868
TN: {
869
video: {
870
amazon: .61
871
}
872
},
873
UA: {
874
video: {
875
onetag: .8
876
}
877
},
878
US: {
879
video: {
880
pubmatic: .01
881
}
882
},
883
VE: {
884
video: {
885
onetag: .8
886
}
887
},
888
VN: {
889
video: {
890
appnexus: .81
891
}
892
}
893
};
894
const l = A;
895
const p = function(e) {
896
return e instanceof Array ? e : [e]
897
};
898
const u = function() {
899
function e(e) {
900
void 0 === e && (e = {}), this.setTimings(e), this.timingIdx = {
901
timePerTry: 0
902
}, this.timers = {
903
timePerTry: void 0,
904
timeBetweenAds: void 0,
905
startAdsAfter: void 0
906
}, o.addEventListener(n.ads.requested, this.startTimeBetweenAdsTimer.bind(this)), o.addEventListener(n.ads.completed, this.startTimeBetweenAdsTimer.bind(this)), o.addEventListener(n.ads.stopped, this.startTimeBetweenAdsTimer.bind(this))
907
}
908
return e.prototype.setTimings = function(e) {
909
var t = l.adTiming,
910
i = e.preroll,
911
n = void 0 === i ? t.preroll : i,
912
r = e.timePerTry,
913
a = void 0 === r ? t.timePerTry : r,
914
o = e.timeBetweenAds,
915
s = void 0 === o ? t.timeBetweenAds : o,
916
d = e.startAdsAfter,
917
A = void 0 === d ? t.startAdsAfter : d;
918
this.timings = {
919
preroll: !1 !== n,
920
timePerTry: p(a),
921
timeBetweenAds: s,
922
startAdsAfter: A
923
}
924
}, e.prototype.startTimeBetweenAdsTimer = function() {
925
this.startTimer("timeBetweenAds")
926
}, e.prototype.startStartAdsAfterTimer = function() {
927
this.startTimer("startAdsAfter")
928
}, e.prototype.requestPossible = function() {
929
return !this.timers.timeBetweenAds && !this.timers.startAdsAfter
930
}, e.prototype.startWaterfallTimer = function(e) {
931
this.startTimer("timePerTry", e)
932
}, e.prototype.stopWaterfallTimer = function() {
933
this.stopTimer("timePerTry")
934
}, e.prototype.nextWaterfallTimer = function() {
935
this.nextTiming("timePerTry")
936
}, e.prototype.resetWaterfallTimerIdx = function() {
937
this.resetTimingIdx("timePerTry")
938
}, e.prototype.stopTimer = function(e) {
939
this.timers[e] && (clearTimeout(this.timers[e]), this.timers[e] = void 0)
940
}, e.prototype.startTimer = function(e, t) {
941
var i = this;
942
void 0 === t && (t = function() {}), this.getTiming(e) <= 0 ? t() : (this.timers[e] && clearTimeout(this.timers[e]), this.timers[e] = window.setTimeout((function() {
943
i.stopTimer(e), t()
944
}), this.getTiming(e)))
945
}, e.prototype.getTiming = function(e) {
946
var t = this.timings[e];
947
return t instanceof Array ? t[this.timingIdx[e]] : t
948
}, e.prototype.nextTiming = function(e) {
949
if (void 0 === this.timingIdx[e]) throw new Error("AdTimings Error: " + e + " does not have multiple timers");
950
this.timingIdx[e] = (this.timingIdx[e] + 1) % this.timings[e].length
951
}, e.prototype.resetTimingIdx = function(e) {
952
if (void 0 === this.timingIdx[e]) throw new Error("AdTimings Error: " + e + " does not have multiple timers");
953
this.timingIdx[e] = 0
954
}, e.prototype.prerollPossible = function() {
955
return this.timings.preroll
956
}, e
957
}();
958
var h = document.location.hostname;
959
960
function m(e) {
961
var t = new RegExp(e + "=([^;]+)(?:;|$)").exec(document.cookie);
962
return t ? t[1] : ""
963
}
964
965
function g(e, t) {
966
document.cookie = e + "=" + t + "; path=/; samesite=none; secure; max-age=15552000; domain=" + h
967
}
968
h.endsWith("poki-gdn.com") && (h = "poki-gdn.com");
969
var v = function(e, t, i, n) {
970
return new(i || (i = Promise))((function(r, a) {
971
function o(e) {
972
try {
973
d(n.next(e))
974
} catch (e) {
975
a(e)
976
}
977
}
978
979
function s(e) {
980
try {
981
d(n.throw(e))
982
} catch (e) {
983
a(e)
984
}
985
}
986
987
function d(e) {
988
var t;
989
e.done ? r(e.value) : (t = e.value, t instanceof i ? t : new i((function(e) {
990
e(t)
991
}))).then(o, s)
992
}
993
d((n = n.apply(e, t || [])).next())
994
}))
995
},
996
f = function(e, t) {
997
var i, n, r, a, o = {
998
label: 0,
999
sent: function() {
1000
if (1 & r[0]) throw r[1];
1001
return r[1]
1002
},
1003
trys: [],
1004
ops: []
1005
};
1006
return a = {
1007
next: s(0),
1008
throw: s(1),
1009
return: s(2)
1010
}, "function" == typeof Symbol && (a[Symbol.iterator] = function() {
1011
return this
1012
}), a;
1013
1014
function s(a) {
1015
return function(s) {
1016
return function(a) {
1017
if (i) throw new TypeError("Generator is already executing.");
1018
for (; o;) try {
1019
if (i = 1, n && (r = 2 & a[0] ? n.return : a[0] ? n.throw || ((r = n.return) && r.call(n), 0) : n.next) && !(r = r.call(n, a[1])).done) return r;
1020
switch (n = 0, r && (a = [2 & a[0], r.value]), a[0]) {
1021
case 0:
1022
case 1:
1023
r = a;
1024
break;
1025
case 4:
1026
return o.label++, {
1027
value: a[1],
1028
done: !1
1029
};
1030
case 5:
1031
o.label++, n = a[1], a = [0];
1032
continue;
1033
case 7:
1034
a = o.ops.pop(), o.trys.pop();
1035
continue;
1036
default:
1037
if (!(r = o.trys, (r = r.length > 0 && r[r.length - 1]) || 6 !== a[0] && 2 !== a[0])) {
1038
o = 0;
1039
continue
1040
}
1041
if (3 === a[0] && (!r || a[1] > r[0] && a[1] < r[3])) {
1042
o.label = a[1];
1043
break
1044
}
1045
if (6 === a[0] && o.label < r[1]) {
1046
o.label = r[1], r = a;
1047
break
1048
}
1049
if (r && o.label < r[2]) {
1050
o.label = r[2], o.ops.push(a);
1051
break
1052
}
1053
r[2] && o.ops.pop(), o.trys.pop();
1054
continue
1055
}
1056
a = t.call(e, o)
1057
} catch (e) {
1058
a = [6, e], n = 0
1059
} finally {
1060
i = r = 0
1061
}
1062
if (5 & a[0]) throw a[1];
1063
return {
1064
value: a[0] ? a[1] : void 0,
1065
done: !0
1066
}
1067
}([a, s])
1068
}
1069
}
1070
},
1071
b = function(e, t, i) {
1072
if (i || 2 === arguments.length)
1073
for (var n, r = 0, a = t.length; r < a; r++) !n && r in t || (n || (n = Array.prototype.slice.call(t, 0, r)), n[r] = t[r]);
1074
return e.concat(n || Array.prototype.slice.call(t))
1075
},
1076
y = "poki_gcuid",
1077
k = m(y);
1078
const w = function() {
1079
function e() {}
1080
return e.collectAndLog = function() {
1081
return v(this, void 0, void 0, (function() {
1082
var e, t, i, n, r;
1083
return f(this, (function(a) {
1084
switch (a.label) {
1085
case 0:
1086
return a.trys.push([0, 5, , 6]), [4, window.cookieStore.getAll()];
1087
case 1:
1088
return e = a.sent(), window.indexedDB.databases ? [4, window.indexedDB.databases()] : [3, 3];
1089
case 2:
1090
return i = a.sent(), [3, 4];
1091
case 3:
1092
i = [], a.label = 4;
1093
case 4:
1094
return t = i, n = b(b(b([], e.map((function(e) {
1095
return {
1096
name: e.name,
1097
expire_seconds: Math.round((e.expires - Date.now()) / 1e3),
1098
type: "cookie"
1099
}
1100
})), !0), Object.keys(window.localStorage).map((function(e) {
1101
return {
1102
name: e,
1103
expire_seconds: 15552e3,
1104
type: "localStorage"
1105
}
1106
})), !0), t.map((function(e) {
1107
return {
1108
name: e.name,
1109
expire_seconds: 0,
1110
type: "idb"
1111
}
1112
})), !0), r = {
1113
cookies: n,
1114
p4d_game_id: tt.gameId,
1115
user_id: k
1116
}, window.fetch("https://t.poki.io/game-cookies", {
1117
method: "post",
1118
body: JSON.stringify(r)
1119
}).catch(), [3, 6];
1120
case 5:
1121
return a.sent(), [3, 6];
1122
case 6:
1123
return [2]
1124
}
1125
}))
1126
}))
1127
}, e.trackSavegames = function() {
1128
window.cookieStore && window.cookieStore.getAll && tt.gameId && (Math.random() > .01 || (k || (k = Math.random().toString(36).substr(2, 9), g(y, k)), e.collectAndLog(), setInterval(e.collectAndLog, 12e4)))
1129
}, e
1130
}(),
1131
I = function() {
1132
return window.location.href
1133
},
1134
S = function() {
1135
return "undefined" != typeof navigator && /(?:phone|windows\s+phone|ipod|blackberry|(?:android|bb\d+|meego|silk|googlebot) .+? mobile|palm|windows\s+ce|opera\smini|avantgo|mobilesafari|docomo)/i.test(navigator.userAgent)
1136
},
1137
E = function() {
1138
return "undefined" != typeof navigator && /(?:ipad|playbook|(?:android|bb\d+|meego|silk)(?! .+? mobile))/i.test(navigator.userAgent)
1139
},
1140
_ = function(e, t) {
1141
var i;
1142
if ("undefined" == typeof window && !t) return "";
1143
e = e.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
1144
var n = new RegExp("(?:[\\?&]|^)" + e + "=([^&#]*)").exec(t || (null === (i = null === window || void 0 === window ? void 0 : window.location) || void 0 === i ? void 0 : i.search) || "");
1145
return null === n ? "" : decodeURIComponent(n[1].replace(/\+/g, " "))
1146
},
1147
x = function() {
1148
return "undefined" != typeof navigator && /MSIE \\d|Trident.*rv:/i.test(navigator.userAgent)
1149
};
1150
var C = {
1151
1: "eNjDw1AVTr",
1152
2: "HkuQJaWnBa",
1153
3: "AfRKClvdYk",
1154
4: "Db7uYbsnlW",
1155
5: "UprdYKe74r",
1156
6: "tBCJC9E6Y4",
1157
7: "AfRKClvdYk",
1158
8: "tJ44vpLpuM",
1159
9: "mF5ASaga4A",
1160
10: "rKV8rMwiwk",
1161
11: "SvK8BH5qS5",
1162
12: "SpfIMxnWTS",
1163
13: "ysxIcmt3tW",
1164
14: "gLmtGS4aUq",
1165
15: "RU6ebIFLw9",
1166
16: "r9G4tVMYw7",
1167
17: "SgcDa5B8s1",
1168
18: "AfRKClvdYk",
1169
19: "DNZX8XdJXV",
1170
20: "39o4YUyZTX",
1171
21: "5sb2HFpz5a",
1172
22: "pgXzCJZipE",
1173
23: "Oani8EAGI9",
1174
24: "IzCeh7d7vW",
1175
25: "I5vRNtjoMr",
1176
26: "KpySvG7luq",
1177
27: "dK42J4rI14",
1178
28: "HuYorw3fRg",
1179
29: "mf84cGYc1h",
1180
30: "9ALgxEyGXU",
1181
31: "lBzSdVGY8F",
1182
32: "hKYgk9Wb8q",
1183
33: "xPBr8E54eE",
1184
34: "ZvIK2WKC7G",
1185
35: "7kiYi3zlIX",
1186
36: "VpygYMTDgm",
1187
37: "mis9Mt4np4",
1188
38: "AfRKClvdYk",
1189
41: "Fqmjp9Hit3",
1190
42: "lS2XGg058L",
1191
43: "AfRKClvdYk",
1192
46: "AfRKClvdYk",
1193
47: "21OybbiIdc",
1194
48: "AfRKClvdYk",
1195
49: "CMVoMvvEmu",
1196
50: "IoQrhRb3wU",
1197
52: "AfRKClvdYk",
1198
53: "AfRKClvdYk"
1199
};
1200
const T = function(e) {
1201
return 15 === e ? "MP_gIE1VDieUi" : C[e] || ""
1202
};
1203
var B = ["AU", "CA", "IE", "NZ", "US", "GB"],
1204
P = ["AT", "BE", "DK", "FI", "FR", "DE", "JA", "NO", "NL", "SA", "ES", "SE", "CH", "AE", "IT"],
1205
D = ["BR", "CL", "CZ", "HU", "PL", "PT", "RU", "SK", "TH"],
1206
M = ["AR", "BG", "CO", "EC", "GR", "IN", "MX", "PE", "PH", "RO", "TR", "UY"];
1207
1208
function R(e) {
1209
return B.includes(e) ? .13 : P.includes(e) ? .07 : D.includes(e) ? .04 : .02
1210
}
1211
1212
function L(e) {
1213
return "US" === e ? 1.5 : B.includes(e) ? .5 : P.includes(e) ? .15 : D.includes(e) ? .08 : M.includes(e) ? .03 : .02
1214
}
1215
const z = function(e) {
1216
r.debug ? console.log(e) : fetch("https://t.poki.io/adserver", {
1217
method: "POST",
1218
mode: "no-cors",
1219
body: JSON.stringify(e)
1220
})
1221
};
1222
var O = ["https://a.poki.com/houseads/duo_survival_3.xml", "https://a.poki.com/houseads/like_a_king.xml", "https://a.poki.com/houseads/merge_cyber_racers.xml", "https://a.poki.com/houseads/subway_surfers.xml", "https://a.poki.com/houseads/tower_crush_compressed.xml"];
1223
1224
function G() {
1225
return (e = O)[Math.floor(Math.random() * e.length)];
1226
var e
1227
}
1228
var j = {
1229
v_k0treo: 2.5,
1230
v_qr1wxs: 7.5,
1231
v_9diccg: 19,
1232
v_13q0xkw: .25,
1233
v_dn33ls: 1,
1234
v_z07u2o: 1.5,
1235
v_1400iyo: 2.25,
1236
v_9w8kxs: 3,
1237
v_ufej9c: 3.5,
1238
v_10960ao: 4.25,
1239
v_1ksbym8: 4.75,
1240
v_1ag9340: 5.25,
1241
v_1tbhh4w: 5.75,
1242
v_jjcgzk: 6.5,
1243
v_brnu9s: 7,
1244
v_1wscef4: 7.75,
1245
v_q22xhc: 8.5,
1246
v_f8irk0: 9,
1247
v_1rik45c: 9.75,
1248
v_lxhyww: 10.5,
1249
v_a9z0u8: 11,
1250
v_1yhiww0: 11.75,
1251
v_10mwg74: 12.25,
1252
v_1ji4u80: 12.75,
1253
v_wm2c5c: 13.5,
1254
v_2na6tc: 14,
1255
v_1myzri8: 14.75,
1256
v_3pzm68: 6,
1257
v_16kerr4: 6.25,
1258
v_1mdrmkg: 6.75,
1259
v_1ga0k5c: 7.25,
1260
v_5iwz5s: 8,
1261
v_12tk934: 8.25,
1262
v_1hsybr4: 8.75,
1263
v_1cj61hc: 9.25,
1264
v_y3r5kw: 9.5,
1265
v_94ow0: 10,
1266
v_15woqgw: 10.25,
1267
v_1orx4hs: 10.75,
1268
v_1d4e6f4: 11.25,
1269
v_t57ev4: 11.5,
1270
v_783hmo: 12,
1271
v_m7hkao: 12.5,
1272
v_hmo9hc: 13,
1273
v_19djnr4: 13.25,
1274
v_1twpm2o: 13.75,
1275
v_17zlou8: 14.25,
1276
v_ign1mo: 14.5,
1277
v_ccvz7k: 15,
1278
v_1f7b4sg: 15.25,
1279
v_snq4g0: 15.5,
1280
v_5wnf28: 16,
1281
v_137aozk: 16.25,
1282
v_1j0njsw: 16.75,
1283
v_1b8yx34: 17.25,
1284
v_yhhlhc: 17.5,
1285
v_25swe8: 18,
1286
v_15081z4: 18.25,
1287
v_1pje0ao: 18.75,
1288
v_1eptudc: 19.25,
1289
v_1xl28e8: 19.75,
1290
v_gfliio: 21,
1291
v_3y3sao: 22,
1292
v_ixhuyo: 22.5,
1293
v_ro52io: 23.5,
1294
v_qa73ls: 24.5,
1295
v_emo5j4: 25,
1296
v_yq5fk: 26,
1297
v_aobxts: 27,
1298
v_6shmgw: 28,
1299
v_natgqo: 28.5,
1300
v_x0f94w: 29.5,
1301
v_d2hfr4: 31,
1302
v_dch14w: 33,
1303
v_1jyadc: 34,
1304
v_8p5tz4: 36,
1305
v_fwv9xc: 37,
1306
v_c60r9c: 39,
1307
v_58awow: 40,
1308
v_bbcow: 42,
1309
v_a0x534: 43,
1310
v_hdmdq8: 45,
1311
v_2e8b28: 46,
1312
v_5nljb4: 48,
1313
v_1wr0n4: 50,
1314
v_pam1og: .5,
1315
v_1ipf08w: .75,
1316
v_1axqdj4: 1.25,
1317
v_1qr38cg: 1.75,
1318
v_15ldds: 2,
1319
v_1q248w0: 2.75,
1320
v_1eelatc: 3.25,
1321
v_1x9tou8: 3.75,
1322
v_8iam0w: 4,
1323
v_nhooow: 4.5,
1324
v_fq01z4: 5,
1325
v_w0u77k: 5.5,
1326
v_1vi5a0w: 15.75,
1327
v_orvt34: 16.5,
1328
v_dybn5s: 17,
1329
v_1q8czr4: 17.75,
1330
v_l11af4: 18.5,
1331
v_uqn2tc: 19.5,
1332
v_7zkdfk: 20,
1333
v_o7a58g: 20.5,
1334
v_vezl6o: 21.5,
1335
v_b5t88w: 23,
1336
v_4x2d4w: 24,
1337
v_xhwjk0: 25.5,
1338
v_lhw3r4: 26.5,
1339
v_tjkbuo: 27.5,
1340
v_h72ebk: 29,
1341
v_31n3sw: 30,
1342
v_64rl6o: 32,
1343
v_9lmigw: 35,
1344
v_3fdjpc: 38,
1345
v_fapfcw: 41,
1346
v_7o0lc0: 44,
1347
v_clbdvk: 47,
1348
v_ee8qv4: 49
1349
};
1350
var U = function() {
1351
return U = Object.assign || function(e) {
1352
for (var t, i = 1, n = arguments.length; i < n; i++)
1353
for (var r in t = arguments[i]) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
1354
return e
1355
}, U.apply(this, arguments)
1356
},
1357
N = function(e, t, i) {
1358
if (i || 2 === arguments.length)
1359
for (var n, r = 0, a = t.length; r < a; r++) !n && r in t || (n || (n = Array.prototype.slice.call(t, 0, r)), n[r] = t[r]);
1360
return e.concat(n || Array.prototype.slice.call(t))
1361
},
1362
Q = parseInt(_("site_id"), 10) || 0,
1363
F = "desktop";
1364
S() && (F = "mobile"), E() && (F = "tablet");
1365
var X = "rewarded",
1366
Z = "video",
1367
K = {
1368
"728x90": "/21682198607/" + F + "_ingame_728x90/" + Q + "_" + F + "_ingame_728x90",
1369
"300x250": "/21682198607/" + F + "_ingame_300x250/" + Q + "_" + F + "_ingame_300x250",
1370
"970x250": "/21682198607/" + F + "_ingame_970x250/" + Q + "_" + F + "_ingame_970x250",
1371
"160x600": "/21682198607/" + F + "_ingame_160x600/" + Q + "_" + F + "_ingame_160x600",
1372
"320x50": "/21682198607/" + F + "_ingame_320x50/" + Q + "_" + F + "_ingame_320x50",
1373
"728x90_external": "/21682198607/external_" + F + "_display_ingame/external_" + F + "_ingame_728x90",
1374
"300x250_external": "/21682198607/external_" + F + "_display_ingame/external_" + F + "_ingame_300x250",
1375
"970x250_external": "/21682198607/external_" + F + "_display_ingame/external_" + F + "_ingame_970x250",
1376
"160x600_external": "/21682198607/external_" + F + "_display_ingame/external_" + F + "_ingame_160x600",
1377
"320x50_external": "/21682198607/external_" + F + "_display_ingame/external_" + F + "_ingame_320x50"
1378
},
1379
H = parseInt(_("site_id"), 10) || 0,
1380
W = function(e) {
1381
var t = x() || S() || E() ? ["video/mp4", "application/javascript"] : ["video/mp4", "video/webm", "video/ogg", "application/javascript"],
1382
i = U(U({
1383
mimes: t,
1384
minduration: 0,
1385
maxduration: 15,
1386
protocols: [2, 3, 5, 6, 7, 8],
1387
w: 640,
1388
h: 480,
1389
placement: 1,
1390
linearity: 1
1391
}, e ? {} : {
1392
skip: 1,
1393
skipafter: 5
1394
}), {
1395
boxingallowed: 1,
1396
pos: 1,
1397
api: [2]
1398
});
1399
return {
1400
bids: [{
1401
bidder: "appnexus",
1402
params: {
1403
placementId: 13184250,
1404
supplyType: "web"
1405
}
1406
}, {
1407
bidder: "openx",
1408
params: {
1409
delDomain: "poki-d.openx.net",
1410
unit: "540105196"
1411
}
1412
}, {
1413
bidder: "spotx",
1414
params: {
1415
channel_id: "265590",
1416
ad_unit: "instream",
1417
secure: !0,
1418
hide_skin: !0
1419
}
1420
}, {
1421
bidder: "ix",
1422
params: {
1423
siteId: "436284",
1424
video: U({}, i)
1425
}
1426
}, {
1427
bidder: "richaudience",
1428
params: {
1429
pid: T(H),
1430
supplyType: "site"
1431
}
1432
}, {
1433
bidder: "onetag",
1434
params: {
1435
pubId: "6da09f566a9dc06"
1436
}
1437
}, {
1438
bidder: "onetag",
1439
params: {
1440
pubId: "6da09f566a9dc06",
1441
ext: {
1442
override_maxduration: 3600,
1443
enforce_skip: !0
1444
}
1445
}
1446
}, {
1447
bidder: "rubicon",
1448
params: {
1449
accountId: "18608",
1450
siteId: "266914",
1451
zoneId: "1322034",
1452
position: "atf",
1453
video: {
1454
size_id: 204
1455
}
1456
}
1457
}, {
1458
bidder: "pubmatic",
1459
params: {
1460
publisherId: "156838",
1461
adSlot: "3607869@640x360"
1462
}
1463
}, {
1464
bidder: "districtm",
1465
params: {
1466
placementId: 12906789
1467
}
1468
}],
1469
mediaTypes: {
1470
video: U({
1471
context: "instream",
1472
playerSize: [640, 480]
1473
}, i)
1474
}
1475
}
1476
},
1477
V = W(!0),
1478
q = W(!1),
1479
J = [{
1480
code: Z,
1481
mediaTypes: q.mediaTypes,
1482
bids: N([], q.bids, !0)
1483
}, {
1484
code: X,
1485
mediaTypes: V.mediaTypes,
1486
bids: N([], V.bids, !0)
1487
}, {
1488
code: K["728x90"],
1489
mediaTypes: {
1490
banner: {
1491
sizes: [
1492
[728, 90]
1493
]
1494
}
1495
},
1496
bids: [{
1497
bidder: "districtm",
1498
params: {
1499
placementId: "12906789"
1500
}
1501
}, {
1502
bidder: "appnexus",
1503
params: {
1504
placementId: "12940427"
1505
}
1506
}, {
1507
bidder: "openx",
1508
params: {
1509
unit: "539859872",
1510
delDomain: "poki-d.openx.net"
1511
}
1512
}, {
1513
bidder: "ix",
1514
params: {
1515
siteId: "268177",
1516
size: [728, 90]
1517
}
1518
}, {
1519
bidder: "pubmatic",
1520
params: {
1521
publisherId: "156838",
1522
adSlot: "1374895@728x90"
1523
}
1524
}, {
1525
bidder: "emx_digital",
1526
params: {
1527
tagid: "80117"
1528
}
1529
}, {
1530
bidder: "conversant",
1531
params: {
1532
site_id: "117477",
1533
secure: 1,
1534
position: 1
1535
}
1536
}, {
1537
bidder: "rubicon",
1538
params: {
1539
accountId: "18608",
1540
siteId: "204596",
1541
zoneId: "1008080"
1542
}
1543
}, {
1544
bidder: "onetag",
1545
params: {
1546
pubId: "6da09f566a9dc06"
1547
}
1548
}, {
1549
bidder: "richaudience",
1550
params: {
1551
pid: 15 === H ? "MP_gIE1VDieUi" : "1V6a2fgLvX",
1552
supplyType: "site"
1553
}
1554
}]
1555
}, {
1556
code: K["300x250"],
1557
mediaTypes: {
1558
banner: {
1559
sizes: [
1560
[300, 250]
1561
]
1562
}
1563
},
1564
bids: [{
1565
bidder: "districtm",
1566
params: {
1567
placementId: "12906789"
1568
}
1569
}, {
1570
bidder: "appnexus",
1571
params: {
1572
placementId: "12935252"
1573
}
1574
}, {
1575
bidder: "openx",
1576
params: {
1577
unit: "539859873",
1578
delDomain: "poki-d.openx.net"
1579
}
1580
}, {
1581
bidder: "ix",
1582
params: {
1583
siteId: "268178",
1584
size: [300, 250]
1585
}
1586
}, {
1587
bidder: "pubmatic",
1588
params: {
1589
publisherId: "156838",
1590
adSlot: "1374896@300x250"
1591
}
1592
}, {
1593
bidder: "emx_digital",
1594
params: {
1595
tagid: "80118"
1596
}
1597
}, {
1598
bidder: "conversant",
1599
params: {
1600
site_id: "117477",
1601
secure: 1,
1602
position: 1
1603
}
1604
}, {
1605
bidder: "rubicon",
1606
params: {
1607
accountId: "18608",
1608
siteId: "204596",
1609
zoneId: "1008080"
1610
}
1611
}, {
1612
bidder: "onetag",
1613
params: {
1614
pubId: "6da09f566a9dc06"
1615
}
1616
}, {
1617
bidder: "richaudience",
1618
params: {
1619
pid: 15 === H ? "MP_gIE1VDieUi" : "pKqNt5LyvF",
1620
supplyType: "site"
1621
}
1622
}]
1623
}, {
1624
code: K["970x250"],
1625
mediaTypes: {
1626
banner: {
1627
sizes: [
1628
[970, 250]
1629
]
1630
}
1631
},
1632
bids: [{
1633
bidder: "districtm",
1634
params: {
1635
placementId: "12906789"
1636
}
1637
}, {
1638
bidder: "appnexus",
1639
params: {
1640
placementId: "20595278"
1641
}
1642
}, {
1643
bidder: "openx",
1644
params: {
1645
unit: "543540497",
1646
delDomain: "poki-d.openx.net"
1647
}
1648
}, {
1649
bidder: "ix",
1650
params: {
1651
siteId: "597527",
1652
size: [970, 250]
1653
}
1654
}, {
1655
bidder: "pubmatic",
1656
params: {
1657
publisherId: "156838",
1658
adSlot: "3344351@970x250"
1659
}
1660
}, {
1661
bidder: "emx_digital",
1662
params: {
1663
tagid: "123738"
1664
}
1665
}, {
1666
bidder: "conversant",
1667
params: {
1668
site_id: "117477",
1669
secure: 1,
1670
position: 1
1671
}
1672
}, {
1673
bidder: "onetag",
1674
params: {
1675
pubId: "6da09f566a9dc06"
1676
}
1677
}, {
1678
bidder: "richaudience",
1679
params: {
1680
pid: 15 === H ? "MP_gIE1VDieUi" : "yYyae7vnIh",
1681
supplyType: "site"
1682
}
1683
}]
1684
}, {
1685
code: K["160x600"],
1686
mediaTypes: {
1687
banner: {
1688
sizes: [
1689
[160, 600]
1690
]
1691
}
1692
},
1693
bids: [{
1694
bidder: "districtm",
1695
params: {
1696
placementId: "12906789"
1697
}
1698
}, {
1699
bidder: "appnexus",
1700
params: {
1701
placementId: "12940425"
1702
}
1703
}, {
1704
bidder: "openx",
1705
params: {
1706
unit: "539859871",
1707
delDomain: "poki-d.openx.net"
1708
}
1709
}, {
1710
bidder: "ix",
1711
params: {
1712
siteId: "268175",
1713
size: [160, 600]
1714
}
1715
}, {
1716
bidder: "pubmatic",
1717
params: {
1718
publisherId: "156838",
1719
adSlot: "1374893@160x600"
1720
}
1721
}, {
1722
bidder: "emx_digital",
1723
params: {
1724
tagid: "80119"
1725
}
1726
}, {
1727
bidder: "conversant",
1728
params: {
1729
site_id: "117477",
1730
secure: 1,
1731
position: 1
1732
}
1733
}, {
1734
bidder: "rubicon",
1735
params: {
1736
accountId: "18608",
1737
siteId: "204596",
1738
zoneId: "1008080"
1739
}
1740
}, {
1741
bidder: "onetag",
1742
params: {
1743
pubId: "6da09f566a9dc06"
1744
}
1745
}, {
1746
bidder: "richaudience",
1747
params: {
1748
pid: 15 === H ? "MP_gIE1VDieUi" : "rAEnPimPzC",
1749
supplyType: "site"
1750
}
1751
}]
1752
}, {
1753
code: K["320x50"],
1754
mediaTypes: {
1755
banner: {
1756
sizes: [
1757
[320, 50]
1758
]
1759
}
1760
},
1761
bids: [{
1762
bidder: "districtm",
1763
params: {
1764
placementId: "12906789"
1765
}
1766
}, {
1767
bidder: "appnexus",
1768
params: {
1769
placementId: "20595224"
1770
}
1771
}, {
1772
bidder: "openx",
1773
params: {
1774
unit: "543540495",
1775
delDomain: "poki-d.openx.net"
1776
}
1777
}, {
1778
bidder: "ix",
1779
params: {
1780
siteId: "597529",
1781
size: [320, 50]
1782
}
1783
}, {
1784
bidder: "pubmatic",
1785
params: {
1786
publisherId: "156838",
1787
adSlot: "3344350@320x50"
1788
}
1789
}, {
1790
bidder: "conversant",
1791
params: {
1792
site_id: "117477",
1793
secure: 1,
1794
position: 1
1795
}
1796
}, {
1797
bidder: "rubicon",
1798
params: {
1799
accountId: "18608",
1800
siteId: "204596",
1801
zoneId: "1008080"
1802
}
1803
}, {
1804
bidder: "emx_digital",
1805
params: {
1806
tagid: "123737"
1807
}
1808
}, {
1809
bidder: "onetag",
1810
params: {
1811
pubId: "6da09f566a9dc06"
1812
}
1813
}, {
1814
bidder: "richaudience",
1815
params: {
1816
pid: 15 === H ? "MP_gIE1VDieUi" : "1DP5EtcOip",
1817
supplyType: "site"
1818
}
1819
}]
1820
}, {
1821
code: K["728x90_external"],
1822
mediaTypes: {
1823
banner: {
1824
sizes: [
1825
[728, 90]
1826
]
1827
}
1828
},
1829
bids: [{
1830
bidder: "districtm",
1831
params: {
1832
placementId: "12906789"
1833
}
1834
}, {
1835
bidder: "appnexus",
1836
params: {
1837
placementId: "20973406"
1838
}
1839
}, {
1840
bidder: "openx",
1841
params: {
1842
unit: "543885656",
1843
delDomain: "poki-d.openx.net"
1844
}
1845
}, {
1846
bidder: "ix",
1847
params: {
1848
siteId: "268177",
1849
placementId: "625562",
1850
size: [728, 90]
1851
}
1852
}, {
1853
bidder: "pubmatic",
1854
params: {
1855
publisherId: "156838",
1856
adSlot: "3457872"
1857
}
1858
}, {
1859
bidder: "emx_digital",
1860
params: {
1861
tagid: "132973"
1862
}
1863
}, {
1864
bidder: "conversant",
1865
params: {
1866
site_id: "117477",
1867
tag_id: "96373699",
1868
secure: 1,
1869
position: 1
1870
}
1871
}, {
1872
bidder: "rubicon",
1873
params: {
1874
accountId: "18608",
1875
siteId: "362566",
1876
zoneId: "1962680-2"
1877
}
1878
}, {
1879
bidder: "onetag",
1880
params: {
1881
pubId: "6da09f566a9dc06"
1882
}
1883
}, {
1884
bidder: "richaudience",
1885
params: {
1886
pid: 15 === H ? "MP_gIE1VDieUi" : "1V6a2fgLvX",
1887
supplyType: "site"
1888
}
1889
}]
1890
}, {
1891
code: K["300x250_external"],
1892
mediaTypes: {
1893
banner: {
1894
sizes: [
1895
[300, 250]
1896
]
1897
}
1898
},
1899
bids: [{
1900
bidder: "districtm",
1901
params: {
1902
placementId: "12906789"
1903
}
1904
}, {
1905
bidder: "appnexus",
1906
params: {
1907
placementId: "20973408"
1908
}
1909
}, {
1910
bidder: "openx",
1911
params: {
1912
unit: "543885657",
1913
delDomain: "poki-d.openx.net"
1914
}
1915
}, {
1916
bidder: "ix",
1917
params: {
1918
siteId: "625564",
1919
size: [300, 250]
1920
}
1921
}, {
1922
bidder: "pubmatic",
1923
params: {
1924
publisherId: "156838",
1925
adSlot: "3457874"
1926
}
1927
}, {
1928
bidder: "emx_digital",
1929
params: {
1930
tagid: "132975"
1931
}
1932
}, {
1933
bidder: "conversant",
1934
params: {
1935
site_id: "117477",
1936
tag_id: "94f55c24",
1937
secure: 1,
1938
position: 1
1939
}
1940
}, {
1941
bidder: "rubicon",
1942
params: {
1943
accountId: "18608",
1944
siteId: "362566",
1945
zoneId: "1962680-15"
1946
}
1947
}, {
1948
bidder: "onetag",
1949
params: {
1950
pubId: "6da09f566a9dc06"
1951
}
1952
}, {
1953
bidder: "richaudience",
1954
params: {
1955
pid: 15 === H ? "MP_gIE1VDieUi" : "pKqNt5LyvF",
1956
supplyType: "site"
1957
}
1958
}]
1959
}, {
1960
code: K["970x250_external"],
1961
mediaTypes: {
1962
banner: {
1963
sizes: [
1964
[970, 250]
1965
]
1966
}
1967
},
1968
bids: [{
1969
bidder: "districtm",
1970
params: {
1971
placementId: "12906789"
1972
}
1973
}, {
1974
bidder: "appnexus",
1975
params: {
1976
placementId: "20973415"
1977
}
1978
}, {
1979
bidder: "openx",
1980
params: {
1981
unit: "543885650",
1982
delDomain: "poki-d.openx.net"
1983
}
1984
}, {
1985
bidder: "ix",
1986
params: {
1987
siteId: "625560",
1988
size: [970, 250]
1989
}
1990
}, {
1991
bidder: "pubmatic",
1992
params: {
1993
publisherId: "156838",
1994
adSlot: "3457879"
1995
}
1996
}, {
1997
bidder: "emx_digital",
1998
params: {
1999
tagid: "132979"
2000
}
2001
}, {
2002
bidder: "conversant",
2003
params: {
2004
site_id: "117477",
2005
tag_id: "62235ccb",
2006
secure: 1,
2007
position: 1
2008
}
2009
}, {
2010
bidder: "rubicon",
2011
params: {
2012
accountId: "18608",
2013
siteId: "362566",
2014
zoneId: "1962680-57"
2015
}
2016
}, {
2017
bidder: "onetag",
2018
params: {
2019
pubId: "6da09f566a9dc06"
2020
}
2021
}, {
2022
bidder: "richaudience",
2023
params: {
2024
pid: 15 === H ? "MP_gIE1VDieUi" : "yYyae7vnIh",
2025
supplyType: "site"
2026
}
2027
}]
2028
}, {
2029
code: K["160x600_external"],
2030
mediaTypes: {
2031
banner: {
2032
sizes: [
2033
[160, 600]
2034
]
2035
}
2036
},
2037
bids: [{
2038
bidder: "districtm",
2039
params: {
2040
placementId: "12906789"
2041
}
2042
}, {
2043
bidder: "appnexus",
2044
params: {
2045
placementId: "20973407"
2046
}
2047
}, {
2048
bidder: "openx",
2049
params: {
2050
unit: "543885653",
2051
delDomain: "poki-d.openx.net"
2052
}
2053
}, {
2054
bidder: "ix",
2055
params: {
2056
siteId: "625563",
2057
size: [160, 600]
2058
}
2059
}, {
2060
bidder: "pubmatic",
2061
params: {
2062
publisherId: "156838",
2063
adSlot: "3457877"
2064
}
2065
}, {
2066
bidder: "emx_digital",
2067
params: {
2068
tagid: "132974"
2069
}
2070
}, {
2071
bidder: "conversant",
2072
params: {
2073
site_id: "117477",
2074
tag_id: "9960183e",
2075
secure: 1,
2076
position: 1
2077
}
2078
}, {
2079
bidder: "rubicon",
2080
params: {
2081
accountId: "18608",
2082
siteId: "362566",
2083
zoneId: "1962680-9"
2084
}
2085
}, {
2086
bidder: "onetag",
2087
params: {
2088
pubId: "6da09f566a9dc06"
2089
}
2090
}, {
2091
bidder: "richaudience",
2092
params: {
2093
pid: 15 === H ? "MP_gIE1VDieUi" : "rAEnPimPzC",
2094
supplyType: "site"
2095
}
2096
}]
2097
}, {
2098
code: K["320x50_external"],
2099
mediaTypes: {
2100
banner: {
2101
sizes: [
2102
[320, 50]
2103
]
2104
}
2105
},
2106
bids: [{
2107
bidder: "districtm",
2108
params: {
2109
placementId: "12906789"
2110
}
2111
}, {
2112
bidder: "appnexus",
2113
params: {
2114
placementId: "20973413"
2115
}
2116
}, {
2117
bidder: "openx",
2118
params: {
2119
unit: "543885649",
2120
delDomain: "poki-d.openx.net"
2121
}
2122
}, {
2123
bidder: "ix",
2124
params: {
2125
siteId: "625559",
2126
size: [320, 50]
2127
}
2128
}, {
2129
bidder: "pubmatic",
2130
params: {
2131
publisherId: "156838",
2132
adSlot: "3457875"
2133
}
2134
}, {
2135
bidder: "conversant",
2136
params: {
2137
site_id: "117477",
2138
tag_id: "402db827",
2139
secure: 1,
2140
position: 1
2141
}
2142
}, {
2143
bidder: "rubicon",
2144
params: {
2145
accountId: "18608",
2146
siteId: "362566",
2147
zoneId: "1962680-43"
2148
}
2149
}, {
2150
bidder: "emx_digital",
2151
params: {
2152
tagid: "132978"
2153
}
2154
}, {
2155
bidder: "onetag",
2156
params: {
2157
pubId: "6da09f566a9dc06"
2158
}
2159
}, {
2160
bidder: "richaudience",
2161
params: {
2162
pid: 15 === H ? "MP_gIE1VDieUi" : "1DP5EtcOip",
2163
supplyType: "site"
2164
}
2165
}]
2166
}],
2167
Y = {
2168
debug: !1,
2169
enableSendAllBids: !0,
2170
usePrebidCache: !0,
2171
bidderTimeout: 1500,
2172
priceGranularity: {
2173
buckets: [{
2174
precision: 2,
2175
min: .01,
2176
max: 3,
2177
increment: .01
2178
}, {
2179
precision: 2,
2180
min: 3,
2181
max: 8,
2182
increment: .05
2183
}, {
2184
precision: 2,
2185
min: 8,
2186
max: 20,
2187
increment: .5
2188
}, {
2189
precision: 2,
2190
min: 20,
2191
max: 45,
2192
increment: 1
2193
}]
2194
},
2195
currency: {
2196
adServerCurrency: "EUR",
2197
defaultRates: {
2198
EUR: {
2199
EUR: 1,
2200
GBP: .86408,
2201
USD: 1.2212
2202
},
2203
GBP: {
2204
EUR: 1.157300249976854,
2205
GBP: 1,
2206
USD: 1.4132950652717342
2207
},
2208
USD: {
2209
EUR: .8188666885031116,
2210
GBP: .7075663282017687,
2211
USD: 1
2212
}
2213
}
2214
},
2215
cache: {
2216
url: "https://prebid.adnxs.com/pbc/v1/cache"
2217
},
2218
targetingControls: {
2219
allowTargetingKeys: ["BIDDER", "AD_ID", "PRICE_BUCKET", "SIZE", "DEAL", "SOURCE", "FORMAT", "UUID", "CACHE_ID", "CACHE_HOST", "ADOMAIN"],
2220
allowSendAllBidsTargetingKeys: ["BIDDER", "AD_ID", "PRICE_BUCKET", "SIZE", "DEAL", "SOURCE", "FORMAT", "UUID", "CACHE_ID", "CACHE_HOST", "ADOMAIN"]
2221
},
2222
userSync: {
2223
filterSettings: {
2224
all: {
2225
bidders: "*",
2226
filter: "include"
2227
}
2228
},
2229
syncsPerBidder: 1e3,
2230
syncDelay: 100,
2231
userIds: [{
2232
name: "pubCommonId",
2233
storage: {
2234
type: "cookie",
2235
name: "poki_pubcid",
2236
expires: 180
2237
}
2238
}]
2239
}
2240
},
2241
$ = function(e, t) {
2242
window.pbjs = window.pbjs || {}, window.pbjs.que = window.pbjs.que || [], window.pbjs.que.push((function() {
2243
window.pbjs.aliasBidder("appnexus", "districtm");
2244
var i = U(U({
2245
floors: {
2246
data: {
2247
currency: "EUR",
2248
schema: {
2249
fields: ["mediaType"]
2250
},
2251
values: {
2252
banner: R(t),
2253
video: L(t)
2254
}
2255
}
2256
}
2257
}, Y), e.config);
2258
window.pbjs.addAdUnits(function(e, t, i) {
2259
var n, r, a = t[i = i.toUpperCase()];
2260
if (!a) return e;
2261
for (var o = Math.random(), s = 0; s <= e.length; s++)
2262
for (var d = e[s], A = a[(null === (n = null == d ? void 0 : d.mediaTypes) || void 0 === n ? void 0 : n.video) ? "video" : "display"] || {}, c = (null === (r = null == d ? void 0 : d.bids) || void 0 === r ? void 0 : r.length) - 1; c >= 0; c--) {
2263
var l = d.bids[c];
2264
A[l.bidder] && o > A[l.bidder] && e[s].bids.splice(c, 1)
2265
}
2266
return e
2267
}(e.adUnits || J, c, t)), window.pbjs.setConfig(i), window.pbjs.bidderSettings = {
2268
districtm: {
2269
bidCpmAdjustment: function(e) {
2270
return .85 * e
2271
}
2272
}
2273
}
2274
}))
2275
},
2276
ee = !1,
2277
te = function(e, t, i) {
2278
(function(e, t) {
2279
var i, n, r = null === (n = null === (i = e[t = t.toUpperCase()]) || void 0 === i ? void 0 : i.video) || void 0 === n ? void 0 : n.amazon;
2280
return !!r && Math.random() > r
2281
})(c, t) || window.apstag && window.apstag.init(e.settings || U({
2282
pubID: "e32f1423-28bc-43ed-8ab0-5ae6b4449cf8",
2283
adServer: "",
2284
videoAdServer: "GAM"
2285
}, i ? {
2286
gdpr: {
2287
cmpTimeout: 1e4
2288
}
2289
} : {}), (function() {
2290
ee = !0, e.callback && e.callback()
2291
}))
2292
},
2293
ie = function() {
2294
! function() {
2295
if (!window.__tcfapi) {
2296
var e = window.top,
2297
t = {};
2298
window.__tcfapi = function(i, n, r, a) {
2299
var o = "" + Math.random(),
2300
s = {
2301
__tcfapiCall: {
2302
command: i,
2303
parameter: a,
2304
version: n,
2305
callId: o
2306
}
2307
};
2308
t[o] = r, e.postMessage(s, "*")
2309
}, window.addEventListener("message", (function(e) {
2310
var i = {};
2311
try {
2312
i = "string" == typeof e.data ? JSON.parse(e.data) : e.data
2313
} catch (e) {}
2314
var n = i.__tcfapiReturn;
2315
n && "function" == typeof t[n.callId] && (t[n.callId](n.returnValue, n.success), t[n.callId] = null)
2316
}), !1)
2317
}
2318
}(), window.pbjs.que.push((function() {
2319
window.pbjs.setConfig({
2320
consentManagement: {
2321
gdpr: {
2322
cmpApi: "iab",
2323
timeout: 8e3,
2324
defaultGdprScope: !0
2325
}
2326
}
2327
})
2328
}))
2329
},
2330
ne = function() {
2331
! function() {
2332
if (!window.__uspapi) {
2333
var e = window.top,
2334
t = {};
2335
window.__uspapi = function(i, n, r) {
2336
var a = "" + Math.random(),
2337
o = {
2338
__uspapiCall: {
2339
command: i,
2340
version: n,
2341
callId: a
2342
}
2343
};
2344
t[a] = r, e.postMessage(o, "*")
2345
}, window.addEventListener("message", (function(e) {
2346
var i = e && e.data && e.data.__uspapiReturn;
2347
i && i.callId && "function" == typeof t[i.callId] && (t[i.callId](i.returnValue, i.success), t[i.callId] = null)
2348
}), !1)
2349
}
2350
}(), window.pbjs.que.push((function() {
2351
window.pbjs.setConfig({
2352
consentManagement: {
2353
usp: {
2354
cmpApi: "iab",
2355
timeout: 8e3
2356
}
2357
}
2358
})
2359
}))
2360
};
2361
2362
function re(e, t, i, r, a) {
2363
var s = d(),
2364
A = s ? "nope" : t;
2365
if (window.pbjs && window.pbjs.que && window.pbjs.getConfig) {
2366
var c, l = I().split("?"),
2367
p = encodeURIComponent(l[0]),
2368
u = r ? X : Z,
2369
h = o.getDataAnnotations(),
2370
m = 1,
2371
g = function() {
2372
if (!(--m > 0)) try {
2373
o.dispatchEvent(n.ads.prebidRequested);
2374
var d = window.pbjs.adUnits.filter((function(e) {
2375
return e.code === u
2376
}))[0];
2377
if ("undefined" === d) return console.error("Video-ad-unit not found, did you give it the adunit.code='video' value?"), void e.requestAd(A);
2378
var l = window.pbjs.adServers.dfp.buildVideoUrl({
2379
adUnit: d,
2380
params: {
2381
iu: _("iu", t),
2382
sz: "640x360|640x480",
2383
output: "vast",
2384
cust_params: i,
2385
description_url: p
2386
}
2387
}),
2388
g = window.pbjs.getHighestCpmBids(u);
2389
window.pbjs.markWinningBidAsUsed({
2390
adUnitCode: u
2391
}), c && (l = l.replace("cust_params=", "cust_params=" + c + "%26"));
2392
var v = !1;
2393
if (s) {
2394
var f = void 0;
2395
if (g.length > 0 && (f = g[0]), c) {
2396
var b = function(e) {
2397
var t = decodeURIComponent(e),
2398
i = _("amznbid", t);
2399
if (!i) return null;
2400
var n = j[i];
2401
return n ? {
2402
bid: n,
2403
vast: "https://aax.amazon-adsystem.com/e/dtb/vast?b=" + _("amzniid", t) + "&rnd=" + Math.round(1e10 * Math.random()) + "&pp=" + i
2404
} : null
2405
}(c);
2406
b && (!f || !f.videoCacheKey || f.cpm < b.bid) && (f = {
2407
cpm: b.bid,
2408
vast: b.vast,
2409
bidder: "amazon",
2410
videoCacheKey: "amazon"
2411
})
2412
}
2413
if ((!f || !f.videoCacheKey || f.cpm < L(a)) && (r || Math.random() > .5)) {
2414
var y = void 0;
2415
y = function(e) {
2416
return "US" === e ? 6.1 : B.includes(e) ? .5 : P.includes(e) ? .15 : D.includes(e) ? .08 : M.includes(e) ? .03 : .02
2417
}(a), f = {
2418
cpm: 2 * y,
2419
vast: G(),
2420
bidder: "poki",
2421
videoCacheKey: "poki"
2422
}
2423
}
2424
if (!f || !f.videoCacheKey) return void o.dispatchEvent(n.ads.completed);
2425
switch (f.bidder) {
2426
case "onetag":
2427
l = "https://onetag-sys.com/invocation/?key=" + f.videoCacheKey;
2428
break;
2429
case "rubicon":
2430
l = "https://prebid-server.rubiconproject.com/cache?uuid=" + f.videoCacheKey;
2431
break;
2432
case "spotx":
2433
l = "https://search.spotxchange.com/ad/vast.html?key=" + f.videoCacheKey;
2434
break;
2435
case "amazon":
2436
case "poki":
2437
l = f.vast;
2438
break;
2439
default:
2440
l = "https://prebid.adnxs.com/pbc/v1/cache?uuid=" + f.videoCacheKey
2441
}
2442
z({
2443
event: "video-ready",
2444
size: "640x360v",
2445
opportunityId: null == h ? void 0 : h.opportunityId,
2446
adUnitPath: null == h ? void 0 : h.adUnitPath,
2447
p4d_game_id: tt.gameId,
2448
p4d_version_id: tt.versionId,
2449
bidder: null == f ? void 0 : f.bidder,
2450
bid: null == f ? void 0 : f.cpm
2451
}), v = !0, o.setDataAnnotations({
2452
p4d_game_id: tt.gameId,
2453
p4d_version_id: tt.versionId,
2454
bidder: null == f ? void 0 : f.bidder,
2455
bid: null == f ? void 0 : f.cpm
2456
})
2457
}
2458
if (o.setDataAnnotations({
2459
vhbOnlyMode: v,
2460
adTagUrl: l
2461
}), g.length > 0) {
2462
f = g[0];
2463
o.setDataAnnotations({
2464
prebidBidder: null == f ? void 0 : f.bidder,
2465
prebidBid: null == f ? void 0 : f.cpm
2466
})
2467
} else o.setDataAnnotations({
2468
prebidBidder: void 0,
2469
prebidBid: void 0
2470
});
2471
e.requestAd(l)
2472
} catch (t) {
2473
e.requestAd(A)
2474
}
2475
};
2476
ee && (m++, window.apstag.fetchBids({
2477
slots: [{
2478
slotID: r ? "Rewarded" : "Midroll",
2479
mediaType: "video"
2480
}],
2481
timeout: Y.bidderTimeout
2482
}, (function(e) {
2483
e.length > 0 && (c = e[0].encodedQsParams), g()
2484
}))), s && z({
2485
event: "video-request",
2486
size: "640x360v",
2487
opportunityId: null == h ? void 0 : h.opportunityId,
2488
adUnitPath: null == h ? void 0 : h.adUnitPath,
2489
p4d_game_id: tt.gameId,
2490
p4d_version_id: tt.versionId
2491
}), window.pbjs.que.push((function() {
2492
window.pbjs.requestBids({
2493
adUnitCodes: [u],
2494
bidsBackHandler: function() {
2495
g()
2496
}
2497
})
2498
}))
2499
} else e.requestAd(A)
2500
}
2501
var ae = function() {
2502
function e(e, t) {
2503
void 0 === t && (t = {}), this.retries = 0, this.running = !1, this.ima = e, this.siteID = t.siteID || 3, this.country = t.country || "ZZ", this.totalRetries = t.totalRetries || l.waterfallRetries || 1, this.timing = t.timing || new u(l.adTiming), d() && (this.totalRetries = 1), o.addEventListener(n.ads.video.error, this.moveThroughWaterfall.bind(this)), o.addEventListener(n.ads.video.loaderError, this.moveThroughWaterfall.bind(this)), o.addEventListener(n.ads.ready, this.timing.stopWaterfallTimer.bind(this.timing)), o.addEventListener(n.ads.started, this.stopWaterfall.bind(this))
2504
}
2505
return e.prototype.moveThroughWaterfall = function() {
2506
if (!1 !== this.running) {
2507
if (this.timing.stopWaterfallTimer(), this.retries < this.totalRetries) return this.timing.nextWaterfallTimer(), void this.requestAd();
2508
this.running = !1, this.timing.resetWaterfallTimerIdx(), o.dispatchEvent(n.ads.error, {
2509
message: "No ads"
2510
})
2511
}
2512
}, e.prototype.cutOffWaterfall = function() {
2513
this.ima.tearDown(), this.moveThroughWaterfall()
2514
}, e.prototype.buildAdUnitPaths = function(e) {
2515
if (r.debug) {
2516
var t = "/21682198607/debug-video/";
2517
return e === n.ads.position.rewarded ? [t + "debug-video-rewarded"] : e === n.ads.position.preroll ? [t + "debug-video-preroll"] : [t + "debug-video-midroll"]
2518
}
2519
var i = "desktop",
2520
a = "midroll";
2521
S() ? i = "mobile" : E() && (i = "tablet"), e === n.ads.position.rewarded && (a = "rewarded");
2522
var o = "/21682198607/";
2523
return nt.GetIsPokiIFrame() ? ["" + o + i + "_ingame_" + a + "_1/" + this.siteID + "_" + i + "_ingame_" + a + "_1", "" + o + i + "_ingame_" + a + "_2/" + this.siteID + "_" + i + "_ingame_" + a + "_2"] : [o + "external_" + i + "_video_1/external_" + i + "_ingame_" + a + "_1", o + "external_" + i + "_video_2/external_" + i + "_ingame_" + a + "_2"]
2524
}, e.prototype.start = function(e, t) {
2525
void 0 === e && (e = {}), this.running = !0, this.retries = 0, this.criteria = e, this.timing.resetWaterfallTimerIdx(), this.rewarded = t === n.ads.position.rewarded, this.adUnitPaths = this.buildAdUnitPaths(t), this.requestAd()
2526
}, e.prototype.requestAd = function() {
2527
this.timing.startWaterfallTimer(this.cutOffWaterfall.bind(this)), this.retries++, this.criteria.waterfall = this.retries;
2528
var e = (this.retries - 1) % this.adUnitPaths.length,
2529
t = this.adUnitPaths[e],
2530
i = "https://securepubads.g.doubleclick.net/gampad/ads?sz=640x360|640x480&iu=" + t + "&ciu_szs&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&url={url}&description_url={descriptionUrl}&correlator={timestamp}";
2531
nt.consentString && nt.consentString.length > 0 && (this.criteria.consent_string = nt.consentString);
2532
var r = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0) > 970;
2533
this.criteria.billboards_fit = r ? "yes" : "no";
2534
var a, s, A = function(e) {
2535
var t = I().split("?"),
2536
i = encodeURIComponent(t[0]);
2537
return (e = e.split("{descriptionUrl}").join(i)).split("{timestamp}").join((new Date).getTime().toString())
2538
}(i) + (a = this.criteria, s = "", Object.keys(a).forEach((function(e) {
2539
if (Object.prototype.hasOwnProperty.call(a, e)) {
2540
var t = a[e];
2541
Array.isArray(t) && (t = t.join()), s += e + "=" + t + "&"
2542
}
2543
})), "&cust_params=" + (s = encodeURIComponent(s)) + "&");
2544
nt.childDirected && (A += "&tfcd=1"), nt.nonPersonalized && (A += "&npa=1"), o.setDataAnnotations({
2545
adUnitPath: t,
2546
adTagUrl: A,
2547
waterfall: this.retries
2548
}), o.dispatchEvent(n.ads.requested), d() || 1 === this.retries && !S() && !E() ? (console.debug("adRequest started with Prebid Video enabled"), re(this.ima, A, this.criteria, this.rewarded, this.country)) : (console.debug("adRequest started in plain mode"), this.ima.requestAd(A))
2549
}, e.prototype.isRunning = function() {
2550
return this.running
2551
}, e.prototype.stopWaterfall = function() {
2552
this.running = !1, this.timing.stopWaterfallTimer(), this.timing.resetWaterfallTimerIdx()
2553
}, e
2554
}();
2555
const oe = ae;
2556
var se = "pokiSdkContainer",
2557
de = "pokiSdkFixed",
2558
Ae = "pokiSdkOverlay",
2559
ce = "pokiSdkHidden",
2560
le = "pokiSdkInsideContainer",
2561
pe = "pokiSdkPauseButton",
2562
ue = "pokiSdkPauseButtonBG",
2563
he = "pokiSdkStartAdButton",
2564
me = "pokiSdkProgressBar",
2565
ge = "pokiSdkProgressContainer",
2566
ve = "pokiSdkSpinnerContainer",
2567
fe = "pokiSdkVideoContainer",
2568
be = "pokiSdkVisible",
2569
ye = "pokiSDKAdContainer";
2570
var ke = function(e, t, i) {
2571
if (i || 2 === arguments.length)
2572
for (var n, r = 0, a = t.length; r < a; r++) !n && r in t || (n || (n = Array.prototype.slice.call(t, 0, r)), n[r] = t[r]);
2573
return e.concat(n || Array.prototype.slice.call(t))
2574
};
2575
const we = function() {
2576
function e(e) {
2577
var t = this;
2578
if (this.hideElement = function(e) {
2579
e.classList.add(ce), e.classList.remove(be)
2580
}, this.showElement = function(e) {
2581
e.classList.add(be), e.classList.remove(ce)
2582
}, this.wrapper = e.wrapper, this.progressFaker = new Ie((function(e) {
2583
return t.updateProgressBar(e)
2584
})), this.progressFaker.queueFakeProgress(10, 1e3, n.ads.prebidRequested), this.progressFaker.queueFakeProgress(20, 2e3, n.ads.started), this.wrapper instanceof HTMLElement || (console.error("POKI-SDK: wrapper is not a HTMLElement, falling back to document.body"), this.wrapper = document.body), this.createElements(), "undefined" != typeof window && document) {
2585
var i = document.createElement("style");
2586
i.innerHTML = "\n.pokiSdkContainer {\n\toverflow: hidden;\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\twidth: 100%;\n\theight: 100%;\n\tz-index: 1000;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.pokiSdkContainer.pokiSdkFixed {\n\tposition: fixed;\n}\n\n.pokiSdkContainer.pokiSdkVisible {\n\tdisplay: block;\n}\n\n.pokiSdkContainer.pokiSdkHidden,\n.pokiSdkSpinnerContainer.pokiSdkHidden {\n\tdisplay: none;\n}\n\n.pokiSdkContainer.pokiSdkHidden,\n.pokiSdkSpinnerContainer {\n\tpointer-events: none;\n}\n\n.pokiSdkSpinnerContainer {\n\tz-index: 10;\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\twidth: 100%;\n\theight: 100%;\n\tbackground: url('https://a.poki.com/images/thumb_anim_2x.gif') 50% 50% no-repeat;\n\tuser-select: none;\n}\n\n.pokiSdkInsideContainer {\n\tbackground: #000;\n\tposition: relative;\n\tz-index: 1;\n\twidth: 100%;\n\theight: 100%;\n\tdisplay: flex;\n\tflex-direction: column;\n\n\topacity: 0;\n\t-webkit-transition: opacity 0.5s ease-in-out;\n\t-moz-transition: opacity 0.5s ease-in-out;\n\t-ms-transition: opacity 0.5s ease-in-out;\n\t-o-transition: opacity 0.5s ease-in-out;\n\ttransition: opacity 0.5s ease-in-out;\n}\n\n.pokiSdkContainer.pokiSdkVisible .pokiSdkInsideContainer {\n\topacity: 1;\n}\n\n.pokiSDKAdContainer, .pokiSdkVideoContainer {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.pokiSdkStartAdButton {\n\tposition: absolute;\n\tz-index: 9999;\n\ttop: 0;\n\n\tpadding-top: 10%;\n\twidth: 100%;\n\theight: 100%;\n\ttext-align: center;\n\tcolor: #FFF;\n\n\tfont: 700 15pt 'Arial', sans-serif;\n\tfont-weight: bold;\n\tletter-spacing: 1px;\n\ttransition: 0.1s ease-in-out;\n\tline-height: 1em;\n}\n\n.pokiSdkPauseButton {\n\tcursor:pointer;\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 1;\n}\n\n.pokiSdkPauseButton:before {\n\tcontent: '';\n\tposition: absolute;\n\twidth: 100px;\n\theight: 100px;\n\tdisplay: block;\n\tborder: 2px solid #fff;\n\tborder-radius: 50%;\n\tuser-select: none;\n\tbackground-color: rgba(0, 0, 0, 0.6);\n\ttransition: background-color 0.5s ease;\n\tanimation: 1s linear infinite pulse;\n}\n\n.pokiSdkPauseButton:after {\n\tcontent: '';\n\tposition: absolute;\n\tdisplay: block;\n\tbox-sizing: border-box;\n\tborder-color: transparent transparent transparent #fff;\n\tborder-style: solid;\n\tborder-width: 26px 0 26px 40px;\n\tpointer-events: none;\n\tanimation: 1s linear infinite pulse;\n\tleft: 6px;\n}\n.pokiSdkPauseButtonBG {\n position: fixed;\n top: 0;\n left: 0;\n display: block;\n content: '';\n background: rgba(0, 43, 80, 0.5);\n width: 100%;\n height: 100%;\n}\n\n.pokiSdkPauseButtonBG:hover{\n\tbackground: rgba(0, 43, 80, 0.7);\n}\n\n@keyframes pulse {\n\t0% {\n\t\ttransform: translate(-50%, -50%) scale(0.95);\n\t}\n\t70% {\n\t\ttransform: translate(-50%, -50%) scale(1.1);\n\t}\n\t100% {\n\t\ttransform: translate(-50%, -50%) scale(0.95);\n\t}\n}\n\n.pokiSdkProgressContainer {\n\tbackground: #B8C7DD;\n\twidth: 100%;\n\theight: 5px;\n\tposition: absolute;\n\tbottom: 0;\n\tz-index: 9999;\n}\n\n.pokiSdkProgressBar {\n\tposition:relative;\n\tbottom:0px;\n\tbackground: #FFDC00;\n\theight: 100%;\n\twidth: 0%;\n\ttransition: width 0.5s;\n\ttransition-timing-function: linear;\n}\n\n.pokiSdkProgressBar.pokiSdkVisible, .pokiSdkPauseButton.pokiSdkVisible, .pokiSdkStartAdButton.pokiSdkVisible {\n\tdisplay: block;\n\tpointer-events: auto;\n}\n\n.pokiSdkProgressBar.pokiSdkHidden, .pokiSdkPauseButton.pokiSdkHidden, .pokiSdkStartAdButton.pokiSdkHidden {\n\tdisplay: none;\n\tpointer-events: none;\n}\n", document.head.appendChild(i)
2587
}
2588
}
2589
return e.prototype.updateProgressBar = function(e) {
2590
this.progressBar.style.width = e + "%"
2591
}, e.prototype.setupEvents = function(e) {
2592
this.internalSDK = e
2593
}, e.prototype.hide = function() {
2594
this.hideElement(this.containerDiv), this.hideElement(this.progressContainer), this.hidePauseButton(), this.hideElement(this.startAdButton), this.containerDiv.classList.remove(Ae), this.progressBar.style.width = "0%", this.progressFaker.reset()
2595
}, e.prototype.hideSpinner = function() {
2596
this.hideElement(this.spinnerContainer)
2597
}, e.prototype.show = function() {
2598
this.containerDiv.classList.add(Ae), this.showElement(this.containerDiv), this.showElement(this.spinnerContainer), this.showElement(this.progressContainer), this.progressFaker.start()
2599
}, e.prototype.getVideoBounds = function() {
2600
return this.adContainer.getBoundingClientRect()
2601
}, e.prototype.getAdContainer = function() {
2602
return this.adContainer
2603
}, e.prototype.getVideoContainer = function() {
2604
return this.videoContainer
2605
}, e.prototype.showPauseButton = function() {
2606
this.showElement(this.pauseButton), this.internalSDK && this.pauseButton.addEventListener("click", this.internalSDK.resumeAd.bind(this.internalSDK))
2607
}, e.prototype.hidePauseButton = function() {
2608
this.hideElement(this.pauseButton), this.internalSDK && this.pauseButton.removeEventListener("click", this.internalSDK.resumeAd.bind(this.internalSDK))
2609
}, e.prototype.showStartAdButton = function() {
2610
this.showElement(this.startAdButton), this.internalSDK && this.startAdButton.addEventListener("click", this.internalSDK.startAdClicked.bind(this.internalSDK))
2611
}, e.prototype.hideStartAdButton = function() {
2612
this.hideElement(this.startAdButton), this.internalSDK && this.startAdButton.removeEventListener("click", this.internalSDK.startAdClicked.bind(this.internalSDK))
2613
}, e.prototype.createElements = function() {
2614
if (this.containerDiv = document.createElement("div"), this.insideContainer = document.createElement("div"), this.pauseButton = document.createElement("div"), this.pauseButtonBG = document.createElement("div"), this.startAdButton = document.createElement("div"), this.progressBar = document.createElement("div"), this.progressContainer = document.createElement("div"), this.spinnerContainer = document.createElement("div"), this.adContainer = document.createElement("div"), this.videoContainer = document.createElement("video"), this.adContainer.id = "pokiSDKAdContainer", this.videoContainer.id = "pokiSDKVideoContainer", this.containerDiv.className = se, this.insideContainer.className = le, this.pauseButton.className = pe, this.pauseButtonBG.className = ue, this.pauseButton.appendChild(this.pauseButtonBG), this.startAdButton.className = he, this.startAdButton.innerHTML = "Tap anywhere to play ad", this.progressBar.className = me, this.progressContainer.className = ge, this.spinnerContainer.className = ve, this.adContainer.className = ye, this.videoContainer.className = fe, this.hide(), this.videoContainer.setAttribute("playsinline", "playsinline"), this.videoContainer.setAttribute("muted", "muted"), this.containerDiv.appendChild(this.insideContainer), this.containerDiv.appendChild(this.spinnerContainer), this.insideContainer.appendChild(this.progressContainer), this.insideContainer.appendChild(this.videoContainer), this.insideContainer.appendChild(this.adContainer), this.containerDiv.appendChild(this.pauseButton), this.containerDiv.appendChild(this.startAdButton), this.progressContainer.appendChild(this.progressBar), this.wrapper.appendChild(this.containerDiv), this.wrapper === document.body) this.containerDiv.classList.add(de);
2615
else {
2616
var e = window.getComputedStyle(this.wrapper).position;
2617
e && -1 !== ["absolute", "fixed", "relative"].indexOf(e) || (this.wrapper.style.position = "relative")
2618
}
2619
}, e
2620
}();
2621
var Ie = function() {
2622
function e(e) {
2623
var t = this;
2624
this.storedQueue = [], this.progressCallback = e, this.reset(), o.addEventListener(n.ads.video.progress, (function(e) {
2625
var i = 100 - t.currentProgress,
2626
n = e.currentTime / e.duration * i;
2627
n < i && t.progressCallback(t.currentProgress + n)
2628
})), this.initializeNoProgressFix()
2629
}
2630
return e.prototype.queueFakeProgress = function(e, t, i) {
2631
var n = this;
2632
this.storedQueue.push({
2633
progressToFake: e,
2634
duration: t,
2635
stopEvent: i
2636
}), o.addEventListener(i, (function() {
2637
n.eventWatcher[i] = !0, n.currentProgress = n.startProgress + e, n.startProgress = n.currentProgress, n.progressCallback(n.currentProgress), n.activeQueue.shift(), n.activeQueue.length > 0 ? n.continue() : n.pause()
2638
}))
2639
}, e.prototype.fakeProgress = function(e, t, i) {
2640
this.activeQueue.push({
2641
progressToFake: e,
2642
duration: t,
2643
stopEvent: i
2644
}), this.fakeProgressEvents = !0, this.continue()
2645
}, e.prototype.start = function() {
2646
this.activeQueue.length > 0 || (this.activeQueue = ke([], this.storedQueue, !0), this.active = !0, this.continue())
2647
}, e.prototype.continue = function() {
2648
if (this.activeQueue.length > 0 && !this.tickInterval) {
2649
this.startTime = Date.now();
2650
this.tickInterval = window.setInterval(this.tick.bind(this), 50), this.active = !0
2651
}
2652
}, e.prototype.pause = function() {
2653
this.clearInterval()
2654
}, e.prototype.tick = function() {
2655
var e = this.activeQueue[0],
2656
t = Date.now() - this.startTime,
2657
i = Math.min(t / e.duration, 1);
2658
this.currentProgress = this.startProgress + e.progressToFake * i, this.fakeProgressEvents && o.dispatchEvent(n.ads.video.progress, {
2659
duration: e.duration / 1e3,
2660
currentTime: t / 1e3
2661
}), this.progressCallback(this.currentProgress), (this.eventWatcher[e.stopEvent] || 1 === i) && this.pause()
2662
}, e.prototype.clearInterval = function() {
2663
this.tickInterval && (clearInterval(this.tickInterval), this.tickInterval = 0)
2664
}, e.prototype.initializeNoProgressFix = function() {
2665
var e = this;
2666
o.addEventListener(n.ads.started, (function(t) {
2667
e.progressWatcherTimeout = window.setTimeout((function() {
2668
if (e.active) {
2669
var i = 100 - e.currentProgress,
2670
r = 1e3 * t.duration - 1e3;
2671
e.fakeProgress(i, r, n.ads.completed)
2672
}
2673
}), 1e3)
2674
})), o.addEventListener(n.ads.video.progress, (function() {
2675
e.progressWatcherTimeout && (clearTimeout(e.progressWatcherTimeout), e.progressWatcherTimeout = 0)
2676
}))
2677
}, e.prototype.reset = function() {
2678
this.eventWatcher = {}, this.startProgress = 0, this.startTime = 0, this.currentProgress = 0, this.activeQueue = [], this.active = !1, this.fakeProgressEvents = !1, this.clearInterval()
2679
}, e
2680
}(),
2681
Se = !0,
2682
Ee = {};
2683
2684
function _e() {
2685
if (document.body && document.body.appendChild) {
2686
var e = document.createElement("iframe");
2687
if (e.style.display = "none", document.body.appendChild(e), e.contentWindow && (window.pokiKeysChanged = new Map, e.contentWindow.document.open(), e.contentWindow.document.write("<script>\nconst lsKey = 'poki_lsexpire';\nconst lifetime = 1000*60*60*24*30*6;\n\nwindow.addEventListener('storage', function(event) {\n\ttry {\n\t\tconst key = event.key;\n\n\t\t// key is null when localStorage.clear() is called.\n\t\tif (key === null) {\n\t\t\tlocalStorage.removeItem(lsKey);\n\t\t\treturn;\n\t\t}\n\n\t\tif (key === lsKey) return;\n\n\t\tconst updates = JSON.parse(localStorage.getItem(lsKey)) || {};\n\n\t\t// newValue is null when localStorage.removeItem() is called.\n\t\tif (event.newValue === null) {\n\t\t\tdelete updates[key];\n\n\t\t\t// window.parent is the game itself. This code is executed in\n\t\t\t// an iframe without src which makes it the same context as it's parent\n\t\t\t// which makes it save to access the parent's properties.\n\t\t\twindow.parent.pokiKeysChanged.set(key, 'remove');\n\t\t} else {\n\t\t\tupdates[key] = Date.now();\n\t\t\twindow.parent.pokiKeysChanged.set(key, 'set');\n\t\t}\n\t\tlocalStorage.setItem(lsKey, JSON.stringify(updates));\n\t} catch (e) {}\n});\n\nfunction expire() {\n\tconst updates = JSON.parse(localStorage.getItem(lsKey)) || {};\n\tconst expireBefore = Date.now() - lifetime;\n\tvar removed = false;\n\n\tObject.keys(updates).map(function(key) {\n\t\tif (updates[key] < expireBefore) {\n\t\t\tlocalStorage.removeItem(key);\n\t\t\tdelete updates[key];\n\t\t\tremoved = true;\n\t\t}\n\t});\n\n\tif (removed) {\n\t\tlocalStorage.setItem(lsKey, JSON.stringify(updates));\n\t}\n}\n\ntry {\n\texpire();\n} catch (e) {}\n<\/script>"), e.contentWindow.document.close(), !window.location.hostname.endsWith("poki-gdn.com") && tt.gameId)) {
2688
var t = document.createElement("iframe");
2689
t.style.display = "none", t.src = "https://" + tt.gameId + ".poki-gdn.com/poki-savegame-store.html", t.onload = function() {
2690
if (setInterval((function() {
2691
var e = [];
2692
window.pokiKeysChanged.forEach((function(t, i) {
2693
"set" === t ? e.push([t, i, localStorage.getItem(i)]) : e.push([t, i])
2694
})), e.length > 0 && (t.contentWindow && t.contentWindow.postMessage({
2695
type: "store",
2696
data: e
2697
}, "*"), window.pokiKeysChanged.clear())
2698
}), 1e3), !localStorage.getItem("pokiMigrated")) {
2699
for (var e = [], i = 0; i < localStorage.length; i++) {
2700
var n = localStorage.key(i);
2701
e.push(["set", n, localStorage.getItem(n)])
2702
}
2703
e.length > 0 && t.contentWindow && t.contentWindow.postMessage({
2704
type: "store",
2705
data: e
2706
}, "*"), localStorage.setItem("pokiMigrated", "1")
2707
}
2708
}, document.body.appendChild(t)
2709
}
2710
} else document.addEventListener("DOMContentLoaded", _e)
2711
}
2712
var xe = ["AT", "BE", "BG", "HR", "CY", "CZ", "DK", "EE", "FI", "FR", "DE", "GR", "HU", "IE", "IT", "LV", "LT", "LU", "MT", "NL", "PL", "PT", "RO", "SK", "SI", "ES", "SE", "IS", "LI", "NO"],
2713
Ce = ["US"],
2714
Te = ["ZZ"];
2715
2716
function Be(e) {
2717
return xe.includes(e)
2718
}
2719
2720
function Pe(e) {
2721
return Te.includes(e)
2722
}
2723
var De = function(e, t, i, n) {
2724
return new(i || (i = Promise))((function(r, a) {
2725
function o(e) {
2726
try {
2727
d(n.next(e))
2728
} catch (e) {
2729
a(e)
2730
}
2731
}
2732
2733
function s(e) {
2734
try {
2735
d(n.throw(e))
2736
} catch (e) {
2737
a(e)
2738
}
2739
}
2740
2741
function d(e) {
2742
var t;
2743
e.done ? r(e.value) : (t = e.value, t instanceof i ? t : new i((function(e) {
2744
e(t)
2745
}))).then(o, s)
2746
}
2747
d((n = n.apply(e, t || [])).next())
2748
}))
2749
},
2750
Me = function(e, t) {
2751
var i, n, r, a, o = {
2752
label: 0,
2753
sent: function() {
2754
if (1 & r[0]) throw r[1];
2755
return r[1]
2756
},
2757
trys: [],
2758
ops: []
2759
};
2760
return a = {
2761
next: s(0),
2762
throw: s(1),
2763
return: s(2)
2764
}, "function" == typeof Symbol && (a[Symbol.iterator] = function() {
2765
return this
2766
}), a;
2767
2768
function s(a) {
2769
return function(s) {
2770
return function(a) {
2771
if (i) throw new TypeError("Generator is already executing.");
2772
for (; o;) try {
2773
if (i = 1, n && (r = 2 & a[0] ? n.return : a[0] ? n.throw || ((r = n.return) && r.call(n), 0) : n.next) && !(r = r.call(n, a[1])).done) return r;
2774
switch (n = 0, r && (a = [2 & a[0], r.value]), a[0]) {
2775
case 0:
2776
case 1:
2777
r = a;
2778
break;
2779
case 4:
2780
return o.label++, {
2781
value: a[1],
2782
done: !1
2783
};
2784
case 5:
2785
o.label++, n = a[1], a = [0];
2786
continue;
2787
case 7:
2788
a = o.ops.pop(), o.trys.pop();
2789
continue;
2790
default:
2791
if (!(r = o.trys, (r = r.length > 0 && r[r.length - 1]) || 6 !== a[0] && 2 !== a[0])) {
2792
o = 0;
2793
continue
2794
}
2795
if (3 === a[0] && (!r || a[1] > r[0] && a[1] < r[3])) {
2796
o.label = a[1];
2797
break
2798
}
2799
if (6 === a[0] && o.label < r[1]) {
2800
o.label = r[1], r = a;
2801
break
2802
}
2803
if (r && o.label < r[2]) {
2804
o.label = r[2], o.ops.push(a);
2805
break
2806
}
2807
r[2] && o.ops.pop(), o.trys.pop();
2808
continue
2809
}
2810
a = t.call(e, o)
2811
} catch (e) {
2812
a = [6, e], n = 0
2813
} finally {
2814
i = r = 0
2815
}
2816
if (5 & a[0]) throw a[1];
2817
return {
2818
value: a[0] ? a[1] : void 0,
2819
done: !0
2820
}
2821
}([a, s])
2822
}
2823
}
2824
};
2825
const Re = function() {
2826
function e(e) {
2827
var t = this;
2828
this.bannerTimeout = null, this.allowedToPlayAd = !1, this.runningAd = !1, this.currentWidth = 640, this.currentHeight = 480, this.currentRequestIsMuted = !1, this.volume = 1, this.canWeAutoPlayWithSound = function() {
2829
return De(t, void 0, void 0, (function() {
2830
return Me(this, (function(e) {
2831
switch (e.label) {
2832
case 0:
2833
if (!this.blankVideo) return [2, !1];
2834
e.label = 1;
2835
case 1:
2836
return e.trys.push([1, 3, , 4]), [4, this.blankVideo.play()];
2837
case 2:
2838
return e.sent(), [2, !0];
2839
case 3:
2840
return e.sent(), [2, !1];
2841
case 4:
2842
return [2]
2843
}
2844
}))
2845
}))
2846
}, this.videoElement = document.getElementById("pokiSDKVideoContainer"), this.adsManager = null, this.volume = e, this.initAdDisplayContainer(), this.initBlankVideo(), this.initAdsLoader()
2847
}
2848
return e.prototype.initAdDisplayContainer = function() {
2849
2850
}, e.prototype.initBlankVideo = function() {
2851
this.blankVideo = document.createElement("video"), this.blankVideo.setAttribute("playsinline", "playsinline");
2852
var e = document.createElement("source");
2853
e.src = "data:video/mp4;base64, AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0wIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDE6MHgxMTEgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz02IGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCB2YnZfbWF4cmF0ZT03NjggdmJ2X2J1ZnNpemU9MzAwMCBjcmZfbWF4PTAuMCBuYWxfaHJkPW5vbmUgZmlsbGVyPTAgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAAFZliIQL8mKAAKvMnJycnJycnJycnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiEASZACGQAjgCEASZACGQAjgAAAAAdBmjgX4GSAIQBJkAIZACOAAAAAB0GaVAX4GSAhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGagC/AySEASZACGQAjgAAAAAZBmqAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZrAL8DJIQBJkAIZACOAAAAABkGa4C/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmwAvwMkhAEmQAhkAI4AAAAAGQZsgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGbQC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm2AvwMkhAEmQAhkAI4AAAAAGQZuAL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGboC/AySEASZACGQAjgAAAAAZBm8AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZvgL8DJIQBJkAIZACOAAAAABkGaAC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmiAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpAL8DJIQBJkAIZACOAAAAABkGaYC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmoAvwMkhAEmQAhkAI4AAAAAGQZqgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGawC/AySEASZACGQAjgAAAAAZBmuAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZsAL8DJIQBJkAIZACOAAAAABkGbIC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm0AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZtgL8DJIQBJkAIZACOAAAAABkGbgCvAySEASZACGQAjgCEASZACGQAjgAAAAAZBm6AnwMkhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AAAAhubW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAABDcAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAzB0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAA+kAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAALAAAACQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAPpAAAAAAABAAAAAAKobWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAB1MAAAdU5VxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAACU21pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAhNzdGJsAAAAr3N0c2QAAAAAAAAAAQAAAJ9hdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAALAAkABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAALWF2Y0MBQsAN/+EAFWdCwA3ZAsTsBEAAAPpAADqYA8UKkgEABWjLg8sgAAAAHHV1aWRraEDyXyRPxbo5pRvPAyPzAAAAAAAAABhzdHRzAAAAAAAAAAEAAAAeAAAD6QAAABRzdHNzAAAAAAAAAAEAAAABAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAAIxzdHN6AAAAAAAAAAAAAAAeAAADDwAAAAsAAAALAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAAiHN0Y28AAAAAAAAAHgAAAEYAAANnAAADewAAA5gAAAO0AAADxwAAA+MAAAP2AAAEEgAABCUAAARBAAAEXQAABHAAAASMAAAEnwAABLsAAATOAAAE6gAABQYAAAUZAAAFNQAABUgAAAVkAAAFdwAABZMAAAWmAAAFwgAABd4AAAXxAAAGDQAABGh0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAABDcAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAQkAAADcAABAAAAAAPgbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAC7gAAAykBVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAADi21pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAADT3N0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAAC7gAAAAAAAM2VzZHMAAAAAA4CAgCIAAgAEgICAFEAVBbjYAAu4AAAADcoFgICAAhGQBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAADIAAAQAAAAAAQAAAkAAAAFUc3RzYwAAAAAAAAAbAAAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIAAAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQAAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABAAAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEAAAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAAAAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw", this.blankVideo.appendChild(e)
2854
}, e.prototype.initAdsLoader = function() {
2855
var e = this;
2856
this.adsLoader || window.google && (this.adsLoader = new google.ima.AdsLoader(this.adDisplayContainer), this.adsLoader.getSettings().setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.INSECURE), this.adsLoader.getSettings().setDisableCustomPlaybackForIOS10Plus(!0), this.adsLoader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED, this.onAdsManagerLoaded, !1, this), this.adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR, this.onAdLoaderError, !1, this), this.videoElement.addEventListener("onended", (function() {
2857
return e.adsLoader.contentComplete()
2858
})))
2859
}, e.prototype.requestAd = function(e) {
2860
return De(this, void 0, void 0, (function() {
2861
var t;
2862
return Me(this, (function(i) {
2863
switch (i.label) {
2864
case 0:
2865
return this.runningAd ? [2] : (this.runningAd = !0, this.adDisplayContainer.initialize(), this.videoElement.src = "", (t = new google.ima.AdsRequest).adTagUrl = e, t.linearAdSlotWidth = this.currentWidth, t.linearAdSlotHeight = this.currentHeight, t.nonLinearAdSlotWidth = this.currentWidth, t.nonLinearAdSlotHeight = this.currentHeight, t.forceNonLinearFullSlot = !0, [4, this.canWeAutoPlayWithSound()]);
2866
case 1:
2867
return i.sent() ? (t.setAdWillPlayMuted(!1), this.currentRequestIsMuted = !1) : (t.setAdWillPlayMuted(!0), this.currentRequestIsMuted = !0), this.allowedToPlayAd = !0, this.adsLoader.requestAds(t), [2]
2868
}
2869
}))
2870
}))
2871
}, e.prototype.resize = function(e, t, i) {
2872
void 0 === i && (i = google.ima.ViewMode.NORMAL), this.currentWidth = e, this.currentHeight = t, this.adsManager && this.adsManager.resize(e, t, i)
2873
}, e.prototype.onAdsManagerLoaded = function(e) {
2874
var t = new google.ima.AdsRenderingSettings;
2875
t.enablePreloading = !0, t.restoreCustomPlaybackStateOnAdBreakComplete = !0, t.mimeTypes = x() || S() || E() ? ["video/mp4"] : ["video/mp4", "video/webm", "video/ogg"], t.loadVideoTimeout = 8e3, this.adsManager = e.getAdsManager(this.videoElement, t), this.adsManager.setVolume(Math.max(0, Math.min(1, this.volume))), this.currentRequestIsMuted && this.adsManager.setVolume(0), this.allowedToPlayAd ? (this.attachAdEvents(), o.dispatchEvent(n.ads.ready)) : this.tearDown()
2876
}, e.prototype.setVolume = function(e) {
2877
this.volume = e, this.adsManager && this.adsManager.setVolume(Math.max(0, Math.min(1, this.volume)))
2878
}, e.prototype.startPlayback = function() {
2879
try {
2880
this.adsManager.init(this.currentWidth, this.currentHeight, google.ima.ViewMode.NORMAL), this.adsManager.start()
2881
} catch (e) {
2882
this.videoElement.play()
2883
}
2884
}, e.prototype.startIOSPlayback = function() {
2885
this.adsManager.start()
2886
}, e.prototype.stopPlayback = function() {
2887
o.dispatchEvent(n.ads.stopped), this.tearDown()
2888
}, e.prototype.resumeAd = function() {
2889
o.dispatchEvent(n.ads.video.resumed), this.adsManager && this.adsManager.resume()
2890
}, e.prototype.tearDown = function() {
2891
this.adsManager && (this.adsManager.stop(), this.adsManager.destroy(), this.adsManager = null), null !== this.bannerTimeout && (clearTimeout(this.bannerTimeout), this.bannerTimeout = null), this.adsLoader && (this.adsLoader.contentComplete(), this.adsLoader.destroy(), this.adsLoader = null, this.initAdsLoader()), this.runningAd = !1
2892
}, e.prototype.attachAdEvents = function() {
2893
var e = this,
2894
t = google.ima.AdEvent.Type;
2895
this.adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR, this.onAdError, !1, this), [t.AD_PROGRESS, t.ALL_ADS_COMPLETED, t.CLICK, t.COMPLETE, t.IMPRESSION, t.PAUSED, t.SKIPPED, t.STARTED, t.USER_CLOSE, t.AD_BUFFERING].forEach((function(t) {
2896
e.adsManager.addEventListener(t, e.onAdEvent, !1, e)
2897
}))
2898
}, e.prototype.onAdEvent = function(e) {
2899
var t = this,
2900
i = e.getAd();
2901
switch (e.type) {
2902
case google.ima.AdEvent.Type.AD_PROGRESS:
2903
o.dispatchEvent(n.ads.video.progress, e.getAdData());
2904
break;
2905
case google.ima.AdEvent.Type.STARTED:
2906
e.remainingTime = this.adsManager.getRemainingTime(), e.remainingTime <= 0 && (e.remainingTime = 15), i.isLinear() || (this.bannerTimeout = window.setTimeout((function() {
2907
o.dispatchEvent(n.ads.completed, {
2908
rewardAllowed: !!e.rewardAllowed
2909
}), t.tearDown()
2910
}), 1e3 * (e.remainingTime + 1))), o.setDataAnnotations({
2911
creativeId: i.getCreativeId()
2912
}), o.dispatchEvent(n.ads.started, {
2913
duration: i.getDuration()
2914
});
2915
break;
2916
case google.ima.AdEvent.Type.COMPLETE:
2917
o.dispatchEvent(n.ads.completed, {
2918
rewardAllowed: !0
2919
}), this.tearDown();
2920
break;
2921
case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:
2922
case google.ima.AdEvent.Type.USER_CLOSE:
2923
this.tearDown();
2924
break;
2925
case google.ima.AdEvent.Type.PAUSED:
2926
this.adsManager.pause(), o.dispatchEvent(n.ads.video.paused);
2927
break;
2928
case google.ima.AdEvent.Type.AD_BUFFERING:
2929
o.dispatchEvent(n.ads.video.buffering);
2930
break;
2931
case google.ima.AdEvent.Type.CLICK:
2932
o.dispatchEvent(n.ads.video.clicked);
2933
break;
2934
case google.ima.AdEvent.Type.SKIPPED:
2935
o.dispatchEvent(n.ads.skipped), o.dispatchEvent(n.ads.completed, {
2936
rewardAllowed: !0
2937
}), document.activeElement && document.activeElement.blur();
2938
break;
2939
case google.ima.AdEvent.Type.IMPRESSION:
2940
o.dispatchEvent(n.ads.impression)
2941
}
2942
}, e.prototype.onAdLoaderError = function(e) {
2943
this.tearDown();
2944
var t = e.getError && e.getError().toString() || "Unknown";
2945
o.dispatchEvent(n.ads.video.loaderError, {
2946
message: t
2947
})
2948
}, e.prototype.onAdError = function(e) {
2949
this.tearDown();
2950
var t = e.getError && e.getError().toString() || "Unknown";
2951
o.dispatchEvent(n.ads.video.error, {
2952
message: t
2953
})
2954
}, e.prototype.muteAd = function() {
2955
void 0 !== this.adsManager && null != this.adsManager && this.adsManager.setVolume(0)
2956
}, e.prototype.isAdRunning = function() {
2957
return this.runningAd
2958
}, e
2959
}();
2960
const Le = function(e) {
2961
return new Promise((function(t, i) {
2962
var n = document.createElement("script");
2963
n.type = "text/javascript", n.async = !0, n.src = e;
2964
var r = function() {
2965
n.readyState && "loaded" !== n.readyState && "complete" !== n.readyState || (t(), n.onload = null, n.onreadystatechange = null)
2966
};
2967
n.onload = r, n.onreadystatechange = r, n.onerror = i, document.head.appendChild(n)
2968
}))
2969
};
2970
var ze = function(e, t, i, n) {
2971
return new(i || (i = Promise))((function(r, a) {
2972
function o(e) {
2973
try {
2974
d(n.next(e))
2975
} catch (e) {
2976
a(e)
2977
}
2978
}
2979
2980
function s(e) {
2981
try {
2982
d(n.throw(e))
2983
} catch (e) {
2984
a(e)
2985
}
2986
}
2987
2988
function d(e) {
2989
var t;
2990
e.done ? r(e.value) : (t = e.value, t instanceof i ? t : new i((function(e) {
2991
e(t)
2992
}))).then(o, s)
2993
}
2994
d((n = n.apply(e, t || [])).next())
2995
}))
2996
},
2997
Oe = function(e, t) {
2998
var i, n, r, a, o = {
2999
label: 0,
3000
sent: function() {
3001
if (1 & r[0]) throw r[1];
3002
return r[1]
3003
},
3004
trys: [],
3005
ops: []
3006
};
3007
return a = {
3008
next: s(0),
3009
throw: s(1),
3010
return: s(2)
3011
}, "function" == typeof Symbol && (a[Symbol.iterator] = function() {
3012
return this
3013
}), a;
3014
3015
function s(a) {
3016
return function(s) {
3017
return function(a) {
3018
if (i) throw new TypeError("Generator is already executing.");
3019
for (; o;) try {
3020
if (i = 1, n && (r = 2 & a[0] ? n.return : a[0] ? n.throw || ((r = n.return) && r.call(n), 0) : n.next) && !(r = r.call(n, a[1])).done) return r;
3021
switch (n = 0, r && (a = [2 & a[0], r.value]), a[0]) {
3022
case 0:
3023
case 1:
3024
r = a;
3025
break;
3026
case 4:
3027
return o.label++, {
3028
value: a[1],
3029
done: !1
3030
};
3031
case 5:
3032
o.label++, n = a[1], a = [0];
3033
continue;
3034
case 7:
3035
a = o.ops.pop(), o.trys.pop();
3036
continue;
3037
default:
3038
if (!(r = o.trys, (r = r.length > 0 && r[r.length - 1]) || 6 !== a[0] && 2 !== a[0])) {
3039
o = 0;
3040
continue
3041
}
3042
if (3 === a[0] && (!r || a[1] > r[0] && a[1] < r[3])) {
3043
o.label = a[1];
3044
break
3045
}
3046
if (6 === a[0] && o.label < r[1]) {
3047
o.label = r[1], r = a;
3048
break
3049
}
3050
if (r && o.label < r[2]) {
3051
o.label = r[2], o.ops.push(a);
3052
break
3053
}
3054
r[2] && o.ops.pop(), o.trys.pop();
3055
continue
3056
}
3057
a = t.call(e, o)
3058
} catch (e) {
3059
a = [6, e], n = 0
3060
} finally {
3061
i = r = 0
3062
}
3063
if (5 & a[0]) throw a[1];
3064
return {
3065
value: a[0] ? a[1] : void 0,
3066
done: !0
3067
}
3068
}([a, s])
3069
}
3070
}
3071
};
3072
const Ge = function() {
3073
3074
};
3075
var je = function(e, t, i, n) {
3076
return new(i || (i = Promise))((function(r, a) {
3077
function o(e) {
3078
try {
3079
d(n.next(e))
3080
} catch (e) {
3081
a(e)
3082
}
3083
}
3084
3085
function s(e) {
3086
try {
3087
d(n.throw(e))
3088
} catch (e) {
3089
a(e)
3090
}
3091
}
3092
3093
function d(e) {
3094
var t;
3095
e.done ? r(e.value) : (t = e.value, t instanceof i ? t : new i((function(e) {
3096
e(t)
3097
}))).then(o, s)
3098
}
3099
d((n = n.apply(e, t || [])).next())
3100
}))
3101
},
3102
Ue = function(e, t) {
3103
var i, n, r, a, o = {
3104
label: 0,
3105
sent: function() {
3106
if (1 & r[0]) throw r[1];
3107
return r[1]
3108
},
3109
trys: [],
3110
ops: []
3111
};
3112
return a = {
3113
next: s(0),
3114
throw: s(1),
3115
return: s(2)
3116
}, "function" == typeof Symbol && (a[Symbol.iterator] = function() {
3117
return this
3118
}), a;
3119
3120
function s(a) {
3121
return function(s) {
3122
return function(a) {
3123
if (i) throw new TypeError("Generator is already executing.");
3124
for (; o;) try {
3125
if (i = 1, n && (r = 2 & a[0] ? n.return : a[0] ? n.throw || ((r = n.return) && r.call(n), 0) : n.next) && !(r = r.call(n, a[1])).done) return r;
3126
switch (n = 0, r && (a = [2 & a[0], r.value]), a[0]) {
3127
case 0:
3128
case 1:
3129
r = a;
3130
break;
3131
case 4:
3132
return o.label++, {
3133
value: a[1],
3134
done: !1
3135
};
3136
case 5:
3137
o.label++, n = a[1], a = [0];
3138
continue;
3139
case 7:
3140
a = o.ops.pop(), o.trys.pop();
3141
continue;
3142
default:
3143
if (!(r = o.trys, (r = r.length > 0 && r[r.length - 1]) || 6 !== a[0] && 2 !== a[0])) {
3144
o = 0;
3145
continue
3146
}
3147
if (3 === a[0] && (!r || a[1] > r[0] && a[1] < r[3])) {
3148
o.label = a[1];
3149
break
3150
}
3151
if (6 === a[0] && o.label < r[1]) {
3152
o.label = r[1], r = a;
3153
break
3154
}
3155
if (r && o.label < r[2]) {
3156
o.label = r[2], o.ops.push(a);
3157
break
3158
}
3159
r[2] && o.ops.pop(), o.trys.pop();
3160
continue
3161
}
3162
a = t.call(e, o)
3163
} catch (e) {
3164
a = [6, e], n = 0
3165
} finally {
3166
i = r = 0
3167
}
3168
if (5 & a[0]) throw a[1];
3169
return {
3170
value: a[0] ? a[1] : void 0,
3171
done: !0
3172
}
3173
}([a, s])
3174
}
3175
}
3176
};
3177
3178
function Ne() {
3179
3180
}
3181
var Qe = function(e, t, i, n) {
3182
return new(i || (i = Promise))((function(r, a) {
3183
function o(e) {
3184
try {
3185
d(n.next(e))
3186
} catch (e) {
3187
a(e)
3188
}
3189
}
3190
3191
function s(e) {
3192
try {
3193
d(n.throw(e))
3194
} catch (e) {
3195
a(e)
3196
}
3197
}
3198
3199
function d(e) {
3200
var t;
3201
e.done ? r(e.value) : (t = e.value, t instanceof i ? t : new i((function(e) {
3202
e(t)
3203
}))).then(o, s)
3204
}
3205
d((n = n.apply(e, t || [])).next())
3206
}))
3207
},
3208
Fe = function(e, t) {
3209
var i, n, r, a, o = {
3210
label: 0,
3211
sent: function() {
3212
if (1 & r[0]) throw r[1];
3213
return r[1]
3214
},
3215
trys: [],
3216
ops: []
3217
};
3218
return a = {
3219
next: s(0),
3220
throw: s(1),
3221
return: s(2)
3222
}, "function" == typeof Symbol && (a[Symbol.iterator] = function() {
3223
return this
3224
}), a;
3225
3226
function s(a) {
3227
return function(s) {
3228
return function(a) {
3229
if (i) throw new TypeError("Generator is already executing.");
3230
for (; o;) try {
3231
if (i = 1, n && (r = 2 & a[0] ? n.return : a[0] ? n.throw || ((r = n.return) && r.call(n), 0) : n.next) && !(r = r.call(n, a[1])).done) return r;
3232
switch (n = 0, r && (a = [2 & a[0], r.value]), a[0]) {
3233
case 0:
3234
case 1:
3235
r = a;
3236
break;
3237
case 4:
3238
return o.label++, {
3239
value: a[1],
3240
done: !1
3241
};
3242
case 5:
3243
o.label++, n = a[1], a = [0];
3244
continue;
3245
case 7:
3246
a = o.ops.pop(), o.trys.pop();
3247
continue;
3248
default:
3249
if (!(r = o.trys, (r = r.length > 0 && r[r.length - 1]) || 6 !== a[0] && 2 !== a[0])) {
3250
o = 0;
3251
continue
3252
}
3253
if (3 === a[0] && (!r || a[1] > r[0] && a[1] < r[3])) {
3254
o.label = a[1];
3255
break
3256
}
3257
if (6 === a[0] && o.label < r[1]) {
3258
o.label = r[1], r = a;
3259
break
3260
}
3261
if (r && o.label < r[2]) {
3262
o.label = r[2], o.ops.push(a);
3263
break
3264
}
3265
r[2] && o.ops.pop(), o.trys.pop();
3266
continue
3267
}
3268
a = t.call(e, o)
3269
} catch (e) {
3270
a = [6, e], n = 0
3271
} finally {
3272
i = r = 0
3273
}
3274
if (5 & a[0]) throw a[1];
3275
return {
3276
value: a[0] ? a[1] : void 0,
3277
done: !0
3278
}
3279
}([a, s])
3280
}
3281
}
3282
},
3283
Xe = !1,
3284
Ze = function() {
3285
return Qe(void 0, void 0, void 0, (function() {
3286
var e, t, i;
3287
return Fe(this, (function(n) {
3288
switch (n.label) {
3289
case 0:
3290
if (Xe) return [2];
3291
n.label = 1;
3292
case 1:
3293
return n.trys.push([1, 4, , 5]), [4, fetch("./touchControllerConfig.json")];
3294
case 2:
3295
return [4, n.sent().json()];
3296
case 3:
3297
return (e = n.sent()) && ((t = document.createElement("script")).src = "//game-cdn.poki.com/scripts/touchOverlayController.js", t.onload = function() {
3298
new window.OverlayController(document.body, e)
3299
}, document.head.appendChild(t), Xe = !0), [3, 5];
3300
case 4:
3301
return i = n.sent(), console.log(i), [3, 5];
3302
case 5:
3303
return [2]
3304
}
3305
}))
3306
}))
3307
};
3308
const Ke = function() {
3309
for (var e = Math.floor(Date.now() / 1e3), t = "", i = 0; i < 4; i++) t = String.fromCharCode(255 & e) + t, e >>= 8;
3310
if (window.crypto && crypto.getRandomValues && Uint32Array) {
3311
var n = new Uint32Array(12);
3312
crypto.getRandomValues(n);
3313
for (i = 0; i < 12; i++) t += String.fromCharCode(255 & n[i])
3314
} else
3315
for (i = 0; i < 12; i++) t += String.fromCharCode(Math.floor(256 * Math.random()));
3316
return btoa(t).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "")
3317
};
3318
var He = function() {
3319
function e() {
3320
this.slotMap = new Map
3321
}
3322
return e.prototype.waitUntilReady = function(e) {
3323
window.pbjs.que.push((function() {
3324
e()
3325
}))
3326
}, e.prototype.setupSlotRenderEndedListener = function() {
3327
var e = this;
3328
this.waitUntilReady((function() {
3329
window.googletag.pubads().addEventListener("slotRenderEnded", (function(t) {
3330
})), window.googletag.pubads().addEventListener("impressionViewable", (function(t) {
3331
}))
3332
}))
3333
}, e.prototype.validateDisplaySettings = function(e) {
3334
return !!(S() || E() || ["970x250", "300x250", "728x90", "160x600", "320x50"].includes(e)) && !((S() || E()) && !["320x50"].includes(e))
3335
}, e.prototype.getDisplaySlotConfig = function(e) {
3336
var t = e.split("x").map((function(e) {
3337
return parseInt(e, 10)
3338
})),
3339
i = "/21682198607/debug-display/debug-display-" + e,
3340
n = "desktop";
3341
S() && (n = "mobile"), E() && (n = "tablet");
3342
var a = parseInt(_("site_id"), 10) || 0;
3343
return r.debug || (i = nt.GetIsPokiIFrame() ? "/21682198607/" + n + "_ingame_" + e + "/" + a + "_" + n + "_ingame_" + e : "/21682198607/external_" + n + "_display_ingame/external_" + n + "_ingame_" + e), {
3344
id: "poki-" + Ke(),
3345
adUnitPath: i,
3346
size: e,
3347
width: t[0],
3348
height: t[1],
3349
refresh: !1
3350
}
3351
}, e.prototype.renderIGDAd = function(e, t, i, n, r) {
3352
var a = this,
3353
o = this.getIGDSlotID(e);
3354
o && this.slotMap.get(o) && (console.error("displayAd called with a container that already contains an ad"), this.clearIGDAd(e));
3355
var s = this.getDisplaySlotConfig(t);
3356
this.slotMap.set(s.id, s), s.opportunityId = n, s.duringGameplayFn = r;
3357
var d = document.createElement("div");
3358
d.style.width = s.width + "px", d.style.height = s.height + "px", e.appendChild(d), e.setAttribute("data-poki-ad-id", s.id), s.intersectionObserver = new window.IntersectionObserver((function(t) {
3359
var r;
3360
t[0].isIntersecting && (null === (r = s.intersectionObserver) || void 0 === r || r.disconnect(), a.waitUntilReady((function() {
3361
var t = a.slotMap.get(s.id);
3362
if (t && t.opportunityId === n) {
3363
d.style.background = "#CCC", d.innerHTML = "<p>ADVERTISEMENT</p>", d.style.display = "flex", d.style.justifyContent = "center", d.style.alignItems = "center", d.style.position = "absolute", d.style.zIndex = "1", d.style.fontFamily = "Helvetica", d.style.fontSize = "16px", d.style.color = "#888", d.style.pointerEvents = "none";
3364
var r = document.createElement("div");
3365
r.id = s.id, r.className = "poki-ad-slot", r.style.width = s.width + "px", r.style.height = s.height + "px", r.style.position = "relative", r.style.zIndex = "2", r.setAttribute("data-poki-ad-size", s.size), e.appendChild(r), a.setupGPT(s, i), a.requestAd(s)
3366
}
3367
})))
3368
}), {
3369
threshold: 1
3370
}), s.intersectionObserver.observe(d)
3371
}, e.prototype.setupGPT = function(e, t) {
3372
var i;
3373
e.gptSlot = window.googletag.defineSlot(e.adUnitPath, [e.width, e.height], e.id).addService(window.googletag.pubads()), window.googletag.enableServices(), null === (i = e.gptSlot) || void 0 === i || i.clearTargeting(), Object.keys(t).forEach((function(i) {
3374
var n;
3375
null === (n = e.gptSlot) || void 0 === n || n.setTargeting(i, t[i])
3376
}))
3377
}, e.prototype.requestAd = function(e) {
3378
var t, i = this;
3379
dt.track(n.tracking.ads.display.requested, {
3380
size: e.size,
3381
opportunityId: e.opportunityId,
3382
adUnitPath: e.adUnitPath,
3383
refresh: e.refresh,
3384
duringGameplay: null === (t = e.duringGameplayFn) || void 0 === t ? void 0 : t.call(e)
3385
}), window.pbjs.requestBids({
3386
adUnitCodes: [e.adUnitPath],
3387
bidsBackHandler: function() {
3388
i.bidsBackHandler(e.id)
3389
}
3390
})
3391
}, e.prototype.clearIGDAd = function(e) {
3392
var t, i = this.getIGDSlotID(e);
3393
if (i) {
3394
var r = this.slotMap.get(i) || null;
3395
if (r) {
3396
for (dt.track(n.tracking.screen.destroyAd, {
3397
opportunityId: r.opportunityId
3398
}), null === (t = r.intersectionObserver) || void 0 === t || t.disconnect(), r.gptSlot && googletag.destroySlots([r.gptSlot]); e.lastChild;) e.removeChild(e.lastChild);
3399
e.removeAttribute("data-poki-ad-id"), this.slotMap.delete(r.id)
3400
}
3401
} else console.error("destroyAd called on a container without ad")
3402
}, e.prototype.getIGDSlotID = function(e) {
3403
if (!e) return null;
3404
var t = e.getAttribute("data-poki-ad-id");
3405
return t || null
3406
}, e.prototype.bidsBackHandler = function(e) {
3407
var t = this.slotMap.get(e);
3408
t && t.gptSlot && (window.pbjs.setTargetingForGPTAsync([t.adUnitPath]), t.adserverTargeting = window.pbjs.getAdserverTargetingForAdUnitCode([t.adUnitPath]), window.googletag.display(t.id))
3409
}, e
3410
}();
3411
const We = He;
3412
var Ve, qe = (Ve = function(e, t) {
3413
return Ve = Object.setPrototypeOf || {
3414
__proto__: []
3415
}
3416
instanceof Array && function(e, t) {
3417
e.__proto__ = t
3418
} || function(e, t) {
3419
for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i])
3420
}, Ve(e, t)
3421
}, function(e, t) {
3422
if ("function" != typeof t && null !== t) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
3423
3424
function i() {
3425
this.constructor = e
3426
}
3427
Ve(e, t), e.prototype = null === t ? Object.create(t) : (i.prototype = t.prototype, new i)
3428
}),
3429
Je = function(e) {
3430
function t() {
3431
return null !== e && e.apply(this, arguments) || this
3432
}
3433
return qe(t, e), t.prototype.waitUntilReady = function(e) {
3434
window.pbjs.que.push((function() {
3435
e()
3436
}))
3437
}, t.prototype.requestAd = function(t) {
3438
z({
3439
event: "request",
3440
size: t.size,
3441
opportunityId: t.opportunityId,
3442
adUnitPath: t.adUnitPath,
3443
p4d_game_id: tt.gameId,
3444
p4d_version_id: tt.versionId
3445
}), e.prototype.requestAd.call(this, t)
3446
}, t.prototype.bidsBackHandler = function(e) {
3447
var t, i, r = this.slotMap.get(e);
3448
if (r) {
3449
var a = document.createElement("iframe");
3450
a.setAttribute("frameborder", "0"), a.setAttribute("scrolling", "no"), a.setAttribute("marginheight", "0"), a.setAttribute("marginwidth", "0"), a.setAttribute("topmargin", "0"), a.setAttribute("leftmargin", "0"), a.setAttribute("allowtransparency", "true"), a.setAttribute("width", "" + r.width), a.setAttribute("height", "" + r.height);
3451
var o = document.getElementById(r.id);
3452
if (o) {
3453
o.appendChild(a);
3454
var s = null === (t = null == a ? void 0 : a.contentWindow) || void 0 === t ? void 0 : t.document;
3455
if (!s) return console.error("IGD error - iframe injection for ad failed", e), void this.clearIGDAd(o.parentNode);
3456
if (r.adserverTargeting = window.pbjs.getAdserverTargetingForAdUnitCode([r.adUnitPath]), !r.adserverTargeting.hb_adid) return console.error("IGD info - nothing to render", e, r.adserverTargeting), void this.clearIGDAd(o.parentNode);
3457
var d = r.adserverTargeting.hb_bidder,
3458
A = parseFloat(r.adserverTargeting.hb_pb);
3459
isNaN(A) && (A = 0), window.pbjs.renderAd(s, r.adserverTargeting.hb_adid), dt.track(n.tracking.ads.display.impression, {
3460
size: r.size,
3461
opportunityId: r.opportunityId,
3462
duringGameplay: null === (i = r.duringGameplayFn) || void 0 === i ? void 0 : i.call(r),
3463
adUnitPath: r.adUnitPath,
3464
prebidBid: A,
3465
prebidBidder: d,
3466
preBidWon: !0,
3467
dfpIsBackfill: !1,
3468
dfpLineItemId: void 0,
3469
dfpCampaignId: void 0
3470
}), z({
3471
event: "impression",
3472
size: r.size,
3473
opportunityId: r.opportunityId,
3474
adUnitPath: r.adUnitPath,
3475
p4d_game_id: tt.gameId,
3476
p4d_version_id: tt.versionId,
3477
bidder: d,
3478
bid: A
3479
}), r.intersectionObserver = new IntersectionObserver((function(e) {
3480
e.forEach((function(e) {
3481
e.isIntersecting ? r.intersectingTimer || (r.intersectingTimer = setTimeout((function() {
3482
var t, i;
3483
null === (t = r.intersectionObserver) || void 0 === t || t.unobserve(e.target), dt.track(n.tracking.ads.display.viewable, {
3484
size: r.size,
3485
opportunityId: r.opportunityId,
3486
duringGameplay: null === (i = r.duringGameplayFn) || void 0 === i ? void 0 : i.call(r),
3487
adUnitPath: r.adUnitPath
3488
}), z({
3489
event: "viewable",
3490
size: r.size,
3491
opportunityId: r.opportunityId,
3492
adUnitPath: r.adUnitPath,
3493
p4d_game_id: tt.gameId,
3494
p4d_version_id: tt.versionId,
3495
bidder: d,
3496
bid: A
3497
})
3498
}), 1e3)) : r.intersectingTimer && (clearTimeout(r.intersectingTimer), r.intersectingTimer = void 0)
3499
}))
3500
}), {
3501
threshold: .5
3502
}), r.intersectionObserver.observe(o)
3503
} else console.error("IGD error - container not found", e)
3504
}
3505
}, t.prototype.setupGPT = function(e, t) {}, t.prototype.setupSlotRenderEndedListener = function() {}, t
3506
}(We);
3507
const Ye = Je;
3508
var $e = function() {
3509
return $e = Object.assign || function(e) {
3510
for (var t, i = 1, n = arguments.length; i < n; i++)
3511
for (var r in t = arguments[i]) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
3512
return e
3513
}, $e.apply(this, arguments)
3514
},
3515
et = function(e, t, i) {
3516
if (i || 2 === arguments.length)
3517
for (var n, r = 0, a = t.length; r < a; r++) !n && r in t || (n || (n = Array.prototype.slice.call(t, 0, r)), n[r] = t[r]);
3518
return e.concat(n || Array.prototype.slice.call(t))
3519
},
3520
tt = {
3521
gameId: _("game_id"),
3522
versionId: _("game_version_id")
3523
},
3524
it = function() {
3525
function e() {
3526
this.autoStartOnReady = !1, this.criteria = {}, this.debugIsOverwritten = !1, this.handlers = {}, this.initializingPromise = null, this.isInitialized = !1, this.programmaticAdsEnabled = !0, this.sdkBooted = !1, this.sdkImaError = !1, this.startAdEnabled = !1, this.startStartAdsAfterTimerOnInit = !1, this.initOptions = {}, this.forceDisableCommercialBreak = !1, this.installedTCFv2 = !1, this.installedUSP = !1, this.isBot = !1, this.adReady = !1, this.debugTouchOverlayController = !1, this.setPlayerAge = function(e) {
3527
e && function(e, t) {
3528
if (Se) try {
3529
localStorage.setItem(e, t)
3530
} catch (i) {
3531
Se = !1, Ee[e] = t
3532
} else Ee[e] = t
3533
}("playerAge", e)
3534
}, this.toggleNonPersonalized = function(t) {
3535
e.nonPersonalized = t
3536
}, this.setConsentString = function(t) {
3537
e.consentString = t
3538
}, this.setLogging = function(e) {
3539
r.log = e
3540
}, this.sdkNotBootedButCalled = function() {
3541
console.error("The Poki SDK has not yet been initialized")
3542
}, d() ? this.IGD = new Ye : this.IGD = new We;
3543
var t = _("pokiDebug");
3544
"" !== t && (this.setDebug("true" === t), this.debugIsOverwritten = !0), "" !== _("pokiLogging") && this.setLogging(!0)
3545
}
3546
return e.prototype.init = function(e) {
3547
if (void 0 === e && (e = {}), "undefined" != typeof window) {
3548
var t = e.onReady,
3549
i = void 0 === t ? null : t,
3550
n = e.onAdblocked,
3551
r = void 0 === n ? null : n;
3552
return this.initOptions = e, i && this.registerHandler("onReady", i), r && this.registerHandler("onAdblocked", r), this.isInitialized ? console.error("Poki SDK has already been initialized") : (this.initializingPromise || (this.initializingPromise = this.lazyLoadInit()), this.initializingPromise)
3553
}
3554
}, e.prototype.lazyLoadInit = function() {
3555
var t = this,
3556
i = this.initOptions,
3557
a = i.debug,
3558
s = void 0 !== a && a,
3559
d = i.prebid,
3560
A = void 0 === d ? {} : d,
3561
c = i.a9,
3562
p = void 0 === c ? {} : c,
3563
u = i.volume,
3564
h = void 0 === u ? 1 : u,
3565
m = i.waterfallRetries,
3566
g = i.wrapper,
3567
v = void 0 === g ? document.body : g,
3568
f = parseInt(_("site_id"), 10) || 0;
3569
this.isBot = "1" === _("bot") || {
3570
3571
}, this.setupDefaultEvents(), dt.setupDefaultEvents(), e.GetIsPokiIFrame() && _e(), setTimeout(w.trackSavegames, 1e4);
3572
var b = $e({}, l),
3573
y = Ge;
3574
r.debug && (y = function() {
3575
return Promise.resolve()
3576
});
3577
var k = Ne,
3578
I = _("ccpaApplies"),
3579
x = this.initOptions.country || _("country"),
3580
C = void 0 !== this.initOptions.isCCPA ? this.initOptions.isCCPA : "" !== I ? "1" === I : void 0;
3581
x && void 0 !== C && (k = function() {
3582
return Promise.resolve({
3583
ISO: x,
3584
ccpaApplies: C
3585
})
3586
});
3587
var T = !1;
3588
x && ($(A, x), T = !0), window.addEventListener("resize", this.resize.bind(this), !1), window.addEventListener("message", this.onMessage.bind(this), !1), this.debugIsOverwritten || this.setDebug(r.debug || s), this.debugTouchOverlayController && (S() || E()) && Ze();
3589
var B = [y(), k()],
3590
P = et([], B, !0);
3591
this.isBot || P.push(Le(""));
3592
var D = function(e, i, a) {
3593
if (void 0 === a && (a = !0), t.country = x || (null == i ? void 0 : i.ISO) || "zz", t.isCCPA = void 0 === C ? (null == i ? void 0 : i.ccpaApplies) || !1 : C, e) {
3594
tt.gameId || (tt.gameId = e.gameId);
3595
[""].includes(tt.gameId) && (S() || E()) && Ze(), b.adTiming = e.adTiming, b.customCriteria = $e($e({}, b.customCriteria), {
3596
p4d_game_id: tt.gameId
3597
})
3598
}
3599
Be(t.country) && !r.debug && (ie(), console.debug("GDPR - waiting for __tcfapi callback"), window.__tcfapi("ping", 2, (function() {
3600
console.debug("GDPR - __tcfapi callback received"), t.installedTCFv2 = !0, a && o.dispatchEvent(n.ready)
3601
})), setTimeout((function() {
3602
t.installedTCFv2 || (console.error("GDPR - No __tcfapi callback after 2s, verify implementation!"), a && o.dispatchEvent(n.ready))
3603
}), 2e3)), t.isCCPA && !r.debug && (ne(), console.debug("USPrivacy - waiting for __uspapi callback"), window.__uspapi("uspPing", 1, (function() {
3604
console.debug("USPrivacy - __uspapi callback received"), t.installedUSP = !0, a && o.dispatchEvent(n.ready)
3605
})), setTimeout((function() {
3606
t.installedUSP || (console.error("USPrivacy - No __uspapi callback after 2s, verify implementation!"), a && o.dispatchEvent(n.ready))
3607
}), 2e3))
3608
};
3609
return Promise.all(P).catch((function() {
3610
Promise.all(B).then((function(e) {
3611
var t = e[0],
3612
i = e[1];
3613
D(t, i, !1)
3614
})), o.dispatchEvent(n.adblocked)
3615
})).then((function(e) {
3616
if (void 0 !== e) {
3617
var i = e[0],
3618
a = e[1];
3619
D(i, a), T || $(A, t.country), r.debug && (b.adTiming.startAdsAfter = 0), t.enableSettings(b), t.playerSkin = new we({
3620
wrapper: v
3621
}), t.ima = new Re(h), t.playerSkin.setupEvents(t), t.startStartAdsAfterTimerOnInit && t.adTimings.startStartAdsAfterTimer(), t.waterfall = new oe(t.ima, {
3622
timing: t.adTimings,
3623
totalRetries: m,
3624
siteID: f,
3625
country: t.country
3626
}), t.IGD.setupSlotRenderEndedListener();
3627
var s = Be(t.country);
3628
te(p, t.country, s), t.isInitialized = !0, t.isCCPA || s || o.dispatchEvent(n.ready), r.debug && o.dispatchEvent(n.ready)
3629
}
3630
}))
3631
}, e.prototype.requestAd = function(e) {
3632
void 0 === e && (e = {});
3633
var t = e.autoStart,
3634
i = void 0 === t || t,
3635
a = e.onFinish,
3636
d = void 0 === a ? null : a,
3637
A = e.onStart,
3638
c = void 0 === A ? null : A,
3639
l = e.position,
3640
p = void 0 === l ? null : l;
3641
if (this.autoStartOnReady = !1 !== i, d && this.registerHandler("onFinish", d), c && this.registerHandler("onStart", c), this.forceDisableCommercialBreak && [n.ads.position.midroll, n.ads.position.preroll].includes(p)) d && d();
3642
else if (this.isBot) d && d({});
3643
else {
3644
if (!this.sdkBooted) return o.dispatchEvent(n.ads.error, {
3645
message: "Requesting ad on unbooted SDK"
3646
}), void this.sdkNotBootedButCalled();
3647
else if (!S() && !E() || p === n.ads.position.rewarded)
3648
if (null !== p && s(p, n.ads.position))
3649
if (!Be(this.country) || this.installedTCFv2 || r.debug)
3650
if (!this.isCCPA || this.installedUSP)
3651
if (this.adReady) o.dispatchEvent(n.ads.ready);
3652
3653
if (p === n.ads.position.rewarded) {
3654
3655
} else o.dispatchEvent(n.ads.limit, {
3656
reason: n.info.messages.timeLimit
3657
});
3658
3659
}
3660
}, e.prototype.displayAd = function(e, t, i, a) {
3661
if (!this.isBot) {
3662
var s = n.ads.position.display;
3663
if (!Be(this.country) || this.installedTCFv2 || r.debug)
3664
if (!this.isCCPA || window.__uspapi)
3665
if (t) {
3666
if (!this.sdkBooted) return o.dispatchEvent(n.ads.error, {
3667
message: "Requesting ad on unbooted SDK",
3668
position: s
3669
}), void this.sdkNotBootedButCalled();
3670
if (e)
3671
if (this.sdkImaError) o.dispatchEvent(n.ads.error, {
3672
message: "Adblocker has been detected",
3673
position: s
3674
});
3675
else {
3676
if (!this.IGD.validateDisplaySettings(t)) return o.dispatchEvent(n.ads.error, {
3677
reason: "Display size " + t + " is not supported on this device",
3678
position: s
3679
});
3680
var d = $e($e({}, this.genericCriteria()), this.criteria);
3681
this.IGD.renderIGDAd(e, t, d, i, a)
3682
}
3683
else o.dispatchEvent(n.ads.error, {
3684
message: "Provided container does not exist",
3685
position: s
3686
})
3687
} else o.dispatchEvent(n.ads.error, {
3688
message: "No ad size given, usage: displayAd(<container>, <size>)",
3689
position: s
3690
});
3691
else o.dispatchEvent(n.ads.error, {
3692
message: "No USP detected, please contact [email protected] for more information",
3693
position: s
3694
});
3695
else o.dispatchEvent(n.ads.error, {
3696
message: "No TCFv2 CMP detected, please contact [email protected] for more information",
3697
position: s
3698
})
3699
}
3700
}, e.prototype.destroyAd = function(e) {
3701
if (!this.sdkBooted) return o.dispatchEvent(), void this.sdkNotBootedButCalled();
3702
this.sdkImaError ? o.dispatchEvent() : (e = e || document.body, this.IGD.clearIGDAd(e))
3703
}, e.prototype.startStartAdsAfterTimer = function() {
3704
}, e.prototype.enableSettings = function(e) {
3705
this.criteria = $e({}, e.customCriteria), this.adTimings = new u(e.adTiming)
3706
}, e.prototype.togglePlayerAdvertisingConsent = function(e) {
3707
if (e) {
3708
var t, i = parseInt(function(e) {
3709
if (!Se) return Ee[e];
3710
try {
3711
return localStorage.getItem(e)
3712
} catch (t) {
3713
return Ee[e]
3714
}
3715
}("playerAge"), 10) || 0,
3716
n = this.country,
3717
r = Be(n),
3718
a = (t = n, Ce.includes(t)),
3719
o = Pe(n);
3720
(r || a || Pe) && (r && i <= 12 || a && i <= 16 || o && i <= 16) ? this.disableProgrammatic(): this.enableProgrammatic()
3721
} else this.disableProgrammatic()
3722
}, e.prototype.disableProgrammatic = function() {
3723
e.childDirected = !0, this.programmaticAdsEnabled = !1
3724
}, e.prototype.enableProgrammatic = function() {
3725
e.childDirected = !1, this.programmaticAdsEnabled = !0
3726
}, e.prototype.getProgrammaticAdsEnabled = function() {
3727
return this.programmaticAdsEnabled
3728
}, e.prototype.setDebug = function(e) {
3729
this.debugIsOverwritten ? e && dt.track(n.tracking.debugTrueInProduction) : r.debug = e
3730
}, e.prototype.resize = function() {
3731
var e = this;
3732
if (!this.sdkBooted) return this.sdkNotBootedButCalled();
3733
if (!this.sdkImaError) {
3734
var t = this.playerSkin.getVideoBounds();
3735
0 !== t.width && 0 !== t.height ? this.ima.resize(t.width, t.height) : setTimeout((function() {
3736
e.resize()
3737
}), 100)
3738
}
3739
}, e.prototype.onMessage = function(e) {
3740
if ("string" == typeof e.data.type) switch (e.data.type) {
3741
case "toggleNonPersonalized":
3742
this.toggleNonPersonalized(!(!e.data.content || !e.data.content.nonPersonalized));
3743
break;
3744
case "setPersonalizedADConsent":
3745
this.toggleNonPersonalized(!(e.data.content && e.data.content.consent)), this.setConsentString(e.data.content ? e.data.content.consentString : "");
3746
break;
3747
case "forceDisableCommercialBreak":
3748
this.forceDisableCommercialBreak = !0
3749
}
3750
}, e.prototype.startAd = function() {
3751
if (!this.sdkBooted) return this.sdkNotBootedButCalled();
3752
this.sdkImaError || (this.adReady ? (this.resize(), this.ima.startPlayback()) : o.dispatchEvent(n.ads.error, {
3753
message: "No ads ready to start"
3754
}))
3755
}, e.prototype.startAdClicked = function() {
3756
"undefined" != typeof navigator && /(iPad|iPhone|iPod)/gi.test(navigator.userAgent) && this.startAdEnabled && (this.startAdEnabled = !1, this.playerSkin.hideStartAdButton(), this.ima.startIOSPlayback())
3757
}, e.prototype.stopAd = function() {
3758
if (!this.sdkBooted) return this.sdkNotBootedButCalled();
3759
this.sdkImaError || (this.waterfall.stopWaterfall(), this.ima.stopPlayback(), this.playerSkin.hide())
3760
}, e.prototype.resumeAd = function() {
3761
if (!this.sdkBooted) return this.sdkNotBootedButCalled();
3762
this.sdkImaError || (this.playerSkin.hidePauseButton(), this.ima.resumeAd())
3763
}, e.prototype.skipAd = function() {
3764
this.stopAd(), this.callHandler("onFinish", {
3765
type: n.ads.completed,
3766
rewardAllowed: !0
3767
})
3768
}, e.prototype.muteAd = function() {
3769
if (!this.sdkBooted) return this.sdkNotBootedButCalled();
3770
this.sdkImaError || this.ima.muteAd()
3771
}, e.prototype.registerHandler = function(e, t) {
3772
this.handlers[e] = t
3773
}, e.prototype.callHandler = function(e) {
3774
for (var t = [], i = 1; i < arguments.length; i++) t[i - 1] = arguments[i];
3775
"function" == typeof this.handlers[e] && this.handlers[e](t)
3776
}, e.prototype.setupDefaultEvents = function() {
3777
var e = this;
3778
o.addEventListener(n.ready, (function() {
3779
e.sdkBooted = !0, e.callHandler("onReady")
3780
})), o.addEventListener(n.adblocked, (function() {
3781
e.sdkBooted = !0, e.callHandler("onReady")
3782
})), o.addEventListener(n.ads.ready, (function() {
3783
e.adReady = !0, e.callHandler("onReady")
3784
})), o.addEventListener(n.ads.started, (function() {
3785
e.playerSkin.hideSpinner(), e.callHandler("onStart", {
3786
type: n.ads.limit
3787
})
3788
})), o.addEventListener(n.ads.video.paused, (function() {
3789
e.playerSkin.showPauseButton()
3790
})), o.addEventListener(n.ads.limit, (function() {
3791
e.callHandler("onFinish", {
3792
type: n.ads.limit,
3793
rewardAllowed: !1
3794
})
3795
})), o.addEventListener(n.ads.stopped, (function() {
3796
e.callHandler("onFinish", {
3797
type: n.ads.stopped,
3798
rewardAllowed: !1
3799
})
3800
})), o.addEventListener(n.ads.error, (function() {
3801
e.callHandler("onFinish", {
3802
type: n.ads.error,
3803
rewardAllowed: !1
3804
})
3805
})), o.addEventListener(n.ads.busy, (function() {
3806
e.callHandler("onFinish", {
3807
type: n.ads.busy,
3808
rewardAllowed: !1
3809
})
3810
})), o.addEventListener(n.ads.completed, (function(t) {
3811
e.callHandler("onFinish", {
3812
type: n.ads.completed,
3813
rewardAllowed: !!t.rewardAllowed
3814
})
3815
})), [n.ads.limit, n.ads.stopped, n.ads.error, n.ads.busy, n.ads.completed].forEach((function(t) {
3816
o.addEventListener(t, (function() {
3817
e.playerSkin && e.playerSkin.hide(), e.adReady = !1
3818
}))
3819
}))
3820
}, e.prototype.genericCriteria = function() {
3821
var e = {},
3822
t = encodeURIComponent(_("tag") || ""),
3823
i = encodeURIComponent(_("site_id") || ""),
3824
n = encodeURIComponent(_("experiment") || ""),
3825
r = encodeURIComponent(_("categories") || "");
3826
return e.tag = t, e.tag_site = t + "|" + i, e.site_id = i, e.experiment = n, e.categories = r, this.programmaticAdsEnabled || (e.disable_programmatic = 1), e
3827
}, e.prototype.setVolume = function(e) {
3828
this.ima && this.ima.setVolume(e)
3829
}, e.GetIsPokiIFrame = function() {
3830
return (parseInt(_("site_id"), 10) || 0) > 0
3831
}, e.childDirected = !1, e.nonPersonalized = !1, e.consentString = "", e
3832
}();
3833
const nt = it;
3834
const rt = function() {
3835
function e() {}
3836
return e.sendMessage = function(e, t) {
3837
var i = window.parent;
3838
if (!s(e, n.message)) {
3839
var r = Object.keys(n.message).map((function(e) {
3840
return "poki.message." + e
3841
}));
3842
throw new TypeError("Argument 'type' must be one of " + r.join(", "))
3843
}
3844
var a = t || {};
3845
tt.gameId && tt.versionId && (a.pokifordevs = {
3846
game_id: tt.gameId,
3847
game_version_id: tt.versionId
3848
}), i.postMessage({
3849
type: e,
3850
content: a
3851
}, "*")
3852
}, e
3853
}();
3854
var at = function(e) {
3855
var t = new Array;
3856
return Object.keys(e).forEach((function(i) {
3857
"object" == typeof e[i] ? t = t.concat(at(e[i])) : t.push(e[i])
3858
})), t
3859
};
3860
var ot = function() {
3861
return ot = Object.assign || function(e) {
3862
for (var t, i = 1, n = arguments.length; i < n; i++)
3863
for (var r in t = arguments[i]) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
3864
return e
3865
}, ot.apply(this, arguments)
3866
},
3867
st = at(n.tracking);
3868
const dt = function() {
3869
function e() {}
3870
return e.track = function(e, t) {
3871
if (void 0 === t && (t = {}), -1 === st.indexOf(e)) throw new TypeError("Invalid 'event', must be one of " + st.join(", "));
3872
if ("object" != typeof t) throw new TypeError("Invalid data, must be an object");
3873
var i = o.getDataAnnotations();
3874
if (null == i ? void 0 : i.vhbOnlyMode) switch (e) {
3875
case n.tracking.ads.status.impression:
3876
z(ot({
3877
event: "video-impression",
3878
size: "640x360v"
3879
}, i));
3880
break;
3881
case n.tracking.ads.video.error:
3882
z(ot({
3883
event: "video-error",
3884
size: "640x360v"
3885
}, i));
3886
break;
3887
case n.tracking.ads.video.loaderError:
3888
z(ot({
3889
event: "video-adsloader-error",
3890
size: "640x360v"
3891
}, i));
3892
break;
3893
case n.tracking.ads.status.completed:
3894
z(ot({
3895
event: "video-complete",
3896
size: "640x360v"
3897
}, i))
3898
}
3899
if (r.debug || r.log) {
3900
if (window.process && window.process.env && "test" === window.process.env.NODE_ENV) return;
3901
Object.keys(t).length ? console.info("%cPOKI_TRACKER: %cTracked event '" + e + "' with data:", "font-weight: bold", "", t) : console.info("%cPOKI_TRACKER: %cTracked event '" + e + "'", "font-weight: bold", "")
3902
}
3903
rt.sendMessage(n.message.event, {
3904
event: e,
3905
data: t
3906
})
3907
}, e.setupDefaultEvents = function() {
3908
var t, i = ((t = {})[n.ready] = n.tracking.sdk.status.initialized, t[n.adblocked] = console.log(n.tracking.sdk.status.failed), t[n.ads.busy] = n.tracking.ads.status.busy, t[n.ads.completed] = n.tracking.ads.status.completed, t[n.ads.error] = console.log(n.tracking.ads.status.error), t[n.ads.displayError] = console.log(n.tracking.ads.status.displayError), t[n.ads.impression] = n.tracking.ads.status.impression, t[n.ads.limit] = n.tracking.ads.status.limit, t[n.ads.ready] = n.tracking.ads.status.ready, t[n.ads.requested] = n.tracking.ads.status.requested, t[n.ads.prebidRequested] = n.tracking.ads.status.prebidRequested, t[n.ads.skipped] = n.tracking.ads.status.skipped, t[n.ads.started] = n.tracking.ads.status.started, t[n.ads.video.clicked] = n.tracking.ads.video.clicked, t[n.ads.video.error] = n.tracking.ads.video.error, t[n.ads.video.loaderError] = n.tracking.ads.video.loaderError, t[n.ads.video.buffering] = n.tracking.ads.status.buffering, t[n.ads.video.progress] = n.tracking.ads.video.progress, t[n.ads.video.paused] = n.tracking.ads.video.paused, t[n.ads.video.resumed] = n.tracking.ads.video.resumed, t[n.tracking.screen.gameplayStart] = n.tracking.screen.gameplayStart, t[n.tracking.screen.gameplayStop] = n.tracking.screen.gameplayStop, t[n.tracking.screen.loadingProgress] = n.tracking.screen.loadingProgress, t[n.tracking.screen.commercialBreak] = n.tracking.screen.commercialBreak, t[n.tracking.screen.rewardedBreak] = n.tracking.screen.rewardedBreak, t[n.tracking.screen.happyTime] = n.tracking.screen.happyTime, t);
3909
Object.keys(i).forEach((function(t) {
3910
o.addEventListener(t, (function(n) {
3911
e.track(i[t], n)
3912
}))
3913
}))
3914
}, e
3915
}();
3916
3917
function At(e) {
3918
switch (Object.prototype.toString.call(e)) {
3919
case "[object Error]":
3920
case "[object Exception]":
3921
case "[object DOMException]":
3922
return !0;
3923
default:
3924
return e instanceof Error
3925
}
3926
}
3927
var ct = "poki_erruid",
3928
lt = Date.now(),
3929
pt = m(ct);
3930
3931
function ut(e) {
3932
if (tt.gameId && tt.versionId) {
3933
if (!(Date.now() < lt)) {
3934
pt || (pt = Math.random().toString(36).substr(2, 9), g(ct, pt));
3935
try {
3936
var t = JSON.stringify({
3937
gid: tt.gameId,
3938
vid: tt.versionId,
3939
ve: 7,
3940
n: e.name,
3941
m: e.message,
3942
s: JSON.stringify(e.stack),
3943
ui: pt
3944
}),
3945
i = "https://t.poki.io/ge";
3946
if (navigator.sendBeacon) navigator.sendBeacon(i, t);
3947
else {
3948
var n = new XMLHttpRequest;
3949
n.open("POST", i, !0), n.send(t)
3950
}
3951
lt = Date.now() + 100
3952
} catch (e) {
3953
console.error(e)
3954
}
3955
}
3956
} else console.log(e)
3957
}
3958
"undefined" != typeof window && (t().remoteFetching = !1, t().report.subscribe((function(e) {
3959
if ("Script error." === e.message && window.pokiLastCatch) {
3960
var i = window.pokiLastCatch;
3961
window.pokiLastCatch = null, t().report(i)
3962
} else ut(e)
3963
})), window.onunhandledrejection = function(e) {
3964
At(e.reason) ? t().report(e.reason) : ut({
3965
name: "unhandledrejection",
3966
message: JSON.stringify(e.reason)
3967
})
3968
});
3969
var ht = function() {
3970
return ht = Object.assign || function(e) {
3971
for (var t, i = 1, n = arguments.length; i < n; i++)
3972
for (var r in t = arguments[i]) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
3973
return e
3974
}, ht.apply(this, arguments)
3975
},
3976
mt = function() {
3977
function t() {
3978
var t = this;
3979
this.gameStarted = !1, this.SDK = new nt, this.gameplayStartCounter = 0, this.gameplayStopCounter = 0, this.duringGameplay = !1, this.init = function(e) {
3980
return void 0 === e && (e = {}), new Promise((function(i, r) {
3981
t.SDK.init(ht({
3982
onReady: function() {
3983
if (_("preroll")) {
3984
var e = t.SDK.adTimings.prerollPossible;
3985
t.SDK.adTimings.prerollPossible = function() {
3986
return !0
3987
}, t.commercialBreak(), t.SDK.adTimings.prerollPossible = e
3988
}
3989
i()
3990
},
3991
onAdblocked: r
3992
}, e)), rt.sendMessage(n.message.sdkDetails, {
3993
version: "2.234.2"
3994
})
3995
}))
3996
}, this.initWithVideoHB = function() {
3997
return t.init()
3998
}, this.gameLoadingProgress = function(e) {
3999
var t = {};
4000
void 0 !== e.percentageDone && (t.percentageDone = Number(e.percentageDone)), void 0 !== e.kbLoaded && (t.kbLoaded = Number(e.kbLoaded)), void 0 !== e.kbTotal && (t.kbTotal = Number(e.kbTotal)), void 0 !== e.fileNameLoaded && (t.fileNameLoaded = String(e.fileNameLoaded)), void 0 !== e.filesLoaded && (t.filesLoaded = Number(e.filesLoaded)), void 0 !== e.filesTotal && (t.filesTotal = Number(e.filesTotal)), dt.track(n.tracking.screen.gameLoadingProgress, t)
4001
}, this.gameLoadingStart = function() {
4002
var e, t;
4003
dt.track(n.tracking.screen.gameLoadingStarted, {
4004
now: Math.round(null === (t = null === (e = window.performance) || void 0 === e ? void 0 : e.now) || void 0 === t ? void 0 : t.call(e)) || void 0
4005
})
4006
}, this.gameLoadingFinished = function() {
4007
var e, t, i, r, a;
4008
try {
4009
i = performance.getEntriesByType("resource").map((function(e) {
4010
return e.transferSize
4011
})).reduce((function(e, t) {
4012
return e + t
4013
})), i += performance.getEntriesByType("navigation")[0].transferSize
4014
} catch (e) {}
4015
dt.track(n.tracking.screen.gameLoadingFinished, {
4016
transferSize: i,
4017
trackers: (r = window, a = [], "function" != typeof r.ga, r.mixpanel && "function" == typeof r.mixpanel.track && a.push("mixpanel"), r.Countly && a.push("countly"), r.amplitude && a.push("amplitude"), a).join(","),
4018
now: Math.round(null === (t = null === (e = window.performance) || void 0 === e ? void 0 : e.now) || void 0 === t ? void 0 : t.call(e)) || void 0
4019
})
4020
}, this.gameplayStart = function(e) {
4021
t.gameplayStartCounter++, t.duringGameplay = !0, t.gameStarted || (t.gameStarted = !0, dt.track(n.tracking.screen.firstRound), t.SDK.startStartAdsAfterTimer()), dt.track(n.tracking.screen.gameplayStart, ht(ht({}, e), {
4022
playId: t.gameplayStartCounter
4023
}))
4024
}, this.gameInteractive = function() {
4025
dt.track(n.tracking.screen.gameInteractive)
4026
}, this.gameplayStop = function(e) {
4027
t.gameplayStopCounter++, t.duringGameplay = !1, dt.track(n.tracking.screen.gameplayStop, ht(ht({}, e), {
4028
playId: t.gameplayStartCounter,
4029
stopId: t.gameplayStopCounter
4030
}))
4031
}, this.roundStart = function(e) {
4032
void 0 === e && (e = ""), e = String(e), dt.track(n.tracking.screen.roundStart, {
4033
identifier: e
4034
})
4035
}, this.roundEnd = function(e) {
4036
void 0 === e && (e = ""), e = String(e), dt.track(n.tracking.screen.roundEnd, {
4037
identifier: e
4038
})
4039
}, this.customEvent = function(e, i, r) {
4040
void 0 === r && (r = {}), e && i ? (e = String(e), i = String(i), r = ht({}, r), dt.track(n.tracking.custom, {
4041
eventNoun: e,
4042
eventVerb: i,
4043
eventData: r
4044
})) : t.error("customEvent", "customEvent needs at least a noun and a verb")
4045
}, this.commercialBreak = function(e) {
4046
return new Promise((function(i) {
4047
var r = t.gameStarted ? n.ads.position.midroll : n.ads.position.preroll;
4048
o.clearAnnotations(), o.setDataAnnotations({
4049
opportunityId: Ke(),
4050
position: r
4051
}), dt.track(n.tracking.screen.commercialBreak), t.SDK.requestAd({
4052
position: r,
4053
onFinish: i,
4054
onStart: e
4055
})
4056
}))
4057
}, this.rewardedBreak = function(e) {
4058
return new Promise((function(i) {
4059
var r = n.ads.position.rewarded;
4060
o.clearAnnotations(), o.setDataAnnotations({
4061
opportunityId: Ke(),
4062
position: r
4063
}), dt.track(n.tracking.screen.rewardedBreak), t.SDK.requestAd({
4064
position: r,
4065
onFinish: function(e) {
4066
e.length > 0 ? i(e[0].rewardAllowed) : i(!1)
4067
},
4068
onStart: e
4069
})
4070
}))
4071
}, this.happyTime = function(e) {
4072
void 0 === e && (e = 1), ((e = Number(e)) < 0 || e > 1) && (e = Math.max(0, Math.min(1, e)), t.warning("happyTime", "Intensity should be a value between 0 and 1, adjusted to " + e)), dt.track(n.tracking.screen.happyTime, {
4073
intensity: e
4074
})
4075
}, this.muteAd = function() {
4076
t.SDK.muteAd()
4077
}, this.setPlayerAge = function(e) {
4078
e && t.SDK.setPlayerAge(e)
4079
}, this.togglePlayerAdvertisingConsent = function(e) {
4080
dt.track(n.tracking.togglePlayerAdvertisingConsent, {
4081
didConsent: e
4082
}), t.SDK.togglePlayerAdvertisingConsent(e), rt.sendMessage(n.message.toggleProgrammaticAds, {
4083
enabled: t.SDK.getProgrammaticAdsEnabled()
4084
})
4085
}, this.displayAd = function(e, i) {
4086
o.clearAnnotations();
4087
var r = Ke();
4088
dt.track(n.tracking.screen.displayAd, {
4089
size: i,
4090
opportunityId: r,
4091
duringGameplay: t.duringGameplay
4092
}), t.SDK.displayAd(e, i, r, (function() {
4093
return t.duringGameplay
4094
}))
4095
}, this.logError = function(t) {
4096
At(t) ? e.report(t) : ut({
4097
name: "logError",
4098
message: JSON.stringify(t)
4099
})
4100
}, this.sendHighscore = function() {}, this.setDebugTouchOverlayController = function(e) {
4101
t.SDK.debugTouchOverlayController = e
4102
}, this.getLeaderboard = function() {
4103
return Promise.resolve([])
4104
}, this.getIsoLanguage = function() {
4105
return _("iso_lang")
4106
}, this.warning = function(e, t) {
4107
console.warn("PokiSDK." + e + ": " + t)
4108
}, this.error = function(e, t) {
4109
console.error("PokiSDK." + e + ": " + t)
4110
}
4111
}
4112
return t.prototype.setDebug = function(e) {
4113
void 0 === e && (e = !0), this.SDK.setDebug(e)
4114
}, t.prototype.disableProgrammatic = function() {
4115
this.SDK.disableProgrammatic()
4116
}, t.prototype.toggleNonPersonalized = function(e) {
4117
void 0 === e && (e = !1), this.SDK.toggleNonPersonalized(e)
4118
}, t.prototype.setConsentString = function(e) {
4119
this.SDK.setConsentString(e)
4120
}, t.prototype.destroyAd = function(e) {
4121
this.SDK.destroyAd(e)
4122
}, t.prototype.setVolume = function(e) {
4123
this.SDK.setVolume(e)
4124
}, t
4125
}();
4126
var gt = new mt;
4127
for (var vt in gt) window.PokiSDK[vt] = gt[vt]
4128
})()
4129
})();
4130