@braze/web-sdk 6.12.0 → 6.13.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 (149) hide show
  1. package/index.d.ts +240 -3
  2. package/package.json +1 -1
  3. package/shared-lib/event-types.js +18 -18
  4. package/shared-lib/indexed-db-adapter.js +58 -58
  5. package/shared-lib/logger.js +7 -7
  6. package/shared-lib/supported-options.js +25 -24
  7. package/src/ConversationalChat/automatically-manage-chat.js +5 -0
  8. package/src/ConversationalChat/chat-message-factory.js +25 -0
  9. package/src/ConversationalChat/chat-message.js +33 -0
  10. package/src/ConversationalChat/constants.js +1 -0
  11. package/src/ConversationalChat/conversational-chat-provider-factory.js +26 -0
  12. package/src/ConversationalChat/conversational-chat-provider.js +372 -0
  13. package/src/ConversationalChat/display/chat-widget-manager.js +113 -0
  14. package/src/ConversationalChat/display/chat-widget-to-html.js +58 -0
  15. package/src/ConversationalChat/get-chat-messages.js +7 -0
  16. package/src/ConversationalChat/index.js +12 -0
  17. package/src/ConversationalChat/is-chat-conversation-ended.js +7 -0
  18. package/src/ConversationalChat/is-chat-turn-errored.js +7 -0
  19. package/src/ConversationalChat/is-chat-turn-in-progress.js +7 -0
  20. package/src/ConversationalChat/register-chat-action-handler.js +10 -0
  21. package/src/ConversationalChat/reset-chat-conversation.js +5 -0
  22. package/src/ConversationalChat/retrieve-chat-config.js +7 -0
  23. package/src/ConversationalChat/send-chat-message.js +17 -0
  24. package/src/ConversationalChat/subscribe-to-chat-action.js +5 -0
  25. package/src/ConversationalChat/subscribe-to-chat-conversation-updated.js +5 -0
  26. package/src/ConversationalChat/subscribe-to-chat-message-received.js +5 -0
  27. package/src/ConversationalChat/trigger-chat-action.js +11 -0
  28. package/src/ConversationalChat/types.js +1 -0
  29. package/src/Core/add-sdk-metadata.js +5 -5
  30. package/src/Core/change-user.js +6 -6
  31. package/src/Core/disable-sdk.js +6 -6
  32. package/src/Core/enable-sdk.js +3 -3
  33. package/src/Core/get-device-id.js +2 -2
  34. package/src/Core/handle-braze-action.js +20 -13
  35. package/src/Core/is-disabled.js +1 -1
  36. package/src/Core/is-initialized.js +1 -1
  37. package/src/Core/log-custom-event.js +9 -9
  38. package/src/Core/log-ecommerce-event.js +4 -4
  39. package/src/Core/log-purchase.js +14 -14
  40. package/src/Core/open-session.js +8 -8
  41. package/src/Core/set-sdk-authentication-signature.js +3 -3
  42. package/src/Core/subscribe-to-sdk-authentication-failures.js +1 -1
  43. package/src/Core/wipe-data.js +1 -1
  44. package/src/DUST/dust-config-store.js +35 -35
  45. package/src/DUST/dust-message-dedup.js +3 -3
  46. package/src/DUST/dust-provider-factory.js +10 -10
  47. package/src/DUST/dust-provider.js +234 -234
  48. package/src/DUST/subscribe-to-dust.js +7 -7
  49. package/src/FeatureFlags/feature-flag-factory.js +2 -2
  50. package/src/FeatureFlags/feature-flag.js +4 -4
  51. package/src/FeatureFlags/feature-flags-provider-factory.js +11 -11
  52. package/src/FeatureFlags/feature-flags-provider.js +38 -38
  53. package/src/FeatureFlags/get-all-feature-flags.js +3 -3
  54. package/src/FeatureFlags/get-feature-flag.js +3 -3
  55. package/src/FeatureFlags/log-feature-flag-impression.js +4 -4
  56. package/src/FeatureFlags/refresh-feature-flags.js +5 -5
  57. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +3 -3
  58. package/src/InAppMessage/defer-in-app-message.js +1 -1
  59. package/src/InAppMessage/display/html-message-display-utils.js +4 -4
  60. package/src/InAppMessage/display/html-message-to-html.js +13 -13
  61. package/src/InAppMessage/display/in-app-message-to-html.js +20 -20
  62. package/src/InAppMessage/display/modal-utils.js +7 -7
  63. package/src/InAppMessage/in-app-message-factory.js +6 -6
  64. package/src/InAppMessage/in-app-message-manager.js +92 -92
  65. package/src/InAppMessage/log-in-app-message-button-click.js +9 -9
  66. package/src/InAppMessage/log-in-app-message-click.js +7 -7
  67. package/src/InAppMessage/log-in-app-message-html-click.js +6 -6
  68. package/src/InAppMessage/log-in-app-message-impression.js +3 -3
  69. package/src/InAppMessage/models/full-screen-message.js +39 -39
  70. package/src/InAppMessage/models/html-message.js +20 -20
  71. package/src/InAppMessage/models/in-app-message-button.js +2 -2
  72. package/src/InAppMessage/models/in-app-message.js +102 -102
  73. package/src/InAppMessage/models/modal-message.js +38 -38
  74. package/src/InAppMessage/models/slide-up-message.js +34 -34
  75. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  76. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  77. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  78. package/src/InAppMessage/ui/remove-all-visible-in-app-messages.js +3 -3
  79. package/src/InAppMessage/ui/show-in-app-message.js +27 -24
  80. package/src/Push/is-push-blocked.js +2 -2
  81. package/src/Push/is-push-permission-granted.js +2 -2
  82. package/src/Push/is-push-supported.js +2 -2
  83. package/src/Push/push-manager-factory.js +15 -15
  84. package/src/Push/push-manager.js +13 -13
  85. package/src/Push/register-push.js +2 -2
  86. package/src/Push/request-push-permission.js +2 -2
  87. package/src/Push/unregister-push-token-on-server.js +3 -3
  88. package/src/Push/unregister-push.js +3 -3
  89. package/src/Push/utils/push-utils.js +15 -15
  90. package/src/User/user-manager.js +9 -9
  91. package/src/User/user.js +50 -50
  92. package/src/common/constants.js +1 -1
  93. package/src/common/content-cards-display.js +22 -22
  94. package/src/common/event-logger.js +3 -3
  95. package/src/index.js +2 -9
  96. package/src/l10n/l10n-manager-factory.js +4 -4
  97. package/src/l10n/l10n-manager.js +6 -6
  98. package/src/managers/auth-manager.js +28 -28
  99. package/src/managers/braze-action-manager.js +14 -0
  100. package/src/managers/braze-instance.js +159 -151
  101. package/src/managers/device-manager.js +26 -26
  102. package/src/managers/network-manager.js +120 -120
  103. package/src/managers/server-config-manager.js +95 -86
  104. package/src/managers/session-manager.js +25 -25
  105. package/src/managers/storage-manager-factory.js +12 -12
  106. package/src/managers/storage-manager.js +129 -124
  107. package/src/managers/subscription-manager.js +8 -8
  108. package/src/models/backend-errors.js +5 -5
  109. package/src/models/braze-event.js +5 -5
  110. package/src/models/device.js +2 -2
  111. package/src/models/identifier.js +8 -8
  112. package/src/models/push-token.js +6 -6
  113. package/src/models/request-result.js +2 -2
  114. package/src/models/server-config.js +27 -27
  115. package/src/request-controller.js +117 -117
  116. package/src/standard-index.js +9 -0
  117. package/src/triggers/models/custom-event-data.js +4 -4
  118. package/src/triggers/models/custom-event-property-data.js +5 -5
  119. package/src/triggers/models/filter-set.js +5 -5
  120. package/src/triggers/models/filter.js +31 -31
  121. package/src/triggers/models/in-app-message-click-data.js +9 -9
  122. package/src/triggers/models/purchase-data.js +1 -1
  123. package/src/triggers/models/purchase-property-data.js +5 -5
  124. package/src/triggers/models/push-click-data.js +4 -4
  125. package/src/triggers/models/trigger-condition.js +35 -35
  126. package/src/triggers/models/trigger-events.js +3 -3
  127. package/src/triggers/models/trigger.js +36 -36
  128. package/src/triggers/triggers-provider-factory.js +5 -5
  129. package/src/triggers/triggers-provider.js +128 -128
  130. package/src/types.js +2 -2
  131. package/src/ui/js/attach-css.js +1 -1
  132. package/src/ui/js/chat-widget-css.js +11 -0
  133. package/src/ui/js/load-font-awesome.js +1 -1
  134. package/src/util/base-device-parser.js +7 -7
  135. package/src/util/braze-actions.js +5 -5
  136. package/src/util/browser-detector.js +41 -41
  137. package/src/util/client-hints-parser.js +10 -10
  138. package/src/util/component-utils.js +1 -1
  139. package/src/util/date-utils.js +2 -2
  140. package/src/util/device-constants.js +5 -5
  141. package/src/util/dom-utils.js +8 -8
  142. package/src/util/ecommerce-event-validation.js +13 -13
  143. package/src/util/html-display-utils.js +6 -6
  144. package/src/util/key-codes.js +1 -1
  145. package/src/util/net.js +82 -44
  146. package/src/util/request-header-utils.js +26 -24
  147. package/src/util/user-agent-parser.js +21 -21
  148. package/src/util/validation-utils.js +29 -21
  149. package/src/util/window-utils.js +3 -3
@@ -9,35 +9,36 @@ import {
9
9
  REQUEST_BACKOFF_MIN_SLEEP_MS_DEFAULT as d,
10
10
  REQUEST_BACKOFF_SCALE_FACTOR_DEFAULT as m,
11
11
  } from "../common/constants.js";
12
- export default class li {
12
+ export default class Ei {
13
13
  constructor(t) {
14
14
  (this.j = t),
15
15
  (this.j = t),
16
- (this.Gl = new f()),
17
- (this._l = new f()),
18
- (this.Ol = new f()),
19
- (this.Vl = new f()),
20
- (this.Hl = new f()),
21
- (this.Jl = new f()),
22
- (this.Ql = null),
23
- (this.Wl = null);
24
- }
25
- Yl() {
26
- if (null == this.Wl) {
27
- const t = this.j.St(s.It.Zl);
28
- this.Wl = null != t ? vi._u(t) : new vi();
16
+ (this.ld = new f()),
17
+ (this.dd = new f()),
18
+ (this.vd = new f()),
19
+ (this.md = new f()),
20
+ (this.gd = new f()),
21
+ (this.bd = new f()),
22
+ (this.fd = null),
23
+ (this.pd = null);
24
+ }
25
+ Cd() {
26
+ var t;
27
+ if (null == this.pd) {
28
+ const i = null === (t = this.j) || void 0 === t ? void 0 : t.St(s.It.Rd);
29
+ this.pd = null != i ? vi._u(i) : new vi();
29
30
  }
30
- return this.Wl;
31
+ return this.pd;
31
32
  }
32
33
  Qt() {
33
- return this.Yl().ed;
34
+ return this.Cd().Ed;
34
35
  }
35
- sd(t) {
36
+ wd(t) {
36
37
  var i, e, n, l, r, o;
37
38
  if (null != t && null != t.config) {
38
39
  const u = t.config;
39
- if (u.time > this.Yl().ed) {
40
- const t = (t) => (null == t ? this.Yl().nd : t),
40
+ if (u.time > this.Cd().Ed) {
41
+ const t = (t) => (null == t ? this.Cd().Bd : t),
41
42
  a = new vi(
42
43
  u.time,
43
44
  u.events_blacklist,
@@ -55,122 +56,123 @@ export default class li {
55
56
  u.conversational_chat,
56
57
  );
57
58
  let h = !1;
58
- null != a.ld && this.Wu() !== a.ld && (h = !0);
59
+ null != a.Td && this.Wu() !== a.Td && (h = !0);
59
60
  let d = !1;
60
- null != a.ud.enabled && this.Pi() !== a.ud.enabled && (d = !0);
61
- let c = !1;
62
- null != a.Rr.enabled && this.Kr() !== a.Rr.enabled && (c = !0);
61
+ null != a.yd.enabled && this.Pi() !== a.yd.enabled && (d = !0);
63
62
  let v = !1;
63
+ null != a.Rr.enabled && this.Qr() !== a.Rr.enabled && (v = !0);
64
+ let c = !1;
64
65
  null !=
65
66
  (null === (i = a.banners) || void 0 === i ? void 0 : i.enabled) &&
66
67
  this.Ot() !==
67
68
  (null === (e = a.banners) || void 0 === e ? void 0 : e.enabled) &&
68
- (v = !0);
69
+ (c = !0);
69
70
  let m = !1;
70
71
  null != (null === (n = a.dust) || void 0 === n ? void 0 : n.enabled) &&
71
- this.$n() !==
72
+ this.Ih() !==
72
73
  (null === (l = a.dust) || void 0 === l ? void 0 : l.enabled) &&
73
74
  (m = !0);
74
75
  let g = !1;
75
- null != (null === (r = a.ad) || void 0 === r ? void 0 : r.enabled) &&
76
- this.hd() !==
77
- (null === (o = a.ad) || void 0 === o ? void 0 : o.enabled) &&
76
+ null != (null === (r = a.Md) || void 0 === r ? void 0 : r.enabled) &&
77
+ this.Zi() !==
78
+ (null === (o = a.Md) || void 0 === o ? void 0 : o.enabled) &&
78
79
  (g = !0),
79
- (this.Wl = a),
80
- this.j.Pt(s.It.Zl, a.qt()),
81
- h && this.Gl.A(),
82
- d && this._l.A(),
83
- c && this.Ol.A(),
84
- v && this.Vl.A(),
85
- m && this.Hl.A(),
86
- g && this.Jl.A();
80
+ null != a.Md && this.dn() !== (a.Md.widget_url || null) && (g = !0),
81
+ (this.pd = a),
82
+ this.j.Pt(s.It.Rd, a.qt()),
83
+ h && this.ld.A(),
84
+ d && this.dd.A(),
85
+ v && this.vd.A(),
86
+ c && this.md.A(),
87
+ m && this.gd.A(),
88
+ g && this.bd.A();
87
89
  }
88
90
  }
89
91
  }
90
92
  ju(t) {
91
- const i = this.Gl.Ut(t);
92
- return this.Ql && this.Gl.removeSubscription(this.Ql), (this.Ql = i), i;
93
+ const i = this.ld.Ut(t);
94
+ return this.fd && this.ld.removeSubscription(this.fd), (this.fd = i), i;
93
95
  }
94
96
  $i(t) {
95
- return this._l.Ut(t);
97
+ return this.dd.Ut(t);
96
98
  }
97
- do(t) {
98
- return this.Ol.Ut(t);
99
+ po(t) {
100
+ return this.vd.Ut(t);
99
101
  }
100
102
  V(t) {
101
- return this.Vl.Ut(t);
103
+ return this.md.Ut(t);
102
104
  }
103
105
  Tr(t) {
104
- return this.Hl.Ut(t);
106
+ return this.gd.Ut(t);
105
107
  }
106
- dd(t) {
107
- return this.Jl.Ut(t);
108
+ ln(t) {
109
+ return this.bd.Ut(t);
108
110
  }
109
- $e(t) {
110
- return -1 !== this.Yl().vd.indexOf(t);
111
+ Le(t) {
112
+ return -1 !== this.Cd().Sd.indexOf(t);
111
113
  }
112
114
  zu(t) {
113
- return -1 !== this.Yl().md.indexOf(t);
115
+ return -1 !== this.Cd().Fd.indexOf(t);
114
116
  }
115
- $r(t) {
116
- return -1 !== this.Yl().gd.indexOf(t);
117
+ Pr(t) {
118
+ return -1 !== this.Cd().Ld.indexOf(t);
117
119
  }
118
- bd() {
119
- return this.Yl().fd;
120
+ jd() {
121
+ return this.Cd().kd;
120
122
  }
121
123
  Wu() {
122
- return this.Yl().ld;
124
+ return this.Cd().Td;
123
125
  }
124
126
  Pi() {
125
- return this.Yl().ud.enabled || !1;
127
+ return this.Cd().yd.enabled || !1;
126
128
  }
127
- pd() {
128
- const t = this.Yl().nd;
129
+ Dd() {
130
+ const t = this.Cd().Bd;
129
131
  return !(!t || null == t.enabled) && t.enabled;
130
132
  }
131
- Kl() {
132
- if (!this.pd()) return -1;
133
- const t = this.Yl().nd;
133
+ nd() {
134
+ if (!this.Dd()) return -1;
135
+ const t = this.Cd().Bd;
134
136
  return null == t.capacity || t.capacity < 10 ? -1 : t.capacity;
135
137
  }
136
- Pl() {
137
- if (!this.pd()) return -1;
138
- const t = this.Yl().nd;
138
+ ad() {
139
+ if (!this.Dd()) return -1;
140
+ const t = this.Cd().Bd;
139
141
  return null == t.refill_rate || t.refill_rate <= 0 ? -1 : t.refill_rate;
140
142
  }
141
- Rd(t) {
142
- const i = this.Yl().nd.endpoint_overrides;
143
+ Nd(t) {
144
+ const i = this.Cd().Bd.endpoint_overrides;
143
145
  return null == i ? null : i[t];
144
146
  }
145
- Ul(t) {
146
- const i = this.Rd(t);
147
+ hd(t) {
148
+ const i = this.Nd(t);
147
149
  return null == i || isNaN(i.capacity) || i.capacity <= 0 ? -1 : i.capacity;
148
150
  }
149
- xl(t) {
150
- const i = this.Rd(t);
151
+ ud(t) {
152
+ const i = this.Nd(t);
151
153
  return null == i || isNaN(i.refill_rate) || i.refill_rate <= 0
152
154
  ? -1
153
155
  : i.refill_rate;
154
156
  }
155
- Kr() {
156
- return this.Yl().Rr.enabled && null == this.Fo()
157
- ? (v.Dt(p._a, { e: "Missing feature flag refresh_rate_limit." }), !1)
158
- : this.Yl().Rr.enabled || !1;
157
+ Qr() {
158
+ return this.Cd().Rr.enabled && null == this.wo()
159
+ ? (v.Dt(p.Zl, { e: "Missing feature flag refresh_rate_limit." }), !1)
160
+ : this.Cd().Rr.enabled || !1;
159
161
  }
160
- Fo() {
161
- return this.Yl().Rr.refresh_rate_limit;
162
+ wo() {
163
+ return this.Cd().Rr.refresh_rate_limit;
162
164
  }
163
165
  Ot() {
164
166
  var t;
165
167
  return (
166
- (null === (t = this.Yl().banners) || void 0 === t ? void 0 : t.enabled) ||
168
+ (null === (t = this.Cd().banners) || void 0 === t ? void 0 : t.enabled) ||
167
169
  null
168
170
  );
169
171
  }
170
172
  re() {
171
173
  var t;
172
174
  return (
173
- (null === (t = this.Yl().banners) || void 0 === t
175
+ (null === (t = this.Cd().banners) || void 0 === t
174
176
  ? void 0
175
177
  : t.max_placements) || 0
176
178
  );
@@ -178,27 +180,34 @@ export default class li {
178
180
  Gt() {
179
181
  var t;
180
182
  const i =
181
- null === (t = this.Yl().banners) || void 0 === t
183
+ null === (t = this.Cd().banners) || void 0 === t
182
184
  ? void 0
183
185
  : t.dismissals_cache_size;
184
186
  return null != i && "number" == typeof i && i > 0 ? i : u;
185
187
  }
186
- $n() {
188
+ Ih() {
189
+ var t;
190
+ return (
191
+ (null === (t = this.Cd().dust) || void 0 === t ? void 0 : t.enabled) || !1
192
+ );
193
+ }
194
+ Zi() {
187
195
  var t;
188
196
  return (
189
- (null === (t = this.Yl().dust) || void 0 === t ? void 0 : t.enabled) || !1
197
+ (null === (t = this.Cd().Md) || void 0 === t ? void 0 : t.enabled) || !1
190
198
  );
191
199
  }
192
- hd() {
200
+ dn() {
193
201
  var t;
194
202
  return (
195
- (null === (t = this.Yl().ad) || void 0 === t ? void 0 : t.enabled) || !1
203
+ (null === (t = this.Cd().Md) || void 0 === t ? void 0 : t.widget_url) ||
204
+ null
196
205
  );
197
206
  }
198
207
  vt() {
199
208
  var t;
200
209
  const i =
201
- null === (t = this.Yl().Cd) || void 0 === t
210
+ null === (t = this.Cd().xd) || void 0 === t
202
211
  ? void 0
203
212
  : t.min_sleep_duration_ms;
204
213
  return null != i ? i : d;
@@ -206,18 +215,18 @@ export default class li {
206
215
  gt() {
207
216
  var t;
208
217
  const i =
209
- null === (t = this.Yl().Cd) || void 0 === t ? void 0 : t.scale_factor;
218
+ null === (t = this.Cd().xd) || void 0 === t ? void 0 : t.scale_factor;
210
219
  return null != i ? i : m;
211
220
  }
212
221
  bt() {
213
222
  var t;
214
223
  const i =
215
- null === (t = this.Yl().Cd) || void 0 === t
224
+ null === (t = this.Cd().xd) || void 0 === t
216
225
  ? void 0
217
226
  : t.max_sleep_duration_ms;
218
227
  return null != i ? i : c;
219
228
  }
220
- Ed() {
221
- return this.Yl().wd;
229
+ qd() {
230
+ return this.Cd().Gd;
222
231
  }
223
232
  }
@@ -1,6 +1,6 @@
1
1
  import { STORAGE_KEYS as s } from "../managers/storage-manager.js";
2
2
  import ve from "../models/braze-event.js";
3
- import _t from "../models/identifier.js";
3
+ import Ut from "../models/identifier.js";
4
4
  import { convertMsToSeconds as X } from "../util/date-utils.js";
5
5
  import {
6
6
  logger as b,
@@ -8,7 +8,7 @@ import {
8
8
  EventTypes as p,
9
9
  } from "../../shared-lib/index.js";
10
10
  import { DEFAULT_MINIMUM_SESSION_TIMEOUT_IN_MS as ts } from "./constants.js";
11
- export default class fi {
11
+ export default class Ii {
12
12
  constructor(s, t, i, e) {
13
13
  (this.j = s),
14
14
  (this.Ss = t),
@@ -17,7 +17,7 @@ export default class fi {
17
17
  (this.j = s),
18
18
  (this.Ss = t),
19
19
  (this.h = i);
20
- const n = this.h.Ed();
20
+ const n = this.h.qd();
21
21
  (this.im = n ? 1e3 * n : ts),
22
22
  (null == e || isNaN(e)) && (e = 1800),
23
23
  e < this.im / 1e3 &&
@@ -33,47 +33,47 @@ export default class fi {
33
33
  nm(s, t) {
34
34
  return new ve(this.Ss.getUserId(), p.hm, s, t.Iu, { d: X(s - t.lm) });
35
35
  }
36
- al() {
37
- return this.j.$u(s.Ou.um);
36
+ Kl() {
37
+ return this.j.$u(s.Ou.am);
38
38
  }
39
39
  $t() {
40
- const t = this.j.$u(s.Ou.um);
40
+ const t = this.j.$u(s.Ou.am);
41
41
  return null == t ? null : t.Iu;
42
42
  }
43
- am() {
43
+ dm() {
44
44
  const t = new Date().valueOf(),
45
- i = this.h.bd();
45
+ i = this.h.jd();
46
46
  if (null == i) return !1;
47
- const e = this.j.St(s.It.dm),
47
+ const e = this.j.St(s.It.fm),
48
48
  n = null == e || t - e > 1e3 * i;
49
- return n && this.j.Pt(s.It.dm, t), n;
49
+ return n && this.j.Pt(s.It.fm, t), n;
50
50
  }
51
- ul(s, t) {
52
- return null == t || null == t.fm || (!(s - t.lm < this.im) && t.fm < s);
51
+ Fl(s, t) {
52
+ return null == t || null == t.pm || (!(s - t.lm < this.im) && t.pm < s);
53
53
  }
54
- el() {
54
+ ol() {
55
55
  const t = new Date().valueOf(),
56
56
  i = t + 1e3 * this.tm,
57
- e = this.j.$u(s.Ou.um);
58
- if (this.ul(t, e)) {
57
+ e = this.j.$u(s.Ou.am);
58
+ if (this.Fl(t, e)) {
59
59
  let n = "Generating session start event with time " + t;
60
60
  if (null != e) {
61
- let s = e.pm;
61
+ let s = e.gm;
62
62
  s - e.lm < this.im && (s = e.lm + this.im),
63
- this.j.gm(this.nm(s, e)),
63
+ this.j.wm(this.nm(s, e)),
64
64
  (n += " (old session ended " + s + ")");
65
65
  }
66
66
  (n += ". Will expire " + i.valueOf()), b.info(n);
67
- const r = new _t(V.de(), i);
68
- this.j.gm(new ve(this.Ss.getUserId(), p.wm, t, r.Iu)),
69
- this.j.Ju(s.Ou.um, r);
70
- return null == this.j.St(s.It.dm) && this.j.Pt(s.It.dm, t), r.Iu;
67
+ const r = new Ut(V.de(), i);
68
+ this.j.wm(new ve(this.Ss.getUserId(), p.Sm, t, r.Iu)),
69
+ this.j.Ju(s.Ou.am, r);
70
+ return null == this.j.St(s.It.fm) && this.j.Pt(s.It.fm, t), r.Iu;
71
71
  }
72
- if (null != e) return (e.pm = t), (e.fm = i), this.j.Ju(s.Ou.um, e), e.Iu;
72
+ if (null != e) return (e.gm = t), (e.pm = i), this.j.Ju(s.Ou.am, e), e.Iu;
73
73
  }
74
- Sm() {
75
- const t = this.j.$u(s.Ou.um);
74
+ jm() {
75
+ const t = this.j.$u(s.Ou.am);
76
76
  null != t &&
77
- (this.j.jm(s.Ou.um), this.j.gm(this.nm(new Date().valueOf(), t)));
77
+ (this.j.xm(s.Ou.am), this.j.wm(this.nm(new Date().valueOf(), t)));
78
78
  }
79
79
  }
@@ -1,14 +1,14 @@
1
1
  import ne, { STORAGE_KEYS as s } from "./storage-manager.js";
2
2
  import { logger as b } from "../../shared-lib/index.js";
3
- const di = {
4
- rl: function (o, t = !1, e) {
5
- const r = di.oc(),
6
- a = di.sl(),
7
- n = new ne.tc(o, r && !t, a, e);
3
+ const _i = {
4
+ Bl: function (o, t = !1, e) {
5
+ const r = _i.og(),
6
+ a = _i.zl(),
7
+ n = new ne.tg(o, r && !t, a, e);
8
8
  let c;
9
- return (c = a ? new ne.ec(o) : new ne.rc()), new ne(n, c);
9
+ return (c = a ? new ne.eg(o) : new ne.rg()), new ne(n, c);
10
10
  },
11
- oc: function () {
11
+ og: function () {
12
12
  return (
13
13
  navigator.cookieEnabled ||
14
14
  ("cookie" in document &&
@@ -17,14 +17,14 @@ const di = {
17
17
  -1))
18
18
  );
19
19
  },
20
- sl: function () {
20
+ zl: function () {
21
21
  let o = !1;
22
22
  try {
23
23
  if (localStorage && localStorage.getItem)
24
24
  try {
25
- localStorage.setItem(s.It.ac, "true"),
26
- localStorage.getItem(s.It.ac)
27
- ? (localStorage.removeItem(s.It.ac), (o = !0))
25
+ localStorage.setItem(s.It.ag, "true"),
26
+ localStorage.getItem(s.It.ag)
27
+ ? (localStorage.removeItem(s.It.ag), (o = !0))
28
28
  : (o = !1);
29
29
  } catch (t) {
30
30
  if (
@@ -44,4 +44,4 @@ const di = {
44
44
  return o;
45
45
  },
46
46
  };
47
- export default di;
47
+ export default _i;