@mparticle/web-rokt-kit 3.2.0 → 3.2.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.
@@ -1,4 +1,4 @@
1
- const ve = [
1
+ const Ae = [
2
2
  "active_time_on_site_ms",
3
3
  "billingaddress1",
4
4
  "billingaddress2",
@@ -23,15 +23,15 @@ const ve = [
23
23
  "shippingstate",
24
24
  "shippingzipcode",
25
25
  "totalprice"
26
- ], Pe = new Set(ve);
27
- function ue(i) {
28
- return Pe.has(i.toLowerCase());
26
+ ], ve = new Set(Ae);
27
+ function le(i) {
28
+ return ve.has(i.toLowerCase());
29
29
  }
30
- function L(i) {
30
+ function T(i) {
31
31
  const e = {}, t = i || {}, n = Object.keys(t);
32
32
  for (let r = 0; r < n.length; r++) {
33
33
  const s = n[r];
34
- ue(s) || (e[s] = t[s]);
34
+ le(s) || (e[s] = t[s]);
35
35
  }
36
36
  return e;
37
37
  }
@@ -41,13 +41,13 @@ function E(i) {
41
41
  function m(i) {
42
42
  return typeof i == "string";
43
43
  }
44
- function O(i) {
44
+ function L(i) {
45
45
  return typeof i == "function";
46
46
  }
47
- function T(i) {
47
+ function w(i) {
48
48
  return i == null ? !0 : typeof i == "string" ? i.length === 0 : typeof i == "object" ? Object.keys(i).length === 0 : !1;
49
49
  }
50
- function j(i) {
50
+ function Y(i) {
51
51
  try {
52
52
  const e = new URL(i);
53
53
  return e.search = "", e.toString();
@@ -55,21 +55,21 @@ function j(i) {
55
55
  return i;
56
56
  }
57
57
  }
58
- function de(i) {
58
+ function ue(i) {
59
59
  let e = 5381;
60
60
  for (let t = 0; t < i.length; t++)
61
61
  e = (e << 5) + e + i.charCodeAt(t), e = e & e;
62
62
  return e;
63
63
  }
64
- const _ = "mp-rokt-kit", J = "__rokt_ls_probe__";
65
- function x() {
64
+ const _ = "mp-rokt-kit", q = "__rokt_ls_probe__";
65
+ function F() {
66
66
  try {
67
- return window.localStorage.setItem(J, "1"), window.localStorage.removeItem(J), !0;
67
+ return window.localStorage.setItem(q, "1"), window.localStorage.removeItem(q), !0;
68
68
  } catch {
69
69
  return !1;
70
70
  }
71
71
  }
72
- function V(i) {
72
+ function j(i) {
73
73
  try {
74
74
  const e = window.localStorage.getItem(i);
75
75
  return e === null ? null : JSON.parse(e);
@@ -77,56 +77,56 @@ function V(i) {
77
77
  return null;
78
78
  }
79
79
  }
80
- function he(i, e) {
80
+ function de(i, e) {
81
81
  try {
82
82
  return window.localStorage.setItem(i, JSON.stringify(e)), !0;
83
83
  } catch {
84
84
  return !1;
85
85
  }
86
86
  }
87
- function be(i) {
87
+ function ke(i) {
88
88
  try {
89
89
  window.localStorage.removeItem(i);
90
90
  } catch {
91
91
  }
92
92
  }
93
- function D(i, e) {
94
- const t = V(i);
93
+ function K(i, e) {
94
+ const t = j(i);
95
95
  return E(t) ? t[e] : void 0;
96
96
  }
97
97
  function G(i, e, t) {
98
- const n = V(i), r = E(n) ? { ...n } : {};
99
- return r[e] = t, he(i, r);
98
+ const n = j(i), r = E(n) ? { ...n } : {};
99
+ return r[e] = t, de(i, r);
100
100
  }
101
- function ge(i, e) {
102
- const t = V(i);
101
+ function he(i, e) {
102
+ const t = j(i);
103
103
  if (!E(t) || !(e in t))
104
104
  return;
105
105
  const n = { ...t };
106
- delete n[e], Object.keys(n).length === 0 ? be(i) : he(i, n);
106
+ delete n[e], Object.keys(n).length === 0 ? ke(i) : de(i, n);
107
107
  }
108
- const H = "pageViews", C = "utmParams", pe = 25, Re = ["utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content"];
109
- function fe(i) {
110
- return i.slice(-pe);
108
+ const V = "pageViews", U = "utmParams", ge = 25, Pe = ["utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content"];
109
+ function pe(i) {
110
+ return i.slice(-ge);
111
111
  }
112
- function B() {
113
- const i = D(_, H);
112
+ function J() {
113
+ const i = K(_, V);
114
114
  return Array.isArray(i) ? i : [];
115
115
  }
116
- function ke(i) {
117
- const e = fe(i);
116
+ function Re(i) {
117
+ const e = pe(i);
118
118
  for (let t = 0; t < e.length; t++) {
119
119
  const n = e.slice(t);
120
- if (G(_, H, n))
120
+ if (G(_, V, n))
121
121
  return n.length;
122
122
  }
123
123
  return 0;
124
124
  }
125
- function Q() {
126
- ge(_, H);
125
+ function B() {
126
+ he(_, V);
127
127
  }
128
- function Te(i) {
129
- const e = fe(i);
128
+ function be(i) {
129
+ const e = pe(i);
130
130
  return e.map((t, n) => {
131
131
  const r = t.activeTimeOnSite, s = r !== void 0 && Number.isFinite(r), a = e[n + 1]?.activeTimeOnSite, u = a !== void 0 && Number.isFinite(a), l = s && u ? a - r : void 0;
132
132
  return {
@@ -141,18 +141,18 @@ function Te(i) {
141
141
  });
142
142
  }
143
143
  function we(i) {
144
- if (D(_, C) !== void 0)
144
+ if (K(_, U) !== void 0)
145
145
  return;
146
146
  const e = new URLSearchParams(window.location.search), t = {};
147
- for (const r of Re) {
147
+ for (const r of Pe) {
148
148
  const s = e.get(r);
149
149
  s && (t[r] = s);
150
150
  }
151
151
  if (Object.keys(t).length === 0)
152
152
  return;
153
153
  const n = Object.keys(t).join(", ");
154
- if (!G(_, C, t)) {
155
- const r = x() ? "quota" : "ls_unavailable";
154
+ if (!G(_, U, t)) {
155
+ const r = F() ? "quota" : "ls_unavailable";
156
156
  i?.log({
157
157
  message: `Rokt Kit: Failed to persist UTM params [reason: ${r}]`,
158
158
  code: "UTM_CAPTURE_FAILED"
@@ -164,17 +164,17 @@ function we(i) {
164
164
  code: "UTM_CAPTURE_SUCCESS"
165
165
  });
166
166
  }
167
- function Le() {
168
- const i = D(_, C);
167
+ function Te() {
168
+ const i = K(_, U);
169
169
  return E(i) ? i : null;
170
170
  }
171
- function X() {
172
- ge(_, C);
171
+ function Q() {
172
+ he(_, U);
173
173
  }
174
- function Oe() {
174
+ function Le() {
175
175
  const e = document.querySelector('link[rel="canonical"]')?.href;
176
176
  if (e)
177
- return j(e);
177
+ return Y(e);
178
178
  }
179
179
  const W = [
180
180
  {
@@ -198,47 +198,35 @@ const W = [
198
198
  ]
199
199
  }
200
200
  ];
201
- function Ne(i, e) {
201
+ function Oe(i, e) {
202
202
  if (i)
203
203
  return W.find((t) => t.accountId === i && t.pathname === e);
204
204
  }
205
- function Ue(i, e) {
205
+ function Ne(i, e) {
206
206
  if (!(!i || !m(e)))
207
207
  return W.find((t) => t.accountId === i && t.targetPageIdentifier === e);
208
208
  }
209
- function Ce(i, e) {
209
+ function Ue(i, e) {
210
210
  return i ? W.some((t) => t.accountId === i && t.attributeKeys.includes(e)) : !1;
211
211
  }
212
- const De = 6e4;
212
+ const Ce = 6e4;
213
213
  function Ke(i) {
214
214
  return E(i) && typeof i.expiresAt == "number" && E(i.attributes);
215
215
  }
216
- function Me(i, e) {
216
+ function De(i, e) {
217
217
  return `activePreselect:${i}:${e}`;
218
218
  }
219
- function Fe(i) {
220
- const e = D(_, i);
219
+ function Me(i) {
220
+ const e = K(_, i);
221
221
  return Ke(e) ? e : null;
222
222
  }
223
- function xe(i, e) {
223
+ function Fe(i, e) {
224
224
  G(_, i, {
225
- expiresAt: Date.now() + De,
225
+ expiresAt: Date.now() + Ce,
226
226
  attributes: e
227
227
  });
228
228
  }
229
- function M(i, e) {
230
- return {
231
- message: `Rokt Kit: ${i} called [attributeKeys=${e.join(",")}]`,
232
- code: "ATTRIBUTE_SETTER_CALLED"
233
- };
234
- }
235
- function Ye(i) {
236
- return {
237
- message: `Rokt Kit: selectPlacements dispatched [placementAttributeKeys=${i.join(",")}]`,
238
- code: "SELECT_PLACEMENTS_DISPATCHED"
239
- };
240
- }
241
- function k(i, e) {
229
+ function b(i, e) {
242
230
  const t = {
243
231
  fired: "PRESELECT_FIRED",
244
232
  missed: "PRESELECT_MISSED",
@@ -250,10 +238,10 @@ function k(i, e) {
250
238
  code: t[i]
251
239
  };
252
240
  }
253
- function je() {
241
+ function xe() {
254
242
  return { pending: [] };
255
243
  }
256
- function F(i, e) {
244
+ function M(i, e) {
257
245
  const t = i.pending.findIndex((n) => n.pathname === e.pathname);
258
246
  if (t >= 0) {
259
247
  i.pending[t] = e;
@@ -261,7 +249,7 @@ function F(i, e) {
261
249
  }
262
250
  i.pending.push(e);
263
251
  }
264
- function Ve(i) {
252
+ function Ye(i) {
265
253
  if (!i?.getUserIdentities)
266
254
  return !1;
267
255
  const e = i.getUserIdentities().userIdentities;
@@ -270,7 +258,7 @@ function Ve(i) {
270
258
  return m(n) && n.length > 0;
271
259
  }) : !1;
272
260
  }
273
- function Ge(i, e) {
261
+ function je(i, e) {
274
262
  Promise.resolve(i.selectPlacements(e)).catch((t) => {
275
263
  const n = t instanceof Error ? t.message : String(t);
276
264
  i.log({
@@ -279,24 +267,24 @@ function Ge(i, e) {
279
267
  });
280
268
  });
281
269
  }
282
- function me(i, e, t, n = window.location.pathname) {
283
- const r = Ne(e.accountId, n);
270
+ function fe(i, e, t, n = window.location.pathname) {
271
+ const r = Oe(e.accountId, n);
284
272
  if (!r)
285
273
  return;
286
274
  if (!e.isKitReady()) {
287
- F(i, { event: t, pathname: n }), e.logPlacementDiagnostic(k("queued", "not_ready"));
275
+ M(i, { event: t, pathname: n }), e.logPlacementDiagnostic(b("queued", "not_ready"));
288
276
  return;
289
277
  }
290
278
  if (!e.isPreselectionEnabled())
291
279
  return;
292
- if (!Ve(e.filteredUser)) {
293
- e.logPlacementDiagnostic(k("missed", "no_valid_identity")), F(i, { event: t, pathname: n });
280
+ if (!Ye(e.filteredUser)) {
281
+ e.logPlacementDiagnostic(b("missed", "no_valid_identity")), M(i, { event: t, pathname: n });
294
282
  return;
295
283
  }
296
284
  const s = e.filteredUser?.getAllUserAttributes?.() || {}, o = {}, a = [];
297
285
  for (const h of r.attributeKeys) {
298
- const S = e.getEventAttributeValue(t, h), p = T(S) ? e.userAttributes[h] ?? s[h] : S;
299
- if (T(p)) {
286
+ const S = e.getEventAttributeValue(t, h), p = w(S) ? e.userAttributes[h] ?? s[h] : S;
287
+ if (w(p)) {
300
288
  a.push(h);
301
289
  continue;
302
290
  }
@@ -304,58 +292,58 @@ function me(i, e, t, n = window.location.pathname) {
304
292
  }
305
293
  if (a.length > 0) {
306
294
  for (const h of a)
307
- e.logPlacementDiagnostic(k("missed", `missing_attribute:${h}`));
308
- F(i, { event: t, pathname: n });
295
+ e.logPlacementDiagnostic(b("missed", `missing_attribute:${h}`));
296
+ M(i, { event: t, pathname: n });
309
297
  return;
310
298
  }
311
- const u = Me(e.accountId || "", n), l = Fe(u), g = !!l && JSON.stringify(l.attributes) === JSON.stringify(o);
299
+ const u = De(e.accountId || "", n), l = Me(u), g = !!l && JSON.stringify(l.attributes) === JSON.stringify(o);
312
300
  if (l && l.expiresAt > Date.now() && g) {
313
- e.logPlacementDiagnostic(k("skipped", "active_preselection"));
301
+ e.logPlacementDiagnostic(b("skipped", "active_preselection"));
314
302
  return;
315
303
  }
316
- const b = {
304
+ const k = {
317
305
  attributes: o,
318
306
  preselect: !0,
319
307
  identifier: r.targetPageIdentifier,
320
308
  omitUrl: !0
321
309
  };
322
- xe(u, o), e.logPlacementDiagnostic(k("fired", "fired")), Ge(e, b);
310
+ Fe(u, o), e.logPlacementDiagnostic(b("fired", "fired")), je(e, k);
323
311
  }
324
- function He(i, e, t = window.location.pathname) {
312
+ function Ge(i, e, t = window.location.pathname) {
325
313
  if (i.pending.length === 0)
326
314
  return;
327
315
  const n = i.pending;
328
316
  i.pending = [], n.forEach(({ event: r, pathname: s }) => {
329
- s === t && me(i, e, r, s);
317
+ s === t && fe(i, e, r, s);
330
318
  });
331
319
  }
332
- function We() {
320
+ function Ve() {
333
321
  return {
334
322
  context: null,
335
323
  lifecycle: "idle",
336
324
  recreateInFlight: null
337
325
  };
338
326
  }
339
- function ze(i, e) {
327
+ function We(i, e) {
340
328
  i.context = {
341
329
  accountId: e.accountId,
342
330
  launcherOptions: { ...e.launcherOptions },
343
331
  legacyRoktExtensions: [...e.legacyRoktExtensions]
344
332
  };
345
333
  }
346
- function $e(i) {
334
+ function He(i) {
347
335
  i.lifecycle = "attached";
348
336
  }
349
- function qe(i) {
337
+ function ze(i) {
350
338
  i.lifecycle !== "idle" && (i.lifecycle = "terminated");
351
339
  }
352
- function Je(i) {
340
+ function $e(i) {
353
341
  i.lifecycle = "terminated";
354
342
  }
355
- function Be(i) {
343
+ function qe(i) {
356
344
  i.context = null, i.lifecycle = "idle", i.recreateInFlight = null;
357
345
  }
358
- function Qe(i, e, t) {
346
+ function Je(i, e, t) {
359
347
  if (i.recreateInFlight)
360
348
  return i.recreateInFlight;
361
349
  if (i.lifecycle !== "terminated" || !i.context || !e)
@@ -366,42 +354,42 @@ function Qe(i, e, t) {
366
354
  i.recreateInFlight = null;
367
355
  }), i.recreateInFlight;
368
356
  }
369
- const d = "Rokt", N = 181, Xe = "selectPlacements", Ze = "apps.roktecommerce.com", et = 0.1, tt = "ThankYouPageJourney", it = "rokt-launcher", nt = "rokt-thank-you-element", rt = "userIdentifiedInWorkspace", st = 3, ot = 2, ct = "page_events", at = "page_view_attributes", lt = "mparticle_session_id", ut = "mparticle_device_id", Z = 500, z = {
357
+ const d = "Rokt", O = 181, Be = "selectPlacements", Qe = "apps.roktecommerce.com", Xe = 0.1, Ze = "ThankYouPageJourney", et = "rokt-launcher", tt = "rokt-thank-you-element", it = "userIdentifiedInWorkspace", nt = 3, rt = 2, st = "page_events", ot = "page_view_attributes", ct = "mparticle_session_id", at = "mparticle_device_id", X = 500, H = {
370
358
  UNKNOWN_ERROR: "UNKNOWN_ERROR",
371
359
  UNHANDLED_EXCEPTION: "UNHANDLED_EXCEPTION",
372
360
  IDENTITY_REQUEST: "IDENTITY_REQUEST",
373
361
  LOG_DELIVERY_FAILURE: "LOG_DELIVERY_FAILURE"
374
- }, v = {
362
+ }, A = {
375
363
  ERROR: "ERROR",
376
364
  INFO: "INFO",
377
365
  WARNING: "WARNING"
378
- }, dt = "apps.rokt-api.com", ht = "/v1/log", gt = "/v1/errors", pt = 10;
366
+ }, lt = "apps.rokt-api.com", ut = "/v1/log", dt = "/v1/errors", ht = 10;
379
367
  function c() {
380
368
  return window.mParticle;
381
369
  }
382
- function ee(i, e) {
383
- const n = [K(i), "/wsdk/integrations/launcher.js"].join("");
370
+ function Z(i, e) {
371
+ const n = [D(i), "/wsdk/integrations/launcher.js"].join("");
384
372
  return !e || e.length === 0 ? n : n + "?extensions=" + e.join(",");
385
373
  }
386
- function te(i) {
387
- return [K(i), "/rokt-elements/rokt-element-thank-you.js"].join("");
374
+ function ee(i) {
375
+ return [D(i), "/rokt-elements/rokt-element-thank-you.js"].join("");
388
376
  }
389
- function K(i) {
390
- const e = i !== void 0 ? i : dt;
377
+ function D(i) {
378
+ const e = i !== void 0 ? i : lt;
391
379
  return e.includes("://") ? e.replace(/\/+$/, "") : ["https://", e].join("");
392
380
  }
393
- function Ee(i, e, t) {
381
+ function me(i, e, t) {
394
382
  if (i)
395
383
  return i.startsWith("http://") || i.startsWith("https://") ? i : "https://" + i;
396
384
  const r = e?.includes("://") && !/^https?:\/\//i.test(e) ? void 0 : e;
397
- return K(r) + t;
385
+ return D(r) + t;
398
386
  }
399
- function ie(i, e, t) {
387
+ function te(i, e, t) {
400
388
  if (document.getElementById(i)) return;
401
389
  const n = document.head || document.body, r = document.createElement("script");
402
390
  r.id = i, r.type = "text/javascript", r.src = e, r.async = !0, r.crossOrigin = "anonymous", r.fetchPriority = "high", t?.onLoad && (r.onload = t.onLoad), t?.onError && (r.onerror = t.onError), n.appendChild(r);
403
391
  }
404
- function U(i) {
392
+ function N(i) {
405
393
  if (!i)
406
394
  return [];
407
395
  try {
@@ -411,12 +399,12 @@ function U(i) {
411
399
  }
412
400
  return [];
413
401
  }
414
- function ne(i) {
415
- const e = i ? U(i) : [], t = [], n = [];
402
+ function ie(i) {
403
+ const e = i ? N(i) : [], t = [], n = [];
416
404
  let r = !1;
417
405
  for (let s = 0; s < e.length; s++) {
418
406
  const o = e[s].value;
419
- o === "thank-you-journey" ? (r = !0, n.push(tt)) : t.push(o);
407
+ o === "thank-you-journey" ? (r = !0, n.push(Ze)) : t.push(o);
420
408
  }
421
409
  return {
422
410
  roktExtensionsQueryParams: t,
@@ -424,14 +412,14 @@ function ne(i) {
424
412
  loadThankYouElement: r
425
413
  };
426
414
  }
427
- async function ft(i, e) {
415
+ async function gt(i, e) {
428
416
  const t = [];
429
417
  if (e)
430
418
  for (const n of i)
431
419
  t.push(e.use(n));
432
420
  return Promise.all(t);
433
421
  }
434
- function re(i) {
422
+ function ne(i) {
435
423
  if (!i)
436
424
  return {};
437
425
  const e = {};
@@ -441,7 +429,7 @@ function re(i) {
441
429
  }
442
430
  return e;
443
431
  }
444
- function se(i) {
432
+ function re(i) {
445
433
  const e = {};
446
434
  if (!Array.isArray(i))
447
435
  return e;
@@ -457,14 +445,14 @@ function se(i) {
457
445
  }
458
446
  return e;
459
447
  }
460
- function oe(i, e, t) {
448
+ function se(i, e, t) {
461
449
  return c().generateHash([i, e, t].join(""));
462
450
  }
463
- function mt(i) {
464
- let n = "mParticle_wsdkv_" + c().getVersion() + "_kitv_" + "3.2.0";
451
+ function pt(i) {
452
+ let n = "mParticle_wsdkv_" + c().getVersion() + "_kitv_" + "3.2.1";
465
453
  return i && (n += "_" + i), n;
466
454
  }
467
- function Y(i) {
455
+ function x(i) {
468
456
  const e = document.createElement("iframe");
469
457
  e.style.display = "none", e.setAttribute("sandbox", "allow-scripts allow-same-origin"), e.src = i, e.onload = function() {
470
458
  e.onload = null, e.parentNode && e.parentNode.removeChild(e);
@@ -472,41 +460,41 @@ function Y(i) {
472
460
  const t = document.body || document.head;
473
461
  t && t.appendChild(e);
474
462
  }
475
- function ce(i, e) {
476
- const t = de(window.location.origin);
477
- if (P._allowedOriginHashes.indexOf(t) === -1 || Math.random() >= et)
463
+ function oe(i, e) {
464
+ const t = ue(window.location.origin);
465
+ if (v._allowedOriginHashes.indexOf(t) === -1 || Math.random() >= Xe)
478
466
  return;
479
467
  const r = window.__rokt_li_guid__;
480
468
  if (!r || i && i.includes("://") && !/^https:\/\//i.test(i))
481
469
  return;
482
- const s = window.location.href.split("?")[0].split("#")[0], o = "version=" + encodeURIComponent(e ?? "") + "&launcherInstanceGuid=" + encodeURIComponent(r) + "&pageUrl=" + encodeURIComponent(s), a = i ? K(i) : "https://apps.rokt.com";
483
- Y(a + "/v1/wsdk-init/index.html?" + o), Y(
484
- "https://" + Ze + "/v1/wsdk-init/index.html?" + o + "&isControl=true"
470
+ const s = window.location.href.split("?")[0].split("#")[0], o = "version=" + encodeURIComponent(e ?? "") + "&launcherInstanceGuid=" + encodeURIComponent(r) + "&pageUrl=" + encodeURIComponent(s), a = i ? D(i) : "https://apps.rokt.com";
471
+ x(a + "/v1/wsdk-init/index.html?" + o), x(
472
+ "https://" + Qe + "/v1/wsdk-init/index.html?" + o + "&isControl=true"
485
473
  );
486
474
  }
487
- function Et() {
475
+ function ft() {
488
476
  return typeof window < "u" && !!window.location?.search?.toLowerCase().includes("mp_enable_logging=true");
489
477
  }
490
- function _t() {
478
+ function mt() {
491
479
  return typeof window < "u" ? window.location?.href : void 0;
492
480
  }
493
- function It() {
481
+ function Et() {
494
482
  return typeof window < "u" ? window.navigator?.userAgent : void 0;
495
483
  }
496
- class _e {
484
+ class Ee {
497
485
  constructor() {
498
486
  this._logCount = {};
499
487
  }
500
488
  incrementAndCheck(e) {
501
489
  const n = (this._logCount[e] || 0) + 1;
502
- return this._logCount[e] = n, n > pt;
490
+ return this._logCount[e] = n, n > ht;
503
491
  }
504
492
  }
505
- class w {
493
+ class C {
506
494
  constructor(e, t, n, r, s) {
507
495
  this._reporter = "mp-wsdk";
508
496
  const o = e.isLoggingEnabled;
509
- this._integrationName = t || "", this._launcherInstanceGuid = n, this._accountId = r || null, this._rateLimiter = s || new _e(), this._isEnabled = Et() || o;
497
+ this._integrationName = t || "", this._launcherInstanceGuid = n, this._accountId = r || null, this._rateLimiter = s || new Ee(), this._isEnabled = ft() || o;
510
498
  }
511
499
  send(e, t, n, r, s, o) {
512
500
  if (!(!this._isEnabled || this._rateLimiter.incrementAndCheck(t)))
@@ -517,9 +505,9 @@ class w {
517
505
  version: this._integrationName
518
506
  },
519
507
  severity: t,
520
- code: r || z.UNKNOWN_ERROR,
521
- url: _t(),
522
- deviceInfo: It(),
508
+ code: r || H.UNKNOWN_ERROR,
509
+ url: mt(),
510
+ deviceInfo: Et(),
523
511
  stackTrace: s,
524
512
  reporter: this._reporter,
525
513
  integration: this._integrationName
@@ -546,38 +534,35 @@ class w {
546
534
  }
547
535
  }
548
536
  }
549
- class ae {
537
+ class ce {
550
538
  constructor(e, t, n, r, s) {
551
- this._transport = new w(e, t, n, r, s), this._errorUrl = Ee(e?.errorUrl, e?.integrationDomain, gt);
539
+ this._transport = new C(e, t, n, r, s), this._errorUrl = me(e?.errorUrl, e?.integrationDomain, dt);
552
540
  }
553
541
  report(e) {
554
542
  if (!e) return;
555
- const t = e.severity || v.ERROR;
543
+ const t = e.severity || A.ERROR;
556
544
  this._transport.send(this._errorUrl, t, e.message, e.code, e.stackTrace);
557
545
  }
558
546
  }
559
- class le {
547
+ class ae {
560
548
  constructor(e, t, n, r, s, o) {
561
- this._transport = new w(e, n, r, s, o), this._diagnosticTransport = new w(e, n, r, s), this._placementDiagnosticTransport = new w(
549
+ this._transport = new C(e, n, r, s, o), this._placementDiagnosticTransport = new C(
562
550
  e,
563
551
  n,
564
552
  r,
565
553
  s
566
- ), this._loggingUrl = Ee(e?.loggingUrl, e?.integrationDomain, ht), this._errorReportingService = t;
554
+ ), this._loggingUrl = me(e?.loggingUrl, e?.integrationDomain, ut), this._errorReportingService = t;
567
555
  }
568
556
  log(e) {
569
557
  e && this._send(this._transport, e);
570
558
  }
571
- logDiagnostic(e) {
572
- e && this._send(this._diagnosticTransport, e);
573
- }
574
559
  logPlacementDiagnostic(e) {
575
560
  e && this._send(this._placementDiagnosticTransport, e);
576
561
  }
577
562
  _send(e, t) {
578
563
  e.send(
579
564
  this._loggingUrl,
580
- v.INFO,
565
+ A.INFO,
581
566
  t.message,
582
567
  t.code,
583
568
  void 0,
@@ -586,16 +571,16 @@ class le {
586
571
  const r = typeof n.statusCode == "number";
587
572
  this._errorReportingService.report({
588
573
  message: "LoggingService: Failed to send log: " + n.message,
589
- code: z.LOG_DELIVERY_FAILURE,
590
- severity: r ? v.ERROR : v.WARNING
574
+ code: H.LOG_DELIVERY_FAILURE,
575
+ severity: r ? A.ERROR : A.WARNING
591
576
  });
592
577
  }
593
578
  }
594
579
  );
595
580
  }
596
581
  }
597
- function St(i) {
598
- const e = j(window.location.href), t = i.EventAttributes?.title || document.title, n = Oe(), r = i.ActiveTimeOnSite;
582
+ function _t(i) {
583
+ const e = Y(window.location.href), t = i.EventAttributes?.title || document.title, n = Le(), r = i.ActiveTimeOnSite;
599
584
  return {
600
585
  pageUrl: e,
601
586
  sourceMessageId: i.SourceMessageId,
@@ -607,7 +592,7 @@ function St(i) {
607
592
  }
608
593
  const I = class I {
609
594
  constructor() {
610
- this.name = d, this.id = N, this.moduleId = N, this.isInitialized = !1, this.launcher = null, this.filters = {}, this.userAttributes = {}, this.userIdentifiedInWorkspace = !1, this.testHelpers = null, this.placementEventMappingLookup = {}, this.placementEventAttributeMappingLookup = {}, this.integrationName = null, this.errorReportingService = null, this.loggingService = null, this._thankYouElementOnLoadCallback = null, this._isThankYouElementLoaded = !1, this._workspaceSearchInFlightPromise = null, this._launcherAttachState = We(), this.accountId = null, this._preselectState = je();
595
+ this.name = d, this.id = O, this.moduleId = O, this.isInitialized = !1, this.launcher = null, this.filters = {}, this.userAttributes = {}, this.userIdentifiedInWorkspace = !1, this.testHelpers = null, this.placementEventMappingLookup = {}, this.placementEventAttributeMappingLookup = {}, this.integrationName = null, this.errorReportingService = null, this.loggingService = null, this._thankYouElementOnLoadCallback = null, this._isThankYouElementLoaded = !1, this._workspaceSearchInFlightPromise = null, this._launcherAttachState = Ve(), this.accountId = null, this._preselectState = xe();
611
596
  }
612
597
  // ---- Private helpers ----
613
598
  getEventAttributeValue(e, t) {
@@ -638,7 +623,7 @@ const I = class I {
638
623
  const t = Object.keys(this.placementEventAttributeMappingLookup);
639
624
  for (let n = 0; n < t.length; n++) {
640
625
  const r = t[n], s = this.placementEventAttributeMappingLookup[r];
641
- if (T(s))
626
+ if (w(s))
642
627
  continue;
643
628
  let o = !0;
644
629
  for (let a = 0; a < s.length; a++)
@@ -652,12 +637,12 @@ const I = class I {
652
637
  capturePageView(e) {
653
638
  let t;
654
639
  try {
655
- t = j(window.location.href);
656
- const n = B(), r = St(e);
640
+ t = Y(window.location.href);
641
+ const n = J(), r = _t(e);
657
642
  n.push(r);
658
- const s = Math.min(n.length, pe), o = ke(n);
643
+ const s = Math.min(n.length, ge), o = Re(n);
659
644
  if (o === 0) {
660
- const a = x() ? "quota" : "ls_unavailable";
645
+ const a = F() ? "quota" : "ls_unavailable";
661
646
  this.loggingService?.log({
662
647
  message: `Rokt Kit: Failed to persist page view for ${t} [reason: ${a}]`,
663
648
  code: "PAGE_VIEW_CAPTURE_FAILED"
@@ -667,7 +652,7 @@ const I = class I {
667
652
  code: "PAGE_VIEW_QUOTA_EVICTION"
668
653
  });
669
654
  } catch (n) {
670
- const r = x() ? "exception" : "ls_unavailable", s = n instanceof Error ? n.message : String(n);
655
+ const r = F() ? "exception" : "ls_unavailable", s = n instanceof Error ? n.message : String(n);
671
656
  this.loggingService?.log({
672
657
  message: `Rokt Kit: Failed to capture page view for ${t}: ${s} [reason: ${r}]`,
673
658
  code: "PAGE_VIEW_CAPTURE_FAILED"
@@ -680,7 +665,7 @@ const I = class I {
680
665
  buildCacheMatchKeys(e) {
681
666
  if (!this.isPreselectionEnabled())
682
667
  return;
683
- const t = Ue(this.accountId, e);
668
+ const t = Ne(this.accountId, e);
684
669
  if (t)
685
670
  return t.attributeKeys;
686
671
  }
@@ -698,10 +683,10 @@ const I = class I {
698
683
  };
699
684
  }
700
685
  flushPendingPreselectDispatches() {
701
- He(this._preselectState, this.buildPreselectHost());
686
+ Ge(this._preselectState, this.buildPreselectHost());
702
687
  }
703
688
  isLauncherReadyToAttach() {
704
- return !!window.Rokt && O(window.Rokt.createLauncher);
689
+ return !!window.Rokt && L(window.Rokt.createLauncher);
705
690
  }
706
691
  /**
707
692
  * Returns the user identities from the filtered user, if any.
@@ -723,13 +708,13 @@ const I = class I {
723
708
  if (!window.mParticle || typeof c().logEvent != "function" || !E(e))
724
709
  return;
725
710
  const t = c().EventType.Other;
726
- c().logEvent(Xe, t, e);
711
+ c().logEvent(Be, t, e);
727
712
  }
728
713
  setRoktSessionId(e) {
729
714
  if (!(!e || typeof e != "string"))
730
715
  try {
731
716
  const t = c().getInstance();
732
- t && O(t.setIntegrationAttribute) && t.setIntegrationAttribute(N, {
717
+ t && L(t.setIntegrationAttribute) && t.setIntegrationAttribute(O, {
733
718
  roktSessionId: e
734
719
  });
735
720
  } catch {
@@ -737,14 +722,14 @@ const I = class I {
737
722
  }
738
723
  readMpSessionId() {
739
724
  const e = c()?.sessionManager, t = e?.getSessionId ?? e?.getSession;
740
- if (O(t))
725
+ if (L(t))
741
726
  return t.call(e) || void 0;
742
727
  }
743
728
  readMpDeviceId() {
744
729
  return c()?.getDeviceId?.() || void 0;
745
730
  }
746
731
  attachLauncher(e, t, n = []) {
747
- ze(this._launcherAttachState, {
732
+ We(this._launcherAttachState, {
748
733
  accountId: e,
749
734
  launcherOptions: t || {},
750
735
  legacyRoktExtensions: n
@@ -755,22 +740,22 @@ const I = class I {
755
740
  };
756
741
  let s;
757
742
  return this.isPartnerInLocalLauncherTestGroup() ? s = Promise.resolve(window.Rokt.createLocalLauncher(r)) : s = window.Rokt.createLauncher(r), s.then(async (o) => {
758
- await ft([...n], o), this.initRoktLauncher(o);
743
+ await gt([...n], o), this.initRoktLauncher(o);
759
744
  }).catch((o) => {
760
- Je(this._launcherAttachState), console.error("Error creating Rokt launcher:", o);
745
+ $e(this._launcherAttachState), console.error("Error creating Rokt launcher:", o);
761
746
  });
762
747
  }
763
748
  recreateLauncherIfTerminated() {
764
- return Qe(
749
+ return Je(
765
750
  this._launcherAttachState,
766
751
  this.isLauncherReadyToAttach(),
767
752
  (e) => this.attachLauncher(e.accountId, e.launcherOptions, e.legacyRoktExtensions)
768
753
  );
769
754
  }
770
755
  initRoktLauncher(e) {
771
- window.Rokt && (window.Rokt.currentLauncher = e), this.launcher = e, $e(this._launcherAttachState);
756
+ window.Rokt && (window.Rokt.currentLauncher = e), this.launcher = e, He(this._launcherAttachState);
772
757
  const t = c().Rokt?.filters;
773
- t ? (this.filters = t, t.filteredUser ? this._workspaceSearchInFlightPromise = this.search(t.filteredUser) : console.warn("Rokt Kit: No filtered user has been set.")) : console.warn("Rokt Kit: No filters have been set."), this.isInitialized = !0, ce(this.domain, this.integrationName), c().Rokt.attachKit(this), this.flushPendingPreselectDispatches();
758
+ t ? (this.filters = t, t.filteredUser ? this._workspaceSearchInFlightPromise = this.search(t.filteredUser) : console.warn("Rokt Kit: No filtered user has been set.")) : console.warn("Rokt Kit: No filters have been set."), this.isInitialized = !0, oe(this.domain, this.integrationName), c().Rokt.attachKit(this), this.flushPendingPreselectDispatches();
774
759
  }
775
760
  fetchOptimizely() {
776
761
  const e = c()._getActiveForwarders().filter((t) => t.name === "Optimizely");
@@ -807,76 +792,76 @@ const I = class I {
807
792
  */
808
793
  init(e, t, n, r, s) {
809
794
  const o = e, a = o.accountId;
810
- this.accountId = a || null, this.userAttributes = L(s), this._onboardingExpProvider = o.onboardingExpProvider;
811
- const u = U(o.placementEventMapping);
812
- this.placementEventMappingLookup = re(u);
813
- const l = U(
795
+ this.accountId = a || null, this.userAttributes = T(s), this._onboardingExpProvider = o.onboardingExpProvider;
796
+ const u = N(o.placementEventMapping);
797
+ this.placementEventMappingLookup = ne(u);
798
+ const l = N(
814
799
  o.placementEventAttributeMapping
815
800
  );
816
- this.placementEventAttributeMappingLookup = se(l), o.hashedEmailUserIdentityType && (this._mappedEmailSha256Key = o.hashedEmailUserIdentityType.toLowerCase()), this._workspaceIdSyncApiKey = m(o.workspaceIdSyncApiKey) ? o.workspaceIdSyncApiKey : void 0;
817
- const g = c().Rokt?.domain, { roktExtensionsQueryParams: b, legacyRoktExtensions: h, loadThankYouElement: S } = ne(
801
+ this.placementEventAttributeMappingLookup = re(l), o.hashedEmailUserIdentityType && (this._mappedEmailSha256Key = o.hashedEmailUserIdentityType.toLowerCase()), this._workspaceIdSyncApiKey = m(o.workspaceIdSyncApiKey) ? o.workspaceIdSyncApiKey : void 0;
802
+ const g = c().Rokt?.domain, { roktExtensionsQueryParams: k, legacyRoktExtensions: h, loadThankYouElement: S } = ie(
818
803
  o.roktExtensions
819
804
  ), p = {
820
805
  ...c().Rokt?.launcherOptions || {}
821
806
  };
822
- this.integrationName = mt(p.integrationName), p.integrationName = this.integrationName, this.domain = g;
823
- const R = {
807
+ this.integrationName = pt(p.integrationName), p.integrationName = this.integrationName, this.domain = g;
808
+ const P = {
824
809
  loggingUrl: o.loggingUrl,
825
810
  errorUrl: o.errorUrl,
826
811
  integrationDomain: g,
827
812
  isLoggingEnabled: c().config?.isLoggingEnabled === !0
828
- }, y = new ae(
829
- R,
813
+ }, y = new ce(
814
+ P,
830
815
  this.integrationName,
831
816
  window.__rokt_li_guid__,
832
817
  o.accountId
833
- ), A = new le(
834
- R,
818
+ ), R = new ae(
819
+ P,
835
820
  y,
836
821
  this.integrationName,
837
822
  window.__rokt_li_guid__,
838
823
  o.accountId
839
824
  );
840
- if (this.errorReportingService = y, this.loggingService = A, this.isTargetingDisabled())
825
+ if (this.errorReportingService = y, this.loggingService = R, this.isTargetingDisabled())
841
826
  try {
842
- Q(), X();
827
+ B(), Q();
843
828
  } catch (f) {
844
829
  this.errorReportingService?.report({
845
830
  message: "Rokt Kit: Failed to clear page views when targeting is disabled",
846
831
  code: "PAGE_VIEW_CAPTURE_FAILED",
847
- severity: v.INFO,
832
+ severity: A.INFO,
848
833
  stackTrace: f instanceof Error ? f.stack : void 0
849
834
  });
850
835
  }
851
- return c()._registerErrorReportingService && c()._registerErrorReportingService(y), c()._registerLoggingService && c()._registerLoggingService(A), n ? (this.testHelpers = {
852
- generateLauncherScript: ee,
853
- generateThankYouElementScript: te,
854
- extractRoktExtensionConfig: ne,
855
- hashEventMessage: oe,
856
- parseSettingsString: U,
857
- generateMappedEventLookup: re,
858
- generateMappedEventAttributeLookup: se,
859
- sendAdBlockMeasurementSignals: ce,
860
- createAutoRemovedIframe: Y,
861
- djb2: de,
836
+ return c()._registerErrorReportingService && c()._registerErrorReportingService(y), c()._registerLoggingService && c()._registerLoggingService(R), n ? (this.testHelpers = {
837
+ generateLauncherScript: Z,
838
+ generateThankYouElementScript: ee,
839
+ extractRoktExtensionConfig: ie,
840
+ hashEventMessage: se,
841
+ parseSettingsString: N,
842
+ generateMappedEventLookup: ne,
843
+ generateMappedEventAttributeLookup: re,
844
+ sendAdBlockMeasurementSignals: oe,
845
+ createAutoRemovedIframe: x,
846
+ djb2: ue,
862
847
  setAllowedOriginHashes: (f) => {
863
848
  I._allowedOriginHashes = f;
864
849
  },
865
- ReportingTransport: w,
866
- ErrorReportingService: ae,
867
- LoggingService: le,
868
- RateLimiter: _e,
869
- ErrorCodes: z,
870
- WSDKErrorSeverity: v,
871
- resetLauncherAttachState: () => Be(this._launcherAttachState)
872
- }, this.attachLauncher(a, p), "Successfully initialized: " + d) : (S && (c().Rokt.flushOnShoppableAdsReadyMessageQueue?.(this), ie(nt, te(g), {
850
+ ReportingTransport: C,
851
+ ErrorReportingService: ce,
852
+ LoggingService: ae,
853
+ RateLimiter: Ee,
854
+ ErrorCodes: H,
855
+ WSDKErrorSeverity: A,
856
+ resetLauncherAttachState: () => qe(this._launcherAttachState)
857
+ }, this.attachLauncher(a, p), "Successfully initialized: " + d) : (S && (c().Rokt.flushOnShoppableAdsReadyMessageQueue?.(this), te(tt, ee(g), {
873
858
  onLoad: () => {
874
859
  this._isThankYouElementLoaded = !0, this._thankYouElementOnLoadCallback && this._thankYouElementOnLoadCallback();
875
860
  },
876
861
  onError: (f) => {
877
862
  console.error("Error loading Rokt Thank You Element script:", f);
878
863
  }
879
- })), this.isLauncherReadyToAttach() ? this.attachLauncher(a, p, h) : (ie(it, ee(g, b), {
864
+ })), this.isLauncherReadyToAttach() ? this.attachLauncher(a, p, h) : (te(et, Z(g, k), {
880
865
  onLoad: () => {
881
866
  this.isLauncherReadyToAttach() ? this.attachLauncher(a, p, h) : console.error("Rokt object is not available after script load.");
882
867
  },
@@ -886,10 +871,10 @@ const I = class I {
886
871
  }), this.captureTiming(I.PERFORMANCE_MARKS.RoktScriptAppended)), "Successfully initialized: " + d);
887
872
  }
888
873
  process(e) {
889
- if (this.isTargetingDisabled() || (e.EventDataType === st && (we(this.loggingService), this.capturePageView(e), me(this._preselectState, this.buildPreselectHost(), e)), e.EventDataType === ot && (Q(), X())), !this.isKitReady())
874
+ if (this.isTargetingDisabled() || (e.EventDataType === nt && (we(this.loggingService), this.capturePageView(e), fe(this._preselectState, this.buildPreselectHost(), e)), e.EventDataType === rt && (B(), Q())), !this.isKitReady())
890
875
  return "Kit not ready for forwarder: " + d;
891
- if (O(c().Rokt?.setLocalSessionAttribute) && (T(this.placementEventAttributeMappingLookup) || this.applyPlacementEventAttributeMapping(e), !T(this.placementEventMappingLookup))) {
892
- const t = oe(e.EventDataType, e.EventCategory, e.EventName ?? "");
876
+ if (L(c().Rokt?.setLocalSessionAttribute) && (w(this.placementEventAttributeMappingLookup) || this.applyPlacementEventAttributeMapping(e), !w(this.placementEventMappingLookup))) {
877
+ const t = se(e.EventDataType, e.EventCategory, e.EventName ?? "");
893
878
  this.placementEventMappingLookup[String(t)] && c().Rokt.setLocalSessionAttribute?.(this.placementEventMappingLookup[String(t)], !0);
894
879
  }
895
880
  return "Successfully sent to forwarder: " + d;
@@ -902,13 +887,13 @@ const I = class I {
902
887
  window.Rokt.setExtensionData(e);
903
888
  }
904
889
  setUserAttribute(e, t) {
905
- return this.loggingService?.logDiagnostic(M("setUserAttribute", [e])), ue(e) || (this.userAttributes[e] = t), Ce(this.accountId, e) && this.flushPendingPreselectDispatches(), "Successfully set user attribute for forwarder: " + d;
890
+ return le(e) || (this.userAttributes[e] = t), Ue(this.accountId, e) && this.flushPendingPreselectDispatches(), "Successfully set user attribute for forwarder: " + d;
906
891
  }
907
892
  removeUserAttribute(e) {
908
- return this.loggingService?.logDiagnostic(M("removeUserAttribute", [e])), delete this.userAttributes[e], "Successfully removed user attribute for forwarder: " + d;
893
+ return delete this.userAttributes[e], "Successfully removed user attribute for forwarder: " + d;
909
894
  }
910
895
  handleIdentityComplete(e, t) {
911
- return this.userAttributes = L(e.getAllUserAttributes()), this.loggingService?.logDiagnostic(M(t, Object.keys(this.userAttributes))), "Successfully called " + t + " for forwarder: " + d;
896
+ return this.userAttributes = T(e.getAllUserAttributes()), "Successfully called " + t + " for forwarder: " + d;
912
897
  }
913
898
  onUserIdentified(e) {
914
899
  const t = e;
@@ -981,7 +966,7 @@ const I = class I {
981
966
  if (t) {
982
967
  const n = this._workspaceSearchInFlightPromise, r = n ? Promise.race([
983
968
  n,
984
- new Promise((s) => setTimeout(s, Z))
969
+ new Promise((s) => setTimeout(s, X))
985
970
  ]) : Promise.resolve();
986
971
  return Promise.all([t, r]).then(
987
972
  () => this._dispatchPlacements(e)
@@ -991,42 +976,38 @@ const I = class I {
991
976
  const n = this._workspaceSearchInFlightPromise;
992
977
  return Promise.race([
993
978
  n,
994
- new Promise((r) => setTimeout(r, Z))
979
+ new Promise((r) => setTimeout(r, X))
995
980
  ]).then(() => this._dispatchPlacements(e));
996
981
  }
997
982
  return this._dispatchPlacements(e);
998
983
  }
999
984
  _dispatchPlacements(e) {
1000
- const t = e && e.attributes || {}, r = { ...L(this.userAttributes), ...t }, s = this.filters || {}, o = s.userAttributeFilters || [], a = s.filteredUser || null, u = a ? a.getMPID() : null;
985
+ const t = e && e.attributes || {}, r = { ...T(this.userAttributes), ...t }, s = this.filters || {}, o = s.userAttributeFilters || [], a = s.filteredUser || null, u = a ? a.getMPID() : null;
1001
986
  let l;
1002
- s ? s.filterUserAttributes ? l = s.filterUserAttributes(r, o) : l = r : (console.warn("Rokt Kit: No filters available, using user attributes"), l = r), this.userAttributes = L(l);
1003
- const g = this._onboardingExpProvider === "Optimizely" ? this.fetchOptimizely() : {}, b = this.returnUserIdentities(a), h = this.returnLocalSessionAttributes(), S = Te(B()), p = Le(), R = this.readMpSessionId(), y = this.readMpDeviceId(), A = {
1004
- ...b,
987
+ s ? s.filterUserAttributes ? l = s.filterUserAttributes(r, o) : l = r : (console.warn("Rokt Kit: No filters available, using user attributes"), l = r), this.userAttributes = T(l);
988
+ const g = this._onboardingExpProvider === "Optimizely" ? this.fetchOptimizely() : {}, k = this.returnUserIdentities(a), h = this.returnLocalSessionAttributes(), S = be(J()), p = Te(), P = this.readMpSessionId(), y = this.readMpDeviceId(), R = {
989
+ ...k,
1005
990
  ...l,
1006
991
  ...g,
1007
992
  ...h,
1008
- ...S.length ? { [ct]: JSON.stringify(S) } : {},
1009
- ...p ? { [at]: p } : {},
1010
- ...this.userIdentifiedInWorkspace ? { [rt]: !0 } : {},
1011
- ...R ? { [lt]: R } : {},
1012
- ...y ? { [ut]: y } : {},
993
+ ...S.length ? { [st]: JSON.stringify(S) } : {},
994
+ ...p ? { [ot]: p } : {},
995
+ ...this.userIdentifiedInWorkspace ? { [it]: !0 } : {},
996
+ ...P ? { [ct]: P } : {},
997
+ ...y ? { [at]: y } : {},
1013
998
  mpid: u
1014
- }, f = this.buildCacheMatchKeys(typeof e.identifier == "string" ? e.identifier : void 0), Ie = {
999
+ }, f = this.buildCacheMatchKeys(typeof e.identifier == "string" ? e.identifier : void 0), _e = {
1015
1000
  ...e,
1016
- attributes: A,
1001
+ attributes: R,
1017
1002
  ...f !== void 0 ? { cacheMatchKeys: f } : {}
1003
+ }, z = this.launcher.selectPlacements(_e), $ = e.preselect === !0, Ie = () => {
1004
+ $ || this.logSelectPlacementsEvent(R);
1018
1005
  };
1019
- this.loggingService?.logPlacementDiagnostic(
1020
- Ye(Object.keys(A))
1021
- );
1022
- const $ = this.launcher.selectPlacements(Ie), q = e.preselect === !0, Se = () => {
1023
- q || this.logSelectPlacementsEvent(A);
1024
- };
1025
- return Promise.resolve($).then((ye) => {
1026
- if (!q)
1027
- return ye?.context?.sessionId?.then((Ae) => this.setRoktSessionId(Ae));
1006
+ return Promise.resolve(z).then((Se) => {
1007
+ if (!$)
1008
+ return Se?.context?.sessionId?.then((ye) => this.setRoktSessionId(ye));
1028
1009
  }).catch(() => {
1029
- }).finally(Se), $;
1010
+ }).finally(Ie), z;
1030
1011
  }
1031
1012
  /**
1032
1013
  * Passes attributes to the Rokt Web SDK for client-side hashing.
@@ -1052,7 +1033,7 @@ const I = class I {
1052
1033
  * here would flip the kit to not-ready with no drain path for queued calls.
1053
1034
  */
1054
1035
  terminate() {
1055
- return this.isKitReady() ? (qe(this._launcherAttachState), this.launcher.terminate()) : (console.error("Rokt Kit: Not initialized"), Promise.resolve());
1036
+ return this.isKitReady() ? (ze(this._launcherAttachState), this.launcher.terminate()) : (console.error("Rokt Kit: Not initialized"), Promise.resolve());
1056
1037
  }
1057
1038
  /**
1058
1039
  * Registers a callback to be invoked once rokt-thank-you-element.js becomes available.
@@ -1064,11 +1045,11 @@ const I = class I {
1064
1045
  I._allowedOriginHashes = [-553112570, 549508659], I.PERFORMANCE_MARKS = {
1065
1046
  RoktScriptAppended: "mp:RoktScriptAppended"
1066
1047
  }, I.EMAIL_SHA256_KEY = "emailsha256";
1067
- let P = I;
1068
- function yt() {
1069
- return N;
1048
+ let v = I;
1049
+ function It() {
1050
+ return O;
1070
1051
  }
1071
- function At(i) {
1052
+ function St(i) {
1072
1053
  if (!i) {
1073
1054
  window.console.log("You must pass a config object to register the kit " + d);
1074
1055
  return;
@@ -1078,17 +1059,17 @@ function At(i) {
1078
1059
  return;
1079
1060
  }
1080
1061
  E(i.kits) ? i.kits[d] = {
1081
- constructor: P
1062
+ constructor: v
1082
1063
  } : (i.kits = {}, i.kits[d] = {
1083
- constructor: P
1064
+ constructor: v
1084
1065
  }), window.console.log("Successfully registered " + d + " to your mParticle configuration");
1085
1066
  }
1086
1067
  typeof window < "u" && window.mParticle && c().addForwarder && c().addForwarder({
1087
1068
  name: d,
1088
- constructor: P,
1089
- getId: yt
1069
+ constructor: v,
1070
+ getId: It
1090
1071
  });
1091
1072
  export {
1092
- At as register
1073
+ St as register
1093
1074
  };
1094
1075
  //# sourceMappingURL=Rokt-Kit.esm.js.map