@braze/web-sdk 6.9.0 → 6.10.1
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/index.d.ts +17 -5
- package/package.json +1 -1
- package/shared-lib/event-types.js +2 -2
- package/shared-lib/indexed-db-adapter.js +30 -30
- package/shared-lib/logger.js +2 -2
- package/shared-lib/supported-options.js +1 -1
- package/src/Core/index.js +1 -0
- package/src/Core/logout.js +22 -0
- package/src/Push/push-manager.js +1 -1
- package/src/Push/unregister-push-token-on-server.js +35 -0
- package/src/Push/unregister-push.js +2 -1
- package/src/l10n/l10n-manager-factory.js +2 -2
- package/src/l10n/l10n-manager.js +1 -1
- package/src/managers/braze-instance.js +2 -2
- package/src/managers/device-manager.js +4 -4
- package/src/managers/network-manager.js +69 -69
- package/src/managers/server-config-manager.js +70 -70
- package/src/managers/session-manager.js +2 -2
- package/src/managers/storage-manager.js +10 -10
- package/src/models/backend-errors.js +5 -5
- package/src/models/push-token.js +3 -3
- package/src/models/server-config.js +24 -24
- package/src/request-controller.js +17 -16
- package/src/triggers/models/push-click-data.js +2 -2
- package/src/triggers/models/trigger-condition.js +3 -3
- package/src/triggers/models/trigger.js +21 -21
- package/src/triggers/triggers-provider.js +14 -14
- package/src/types.js +1 -1
- package/src/ui/js/attach-css.js +1 -1
- package/src/util/browser-detector.js +1 -1
- package/src/util/ecommerce-event-validation.js +1 -1
- package/src/util/net.js +1 -1
- package/src/util/request-header-utils.js +33 -32
package/src/models/push-token.js
CHANGED
|
@@ -5,12 +5,12 @@ export default class ui {
|
|
|
5
5
|
(this.Wu = i),
|
|
6
6
|
(this.publicKey = s),
|
|
7
7
|
(this.sc = l),
|
|
8
|
-
(this.
|
|
8
|
+
(this.hd = h),
|
|
9
9
|
(this.endpoint = t || null),
|
|
10
10
|
(this.Wu = i || null),
|
|
11
11
|
(this.publicKey = s || null),
|
|
12
12
|
(this.sc = l || null),
|
|
13
|
-
(this.
|
|
13
|
+
(this.hd = h || null);
|
|
14
14
|
}
|
|
15
15
|
qt() {
|
|
16
16
|
return {
|
|
@@ -18,7 +18,7 @@ export default class ui {
|
|
|
18
18
|
c: this.Wu,
|
|
19
19
|
p: this.publicKey,
|
|
20
20
|
u: this.sc,
|
|
21
|
-
v: this.
|
|
21
|
+
v: this.hd,
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
static _u(t) {
|
|
@@ -19,44 +19,44 @@ export default class di {
|
|
|
19
19
|
d = null,
|
|
20
20
|
m = null,
|
|
21
21
|
) {
|
|
22
|
-
(this.
|
|
23
|
-
(this.
|
|
24
|
-
(this.
|
|
25
|
-
(this.
|
|
26
|
-
(this.
|
|
27
|
-
(this.
|
|
28
|
-
(this.
|
|
22
|
+
(this.ld = t),
|
|
23
|
+
(this.bd = i),
|
|
24
|
+
(this.fd = s),
|
|
25
|
+
(this.pd = h),
|
|
26
|
+
(this.Cd = l),
|
|
27
|
+
(this.hd = e),
|
|
28
|
+
(this.dd = r),
|
|
29
29
|
(this.Xr = n),
|
|
30
|
-
(this.
|
|
30
|
+
(this.ad = a),
|
|
31
31
|
(this.banners = o),
|
|
32
32
|
(this.dust = u),
|
|
33
|
-
(this.
|
|
34
|
-
(this.
|
|
35
|
-
(this.
|
|
33
|
+
(this.Bd = c),
|
|
34
|
+
(this.yd = d),
|
|
35
|
+
(this.vd = m);
|
|
36
36
|
}
|
|
37
37
|
qt() {
|
|
38
38
|
return {
|
|
39
|
-
s: "6.
|
|
40
|
-
l: this.
|
|
41
|
-
e: this.
|
|
42
|
-
a: this.
|
|
43
|
-
p: this.
|
|
44
|
-
m: this.
|
|
45
|
-
v: this.
|
|
46
|
-
c: this.
|
|
39
|
+
s: "6.10.1",
|
|
40
|
+
l: this.ld,
|
|
41
|
+
e: this.bd,
|
|
42
|
+
a: this.fd,
|
|
43
|
+
p: this.pd,
|
|
44
|
+
m: this.Cd,
|
|
45
|
+
v: this.hd,
|
|
46
|
+
c: this.dd,
|
|
47
47
|
f: this.Xr,
|
|
48
|
-
grl: this.
|
|
48
|
+
grl: this.ad,
|
|
49
49
|
b: this.banners,
|
|
50
50
|
d: this.dust,
|
|
51
|
-
rb: this.
|
|
52
|
-
mst: this.
|
|
53
|
-
ch: this.
|
|
51
|
+
rb: this.Bd,
|
|
52
|
+
mst: this.yd,
|
|
53
|
+
ch: this.vd,
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
static _u(t) {
|
|
57
57
|
let i = t.l;
|
|
58
58
|
return (
|
|
59
|
-
"6.
|
|
59
|
+
"6.10.1" !== t.s && (i = 0),
|
|
60
60
|
new di(
|
|
61
61
|
i,
|
|
62
62
|
t.e,
|
|
@@ -79,15 +79,15 @@ export default class Kt {
|
|
|
79
79
|
(this.nc = Math.max(this.nc - 1, 0)),
|
|
80
80
|
this.B.ut(t, i, r)
|
|
81
81
|
? (this.Gh.ct(),
|
|
82
|
-
this.h.
|
|
82
|
+
this.h.ud(i),
|
|
83
83
|
(null != t.respond_with &&
|
|
84
84
|
t.respond_with.user_id != this.Ss.getUserId()) ||
|
|
85
|
-
(null != t.device && this.j.Pt(s.It.
|
|
85
|
+
(null != t.device && this.j.Pt(s.It.Ha, t.device),
|
|
86
86
|
null != t.sdk_metadata &&
|
|
87
|
-
(this.j.Pt(s.It.
|
|
88
|
-
this.j.Pt(s.It.
|
|
87
|
+
(this.j.Pt(s.It.Pa, t.sdk_metadata),
|
|
88
|
+
this.j.Pt(s.It.Ua, this.C.$t())),
|
|
89
89
|
this.hc(i),
|
|
90
|
-
h.
|
|
90
|
+
h.Tl(this.j, h.it.pn, 1),
|
|
91
91
|
"function" == typeof e && e()))
|
|
92
92
|
: i.auth_error && (d = !0);
|
|
93
93
|
},
|
|
@@ -96,12 +96,12 @@ export default class Kt {
|
|
|
96
96
|
null != t.respond_with &&
|
|
97
97
|
t.respond_with.triggers &&
|
|
98
98
|
(this.nc = Math.max(this.nc - 1, 0)),
|
|
99
|
-
this.B.
|
|
99
|
+
this.B.Wa(t.events, t.attributes),
|
|
100
100
|
"function" == typeof n && n();
|
|
101
101
|
},
|
|
102
102
|
ft: (t, s) => {
|
|
103
103
|
"function" == typeof o && o(!d);
|
|
104
|
-
const e = this.B.
|
|
104
|
+
const e = this.B.zl(s);
|
|
105
105
|
let n = 0;
|
|
106
106
|
if (e)
|
|
107
107
|
switch (e.type) {
|
|
@@ -113,7 +113,7 @@ export default class Kt {
|
|
|
113
113
|
}
|
|
114
114
|
if (i && !m) {
|
|
115
115
|
if (d) {
|
|
116
|
-
h.
|
|
116
|
+
h.jl(this.j, h.it.pn);
|
|
117
117
|
const t = this.h.vt(),
|
|
118
118
|
i = this.h.gt(),
|
|
119
119
|
s = this.h.bt();
|
|
@@ -133,9 +133,9 @@ export default class Kt {
|
|
|
133
133
|
return void b.info(
|
|
134
134
|
"Declining to flush data due to 50 consecutive authentication failures",
|
|
135
135
|
);
|
|
136
|
-
if (i && !this.B.
|
|
136
|
+
if (i && !this.B.ml(c, d, p))
|
|
137
137
|
return this.kc(), void ("function" == typeof o && o(!0));
|
|
138
|
-
const v = this.B.
|
|
138
|
+
const v = this.B.vl(p, c, d, u);
|
|
139
139
|
p && this.nc++;
|
|
140
140
|
let w = !1;
|
|
141
141
|
if (v)
|
|
@@ -188,7 +188,8 @@ export default class Kt {
|
|
|
188
188
|
(this.fc = !1);
|
|
189
189
|
}
|
|
190
190
|
rn(t) {
|
|
191
|
-
|
|
191
|
+
const i = this.uc.Ut(t);
|
|
192
|
+
return this.fc && t(), i;
|
|
192
193
|
}
|
|
193
194
|
openSession() {
|
|
194
195
|
const t = this.C.$t() !== this.C.el();
|
|
@@ -228,10 +229,10 @@ export default class Kt {
|
|
|
228
229
|
this.j.Vt(s.It.Fo), this.j.Vt(s.It.bi), this.j.Vt(s.It.pa);
|
|
229
230
|
}
|
|
230
231
|
Sc() {
|
|
231
|
-
this.j.Vt(s.It.
|
|
232
|
+
this.j.Vt(s.It.Sl),
|
|
232
233
|
this.j.Vt(s.It.ES),
|
|
233
|
-
this.j.Vt(s.It.
|
|
234
|
-
this.j.Vt(s.It.
|
|
234
|
+
this.j.Vt(s.It.Xl),
|
|
235
|
+
this.j.Vt(s.It.El);
|
|
235
236
|
}
|
|
236
237
|
changeUser(t, i, e) {
|
|
237
238
|
const h = this.Ss.getUserId();
|
|
@@ -245,7 +246,7 @@ export default class Kt {
|
|
|
245
246
|
for (let t = 0; t < i.length; t++) i[t].changeUser(null == h);
|
|
246
247
|
this.B.fo(),
|
|
247
248
|
null != h && this.j.Vt(s.It.eS),
|
|
248
|
-
this.j.Vt(s.It.
|
|
249
|
+
this.j.Vt(s.It.Ha),
|
|
249
250
|
this.j.Vt(s.It.lS),
|
|
250
251
|
this.Sc(),
|
|
251
252
|
this.openSession(),
|
|
@@ -329,7 +330,7 @@ export default class Kt {
|
|
|
329
330
|
}
|
|
330
331
|
Dr(t) {
|
|
331
332
|
for (const i of t)
|
|
332
|
-
if (i.api_key === this.tu) this.B.
|
|
333
|
+
if (i.api_key === this.tu) this.B.Wa(i.events, i.attributes);
|
|
333
334
|
else {
|
|
334
335
|
const t = et._s.Xs;
|
|
335
336
|
new et(t, b).setItem(t.Ws.Br, V.de(), i);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import pi from "./trigger-condition.js";
|
|
2
|
-
export default class
|
|
2
|
+
export default class wr {
|
|
3
3
|
constructor(t) {
|
|
4
4
|
(this.if = t), (this.if = t);
|
|
5
5
|
}
|
|
@@ -7,7 +7,7 @@ export default class jr {
|
|
|
7
7
|
return null == this.if || pi.sf(t[0], this.if);
|
|
8
8
|
}
|
|
9
9
|
static fromJson(t) {
|
|
10
|
-
return new
|
|
10
|
+
return new wr(t ? t.campaign_id : null);
|
|
11
11
|
}
|
|
12
12
|
qt() {
|
|
13
13
|
return this.if;
|
|
@@ -4,7 +4,7 @@ import ls from "./filter-set.js";
|
|
|
4
4
|
import bi from "./in-app-message-click-data.js";
|
|
5
5
|
import os from "./purchase-data.js";
|
|
6
6
|
import fs from "./purchase-property-data.js";
|
|
7
|
-
import
|
|
7
|
+
import wr from "./push-click-data.js";
|
|
8
8
|
import ot from "./trigger-events.js";
|
|
9
9
|
import { logger as b } from "../../../shared-lib/index.js";
|
|
10
10
|
import { getErrorMessage as hi } from "../../util/error-utils.js";
|
|
@@ -38,7 +38,7 @@ export default class pi {
|
|
|
38
38
|
r = fs.fromJson(e.data);
|
|
39
39
|
break;
|
|
40
40
|
case pi.la.Sr:
|
|
41
|
-
r =
|
|
41
|
+
r = wr.fromJson(e.data);
|
|
42
42
|
break;
|
|
43
43
|
case pi.la.he:
|
|
44
44
|
r = es.fromJson(e.data);
|
|
@@ -68,7 +68,7 @@ export default class pi {
|
|
|
68
68
|
(t = e.d || {}), (r = new fs(t.id, ls._u(t.pf || [])));
|
|
69
69
|
break;
|
|
70
70
|
case pi.la.Sr:
|
|
71
|
-
r = new
|
|
71
|
+
r = new wr(e.d);
|
|
72
72
|
break;
|
|
73
73
|
case pi.la.he:
|
|
74
74
|
r = new es(e.d);
|
|
@@ -14,11 +14,11 @@ export default class gt {
|
|
|
14
14
|
(this.priority = r),
|
|
15
15
|
(this.type = h),
|
|
16
16
|
(this.data = l),
|
|
17
|
-
(this.
|
|
18
|
-
(this.
|
|
17
|
+
(this.jd = o),
|
|
18
|
+
(this.Nd = n),
|
|
19
19
|
(this.ca = a),
|
|
20
|
-
(this.
|
|
21
|
-
(this.
|
|
20
|
+
(this._d = u),
|
|
21
|
+
(this.Ad = d),
|
|
22
22
|
(this.id = t),
|
|
23
23
|
(this.Pd = i || []),
|
|
24
24
|
void 0 === s && (s = null),
|
|
@@ -27,27 +27,27 @@ export default class gt {
|
|
|
27
27
|
(this.endTime = e),
|
|
28
28
|
(this.priority = r || 0),
|
|
29
29
|
(this.type = h),
|
|
30
|
-
(this.
|
|
31
|
-
null == a && (a = 1e3 * (this.
|
|
30
|
+
(this.jd = o || 0),
|
|
31
|
+
null == a && (a = 1e3 * (this.jd + 30)),
|
|
32
32
|
(this.ca = a),
|
|
33
33
|
(this.data = l),
|
|
34
|
-
null != n && (this.
|
|
35
|
-
(this.
|
|
36
|
-
(this.
|
|
34
|
+
null != n && (this.Nd = n),
|
|
35
|
+
(this._d = u),
|
|
36
|
+
(this.Ad = d || null);
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
Id(t) {
|
|
39
39
|
return (
|
|
40
|
-
null == this.
|
|
40
|
+
null == this.Ad || (this.Nd !== gt.Dd && t - this.Ad >= 1e3 * this.Nd)
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
|
-
Id(t) {
|
|
44
|
-
this._d = t;
|
|
45
|
-
}
|
|
46
43
|
$d(t) {
|
|
47
|
-
|
|
48
|
-
return Math.max(i - new Date().valueOf(), 0);
|
|
44
|
+
this.Ad = t;
|
|
49
45
|
}
|
|
50
46
|
xd(t) {
|
|
47
|
+
const i = t + 1e3 * this.jd;
|
|
48
|
+
return Math.max(i - new Date().valueOf(), 0);
|
|
49
|
+
}
|
|
50
|
+
zd(t) {
|
|
51
51
|
const i = new Date().valueOf() - t,
|
|
52
52
|
s = null == t || isNaN(i) || null == this.ca || i < this.ca;
|
|
53
53
|
return (
|
|
@@ -92,11 +92,11 @@ export default class gt {
|
|
|
92
92
|
p: this.priority,
|
|
93
93
|
t: this.type,
|
|
94
94
|
da: this.data,
|
|
95
|
-
d: this.
|
|
96
|
-
r: this.
|
|
95
|
+
d: this.jd,
|
|
96
|
+
r: this.Nd,
|
|
97
97
|
tm: this.ca,
|
|
98
|
-
ss: this.
|
|
99
|
-
ld: this.
|
|
98
|
+
ss: this._d,
|
|
99
|
+
ld: this.Ad,
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
static _u(t) {
|
|
@@ -119,4 +119,4 @@ export default class gt {
|
|
|
119
119
|
);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
(gt.la = { oa: "inapp",
|
|
122
|
+
(gt.la = { oa: "inapp", Md: "templated_iam" }), (gt.Dd = -1);
|
|
@@ -41,7 +41,7 @@ export default class vr extends t {
|
|
|
41
41
|
(this.og = this.j.St(s.It.oS) || this.og);
|
|
42
42
|
for (let t = 0; t < this.triggers.length; t++) {
|
|
43
43
|
const i = this.triggers[t];
|
|
44
|
-
i.id && null != this.og[i.id] && i
|
|
44
|
+
i.id && null != this.og[i.id] && i.$d(this.og[i.id]);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -70,7 +70,7 @@ export default class vr extends t {
|
|
|
70
70
|
h = [];
|
|
71
71
|
for (let r = 0; r < t.length; r++) {
|
|
72
72
|
const n = t[r],
|
|
73
|
-
o = s
|
|
73
|
+
o = s.xd(n.ma || 0);
|
|
74
74
|
if (o > 0) {
|
|
75
75
|
let t, r;
|
|
76
76
|
h.push(n),
|
|
@@ -118,7 +118,7 @@ export default class vr extends t {
|
|
|
118
118
|
if (h) {
|
|
119
119
|
h.id &&
|
|
120
120
|
null != this.og[h.id] &&
|
|
121
|
-
(h
|
|
121
|
+
(h.$d(this.og[h.id]), (e[h.id] = this.og[h.id])),
|
|
122
122
|
h.id && null != this.ng[h.id] && (r[h.id] = this.ng[h.id]);
|
|
123
123
|
for (let t = 0; t < h.Pd.length; t++)
|
|
124
124
|
if (h.Pd[t]._c(ot.Os, null)) {
|
|
@@ -147,12 +147,12 @@ export default class vr extends t {
|
|
|
147
147
|
const h = (e) => {
|
|
148
148
|
this.fg();
|
|
149
149
|
const r = new Date().valueOf();
|
|
150
|
-
t.
|
|
150
|
+
t.zd(i) ||
|
|
151
151
|
(!1 === navigator.onLine && t.type === gt.la.oa && e.imageUrl
|
|
152
152
|
? b.info(
|
|
153
153
|
`Not showing ${t.type} trigger action ${t.id} due to offline state.`,
|
|
154
154
|
)
|
|
155
|
-
: t.
|
|
155
|
+
: t.Id(r) && this.wg(t, r, s)
|
|
156
156
|
? 0 === this.Rs.Ve()
|
|
157
157
|
? b.info(
|
|
158
158
|
`Not displaying trigger ${t.id} because neither automaticallyShowInAppMessages() nor subscribeToInAppMessage() were called.`,
|
|
@@ -166,14 +166,14 @@ export default class vr extends t {
|
|
|
166
166
|
this.fg();
|
|
167
167
|
const h = r.pop();
|
|
168
168
|
if (null != h)
|
|
169
|
-
if ((this.Tg(h, i, s, e, r), h.
|
|
169
|
+
if ((this.Tg(h, i, s, e, r), h.zd(i))) {
|
|
170
170
|
let t = `Server aborted in-app message display, but the timeout on fallback trigger ${h.id} has already elapsed.`;
|
|
171
171
|
r.length > 0 && (t += " Continuing to fall back."), b.info(t), n();
|
|
172
172
|
} else {
|
|
173
173
|
b.info(
|
|
174
174
|
`Server aborted in-app message display. Falling back to lower priority ${h.type} trigger action ${t.id}.`,
|
|
175
175
|
);
|
|
176
|
-
const n = 1e3 * h.
|
|
176
|
+
const n = 1e3 * h.jd - (new Date().valueOf() - i);
|
|
177
177
|
n > 0
|
|
178
178
|
? this.eg.push(
|
|
179
179
|
window.setTimeout(() => {
|
|
@@ -198,7 +198,7 @@ export default class vr extends t {
|
|
|
198
198
|
}
|
|
199
199
|
h(o);
|
|
200
200
|
break;
|
|
201
|
-
case gt.la.
|
|
201
|
+
case gt.la.Md:
|
|
202
202
|
if (((a = Jt.fromJson(t.data, h, n, i, t.ca || 0)), null == a)) {
|
|
203
203
|
b.error(
|
|
204
204
|
`Could not parse trigger data for trigger ${t.id}, ignoring.`,
|
|
@@ -228,9 +228,9 @@ export default class vr extends t {
|
|
|
228
228
|
const o = [];
|
|
229
229
|
for (let s = 0; s < this.triggers.length; s++) {
|
|
230
230
|
const r = this.triggers[s],
|
|
231
|
-
l = e + 1e3 * r.
|
|
231
|
+
l = e + 1e3 * r.jd;
|
|
232
232
|
if (
|
|
233
|
-
r.
|
|
233
|
+
r.Id(l) &&
|
|
234
234
|
(null == r.startTime || r.startTime.valueOf() <= e) &&
|
|
235
235
|
(null == r.endTime || r.endTime.valueOf() >= e)
|
|
236
236
|
) {
|
|
@@ -260,12 +260,12 @@ export default class vr extends t {
|
|
|
260
260
|
`Firing ${l.type} trigger action ${l.id} from trigger event ${t}.`,
|
|
261
261
|
),
|
|
262
262
|
this.Tg(l, e, t, s, o),
|
|
263
|
-
0 === l.
|
|
263
|
+
0 === l.jd
|
|
264
264
|
? this.cg(l, e, t, s, o)
|
|
265
265
|
: this.eg.push(
|
|
266
266
|
window.setTimeout(() => {
|
|
267
267
|
this.cg(l, e, t, s, o);
|
|
268
|
-
}, 1e3 * l.
|
|
268
|
+
}, 1e3 * l.jd),
|
|
269
269
|
));
|
|
270
270
|
}
|
|
271
271
|
changeUser(t = !1) {
|
|
@@ -290,7 +290,7 @@ export default class vr extends t {
|
|
|
290
290
|
),
|
|
291
291
|
!0
|
|
292
292
|
);
|
|
293
|
-
let e = t.
|
|
293
|
+
let e = t._d;
|
|
294
294
|
return null == e && (e = this.tg), i - this.hg >= 1e3 * e;
|
|
295
295
|
}
|
|
296
296
|
Tg(t, i, e, r, h) {
|
|
@@ -306,7 +306,7 @@ export default class vr extends t {
|
|
|
306
306
|
}
|
|
307
307
|
yg(t, i) {
|
|
308
308
|
this.fg(),
|
|
309
|
-
t
|
|
309
|
+
t.$d(i),
|
|
310
310
|
(this.hg = i),
|
|
311
311
|
t.id && (this.og[t.id] = i),
|
|
312
312
|
this.j && (this.j.Pt(s.It.nS, i), this.j.Pt(s.It.oS, this.og));
|
package/src/types.js
CHANGED
package/src/ui/js/attach-css.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import r, { OPTIONS as U } from "../../managers/braze-instance.js";
|
|
2
2
|
export function attachCSS(n, t, o) {
|
|
3
3
|
const c = n || document.querySelector("head"),
|
|
4
|
-
e = `ab-${t}-css-definitions-${"6.
|
|
4
|
+
e = `ab-${t}-css-definitions-${"6.10.1".replace(/\./g, "-")}`;
|
|
5
5
|
if (!c) return;
|
|
6
6
|
const s = c.ownerDocument || document;
|
|
7
7
|
if (null == s.getElementById(e)) {
|
|
@@ -208,7 +208,7 @@ function kn(n, t) {
|
|
|
208
208
|
var u;
|
|
209
209
|
const o = Cn(n.products);
|
|
210
210
|
if (!1 === e || !1 === r || null == o) return null;
|
|
211
|
-
const c = r === un.Ld || r === un.
|
|
211
|
+
const c = r === un.Ld || r === un.Od,
|
|
212
212
|
i =
|
|
213
213
|
void 0 === n.total_value && c ? void 0 : pn(n.total_value, "total_value");
|
|
214
214
|
if (!1 === i) return null;
|
package/src/util/net.js
CHANGED
|
@@ -7,45 +7,46 @@ const h = {
|
|
|
7
7
|
Co: "feature_flags/sync",
|
|
8
8
|
Yo: "template",
|
|
9
9
|
st: "banners/sync",
|
|
10
|
+
qa: "unregister",
|
|
10
11
|
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
null ==
|
|
12
|
+
Ul: (e) => (null == e ? void 0 : e.St(s.It.ES)),
|
|
13
|
+
Rm: (e) => (null == e ? void 0 : e.St(s.It.SS)),
|
|
14
|
+
Am: (e, t) => {
|
|
15
|
+
null == e || e.Pt(s.It.ES, t);
|
|
15
16
|
},
|
|
16
|
-
qm: (
|
|
17
|
-
null ==
|
|
17
|
+
qm: (e, t) => {
|
|
18
|
+
null == e || e.Pt(s.It.SS, t);
|
|
18
19
|
},
|
|
19
|
-
|
|
20
|
-
if (!
|
|
21
|
-
const s = h.
|
|
20
|
+
Al: (e, t) => {
|
|
21
|
+
if (!e || !t) return -1;
|
|
22
|
+
const s = h.Ul(e);
|
|
22
23
|
if (null == s) return -1;
|
|
23
|
-
const n = s[
|
|
24
|
+
const n = s[t];
|
|
24
25
|
return null == n || isNaN(n) ? -1 : n;
|
|
25
26
|
},
|
|
26
|
-
|
|
27
|
+
Dl: (e, t) => {
|
|
27
28
|
let s = Qe;
|
|
28
|
-
if (!
|
|
29
|
-
const n = h.
|
|
30
|
-
return null == n ? s : ((s = n[
|
|
31
|
-
},
|
|
32
|
-
nt: (
|
|
33
|
-
if (!
|
|
34
|
-
let n = h.
|
|
35
|
-
null == n && (n = {}), (n[
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
if (!
|
|
39
|
-
let n = h.
|
|
40
|
-
null == n && (n = {}), (n[
|
|
41
|
-
},
|
|
42
|
-
Ji: (
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
if (!
|
|
47
|
-
const s = h.
|
|
48
|
-
h.
|
|
29
|
+
if (!e || !t) return s;
|
|
30
|
+
const n = h.Rm(e);
|
|
31
|
+
return null == n ? s : ((s = n[t]), null == s || isNaN(s) ? Qe : s);
|
|
32
|
+
},
|
|
33
|
+
nt: (e, t, s) => {
|
|
34
|
+
if (!e || !t) return;
|
|
35
|
+
let n = h.Ul(e);
|
|
36
|
+
null == n && (n = {}), (n[t] = s), h.Am(e, n);
|
|
37
|
+
},
|
|
38
|
+
Tl: (e, t, s) => {
|
|
39
|
+
if (!e || !t) return;
|
|
40
|
+
let n = h.Rm(e);
|
|
41
|
+
null == n && (n = {}), (n[t] = s), h.qm(e, n);
|
|
42
|
+
},
|
|
43
|
+
Ji: (e, t) => {
|
|
44
|
+
e && t && h.Tl(e, t, Qe);
|
|
45
|
+
},
|
|
46
|
+
jl: (e, t) => {
|
|
47
|
+
if (!e || !t) return;
|
|
48
|
+
const s = h.Dl(e, t);
|
|
49
|
+
h.Tl(e, t, s + 1);
|
|
49
50
|
},
|
|
50
51
|
};
|
|
51
52
|
export default h;
|