@sprig-technologies/sprig-browser 2.40.0 → 2.40.2

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 (34) hide show
  1. package/dist/conversational-styles-BiL7hMhj.js +4 -0
  2. package/dist/conversational-styles-DlhTFTL6.cjs +1 -0
  3. package/dist/conversational-ui-BYWN-x1R.js +579 -0
  4. package/dist/conversational-ui-N_aaTzqd.cjs +1 -0
  5. package/dist/core-Br8FqGd4.cjs +12 -0
  6. package/dist/{core-CzqULo6b.js → core-Cyu7gofl.js} +451 -458
  7. package/dist/core.cjs +1 -1
  8. package/dist/core.d.ts +11 -0
  9. package/dist/core.js +2 -2
  10. package/dist/debounce-CMb8f7wh.js +9 -0
  11. package/dist/debounce-DsC7462b.cjs +1 -0
  12. package/dist/{getAttributedUrl-C1AsMcwH.cjs → getAttributedUrl-CJJ96Ihj.cjs} +6 -6
  13. package/dist/{getAttributedUrl-DUesmkhh.js → getAttributedUrl-C_5gL6aZ.js} +241 -244
  14. package/dist/index-BSk-C5b7.js +695 -0
  15. package/dist/index-MWKreg7C.cjs +1 -0
  16. package/dist/index.cjs +1 -1
  17. package/dist/index.d.ts +11 -0
  18. package/dist/index.js +2 -2
  19. package/dist/{metricsReporter-BChkCOLD.js → metricsReporter-B-oKhuWk.js} +1 -1
  20. package/dist/{metricsReporter-Bqy_vLyq.cjs → metricsReporter-Dc4CZlRc.cjs} +1 -1
  21. package/dist/replay.cjs +1 -1
  22. package/dist/replay.js +134 -138
  23. package/dist/view-BGlLLPXB.js +1503 -0
  24. package/dist/view-BGzeHt4l.cjs +1 -0
  25. package/package.json +1 -1
  26. package/dist/conversational-styles-CWNea3pP.js +0 -4
  27. package/dist/conversational-styles-CzhxRRD3.cjs +0 -1
  28. package/dist/conversational-ui-D2Y5H9To.js +0 -610
  29. package/dist/conversational-ui-DJlCFQ-6.cjs +0 -1
  30. package/dist/core-CvM2f3CD.cjs +0 -12
  31. package/dist/index-D1_q2uph.cjs +0 -1
  32. package/dist/index-mshAF3wp.js +0 -709
  33. package/dist/view-C7XtFlCN.cjs +0 -1
  34. package/dist/view-afp9mz2J.js +0 -1491
@@ -1,36 +1,36 @@
1
1
  var Dt = Object.defineProperty;
2
- var At = (t, r, n) => r in t ? Dt(t, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[r] = n;
3
- var N = (t, r, n) => At(t, typeof r != "symbol" ? r + "" : r, n);
4
- import { l as R, g as T, s as st, e as w, S as u, v as at, m as k, b as M, h as dt, E as ie, D as j, c as Ot, r as K, i as Ct, j as Tt, k as Pt, n as $e, o as Ge, d as jt, a as Mt, p as lt, q as ct } from "./metricsReporter-BChkCOLD.js";
5
- const pr = 360, ur = "ul-app", wr = "#e6e6e6", gr = "#bd282a", yr = 1030, Ke = () => {
2
+ var At = (r, t, n) => t in r ? Dt(r, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : r[t] = n;
3
+ var N = (r, t, n) => At(r, typeof t != "symbol" ? t + "" : t, n);
4
+ import { l as R, g as T, s as st, e as w, S as u, v as at, m as I, b as M, h as dt, E as ie, D as P, c as Ot, r as K, i as Ct, j as Tt, k as Pt, n as $e, o as Ge, d as Mt, a as jt, p as lt, q as ct } from "./metricsReporter-B-oKhuWk.js";
5
+ const cr = 360, pr = "ul-app", ur = "#e6e6e6", wr = "#bd282a", gr = 1030, Ke = () => {
6
6
  try {
7
7
  return window.parent.Intercom;
8
8
  } catch {
9
9
  return null;
10
10
  }
11
11
  }, Je = [Object.freeze(Object.defineProperty({ __proto__: null, disable: () => {
12
- const t = Ke();
13
- t && (t.ul_wasVisible = !!document.querySelector("iframe.intercom-launcher-frame"), t.ul_wasVisible && t("update", { hide_default_launcher: !0 }));
12
+ const r = Ke();
13
+ r && (r.ul_wasVisible = !!document.querySelector("iframe.intercom-launcher-frame"), r.ul_wasVisible && r("update", { hide_default_launcher: !0 }));
14
14
  }, enable: () => {
15
- const t = Ke();
16
- t && (t.ul_wasVisible && t("update", { hide_default_launcher: !1 }), delete t.ul_wasVisible);
15
+ const r = Ke();
16
+ r && (r.ul_wasVisible && r("update", { hide_default_launcher: !1 }), delete r.ul_wasVisible);
17
17
  } }, Symbol.toStringTag, { value: "Module" }))];
18
- class qt {
18
+ class Ft {
19
19
  static disable() {
20
- Je.forEach((r) => r.disable());
20
+ Je.forEach((t) => t.disable());
21
21
  }
22
22
  static enable() {
23
- Je.forEach((r) => r.enable());
23
+ Je.forEach((t) => t.enable());
24
24
  }
25
25
  }
26
- const Qe = "ul-view-sdk-script", Ft = /* @__PURE__ */ new Set(["ios", "android"]), F = "visitors", H = "environments";
27
- async function O(t, r) {
28
- var i, a, o;
29
- const { shouldDropOnRateLimit: n, ...s } = r;
30
- s.headers = Object.assign(T(window.UserLeap), s.headers);
31
- const e = await st(t, { ...s, shouldDropOnRateLimit: n });
26
+ const Qe = "ul-view-sdk-script", qt = /* @__PURE__ */ new Set(["ios", "android"]), q = "visitors", H = "environments";
27
+ async function O(r, t) {
28
+ var i, s, o;
29
+ const { shouldDropOnRateLimit: n, ...a } = t;
30
+ a.headers = Object.assign(T(window.UserLeap), a.headers);
31
+ const e = await st(r, { ...a, shouldDropOnRateLimit: n });
32
32
  if (e.ok) {
33
- const d = (i = e.headers) == null ? void 0 : i.get("Authorization"), c = d ? d.split(" ") : void 0, l = c && c.length === 2 ? c[1] : void 0, p = (a = e.headers) == null ? void 0 : a.get("x-ul-visitor-id");
33
+ const d = (i = e.headers) == null ? void 0 : i.get("Authorization"), c = d ? d.split(" ") : void 0, l = c && c.length === 2 ? c[1] : void 0, p = (s = e.headers) == null ? void 0 : s.get("x-ul-visitor-id");
34
34
  if (window.UserLeap.userId && p === window.UserLeap.visitorId) {
35
35
  const f = R.getItemObject("sprig.anon.env.vid.map");
36
36
  f && f[window.UserLeap.envId] === p && (delete f[window.UserLeap.envId], R.setItemObject("sprig.anon.env.vid.map", f));
@@ -39,129 +39,129 @@ async function O(t, r) {
39
39
  }
40
40
  return (o = e.json) != null && o.logMessage && console.warn(`[Sprig] ${e.json.logMessage}`), e;
41
41
  }
42
- function _(t, r) {
42
+ function _(r, t) {
43
43
  const n = R.getItemObject("userleap.ids");
44
- let s = n[window.UserLeap.envId];
45
- s ? s[t] = r : s = { [t]: r }, n[window.UserLeap.envId] = s, R.setItemObject("userleap.ids", n);
44
+ let a = n[window.UserLeap.envId];
45
+ a ? a[r] = t : a = { [r]: t }, n[window.UserLeap.envId] = a, R.setItemObject("userleap.ids", n);
46
46
  }
47
47
  function Oe() {
48
48
  return window.previewMode ? "0" : window.UserLeap.visitorId ?? "";
49
49
  }
50
- function D(t, r, n) {
51
- const s = [window.UserLeap._API_URL, "sdk", t];
52
- return r && r.forEach((e) => {
53
- s.push(e), e === H ? s.push(window.UserLeap.envId) : e === F && s.push(Oe());
54
- }), n && s.push(n), s.join("/");
50
+ function D(r, t, n) {
51
+ const a = [window.UserLeap._API_URL, "sdk", r];
52
+ return t && t.forEach((e) => {
53
+ a.push(e), e === H ? a.push(window.UserLeap.envId) : e === q && a.push(Oe());
54
+ }), n && a.push(n), a.join("/");
55
55
  }
56
- const Z = async (t, r, n) => {
56
+ const Z = async (r, t, n) => {
57
57
  var ze, Ve, We, Be;
58
- const { context: s, delay: e, avatars: i, forceBrandedLogo: a, endCard: o, isFeedback: d = !1, heatmap: c, locale: l, layout: p, previewMode: f, productConfig: g, questions: y, responseGroupUid: v, surveyId: m, uuid: U, vid: h, sessionReplay: S, studyType: E, surveyVisitorAttributes: z } = t, b = T(window.UserLeap), V = ne(b), A = fe(b);
59
- if (S) if (V) w.emit(u.ReplayCapture, { responseGroupUid: v, hasQuestions: !!(y != null && y.length), surveyId: m, uploadId: S.uploadId, replayType: S.replayDurationType ?? "before", seconds: S.replayDurationSeconds, generateVideoUploadUrlPayload: { mediaRecordingUid: at(), mediaType: "screen", questionId: 1, responseGroupUid: v, surveyId: m, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), visitorId: window.UserLeap.visitorId, isReplay: !0 } });
58
+ const { context: a, delay: e, avatars: i, forceBrandedLogo: s, endCard: o, isFeedback: d = !1, heatmap: c, locale: l, layout: p, previewMode: f, productConfig: g, questions: y, responseGroupUid: v, surveyId: m, uuid: h, vid: k, sessionReplay: U, studyType: E, surveyVisitorAttributes: z } = r, b = T(window.UserLeap), V = ne(b), A = fe(b);
59
+ if (U) if (V) w.emit(u.ReplayCapture, { responseGroupUid: v, hasQuestions: !!(y != null && y.length), surveyId: m, uploadId: U.uploadId, replayType: U.replayDurationType ?? "before", seconds: U.replayDurationSeconds, generateVideoUploadUrlPayload: { mediaRecordingUid: at(), mediaType: "screen", questionId: 1, responseGroupUid: v, surveyId: m, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), visitorId: window.UserLeap.visitorId, isReplay: !0 } });
60
60
  else {
61
- if (!k.replay) return window.UserLeap.reportError("displayQuestions", new Error("Replay module not registered")), { success: !1, message: "Replay module not registered", surveyState: "no survey" };
62
- k.replay.scheduleOrCaptureReplay({ responseGroupId: v, surveyId: m, visitorId: h, replayParams: S, completeUploadHeaders: b, apiUrl: window.UserLeap._API_URL, triggerTimestamp: Date.now(), isStandalone: y.length === 0 });
61
+ if (!I.replay) return window.UserLeap.reportError("displayQuestions", new Error("Replay module not registered")), { success: !1, message: "Replay module not registered", surveyState: "no survey" };
62
+ I.replay.scheduleOrCaptureReplay({ responseGroupId: v, surveyId: m, visitorId: k, replayParams: U, completeUploadHeaders: b, apiUrl: window.UserLeap._API_URL, triggerTimestamp: Date.now(), isStandalone: y.length === 0 });
63
63
  }
64
64
  if (c) {
65
- if (!k.replay) return window.UserLeap.reportError("displayQuestions", new Error("Replay module not registered")), { success: !1, message: "Replay module not registered", surveyState: "no survey" };
66
- const { eventId: I, replayParams: B, responseGroupUid: be, surveyId: Le } = c;
67
- await k.replay.initializeReplay({ maxReplayDurationSeconds: 300, maxInflightRequests: window.UserLeap.maxInflightReplayRequests, teardownAfter: !0, apiUrl: window.UserLeap._API_URL, replaySettings: n }), k.replay.tryReplayAction(() => {
65
+ if (!I.replay) return window.UserLeap.reportError("displayQuestions", new Error("Replay module not registered")), { success: !1, message: "Replay module not registered", surveyState: "no survey" };
66
+ const { eventId: S, replayParams: B, responseGroupUid: be, surveyId: Le } = c;
67
+ await I.replay.initializeReplay({ maxReplayDurationSeconds: 300, maxInflightRequests: window.UserLeap.maxInflightReplayRequests, teardownAfter: !0, apiUrl: window.UserLeap._API_URL, replaySettings: n }), I.replay.tryReplayAction(() => {
68
68
  var Ne;
69
- return (Ne = k.replay) == null ? void 0 : Ne.scheduleCapture({ apiUrl: window.UserLeap._API_URL, completeUploadHeaders: b, eventId: I, isHeatmap: !0, replayParams: B, responseGroupId: be, surveyId: Le, triggerTimestamp: Date.now(), visitorId: h });
69
+ return (Ne = I.replay) == null ? void 0 : Ne.scheduleCapture({ apiUrl: window.UserLeap._API_URL, completeUploadHeaders: b, eventId: S, isHeatmap: !0, replayParams: B, responseGroupId: be, surveyId: Le, triggerTimestamp: Date.now(), visitorId: k });
70
70
  }, "Error in scheduling/capturing replay");
71
71
  }
72
- if (h == null || !(y != null && y.length)) return M.info("CannotDisplaySurvey", { vid: h }), { success: !1, message: "[Sprig] no survey found", surveyState: "no survey" };
72
+ if (k == null || !(y != null && y.length)) return M.info("CannotDisplaySurvey", { vid: k }), { success: !1, message: "[Sprig] no survey found", surveyState: "no survey" };
73
73
  if (window.UserLeap.container) {
74
74
  M.info("AlreadyDisplayingSurvey");
75
- const I = "[Sprig] (ERR-409) Found an existing Survey container, aborting rendering of this survey";
76
- return console.warn(I), { success: !1, message: I, surveyState: "no survey" };
77
- }
78
- if (h !== window.UserLeap.visitorId && U !== window.UserLeap.visitorId && !window.previewMode) {
79
- const I = "Attempted to display survey to a different visitor";
80
- return window.UserLeap.reportError("DisplaySurvey", new Error(I)), { success: !1, message: I, surveyState: "no survey" };
81
- }
82
- M.info("ShowingSurvey", { surveyId: m }), (ze = k.replay) == null || ze.RecordSurveyShown({ id: m, userAgent: window.navigator.userAgent }), qt.disable(), w.emit(u.SurveyWillPresent, { name: u.SurveyWillPresent, "survey.id": m, layout: p });
83
- let W, q, x, oe, se = document.createElement("div");
84
- const Me = (I) => {
85
- const { "view.version": B } = I;
86
- B !== b["x-ul-sdk-version"] && ut(), w.removeListener("verify.view.version", Me);
75
+ const S = "[Sprig] (ERR-409) Found an existing Survey container, aborting rendering of this survey";
76
+ return console.warn(S), { success: !1, message: S, surveyState: "no survey" };
77
+ }
78
+ if (k !== window.UserLeap.visitorId && h !== window.UserLeap.visitorId && !window.previewMode) {
79
+ const S = "Attempted to display survey to a different visitor";
80
+ return window.UserLeap.reportError("DisplaySurvey", new Error(S)), { success: !1, message: S, surveyState: "no survey" };
81
+ }
82
+ M.info("ShowingSurvey", { surveyId: m }), (ze = I.replay) == null || ze.RecordSurveyShown({ id: m, userAgent: window.navigator.userAgent }), Ft.disable(), w.emit(u.SurveyWillPresent, { name: u.SurveyWillPresent, "survey.id": m, layout: p });
83
+ let W, j, x, oe, se = document.createElement("div");
84
+ const je = (S) => {
85
+ const { "view.version": B } = S;
86
+ B !== b["x-ul-sdk-version"] && ut(), w.removeListener("verify.view.version", je);
87
87
  };
88
- w.on("verify.view.version", Me), window.UserLeap.useMobileStyling = A, dt(b) ? (W = "ul-direct-embeded-frame", q = document.head, x = window, oe = !1, (() => {
89
- const I = T(window.UserLeap), B = ne(I), be = window.UserLeap.forceDirectEmbed, Le = I["userleap-platform"] === "web";
88
+ w.on("verify.view.version", je), window.UserLeap.useMobileStyling = A, dt(b) ? (W = "ul-direct-embeded-frame", j = document.head, x = window, oe = !1, (() => {
89
+ const S = T(window.UserLeap), B = ne(S), be = window.UserLeap.forceDirectEmbed, Le = S["userleap-platform"] === "web";
90
90
  return B || be && Le;
91
- })() && (pt(m, d), se.id = W, window.UserLeap.container.appendChild(se), wt(), w.emit(u.SurveyLifeCycle, { state: "presented" }), w.emit(u.SurveyPresented, { name: u.SurveyPresented, "survey.id": m }))) : { frameId: W, contentWinDocHead: q, contentWindow: x, hasOverlay: oe, iframe: se } = Vt({ productConfig: g, useMobileStyling: A, surveyId: m, isFeedback: d, enableCspTrustedTypes: (Ve = window.UserLeap._config) == null ? void 0 : Ve.enableCspTrustedTypes }), window.UserLeap.frameId = W;
92
- const J = { apiURL: window.UserLeap._API_URL, avatars: i, cards: y, configureExitOnOverlayClick: (I) => {
93
- w.once(u.CloseSurveyOnOverlayClick, I);
94
- }, context: s, endCard: o, envId: window.UserLeap.envId, eventEmitFn: w.emit.bind(w), fontFamily: window.UserLeap.fontFamily, fontFamilyURL: window.UserLeap.fontFamilyURL, forceBrandedLogo: a, frame: se, headers: b, layout: p, locale: l, mobileSDKVersion: window.UserLeap.mobileSDKVersion, previewKey: R.getItem("sprig.previewKey"), previewMode: f, productConfig: { framePosition: g == null ? void 0 : g.framePosition, desktopDisplay: g == null ? void 0 : g.desktopDisplay, placement: g == null ? void 0 : g.placement }, responseGroupUid: v, startingQuestionIdx: (We = window.UserLeap.config) == null ? void 0 : We.startingQuestionIdx, studyType: E, styleNonce: window.UserLeap.styleNonce, surveyId: m, tabTitle: document.title, trackPageViewUrl: r, ulEvents: ie, upchunkLibraryURL: window.UserLeap.upchunkLibraryURL, useMobileStyling: A, userId: U, viewDocument: x == null ? void 0 : x.document, viewWindow: x, visitorAttributes: { externalUserId: window.UserLeap.userId, email: window.UserLeap.email }, surveyVisitorAttributes: z || {}, ...window.UserLeap._config };
91
+ })() && (pt(m, d), se.id = W, window.UserLeap.container.appendChild(se), wt(), w.emit(u.SurveyLifeCycle, { state: "presented" }), w.emit(u.SurveyPresented, { name: u.SurveyPresented, "survey.id": m }))) : { frameId: W, contentWinDocHead: j, contentWindow: x, hasOverlay: oe, iframe: se } = Vt({ productConfig: g, useMobileStyling: A, surveyId: m, isFeedback: d, enableCspTrustedTypes: (Ve = window.UserLeap._config) == null ? void 0 : Ve.enableCspTrustedTypes }), window.UserLeap.frameId = W;
92
+ const J = { apiURL: window.UserLeap._API_URL, avatars: i, cards: y, configureExitOnOverlayClick: (S) => {
93
+ w.once(u.CloseSurveyOnOverlayClick, S);
94
+ }, context: a, endCard: o, envId: window.UserLeap.envId, eventEmitFn: w.emit.bind(w), fontFamily: window.UserLeap.fontFamily, fontFamilyURL: window.UserLeap.fontFamilyURL, forceBrandedLogo: s, frame: se, headers: b, layout: p, locale: l, mobileSDKVersion: window.UserLeap.mobileSDKVersion, previewKey: R.getItem("sprig.previewKey"), previewMode: f, productConfig: { framePosition: g == null ? void 0 : g.framePosition, desktopDisplay: g == null ? void 0 : g.desktopDisplay, placement: g == null ? void 0 : g.placement }, responseGroupUid: v, startingQuestionIdx: (We = window.UserLeap.config) == null ? void 0 : We.startingQuestionIdx, studyType: E, styleNonce: window.UserLeap.styleNonce, surveyId: m, tabTitle: document.title, trackPageViewUrl: t, ulEvents: ie, upchunkLibraryURL: window.UserLeap.upchunkLibraryURL, useMobileStyling: A, userId: h, viewDocument: x == null ? void 0 : x.document, viewWindow: x, visitorAttributes: { externalUserId: window.UserLeap.userId, email: window.UserLeap.email }, surveyVisitorAttributes: z || {}, ...window.UserLeap._config };
95
95
  (Be = window.UserLeap._config) != null && Be.startingQuestionIdx && (window.UserLeap._config = { ...window.UserLeap._config, startingQuestionIdx: null });
96
96
  const xt = (d ? window.UserLeap.feedbackCustomStyles : window.UserLeap.customStyles) ?? g.customStyles;
97
97
  J.customStyles = xt, x && (x.__cfg = J);
98
- const ve = window.UserLeap.viewSDKURL ? window.UserLeap.viewSDKURL : J.path, qe = document.getElementById(Qe);
99
- qe && qe.remove();
98
+ const ve = window.UserLeap.viewSDKURL ? window.UserLeap.viewSDKURL : J.path, Fe = document.getElementById(Qe);
99
+ Fe && Fe.remove();
100
100
  const he = function() {
101
- const I = document.createElement("script");
102
- return I.setAttribute("type", "module"), window.UserLeap.nonce && I.setAttribute("nonce", window.UserLeap.nonce), I.id = Qe, I;
103
- }(), Fe = () => {
101
+ const S = document.createElement("script");
102
+ return window.UserLeap.isMobileSDK || S.setAttribute("type", "module"), window.UserLeap.nonce && S.setAttribute("nonce", window.UserLeap.nonce), S.id = Qe, S;
103
+ }(), qe = () => {
104
104
  window.UserLeap.container && Object.assign(window.UserLeap.container.style, { display: "flex" });
105
105
  };
106
106
  if (J.installationMethod === "web-npm" || J.installationMethod === "web-npm-bundled") {
107
- const { default: I } = await import("./view-afp9mz2J.js").then((B) => B.v);
108
- I.configure(J), oe && window.UserLeap.container && Fe();
109
- } else ve && (he.src = `${ve}?t=${Date.now()}`, oe && he.addEventListener("load", () => {
110
- window.UserLeap.container && Fe();
111
- }), x == null || x.addEventListener("error", (I) => {
112
- I.target instanceof HTMLScriptElement && I.target.src === ve && window.UserLeap.reportError("loadFrameScript", new Error("Frame script failed to load"));
107
+ const { default: S } = await import("./view-BGlLLPXB.js").then((B) => B.v);
108
+ S.configure(J), oe && window.UserLeap.container && qe();
109
+ } else ve && (he.src = `${ve}${window.UserLeap.isMobileSDK ? "" : `?t=${Date.now()}`}`, oe && he.addEventListener("load", () => {
110
+ window.UserLeap.container && qe();
111
+ }), x == null || x.addEventListener("error", (S) => {
112
+ S.target instanceof HTMLScriptElement && S.target.src === ve && window.UserLeap.reportError("loadFrameScript", new Error("Frame script failed to load"));
113
113
  }, { capture: !0, once: !0 }));
114
- q == null || q.appendChild(he);
114
+ j == null || j.appendChild(he);
115
115
  const He = { success: !0, surveyState: "ready", surveyId: m, responseGroupUid: v };
116
116
  return window.UserLeap.isMobileSDK && e && (He.delay = e), He;
117
117
  };
118
- function fe(t) {
118
+ function fe(r) {
119
119
  var n;
120
120
  if (window.UserLeap.useMobileStyling !== void 0) return window.UserLeap.useMobileStyling;
121
- const r = ((n = window.UserLeap.windowDimensions) == null ? void 0 : n.width) ?? document.body.clientWidth;
122
- return ne(t) || r > 10 && r < 500;
121
+ const t = ((n = window.UserLeap.windowDimensions) == null ? void 0 : n.width) ?? document.body.clientWidth;
122
+ return ne(r) || t > 10 && t < 500;
123
123
  }
124
- function ne(t) {
125
- return Ft.has(t["userleap-platform"]);
124
+ function ne(r) {
125
+ return qt.has(r["userleap-platform"]);
126
126
  }
127
- const Ye = /* @__PURE__ */ new WeakMap(), Ht = (t, r) => {
127
+ const Ye = /* @__PURE__ */ new WeakMap(), Ht = (r, t) => {
128
128
  try {
129
- return ((s) => {
130
- var a, o;
131
- const e = Ye.get(s);
129
+ return ((a) => {
130
+ var s, o;
131
+ const e = Ye.get(a);
132
132
  if (e) return e;
133
- if (!((a = s.trustedTypes) != null && a.createPolicy)) throw new Error("Trusted types not supported");
134
- const i = (o = s.trustedTypes) == null ? void 0 : o.createPolicy("sprig-sdk", { createHTML: (d) => d, createScript: (d) => d, createScriptURL: (d) => d });
135
- return Ye.set(s, i), i;
136
- })(r).createHTML(t);
133
+ if (!((s = a.trustedTypes) != null && s.createPolicy)) throw new Error("Trusted types not supported");
134
+ const i = (o = a.trustedTypes) == null ? void 0 : o.createPolicy("sprig-sdk", { createHTML: (d) => d, createScript: (d) => d, createScriptURL: (d) => d });
135
+ return Ye.set(a, i), i;
136
+ })(t).createHTML(r);
137
137
  } catch (n) {
138
- return console.warn("Could not create TrustedHTML object", n), t;
138
+ return console.warn("Could not create TrustedHTML object", n), r;
139
139
  }
140
- }, Ce = (t, r, n = window) => {
141
- var s;
142
- return r && ((s = n.trustedTypes) != null && s.createPolicy) ? Ht(t, n) : t;
140
+ }, Ce = (r, t, n = window) => {
141
+ var a;
142
+ return t && ((a = n.trustedTypes) != null && a.createPolicy) ? Ht(r, n) : r;
143
143
  }, Te = "ul-frame";
144
144
  window.UserLeap && window.Sprig && (window.Sprig._gtm ? window.Sprig = window.UserLeap : window.UserLeap = window.Sprig), window.UserLeap || (window.UserLeap = window.Sprig), window.Sprig || (window.Sprig = window.UserLeap);
145
- const Ue = "0px", pt = (t, r, n) => {
146
- window.UserLeap.container = document.createElement("div"), window.UserLeap.container.className = "ul-container" + (r ? " ul-container-feedback" : ""), t && (window.UserLeap.container.dataset.studyId = t.toString());
147
- const s = yt();
148
- n && s && !window.UserLeap.useMobileStyling ? s.appendChild(window.UserLeap.container) : document.body.appendChild(window.UserLeap.container);
149
- }, ut = (t, r) => {
150
- var s;
145
+ const Ue = "0px", pt = (r, t, n) => {
146
+ window.UserLeap.container = document.createElement("div"), window.UserLeap.container.className = "ul-container" + (t ? " ul-container-feedback" : ""), r && (window.UserLeap.container.dataset.studyId = r.toString());
147
+ const a = yt();
148
+ n && a && !window.UserLeap.useMobileStyling ? a.appendChild(window.UserLeap.container) : document.body.appendChild(window.UserLeap.container);
149
+ }, ut = (r, t) => {
150
+ var a;
151
151
  Bt();
152
152
  const n = window.UserLeap.container;
153
153
  if (n) try {
154
- (s = n.parentNode) == null || s.removeChild(n), window.UserLeap.container = null, _("trackStartUrl", null), w.emit(u.SurveyLifeCycle, { state: "dismissed" }), w.emit(u.SurveyClosed, { name: u.SurveyClosed, initiator: t, "survey.id": parseInt(n.dataset.studyId), ...r && { studyType: r } });
154
+ (a = n.parentNode) == null || a.removeChild(n), window.UserLeap.container = null, _("trackStartUrl", null), w.emit(u.SurveyLifeCycle, { state: "dismissed" }), w.emit(u.SurveyClosed, { name: u.SurveyClosed, initiator: r, "survey.id": parseInt(n.dataset.studyId), ...t && { studyType: t } });
155
155
  } catch (e) {
156
- console.warn(`[Sprig] (ERR-412) Error removing UserLeap container by ${t} ` + n), e instanceof Error && window.UserLeap.reportError("dismissActiveSurvey", e);
156
+ console.warn(`[Sprig] (ERR-412) Error removing UserLeap container by ${r} ` + n), e instanceof Error && window.UserLeap.reportError("dismissActiveSurvey", e);
157
157
  }
158
158
  }, wt = () => {
159
- w.once(u.SurveyWillClose, ({ initiator: t, studyType: r }) => {
160
- w.removeAllListeners(u.CloseSurveyOnOverlayClick), ut(t, r);
159
+ w.once(u.SurveyWillClose, ({ initiator: r, studyType: t }) => {
160
+ w.removeAllListeners(u.CloseSurveyOnOverlayClick), ut(r, t);
161
161
  });
162
- }, zt = (t, r, n, s) => {
162
+ }, zt = (r, t, n, a) => {
163
163
  var l, p;
164
- const e = { position: "fixed", bottom: "0px", right: Ue, border: 0, backgroundColor: "rgba(0,0,0,0)", zIndex: 2147483646, transition: "width 0.2s ease-in-out, height 0.2s ease-in-out", maxWidth: "100%" }, i = Object.assign({}, r, window.UserLeap), { desktopDisplay: a } = r || {}, o = a === "center-modal";
164
+ const e = { position: "fixed", bottom: "0px", right: Ue, border: 0, backgroundColor: "rgba(0,0,0,0)", zIndex: 2147483646, transition: "width 0.2s ease-in-out, height 0.2s ease-in-out", maxWidth: "100%" }, i = Object.assign({}, t, window.UserLeap), { desktopDisplay: s } = t || {}, o = s === "center-modal";
165
165
  let d;
166
166
  o && (i.framePosition = "center");
167
167
  let c = !1;
@@ -171,7 +171,7 @@ const Ue = "0px", pt = (t, r, n) => {
171
171
  const f = () => {
172
172
  c = !0, d = { margin: "auto", position: "static" };
173
173
  };
174
- if (s) o ? f() : d = { position: "relative", height: "300px" };
174
+ if (a) o ? f() : d = { position: "relative", height: "300px" };
175
175
  else switch (i.framePosition) {
176
176
  case "bottomLeft":
177
177
  d = { left: Ue };
@@ -189,14 +189,14 @@ const Ue = "0px", pt = (t, r, n) => {
189
189
  return c && ((f, g) => {
190
190
  const y = { position: "fixed", overflow: "auto", top: "0px", left: "0px", display: "none", height: "100%", width: "100%", transition: "background-color 0.3s ease-out", zIndex: 2147483646 }, v = g ? f.overlayStyleMobile : f.overlayStyle;
191
191
  y["background-color"] = v === "light" ? "rgba(255,255,255, 0.95)" : "rgba(0,0,0,0.9)", g || (y.margin = "auto"), window.UserLeap.container && Object.assign(window.UserLeap.container.style, y);
192
- })(i, n), Object.assign(t.style, e, d), c;
193
- }, Vt = ({ productConfig: t, useMobileStyling: r, surveyId: n, isFeedback: s, enableCspTrustedTypes: e }) => {
192
+ })(i, n), Object.assign(r.style, e, d), c;
193
+ }, Vt = ({ productConfig: r, useMobileStyling: t, surveyId: n, isFeedback: a, enableCspTrustedTypes: e }) => {
194
194
  var g, y;
195
- const i = Te, a = s && t.desktopDisplay === "slider";
196
- pt(n, s, a), Wt();
195
+ const i = Te, s = a && r.desktopDisplay === "slider";
196
+ pt(n, a, s), Wt();
197
197
  const o = document.createElement("iframe");
198
198
  o.id = i, o.setAttribute("title", "Sprig User Feedback Dialog");
199
- const d = zt(o, t, r, s);
199
+ const d = zt(o, r, t, a);
200
200
  wt();
201
201
  let c = !1;
202
202
  o.setHeight = (v) => {
@@ -205,11 +205,11 @@ const Ue = "0px", pt = (t, r, n) => {
205
205
  let l = !1;
206
206
  o.setWidth = (v) => {
207
207
  parseInt(o.style.width) == v && l || (l = !0, o.style.width = `${v}px`, w.emit(u.SurveyWidth, { name: u.SurveyWidth, contentFrameWidth: v, "survey.id": n }));
208
- }, (g = window.UserLeap.container) == null || g.appendChild(o), t && (r ? t.exitOnOverlayClickMobile : t.exitOnOverlayClick) && window.UserLeap.container && (window.UserLeap.container.onclick = () => {
208
+ }, (g = window.UserLeap.container) == null || g.appendChild(o), r && (t ? r.exitOnOverlayClickMobile : r.exitOnOverlayClick) && window.UserLeap.container && (window.UserLeap.container.onclick = () => {
209
209
  w.emit(u.CloseSurveyOnOverlayClick);
210
210
  }), w.emit(u.SurveyLifeCycle, { state: "presented" }), w.emit(u.SurveyPresented, { name: u.SurveyPresented, "survey.id": n });
211
211
  const p = (y = o.contentWindow) == null ? void 0 : y.document;
212
- if (p && (p.open("text/html", "replace"), p.write(Ce("<!doctype html><head></head><body></body></html>", e, o.contentWindow)), p.close(), !r)) {
212
+ if (p && (p.open("text/html", "replace"), p.write(Ce("<!doctype html><head></head><body></body></html>", e, o.contentWindow)), p.close(), !t)) {
213
213
  const v = p.body;
214
214
  v.style.display = "flex", v.style.alignItems = "center";
215
215
  }
@@ -218,150 +218,143 @@ const Ue = "0px", pt = (t, r, n) => {
218
218
  }, gt = { [u.SurveyFadingOut]: () => {
219
219
  window.UserLeap.container && Object.assign(window.UserLeap.container.style, { "background-color": "rgba(0,0,0,0)" });
220
220
  } }, Wt = () => {
221
- Object.entries(gt).forEach(([t, r]) => {
222
- w.on(t, r);
221
+ Object.entries(gt).forEach(([r, t]) => {
222
+ w.on(r, t);
223
223
  });
224
224
  }, Bt = () => {
225
- Object.entries(gt).forEach(([t, r]) => {
226
- w.off(t, r);
225
+ Object.entries(gt).forEach(([r, t]) => {
226
+ w.off(r, t);
227
227
  });
228
- }, P = (t) => !!t && t.nodeType === Node.ELEMENT_NODE, Xe = (t) => t instanceof HTMLElement || t instanceof SVGElement, le = ({ document: t, elementId: r, styleString: n, nonce: s }) => {
229
- const e = t.getElementById(r);
228
+ }, F = (r) => !!r && r.nodeType === Node.ELEMENT_NODE, Xe = (r) => r instanceof HTMLElement || r instanceof SVGElement, le = ({ document: r, elementId: t, styleString: n, nonce: a }) => {
229
+ const e = r.getElementById(t);
230
230
  if (e) return void (e.textContent = n);
231
- const i = t.createElement("style");
232
- s && (i.nonce = s), i.textContent = n, i.id = r, t.head.appendChild(i);
233
- }, Nt = (t, r) => {
234
- const n = r.querySelector(".sprig-question-body");
235
- if (!P(n)) return t;
236
- const s = n.scrollHeight;
237
- return s < 100 ? t : t - (s - 100);
238
- }, Ze = (t, r) => {
239
- const n = r.querySelector(t);
240
- if (!P(n)) return 0;
241
- const s = getComputedStyle(n);
242
- return parseFloat(s.paddingLeft) + parseFloat(s.paddingRight) + (parseFloat(s.marginLeft) + parseFloat(s.marginRight)) + (parseFloat(s.borderLeftWidth) + parseFloat(s.borderRightWidth));
243
- }, $t = (t, r, n) => {
244
- const s = t.querySelector(".ul-card__container"), e = t.querySelector(".ul-app");
245
- let i = 600, a = 360, o = 0;
246
- if (P(s) && P(e)) {
247
- const d = s.querySelector(".ul-card--matrix_grid"), c = !d && r && n;
231
+ const i = r.createElement("style");
232
+ a && (i.nonce = a), i.textContent = n, i.id = t, r.head.appendChild(i);
233
+ }, Ze = (r, t) => {
234
+ const n = t.querySelector(r);
235
+ if (!F(n)) return 0;
236
+ const a = getComputedStyle(n);
237
+ return parseFloat(a.paddingLeft) + parseFloat(a.paddingRight) + (parseFloat(a.marginLeft) + parseFloat(a.marginRight)) + (parseFloat(a.borderLeftWidth) + parseFloat(a.borderRightWidth));
238
+ }, Nt = (r, t, n) => {
239
+ const a = r.querySelector(".ul-card__container"), e = r.querySelector(".ul-app");
240
+ let i = 600, s = 360;
241
+ if (F(a) && F(e)) {
242
+ const o = a.querySelector(".ul-card--matrix_grid"), d = !o && t && n;
248
243
  try {
249
- c && (e.style.width = "360px"), i = s.clientHeight, i += ((f) => {
250
- const g = f.querySelector(".sprig-question-body"), y = f.querySelector(".ul-card"), v = f.querySelector(".ul-card-main-content"), m = f.querySelector(".ul-footer"), U = f.querySelector(".sprig-container");
244
+ d && (e.style.width = "360px"), i = a.scrollHeight, i += ((p) => {
245
+ const f = p.querySelector(".sprig-question-body"), g = p.querySelector(".ul-card"), y = p.querySelector(".ul-card-main-content"), v = p.querySelector(".ul-footer"), m = p.querySelector(".sprig-container");
251
246
  let h = 0;
252
- return P(y) && (h += y.scrollHeight - y.clientHeight), P(v) && (h += v.scrollHeight - v.clientHeight), P(g) && (h += g.scrollHeight - g.clientHeight), P(m) && P(U) && U.clientHeight === 0 && (h += m.clientHeight), h;
253
- })(t);
254
- const l = getComputedStyle(s);
255
- o = i;
256
- const p = parseFloat(l.marginTop) + parseFloat(l.marginBottom);
257
- i += p + (parseFloat(l.borderTopWidth) + parseFloat(l.borderBottomWidth)), d && (a = d.scrollWidth, a += Ze(".ul-card__container", t), a += Ze(".sprig-question-body", t));
247
+ return F(g) && (h += g.scrollHeight - g.clientHeight), F(y) && (h += y.scrollHeight - y.clientHeight), F(f) && (h += f.scrollHeight - f.clientHeight), F(v) && F(m) && m.clientHeight === 0 && (h += v.clientHeight), h;
248
+ })(r);
249
+ const c = getComputedStyle(a), l = parseFloat(c.marginTop) + parseFloat(c.marginBottom);
250
+ i += l + (parseFloat(c.borderTopWidth) + parseFloat(c.borderBottomWidth)), o && (s = o.scrollWidth, s += Ze(".ul-card__container", r), s += Ze(".sprig-question-body", r));
258
251
  } finally {
259
- c && e.style.removeProperty("width");
252
+ d && e.style.removeProperty("width");
260
253
  }
261
254
  }
262
- return [i + 2, a, Nt(o, t)];
263
- }, mr = (t) => {
264
- const r = t.querySelector(".ul-card__container");
265
- r && (r.scrollTop = 0);
255
+ return [i + 2, s];
256
+ }, yr = (r) => {
257
+ const t = r.querySelector(".ul-card__container");
258
+ t && (t.scrollTop = 0);
266
259
  }, yt = () => L, Q = () => document.getElementById("sprig-feedback-container"), Ee = () => document.getElementById("sprig-feedback-loading-animation"), mt = () => !!document.getElementById(Te);
267
260
  let et = !1, L = null, C = null, Pe = !1, ee = null, $ = null;
268
- const Gt = ["bottom-left", "bottom-right", "center-left", "center-right"], ce = () => {
269
- var r;
270
- const t = window.UserLeap.container;
271
- return ((r = t == null ? void 0 : t.parentElement) == null ? void 0 : r.id) === "sprig-feedback-loading-container";
261
+ const $t = ["bottom-left", "bottom-right", "center-left", "center-right"], ce = () => {
262
+ var t;
263
+ const r = window.UserLeap.container;
264
+ return ((t = r == null ? void 0 : r.parentElement) == null ? void 0 : t.id) === "sprig-feedback-loading-container";
272
265
  }, ft = () => document.getElementById("sprig-feedback-error-container"), vt = () => {
273
266
  if (!L) return 0;
274
- const t = L == null ? void 0 : L.clientWidth, r = window.getComputedStyle(L);
275
- return t + parseInt(r.borderRightWidth || "0") + parseInt(r.borderLeftWidth || "0");
276
- }, pe = (t) => {
277
- const r = Q();
278
- r && ($ != null && $.endsWith("right") ? r.style.right = `${t}px` : $ != null && $.endsWith("left") && (r.style.left = `${t}px`));
267
+ const r = L == null ? void 0 : L.clientWidth, t = window.getComputedStyle(L);
268
+ return r + parseInt(t.borderRightWidth || "0") + parseInt(t.borderLeftWidth || "0");
269
+ }, pe = (r) => {
270
+ const t = Q();
271
+ t && ($ != null && $.endsWith("right") ? t.style.right = `${r}px` : $ != null && $.endsWith("left") && (t.style.left = `${r}px`));
279
272
  }, Se = () => {
280
273
  if (L && (ce() || ft())) {
281
274
  w.off(u.SurveyAppeared, X), _e();
282
- const t = vt();
283
- return pe(-t), !0;
275
+ const r = vt();
276
+ return pe(-r), !0;
284
277
  }
285
278
  return !1;
286
279
  }, X = () => {
287
280
  if (!L || !C) return;
288
- const t = Ee();
289
- t && t.remove(), L.style.height = "auto", L.style.width = "auto", C.disabled = !1, Pe = !1;
281
+ const r = Ee();
282
+ r && r.remove(), L.style.height = "auto", L.style.width = "auto", C.disabled = !1, Pe = !1;
290
283
  }, _e = () => {
291
284
  if (L && !Ee()) {
292
- const t = (() => {
285
+ const r = (() => {
293
286
  var n;
294
287
  if (Ee()) return;
295
- const r = document.createElement("div");
296
- return r.className = "ul-loading-spinner-container", r.id = "sprig-feedback-loading-animation", r.role = "progressbar", r.setAttribute("aria-live", "polite"), r.setAttribute("aria-busy", "true"), r.setAttribute("aria-label", "Processing..."), r.innerHTML = Ce(`
288
+ const t = document.createElement("div");
289
+ return t.className = "ul-loading-spinner-container", t.id = "sprig-feedback-loading-animation", t.role = "progressbar", t.setAttribute("aria-live", "polite"), t.setAttribute("aria-busy", "true"), t.setAttribute("aria-label", "Processing..."), t.innerHTML = Ce(`
297
290
  <div class="ul-loading-spinner">
298
291
  <div class="first"></div>
299
292
  <div class="second"></div>
300
293
  <div class="third"></div>
301
294
  <div class="fourth"></div>
302
295
  </div>
303
- `, (n = window.UserLeap._config) == null ? void 0 : n.enableCspTrustedTypes), r;
296
+ `, (n = window.UserLeap._config) == null ? void 0 : n.enableCspTrustedTypes), t;
304
297
  })();
305
- t && (L.style.height = "300px", L.style.width = "360px", L.appendChild(t));
298
+ r && (L.style.height = "300px", L.style.width = "360px", L.appendChild(r));
306
299
  }
307
300
  }, tt = () => {
308
301
  L && C && (pe(0), C.disabled = !0, Pe = !0);
309
- }, ht = async (t, r, n) => {
310
- const { buttonTheme: s, customStyles: e, eventId: i, placement: a, desktopDisplay: o, feedbackLabel: d, surveyUuid: c, surveyId: l } = t;
302
+ }, ht = async (r, t, n) => {
303
+ const { buttonTheme: a, customStyles: e, eventId: i, placement: s, desktopDisplay: o, feedbackLabel: d, surveyUuid: c, surveyId: l } = r;
311
304
  window.UserLeap.feedbackCustomStyles = void 0;
312
305
  let p = Q();
313
306
  if (p) {
314
- if (!r && i === ee) return;
307
+ if (!t && i === ee) return;
315
308
  p.remove(), w.off(ie.SURVEY_FADING_OUT, Se);
316
309
  }
317
- ee = i, le({ document, elementId: "sprig-feedback-style", styleString: '.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-in-transition{animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}#sprig-feedback-button{border-left:0;border-radius:0 8px 8px 0;display:grid;padding:8px;text-align:center;transition:all ease-in-out 1s;z-index:inherit}#sprig-feedback-button:hover{cursor:pointer}.sprig-feedback-button-label{writing-mode:vertical-lr;text-orientation:sideways}.sprig-feedback-button-right{transform:rotate(180deg)}.sprig-feedback-button-bottom{align-self:flex-end;margin-bottom:20px}.sprig-feedback-button-light{background:#efefee;color:#000;border:1px solid #e2e3e1}.sprig-feedback-button-dark{background:#000;color:#fff;border:1px solid #000000}#sprig-feedback-container{display:flex;align-items:center;position:fixed;transition:right .2s linear,left .2s linear;z-index:2147483646}.sprig-feedback-container-left{flex-flow:row-reverse}.sprig-feedback-container-center{top:50%;transform:translateY(-50%)}.sprig-feedback-container-bottom{bottom:0%;margin-bottom:15px}.sprig-feedback-loading-container{align-items:center;background-color:#fff;border:2px solid var(--feedback-border);display:flex;max-height:90vh;max-width:90vw;min-width:0px}.sprig-feedback-loading-container-left{border-left:none;border-radius:0 8px 8px 0}.sprig-feedback-loading-container-right{border-right:none;border-radius:8px 0 0 8px}#sprig-feedback-error-container{margin:auto;text-align:center;width:360px}.sprig-feedback-error-text{font-weight:400;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol}#sprig-feedback-loading-container .ul-container{position:relative;max-height:inherit}#sprig-feedback-loading-animation{position:absolute}.sprig-feedback-loading-container-previews iframe{max-height:inherit!important}', nonce: window.UserLeap.styleNonce }), le({ document, elementId: "ul-custom-style", styleString: e ?? "", nonce: window.UserLeap.styleNonce }), et = o === "center-modal", $ = a;
318
- const [f, g] = a.split("-");
319
- ((U) => {
320
- if (Q() || !Gt.includes(U)) return;
321
- const [h, S] = U.split("-"), E = document.createElement("div");
322
- E.id = "sprig-feedback-container", E.classList.add(`sprig-feedback-container-${S}`, `sprig-feedback-container-${h}`), document.body.appendChild(E);
323
- })(a), p = Q(), C = document.createElement("button");
310
+ ee = i, le({ document, elementId: "sprig-feedback-style", styleString: '.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-in-transition{animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}#sprig-feedback-button{border-left:0;border-radius:0 8px 8px 0;display:grid;padding:8px;text-align:center;transition:all ease-in-out 1s;z-index:inherit}#sprig-feedback-button:hover{cursor:pointer}.sprig-feedback-button-label{writing-mode:vertical-lr;text-orientation:sideways}.sprig-feedback-button-right{transform:rotate(180deg)}.sprig-feedback-button-bottom{align-self:flex-end;margin-bottom:20px}.sprig-feedback-button-light{background:#efefee;color:#000;border:1px solid #e2e3e1}.sprig-feedback-button-dark{background:#000;color:#fff;border:1px solid #000000}#sprig-feedback-container{display:flex;align-items:center;position:fixed;transition:right .2s linear,left .2s linear;z-index:2147483646}.sprig-feedback-container-left{flex-flow:row-reverse}.sprig-feedback-container-center{top:50%;transform:translateY(-50%)}.sprig-feedback-container-bottom{bottom:0%;margin-bottom:15px}.sprig-feedback-loading-container{align-items:center;background-color:#fff;border:2px solid var(--feedback-border);display:flex;max-height:90vh;max-width:90vw;min-width:0px}.sprig-feedback-loading-container-left{border-left:none;border-radius:0 8px 8px 0}.sprig-feedback-loading-container-right{border-right:none;border-radius:8px 0 0 8px}#sprig-feedback-error-container{margin:auto;text-align:center;width:360px}.sprig-feedback-error-text{font-weight:400;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol}#sprig-feedback-loading-container .ul-container{position:relative;max-height:inherit}#sprig-feedback-loading-animation{position:absolute}.sprig-feedback-loading-container-previews iframe{max-height:inherit!important}', nonce: window.UserLeap.styleNonce }), le({ document, elementId: "ul-custom-style", styleString: e ?? "", nonce: window.UserLeap.styleNonce }), et = o === "center-modal", $ = s;
311
+ const [f, g] = s.split("-");
312
+ ((h) => {
313
+ if (Q() || !$t.includes(h)) return;
314
+ const [k, U] = h.split("-"), E = document.createElement("div");
315
+ E.id = "sprig-feedback-container", E.classList.add(`sprig-feedback-container-${U}`, `sprig-feedback-container-${k}`), document.body.appendChild(E);
316
+ })(s), p = Q(), C = document.createElement("button");
324
317
  const y = document.createElement("div");
325
- y.className = "sprig-feedback-button-label", y.innerText = d, C.appendChild(y), C.id = "sprig-feedback-button", C.classList.add(`sprig-feedback-button-${g}`, `sprig-feedback-button-${f}`, `sprig-feedback-button-${s}`, "fade-in-transition"), w.on(ie.SURVEY_FADING_OUT, Se), C.addEventListener("click", async () => {
326
- const U = document.getElementById("sprig-feedback-error-container");
318
+ y.className = "sprig-feedback-button-label", y.innerText = d, C.appendChild(y), C.id = "sprig-feedback-button", C.classList.add(`sprig-feedback-button-${g}`, `sprig-feedback-button-${f}`, `sprig-feedback-button-${a}`, "fade-in-transition"), w.on(ie.SURVEY_FADING_OUT, Se), C.addEventListener("click", async () => {
319
+ const h = document.getElementById("sprig-feedback-error-container");
327
320
  if (mt() || ft()) {
328
321
  if (Se()) {
329
- w.emit(u.SurveyCloseRequested, { name: u.SurveyCloseRequested, initiator: j.FeedbackClosed, studyType: "feedbackButton", "survey.id": l }), w.emit(u.SurveyWillClose, { name: u.SurveyWillClose, initiator: j.FeedbackClosed, studyType: "feedbackButton", "survey.id": l });
330
- const S = Q();
331
- U && S && (S.remove(), ee = null, L = null);
322
+ w.emit(u.SurveyCloseRequested, { name: u.SurveyCloseRequested, initiator: P.FeedbackClosed, studyType: "feedbackButton", "survey.id": l }), w.emit(u.SurveyWillClose, { name: u.SurveyWillClose, initiator: P.FeedbackClosed, studyType: "feedbackButton", "survey.id": l });
323
+ const U = Q();
324
+ h && U && (U.remove(), ee = null, L = null);
332
325
  }
333
326
  return;
334
327
  }
335
- if (fe(T(window.UserLeap)) || Pe || tt(), r) return L && L.classList.add("sprig-feedback-loading-container-previews"), await Z(r), void X();
336
- const h = await (async (S) => {
337
- const E = await O(D("1", [F], "startFeedbackStudy"), { body: JSON.stringify({ surveyUuid: S }), method: "POST" });
328
+ if (fe(T(window.UserLeap)) || Pe || tt(), t) return L && L.classList.add("sprig-feedback-loading-container-previews"), await Z(t), void X();
329
+ const k = await (async (U) => {
330
+ const E = await O(D("1", [q], "startFeedbackStudy"), { body: JSON.stringify({ surveyUuid: U }), method: "POST" });
338
331
  return E.ok ? E.json : null;
339
332
  })(c);
340
- if (h) w.once(u.SurveyAppeared, X), Z({ ...h, studyType: "feedbackButton" }, n);
333
+ if (k) w.once(u.SurveyAppeared, X), Z({ ...k, studyType: "feedbackButton" }, n);
341
334
  else if (L) {
342
- const S = Kt();
343
- L.appendChild(S), X(), L.style.height = "300px", L.style.width = "360px";
335
+ const U = Gt();
336
+ L.appendChild(U), X(), L.style.height = "300px", L.style.width = "360px";
344
337
  }
345
338
  }), p == null || p.appendChild(C), w.emit(u.FeedbackButtonLoaded, { name: u.FeedbackButtonLoaded, "survey.id": l });
346
339
  const { useMobileStyling: v, _config: { border: m } } = window.UserLeap;
347
340
  if (et || v) pe(0);
348
341
  else {
349
- const U = document.createElement("div");
350
- U.id = "sprig-feedback-loading-container", U.className = `sprig-feedback-loading-container sprig-feedback-loading-container-${g}`, U.style.setProperty("--feedback-border", m), L = U, _e(), p == null || p.appendChild(U);
351
- const h = vt();
352
- pe(-h);
342
+ const h = document.createElement("div");
343
+ h.id = "sprig-feedback-loading-container", h.className = `sprig-feedback-loading-container sprig-feedback-loading-container-${g}`, h.style.setProperty("--feedback-border", m), L = h, _e(), p == null || p.appendChild(h);
344
+ const k = vt();
345
+ pe(-k);
353
346
  }
354
- window.UserLeap._config.isOnQuestionsTab && r && !ce() && L && (tt(), _e(), L && L.classList.add("sprig-feedback-loading-container-previews"), Z(r), X());
355
- }, Kt = () => {
347
+ window.UserLeap._config.isOnQuestionsTab && t && !ce() && L && (tt(), _e(), L && L.classList.add("sprig-feedback-loading-container-previews"), Z(t), X());
348
+ }, Gt = () => {
356
349
  var n;
357
- const t = document.createElement("div");
358
- t.id = "sprig-feedback-error-container", t.innerHTML = Ce(`<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" fill="none">
350
+ const r = document.createElement("div");
351
+ r.id = "sprig-feedback-error-container", r.innerHTML = Ce(`<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" fill="none">
359
352
  <circle cx="20" cy="20" r="14.5" stroke="#B0B5B7" stroke-width="3"/>
360
353
  <path d="M20 12L20 21.6" stroke="#B0B5B7" stroke-width="3" stroke-linecap="round"/>
361
354
  <circle cx="19.9984" cy="27.6" r="1.6" fill="#B0B5B7"/>
362
355
  </svg>`, (n = window.UserLeap._config) == null ? void 0 : n.enableCspTrustedTypes);
363
- const r = document.createElement("h3");
364
- return r.className = "sprig-feedback-error-text", r.innerText = "There was an error while loading the survey", t.appendChild(r), t;
356
+ const t = document.createElement("h3");
357
+ return t.className = "sprig-feedback-error-text", t.innerText = "There was an error while loading the survey", r.appendChild(t), r;
365
358
  }, Re = new class {
366
359
  constructor() {
367
360
  N(this, "_ldData", {});
@@ -369,13 +362,13 @@ const Gt = ["bottom-left", "bottom-right", "center-left", "center-right"], ce =
369
362
  getAllLaunchDarklyVariations() {
370
363
  return this._ldData;
371
364
  }
372
- setLDFlagsVariations(t) {
365
+ setLDFlagsVariations(r) {
373
366
  try {
374
- return !(!t || typeof t != "object" || Array.isArray(t)) && (Object.keys(this._ldData).forEach((r) => {
375
- delete this._ldData[r];
376
- }), Object.keys(t).forEach((r) => this._ldData[`!launch_darkly_${r}`] = (t[r] ?? 0) + 1), !0);
377
- } catch (r) {
378
- return r instanceof Error && window.UserLeap.reportError("setAllLDFlagsVariations", r), console.warn("[Sprig] An issue had occured when setting LaunchDarkly flags and variations."), !1;
367
+ return !(!r || typeof r != "object" || Array.isArray(r)) && (Object.keys(this._ldData).forEach((t) => {
368
+ delete this._ldData[t];
369
+ }), Object.keys(r).forEach((t) => this._ldData[`!launch_darkly_${t}`] = (r[t] ?? 0) + 1), !0);
370
+ } catch (t) {
371
+ return t instanceof Error && window.UserLeap.reportError("setAllLDFlagsVariations", t), console.warn("[Sprig] An issue had occured when setting LaunchDarkly flags and variations."), !1;
379
372
  }
380
373
  }
381
374
  }();
@@ -384,60 +377,60 @@ const de = new class {
384
377
  constructor() {
385
378
  N(this, "_optimizelyData", {});
386
379
  }
387
- setOptimizelyExperiment(t, r = !0) {
388
- if (!t || typeof t != "object") return !1;
389
- const { experiments: n } = t;
380
+ setOptimizelyExperiment(r, t = !0) {
381
+ if (!r || typeof r != "object") return !1;
382
+ const { experiments: n } = r;
390
383
  try {
391
- return r && Object.keys(this._optimizelyData).map((s) => {
392
- delete this._optimizelyData[s];
393
- }), n && n.map((s) => {
394
- const { id: e, variation: i } = s, a = this.transformExperimentId(e);
395
- i && typeof i == "string" && (this._optimizelyData[a] = i);
384
+ return t && Object.keys(this._optimizelyData).map((a) => {
385
+ delete this._optimizelyData[a];
386
+ }), n && n.map((a) => {
387
+ const { id: e, variation: i } = a, s = this.transformExperimentId(e);
388
+ i && typeof i == "string" && (this._optimizelyData[s] = i);
396
389
  }), !0;
397
- } catch (s) {
398
- return s instanceof Error && window.UserLeap.reportError("setOptimizelyExperiment", s), !1;
390
+ } catch (a) {
391
+ return a instanceof Error && window.UserLeap.reportError("setOptimizelyExperiment", a), !1;
399
392
  }
400
393
  }
401
394
  getAllOptimizelyExperiments() {
402
395
  return this._optimizelyData;
403
396
  }
404
- getOptimizelyVariationName(t) {
405
- return this._optimizelyData[this.transformExperimentId(t)];
397
+ getOptimizelyVariationName(r) {
398
+ return this._optimizelyData[this.transformExperimentId(r)];
406
399
  }
407
- transformExperimentId(t) {
408
- return "!optimizely_experiments_" + t;
400
+ transformExperimentId(r) {
401
+ return "!optimizely_experiments_" + r;
409
402
  }
410
403
  getAndSetWebOptimizelyExperiments() {
411
- var t;
404
+ var r;
412
405
  try {
413
406
  if (window && window.optimizely && typeof window.optimizely.get == "function") {
414
- const r = (t = window.optimizely.get("state")) == null ? void 0 : t.getExperimentStates({ isActive: !0 });
415
- if (r) {
416
- const n = Object.keys(r).map((s) => {
407
+ const t = (r = window.optimizely.get("state")) == null ? void 0 : r.getExperimentStates({ isActive: !0 });
408
+ if (t) {
409
+ const n = Object.keys(t).map((a) => {
417
410
  var e, i;
418
- return (e = r[s].variation) != null && e.name ? { id: s, variation: (i = r[s].variation) == null ? void 0 : i.name } : { id: s, variation: "Original" };
411
+ return (e = t[a].variation) != null && e.name ? { id: a, variation: (i = t[a].variation) == null ? void 0 : i.name } : { id: a, variation: "Original" };
419
412
  });
420
413
  return this.setOptimizelyExperiment({ experiments: n }, !1), !0;
421
414
  }
422
415
  return !1;
423
416
  }
424
417
  return !1;
425
- } catch (r) {
426
- return r instanceof Error && window.UserLeap.reportError("getAndSetWebOptimizely", r), !1;
418
+ } catch (t) {
419
+ return t instanceof Error && window.UserLeap.reportError("getAndSetWebOptimizely", t), !1;
427
420
  }
428
421
  }
429
422
  }();
430
423
  Object.freeze(de);
431
- class Jt {
432
- constructor(r, n) {
424
+ class Kt {
425
+ constructor(t, n) {
433
426
  N(this, "paused");
434
427
  N(this, "queue");
435
428
  N(this, "ul");
436
- this.ul = r, this.paused = !1, this.queue = [], this.flush(n);
429
+ this.ul = t, this.paused = !1, this.queue = [], this.flush(n);
437
430
  }
438
- flush(r) {
439
- const n = r.length;
440
- if (n) for (let s = 0; s < n; s++) this.push(r[s]);
431
+ flush(t) {
432
+ const n = t.length;
433
+ if (n) for (let a = 0; a < n; a++) this.push(t[a]);
441
434
  }
442
435
  isPaused() {
443
436
  return this.paused;
@@ -447,198 +440,198 @@ class Jt {
447
440
  }
448
441
  unpause() {
449
442
  this.paused = !1;
450
- const r = this.queue.slice();
451
- this.empty(), this.flush(r);
443
+ const t = this.queue.slice();
444
+ this.empty(), this.flush(t);
452
445
  }
453
- push(r) {
454
- if (this.paused) this.queue.push(r);
455
- else if (r instanceof Function) r();
446
+ push(t) {
447
+ if (this.paused) this.queue.push(t);
448
+ else if (t instanceof Function) t();
456
449
  else {
457
- const n = Array.prototype.slice.call(r, 1), s = r[0], e = this.ul[s];
458
- e instanceof Function ? e.apply(this.ul, n) : s && console.warn("[Sprig] (ERR-100) No valid UserLeap action called", s);
450
+ const n = Array.prototype.slice.call(t, 1), a = t[0], e = this.ul[a];
451
+ e instanceof Function ? e.apply(this.ul, n) : a && console.warn("[Sprig] (ERR-100) No valid UserLeap action called", a);
459
452
  }
460
453
  }
461
- perform(r) {
454
+ perform(t) {
462
455
  if (this.paused) {
463
456
  let n = () => {
464
457
  };
465
- const s = new Promise(function(e) {
458
+ const a = new Promise(function(e) {
466
459
  n = function() {
467
- e(r());
460
+ e(t());
468
461
  };
469
462
  });
470
- return this.queue.push(n), s;
463
+ return this.queue.push(n), a;
471
464
  }
472
- return r();
465
+ return t();
473
466
  }
474
467
  empty() {
475
468
  this.queue.length = 0;
476
469
  }
477
470
  }
478
471
  let bt, Lt;
479
- const xe = (t) => {
480
- let r = 0, n = t.firstElementChild;
481
- for (; n; ) r += xe(n), n.shadowRoot && (r += xe(n.shadowRoot)), n = n.nextElementSibling, r++;
482
- return r;
472
+ const xe = (r) => {
473
+ let t = 0, n = r.firstElementChild;
474
+ for (; n; ) t += xe(n), n.shadowRoot && (t += xe(n.shadowRoot)), n = n.nextElementSibling, t++;
475
+ return t;
483
476
  }, rt = () => {
484
477
  bt.report(xe(document.body)), Lt.report(document.documentElement.innerHTML.toString().length);
485
- }, De = (t, r) => {
478
+ }, De = (r, t) => {
486
479
  const n = performance.now();
487
- document.hidden ? setTimeout(() => De(t, r), t) : setTimeout(() => {
488
- const s = performance.now() - n;
489
- r.report(s / 1e3), setTimeout(() => De(t, r), t);
480
+ document.hidden ? setTimeout(() => De(r, t), r) : setTimeout(() => {
481
+ const a = performance.now() - n;
482
+ t.report(a / 1e3), setTimeout(() => De(r, t), r);
490
483
  }, 0);
491
484
  };
492
485
  let ue, we, ge, ye, it, G = {};
493
- const ae = (t, r = 1) => {
494
- const { name: n } = t;
495
- G[n] = (G[n] || 0) + r;
496
- }, Ut = (t) => {
497
- let r = 1;
498
- return t.childNodes.forEach((n) => {
499
- r += Ut(n);
500
- }), r;
501
- }, nt = (t) => {
502
- let r = 0;
503
- return t.forEach((n) => {
504
- r += Ut(n);
505
- }), r;
506
- }, Qt = (t) => {
507
- switch (t.type) {
486
+ const ae = (r, t = 1) => {
487
+ const { name: n } = r;
488
+ G[n] = (G[n] || 0) + t;
489
+ }, Ut = (r) => {
490
+ let t = 1;
491
+ return r.childNodes.forEach((n) => {
492
+ t += Ut(n);
493
+ }), t;
494
+ }, nt = (r) => {
495
+ let t = 0;
496
+ return r.forEach((n) => {
497
+ t += Ut(n);
498
+ }), t;
499
+ }, Jt = (r) => {
500
+ switch (r.type) {
508
501
  case "childList":
509
- return ae(ue, nt(t.addedNodes)), void ae(we, nt(t.removedNodes));
502
+ return ae(ue, nt(r.addedNodes)), void ae(we, nt(r.removedNodes));
510
503
  case "attributes":
511
504
  return void ae(ge);
512
505
  case "characterData":
513
506
  return void ae(ye);
514
507
  }
515
- }, Yt = (t) => t.forEach(Qt), Xt = () => {
508
+ }, Qt = (r) => r.forEach(Jt), Yt = () => {
516
509
  ue.report(G[ue.name] || 0), we.report(G[we.name] || 0), ge.report(G[ge.name] || 0), ye.report(G[ye.name] || 0), G = {};
517
- }, Zt = (t = 1e3) => {
518
- ue = K("sdk_mutations_nodes_added"), we = K("sdk_mutations_nodes_removed"), ge = K("sdk_mutations_attributes_changed"), ye = K("sdk_mutations_character_data"), it = new MutationObserver(Yt), it.observe(document, { attributes: !0, attributeOldValue: !0, characterData: !0, characterDataOldValue: !0, childList: !0, subtree: !0 }), setInterval(Xt, t);
519
- }, er = ({ isWeb: t, reportingIntervalSeconds: r, thresholds: n, postMetrics: s }) => {
510
+ }, Xt = (r = 1e3) => {
511
+ ue = K("sdk_mutations_nodes_added"), we = K("sdk_mutations_nodes_removed"), ge = K("sdk_mutations_attributes_changed"), ye = K("sdk_mutations_character_data"), it = new MutationObserver(Qt), it.observe(document, { attributes: !0, attributeOldValue: !0, characterData: !0, characterDataOldValue: !0, childList: !0, subtree: !0 }), setInterval(Yt, r);
512
+ }, Zt = ({ isWeb: r, reportingIntervalSeconds: t, thresholds: n, postMetrics: a }) => {
520
513
  Ct(n, (e, i) => {
521
- var a, o;
522
- if ((a = k.replay) != null && a.isReplayRecording()) {
514
+ var s, o;
515
+ if ((s = I.replay) != null && s.isReplayRecording()) {
523
516
  const d = `Value: ${e} on ${i.metric} violated threshold of ${i.type} ${i.value}`;
524
- (o = k.replay) == null || o.disableRecording("Threshold violated", new Error(d), { reportError: !1 }), window.UserLeap.reportError("Sdk Performance Metric threshold violated", new Error("Sdk Performance Metric threshold violated"), { metricName: i.metric, type: i.type, value: i.value }, { metricName: i.metric }), Pt();
517
+ (o = I.replay) == null || o.disableRecording("Threshold violated", new Error(d), { reportError: !1 }), window.UserLeap.reportError("Sdk Performance Metric threshold violated", new Error("Sdk Performance Metric threshold violated"), { metricName: i.metric, type: i.type, value: i.value }, { metricName: i.metric }), Pt();
525
518
  }
526
- }), Tt({ reportingIntervalSeconds: r, postMetrics: s }), t && (((e = 1e3) => {
519
+ }), Tt({ reportingIntervalSeconds: t, postMetrics: a }), r && (((e = 1e3) => {
527
520
  const i = K("sdk_event_queue_latency_seconds");
528
521
  De(e, i);
529
522
  })(), ((e = 1e4) => {
530
523
  bt = K("sdk_dom_nodes_count"), Lt = K("sdk_page_html_characters"), rt(), setInterval(rt, e);
531
- })(), Zt());
532
- }, tr = "test", rr = ["popState", "pushState", "replaceState"];
533
- let je, te;
524
+ })(), Xt());
525
+ }, er = "test", tr = ["popState", "pushState", "replaceState"];
526
+ let Me, te;
534
527
  const me = {}, Y = "!email", St = "pageUrl";
535
528
  let Ie = window.location.href;
536
- function re(t) {
529
+ function re(r) {
537
530
  var o, d;
538
- const { pageUrlEvents: r, interactiveEvents: n, dismissOnPageChange: s, platform: e } = window.UserLeap._config;
531
+ const { pageUrlEvents: t, interactiveEvents: n, dismissOnPageChange: a, platform: e } = window.UserLeap._config;
539
532
  if (e && e !== "web") return;
540
533
  Ie !== window.location.href && M.navigation("LocationChange", { from: Ie, to: window.location.href }), Ie = window.location.href;
541
- const i = Et().trackStartUrl, a = i ? String(i) : null;
542
- r && Rt(window.location.href), n && (kt(), ir()), yt() && (() => {
534
+ const i = Et().trackStartUrl, s = i ? String(i) : null;
535
+ t && Rt(window.location.href), n && (kt(), rr()), yt() && (() => {
543
536
  if (ce()) return;
544
537
  const c = Q();
545
538
  c && (Ot(ee) || (c.remove(), ee = null, L = null));
546
- })(), Mt.getItem("sprig.isCapturingHeatmap") && ((d = (o = k.replay) == null ? void 0 : o.checkPendingHeatmapsUrl()) == null || d.then((c) => {
539
+ })(), jt.getItem("sprig.isCapturingHeatmap") && ((d = (o = I.replay) == null ? void 0 : o.checkPendingHeatmapsUrl()) == null || d.then((c) => {
547
540
  var l;
548
- c && ((l = k.replay) == null || l.uploadReadyPendingCaptures(!0));
549
- })), !ce() && s && a && a !== window.location.href && t && rr.includes(t.type) && window.UserLeap("dismissActiveSurvey", j.PageChange);
541
+ c && ((l = I.replay) == null || l.uploadReadyPendingCaptures(!0));
542
+ })), !ce() && a && s && s !== window.location.href && r && tr.includes(r.type) && window.UserLeap("dismissActiveSurvey", P.PageChange);
550
543
  }
551
- const It = { capture: !0 }, ir = () => {
552
- const t = window.UserLeap._config.interactiveEvents.filter((n) => lt(n, window.location.href)).map((n) => {
553
- const { name: s, properties: e } = n, { selector: i, innerText: a } = e;
544
+ const It = { capture: !0 }, rr = () => {
545
+ const r = window.UserLeap._config.interactiveEvents.filter((n) => lt(n, window.location.href)).map((n) => {
546
+ const { name: a, properties: e } = n, { selector: i, innerText: s } = e;
554
547
  return i ? (o) => {
555
548
  if (Xe(o.target)) try {
556
- o.target.closest(i) && window.UserLeap("track", s);
549
+ o.target.closest(i) && window.UserLeap("track", a);
557
550
  } catch {
558
551
  }
559
552
  return !1;
560
- } : (o) => (Xe(o.target) && o.target.innerText === a && window.UserLeap("track", s), !1);
561
- }), r = (n) => t.forEach((s) => s(n));
562
- window.UserLeap._config.interactiveEventsHandler = r, window.addEventListener("click", r, It);
553
+ } : (o) => (Xe(o.target) && o.target.innerText === s && window.UserLeap("track", a), !1);
554
+ }), t = (n) => r.forEach((a) => a(n));
555
+ window.UserLeap._config.interactiveEventsHandler = t, window.addEventListener("click", t, It);
563
556
  }, kt = () => {
564
557
  window.UserLeap._config.interactiveEventsHandler && window.removeEventListener("click", window.UserLeap._config.interactiveEventsHandler, It), delete window.UserLeap._config.interactiveEventsHandler;
565
558
  };
566
559
  function Et() {
567
- const t = R.getItemObject("userleap.ids");
568
- return t && t[window.UserLeap.envId] || {};
560
+ const r = R.getItemObject("userleap.ids");
561
+ return r && r[window.UserLeap.envId] || {};
569
562
  }
570
563
  function _t() {
571
564
  if (window.previewMode) return;
572
- const t = R.getItemObject("sprig.anon.env.vid.map") || {}, r = t[window.UserLeap.envId];
573
- window.UserLeap.visitorId = r || at(), M.info("NewVid", { vid: window.UserLeap.visitorId }), _("vid", window.UserLeap.visitorId), r || (t[window.UserLeap.envId] = window.UserLeap.visitorId, R.setItemObject("sprig.anon.env.vid.map", t)), w.emit(u.VisitorIDUpdated, { visitorId: window.UserLeap.visitorId });
565
+ const r = R.getItemObject("sprig.anon.env.vid.map") || {}, t = r[window.UserLeap.envId];
566
+ window.UserLeap.visitorId = t || at(), M.info("NewVid", { vid: window.UserLeap.visitorId }), _("vid", window.UserLeap.visitorId), t || (r[window.UserLeap.envId] = window.UserLeap.visitorId, R.setItemObject("sprig.anon.env.vid.map", r)), w.emit(u.VisitorIDUpdated, { visitorId: window.UserLeap.visitorId });
574
567
  }
575
- function Rt(t, r, n, s) {
568
+ function Rt(r, t, n, a) {
576
569
  var e, i;
577
570
  try {
578
- if (t.endsWith("mock_snippet.html")) return;
579
- M.info("PageView", { url: t });
580
- const a = (e = document == null ? void 0 : document.querySelector('meta[name="description"]')) == null ? void 0 : e.getAttribute("content");
581
- (i = k.replay) == null || i.RecordPageView({ ...a && { description: a }, url: t, referrer: document.referrer, pageTitle: document.title });
571
+ if (r.endsWith("mock_snippet.html")) return;
572
+ M.info("PageView", { url: r });
573
+ const s = (e = document == null ? void 0 : document.querySelector('meta[name="description"]')) == null ? void 0 : e.getAttribute("content");
574
+ (i = I.replay) == null || i.RecordPageView({ ...s && { description: s }, url: r, referrer: document.referrer, pageTitle: document.title });
582
575
  const o = window.UserLeap._config.pageUrlEvents;
583
576
  let d = !1;
584
- if (o && o.length) for (let l = 0; l < o.length && (d = lt(o[l], t), !d); l++) ;
577
+ if (o && o.length) for (let l = 0; l < o.length && (d = lt(o[l], r), !d); l++) ;
585
578
  if (!d) return;
586
- window.UserLeap.debugMode && console.info("[DEBUG] Sprig trackPageView", t);
587
- const c = { url: t };
588
- s && (c.trackPageView = !0), window.UserLeap._queue.push(["track", St, r, c, n]);
589
- } catch (a) {
590
- a instanceof Error && (a.stack = t, window.UserLeap.reportError("trackPageView", a)), console.warn("[Sprig] (ERR-428) Failed to track page view", a);
579
+ window.UserLeap.debugMode && console.info("[DEBUG] Sprig trackPageView", r);
580
+ const c = { url: r };
581
+ a && (c.trackPageView = !0), window.UserLeap._queue.push(["track", St, t, c, n]);
582
+ } catch (s) {
583
+ s instanceof Error && (s.stack = r, window.UserLeap.reportError("trackPageView", s)), console.warn("[Sprig] (ERR-428) Failed to track page view", s);
591
584
  }
592
585
  }
593
- function nr() {
594
- const t = "Backbone" in window && window.Backbone && window.Backbone.history ? window.Backbone.history : window.history;
595
- "pushState" in t && (t.pushState = /* @__PURE__ */ ((r) => function(...n) {
596
- const s = r.apply(this, n), e = new Event("pushState");
597
- return window.dispatchEvent(e), re(e), s;
598
- })(t.pushState)), "replaceState" in t && (t.replaceState = /* @__PURE__ */ ((r) => function(...n) {
599
- const s = r.apply(this, n), e = new Event("replaceState");
600
- return window.dispatchEvent(e), re(e), s;
601
- })(t.replaceState)), ["hashchange", "popstate"].forEach((r) => window.addEventListener(r, re, !0));
586
+ function ir() {
587
+ const r = "Backbone" in window && window.Backbone && window.Backbone.history ? window.Backbone.history : window.history;
588
+ "pushState" in r && (r.pushState = /* @__PURE__ */ ((t) => function(...n) {
589
+ const a = t.apply(this, n), e = new Event("pushState");
590
+ return window.dispatchEvent(e), re(e), a;
591
+ })(r.pushState)), "replaceState" in r && (r.replaceState = /* @__PURE__ */ ((t) => function(...n) {
592
+ const a = t.apply(this, n), e = new Event("replaceState");
593
+ return window.dispatchEvent(e), re(e), a;
594
+ })(r.replaceState)), ["hashchange", "popstate"].forEach((t) => window.addEventListener(t, re, !0));
602
595
  }
603
- async function ke(t, r) {
596
+ async function ke(r, t) {
604
597
  const n = Oe();
605
- t && !r && (window.UserLeap._config.mode = tr);
606
- const s = fe(T(window.UserLeap)), e = await O(function(i) {
607
- const a = new URL(D("1", [H], "questions"));
598
+ r && !t && (window.UserLeap._config.mode = er);
599
+ const a = fe(T(window.UserLeap)), e = await O(function(i) {
600
+ const s = new URL(D("1", [H], "questions"));
608
601
  return Object.entries(i || {}).forEach(([o, d]) => {
609
- d && a.searchParams.append(o, String(d));
610
- }), a.toString();
611
- }({ desktopDisplay: window.UserLeap._config.desktopDisplay, isMobile: s, previewLanguage: window.UserLeap._config.previewLanguage, surveyid: t == null ? void 0 : t.surveyId, surveytemplateid: t == null ? void 0 : t.surveyTemplateId, vid: n }), { shouldDropOnRateLimit: !0 });
602
+ d && s.searchParams.append(o, String(d));
603
+ }), s.toString();
604
+ }({ desktopDisplay: window.UserLeap._config.desktopDisplay, isMobile: a, previewLanguage: window.UserLeap._config.previewLanguage, surveyid: r == null ? void 0 : r.surveyId, surveytemplateid: r == null ? void 0 : r.surveyTemplateId, vid: n }), { shouldDropOnRateLimit: !0 });
612
605
  if (!e.ok) return e.reportError && e.error && (console.warn("[Sprig] (ERR-414) Failed to request questions from the server", e.error), window.UserLeap.reportError("getQuestions", e.error)), { success: !1, surveyState: "no survey" };
613
- if (e.json.delay && await ct(e.json.delay), !e.json.isFeedback) return Z(e.json, te, je);
606
+ if (e.json.delay && await ct(e.json.delay), !e.json.isFeedback) return Z(e.json, te, Me);
614
607
  {
615
- const { feedbackLabel: i, productConfig: a, surveyUuid: o, feedbackCustomStyles: d } = e.json, { buttonTheme: c, placement: l, desktopDisplay: p } = a;
616
- ht({ customStyles: d, buttonTheme: c, desktopDisplay: p, eventId: 0, feedbackLabel: i, placement: l, surveyUuid: o, surveyId: t == null ? void 0 : t.surveyId }, e.json);
608
+ const { feedbackLabel: i, productConfig: s, surveyUuid: o, feedbackCustomStyles: d } = e.json, { buttonTheme: c, placement: l, desktopDisplay: p } = s;
609
+ ht({ customStyles: d, buttonTheme: c, desktopDisplay: p, eventId: 0, feedbackLabel: i, placement: l, surveyUuid: o, surveyId: r == null ? void 0 : r.surveyId }, e.json);
617
610
  }
618
611
  }
619
- function or(t) {
620
- if (!t) return;
621
- window.UserLeap._config = t, t.mute && window.UserLeap._queue.pause();
622
- const { interactiveEvents: r, pageUrlEvents: n, dismissOnPageChange: s } = t;
623
- r && function(e) {
612
+ function nr(r) {
613
+ if (!r) return;
614
+ window.UserLeap._config = r, r.mute && window.UserLeap._queue.pause();
615
+ const { interactiveEvents: t, pageUrlEvents: n, dismissOnPageChange: a } = r;
616
+ t && function(e) {
624
617
  let i = e.length;
625
618
  for (; i; ) {
626
- const a = Math.floor(Math.random() * i);
619
+ const s = Math.floor(Math.random() * i);
627
620
  i -= 1;
628
621
  const o = e[i];
629
- e[i] = e[a], e[a] = o;
622
+ e[i] = e[s], e[s] = o;
630
623
  }
631
- }(r), (r || n || s) && (nr(), re());
624
+ }(t), (t || n || a) && (ir(), re());
632
625
  }
633
- const sr = function(t) {
626
+ const or = function(r) {
634
627
  if (!window.UserLeap) return;
635
- const r = async (e = {}) => {
636
- var U, h, S, E, z;
637
- const { userId: i, anonymousId: a, metadata: o = {}, properties: d, showSurveyCallback: c } = e;
628
+ const t = async (e = {}) => {
629
+ var h, k, U, E, z;
630
+ const { userId: i, anonymousId: s, metadata: o = {}, properties: d, showSurveyCallback: c } = e;
638
631
  let { eventName: l } = e;
639
- if (window.UserLeap.debugMode && l !== St && console.info("[DEBUG] Sprig track", e), t.mode === "test") return;
632
+ if (window.UserLeap.debugMode && l !== St && console.info("[DEBUG] Sprig track", e), r.mode === "test") return;
640
633
  const p = R.getItem("sprig.previewKey") ?? void 0;
641
- if (t.requireUserIdForTracking && !window.UserLeap.userId && !i) {
634
+ if (r.requireUserIdForTracking && !window.UserLeap.userId && !i) {
642
635
  const b = "[Sprig] - Skipping tracking without userId";
643
636
  return console.warn(b), { success: !1, message: b, surveyState: "no survey" };
644
637
  }
@@ -648,49 +641,49 @@ const sr = function(t) {
648
641
  return console.warn(b), { success: !1, message: b, surveyState: "no survey" };
649
642
  }
650
643
  const f = te ?? window.location.href;
651
- o.url || (o.url = f), _("trackStartUrl", f), (h = (U = window.UserLeap) == null ? void 0 : U._config) != null && h.optimizelyEnabled && (ne(T(window.UserLeap)) || de.getAndSetWebOptimizelyExperiments(), o.optimizelyExperiments = Object.assign({}, de.getAllOptimizelyExperiments())), (E = (S = window.UserLeap) == null ? void 0 : S._config) != null && E.launchDarklyEnabled && (o.launchDarklyFlags = Re.getAllLaunchDarklyVariations()), i && (window.UserLeap.userId = i), a && (window.UserLeap.partnerAnonymousId = a), d && (o.eventProperties = d), (z = k.replay) == null || z.RecordEvent({ name: l, url: o.url }), M.info("TrackEvent", { eventName: l });
652
- const g = window.UserLeap.delayingSurvey || mt() ? await O(D("1", [F], "events/batch"), { body: JSON.stringify({ events: [{ event: l, metadata: o }], previewKey: p }), method: "POST", shouldDropOnRateLimit: !0 }) : await O(D("1", [F], "events"), { body: JSON.stringify({ event: l, metadata: o, previewKey: p }), method: "POST", shouldDropOnRateLimit: !0 });
644
+ o.url || (o.url = f), _("trackStartUrl", f), (k = (h = window.UserLeap) == null ? void 0 : h._config) != null && k.optimizelyEnabled && (ne(T(window.UserLeap)) || de.getAndSetWebOptimizelyExperiments(), o.optimizelyExperiments = Object.assign({}, de.getAllOptimizelyExperiments())), (E = (U = window.UserLeap) == null ? void 0 : U._config) != null && E.launchDarklyEnabled && (o.launchDarklyFlags = Re.getAllLaunchDarklyVariations()), i && (window.UserLeap.userId = i), s && (window.UserLeap.partnerAnonymousId = s), d && (o.eventProperties = d), (z = I.replay) == null || z.RecordEvent({ name: l, url: o.url }), M.info("TrackEvent", { eventName: l });
645
+ const g = window.UserLeap.delayingSurvey || mt() ? await O(D("1", [q], "events/batch"), { body: JSON.stringify({ events: [{ event: l, metadata: o }], previewKey: p }), method: "POST", shouldDropOnRateLimit: !0 }) : await O(D("1", [q], "events"), { body: JSON.stringify({ event: l, metadata: o, previewKey: p }), method: "POST", shouldDropOnRateLimit: !0 });
653
646
  if (!g.ok) {
654
647
  const b = "[Sprig] (ERR-421) Failed to track event";
655
648
  return g.reportError && (console.warn(b, g.error), g.error && window.UserLeap.reportError("track", g.error)), { success: !1, message: b, error: g.error, surveyState: "no survey" };
656
649
  }
657
- i && _("uid", i), a && _("aid", a);
650
+ i && _("uid", i), s && _("aid", s);
658
651
  const y = g.json;
659
652
  y.invalidPreviewKey && R.removeItem("sprig.previewKey");
660
653
  const v = o.trackPageView ? o.url : void 0;
661
654
  return y != null && y.feedbackButton && ht(y.feedbackButton, void 0, v), await async function(b, V) {
662
- var W, q;
655
+ var W, j;
663
656
  let A = !0;
664
- return !(V && ((W = b == null ? void 0 : b.json) != null && W.surveyId) && (window.UserLeap.delayingSurvey = !0, A = await V(b.json.surveyId), window.UserLeap.delayingSurvey = !1, !A)) && ((q = b == null ? void 0 : b.json) != null && q.delay && !window.UserLeap.isMobileSDK && (window.UserLeap.delayingSurvey = !0, await ct(b.json.delay), window.UserLeap.delayingSurvey = !1), A);
657
+ return !(V && ((W = b == null ? void 0 : b.json) != null && W.surveyId) && (window.UserLeap.delayingSurvey = !0, A = await V(b.json.surveyId), window.UserLeap.delayingSurvey = !1, !A)) && ((j = b == null ? void 0 : b.json) != null && j.delay && !window.UserLeap.isMobileSDK && (window.UserLeap.delayingSurvey = !0, await ct(b.json.delay), window.UserLeap.delayingSurvey = !1), A);
665
658
  }(g, c) ? function(b) {
666
659
  if (!window.UserLeap._config.dismissOnPageChange) return !0;
667
660
  const V = new URL(b), A = new URL(te ?? window.location.href);
668
661
  return V.hostname === A.hostname && V.pathname === A.pathname;
669
- }(f) ? Z(y, v, je) : { success: !1, message: "Study should not be displayed after page navigation", surveyState: "no survey" } : { success: !1, message: "[Sprig] Callback returned false, aborting rendering of survey", surveyState: "no survey" };
662
+ }(f) ? Z(y, v, Me) : { success: !1, message: "Study should not be displayed after page navigation", surveyState: "no survey" } : { success: !1, message: "[Sprig] Callback returned false, aborting rendering of survey", surveyState: "no survey" };
670
663
  }, n = (e, i) => {
671
664
  var o;
672
- const a = (o = e == null ? void 0 : e.querySelector(`[id="${Te}"]`)) == null ? void 0 : o.contentDocument;
673
- a && le({ document: a, elementId: "ul-custom-style", styleString: i });
674
- }, s = { displaySurvey: async (e) => (console.warn("[Sprig] displaySurvey should only be used to debug your studies; not intended for production usage."), window.UserLeap("dismissActiveSurvey", j.Override), ke({ surveyId: e }, !0)), _previewSurvey(e) {
675
- window.UserLeap("dismissActiveSurvey", j.Override), ke({ surveyTemplateId: e }, !1);
665
+ const s = (o = e == null ? void 0 : e.querySelector(`[id="${Te}"]`)) == null ? void 0 : o.contentDocument;
666
+ s && le({ document: s, elementId: "ul-custom-style", styleString: i });
667
+ }, a = { displaySurvey: async (e) => (console.warn("[Sprig] displaySurvey should only be used to debug your studies; not intended for production usage."), window.UserLeap("dismissActiveSurvey", P.Override), ke({ surveyId: e }, !0)), _previewSurvey(e) {
668
+ window.UserLeap("dismissActiveSurvey", P.Override), ke({ surveyTemplateId: e }, !1);
676
669
  }, _reviewSurvey(e) {
677
- window.UserLeap("dismissActiveSurvey", j.Override), ke({ surveyId: e }, !1);
670
+ window.UserLeap("dismissActiveSurvey", P.Override), ke({ surveyId: e }, !1);
678
671
  }, previewSurvey(e) {
679
- s._previewSurvey(e);
672
+ a._previewSurvey(e);
680
673
  }, reviewSurvey(e) {
681
- s._reviewSurvey(e);
674
+ a._reviewSurvey(e);
682
675
  }, mute() {
683
676
  window.UserLeap._queue.pause();
684
677
  }, unmute() {
685
678
  window.UserLeap._queue.unpause();
686
679
  }, setVisitorToken() {
687
680
  console.warn("[Sprig] setVisitorToken is deprecated.");
688
- }, dismissActiveSurvey(e = j.API) {
689
- window.UserLeap.container && (e === j.Closed && window.Sprig.trackHistory && window.Sprig.trackHistory({ event: "closed" }), w.emit(u.SurveyCloseRequested, { name: u.SurveyCloseRequested, initiator: e, "survey.id": parseInt(window.UserLeap.container.dataset.studyId) }), w.emit(u.SurveyWillClose, { name: u.SurveyWillClose, initiator: e, "survey.id": parseInt(window.UserLeap.container.dataset.studyId) }));
681
+ }, dismissActiveSurvey(e = P.API) {
682
+ window.UserLeap.container && (e === P.Closed && window.Sprig.trackHistory && window.Sprig.trackHistory({ event: "closed" }), w.emit(u.SurveyCloseRequested, { name: u.SurveyCloseRequested, initiator: e, "survey.id": parseInt(window.UserLeap.container.dataset.studyId) }), w.emit(u.SurveyWillClose, { name: u.SurveyWillClose, initiator: e, "survey.id": parseInt(window.UserLeap.container.dataset.studyId) }));
690
683
  }, async setAttribute(e, i) {
691
684
  if (!e || !i && i !== 0 && i !== !1) {
692
- const a = "[Sprig] - Disregarding empty attribute / value provided";
693
- return console.warn(a), { success: !1, message: a };
685
+ const s = "[Sprig] - Disregarding empty attribute / value provided";
686
+ return console.warn(s), { success: !1, message: s };
694
687
  }
695
688
  return this.setAttributes({ [e]: i });
696
689
  }, async setAttributes(e) {
@@ -700,13 +693,13 @@ const sr = function(t) {
700
693
  }
701
694
  return this.identifyAndSetAttributes({ attributes: e });
702
695
  }, async identifyAndSetAttributes(e) {
703
- if (window.UserLeap.debugMode && console.info("[DEBUG] Sprig identifyAndSetAttributes", e), t.mode === "test") return;
696
+ if (window.UserLeap.debugMode && console.info("[DEBUG] Sprig identifyAndSetAttributes", e), r.mode === "test") return;
704
697
  if (e === null || typeof e != "object" || !(e.userId || e.anonymousId || e.attributes)) {
705
698
  const l = "[Sprig] - Disregarding empty payload provided";
706
699
  return console.warn(l), { success: !1, message: l };
707
700
  }
708
- const { userId: i, anonymousId: a, attributes: o } = e;
709
- if (t.requireUserIdForTracking && !window.UserLeap.userId && !i) {
701
+ const { userId: i, anonymousId: s, attributes: o } = e;
702
+ if (r.requireUserIdForTracking && !window.UserLeap.userId && !i) {
710
703
  const l = "[Sprig] - Skipping tracking without userId";
711
704
  return console.warn(l), { success: !1, message: l };
712
705
  }
@@ -715,21 +708,21 @@ const sr = function(t) {
715
708
  const l = Object.keys(o);
716
709
  for (const p of l) o[p] === me[p] && delete o[p];
717
710
  }
718
- if (!(o && Object.keys(o).length !== 0 || i && window.UserLeap.userId !== i || a && window.UserLeap.partnerAnonymousId !== a)) return { success: !0 };
711
+ if (!(o && Object.keys(o).length !== 0 || i && window.UserLeap.userId !== i || s && window.UserLeap.partnerAnonymousId !== s)) return { success: !0 };
719
712
  const d = {};
720
713
  let c;
721
- return i && (d.userId = window.UserLeap.userId = i), a && (d.partnerAnonymousId = window.UserLeap.partnerAnonymousId = a), o && Object.keys(o).length > 0 ? (c = await O(D("1", [H, F], "attributes"), { body: JSON.stringify(o), method: "PUT" }), c.ok ? Object.assign(me, o) : c.reportError && (console.warn("[Sprig] (ERR-432) identifyAndSetAttributes failed", c.error), c.error && window.UserLeap.reportError("identifyAndSetAttributes", c.error))) : c = await O(D("1", [H, F]), { body: JSON.stringify(d), method: "PUT" }), o && o[Y] && (window.UserLeap.email = o[Y]), c.ok && (i && _("uid", i), a && _("aid", a)), { success: !!c.ok };
714
+ return i && (d.userId = window.UserLeap.userId = i), s && (d.partnerAnonymousId = window.UserLeap.partnerAnonymousId = s), o && Object.keys(o).length > 0 ? (c = await O(D("1", [H, q], "attributes"), { body: JSON.stringify(o), method: "PUT" }), c.ok ? Object.assign(me, o) : c.reportError && (console.warn("[Sprig] (ERR-432) identifyAndSetAttributes failed", c.error), c.error && window.UserLeap.reportError("identifyAndSetAttributes", c.error))) : c = await O(D("1", [H, q]), { body: JSON.stringify(d), method: "PUT" }), o && o[Y] && (window.UserLeap.email = o[Y]), c.ok && (i && _("uid", i), s && _("aid", s)), { success: !!c.ok };
722
715
  }, async removeAttributes(e) {
723
- if (window.UserLeap.debugMode && console.info("[DEBUG] Sprig removeAttributes", e), t.mode === "test") return;
716
+ if (window.UserLeap.debugMode && console.info("[DEBUG] Sprig removeAttributes", e), r.mode === "test") return;
724
717
  if (e == null || e.length === 0) {
725
- const a = "[Sprig] - Disregarding empty attributes provided";
726
- return console.warn(a), { success: !1, message: a };
718
+ const s = "[Sprig] - Disregarding empty attributes provided";
719
+ return console.warn(s), { success: !1, message: s };
727
720
  }
728
- if (t.requireUserIdForTracking && !window.UserLeap.userId) {
729
- const a = "[Sprig] - Skipping tracking without userId";
730
- return console.warn(a), { success: !1, message: a };
721
+ if (r.requireUserIdForTracking && !window.UserLeap.userId) {
722
+ const s = "[Sprig] - Skipping tracking without userId";
723
+ return console.warn(s), { success: !1, message: s };
731
724
  }
732
- const i = await O(D("1", [H, F], "attributes"), { body: JSON.stringify({ delete: e }), method: "DELETE" });
725
+ const i = await O(D("1", [H, q], "attributes"), { body: JSON.stringify({ delete: e }), method: "DELETE" });
733
726
  return !i.ok && i.reportError && (console.warn("[Sprig] (ERR-433) Remove attributes failed", i.error), i.error && window.UserLeap.reportError("removeAttributes", i.error)), { success: !!i.ok };
734
727
  }, async addSurveyListener(e) {
735
728
  w.on(u.SurveyLifeCycle, e);
@@ -749,38 +742,38 @@ const sr = function(t) {
749
742
  const d = `[Sprig] - Invalid userId ${e}`;
750
743
  return console.warn(d), { success: !1, message: d };
751
744
  }
752
- if (t.mode === "test" || e === window.UserLeap.userId) return;
745
+ if (r.mode === "test" || e === window.UserLeap.userId) return;
753
746
  window.UserLeap.userId = e;
754
- const i = window.UserLeap.visitorId, a = await O(D("1", [H, F]), { body: JSON.stringify({ userId: e }), method: "PUT" });
755
- a.ok ? (i !== window.UserLeap.visitorId && ((o = k.replay) == null || o.clearUserReplayData()), _("uid", e)) : a.reportError && (console.warn("[Sprig] (ERR-420) Failed to set user id", a.error), a.error && window.UserLeap.reportError("setUserId", a.error));
747
+ const i = window.UserLeap.visitorId, s = await O(D("1", [H, q]), { body: JSON.stringify({ userId: e }), method: "PUT" });
748
+ s.ok ? (i !== window.UserLeap.visitorId && ((o = I.replay) == null || o.clearUserReplayData()), _("uid", e)) : s.reportError && (console.warn("[Sprig] (ERR-420) Failed to set user id", s.error), s.error && window.UserLeap.reportError("setUserId", s.error));
756
749
  }, async setPartnerAnonymousId(e) {
757
750
  if (window.UserLeap.debugMode && console.info("[DEBUG] Sprig setPartnerAnonymousId", e), e == null) {
758
751
  const i = `[Sprig] - Invalid partnerAnonymousId ${e}`;
759
752
  return console.warn(i), { success: !1, message: i };
760
753
  }
761
754
  return window.UserLeap.partnerAnonymousId = e, _("aid", e), { success: !0 };
762
- }, track: async (e, i, a = {}, o = void 0) => r({ eventName: e, properties: i, metadata: a, showSurveyCallback: o }), identifyAndTrack: async (e) => await r(e), trackPageView(e, i = void 0, a = void 0, o = !0) {
763
- te = e, Rt(e, i, a, o);
755
+ }, track: async (e, i, s = {}, o = void 0) => t({ eventName: e, properties: i, metadata: s, showSurveyCallback: o }), identifyAndTrack: async (e) => await t(e), trackPageView(e, i = void 0, s = void 0, o = !0) {
756
+ te = e, Rt(e, i, s, o);
764
757
  }, applyFeedbackStyles({ button: e = "", view: i = "" }) {
765
758
  window.UserLeap.feedbackCustomStyles = i, document.getElementById("sprig-feedback-style") && le({ document, elementId: "ul-custom-style", styleString: e, nonce: window.UserLeap.styleNonce }), n(document.querySelector(".ul-container-feedback"), i);
766
759
  }, applyStyles(e) {
767
760
  window.UserLeap.customStyles = e, n(window.UserLeap.container, e);
768
761
  }, setWindowDimensions(e, i) {
769
762
  var f, g;
770
- const a = typeof e == "string" ? parseInt(e, 10) : e, o = typeof i == "string" ? parseInt(i, 10) : i;
771
- isNaN(a) || isNaN(o) || (window.UserLeap.windowDimensions = { width: a, height: o });
763
+ const s = typeof e == "string" ? parseInt(e, 10) : e, o = typeof i == "string" ? parseInt(i, 10) : i;
764
+ isNaN(s) || isNaN(o) || (window.UserLeap.windowDimensions = { width: s, height: o });
772
765
  const d = T(window.UserLeap), c = fe(d), l = d["userleap-platform"] === "web";
773
766
  if (!window.UserLeap.frameId) return;
774
767
  const p = document.getElementById(window.UserLeap.frameId);
775
- p && (window.UserLeap.useMobileStyling && ((f = window.UserLeap.windowDimensions) != null && f.width && (p.style.width = `${window.UserLeap.windowDimensions.width}px`), (g = window.UserLeap.windowDimensions) != null && g.height && (p.style.maxHeight = window.UserLeap.windowDimensions.height - 20 + "px"), p.contentDocument && (p.style.height = String($t(p.contentDocument, l && !c, dt(d))[0]) + "px")), w.emit(u.SurveyDimensions, { name: u.SurveyDimensions, contentFrameWidth: p.clientWidth, contentFrameHeight: p.clientHeight, "survey.id": parseInt(window.UserLeap.container.dataset.studyId) }));
768
+ p && (window.UserLeap.useMobileStyling && ((f = window.UserLeap.windowDimensions) != null && f.width && (p.style.width = `${window.UserLeap.windowDimensions.width}px`), (g = window.UserLeap.windowDimensions) != null && g.height && (p.style.maxHeight = window.UserLeap.windowDimensions.height - 20 + "px"), p.contentDocument && (p.style.height = String(Nt(p.contentDocument, l && !c, dt(d))[0]) + "px")), w.emit(u.SurveyDimensions, { name: u.SurveyDimensions, contentFrameWidth: p.clientWidth, contentFrameHeight: p.clientHeight, "survey.id": parseInt(window.UserLeap.container.dataset.studyId) }));
776
769
  }, logoutUser() {
777
770
  var e;
778
- window.UserLeap.debugMode && console.info("[DEBUG] Sprig logout"), M.info("LogOut", { vid: window.UserLeap.visitorId, userId: window.UserLeap.userId }), window.UserLeap.visitorId = null, window.UserLeap.userId = null, window.UserLeap.partnerAnonymousId = null, window.UserLeap.token = null, window.UserLeap.email = null, R.removeItem("userleap.ids"), window.UserLeap._queue.isPaused() && window.UserLeap._queue.empty(), _t(), (e = k.replay) == null || e.clearUserReplayData(), window.UserLeap._queue.unpause();
771
+ window.UserLeap.debugMode && console.info("[DEBUG] Sprig logout"), M.info("LogOut", { vid: window.UserLeap.visitorId, userId: window.UserLeap.userId }), window.UserLeap.visitorId = null, window.UserLeap.userId = null, window.UserLeap.partnerAnonymousId = null, window.UserLeap.token = null, window.UserLeap.email = null, R.removeItem("userleap.ids"), window.UserLeap._queue.isPaused() && window.UserLeap._queue.empty(), _t(), (e = I.replay) == null || e.clearUserReplayData(), window.UserLeap._queue.unpause();
779
772
  }, teardown() {
780
- ["hashchange", "popstate"].forEach((e) => window.removeEventListener(e, re, !0)), window.UserLeap._config.interactiveEvents && kt(), window.UserLeap("dismissActiveSurvey", j.API), delete window.UserLeap, delete window.Sprig, delete window._Sprig;
773
+ ["hashchange", "popstate"].forEach((e) => window.removeEventListener(e, re, !0)), window.UserLeap._config.interactiveEvents && kt(), window.UserLeap("dismissActiveSurvey", P.API), delete window.UserLeap, delete window.Sprig, delete window._Sprig;
781
774
  }, integrateOptimizely(e, i = !0) {
782
- var a, o;
783
- if ((o = (a = window.UserLeap) == null ? void 0 : a._config) != null && o.optimizelyEnabled) try {
775
+ var s, o;
776
+ if ((o = (s = window.UserLeap) == null ? void 0 : s._config) != null && o.optimizelyEnabled) try {
784
777
  const d = typeof e == "string" ? JSON.parse(e) : e;
785
778
  de.setOptimizelyExperiment(d, i);
786
779
  } catch (d) {
@@ -788,21 +781,21 @@ const sr = function(t) {
788
781
  }
789
782
  else console.warn("[SPRIG] Optimizely integration is currently not enabled for your product.");
790
783
  }, integrateOptimizelyClient(e) {
791
- var i, a;
792
- if (!((a = (i = window.UserLeap) == null ? void 0 : i._config) != null && a.optimizelyEnabled)) return void console.warn("[SPRIG] Optimizely integration is currently not enabled for your product.");
784
+ var i, s;
785
+ if (!((s = (i = window.UserLeap) == null ? void 0 : i._config) != null && s.optimizelyEnabled)) return void console.warn("[SPRIG] Optimizely integration is currently not enabled for your product.");
793
786
  e.notificationCenter.addNotificationListener("ACTIVATE:experiment, user_id,attributes, variation, event", ({ experiment: o, variation: d }) => {
794
787
  const c = { experiments: [{ id: o.id, variation: d.key }] };
795
788
  window.UserLeap("integrateOptimizely", c, !1);
796
789
  });
797
790
  }, importLaunchDarklyData(e) {
798
- var i, a;
799
- (a = (i = window.UserLeap) == null ? void 0 : i._config) != null && a.launchDarklyEnabled ? Re.setLDFlagsVariations(e) : console.warn("[SPRIG] LaunchDarkly integration is currently not enabled for your product.");
800
- }, setVisitorAttribute: (e, i) => (console.warn("[Sprig] setVisitorAttribute is deprecated. Please use setAttribute"), s.setAttribute(e, i)), setEmail: async (e) => s.setAttribute(Y, e), setVisitorEmail: async (e) => (console.warn("[Sprig] setVisitorEmail is deprecated. Please use setEmail"), s.setEmail(e)), _generateVideoUploadUrl: async (e) => async function(i) {
791
+ var i, s;
792
+ (s = (i = window.UserLeap) == null ? void 0 : i._config) != null && s.launchDarklyEnabled ? Re.setLDFlagsVariations(e) : console.warn("[SPRIG] LaunchDarkly integration is currently not enabled for your product.");
793
+ }, setVisitorAttribute: (e, i) => (console.warn("[Sprig] setVisitorAttribute is deprecated. Please use setAttribute"), a.setAttribute(e, i)), setEmail: async (e) => a.setAttribute(Y, e), setVisitorEmail: async (e) => (console.warn("[Sprig] setVisitorEmail is deprecated. Please use setEmail"), a.setEmail(e)), _generateVideoUploadUrl: async (e) => async function(i) {
801
794
  var o;
802
795
  if (!i) return;
803
- const a = `${window.UserLeap._API_URL}/2/environments/integrations/upload`;
796
+ const s = `${window.UserLeap._API_URL}/2/environments/integrations/upload`;
804
797
  try {
805
- const d = await fetch(a, { method: "POST", cache: "no-cache", headers: { "Content-Type": "application/json" }, body: JSON.stringify(i) });
798
+ const d = await fetch(s, { method: "POST", cache: "no-cache", headers: { "Content-Type": "application/json" }, body: JSON.stringify(i) });
806
799
  if (d.ok) {
807
800
  const c = await d.json();
808
801
  return (o = c == null ? void 0 : c.upload) == null ? void 0 : o.url;
@@ -812,44 +805,44 @@ const sr = function(t) {
812
805
  console.warn("[Sprig] Error with generating video upload url"), d instanceof Error && window.UserLeap.reportError("generateVideoUploadUrl", d);
813
806
  }
814
807
  }(e), _reportMetric(e, i) {
815
- jt(e, i);
816
- }, _completeSessionReplay: async ({ surveyId: e, responseGroupUuid: i, eventDigest: a }) => {
808
+ Mt(e, i);
809
+ }, _completeSessionReplay: async ({ surveyId: e, responseGroupUuid: i, eventDigest: s }) => {
817
810
  var o;
818
- return k.replay ? (o = k.replay) == null ? void 0 : o._completeSessionReplay({ surveyId: e, responseGroupUuid: i, eventDigest: a, headers: T(window.UserLeap) }) : (window.UserLeap.reportError("_completeSessionReplay", new Error("Replay module not registered")), !1);
811
+ return I.replay ? (o = I.replay) == null ? void 0 : o._completeSessionReplay({ surveyId: e, responseGroupUuid: i, eventDigest: s, headers: T(window.UserLeap) }) : (window.UserLeap.reportError("_completeSessionReplay", new Error("Replay module not registered")), !1);
819
812
  }, pauseReplayRecording() {
820
- var e, i, a, o;
821
- (i = (e = k.replay) == null ? void 0 : e.isReplayPaused) != null && i.call(e) || ((o = (a = k.replay) == null ? void 0 : a.recordReplayPaused) == null || o.call(a));
813
+ var e, i, s, o;
814
+ (i = (e = I.replay) == null ? void 0 : e.isReplayPaused) != null && i.call(e) || ((o = (s = I.replay) == null ? void 0 : s.recordReplayPaused) == null || o.call(s));
822
815
  }, resumeReplayRecording() {
823
- var e, i, a, o, d, c;
824
- (i = (e = k.replay) == null ? void 0 : e.isReplayPaused) != null && i.call(e) && ((o = (a = k.replay) == null ? void 0 : a.recordReplayResumed) == null || o.call(a), (c = (d = k.replay) == null ? void 0 : d.recordFullSnapshot) == null || c.call(d));
816
+ var e, i, s, o, d, c;
817
+ (i = (e = I.replay) == null ? void 0 : e.isReplayPaused) != null && i.call(e) && ((o = (s = I.replay) == null ? void 0 : s.recordReplayResumed) == null || o.call(s), (c = (d = I.replay) == null ? void 0 : d.recordFullSnapshot) == null || c.call(d));
825
818
  } };
826
- Object.assign(window.UserLeap, s);
819
+ Object.assign(window.UserLeap, a);
827
820
  };
828
- async function ar(t, r, n = {}, s = {}) {
829
- const e = window.__cfg && window.__cfg.mode, i = Oe(), a = window.UserLeap.envId, o = window.document.documentElement, d = { mode: e, screenWidth: window.screen.width, screenHeight: window.screen.height, clientWidth: o.clientWidth, clientHeight: o.clientHeight, location: te ?? window.location.href, language: window.navigator.language, ...n }, c = { action: t, breadcrumbs: M.breadcrumbs, err: { message: `${r == null ? void 0 : r.name} - ${r == null ? void 0 : r.message}`, stack: r == null ? void 0 : r.stack }, meta: d, vid: i, envId: a, ...s };
830
- (await O(D("1", null, "errors"), { method: "POST", headers: { "x-ul-error": window.btoa(`userleap-${Date.now()}-error`) }, body: JSON.stringify(c), shouldDropOnRateLimit: !0 })).ok || console.warn("[Sprig] (ERR-444) Failed to report error to API", r);
821
+ async function sr(r, t, n = {}, a = {}) {
822
+ const e = window.__cfg && window.__cfg.mode, i = Oe(), s = window.UserLeap.envId, o = window.document.documentElement, d = { mode: e, screenWidth: window.screen.width, screenHeight: window.screen.height, clientWidth: o.clientWidth, clientHeight: o.clientHeight, location: te ?? window.location.href, language: window.navigator.language, ...n }, c = { action: r, breadcrumbs: M.breadcrumbs, err: { message: `${t == null ? void 0 : t.name} - ${t == null ? void 0 : t.message}`, stack: t == null ? void 0 : t.stack }, meta: d, vid: i, envId: s, ...a };
823
+ (await O(D("1", null, "errors"), { method: "POST", headers: { "x-ul-error": window.btoa(`userleap-${Date.now()}-error`) }, body: JSON.stringify(c), shouldDropOnRateLimit: !0 })).ok || console.warn("[Sprig] (ERR-444) Failed to report error to API", t);
831
824
  }
832
- function dr(t = {}) {
833
- var s;
834
- (s = window.SprigLoggerCallback) == null || s.call(window, "Initializing Sprig");
835
- const r = new URLSearchParams(window.location.search).get("sprigPreviewKey") ?? "";
825
+ function ar(r = {}) {
826
+ var a;
827
+ (a = window.SprigLoggerCallback) == null || a.call(window, "Initializing Sprig");
828
+ const t = new URLSearchParams(window.location.search).get("sprigPreviewKey") ?? "";
836
829
  async function n() {
837
830
  var p, f, g, y, v;
838
831
  if (window.UserLeap.loaded) return;
839
- if ((p = window.SprigLoggerCallback) == null || p.call(window, "Loading Sprig"), window.UserLeap.reportError = ar, window.UserLeap.loaded = !0, window.UserLeap._config = Object.assign({}, t, window.UserLeap.config), window.UserLeap.delayingSurvey = !1, window.UserLeap._config && typeof window.UserLeap._config == "object") for (const m in window.UserLeap._config) window.UserLeap[m] = window.UserLeap._config[m];
840
- if (window.Sprig.outstandingTransactionLimit !== void 0 && (t.outstandingTransactionLimit = window.Sprig.outstandingTransactionLimit), !window.UserLeap.envId) {
832
+ if ((p = window.SprigLoggerCallback) == null || p.call(window, "Loading Sprig"), window.UserLeap.reportError = sr, window.UserLeap.loaded = !0, window.UserLeap._config = Object.assign({}, r, window.UserLeap.config), window.UserLeap.delayingSurvey = !1, window.UserLeap._config && typeof window.UserLeap._config == "object") for (const m in window.UserLeap._config) window.UserLeap[m] = window.UserLeap._config[m];
833
+ if (window.Sprig.outstandingTransactionLimit !== void 0 && (r.outstandingTransactionLimit = window.Sprig.outstandingTransactionLimit), !window.UserLeap.envId) {
841
834
  if (!window.UserLeap.appId) throw new Error("Missing Environment id");
842
835
  window.UserLeap.envId = window.UserLeap.appId;
843
836
  }
844
837
  window.UserLeap.debugMode && console.info("[DEBUG] Sprig debug mode enabled");
845
838
  const e = Et(), i = window.UserLeap.sampleRate;
846
- let a = e.sampled;
839
+ let s = e.sampled;
847
840
  if (i) {
848
- if (a === null && (a = Math.random() < i, _("sampled", a)), !a) return;
849
- } else a !== null && _("sampled", null);
841
+ if (s === null && (s = Math.random() < i, _("sampled", s)), !s) return;
842
+ } else s !== null && _("sampled", null);
850
843
  window.UserLeap._API_URL || (window.UserLeap._API_URL = "https://api.sprig.com");
851
844
  const o = [...window.UserLeap._queue];
852
- window.UserLeap._queue = new Jt(window.UserLeap, []), window.UserLeap._queue.pause();
845
+ window.UserLeap._queue = new Kt(window.UserLeap, []), window.UserLeap._queue.pause();
853
846
  for (let m = 0; m < o.length; m++) window.UserLeap._queue.push(o[m]);
854
847
  const d = e.token;
855
848
  d ? (window.UserLeap.token = d, window.UserLeap.visitorId = e.vid ?? null, window.UserLeap.userId = e.uid ?? null, window.UserLeap.partnerAnonymousId = e.aid ?? null) : _t();
@@ -857,25 +850,25 @@ function dr(t = {}) {
857
850
  (f = window.SprigLoggerCallback) == null || f.call(window, "Sprig fetching config");
858
851
  const l = await async function(m) {
859
852
  var E, z;
860
- const U = T(window.UserLeap);
853
+ const h = T(window.UserLeap);
861
854
  document.addEventListener("securitypolicyviolation", $e);
862
- const h = await st(D("1", [H], "config"), { headers: U });
863
- if (document.removeEventListener("securitypolicyviolation", $e), !h.ok) return (E = window.SprigLoggerCallback) == null || E.call(window, "Sprig config fetch failed"), h.reportError && (console.warn("[Sprig] (ERR-422) Failed to load configuration", h.error), h.error && window.UserLeap.reportError("applyRemoteConfig", h.error)), Ge("Disabled: failed to fetch configuration"), m;
864
- const S = h.json;
865
- return S != null && S.disabled ? ((z = window.SprigLoggerCallback) == null || z.call(window, "Sprig config fetch disabled"), Ge(`Disabled: ${S.disabled}`), { disabled: S.disabled }) : Object.assign({}, S, m);
866
- }(t);
867
- if ((g = window.SprigLoggerCallback) == null || g.call(window, "Sprig fetched config"), er({ isWeb: !c, reportingIntervalSeconds: l.metricsReportingEnabled || l.mobileMetricsReportingEnabled ? l.metricsReportingIntervalSeconds : 0, thresholds: l.metricThresholds, postMetrics: async (m) => {
868
- var U;
869
- await O(D("1", [H], "metrics"), { body: m, method: "POST", headers: { "x-ul-replay-enabled": `${!!((U = k.replay) != null && U.isReplayRecording())}` }, shouldDropOnRateLimit: !0 });
855
+ const k = await st(D("1", [H], "config"), { headers: h });
856
+ if (document.removeEventListener("securitypolicyviolation", $e), !k.ok) return (E = window.SprigLoggerCallback) == null || E.call(window, "Sprig config fetch failed"), k.reportError && (console.warn("[Sprig] (ERR-422) Failed to load configuration", k.error), k.error && window.UserLeap.reportError("applyRemoteConfig", k.error)), Ge("Disabled: failed to fetch configuration"), m;
857
+ const U = k.json;
858
+ return U != null && U.disabled ? ((z = window.SprigLoggerCallback) == null || z.call(window, "Sprig config fetch disabled"), Ge(`Disabled: ${U.disabled}`), { disabled: U.disabled }) : Object.assign({}, U, m);
859
+ }(r);
860
+ if ((g = window.SprigLoggerCallback) == null || g.call(window, "Sprig fetched config"), Zt({ isWeb: !c, reportingIntervalSeconds: l.metricsReportingEnabled || l.mobileMetricsReportingEnabled ? l.metricsReportingIntervalSeconds : 0, thresholds: l.metricThresholds, postMetrics: async (m) => {
861
+ var h;
862
+ await O(D("1", [H], "metrics"), { body: m, method: "POST", headers: { "x-ul-replay-enabled": `${!!((h = I.replay) != null && h.isReplayRecording())}` }, shouldDropOnRateLimit: !0 });
870
863
  } }), !c) {
871
- const m = l.alwaysOnReplay ? { userAgent: window.navigator.userAgent, surveyId: l.alwaysOnReplay.surveyId, responseGroupUuid: l.alwaysOnReplay.responseGroupUuid, sdkVersion: "2.40.0", maxDurationSeconds: l.alwaysOnReplay.maxDurationSeconds } : void 0;
872
- await ((y = k.replay) == null ? void 0 : y.initializeReplay({ maxReplayDurationSeconds: l.maxReplayDurationSeconds, maxInflightRequests: window.UserLeap.maxInflightReplayRequests ?? 2, replaySettings: l.replaySettings, apiUrl: window.UserLeap._API_URL, alwaysOnConfig: m })), je = l.replaySettings;
864
+ const m = l.alwaysOnReplay ? { userAgent: window.navigator.userAgent, surveyId: l.alwaysOnReplay.surveyId, responseGroupUuid: l.alwaysOnReplay.responseGroupUuid, sdkVersion: "2.40.2", maxDurationSeconds: l.alwaysOnReplay.maxDurationSeconds } : void 0;
865
+ await ((y = I.replay) == null ? void 0 : y.initializeReplay({ maxReplayDurationSeconds: l.maxReplayDurationSeconds, maxInflightRequests: window.UserLeap.maxInflightReplayRequests ?? 2, replaySettings: l.replaySettings, apiUrl: window.UserLeap._API_URL, alwaysOnConfig: m })), Me = l.replaySettings;
873
866
  }
874
- sr(l), await or(l), window.UserLeap._queue.unpause(), (v = window.SprigLoggerCallback) == null || v.call(window, "SdkReady"), w.emit(u.SDKReady, { mobileMetricsReportingEnabled: !!l.mobileMetricsReportingEnabled, metricsReportingInterval: l.metricsReportingIntervalSeconds || 0, metricsThresholds: l.metricThresholds || [], maxMobileReplayDurationSeconds: l.maxMobileReplayDurationSeconds, mobileReplaySettings: l.mobileReplaySettings }), w.emit(u.VisitorIDUpdated, { visitorId: window.UserLeap.visitorId }), w.on(u.VisitorIDUpdated, () => {
867
+ or(l), await nr(l), window.UserLeap._queue.unpause(), (v = window.SprigLoggerCallback) == null || v.call(window, "SdkReady"), w.emit(u.SDKReady, { mobileMetricsReportingEnabled: !!l.mobileMetricsReportingEnabled, metricsReportingInterval: l.metricsReportingIntervalSeconds || 0, metricsThresholds: l.metricThresholds || [], maxMobileReplayDurationSeconds: l.maxMobileReplayDurationSeconds, mobileReplaySettings: l.mobileReplaySettings }), w.emit(u.VisitorIDUpdated, { visitorId: window.UserLeap.visitorId }), w.on(u.VisitorIDUpdated, () => {
875
868
  for (const m in me) delete me[m];
876
869
  });
877
870
  }
878
- window.UserLeap.UPDATES = ie, window.UserLeap("setPreviewKey", r), document.readyState === "complete" ? n() : window.attachEvent ? window.attachEvent("onload", n) : window.addEventListener("load", () => {
871
+ window.UserLeap.UPDATES = ie, window.UserLeap("setPreviewKey", t), document.readyState === "complete" ? n() : window.attachEvent ? window.attachEvent("onload", n) : window.addEventListener("load", () => {
879
872
  n();
880
873
  }, !1);
881
874
  }
@@ -883,8 +876,8 @@ class Ae {
883
876
  constructor() {
884
877
  N(this, "UPDATES", ie);
885
878
  }
886
- displaySurvey(r) {
887
- window.Sprig("displaySurvey", r);
879
+ displaySurvey(t) {
880
+ window.Sprig("displaySurvey", t);
888
881
  }
889
882
  mute() {
890
883
  window.Sprig("mute");
@@ -895,50 +888,50 @@ class Ae {
895
888
  dismissActiveSurvey() {
896
889
  window.Sprig("dismissActiveSurvey");
897
890
  }
898
- setAttribute(r, n) {
899
- window.Sprig("setAttribute", r, n);
891
+ setAttribute(t, n) {
892
+ window.Sprig("setAttribute", t, n);
900
893
  }
901
- setAttributes(r) {
902
- window.Sprig("setAttributes", r);
894
+ setAttributes(t) {
895
+ window.Sprig("setAttributes", t);
903
896
  }
904
- identifyAndSetAttributes(r) {
905
- window.Sprig("identifyAndSetAttributes", r);
897
+ identifyAndSetAttributes(t) {
898
+ window.Sprig("identifyAndSetAttributes", t);
906
899
  }
907
- removeAttributes(r) {
908
- window.Sprig("removeAttributes", r);
900
+ removeAttributes(t) {
901
+ window.Sprig("removeAttributes", t);
909
902
  }
910
- addListener(r, n) {
911
- window.Sprig("addListener", r, n);
903
+ addListener(t, n) {
904
+ window.Sprig("addListener", t, n);
912
905
  }
913
- removeListener(r, n) {
914
- window.Sprig("removeListener", r, n);
906
+ removeListener(t, n) {
907
+ window.Sprig("removeListener", t, n);
915
908
  }
916
909
  removeAllListeners() {
917
910
  window.Sprig("removeAllListeners");
918
911
  }
919
- setEmail(r) {
920
- window.Sprig("setAttribute", "!email", r);
912
+ setEmail(t) {
913
+ window.Sprig("setAttribute", "!email", t);
921
914
  }
922
- setUserId(r) {
923
- window.Sprig("setUserId", r);
915
+ setUserId(t) {
916
+ window.Sprig("setUserId", t);
924
917
  }
925
- setPartnerAnonymousId(r) {
926
- window.Sprig("setPartnerAnonymousId", r);
918
+ setPartnerAnonymousId(t) {
919
+ window.Sprig("setPartnerAnonymousId", t);
927
920
  }
928
- track(r, n = {}, s = {}) {
929
- window.Sprig("track", r, n, s);
921
+ track(t, n = {}, a = {}) {
922
+ window.Sprig("track", t, n, a);
930
923
  }
931
- identifyAndTrack(r) {
932
- window.Sprig("identifyAndTrack", r);
924
+ identifyAndTrack(t) {
925
+ window.Sprig("identifyAndTrack", t);
933
926
  }
934
- trackPageView(r, n, s) {
935
- window.Sprig("trackPageView", r, n, s);
927
+ trackPageView(t, n, a) {
928
+ window.Sprig("trackPageView", t, n, a);
936
929
  }
937
- applyStyles(r) {
938
- window.Sprig("applyStyles", r);
930
+ applyStyles(t) {
931
+ window.Sprig("applyStyles", t);
939
932
  }
940
- setWindowDimensions(r, n) {
941
- window.Sprig("setWindowDimensions", r, n);
933
+ setWindowDimensions(t, n) {
934
+ window.Sprig("setWindowDimensions", t, n);
942
935
  }
943
936
  logoutUser() {
944
937
  window.Sprig("logoutUser");
@@ -953,30 +946,30 @@ class Ae {
953
946
  window.Sprig("resumeReplayRecording");
954
947
  }
955
948
  }
956
- const ot = { configure: (t) => {
957
- if (!t.envId && !t.environmentId) throw new Error("Initialization Error: Sprig configure requires an environmentId");
958
- if (t.envId || (t.envId = t.environmentId ?? ""), t.installationMethod = "web-npm", window.Sprig) return window.Sprig;
949
+ const ot = { configure: (r) => {
950
+ if (!r.envId && !r.environmentId) throw new Error("Initialization Error: Sprig configure requires an environmentId");
951
+ if (r.envId || (r.envId = r.environmentId ?? ""), r.installationMethod = "web-npm", window.Sprig) return window.Sprig;
959
952
  window.Sprig = function() {
960
953
  window.Sprig._queue.push(arguments);
961
954
  }, Object.getOwnPropertyNames(Ae.prototype).map((n) => {
962
955
  n !== "constructor" && (window.Sprig[n] = Ae.prototype[n]);
963
956
  });
964
- const r = window.Sprig;
965
- return r.appId = t.envId, r._queue = [], window.UserLeap = r, dr(t), window.Sprig;
966
- } }, fr = { sprig: ot, SprigAPI: Ae, configure: ot.configure };
957
+ const t = window.Sprig;
958
+ return t.appId = r.envId, t._queue = [], window.UserLeap = t, ar(r), window.Sprig;
959
+ } }, mr = { sprig: ot, SprigAPI: Ae, configure: ot.configure };
967
960
  export {
968
- ur as A,
969
- qt as C,
970
- wr as D,
971
- yr as E,
961
+ pr as A,
962
+ Ft as C,
963
+ ur as D,
964
+ gr as E,
972
965
  Ae as S,
973
- gr as a,
974
- pr as b,
975
- fr as c,
976
- $t as d,
966
+ wr as a,
967
+ cr as b,
968
+ mr as c,
969
+ Nt as d,
977
970
  le as e,
978
971
  Ce as g,
979
- P as i,
980
- mr as r,
972
+ F as i,
973
+ yr as r,
981
974
  ot as s
982
975
  };