@braze/web-sdk 6.6.0 → 6.7.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 (152) hide show
  1. package/index.d.ts +253 -5
  2. package/package.json +1 -1
  3. package/shared-lib/event-types.js +21 -20
  4. package/shared-lib/guid.js +3 -3
  5. package/shared-lib/indexed-db-adapter.js +70 -70
  6. package/shared-lib/logger.js +7 -7
  7. package/shared-lib/supported-options.js +26 -26
  8. package/src/Banner/banner-factory.js +11 -1
  9. package/src/Banner/banner-provider.js +244 -120
  10. package/src/Banner/banner.js +14 -12
  11. package/src/Banner/display/banner-to-html.js +23 -16
  12. package/src/Banner/display/detect-banner-impressions.js +13 -13
  13. package/src/Banner/get-all-banners.js +5 -5
  14. package/src/Banner/get-banner.js +4 -4
  15. package/src/Banner/log-banner-click.js +4 -4
  16. package/src/Banner/log-banner-dismissal.js +23 -0
  17. package/src/Banner/log-banner-impressions.js +7 -7
  18. package/src/Banner/request-banners-refresh.js +12 -16
  19. package/src/Banner/subscribe-to-banners-updates.js +6 -6
  20. package/src/Banner/ui/insert-banner.js +12 -12
  21. package/src/Card/card-manager-factory.js +5 -5
  22. package/src/Card/card-manager.js +33 -33
  23. package/src/Card/constants.js +1 -1
  24. package/src/Card/display/card-display.js +11 -11
  25. package/src/Card/log-card-dismissal.js +3 -3
  26. package/src/Card/log-content-card-click.js +3 -3
  27. package/src/Card/log-content-card-impressions.js +6 -6
  28. package/src/Card/models/captioned-image.js +21 -21
  29. package/src/Card/models/card.js +73 -73
  30. package/src/Card/models/classic-card.js +21 -21
  31. package/src/Card/models/control-card.js +11 -11
  32. package/src/Card/models/image-only.js +18 -18
  33. package/src/Card/util/card-factory.js +41 -41
  34. package/src/ContentCards/content-cards-provider-factory.js +12 -12
  35. package/src/ContentCards/content-cards-provider.js +151 -151
  36. package/src/ContentCards/content-cards.js +5 -5
  37. package/src/ContentCards/get-cached-content-cards.js +2 -2
  38. package/src/ContentCards/request-content-cards-refresh.js +2 -2
  39. package/src/ContentCards/subscribe-to-content-cards-updates.js +6 -6
  40. package/src/ContentCards/ui/show-content-cards.js +10 -10
  41. package/src/Core/add-sdk-metadata.js +2 -2
  42. package/src/Core/change-user.js +6 -6
  43. package/src/Core/disable-sdk.js +9 -9
  44. package/src/Core/enable-sdk.js +5 -5
  45. package/src/Core/get-user.js +1 -1
  46. package/src/Core/handle-braze-action.js +3 -3
  47. package/src/Core/is-disabled.js +2 -2
  48. package/src/Core/log-custom-event.js +8 -8
  49. package/src/Core/log-purchase.js +5 -5
  50. package/src/Core/open-session.js +7 -7
  51. package/src/Core/set-sdk-authentication-signature.js +3 -3
  52. package/src/Core/subscribe-to-sdk-authentication-failures.js +1 -1
  53. package/src/Core/wipe-data.js +6 -6
  54. package/src/DUST/dust-provider-factory.js +11 -11
  55. package/src/DUST/dust-provider.js +255 -255
  56. package/src/DUST/dust-shared-worker-impl.js +100 -100
  57. package/src/DUST/dust-worker-bridge.js +27 -27
  58. package/src/DUST/subscribe-to-dust.js +9 -9
  59. package/src/FeatureFlags/feature-flag-factory.js +8 -8
  60. package/src/FeatureFlags/feature-flag.js +9 -9
  61. package/src/FeatureFlags/feature-flags-provider.js +86 -86
  62. package/src/FeatureFlags/get-all-feature-flags.js +2 -2
  63. package/src/FeatureFlags/get-feature-flag.js +2 -2
  64. package/src/FeatureFlags/log-feature-flag-impression.js +5 -5
  65. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +2 -2
  66. package/src/InAppMessage/constants.js +83 -2
  67. package/src/InAppMessage/display/html-message-display-utils.js +15 -15
  68. package/src/InAppMessage/display/html-message-to-html.js +36 -37
  69. package/src/InAppMessage/display/in-app-message-to-html.js +44 -44
  70. package/src/InAppMessage/display/modal-utils.js +10 -14
  71. package/src/InAppMessage/in-app-message-factory.js +16 -20
  72. package/src/InAppMessage/in-app-message-manager.js +115 -116
  73. package/src/InAppMessage/log-in-app-message-button-click.js +8 -8
  74. package/src/InAppMessage/log-in-app-message-click.js +7 -7
  75. package/src/InAppMessage/log-in-app-message-html-click.js +8 -8
  76. package/src/InAppMessage/log-in-app-message-impression.js +5 -5
  77. package/src/InAppMessage/models/control-message.js +4 -4
  78. package/src/InAppMessage/models/full-screen-message.js +56 -49
  79. package/src/InAppMessage/models/html-message.js +31 -27
  80. package/src/InAppMessage/models/in-app-message-button.js +12 -12
  81. package/src/InAppMessage/models/in-app-message.js +202 -256
  82. package/src/InAppMessage/models/modal-message.js +55 -49
  83. package/src/InAppMessage/models/slide-up-message.js +57 -51
  84. package/src/InAppMessage/models/templated-in-app-message.js +10 -10
  85. package/src/InAppMessage/shared-types.js +1 -0
  86. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  87. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +5 -5
  88. package/src/InAppMessage/ui/remove-all-visible-in-app-messages.js +3 -3
  89. package/src/InAppMessage/ui/show-in-app-message.js +43 -41
  90. package/src/Push/is-push-blocked.js +2 -2
  91. package/src/Push/is-push-permission-granted.js +2 -2
  92. package/src/Push/is-push-supported.js +2 -2
  93. package/src/Push/push-manager-factory.js +9 -9
  94. package/src/Push/push-manager.js +15 -15
  95. package/src/Push/utils/push-utils.js +15 -15
  96. package/src/User/user-manager.js +14 -14
  97. package/src/User/user.js +60 -59
  98. package/src/common/base-provider.js +1 -1
  99. package/src/common/constants.js +2 -1
  100. package/src/common/content-cards-display.js +38 -38
  101. package/src/common/event-logger.js +8 -8
  102. package/src/l10n/l10n-manager-factory.js +9 -9
  103. package/src/l10n/l10n-manager.js +2 -2
  104. package/src/managers/auth-manager.js +31 -31
  105. package/src/managers/braze-instance.js +197 -186
  106. package/src/managers/constants.js +1 -0
  107. package/src/managers/device-manager.js +25 -25
  108. package/src/managers/network-manager.js +155 -155
  109. package/src/managers/server-config-manager.js +106 -93
  110. package/src/managers/session-manager.js +37 -33
  111. package/src/managers/storage-manager-factory.js +33 -28
  112. package/src/managers/storage-manager.js +192 -170
  113. package/src/managers/subscription-manager.js +13 -13
  114. package/src/managers/utils.js +1 -1
  115. package/src/models/backend-errors.js +5 -5
  116. package/src/models/braze-event.js +13 -13
  117. package/src/models/device.js +3 -3
  118. package/src/models/identifier.js +12 -12
  119. package/src/models/push-token.js +9 -9
  120. package/src/models/request-result.js +4 -4
  121. package/src/models/server-config.js +29 -38
  122. package/src/request-controller.js +160 -164
  123. package/src/triggers/models/custom-event-data.js +7 -7
  124. package/src/triggers/models/custom-event-property-data.js +10 -10
  125. package/src/triggers/models/filter-set.js +12 -12
  126. package/src/triggers/models/filter.js +66 -66
  127. package/src/triggers/models/in-app-message-click-data.js +13 -13
  128. package/src/triggers/models/purchase-data.js +4 -4
  129. package/src/triggers/models/purchase-property-data.js +10 -10
  130. package/src/triggers/models/push-click-data.js +8 -8
  131. package/src/triggers/models/trigger-condition.js +58 -58
  132. package/src/triggers/models/trigger-events.js +3 -3
  133. package/src/triggers/models/trigger.js +44 -44
  134. package/src/triggers/triggers-provider-factory.js +5 -5
  135. package/src/triggers/triggers-provider.js +70 -70
  136. package/src/ui/js/attach-css.js +3 -3
  137. package/src/ui/js/feed-css.js +2 -2
  138. package/src/ui/js/iam-css.js +2 -2
  139. package/src/ui/js/load-font-awesome.js +2 -2
  140. package/src/util/base-device-parser.js +9 -9
  141. package/src/util/braze-actions.js +3 -3
  142. package/src/util/browser-detector.js +37 -37
  143. package/src/util/client-hints-parser.js +9 -9
  144. package/src/util/component-utils.js +3 -3
  145. package/src/util/dom-utils.js +2 -2
  146. package/src/util/html-display-utils.js +11 -11
  147. package/src/util/key-codes.js +1 -1
  148. package/src/util/net.js +8 -8
  149. package/src/util/request-header-utils.js +25 -25
  150. package/src/util/user-agent-parser.js +20 -20
  151. package/src/util/validation-utils.js +21 -21
  152. package/src/util/window-utils.js +3 -3
@@ -1,93 +1,93 @@
1
- import l from "./util/net.js";
2
- import De from "./models/braze-event.js";
3
- import v from "./common/event-logger.js";
4
- import { randomInclusive as a } from "./util/math.js";
5
- import H from "./models/request-result.js";
6
1
  import {
7
- logger as E,
2
+ EventTypes as p,
3
+ Guid as V,
8
4
  IndexedDBAdapter as et,
9
- Guid as P,
10
- EventTypes as f,
5
+ logger as E,
11
6
  } from "../shared-lib/index.js";
7
+ import v from "./common/event-logger.js";
8
+ import { removeAllVisibleInAppMessages as fi } from "./InAppMessage/ui/remove-all-visible-in-app-messages.js";
12
9
  import { STORAGE_KEYS as s } from "./managers/storage-manager.js";
13
- import m from "./managers/subscription-manager.js";
14
- import vt from "./Push/utils/push-utils.js";
10
+ import f from "./managers/subscription-manager.js";
11
+ import Ie from "./models/braze-event.js";
12
+ import L from "./models/request-result.js";
13
+ import It from "./Push/utils/push-utils.js";
14
+ import { randomInclusive as a } from "./util/math.js";
15
+ import l from "./util/net.js";
15
16
  import h from "./util/request-header-utils.js";
16
- import { removeAllVisibleInAppMessages as di } from "./InAppMessage/ui/remove-all-visible-in-app-messages.js";
17
- export default class Wt {
17
+ export default class Kt {
18
18
  constructor(t, i, s, e, h, n, o, r, l, u) {
19
19
  (this.tu = t),
20
20
  (this.baseUrl = i),
21
- (this.C = s),
21
+ (this.j = s),
22
22
  (this.eu = e),
23
- (this.vs = h),
23
+ (this.Ss = h),
24
24
  (this.h = n),
25
- (this.B = o),
26
- (this.$c = r),
27
- (this.al = l),
28
- (this.j = u),
25
+ (this.C = o),
26
+ (this.bc = r),
27
+ (this.Gh = l),
28
+ (this.B = u),
29
29
  (this.tu = t),
30
30
  (this.baseUrl = i),
31
- (this.sd = 0),
32
- (this.bE = o.dE() || 0),
33
- (this.hd = null),
34
- (this.C = s),
31
+ (this.kc = 0),
32
+ (this.dS = o.RS() || 0),
33
+ (this.yc = null),
34
+ (this.j = s),
35
35
  (this.eu = e),
36
- (this.vs = h),
36
+ (this.Ss = h),
37
37
  (this.h = n),
38
- (this.B = o),
39
- (this.al = l),
40
- (this.j = u),
41
- (this.$c = r),
42
- (this.nd = new m()),
43
- (this.rd = null),
44
- (this.ld = 50),
45
- (this.ud = !1),
46
- (this.ad = !1);
38
+ (this.C = o),
39
+ (this.Gh = l),
40
+ (this.B = u),
41
+ (this.bc = r),
42
+ (this.jc = new f()),
43
+ (this.Ac = null),
44
+ (this.Dc = 50),
45
+ (this.$c = !1),
46
+ (this.qc = !1);
47
47
  }
48
- md(t, i) {
49
- return !t && !i && this.al.Jh() >= this.ld;
48
+ Cc(t, i) {
49
+ return !t && !i && this.Gh.Ih() >= this.Dc;
50
50
  }
51
- fd(t) {
52
- let i = this.C.am();
51
+ Mc(t) {
52
+ let i = this.j.am();
53
53
  if (t.length > 0) {
54
- const s = this.vs.getUserId();
54
+ const s = this.Ss.getUserId();
55
55
  for (const e of t) {
56
56
  const t = (!e.userId && !s) || e.userId === s;
57
- e.type === f.Sm && t && (i = !0);
57
+ e.type === p.wm && t && (i = !0);
58
58
  }
59
59
  }
60
60
  return i;
61
61
  }
62
- gd(t = !1, i = !0, e, n, o, r = !1, u = !1) {
63
- i && this.pd();
64
- const c = this.B.RE(),
65
- d = this.B.IE();
62
+ Tc(t = !1, i = !0, e, n, o, r = !1, u = !1) {
63
+ i && this.Lc();
64
+ const c = this.C.TS(),
65
+ d = this.C.gS();
66
66
  let m = !1;
67
67
  const f = (t, r, u = -1) => {
68
68
  const c = new Date().valueOf();
69
- h.K(this.B, h.H._e, c),
69
+ h.nt(this.C, h.it.pn, c),
70
70
  -1 !== u && r.push(["X-Braze-Req-Tokens-Remaining", u.toString()]);
71
71
  let d = !1;
72
- l.O({
72
+ l.ot({
73
73
  url: this.baseUrl + "/data/",
74
74
  data: t,
75
75
  headers: r,
76
- W: (i) => {
76
+ lt: (i) => {
77
77
  null != t.respond_with &&
78
78
  t.respond_with.triggers &&
79
- (this.sd = Math.max(this.sd - 1, 0)),
80
- this.j.Y(t, i, r)
81
- ? (this.al.Z(),
82
- this.h.Nc(i),
79
+ (this.kc = Math.max(this.kc - 1, 0)),
80
+ this.B.ut(t, i, r)
81
+ ? (this.Gh.ct(),
82
+ this.h.sc(i),
83
83
  (null != t.respond_with &&
84
- t.respond_with.user_id != this.vs.getUserId()) ||
85
- (null != t.device && this.B.bt(s.ft.ac, t.device),
84
+ t.respond_with.user_id != this.Ss.getUserId()) ||
85
+ (null != t.device && this.C.It(s.Tt.Ba, t.device),
86
86
  null != t.sdk_metadata &&
87
- (this.B.bt(s.ft.Tl, t.sdk_metadata),
88
- this.B.bt(s.ft.kl, this.C.yt())),
89
- this.$c(i),
90
- h.Hl(this.B, h.H._e, 1),
87
+ (this.C.It(s.Tt.Ka, t.sdk_metadata),
88
+ this.C.It(s.Tt.Pa, this.j.kt())),
89
+ this.bc(i),
90
+ h.Dl(this.C, h.it.pn, 1),
91
91
  "function" == typeof e && e()))
92
92
  : i.auth_error && (d = !0);
93
93
  },
@@ -95,13 +95,13 @@ export default class Wt {
95
95
  (d = !0),
96
96
  null != t.respond_with &&
97
97
  t.respond_with.triggers &&
98
- (this.sd = Math.max(this.sd - 1, 0)),
99
- this.j.yl(t.events, t.attributes),
98
+ (this.kc = Math.max(this.kc - 1, 0)),
99
+ this.B.Ua(t.events, t.attributes),
100
100
  "function" == typeof n && n();
101
101
  },
102
- tt: (t, s) => {
102
+ ft: (t, s) => {
103
103
  "function" == typeof o && o(!d);
104
- const e = this.j.Zl(s);
104
+ const e = this.B.Bl(s);
105
105
  let n = 0;
106
106
  if (e)
107
107
  switch (e.type) {
@@ -113,97 +113,97 @@ export default class Wt {
113
113
  }
114
114
  if (i && !m) {
115
115
  if (d) {
116
- h.hc(this.B, h.H._e);
117
- const t = this.h.st(),
118
- i = this.h.it(),
119
- s = this.h.nt();
120
- let e = this.hd;
116
+ h.zl(this.C, h.it.pn);
117
+ const t = this.h.vt(),
118
+ i = this.h.gt(),
119
+ s = this.h.bt();
120
+ let e = this.yc;
121
121
  (null == e || e < t) && (e = t);
122
122
  const o = Math.min(s, a(t, e * i)) + n;
123
- this.vd(o);
124
- } else this.vd(Math.max(1e3 * this.bE, n));
123
+ this.Fc(o);
124
+ } else this.Fc(Math.max(1e3 * this.dS, n));
125
125
  m = !0;
126
126
  }
127
127
  },
128
128
  });
129
129
  },
130
- g = this.fd(c),
130
+ g = this.Mc(c),
131
131
  p = t || g;
132
- if (this.md(r, g))
132
+ if (this.Cc(r, g))
133
133
  return void E.info(
134
134
  "Declining to flush data due to 50 consecutive authentication failures",
135
135
  );
136
- if (i && !this.j.$l(c, d, p))
137
- return this.vd(), void ("function" == typeof o && o(!0));
138
- const v = this.j.Xl(p, c, d, u);
139
- p && this.sd++;
136
+ if (i && !this.B.fl(c, d, p))
137
+ return this.Fc(), void ("function" == typeof o && o(!0));
138
+ const v = this.B.ml(p, c, d, u);
139
+ p && this.kc++;
140
140
  let b = !1;
141
141
  if (v)
142
142
  for (const t of v)
143
- this.j.J(
143
+ this.B.et(
144
144
  t.requestData,
145
145
  (i) => f(t.requestData, t.headers, i),
146
- h.H._e,
146
+ h.it.pn,
147
147
  n,
148
148
  ),
149
149
  (b = !0);
150
- this.al.wh() && i && !b
151
- ? this.vd()
150
+ this.Gh.Fh() && i && !b
151
+ ? this.Fc()
152
152
  : g &&
153
153
  (E.info("Invoking new session subscriptions"),
154
- this.nd.L(),
155
- (this.ad = !0));
154
+ this.jc.A(),
155
+ (this.qc = !0));
156
156
  }
157
- bd() {
158
- return this.sd > 0;
157
+ Ic() {
158
+ return this.kc > 0;
159
159
  }
160
- vd(t = 1e3 * this.bE) {
161
- this.ud ||
162
- (this.pd(),
163
- (this.rd = window.setTimeout(() => {
160
+ Fc(t = 1e3 * this.dS) {
161
+ this.$c ||
162
+ (this.Lc(),
163
+ (this.Ac = window.setTimeout(() => {
164
164
  if (document.hidden) {
165
165
  const t = "visibilitychange",
166
166
  i = () => {
167
167
  document.hidden ||
168
- (document.removeEventListener(t, i, !1), this.gd());
168
+ (document.removeEventListener(t, i, !1), this.Tc());
169
169
  };
170
170
  document.addEventListener(t, i, !1);
171
- } else this.gd();
171
+ } else this.Tc();
172
172
  }, t)),
173
- (this.hd = t));
173
+ (this.yc = t));
174
174
  }
175
- pd() {
176
- null != this.rd && (clearTimeout(this.rd), (this.rd = null));
175
+ Lc() {
176
+ null != this.Ac && (clearTimeout(this.Ac), (this.Ac = null));
177
177
  }
178
178
  initialize() {
179
- (this.ud = !1), this.vd();
179
+ (this.$c = !1), this.Fc();
180
180
  }
181
181
  destroy() {
182
- this.nd.removeAllSubscriptions(),
183
- this.al.Gh(),
184
- this.pd(),
185
- (this.ud = !0),
186
- this.gd(void 0, !1, void 0, void 0, void 0, void 0, !0),
187
- (this.rd = null),
188
- (this.ad = !1);
182
+ this.jc.removeAllSubscriptions(),
183
+ this.Gh.xh(),
184
+ this.Lc(),
185
+ (this.$c = !0),
186
+ this.Tc(void 0, !1, void 0, void 0, void 0, void 0, !0),
187
+ (this.Ac = null),
188
+ (this.qc = !1);
189
189
  }
190
190
  rn(t) {
191
- return this.ad ? (t(), null) : this.nd.Rt(t);
191
+ return this.qc ? (t(), null) : this.jc.Kt(t);
192
192
  }
193
193
  openSession() {
194
- const t = this.C.yt() !== this.C.el();
195
- t && (this.B.hE(s.Ou.il), this.B.hE(s.Ou.Cu)),
196
- this.gd(!1, void 0, () => {
197
- t && (this.B.zt(s.ft.vo), this.B.zt(s.ft.Dt));
194
+ const t = this.j.kt() !== this.j.el();
195
+ t && (this.C.uS(s.Ou.Wh), this.C.uS(s.Ou.Cu)),
196
+ this.Tc(!1, void 0, () => {
197
+ t && (this.C.Qt(s.Tt.jo), this.C.Qt(s.Tt.Wt));
198
198
  }),
199
- this.Va(),
199
+ this.Ea(),
200
200
  t &&
201
201
  import("./Push/push-manager-factory.js").then((t) => {
202
- if (this.ud) return;
202
+ if (this.$c) return;
203
203
  const i = t.default.ra();
204
204
  if (
205
205
  null != i &&
206
- (vt.isPushPermissionGranted() || vt.isPushBlocked())
206
+ (It.isPushPermissionGranted() || It.isPushBlocked())
207
207
  ) {
208
208
  const t = () => {
209
209
  i.du()
@@ -216,56 +216,52 @@ export default class Wt {
216
216
  s && t();
217
217
  },
218
218
  h = () => {
219
- const i = this.B.dt(s.ft.Uu);
219
+ const i = this.C.Rt(s.Tt.Uu);
220
220
  (null == i || i) && t();
221
221
  },
222
- n = et.Us.Rs;
223
- new et(n, E).kr(n.Fs.Fu, e, h);
222
+ n = et.Ps.$s;
223
+ new et(n, E).kr(n.Os.Fu, e, h);
224
224
  }
225
225
  });
226
226
  }
227
- wd() {
228
- this.B.zt(s.ft.lo), this.B.zt(s.ft.Ps), this.B.zt(s.ft.Yn);
227
+ Pc() {
228
+ this.C.Qt(s.Tt.Fo), this.C.Qt(s.Tt.Ci), this.C.Qt(s.Tt.pa);
229
229
  }
230
- kd() {
231
- var t, i;
232
- this.B.zt(s.ft.Ql), this.B.zt(s.ft.lE);
233
- const e = h.H;
234
- for (const i in e) {
235
- const s = e[i];
236
- this.j.dc(s, null === (t = this.h) || void 0 === t ? void 0 : t.Tc(s));
237
- }
238
- this.j.uc(null === (i = this.h) || void 0 === i ? void 0 : i.Ac());
230
+ xc() {
231
+ this.C.Qt(s.Tt.Cl),
232
+ this.C.Qt(s.Tt.iS),
233
+ this.C.Qt(s.Tt.Ml),
234
+ this.C.Qt(s.Tt.Ll);
239
235
  }
240
236
  changeUser(t, i, e) {
241
- const h = this.vs.getUserId();
237
+ const h = this.Ss.getUserId();
242
238
  if (h !== t) {
243
- this.C.jm(),
244
- this.wd(),
245
- di(),
246
- null != h && this.gd(void 0, !1, void 0, void 0, void 0),
247
- this.vs.Ju(t),
248
- e ? this.al.setSdkAuthenticationSignature(e) : this.al.yh();
239
+ this.j.Sm(),
240
+ this.Pc(),
241
+ fi(),
242
+ null != h && this.Tc(void 0, !1, void 0, void 0, void 0),
243
+ this.Ss.Ju(t),
244
+ e ? this.Gh.setSdkAuthenticationSignature(e) : this.Gh.jh();
249
245
  for (let t = 0; t < i.length; t++) i[t].changeUser(null == h);
250
- this.j.fo(),
251
- null != h && this.B.zt(s.ft.rE),
252
- this.B.zt(s.ft.ac),
253
- this.B.zt(s.ft.uE),
254
- this.kd(),
246
+ this.B.fo(),
247
+ null != h && this.C.Qt(s.Tt.tS),
248
+ this.C.Qt(s.Tt.Ba),
249
+ this.C.Qt(s.Tt.SS),
250
+ this.xc(),
255
251
  this.openSession(),
256
252
  E.info('Changed user to "' + t + '".');
257
253
  } else {
258
254
  let i = "Doing nothing.";
259
255
  e &&
260
- this.al.jh() !== e &&
261
- (this.al.setSdkAuthenticationSignature(e),
256
+ this.Gh.kh() !== e &&
257
+ (this.Gh.setSdkAuthenticationSignature(e),
262
258
  (i = "Updated SDK authentication signature")),
263
259
  E.info(`Current user is already ${t}. ${i}`);
264
260
  }
265
261
  }
266
262
  requestImmediateDataFlush(t) {
267
- this.pd(), this.C.el();
268
- this.gd(
263
+ this.Lc(), this.j.el();
264
+ this.Tc(
269
265
  void 0,
270
266
  void 0,
271
267
  void 0,
@@ -276,27 +272,27 @@ export default class Wt {
276
272
  !0,
277
273
  );
278
274
  }
279
- yr(t, i) {
280
- this.C.el(),
275
+ Sr(t, i) {
276
+ this.j.el(),
281
277
  E.info("Requesting explicit trigger refresh."),
282
- this.gd(!0, void 0, t, i);
278
+ this.Tc(!0, void 0, t, i);
283
279
  }
284
280
  Gu(t, i) {
285
- const e = f.yd,
281
+ const e = p.Nc,
286
282
  h = { a: t, l: i },
287
- n = v.lt(e, h);
283
+ n = v.wt(e, h);
288
284
  return (
289
- n && (E.info(`Logged alias ${t} with label ${i}`), this.B.bt(s.ft.uE, h)),
285
+ n && (E.info(`Logged alias ${t} with label ${i}`), this.C.It(s.Tt.SS, h)),
290
286
  n
291
287
  );
292
288
  }
293
289
  Mu(t, i, s) {
294
290
  if (this.h.qu(i))
295
291
  return (
296
- E.info(`Custom Attribute "${i}" is blocklisted, ignoring.`), new H()
292
+ E.info(`Custom Attribute "${i}" is blocklisted, ignoring.`), new L()
297
293
  );
298
294
  const e = { key: i, value: s },
299
- h = v.lt(t, e);
295
+ h = v.wt(t, e);
300
296
  if (h) {
301
297
  const t = "object" == typeof s ? JSON.stringify(s, null, 2) : s;
302
298
  E.info(`Logged custom attribute: ${i} with value: ${t}`);
@@ -308,52 +304,52 @@ export default class Wt {
308
304
  null != e && (o.altitude = e),
309
305
  null != h && (o.ll_accuracy = h),
310
306
  null != n && (o.alt_accuracy = n);
311
- const r = v.lt(f.jd, o, t || void 0);
307
+ const r = v.wt(p.Oc, o, t || void 0);
312
308
  return (
313
309
  r &&
314
310
  E.info(`Set user last known location as ${JSON.stringify(o, null, 2)}`),
315
311
  r
316
312
  );
317
313
  }
318
- $r(t, i) {
319
- const s = this.C.el();
320
- return new De(this.vs.getUserId(), f.Sd, t, s, { cid: i });
314
+ yr(t, i) {
315
+ const s = this.j.el();
316
+ return new Ie(this.Ss.getUserId(), p.Uc, t, s, { cid: i });
321
317
  }
322
- Ad(t, i) {
318
+ Bc(t, i) {
323
319
  return new et(t, i);
324
320
  }
325
- Va() {
326
- const t = et.Us.Rs;
327
- this.Ad(t, E).setItem(t.Fs._e, 1, {
321
+ Ea() {
322
+ const t = et.Ps.$s;
323
+ this.Bc(t, E).setItem(t.Os.pn, 1, {
328
324
  baseUrl: this.baseUrl,
329
325
  data: { api_key: this.tu, device_id: this.eu.ve().id },
330
- userId: this.vs.getUserId(),
331
- sdkAuthEnabled: this.al.wh(),
326
+ userId: this.Ss.getUserId(),
327
+ sdkAuthEnabled: this.Gh.Fh(),
332
328
  });
333
329
  }
334
- Fr(t) {
330
+ Ar(t) {
335
331
  for (const i of t)
336
- if (i.api_key === this.tu) this.j.yl(i.events, i.attributes);
332
+ if (i.api_key === this.tu) this.B.Ua(i.events, i.attributes);
337
333
  else {
338
- const t = et.Us.Rs;
339
- new et(t, E).setItem(t.Fs.zr, P.se(), i);
334
+ const t = et.Ps.$s;
335
+ new et(t, E).setItem(t.Os.qr, V.de(), i);
340
336
  }
341
337
  }
342
- Ra(t, i, s) {
338
+ Na(t, i, s) {
343
339
  if (this.h.qu(t))
344
340
  return (
345
- E.info(`Custom Attribute "${t}" is blocklisted, ignoring.`), new H()
341
+ E.info(`Custom Attribute "${t}" is blocklisted, ignoring.`), new L()
346
342
  );
347
343
  let e, h;
348
344
  return (
349
345
  null === i && null === s
350
- ? ((e = f.Dd), (h = { key: t }))
351
- : ((e = f.$d), (h = { key: t, latitude: i, longitude: s })),
352
- v.lt(e, h)
346
+ ? ((e = p.Jc), (h = { key: t }))
347
+ : ((e = p.Kc), (h = { key: t, latitude: i, longitude: s })),
348
+ v.wt(e, h)
353
349
  );
354
350
  }
355
- Pa(t, i) {
351
+ va(t, i) {
356
352
  const s = { group_id: t, status: i };
357
- return v.lt(f.qd, s);
353
+ return v.wt(p.Wc, s);
358
354
  }
359
355
  }
@@ -1,14 +1,14 @@
1
- export default class rs {
1
+ export default class es {
2
2
  constructor(t) {
3
- (this.tf = t), (this.tf = t);
3
+ (this.Gc = t), (this.Gc = t);
4
4
  }
5
- sf(t) {
6
- return null == this.tf || this.tf === t[0];
5
+ Hc(t) {
6
+ return null == this.Gc || this.Gc === t[0];
7
7
  }
8
8
  static fromJson(t) {
9
- return new rs(t ? t.event_name : null);
9
+ return new es(t ? t.event_name : null);
10
10
  }
11
- gt() {
12
- return this.tf;
11
+ qt() {
12
+ return this.Gc;
13
13
  }
14
14
  }
@@ -1,21 +1,21 @@
1
- import is from "./filter-set.js";
2
- export default class ls {
1
+ import ls from "./filter-set.js";
2
+ export default class ns {
3
3
  constructor(t, s) {
4
- (this.tf = t), (this.if = s), (this.tf = t), (this.if = s);
4
+ (this.Gc = t), (this.tf = s), (this.Gc = t), (this.tf = s);
5
5
  }
6
- sf(t) {
7
- if (null == this.tf || null == this.if) return !1;
6
+ Hc(t) {
7
+ if (null == this.Gc || null == this.tf) return !1;
8
8
  const s = t[0],
9
9
  i = t[1];
10
- return s === this.tf && this.if.sf(i);
10
+ return s === this.Gc && this.tf.Hc(i);
11
11
  }
12
12
  static fromJson(t) {
13
- return new ls(
13
+ return new ns(
14
14
  t ? t.event_name : null,
15
- t ? is.fromJson(t.property_filters) : null,
15
+ t ? ls.fromJson(t.property_filters) : null,
16
16
  );
17
17
  }
18
- gt() {
19
- return { e: this.tf, pf: this.if ? this.if.gt() : null };
18
+ qt() {
19
+ return { e: this.Gc, pf: this.tf ? this.tf.qt() : null };
20
20
  }
21
21
  }
@@ -1,16 +1,16 @@
1
- import cr from "./filter.js";
2
- import { isArray as R } from "../../util/code-utils.js";
3
- export default class is {
1
+ import hr from "./filter.js";
2
+ import { isArray as g } from "../../util/code-utils.js";
3
+ export default class ls {
4
4
  constructor(t) {
5
5
  (this.filters = t), (this.filters = t);
6
6
  }
7
- sf(t) {
7
+ Hc(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].sf(t)) {
13
+ if (o[r].Hc(t)) {
14
14
  s = !0;
15
15
  break;
16
16
  }
@@ -22,22 +22,22 @@ export default class is {
22
22
  return r;
23
23
  }
24
24
  static fromJson(t) {
25
- if (null == t || !R(t)) return null;
25
+ if (null == t || !g(t)) return null;
26
26
  const r = [];
27
27
  for (let e = 0; e < t.length; e++) {
28
28
  const o = [],
29
29
  s = t[e];
30
- for (let t = 0; t < s.length; t++) o.push(cr.fromJson(s[t]));
30
+ for (let t = 0; t < s.length; t++) o.push(hr.fromJson(s[t]));
31
31
  r.push(o);
32
32
  }
33
- return new is(r);
33
+ return new ls(r);
34
34
  }
35
- gt() {
35
+ qt() {
36
36
  const t = [];
37
37
  for (let r = 0; r < this.filters.length; r++) {
38
38
  const e = this.filters[r],
39
39
  o = [];
40
- for (let t = 0; t < e.length; t++) o.push(e[t].gt());
40
+ for (let t = 0; t < e.length; t++) o.push(e[t].qt());
41
41
  t.push(o);
42
42
  }
43
43
  return t;
@@ -47,9 +47,9 @@ export default class is {
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(cr._u(s[t]));
50
+ for (let t = 0; t < s.length; t++) o.push(hr._u(s[t]));
51
51
  r.push(o);
52
52
  }
53
- return new is(r);
53
+ return new ls(r);
54
54
  }
55
55
  }