@jolibox/ads 1.4.2 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +84 -88
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var tn = Object.defineProperty, nn = Object.defineProperties;
|
|
2
2
|
var rn = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var Ke = Object.getOwnPropertySymbols;
|
|
4
4
|
var jt = Object.prototype.hasOwnProperty, Vt = Object.prototype.propertyIsEnumerable;
|
|
5
5
|
var Ft = (t, e, i) => e in t ? tn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, ht = (t, e) => {
|
|
6
6
|
for (var i in e || (e = {}))
|
|
7
7
|
jt.call(e, i) && Ft(t, i, e[i]);
|
|
8
|
-
if (
|
|
9
|
-
for (var i of
|
|
8
|
+
if (Ke)
|
|
9
|
+
for (var i of Ke(e))
|
|
10
10
|
Vt.call(e, i) && Ft(t, i, e[i]);
|
|
11
11
|
return t;
|
|
12
12
|
}, Gt = (t, e) => nn(t, rn(e));
|
|
@@ -14,8 +14,8 @@ var qt = (t, e) => {
|
|
|
14
14
|
var i = {};
|
|
15
15
|
for (var n in t)
|
|
16
16
|
jt.call(t, n) && e.indexOf(n) < 0 && (i[n] = t[n]);
|
|
17
|
-
if (t != null &&
|
|
18
|
-
for (var n of
|
|
17
|
+
if (t != null && Ke)
|
|
18
|
+
for (var n of Ke(t))
|
|
19
19
|
e.indexOf(n) < 0 && Vt.call(t, n) && (i[n] = t[n]);
|
|
20
20
|
return i;
|
|
21
21
|
};
|
|
@@ -138,7 +138,7 @@ globalThis[Ht] || (globalThis[Ht] = xn);
|
|
|
138
138
|
var Jt = Symbol.for("Jolibox.canIUseMap.native"), Rn = {};
|
|
139
139
|
globalThis[Jt] || (globalThis[Jt] = Rn);
|
|
140
140
|
var pi = ((t) => (t[t.Other = 0] = "Other", t[t.Route = 1] = "Route", t[t.Click = 2] = "Click", t[t.View = 3] = "View", t[t.Expose = 4] = "Expose", t[t.Swipe = 5] = "Swipe", t[t.Input = 6] = "Input", t[t.Select = 7] = "Select", t[t.SwitchOn = 8] = "SwitchOn", t[t.SwitchOff = 9] = "SwitchOff", t[t.Submit = 10] = "Submit", t[t.Scroll = 11] = "Scroll", t[t.Hide = 12] = "Hide", t[t.System = 1e3] = "System", t[t.ErrorTrace = 1001] = "ErrorTrace", t[t.UserDefined = 1002] = "UserDefined", t))(pi || {}), _i = ((t) => (t.MiniGame = "mini-game", t.MiniDrama = "mini-drama", t.App = "app", t.WebSDK = "web-sdk", t.AppSDK = "app-sdk", t))(_i || {}), mi = ((t) => (t[t.App = 0] = "App", t[t.H5 = 1] = "H5", t[t.Weapp = 2] = "Weapp", t[t.Alipay = 3] = "Alipay", t[t.Gcash = 4] = "Gcash", t[t.Dana = 5] = "Dana", t[t.Umma = 6] = "Umma", t[t.WebSDK = 1e3] = "WebSDK", t[t.AppSDK = 1001] = "AppSDK", t[t.Other = 9999] = "Other", t))(mi || {}), Xt = ["name", "params"], Tn = ["name", "type", "location", "target", "extra", "timestamp", "userId"], Cn = ["platform", "os", "appVersion", "appId", "model", "brand", "uuid", "jsSdkVersion", "extra"];
|
|
141
|
-
function
|
|
141
|
+
function Xe(t, e) {
|
|
142
142
|
return e.map((i) => {
|
|
143
143
|
if (i === "params" && t[i]) {
|
|
144
144
|
let n = t[i];
|
|
@@ -148,14 +148,14 @@ function Ye(t, e) {
|
|
|
148
148
|
});
|
|
149
149
|
}
|
|
150
150
|
function On(t) {
|
|
151
|
-
let e = t.location ?
|
|
152
|
-
return
|
|
151
|
+
let e = t.location ? Xe(t.location, Xt) : null, i = t.target ? Xe(t.target, Xt) : null;
|
|
152
|
+
return Xe(An(gn({}, t), {
|
|
153
153
|
location: e,
|
|
154
154
|
target: i
|
|
155
155
|
}), Tn);
|
|
156
156
|
}
|
|
157
157
|
function Dn(t) {
|
|
158
|
-
let e = t.events.map((n) => On(n)), i =
|
|
158
|
+
let e = t.events.map((n) => On(n)), i = Xe(t.device, Cn);
|
|
159
159
|
return [t.protocolVersion, e, i, t.project];
|
|
160
160
|
}
|
|
161
161
|
function Pn() {
|
|
@@ -192,7 +192,7 @@ function Pn() {
|
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
Pn();
|
|
195
|
-
var Ee = typeof window == "undefined",
|
|
195
|
+
var Ee = typeof window == "undefined", nt = () => !Ee && !!(navigator.userAgent || "").includes("JoliboxPlatformSDK");
|
|
196
196
|
!Ee && (navigator.userAgent.includes("iPhone") || navigator.userAgent.includes("iPod") || navigator.userAgent.includes("iPad") || navigator.userAgent.includes("iPhone OS")), !Ee && navigator.userAgent.includes("Android"), !Ee && navigator.userAgent.includes("Mac"), !Ee && navigator.userAgent.includes("FB_IAB"), !Ee && !navigator.userAgent.includes("iPhone") && navigator.userAgent.includes("Android");
|
|
197
197
|
var mt = class St {
|
|
198
198
|
constructor(e) {
|
|
@@ -270,7 +270,7 @@ var D = mt, Nn = class {
|
|
|
270
270
|
constructor(e) {
|
|
271
271
|
this.value = e, this.id = Ln++;
|
|
272
272
|
}
|
|
273
|
-
},
|
|
273
|
+
}, $e = class {
|
|
274
274
|
constructor(e) {
|
|
275
275
|
this.options = e, this._size = 0;
|
|
276
276
|
}
|
|
@@ -328,7 +328,7 @@ var D = mt, Nn = class {
|
|
|
328
328
|
on(t, e) {
|
|
329
329
|
let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
|
|
330
330
|
var n;
|
|
331
|
-
let r = (n = this.listeners.get(t)) != null ? n : new
|
|
331
|
+
let r = (n = this.listeners.get(t)) != null ? n : new $e(), o = (d) => e(...d.args), s = r.event(o);
|
|
332
332
|
this.listerHandlerMap.set(e, {
|
|
333
333
|
handler: o,
|
|
334
334
|
dispose: s
|
|
@@ -391,7 +391,7 @@ function $n(t, e) {
|
|
|
391
391
|
onWillAddFirstListener() {
|
|
392
392
|
i(r.fire, r);
|
|
393
393
|
}
|
|
394
|
-
}, r = new
|
|
394
|
+
}, r = new $e(n);
|
|
395
395
|
return r.event;
|
|
396
396
|
})(function(i) {
|
|
397
397
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
@@ -430,7 +430,7 @@ function Vn(t, e) {
|
|
|
430
430
|
}
|
|
431
431
|
var kt = class {
|
|
432
432
|
constructor() {
|
|
433
|
-
this._commands = /* @__PURE__ */ new Map(), this._onDidRegisterCommand = new
|
|
433
|
+
this._commands = /* @__PURE__ */ new Map(), this._onDidRegisterCommand = new $e(), this.onDidRegisterCommand = this._onDidRegisterCommand.event, console.log("[Jolibox SDK] command registry");
|
|
434
434
|
}
|
|
435
435
|
registerCommand(t) {
|
|
436
436
|
if (!t)
|
|
@@ -466,7 +466,7 @@ var kt = class {
|
|
|
466
466
|
kt = wi([bi], kt);
|
|
467
467
|
var Yt = class {
|
|
468
468
|
constructor() {
|
|
469
|
-
this._onWillExecuteCommand = new
|
|
469
|
+
this._onWillExecuteCommand = new $e(), this.onWillExecuteCommand = this._onWillExecuteCommand.event, this._onDidExecuteCommand = new $e(), this.onDidExecuteCommand = this._onDidExecuteCommand.event, this.registry = new kt(), this._starActivation = null;
|
|
470
470
|
}
|
|
471
471
|
_activateStar() {
|
|
472
472
|
return this._starActivation || (this._starActivation = pn(3e4)), this._starActivation;
|
|
@@ -564,7 +564,7 @@ class Kn {
|
|
|
564
564
|
userEvent: n
|
|
565
565
|
}, this.paramsToTrack)), this.notifyIframeAdsEvent("JOLIBOX_AD_CALL_BEFORE_REWARD", ht({
|
|
566
566
|
userEvent: n
|
|
567
|
-
}, this.paramsToTrack)),
|
|
567
|
+
}, this.paramsToTrack)), nt() && this.context.track("mmp_ad_impression", {
|
|
568
568
|
ad_network: (s = (o = this.currentProvider) == null ? void 0 : o.name) != null ? s : "",
|
|
569
569
|
ad_format: "rewarded",
|
|
570
570
|
module: "game",
|
|
@@ -596,7 +596,7 @@ class Kn {
|
|
|
596
596
|
if (this.adsHasResponse = !0, this.context.track("CallBeforeAd", this.paramsToTrack), this.notifyIframeAdsEvent("JOLIBOX_AD_CALL_BEFORE_AD", this.paramsToTrack), !this.isBeforeAdCalled) {
|
|
597
597
|
this.isBeforeAdCalled = !0;
|
|
598
598
|
const s = pe(e);
|
|
599
|
-
s == null || s(), ((i = this.currentClientParams) == null ? void 0 : i.type) !== "reward" && ((n = this.adIsShowingCallback) == null || n.call(this, !0),
|
|
599
|
+
s == null || s(), ((i = this.currentClientParams) == null ? void 0 : i.type) !== "reward" && ((n = this.adIsShowingCallback) == null || n.call(this, !0), nt() && this.context.track("mmp_ad_impression", {
|
|
600
600
|
ad_network: (o = (r = this.currentProvider) == null ? void 0 : r.name) != null ? o : "",
|
|
601
601
|
ad_format: "interstitial",
|
|
602
602
|
module: "game",
|
|
@@ -728,7 +728,7 @@ class Kn {
|
|
|
728
728
|
});
|
|
729
729
|
}
|
|
730
730
|
}
|
|
731
|
-
function
|
|
731
|
+
function ze(t, e, i) {
|
|
732
732
|
return (e = zn(e)) in t ? Object.defineProperty(t, e, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = i, t;
|
|
733
733
|
}
|
|
734
734
|
function zn(t) {
|
|
@@ -749,11 +749,11 @@ function Wn(t, e) {
|
|
|
749
749
|
}
|
|
750
750
|
class Hn {
|
|
751
751
|
constructor(e) {
|
|
752
|
-
|
|
752
|
+
ze(this, "context", void 0), ze(this, "adBreakIsShowing", !1), ze(this, "reportPageJumpOut", () => {
|
|
753
753
|
this.context.track("AdBreakJumpOut", {
|
|
754
754
|
context: "AdsActionDetection"
|
|
755
755
|
});
|
|
756
|
-
}),
|
|
756
|
+
}), ze(this, "reportPageHide", () => {
|
|
757
757
|
this.context.track("AdBreakHide", {
|
|
758
758
|
context: "AdsActionDetection"
|
|
759
759
|
});
|
|
@@ -764,7 +764,7 @@ class Hn {
|
|
|
764
764
|
});
|
|
765
765
|
}
|
|
766
766
|
}
|
|
767
|
-
function
|
|
767
|
+
function We(t, e, i) {
|
|
768
768
|
return (e = Jn(e)) in t ? Object.defineProperty(t, e, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = i, t;
|
|
769
769
|
}
|
|
770
770
|
function Jn(t) {
|
|
@@ -785,7 +785,7 @@ function Xn(t, e) {
|
|
|
785
785
|
}
|
|
786
786
|
class Yn {
|
|
787
787
|
constructor(e) {
|
|
788
|
-
|
|
788
|
+
We(this, "configs", null), We(this, "firstRun", !0), We(this, "context", void 0), We(this, "contextInfo", void 0), this.context = e, this.contextInfo = this.context.getContextInfo(), this.init();
|
|
789
789
|
}
|
|
790
790
|
async init() {
|
|
791
791
|
try {
|
|
@@ -965,7 +965,7 @@ function It(t, e) {
|
|
|
965
965
|
function U(t, e) {
|
|
966
966
|
return t.charCodeAt(e) | 0;
|
|
967
967
|
}
|
|
968
|
-
function
|
|
968
|
+
function Fe(t, e, i) {
|
|
969
969
|
return t.slice(e, i);
|
|
970
970
|
}
|
|
971
971
|
function re(t) {
|
|
@@ -974,7 +974,7 @@ function re(t) {
|
|
|
974
974
|
function Lt(t) {
|
|
975
975
|
return t.length;
|
|
976
976
|
}
|
|
977
|
-
function
|
|
977
|
+
function He(t, e) {
|
|
978
978
|
return e.push(t), t;
|
|
979
979
|
}
|
|
980
980
|
function ur(t, e) {
|
|
@@ -999,13 +999,13 @@ function Z() {
|
|
|
999
999
|
function oe() {
|
|
1000
1000
|
return U(Ce, X);
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1002
|
+
function Ye() {
|
|
1003
1003
|
return X;
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1006
|
-
return
|
|
1005
|
+
function Ve(t, e) {
|
|
1006
|
+
return Fe(Ce, t, e);
|
|
1007
1007
|
}
|
|
1008
|
-
function
|
|
1008
|
+
function je(t) {
|
|
1009
1009
|
switch (t) {
|
|
1010
1010
|
case 0:
|
|
1011
1011
|
case 9:
|
|
@@ -1043,18 +1043,18 @@ function Ri(t) {
|
|
|
1043
1043
|
function Ti(t) {
|
|
1044
1044
|
return Ce = "", t;
|
|
1045
1045
|
}
|
|
1046
|
-
function
|
|
1047
|
-
return Ii(
|
|
1046
|
+
function Qe(t) {
|
|
1047
|
+
return Ii(Ve(X - 1, xt(t === 91 ? t + 2 : t === 40 ? t + 1 : t)));
|
|
1048
1048
|
}
|
|
1049
1049
|
function fr(t) {
|
|
1050
1050
|
for (; (N = oe()) && N < 33; )
|
|
1051
1051
|
Z();
|
|
1052
|
-
return
|
|
1052
|
+
return je(t) > 2 || je(N) > 3 ? "" : " ";
|
|
1053
1053
|
}
|
|
1054
1054
|
function vr(t, e) {
|
|
1055
1055
|
for (; --e && Z() && !(N < 48 || N > 102 || N > 57 && N < 65 || N > 70 && N < 97); )
|
|
1056
1056
|
;
|
|
1057
|
-
return
|
|
1057
|
+
return Ve(t, Ye() + (e < 6 && oe() == 32 && Z() == 32));
|
|
1058
1058
|
}
|
|
1059
1059
|
function xt(t) {
|
|
1060
1060
|
for (; Z(); )
|
|
@@ -1078,28 +1078,28 @@ function yr(t, e) {
|
|
|
1078
1078
|
for (; Z() && t + N !== 57; )
|
|
1079
1079
|
if (t + N === 84 && oe() === 47)
|
|
1080
1080
|
break;
|
|
1081
|
-
return "/*" +
|
|
1081
|
+
return "/*" + Ve(e, X - 1) + "*" + dt(t === 47 ? t : Z());
|
|
1082
1082
|
}
|
|
1083
1083
|
function gr(t) {
|
|
1084
|
-
for (; !
|
|
1084
|
+
for (; !je(oe()); )
|
|
1085
1085
|
Z();
|
|
1086
|
-
return
|
|
1086
|
+
return Ve(t, X);
|
|
1087
1087
|
}
|
|
1088
1088
|
function Ar(t) {
|
|
1089
|
-
return Ti(
|
|
1089
|
+
return Ti(Ze("", null, null, null, [""], t = Ri(t), 0, [0], t));
|
|
1090
1090
|
}
|
|
1091
|
-
function
|
|
1091
|
+
function Ze(t, e, i, n, r, o, s, a, d) {
|
|
1092
1092
|
for (var l = 0, u = 0, c = s, h = 0, f = 0, g = 0, v = 1, A = 1, y = 1, w = 0, S = "", b = r, m = o, E = n, p = S; A; )
|
|
1093
1093
|
switch (g = w, w = Z()) {
|
|
1094
1094
|
case 40:
|
|
1095
1095
|
if (g != 108 && U(p, c - 1) == 58) {
|
|
1096
|
-
It(p += R(
|
|
1096
|
+
It(p += R(Qe(w), "&", "&\f"), "&\f") != -1 && (y = -1);
|
|
1097
1097
|
break;
|
|
1098
1098
|
}
|
|
1099
1099
|
case 34:
|
|
1100
1100
|
case 39:
|
|
1101
1101
|
case 91:
|
|
1102
|
-
p +=
|
|
1102
|
+
p += Qe(w);
|
|
1103
1103
|
break;
|
|
1104
1104
|
case 9:
|
|
1105
1105
|
case 10:
|
|
@@ -1108,13 +1108,13 @@ function et(t, e, i, n, r, o, s, a, d) {
|
|
|
1108
1108
|
p += fr(g);
|
|
1109
1109
|
break;
|
|
1110
1110
|
case 92:
|
|
1111
|
-
p += vr(
|
|
1111
|
+
p += vr(Ye() - 1, 7);
|
|
1112
1112
|
continue;
|
|
1113
1113
|
case 47:
|
|
1114
1114
|
switch (oe()) {
|
|
1115
1115
|
case 42:
|
|
1116
1116
|
case 47:
|
|
1117
|
-
|
|
1117
|
+
He(wr(yr(Z(), Ye()), e, i), d);
|
|
1118
1118
|
break;
|
|
1119
1119
|
default:
|
|
1120
1120
|
p += "/";
|
|
@@ -1130,24 +1130,24 @@ function et(t, e, i, n, r, o, s, a, d) {
|
|
|
1130
1130
|
case 125:
|
|
1131
1131
|
A = 0;
|
|
1132
1132
|
case 59 + u:
|
|
1133
|
-
y == -1 && (p = R(p, /\f/g, "")), f > 0 && re(p) - c &&
|
|
1133
|
+
y == -1 && (p = R(p, /\f/g, "")), f > 0 && re(p) - c && He(f > 32 ? Zt(p + ";", n, i, c - 1) : Zt(R(p, " ", "") + ";", n, i, c - 2), d);
|
|
1134
1134
|
break;
|
|
1135
1135
|
case 59:
|
|
1136
1136
|
p += ";";
|
|
1137
1137
|
default:
|
|
1138
|
-
if (
|
|
1138
|
+
if (He(E = Qt(p, e, i, l, u, r, a, S, b = [], m = [], c), o), w === 123)
|
|
1139
1139
|
if (u === 0)
|
|
1140
|
-
|
|
1140
|
+
Ze(p, e, E, E, b, o, c, a, m);
|
|
1141
1141
|
else
|
|
1142
1142
|
switch (h === 99 && U(p, 3) === 110 ? 100 : h) {
|
|
1143
1143
|
case 100:
|
|
1144
1144
|
case 108:
|
|
1145
1145
|
case 109:
|
|
1146
1146
|
case 115:
|
|
1147
|
-
|
|
1147
|
+
Ze(t, E, E, n && He(Qt(t, E, E, 0, 0, r, a, S, r, b = [], c), m), r, m, c, a, n ? b : m);
|
|
1148
1148
|
break;
|
|
1149
1149
|
default:
|
|
1150
|
-
|
|
1150
|
+
Ze(p, E, E, E, [""], m, 0, a, m);
|
|
1151
1151
|
}
|
|
1152
1152
|
}
|
|
1153
1153
|
l = u = f = 0, v = y = 1, S = p = "", c = s;
|
|
@@ -1169,7 +1169,7 @@ function et(t, e, i, n, r, o, s, a, d) {
|
|
|
1169
1169
|
a[l++] = (re(p) - 1) * y, y = 1;
|
|
1170
1170
|
break;
|
|
1171
1171
|
case 64:
|
|
1172
|
-
oe() === 45 && (p +=
|
|
1172
|
+
oe() === 45 && (p += Qe(Z())), h = oe(), u = c = re(S = p += gr(Ye())), w++;
|
|
1173
1173
|
break;
|
|
1174
1174
|
case 45:
|
|
1175
1175
|
g === 45 && re(p) == 2 && (v = 0);
|
|
@@ -1179,15 +1179,15 @@ function et(t, e, i, n, r, o, s, a, d) {
|
|
|
1179
1179
|
}
|
|
1180
1180
|
function Qt(t, e, i, n, r, o, s, a, d, l, u) {
|
|
1181
1181
|
for (var c = r - 1, h = r === 0 ? o : [""], f = Lt(h), g = 0, v = 0, A = 0; g < n; ++g)
|
|
1182
|
-
for (var y = 0, w =
|
|
1182
|
+
for (var y = 0, w = Fe(t, c + 1, c = sr(v = s[g])), S = t; y < f; ++y)
|
|
1183
1183
|
(S = Ii(v > 0 ? h[y] + " " + w : R(w, /&\f/g, h[y]))) && (d[A++] = S);
|
|
1184
1184
|
return ut(t, e, i, r === 0 ? Pt : a, d, l, u);
|
|
1185
1185
|
}
|
|
1186
1186
|
function wr(t, e, i) {
|
|
1187
|
-
return ut(t, e, i, Ei, dt(cr()),
|
|
1187
|
+
return ut(t, e, i, Ei, dt(cr()), Fe(t, 2, -2), 0);
|
|
1188
1188
|
}
|
|
1189
1189
|
function Zt(t, e, i, n) {
|
|
1190
|
-
return ut(t, e, i, Nt,
|
|
1190
|
+
return ut(t, e, i, Nt, Fe(t, 0, n), Fe(t, n + 1, -1), n);
|
|
1191
1191
|
}
|
|
1192
1192
|
function Ie(t, e) {
|
|
1193
1193
|
for (var i = "", n = Lt(t), r = 0; r < n; r++)
|
|
@@ -1231,18 +1231,18 @@ function mr(t) {
|
|
|
1231
1231
|
};
|
|
1232
1232
|
}
|
|
1233
1233
|
var Sr = function(e, i, n) {
|
|
1234
|
-
for (var r = 0, o = 0; r = o, o = oe(), r === 38 && o === 12 && (i[n] = 1), !
|
|
1234
|
+
for (var r = 0, o = 0; r = o, o = oe(), r === 38 && o === 12 && (i[n] = 1), !je(o); )
|
|
1235
1235
|
Z();
|
|
1236
|
-
return
|
|
1236
|
+
return Ve(e, X);
|
|
1237
1237
|
}, Er = function(e, i) {
|
|
1238
1238
|
var n = -1, r = 44;
|
|
1239
1239
|
do
|
|
1240
|
-
switch (
|
|
1240
|
+
switch (je(r)) {
|
|
1241
1241
|
case 0:
|
|
1242
1242
|
r === 38 && oe() === 12 && (i[n] = 1), e[n] += Sr(X - 1, i, n);
|
|
1243
1243
|
break;
|
|
1244
1244
|
case 2:
|
|
1245
|
-
e[n] +=
|
|
1245
|
+
e[n] += Qe(r);
|
|
1246
1246
|
break;
|
|
1247
1247
|
case 4:
|
|
1248
1248
|
if (r === 44) {
|
|
@@ -1775,7 +1775,7 @@ function Vr() {
|
|
|
1775
1775
|
for (var t; t = Pi.shift(); )
|
|
1776
1776
|
if (t.__P && t.__H)
|
|
1777
1777
|
try {
|
|
1778
|
-
t.__H.__h.forEach(
|
|
1778
|
+
t.__H.__h.forEach(et), t.__H.__h.forEach(Tt), t.__H.__h = [];
|
|
1779
1779
|
} catch (e) {
|
|
1780
1780
|
t.__H.__h = [], B.__e(e, t.__v);
|
|
1781
1781
|
}
|
|
@@ -1789,7 +1789,7 @@ B.__b = function(t) {
|
|
|
1789
1789
|
var e = (Q = t.__c).__H;
|
|
1790
1790
|
e && (At === Q ? (e.__h = [], Q.__h = [], e.__.forEach(function(i) {
|
|
1791
1791
|
i.__N && (i.__ = i.__N), i.u = i.__N = void 0;
|
|
1792
|
-
})) : (e.__h.forEach(
|
|
1792
|
+
})) : (e.__h.forEach(et), e.__h.forEach(Tt), e.__h = [], Rt = 0)), At = Q;
|
|
1793
1793
|
}, B.diffed = function(t) {
|
|
1794
1794
|
ui && ui(t);
|
|
1795
1795
|
var e = t.__c;
|
|
@@ -1799,7 +1799,7 @@ B.__b = function(t) {
|
|
|
1799
1799
|
}, B.__c = function(t, e) {
|
|
1800
1800
|
e.some(function(i) {
|
|
1801
1801
|
try {
|
|
1802
|
-
i.__h.forEach(
|
|
1802
|
+
i.__h.forEach(et), i.__h = i.__h.filter(function(n) {
|
|
1803
1803
|
return !n.__ || Tt(n);
|
|
1804
1804
|
});
|
|
1805
1805
|
} catch (n) {
|
|
@@ -1813,7 +1813,7 @@ B.__b = function(t) {
|
|
|
1813
1813
|
var e, i = t.__c;
|
|
1814
1814
|
i && i.__H && (i.__H.__.forEach(function(n) {
|
|
1815
1815
|
try {
|
|
1816
|
-
|
|
1816
|
+
et(n);
|
|
1817
1817
|
} catch (r) {
|
|
1818
1818
|
e = r;
|
|
1819
1819
|
}
|
|
@@ -1826,7 +1826,7 @@ function Gr(t) {
|
|
|
1826
1826
|
}, n = setTimeout(i, 100);
|
|
1827
1827
|
vi && (e = requestAnimationFrame(i));
|
|
1828
1828
|
}
|
|
1829
|
-
function
|
|
1829
|
+
function et(t) {
|
|
1830
1830
|
var e = Q, i = t.__c;
|
|
1831
1831
|
typeof i == "function" && (t.__c = void 0, i()), Q = e;
|
|
1832
1832
|
}
|
|
@@ -1899,7 +1899,7 @@ F.prototype.U = function(t) {
|
|
|
1899
1899
|
};
|
|
1900
1900
|
F.prototype.subscribe = function(t) {
|
|
1901
1901
|
var e = this;
|
|
1902
|
-
return
|
|
1902
|
+
return qe(function() {
|
|
1903
1903
|
var i = e.value, n = T;
|
|
1904
1904
|
T = void 0;
|
|
1905
1905
|
try {
|
|
@@ -2046,10 +2046,10 @@ function zr(t) {
|
|
|
2046
2046
|
throw new Error("Out-of-order effect");
|
|
2047
2047
|
Ui(this), T = t, this.f &= -2, 8 & this.f && Bt(this), ct();
|
|
2048
2048
|
}
|
|
2049
|
-
function
|
|
2049
|
+
function Ge(t) {
|
|
2050
2050
|
this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32;
|
|
2051
2051
|
}
|
|
2052
|
-
|
|
2052
|
+
Ge.prototype.c = function() {
|
|
2053
2053
|
var t = this.S();
|
|
2054
2054
|
try {
|
|
2055
2055
|
if (8 & this.f || this.x === void 0)
|
|
@@ -2060,21 +2060,21 @@ qe.prototype.c = function() {
|
|
|
2060
2060
|
t();
|
|
2061
2061
|
}
|
|
2062
2062
|
};
|
|
2063
|
-
|
|
2063
|
+
Ge.prototype.S = function() {
|
|
2064
2064
|
if (1 & this.f)
|
|
2065
2065
|
throw new Error("Cycle detected");
|
|
2066
2066
|
this.f |= 1, this.f &= -9, $i(this), Mi(this), ge++;
|
|
2067
2067
|
var t = T;
|
|
2068
2068
|
return T = this, zr.bind(this, t);
|
|
2069
2069
|
};
|
|
2070
|
-
|
|
2070
|
+
Ge.prototype.N = function() {
|
|
2071
2071
|
2 & this.f || (this.f |= 2, this.o = Me, Me = this);
|
|
2072
2072
|
};
|
|
2073
|
-
|
|
2073
|
+
Ge.prototype.d = function() {
|
|
2074
2074
|
this.f |= 8, 1 & this.f || Bt(this);
|
|
2075
2075
|
};
|
|
2076
|
-
function
|
|
2077
|
-
var e = new
|
|
2076
|
+
function qe(t) {
|
|
2077
|
+
var e = new Ge(t);
|
|
2078
2078
|
try {
|
|
2079
2079
|
e.c();
|
|
2080
2080
|
} catch (i) {
|
|
@@ -2083,7 +2083,7 @@ function Ke(t) {
|
|
|
2083
2083
|
return e.d.bind(e);
|
|
2084
2084
|
}
|
|
2085
2085
|
var Fi, wt, ji = [];
|
|
2086
|
-
|
|
2086
|
+
qe(function() {
|
|
2087
2087
|
Fi = this.N;
|
|
2088
2088
|
})();
|
|
2089
2089
|
function De(t, e) {
|
|
@@ -2107,7 +2107,7 @@ function Vi(t) {
|
|
|
2107
2107
|
return f === 0 ? 0 : f === !0 ? "" : f || "";
|
|
2108
2108
|
}), u = Ue(function() {
|
|
2109
2109
|
return !Array.isArray(l.value) && !sn(l.value);
|
|
2110
|
-
}), c =
|
|
2110
|
+
}), c = qe(function() {
|
|
2111
2111
|
if (this.N = qi, u.value) {
|
|
2112
2112
|
var f = l.value;
|
|
2113
2113
|
a.__v && a.__v.__e && a.__v.__e.nodeType === 3 && (a.__v.__e.data = f);
|
|
@@ -2139,7 +2139,7 @@ De("__r", function(t, e) {
|
|
|
2139
2139
|
var i, n = e.__c;
|
|
2140
2140
|
n && (n.__$f &= -2, (i = n.__$u) === void 0 && (n.__$u = i = function(r) {
|
|
2141
2141
|
var o;
|
|
2142
|
-
return
|
|
2142
|
+
return qe(function() {
|
|
2143
2143
|
o = this;
|
|
2144
2144
|
}), o.c = function() {
|
|
2145
2145
|
n.__$f |= 1, n.setState({});
|
|
@@ -2175,7 +2175,7 @@ function Wr(t, e, i, n) {
|
|
|
2175
2175
|
var r = e in t && t.ownerSVGElement === void 0, o = k(i);
|
|
2176
2176
|
return { o: function(s, a) {
|
|
2177
2177
|
o.value = s, n = a;
|
|
2178
|
-
}, d:
|
|
2178
|
+
}, d: qe(function() {
|
|
2179
2179
|
this.N = qi;
|
|
2180
2180
|
var s = o.value.value;
|
|
2181
2181
|
n[e] !== s && (n[e] = s, r ? t[e] = s : s ? t.setAttribute(e, s) : t.removeAttribute(e));
|
|
@@ -2365,7 +2365,7 @@ const Qr = G`
|
|
|
2365
2365
|
}
|
|
2366
2366
|
}
|
|
2367
2367
|
}
|
|
2368
|
-
`, ie = k(null), Ot = k(""), Dt = k(""),
|
|
2368
|
+
`, ie = k(null), Ot = k(""), Dt = k(""), tt = k(!1), Zr = () => {
|
|
2369
2369
|
var t;
|
|
2370
2370
|
(t = ie.value) == null || t.call(ie, !1);
|
|
2371
2371
|
}, eo = () => {
|
|
@@ -2377,17 +2377,17 @@ const Qr = G`
|
|
|
2377
2377
|
content: i
|
|
2378
2378
|
} = t;
|
|
2379
2379
|
return ie.value && (ie.value(!1), P(() => {
|
|
2380
|
-
ie.value = null,
|
|
2380
|
+
ie.value = null, tt.value = !1;
|
|
2381
2381
|
})), P(() => {
|
|
2382
|
-
Ot.value = e || "", Dt.value = i || "",
|
|
2382
|
+
Ot.value = e || "", Dt.value = i || "", tt.value = !0;
|
|
2383
2383
|
}), new Promise((n) => {
|
|
2384
2384
|
ie.value = (r) => {
|
|
2385
2385
|
P(() => {
|
|
2386
|
-
ie.value = null,
|
|
2386
|
+
ie.value = null, tt.value = !1, Ot.value = "", Dt.value = "";
|
|
2387
2387
|
}), n(r);
|
|
2388
2388
|
};
|
|
2389
2389
|
});
|
|
2390
|
-
}, io = () =>
|
|
2390
|
+
}, io = () => tt.value ? _("div", {
|
|
2391
2391
|
className: Qr,
|
|
2392
2392
|
children: _("div", {
|
|
2393
2393
|
className: "card-wrapper",
|
|
@@ -3901,7 +3901,7 @@ class Qi {
|
|
|
3901
3901
|
}
|
|
3902
3902
|
}
|
|
3903
3903
|
canIUse() {
|
|
3904
|
-
return
|
|
3904
|
+
return nt() && this.canIUseHelper("loadAdsAsync") && this.canIUseHelper("showAdAsync");
|
|
3905
3905
|
}
|
|
3906
3906
|
/**
|
|
3907
3907
|
* Show a loaded ad
|
|
@@ -3994,10 +3994,6 @@ class Ho {
|
|
|
3994
3994
|
}
|
|
3995
3995
|
constructor(e, i) {
|
|
3996
3996
|
ue(this, "providers", void 0), ue(this, "helper", void 0), ue(this, "adsContext", null), ue(this, "_isAdsReady", !1), ue(this, "init", async () => {
|
|
3997
|
-
if (!$e()) {
|
|
3998
|
-
this._isAdsReady = !1;
|
|
3999
|
-
return;
|
|
4000
|
-
}
|
|
4001
3997
|
this.helper.canIUse() ? (await this.helper.loadAdsAsync({
|
|
4002
3998
|
providers: this.providers
|
|
4003
3999
|
})).code === "SUCCESS" ? this._isAdsReady = !0 : this._isAdsReady = !1 : this._isAdsReady = !1;
|
|
@@ -4479,7 +4475,7 @@ class Ms {
|
|
|
4479
4475
|
console.warn("This method has been deprecated. We will not support AdSense AdUnit in the future.");
|
|
4480
4476
|
}
|
|
4481
4477
|
}
|
|
4482
|
-
function
|
|
4478
|
+
function Je(t, e, i) {
|
|
4483
4479
|
return (e = ns(e)) in t ? Object.defineProperty(t, e, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = i, t;
|
|
4484
4480
|
}
|
|
4485
4481
|
function ns(t) {
|
|
@@ -4500,7 +4496,7 @@ function rs(t, e) {
|
|
|
4500
4496
|
}
|
|
4501
4497
|
class os {
|
|
4502
4498
|
constructor(e) {
|
|
4503
|
-
|
|
4499
|
+
Je(this, "context", void 0), Je(this, "currentProvider", void 0), Je(this, "continueCallback", void 0), Je(this, "contextInfo", void 0), this.context = e, this.contextInfo = e.getContextInfo();
|
|
4504
4500
|
}
|
|
4505
4501
|
get paramsToTrack() {
|
|
4506
4502
|
var e, i;
|
|
@@ -4521,7 +4517,7 @@ class os {
|
|
|
4521
4517
|
wrapAdPlaying(e) {
|
|
4522
4518
|
return (i) => {
|
|
4523
4519
|
var n, r;
|
|
4524
|
-
this.context.track("CallAFVPlaying", this.paramsToTrack),
|
|
4520
|
+
this.context.track("CallAFVPlaying", this.paramsToTrack), nt() && this.context.track("mmp_ad_impression", {
|
|
4525
4521
|
ad_network: (r = (n = this.currentProvider) == null ? void 0 : n.name) != null ? r : "",
|
|
4526
4522
|
ad_format: "AFV",
|
|
4527
4523
|
module: "drama",
|
|
@@ -4666,7 +4662,7 @@ class us {
|
|
|
4666
4662
|
}), this.adTagUrl = e, this.videoContent = i, this.adContainer = n;
|
|
4667
4663
|
}
|
|
4668
4664
|
}
|
|
4669
|
-
var
|
|
4665
|
+
var it = /* @__PURE__ */ ((t) => (t[t.ADS_REQUEST_NETWORK_ERROR = 1012] = "ADS_REQUEST_NETWORK_ERROR", t[t.ASSET_FALLBACK_FAILED = 1021] = "ASSET_FALLBACK_FAILED", t[t.AUTOPLAY_DISALLOWED = 1205] = "AUTOPLAY_DISALLOWED", t[t.COMPANION_AD_LOADING_FAILED = 603] = "COMPANION_AD_LOADING_FAILED", t[t.COMPANION_REQUIRED_ERROR = 602] = "COMPANION_REQUIRED_ERROR", t[t.FAILED_TO_REQUEST_ADS = 1005] = "FAILED_TO_REQUEST_ADS", t[t.INVALID_AD_TAG = 1013] = "INVALID_AD_TAG", t[t.INVALID_ADX_EXTENSION = 1105] = "INVALID_ADX_EXTENSION", t[t.INVALID_ARGUMENTS = 1101] = "INVALID_ARGUMENTS", t[t.NONLINEAR_DIMENSIONS_ERROR = 501] = "NONLINEAR_DIMENSIONS_ERROR", t[t.OVERLAY_AD_LOADING_FAILED = 502] = "OVERLAY_AD_LOADING_FAILED", t[t.OVERLAY_AD_PLAYING_FAILED = 500] = "OVERLAY_AD_PLAYING_FAILED", t[t.STREAM_INITIALIZATION_FAILED = 1020] = "STREAM_INITIALIZATION_FAILED", t[t.UNKNOWN_AD_RESPONSE = 1010] = "UNKNOWN_AD_RESPONSE", t[t.UNKNOWN_ERROR = 900] = "UNKNOWN_ERROR", t[t.UNSUPPORTED_LOCALE = 1011] = "UNSUPPORTED_LOCALE", t[t.VAST_ASSET_NOT_FOUND = 1007] = "VAST_ASSET_NOT_FOUND", t[t.VAST_EMPTY_RESPONSE = 1009] = "VAST_EMPTY_RESPONSE", t[t.VAST_LINEAR_ASSET_MISMATCH = 403] = "VAST_LINEAR_ASSET_MISMATCH", t[t.VAST_LOAD_TIMEOUT = 301] = "VAST_LOAD_TIMEOUT", t[t.VAST_MALFORMED_RESPONSE = 100] = "VAST_MALFORMED_RESPONSE", t[t.VAST_MEDIA_LOAD_TIMEOUT = 402] = "VAST_MEDIA_LOAD_TIMEOUT", t[t.VAST_NO_ADS_AFTER_WRAPPER = 303] = "VAST_NO_ADS_AFTER_WRAPPER", t[t.VAST_NONLINEAR_ASSET_MISMATCH = 503] = "VAST_NONLINEAR_ASSET_MISMATCH", t[t.VAST_PROBLEM_DISPLAYING_MEDIA_FILE = 405] = "VAST_PROBLEM_DISPLAYING_MEDIA_FILE", t[t.VAST_SCHEMA_VALIDATION_ERROR = 101] = "VAST_SCHEMA_VALIDATION_ERROR", t[t.VAST_TOO_MANY_REDIRECTS = 302] = "VAST_TOO_MANY_REDIRECTS", t[t.VAST_TRAFFICKING_ERROR = 200] = "VAST_TRAFFICKING_ERROR", t[t.VAST_UNEXPECTED_DURATION_ERROR = 202] = "VAST_UNEXPECTED_DURATION_ERROR", t[t.VAST_UNEXPECTED_LINEARITY = 201] = "VAST_UNEXPECTED_LINEARITY", t[t.VAST_UNSUPPORTED_VERSION = 102] = "VAST_UNSUPPORTED_VERSION", t[t.VAST_WRAPPER_ERROR = 300] = "VAST_WRAPPER_ERROR", t[t.VIDEO_PLAY_ERROR = 400] = "VIDEO_PLAY_ERROR", t[t.VPAID_ERROR = 901] = "VPAID_ERROR", t))(it || {});
|
|
4670
4666
|
const cs = () => {
|
|
4671
4667
|
const t = k(!1), e = k(!1), i = k(null), n = Kt(), r = Kt();
|
|
4672
4668
|
return {
|
|
@@ -4846,9 +4842,9 @@ class gs {
|
|
|
4846
4842
|
var h;
|
|
4847
4843
|
let c = !1;
|
|
4848
4844
|
switch (u.raw.getErrorCode()) {
|
|
4849
|
-
case
|
|
4850
|
-
case
|
|
4851
|
-
case
|
|
4845
|
+
case it.AUTOPLAY_DISALLOWED:
|
|
4846
|
+
case it.VIDEO_PLAY_ERROR:
|
|
4847
|
+
case it.ADS_REQUEST_NETWORK_ERROR: {
|
|
4852
4848
|
c = !0;
|
|
4853
4849
|
break;
|
|
4854
4850
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jolibox/ads",
|
|
3
3
|
"description": "This project is for integrating Jolibox ads providers",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.3",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
7
7
|
"type": "module",
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
],
|
|
13
13
|
"types": "./dist/index.d.ts",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@jolibox/common": "1.4.
|
|
15
|
+
"@jolibox/common": "1.4.3",
|
|
16
16
|
"@emotion/css": "11.13.5",
|
|
17
|
-
"@jolibox/types": "1.4.
|
|
17
|
+
"@jolibox/types": "1.4.3",
|
|
18
18
|
"preact": "10.26.4",
|
|
19
19
|
"@preact/signals": "2.0.4",
|
|
20
|
-
"@jolibox/native-bridge": "1.4.
|
|
20
|
+
"@jolibox/native-bridge": "1.4.3"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@babel/core": "7.23.3",
|