@askdialog/dialog-vue 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dialog-vue.css +1 -1
- package/dist/dialog-vue.js +316 -308
- package/dist/dialog-vue.umd.cjs +4 -4
- package/package.json +1 -1
package/dist/dialog-vue.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Ae, createElementBlock as Me, openBlock as ie, createElementVNode as H, toDisplayString as Ci, Fragment as fs, renderList as Fn, createVNode as
|
|
1
|
+
import { defineComponent as Ae, createElementBlock as Me, openBlock as ie, createElementVNode as H, toDisplayString as Ci, Fragment as fs, renderList as Fn, createVNode as Bt, createBlock as Ht, ref as wt, withDirectives as Tn, withKeys as On, vModelText as Rn, onMounted as Dn, watch as _s, renderSlot as Mn, computed as ui, withCtx as An, createCommentVNode as Ln } from "vue";
|
|
2
2
|
var gr;
|
|
3
3
|
(function(r) {
|
|
4
4
|
r.OPEN_ASSISTANT = "open_assistant", r.CLOSE_ASSISTANT = "close_assistant", r.SEND_MESSAGE = "PRODUCT_QUESTION", r.SEND_GENERIC_QUESTION = "GENERIC_QUESTION";
|
|
@@ -11,8 +11,8 @@ var d = typeof window < "u" ? window : void 0, Y = typeof globalThis < "u" ? glo
|
|
|
11
11
|
function yr(r, e, t, i, s, n, a) {
|
|
12
12
|
try {
|
|
13
13
|
var o = r[n](a), l = o.value;
|
|
14
|
-
} catch (
|
|
15
|
-
return void t(
|
|
14
|
+
} catch (c) {
|
|
15
|
+
return void t(c);
|
|
16
16
|
}
|
|
17
17
|
o.done ? e(l) : Promise.resolve(l).then(i, s);
|
|
18
18
|
}
|
|
@@ -111,19 +111,19 @@ class Gn {
|
|
|
111
111
|
this.t = {};
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
var
|
|
114
|
+
var Ot, Er, di, Wn = (r) => r instanceof Error;
|
|
115
115
|
function zn(r) {
|
|
116
116
|
var e = globalThis._posthogChunkIds;
|
|
117
117
|
if (e) {
|
|
118
118
|
var t = Object.keys(e);
|
|
119
119
|
return di && t.length === Er || (Er = t.length, di = t.reduce(((i, s) => {
|
|
120
|
-
|
|
121
|
-
var n =
|
|
120
|
+
Ot || (Ot = {});
|
|
121
|
+
var n = Ot[s];
|
|
122
122
|
if (n) i[n[0]] = n[1];
|
|
123
123
|
else for (var a = r(s), o = a.length - 1; o >= 0; o--) {
|
|
124
|
-
var l = a[o],
|
|
125
|
-
if (
|
|
126
|
-
i[
|
|
124
|
+
var l = a[o], c = l == null ? void 0 : l.filename, u = e[s];
|
|
125
|
+
if (c && u) {
|
|
126
|
+
i[c] = u, Ot[s] = [c, u];
|
|
127
127
|
break;
|
|
128
128
|
}
|
|
129
129
|
}
|
|
@@ -173,10 +173,10 @@ function ta() {
|
|
|
173
173
|
`), o = s; o < a.length; o++) {
|
|
174
174
|
var l = a[o];
|
|
175
175
|
if (!(l.length > 1024)) {
|
|
176
|
-
var
|
|
177
|
-
if (!
|
|
178
|
-
for (var
|
|
179
|
-
var h = c
|
|
176
|
+
var c = kr.test(l) ? l.replace(kr, "$1") : l;
|
|
177
|
+
if (!c.match(/\S*Error: /)) {
|
|
178
|
+
for (var u of e) {
|
|
179
|
+
var h = u(c);
|
|
180
180
|
if (h) {
|
|
181
181
|
n.push(h);
|
|
182
182
|
break;
|
|
@@ -434,9 +434,9 @@ var xs = (r) => {
|
|
|
434
434
|
for (var s, n = function() {
|
|
435
435
|
if (i[a].src === e) {
|
|
436
436
|
var l = i[a];
|
|
437
|
-
return l.__posthog_loading_callback_fired ? { v: t() } : (l.addEventListener("load", ((
|
|
438
|
-
l.__posthog_loading_callback_fired = !0, t(void 0,
|
|
439
|
-
})), l.onerror = (
|
|
437
|
+
return l.__posthog_loading_callback_fired ? { v: t() } : (l.addEventListener("load", ((c) => {
|
|
438
|
+
l.__posthog_loading_callback_fired = !0, t(void 0, c);
|
|
439
|
+
})), l.onerror = (c) => t(c), { v: void 0 });
|
|
440
440
|
}
|
|
441
441
|
}, a = 0; a < i.length; a++) if (s = n()) return s.v;
|
|
442
442
|
}
|
|
@@ -446,8 +446,8 @@ var xs = (r) => {
|
|
|
446
446
|
if (l.type = "text/javascript", l.crossOrigin = "anonymous", l.src = e, l.onload = (h) => {
|
|
447
447
|
l.__posthog_loading_callback_fired = !0, t(void 0, h);
|
|
448
448
|
}, l.onerror = (h) => t(h), r.config.prepare_external_dependency_script && (l = r.config.prepare_external_dependency_script(l)), !l) return t("prepare_external_dependency_script returned null");
|
|
449
|
-
var
|
|
450
|
-
|
|
449
|
+
var c, u = m.querySelectorAll("body > script");
|
|
450
|
+
u.length > 0 ? (c = u[0].parentNode) == null || c.insertBefore(l, u[0]) : m.body.appendChild(l);
|
|
451
451
|
};
|
|
452
452
|
m != null && m.body ? o() : m == null || m.addEventListener("DOMContentLoaded", o);
|
|
453
453
|
};
|
|
@@ -493,7 +493,7 @@ var A = function(r) {
|
|
|
493
493
|
}));
|
|
494
494
|
})), r;
|
|
495
495
|
};
|
|
496
|
-
function
|
|
496
|
+
function Ut(r) {
|
|
497
497
|
for (var e = Object.keys(r), t = e.length, i = new Array(t); t--; ) i[t] = [e[t], r[e[t]]];
|
|
498
498
|
return i;
|
|
499
499
|
}
|
|
@@ -520,10 +520,10 @@ var Pr = function(r) {
|
|
|
520
520
|
};
|
|
521
521
|
function fa(r, e) {
|
|
522
522
|
return t = r, i = (n) => N(n) && !Ee(e) ? n.slice(0, e) : n, s = /* @__PURE__ */ new Set(), (function n(a, o) {
|
|
523
|
-
return a !== Object(a) ? i ? i(a, o) : a : s.has(a) ? void 0 : (s.add(a), T(a) ? (l = [], Re(a, ((
|
|
524
|
-
l.push(n(
|
|
525
|
-
}))) : (l = {}, F(a, ((
|
|
526
|
-
s.has(
|
|
523
|
+
return a !== Object(a) ? i ? i(a, o) : a : s.has(a) ? void 0 : (s.add(a), T(a) ? (l = [], Re(a, ((c) => {
|
|
524
|
+
l.push(n(c));
|
|
525
|
+
}))) : (l = {}, F(a, ((c, u) => {
|
|
526
|
+
s.has(c) || (l[u] = n(c, u));
|
|
527
527
|
}))), l);
|
|
528
528
|
var l;
|
|
529
529
|
})(t);
|
|
@@ -544,7 +544,7 @@ function L(r, e, t, i) {
|
|
|
544
544
|
var { capture: s = !1, passive: n = !0 } = i ?? {};
|
|
545
545
|
r == null || r.addEventListener(e, t, { capture: s, passive: n });
|
|
546
546
|
}
|
|
547
|
-
var Ps = "$people_distinct_id", gt = "__alias", ft = "__timers", Cr = "$autocapture_disabled_server_side", Di = "$heatmaps_enabled_server_side", $r = "$exception_capture_enabled_server_side", Mi = "$error_tracking_suppression_rules", Ir = "$error_tracking_capture_extension_exceptions", Fr = "$web_vitals_enabled_server_side", Cs = "$dead_clicks_enabled_server_side", Tr = "$web_vitals_allowed_metrics", pi = "$session_recording_remote_config", Wt = "$sesid", $s = "$session_is_sampled", Je = "$enabled_feature_flags", _t = "$early_access_features", Ai = "$feature_flag_details", vt = "$stored_person_properties", je = "$stored_group_properties", Li = "$surveys",
|
|
547
|
+
var Ps = "$people_distinct_id", gt = "__alias", ft = "__timers", Cr = "$autocapture_disabled_server_side", Di = "$heatmaps_enabled_server_side", $r = "$exception_capture_enabled_server_side", Mi = "$error_tracking_suppression_rules", Ir = "$error_tracking_capture_extension_exceptions", Fr = "$web_vitals_enabled_server_side", Cs = "$dead_clicks_enabled_server_side", Tr = "$web_vitals_allowed_metrics", pi = "$session_recording_remote_config", Wt = "$sesid", $s = "$session_is_sampled", Je = "$enabled_feature_flags", _t = "$early_access_features", Ai = "$feature_flag_details", vt = "$stored_person_properties", je = "$stored_group_properties", Li = "$surveys", Rt = "$surveys_activated", zt = "$flag_call_reported", ye = "$user_state", Ni = "$client_session_props", Ui = "$capture_rate_limit", qi = "$initial_campaign_params", ji = "$initial_referrer_info", Yt = "$initial_person_info", Xt = "$epp", Is = "__POSTHOG_TOOLBAR__", ot = "$posthog_cookieless", ma = [Ps, gt, "__cmpns", ft, "$session_recording_enabled_server_side", Di, Wt, Je, Mi, ye, _t, Ai, je, vt, Li, zt, Ni, Ui, qi, ji, Xt, Yt];
|
|
548
548
|
function Or(r) {
|
|
549
549
|
return r instanceof Element && (r.id === Is || !(r.closest == null || !r.closest(".toolbar-global-fade-container")));
|
|
550
550
|
}
|
|
@@ -582,9 +582,9 @@ function Kt(r) {
|
|
|
582
582
|
return er(e);
|
|
583
583
|
}
|
|
584
584
|
function Os(r) {
|
|
585
|
-
return O(r) ? null : si(r).split(/(\s+)/).filter(((e) =>
|
|
585
|
+
return O(r) ? null : si(r).split(/(\s+)/).filter(((e) => xt(e))).join("").replace(/[\r\n]/g, " ").replace(/[ ]+/g, " ").substring(0, 255);
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function It(r) {
|
|
588
588
|
var e = "";
|
|
589
589
|
return Bi(r) && !Ls(r) && r.childNodes && r.childNodes.length && F(r.childNodes, (function(t) {
|
|
590
590
|
var i;
|
|
@@ -621,15 +621,15 @@ function ba(r, e) {
|
|
|
621
621
|
else {
|
|
622
622
|
if (!T(a)) return !1;
|
|
623
623
|
if (a.length > Dr) return y.error("[PostHog] content_ignorelist array cannot exceed " + Dr + " items. Use css_selector_ignorelist for more complex matching."), !1;
|
|
624
|
-
l = a.map(((
|
|
624
|
+
l = a.map(((c) => c.toLowerCase()));
|
|
625
625
|
}
|
|
626
|
-
return o.some(((
|
|
627
|
-
var { safeText:
|
|
628
|
-
return l.some(((g) =>
|
|
626
|
+
return o.some(((c) => {
|
|
627
|
+
var { safeText: u, ariaLabel: h } = c;
|
|
628
|
+
return l.some(((g) => u.includes(g) || h.includes(g)));
|
|
629
629
|
}));
|
|
630
630
|
})(i, n.map(((a) => {
|
|
631
631
|
var o;
|
|
632
|
-
return { safeText:
|
|
632
|
+
return { safeText: It(a).toLowerCase(), ariaLabel: ((o = a.getAttribute("aria-label")) == null ? void 0 : o.toLowerCase().trim()) || "" };
|
|
633
633
|
}))) && !Ds(n, t);
|
|
634
634
|
}
|
|
635
635
|
var ir = (r) => !r || De(r, "html") || !ai(r), As = (r, e) => {
|
|
@@ -651,10 +651,10 @@ function wa(r, e, t, i, s) {
|
|
|
651
651
|
var n, a, o, l;
|
|
652
652
|
if (t === void 0 && (t = void 0), !d || ir(r) || (n = t) != null && n.url_allowlist && !Rr(t.url_allowlist) || (a = t) != null && a.url_ignorelist && Rr(t.url_ignorelist)) return !1;
|
|
653
653
|
if ((o = t) != null && o.dom_event_allowlist) {
|
|
654
|
-
var
|
|
655
|
-
if (
|
|
654
|
+
var c = t.dom_event_allowlist;
|
|
655
|
+
if (c && !c.some(((f) => e.type === f))) return !1;
|
|
656
656
|
}
|
|
657
|
-
var { parentIsUsefulElement:
|
|
657
|
+
var { parentIsUsefulElement: u, targetElementList: h } = As(r, i);
|
|
658
658
|
if (!(function(f, _) {
|
|
659
659
|
var b = _ == null ? void 0 : _.element_allowlist;
|
|
660
660
|
if (v(b)) return !0;
|
|
@@ -677,7 +677,7 @@ function wa(r, e, t, i, s) {
|
|
|
677
677
|
case "textarea":
|
|
678
678
|
return (s || ["change", "click"]).indexOf(e.type) >= 0;
|
|
679
679
|
default:
|
|
680
|
-
return
|
|
680
|
+
return u ? (s || ["click"]).indexOf(e.type) >= 0 : (s || ["click"]).indexOf(e.type) >= 0 && (tr.indexOf(p) > -1 || r.getAttribute("contenteditable") === "true");
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
683
|
function Bi(r) {
|
|
@@ -699,19 +699,19 @@ function Ls(r) {
|
|
|
699
699
|
return !!(De(r, "input") && !["button", "checkbox", "submit", "reset"].includes(r.type) || De(r, "select") || De(r, "textarea") || r.getAttribute("contenteditable") === "true");
|
|
700
700
|
}
|
|
701
701
|
var Ns = "(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})", Ea = new RegExp("^(?:" + Ns + ")$"), ka = new RegExp(Ns), Us = "\\d{3}-?\\d{2}-?\\d{4}", xa = new RegExp("^(" + Us + ")$"), Sa = new RegExp("(" + Us + ")");
|
|
702
|
-
function
|
|
702
|
+
function xt(r, e) {
|
|
703
703
|
return e === void 0 && (e = !0), !(O(r) || N(r) && (r = si(r), (e ? Ea : ka).test((r || "").replace(/[- ]/g, "")) || (e ? xa : Sa).test(r)));
|
|
704
704
|
}
|
|
705
705
|
function qs(r) {
|
|
706
|
-
var e =
|
|
707
|
-
return
|
|
706
|
+
var e = It(r);
|
|
707
|
+
return xt(e = (e + " " + js(r)).trim()) ? e : "";
|
|
708
708
|
}
|
|
709
709
|
function js(r) {
|
|
710
710
|
var e = "";
|
|
711
711
|
return r && r.childNodes && r.childNodes.length && F(r.childNodes, (function(t) {
|
|
712
712
|
var i;
|
|
713
713
|
if (t && ((i = t.tagName) == null ? void 0 : i.toLowerCase()) === "span") try {
|
|
714
|
-
var s =
|
|
714
|
+
var s = It(t);
|
|
715
715
|
e = (e + " " + s).trim(), t.childNodes && t.childNodes.length && (e = (e + " " + js(t)).trim());
|
|
716
716
|
} catch (n) {
|
|
717
717
|
y.error("[AutoCapture]", n);
|
|
@@ -723,15 +723,15 @@ function Pa(r) {
|
|
|
723
723
|
var t = e.map(((i) => {
|
|
724
724
|
var s, n, a = "";
|
|
725
725
|
if (i.tag_name && (a += i.tag_name), i.attr_class) for (var o of (i.attr_class.sort(), i.attr_class)) a += "." + o.replace(/"/g, "");
|
|
726
|
-
var l = w({}, i.text ? { text: i.text } : {}, { "nth-child": (s = i.nth_child) !== null && s !== void 0 ? s : 0, "nth-of-type": (n = i.nth_of_type) !== null && n !== void 0 ? n : 0 }, i.href ? { href: i.href } : {}, i.attr_id ? { attr_id: i.attr_id } : {}, i.attributes),
|
|
727
|
-
return
|
|
728
|
-
var [g] =
|
|
726
|
+
var l = w({}, i.text ? { text: i.text } : {}, { "nth-child": (s = i.nth_child) !== null && s !== void 0 ? s : 0, "nth-of-type": (n = i.nth_of_type) !== null && n !== void 0 ? n : 0 }, i.href ? { href: i.href } : {}, i.attr_id ? { attr_id: i.attr_id } : {}, i.attributes), c = {};
|
|
727
|
+
return Ut(l).sort(((u, h) => {
|
|
728
|
+
var [g] = u, [p] = h;
|
|
729
729
|
return g.localeCompare(p);
|
|
730
|
-
})).forEach(((
|
|
731
|
-
var [h, g] =
|
|
732
|
-
return
|
|
733
|
-
})), a += ":", a +=
|
|
734
|
-
var [h, g] =
|
|
730
|
+
})).forEach(((u) => {
|
|
731
|
+
var [h, g] = u;
|
|
732
|
+
return c[Ar(h.toString())] = Ar(g.toString());
|
|
733
|
+
})), a += ":", a += Ut(c).map(((u) => {
|
|
734
|
+
var [h, g] = u;
|
|
735
735
|
return h + '="' + g + '"';
|
|
736
736
|
})).join("");
|
|
737
737
|
}));
|
|
@@ -739,7 +739,7 @@ function Pa(r) {
|
|
|
739
739
|
})((function(e) {
|
|
740
740
|
return e.map(((t) => {
|
|
741
741
|
var i, s, n = { text: (i = t.$el_text) == null ? void 0 : i.slice(0, 400), tag_name: t.tag_name, href: (s = t.attr__href) == null ? void 0 : s.slice(0, 2048), attr_class: Ca(t), attr_id: t.attr__id, nth_child: t.nth_child, nth_of_type: t.nth_of_type, attributes: {} };
|
|
742
|
-
return
|
|
742
|
+
return Ut(t).filter(((a) => {
|
|
743
743
|
var [o] = a;
|
|
744
744
|
return o.indexOf("attr__") === 0;
|
|
745
745
|
})).forEach(((a) => {
|
|
@@ -799,14 +799,14 @@ var gi = "$copy_autocapture", we = (function(r) {
|
|
|
799
799
|
y.error("Skipping decoding for malformed query param: " + a);
|
|
800
800
|
}
|
|
801
801
|
return a.replace(/\+/g, " ");
|
|
802
|
-
},
|
|
802
|
+
}, Ft = function(r, e, t) {
|
|
803
803
|
if (!r || !e || !e.length) return r;
|
|
804
|
-
for (var i = r.split("#"), s = i[0] || "", n = i[1], a = s.split("?"), o = a[1], l = a[0],
|
|
805
|
-
var g =
|
|
806
|
-
T(g) && (e.includes(g[0]) ?
|
|
804
|
+
for (var i = r.split("#"), s = i[0] || "", n = i[1], a = s.split("?"), o = a[1], l = a[0], c = (o || "").split("&"), u = [], h = 0; h < c.length; h++) {
|
|
805
|
+
var g = c[h].split("=");
|
|
806
|
+
T(g) && (e.includes(g[0]) ? u.push(g[0] + "=" + t) : u.push(c[h]));
|
|
807
807
|
}
|
|
808
808
|
var p = l;
|
|
809
|
-
return o != null && (p += "?" +
|
|
809
|
+
return o != null && (p += "?" + u.join("&")), n != null && (p += "#" + n), p;
|
|
810
810
|
}, Qt = function(r, e) {
|
|
811
811
|
var t = r.match(new RegExp(e + "=([^&]*)"));
|
|
812
812
|
return t ? t[1] : null;
|
|
@@ -824,39 +824,39 @@ function Ia(r) {
|
|
|
824
824
|
}
|
|
825
825
|
function Fa(r, e, t, i) {
|
|
826
826
|
var s = r.tagName.toLowerCase(), n = { tag_name: s };
|
|
827
|
-
tr.indexOf(s) > -1 && !t && (s.toLowerCase() === "a" || s.toLowerCase() === "button" ? n.$el_text = fi(1024, qs(r)) : n.$el_text = fi(1024,
|
|
827
|
+
tr.indexOf(s) > -1 && !t && (s.toLowerCase() === "a" || s.toLowerCase() === "button" ? n.$el_text = fi(1024, qs(r)) : n.$el_text = fi(1024, It(r)));
|
|
828
828
|
var a = Kt(r);
|
|
829
|
-
a.length > 0 && (n.classes = a.filter((function(
|
|
830
|
-
return
|
|
831
|
-
}))), F(r.attributes, (function(
|
|
829
|
+
a.length > 0 && (n.classes = a.filter((function(u) {
|
|
830
|
+
return u !== "";
|
|
831
|
+
}))), F(r.attributes, (function(u) {
|
|
832
832
|
var h;
|
|
833
|
-
if ((!Ls(r) || ["name", "id", "class", "aria-label"].indexOf(
|
|
834
|
-
var g =
|
|
835
|
-
|
|
833
|
+
if ((!Ls(r) || ["name", "id", "class", "aria-label"].indexOf(u.name) !== -1) && (i == null || !i.includes(u.name)) && !e && xt(u.value) && (h = u.name, !N(h) || h.substring(0, 10) !== "_ngcontent" && h.substring(0, 7) !== "_nghost")) {
|
|
834
|
+
var g = u.value;
|
|
835
|
+
u.name === "class" && (g = er(g).join(" ")), n["attr__" + u.name] = fi(1024, g);
|
|
836
836
|
}
|
|
837
837
|
}));
|
|
838
|
-
for (var o = 1, l = 1,
|
|
838
|
+
for (var o = 1, l = 1, c = r; c = Ia(c); ) o++, c.tagName === r.tagName && l++;
|
|
839
839
|
return n.nth_child = o, n.nth_of_type = l, n;
|
|
840
840
|
}
|
|
841
841
|
function Ta(r, e) {
|
|
842
|
-
for (var t, i, { e: s, maskAllElementAttributes: n, maskAllText: a, elementAttributeIgnoreList: o, elementsChainAsString: l } = e,
|
|
842
|
+
for (var t, i, { e: s, maskAllElementAttributes: n, maskAllText: a, elementAttributeIgnoreList: o, elementsChainAsString: l } = e, c = [r], u = r; u.parentNode && !De(u, "body"); ) Ts(u.parentNode) ? (c.push(u.parentNode.host), u = u.parentNode.host) : (c.push(u.parentNode), u = u.parentNode);
|
|
843
843
|
var h, g = [], p = {}, f = !1, _ = !1;
|
|
844
|
-
if (F(
|
|
844
|
+
if (F(c, ((P) => {
|
|
845
845
|
var M = Bi(P);
|
|
846
|
-
P.tagName.toLowerCase() === "a" && (f = P.getAttribute("href"), f = M && f &&
|
|
846
|
+
P.tagName.toLowerCase() === "a" && (f = P.getAttribute("href"), f = M && f && xt(f) && f), S(Kt(P), "ph-no-capture") && (_ = !0), g.push(Fa(P, n, a, o));
|
|
847
847
|
var ne = (function(K) {
|
|
848
848
|
if (!Bi(K)) return {};
|
|
849
849
|
var C = {};
|
|
850
850
|
return F(K.attributes, (function(le) {
|
|
851
851
|
if (le.name && le.name.indexOf("data-ph-capture-attribute") === 0) {
|
|
852
852
|
var J = le.name.replace("data-ph-capture-attribute-", ""), ae = le.value;
|
|
853
|
-
J && ae &&
|
|
853
|
+
J && ae && xt(ae) && (C[J] = ae);
|
|
854
854
|
}
|
|
855
855
|
})), C;
|
|
856
856
|
})(P);
|
|
857
857
|
A(p, ne);
|
|
858
858
|
})), _) return { props: {}, explicitNoCapture: _ };
|
|
859
|
-
if (a || (r.tagName.toLowerCase() === "a" || r.tagName.toLowerCase() === "button" ? g[0].$el_text = qs(r) : g[0].$el_text =
|
|
859
|
+
if (a || (r.tagName.toLowerCase() === "a" || r.tagName.toLowerCase() === "button" ? g[0].$el_text = qs(r) : g[0].$el_text = It(r)), f) {
|
|
860
860
|
var b, E;
|
|
861
861
|
g[0].attr__href = f;
|
|
862
862
|
var x = (b = Jt(f)) == null ? void 0 : b.host, $ = d == null || (E = d.location) == null ? void 0 : E.host;
|
|
@@ -926,9 +926,9 @@ class Oa {
|
|
|
926
926
|
if (o) return !1;
|
|
927
927
|
var l = this.getElementSelectors(s);
|
|
928
928
|
if (l && l.length > 0 && (a.$element_selectors = l), t === gi) {
|
|
929
|
-
var
|
|
930
|
-
if (!
|
|
931
|
-
a.$selected_content =
|
|
929
|
+
var c, u = Os(d == null || (c = d.getSelection()) == null ? void 0 : c.toString()), h = e.type || "clipboard";
|
|
930
|
+
if (!u) return !1;
|
|
931
|
+
a.$selected_content = u, a.$copy_type = h;
|
|
932
932
|
}
|
|
933
933
|
return this.instance.capture(t, a), !0;
|
|
934
934
|
}
|
|
@@ -1020,8 +1020,8 @@ function La(r, e) {
|
|
|
1020
1020
|
if (n === void 0 && (n = m), lt) return lt;
|
|
1021
1021
|
if (!n || ["localhost", "127.0.0.1"].includes(s)) return "";
|
|
1022
1022
|
for (var a = s.split("."), o = Math.min(a.length, 8), l = "dmn_chk_" + Fe(); !lt && o--; ) {
|
|
1023
|
-
var
|
|
1024
|
-
n.cookie =
|
|
1023
|
+
var c = a.slice(o).join("."), u = l + "=1;domain=." + c + ";path=/";
|
|
1024
|
+
n.cookie = u + ";max-age=3", n.cookie.includes(l) && (n.cookie = u + ";max-age=0", lt = c);
|
|
1025
1025
|
}
|
|
1026
1026
|
return lt;
|
|
1027
1027
|
})(r);
|
|
@@ -1064,8 +1064,8 @@ var ge = { H: () => !!m, B: function(r) {
|
|
|
1064
1064
|
l.setTime(l.getTime() + 24 * t * 60 * 60 * 1e3), n = "; expires=" + l.toUTCString();
|
|
1065
1065
|
}
|
|
1066
1066
|
s && (a = "; secure");
|
|
1067
|
-
var
|
|
1068
|
-
return
|
|
1067
|
+
var c = r + "=" + encodeURIComponent(JSON.stringify(e)) + n + "; SameSite=Lax; path=/" + o + a;
|
|
1068
|
+
return c.length > 3686.4 && y.warn("cookieStore warning: large cookie, len=" + c.length), m.cookie = c, c;
|
|
1069
1069
|
} catch {
|
|
1070
1070
|
return;
|
|
1071
1071
|
}
|
|
@@ -1113,7 +1113,7 @@ var ge = { H: () => !!m, B: function(r) {
|
|
|
1113
1113
|
} catch (e) {
|
|
1114
1114
|
D.B(e);
|
|
1115
1115
|
}
|
|
1116
|
-
} }, Na = ["distinct_id", Wt, $s, Xt, Yt],
|
|
1116
|
+
} }, Na = ["distinct_id", Wt, $s, Xt, Yt], Dt = w({}, D, { W: function(r) {
|
|
1117
1117
|
try {
|
|
1118
1118
|
var e = {};
|
|
1119
1119
|
try {
|
|
@@ -1141,18 +1141,18 @@ var ge = { H: () => !!m, B: function(r) {
|
|
|
1141
1141
|
} catch (t) {
|
|
1142
1142
|
D.B(t);
|
|
1143
1143
|
}
|
|
1144
|
-
} }),
|
|
1144
|
+
} }), Mt = {}, Ua = { H: function() {
|
|
1145
1145
|
return !0;
|
|
1146
1146
|
}, B: function(r) {
|
|
1147
1147
|
y.error("memoryStorage error: " + r);
|
|
1148
1148
|
}, q: function(r) {
|
|
1149
|
-
return
|
|
1149
|
+
return Mt[r] || null;
|
|
1150
1150
|
}, W: function(r) {
|
|
1151
|
-
return
|
|
1151
|
+
return Mt[r] || null;
|
|
1152
1152
|
}, G: function(r, e) {
|
|
1153
|
-
|
|
1153
|
+
Mt[r] = e;
|
|
1154
1154
|
}, V: function(r) {
|
|
1155
|
-
delete
|
|
1155
|
+
delete Mt[r];
|
|
1156
1156
|
} }, Ne = null, q = { H: function() {
|
|
1157
1157
|
if (!Ee(Ne)) return Ne;
|
|
1158
1158
|
if (Ne = !0, v(d)) Ne = !1;
|
|
@@ -1239,7 +1239,7 @@ class qa {
|
|
|
1239
1239
|
return !!this.C.respect_dnt && !!Ss([Q == null ? void 0 : Q.doNotTrack, Q == null ? void 0 : Q.msDoNotTrack, k.doNotTrack], ((e) => hi(e)));
|
|
1240
1240
|
}
|
|
1241
1241
|
}
|
|
1242
|
-
var
|
|
1242
|
+
var At = U("[Dead Clicks]"), ja = () => !0, Ba = (r) => {
|
|
1243
1243
|
var e, t = !((e = r.instance.persistence) == null || !e.get_property(Cs)), i = r.instance.config.capture_dead_clicks;
|
|
1244
1244
|
return Oe(i) ? i : t;
|
|
1245
1245
|
};
|
|
@@ -1261,7 +1261,7 @@ class Vs {
|
|
|
1261
1261
|
it(e) {
|
|
1262
1262
|
var t, i;
|
|
1263
1263
|
(t = k.__PosthogExtensions__) != null && t.initDeadClicksAutocapture && e(), (i = k.__PosthogExtensions__) == null || i.loadExternalDependency == null || i.loadExternalDependency(this.instance, "dead-clicks-autocapture", ((s) => {
|
|
1264
|
-
s ?
|
|
1264
|
+
s ? At.error("failed to load script", s) : e();
|
|
1265
1265
|
}));
|
|
1266
1266
|
}
|
|
1267
1267
|
et() {
|
|
@@ -1269,12 +1269,12 @@ class Vs {
|
|
|
1269
1269
|
if (m) {
|
|
1270
1270
|
if (!this.tt && (e = k.__PosthogExtensions__) != null && e.initDeadClicksAutocapture) {
|
|
1271
1271
|
var t = j(this.instance.config.capture_dead_clicks) ? this.instance.config.capture_dead_clicks : {};
|
|
1272
|
-
t.__onCapture = this.onCapture, this.tt = k.__PosthogExtensions__.initDeadClicksAutocapture(this.instance, t), this.tt.start(m),
|
|
1272
|
+
t.__onCapture = this.onCapture, this.tt = k.__PosthogExtensions__.initDeadClicksAutocapture(this.instance, t), this.tt.start(m), At.info("starting...");
|
|
1273
1273
|
}
|
|
1274
|
-
} else
|
|
1274
|
+
} else At.error("`document` not found. Cannot start.");
|
|
1275
1275
|
}
|
|
1276
1276
|
stop() {
|
|
1277
|
-
this.tt && (this.tt.stop(), this.tt = void 0,
|
|
1277
|
+
this.tt && (this.tt.stop(), this.tt = void 0, At.info("stopping..."));
|
|
1278
1278
|
}
|
|
1279
1279
|
}
|
|
1280
1280
|
var ct = U("[ExceptionAutocapture]");
|
|
@@ -1287,8 +1287,8 @@ class Ha {
|
|
|
1287
1287
|
var a = k.__PosthogExtensions__.errorWrappingFunctions.wrapOnError, o = k.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection, l = k.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;
|
|
1288
1288
|
try {
|
|
1289
1289
|
!this.st && this.C.capture_unhandled_errors && (this.st = a(this.captureException.bind(this))), !this.nt && this.C.capture_unhandled_rejections && (this.nt = o(this.captureException.bind(this))), !this.ot && this.C.capture_console_errors && (this.ot = l(this.captureException.bind(this)));
|
|
1290
|
-
} catch (
|
|
1291
|
-
ct.error("failed to start",
|
|
1290
|
+
} catch (c) {
|
|
1291
|
+
ct.error("failed to start", c), this.lt();
|
|
1292
1292
|
}
|
|
1293
1293
|
}
|
|
1294
1294
|
}, this._instance = e, this.ut = !((t = this._instance.persistence) == null || !t.props[$r]), this.C = this.ht(), this.dt = new Gn({ refillRate: (i = this._instance.config.error_tracking.__exceptionRateLimiterRefillRate) !== null && i !== void 0 ? i : 1, bucketSize: (s = this._instance.config.error_tracking.__exceptionRateLimiterBucketSize) !== null && s !== void 0 ? s : 10, refillInterval: 1e4, h: ct }), this.startIfEnabled();
|
|
@@ -1389,8 +1389,8 @@ function Ga(r, e) {
|
|
|
1389
1389
|
var n = i.config.segment;
|
|
1390
1390
|
if (!n) return s();
|
|
1391
1391
|
var a = (l) => {
|
|
1392
|
-
var
|
|
1393
|
-
i.config.get_device_id =
|
|
1392
|
+
var c = () => l.anonymousId() || Fe();
|
|
1393
|
+
i.config.get_device_id = c, l.id() && (i.register({ distinct_id: l.id(), $device_id: c() }), i.persistence.set_property(ye, "identified")), s();
|
|
1394
1394
|
}, o = n.user();
|
|
1395
1395
|
"then" in o && Te(o.then) ? o.then(((l) => a(l))) : a(o);
|
|
1396
1396
|
})(r, (() => {
|
|
@@ -1412,12 +1412,12 @@ var Gs = "posthog-js";
|
|
|
1412
1412
|
function Ws(r, e) {
|
|
1413
1413
|
var { organization: t, projectId: i, prefix: s, severityAllowList: n = ["error"], sendExceptionsToPostHog: a = !0 } = e === void 0 ? {} : e;
|
|
1414
1414
|
return (o) => {
|
|
1415
|
-
var l,
|
|
1415
|
+
var l, c, u, h, g;
|
|
1416
1416
|
if (!(n === "*" || n.includes(o.level)) || !r.__loaded) return o;
|
|
1417
1417
|
o.tags || (o.tags = {});
|
|
1418
1418
|
var p = r.requestRouter.endpointFor("ui", "/project/" + r.config.token + "/person/" + r.get_distinct_id());
|
|
1419
1419
|
o.tags["PostHog Person URL"] = p, r.sessionRecordingStarted() && (o.tags["PostHog Recording URL"] = r.get_session_replay_url({ withTimestamp: !0 }));
|
|
1420
|
-
var f = ((l = o.exception) == null ? void 0 : l.values) || [], _ = f.map(((E) => w({}, E, { stacktrace: E.stacktrace ? w({}, E.stacktrace, { type: "raw", frames: (E.stacktrace.frames || []).map(((x) => w({}, x, { platform: "web:javascript" }))) }) : void 0 }))), b = { $exception_message: ((
|
|
1420
|
+
var f = ((l = o.exception) == null ? void 0 : l.values) || [], _ = f.map(((E) => w({}, E, { stacktrace: E.stacktrace ? w({}, E.stacktrace, { type: "raw", frames: (E.stacktrace.frames || []).map(((x) => w({}, x, { platform: "web:javascript" }))) }) : void 0 }))), b = { $exception_message: ((c = f[0]) == null ? void 0 : c.value) || o.message, $exception_type: (u = f[0]) == null ? void 0 : u.type, $exception_level: o.level, $exception_list: _, $sentry_event_id: o.event_id, $sentry_exception: o.exception, $sentry_exception_message: ((h = f[0]) == null ? void 0 : h.value) || o.message, $sentry_exception_type: (g = f[0]) == null ? void 0 : g.type, $sentry_tags: o.tags };
|
|
1421
1421
|
return t && i && (b.$sentry_url = (s || "https://sentry.io/organizations/") + t + "/issues/?project=" + i + "&query=" + o.event_id), a && r.exceptions.sendExceptionEvent(b), o;
|
|
1422
1422
|
};
|
|
1423
1423
|
}
|
|
@@ -1507,11 +1507,11 @@ class Ka {
|
|
|
1507
1507
|
this._instance.config.__add_tracing_headers ? this.it(this.rt) : ((e = this.xt) == null || e.call(this), (t = this.$t) == null || t.call(this), this.xt = void 0, this.$t = void 0);
|
|
1508
1508
|
}
|
|
1509
1509
|
}
|
|
1510
|
-
var re = "Mobile", ti = "iOS", pe = "Android",
|
|
1511
|
-
return S(t,
|
|
1510
|
+
var re = "Mobile", ti = "iOS", pe = "Android", St = "Tablet", zs = pe + " " + St, Ys = "iPad", Xs = "Apple", Ks = Xs + " Watch", Pt = "Safari", tt = "BlackBerry", Js = "Samsung", Zs = Js + "Browser", Qs = Js + " Internet", He = "Chrome", Ja = He + " OS", en = He + " " + ti, rr = "Internet Explorer", tn = rr + " " + re, sr = "Opera", Za = sr + " Mini", nr = "Edge", rn = "Microsoft " + nr, Ze = "Firefox", sn = Ze + " " + ti, Ct = "Nintendo", $t = "PlayStation", Qe = "Xbox", nn = pe + " " + re, an = re + " " + Pt, mt = "Windows", Hi = mt + " Phone", Hr = "Nokia", Vi = "Ouya", on = "Generic", Qa = on + " " + re.toLowerCase(), ln = on + " " + St.toLowerCase(), Gi = "Konqueror", G = "(\\d+(\\.\\d+)?)", mi = new RegExp("Version/" + G), eo = new RegExp(Qe, "i"), to = new RegExp($t + " \\w+", "i"), io = new RegExp(Ct + " \\w+", "i"), ar = new RegExp(tt + "|PlayBook|BB10", "i"), ro = { "NT3.51": "NT 3.11", "NT4.0": "NT 4.0", "5.0": "2000", 5.1: "XP", 5.2: "XP", "6.0": "Vista", 6.1: "7", 6.2: "8", 6.3: "8.1", 6.4: "10", "10.0": "10" }, so = (r, e) => e && S(e, Xs) || (function(t) {
|
|
1511
|
+
return S(t, Pt) && !S(t, He) && !S(t, pe);
|
|
1512
1512
|
})(r), cn = function(r, e) {
|
|
1513
|
-
return e = e || "", S(r, " OPR/") && S(r, "Mini") ? Za : S(r, " OPR/") ? sr : ar.test(r) ? tt : S(r, "IE" + re) || S(r, "WPDesktop") ? tn : S(r, Zs) ? Qs : S(r, nr) || S(r, "Edg/") ? rn : S(r, "FBIOS") ? "Facebook " + re : S(r, "UCWEB") || S(r, "UCBrowser") ? "UC Browser" : S(r, "CriOS") ? en : S(r, "CrMo") || S(r, He) ? He : S(r, pe) && S(r,
|
|
1514
|
-
}, no = { [tn]: [new RegExp("rv:" + G)], [rn]: [new RegExp(nr + "?\\/" + G)], [He]: [new RegExp("(" + He + "|CrMo)\\/" + G)], [en]: [new RegExp("CriOS\\/" + G)], "UC Browser": [new RegExp("(UCBrowser|UCWEB)\\/" + G)], [
|
|
1513
|
+
return e = e || "", S(r, " OPR/") && S(r, "Mini") ? Za : S(r, " OPR/") ? sr : ar.test(r) ? tt : S(r, "IE" + re) || S(r, "WPDesktop") ? tn : S(r, Zs) ? Qs : S(r, nr) || S(r, "Edg/") ? rn : S(r, "FBIOS") ? "Facebook " + re : S(r, "UCWEB") || S(r, "UCBrowser") ? "UC Browser" : S(r, "CriOS") ? en : S(r, "CrMo") || S(r, He) ? He : S(r, pe) && S(r, Pt) ? nn : S(r, "FxiOS") ? sn : S(r.toLowerCase(), Gi.toLowerCase()) ? Gi : so(r, e) ? S(r, re) ? an : Pt : S(r, Ze) ? Ze : S(r, "MSIE") || S(r, "Trident/") ? rr : S(r, "Gecko") ? Ze : "";
|
|
1514
|
+
}, no = { [tn]: [new RegExp("rv:" + G)], [rn]: [new RegExp(nr + "?\\/" + G)], [He]: [new RegExp("(" + He + "|CrMo)\\/" + G)], [en]: [new RegExp("CriOS\\/" + G)], "UC Browser": [new RegExp("(UCBrowser|UCWEB)\\/" + G)], [Pt]: [mi], [an]: [mi], [sr]: [new RegExp("(Opera|OPR)\\/" + G)], [Ze]: [new RegExp(Ze + "\\/" + G)], [sn]: [new RegExp("FxiOS\\/" + G)], [Gi]: [new RegExp("Konqueror[:/]?" + G, "i")], [tt]: [new RegExp(tt + " " + G), mi], [nn]: [new RegExp("android\\s" + G, "i")], [Qs]: [new RegExp(Zs + "\\/" + G)], [rr]: [new RegExp("(rv:|MSIE )" + G)], Mozilla: [new RegExp("rv:" + G)] }, ao = function(r, e) {
|
|
1515
1515
|
var t = cn(r, e), i = no[t];
|
|
1516
1516
|
if (v(i)) return null;
|
|
1517
1517
|
for (var s = 0; s < i.length; s++) {
|
|
@@ -1519,7 +1519,7 @@ var re = "Mobile", ti = "iOS", pe = "Android", xt = "Tablet", zs = pe + " " + xt
|
|
|
1519
1519
|
if (a) return parseFloat(a[a.length - 2]);
|
|
1520
1520
|
}
|
|
1521
1521
|
return null;
|
|
1522
|
-
}, Vr = [[new RegExp(Qe + "; " + Qe + " (.*?)[);]", "i"), (r) => [Qe, r && r[1] || ""]], [new RegExp(
|
|
1522
|
+
}, Vr = [[new RegExp(Qe + "; " + Qe + " (.*?)[);]", "i"), (r) => [Qe, r && r[1] || ""]], [new RegExp(Ct, "i"), [Ct, ""]], [new RegExp($t, "i"), [$t, ""]], [ar, [tt, ""]], [new RegExp(mt, "i"), (r, e) => {
|
|
1523
1523
|
if (/Phone/.test(e) || /WPDesktop/.test(e)) return [Hi, ""];
|
|
1524
1524
|
if (new RegExp(re).test(e) && !/IEMobile\b/.test(e)) return [mt + " " + re, ""];
|
|
1525
1525
|
var t = /Windows NT ([0-9.]+)/i.exec(e);
|
|
@@ -1551,11 +1551,11 @@ var re = "Mobile", ti = "iOS", pe = "Android", xt = "Tablet", zs = pe + " " + xt
|
|
|
1551
1551
|
}
|
|
1552
1552
|
return e;
|
|
1553
1553
|
}], [/Mac/i, ["Mac OS X", ""]], [/CrOS/, [Ja, ""]], [/Linux|debian/i, ["Linux", ""]]], Gr = function(r) {
|
|
1554
|
-
return io.test(r) ?
|
|
1555
|
-
},
|
|
1554
|
+
return io.test(r) ? Ct : to.test(r) ? $t : eo.test(r) ? Qe : new RegExp(Vi, "i").test(r) ? Vi : new RegExp("(" + Hi + "|WPDesktop)", "i").test(r) ? Hi : /iPad/.test(r) ? Ys : /iPod/.test(r) ? "iPod Touch" : /iPhone/.test(r) ? "iPhone" : /(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(r) ? Ks : ar.test(r) ? tt : /(kobo)\s(ereader|touch)/i.test(r) ? "Kobo" : new RegExp(Hr, "i").test(r) ? Hr : /(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(r) || /(kf[a-z]+)( bui|\)).+silk\//i.test(r) ? "Kindle Fire" : /(Android|ZTE)/i.test(r) ? !new RegExp(re).test(r) || /(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(r) ? /pixel[\daxl ]{1,6}/i.test(r) && !/pixel c/i.test(r) || /(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(r) || /lmy47v/i.test(r) && !/QTAQZ3/i.test(r) ? pe : zs : pe : new RegExp("(pda|" + re + ")", "i").test(r) ? Qa : new RegExp(St, "i").test(r) && !new RegExp(St + " pc", "i").test(r) ? ln : "";
|
|
1555
|
+
}, Lt = "https?://(.*)", nt = ["gclid", "gclsrc", "dclid", "gbraid", "wbraid", "fbclid", "msclkid", "twclid", "li_fat_id", "igshid", "ttclid", "rdt_cid", "epik", "qclid", "sccid", "irclid", "_kx"], oo = st(["utm_source", "utm_medium", "utm_campaign", "utm_content", "utm_term", "gad_source", "mc_cid"], nt), Tt = "<masked>", lo = ["li_fat_id"];
|
|
1556
1556
|
function un(r, e, t) {
|
|
1557
1557
|
if (!m) return {};
|
|
1558
|
-
var i, s = e ? st([], nt, t || []) : [], n = hn(
|
|
1558
|
+
var i, s = e ? st([], nt, t || []) : [], n = hn(Ft(m.URL, s, Tt), r), a = (i = {}, F(lo, (function(o) {
|
|
1559
1559
|
var l = ge.q(o);
|
|
1560
1560
|
i[o] = l || null;
|
|
1561
1561
|
})), i);
|
|
@@ -1570,7 +1570,7 @@ function hn(r, e) {
|
|
|
1570
1570
|
}
|
|
1571
1571
|
function dn(r) {
|
|
1572
1572
|
var e = (function(n) {
|
|
1573
|
-
return n ? n.search(
|
|
1573
|
+
return n ? n.search(Lt + "google.([^/?]*)") === 0 ? "google" : n.search(Lt + "bing.com") === 0 ? "bing" : n.search(Lt + "yahoo.com") === 0 ? "yahoo" : n.search(Lt + "duckduckgo.com") === 0 ? "duckduckgo" : null : null;
|
|
1574
1574
|
})(r), t = e != "yahoo" ? "q" : "p", i = {};
|
|
1575
1575
|
if (!Ee(e)) {
|
|
1576
1576
|
i.$search_engine = e;
|
|
@@ -1587,7 +1587,7 @@ function pn() {
|
|
|
1587
1587
|
}
|
|
1588
1588
|
function gn(r, e) {
|
|
1589
1589
|
var t = r ? st([], nt, e || []) : [], i = z == null ? void 0 : z.href.substring(0, 1e3);
|
|
1590
|
-
return { r: pn().substring(0, 1e3), u: i ?
|
|
1590
|
+
return { r: pn().substring(0, 1e3), u: i ? Ft(i, t, Tt) : void 0 };
|
|
1591
1591
|
}
|
|
1592
1592
|
function fn(r) {
|
|
1593
1593
|
var e, { r: t, u: i } = r, s = { $referrer: t, $referring_domain: t == null ? void 0 : t == "$direct" ? "$direct" : (e = Jt(t)) == null ? void 0 : e.host };
|
|
@@ -1621,13 +1621,13 @@ function co() {
|
|
|
1621
1621
|
function uo(r, e) {
|
|
1622
1622
|
if (!W) return {};
|
|
1623
1623
|
var t, i, s, n = r ? st([], nt, e || []) : [], [a, o] = (function(l) {
|
|
1624
|
-
for (var
|
|
1625
|
-
var [
|
|
1624
|
+
for (var c = 0; c < Vr.length; c++) {
|
|
1625
|
+
var [u, h] = Vr[c], g = u.exec(l), p = g && (Te(h) ? h(g, l) : h);
|
|
1626
1626
|
if (p) return p;
|
|
1627
1627
|
}
|
|
1628
1628
|
return ["", ""];
|
|
1629
1629
|
})(W);
|
|
1630
|
-
return A(Qi({ $os: a, $os_version: o, $browser: cn(W, navigator.vendor), $device: Gr(W), $device_type: (i = W, s = Gr(i), s === Ys || s === zs || s === "Kobo" || s === "Kindle Fire" || s === ln ?
|
|
1630
|
+
return A(Qi({ $os: a, $os_version: o, $browser: cn(W, navigator.vendor), $device: Gr(W), $device_type: (i = W, s = Gr(i), s === Ys || s === zs || s === "Kobo" || s === "Kindle Fire" || s === ln ? St : s === Ct || s === Qe || s === $t || s === Vi ? "Console" : s === Ks ? "Wearable" : s ? re : "Desktop"), $timezone: _n(), $timezone_offset: co() }), { $current_url: Ft(z == null ? void 0 : z.href, n, Tt), $host: z == null ? void 0 : z.host, $pathname: z == null ? void 0 : z.pathname, $raw_user_agent: W.length > 1e3 ? W.substring(0, 997) + "..." : W, $browser_version: ao(W, navigator.vendor), $browser_language: Wr(), $browser_language_prefix: (t = Wr(), typeof t == "string" ? t.split("-")[0] : void 0), $screen_height: d == null ? void 0 : d.screen.height, $screen_width: d == null ? void 0 : d.screen.width, $viewport_height: d == null ? void 0 : d.innerHeight, $viewport_width: d == null ? void 0 : d.innerWidth, $lib: "web", $lib_version: me.LIB_VERSION, $insert_id: Math.random().toString(36).substring(2, 10) + Math.random().toString(36).substring(2, 10), $time: Date.now() / 1e3 });
|
|
1631
1631
|
}
|
|
1632
1632
|
var Ce = U("[Web Vitals]"), zr = 9e5;
|
|
1633
1633
|
class ho {
|
|
@@ -1682,7 +1682,7 @@ class ho {
|
|
|
1682
1682
|
var e = d ? d.location.href : void 0;
|
|
1683
1683
|
if (e) {
|
|
1684
1684
|
var t = this._instance.config.mask_personal_data_properties, i = this._instance.config.custom_personal_data_properties, s = t ? st([], nt, i || []) : [];
|
|
1685
|
-
return
|
|
1685
|
+
return Ft(e, s, Tt);
|
|
1686
1686
|
}
|
|
1687
1687
|
Ce.error("Could not determine current URL");
|
|
1688
1688
|
}
|
|
@@ -1736,11 +1736,11 @@ class go {
|
|
|
1736
1736
|
d && m && (this.jt && d.removeEventListener("beforeunload", this.jt), this.Lt && m.removeEventListener("click", this.Lt, { capture: !0 }), this.Nt && m.removeEventListener("mousemove", this.Nt, { capture: !0 }), this.Ht && m.removeEventListener("visibilitychange", this.Ht), clearTimeout(this.Bt), (e = this.zt) == null || e.stop(), this.P = !1);
|
|
1737
1737
|
}
|
|
1738
1738
|
qt(e, t) {
|
|
1739
|
-
var i = this.instance.scrollManager.scrollY(), s = this.instance.scrollManager.scrollX(), n = this.instance.scrollManager.scrollElement(), a = (function(o, l,
|
|
1740
|
-
for (var
|
|
1741
|
-
if (
|
|
1742
|
-
if (S(l, d == null ? void 0 : d.getComputedStyle(
|
|
1743
|
-
|
|
1739
|
+
var i = this.instance.scrollManager.scrollY(), s = this.instance.scrollManager.scrollX(), n = this.instance.scrollManager.scrollElement(), a = (function(o, l, c) {
|
|
1740
|
+
for (var u = o; u && ai(u) && !De(u, "body"); ) {
|
|
1741
|
+
if (u === c) return !1;
|
|
1742
|
+
if (S(l, d == null ? void 0 : d.getComputedStyle(u).position)) return !0;
|
|
1743
|
+
u = Ms(u);
|
|
1744
1744
|
}
|
|
1745
1745
|
return !1;
|
|
1746
1746
|
})(Rs(e), ["fixed", "sticky"], n);
|
|
@@ -1760,7 +1760,7 @@ class go {
|
|
|
1760
1760
|
}
|
|
1761
1761
|
Wt(e) {
|
|
1762
1762
|
if (d) {
|
|
1763
|
-
var t = d.location.href, i = this.instance.config.mask_personal_data_properties, s = this.instance.config.custom_personal_data_properties, n = i ? st([], nt, s || []) : [], a =
|
|
1763
|
+
var t = d.location.href, i = this.instance.config.mask_personal_data_properties, s = this.instance.config.custom_personal_data_properties, n = i ? st([], nt, s || []) : [], a = Ft(t, n, Tt);
|
|
1764
1764
|
this.N = this.N || {}, this.N[a] || (this.N[a] = []), this.N[a].push(e);
|
|
1765
1765
|
}
|
|
1766
1766
|
}
|
|
@@ -1789,11 +1789,11 @@ class fo {
|
|
|
1789
1789
|
if (!i) return { $pageview_id: t };
|
|
1790
1790
|
var s = { $pageview_id: t, $prev_pageview_id: i.pageViewId }, n = this._instance.scrollManager.getContext();
|
|
1791
1791
|
if (n && !this._instance.config.disable_scroll_properties) {
|
|
1792
|
-
var { maxScrollHeight: a, lastScrollY: o, maxScrollY: l, maxContentHeight:
|
|
1793
|
-
if (!(v(a) || v(o) || v(l) || v(
|
|
1794
|
-
a = Math.ceil(a), o = Math.ceil(o), l = Math.ceil(l),
|
|
1795
|
-
var g = a <= 1 ? 1 : de(o / a, 0, 1, y), p = a <= 1 ? 1 : de(l / a, 0, 1, y), f =
|
|
1796
|
-
s = A(s, { $prev_pageview_last_scroll: o, $prev_pageview_last_scroll_percentage: g, $prev_pageview_max_scroll: l, $prev_pageview_max_scroll_percentage: p, $prev_pageview_last_content:
|
|
1792
|
+
var { maxScrollHeight: a, lastScrollY: o, maxScrollY: l, maxContentHeight: c, lastContentY: u, maxContentY: h } = n;
|
|
1793
|
+
if (!(v(a) || v(o) || v(l) || v(c) || v(u) || v(h))) {
|
|
1794
|
+
a = Math.ceil(a), o = Math.ceil(o), l = Math.ceil(l), c = Math.ceil(c), u = Math.ceil(u), h = Math.ceil(h);
|
|
1795
|
+
var g = a <= 1 ? 1 : de(o / a, 0, 1, y), p = a <= 1 ? 1 : de(l / a, 0, 1, y), f = c <= 1 ? 1 : de(u / c, 0, 1, y), _ = c <= 1 ? 1 : de(h / c, 0, 1, y);
|
|
1796
|
+
s = A(s, { $prev_pageview_last_scroll: o, $prev_pageview_last_scroll_percentage: g, $prev_pageview_max_scroll: l, $prev_pageview_max_scroll_percentage: p, $prev_pageview_last_content: u, $prev_pageview_last_content_percentage: f, $prev_pageview_max_content: h, $prev_pageview_max_content_percentage: _ });
|
|
1797
1797
|
}
|
|
1798
1798
|
}
|
|
1799
1799
|
return i.pathname && (s.$prev_pageview_pathname = i.pathname), i.timestamp && (s.$prev_pageview_duration = (e.getTime() - i.timestamp.getTime()) / 1e3), s;
|
|
@@ -1810,7 +1810,7 @@ for (var Kr = vn(lr, 0)[1], yn = new X(32768), R = 0; R < 32768; ++R) {
|
|
|
1810
1810
|
var Ue = (43690 & R) >>> 1 | (21845 & R) << 1;
|
|
1811
1811
|
Ue = (61680 & (Ue = (52428 & Ue) >>> 2 | (13107 & Ue) << 2)) >>> 4 | (3855 & Ue) << 4, yn[R] = ((65280 & Ue) >>> 8 | (255 & Ue) << 8) >>> 1;
|
|
1812
1812
|
}
|
|
1813
|
-
var
|
|
1813
|
+
var Et = function(r, e, t) {
|
|
1814
1814
|
for (var i = r.length, s = 0, n = new X(e); s < i; ++s) ++n[r[s] - 1];
|
|
1815
1815
|
var a, o = new X(e);
|
|
1816
1816
|
for (s = 0; s < e; ++s) o[s] = o[s - 1] + n[s - 1] << 1;
|
|
@@ -1823,7 +1823,7 @@ for (R = 256; R < 280; ++R) Ve[R] = 7;
|
|
|
1823
1823
|
for (R = 280; R < 288; ++R) Ve[R] = 8;
|
|
1824
1824
|
var ii = new se(32);
|
|
1825
1825
|
for (R = 0; R < 32; ++R) ii[R] = 5;
|
|
1826
|
-
var vo =
|
|
1826
|
+
var vo = Et(Ve, 9), mo = Et(ii, 5), bn = function(r) {
|
|
1827
1827
|
return (r / 8 >> 0) + (7 & r && 1);
|
|
1828
1828
|
}, wn = function(r, e, t) {
|
|
1829
1829
|
(t == null || t > r.length) && (t = r.length);
|
|
@@ -1848,11 +1848,11 @@ var vo = wt(Ve, 9), mo = wt(ii, 5), bn = function(r) {
|
|
|
1848
1848
|
t.sort((function(M, ne) {
|
|
1849
1849
|
return M.f - ne.f;
|
|
1850
1850
|
})), t.push({ s: -1, f: 25001 });
|
|
1851
|
-
var o = t[0], l = t[1],
|
|
1852
|
-
for (t[0] = { s: -1, f: o.f + l.f, l: o, r: l };
|
|
1851
|
+
var o = t[0], l = t[1], c = 0, u = 1, h = 2;
|
|
1852
|
+
for (t[0] = { s: -1, f: o.f + l.f, l: o, r: l }; u != s - 1; ) o = t[t[c].f < t[h].f ? c++ : h++], l = t[c != u && t[c].f < t[h].f ? c++ : h++], t[u++] = { s: -1, f: o.f + l.f, l: o, r: l };
|
|
1853
1853
|
var g = n[0].s;
|
|
1854
1854
|
for (i = 1; i < s; ++i) n[i].s > g && (g = n[i].s);
|
|
1855
|
-
var p = new X(g + 1), f = zi(t[
|
|
1855
|
+
var p = new X(g + 1), f = zi(t[u - 1], p, 0);
|
|
1856
1856
|
if (f > e) {
|
|
1857
1857
|
i = 0;
|
|
1858
1858
|
var _ = 0, b = f - e, E = 1 << b;
|
|
@@ -1901,32 +1901,32 @@ var vo = wt(Ve, 9), mo = wt(ii, 5), bn = function(r) {
|
|
|
1901
1901
|
r[s] = 255 & i, r[s + 1] = i >>> 8, r[s + 2] = 255 ^ r[s], r[s + 3] = 255 ^ r[s + 1];
|
|
1902
1902
|
for (var n = 0; n < i; ++n) r[s + n + 4] = t[n];
|
|
1903
1903
|
return 8 * (s + 4 + i);
|
|
1904
|
-
}, Zr = function(r, e, t, i, s, n, a, o, l,
|
|
1905
|
-
ve(e,
|
|
1904
|
+
}, Zr = function(r, e, t, i, s, n, a, o, l, c, u) {
|
|
1905
|
+
ve(e, u++, t), ++s[256];
|
|
1906
1906
|
for (var h = yi(s, 15), g = h[0], p = h[1], f = yi(n, 15), _ = f[0], b = f[1], E = Jr(g), x = E[0], $ = E[1], P = Jr(_), M = P[0], ne = P[1], K = new X(19), C = 0; C < x.length; ++C) K[31 & x[C]]++;
|
|
1907
1907
|
for (C = 0; C < M.length; ++C) K[31 & M[C]]++;
|
|
1908
1908
|
for (var le = yi(K, 7), J = le[0], ae = le[1], ee = 19; ee > 4 && !J[Xr[ee - 1]]; --ee) ;
|
|
1909
|
-
var _e, ce, ue, Ge, ke =
|
|
1910
|
-
if (ke <= Le && ke <= he) return Yi(e,
|
|
1911
|
-
if (ve(e,
|
|
1912
|
-
_e =
|
|
1913
|
-
var xe =
|
|
1914
|
-
for (ve(e,
|
|
1915
|
-
|
|
1909
|
+
var _e, ce, ue, Ge, ke = c + 5 << 3, Le = ht(s, Ve) + ht(n, ii) + a, he = ht(s, g) + ht(n, _) + a + 14 + 3 * ee + ht(K, J) + (2 * K[16] + 3 * K[17] + 7 * K[18]);
|
|
1910
|
+
if (ke <= Le && ke <= he) return Yi(e, u, r.subarray(l, l + c));
|
|
1911
|
+
if (ve(e, u, 1 + (he < Le)), u += 2, he < Le) {
|
|
1912
|
+
_e = Et(g, p), ce = g, ue = Et(_, b), Ge = _;
|
|
1913
|
+
var xe = Et(J, ae);
|
|
1914
|
+
for (ve(e, u, $ - 257), ve(e, u + 5, ne - 1), ve(e, u + 10, ee - 4), u += 14, C = 0; C < ee; ++C) ve(e, u + 3 * C, J[Xr[C]]);
|
|
1915
|
+
u += 3 * ee;
|
|
1916
1916
|
for (var We = [x, M], V = 0; V < 2; ++V) {
|
|
1917
1917
|
var te = We[V];
|
|
1918
1918
|
for (C = 0; C < te.length; ++C) {
|
|
1919
1919
|
var Z = 31 & te[C];
|
|
1920
|
-
ve(e,
|
|
1920
|
+
ve(e, u, xe[Z]), u += J[Z], Z > 15 && (ve(e, u, te[C] >>> 5 & 127), u += te[C] >>> 12);
|
|
1921
1921
|
}
|
|
1922
1922
|
}
|
|
1923
1923
|
} else _e = vo, ce = Ve, ue = mo, Ge = ii;
|
|
1924
1924
|
for (C = 0; C < o; ++C) if (i[C] > 255) {
|
|
1925
|
-
Z = i[C] >>> 18 & 31, ut(e,
|
|
1925
|
+
Z = i[C] >>> 18 & 31, ut(e, u, _e[Z + 257]), u += ce[Z + 257], Z > 7 && (ve(e, u, i[C] >>> 23 & 31), u += or[Z]);
|
|
1926
1926
|
var ze = 31 & i[C];
|
|
1927
|
-
ut(e,
|
|
1928
|
-
} else ut(e,
|
|
1929
|
-
return ut(e,
|
|
1927
|
+
ut(e, u, ue[ze]), u += Ge[ze], ze > 3 && (ut(e, u, i[C] >>> 5 & 8191), u += lr[ze]);
|
|
1928
|
+
} else ut(e, u, _e[i[C]]), u += ce[i[C]];
|
|
1929
|
+
return ut(e, u, _e[256]), u + ce[256];
|
|
1930
1930
|
}, yo = new it([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), bo = (function() {
|
|
1931
1931
|
for (var r = new it(256), e = 0; e < 256; ++e) {
|
|
1932
1932
|
for (var t = e, i = 9; --i; ) t = (1 & t && 3988292384) ^ t >>> 1;
|
|
@@ -1934,11 +1934,11 @@ var vo = wt(Ve, 9), mo = wt(ii, 5), bn = function(r) {
|
|
|
1934
1934
|
}
|
|
1935
1935
|
return r;
|
|
1936
1936
|
})(), wo = function(r, e, t, i, s) {
|
|
1937
|
-
return (function(n, a, o, l,
|
|
1938
|
-
var h = n.length, g = new se(l + h + 5 * (1 + Math.floor(h / 7e3)) +
|
|
1937
|
+
return (function(n, a, o, l, c, u) {
|
|
1938
|
+
var h = n.length, g = new se(l + h + 5 * (1 + Math.floor(h / 7e3)) + c), p = g.subarray(l, g.length - c), f = 0;
|
|
1939
1939
|
if (!a || h < 8) for (var _ = 0; _ <= h; _ += 65535) {
|
|
1940
1940
|
var b = _ + 65535;
|
|
1941
|
-
b < h ? f = Yi(p, f, n.subarray(_, b)) : (p[_] =
|
|
1941
|
+
b < h ? f = Yi(p, f, n.subarray(_, b)) : (p[_] = u, f = Yi(p, f, n.subarray(_, h)));
|
|
1942
1942
|
}
|
|
1943
1943
|
else {
|
|
1944
1944
|
for (var E = yo[a - 1], x = E >>> 13, $ = 8191 & E, P = (1 << o) - 1, M = new X(32768), ne = new X(P + 1), K = Math.ceil(o / 3), C = 2 * K, le = function(ci) {
|
|
@@ -1974,9 +1974,9 @@ var vo = wt(Ve, 9), mo = wt(ii, 5), bn = function(r) {
|
|
|
1974
1974
|
} else J[ue++] = n[_], ++ae[n[_]];
|
|
1975
1975
|
}
|
|
1976
1976
|
}
|
|
1977
|
-
f = Zr(n, p,
|
|
1977
|
+
f = Zr(n, p, u, J, ae, ee, ce, ue, ke, _ - ke, f);
|
|
1978
1978
|
}
|
|
1979
|
-
return wn(g, 0, l + bn(f) +
|
|
1979
|
+
return wn(g, 0, l + bn(f) + c);
|
|
1980
1980
|
})(r, e.level == null ? 6 : e.level, e.mem == null ? Math.ceil(1.5 * Math.max(8, Math.min(13, Math.log(r.length)))) : 12 + e.mem, t, i, !0);
|
|
1981
1981
|
}, bi = function(r, e, t) {
|
|
1982
1982
|
for (; t; ++e) r[e] = t, t >>>= 8;
|
|
@@ -1986,8 +1986,8 @@ function Eo(r, e) {
|
|
|
1986
1986
|
var t = /* @__PURE__ */ (function() {
|
|
1987
1987
|
var o = 4294967295;
|
|
1988
1988
|
return { p: function(l) {
|
|
1989
|
-
for (var
|
|
1990
|
-
o =
|
|
1989
|
+
for (var c = o, u = 0; u < l.length; ++u) c = bo[255 & c ^ l[u]] ^ c >>> 8;
|
|
1990
|
+
o = c;
|
|
1991
1991
|
}, d: function() {
|
|
1992
1992
|
return 4294967295 ^ o;
|
|
1993
1993
|
} };
|
|
@@ -1995,10 +1995,10 @@ function Eo(r, e) {
|
|
|
1995
1995
|
t.p(r);
|
|
1996
1996
|
var s, n = wo(r, e, 10 + ((s = e).filename && s.filename.length + 1 || 0), 8), a = n.length;
|
|
1997
1997
|
return (function(o, l) {
|
|
1998
|
-
var
|
|
1999
|
-
if (o[0] = 31, o[1] = 139, o[2] = 8, o[8] = l.level < 2 ? 4 : l.level == 9 ? 2 : 0, o[9] = 3, l.mtime != 0 && bi(o, 4, Math.floor(new Date(l.mtime || Date.now()) / 1e3)),
|
|
1998
|
+
var c = l.filename;
|
|
1999
|
+
if (o[0] = 31, o[1] = 139, o[2] = 8, o[8] = l.level < 2 ? 4 : l.level == 9 ? 2 : 0, o[9] = 3, l.mtime != 0 && bi(o, 4, Math.floor(new Date(l.mtime || Date.now()) / 1e3)), c) {
|
|
2000
2000
|
o[3] = 8;
|
|
2001
|
-
for (var
|
|
2001
|
+
for (var u = 0; u <= c.length; ++u) o[u + 10] = c.charCodeAt(u);
|
|
2002
2002
|
}
|
|
2003
2003
|
})(n, e), bi(n, a - 8, t.d()), bi(n, a - 4, i), n;
|
|
2004
2004
|
}
|
|
@@ -2014,8 +2014,8 @@ var ko = function(r) {
|
|
|
2014
2014
|
}, xo = !!Ii || !!$i, Qr = "text/plain", ri = function(r, e, t) {
|
|
2015
2015
|
var i;
|
|
2016
2016
|
t === void 0 && (t = !0);
|
|
2017
|
-
var [s, n] = r.split("?"), a = w({}, e), o = (i = n == null ? void 0 : n.split("&").map(((
|
|
2018
|
-
var
|
|
2017
|
+
var [s, n] = r.split("?"), a = w({}, e), o = (i = n == null ? void 0 : n.split("&").map(((c) => {
|
|
2018
|
+
var u, [h, g] = c.split("="), p = t && (u = a[h]) !== null && u !== void 0 ? u : g;
|
|
2019
2019
|
return delete a[h], h + "=" + p;
|
|
2020
2020
|
}))) !== null && i !== void 0 ? i : [], l = $a(a);
|
|
2021
2021
|
return l && o.push(l), s + "?" + o.join("&");
|
|
@@ -2023,18 +2023,18 @@ var ko = function(r) {
|
|
|
2023
2023
|
var { data: e, compression: t } = r;
|
|
2024
2024
|
if (e) {
|
|
2025
2025
|
if (t === we.GZipJS) {
|
|
2026
|
-
var i = Eo((function(l,
|
|
2027
|
-
var
|
|
2026
|
+
var i = Eo((function(l, c) {
|
|
2027
|
+
var u = l.length;
|
|
2028
2028
|
if (typeof TextEncoder < "u") return new TextEncoder().encode(l);
|
|
2029
2029
|
for (var h = new se(l.length + (l.length >>> 1)), g = 0, p = function(E) {
|
|
2030
2030
|
h[g++] = E;
|
|
2031
|
-
}, f = 0; f <
|
|
2031
|
+
}, f = 0; f < u; ++f) {
|
|
2032
2032
|
if (g + 5 > h.length) {
|
|
2033
|
-
var _ = new se(g + 8 + (
|
|
2033
|
+
var _ = new se(g + 8 + (u - f << 1));
|
|
2034
2034
|
_.set(h), h = _;
|
|
2035
2035
|
}
|
|
2036
2036
|
var b = l.charCodeAt(f);
|
|
2037
|
-
b < 128 ||
|
|
2037
|
+
b < 128 || c ? p(b) : b < 2048 ? (p(192 | b >>> 6), p(128 | 63 & b)) : b > 55295 && b < 57344 ? (p(240 | (b = 65536 + (1047552 & b) | 1023 & l.charCodeAt(++f)) >>> 18), p(128 | b >>> 12 & 63), p(128 | b >>> 6 & 63), p(128 | 63 & b)) : (p(224 | b >>> 12), p(128 | b >>> 6 & 63), p(128 | 63 & b));
|
|
2038
2038
|
}
|
|
2039
2039
|
return wn(h, 0, g);
|
|
2040
2040
|
})(yt(e)), { mtime: 0 }), s = new Blob([i], { type: Qr });
|
|
@@ -2042,11 +2042,11 @@ var ko = function(r) {
|
|
|
2042
2042
|
}
|
|
2043
2043
|
if (t === we.Base64) {
|
|
2044
2044
|
var n = (function(l) {
|
|
2045
|
-
var
|
|
2045
|
+
var c, u, h, g, p, f = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", _ = 0, b = 0, E = "", x = [];
|
|
2046
2046
|
if (!l) return l;
|
|
2047
2047
|
l = ko(l);
|
|
2048
2048
|
do
|
|
2049
|
-
|
|
2049
|
+
c = (p = l.charCodeAt(_++) << 16 | l.charCodeAt(_++) << 8 | l.charCodeAt(_++)) >> 18 & 63, u = p >> 12 & 63, h = p >> 6 & 63, g = 63 & p, x[b++] = f.charAt(c) + f.charAt(u) + f.charAt(h) + f.charAt(g);
|
|
2050
2050
|
while (_ < l.length);
|
|
2051
2051
|
switch (E = x.join(""), l.length % 3) {
|
|
2052
2052
|
case 1:
|
|
@@ -2062,29 +2062,29 @@ var ko = function(r) {
|
|
|
2062
2062
|
var o = yt(e);
|
|
2063
2063
|
return { contentType: "application/json", body: o, estimatedSize: new Blob([o]).size };
|
|
2064
2064
|
}
|
|
2065
|
-
},
|
|
2066
|
-
$i &&
|
|
2065
|
+
}, qt = [];
|
|
2066
|
+
$i && qt.push({ transport: "fetch", method: (r) => {
|
|
2067
2067
|
var e, t, { contentType: i, body: s, estimatedSize: n } = (e = wi(r)) !== null && e !== void 0 ? e : {}, a = new Headers();
|
|
2068
|
-
F(r.headers, (function(
|
|
2069
|
-
a.append(h,
|
|
2068
|
+
F(r.headers, (function(u, h) {
|
|
2069
|
+
a.append(h, u);
|
|
2070
2070
|
})), i && a.append("Content-Type", i);
|
|
2071
2071
|
var o = r.url, l = null;
|
|
2072
2072
|
if (mr) {
|
|
2073
|
-
var
|
|
2074
|
-
l = { signal:
|
|
2073
|
+
var c = new mr();
|
|
2074
|
+
l = { signal: c.signal, timeout: setTimeout((() => c.abort()), r.timeout) };
|
|
2075
2075
|
}
|
|
2076
|
-
$i(o, w({ method: (r == null ? void 0 : r.method) || "GET", headers: a, keepalive: r.method === "POST" && (n || 0) < 52428.8, body: s, signal: (t = l) == null ? void 0 : t.signal }, r.fetchOptions)).then(((
|
|
2077
|
-
var g = { statusCode:
|
|
2078
|
-
if (
|
|
2076
|
+
$i(o, w({ method: (r == null ? void 0 : r.method) || "GET", headers: a, keepalive: r.method === "POST" && (n || 0) < 52428.8, body: s, signal: (t = l) == null ? void 0 : t.signal }, r.fetchOptions)).then(((u) => u.text().then(((h) => {
|
|
2077
|
+
var g = { statusCode: u.status, text: h };
|
|
2078
|
+
if (u.status === 200) try {
|
|
2079
2079
|
g.json = JSON.parse(h);
|
|
2080
2080
|
} catch (p) {
|
|
2081
2081
|
y.error(p);
|
|
2082
2082
|
}
|
|
2083
2083
|
r.callback == null || r.callback(g);
|
|
2084
|
-
})))).catch(((
|
|
2085
|
-
y.error(
|
|
2084
|
+
})))).catch(((u) => {
|
|
2085
|
+
y.error(u), r.callback == null || r.callback({ statusCode: 0, text: u });
|
|
2086
2086
|
})).finally((() => l ? clearTimeout(l.timeout) : null));
|
|
2087
|
-
} }), Ii &&
|
|
2087
|
+
} }), Ii && qt.push({ transport: "XHR", method: (r) => {
|
|
2088
2088
|
var e, t = new Ii();
|
|
2089
2089
|
t.open(r.method || "GET", r.url, !0);
|
|
2090
2090
|
var { contentType: i, body: s } = (e = wi(r)) !== null && e !== void 0 ? e : {};
|
|
@@ -2100,7 +2100,7 @@ $i && Ut.push({ transport: "fetch", method: (r) => {
|
|
|
2100
2100
|
r.callback == null || r.callback(n);
|
|
2101
2101
|
}
|
|
2102
2102
|
}, t.send(s);
|
|
2103
|
-
} }), Q != null && Q.sendBeacon &&
|
|
2103
|
+
} }), Q != null && Q.sendBeacon && qt.push({ transport: "sendBeacon", method: (r) => {
|
|
2104
2104
|
var e = ri(r.url, { beacon: "1" });
|
|
2105
2105
|
try {
|
|
2106
2106
|
var t, { contentType: i, body: s } = (t = wi(r)) !== null && t !== void 0 ? t : {}, n = typeof s == "string" ? new Blob([s], { type: i }) : s;
|
|
@@ -2126,7 +2126,7 @@ var rt = function(r, e) {
|
|
|
2126
2126
|
function es(r, e, t) {
|
|
2127
2127
|
return yt({ distinct_id: r, userPropertiesToSet: e, userPropertiesToSetOnce: t });
|
|
2128
2128
|
}
|
|
2129
|
-
var En = { exact: (r, e) => e.some(((t) => r.some(((i) => t === i)))), is_not: (r, e) => e.every(((t) => r.every(((i) => t !== i)))), regex: (r, e) => e.some(((t) => r.some(((i) => rt(t, i))))), not_regex: (r, e) => e.every(((t) => r.every(((i) => !rt(t, i))))), icontains: (r, e) => e.map(
|
|
2129
|
+
var En = { exact: (r, e) => e.some(((t) => r.some(((i) => t === i)))), is_not: (r, e) => e.every(((t) => r.every(((i) => t !== i)))), regex: (r, e) => e.some(((t) => r.some(((i) => rt(t, i))))), not_regex: (r, e) => e.every(((t) => r.every(((i) => !rt(t, i))))), icontains: (r, e) => e.map(Nt).some(((t) => r.map(Nt).some(((i) => t.includes(i))))), not_icontains: (r, e) => e.map(Nt).every(((t) => r.map(Nt).every(((i) => !t.includes(i))))) }, Nt = (r) => r.toLowerCase(), Ei = U("[Error tracking]");
|
|
2130
2130
|
class So {
|
|
2131
2131
|
constructor(e) {
|
|
2132
2132
|
var t, i;
|
|
@@ -2160,8 +2160,8 @@ class So {
|
|
|
2160
2160
|
}), { $exception_types: [], $exception_values: [] });
|
|
2161
2161
|
return this.Jt.some(((i) => {
|
|
2162
2162
|
var s = i.values.map(((n) => {
|
|
2163
|
-
var a, o = En[n.operator], l = T(n.value) ? n.value : [n.value],
|
|
2164
|
-
return l.length > 0 && o(l,
|
|
2163
|
+
var a, o = En[n.operator], l = T(n.value) ? n.value : [n.value], c = (a = t[n.key]) !== null && a !== void 0 ? a : [];
|
|
2164
|
+
return l.length > 0 && o(l, c);
|
|
2165
2165
|
}));
|
|
2166
2166
|
return i.type === "OR" ? s.some(Boolean) : s.every(Boolean);
|
|
2167
2167
|
}));
|
|
@@ -2185,7 +2185,7 @@ class So {
|
|
|
2185
2185
|
}
|
|
2186
2186
|
var oe = U("[FeatureFlags]"), ki = "$active_feature_flags", Ye = "$override_feature_flags", ts = "$feature_flag_payloads", dt = "$override_feature_flag_payloads", is = "$feature_flag_request_id", rs = (r) => {
|
|
2187
2187
|
var e = {};
|
|
2188
|
-
for (var [t, i] of
|
|
2188
|
+
for (var [t, i] of Ut(r || {})) i && (e[t] = i);
|
|
2189
2189
|
return e;
|
|
2190
2190
|
}, Po = (r) => {
|
|
2191
2191
|
var e = r.flags;
|
|
@@ -2234,8 +2234,8 @@ class $o {
|
|
|
2234
2234
|
if (!i && !t) return e || {};
|
|
2235
2235
|
var s = A({}, e || {}), n = [.../* @__PURE__ */ new Set([...Object.keys(i || {}), ...Object.keys(t || {})])];
|
|
2236
2236
|
for (var a of n) {
|
|
2237
|
-
var o, l,
|
|
2238
|
-
h !== (
|
|
2237
|
+
var o, l, c = s[a], u = t == null ? void 0 : t[a], h = v(u) ? (o = c == null ? void 0 : c.enabled) !== null && o !== void 0 && o : !!u, g = v(u) ? c.variant : typeof u == "string" ? u : void 0, p = i == null ? void 0 : i[a], f = w({}, c, { enabled: h, variant: h ? g ?? (c == null ? void 0 : c.variant) : void 0 });
|
|
2238
|
+
h !== (c == null ? void 0 : c.enabled) && (f.original_enabled = c == null ? void 0 : c.enabled), g !== (c == null ? void 0 : c.variant) && (f.original_variant = c == null ? void 0 : c.variant), p && (f.metadata = w({}, c == null ? void 0 : c.metadata, { payload: p, original_payload: c == null || (l = c.metadata) == null ? void 0 : l.payload })), s[a] = f;
|
|
2239
2239
|
}
|
|
2240
2240
|
return this.ii || (oe.warn(" Overriding feature flag details!", { flagDetails: e, overriddenPayloads: i, finalDetails: s }), this.ii = !0), s;
|
|
2241
2241
|
}
|
|
@@ -2276,8 +2276,8 @@ class $o {
|
|
|
2276
2276
|
(e != null && e.disableFlags || this._instance.config.advanced_disable_feature_flags) && (i.disable_flags = !0), this.ui() && (i.evaluation_environments = this.li());
|
|
2277
2277
|
var s = this._instance.config.__preview_remote_config, n = s ? "/flags/?v=2" : "/flags/?v=2&config=true", a = this._instance.config.advanced_only_evaluate_survey_feature_flags ? "&only_evaluate_survey_feature_flags=true" : "", o = this._instance.requestRouter.endpointFor("flags", n + a);
|
|
2278
2278
|
s && (i.timezone = _n()), this.ri = !0, this._instance.ci({ method: "POST", url: o, data: i, compression: this._instance.config.disable_compression ? void 0 : we.Base64, timeout: this._instance.config.feature_flag_request_timeout_ms, callback: (l) => {
|
|
2279
|
-
var
|
|
2280
|
-
if (l.statusCode === 200 && (this.ni || (this.$anon_distinct_id = void 0), h = !1), this.ri = !1, this.oi || (this.oi = !0, this._instance.fi((
|
|
2279
|
+
var c, u, h = !0;
|
|
2280
|
+
if (l.statusCode === 200 && (this.ni || (this.$anon_distinct_id = void 0), h = !1), this.ri = !1, this.oi || (this.oi = !0, this._instance.fi((u = l.json) !== null && u !== void 0 ? u : {})), !i.disable_flags || this.ni) if (this.ai = !h, l.json && (c = l.json.quotaLimited) != null && c.includes(Co.FeatureFlags)) oe.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more.");
|
|
2281
2281
|
else {
|
|
2282
2282
|
var g;
|
|
2283
2283
|
i.disable_flags || this.receivedFeatureFlags((g = l.json) !== null && g !== void 0 ? g : {}, h), this.ni && (this.ni = !1, this.di());
|
|
@@ -2289,10 +2289,10 @@ class $o {
|
|
|
2289
2289
|
if (t === void 0 && (t = {}), this.ei || this.getFlags() && this.getFlags().length > 0) {
|
|
2290
2290
|
var i = this.getFlagVariants()[e], s = "" + i, n = this._instance.get_property(is) || void 0, a = this._instance.get_property(zt) || {};
|
|
2291
2291
|
if ((t.send_event || !("send_event" in t)) && (!(e in a) || !a[e].includes(s))) {
|
|
2292
|
-
var o, l,
|
|
2292
|
+
var o, l, c, u, h, g, p, f, _;
|
|
2293
2293
|
T(a[e]) ? a[e].push(s) : a[e] = [s], (o = this._instance.persistence) == null || o.register({ [zt]: a });
|
|
2294
|
-
var b = this.getFeatureFlagDetails(e), E = { $feature_flag: e, $feature_flag_response: i, $feature_flag_payload: this.getFeatureFlagPayload(e) || null, $feature_flag_request_id: n, $feature_flag_bootstrapped_response: ((l = this._instance.config.bootstrap) == null || (l = l.featureFlags) == null ? void 0 : l[e]) || null, $feature_flag_bootstrapped_payload: ((
|
|
2295
|
-
v(b == null || (
|
|
2294
|
+
var b = this.getFeatureFlagDetails(e), E = { $feature_flag: e, $feature_flag_response: i, $feature_flag_payload: this.getFeatureFlagPayload(e) || null, $feature_flag_request_id: n, $feature_flag_bootstrapped_response: ((l = this._instance.config.bootstrap) == null || (l = l.featureFlags) == null ? void 0 : l[e]) || null, $feature_flag_bootstrapped_payload: ((c = this._instance.config.bootstrap) == null || (c = c.featureFlagPayloads) == null ? void 0 : c[e]) || null, $used_bootstrap_value: !this.ai };
|
|
2295
|
+
v(b == null || (u = b.metadata) == null ? void 0 : u.version) || (E.$feature_flag_version = b.metadata.version);
|
|
2296
2296
|
var x, $ = (h = b == null || (g = b.reason) == null ? void 0 : g.description) !== null && h !== void 0 ? h : b == null || (p = b.reason) == null ? void 0 : p.code;
|
|
2297
2297
|
$ && (E.$feature_flag_reason = $), b != null && (f = b.metadata) != null && f.id && (E.$feature_flag_id = b.metadata.id), v(b == null ? void 0 : b.original_variant) && v(b == null ? void 0 : b.original_enabled) || (E.$feature_flag_original_response = v(b.original_variant) ? b.original_enabled : b.original_variant), b != null && (_ = b.metadata) != null && _.original_payload && (E.$feature_flag_original_payload = b == null || (x = b.metadata) == null ? void 0 : x.original_payload), this._instance.capture("$feature_flag_called", E);
|
|
2298
2298
|
}
|
|
@@ -2330,8 +2330,8 @@ class $o {
|
|
|
2330
2330
|
if (this._instance.persistence) {
|
|
2331
2331
|
this.ei = !0;
|
|
2332
2332
|
var i = this.getFlagVariants(), s = this.getFlagPayloads(), n = this.getFlagsWithDetails();
|
|
2333
|
-
(function(a, o, l,
|
|
2334
|
-
l === void 0 && (l = {}),
|
|
2333
|
+
(function(a, o, l, c, u) {
|
|
2334
|
+
l === void 0 && (l = {}), c === void 0 && (c = {}), u === void 0 && (u = {});
|
|
2335
2335
|
var h = Po(a), g = h.flags, p = h.featureFlags, f = h.featureFlagPayloads;
|
|
2336
2336
|
if (p) {
|
|
2337
2337
|
var _ = a.requestId;
|
|
@@ -2342,7 +2342,7 @@ class $o {
|
|
|
2342
2342
|
o && o.register({ [ki]: p, [Je]: b });
|
|
2343
2343
|
} else {
|
|
2344
2344
|
var x = p, $ = f, P = g;
|
|
2345
|
-
a.errorsWhileComputingFlags && (x = w({}, l, x), $ = w({},
|
|
2345
|
+
a.errorsWhileComputingFlags && (x = w({}, l, x), $ = w({}, c, $), P = w({}, u, P)), o && o.register(w({ [ki]: Object.keys(rs(x)), [Je]: x || {}, [ts]: $ || {}, [Ai]: P || {} }, _ ? { [is]: _ } : {}));
|
|
2346
2346
|
}
|
|
2347
2347
|
}
|
|
2348
2348
|
})(e, this._instance.persistence, i, s, n), this.pi(t);
|
|
@@ -2375,7 +2375,7 @@ class $o {
|
|
|
2375
2375
|
return () => this.removeFeatureFlagsHandler(e);
|
|
2376
2376
|
}
|
|
2377
2377
|
updateEarlyAccessFeatureEnrollment(e, t, i) {
|
|
2378
|
-
var s, n = (this._instance.get_property(_t) || []).find(((
|
|
2378
|
+
var s, n = (this._instance.get_property(_t) || []).find(((c) => c.flagKey === e)), a = { ["$feature_enrollment/" + e]: t }, o = { $feature_flag: e, $feature_enrollment: t, $set: a };
|
|
2379
2379
|
n && (o.$early_access_feature_name = n.name), i && (o.$feature_enrollment_stage = i), this._instance.capture("$feature_enrollment_update", o), this.setPersonPropertiesForFlags(a, !1);
|
|
2380
2380
|
var l = w({}, this.getFlagVariants(), { [e]: t });
|
|
2381
2381
|
(s = this._instance.persistence) == null || s.register({ [ki]: Object.keys(rs(l)), [Je]: l }), this.pi();
|
|
@@ -2387,8 +2387,8 @@ class $o {
|
|
|
2387
2387
|
this._instance.ci({ url: this._instance.requestRouter.endpointFor("api", "/api/early_access_features/?token=" + this._instance.config.token + n), method: "GET", callback: (a) => {
|
|
2388
2388
|
var o, l;
|
|
2389
2389
|
if (a.json) {
|
|
2390
|
-
var
|
|
2391
|
-
return (o = this._instance.persistence) == null || o.unregister(_t), (l = this._instance.persistence) == null || l.register({ [_t]:
|
|
2390
|
+
var c = a.json.earlyAccessFeatures;
|
|
2391
|
+
return (o = this._instance.persistence) == null || o.unregister(_t), (l = this._instance.persistence) == null || l.register({ [_t]: c }), e(c);
|
|
2392
2392
|
}
|
|
2393
2393
|
} });
|
|
2394
2394
|
}
|
|
@@ -2439,14 +2439,14 @@ class xi {
|
|
|
2439
2439
|
bi(e) {
|
|
2440
2440
|
Io.indexOf(e.persistence.toLowerCase()) === -1 && (y.critical("Unknown persistence type " + e.persistence + "; falling back to localStorage+cookie"), e.persistence = "localStorage+cookie");
|
|
2441
2441
|
var t = e.persistence.toLowerCase();
|
|
2442
|
-
return t === "localstorage" && D.H() ? D : t === "localstorage+cookie" &&
|
|
2442
|
+
return t === "localstorage" && D.H() ? D : t === "localstorage+cookie" && Dt.H() ? Dt : t === "sessionstorage" && q.H() ? q : t === "memory" ? Ua : t === "cookie" ? ge : Dt.H() ? Dt : ge;
|
|
2443
2443
|
}
|
|
2444
2444
|
properties() {
|
|
2445
2445
|
var e = {};
|
|
2446
2446
|
return F(this.props, (function(t, i) {
|
|
2447
2447
|
if (i === Je && j(t)) for (var s = Object.keys(t), n = 0; n < s.length; n++) e["$feature/" + s[n]] = t[s[n]];
|
|
2448
|
-
else o = i, l = !1, (Ee(a = ma) ? l : vr && a.indexOf === vr ? a.indexOf(o) != -1 : (F(a, (function(
|
|
2449
|
-
if (l || (l =
|
|
2448
|
+
else o = i, l = !1, (Ee(a = ma) ? l : vr && a.indexOf === vr ? a.indexOf(o) != -1 : (F(a, (function(c) {
|
|
2449
|
+
if (l || (l = c === o)) return Gt;
|
|
2450
2450
|
})), l)) || (e[i] = t);
|
|
2451
2451
|
var a, o, l;
|
|
2452
2452
|
})), e;
|
|
@@ -2510,8 +2510,8 @@ class xi {
|
|
|
2510
2510
|
var e = {};
|
|
2511
2511
|
F([ji, qi], ((a) => {
|
|
2512
2512
|
var o = this.props[a];
|
|
2513
|
-
o && F(o, (function(l,
|
|
2514
|
-
e["$initial_" + Fi(
|
|
2513
|
+
o && F(o, (function(l, c) {
|
|
2514
|
+
e["$initial_" + Fi(c)] = l;
|
|
2515
2515
|
}));
|
|
2516
2516
|
}));
|
|
2517
2517
|
var t, i, s = this.props[Yt];
|
|
@@ -2576,7 +2576,7 @@ var Si = (function(r) {
|
|
|
2576
2576
|
(function(r) {
|
|
2577
2577
|
return r.Once = "once", r.Recurring = "recurring", r.Always = "always", r;
|
|
2578
2578
|
})({});
|
|
2579
|
-
var
|
|
2579
|
+
var jt = (function(r) {
|
|
2580
2580
|
return r.SHOWN = "survey shown", r.DISMISSED = "survey dismissed", r.SENT = "survey sent", r;
|
|
2581
2581
|
})({}), ss = (function(r) {
|
|
2582
2582
|
return r.SURVEY_ID = "$survey_id", r.SURVEY_NAME = "$survey_name", r.SURVEY_RESPONSE = "$survey_response", r.SURVEY_ITERATION = "$survey_iteration", r.SURVEY_ITERATION_START_DATE = "$survey_iteration_start_date", r.SURVEY_PARTIALLY_COMPLETED = "$survey_partially_completed", r.SURVEY_SUBMISSION_ID = "$survey_submission_id", r.SURVEY_QUESTIONS = "$survey_questions", r.SURVEY_COMPLETED = "$survey_completed", r;
|
|
@@ -2614,9 +2614,9 @@ class Be {
|
|
|
2614
2614
|
var t, i;
|
|
2615
2615
|
if (!v((t = this._instance) == null ? void 0 : t.Mi) && (e.forEach(((a) => {
|
|
2616
2616
|
var o, l;
|
|
2617
|
-
(o = this.Fi) == null || o.add(a), (l = a.steps) == null || l.forEach(((
|
|
2618
|
-
var
|
|
2619
|
-
(
|
|
2617
|
+
(o = this.Fi) == null || o.add(a), (l = a.steps) == null || l.forEach(((c) => {
|
|
2618
|
+
var u;
|
|
2619
|
+
(u = this.Oi) == null || u.add((c == null ? void 0 : c.event) || "");
|
|
2620
2620
|
}));
|
|
2621
2621
|
})), (i = this._instance) != null && i.autocapture)) {
|
|
2622
2622
|
var s, n = /* @__PURE__ */ new Set();
|
|
@@ -2704,10 +2704,10 @@ class Ro {
|
|
|
2704
2704
|
this.onAction(i);
|
|
2705
2705
|
}))), t.forEach(((i) => {
|
|
2706
2706
|
var s, n, a, o, l;
|
|
2707
|
-
i.conditions && (s = i.conditions) != null && s.actions && (n = i.conditions) != null && (n = n.actions) != null && n.values && ((a = i.conditions) == null || (a = a.actions) == null || (a = a.values) == null ? void 0 : a.length) > 0 && ((o = this.qi) == null || o.register(i.conditions.actions.values), (l = i.conditions) == null || (l = l.actions) == null || (l = l.values) == null || l.forEach(((
|
|
2708
|
-
if (
|
|
2709
|
-
var
|
|
2710
|
-
|
|
2707
|
+
i.conditions && (s = i.conditions) != null && s.actions && (n = i.conditions) != null && (n = n.actions) != null && n.values && ((a = i.conditions) == null || (a = a.actions) == null || (a = a.values) == null ? void 0 : a.length) > 0 && ((o = this.qi) == null || o.register(i.conditions.actions.values), (l = i.conditions) == null || (l = l.actions) == null || (l = l.values) == null || l.forEach(((c) => {
|
|
2708
|
+
if (c && c.name) {
|
|
2709
|
+
var u = this.zi.get(c.name);
|
|
2710
|
+
u && u.push(i.id), this.zi.set(c.name, u || [i.id]);
|
|
2711
2711
|
}
|
|
2712
2712
|
})));
|
|
2713
2713
|
})));
|
|
@@ -2730,8 +2730,8 @@ class Ro {
|
|
|
2730
2730
|
})));
|
|
2731
2731
|
}
|
|
2732
2732
|
onEvent(e, t) {
|
|
2733
|
-
var i, s, n = ((i = this._instance) == null || (i = i.persistence) == null ? void 0 : i.props[
|
|
2734
|
-
if (
|
|
2733
|
+
var i, s, n = ((i = this._instance) == null || (i = i.persistence) == null ? void 0 : i.props[Rt]) || [];
|
|
2734
|
+
if (jt.SHOWN === e && t && n.length > 0) {
|
|
2735
2735
|
var a;
|
|
2736
2736
|
I.info("survey event matched, removing survey from activated surveys", { event: e, eventPayload: t, existingActivatedSurveys: n });
|
|
2737
2737
|
var o = t == null || (a = t.properties) == null ? void 0 : a.$survey_id;
|
|
@@ -2741,14 +2741,14 @@ class Ro {
|
|
|
2741
2741
|
}
|
|
2742
2742
|
} else if (this.Ui.has(e)) {
|
|
2743
2743
|
I.info("survey event name matched", { event: e, eventPayload: t, surveys: this.Ui.get(e) });
|
|
2744
|
-
var
|
|
2744
|
+
var c = [];
|
|
2745
2745
|
(s = this._instance) == null || s.getSurveys(((h) => {
|
|
2746
|
-
|
|
2746
|
+
c = h.filter(((g) => {
|
|
2747
2747
|
var p;
|
|
2748
2748
|
return (p = this.Ui.get(e)) == null ? void 0 : p.includes(g.id);
|
|
2749
2749
|
}));
|
|
2750
2750
|
}));
|
|
2751
|
-
var
|
|
2751
|
+
var u = c.filter(((h) => {
|
|
2752
2752
|
var g, p = (g = h.conditions) == null || (g = g.events) == null || (g = g.values) == null ? void 0 : g.find(((f) => f.name === e));
|
|
2753
2753
|
return !!p && (!p.propertyFilters || Object.entries(p.propertyFilters).every(((f) => {
|
|
2754
2754
|
var _, [b, E] = f, x = t == null || (_ = t.properties) == null ? void 0 : _[b];
|
|
@@ -2757,19 +2757,19 @@ class Ro {
|
|
|
2757
2757
|
return P ? P(E.values, $) : (I.warn("Unknown property comparison operator: " + E.operator), !1);
|
|
2758
2758
|
})));
|
|
2759
2759
|
}));
|
|
2760
|
-
this.Wi(n.concat(
|
|
2760
|
+
this.Wi(n.concat(u.map(((h) => h.id)) || []));
|
|
2761
2761
|
}
|
|
2762
2762
|
}
|
|
2763
2763
|
onAction(e) {
|
|
2764
|
-
var t, i = ((t = this._instance) == null || (t = t.persistence) == null ? void 0 : t.props[
|
|
2764
|
+
var t, i = ((t = this._instance) == null || (t = t.persistence) == null ? void 0 : t.props[Rt]) || [];
|
|
2765
2765
|
this.zi.has(e) && this.Wi(i.concat(this.zi.get(e) || []));
|
|
2766
2766
|
}
|
|
2767
2767
|
Wi(e) {
|
|
2768
2768
|
var t;
|
|
2769
|
-
I.info("updating activated surveys", { activatedSurveys: e }), (t = this._instance) == null || (t = t.persistence) == null || t.register({ [
|
|
2769
|
+
I.info("updating activated surveys", { activatedSurveys: e }), (t = this._instance) == null || (t = t.persistence) == null || t.register({ [Rt]: [...new Set(e)] });
|
|
2770
2770
|
}
|
|
2771
2771
|
getSurveys() {
|
|
2772
|
-
var e, t = (e = this._instance) == null || (e = e.persistence) == null ? void 0 : e.props[
|
|
2772
|
+
var e, t = (e = this._instance) == null || (e = e.persistence) == null ? void 0 : e.props[Rt];
|
|
2773
2773
|
return t || [];
|
|
2774
2774
|
}
|
|
2775
2775
|
getEventToSurveys() {
|
|
@@ -2851,7 +2851,7 @@ class Do {
|
|
|
2851
2851
|
var o = "Surveys API could not be loaded, status: " + a;
|
|
2852
2852
|
return I.error(o), e([], { isLoaded: !1, error: o });
|
|
2853
2853
|
}
|
|
2854
|
-
var l,
|
|
2854
|
+
var l, c = s.json.surveys || [], u = c.filter(((h) => (function(g) {
|
|
2855
2855
|
return !(!g.start_date || g.end_date);
|
|
2856
2856
|
})(h) && ((function(g) {
|
|
2857
2857
|
var p;
|
|
@@ -2860,7 +2860,7 @@ class Do {
|
|
|
2860
2860
|
var p;
|
|
2861
2861
|
return !((p = g.conditions) == null || (p = p.actions) == null || (p = p.values) == null || !p.length);
|
|
2862
2862
|
})(h))));
|
|
2863
|
-
return
|
|
2863
|
+
return u.length > 0 && ((l = this._surveyEventReceiver) == null || l.register(u)), (n = this._instance.persistence) == null || n.register({ [Li]: c }), e(c, { isLoaded: !0 });
|
|
2864
2864
|
} });
|
|
2865
2865
|
} catch (s) {
|
|
2866
2866
|
throw this.Ji = !1, s;
|
|
@@ -3067,8 +3067,8 @@ class Uo {
|
|
|
3067
3067
|
var t = e.retriesPerformedSoFar || 0;
|
|
3068
3068
|
e.retriesPerformedSoFar = t + 1;
|
|
3069
3069
|
var i = (function(a) {
|
|
3070
|
-
var o = 3e3 * Math.pow(2, a), l = o / 2,
|
|
3071
|
-
return Math.ceil(
|
|
3070
|
+
var o = 3e3 * Math.pow(2, a), l = o / 2, c = Math.min(18e5, o), u = (Math.random() - 0.5) * (c - l);
|
|
3071
|
+
return Math.ceil(c + u);
|
|
3072
3072
|
})(t), s = Date.now() + i;
|
|
3073
3073
|
this.ne.push({ retryAt: s, requestOptions: e });
|
|
3074
3074
|
var n = "Enqueued failed request for retry in " + i;
|
|
@@ -3098,8 +3098,8 @@ class qo {
|
|
|
3098
3098
|
this.be = () => {
|
|
3099
3099
|
var t, i, s, n;
|
|
3100
3100
|
this.we || (this.we = {});
|
|
3101
|
-
var a = this.scrollElement(), o = this.scrollY(), l = a ? Math.max(0, a.scrollHeight - a.clientHeight) : 0,
|
|
3102
|
-
this.we.lastScrollY = Math.ceil(o), this.we.maxScrollY = Math.max(o, (t = this.we.maxScrollY) !== null && t !== void 0 ? t : 0), this.we.maxScrollHeight = Math.max(l, (i = this.we.maxScrollHeight) !== null && i !== void 0 ? i : 0), this.we.lastContentY =
|
|
3101
|
+
var a = this.scrollElement(), o = this.scrollY(), l = a ? Math.max(0, a.scrollHeight - a.clientHeight) : 0, c = o + ((a == null ? void 0 : a.clientHeight) || 0), u = (a == null ? void 0 : a.scrollHeight) || 0;
|
|
3102
|
+
this.we.lastScrollY = Math.ceil(o), this.we.maxScrollY = Math.max(o, (t = this.we.maxScrollY) !== null && t !== void 0 ? t : 0), this.we.maxScrollHeight = Math.max(l, (i = this.we.maxScrollHeight) !== null && i !== void 0 ? i : 0), this.we.lastContentY = c, this.we.maxContentY = Math.max(c, (s = this.we.maxContentY) !== null && s !== void 0 ? s : 0), this.we.maxContentHeight = Math.max(u, (n = this.we.maxContentHeight) !== null && n !== void 0 ? n : 0);
|
|
3103
3103
|
}, this._instance = e;
|
|
3104
3104
|
}
|
|
3105
3105
|
getContext() {
|
|
@@ -3167,7 +3167,7 @@ class ls {
|
|
|
3167
3167
|
}
|
|
3168
3168
|
constructor(e, t, i) {
|
|
3169
3169
|
var s;
|
|
3170
|
-
if (this.Te = [], this.Ie = void 0, this.Pe = new cr(), this.Re = (
|
|
3170
|
+
if (this.Te = [], this.Ie = void 0, this.Pe = new cr(), this.Re = (u, h) => Math.abs(u - h) > this.sessionTimeoutMs, !e.persistence) throw new Error("SessionIdManager requires a PostHogPersistence instance");
|
|
3171
3171
|
if (e.config.cookieless_mode === "always") throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');
|
|
3172
3172
|
this.C = e.config, this.Ee = e.persistence, this.Ce = void 0, this.Oe = void 0, this._sessionStartTimestamp = null, this._sessionActivityTimestamp = null, this.Fe = t || Fe, this.Me = i || Fe;
|
|
3173
3173
|
var n = this.C.persistence_name || this.C.token, a = this.C.session_idle_timeout_seconds || 1800;
|
|
@@ -3176,15 +3176,15 @@ class ls {
|
|
|
3176
3176
|
o && !l ? this.Ce = o : q.V(this.De), q.G(this.je, !0);
|
|
3177
3177
|
}
|
|
3178
3178
|
if ((s = this.C.bootstrap) != null && s.sessionID) try {
|
|
3179
|
-
var
|
|
3180
|
-
var h =
|
|
3179
|
+
var c = ((u) => {
|
|
3180
|
+
var h = u.replace(/-/g, "");
|
|
3181
3181
|
if (h.length !== 32) throw new Error("Not a valid UUID");
|
|
3182
3182
|
if (h[12] !== "7") throw new Error("Not a UUIDv7");
|
|
3183
3183
|
return parseInt(h.substring(0, 12), 16);
|
|
3184
3184
|
})(this.C.bootstrap.sessionID);
|
|
3185
|
-
this.Ne(this.C.bootstrap.sessionID, (/* @__PURE__ */ new Date()).getTime(),
|
|
3186
|
-
} catch (
|
|
3187
|
-
Pi.error("Invalid sessionID in bootstrap",
|
|
3185
|
+
this.Ne(this.C.bootstrap.sessionID, (/* @__PURE__ */ new Date()).getTime(), c);
|
|
3186
|
+
} catch (u) {
|
|
3187
|
+
Pi.error("Invalid sessionID in bootstrap", u);
|
|
3188
3188
|
}
|
|
3189
3189
|
this.Ue();
|
|
3190
3190
|
}
|
|
@@ -3226,10 +3226,10 @@ class ls {
|
|
|
3226
3226
|
}
|
|
3227
3227
|
checkAndGetSessionAndWindowId(e, t) {
|
|
3228
3228
|
if (e === void 0 && (e = !1), t === void 0 && (t = null), this.C.cookieless_mode === "always") throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');
|
|
3229
|
-
var i = t || (/* @__PURE__ */ new Date()).getTime(), [s, n, a] = this.Be(), o = this.He(), l = fe(a) && a > 0 && Math.abs(i - a) > 864e5,
|
|
3230
|
-
|
|
3229
|
+
var i = t || (/* @__PURE__ */ new Date()).getTime(), [s, n, a] = this.Be(), o = this.He(), l = fe(a) && a > 0 && Math.abs(i - a) > 864e5, c = !1, u = !n, h = !u && !e && this.Re(i, s);
|
|
3230
|
+
u || h || l ? (n = this.Fe(), o = this.Me(), Pi.info("new session ID generated", { sessionId: n, windowId: o, changeReason: { noSessionId: u, activityTimeout: h, sessionPastMaximumLength: l } }), a = i, c = !0) : o || (o = this.Me(), c = !0);
|
|
3231
3231
|
var g = s === 0 || !e || l ? i : s, p = a === 0 ? (/* @__PURE__ */ new Date()).getTime() : a;
|
|
3232
|
-
return this.ze(o), this.Ne(n, g, p), e || this.Ae(),
|
|
3232
|
+
return this.ze(o), this.Ne(n, g, p), e || this.Ae(), c && this.Te.forEach(((f) => f(n, o, c ? { noSessionId: u, activityTimeout: h, sessionPastMaximumLength: l } : void 0))), { sessionId: n, windowId: o, sessionStartTimestamp: p, changeReason: c ? { noSessionId: u, activityTimeout: h, sessionPastMaximumLength: l } : void 0, lastActivityTimestamp: s };
|
|
3233
3233
|
}
|
|
3234
3234
|
Ae() {
|
|
3235
3235
|
clearTimeout(this.qe), this.qe = setTimeout((() => {
|
|
@@ -3270,10 +3270,10 @@ class Ho {
|
|
|
3270
3270
|
globalsForEvent(e) {
|
|
3271
3271
|
var t, i, s, n, a, o, l;
|
|
3272
3272
|
if (!e) throw new Error("Event payload is required");
|
|
3273
|
-
var
|
|
3274
|
-
for (var [g, p] of Object.entries(h))
|
|
3273
|
+
var c = {}, u = this._instance.get_property("$groups") || [], h = this._instance.get_property("$stored_group_properties") || {};
|
|
3274
|
+
for (var [g, p] of Object.entries(h)) c[g] = { id: u[g], type: g, properties: p };
|
|
3275
3275
|
var { $set_once: f, $set: _ } = e;
|
|
3276
|
-
return { event: w({}, ms(e, Bo), { properties: w({}, e.properties, _ ? { $set: w({}, (t = (i = e.properties) == null ? void 0 : i.$set) !== null && t !== void 0 ? t : {}, _) } : {}, f ? { $set_once: w({}, (s = (n = e.properties) == null ? void 0 : n.$set_once) !== null && s !== void 0 ? s : {}, f) } : {}), elements_chain: (a = (o = e.properties) == null ? void 0 : o.$elements_chain) !== null && a !== void 0 ? a : "", distinct_id: (l = e.properties) == null ? void 0 : l.distinct_id }), person: { properties: this._instance.get_property("$stored_person_properties") }, groups:
|
|
3276
|
+
return { event: w({}, ms(e, Bo), { properties: w({}, e.properties, _ ? { $set: w({}, (t = (i = e.properties) == null ? void 0 : i.$set) !== null && t !== void 0 ? t : {}, _) } : {}, f ? { $set_once: w({}, (s = (n = e.properties) == null ? void 0 : n.$set_once) !== null && s !== void 0 ? s : {}, f) } : {}), elements_chain: (a = (o = e.properties) == null ? void 0 : o.$elements_chain) !== null && a !== void 0 ? a : "", distinct_id: (l = e.properties) == null ? void 0 : l.distinct_id }), person: { properties: this._instance.get_property("$stored_person_properties") }, groups: c };
|
|
3277
3277
|
}
|
|
3278
3278
|
setupSiteApp(e) {
|
|
3279
3279
|
var t = this.apps[e.id], i = () => {
|
|
@@ -3313,12 +3313,12 @@ class Ho {
|
|
|
3313
3313
|
}
|
|
3314
3314
|
onRemoteConfig(e) {
|
|
3315
3315
|
var t, i, s, n = this;
|
|
3316
|
-
if ((t = this.siteAppLoaders) != null && t.length) return this.isEnabled ? (this.Je(), void this._instance.on("eventCaptured", ((
|
|
3316
|
+
if ((t = this.siteAppLoaders) != null && t.length) return this.isEnabled ? (this.Je(), void this._instance.on("eventCaptured", ((c) => this.Ke(c)))) : void $e.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');
|
|
3317
3317
|
if ((i = this.Ve) == null || i.call(this), (s = e.siteApps) != null && s.length) if (this.isEnabled) {
|
|
3318
|
-
var a = function(
|
|
3319
|
-
var
|
|
3320
|
-
k["__$$ph_site_app_" +
|
|
3321
|
-
if (h) return $e.error("Error while initializing PostHog app with config id " +
|
|
3318
|
+
var a = function(c) {
|
|
3319
|
+
var u;
|
|
3320
|
+
k["__$$ph_site_app_" + c] = n._instance, (u = k.__PosthogExtensions__) == null || u.loadSiteApp == null || u.loadSiteApp(n._instance, l, ((h) => {
|
|
3321
|
+
if (h) return $e.error("Error while initializing PostHog app with config id " + c, h);
|
|
3322
3322
|
}));
|
|
3323
3323
|
};
|
|
3324
3324
|
for (var { id: o, url: l } of e.siteApps) a(o);
|
|
@@ -3383,8 +3383,8 @@ class B {
|
|
|
3383
3383
|
var o = t._instance.getFeatureFlag(n.feature_flag_key);
|
|
3384
3384
|
N(o) && n.variants[o] && t.Ze(n.name, o, n.variants[o].transforms);
|
|
3385
3385
|
} else if (n.variants) for (var l in n.variants) {
|
|
3386
|
-
var
|
|
3387
|
-
B.tr(
|
|
3386
|
+
var c = n.variants[l];
|
|
3387
|
+
B.tr(c) && t.Ze(n.name, l, c.transforms);
|
|
3388
3388
|
}
|
|
3389
3389
|
}));
|
|
3390
3390
|
}), i);
|
|
@@ -3448,7 +3448,7 @@ class B {
|
|
|
3448
3448
|
if (O(e.conditions) || O((t = e.conditions) == null ? void 0 : t.utm)) return !0;
|
|
3449
3449
|
var i = un();
|
|
3450
3450
|
if (i.utm_source) {
|
|
3451
|
-
var s, n, a, o, l,
|
|
3451
|
+
var s, n, a, o, l, c, u, h, g = (s = e.conditions) == null || (s = s.utm) == null || !s.utm_campaign || ((n = e.conditions) == null || (n = n.utm) == null ? void 0 : n.utm_campaign) == i.utm_campaign, p = (a = e.conditions) == null || (a = a.utm) == null || !a.utm_source || ((o = e.conditions) == null || (o = o.utm) == null ? void 0 : o.utm_source) == i.utm_source, f = (l = e.conditions) == null || (l = l.utm) == null || !l.utm_medium || ((c = e.conditions) == null || (c = c.utm) == null ? void 0 : c.utm_medium) == i.utm_medium, _ = (u = e.conditions) == null || (u = u.utm) == null || !u.utm_term || ((h = e.conditions) == null || (h = h.utm) == null ? void 0 : h.utm_term) == i.utm_term;
|
|
3452
3452
|
return g && f && _ && p;
|
|
3453
3453
|
}
|
|
3454
3454
|
return !1;
|
|
@@ -3488,11 +3488,11 @@ class Yo {
|
|
|
3488
3488
|
}
|
|
3489
3489
|
startIfEnabledOrStop() {
|
|
3490
3490
|
var e = this, t = function(a) {
|
|
3491
|
-
var o, l,
|
|
3491
|
+
var o, l, c;
|
|
3492
3492
|
!s || (o = k.__PosthogExtensions__) != null && (o = o.integrations) != null && o[a] || e.it(zo[a], (() => {
|
|
3493
|
-
var
|
|
3494
|
-
(
|
|
3495
|
-
})), !s && (l = k.__PosthogExtensions__) != null && (l = l.integrations) != null && l[a] && ((
|
|
3493
|
+
var u;
|
|
3494
|
+
(u = k.__PosthogExtensions__) == null || (u = u.integrations) == null || (u = u[a]) == null || u.start(e._instance);
|
|
3495
|
+
})), !s && (l = k.__PosthogExtensions__) != null && (l = l.integrations) != null && l[a] && ((c = k.__PosthogExtensions__) == null || (c = c.integrations) == null || (c = c[a]) == null || c.stop());
|
|
3496
3496
|
};
|
|
3497
3497
|
for (var [i, s] of Object.entries((n = this._instance.config.integrations) !== null && n !== void 0 ? n : {})) {
|
|
3498
3498
|
var n;
|
|
@@ -3544,8 +3544,8 @@ class us {
|
|
|
3544
3544
|
var t, i, s = this._instance.persistence, n = () => {
|
|
3545
3545
|
var a = e.sessionRecording === !1 ? void 0 : e.sessionRecording, o = a == null ? void 0 : a.sampleRate, l = O(o) ? null : parseFloat(o);
|
|
3546
3546
|
O(l) && this.vr();
|
|
3547
|
-
var
|
|
3548
|
-
s.register({ [pi]: w({ enabled: !!a }, a, { networkPayloadCapture: w({ capturePerformance: e.capturePerformance }, a == null ? void 0 : a.networkPayloadCapture), canvasRecording: { enabled: a == null ? void 0 : a.recordCanvas, fps: a == null ? void 0 : a.canvasFps, quality: a == null ? void 0 : a.canvasQuality }, sampleRate: l, minimumDurationMilliseconds: v(
|
|
3547
|
+
var c = a == null ? void 0 : a.minimumDurationMilliseconds;
|
|
3548
|
+
s.register({ [pi]: w({ enabled: !!a }, a, { networkPayloadCapture: w({ capturePerformance: e.capturePerformance }, a == null ? void 0 : a.networkPayloadCapture), canvasRecording: { enabled: a == null ? void 0 : a.recordCanvas, fps: a == null ? void 0 : a.canvasFps, quality: a == null ? void 0 : a.canvasQuality }, sampleRate: l, minimumDurationMilliseconds: v(c) ? null : c, endpoint: a == null ? void 0 : a.endpoint, triggerMatchType: a == null ? void 0 : a.triggerMatchType, masking: a == null ? void 0 : a.masking, urlTriggers: a == null ? void 0 : a.urlTriggers }) });
|
|
3549
3549
|
};
|
|
3550
3550
|
n(), (t = this.lr) == null || t.call(this), this.lr = (i = this._instance.sessionManager) == null ? void 0 : i.onSessionId(n);
|
|
3551
3551
|
}
|
|
@@ -3591,7 +3591,7 @@ class us {
|
|
|
3591
3591
|
return !((i = this.sr) == null || !i.tryAddCustomEvent(e, t));
|
|
3592
3592
|
}
|
|
3593
3593
|
}
|
|
3594
|
-
var
|
|
3594
|
+
var kt = {}, Zi = () => {
|
|
3595
3595
|
}, Xe = "posthog", Sn = !xo && (W == null ? void 0 : W.indexOf("MSIE")) === -1 && (W == null ? void 0 : W.indexOf("Mozilla")) === -1, hs = (r) => {
|
|
3596
3596
|
var e;
|
|
3597
3597
|
return w({ api_host: "https://us.i.posthog.com", flags_api_host: null, ui_host: null, token: "", autocapture: !0, cross_subdomain_cookie: va(m == null ? void 0 : m.location), persistence: "localStorage+cookie", persistence_name: "", loaded: Zi, save_campaign_params: !0, custom_campaign_params: [], custom_blocked_useragents: [], save_referrer: !0, capture_pageleave: "if_capture_pageview", defaults: r ?? "unset", __preview_deferred_init_extensions: !1, debug: z && N(z == null ? void 0 : z.search) && z.search.indexOf("__posthog_debug=true") !== -1 || !1, cookie_expiration: 365, upgrade: !1, disable_session_recording: !1, disable_persistence: !1, disable_web_experiments: !0, disable_surveys: !1, disable_surveys_automatic_display: !1, disable_external_dependency_loading: !1, enable_recording_console_log: void 0, secure_cookie: (d == null || (e = d.location) == null ? void 0 : e.protocol) === "https:", ip: !1, opt_out_capturing_by_default: !1, opt_out_persistence_by_default: !1, opt_out_useragent_filter: !1, opt_out_capturing_persistence_type: "localStorage", consent_persistence_name: null, opt_out_capturing_cookie_prefix: null, opt_in_site_apps: !1, property_denylist: [], respect_dnt: !1, sanitize_properties: null, request_headers: {}, request_batching: !0, properties_string_max_length: 65535, mask_all_element_attributes: !1, mask_all_text: !1, mask_personal_data_properties: !1, custom_personal_data_properties: [], advanced_disable_flags: !1, advanced_disable_decide: !1, advanced_disable_feature_flags: !1, advanced_disable_feature_flags_on_first_load: !1, advanced_only_evaluate_survey_feature_flags: !1, advanced_enable_surveys: !1, advanced_disable_toolbar_metrics: !1, feature_flag_request_timeout_ms: 3e3, surveys_request_timeout_ms: 1e4, on_request_error: (t) => {
|
|
@@ -3638,8 +3638,8 @@ class oi {
|
|
|
3638
3638
|
}
|
|
3639
3639
|
init(e, t, i) {
|
|
3640
3640
|
if (i && i !== Xe) {
|
|
3641
|
-
var s, n = (s =
|
|
3642
|
-
return n._init(e, t, i),
|
|
3641
|
+
var s, n = (s = kt[i]) !== null && s !== void 0 ? s : new oi();
|
|
3642
|
+
return n._init(e, t, i), kt[i] = n, kt[Xe][i] = n, n;
|
|
3643
3643
|
}
|
|
3644
3644
|
return this._init(e, t, i);
|
|
3645
3645
|
}
|
|
@@ -3656,8 +3656,8 @@ class oi {
|
|
|
3656
3656
|
if (l || (this.sessionManager = new ls(this), this.sessionPropsManager = new os(this, this.sessionManager, this.persistence)), this.config.__preview_deferred_init_extensions ? (y.info("Deferring extension initialization to improve startup performance"), setTimeout((() => {
|
|
3657
3657
|
this.Rr(l);
|
|
3658
3658
|
}), 0)) : (y.info("Initializing extensions synchronously"), this.Rr(l)), me.DEBUG = me.DEBUG || this.config.debug, me.DEBUG && y.info("Starting in debug mode", { this: this, config: t, thisC: w({}, this.config), p: a, s: o }), ((s = t.bootstrap) == null ? void 0 : s.distinctID) !== void 0) {
|
|
3659
|
-
var
|
|
3660
|
-
this.persistence.set_property(ye, (
|
|
3659
|
+
var c, u, h = this.config.get_device_id(Fe()), g = (c = t.bootstrap) != null && c.isIdentifiedID ? h : t.bootstrap.distinctID;
|
|
3660
|
+
this.persistence.set_property(ye, (u = t.bootstrap) != null && u.isIdentifiedID ? "identified" : "anonymous"), this.register({ distinct_id: t.bootstrap.distinctID, $device_id: g });
|
|
3661
3661
|
}
|
|
3662
3662
|
if (this.Cr()) {
|
|
3663
3663
|
var p, f, _ = Object.keys(((p = t.bootstrap) == null ? void 0 : p.featureFlags) || {}).filter(((x) => {
|
|
@@ -3727,11 +3727,11 @@ class oi {
|
|
|
3727
3727
|
this.register_for_session({ $sdk_debug_extensions_init_method: this.config.__preview_deferred_init_extensions ? "deferred" : "synchronous", $sdk_debug_extensions_init_time_ms: s }), this.config.__preview_deferred_init_extensions && y.info("PostHog extensions initialized (" + s + "ms)");
|
|
3728
3728
|
}
|
|
3729
3729
|
fi(e) {
|
|
3730
|
-
var t, i, s, n, a, o, l,
|
|
3730
|
+
var t, i, s, n, a, o, l, c;
|
|
3731
3731
|
if (!m || !m.body) return y.info("document not ready yet, trying again in 500 milliseconds..."), void setTimeout((() => {
|
|
3732
3732
|
this.fi(e);
|
|
3733
3733
|
}), 500);
|
|
3734
|
-
this.config.__preview_deferred_init_extensions && (this.Fr = e), this.compression = void 0, e.supportedCompression && !this.config.disable_compression && (this.compression = S(e.supportedCompression, we.GZipJS) ? we.GZipJS : S(e.supportedCompression, we.Base64) ? we.Base64 : void 0), (t = e.analytics) != null && t.endpoint && (this.analyticsDefaultEndpoint = e.analytics.endpoint), this.set_config({ person_profiles: this.br ? this.br : "identified_only" }), (i = this.siteApps) == null || i.onRemoteConfig(e), (s = this.sessionRecording) == null || s.onRemoteConfig(e), (n = this.autocapture) == null || n.onRemoteConfig(e), (a = this.heatmaps) == null || a.onRemoteConfig(e), this.surveys.onRemoteConfig(e), (o = this.webVitalsAutocapture) == null || o.onRemoteConfig(e), (l = this.exceptionObserver) == null || l.onRemoteConfig(e), this.exceptions.onRemoteConfig(e), (
|
|
3734
|
+
this.config.__preview_deferred_init_extensions && (this.Fr = e), this.compression = void 0, e.supportedCompression && !this.config.disable_compression && (this.compression = S(e.supportedCompression, we.GZipJS) ? we.GZipJS : S(e.supportedCompression, we.Base64) ? we.Base64 : void 0), (t = e.analytics) != null && t.endpoint && (this.analyticsDefaultEndpoint = e.analytics.endpoint), this.set_config({ person_profiles: this.br ? this.br : "identified_only" }), (i = this.siteApps) == null || i.onRemoteConfig(e), (s = this.sessionRecording) == null || s.onRemoteConfig(e), (n = this.autocapture) == null || n.onRemoteConfig(e), (a = this.heatmaps) == null || a.onRemoteConfig(e), this.surveys.onRemoteConfig(e), (o = this.webVitalsAutocapture) == null || o.onRemoteConfig(e), (l = this.exceptionObserver) == null || l.onRemoteConfig(e), this.exceptions.onRemoteConfig(e), (c = this.deadClicksAutocapture) == null || c.onRemoteConfig(e);
|
|
3735
3735
|
}
|
|
3736
3736
|
Or() {
|
|
3737
3737
|
try {
|
|
@@ -3758,9 +3758,9 @@ class oi {
|
|
|
3758
3758
|
this.__loaded && (Sn ? this.__request_queue.push(e) : this.rateLimiter.isServerRateLimited(e.batchKey) || (e.transport = e.transport || this.config.api_transport, e.url = ri(e.url, { ip: this.config.ip ? 1 : 0 }), e.headers = w({}, this.config.request_headers), e.compression = e.compression === "best-available" ? this.compression : e.compression, e.disableXHRCredentials = this.config.__preview_disable_xhr_credentials, this.config.__preview_disable_beacon && (e.disableTransport = ["sendBeacon"]), e.fetchOptions = e.fetchOptions || this.config.fetch_options, ((t) => {
|
|
3759
3759
|
var i, s, n, a = w({}, t);
|
|
3760
3760
|
a.timeout = a.timeout || 6e4, a.url = ri(a.url, { _: (/* @__PURE__ */ new Date()).getTime().toString(), ver: me.LIB_VERSION, compression: a.compression });
|
|
3761
|
-
var o = (i = a.transport) !== null && i !== void 0 ? i : "fetch", l =
|
|
3762
|
-
if (!
|
|
3763
|
-
|
|
3761
|
+
var o = (i = a.transport) !== null && i !== void 0 ? i : "fetch", l = qt.filter(((u) => !a.disableTransport || !u.transport || !a.disableTransport.includes(u.transport))), c = (s = (n = Ss(l, ((u) => u.transport === o))) == null ? void 0 : n.method) !== null && s !== void 0 ? s : l[0].method;
|
|
3762
|
+
if (!c) throw new Error("No available transport method");
|
|
3763
|
+
c(a);
|
|
3764
3764
|
})(w({}, e, { callback: (t) => {
|
|
3765
3765
|
var i, s;
|
|
3766
3766
|
this.rateLimiter.checkForLimiting(t), t.statusCode >= 400 && ((i = (s = this.config).on_request_error) == null || i.call(s, t)), e.callback == null || e.callback(t);
|
|
@@ -3775,13 +3775,13 @@ class oi {
|
|
|
3775
3775
|
o && (t = o[0], T(t) ? n.push(o) : Te(o) ? o.call(this) : T(o) && t === "alias" ? i.push(o) : T(o) && t.indexOf("capture") !== -1 && Te(this[t]) ? n.push(o) : s.push(o));
|
|
3776
3776
|
}));
|
|
3777
3777
|
var a = function(o, l) {
|
|
3778
|
-
Re(o, (function(
|
|
3779
|
-
if (T(
|
|
3780
|
-
var
|
|
3781
|
-
F(
|
|
3782
|
-
|
|
3778
|
+
Re(o, (function(c) {
|
|
3779
|
+
if (T(c[0])) {
|
|
3780
|
+
var u = l;
|
|
3781
|
+
F(c, (function(h) {
|
|
3782
|
+
u = u[h[0]].apply(u, h.slice(1));
|
|
3783
3783
|
}));
|
|
3784
|
-
} else this[
|
|
3784
|
+
} else this[c[0]].apply(this, c.slice(1));
|
|
3785
3785
|
}), l);
|
|
3786
3786
|
};
|
|
3787
3787
|
a(i, this), a(s, this), a(n, this);
|
|
@@ -3802,22 +3802,22 @@ class oi {
|
|
|
3802
3802
|
var a = i != null && i.skip_client_rate_limiting ? void 0 : this.rateLimiter.clientRateLimitContext();
|
|
3803
3803
|
if (a == null || !a.isRateLimited) {
|
|
3804
3804
|
t != null && t.$current_url && !N(t == null ? void 0 : t.$current_url) && (y.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."), t == null || delete t.$current_url), this.sessionPersistence.update_search_keyword(), this.config.save_campaign_params && this.sessionPersistence.update_campaign_params(), this.config.save_referrer && this.sessionPersistence.update_referrer_info(), (this.config.save_campaign_params || this.config.save_referrer) && this.persistence.set_initial_person_info();
|
|
3805
|
-
var o = /* @__PURE__ */ new Date(), l = (i == null ? void 0 : i.timestamp) || o,
|
|
3806
|
-
e === "$pageview" && this.config.__preview_capture_bot_pageviews && n && (
|
|
3805
|
+
var o = /* @__PURE__ */ new Date(), l = (i == null ? void 0 : i.timestamp) || o, c = Fe(), u = { uuid: c, event: e, properties: this.calculateEventProperties(e, t || {}, l, c) };
|
|
3806
|
+
e === "$pageview" && this.config.__preview_capture_bot_pageviews && n && (u.event = "$bot_pageview", u.properties.$browser_type = "bot"), a && (u.properties.$lib_rate_limit_remaining_tokens = a.remainingTokens), i != null && i.$set && (u.$set = i == null ? void 0 : i.$set);
|
|
3807
3807
|
var h, g = this.Lr(i == null ? void 0 : i.$set_once);
|
|
3808
|
-
if (g && (
|
|
3808
|
+
if (g && (u.$set_once = g), (u = fa(u, i != null && i._noTruncate ? null : this.config.properties_string_max_length)).timestamp = l, v(i == null ? void 0 : i.timestamp) || (u.properties.$event_time_override_provided = !0, u.properties.$event_time_override_system_time = o), e === jt.DISMISSED || e === jt.SENT) {
|
|
3809
3809
|
var p = t == null ? void 0 : t[ss.SURVEY_ID], f = t == null ? void 0 : t[ss.SURVEY_ITERATION];
|
|
3810
|
-
h = { id: p, current_iteration: f }, localStorage.getItem(ns(h)) || localStorage.setItem(ns(h), "true"),
|
|
3810
|
+
h = { id: p, current_iteration: f }, localStorage.getItem(ns(h)) || localStorage.setItem(ns(h), "true"), u.$set = w({}, u.$set, { [Fo({ id: p, current_iteration: f }, e === jt.SENT ? "responded" : "dismissed")]: !0 });
|
|
3811
3811
|
}
|
|
3812
|
-
var _ = w({},
|
|
3812
|
+
var _ = w({}, u.properties.$set, u.$set);
|
|
3813
3813
|
if (Ke(_) || this.setPersonPropertiesForFlags(_), !O(this.config.before_send)) {
|
|
3814
|
-
var b = this.Nr(
|
|
3814
|
+
var b = this.Nr(u);
|
|
3815
3815
|
if (!b) return;
|
|
3816
|
-
|
|
3816
|
+
u = b;
|
|
3817
3817
|
}
|
|
3818
|
-
this._r.emit("eventCaptured",
|
|
3819
|
-
var E = { method: "POST", url: (s = i == null ? void 0 : i._url) !== null && s !== void 0 ? s : this.requestRouter.endpointFor("api", this.analyticsDefaultEndpoint), data:
|
|
3820
|
-
return !this.config.request_batching || i && (i == null || !i._batchKey) || i != null && i.send_instantly ? this.Tr(E) : this.Pr.enqueue(E),
|
|
3818
|
+
this._r.emit("eventCaptured", u);
|
|
3819
|
+
var E = { method: "POST", url: (s = i == null ? void 0 : i._url) !== null && s !== void 0 ? s : this.requestRouter.endpointFor("api", this.analyticsDefaultEndpoint), data: u, compression: "best-available", batchKey: i == null ? void 0 : i._batchKey };
|
|
3820
|
+
return !this.config.request_batching || i && (i == null || !i._batchKey) || i != null && i.send_instantly ? this.Tr(E) : this.Pr.enqueue(E), u;
|
|
3821
3821
|
}
|
|
3822
3822
|
y.critical("This capture call is ignored due to client rate limiting.");
|
|
3823
3823
|
}
|
|
@@ -3834,7 +3834,7 @@ class oi {
|
|
|
3834
3834
|
var l = w({}, this.persistence.properties(), this.sessionPersistence.properties());
|
|
3835
3835
|
return o.distinct_id = l.distinct_id, (!N(o.distinct_id) && !fe(o.distinct_id) || Ti(o.distinct_id)) && y.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"), o;
|
|
3836
3836
|
}
|
|
3837
|
-
var
|
|
3837
|
+
var c, u = uo(this.config.mask_personal_data_properties, this.config.custom_personal_data_properties);
|
|
3838
3838
|
if (this.sessionManager) {
|
|
3839
3839
|
var { sessionId: h, windowId: g } = this.sessionManager.checkAndGetSessionAndWindowId(n, i.getTime());
|
|
3840
3840
|
o.$session_id = h, o.$window_id = g;
|
|
@@ -3846,11 +3846,11 @@ class oi {
|
|
|
3846
3846
|
} catch (E) {
|
|
3847
3847
|
o.$sdk_debug_error_capturing_properties = String(E);
|
|
3848
3848
|
}
|
|
3849
|
-
if (this.requestRouter.region === bt.CUSTOM && (o.$lib_custom_api_host = this.config.api_host),
|
|
3849
|
+
if (this.requestRouter.region === bt.CUSTOM && (o.$lib_custom_api_host = this.config.api_host), c = e !== "$pageview" || n ? e !== "$pageleave" || n ? this.pageViewManager.doEvent() : this.pageViewManager.doPageLeave(i) : this.pageViewManager.doPageView(i, s), o = A(o, c), e === "$pageview" && m && (o.title = m.title), !v(a)) {
|
|
3850
3850
|
var f = i.getTime() - a;
|
|
3851
3851
|
o.$duration = parseFloat((f / 1e3).toFixed(3));
|
|
3852
3852
|
}
|
|
3853
|
-
W && this.config.opt_out_useragent_filter && (o.$browser_type = this._is_bot() ? "bot" : "browser"), (o = A({},
|
|
3853
|
+
W && this.config.opt_out_useragent_filter && (o.$browser_type = this._is_bot() ? "bot" : "browser"), (o = A({}, u, this.persistence.properties(), this.sessionPersistence.properties(), o)).$is_identified = this._isIdentified(), T(this.config.property_denylist) ? F(this.config.property_denylist, (function(E) {
|
|
3854
3854
|
delete o[E];
|
|
3855
3855
|
})) : y.error("Invalid value for property_denylist config: " + this.config.property_denylist + " or property_blacklist config: " + this.config.property_blacklist);
|
|
3856
3856
|
var _ = this.config.sanitize_properties;
|
|
@@ -4029,8 +4029,8 @@ class oi {
|
|
|
4029
4029
|
A(this.config, ds(e));
|
|
4030
4030
|
var l = this.kr();
|
|
4031
4031
|
(i = this.persistence) == null || i.update_config(this.config, t, l), this.sessionPersistence = this.config.persistence === "sessionStorage" || this.config.persistence === "memory" ? this.persistence : new xi(w({}, this.config, { persistence: "sessionStorage" }), l);
|
|
4032
|
-
var
|
|
4033
|
-
Oe(
|
|
4032
|
+
var c = this.$r(this.config.debug);
|
|
4033
|
+
Oe(c) && (this.config.debug = c), Oe(this.config.debug) && (this.config.debug ? (me.DEBUG = !0, D.H() && D.G("ph_debug", "true"), y.info("set_config", { config: e, oldConfig: t, newConfig: w({}, this.config) })) : (me.DEBUG = !1, D.H() && D.V("ph_debug"))), (s = this.sessionRecording) == null || s.startIfEnabledOrStop(), (n = this.autocapture) == null || n.startIfEnabled(), (a = this.heatmaps) == null || a.startIfEnabled(), this.surveys.loadIfEnabled(), this.Br(), (o = this.externalIntegrations) == null || o.startIfEnabledOrStop();
|
|
4034
4034
|
}
|
|
4035
4035
|
}
|
|
4036
4036
|
startSessionRecording(e) {
|
|
@@ -4163,9 +4163,9 @@ class oi {
|
|
|
4163
4163
|
for (var t = 0; t < e.length; t++) r.prototype[e[t]] = ga(r.prototype[e[t]]);
|
|
4164
4164
|
})(oi, ["identify"]);
|
|
4165
4165
|
var ps;
|
|
4166
|
-
ps =
|
|
4166
|
+
ps = kt[Xe] = new oi(), (function() {
|
|
4167
4167
|
function r() {
|
|
4168
|
-
r.done || (r.done = !0, Sn = !1, F(
|
|
4168
|
+
r.done || (r.done = !0, Sn = !1, F(kt, (function(e) {
|
|
4169
4169
|
e._dom_loaded();
|
|
4170
4170
|
})));
|
|
4171
4171
|
}
|
|
@@ -4276,7 +4276,7 @@ const Ko = { class: "dialog-block-header-container" }, Jo = { class: "dialog-blo
|
|
|
4276
4276
|
class: "dialog-block-suggestions-item",
|
|
4277
4277
|
onClick: (a) => t(n.question)
|
|
4278
4278
|
}, [
|
|
4279
|
-
|
|
4279
|
+
Bt(nl, {
|
|
4280
4280
|
class: "dialog-block-suggestions-item-icon",
|
|
4281
4281
|
color: e.client.theme.primaryColor
|
|
4282
4282
|
}, null, 8, ["color"]),
|
|
@@ -4304,7 +4304,7 @@ const dl = /* @__PURE__ */ at(ul, [["render", hl], ["__scopeId", "data-v-26a64b5
|
|
|
4304
4304
|
setup(r) {
|
|
4305
4305
|
const e = r;
|
|
4306
4306
|
return (t, i) => (ie(), Me("div", pl, [
|
|
4307
|
-
e.isLoading || !e.questions ? (ie(),
|
|
4307
|
+
e.isLoading || !e.questions ? (ie(), Ht(dl, { key: 0 })) : (ie(), Ht(cl, {
|
|
4308
4308
|
key: 1,
|
|
4309
4309
|
client: e.client,
|
|
4310
4310
|
questions: e.questions,
|
|
@@ -4347,7 +4347,7 @@ const dl = /* @__PURE__ */ at(ul, [["render", hl], ["__scopeId", "data-v-26a64b5
|
|
|
4347
4347
|
selectedVariantId: {}
|
|
4348
4348
|
},
|
|
4349
4349
|
setup(r) {
|
|
4350
|
-
const e = r, t =
|
|
4350
|
+
const e = r, t = wt(), i = wt(""), s = () => {
|
|
4351
4351
|
var a;
|
|
4352
4352
|
(a = t.value) == null || a.focus();
|
|
4353
4353
|
}, n = () => {
|
|
@@ -4381,7 +4381,7 @@ const dl = /* @__PURE__ */ at(ul, [["render", hl], ["__scopeId", "data-v-26a64b5
|
|
|
4381
4381
|
disabled: !i.value.trim(),
|
|
4382
4382
|
onClick: n
|
|
4383
4383
|
}, [
|
|
4384
|
-
|
|
4384
|
+
Bt(ml, {
|
|
4385
4385
|
color: e.client.theme.ctaTextColor
|
|
4386
4386
|
}, null, 8, ["color"])
|
|
4387
4387
|
], 8, bl)
|
|
@@ -4398,22 +4398,22 @@ const dl = /* @__PURE__ */ at(ul, [["render", hl], ["__scopeId", "data-v-26a64b5
|
|
|
4398
4398
|
const o = a, l = i(a);
|
|
4399
4399
|
if (n[o] !== void 0) {
|
|
4400
4400
|
if (typeof n[o] == "object") {
|
|
4401
|
-
Object.keys(n[o]).forEach((
|
|
4401
|
+
Object.keys(n[o]).forEach((c) => {
|
|
4402
4402
|
var h;
|
|
4403
|
-
const
|
|
4404
|
-
if (
|
|
4405
|
-
const g = i(
|
|
4403
|
+
const u = c;
|
|
4404
|
+
if (u !== void 0) {
|
|
4405
|
+
const g = i(c), p = n[o];
|
|
4406
4406
|
t.style.setProperty(
|
|
4407
4407
|
`--dialog-theme-${l}-${g}`,
|
|
4408
|
-
(h = p[
|
|
4408
|
+
(h = p[u]) == null ? void 0 : h.toString()
|
|
4409
4409
|
);
|
|
4410
4410
|
}
|
|
4411
4411
|
});
|
|
4412
4412
|
return;
|
|
4413
4413
|
}
|
|
4414
4414
|
if (o === "ctaBorderType") {
|
|
4415
|
-
const
|
|
4416
|
-
t.style.setProperty(`--dialog-theme-${l}`,
|
|
4415
|
+
const c = n[o] === "rounded" ? "24px" : "0";
|
|
4416
|
+
t.style.setProperty(`--dialog-theme-${l}`, c);
|
|
4417
4417
|
return;
|
|
4418
4418
|
}
|
|
4419
4419
|
t.style.setProperty(
|
|
@@ -4423,9 +4423,9 @@ const dl = /* @__PURE__ */ at(ul, [["render", hl], ["__scopeId", "data-v-26a64b5
|
|
|
4423
4423
|
}
|
|
4424
4424
|
});
|
|
4425
4425
|
};
|
|
4426
|
-
return
|
|
4426
|
+
return Dn(() => {
|
|
4427
4427
|
e.theme && s(e.theme);
|
|
4428
|
-
}),
|
|
4428
|
+
}), _s(
|
|
4429
4429
|
() => e.theme,
|
|
4430
4430
|
(n) => {
|
|
4431
4431
|
n && s(n);
|
|
@@ -4446,48 +4446,56 @@ const dl = /* @__PURE__ */ at(ul, [["render", hl], ["__scopeId", "data-v-26a64b5
|
|
|
4446
4446
|
enableInput: { type: Boolean, default: !0 }
|
|
4447
4447
|
},
|
|
4448
4448
|
setup(r) {
|
|
4449
|
-
const e = r, t =
|
|
4450
|
-
var
|
|
4451
|
-
return (
|
|
4452
|
-
}), n = ui(() => {
|
|
4453
|
-
var l;
|
|
4454
|
-
return (l = i.value) == null ? void 0 : l.description;
|
|
4449
|
+
const e = r, t = wt(!0), i = wt(void 0), s = wt(0), n = ui(() => {
|
|
4450
|
+
var c;
|
|
4451
|
+
return t.value ? "" : (c = i.value) == null ? void 0 : c.assistantName;
|
|
4455
4452
|
}), a = ui(() => {
|
|
4456
|
-
var
|
|
4457
|
-
return (
|
|
4458
|
-
}), o =
|
|
4453
|
+
var c;
|
|
4454
|
+
return t.value ? "" : (c = i.value) == null ? void 0 : c.description;
|
|
4455
|
+
}), o = ui(() => {
|
|
4456
|
+
var c;
|
|
4457
|
+
return t.value ? "" : (c = i.value) == null ? void 0 : c.inputPlaceholder;
|
|
4458
|
+
}), l = async () => {
|
|
4459
|
+
const c = ++s.value;
|
|
4460
|
+
t.value = !0, i.value = void 0;
|
|
4459
4461
|
try {
|
|
4460
|
-
const
|
|
4461
|
-
|
|
4462
|
-
} catch (
|
|
4463
|
-
console.error("error",
|
|
4462
|
+
const u = await e.client.getSuggestions(e.productId);
|
|
4463
|
+
c === s.value && (i.value = u);
|
|
4464
|
+
} catch (u) {
|
|
4465
|
+
console.error("error", u);
|
|
4466
|
+
} finally {
|
|
4467
|
+
c === s.value && (t.value = !1);
|
|
4464
4468
|
}
|
|
4465
4469
|
};
|
|
4466
|
-
return _s(
|
|
4467
|
-
|
|
4468
|
-
|
|
4470
|
+
return _s(
|
|
4471
|
+
() => [e.client, e.productId],
|
|
4472
|
+
() => {
|
|
4473
|
+
l();
|
|
4474
|
+
},
|
|
4475
|
+
{ immediate: !0 }
|
|
4476
|
+
), (c, u) => (ie(), Ht(kl, {
|
|
4469
4477
|
theme: e.client.theme
|
|
4470
4478
|
}, {
|
|
4471
4479
|
default: An(() => {
|
|
4472
|
-
var
|
|
4480
|
+
var h;
|
|
4473
4481
|
return [
|
|
4474
4482
|
H("div", xl, [
|
|
4475
|
-
|
|
4476
|
-
title:
|
|
4477
|
-
description:
|
|
4483
|
+
Bt(el, {
|
|
4484
|
+
title: n.value,
|
|
4485
|
+
description: a.value
|
|
4478
4486
|
}, null, 8, ["title", "description"]),
|
|
4479
|
-
|
|
4487
|
+
Bt(fl, {
|
|
4480
4488
|
client: e.client,
|
|
4481
|
-
questions: (
|
|
4489
|
+
questions: (h = i.value) == null ? void 0 : h.questions,
|
|
4482
4490
|
"is-loading": t.value,
|
|
4483
4491
|
"product-id": e.productId,
|
|
4484
4492
|
"product-title": e.productTitle,
|
|
4485
4493
|
"selected-variant-id": e == null ? void 0 : e.selectedVariantId
|
|
4486
4494
|
}, null, 8, ["client", "questions", "is-loading", "product-id", "product-title", "selected-variant-id"]),
|
|
4487
|
-
e.enableInput ? (ie(),
|
|
4495
|
+
e.enableInput ? (ie(), Ht(El, {
|
|
4488
4496
|
key: 0,
|
|
4489
4497
|
client: e.client,
|
|
4490
|
-
placeholder:
|
|
4498
|
+
placeholder: o.value,
|
|
4491
4499
|
"product-id": e.productId,
|
|
4492
4500
|
"product-title": e.productTitle,
|
|
4493
4501
|
"selected-variant-id": e == null ? void 0 : e.selectedVariantId
|
|
@@ -4498,7 +4506,7 @@ const dl = /* @__PURE__ */ at(ul, [["render", hl], ["__scopeId", "data-v-26a64b5
|
|
|
4498
4506
|
_: 1
|
|
4499
4507
|
}, 8, ["theme"]));
|
|
4500
4508
|
}
|
|
4501
|
-
}), Cl = /* @__PURE__ */ at(Sl, [["__scopeId", "data-v-
|
|
4509
|
+
}), Cl = /* @__PURE__ */ at(Sl, [["__scopeId", "data-v-651875ac"]]);
|
|
4502
4510
|
export {
|
|
4503
4511
|
El as DialogInput,
|
|
4504
4512
|
Cl as DialogProductBlock
|