@braze/web-sdk 6.10.2 → 6.11.0
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 +28 -4
- package/package.json +1 -1
- package/shared-lib/encoding-utils.js +3 -3
- package/shared-lib/event-types.js +10 -10
- package/shared-lib/indexed-db-adapter.js +51 -51
- package/shared-lib/logger.js +7 -7
- package/shared-lib/supported-options.js +9 -9
- package/src/Core/logout.js +2 -2
- package/src/InAppMessage/constants.js +39 -47
- package/src/InAppMessage/display/html-message-to-html.js +1 -1
- package/src/InAppMessage/display/in-app-message-to-html.js +38 -36
- package/src/InAppMessage/in-app-message-factory.js +4 -4
- package/src/InAppMessage/in-app-message-manager.js +89 -68
- package/src/InAppMessage/log-in-app-message-button-click.js +1 -1
- package/src/InAppMessage/log-in-app-message-click.js +1 -1
- package/src/InAppMessage/log-in-app-message-html-click.js +2 -2
- package/src/InAppMessage/log-in-app-message-impression.js +1 -1
- package/src/InAppMessage/models/full-screen-message.js +22 -22
- package/src/InAppMessage/models/html-message.js +13 -13
- package/src/InAppMessage/models/in-app-message-button.js +2 -2
- package/src/InAppMessage/models/in-app-message.js +68 -66
- package/src/InAppMessage/models/modal-message.js +20 -20
- package/src/InAppMessage/models/slide-up-message.js +25 -25
- package/src/InAppMessage/models/templated-in-app-message.js +6 -6
- package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
- package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
- package/src/InAppMessage/ui/show-in-app-message.js +27 -25
- package/src/Push/index.js +1 -0
- package/src/Push/push-manager-factory.js +4 -4
- package/src/Push/push-manager.js +222 -179
- package/src/Push/register-push.js +9 -0
- package/src/Push/unregister-push-token-on-server.js +4 -4
- package/src/Push/utils/push-utils.js +8 -8
- package/src/User/user-manager.js +19 -19
- package/src/User/user.js +35 -35
- package/src/common/constants.js +1 -1
- package/src/common/content-cards-display.js +5 -5
- package/src/l10n/l10n-manager-factory.js +1 -1
- package/src/l10n/l10n-manager.js +1 -1
- package/src/managers/braze-instance.js +42 -38
- package/src/managers/device-manager.js +20 -20
- package/src/managers/network-manager.js +122 -122
- package/src/managers/server-config-manager.js +76 -76
- package/src/managers/session-manager.js +8 -8
- package/src/managers/storage-manager.js +127 -127
- package/src/managers/utils.js +1 -1
- package/src/models/backend-errors.js +5 -5
- package/src/models/braze-event.js +2 -2
- package/src/models/device.js +3 -3
- package/src/models/identifier.js +6 -6
- package/src/models/push-token.js +6 -6
- package/src/models/server-config.js +24 -24
- package/src/request-controller.js +85 -85
- package/src/triggers/models/trigger-condition.js +27 -27
- package/src/triggers/models/trigger.js +2 -2
- package/src/triggers/triggers-provider-factory.js +1 -1
- package/src/triggers/triggers-provider.js +37 -29
- package/src/types.js +2 -2
- package/src/ui/js/attach-css.js +1 -1
- package/src/util/base-device-parser.js +1 -1
- package/src/util/braze-actions.js +4 -4
- package/src/util/browser-detector.js +5 -5
- package/src/util/client-hints-parser.js +1 -1
- package/src/util/dom-utils.js +2 -2
- package/src/util/ecommerce-event-validation.js +1 -1
- package/src/util/key-codes.js +1 -1
- package/src/util/net.js +3 -3
- package/src/util/request-header-utils.js +15 -15
- package/src/util/user-agent-parser.js +4 -4
- package/src/util/validation-utils.js +5 -5
- package/src/util/window-utils.js +2 -2
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
convertSecondsToMs as Xe,
|
|
6
6
|
} from "../util/date-utils.js";
|
|
7
7
|
import v from "../common/event-logger.js";
|
|
8
|
-
import { isArray as g, isEqual as
|
|
8
|
+
import { isArray as g, isEqual as hi } from "../util/code-utils.js";
|
|
9
9
|
import { logger as b, EventTypes as p } from "../../shared-lib/index.js";
|
|
10
10
|
import { STORAGE_KEYS as s } from "./storage-manager.js";
|
|
11
11
|
import h from "../util/request-header-utils.js";
|
|
@@ -14,53 +14,53 @@ import {
|
|
|
14
14
|
MAX_RETRY_COUNT_PER_REQUEST as Pe,
|
|
15
15
|
} from "../common/constants.js";
|
|
16
16
|
import { getAlias as He } from "./utils.js";
|
|
17
|
-
import { readResponseHeaders as
|
|
17
|
+
import { readResponseHeaders as Ge } from "../util/net.js";
|
|
18
18
|
export default class Vt {
|
|
19
19
|
constructor(t, e, i, s, r, n, o, a, h, u, l, c) {
|
|
20
|
-
(this.
|
|
20
|
+
(this.tu = t),
|
|
21
21
|
(this.j = e),
|
|
22
22
|
(this.Gh = i),
|
|
23
23
|
(this.Ss = s),
|
|
24
24
|
(this.C = r),
|
|
25
25
|
(this.h = n),
|
|
26
|
-
(this.
|
|
26
|
+
(this.eu = o),
|
|
27
27
|
(this.Yh = a),
|
|
28
28
|
(this.Vh = h),
|
|
29
29
|
(this.Kh = u),
|
|
30
30
|
(this.appVersion = l),
|
|
31
|
-
(this.
|
|
32
|
-
(this
|
|
33
|
-
(this.
|
|
31
|
+
(this.Xa = c),
|
|
32
|
+
(this.$a = (t) => (null == t ? "" : `${t} `)),
|
|
33
|
+
(this.tu = t),
|
|
34
34
|
(this.j = e),
|
|
35
35
|
(this.Gh = i),
|
|
36
36
|
(this.Ss = s),
|
|
37
37
|
(this.C = r),
|
|
38
38
|
(this.h = n),
|
|
39
|
-
(this.
|
|
39
|
+
(this.eu = o),
|
|
40
40
|
(this.Yh = a),
|
|
41
41
|
(this.Vh = h),
|
|
42
42
|
(this.Kh = u),
|
|
43
43
|
(this.appVersion = l),
|
|
44
|
-
(this.
|
|
45
|
-
(this
|
|
46
|
-
(this.
|
|
44
|
+
(this.Xa = c),
|
|
45
|
+
(this.Wa = ["npm"]),
|
|
46
|
+
(this.Ya = {});
|
|
47
47
|
}
|
|
48
48
|
Z(t, e = !1, i = !1) {
|
|
49
|
-
const r = this.
|
|
50
|
-
n = r.
|
|
51
|
-
o = this.j.St(s.It.
|
|
52
|
-
|
|
53
|
-
(t.api_key = this.
|
|
49
|
+
const r = this.tu.ve(!i),
|
|
50
|
+
n = r.oa(),
|
|
51
|
+
o = this.j.St(s.It.La);
|
|
52
|
+
hi(o, n) || (t.device = n),
|
|
53
|
+
(t.api_key = this.eu),
|
|
54
54
|
(t.time = X(new Date().valueOf(), !0));
|
|
55
|
-
const a = this.j.St(s.It.
|
|
56
|
-
h = this.j.St(s.It.
|
|
57
|
-
this
|
|
58
|
-
(!
|
|
59
|
-
(t.sdk_metadata = this
|
|
55
|
+
const a = this.j.St(s.It.Qa) || [],
|
|
56
|
+
h = this.j.St(s.It.Va) || "";
|
|
57
|
+
this.Wa.length > 0 &&
|
|
58
|
+
(!hi(a, this.Wa) || h !== this.C.$t()) &&
|
|
59
|
+
(t.sdk_metadata = this.Wa),
|
|
60
60
|
(t.sdk_version = this.Vh),
|
|
61
61
|
this.Kh && (t.sdk_flavor = this.Kh),
|
|
62
62
|
(t.app_version = this.appVersion),
|
|
63
|
-
(t.app_version_code = this.
|
|
63
|
+
(t.app_version_code = this.Xa),
|
|
64
64
|
(t.device_id = r.id);
|
|
65
65
|
const u = this.Ss.getUserId();
|
|
66
66
|
if ((e && null !== u && (t.user_id = u), !u && !this.Gh.Fh())) {
|
|
@@ -91,7 +91,7 @@ export default class Vt {
|
|
|
91
91
|
(e +=
|
|
92
92
|
' Please use the "enableSdkAuthentication" initialization option to enable authentication.'),
|
|
93
93
|
b.error(`SDK Authentication failed ${e}`),
|
|
94
|
-
this.
|
|
94
|
+
this.Za(t.events || [], t.attributes || []),
|
|
95
95
|
this.Gh.Ch(r),
|
|
96
96
|
!1
|
|
97
97
|
);
|
|
@@ -100,28 +100,28 @@ export default class Vt {
|
|
|
100
100
|
let i,
|
|
101
101
|
s = r;
|
|
102
102
|
switch (s) {
|
|
103
|
-
case Ne.
|
|
103
|
+
case Ne.dl:
|
|
104
104
|
return (
|
|
105
105
|
(i = "Received successful response with empty body."),
|
|
106
|
-
v.Dt(p.
|
|
106
|
+
v.Dt(p.fl, { e: i }),
|
|
107
107
|
b.info(i),
|
|
108
108
|
!1
|
|
109
109
|
);
|
|
110
|
-
case Ne.
|
|
110
|
+
case Ne.ml:
|
|
111
111
|
return (
|
|
112
112
|
(i = "Received successful response with invalid JSON"),
|
|
113
|
-
v.Dt(p.
|
|
113
|
+
v.Dt(p.fl, { e: i + ": " + e.response }),
|
|
114
114
|
b.info(i),
|
|
115
115
|
!1
|
|
116
116
|
);
|
|
117
|
-
case Ne.
|
|
117
|
+
case Ne.vl:
|
|
118
118
|
s = `The API key "${t.api_key}" is invalid for the baseUrl ${this.Yh}`;
|
|
119
119
|
break;
|
|
120
|
-
case Ne.
|
|
120
|
+
case Ne.Rl:
|
|
121
121
|
s =
|
|
122
122
|
"Sorry, we are not currently accepting your requests. If you think this is in error, please contact us.";
|
|
123
123
|
break;
|
|
124
|
-
case Ne.
|
|
124
|
+
case Ne.gl:
|
|
125
125
|
s =
|
|
126
126
|
"No device identifier. Please contact Braze Technical Support for assistance.";
|
|
127
127
|
}
|
|
@@ -129,51 +129,51 @@ export default class Vt {
|
|
|
129
129
|
}
|
|
130
130
|
return !1;
|
|
131
131
|
}
|
|
132
|
-
|
|
132
|
+
bl(t, e, i) {
|
|
133
133
|
return !!((t && 0 !== t.length) || (e && 0 !== e.length) || i);
|
|
134
134
|
}
|
|
135
|
-
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
let
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
let
|
|
143
|
-
|
|
135
|
+
ql(t, e, i, s = !1, r = "sdk") {
|
|
136
|
+
const n = [],
|
|
137
|
+
o = (t) => t || "",
|
|
138
|
+
a = o(this.Ss.getUserId());
|
|
139
|
+
let u = this.ia(t);
|
|
140
|
+
const l = [],
|
|
141
|
+
c = [];
|
|
142
|
+
let d,
|
|
143
|
+
f = null;
|
|
144
144
|
if (e.length > 0) {
|
|
145
145
|
const t = [];
|
|
146
146
|
for (const i of e) {
|
|
147
|
-
if (((
|
|
148
|
-
if (
|
|
149
|
-
|
|
147
|
+
if (((d = i.oa()), this.Gh.Fh())) {
|
|
148
|
+
if (a && !d.user_id) {
|
|
149
|
+
f || (f = {}), f.events || (f.events = []), f.events.push(d);
|
|
150
150
|
continue;
|
|
151
151
|
}
|
|
152
|
-
if (
|
|
153
|
-
|
|
152
|
+
if (o(d.user_id) !== a) {
|
|
153
|
+
c.push(d);
|
|
154
154
|
continue;
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
t.push(
|
|
157
|
+
t.push(d);
|
|
158
158
|
}
|
|
159
|
-
t.length > 0 && (
|
|
159
|
+
t.length > 0 && (u.events = t);
|
|
160
160
|
}
|
|
161
161
|
if (i.length > 0) {
|
|
162
162
|
const t = [];
|
|
163
163
|
for (const e of i)
|
|
164
|
-
e && (this.Gh.Fh() &&
|
|
165
|
-
t.length > 0 && (
|
|
164
|
+
e && (this.Gh.Fh() && o(e.user_id) !== a ? l.push(e) : t.push(e));
|
|
165
|
+
t.length > 0 && (u.attributes = t);
|
|
166
166
|
}
|
|
167
|
-
if ((this.
|
|
168
|
-
|
|
169
|
-
const t = { requestData:
|
|
170
|
-
|
|
167
|
+
if ((this.Za(c, l), (u = this.Z(u, !1, s)), f)) {
|
|
168
|
+
f = this.Z(f, !1, s);
|
|
169
|
+
const t = { requestData: f, headers: this.tt(f, h.it.pn, r) };
|
|
170
|
+
n.push(t);
|
|
171
171
|
}
|
|
172
|
-
if (
|
|
173
|
-
const
|
|
174
|
-
return
|
|
172
|
+
if (u && !this.bl(u.events, u.attributes, t)) return f ? n : null;
|
|
173
|
+
const m = { requestData: u, headers: this.tt(u, h.it.pn, r) };
|
|
174
|
+
return n.push(m), n;
|
|
175
175
|
}
|
|
176
|
-
|
|
176
|
+
Za(t, e) {
|
|
177
177
|
if (t) {
|
|
178
178
|
const e = [];
|
|
179
179
|
for (const i of t) {
|
|
@@ -182,16 +182,16 @@ export default class Vt {
|
|
|
182
182
|
}
|
|
183
183
|
this.j.ol(e);
|
|
184
184
|
}
|
|
185
|
-
if (e) for (const t of e) this.j.
|
|
185
|
+
if (e) for (const t of e) this.j.Al(t);
|
|
186
186
|
}
|
|
187
187
|
dt(t, e) {
|
|
188
188
|
let i = "HTTP error ";
|
|
189
189
|
null != t && (i += t + " "), (i += e), b.error(i);
|
|
190
190
|
}
|
|
191
|
-
|
|
192
|
-
return v.Dt(p.
|
|
191
|
+
Dl(t) {
|
|
192
|
+
return v.Dt(p.kl, { n: t });
|
|
193
193
|
}
|
|
194
|
-
|
|
194
|
+
ia(t, e) {
|
|
195
195
|
const i = {};
|
|
196
196
|
t && (i.triggers = !0);
|
|
197
197
|
const s = null != e ? e : this.Ss.getUserId();
|
|
@@ -201,20 +201,20 @@ export default class Vt {
|
|
|
201
201
|
}
|
|
202
202
|
return (i.config = { config_time: this.h.Qt() }), { respond_with: i };
|
|
203
203
|
}
|
|
204
|
-
|
|
204
|
+
Tl(t) {
|
|
205
205
|
const e = new Date().valueOf();
|
|
206
206
|
let i = Ke.toString();
|
|
207
|
-
const s = h.
|
|
207
|
+
const s = h.yl(this.j, t);
|
|
208
208
|
if (-1 !== s) {
|
|
209
209
|
i = (e - s).toString();
|
|
210
210
|
}
|
|
211
211
|
return i;
|
|
212
212
|
}
|
|
213
213
|
tt(t, e, i = "sdk") {
|
|
214
|
-
const s = [["X-Braze-Api-Key", this.
|
|
215
|
-
r = this.
|
|
214
|
+
const s = [["X-Braze-Api-Key", this.eu]],
|
|
215
|
+
r = this.Tl(e);
|
|
216
216
|
s.push(["X-Braze-Last-Req-Ms-Ago", r]);
|
|
217
|
-
const n = h.
|
|
217
|
+
const n = h.wl(this.j, e).toString();
|
|
218
218
|
s.push(["X-Braze-Req-Attempt", n]);
|
|
219
219
|
let o = !1;
|
|
220
220
|
if (
|
|
@@ -224,8 +224,8 @@ export default class Vt {
|
|
|
224
224
|
e === h.it.Mi)
|
|
225
225
|
) {
|
|
226
226
|
s.push(["X-Braze-ContentCardsRequest", "true"]);
|
|
227
|
-
let t = h.
|
|
228
|
-
(t && "client" !== i) || ((t = 1), h.
|
|
227
|
+
let t = h.wl(this.j, h.it.Mi);
|
|
228
|
+
(t && "client" !== i) || ((t = 1), h.Nl(this.j, h.it.Mi, t));
|
|
229
229
|
const e = Math.max(0, t - 1);
|
|
230
230
|
s.push(["BRAZE-SYNC-RETRY-COUNT", e.toString()]), (o = !0);
|
|
231
231
|
}
|
|
@@ -241,49 +241,49 @@ export default class Vt {
|
|
|
241
241
|
}
|
|
242
242
|
return s;
|
|
243
243
|
}
|
|
244
|
-
|
|
245
|
-
if (this.
|
|
244
|
+
Bl(t, e, i, s) {
|
|
245
|
+
if (this.Ya[s]) return;
|
|
246
246
|
const r = window.setTimeout(() => {
|
|
247
|
-
b.info(`Retrying rate limited ${this
|
|
247
|
+
b.info(`Retrying rate limited ${this.$a(s)}SDK request.`),
|
|
248
248
|
this.et(e, i, s);
|
|
249
249
|
}, t);
|
|
250
|
-
this.
|
|
250
|
+
this.Ya[s] = r;
|
|
251
251
|
}
|
|
252
252
|
fo() {
|
|
253
|
-
for (const t in this.
|
|
254
|
-
const e = this.
|
|
253
|
+
for (const t in this.Ya) {
|
|
254
|
+
const e = this.Ya[t];
|
|
255
255
|
window.clearTimeout(e);
|
|
256
256
|
}
|
|
257
|
-
this.
|
|
257
|
+
this.Ya = {};
|
|
258
258
|
}
|
|
259
259
|
et(t, e, i, r) {
|
|
260
|
-
if (!this.
|
|
260
|
+
if (!this.Sl(i))
|
|
261
261
|
return (
|
|
262
|
-
b.info(`${this
|
|
262
|
+
b.info(`${this.$a(i)}SDK request being rate limited.`),
|
|
263
263
|
void ("function" == typeof r && r())
|
|
264
264
|
);
|
|
265
|
-
const n = this.
|
|
266
|
-
if (!n.
|
|
265
|
+
const n = this.Cl();
|
|
266
|
+
if (!n.zl)
|
|
267
267
|
return (
|
|
268
|
-
this.
|
|
268
|
+
this.Bl(n.jl, t, e, i),
|
|
269
269
|
void b.info(
|
|
270
|
-
`${this
|
|
270
|
+
`${this.$a(
|
|
271
271
|
i,
|
|
272
272
|
)}SDK request being rate limited. Request will be retried in ${Math.trunc(
|
|
273
|
-
n.
|
|
273
|
+
n.jl / 1e3,
|
|
274
274
|
)} seconds.`,
|
|
275
275
|
)
|
|
276
276
|
);
|
|
277
|
-
this.j.Pt(s.It.
|
|
277
|
+
this.j.Pt(s.It.Ml, new Date().valueOf());
|
|
278
278
|
const o = t.device;
|
|
279
279
|
o && o.os_version instanceof Promise
|
|
280
280
|
? o.os_version.then((i) => {
|
|
281
|
-
(t.device.os_version = i), e(n.
|
|
281
|
+
(t.device.os_version = i), e(n.Xl);
|
|
282
282
|
})
|
|
283
|
-
: e(n.
|
|
283
|
+
: e(n.Xl);
|
|
284
284
|
}
|
|
285
|
-
|
|
286
|
-
const e = t ?
|
|
285
|
+
$l(t) {
|
|
286
|
+
const e = t ? Ge(t) : null;
|
|
287
287
|
if (!e || !e["retry-after"]) return null;
|
|
288
288
|
const i = e["retry-after"];
|
|
289
289
|
if (isNaN(i) && !isNaN(Date.parse(i)))
|
|
@@ -293,21 +293,21 @@ export default class Vt {
|
|
|
293
293
|
{
|
|
294
294
|
const t =
|
|
295
295
|
"Received unexpected value for retry-after header in /sync response";
|
|
296
|
-
v.Dt(p.
|
|
296
|
+
v.Dt(p.fl, { e: t + ": " + i });
|
|
297
297
|
}
|
|
298
298
|
return null;
|
|
299
299
|
}
|
|
300
300
|
yt(t, e, i, s, r, n) {
|
|
301
|
-
if (h.
|
|
301
|
+
if (h.wl(this.j, i) >= Pe) return;
|
|
302
302
|
let o;
|
|
303
303
|
n = n || 0;
|
|
304
|
-
const a = this
|
|
304
|
+
const a = this.$l(t);
|
|
305
305
|
r();
|
|
306
306
|
const u = (t) => {
|
|
307
307
|
const r = window.setTimeout(() => {
|
|
308
308
|
e();
|
|
309
309
|
}, t);
|
|
310
|
-
s(r), h.
|
|
310
|
+
s(r), h.Ll(this.j, i);
|
|
311
311
|
};
|
|
312
312
|
if (a && !isNaN(a.value)) {
|
|
313
313
|
switch (a.type) {
|
|
@@ -320,44 +320,44 @@ export default class Vt {
|
|
|
320
320
|
u(o);
|
|
321
321
|
} else n ? u(n) : h.Ji(this.j, i);
|
|
322
322
|
}
|
|
323
|
-
|
|
323
|
+
El(t) {
|
|
324
324
|
var e;
|
|
325
|
-
null === (e = this.j) || void 0 === e || e.Pt(s.It.
|
|
325
|
+
null === (e = this.j) || void 0 === e || e.Pt(s.It.Fl, t);
|
|
326
326
|
}
|
|
327
|
-
|
|
328
|
-
let i = this.
|
|
329
|
-
null == i && (i = {}), (i[t] = e), this.j.Pt(s.It.
|
|
327
|
+
Il(t, e) {
|
|
328
|
+
let i = this.Kl();
|
|
329
|
+
null == i && (i = {}), (i[t] = e), this.j.Pt(s.It.Pl, i);
|
|
330
330
|
}
|
|
331
|
-
|
|
331
|
+
Ul() {
|
|
332
332
|
var t;
|
|
333
|
-
return null === (t = this.j) || void 0 === t ? void 0 : t.St(s.It.
|
|
333
|
+
return null === (t = this.j) || void 0 === t ? void 0 : t.St(s.It.Fl);
|
|
334
334
|
}
|
|
335
|
-
|
|
335
|
+
Kl() {
|
|
336
336
|
var t;
|
|
337
|
-
return null === (t = this.j) || void 0 === t ? void 0 : t.St(s.It.
|
|
337
|
+
return null === (t = this.j) || void 0 === t ? void 0 : t.St(s.It.Pl);
|
|
338
338
|
}
|
|
339
|
-
|
|
339
|
+
xl(t, e, i, s, r = "") {
|
|
340
340
|
let n;
|
|
341
341
|
if (r) {
|
|
342
|
-
const t = this.
|
|
342
|
+
const t = this.Kl();
|
|
343
343
|
n = null == t || isNaN(t[r]) ? e : t[r];
|
|
344
|
-
} else (n = this.
|
|
344
|
+
} else (n = this.Ul()), (null == n || isNaN(n)) && (n = e);
|
|
345
345
|
const o = (t - s) / 1e3;
|
|
346
346
|
return (n = Math.min(n + o / i, e)), n;
|
|
347
347
|
}
|
|
348
|
-
|
|
348
|
+
Hl(t, e) {
|
|
349
349
|
return Math.max(0, (1 - t) * e * 1e3);
|
|
350
350
|
}
|
|
351
|
-
|
|
351
|
+
Ol(t, e = "") {
|
|
352
352
|
var i, r, n, o, a;
|
|
353
|
-
const u = {
|
|
353
|
+
const u = { zl: !0, Xl: -1, jl: 0 };
|
|
354
354
|
if ((null == t && (t = !0), !t && !e)) return u;
|
|
355
355
|
let l,
|
|
356
356
|
c,
|
|
357
357
|
d = null;
|
|
358
|
-
if (t) d = null === (i = this.j) || void 0 === i ? void 0 : i.St(s.It.
|
|
358
|
+
if (t) d = null === (i = this.j) || void 0 === i ? void 0 : i.St(s.It.Ml);
|
|
359
359
|
else {
|
|
360
|
-
const t = h.
|
|
360
|
+
const t = h.Gl(this.j);
|
|
361
361
|
if (null == t || null == t[e]) return u;
|
|
362
362
|
d = t[e];
|
|
363
363
|
}
|
|
@@ -365,30 +365,30 @@ export default class Vt {
|
|
|
365
365
|
if (
|
|
366
366
|
(t
|
|
367
367
|
? ((l =
|
|
368
|
-
(null === (r = this.h) || void 0 === r ? void 0 : r.
|
|
369
|
-
(c = (null === (n = this.h) || void 0 === n ? void 0 : n.
|
|
368
|
+
(null === (r = this.h) || void 0 === r ? void 0 : r._l()) || -1),
|
|
369
|
+
(c = (null === (n = this.h) || void 0 === n ? void 0 : n.Wl()) || -1))
|
|
370
370
|
: ((l =
|
|
371
|
-
(null === (o = this.h) || void 0 === o ? void 0 : o.
|
|
371
|
+
(null === (o = this.h) || void 0 === o ? void 0 : o.Yl(e)) || -1),
|
|
372
372
|
(c =
|
|
373
|
-
(null === (a = this.h) || void 0 === a ? void 0 : a.
|
|
373
|
+
(null === (a = this.h) || void 0 === a ? void 0 : a.Jl(e)) || -1)),
|
|
374
374
|
-1 === l || -1 === c)
|
|
375
375
|
)
|
|
376
376
|
return u;
|
|
377
377
|
const f = new Date().valueOf();
|
|
378
|
-
let m = this.
|
|
378
|
+
let m = this.xl(f, l, c, d, e);
|
|
379
379
|
return m < 1
|
|
380
|
-
? ((u.
|
|
380
|
+
? ((u.zl = !1), (u.jl = this.Hl(m, c)), u)
|
|
381
381
|
: ((m = Math.trunc(m) - 1),
|
|
382
|
-
(u.
|
|
383
|
-
t ? this.
|
|
382
|
+
(u.Xl = m),
|
|
383
|
+
t ? this.El(m) : this.Il(e, m),
|
|
384
384
|
u);
|
|
385
385
|
}
|
|
386
|
-
|
|
387
|
-
return this.
|
|
386
|
+
Cl() {
|
|
387
|
+
return this.Ol(!0);
|
|
388
388
|
}
|
|
389
|
-
|
|
390
|
-
const e = this.
|
|
391
|
-
return !(e && !e.
|
|
389
|
+
Sl(t) {
|
|
390
|
+
const e = this.Ol(!1, t);
|
|
391
|
+
return !(e && !e.zl);
|
|
392
392
|
}
|
|
393
393
|
ct() {
|
|
394
394
|
this.Gh.ct();
|
|
@@ -397,6 +397,6 @@ export default class Vt {
|
|
|
397
397
|
return this.Yh;
|
|
398
398
|
}
|
|
399
399
|
addSdkMetadata(t) {
|
|
400
|
-
for (const e of t) -1 === this
|
|
400
|
+
for (const e of t) -1 === this.Wa.indexOf(e) && this.Wa.push(e);
|
|
401
401
|
}
|
|
402
402
|
}
|