@braze/web-sdk 5.8.1 → 5.9.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 (126) hide show
  1. package/index.d.ts +14 -9
  2. package/package.json +1 -1
  3. package/shared-lib/encoding-utils.js +1 -1
  4. package/shared-lib/event-types.js +20 -20
  5. package/shared-lib/guid.js +2 -2
  6. package/shared-lib/indexed-db-adapter.js +3 -3
  7. package/shared-lib/logger.js +2 -2
  8. package/shared-lib/supported-options.js +11 -11
  9. package/src/Banner/banner-provider.js +22 -19
  10. package/src/Banner/display/banner-to-html.js +32 -27
  11. package/src/Banner/get-all-banners.js +11 -5
  12. package/src/Banner/get-banner.js +6 -3
  13. package/src/Banner/log-banner-click.js +2 -2
  14. package/src/Banner/log-banner-impressions.js +4 -4
  15. package/src/Banner/request-banners-refresh.js +5 -2
  16. package/src/Banner/subscribe-to-banners-updates.js +2 -2
  17. package/src/Banner/ui/insert-banner.js +2 -2
  18. package/src/Card/card-manager.js +9 -9
  19. package/src/Card/display/card-display.js +5 -5
  20. package/src/Card/log-card-click.js +2 -2
  21. package/src/Card/log-card-dismissal.js +2 -2
  22. package/src/Card/log-card-impressions.js +2 -2
  23. package/src/Card/models/captioned-image.js +17 -17
  24. package/src/Card/models/card.js +58 -58
  25. package/src/Card/models/classic-card.js +17 -17
  26. package/src/Card/models/control-card.js +8 -8
  27. package/src/Card/models/image-only.js +15 -15
  28. package/src/Card/util/card-factory.js +24 -24
  29. package/src/ContentCards/content-cards-provider.js +77 -75
  30. package/src/ContentCards/get-cached-content-cards.js +1 -1
  31. package/src/ContentCards/request-content-cards-refresh.js +1 -1
  32. package/src/ContentCards/subscribe-to-content-cards-updates.js +3 -3
  33. package/src/ContentCards/ui/show-content-cards.js +3 -3
  34. package/src/Core/change-user.js +1 -1
  35. package/src/Core/disable-sdk.js +4 -4
  36. package/src/Core/enable-sdk.js +3 -3
  37. package/src/Core/handle-braze-action.js +2 -2
  38. package/src/Core/is-initialized.js +1 -1
  39. package/src/Core/open-session.js +4 -4
  40. package/src/Core/request-immediate-data-flush.js +1 -1
  41. package/src/Core/wipe-data.js +7 -5
  42. package/src/FeatureFlags/feature-flag-factory.js +4 -4
  43. package/src/FeatureFlags/feature-flag.js +3 -3
  44. package/src/FeatureFlags/feature-flags-provider.js +17 -11
  45. package/src/FeatureFlags/get-all-feature-flags.js +2 -2
  46. package/src/FeatureFlags/get-feature-flag.js +2 -2
  47. package/src/FeatureFlags/log-feature-flag-impression.js +1 -1
  48. package/src/Feed/feed-provider-factory.js +1 -1
  49. package/src/Feed/feed-provider.js +12 -12
  50. package/src/Feed/get-cached-feed.js +1 -1
  51. package/src/Feed/request-feed-refresh.js +1 -1
  52. package/src/Feed/ui/show-feed.js +1 -1
  53. package/src/InAppMessage/display/html-message-to-html.js +8 -8
  54. package/src/InAppMessage/display/in-app-message-to-html.js +18 -18
  55. package/src/InAppMessage/display/modal-utils.js +7 -7
  56. package/src/InAppMessage/in-app-message-factory.js +6 -6
  57. package/src/InAppMessage/in-app-message-manager.js +70 -70
  58. package/src/InAppMessage/log-in-app-message-button-click.js +2 -2
  59. package/src/InAppMessage/log-in-app-message-click.js +3 -3
  60. package/src/InAppMessage/log-in-app-message-html-click.js +3 -3
  61. package/src/InAppMessage/log-in-app-message-impression.js +1 -1
  62. package/src/InAppMessage/models/control-message.js +2 -2
  63. package/src/InAppMessage/models/full-screen-message.js +6 -6
  64. package/src/InAppMessage/models/html-message.js +7 -7
  65. package/src/InAppMessage/models/in-app-message-button.js +3 -3
  66. package/src/InAppMessage/models/in-app-message.js +36 -36
  67. package/src/InAppMessage/models/modal-message.js +6 -6
  68. package/src/InAppMessage/models/slide-up-message.js +8 -8
  69. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  70. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  71. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  72. package/src/InAppMessage/ui/show-in-app-message.js +13 -13
  73. package/src/Push/push-manager.js +81 -81
  74. package/src/Push/request-push-permission.js +1 -1
  75. package/src/Push/utils/push-utils.js +4 -4
  76. package/src/User/user-manager.js +10 -10
  77. package/src/User/user.js +15 -15
  78. package/src/common/constants.js +2 -0
  79. package/src/common/event-logger.js +2 -2
  80. package/src/common/feed-display.js +6 -6
  81. package/src/l10n/l10n-manager-factory.js +1 -1
  82. package/src/managers/auth-manager.js +30 -30
  83. package/src/managers/braze-instance.js +94 -93
  84. package/src/managers/device-manager.js +14 -14
  85. package/src/managers/network-manager.js +123 -117
  86. package/src/managers/server-config-manager.js +91 -79
  87. package/src/managers/session-manager.js +8 -8
  88. package/src/managers/storage-manager-factory.js +5 -5
  89. package/src/managers/storage-manager.js +48 -48
  90. package/src/managers/subscription-manager.js +4 -4
  91. package/src/models/backend-errors.js +4 -4
  92. package/src/models/braze-event.js +9 -9
  93. package/src/models/device.js +2 -2
  94. package/src/models/identifier.js +3 -3
  95. package/src/models/push-token.js +4 -4
  96. package/src/models/request-result.js +2 -2
  97. package/src/models/server-config.js +18 -18
  98. package/src/request-controller.js +100 -88
  99. package/src/triggers/models/custom-event-data.js +1 -1
  100. package/src/triggers/models/custom-event-property-data.js +2 -2
  101. package/src/triggers/models/filter-set.js +4 -4
  102. package/src/triggers/models/filter.js +6 -6
  103. package/src/triggers/models/in-app-message-click-data.js +1 -1
  104. package/src/triggers/models/purchase-data.js +1 -1
  105. package/src/triggers/models/purchase-property-data.js +2 -2
  106. package/src/triggers/models/push-click-data.js +1 -1
  107. package/src/triggers/models/trigger-condition.js +33 -33
  108. package/src/triggers/models/trigger-events.js +2 -2
  109. package/src/triggers/models/trigger.js +12 -12
  110. package/src/triggers/triggers-provider-factory.js +3 -3
  111. package/src/triggers/triggers-provider.js +17 -17
  112. package/src/ui/js/attach-css.js +1 -1
  113. package/src/ui/js/load-font-awesome.js +1 -1
  114. package/src/util/base-device-parser.js +1 -1
  115. package/src/util/braze-actions.js +4 -4
  116. package/src/util/browser-detector.js +5 -5
  117. package/src/util/client-hints-parser.js +1 -1
  118. package/src/util/component-utils.js +2 -2
  119. package/src/util/dom-utils.js +3 -3
  120. package/src/util/html-display-utils.js +14 -14
  121. package/src/util/key-codes.js +1 -1
  122. package/src/util/net.js +2 -2
  123. package/src/util/request-header-utils.js +13 -13
  124. package/src/util/user-agent-parser.js +1 -1
  125. package/src/util/validation-utils.js +2 -2
  126. package/src/util/window-utils.js +2 -2
@@ -1,10 +1,10 @@
1
- import { Guid as G, logger as N } from "../../shared-lib/index.js";
1
+ import { Guid as K, logger as N } from "../../shared-lib/index.js";
2
2
  import { isArray as z } from "../util/code-utils.js";
3
3
  import { getErrorMessage as si } from "../util/error-utils.js";
4
4
  export default class _t {
5
5
  constructor(t, e, i) {
6
6
  (this.eu = t),
7
- null == t && (t = G.ce()),
7
+ null == t && (t = K.ce()),
8
8
  !i || isNaN(i) ? (this.Gl = new Date().valueOf()) : (this.Gl = i),
9
9
  (this.eu = t),
10
10
  (this.ql = new Date().valueOf()),
@@ -26,7 +26,7 @@ export default class _t {
26
26
  (t = t.replace(i, `g:${n}`))
27
27
  );
28
28
  }
29
- static En(t) {
29
+ static Rn(t) {
30
30
  let e;
31
31
  if ("string" == typeof t)
32
32
  try {
@@ -2,12 +2,12 @@ import { rehydrateDateAfterJsonization as V } from "../util/date-utils.js";
2
2
  export default class ti {
3
3
  constructor(t, i, s, l, h) {
4
4
  (this.endpoint = t),
5
- (this.zn = i),
5
+ (this.En = i),
6
6
  (this.publicKey = s),
7
7
  (this.Vl = l),
8
8
  (this.fl = h),
9
9
  (this.endpoint = t || null),
10
- (this.zn = i || null),
10
+ (this.En = i || null),
11
11
  (this.publicKey = s || null),
12
12
  (this.Vl = l || null),
13
13
  (this.fl = h || null);
@@ -15,13 +15,13 @@ export default class ti {
15
15
  bt() {
16
16
  return {
17
17
  e: this.endpoint,
18
- c: this.zn,
18
+ c: this.En,
19
19
  p: this.publicKey,
20
20
  u: this.Vl,
21
21
  v: this.fl,
22
22
  };
23
23
  }
24
- static En(t) {
24
+ static Rn(t) {
25
25
  return new ti(t.e, V(t.c), t.p, t.u, t.v);
26
26
  }
27
27
  }
@@ -1,8 +1,8 @@
1
- export default class E {
1
+ export default class F {
2
2
  constructor(t = !1, s = []) {
3
3
  (this.tt = t), (this.$e = s), (this.tt = t), (this.$e = s);
4
4
  }
5
- rs(t) {
5
+ ns(t) {
6
6
  (this.tt = this.tt && t.tt), this.$e.push(...t.$e);
7
7
  }
8
8
  }
@@ -1,8 +1,8 @@
1
1
  import {
2
- GLOBAL_RATE_LIMIT_CAPACITY_DEFAULT as Zt,
3
- GLOBAL_RATE_LIMIT_REFILL_RATE_DEFAULT as hi,
2
+ GLOBAL_RATE_LIMIT_CAPACITY_DEFAULT as hi,
3
+ GLOBAL_RATE_LIMIT_REFILL_RATE_DEFAULT as li,
4
4
  } from "../common/constants.js";
5
- export default class Jt {
5
+ export default class Qt {
6
6
  constructor(
7
7
  t = 0,
8
8
  i = [],
@@ -12,50 +12,50 @@ export default class Jt {
12
12
  l = null,
13
13
  r = { enabled: !1 },
14
14
  a = { enabled: !1, refresh_rate_limit: void 0 },
15
- n = { enabled: !0, capacity: Zt, refill_rate: hi, endpoint_overrides: {} },
16
- o = { enabled: !1, max_placements: 0 },
15
+ n = { enabled: !0, capacity: hi, refill_rate: li, endpoint_overrides: {} },
16
+ o = null,
17
17
  ) {
18
- (this.ml = t),
18
+ (this.dl = t),
19
19
  (this.Rl = i),
20
20
  (this.Cl = s),
21
21
  (this.El = h),
22
- (this.wl = e),
22
+ (this.yl = e),
23
23
  (this.fl = l),
24
- (this.dl = r),
24
+ (this.vl = r),
25
25
  (this.De = a),
26
26
  (this.bl = n),
27
27
  (this.banners = o),
28
- (this.ml = t),
28
+ (this.dl = t),
29
29
  (this.Rl = i),
30
30
  (this.Cl = s),
31
31
  (this.El = h),
32
- (this.wl = e),
32
+ (this.yl = e),
33
33
  (this.fl = l),
34
- (this.dl = r),
34
+ (this.vl = r),
35
35
  (this.De = a),
36
36
  (this.bl = n),
37
37
  (this.banners = o);
38
38
  }
39
39
  bt() {
40
40
  return {
41
- s: "5.8.1",
42
- l: this.ml,
41
+ s: "5.9.1",
42
+ l: this.dl,
43
43
  e: this.Rl,
44
44
  a: this.Cl,
45
45
  p: this.El,
46
- m: this.wl,
46
+ m: this.yl,
47
47
  v: this.fl,
48
- c: this.dl,
48
+ c: this.vl,
49
49
  f: this.De,
50
50
  grl: this.bl,
51
51
  b: this.banners,
52
52
  };
53
53
  }
54
- static En(t) {
54
+ static Rn(t) {
55
55
  let i = t.l;
56
56
  return (
57
- "5.8.1" !== t.s && (i = 0),
58
- new Jt(i, t.e, t.a, t.p, t.m, t.v, t.c, t.f, t.grl, t.b)
57
+ "5.9.1" !== t.s && (i = 0),
58
+ new Qt(i, t.e, t.a, t.p, t.m, t.v, t.c, t.f, t.grl, t.b)
59
59
  );
60
60
  }
61
61
  }
@@ -2,11 +2,11 @@ import l from "./util/net.js";
2
2
  import ve from "./models/braze-event.js";
3
3
  import c from "./common/event-logger.js";
4
4
  import { randomInclusive as a } from "./util/math.js";
5
- import E from "./models/request-result.js";
5
+ import F from "./models/request-result.js";
6
6
  import {
7
7
  logger as N,
8
- IndexedDBAdapter as tt,
9
- Guid as G,
8
+ IndexedDBAdapter as st,
9
+ Guid as K,
10
10
  EventTypes as d,
11
11
  } from "../shared-lib/index.js";
12
12
  import { STORAGE_KEYS as s } from "./managers/storage-manager.js";
@@ -15,27 +15,27 @@ import vt from "./Push/utils/push-utils.js";
15
15
  import h from "./util/request-header-utils.js";
16
16
  export default class Lt {
17
17
  constructor(t, i, s, e, h, o, n, r, l, a) {
18
- (this.un = t),
18
+ (this.an = t),
19
19
  (this.baseUrl = i),
20
20
  (this.T = s),
21
- (this.an = e),
21
+ (this.hn = e),
22
22
  (this.Cs = h),
23
23
  (this.B = o),
24
24
  (this.C = n),
25
25
  (this.$l = r),
26
- (this.Ra = l),
26
+ (this.Pa = l),
27
27
  (this.S = a),
28
- (this.un = t),
28
+ (this.an = t),
29
29
  (this.baseUrl = i),
30
30
  (this.Tl = 0),
31
31
  (this.dE = n.IE() || 0),
32
32
  (this.Ml = null),
33
33
  (this.T = s),
34
- (this.an = e),
34
+ (this.hn = e),
35
35
  (this.Cs = h),
36
36
  (this.B = o),
37
37
  (this.C = n),
38
- (this.Ra = l),
38
+ (this.Pa = l),
39
39
  (this.S = a),
40
40
  (this.$l = r),
41
41
  (this.Pl = new u()),
@@ -43,22 +43,22 @@ export default class Lt {
43
43
  (this.Ul = 50),
44
44
  (this._l = !1);
45
45
  }
46
- Jl(t, i) {
47
- return !t && !i && this.Ra.Jh() >= this.Ul;
46
+ Kl(t, i) {
47
+ return !t && !i && this.Pa.Kh() >= this.Ul;
48
48
  }
49
- Kl(t) {
49
+ Xl(t) {
50
50
  let i = this.T.zl();
51
51
  if (t.length > 0) {
52
52
  const s = this.Cs.getUserId();
53
53
  for (const e of t) {
54
54
  const t = (!e.userId && !s) || e.userId === s;
55
- e.type === d.Bl && t && (i = !0);
55
+ e.type === d.Fl && t && (i = !0);
56
56
  }
57
57
  }
58
58
  return i;
59
59
  }
60
- Xl(t = !1, i = !1, e = !0, o, n, r, u = !1, c = !1) {
61
- e && this.Ql();
60
+ Ql(t = !1, i = !1, e = !0, o, n, r, u = !1, c = !1) {
61
+ e && this.Yl();
62
62
  const d = this.C.AE(),
63
63
  m = this.C.OE();
64
64
  let f = !1;
@@ -76,16 +76,16 @@ export default class Lt {
76
76
  t.respond_with.triggers &&
77
77
  (this.Tl = Math.max(this.Tl - 1, 0)),
78
78
  this.S.st(t, e, i)
79
- ? (this.Ra.it(),
79
+ ? (this.Pa.it(),
80
80
  this.B.gl(e),
81
81
  (null != t.respond_with &&
82
82
  t.respond_with.user_id != this.Cs.getUserId()) ||
83
- (null != t.device && this.C.Bt(s.gt.ic, t.device),
83
+ (null != t.device && this.C.Bt(s.gt.oc, t.device),
84
84
  null != t.sdk_metadata &&
85
- (this.C.Bt(s.gt.vu, t.sdk_metadata),
86
- this.C.Bt(s.gt.pu, this.T.St())),
85
+ (this.C.Bt(s.gt.pu, t.sdk_metadata),
86
+ this.C.Bt(s.gt.Ru, this.T.St())),
87
87
  this.$l(e),
88
- h.ju(this.C, h.O.Nu, 1),
88
+ h.Mu(this.C, h.O.Nu, 1),
89
89
  "function" == typeof o && o()))
90
90
  : e.auth_error && (d = !0);
91
91
  },
@@ -94,12 +94,12 @@ export default class Lt {
94
94
  null != t.respond_with &&
95
95
  t.respond_with.triggers &&
96
96
  (this.Tl = Math.max(this.Tl - 1, 0)),
97
- this.S.Ru(t.events, t.attributes),
97
+ this.S.gu(t.events, t.attributes),
98
98
  "function" == typeof n && n();
99
99
  },
100
100
  nt: (t, i) => {
101
101
  "function" == typeof r && r(!d);
102
- const s = this.S.Iu(i);
102
+ const s = this.S.Pu(i);
103
103
  let o = 0;
104
104
  if (s)
105
105
  switch (s.type) {
@@ -111,27 +111,27 @@ export default class Lt {
111
111
  }
112
112
  if (e && !f) {
113
113
  if (d) {
114
- h.Pu(this.C, h.O.Nu);
114
+ h.Uu(this.C, h.O.Nu);
115
115
  let t = this.Ml;
116
116
  (null == t || t < 1e3 * this.dE) && (t = 1e3 * this.dE);
117
117
  const i = Math.min(3e5, a(1e3 * this.dE, 3 * t)) + o;
118
- this.Yl(i);
119
- } else this.Yl(Math.max(1e3 * this.dE, o));
118
+ this.Zl(i);
119
+ } else this.Zl(Math.max(1e3 * this.dE, o));
120
120
  f = !0;
121
121
  }
122
122
  },
123
123
  });
124
124
  },
125
- p = this.Kl(d),
126
- v = i || p;
127
- if (this.Jl(u, p))
125
+ v = this.Xl(d),
126
+ p = i || v;
127
+ if (this.Kl(u, v))
128
128
  return void N.info(
129
129
  "Declining to flush data due to 50 consecutive authentication failures",
130
130
  );
131
- if (e && !this.S.Tu(d, m, t, v))
132
- return this.Yl(), void ("function" == typeof r && r(!0));
133
- const b = this.S.yu(t, v, d, m, c);
134
- v && this.Tl++;
131
+ if (e && !this.S.yu(d, m, t, p))
132
+ return this.Zl(), void ("function" == typeof r && r(!0));
133
+ const b = this.S.wu(t, p, d, m, c);
134
+ p && this.Tl++;
135
135
  let w = !1;
136
136
  if (b)
137
137
  for (const t of b)
@@ -142,52 +142,52 @@ export default class Lt {
142
142
  n,
143
143
  ),
144
144
  (w = !0);
145
- this.Ra.wh() && e && !w
146
- ? this.Yl()
147
- : p && (N.info("Invoking new session subscriptions"), this.Pl.X());
145
+ this.Pa.jh() && e && !w
146
+ ? this.Zl()
147
+ : v && (N.info("Invoking new session subscriptions"), this.Pl.X());
148
148
  }
149
- Zl() {
149
+ dc() {
150
150
  return this.Tl > 0;
151
151
  }
152
- Yl(t = 1e3 * this.dE) {
152
+ Zl(t = 1e3 * this.dE) {
153
153
  this._l ||
154
- (this.Ql(),
154
+ (this.Yl(),
155
155
  (this.Ol = window.setTimeout(() => {
156
156
  if (document.hidden) {
157
157
  const t = "visibilitychange",
158
158
  i = () => {
159
159
  document.hidden ||
160
- (document.removeEventListener(t, i, !1), this.Xl());
160
+ (document.removeEventListener(t, i, !1), this.Ql());
161
161
  };
162
162
  document.addEventListener(t, i, !1);
163
- } else this.Xl();
163
+ } else this.Ql();
164
164
  }, t)),
165
165
  (this.Ml = t));
166
166
  }
167
- Ql() {
167
+ Yl() {
168
168
  null != this.Ol && (clearTimeout(this.Ol), (this.Ol = null));
169
169
  }
170
170
  initialize() {
171
- (this._l = !1), this.Yl();
171
+ (this._l = !1), this.Zl();
172
172
  }
173
173
  destroy() {
174
174
  this.Pl.removeAllSubscriptions(),
175
- this.Ra.Gh(),
176
- this.Ql(),
175
+ this.Pa.Hh(),
176
+ this.Yl(),
177
177
  (this._l = !0),
178
- this.Xl(void 0, void 0, !1, void 0, void 0, void 0, void 0, !0),
178
+ this.Ql(void 0, void 0, !1, void 0, void 0, void 0, void 0, !0),
179
179
  (this.Ol = null);
180
180
  }
181
- rn(t) {
182
- return this.Pl.Ft(t);
181
+ on(t) {
182
+ return this.Pl.Dt(t);
183
183
  }
184
184
  openSession() {
185
185
  const t = this.T.St() !== this.T.Qo();
186
- t && (this.C.TE(s.iu.Ia), this.C.TE(s.iu.su)),
187
- this.Xl(void 0, !1, void 0, () => {
186
+ t && (this.C.TE(s.iu.Na), this.C.TE(s.iu.su)),
187
+ this.Ql(void 0, !1, void 0, () => {
188
188
  this.C.Ut(s.gt.Ge);
189
189
  }),
190
- this.Jn(),
190
+ this.Qn(),
191
191
  t &&
192
192
  import("./Push/push-manager-factory.js").then((t) => {
193
193
  if (this._l) return;
@@ -197,7 +197,7 @@ export default class Lt {
197
197
  (vt.isPushPermissionGranted() || vt.isPushBlocked())
198
198
  ) {
199
199
  const t = () => {
200
- i.vn()
200
+ i.wn()
201
201
  ? N.info(
202
202
  "Push token maintenance is disabled, not refreshing token for backend.",
203
203
  )
@@ -207,43 +207,55 @@ export default class Lt {
207
207
  s && t();
208
208
  },
209
209
  h = () => {
210
- const i = this.C.ft(s.gt.qn);
210
+ const i = this.C.ft(s.gt.zn);
211
211
  (null == i || i) && t();
212
212
  },
213
- o = tt.Ls.Fs;
214
- new tt(o, N).cr(o.Ms.cu, e, h);
213
+ o = st.Ls.Fs;
214
+ new st(o, N).cr(o.Ms.cu, e, h);
215
215
  }
216
216
  });
217
217
  }
218
- hc() {
219
- this.C.Ut(s.gt.Xe), this.C.Ut(s.gt.Is), this.C.Ut(s.gt.Lr);
218
+ mc() {
219
+ this.C.Ut(s.gt.Xe), this.C.Ut(s.gt.Hs), this.C.Ut(s.gt.Kr);
220
+ }
221
+ fc() {
222
+ var t, i;
223
+ this.C.Ut(s.gt.Ku), this.C.Ut(s.gt.lE);
224
+ const e = h.O;
225
+ for (const i in e) {
226
+ const s = e[i];
227
+ this.S.Ou(s, null === (t = this.B) || void 0 === t ? void 0 : t.el(s));
228
+ }
229
+ this.S.xu(null === (i = this.B) || void 0 === i ? void 0 : i.Zu());
220
230
  }
221
231
  changeUser(t, i, e) {
222
232
  const h = this.Cs.getUserId();
223
233
  if (h !== t) {
224
- this.T.Fl(),
225
- this.hc(),
226
- null != h && this.Xl(void 0, !1, void 0, void 0, void 0),
234
+ this.T.Il(),
235
+ this.mc(),
236
+ null != h && this.Ql(void 0, !1, void 0, void 0, void 0),
227
237
  this.Cs.ou(t),
228
- e ? this.Ra.setSdkAuthenticationSignature(e) : this.Ra.yh();
238
+ e ? this.Pa.setSdkAuthenticationSignature(e) : this.Pa.Bh();
229
239
  for (let t = 0; t < i.length; t++) i[t].changeUser(null == h);
230
- null != h && this.C.Ut(s.gt.Zt),
231
- this.C.Ut(s.gt.ic),
240
+ this.S.fo(),
241
+ null != h && this.C.Ut(s.gt.Zt),
242
+ this.C.Ut(s.gt.oc),
232
243
  this.C.Ut(s.gt._E),
244
+ this.fc(),
233
245
  this.openSession(),
234
246
  N.info('Changed user to "' + t + '".');
235
247
  } else {
236
248
  let i = "Doing nothing.";
237
249
  e &&
238
- this.Ra.jh() !== e &&
239
- (this.Ra.setSdkAuthenticationSignature(e),
250
+ this.Pa.xh() !== e &&
251
+ (this.Pa.setSdkAuthenticationSignature(e),
240
252
  (i = "Updated SDK authentication signature")),
241
253
  N.info(`Current user is already ${t}. ${i}`);
242
254
  }
243
255
  }
244
256
  requestImmediateDataFlush(t) {
245
- this.Ql(), this.T.Qo();
246
- this.Xl(
257
+ this.Yl(), this.T.Qo();
258
+ this.Ql(
247
259
  void 0,
248
260
  void 0,
249
261
  void 0,
@@ -256,15 +268,15 @@ export default class Lt {
256
268
  );
257
269
  }
258
270
  requestFeedRefresh() {
259
- this.T.Qo(), this.Xl(!0);
271
+ this.T.Qo(), this.Ql(!0);
260
272
  }
261
273
  br(t, i) {
262
274
  this.T.Qo(),
263
275
  N.info("Requesting explicit trigger refresh."),
264
- this.Xl(void 0, !0, void 0, t, i);
276
+ this.Ql(void 0, !0, void 0, t, i);
265
277
  }
266
278
  Cn(t, i) {
267
- const e = d.dc,
279
+ const e = d.vc,
268
280
  h = { a: t, l: i },
269
281
  o = c.ut(e, h);
270
282
  return (
@@ -275,7 +287,7 @@ export default class Lt {
275
287
  Ln(t, i, s) {
276
288
  if (this.B.hu(i))
277
289
  return (
278
- N.info(`Custom Attribute "${i}" is blocklisted, ignoring.`), new E()
290
+ N.info(`Custom Attribute "${i}" is blocklisted, ignoring.`), new F()
279
291
  );
280
292
  const e = { key: i, value: s },
281
293
  h = c.ut(t, e);
@@ -290,7 +302,7 @@ export default class Lt {
290
302
  null != e && (n.altitude = e),
291
303
  null != h && (n.ll_accuracy = h),
292
304
  null != o && (n.alt_accuracy = o);
293
- const r = c.ut(d.mc, n, t || void 0);
305
+ const r = c.ut(d.bc, n, t || void 0);
294
306
  return (
295
307
  r &&
296
308
  N.info(`Set user last known location as ${JSON.stringify(n, null, 2)}`),
@@ -299,43 +311,43 @@ export default class Lt {
299
311
  }
300
312
  lr(t, i) {
301
313
  const s = this.T.Qo();
302
- return new ve(this.Cs.getUserId(), d.fc, t, s, { cid: i });
314
+ return new ve(this.Cs.getUserId(), d.wc, t, s, { cid: i });
303
315
  }
304
- vc(t, i) {
305
- return new tt(t, i);
316
+ kc(t, i) {
317
+ return new st(t, i);
306
318
  }
307
- Jn() {
308
- const t = tt.Ls.Fs;
309
- this.vc(t, N).setItem(t.Ms.Nu, 1, {
319
+ Qn() {
320
+ const t = st.Ls.Fs;
321
+ this.kc(t, N).setItem(t.Ms.Nu, 1, {
310
322
  baseUrl: this.baseUrl,
311
- data: { api_key: this.un, device_id: this.an.ve().id },
323
+ data: { api_key: this.an, device_id: this.hn.ve().id },
312
324
  userId: this.Cs.getUserId(),
313
- sdkAuthEnabled: this.Ra.wh(),
325
+ sdkAuthEnabled: this.Pa.jh(),
314
326
  });
315
327
  }
316
328
  vr(t) {
317
329
  for (const i of t)
318
- if (i.api_key === this.un) this.S.Ru(i.events, i.attributes);
330
+ if (i.api_key === this.an) this.S.gu(i.events, i.attributes);
319
331
  else {
320
- const t = tt.Ls.Fs;
321
- new tt(t, N).setItem(t.Ms.kr, G.ce(), i);
332
+ const t = st.Ls.Fs;
333
+ new st(t, N).setItem(t.Ms.kr, K.ce(), i);
322
334
  }
323
335
  }
324
- Hn(t, i, s) {
336
+ Kn(t, i, s) {
325
337
  if (this.B.hu(t))
326
338
  return (
327
- N.info(`Custom Attribute "${t}" is blocklisted, ignoring.`), new E()
339
+ N.info(`Custom Attribute "${t}" is blocklisted, ignoring.`), new F()
328
340
  );
329
341
  let e, h;
330
342
  return (
331
343
  null === i && null === s
332
- ? ((e = d.bc), (h = { key: t }))
333
- : ((e = d.wc), (h = { key: t, latitude: i, longitude: s })),
344
+ ? ((e = d.yc), (h = { key: t }))
345
+ : ((e = d.Sc), (h = { key: t, latitude: i, longitude: s })),
334
346
  c.ut(e, h)
335
347
  );
336
348
  }
337
- Kn(t, i) {
349
+ Mn(t, i) {
338
350
  const s = { group_id: t, status: i };
339
- return c.ut(d.kc, s);
351
+ return c.ut(d.jc, s);
340
352
  }
341
353
  }
@@ -2,7 +2,7 @@ export default class ts {
2
2
  constructor(t) {
3
3
  (this.xc = t), (this.xc = t);
4
4
  }
5
- yc(t) {
5
+ zc(t) {
6
6
  return null == this.xc || this.xc === t[0];
7
7
  }
8
8
  static fromJson(t) {
@@ -3,11 +3,11 @@ export default class rs {
3
3
  constructor(t, s) {
4
4
  (this.xc = t), (this.tf = s), (this.xc = t), (this.tf = s);
5
5
  }
6
- yc(t) {
6
+ zc(t) {
7
7
  if (null == this.xc || null == this.tf) return !1;
8
8
  const s = t[0],
9
9
  i = t[1];
10
- return s === this.xc && this.tf.yc(i);
10
+ return s === this.xc && this.tf.zc(i);
11
11
  }
12
12
  static fromJson(t) {
13
13
  return new rs(
@@ -4,13 +4,13 @@ export default class is {
4
4
  constructor(t) {
5
5
  (this.filters = t), (this.filters = t);
6
6
  }
7
- yc(t) {
7
+ zc(t) {
8
8
  let r = !0;
9
9
  for (let e = 0; e < this.filters.length; e++) {
10
10
  const o = this.filters[e];
11
11
  let s = !1;
12
12
  for (let r = 0; r < o.length; r++)
13
- if (o[r].yc(t)) {
13
+ if (o[r].zc(t)) {
14
14
  s = !0;
15
15
  break;
16
16
  }
@@ -42,12 +42,12 @@ export default class is {
42
42
  }
43
43
  return t;
44
44
  }
45
- static En(t) {
45
+ static Rn(t) {
46
46
  const r = [];
47
47
  for (let e = 0; e < t.length; e++) {
48
48
  const o = [],
49
49
  s = t[e];
50
- for (let t = 0; t < s.length; t++) o.push(fr.En(s[t]));
50
+ for (let t = 0; t < s.length; t++) o.push(fr.Rn(s[t]));
51
51
  r.push(o);
52
52
  }
53
53
  return new is(r);
@@ -1,7 +1,7 @@
1
1
  import { isDate as Nt } from "../../util/code-utils.js";
2
2
  import {
3
- convertMsToSeconds as L,
4
- dateFromUnixTimestamp as O,
3
+ convertMsToSeconds as O,
4
+ dateFromUnixTimestamp as P,
5
5
  secondsAgo as es,
6
6
  secondsInTheFuture as ls,
7
7
  } from "../../util/date-utils.js";
@@ -20,9 +20,9 @@ export default class fr {
20
20
  this.comparator !== fr.wE.BE &&
21
21
  this.comparator !== fr.wE.jE &&
22
22
  this.comparator !== fr.wE.zE &&
23
- (this.LE = O(this.LE));
23
+ (this.LE = P(this.LE));
24
24
  }
25
- yc(t) {
25
+ zc(t) {
26
26
  let s = null;
27
27
  switch ((null != t && (s = t[this.yE]), this.comparator)) {
28
28
  case fr.wE.FE:
@@ -77,11 +77,11 @@ export default class fr {
77
77
  bt() {
78
78
  let t = this.LE;
79
79
  return (
80
- Nt(this.LE) && (t = L(t.valueOf())),
80
+ Nt(this.LE) && (t = O(t.valueOf())),
81
81
  { k: this.yE, t: this.HE, c: this.comparator, v: t }
82
82
  );
83
83
  }
84
- static En(t) {
84
+ static Rn(t) {
85
85
  return new fr(t.k, t.t, t.c, t.v);
86
86
  }
87
87
  }
@@ -3,7 +3,7 @@ export default class ni {
3
3
  constructor(t, i) {
4
4
  (this.if = t), (this.rf = i), (this.if = t), (this.rf = i);
5
5
  }
6
- yc(t) {
6
+ zc(t) {
7
7
  if (null == this.if) return !1;
8
8
  const i = ri.sf(t[0], this.if);
9
9
  if (!i) return !1;
@@ -2,7 +2,7 @@ export default class ns {
2
2
  constructor(t) {
3
3
  (this.productId = t), (this.productId = t);
4
4
  }
5
- yc(t) {
5
+ zc(t) {
6
6
  return null == this.productId || t[0] === this.productId;
7
7
  }
8
8
  static fromJson(t) {
@@ -3,11 +3,11 @@ export default class hs {
3
3
  constructor(t, s) {
4
4
  (this.productId = t), (this.tf = s), (this.productId = t), (this.tf = s);
5
5
  }
6
- yc(t) {
6
+ zc(t) {
7
7
  if (null == this.productId || null == this.tf) return !1;
8
8
  const s = t[0],
9
9
  i = t[1];
10
- return s === this.productId && this.tf.yc(i);
10
+ return s === this.productId && this.tf.zc(i);
11
11
  }
12
12
  static fromJson(t) {
13
13
  return new hs(
@@ -3,7 +3,7 @@ export default class ur {
3
3
  constructor(t) {
4
4
  (this.if = t), (this.if = t);
5
5
  }
6
- yc(t) {
6
+ zc(t) {
7
7
  return null == this.if || ri.sf(t[0], this.if);
8
8
  }
9
9
  static fromJson(t) {