@braze/web-sdk 6.8.0 → 6.9.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 (137) hide show
  1. package/index.d.ts +99 -19
  2. package/package.json +1 -1
  3. package/shared-lib/event-types.js +20 -20
  4. package/shared-lib/indexed-db-adapter.js +64 -64
  5. package/shared-lib/logger.js +18 -18
  6. package/shared-lib/supported-options.js +8 -8
  7. package/src/Banner/banner-provider.js +67 -59
  8. package/src/Banner/banner.js +40 -19
  9. package/src/Banner/dismiss-banner.js +4 -0
  10. package/src/Banner/display/banner-to-html.js +10 -10
  11. package/src/Banner/display/destroy-banner-html.js +2 -2
  12. package/src/Banner/get-all-banners.js +6 -6
  13. package/src/Banner/get-banner.js +6 -6
  14. package/src/Banner/index.js +1 -0
  15. package/src/Banner/log-banner-click.js +7 -7
  16. package/src/Banner/log-banner-dismissal.js +7 -7
  17. package/src/Banner/log-banner-impressions.js +10 -10
  18. package/src/Banner/request-banners-refresh.js +8 -8
  19. package/src/Banner/subscribe-to-banners-updates.js +5 -5
  20. package/src/Banner/ui/insert-banner.js +8 -8
  21. package/src/Card/card-manager.js +31 -31
  22. package/src/Card/log-card-dismissal.js +2 -2
  23. package/src/Card/log-content-card-click.js +2 -2
  24. package/src/Card/log-content-card-impressions.js +4 -4
  25. package/src/Card/models/captioned-image.js +15 -15
  26. package/src/Card/models/card.js +89 -89
  27. package/src/Card/models/classic-card.js +16 -16
  28. package/src/Card/models/control-card.js +7 -7
  29. package/src/Card/models/image-only.js +13 -13
  30. package/src/Card/util/card-factory.js +32 -32
  31. package/src/ContentCards/content-cards-provider.js +102 -102
  32. package/src/ContentCards/get-cached-content-cards.js +1 -1
  33. package/src/ContentCards/subscribe-to-content-cards-updates.js +3 -3
  34. package/src/ContentCards/ui/show-content-cards.js +5 -5
  35. package/src/Core/add-sdk-metadata.js +2 -2
  36. package/src/Core/change-user.js +3 -3
  37. package/src/Core/destroy.js +2 -2
  38. package/src/Core/disable-sdk.js +4 -4
  39. package/src/Core/enable-sdk.js +4 -4
  40. package/src/Core/get-device-id.js +2 -2
  41. package/src/Core/handle-braze-action.js +5 -5
  42. package/src/Core/log-custom-event.js +5 -5
  43. package/src/Core/log-ecommerce-event.js +5 -5
  44. package/src/Core/log-purchase.js +9 -9
  45. package/src/Core/open-session.js +7 -7
  46. package/src/Core/set-logger.js +2 -2
  47. package/src/Core/toggle-logging.js +2 -2
  48. package/src/Core/wipe-data.js +6 -6
  49. package/src/DUST/dust-provider.js +249 -240
  50. package/src/DUST/dust-shared-worker-code.js +1 -1
  51. package/src/DUST/dust-shared-worker-impl.js +15 -14
  52. package/src/DUST/dust-worker-bridge.js +50 -35
  53. package/src/DUST/subscribe-to-dust.js +7 -7
  54. package/src/FeatureFlags/feature-flag-factory.js +8 -8
  55. package/src/FeatureFlags/feature-flag.js +3 -3
  56. package/src/FeatureFlags/feature-flags-provider.js +21 -21
  57. package/src/FeatureFlags/log-feature-flag-impression.js +5 -5
  58. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +1 -1
  59. package/src/InAppMessage/constants.js +3 -3
  60. package/src/InAppMessage/defer-in-app-message.js +4 -4
  61. package/src/InAppMessage/display/html-message-to-html.js +4 -4
  62. package/src/InAppMessage/display/in-app-message-to-html.js +16 -16
  63. package/src/InAppMessage/in-app-message-factory.js +36 -36
  64. package/src/InAppMessage/in-app-message-manager.js +78 -78
  65. package/src/InAppMessage/log-in-app-message-button-click.js +4 -4
  66. package/src/InAppMessage/log-in-app-message-click.js +3 -3
  67. package/src/InAppMessage/log-in-app-message-html-click.js +5 -5
  68. package/src/InAppMessage/log-in-app-message-impression.js +4 -4
  69. package/src/InAppMessage/models/control-message.js +4 -4
  70. package/src/InAppMessage/models/full-screen-message.js +4 -4
  71. package/src/InAppMessage/models/html-message.js +3 -3
  72. package/src/InAppMessage/models/in-app-message-button.js +4 -4
  73. package/src/InAppMessage/models/in-app-message.js +12 -12
  74. package/src/InAppMessage/models/modal-message.js +4 -4
  75. package/src/InAppMessage/models/slide-up-message.js +4 -4
  76. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  77. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  78. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  79. package/src/InAppMessage/ui/show-in-app-message.js +14 -14
  80. package/src/Push/push-manager-factory.js +2 -2
  81. package/src/Push/push-manager.js +38 -38
  82. package/src/Push/utils/push-utils.js +6 -6
  83. package/src/User/user-manager.js +14 -14
  84. package/src/User/user.js +25 -25
  85. package/src/common/base-provider.js +1 -1
  86. package/src/common/content-cards-display.js +7 -7
  87. package/src/common/event-logger.js +3 -3
  88. package/src/common/properties-base.js +3 -3
  89. package/src/l10n/l10n-manager-factory.js +1 -1
  90. package/src/l10n/l10n-manager.js +3 -3
  91. package/src/managers/auth-manager.js +11 -11
  92. package/src/managers/braze-instance.js +56 -56
  93. package/src/managers/device-manager.js +10 -10
  94. package/src/managers/network-manager.js +102 -101
  95. package/src/managers/server-config-manager.js +115 -98
  96. package/src/managers/session-manager.js +20 -20
  97. package/src/managers/storage-manager-factory.js +9 -9
  98. package/src/managers/storage-manager.js +74 -74
  99. package/src/managers/subscription-manager.js +2 -2
  100. package/src/managers/utils.js +1 -1
  101. package/src/models/backend-errors.js +5 -5
  102. package/src/models/braze-event.js +1 -1
  103. package/src/models/device.js +1 -1
  104. package/src/models/identifier.js +2 -2
  105. package/src/models/push-token.js +6 -6
  106. package/src/models/request-result.js +1 -1
  107. package/src/models/server-config.js +42 -24
  108. package/src/request-controller.js +126 -126
  109. package/src/triggers/models/custom-event-data.js +4 -4
  110. package/src/triggers/models/custom-event-property-data.js +5 -5
  111. package/src/triggers/models/filter-set.js +2 -2
  112. package/src/triggers/models/filter.js +1 -1
  113. package/src/triggers/models/in-app-message-click-data.js +1 -1
  114. package/src/triggers/models/purchase-data.js +1 -1
  115. package/src/triggers/models/purchase-property-data.js +2 -2
  116. package/src/triggers/models/push-click-data.js +1 -1
  117. package/src/triggers/models/trigger-condition.js +33 -33
  118. package/src/triggers/models/trigger-events.js +1 -1
  119. package/src/triggers/models/trigger.js +33 -33
  120. package/src/triggers/triggers-provider-factory.js +1 -1
  121. package/src/triggers/triggers-provider.js +68 -68
  122. package/src/types.js +2 -2
  123. package/src/ui/js/attach-css.js +1 -1
  124. package/src/util/braze-actions.js +7 -7
  125. package/src/util/browser-detector.js +2 -2
  126. package/src/util/client-hints-parser.js +4 -4
  127. package/src/util/code-utils.js +2 -2
  128. package/src/util/deprecation-utils.js +2 -2
  129. package/src/util/dom-utils.js +7 -7
  130. package/src/util/ecommerce-event-validation.js +52 -35
  131. package/src/util/html-display-utils.js +11 -11
  132. package/src/util/net.js +4 -4
  133. package/src/util/request-header-utils.js +17 -17
  134. package/src/util/string-utils.js +2 -2
  135. package/src/util/user-agent-parser.js +2 -2
  136. package/src/util/validation-utils.js +12 -12
  137. package/src/util/window-utils.js +2 -2
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Type definitions for @braze/web-sdk v6.8.0
2
+ * Type definitions for @braze/web-sdk v6.9.0
3
3
  * Project: https://github.com/braze-inc/braze-web-sdk
4
4
  * (c) Braze, Inc. 2026 - http://braze.com
5
5
  * License available at https://github.com/braze-inc/braze-web-sdk/blob/master/LICENSE
@@ -1626,10 +1626,6 @@ export interface EcommerceProductProperties {
1626
1626
  * and can only contain alphanumeric characters and punctuation. Total size of metadata cannot exceed 50KB.
1627
1627
  */
1628
1628
  metadata?: {
1629
- /**
1630
- * Shopify SKU, only applicable to Shopify integrations. Cannot exceed 255 characters in length.
1631
- */
1632
- sku?: string;
1633
1629
  [key: string]: any;
1634
1630
  };
1635
1631
  }
@@ -1675,6 +1671,21 @@ export interface CheckoutStartedEventProperties
1675
1671
  */
1676
1672
  total_value: number;
1677
1673
 
1674
+ /**
1675
+ * Subtotal value of the cart (post-discount, pre-tax/shipping).
1676
+ */
1677
+ subtotal_value?: number;
1678
+
1679
+ /**
1680
+ * Total tax applied to the cart.
1681
+ */
1682
+ tax?: number;
1683
+
1684
+ /**
1685
+ * Total shipping cost for the cart.
1686
+ */
1687
+ shipping?: number;
1688
+
1678
1689
  /**
1679
1690
  * The products associated with the checkout.
1680
1691
  */
@@ -1698,6 +1709,21 @@ type CartUpdatedBaseProperties = EcommerceEventProperties & {
1698
1709
  */
1699
1710
  cart_id: string;
1700
1711
 
1712
+ /**
1713
+ * Subtotal value of the cart (post-discount, pre-tax/shipping).
1714
+ */
1715
+ subtotal_value?: number;
1716
+
1717
+ /**
1718
+ * Total tax applied to the cart.
1719
+ */
1720
+ tax?: number;
1721
+
1722
+ /**
1723
+ * Total shipping cost for the cart.
1724
+ */
1725
+ shipping?: number;
1726
+
1701
1727
  /**
1702
1728
  * The products in the updated cart.
1703
1729
  */
@@ -1774,21 +1800,17 @@ export interface ProductViewedEventProperties extends EcommerceEventProperties {
1774
1800
  */
1775
1801
  price: number;
1776
1802
 
1803
+ /**
1804
+ * A list of types for the product that was viewed. The `back_in_stock` and `price_drop` types can be used to trigger
1805
+ * back-in-stock and price drop notifications. Each type cannot exceed 255 characters in length.
1806
+ */
1807
+ type?: string[];
1808
+
1777
1809
  /**
1778
1810
  * Additional metadata about the product viewed. Keys are limited to 255 characters in length, cannot begin with a $ character,
1779
1811
  * and can only contain alphanumeric characters and punctuation. Total size of metadata cannot exceed 50KB.
1780
1812
  */
1781
1813
  metadata?: {
1782
- /**
1783
- * Shopify SKU, only applicable to Shopify integrations. Cannot exceed 255 characters in length.
1784
- */
1785
- sku?: string;
1786
-
1787
- /**
1788
- * A list of types for the product that was viewed. The `back_in_stock` and `price_drop` types can be used to trigger
1789
- * back-in-stock and price drop notifications. Each type cannot exceed 255 characters in length.
1790
- */
1791
- type?: string[];
1792
1814
  [key: string]: any;
1793
1815
  };
1794
1816
  }
@@ -1811,6 +1833,21 @@ export interface OrderPlacedEventProperties extends EcommerceEventProperties {
1811
1833
  */
1812
1834
  total_value: number;
1813
1835
 
1836
+ /**
1837
+ * Subtotal value of the cart (post-discount, pre-tax/shipping).
1838
+ */
1839
+ subtotal_value?: number;
1840
+
1841
+ /**
1842
+ * Total tax applied to the cart.
1843
+ */
1844
+ tax?: number;
1845
+
1846
+ /**
1847
+ * Total shipping cost for the cart.
1848
+ */
1849
+ shipping?: number;
1850
+
1814
1851
  /**
1815
1852
  * The total amount of discounts applied to the order (ex: 12.99).
1816
1853
  */
@@ -1865,9 +1902,15 @@ export interface OrderPlacedEventProperties extends EcommerceEventProperties {
1865
1902
  * `properties` must match the corresponding properties interface.
1866
1903
  */
1867
1904
  export type EcommerceEvent =
1868
- | { name: "ecommerce.product_viewed"; properties: ProductViewedEventProperties }
1905
+ | {
1906
+ name: "ecommerce.product_viewed";
1907
+ properties: ProductViewedEventProperties;
1908
+ }
1869
1909
  | { name: "ecommerce.cart_updated"; properties: CartUpdatedEventProperties }
1870
- | { name: "ecommerce.checkout_started"; properties: CheckoutStartedEventProperties }
1910
+ | {
1911
+ name: "ecommerce.checkout_started";
1912
+ properties: CheckoutStartedEventProperties;
1913
+ }
1871
1914
  | { name: "ecommerce.order_placed"; properties: OrderPlacedEventProperties };
1872
1915
 
1873
1916
  export class FeatureFlag {
@@ -1959,6 +2002,28 @@ export class Banner {
1959
2002
  /** Whether this banner is a control banner. */
1960
2003
  isControl: boolean;
1961
2004
 
2005
+ /** Remove all event subscriptions from this banner. */
2006
+ removeAllSubscriptions(): void;
2007
+
2008
+ /**
2009
+ * Remove an event subscription that you previously subscribed to.
2010
+ *
2011
+ * @param subscriptionGuid - The identifier of the subscription you wish to remove, returned by the method
2012
+ * you initially used to create it.
2013
+ */
2014
+ removeSubscription(subscriptionGuid: string): void;
2015
+
2016
+ /**
2017
+ * Subscribe to receive dismissed events. The subscriber callback will be called whenever this banner is dismissed.
2018
+ *
2019
+ * @param subscriber - The callback function to receive dismissed events. This function will be invoked with
2020
+ * no arguments when this banner records a dismissal.
2021
+ *
2022
+ * @returns The identifier of the subscription created. This can be passed to `Banner.removeSubscription`
2023
+ * to cancel the subscription. Returns null if the subscriber passed is not a function.
2024
+ */
2025
+ subscribeToDismissedEvent(subscriber: () => void): string | null;
2026
+
1962
2027
  /**
1963
2028
  * Properties of this object.
1964
2029
  *
@@ -2324,6 +2389,21 @@ export function logBannerClick(
2324
2389
  buttonId?: string,
2325
2390
  ): boolean | undefined;
2326
2391
 
2392
+ /**
2393
+ * Dismisses the given Banner.
2394
+ *
2395
+ * Use this when rendering Banners with a custom UI and handling your own close button or dismissal gesture.
2396
+ * The SDK will update its dismissal state, remove the Banner from the active Banner cache, notify
2397
+ * `subscribeToBannersUpdates` subscribers, and sync the dismissal to Braze.
2398
+ *
2399
+ * @param banner - the `Banner` object to dismiss
2400
+ *
2401
+ * @returns `true` if the dismissal event was accepted for logging. Returns `false` if the dismissal was ignored,
2402
+ * including when no Banner is matched to the placement or when the Banner was already dismissed.
2403
+ * Returns `undefined` if the SDK has not been initialized.
2404
+ */
2405
+ export function dismissBanner(banner: Banner): boolean | undefined;
2406
+
2327
2407
  /**
2328
2408
  * Reports that the current user performed a custom named event.
2329
2409
  *
@@ -2467,7 +2547,7 @@ export function openSession(): void;
2467
2547
  * - Create a `service-worker.js` file with the content below and place it in the root directory of your website:
2468
2548
  *
2469
2549
  * ```
2470
- * self.importScripts('https://js.appboycdn.com/web-sdk/6.8/service-worker.js');
2550
+ * self.importScripts('https://js.appboycdn.com/web-sdk/6.9/service-worker.js');
2471
2551
  * ```
2472
2552
  *
2473
2553
  * For more details, see [Our Product Documentation](https://www.braze.com/docs/developer_guide/platform_integration_guides/web/push_notifications/integration).
@@ -2889,7 +2969,7 @@ export type InitializationOptions = {
2889
2969
  * lifecycle of, set this option to true and the Braze SDK will not register or unregister a service worker. If you set this
2890
2970
  * option to true, in order for push to function correctly you must register the service worker yourself BEFORE calling
2891
2971
  * `requestPushPermission`, and ensure that it contains Braze's service worker code, either with
2892
- * `self.importScripts('https://js.appboycdn.com/web-sdk/6.8/service-worker.js');` or by including the content
2972
+ * `self.importScripts('https://js.appboycdn.com/web-sdk/6.9/service-worker.js');` or by including the content
2893
2973
  * of that file directly. When this option is true, the `serviceWorkerLocation` option is irrelevant and is ignored.
2894
2974
  */
2895
2975
  manageServiceWorkerExternally?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@braze/web-sdk",
3
- "version": "6.8.0",
3
+ "version": "6.9.0",
4
4
  "description": "Braze SDK for web sites and other JS platforms.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -1,35 +1,35 @@
1
1
  const p = {
2
2
  CustomEvent: "ce",
3
3
  Pr: "p",
4
- Jc: "pc",
5
- ev: "ca",
6
- ql: "i",
7
- Va: "ie",
8
- ds: "cci",
9
- js: "ccic",
10
- os: "ccc",
11
- cs: "ccd",
4
+ $c: "pc",
5
+ Fc: "ca",
6
+ gl: "i",
7
+ Ya: "ie",
8
+ vs: "cci",
9
+ ws: "ccic",
10
+ us: "ccc",
11
+ gs: "ccd",
12
12
  wm: "ss",
13
13
  hm: "se",
14
- Xn: "si",
15
- Hn: "sc",
16
- Jn: "sbc",
17
- tv: "sfe",
14
+ Fn: "si",
15
+ On: "sc",
16
+ Xn: "sbc",
17
+ Lc: "sfe",
18
18
  om: "iec",
19
- Bc: "lr",
20
- Uc: "uae",
21
- Gc: "lcaa",
22
- Wc: "lcar",
19
+ Dc: "lr",
20
+ Ac: "uae",
21
+ Mc: "lcaa",
22
+ Cc: "lcar",
23
23
  Zu: "inc",
24
24
  Qu: "add",
25
25
  Xu: "rem",
26
26
  Yu: "set",
27
27
  Vu: "ncam",
28
- Xc: "sgu",
28
+ Tc: "sgu",
29
29
  xo: "ffi",
30
30
  ro: "bi",
31
- Dt: "bc",
32
- Ft: "bd",
31
+ Nt: "bc",
32
+ Rt: "bd",
33
33
  },
34
- We = { nv: "content_cards_displayed" };
34
+ We = { Gc: "content_cards_displayed" };
35
35
  export { p as EventTypes, We as InternalEventTypes };
@@ -1,21 +1,21 @@
1
1
  export default class et {
2
2
  constructor(t, e) {
3
3
  (this.database = t),
4
- (this.vd = e),
4
+ (this.Ud = e),
5
5
  (this.parent = "undefined" == typeof window ? self : window),
6
6
  (this.database = t),
7
- (this.vd = e);
7
+ (this.Ud = e);
8
8
  }
9
- Dd() {
9
+ Od() {
10
10
  if ("indexedDB" in this.parent) return this.parent.indexedDB;
11
11
  }
12
12
  isSupported() {
13
13
  var t;
14
14
  try {
15
- if (null == this.Dd()) return !1;
15
+ if (null == this.Od()) return !1;
16
16
  {
17
17
  const e =
18
- null === (t = this.Dd()) || void 0 === t
18
+ null === (t = this.Od()) || void 0 === t
19
19
  ? void 0
20
20
  : t.open("Braze IndexedDB Support Test");
21
21
  if (
@@ -25,10 +25,10 @@ export default class et {
25
25
  "undefined" != typeof window)
26
26
  ) {
27
27
  const t = window,
28
- e = t.chrome || t.browser || t.Bd;
28
+ e = t.chrome || t.browser || t.kd;
29
29
  if (e && e.runtime && e.runtime.id)
30
30
  return (
31
- this.vd.info(
31
+ this.Ud.info(
32
32
  "Not using IndexedDB for storage because we are running inside an extension",
33
33
  ),
34
34
  !1
@@ -38,37 +38,37 @@ export default class et {
38
38
  }
39
39
  } catch (t) {
40
40
  return (
41
- this.vd.info(
41
+ this.Ud.info(
42
42
  "Not using IndexedDB for storage due to following error: " + t,
43
43
  ),
44
44
  !1
45
45
  );
46
46
  }
47
47
  }
48
- Cd(t, e) {
48
+ Kd(t, e) {
49
49
  var n;
50
50
  const o =
51
- null === (n = this.Dd()) || void 0 === n
51
+ null === (n = this.Od()) || void 0 === n
52
52
  ? void 0
53
- : n.open(this.database.xd, this.database.VERSION);
53
+ : n.open(this.database.Gd, this.database.VERSION);
54
54
  if (null == o) return "function" == typeof e && e(), !1;
55
55
  const i = this;
56
56
  return (
57
57
  (o.onupgradeneeded = (t) => {
58
58
  var e;
59
- i.vd.info(
59
+ i.Ud.info(
60
60
  "Upgrading indexedDB " +
61
- i.database.xd +
61
+ i.database.Gd +
62
62
  " to v" +
63
63
  i.database.VERSION +
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.Ws) {
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.Ws.hasOwnProperty(t) &&
70
+ !n.objectStoreNames.contains(i.database.Ws[e]) &&
71
+ n.createObjectStore(i.database.Ws[e]);
72
72
  }
73
73
  }),
74
74
  (o.onsuccess = (n) => {
@@ -77,7 +77,7 @@ export default class et {
77
77
  (r.onversionchange = () => {
78
78
  r.close(),
79
79
  "function" == typeof e && e(),
80
- i.vd.error(
80
+ i.Ud.error(
81
81
  "Needed to close the database unexpectedly because of an upgrade in another tab",
82
82
  );
83
83
  }),
@@ -87,9 +87,9 @@ export default class et {
87
87
  var n;
88
88
  const o = t;
89
89
  return (
90
- i.vd.info(
90
+ i.Ud.info(
91
91
  "Could not open indexedDB " +
92
- i.database.xd +
92
+ i.database.Gd +
93
93
  " v" +
94
94
  i.database.VERSION +
95
95
  ": " +
@@ -105,16 +105,16 @@ export default class et {
105
105
  setItem(t, e, n, o, i) {
106
106
  if (!this.isSupported()) return "function" == typeof i && i(), !1;
107
107
  const r = this;
108
- return this.Cd((d) => {
108
+ return this.Kd((d) => {
109
109
  if (!d.objectStoreNames.contains(t))
110
110
  return (
111
- r.vd.error(
111
+ r.Ud.error(
112
112
  "Could not store object " +
113
113
  e +
114
114
  " in " +
115
115
  t +
116
116
  " on indexedDB " +
117
- r.database.xd +
117
+ r.database.Gd +
118
118
  " - " +
119
119
  t +
120
120
  " is not a valid objectStore",
@@ -126,13 +126,13 @@ export default class et {
126
126
  s.oncomplete = () => d.close();
127
127
  const u = s.objectStore(t).put(n, e);
128
128
  (u.onerror = () => {
129
- r.vd.error(
129
+ r.Ud.error(
130
130
  "Could not store object " +
131
131
  e +
132
132
  " in " +
133
133
  t +
134
134
  " on indexedDB " +
135
- r.database.xd,
135
+ r.database.Gd,
136
136
  ),
137
137
  "function" == typeof i && i();
138
138
  }),
@@ -144,16 +144,16 @@ export default class et {
144
144
  getItem(t, e, n) {
145
145
  if (!this.isSupported()) return !1;
146
146
  const o = this;
147
- return this.Cd((i) => {
147
+ return this.Kd((i) => {
148
148
  if (!i.objectStoreNames.contains(t))
149
149
  return (
150
- o.vd.error(
150
+ o.Ud.error(
151
151
  "Could not retrieve object " +
152
152
  e +
153
153
  " in " +
154
154
  t +
155
155
  " on indexedDB " +
156
- o.database.xd +
156
+ o.database.Gd +
157
157
  " - " +
158
158
  t +
159
159
  " is not a valid objectStore",
@@ -164,13 +164,13 @@ export default class et {
164
164
  r.oncomplete = () => i.close();
165
165
  const d = r.objectStore(t).get(e);
166
166
  (d.onerror = () => {
167
- o.vd.error(
167
+ o.Ud.error(
168
168
  "Could not retrieve object " +
169
169
  e +
170
170
  " in " +
171
171
  t +
172
172
  " on indexedDB " +
173
- o.database.xd,
173
+ o.database.Gd,
174
174
  );
175
175
  }),
176
176
  (d.onsuccess = (t) => {
@@ -183,14 +183,14 @@ export default class et {
183
183
  kr(t, e, n) {
184
184
  if (!this.isSupported()) return "function" == typeof n && n(), !1;
185
185
  const o = this;
186
- return this.Cd((i) => {
186
+ return this.Kd((i) => {
187
187
  if (!i.objectStoreNames.contains(t))
188
188
  return (
189
- o.vd.error(
189
+ o.Ud.error(
190
190
  "Could not retrieve last record from " +
191
191
  t +
192
192
  " on indexedDB " +
193
- o.database.xd +
193
+ o.database.Gd +
194
194
  " - " +
195
195
  t +
196
196
  " is not a valid objectStore",
@@ -202,8 +202,8 @@ export default class et {
202
202
  r.oncomplete = () => i.close();
203
203
  const d = r.objectStore(t).openCursor(null, "prev");
204
204
  (d.onerror = () => {
205
- o.vd.error(
206
- "Could not open cursor for " + t + " on indexedDB " + o.database.xd,
205
+ o.Ud.error(
206
+ "Could not open cursor for " + t + " on indexedDB " + o.database.Gd,
207
207
  ),
208
208
  "function" == typeof n && n();
209
209
  }),
@@ -219,16 +219,16 @@ export default class et {
219
219
  ge(t, e) {
220
220
  if (!this.isSupported()) return !1;
221
221
  const n = this;
222
- return this.Cd((o) => {
222
+ return this.Kd((o) => {
223
223
  if (!o.objectStoreNames.contains(t))
224
224
  return (
225
- n.vd.error(
225
+ n.Ud.error(
226
226
  "Could not delete record " +
227
227
  e +
228
228
  " from " +
229
229
  t +
230
230
  " on indexedDB " +
231
- n.database.xd +
231
+ n.database.Gd +
232
232
  " - " +
233
233
  t +
234
234
  " is not a valid objectStore",
@@ -238,28 +238,28 @@ export default class et {
238
238
  const i = o.transaction([t], "readwrite");
239
239
  i.oncomplete = () => o.close();
240
240
  i.objectStore(t).delete(e).onerror = () => {
241
- n.vd.error(
241
+ n.Ud.error(
242
242
  "Could not delete record " +
243
243
  e +
244
244
  " from " +
245
245
  t +
246
246
  " on indexedDB " +
247
- n.database.xd,
247
+ n.database.Gd,
248
248
  );
249
249
  };
250
250
  });
251
251
  }
252
- Xs(t, e) {
252
+ Qs(t, e) {
253
253
  if (!this.isSupported()) return !1;
254
254
  const n = this;
255
- return this.Cd((o) => {
255
+ return this.Kd((o) => {
256
256
  if (!o.objectStoreNames.contains(t))
257
257
  return (
258
- n.vd.error(
258
+ n.Ud.error(
259
259
  "Could not retrieve objects from " +
260
260
  t +
261
261
  " on indexedDB " +
262
- n.database.xd +
262
+ n.database.Gd +
263
263
  " - " +
264
264
  t +
265
265
  " is not a valid objectStore",
@@ -273,18 +273,18 @@ export default class et {
273
273
  s = [];
274
274
  (d.onerror = () => {
275
275
  s.length > 0
276
- ? (n.vd.info(
276
+ ? (n.Ud.info(
277
277
  "Cursor closed midway through for " +
278
278
  t +
279
279
  " on indexedDB " +
280
- n.database.xd,
280
+ n.database.Gd,
281
281
  ),
282
282
  e(s))
283
- : n.vd.error(
283
+ : n.Ud.error(
284
284
  "Could not open cursor for " +
285
285
  t +
286
286
  " on indexedDB " +
287
- n.database.xd,
287
+ n.database.Gd,
288
288
  );
289
289
  }),
290
290
  (d.onsuccess = (t) => {
@@ -304,45 +304,45 @@ export default class et {
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.Ws) {
308
308
  const n = e;
309
- this.database.Os.hasOwnProperty(e) &&
310
- this.database.Os[n] !== this.database.Os.pe &&
311
- t.push(this.database.Os[n]);
309
+ this.database.Ws.hasOwnProperty(e) &&
310
+ this.database.Ws[n] !== this.database.Ws.pe &&
311
+ t.push(this.database.Ws[n]);
312
312
  }
313
313
  const e = this;
314
- return this.Cd(function (n) {
314
+ return this.Kd(function (n) {
315
315
  const o = n.transaction(t, "readwrite");
316
316
  o.oncomplete = () => n.close();
317
317
  for (let n = 0; n < t.length; n++) {
318
318
  const i = t[n];
319
319
  o.objectStore(i).clear().onerror = function () {
320
- e.vd.error(
320
+ e.Ud.error(
321
321
  "Could not clear " +
322
322
  this.source.name +
323
323
  " on indexedDB " +
324
- e.database.xd,
324
+ e.database.Gd,
325
325
  );
326
326
  };
327
327
  }
328
328
  o.onerror = function () {
329
- e.vd.error(
330
- "Could not clear object stores on indexedDB " + e.database.xd,
329
+ e.Ud.error(
330
+ "Could not clear object stores on indexedDB " + e.database.Gd,
331
331
  );
332
332
  };
333
333
  });
334
334
  }
335
335
  }
336
- et.Ps = {
337
- $s: {
338
- xd: "AppboyServiceWorkerAsyncStorage",
336
+ et._s = {
337
+ Xs: {
338
+ Gd: "AppboyServiceWorkerAsyncStorage",
339
339
  VERSION: 6,
340
- Os: {
341
- wn: "data",
340
+ Ws: {
341
+ pn: "data",
342
342
  yr: "pushClicks",
343
343
  Fu: "pushSubscribed",
344
- yd: "fallbackDevice",
345
- _s: "cardUpdates",
344
+ Hd: "fallbackDevice",
345
+ Vs: "cardUpdates",
346
346
  pe: "optOut",
347
347
  Br: "pendingData",
348
348
  wh: "sdkAuthenticationSignature",
@@ -1,38 +1,38 @@
1
- const E = {
1
+ const b = {
2
2
  init: function (n) {
3
- (void 0 === n && void 0 !== E.zg) || (E.zg = !!n), E.i || (E.i = !0);
3
+ (void 0 === n && void 0 !== b.zg) || (b.zg = !!n), b.i || (b.i = !0);
4
4
  },
5
5
  destroy: function () {
6
- (E.i = !1), (E.zg = void 0), (E.vd = void 0);
6
+ (b.i = !1), (b.zg = void 0), (b.Ud = void 0);
7
7
  },
8
8
  setLogger: function (n) {
9
9
  "function" == typeof n
10
- ? (E.init(), (E.vd = n))
11
- : E.info("Ignoring setLogger call since logger is not a function");
10
+ ? (b.init(), (b.Ud = n))
11
+ : b.info("Ignoring setLogger call since logger is not a function");
12
12
  },
13
13
  toggleLogging: function () {
14
- E.init(),
15
- E.zg
16
- ? (console.log("Disabling Braze logging"), (E.zg = !1))
17
- : (console.log("Enabled Braze logging"), (E.zg = !0));
14
+ b.init(),
15
+ b.zg
16
+ ? (console.log("Disabling Braze logging"), (b.zg = !1))
17
+ : (console.log("Enabled Braze logging"), (b.zg = !0));
18
18
  },
19
19
  info: function (n) {
20
- if (E.zg) {
20
+ if (b.zg) {
21
21
  const o = "Braze: " + n;
22
- null != E.vd ? E.vd(o) : console.log(o);
22
+ null != b.Ud ? b.Ud(o) : console.log(o);
23
23
  }
24
24
  },
25
25
  warn: function (n) {
26
- if (E.zg) {
27
- const o = "Braze SDK Warning: " + n + " (v6.8.0)";
28
- null != E.vd ? E.vd(o) : console.warn(o);
26
+ if (b.zg) {
27
+ const o = "Braze SDK Warning: " + n + " (v6.9.0)";
28
+ null != b.Ud ? b.Ud(o) : console.warn(o);
29
29
  }
30
30
  },
31
31
  error: function (n) {
32
- if (E.zg) {
33
- const o = "Braze SDK Error: " + n + " (v6.8.0)";
34
- null != E.vd ? E.vd(o) : console.error(o);
32
+ if (b.zg) {
33
+ const o = "Braze SDK Error: " + n + " (v6.9.0)";
34
+ null != b.Ud ? b.Ud(o) : console.error(o);
35
35
  }
36
36
  },
37
37
  };
38
- export default E;
38
+ export default b;