@braze/web-sdk 4.9.0 → 5.0.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.
Files changed (111) hide show
  1. package/index.d.ts +2204 -2230
  2. package/package.json +1 -1
  3. package/shared-lib/braze-shared-lib.js +1 -1
  4. package/shared-lib/event-types.js +9 -9
  5. package/shared-lib/indexed-db-adapter.js +13 -13
  6. package/shared-lib/logger.js +2 -2
  7. package/shared-lib/supported-options.js +8 -8
  8. package/src/Card/models/captioned-image.js +19 -19
  9. package/src/Card/models/card.js +95 -94
  10. package/src/Card/models/classic-card.js +19 -19
  11. package/src/Card/models/control-card.js +9 -9
  12. package/src/Card/models/image-only.js +21 -22
  13. package/src/Card/models/index.js +0 -1
  14. package/src/Card/util/card-factory.js +39 -39
  15. package/src/ContentCards/content-cards-provider.js +114 -114
  16. package/src/ContentCards/get-cached-content-cards.js +1 -1
  17. package/src/ContentCards/index.js +0 -1
  18. package/src/ContentCards/request-content-cards-refresh.js +1 -1
  19. package/src/ContentCards/subscribe-to-content-cards-updates.js +3 -3
  20. package/src/ContentCards/ui/hide-content-cards.js +2 -2
  21. package/src/ContentCards/ui/show-content-cards.js +14 -14
  22. package/src/Core/add-sdk-metadata.js +2 -2
  23. package/src/Core/change-user.js +2 -2
  24. package/src/Core/disable-sdk.js +4 -4
  25. package/src/Core/enable-sdk.js +4 -4
  26. package/src/Core/get-device-id.js +9 -7
  27. package/src/Core/handle-braze-action.js +14 -14
  28. package/src/Core/is-disabled.js +2 -2
  29. package/src/Core/open-session.js +5 -5
  30. package/src/Core/set-sdk-authentication-signature.js +2 -2
  31. package/src/Core/wipe-data.js +4 -4
  32. package/src/FeatureFlags/feature-flag-factory.js +10 -10
  33. package/src/FeatureFlags/feature-flag.js +7 -7
  34. package/src/FeatureFlags/feature-flags-provider.js +50 -50
  35. package/src/FeatureFlags/get-all-feature-flags.js +1 -1
  36. package/src/FeatureFlags/get-feature-flag.js +3 -5
  37. package/src/Feed/feed-provider-factory.js +8 -8
  38. package/src/Feed/feed-provider.js +15 -15
  39. package/src/Feed/get-cached-feed.js +2 -2
  40. package/src/Feed/request-feed-refresh.js +2 -2
  41. package/src/Feed/subscribe-to-feed-updates.js +2 -2
  42. package/src/Feed/ui/hide-feed.js +2 -2
  43. package/src/Feed/ui/show-feed.js +13 -13
  44. package/src/InAppMessage/display/html-message-to-html.js +11 -12
  45. package/src/InAppMessage/display/in-app-message-to-html.js +15 -15
  46. package/src/InAppMessage/display/modal-utils.js +8 -8
  47. package/src/InAppMessage/in-app-message-factory.js +4 -4
  48. package/src/InAppMessage/in-app-message-manager.js +38 -38
  49. package/src/InAppMessage/models/full-screen-message.js +31 -31
  50. package/src/InAppMessage/models/html-message.js +16 -16
  51. package/src/InAppMessage/models/in-app-message-button.js +5 -5
  52. package/src/InAppMessage/models/in-app-message.js +46 -46
  53. package/src/InAppMessage/models/modal-message.js +30 -30
  54. package/src/InAppMessage/models/slide-up-message.js +26 -26
  55. package/src/InAppMessage/ui/show-in-app-message.js +9 -9
  56. package/src/Push/is-push-blocked.js +2 -2
  57. package/src/Push/is-push-permission-granted.js +2 -2
  58. package/src/Push/is-push-supported.js +2 -2
  59. package/src/Push/push-manager.js +31 -31
  60. package/src/Push/utils/push-utils.js +9 -9
  61. package/src/User/user-manager.js +8 -8
  62. package/src/User/user.js +38 -37
  63. package/src/common/base-feed.js +15 -14
  64. package/src/common/base-provider.js +1 -1
  65. package/src/common/event-logger.js +2 -2
  66. package/src/common/feed-display.js +32 -32
  67. package/src/l10n/l10n-manager-factory.js +9 -9
  68. package/src/managers/auth-manager.js +6 -6
  69. package/src/managers/braze-instance.js +84 -92
  70. package/src/managers/device-manager.js +9 -9
  71. package/src/managers/network-manager.js +72 -69
  72. package/src/managers/server-config-manager.js +13 -13
  73. package/src/managers/session-manager.js +9 -9
  74. package/src/managers/storage-manager-factory.js +11 -11
  75. package/src/managers/storage-manager.js +110 -110
  76. package/src/managers/subscription-manager.js +3 -3
  77. package/src/models/backend-errors.js +5 -5
  78. package/src/models/braze-event.js +7 -7
  79. package/src/models/identifier.js +1 -1
  80. package/src/models/push-token.js +1 -1
  81. package/src/models/server-config.js +6 -6
  82. package/src/request-controller.js +129 -125
  83. package/src/triggers/models/custom-event-data.js +1 -1
  84. package/src/triggers/models/custom-event-property-data.js +6 -6
  85. package/src/triggers/models/filter-set.js +8 -8
  86. package/src/triggers/models/filter.js +31 -31
  87. package/src/triggers/models/in-app-message-click-data.js +1 -1
  88. package/src/triggers/models/purchase-data.js +1 -1
  89. package/src/triggers/models/purchase-property-data.js +4 -4
  90. package/src/triggers/models/push-click-data.js +3 -3
  91. package/src/triggers/models/trigger-condition.js +30 -30
  92. package/src/triggers/models/trigger-events.js +1 -1
  93. package/src/triggers/models/trigger.js +32 -32
  94. package/src/triggers/triggers-provider.js +55 -55
  95. package/src/ui/js/attach-css.js +1 -1
  96. package/src/ui/js/feed-css.js +5 -5
  97. package/src/ui/js/iam-css.js +4 -4
  98. package/src/ui/js/load-font-awesome.js +1 -1
  99. package/src/util/braze-actions.js +4 -4
  100. package/src/util/browser-detector.js +11 -11
  101. package/src/util/client-hints-parser.js +5 -5
  102. package/src/util/component-utils.js +2 -2
  103. package/src/util/date-utils.js +2 -2
  104. package/src/util/device-constants.js +4 -5
  105. package/src/util/dom-utils.js +5 -5
  106. package/src/util/net.js +1 -1
  107. package/src/util/request-header-utils.js +17 -17
  108. package/src/util/user-agent-parser.js +11 -16
  109. package/src/util/validation-utils.js +9 -9
  110. package/src/Card/models/banner.js +0 -31
  111. package/src/ContentCards/log-content-cards-displayed.js +0 -5
@@ -1,5 +1,5 @@
1
1
  import qt from "../models/backend-errors.js";
2
- import be from "../models/braze-event.js";
2
+ import ue from "../models/braze-event.js";
3
3
  import {
4
4
  convertMsToSeconds as h,
5
5
  convertSecondsToMs as Xt,
@@ -10,31 +10,33 @@ import r from "../../shared-lib/braze-shared-lib.js";
10
10
  import { STORAGE_KEYS as i } from "./storage-manager.js";
11
11
  import T from "../util/request-header-utils.js";
12
12
  import { LAST_REQUEST_TO_ENDPOINT_MS_AGO_DEFAULT as Ht } from "../common/constants.js";
13
- export default class Pt {
14
- constructor(t, e, s, i, r, o, n, a, h, u, c) {
13
+ export default class Rt {
14
+ constructor(t, e, s, i, r, o, n, h, a, u, c, l) {
15
15
  (this.fn = t),
16
16
  (this.u = e),
17
- (this.Do = s),
18
- (this.ft = i),
17
+ (this.Mo = s),
18
+ (this.wt = i),
19
19
  (this._e = r),
20
- (this.wt = o),
20
+ (this.yt = o),
21
21
  (this.cn = n),
22
- (this.Uo = a),
23
- (this.Mo = h),
24
- (this.jo = u),
22
+ (this.Uo = h),
23
+ (this.jo = a),
24
+ (this.Do = u),
25
25
  (this.appVersion = c),
26
+ (this.Xh = l),
26
27
  (this.fn = t),
27
28
  (this.u = e),
28
- (this.Do = s),
29
- (this.ft = i),
29
+ (this.Mo = s),
30
+ (this.wt = i),
30
31
  (this._e = r),
31
- (this.wt = o),
32
+ (this.yt = o),
32
33
  (this.cn = n),
33
- (this.Uo = a),
34
- (this.Mo = h),
35
- (this.jo = u),
34
+ (this.Uo = h),
35
+ (this.jo = a),
36
+ (this.Do = u),
36
37
  (this.appVersion = c),
37
- (this.Ra = ["npm"]);
38
+ (this.Xh = l),
39
+ (this.$h = ["npm"]);
38
40
  }
39
41
  Bs(t, e = !1, s = !1) {
40
42
  const r = this.fn.ce(!s),
@@ -43,19 +45,20 @@ export default class Pt {
43
45
  ii(n, o) || (t.device = o),
44
46
  (t.api_key = this.cn),
45
47
  (t.time = h(new Date().valueOf(), !0));
46
- const a = this.u.v(i.k.Xa) || [],
47
- u = this.u.v(i.k.Ea) || "";
48
+ const a = this.u.v(i.k.Kh) || [],
49
+ u = this.u.v(i.k.Wh) || "";
48
50
  if (
49
- (this.Ra.length > 0 &&
50
- (!ii(a, this.Ra) || u !== this._e.Pa()) &&
51
- (t.sdk_metadata = this.Ra),
52
- (t.sdk_version = this.Mo),
53
- this.jo && (t.sdk_flavor = this.jo),
51
+ (this.$h.length > 0 &&
52
+ (!ii(a, this.$h) || u !== this._e.Yh()) &&
53
+ (t.sdk_metadata = this.$h),
54
+ (t.sdk_version = this.jo),
55
+ this.Do && (t.sdk_flavor = this.Do),
54
56
  (t.app_version = this.appVersion),
57
+ (t.app_version_code = this.Xh),
55
58
  (t.device_id = r.id),
56
59
  e)
57
60
  ) {
58
- const e = this.ft.getUserId();
61
+ const e = this.wt.getUserId();
59
62
  null != e && (t.user_id = e);
60
63
  }
61
64
  return t;
@@ -66,7 +69,7 @@ export default class Pt {
66
69
  if (!o && !n) return !0;
67
70
  if (o) {
68
71
  let e;
69
- this.Do.Hh();
72
+ this.Mo.Hh();
70
73
  const s = { errorCode: o.error_code };
71
74
  for (const t of i)
72
75
  p(t) && "X-Braze-Auth-Signature" === t[0] && (s.signature = t[1]);
@@ -78,12 +81,12 @@ export default class Pt {
78
81
  n
79
82
  ? ((s.reason = n), (e = `due to ${n}`))
80
83
  : (e = `with error code ${o.error_code}.`),
81
- this.Do.wh() ||
84
+ this.Mo.wh() ||
82
85
  (e +=
83
86
  ' Please use the "enableSdkAuthentication" initialization option to enable authentication.'),
84
87
  r.j.error(`SDK Authentication failed ${e}`),
85
- this.$a(t.events || [], t.attributes || []),
86
- this.Do.Bh(s),
88
+ this.Qh(t.events || [], t.attributes || []),
89
+ this.Mo.Bh(s),
87
90
  !1
88
91
  );
89
92
  }
@@ -91,42 +94,42 @@ export default class Pt {
91
94
  let i,
92
95
  o = n;
93
96
  switch (o) {
94
- case qt.Na:
97
+ case qt.Vh:
95
98
  return (
96
99
  (i = "Received successful response with empty body."),
97
100
  s.N(r.q.qs, { e: i }),
98
101
  r.j.info(i),
99
102
  !1
100
103
  );
101
- case qt.Ha:
104
+ case qt.Zh:
102
105
  return (
103
106
  (i = "Received successful response with invalid JSON"),
104
107
  s.N(r.q.qs, { e: i + ": " + e.response }),
105
108
  r.j.info(i),
106
109
  !1
107
110
  );
108
- case qt.Ka:
111
+ case qt.Ra:
109
112
  o = `The API key "${t.api_key}" is invalid for the baseUrl ${this.Uo}`;
110
113
  break;
111
- case qt.Ua:
114
+ case qt.Xa:
112
115
  o =
113
116
  "Sorry, we are not currently accepting your requests. If you think this is in error, please contact us.";
114
117
  break;
115
- case qt.La:
118
+ case qt.Ea:
116
119
  o = "No device identifier. Please contact support@braze.com";
117
120
  }
118
121
  r.j.error("Backend error: " + o);
119
122
  }
120
123
  return !1;
121
124
  }
122
- Wa(t, e, s, i) {
125
+ Pa(t, e, s, i) {
123
126
  return !!((t && 0 !== t.length) || (e && 0 !== e.length) || s || i);
124
127
  }
125
- Ya(t, e, s, i, r = !1) {
128
+ $a(t, e, s, i, r = !1) {
126
129
  const o = [],
127
130
  n = (t) => t || "",
128
- a = n(this.ft.getUserId());
129
- let h = this.Jr(t, e);
131
+ h = n(this.wt.getUserId());
132
+ let a = this.Jr(t, e);
130
133
  const u = [],
131
134
  c = [];
132
135
  let l,
@@ -134,67 +137,67 @@ export default class Pt {
134
137
  if (s.length > 0) {
135
138
  const t = [];
136
139
  for (const e of s) {
137
- if (((l = e.Kr()), this.Do.wh())) {
138
- if (a && !l.user_id) {
140
+ if (((l = e.Kr()), this.Mo.wh())) {
141
+ if (h && !l.user_id) {
139
142
  f || (f = {}), f.events || (f.events = []), f.events.push(l);
140
143
  continue;
141
144
  }
142
- if (n(l.user_id) !== a) {
145
+ if (n(l.user_id) !== h) {
143
146
  c.push(l);
144
147
  continue;
145
148
  }
146
149
  }
147
150
  t.push(l);
148
151
  }
149
- t.length > 0 && (h.events = t);
152
+ t.length > 0 && (a.events = t);
150
153
  }
151
154
  if (i.length > 0) {
152
155
  const t = [];
153
156
  for (const e of i)
154
- e && (this.Do.wh() && n(e.user_id) !== a ? u.push(e) : t.push(e));
155
- t.length > 0 && (h.attributes = t);
157
+ e && (this.Mo.wh() && n(e.user_id) !== h ? u.push(e) : t.push(e));
158
+ t.length > 0 && (a.attributes = t);
156
159
  }
157
- if ((this.$a(c, u), (h = this.Bs(h, !0, r)), f)) {
160
+ if ((this.Qh(c, u), (a = this.Bs(a, !0, r)), f)) {
158
161
  f = this.Bs(f, !1, r);
159
- const t = { requestData: f, headers: this.Hs(f, T.Os.Ja) };
162
+ const t = { requestData: f, headers: this.Hs(f, T.Os.Na) };
160
163
  o.push(t);
161
164
  }
162
- if (h && !this.Wa(h.events, h.attributes, t, e)) return f ? o : null;
163
- const d = { requestData: h, headers: this.Hs(h, T.Os.Ja) };
165
+ if (a && !this.Pa(a.events, a.attributes, t, e)) return f ? o : null;
166
+ const d = { requestData: a, headers: this.Hs(a, T.Os.Na) };
164
167
  return o.push(d), o;
165
168
  }
166
- $a(t, e) {
169
+ Qh(t, e) {
167
170
  if (t) {
168
171
  const e = [];
169
172
  for (const s of t) {
170
- const t = be.fromJson(s);
173
+ const t = ue.fromJson(s);
171
174
  (t.time = Xt(t.time)), e.push(t);
172
175
  }
173
176
  this.u.bo(e);
174
177
  }
175
- if (e) for (const t of e) this.u.Qa(t);
178
+ if (e) for (const t of e) this.u.Ha(t);
176
179
  }
177
180
  ii(t, e) {
178
181
  let s = "HTTP error ";
179
182
  null != t && (s += t + " "), (s += e), r.j.error(s);
180
183
  }
181
184
  qr(t) {
182
- return s.N(r.q.Va, { n: t });
185
+ return s.N(r.q.Ka, { n: t });
183
186
  }
184
187
  Jr(t, e, s) {
185
188
  const i = {};
186
189
  t && (i.feed = !0), e && (i.triggers = !0);
187
- const r = null != s ? s : this.ft.getUserId();
190
+ const r = null != s ? s : this.wt.getUserId();
188
191
  return (
189
192
  r && (i.user_id = r),
190
- (i.config = { config_time: this.wt.li() }),
193
+ (i.config = { config_time: this.yt.li() }),
191
194
  { respond_with: i }
192
195
  );
193
196
  }
194
- Za(t) {
197
+ Ua(t) {
195
198
  const e = new Date().valueOf();
196
199
  let s = Ht.toString();
197
- const i = T.Ga(this.u, t);
200
+ const i = T.La(this.u, t);
198
201
  if (-1 !== i) {
199
202
  s = (e - i).toString();
200
203
  }
@@ -202,33 +205,33 @@ export default class Pt {
202
205
  }
203
206
  Hs(t, e, s = !1) {
204
207
  const r = [["X-Braze-Api-Key", this.cn]],
205
- o = this.Za(e);
208
+ o = this.Ua(e);
206
209
  r.push(["X-Braze-Last-Req-Ms-Ago", o]);
207
- const n = T.Xh(this.u, e).toString();
210
+ const n = T.Wa(this.u, e).toString();
208
211
  r.push(["X-Braze-Req-Attempt", n]);
209
- let a = !1;
212
+ let h = !1;
210
213
  if (
211
214
  (null != t.respond_with &&
212
215
  t.respond_with.triggers &&
213
- (r.push(["X-Braze-TriggersRequest", "true"]), (a = !0)),
216
+ (r.push(["X-Braze-TriggersRequest", "true"]), (h = !0)),
214
217
  null != t.respond_with &&
215
218
  t.respond_with.feed &&
216
- (r.push(["X-Braze-FeedRequest", "true"]), (a = !0)),
219
+ (r.push(["X-Braze-FeedRequest", "true"]), (h = !0)),
217
220
  e === T.Os.Ks)
218
221
  ) {
219
222
  r.push(["X-Braze-ContentCardsRequest", "true"]);
220
- let t = this.u.v(i.k.Ls);
221
- (t && s) || ((t = 0), this.u.D(i.k.Ls, t)),
223
+ let t = this.u.v(i.k.zs);
224
+ (t && s) || ((t = 0), this.u.D(i.k.zs, t)),
222
225
  r.push(["BRAZE-SYNC-RETRY-COUNT", t.toString()]),
223
- (a = !0);
226
+ (h = !0);
224
227
  }
225
228
  if (
226
229
  (e === T.Os.Si &&
227
- (r.push(["X-Braze-FeatureFlagsRequest", "true"]), (a = !0)),
228
- a && r.push(["X-Braze-DataRequest", "true"]),
229
- this.Do.wh())
230
+ (r.push(["X-Braze-FeatureFlagsRequest", "true"]), (h = !0)),
231
+ h && r.push(["X-Braze-DataRequest", "true"]),
232
+ this.Mo.wh())
230
233
  ) {
231
- const t = this.Do.jh();
234
+ const t = this.Mo.jh();
232
235
  null != t && r.push(["X-Braze-Auth-Signature", t]);
233
236
  }
234
237
  return r;
@@ -242,12 +245,12 @@ export default class Pt {
242
245
  : e();
243
246
  }
244
247
  ti() {
245
- this.Do.ti();
248
+ this.Mo.ti();
246
249
  }
247
250
  Ys() {
248
251
  return this.Uo;
249
252
  }
250
253
  addSdkMetadata(t) {
251
- for (const e of t) -1 === this.Ra.indexOf(e) && this.Ra.push(e);
254
+ for (const e of t) -1 === this.$h.indexOf(e) && this.$h.push(e);
252
255
  }
253
256
  }
@@ -7,7 +7,7 @@ import {
7
7
  CONTENT_CARDS_RATE_LIMIT_CAPACITY_DEFAULT as Vt,
8
8
  CONTENT_CARDS_RATE_LIMIT_REFILL_RATE_DEFAULT as Gt,
9
9
  } from "../common/constants.js";
10
- export default class Mt {
10
+ export default class jt {
11
11
  constructor(t) {
12
12
  (this.u = t),
13
13
  (this.u = t),
@@ -46,24 +46,24 @@ export default class Mt {
46
46
  let r = !1;
47
47
  null != t.ml.enabled && this.oi() !== t.ml.enabled && (r = !0);
48
48
  let n = !1;
49
- null != t.pi.enabled && this.vi() !== t.pi.enabled && (n = !0),
49
+ null != t.gi.enabled && this.yi() !== t.gi.enabled && (n = !0),
50
50
  (this.rl = t),
51
- this.u.D(i.k.hl, t.ss()),
52
- s && this.tl.Et(),
53
- r && this.el.Et(),
54
- n && this.sl.Et();
51
+ this.u.D(i.k.hl, t.tt()),
52
+ s && this.tl.Dt(),
53
+ r && this.el.Dt(),
54
+ n && this.sl.Dt();
55
55
  }
56
56
  }
57
57
  }
58
58
  Rn(t) {
59
- const e = this.tl.lt(t);
59
+ const e = this.tl.It(t);
60
60
  return this.il && this.tl.removeSubscription(this.il), (this.il = e), e;
61
61
  }
62
62
  Ps(t) {
63
- return this.el.lt(t);
63
+ return this.el.It(t);
64
64
  }
65
65
  Ci(t) {
66
- return this.sl.lt(t);
66
+ return this.sl.It(t);
67
67
  }
68
68
  ge(t) {
69
69
  return -1 !== this.ll().cl.indexOf(t);
@@ -97,12 +97,12 @@ export default class Mt {
97
97
  const t = this.ll().ml.rate_limit;
98
98
  return null == t.refill_rate ? Gt : t.refill_rate <= 0 ? -1 : t.refill_rate;
99
99
  }
100
- vi() {
101
- return this.ll().pi.enabled && null == this.Mi()
100
+ yi() {
101
+ return this.ll().gi.enabled && null == this.Mi()
102
102
  ? (s.N(r.q.qs, { e: "Missing feature flag refresh_rate_limit." }), !1)
103
- : this.ll().pi.enabled || !1;
103
+ : this.ll().gi.enabled || !1;
104
104
  }
105
105
  Mi() {
106
- return this.ll().pi.refresh_rate_limit;
106
+ return this.ll().gi.refresh_rate_limit;
107
107
  }
108
108
  }
@@ -1,17 +1,17 @@
1
1
  import { STORAGE_KEYS as i } from "../managers/storage-manager.js";
2
- import be from "../models/braze-event.js";
2
+ import ue from "../models/braze-event.js";
3
3
  import _t from "../models/identifier.js";
4
4
  import { convertMsToSeconds as h } from "../util/date-utils.js";
5
5
  import r from "../../shared-lib/braze-shared-lib.js";
6
6
  export default class Dt {
7
7
  constructor(s, t, i, e) {
8
8
  (this.u = s),
9
- (this.ft = t),
10
- (this.wt = i),
9
+ (this.wt = t),
10
+ (this.yt = i),
11
11
  (this.wl = e),
12
12
  (this.u = s),
13
- (this.ft = t),
14
- (this.wt = i),
13
+ (this.wt = t),
14
+ (this.yt = i),
15
15
  (this.Sl = 1e3),
16
16
  (null == e || isNaN(e)) && (e = 1800),
17
17
  e < this.Sl / 1e3 &&
@@ -26,15 +26,15 @@ export default class Dt {
26
26
  (this.wl = e);
27
27
  }
28
28
  jl(s, t) {
29
- return new be(this.ft.getUserId(), r.q.xl, s, t.iu, { d: h(s - t.vl) });
29
+ return new ue(this.wt.getUserId(), r.q.xl, s, t.iu, { d: h(s - t.vl) });
30
30
  }
31
- Pa() {
31
+ Yh() {
32
32
  const s = this.u.tu(i.eu.Dl);
33
33
  return null == s ? null : s.iu;
34
34
  }
35
35
  El() {
36
36
  const s = new Date().valueOf(),
37
- t = this.wt.dl(),
37
+ t = this.yt.dl(),
38
38
  e = this.u.v(i.k.zl);
39
39
  if (null != e && null == t) return !1;
40
40
  let n = !1;
@@ -61,7 +61,7 @@ export default class Dt {
61
61
  }
62
62
  (n += ". Will expire " + t.valueOf()), r.j.info(n);
63
63
  const l = new _t(r.Z.Y(), t);
64
- this.u.Hl(new be(this.ft.getUserId(), r.q.Wl, s, l.iu)),
64
+ this.u.Hl(new ue(this.wt.getUserId(), r.q.Wl, s, l.iu)),
65
65
  this.u.uu(i.eu.Dl, l);
66
66
  return null == this.u.v(i.k.zl) && this.u.D(i.k.zl, s), l.iu;
67
67
  }
@@ -1,14 +1,14 @@
1
- import O, { STORAGE_KEYS as i } from "./storage-manager.js";
1
+ import J, { STORAGE_KEYS as i } from "./storage-manager.js";
2
2
  import r from "../../shared-lib/braze-shared-lib.js";
3
- const Bt = {
4
- qo: function (e, o = !1) {
3
+ const Mt = {
4
+ xo: function (e, o = !1) {
5
5
  let t = !1;
6
6
  try {
7
7
  if (localStorage && localStorage.getItem)
8
8
  try {
9
- localStorage.setItem(i.k.ec, "true"),
10
- localStorage.getItem(i.k.ec) &&
11
- (localStorage.removeItem(i.k.ec), (t = !0));
9
+ localStorage.setItem(i.k.Qa, "true"),
10
+ localStorage.getItem(i.k.Qa) &&
11
+ (localStorage.removeItem(i.k.Qa), (t = !0));
12
12
  } catch (e) {
13
13
  if (
14
14
  !(
@@ -24,12 +24,12 @@ const Bt = {
24
24
  } catch (e) {
25
25
  r.j.info("Local Storage not supported!");
26
26
  }
27
- const a = Bt.oc(),
28
- n = new O.tc(e, a && !o, t);
27
+ const a = Mt.Ga(),
28
+ n = new J.Ja(e, a && !o, t);
29
29
  let c;
30
- return (c = t ? new O.rc(e) : new O.ac()), new O(n, c);
30
+ return (c = t ? new J.Va(e) : new J.Ya()), new J(n, c);
31
31
  },
32
- oc: function () {
32
+ Ga: function () {
33
33
  return (
34
34
  navigator.cookieEnabled ||
35
35
  ("cookie" in document &&
@@ -39,4 +39,4 @@ const Bt = {
39
39
  );
40
40
  },
41
41
  };
42
- export default Bt;
42
+ export default Mt;