@braze/web-sdk 5.2.0 → 5.3.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.
Files changed (90) hide show
  1. package/index.d.ts +54 -5
  2. package/package.json +1 -1
  3. package/shared-lib/event-types.js +14 -14
  4. package/shared-lib/indexed-db-adapter.js +51 -51
  5. package/shared-lib/logger.js +7 -7
  6. package/shared-lib/supported-options.js +7 -7
  7. package/src/ContentCards/content-cards-provider.js +107 -135
  8. package/src/ContentCards/get-cached-content-cards.js +1 -1
  9. package/src/ContentCards/request-content-cards-refresh.js +1 -1
  10. package/src/ContentCards/subscribe-to-content-cards-updates.js +2 -2
  11. package/src/ContentCards/ui/show-content-cards.js +1 -1
  12. package/src/FeatureFlags/feature-flag.js +41 -30
  13. package/src/FeatureFlags/feature-flags-provider.js +88 -84
  14. package/src/FeatureFlags/get-all-feature-flags.js +2 -2
  15. package/src/FeatureFlags/get-feature-flag.js +2 -2
  16. package/src/FeatureFlags/log-feature-flag-impression.js +3 -3
  17. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +2 -2
  18. package/src/Feed/feed-provider.js +24 -24
  19. package/src/Feed/get-cached-feed.js +1 -1
  20. package/src/Feed/log-feed-displayed.js +1 -1
  21. package/src/Feed/request-feed-refresh.js +1 -1
  22. package/src/Feed/subscribe-to-feed-updates.js +1 -1
  23. package/src/Feed/ui/show-feed.js +1 -1
  24. package/src/InAppMessage/defer-in-app-message.js +1 -1
  25. package/src/InAppMessage/display/html-message-to-html.js +9 -9
  26. package/src/InAppMessage/display/in-app-message-to-html.js +20 -20
  27. package/src/InAppMessage/display/modal-utils.js +5 -5
  28. package/src/InAppMessage/get-deferred-in-app-message.js +1 -1
  29. package/src/InAppMessage/in-app-message-factory.js +4 -4
  30. package/src/InAppMessage/in-app-message-manager.js +78 -75
  31. package/src/InAppMessage/log-in-app-message-button-click.js +2 -2
  32. package/src/InAppMessage/log-in-app-message-click.js +3 -3
  33. package/src/InAppMessage/log-in-app-message-html-click.js +3 -3
  34. package/src/InAppMessage/log-in-app-message-impression.js +1 -1
  35. package/src/InAppMessage/models/full-screen-message.js +12 -12
  36. package/src/InAppMessage/models/html-message.js +9 -9
  37. package/src/InAppMessage/models/in-app-message-button.js +2 -2
  38. package/src/InAppMessage/models/in-app-message.js +84 -82
  39. package/src/InAppMessage/models/modal-message.js +12 -12
  40. package/src/InAppMessage/models/slide-up-message.js +17 -17
  41. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  42. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  43. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  44. package/src/InAppMessage/ui/show-in-app-message.js +17 -17
  45. package/src/Push/push-manager-factory.js +6 -6
  46. package/src/Push/push-manager.js +2 -2
  47. package/src/Push/utils/push-utils.js +1 -1
  48. package/src/User/user.js +12 -12
  49. package/src/common/base-provider.js +1 -1
  50. package/src/common/constants.js +0 -2
  51. package/src/common/event-logger.js +2 -2
  52. package/src/common/feed-display.js +1 -1
  53. package/src/managers/auth-manager.js +3 -3
  54. package/src/managers/braze-instance.js +73 -73
  55. package/src/managers/device-manager.js +15 -15
  56. package/src/managers/network-manager.js +190 -145
  57. package/src/managers/server-config-manager.js +43 -47
  58. package/src/managers/session-manager.js +21 -21
  59. package/src/managers/storage-manager-factory.js +1 -1
  60. package/src/managers/storage-manager.js +107 -107
  61. package/src/managers/utils.js +1 -1
  62. package/src/models/backend-errors.js +5 -5
  63. package/src/models/braze-event.js +6 -6
  64. package/src/models/device.js +2 -2
  65. package/src/models/identifier.js +8 -8
  66. package/src/models/server-config.js +25 -25
  67. package/src/request-controller.js +115 -108
  68. package/src/triggers/models/custom-event-data.js +2 -2
  69. package/src/triggers/models/custom-event-property-data.js +4 -4
  70. package/src/triggers/models/filter-set.js +3 -3
  71. package/src/triggers/models/filter.js +55 -55
  72. package/src/triggers/models/in-app-message-click-data.js +8 -8
  73. package/src/triggers/models/purchase-data.js +2 -2
  74. package/src/triggers/models/purchase-property-data.js +4 -4
  75. package/src/triggers/models/push-click-data.js +3 -3
  76. package/src/triggers/models/trigger-condition.js +40 -40
  77. package/src/triggers/models/trigger-events.js +1 -1
  78. package/src/triggers/models/trigger.js +31 -31
  79. package/src/triggers/triggers-provider-factory.js +1 -1
  80. package/src/triggers/triggers-provider.js +40 -40
  81. package/src/ui/js/attach-css.js +2 -2
  82. package/src/util/base-device-parser.js +7 -7
  83. package/src/util/braze-actions.js +4 -4
  84. package/src/util/browser-detector.js +23 -23
  85. package/src/util/client-hints-parser.js +4 -4
  86. package/src/util/dom-utils.js +6 -6
  87. package/src/util/net.js +4 -4
  88. package/src/util/request-header-utils.js +36 -37
  89. package/src/util/user-agent-parser.js +7 -7
  90. package/src/util/window-utils.js +1 -1
package/src/User/user.js CHANGED
@@ -18,7 +18,7 @@ import { SET_CUSTOM_USER_ATTRIBUTE_STRING as Ft } from "../common/constants.js";
18
18
  import { toValidBackendTimeString as $t } from "../util/date-utils.js";
19
19
  export default class User {
20
20
  constructor(t, e) {
21
- (this.wt = t), (this.Ei = e), (this.wt = t), (this.Ei = e);
21
+ (this.wt = t), (this.zi = e), (this.wt = t), (this.zi = e);
22
22
  }
23
23
  getUserId(t) {
24
24
  const e = this.wt.getUserId();
@@ -33,7 +33,7 @@ export default class User {
33
33
  ? (r.error("addAlias requires a non-empty alias"), !1)
34
34
  : !P(e, "add alias", "the label", !1) || e.length <= 0
35
35
  ? (r.error("addAlias requires a non-empty label"), !1)
36
- : this.Ei.Cn(t, e).L;
36
+ : this.zi.Cn(t, e).L;
37
37
  }
38
38
  setFirstName(t) {
39
39
  return (
@@ -162,7 +162,7 @@ export default class User {
162
162
  "Cannot set last-known location - accuracy and altitudeAccuracy may not be negative.",
163
163
  ),
164
164
  !1)
165
- : this.Ei.setLastKnownLocation(this.wt.getUserId(), t, e, n, s, i).L);
165
+ : this.zi.setLastKnownLocation(this.wt.getUserId(), t, e, n, s, i).L);
166
166
  }
167
167
  setCustomUserAttribute(t, e, r) {
168
168
  if (!At(t)) return !1;
@@ -179,11 +179,11 @@ export default class User {
179
179
  if (j(e)) {
180
180
  const [r, n] = St(t, e);
181
181
  if (!r && !n && 0 !== e.length) return !1;
182
- if (r || 0 === e.length) return this.Ei.Fn(i.$n, t, e).L;
182
+ if (r || 0 === e.length) return this.zi.Fn(i.$n, t, e).L;
183
183
  for (const t of e) if (!s(t)) return !1;
184
184
  } else if (Nt(e)) {
185
185
  if (!s(e)) return !1;
186
- if (r) return this.Ei.Fn(i.Bn, t, e).L;
186
+ if (r) return this.zi.Fn(i.Bn, t, e).L;
187
187
  } else {
188
188
  if (!(void 0 !== e && Ut(e))) return !1;
189
189
  if (
@@ -206,7 +206,7 @@ export default class User {
206
206
  null != e &&
207
207
  !rt(e, "add to custom user attribute array", "the given value")
208
208
  ) &&
209
- this.Ei.Fn(i.Ln, t, e).L
209
+ this.zi.Fn(i.Ln, t, e).L
210
210
  );
211
211
  }
212
212
  removeFromCustomAttributeArray(t, e) {
@@ -216,7 +216,7 @@ export default class User {
216
216
  null != e &&
217
217
  !rt(e, "remove from custom user attribute array", "the given value")
218
218
  ) &&
219
- this.Ei.Fn(i.Rn, t, e).L
219
+ this.zi.Fn(i.Rn, t, e).L
220
220
  );
221
221
  }
222
222
  incrementCustomUserAttribute(t, e) {
@@ -228,7 +228,7 @@ export default class User {
228
228
  `Cannot increment custom user attribute because the given incrementValue "${e}" is not an integer.`,
229
229
  ),
230
230
  !1)
231
- : this.Ei.Fn(i.On, t, s).L;
231
+ : this.zi.Fn(i.On, t, s).L;
232
232
  }
233
233
  setCustomLocationAttribute(t, e, s) {
234
234
  return (
@@ -244,7 +244,7 @@ export default class User {
244
244
  "Received invalid values for latitude and/or longitude. Latitude and longitude are bounded by ±90 and ±180 respectively, or must both be null for removal.",
245
245
  ),
246
246
  !1)
247
- : this.Ei.Gn(t, e, s).L)
247
+ : this.zi.Gn(t, e, s).L)
248
248
  );
249
249
  }
250
250
  addToSubscriptionGroup(t) {
@@ -258,7 +258,7 @@ export default class User {
258
258
  "addToSubscriptionGroup requires a non-empty subscription group ID",
259
259
  ),
260
260
  !1)
261
- : this.Ei.Hn(t, User.Kn.SUBSCRIBED).L;
261
+ : this.zi.Hn(t, User.Kn.SUBSCRIBED).L;
262
262
  }
263
263
  removeFromSubscriptionGroup(t) {
264
264
  return !P(
@@ -271,10 +271,10 @@ export default class User {
271
271
  "removeFromSubscriptionGroup requires a non-empty subscription group ID",
272
272
  ),
273
273
  !1)
274
- : this.Ei.Hn(t, User.Kn.UNSUBSCRIBED).L;
274
+ : this.zi.Hn(t, User.Kn.UNSUBSCRIBED).L;
275
275
  }
276
276
  kn(t, e, r, s, n) {
277
- this.wt.kn(t, e, r, s, n), this.Ei.Mn();
277
+ this.wt.kn(t, e, r, s, n), this.zi.Mn();
278
278
  }
279
279
  Dn(t) {
280
280
  this.wt.Dn(t);
@@ -1,6 +1,6 @@
1
1
  export default class y {
2
2
  constructor() {}
3
- Rs(a) {}
3
+ Ns(a) {}
4
4
  changeUser(a = !1) {}
5
5
  clearData(a = !1) {}
6
6
  }
@@ -7,8 +7,6 @@ export const LOG_CUSTOM_EVENT_STRING = "logCustomEvent";
7
7
  export const SET_CUSTOM_USER_ATTRIBUTE_STRING = "setCustomUserAttribute";
8
8
  export const BRAZE_MUST_BE_INITIALIZED_ERROR =
9
9
  "Braze must be initialized before calling methods.";
10
- export const CONTENT_CARDS_RATE_LIMIT_CAPACITY_DEFAULT = 5;
11
- export const CONTENT_CARDS_RATE_LIMIT_REFILL_RATE_DEFAULT = 90;
12
10
  export const GLOBAL_RATE_LIMIT_CAPACITY_DEFAULT = 30;
13
11
  export const GLOBAL_RATE_LIMIT_REFILL_RATE_DEFAULT = 30;
14
12
  export const LAST_REQUEST_TO_ENDPOINT_MS_AGO_DEFAULT = 72e5;
@@ -14,7 +14,7 @@ const s = {
14
14
  ),
15
15
  d
16
16
  );
17
- const u = m.xo();
17
+ const u = m.wo();
18
18
  return (
19
19
  d.ge.push(
20
20
  new ue(
@@ -26,7 +26,7 @@ const s = {
26
26
  ),
27
27
  ),
28
28
  (d.L =
29
- (null === (l = e.l()) || void 0 === l ? void 0 : l.zo(d.ge)) || !1),
29
+ (null === (l = e.l()) || void 0 === l ? void 0 : l.xo(d.ge)) || !1),
30
30
  d
31
31
  );
32
32
  },
@@ -187,7 +187,7 @@ export function updateFeedCards(e, t, o, s, n) {
187
187
  if (e.url && Z.test(e.url)) {
188
188
  const t = W(e.url);
189
189
  if (ft(t)) {
190
- r.error(dt(jt.Vi, "Content Card"));
190
+ r.error(dt(jt.Qi, "Content Card"));
191
191
  continue;
192
192
  }
193
193
  }
@@ -23,10 +23,10 @@ export default class kt {
23
23
  const i = this.kh();
24
24
  this.u.k(o.C.wh, t);
25
25
  const s = A.Yt.Qt;
26
- new A(s, r).setItem(s.ss.jh, this.gh, t), i !== t && this.Xs();
26
+ new A(s, r).setItem(s.ss.jh, this.gh, t), i !== t && this.Os();
27
27
  }
28
28
  xh() {
29
- this.u.hi(o.C.wh);
29
+ this.u.ti(o.C.wh);
30
30
  const t = A.Yt.Qt;
31
31
  new A(t, r).re(t.ss.jh, this.gh);
32
32
  }
@@ -45,7 +45,7 @@ export default class kt {
45
45
  Gh() {
46
46
  return this.Zn;
47
47
  }
48
- Xs() {
48
+ Os() {
49
49
  this.Zn = 0;
50
50
  }
51
51
  }
@@ -29,21 +29,21 @@ const L = {
29
29
  _o: "baseUrl",
30
30
  Io: "noCookies",
31
31
  Ao: "devicePropertyAllowlist",
32
- Aa: "disablePushTokenMaintenance",
32
+ _a: "disablePushTokenMaintenance",
33
33
  So: "enableLogging",
34
34
  No: "enableSdkAuthentication",
35
- qa: "manageServiceWorkerExternally",
35
+ Ma: "manageServiceWorkerExternally",
36
36
  Oo: "minimumIntervalBetweenTriggerActionsInSeconds",
37
37
  Po: "sessionTimeoutInSeconds",
38
38
  Ro: "appVersion",
39
39
  Lo: "appVersionNumber",
40
- _a: "serviceWorkerLocation",
41
- ka: "safariWebsitePushId",
40
+ wa: "serviceWorkerLocation",
41
+ ya: "safariWebsitePushId",
42
42
  zn: "localization",
43
- ho: "contentSecurityNonce",
43
+ bo: "contentSecurityNonce",
44
44
  Do: "allowUserSuppliedJavascript",
45
- bo: "inAppMessageZIndex",
46
- wo: "openInAppMessagesInNewTab",
45
+ jo: "inAppMessageZIndex",
46
+ ho: "openInAppMessagesInNewTab",
47
47
  tn: "openCardsInNewTab",
48
48
  en: "openNewsFeedCardsInNewTab",
49
49
  Lh: "requireExplicitInAppMessageDismissal",
@@ -56,30 +56,30 @@ class Vt {
56
56
  (this.rn = ""),
57
57
  (this.Wo = ""),
58
58
  (this.Vo = void 0),
59
- (this.Go = null),
59
+ (this.zo = null),
60
60
  (this.on = null),
61
61
  (this.qt = null),
62
- (this.Ei = null),
62
+ (this.zi = null),
63
63
  (this.yt = null),
64
- (this.di = null),
64
+ (this.ri = null),
65
65
  (this.u = null),
66
66
  (this.wt = null),
67
- (this.Ko = ""),
67
+ (this.Go = ""),
68
+ (this.Ko = !1),
68
69
  (this.$o = !1),
69
- (this.qo = !1),
70
+ (this.qo = new T()),
70
71
  (this.Jo = new T()),
71
- (this.Yo = new T()),
72
72
  (this.options = {}),
73
+ (this.Yo = []),
73
74
  (this.Ho = []),
74
- (this.Xo = []),
75
75
  (this._e = []),
76
- (this.Wo = "5.2.0");
76
+ (this.Wo = "5.3.1");
77
77
  }
78
- Zo(t) {
79
- this.Jo.It(t);
78
+ Xo(t) {
79
+ this.qo.It(t);
80
80
  }
81
81
  Sh(t) {
82
- this.Yo.It(t);
82
+ this.Jo.It(t);
83
83
  }
84
84
  initialize(t, i) {
85
85
  if (this.so())
@@ -106,21 +106,21 @@ class Vt {
106
106
  ((n = document.createElement("a")),
107
107
  (n.href = h),
108
108
  "/" === n.pathname && (n = `${n}api/v3`),
109
- (this.Ko = n.toString()),
110
- X.Qo && !this.nn(L.Eo))
109
+ (this.Go = n.toString()),
110
+ X.Zo && !this.nn(L.Eo))
111
111
  )
112
112
  return (
113
113
  r.info("Ignoring activity from crawler bot " + navigator.userAgent),
114
- (this.qo = !0),
114
+ (this.$o = !0),
115
115
  !1
116
116
  );
117
117
  const a = this.nn(L.Io) || !1;
118
118
  if (
119
- ((this.u = Bt.Wh(t, a)), a && this.u.Vh(t), new Q.ee(null, !0).br(o.se))
119
+ ((this.u = Bt.Qo(t, a)), a && this.u.Wh(t), new Q.ee(null, !0).br(o.se))
120
120
  )
121
121
  return (
122
122
  r.info("Ignoring all activity due to previous opt out"),
123
- (this.qo = !0),
123
+ (this.$o = !0),
124
124
  !1
125
125
  );
126
126
  for (const t of to(this.options))
@@ -158,105 +158,105 @@ class Vt {
158
158
  (this.on = new Ot(this.u, u)),
159
159
  (this.yt = new Dt(this.u)),
160
160
  (this.wt = new bt(this.yt, this.u)),
161
- (this.di = new Mt(this.u, this.wt, this.yt, this.nn(L.Po)));
161
+ (this.ri = new Mt(this.u, this.wt, this.yt, this.nn(L.Po)));
162
162
  const c = new T();
163
163
  return (
164
- (this.Go = new kt(this.u, this.nn(L.No), c)),
164
+ (this.zo = new kt(this.u, this.nn(L.No), c)),
165
165
  this.$t(c),
166
166
  (this.qt = new Rt(
167
167
  this.on,
168
168
  this.u,
169
- this.Go,
169
+ this.zo,
170
170
  this.wt,
171
- this.di,
171
+ this.ri,
172
172
  this.yt,
173
173
  this.rn,
174
- this.Ko,
174
+ this.Go,
175
175
  this.Wo,
176
176
  this.Vo || "",
177
177
  this.nn(L.Ro),
178
178
  this.nn(L.Lo),
179
179
  )),
180
- (this.Ei = new Lt(
180
+ (this.zi = new Lt(
181
181
  this.rn,
182
- this.Ko,
183
- this.di,
182
+ this.Go,
183
+ this.ri,
184
184
  this.on,
185
185
  this.wt,
186
186
  this.yt,
187
187
  this.u,
188
188
  (t) => {
189
- if (this.so()) for (const i of this.gr()) i.Rs(t);
189
+ if (this.so()) for (const i of this.gr()) i.Ns(t);
190
190
  },
191
- this.Go,
191
+ this.zo,
192
192
  this.qt,
193
193
  )),
194
- this.Ei.initialize(),
195
- a || this.u.Kh(),
194
+ this.zi.initialize(),
195
+ a || this.u.Vh(),
196
196
  r.info(
197
197
  `Initialized for the Braze backend at "${this.nn(
198
198
  L._o,
199
199
  )}" with API key "${this.rn}".`,
200
200
  ),
201
201
  et.o(),
202
- this.yt.xi(() => {
202
+ this.yt.ji(() => {
203
203
  var t;
204
- this.$o &&
205
- (null === (t = this.yt) || void 0 === t ? void 0 : t.yi()) &&
204
+ this.Ko &&
205
+ (null === (t = this.yt) || void 0 === t ? void 0 : t.ci()) &&
206
206
  import("../FeatureFlags/refresh-feature-flags.js").then((t) => {
207
- if (!this.$o) return;
207
+ if (!this.Ko) return;
208
208
  (0, t.default)();
209
209
  });
210
210
  }),
211
- this.Ei.mr(() => {
211
+ this.zi.mr(() => {
212
212
  var t;
213
- this.$o &&
214
- (null === (t = this.yt) || void 0 === t ? void 0 : t.yi()) &&
213
+ this.Ko &&
214
+ (null === (t = this.yt) || void 0 === t ? void 0 : t.ci()) &&
215
215
  import("../FeatureFlags/refresh-feature-flags.js").then((t) => {
216
- if (!this.$o) return;
216
+ if (!this.Ko) return;
217
217
  (0, t.default)(void 0, void 0, !0);
218
218
  });
219
219
  }),
220
- this.Jo.Dt(this.options),
221
- (this.$o = !0),
220
+ this.qo.Dt(this.options),
221
+ (this.Ko = !0),
222
222
  !0
223
223
  );
224
224
  }
225
225
  destroy(t) {
226
226
  if ((r.destroy(), this.so())) {
227
- this.Yo.Dt(), this.Yo.removeAllSubscriptions();
228
- for (const t of this.Ho) t.destroy();
229
- this.Ho = [];
230
- for (const t of this.Xo) t.clearData(!1);
231
- (this.Xo = []),
227
+ this.Jo.Dt(), this.Jo.removeAllSubscriptions();
228
+ for (const t of this.Yo) t.destroy();
229
+ this.Yo = [];
230
+ for (const t of this.Ho) t.clearData(!1);
231
+ (this.Ho = []),
232
232
  this.removeAllSubscriptions(),
233
233
  (this._e = []),
234
- null != this.Ei && this.Ei.destroy(),
235
- (this.Ei = null),
236
- (this.Go = null),
234
+ null != this.zi && this.zi.destroy(),
235
+ (this.zi = null),
236
+ (this.zo = null),
237
237
  (this.on = null),
238
238
  (this.qt = null),
239
239
  (this.yt = null),
240
- (this.di = null),
240
+ (this.ri = null),
241
241
  (this.wt = null),
242
242
  (this.options = {}),
243
243
  (this.Vo = void 0),
244
+ (this.Ko = !1),
244
245
  (this.$o = !1),
245
- (this.qo = !1),
246
246
  t && (this.u = null);
247
247
  }
248
248
  }
249
249
  X() {
250
- return !this.$h() && (!!this.so() || (console.warn(_), !1));
250
+ return !this.Kh() && (!!this.so() || (console.warn(_), !1));
251
251
  }
252
- Ma() {
252
+ ba() {
253
253
  return this.rn;
254
254
  }
255
255
  Sr() {
256
- return this.Go;
256
+ return this.zo;
257
257
  }
258
- Vs() {
259
- return this.Ko;
258
+ Hs() {
259
+ return this.Go;
260
260
  }
261
261
  te() {
262
262
  return this.on;
@@ -268,22 +268,22 @@ class Vt {
268
268
  return this.options[t];
269
269
  }
270
270
  gr() {
271
- return this.Xo;
271
+ return this.Ho;
272
272
  }
273
273
  cr() {
274
- return this.Ei;
274
+ return this.zi;
275
275
  }
276
276
  ir() {
277
277
  return this.yt;
278
278
  }
279
279
  zr() {
280
- return this.di;
280
+ return this.ri;
281
281
  }
282
282
  l() {
283
283
  return this.u;
284
284
  }
285
285
  pr() {
286
- if (this.wt && this.Ei) return new User(this.wt, this.Ei);
286
+ if (this.wt && this.zi) return new User(this.wt, this.zi);
287
287
  }
288
288
  er() {
289
289
  return this.wt;
@@ -293,13 +293,13 @@ class Vt {
293
293
  }
294
294
  g(t) {
295
295
  let i = !1;
296
- for (const s of this.Ho) s === t && (i = !0);
297
- i || this.Ho.push(t);
296
+ for (const s of this.Yo) s === t && (i = !0);
297
+ i || this.Yo.push(t);
298
298
  }
299
299
  ar(t) {
300
300
  let i = !1;
301
- for (const s of this.Xo) s.constructor === t.constructor && (i = !0);
302
- t instanceof y && !i && this.Xo.push(t);
301
+ for (const s of this.Ho) s.constructor === t.constructor && (i = !0);
302
+ t instanceof y && !i && this.Ho.push(t);
303
303
  }
304
304
  $t(t) {
305
305
  t instanceof T && this._e.push(t);
@@ -311,15 +311,15 @@ class Vt {
311
311
  if (this.X()) for (const i of this._e) i.removeSubscription(t);
312
312
  }
313
313
  oe(t) {
314
- this.qo = t;
314
+ this.$o = t;
315
315
  }
316
316
  so() {
317
- return this.$o;
317
+ return this.Ko;
318
318
  }
319
- $h() {
320
- return this.qo;
319
+ Kh() {
320
+ return this.$o;
321
321
  }
322
- Ss() {
322
+ Ds() {
323
323
  return this.Wo;
324
324
  }
325
325
  }
@@ -9,34 +9,34 @@ import { getErrorMessage as si } from "../util/error-utils.js";
9
9
  export default class Ot {
10
10
  constructor(t, e) {
11
11
  (this.u = t),
12
- (this.Ia = e),
12
+ (this.ka = e),
13
13
  (this.u = t),
14
14
  null == e && (e = Pt(DeviceProperties)),
15
- (this.Ia = e);
15
+ (this.ka = e);
16
16
  }
17
17
  ce(t = !0) {
18
18
  let e = this.u.tu(o.iu.Uo);
19
19
  null == e && ((e = new _t(p.W())), t && this.u.uu(o.iu.Uo, e));
20
20
  const r = new zt(e.eu);
21
- for (let t = 0; t < this.Ia.length; t++) {
22
- switch (this.Ia[t]) {
21
+ for (let t = 0; t < this.ka.length; t++) {
22
+ switch (this.ka[t]) {
23
23
  case DeviceProperties.BROWSER:
24
24
  r.browser = X.browser;
25
25
  break;
26
26
  case DeviceProperties.BROWSER_VERSION:
27
- r.Ta = X.version;
27
+ r.Ia = X.version;
28
28
  break;
29
29
  case DeviceProperties.OS:
30
- r.os = this.Da();
30
+ r.os = this.Ta();
31
31
  break;
32
32
  case DeviceProperties.RESOLUTION:
33
- r.Oa = screen.width + "x" + screen.height;
33
+ r.Da = screen.width + "x" + screen.height;
34
34
  break;
35
35
  case DeviceProperties.LANGUAGE:
36
36
  r.language = X.language;
37
37
  break;
38
38
  case DeviceProperties.TIME_ZONE:
39
- r.timeZone = this.Ca(new Date());
39
+ r.timeZone = this.Sa(new Date());
40
40
  break;
41
41
  case DeviceProperties.USER_AGENT:
42
42
  r.userAgent = X.userAgent;
@@ -44,12 +44,12 @@ export default class Ot {
44
44
  }
45
45
  return r;
46
46
  }
47
- Da() {
48
- if (X.Fa()) return X.Fa();
49
- const t = this.u.j(o.C.Ga);
50
- return t && t.os_version ? t.os_version : X.Da();
47
+ Ta() {
48
+ if (X.Oa()) return X.Oa();
49
+ const t = this.u.j(o.C.Ca);
50
+ return t && t.os_version ? t.os_version : X.Ta();
51
51
  }
52
- Ca(t) {
52
+ Sa(t) {
53
53
  let e = !1;
54
54
  if ("undefined" != typeof Intl && "function" == typeof Intl.DateTimeFormat)
55
55
  try {
@@ -66,9 +66,9 @@ export default class Ot {
66
66
  }
67
67
  if (e) return "";
68
68
  const s = t.getTimezoneOffset();
69
- return this.Ja(s);
69
+ return this.Fa(s);
70
70
  }
71
- Ja(t) {
71
+ Fa(t) {
72
72
  const e = Math.trunc(t / 60),
73
73
  r = Math.trunc(t % 60);
74
74
  let s = "GMT";