@braze/web-sdk 5.6.1 → 5.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 (121) hide show
  1. package/README.md +1 -1
  2. package/index.d.ts +14 -4
  3. package/package.json +1 -1
  4. package/shared-lib/encoding-utils.js +1 -1
  5. package/shared-lib/event-types.js +20 -20
  6. package/shared-lib/indexed-db-adapter.js +15 -15
  7. package/shared-lib/logger.js +2 -2
  8. package/shared-lib/supported-options.js +14 -14
  9. package/src/Banner/banner-provider.js +53 -50
  10. package/src/Banner/banner.js +1 -1
  11. package/src/Banner/get-all-banners.js +2 -2
  12. package/src/Banner/get-banner.js +2 -2
  13. package/src/Banner/log-banner-click.js +1 -1
  14. package/src/Banner/log-banner-impressions.js +4 -4
  15. package/src/Banner/request-banners-refresh.js +2 -2
  16. package/src/Banner/subscribe-to-banners-updates.js +5 -5
  17. package/src/Card/card-manager.js +10 -10
  18. package/src/Card/models/captioned-image.js +1 -1
  19. package/src/Card/models/card.js +3 -3
  20. package/src/Card/models/classic-card.js +1 -1
  21. package/src/Card/models/control-card.js +1 -1
  22. package/src/Card/models/image-only.js +1 -1
  23. package/src/ContentCards/content-cards-provider.js +139 -180
  24. package/src/ContentCards/get-cached-content-cards.js +1 -1
  25. package/src/ContentCards/request-content-cards-refresh.js +1 -1
  26. package/src/ContentCards/subscribe-to-content-cards-updates.js +10 -10
  27. package/src/ContentCards/ui/show-content-cards.js +3 -3
  28. package/src/Core/disable-sdk.js +3 -3
  29. package/src/Core/enable-sdk.js +3 -3
  30. package/src/Core/log-custom-event.js +3 -3
  31. package/src/Core/log-purchase.js +1 -1
  32. package/src/Core/open-session.js +6 -6
  33. package/src/Core/wipe-data.js +4 -4
  34. package/src/FeatureFlags/feature-flag.js +1 -1
  35. package/src/FeatureFlags/feature-flags-provider.js +81 -78
  36. package/src/FeatureFlags/get-all-feature-flags.js +2 -2
  37. package/src/FeatureFlags/get-feature-flag.js +2 -2
  38. package/src/FeatureFlags/log-feature-flag-impression.js +4 -4
  39. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +2 -2
  40. package/src/Feed/feed-provider.js +34 -34
  41. package/src/Feed/get-cached-feed.js +1 -1
  42. package/src/Feed/request-feed-refresh.js +1 -1
  43. package/src/Feed/subscribe-to-feed-updates.js +1 -1
  44. package/src/Feed/ui/show-feed.js +1 -1
  45. package/src/InAppMessage/defer-in-app-message.js +1 -1
  46. package/src/InAppMessage/display/html-message-to-html.js +9 -9
  47. package/src/InAppMessage/display/in-app-message-to-html.js +16 -16
  48. package/src/InAppMessage/display/modal-utils.js +5 -5
  49. package/src/InAppMessage/in-app-message-factory.js +4 -4
  50. package/src/InAppMessage/in-app-message-manager.js +115 -91
  51. package/src/InAppMessage/log-in-app-message-button-click.js +2 -2
  52. package/src/InAppMessage/log-in-app-message-click.js +2 -2
  53. package/src/InAppMessage/log-in-app-message-html-click.js +4 -4
  54. package/src/InAppMessage/log-in-app-message-impression.js +2 -2
  55. package/src/InAppMessage/models/full-screen-message.js +5 -5
  56. package/src/InAppMessage/models/html-message.js +10 -10
  57. package/src/InAppMessage/models/in-app-message-button.js +5 -5
  58. package/src/InAppMessage/models/in-app-message.js +37 -37
  59. package/src/InAppMessage/models/modal-message.js +5 -5
  60. package/src/InAppMessage/models/slide-up-message.js +7 -7
  61. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  62. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  63. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  64. package/src/InAppMessage/ui/show-in-app-message.js +14 -14
  65. package/src/Push/is-push-blocked.js +2 -2
  66. package/src/Push/is-push-permission-granted.js +2 -2
  67. package/src/Push/is-push-supported.js +2 -2
  68. package/src/Push/push-manager.js +88 -88
  69. package/src/Push/utils/push-utils.js +12 -12
  70. package/src/User/user-manager.js +10 -10
  71. package/src/User/user.js +46 -34
  72. package/src/common/constants.js +1 -1
  73. package/src/common/event-logger.js +3 -3
  74. package/src/common/feed-display.js +10 -10
  75. package/src/l10n/l10n-manager.js +1 -1
  76. package/src/managers/auth-manager.js +10 -10
  77. package/src/managers/braze-instance.js +110 -110
  78. package/src/managers/device-manager.js +17 -17
  79. package/src/managers/network-manager.js +180 -143
  80. package/src/managers/server-config-manager.js +65 -65
  81. package/src/managers/session-manager.js +22 -22
  82. package/src/managers/storage-manager-factory.js +9 -9
  83. package/src/managers/storage-manager.js +134 -134
  84. package/src/managers/subscription-manager.js +8 -8
  85. package/src/managers/utils.js +1 -1
  86. package/src/models/backend-errors.js +5 -5
  87. package/src/models/braze-event.js +8 -8
  88. package/src/models/device.js +2 -2
  89. package/src/models/identifier.js +10 -10
  90. package/src/models/push-token.js +8 -8
  91. package/src/models/server-config.js +31 -31
  92. package/src/request-controller.js +158 -146
  93. package/src/triggers/models/custom-event-data.js +5 -5
  94. package/src/triggers/models/custom-event-property-data.js +6 -6
  95. package/src/triggers/models/filter-set.js +6 -6
  96. package/src/triggers/models/filter.js +16 -16
  97. package/src/triggers/models/in-app-message-click-data.js +2 -2
  98. package/src/triggers/models/purchase-data.js +2 -2
  99. package/src/triggers/models/purchase-property-data.js +4 -4
  100. package/src/triggers/models/push-click-data.js +2 -2
  101. package/src/triggers/models/trigger-condition.js +36 -36
  102. package/src/triggers/models/trigger-events.js +1 -1
  103. package/src/triggers/models/trigger.js +11 -11
  104. package/src/triggers/triggers-provider-factory.js +2 -2
  105. package/src/triggers/triggers-provider.js +37 -37
  106. package/src/ui/js/attach-css.js +1 -1
  107. package/src/ui/js/iam-css.js +1 -1
  108. package/src/ui/js/load-font-awesome.js +1 -1
  109. package/src/util/base-device-parser.js +1 -1
  110. package/src/util/braze-actions.js +4 -4
  111. package/src/util/browser-detector.js +6 -6
  112. package/src/util/client-hints-parser.js +1 -1
  113. package/src/util/component-utils.js +2 -2
  114. package/src/util/dom-utils.js +3 -3
  115. package/src/util/html-display-utils.js +1 -0
  116. package/src/util/key-codes.js +1 -1
  117. package/src/util/net.js +22 -23
  118. package/src/util/request-header-utils.js +23 -20
  119. package/src/util/user-agent-parser.js +1 -1
  120. package/src/util/validation-utils.js +14 -14
  121. package/src/util/window-utils.js +2 -2
package/README.md CHANGED
@@ -8,5 +8,5 @@ Note: The Braze Web SDK is meant to be used client-side in a web application and
8
8
 
9
9
  See the [Public Github Repo](https://github.com/braze-inc/braze-web-sdk#readme) for getting started instructions or [our documentation pages](https://www.braze.com/docs/developer_guide/platform_integration_guides/web/initial_sdk_setup/) for use-case based documentation.
10
10
 
11
- (c) Braze, Inc. 2024 - http://braze.com
11
+ (c) Braze, Inc. 2025 - http://braze.com
12
12
  License available at https://github.com/braze-inc/braze-web-sdk/blob/master/LICENSE
package/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
- * Type definitions for @braze/web-sdk v5.6.1
2
+ * Type definitions for @braze/web-sdk v5.7.0
3
3
  * Project: https://github.com/braze-inc/braze-web-sdk
4
- * (c) Braze, Inc. 2024 - http://braze.com
4
+ * (c) Braze, Inc. 2025 - http://braze.com
5
5
  * License available at https://github.com/braze-inc/braze-web-sdk/blob/master/LICENSE
6
6
  */
7
7
 
@@ -1442,6 +1442,16 @@ export class User {
1442
1442
  setPushNotificationSubscriptionType(
1443
1443
  notificationSubscriptionType: NotificationSubscriptionTypes,
1444
1444
  ): boolean;
1445
+
1446
+ /**
1447
+ * Sets the LINE user ID for the user.
1448
+ *
1449
+ * @param lineId - Must be a non-empty string no greater than 33 characters in length.
1450
+ * Accepts an explicit null value to null out attribute.
1451
+ *
1452
+ * @returns Whether the update was successfully enqueued.
1453
+ */
1454
+ setLineId(lineId: string | null): boolean;
1445
1455
  }
1446
1456
 
1447
1457
  export class InAppMessageButton {
@@ -2152,7 +2162,7 @@ export function openSession(): void;
2152
2162
  * - Create a `service-worker.js` file with the content below and place it in the root directory of your website:
2153
2163
  *
2154
2164
  * ```
2155
- * self.importScripts('https://js.appboycdn.com/web-sdk-develop/5.6/service-worker.js');
2165
+ * self.importScripts('https://js.appboycdn.com/web-sdk-develop/5.7/service-worker.js');
2156
2166
  * ```
2157
2167
  *
2158
2168
  * For more details, see [Our Product Documentation](https://www.braze.com/docs/developer_guide/platform_integration_guides/web/push_notifications/integration).
@@ -2620,7 +2630,7 @@ export type InitializationOptions = {
2620
2630
  * lifecycle of, set this option to true and the Braze SDK will not register or unregister a service worker. If you set this
2621
2631
  * option to true, in order for push to function correctly you must register the service worker yourself BEFORE calling
2622
2632
  * `requestPushPermission`, and ensure that it contains Braze's service worker code, either with
2623
- * `self.importScripts('https://js.appboycdn.com/web-sdk-develop/5.6/service-worker.js');` or by including the content
2633
+ * `self.importScripts('https://js.appboycdn.com/web-sdk-develop/5.7/service-worker.js');` or by including the content
2624
2634
  * of that file directly. When this option is true, the `serviceWorkerLocation` option is irrelevant and is ignored.
2625
2635
  */
2626
2636
  manageServiceWorkerExternally?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@braze/web-sdk",
3
- "version": "5.6.1",
3
+ "version": "5.7.0",
4
4
  "description": "Braze SDK for web sites and other JS platforms.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -1,5 +1,5 @@
1
1
  const ei = {
2
- Jn: function (t) {
2
+ On: function (t) {
3
3
  const r = (t + "=".repeat((4 - (t.length % 4)) % 4))
4
4
  .replace(/\-/g, "+")
5
5
  .replace(/_/g, "/"),
@@ -1,36 +1,36 @@
1
1
  const d = {
2
2
  CustomEvent: "ce",
3
3
  Pr: "p",
4
- mc: "pc",
5
- Cc: "ca",
4
+ gc: "pc",
5
+ Ac: "ca",
6
6
  Mu: "i",
7
- Li: "ie",
7
+ Tu: "ie",
8
8
  xt: "cci",
9
9
  $t: "ccic",
10
10
  lt: "ccc",
11
11
  dt: "ccd",
12
- Jl: "ss",
12
+ Kl: "ss",
13
13
  Gl: "se",
14
- Nr: "si",
15
- Cr: "sc",
16
- Or: "sbc",
17
- yc: "sfe",
14
+ Ir: "si",
15
+ Mr: "sc",
16
+ Tr: "sbc",
17
+ Mc: "sfe",
18
18
  zo: "iec",
19
- dc: "lr",
20
- cc: "uae",
19
+ fc: "lr",
20
+ mc: "uae",
21
21
  yt: "ci",
22
22
  ut: "cc",
23
- vc: "lcaa",
24
- gc: "lcar",
25
- fu: "inc",
26
- pu: "add",
27
- bu: "rem",
28
- au: "set",
29
- du: "ncam",
30
- bc: "sgu",
23
+ wc: "lcaa",
24
+ bc: "lcar",
25
+ Xn: "inc",
26
+ Jn: "add",
27
+ Qn: "rem",
28
+ Hn: "set",
29
+ Kn: "ncam",
30
+ kc: "sgu",
31
31
  yr: "ffi",
32
32
  ro: "bi",
33
- fs: "bc",
33
+ ds: "bc",
34
34
  },
35
- dr = { Fr: "feed_displayed", Mc: "content_cards_displayed" };
35
+ dr = { Fr: "feed_displayed", Sc: "content_cards_displayed" };
36
36
  export { d as EventTypes, dr as InternalEventTypes };
@@ -1,4 +1,4 @@
1
- export default class it {
1
+ export default class tt {
2
2
  constructor(t, e) {
3
3
  (this.database = t),
4
4
  (this.vd = e),
@@ -64,11 +64,11 @@ export default class it {
64
64
  "...",
65
65
  );
66
66
  const n = null === (e = t.target) || void 0 === e ? void 0 : e.result;
67
- for (const t in i.database.Os) {
67
+ for (const t in i.database.Ks) {
68
68
  const e = t;
69
- i.database.Os.hasOwnProperty(t) &&
70
- !n.objectStoreNames.contains(i.database.Os[e]) &&
71
- n.createObjectStore(i.database.Os[e]);
69
+ i.database.Ks.hasOwnProperty(t) &&
70
+ !n.objectStoreNames.contains(i.database.Ks[e]) &&
71
+ n.createObjectStore(i.database.Ks[e]);
72
72
  }
73
73
  }),
74
74
  (o.onsuccess = (n) => {
@@ -249,7 +249,7 @@ export default class it {
249
249
  };
250
250
  });
251
251
  }
252
- Hs(t, e) {
252
+ Gs(t, e) {
253
253
  if (!this.isSupported()) return !1;
254
254
  const n = this;
255
255
  return this.Bd((o) => {
@@ -304,11 +304,11 @@ export default class it {
304
304
  clearData() {
305
305
  if (!this.isSupported()) return !1;
306
306
  const t = [];
307
- for (const e in this.database.Os) {
307
+ for (const e in this.database.Ks) {
308
308
  const n = e;
309
- this.database.Os.hasOwnProperty(e) &&
310
- this.database.Os[n] !== this.database.Os.ie &&
311
- t.push(this.database.Os[n]);
309
+ this.database.Ks.hasOwnProperty(e) &&
310
+ this.database.Ks[n] !== this.database.Ks.ie &&
311
+ t.push(this.database.Ks[n]);
312
312
  }
313
313
  const e = this;
314
314
  return this.Bd(function (n) {
@@ -333,16 +333,16 @@ export default class it {
333
333
  });
334
334
  }
335
335
  }
336
- it.Gs = {
337
- _s: {
336
+ tt._s = {
337
+ Xs: {
338
338
  Sd: "AppboyServiceWorkerAsyncStorage",
339
339
  VERSION: 6,
340
- Os: {
341
- Xu: "data",
340
+ Ks: {
341
+ zu: "data",
342
342
  hr: "pushClicks",
343
343
  cu: "pushSubscribed",
344
344
  Cd: "fallbackDevice",
345
- Ks: "cardUpdates",
345
+ Hs: "cardUpdates",
346
346
  ie: "optOut",
347
347
  $r: "pendingData",
348
348
  yh: "sdkAuthenticationSignature",
@@ -24,13 +24,13 @@ const N = {
24
24
  },
25
25
  warn: function (n) {
26
26
  if (N.zg) {
27
- const o = "Braze SDK Warning: " + n + " (v5.6.1)";
27
+ const o = "Braze SDK Warning: " + n + " (v5.7.0)";
28
28
  null != N.vd ? N.vd(o) : console.warn(o);
29
29
  }
30
30
  },
31
31
  error: function (n) {
32
32
  if (N.zg) {
33
- const o = "Braze SDK Error: " + n + " (v5.6.1)";
33
+ const o = "Braze SDK Error: " + n + " (v5.7.0)";
34
34
  null != N.vd ? N.vd(o) : console.error(o);
35
35
  }
36
36
  },
@@ -1,28 +1,28 @@
1
1
  export default {
2
2
  Oo: "allowCrawlerActivity",
3
- Ro: "baseUrl",
4
- Lo: "noCookies",
5
- Wo: "devicePropertyAllowlist",
3
+ Wo: "baseUrl",
4
+ Vo: "noCookies",
5
+ Ko: "devicePropertyAllowlist",
6
6
  Da: "disablePushTokenMaintenance",
7
- Vo: "enableLogging",
8
- Ko: "enableSdkAuthentication",
7
+ Yo: "enableLogging",
8
+ Ho: "enableSdkAuthentication",
9
9
  Ca: "manageServiceWorkerExternally",
10
- Go: "minimumIntervalBetweenTriggerActionsInSeconds",
11
- Yo: "sessionTimeoutInSeconds",
12
- Ho: "appVersion",
13
- Xo: "appVersionNumber",
10
+ Xo: "minimumIntervalBetweenTriggerActionsInSeconds",
11
+ Zo: "sessionTimeoutInSeconds",
12
+ Qo: "appVersion",
13
+ Wh: "appVersionNumber",
14
14
  _a: "serviceWorkerLocation",
15
15
  Ba: "safariWebsitePushId",
16
16
  Ea: "localization",
17
17
  ir: "contentSecurityNonce",
18
18
  er: "allowUserSuppliedJavascript",
19
- Jo: "inAppMessageZIndex",
20
- Do: "openInAppMessagesInNewTab",
19
+ Do: "inAppMessageZIndex",
20
+ To: "openInAppMessagesInNewTab",
21
21
  en: "openNewsFeedCardsInNewTab",
22
22
  mh: "requireExplicitInAppMessageDismissal",
23
- Zo: "doNotLoadFontAwesome",
24
- Qo: "deviceId",
23
+ Vh: "doNotLoadFontAwesome",
24
+ $h: "deviceId",
25
25
  Aa: "serviceWorkerScope",
26
- Wh: "sdkFlavor",
26
+ Yh: "sdkFlavor",
27
27
  tn: "openCardsInNewTab",
28
28
  };
@@ -68,33 +68,40 @@ export default class e extends s {
68
68
  let m = !1;
69
69
  o.V(
70
70
  u,
71
- (n = -1) => {
72
- if (!this.S) return void r();
71
+ (e = -1) => {
72
+ const n = this.S;
73
+ if (!n) return void r();
73
74
  const o = new Date().valueOf();
74
75
  h.W(this.C, h.O.K, o),
75
- -1 !== n && d.push(["X-Braze-Req-Tokens-Remaining", n.toString()]),
76
+ -1 !== e && d.push(["X-Braze-Req-Tokens-Remaining", e.toString()]),
76
77
  l.Y({
77
- url: `${this.S.Z()}/banners/sync`,
78
+ url: `${n.Z()}/banners/sync`,
78
79
  headers: d,
79
80
  data: u,
80
81
  ss: (s) => {
81
- if (!this.S.ts(u, s, d)) return (m = !0), void r();
82
- this.S.es(),
83
- this.U(s),
84
- (m = !1),
85
- h.ns(this.C, h.O.K, 1),
86
- "function" == typeof t && t();
82
+ if (!n.ts(u, s, d)) return (m = !0), void r();
83
+ n.es(), this.U(s), (m = !1), "function" == typeof t && t();
87
84
  },
88
85
  error: (s) => {
89
- this.S.rs(s, "retrieving banners"), (m = !0), r();
86
+ n.ns(s, "retrieving banners"), (m = !0), r();
90
87
  },
91
- os: () => {
92
- if (((this.D = s), e && m && !this.q)) {
93
- h.hs(this.C, h.O.K);
94
- let e = this.I;
95
- (null == e || e < 1e3 * this.R) && (e = 1e3 * this.R),
96
- this.ls(s, t, i, Math.min(3e5, a(1e3 * this.R, 3 * e)));
88
+ rs: (e, r) => {
89
+ let o;
90
+ if (((this.D = s), m)) {
91
+ let s = this.I;
92
+ (null == s || s < 1e3 * this.R) && (s = 1e3 * this.R),
93
+ (o = Math.min(3e5, a(1e3 * this.R, 3 * s)));
97
94
  }
95
+ n.os(
96
+ r,
97
+ () => {
98
+ this.$(s, t, i, !1);
99
+ },
100
+ h.O.K,
101
+ (s) => this.hs(s),
102
+ () => this.G(),
103
+ o,
104
+ );
98
105
  },
99
106
  });
100
107
  },
@@ -102,27 +109,23 @@ export default class e extends s {
102
109
  i,
103
110
  );
104
111
  }
105
- us() {
112
+ ls() {
106
113
  return this.D;
107
114
  }
108
- cs(s, t) {
115
+ us(s, t) {
109
116
  const i = { id: s.id };
110
117
  t && (i.bid = t);
111
- return c.ds(d.fs, i).ss;
118
+ return c.cs(d.ds, i).ss;
112
119
  }
113
120
  G() {
114
121
  null != this.q && (clearTimeout(this.q), (this.q = null));
115
122
  }
116
- ls(s, t, i, e = 1e3 * this.R) {
117
- this.G(),
118
- (this.q = window.setTimeout(() => {
119
- this.$(s, t, i);
120
- }, e)),
121
- (this.I = e);
123
+ hs(s) {
124
+ this.G(), (this.q = s);
122
125
  }
123
- vs() {
126
+ fs() {
124
127
  let s = {};
125
- this.C && (s = this.C.ps(t.bs.gs));
128
+ this.C && (s = this.C.vs(t.gs.ps));
126
129
  const i = {};
127
130
  for (const t in s) {
128
131
  let e = null;
@@ -136,63 +139,63 @@ export default class e extends s {
136
139
  const i = {};
137
140
  for (const t in this.banners) {
138
141
  const e =
139
- (null === (s = this.banners[t]) || void 0 === s ? void 0 : s.Bs()) ||
142
+ (null === (s = this.banners[t]) || void 0 === s ? void 0 : s.bs()) ||
140
143
  null;
141
144
  i[t] = e;
142
145
  }
143
- this.C.js(t.bs.gs, i), this.ws();
146
+ this.C.Bs(t.gs.ps, i), this.js();
144
147
  }
145
- ws() {
148
+ js() {
146
149
  var s, i;
147
150
  null === (s = this.C) ||
148
151
  void 0 === s ||
149
- s.js(t.bs.ys, null === (i = this.T) || void 0 === i ? void 0 : i.Ss());
152
+ s.Bs(t.gs.ys, null === (i = this.T) || void 0 === i ? void 0 : i.Ss());
150
153
  }
151
- Cs() {
154
+ ws() {
152
155
  var s;
153
156
  return (
154
- (null === (s = this.C) || void 0 === s ? void 0 : s.ps(t.bs.ys)) || null
157
+ (null === (s = this.C) || void 0 === s ? void 0 : s.vs(t.gs.ys)) || null
155
158
  );
156
159
  }
157
- Ts() {
160
+ Cs() {
158
161
  return this.k;
159
162
  }
160
- Rs(s) {
163
+ Ts(s) {
161
164
  this.k = s;
162
165
  }
163
- Is() {
166
+ Rs() {
164
167
  var s;
165
168
  const t = null === (s = this.T) || void 0 === s ? void 0 : s.Ss(),
166
- i = this.Cs();
169
+ i = this.ws();
167
170
  return null != i && t === i;
168
171
  }
169
- qs() {
172
+ Is() {
170
173
  var s;
171
174
  const t = null === (s = this.T) || void 0 === s ? void 0 : s.Ss(),
172
- i = this.Cs();
175
+ i = this.ws();
173
176
  return null == i || t === i;
174
177
  }
175
- Fs(s) {
176
- return this.F.Ns(s);
178
+ qs(s) {
179
+ return this.F.Fs(s);
177
180
  }
178
- ks() {
181
+ Ns() {
179
182
  var s;
180
183
  return (
181
- (null === (s = this.C) || void 0 === s ? void 0 : s.ps(t.bs.xs)) || {}
184
+ (null === (s = this.C) || void 0 === s ? void 0 : s.vs(t.gs.ks)) || {}
182
185
  );
183
186
  }
184
- zs(s) {
185
- this.C && this.C.js(t.bs.xs, s);
187
+ xs(s) {
188
+ this.C && this.C.Bs(t.gs.ks, s);
186
189
  }
187
190
  changeUser() {
188
- this.Ds();
191
+ this.zs();
189
192
  }
190
193
  L() {
191
- return !!this.B && (!!this.B.Us() || (0 !== this.B.Es() && this.Ds(), !1));
194
+ return !!this.B && (!!this.B.Ds() || (0 !== this.B.Us() && this.zs(), !1));
192
195
  }
193
- Ds() {
196
+ zs() {
194
197
  (this.banners = {}),
195
- this.C && (this.C.Ls(t.bs.gs), this.C.Ls(t.bs.xs)),
198
+ this.C && (this.C.Es(t.gs.ps), this.C.Es(t.gs.ks)),
196
199
  this.F.X({});
197
200
  }
198
201
  }
@@ -17,7 +17,7 @@ export default class Banner {
17
17
  ht() {
18
18
  return this.isControl;
19
19
  }
20
- Bs() {
20
+ bs() {
21
21
  return {
22
22
  id: this.id,
23
23
  o: this.placementId,
@@ -6,8 +6,8 @@ export function getAllBanners() {
6
6
  if (!r.rr()) return;
7
7
  const n = {},
8
8
  e = r.v();
9
- if (e && !e.Us()) return N.info("Banners are not enabled."), n;
10
- const o = i.m().vs();
9
+ if (e && !e.Ds()) return N.info("Banners are not enabled."), n;
10
+ const o = i.m().fs();
11
11
  for (const r in o) n[r] = v(o, r);
12
12
  return n;
13
13
  }
@@ -14,6 +14,6 @@ export function getBannerIfNotExpired(n, e) {
14
14
  export function getBanner(n) {
15
15
  if (!r.rr()) return;
16
16
  const e = r.v();
17
- if (e && !e.Us()) return N.info("Banners are not enabled."), null;
18
- return getBannerIfNotExpired(i.m().vs(), n);
17
+ if (e && !e.Ds()) return N.info("Banners are not enabled."), null;
18
+ return getBannerIfNotExpired(i.m().fs(), n);
19
19
  }
@@ -10,7 +10,7 @@ export function logBannerClick(n, o) {
10
10
  N.error("Banner argument to logBannerClick must be an Banner object."), !1
11
11
  );
12
12
  const e = i.m(),
13
- t = e.vs();
13
+ t = e.fs();
14
14
  return 0 === y(t).length
15
15
  ? (N.info("Not logging banner click. No banners exist."), !1)
16
16
  : t[n.placementId]
@@ -7,10 +7,10 @@ export function logBannerImpressions(o) {
7
7
  if (!r.rr()) return;
8
8
  if (!o || o.length <= 0) return !1;
9
9
  const n = i.m(),
10
- s = n.vs();
10
+ s = n.fs();
11
11
  if (0 === y(s).length)
12
12
  return N.info("Not logging banners impression. No banners exist."), !1;
13
- const e = n.ks(),
13
+ const e = n.Ns(),
14
14
  t = [];
15
15
  for (const r of o) {
16
16
  const o = s[r];
@@ -25,7 +25,7 @@ export function logBannerImpressions(o) {
25
25
  );
26
26
  }
27
27
  if (0 === t.length) return !1;
28
- n.zs(e);
28
+ n.xs(e);
29
29
  const a = { ids: t };
30
- return c.ds(d.ro, a).ss;
30
+ return c.cs(d.ro, a).ss;
31
31
  }
@@ -8,10 +8,10 @@ export function requestBannersRefresh(e, n, o) {
8
8
  if (!r.rr()) return void N.warn(p);
9
9
  const t = r.v();
10
10
  if (!t) return void N.warn(p);
11
- if (!t.Us()) return void N.info("Banners are not enabled.");
11
+ if (!t.Ds()) return void N.info("Banners are not enabled.");
12
12
  if (!w(e) || 0 === e.length)
13
13
  return void N.warn("placementIds should be a non-empty array.");
14
- if (i.m().Is())
14
+ if (i.m().Rs())
15
15
  return void N.warn(
16
16
  "Banners can be refreshed only once per session per user.",
17
17
  );
@@ -4,19 +4,19 @@ import { getAllBanners } from "./get-all-banners.js";
4
4
  export function subscribeToBannersUpdates(n) {
5
5
  if (!r.rr()) return;
6
6
  const o = i.m();
7
- if (o.qs()) {
7
+ if (o.Is()) {
8
8
  const r = getAllBanners();
9
9
  r && "function" == typeof n && n(r);
10
10
  }
11
- const t = o.Fs(n);
12
- if (!o.Ts()) {
11
+ const t = o.qs(n);
12
+ if (!o.Cs()) {
13
13
  const n = r.nn();
14
14
  if (n) {
15
15
  const r = n.rn(() => {
16
- const n = o.us();
16
+ const n = o.ls();
17
17
  n && n.length > 0 && o.$(n);
18
18
  });
19
- r && o.Rs(r);
19
+ r && o.Ts(r);
20
20
  }
21
21
  }
22
22
  return t;
@@ -15,13 +15,13 @@ export default class M {
15
15
  r
16
16
  );
17
17
  if (n && s.id && this.C) {
18
- const n = this.C.ps(t.bs.ot) || {};
19
- (n[s.id] = !0), this.C.js(t.bs.ot, n);
18
+ const n = this.C.vs(t.gs.ot) || {};
19
+ (n[s.id] = !0), this.C.Bs(t.gs.ot, n);
20
20
  }
21
21
  const i = this.et([s]);
22
22
  if (null == i) return r;
23
23
  const o = n ? d.lt : d.ut;
24
- return c.ds(o, i);
24
+ return c.cs(o, i);
25
25
  }
26
26
  ct(s) {
27
27
  const n = new E();
@@ -33,18 +33,18 @@ export default class M {
33
33
  n
34
34
  );
35
35
  if (s.id && this.C) {
36
- const n = this.C.ps(t.bs.gt) || {};
37
- (n[s.id] = !0), this.C.js(t.bs.gt, n);
36
+ const n = this.C.vs(t.gs.gt) || {};
37
+ (n[s.id] = !0), this.C.Bs(t.gs.gt, n);
38
38
  }
39
39
  const r = this.et([s]);
40
- return null == r ? n : c.ds(d.dt, r);
40
+ return null == r ? n : c.cs(d.dt, r);
41
41
  }
42
42
  jt(s, n) {
43
43
  const r = new E(!0),
44
44
  i = [],
45
45
  o = [];
46
46
  let e = {};
47
- this.C && (e = n ? this.C.ps(t.bs.vt) || {} : this.C.ps(t.bs.Ct) || {});
47
+ this.C && (e = n ? this.C.vs(t.gs.vt) || {} : this.C.vs(t.gs.Ct) || {});
48
48
  for (const t of s) {
49
49
  t.wt()
50
50
  ? (t instanceof ControlCard ? o.push(t) : i.push(t),
@@ -57,14 +57,14 @@ export default class M {
57
57
  a = this.et(o);
58
58
  if (null == l && null == a) return (r.ss = !1), r;
59
59
  if (
60
- (this.C && (n ? this.C.js(t.bs.vt, e) : this.C.js(t.bs.Ct, e)), null != l)
60
+ (this.C && (n ? this.C.Bs(t.gs.vt, e) : this.C.Bs(t.gs.Ct, e)), null != l)
61
61
  ) {
62
62
  const t = n ? d.xt : d.yt,
63
- s = c.ds(t, l);
63
+ s = c.cs(t, l);
64
64
  r.It(s);
65
65
  }
66
66
  if (null != a && n) {
67
- const t = c.ds(d.$t, a);
67
+ const t = c.cs(d.$t, a);
68
68
  r.It(t);
69
69
  }
70
70
  return r;
@@ -6,7 +6,7 @@ export default class CaptionedImage extends Card {
6
6
  (this.Tt = !0),
7
7
  (this.test = !1);
8
8
  }
9
- Bs() {
9
+ bs() {
10
10
  const t = {};
11
11
  return (
12
12
  (t[Card.qt.zt] = Card.Dt.Bt),
@@ -50,10 +50,10 @@ export default class Card {
50
50
  (this.Zt = null);
51
51
  }
52
52
  subscribeToClickedEvent(t) {
53
- return this.ti().Ns(t);
53
+ return this.ti().Fs(t);
54
54
  }
55
55
  subscribeToDismissedEvent(t) {
56
- return this.ii().Ns(t);
56
+ return this.ii().Fs(t);
57
57
  }
58
58
  removeSubscription(t) {
59
59
  this.ti().removeSubscription(t), this.ii().removeSubscription(t);
@@ -142,7 +142,7 @@ export default class Card {
142
142
  !0
143
143
  );
144
144
  }
145
- Bs() {
145
+ bs() {
146
146
  N.error("Must be implemented in a subclass");
147
147
  }
148
148
  }
@@ -5,7 +5,7 @@ export default class ClassicCard extends Card {
5
5
  (this.At = "ab-classic-card"),
6
6
  (this.Tt = !0);
7
7
  }
8
- Bs() {
8
+ bs() {
9
9
  const s = {};
10
10
  return (
11
11
  (s[Card.qt.zt] = Card.Dt.Ei),
@@ -6,7 +6,7 @@ export default class ControlCard extends Card {
6
6
  (this.At = "ab-control-card"),
7
7
  (this.Tt = !1);
8
8
  }
9
- Bs() {
9
+ bs() {
10
10
  const l = {};
11
11
  return (
12
12
  (l[Card.qt.zt] = Card.Dt.Ti),
@@ -6,7 +6,7 @@ export default class ImageOnly extends Card {
6
6
  (this.Tt = !1),
7
7
  (this.test = !1);
8
8
  }
9
- Bs() {
9
+ bs() {
10
10
  const s = {};
11
11
  return (
12
12
  (s[Card.qt.zt] = Card.Dt.oi),