@braze/web-sdk 4.6.3 → 4.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/index.d.ts +19 -14
  2. package/package.json +1 -1
  3. package/shared-lib/braze-shared-lib.js +2 -2
  4. package/shared-lib/encoding-utils.js +1 -1
  5. package/shared-lib/event-types.js +18 -17
  6. package/shared-lib/indexed-db-adapter.js +2 -2
  7. package/shared-lib/logger.js +2 -2
  8. package/shared-lib/supported-options.js +17 -17
  9. package/src/Card/models/card.js +1 -1
  10. package/src/Core/handle-braze-action.js +40 -34
  11. package/src/Core/log-custom-event.js +2 -7
  12. package/src/Core/log-purchase.js +3 -3
  13. package/src/Core/wipe-data.js +2 -2
  14. package/src/FeatureFlags/feature-flag.js +33 -16
  15. package/src/FeatureFlags/feature-flags-provider.js +86 -75
  16. package/src/FeatureFlags/get-all-feature-flags.js +5 -5
  17. package/src/FeatureFlags/get-feature-flag.js +6 -6
  18. package/src/FeatureFlags/refresh-feature-flags.js +1 -1
  19. package/src/FeatureFlags/types.js +1 -0
  20. package/src/Feed/feed-provider.js +17 -17
  21. package/src/Feed/get-cached-feed.js +1 -1
  22. package/src/Feed/ui/show-feed.js +1 -1
  23. package/src/InAppMessage/display/html-message-to-html.js +135 -120
  24. package/src/InAppMessage/display/in-app-message-to-html.js +21 -21
  25. package/src/InAppMessage/display/modal-utils.js +6 -6
  26. package/src/InAppMessage/in-app-message-factory.js +3 -3
  27. package/src/InAppMessage/in-app-message-manager-factory.js +3 -3
  28. package/src/InAppMessage/in-app-message-manager.js +65 -65
  29. package/src/InAppMessage/log-in-app-message-button-click.js +4 -4
  30. package/src/InAppMessage/log-in-app-message-click.js +4 -4
  31. package/src/InAppMessage/log-in-app-message-html-click.js +3 -3
  32. package/src/InAppMessage/log-in-app-message-impression.js +3 -3
  33. package/src/InAppMessage/models/full-screen-message.js +1 -1
  34. package/src/InAppMessage/models/html-message.js +1 -1
  35. package/src/InAppMessage/models/in-app-message-button.js +4 -4
  36. package/src/InAppMessage/models/in-app-message.js +80 -80
  37. package/src/InAppMessage/models/modal-message.js +2 -2
  38. package/src/InAppMessage/models/slide-up-message.js +8 -8
  39. package/src/InAppMessage/models/templated-in-app-message.js +4 -4
  40. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  41. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  42. package/src/InAppMessage/ui/show-in-app-message.js +20 -20
  43. package/src/Push/push-manager.js +216 -209
  44. package/src/Push/utils/push-utils.js +4 -4
  45. package/src/User/user-manager.js +11 -8
  46. package/src/User/user.js +52 -41
  47. package/src/common/base-feed.js +1 -1
  48. package/src/common/base-provider.js +1 -1
  49. package/src/common/constants.js +2 -0
  50. package/src/common/feed-display.js +6 -6
  51. package/src/l10n/l10n-manager-factory.js +1 -1
  52. package/src/managers/auth-manager.js +24 -24
  53. package/src/managers/braze-instance.js +122 -122
  54. package/src/managers/device-manager.js +11 -11
  55. package/src/managers/network-manager.js +63 -54
  56. package/src/managers/server-config-manager.js +20 -20
  57. package/src/managers/session-manager.js +29 -29
  58. package/src/managers/storage-manager-factory.js +4 -4
  59. package/src/managers/storage-manager.js +104 -104
  60. package/src/managers/subscription-manager.js +6 -6
  61. package/src/models/backend-errors.js +5 -5
  62. package/src/models/braze-event.js +7 -7
  63. package/src/models/device.js +1 -1
  64. package/src/models/identifier.js +6 -6
  65. package/src/models/push-token.js +3 -3
  66. package/src/models/server-config.js +15 -15
  67. package/src/request-controller.js +92 -88
  68. package/src/triggers/models/custom-event-data.js +4 -4
  69. package/src/triggers/models/custom-event-property-data.js +9 -9
  70. package/src/triggers/models/filter-set.js +9 -9
  71. package/src/triggers/models/filter.js +63 -63
  72. package/src/triggers/models/in-app-message-click-data.js +5 -5
  73. package/src/triggers/models/purchase-data.js +3 -3
  74. package/src/triggers/models/purchase-property-data.js +9 -9
  75. package/src/triggers/models/push-click-data.js +5 -5
  76. package/src/triggers/models/trigger-condition.js +48 -48
  77. package/src/triggers/models/trigger-events.js +1 -1
  78. package/src/triggers/models/trigger.js +29 -29
  79. package/src/triggers/triggers-provider-factory.js +2 -2
  80. package/src/triggers/triggers-provider.js +87 -89
  81. package/src/ui/js/attach-css.js +1 -1
  82. package/src/ui/js/feed-css.js +4 -4
  83. package/src/ui/js/iam-css.js +4 -4
  84. package/src/ui/js/load-font-awesome.js +1 -1
  85. package/src/util/base-device-parser.js +2 -2
  86. package/src/util/braze-actions.js +8 -8
  87. package/src/util/browser-detector.js +8 -8
  88. package/src/util/client-hints-parser.js +3 -3
  89. package/src/util/code-utils.js +10 -3
  90. package/src/util/component-utils.js +1 -1
  91. package/src/util/date-utils.js +2 -2
  92. package/src/util/device-constants.js +1 -1
  93. package/src/util/dom-utils.js +9 -9
  94. package/src/util/key-codes.js +1 -1
  95. package/src/util/net.js +3 -3
  96. package/src/util/user-agent-parser.js +4 -4
  97. package/src/util/validation-utils.js +155 -74
  98. package/src/util/window-utils.js +1 -1
@@ -12,11 +12,11 @@ import r from "../../shared-lib/braze-shared-lib.js";
12
12
  import u from "../managers/subscription-manager.js";
13
13
  import pt from "../triggers/models/trigger.js";
14
14
  import { validateValueIsFromEnum as F } from "../util/code-utils.js";
15
- import { BRAZE_ACTION_URI_REGEX as O } from "../util/validation-utils.js";
15
+ import { BRAZE_ACTION_URI_REGEX as J } from "../util/validation-utils.js";
16
16
  import {
17
17
  containsPushPrimerBrazeAction as mt,
18
18
  containsUnknownBrazeAction as gt,
19
- getDecodedBrazeAction as J,
19
+ getDecodedBrazeAction as _,
20
20
  ineligibleBrazeActionURLErrorMessage as ht,
21
21
  INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES as ft
22
22
  } from "../util/braze-actions.js";
@@ -27,27 +27,27 @@ export default class ge {
27
27
  (this.j = s),
28
28
  (this.h = i),
29
29
  (this.v = r),
30
- (this.ni = new u()),
31
- e.jt(this.ni),
32
- (this.li = 1e3),
33
- (this.ui = 6e4);
30
+ (this.Se = new u()),
31
+ e.jt(this.Se),
32
+ (this.Oe = 1e3),
33
+ (this.Re = 6e4);
34
34
  }
35
- pi() {
36
- return this.ni;
35
+ Qe() {
36
+ return this.Se;
37
37
  }
38
- mi(t) {
39
- return this.ni.ut(t);
38
+ Ue(t) {
39
+ return this.Se.ut(t);
40
40
  }
41
- gi() {
42
- return this.ci;
41
+ Ve() {
42
+ return this.We;
43
43
  }
44
- fi(t) {
45
- this.ci = t;
44
+ Xe(t) {
45
+ this.We = t;
46
46
  }
47
- di(e, i) {
47
+ Ye(e, i) {
48
48
  if (
49
49
  !F(
50
- InAppMessage.Ge,
50
+ InAppMessage.Me,
51
51
  i,
52
52
  `${i} is not a valid in-app message display failure`,
53
53
  "InAppMessage.DisplayFailures"
@@ -55,14 +55,14 @@ export default class ge {
55
55
  )
56
56
  return new t();
57
57
  const n = { trigger_ids: [e], error_code: i };
58
- return s.G(r.A.vi, n);
58
+ return s.G(r.A.Ze, n);
59
59
  }
60
60
  G(e, i, n, o) {
61
61
  const a = new t();
62
62
  let l;
63
63
  if (e instanceof ControlMessage) l = { trigger_ids: [e.triggerId] };
64
64
  else {
65
- if (i === r.A.yi || (e instanceof HtmlMessage && i === r.A.ji)) {
65
+ if (i === r.A.Ii || (e instanceof HtmlMessage && i === r.A.Ai)) {
66
66
  if (!e.k(o))
67
67
  return (
68
68
  r.D.info(
@@ -70,7 +70,7 @@ export default class ge {
70
70
  ),
71
71
  a
72
72
  );
73
- } else if (i === r.A.bi) {
73
+ } else if (i === r.A.Mi) {
74
74
  if (!e.R())
75
75
  return (
76
76
  r.D.info(
@@ -79,11 +79,11 @@ export default class ge {
79
79
  a
80
80
  );
81
81
  }
82
- l = this.Ii(e);
82
+ l = this.zi(e);
83
83
  }
84
84
  return null == l ? a : (null != n && (l.bid = n), s.G(i, l));
85
85
  }
86
- Ai(e, i) {
86
+ ki(e, i) {
87
87
  const n = new t();
88
88
  if (!e.k())
89
89
  return (
@@ -92,82 +92,82 @@ export default class ge {
92
92
  ),
93
93
  n
94
94
  );
95
- const o = this.Ii(i);
95
+ const o = this.zi(i);
96
96
  return null == o
97
97
  ? n
98
- : e.id === InAppMessageButton.Mi
98
+ : e.id === InAppMessageButton.$i
99
99
  ? (r.D.info(
100
100
  "This in-app message button does not have a tracking id. Not logging event to Braze servers."
101
101
  ),
102
102
  n)
103
- : (null != e.id && (o.bid = e.id), s.G(r.A.ji, o));
103
+ : (null != e.id && (o.bid = e.id), s.G(r.A.Ai, o));
104
104
  }
105
- zi(t) {
105
+ Bi(t) {
106
106
  if (!(t instanceof InAppMessage)) return;
107
- const s = t => {
108
- const s = J(t);
109
- return gt(s)
110
- ? ht(ft.Di, "In-App Message")
111
- : mt(s) && !dt.Ti()
112
- ? ht(ft._i, "In-App Message")
107
+ const e = t => {
108
+ const e = _(t);
109
+ return gt(e)
110
+ ? ht(ft.Ei, "In-App Message")
111
+ : mt(e) && !dt.Gi()
112
+ ? ht(ft.Ni, "In-App Message")
113
113
  : void 0;
114
114
  },
115
- e = t.buttons;
115
+ s = t.buttons;
116
116
  let i;
117
- for (const t of e)
117
+ for (const t of s)
118
118
  if (
119
119
  t.clickAction === InAppMessage.ClickAction.URI &&
120
- O.test(t.uri) &&
121
- ((i = s(t.uri)), i)
120
+ J.test(t.uri) &&
121
+ ((i = e(t.uri)), i)
122
122
  )
123
123
  return i;
124
- return t.clickAction === InAppMessage.ClickAction.URI && O.test(t.uri)
125
- ? s(t.uri)
124
+ return t.clickAction === InAppMessage.ClickAction.URI && J.test(t.uri)
125
+ ? e(t.uri)
126
126
  : void 0;
127
127
  }
128
- ki(t, s, e, i) {
129
- let n = this.vt.wi(!1, !1);
128
+ qi(t, e, s, i) {
129
+ let n = this.vt.Oi(!1, !1);
130
130
  (n = this.vt.Ps(n)),
131
- (n.template = { trigger_id: t.triggerId, trigger_event_type: s }),
132
- null != e && (n.template.data = e.Si());
131
+ (n.template = { trigger_id: t.triggerId, trigger_event_type: e }),
132
+ null != s && (n.template.data = s.Pi());
133
133
  const o = this.vt.Bs(n);
134
134
  this.vt.Gs(n, () => {
135
135
  b.Hs({
136
136
  url: `${this.vt.Ks()}/template/`,
137
137
  data: n,
138
138
  headers: o,
139
- S: async s => {
140
- if (!this.vt.Os(n, s, o))
139
+ S: e => {
140
+ if (!this.vt.Os(n, e, o))
141
141
  return (
142
- this.di(t.triggerId, InAppMessage.Ge.$i),
143
- void ("function" == typeof t.Bi && t.Bi())
142
+ this.Ye(t.triggerId, InAppMessage.Me.Ri),
143
+ void ("function" == typeof t.Hi && t.Hi())
144
144
  );
145
- if ((this.vt.Qs(), null == s || null == s.templated_message))
146
- return void this.di(t.triggerId, InAppMessage.Ge.$i);
147
- const e = s.templated_message;
148
- if (e.type !== pt.Fi.Ei)
149
- return void this.di(t.triggerId, InAppMessage.Ge.Gi);
150
- const i = lt(e.data);
151
- if (null == i) return void this.di(t.triggerId, InAppMessage.Ge.Gi);
152
- let a = this.zi(i);
145
+ if ((this.vt.Qs(), null == e || null == e.templated_message))
146
+ return void this.Ye(t.triggerId, InAppMessage.Me.Ri);
147
+ const s = e.templated_message;
148
+ if (s.type !== pt.Ki.Ji)
149
+ return void this.Ye(t.triggerId, InAppMessage.Me.Li);
150
+ const i = lt(s.data);
151
+ if (null == i) return void this.Ye(t.triggerId, InAppMessage.Me.Li);
152
+ let a = this.Bi(i);
153
153
  if (a)
154
- return r.D.error(a), void ("function" == typeof t.Bi && t.Bi());
155
- "function" == typeof t.Ni
156
- ? t.Ni(i)
157
- : this.di(t.triggerId, InAppMessage.Ge.$i);
154
+ return r.D.error(a), void ("function" == typeof t.Hi && t.Hi());
155
+ "function" == typeof t.Qi
156
+ ? t.Qi(i)
157
+ : this.Ye(t.triggerId, InAppMessage.Me.Ri);
158
158
  },
159
159
  error: r => {
160
160
  let n = `getting user personalization for message ${t.triggerId}`;
161
- if (new Date().valueOf() - t.qi > t.xi)
162
- this.di(t.triggerId, InAppMessage.Ge.$i);
161
+ if (new Date().valueOf() - t.Ui > t.Vi)
162
+ this.Ye(t.triggerId, InAppMessage.Me.Ri);
163
163
  else {
164
- const r = Math.min(t.xi, this.ui),
165
- o = this.li;
164
+ const r = Math.min(t.Vi, this.Re),
165
+ o = this.Oe;
166
166
  null == i && (i = o);
167
167
  const a = Math.min(r, tt(o, 3 * i));
168
168
  (n += `. Retrying in ${a} ms`),
169
169
  setTimeout(() => {
170
- this.ki(t, s, e, a);
170
+ this.qi(t, e, s, a);
171
171
  }, a);
172
172
  }
173
173
  this.vt.Vs(r, n);
@@ -175,7 +175,7 @@ export default class ge {
175
175
  });
176
176
  });
177
177
  }
178
- Ii(t) {
178
+ zi(t) {
179
179
  if (null == t.triggerId)
180
180
  return (
181
181
  r.D.info(
@@ -183,7 +183,7 @@ export default class ge {
183
183
  ),
184
184
  null
185
185
  );
186
- const s = {};
187
- return null != t.triggerId && (s.trigger_ids = [t.triggerId]), s;
186
+ const e = {};
187
+ return null != t.triggerId && (e.trigger_ids = [t.triggerId]), e;
188
188
  }
189
189
  }
@@ -1,5 +1,5 @@
1
1
  import e from "../managers/braze-instance.js";
2
- import { MUST_BE_IN_APP_MESSAGE_WARNING as or } from "../common/constants.js";
2
+ import { MUST_BE_IN_APP_MESSAGE_WARNING as sr } from "../common/constants.js";
3
3
  import InAppMessage from "./models/in-app-message.js";
4
4
  import InAppMessageButton from "./models/in-app-message-button.js";
5
5
  import pe from "./in-app-message-manager-factory.js";
@@ -10,10 +10,10 @@ export function logInAppMessageButtonClick(t, o) {
10
10
  if (!e.rr()) return !1;
11
11
  if (!(t instanceof InAppMessageButton))
12
12
  return r.D.error("button must be an InAppMessageButton object"), !1;
13
- if (!(o instanceof InAppMessage)) return r.D.error(or), !1;
14
- const s = pe.m().Ai(t, o);
13
+ if (!(o instanceof InAppMessage)) return r.D.error(sr), !1;
14
+ const s = pe.m().ki(t, o);
15
15
  if (s.S)
16
16
  for (let r = 0; r < s.ve.length; r++)
17
- W.er().je(V.Br, [o.triggerId, t.id], s.ve[r]);
17
+ W.er().je(V.Mr, [o.triggerId, t.id], s.ve[r]);
18
18
  return s.S;
19
19
  }
@@ -2,18 +2,18 @@ import e from "../managers/braze-instance.js";
2
2
  import InAppMessage from "./models/in-app-message.js";
3
3
  import pe from "./in-app-message-manager-factory.js";
4
4
  import { logInAppMessageImpression } from "./log-in-app-message-impression.js";
5
- import { MUST_BE_IN_APP_MESSAGE_WARNING as or } from "../common/constants.js";
5
+ import { MUST_BE_IN_APP_MESSAGE_WARNING as sr } from "../common/constants.js";
6
6
  import r from "../../shared-lib/braze-shared-lib.js";
7
7
  import V from "../triggers/models/trigger-events.js";
8
8
  import { TriggersProviderFactory as W } from "../triggers/triggers-provider-factory.js";
9
9
  export function logInAppMessageClick(o) {
10
10
  if (!e.rr()) return !1;
11
- if (!(o instanceof InAppMessage)) return r.D.error(or), !1;
12
- const s = pe.m().G(o, r.A.yi);
11
+ if (!(o instanceof InAppMessage)) return r.D.error(sr), !1;
12
+ const s = pe.m().G(o, r.A.Ii);
13
13
  if (s) {
14
14
  o.Cr() || logInAppMessageImpression(o);
15
15
  for (let r = 0; r < s.ve.length; r++)
16
- W.er().je(V.Br, [o.triggerId], s.ve[r]);
16
+ W.er().je(V.Mr, [o.triggerId], s.ve[r]);
17
17
  }
18
18
  return s.S;
19
19
  }
@@ -13,11 +13,11 @@ export function logInAppMessageHtmlClick(s, t, o) {
13
13
  ),
14
14
  !1
15
15
  );
16
- let m = r.A.yi;
17
- null != t && (m = r.A.ji);
16
+ let m = r.A.Ii;
17
+ null != t && (m = r.A.Ai);
18
18
  const i = pe.m().G(s, m, t, o);
19
19
  if (i.S)
20
20
  for (let r = 0; r < i.ve.length; r++)
21
- W.er().je(V.Br, [s.triggerId, t], i.ve[r]);
21
+ W.er().je(V.Mr, [s.triggerId, t], i.ve[r]);
22
22
  return i.S;
23
23
  }
@@ -2,12 +2,12 @@ import e from "../managers/braze-instance.js";
2
2
  import ControlMessage from "./models/control-message.js";
3
3
  import InAppMessage from "./models/in-app-message.js";
4
4
  import pe from "./in-app-message-manager-factory.js";
5
- import { MUST_BE_IN_APP_MESSAGE_WARNING as or } from "../common/constants.js";
5
+ import { MUST_BE_IN_APP_MESSAGE_WARNING as sr } from "../common/constants.js";
6
6
  import r from "../../shared-lib/braze-shared-lib.js";
7
7
  export function logInAppMessageImpression(o) {
8
8
  if (!e.rr()) return !1;
9
9
  if (!(o instanceof InAppMessage || o instanceof ControlMessage))
10
- return r.D.error(or), !1;
11
- const s = o instanceof ControlMessage ? r.A.ro : r.A.bi;
10
+ return r.D.error(sr), !1;
11
+ const s = o instanceof ControlMessage ? r.A.ro : r.A.Mi;
12
12
  return pe.m().G(o, s).S;
13
13
  }
@@ -64,7 +64,7 @@ export default class FullScreenMessage extends InAppMessage {
64
64
  z
65
65
  );
66
66
  }
67
- get He() {
67
+ get Le() {
68
68
  return InAppMessage.TextAlignment.CENTER;
69
69
  }
70
70
  }
@@ -38,7 +38,7 @@ export default class HtmlMessage extends InAppMessage {
38
38
  return !1;
39
39
  }
40
40
  k(l) {
41
- if (this.un === InAppMessage.es.ul) {
41
+ if (this.Ce === InAppMessage.es.ul) {
42
42
  if (this.nl) return !1;
43
43
  this.nl = !0;
44
44
  }
@@ -3,12 +3,12 @@ import u from "../../managers/subscription-manager.js";
3
3
  export default class InAppMessageButton {
4
4
  constructor(s, t, i, r, e, h, n) {
5
5
  (this.text = s || ""),
6
- (this.backgroundColor = t || InAppMessage.Ji.Ci),
7
- (this.textColor = i || InAppMessage.Ji.Hi),
6
+ (this.backgroundColor = t || InAppMessage.Xi.Wi),
7
+ (this.textColor = i || InAppMessage.Xi.Yi),
8
8
  (this.borderColor = r || this.backgroundColor),
9
9
  (this.clickAction = e || InAppMessage.ClickAction.NONE),
10
10
  (this.uri = h),
11
- null == n && (n = InAppMessageButton.Mi),
11
+ null == n && (n = InAppMessageButton.$i),
12
12
  (this.id = n),
13
13
  (this.nl = !1),
14
14
  (this.lt = new u());
@@ -37,4 +37,4 @@ export default class InAppMessageButton {
37
37
  );
38
38
  }
39
39
  }
40
- InAppMessageButton.Mi = -1;
40
+ InAppMessageButton.$i = -1;
@@ -51,95 +51,95 @@ export default class InAppMessage {
51
51
  (this.icon = T),
52
52
  (this.imageUrl = a),
53
53
  (this.imageStyle = m || InAppMessage.ImageStyle.TOP),
54
- (this.iconColor = c || InAppMessage.Ji.Hi),
55
- (this.iconBackgroundColor = I || InAppMessage.Ji.Ci),
56
- (this.backgroundColor = A || InAppMessage.Ji.Hi),
57
- (this.textColor = N || InAppMessage.Ji.Li),
58
- (this.closeButtonColor = _ || InAppMessage.Ji.Oi),
54
+ (this.iconColor = c || InAppMessage.Xi.Yi),
55
+ (this.iconBackgroundColor = I || InAppMessage.Xi.Wi),
56
+ (this.backgroundColor = A || InAppMessage.Xi.Yi),
57
+ (this.textColor = N || InAppMessage.Xi.Zi),
58
+ (this.closeButtonColor = _ || InAppMessage.Xi.th),
59
59
  (this.animateIn = L),
60
60
  null == this.animateIn && (this.animateIn = !0),
61
61
  (this.animateOut = d),
62
62
  null == this.animateOut && (this.animateOut = !0),
63
63
  (this.header = O),
64
64
  (this.headerAlignment = S || InAppMessage.TextAlignment.CENTER),
65
- (this.headerTextColor = D || InAppMessage.Ji.Li),
66
- (this.frameColor = M || InAppMessage.Ji.Ri),
65
+ (this.headerTextColor = D || InAppMessage.Xi.Zi),
66
+ (this.frameColor = M || InAppMessage.Xi.sh),
67
67
  (this.buttons = R || []),
68
68
  (this.cropType = b || InAppMessage.CropType.FIT_CENTER),
69
69
  (this.orientation = P),
70
70
  (this.htmlId = p),
71
71
  (this.css = C),
72
72
  (this.isControl = !1),
73
- (this.Pi = !1),
73
+ (this.ih = !1),
74
74
  (this.nl = !1),
75
- (this.Ui = !1),
75
+ (this.eh = !1),
76
76
  (this.lt = new u()),
77
- (this.Wi = new u());
77
+ (this.hh = new u());
78
78
  }
79
79
  subscribeToClickedEvent(t) {
80
80
  return this.lt.ut(t);
81
81
  }
82
82
  subscribeToDismissedEvent(t) {
83
- return this.Wi.ut(t);
83
+ return this.hh.ut(t);
84
84
  }
85
85
  removeSubscription(t) {
86
- this.lt.removeSubscription(t), this.Wi.removeSubscription(t);
86
+ this.lt.removeSubscription(t), this.hh.removeSubscription(t);
87
87
  }
88
88
  removeAllSubscriptions() {
89
- this.lt.removeAllSubscriptions(), this.Wi.removeAllSubscriptions();
89
+ this.lt.removeAllSubscriptions(), this.hh.removeAllSubscriptions();
90
90
  }
91
91
  closeMessage() {
92
- this.on(this.mn);
92
+ this.he(this.qe);
93
93
  }
94
- Ie() {
94
+ xe() {
95
95
  return !0;
96
96
  }
97
97
  ll() {
98
- return this.Ie();
98
+ return this.xe();
99
99
  }
100
- an() {
100
+ Ee() {
101
101
  return null != this.htmlId && this.htmlId.length > 4;
102
102
  }
103
- sn() {
104
- return this.an() && null != this.css && this.css.length > 0;
103
+ ye() {
104
+ return this.Ee() && null != this.css && this.css.length > 0;
105
105
  }
106
- rn() {
107
- if (this.an() && this.sn()) return this.htmlId + "-css";
106
+ Ae() {
107
+ if (this.Ee() && this.ye()) return this.htmlId + "-css";
108
108
  }
109
109
  R() {
110
- return !this.Pi && ((this.Pi = !0), !0);
110
+ return !this.ih && ((this.ih = !0), !0);
111
111
  }
112
112
  Cr() {
113
- return this.Pi;
113
+ return this.ih;
114
114
  }
115
115
  k() {
116
116
  return !this.nl && ((this.nl = !0), this.lt.St(), !0);
117
117
  }
118
118
  J() {
119
- return !this.Ui && ((this.Ui = !0), this.Wi.St(), !0);
119
+ return !this.eh && ((this.eh = !0), this.hh.St(), !0);
120
120
  }
121
- Ki(t) {
121
+ nh(t) {
122
122
  if (t && t.parentNode) {
123
123
  let s = t.closest(".ab-iam-root");
124
- if ((null == s && (s = t), this.Ie() && null != s.parentNode)) {
124
+ if ((null == s && (s = t), this.xe() && null != s.parentNode)) {
125
125
  const t = s.parentNode.classList;
126
- t && t.contains(InAppMessage.Yi) && t.remove(InAppMessage.Yi),
127
- document.body.removeEventListener("touchmove", InAppMessage.Xi);
126
+ t && t.contains(InAppMessage.rh) && t.remove(InAppMessage.rh),
127
+ document.body.removeEventListener("touchmove", InAppMessage.oh);
128
128
  }
129
- s.className = s.className.replace(InAppMessage.Vi, InAppMessage.Qi);
129
+ s.className = s.className.replace(InAppMessage.lh, InAppMessage.Eh);
130
130
  }
131
131
  return this.animateOut;
132
132
  }
133
- on(t, s) {
133
+ he(t, s) {
134
134
  if (null == t) return;
135
135
  let i;
136
- (this.mn = null),
136
+ (this.qe = null),
137
137
  (i =
138
138
  -1 === t.className.indexOf("ab-in-app-message")
139
139
  ? t.getElementsByClassName("ab-in-app-message")[0]
140
140
  : t);
141
141
  let e = !1;
142
- i && (e = this.Ki(i));
142
+ i && (e = this.nh(i));
143
143
  const h = document.body;
144
144
  if (null != h) var n = h.scrollTop;
145
145
  const r = () => {
@@ -147,47 +147,47 @@ export default class InAppMessage {
147
147
  let s = t.closest(".ab-iam-root");
148
148
  null == s && (s = t), s.parentNode && s.parentNode.removeChild(s);
149
149
  }
150
- if (null != this.rn()) {
151
- const t = document.getElementById(this.rn());
150
+ if (null != this.Ae()) {
151
+ const t = document.getElementById(this.Ae());
152
152
  t && t.parentNode && t.parentNode.removeChild(t);
153
153
  }
154
154
  null != h && "Safari" === ot.browser && (h.scrollTop = n),
155
155
  s ? s() : this.J();
156
156
  };
157
- e ? setTimeout(r, InAppMessage.Zi) : r(), this.Le && this.Le.focus();
157
+ e ? setTimeout(r, InAppMessage.uh) : r(), this.ke && this.ke.focus();
158
158
  }
159
- Oe() {
159
+ Be() {
160
160
  return document.createTextNode(this.message);
161
161
  }
162
- Je(t) {
162
+ Ie(t) {
163
163
  let s = "";
164
- this.message || this.header || !this.Ie() || (s = "Modal Image"),
164
+ this.message || this.header || !this.xe() || (s = "Modal Image"),
165
165
  t.setAttribute("alt", s);
166
166
  }
167
- static Xi(t) {
167
+ static oh(t) {
168
168
  (t.targetTouches && t.targetTouches.length > 1) ||
169
169
  (t.target.classList &&
170
170
  t.target.classList.contains("ab-message-text") &&
171
171
  t.target.scrollHeight > t.target.clientHeight) ||
172
- (document.querySelector(`.${InAppMessage.Yi}`) && t.preventDefault());
172
+ (document.querySelector(`.${InAppMessage.rh}`) && t.preventDefault());
173
173
  }
174
- th(t) {
175
- this.Ie() &&
174
+ Th(t) {
175
+ this.xe() &&
176
176
  null != t.parentNode &&
177
177
  this.orientation !== InAppMessage.Orientation.LANDSCAPE &&
178
178
  (null != t.parentNode.classList &&
179
- t.parentNode.classList.add(InAppMessage.Yi),
179
+ t.parentNode.classList.add(InAppMessage.rh),
180
180
  document.body.addEventListener(
181
181
  "touchmove",
182
- InAppMessage.Xi,
182
+ InAppMessage.oh,
183
183
  !!Tt() && { passive: !1 }
184
184
  )),
185
- (t.className += " " + InAppMessage.Vi);
185
+ (t.className += " " + InAppMessage.lh);
186
186
  }
187
- static sh(t) {
187
+ static ah(t) {
188
188
  if (
189
- t.keyCode === at.ih &&
190
- !e.nn(T.eh) &&
189
+ t.keyCode === at.mh &&
190
+ !e.nn(T.Ih) &&
191
191
  document.querySelectorAll(".ab-modal-interactions").length > 0
192
192
  ) {
193
193
  const t = document.getElementsByClassName("ab-html-message");
@@ -206,33 +206,33 @@ export default class InAppMessage {
206
206
  }
207
207
  }
208
208
  }
209
- hh() {
210
- this.nh ||
211
- e.nn(T.eh) ||
212
- (document.addEventListener("keydown", InAppMessage.sh, !1),
213
- e.rh(() => {
214
- document.removeEventListener("keydown", InAppMessage.sh);
209
+ Ah() {
210
+ this.Nh ||
211
+ e.nn(T.Ih) ||
212
+ (document.addEventListener("keydown", InAppMessage.ah, !1),
213
+ e._h(() => {
214
+ document.removeEventListener("keydown", InAppMessage.ah);
215
215
  }),
216
- (this.nh = !0));
216
+ (this.Nh = !0));
217
217
  }
218
218
  }
219
- (InAppMessage.Ji = {
220
- Li: 4281545523,
221
- Hi: 4294967295,
222
- Ci: 4278219733,
223
- oh: 4293914607,
224
- lh: 4283782485,
225
- Ri: 3224580915,
226
- Oi: 4288387995
219
+ (InAppMessage.Xi = {
220
+ Zi: 4281545523,
221
+ Yi: 4294967295,
222
+ Wi: 4278219733,
223
+ Lh: 4293914607,
224
+ dh: 4283782485,
225
+ sh: 3224580915,
226
+ th: 4288387995
227
227
  }),
228
- (InAppMessage.Ge = {
229
- Eh: "hd",
230
- Ee: "ias",
231
- uh: "of",
232
- Th: "do",
233
- Gi: "umt",
234
- $i: "tf",
235
- ah: "te"
228
+ (InAppMessage.Me = {
229
+ Oh: "hd",
230
+ ze: "ias",
231
+ Sh: "of",
232
+ Dh: "do",
233
+ Li: "umt",
234
+ Ri: "tf",
235
+ Mh: "te"
236
236
  }),
237
237
  (InAppMessage.SlideFrom = { TOP: "TOP", BOTTOM: "BOTTOM" }),
238
238
  (InAppMessage.ClickAction = {
@@ -257,15 +257,15 @@ export default class InAppMessage {
257
257
  FIT_CENTER: "FIT_CENTER"
258
258
  }),
259
259
  (InAppMessage.es = {
260
- mh: "SLIDEUP",
261
- Ih: "MODAL",
262
- Ye: "MODAL_STYLED",
260
+ Rh: "SLIDEUP",
261
+ bh: "MODAL",
262
+ Ne: "MODAL_STYLED",
263
263
  Tr: "FULL",
264
264
  ul: "WEB_HTML",
265
- cn: "HTML"
265
+ Pe: "HTML"
266
266
  }),
267
- (InAppMessage.Zi = 500),
268
- (InAppMessage.Ah = 200),
269
- (InAppMessage.Vi = "ab-show"),
270
- (InAppMessage.Qi = "ab-hide"),
271
- (InAppMessage.Yi = "ab-pause-scrolling");
267
+ (InAppMessage.uh = 500),
268
+ (InAppMessage.Ph = 200),
269
+ (InAppMessage.lh = "ab-show"),
270
+ (InAppMessage.Eh = "ab-hide"),
271
+ (InAppMessage.rh = "ab-pause-scrolling");
@@ -61,8 +61,8 @@ export default class ModalMessage extends InAppMessage {
61
61
  y
62
62
  );
63
63
  }
64
- get He() {
64
+ get Le() {
65
65
  return InAppMessage.TextAlignment.CENTER;
66
66
  }
67
67
  }
68
- ModalMessage.es = InAppMessage.es.Ih;
68
+ ModalMessage.es = InAppMessage.es.bh;