@brainfish-ai/web-tracker 0.0.14 → 0.0.15
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/index.cjs.js +5 -5
- package/dist/index.cjs.js.gz +0 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +148 -152
- package/dist/index.js.gz +0 -0
- package/dist/index.js.map +1 -1
- package/dist/src/record/index.d.ts +1 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ var lt = Math.pow, Aa = (t, e, a) => e in t ? Qn(t, e, { enumerable: !0, configu
|
|
|
10
10
|
ar.call(e, a) && Aa(t, a, e[a]);
|
|
11
11
|
return t;
|
|
12
12
|
}, Le = (t, e) => Xn(t, $n(e));
|
|
13
|
-
var
|
|
13
|
+
var N = (t, e, a) => Aa(t, typeof e != "symbol" ? e + "" : e, a);
|
|
14
14
|
var _ = (t, e, a) => new Promise((n, r) => {
|
|
15
15
|
var i = (l) => {
|
|
16
16
|
try {
|
|
@@ -33,7 +33,7 @@ const sa = /* @__PURE__ */ Object.create(null);
|
|
|
33
33
|
Object.keys(ve).forEach((t) => {
|
|
34
34
|
sa[ve[t]] = t;
|
|
35
35
|
});
|
|
36
|
-
const Oa = { type: "error", data: "parser error" },
|
|
36
|
+
const Oa = { type: "error", data: "parser error" }, Ut = typeof Blob == "function" || typeof Blob != "undefined" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", Pt = typeof ArrayBuffer == "function", Zt = (t) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(t) : t && t.buffer instanceof ArrayBuffer, Ha = ({ type: t, data: e }, a, n) => Ut && e instanceof Blob ? a ? n(e) : ct(e, n) : Pt && (e instanceof ArrayBuffer || Zt(e)) ? a ? n(e) : ct(new Blob([e]), n) : n(ve[t] + (e || "")), ct = (t, e) => {
|
|
37
37
|
const a = new FileReader();
|
|
38
38
|
return a.onload = function() {
|
|
39
39
|
const n = a.result.split(",")[1];
|
|
@@ -66,7 +66,7 @@ const nr = typeof ArrayBuffer == "function", Ya = (t, e) => {
|
|
|
66
66
|
function ir() {
|
|
67
67
|
return new TransformStream({ transform(t, e) {
|
|
68
68
|
(function(a, n) {
|
|
69
|
-
|
|
69
|
+
Ut && a.data instanceof Blob ? a.data.arrayBuffer().then(ht).then(n) : Pt && (a.data instanceof ArrayBuffer || Zt(a.data)) ? n(ht(a.data)) : Ha(a, !1, (r) => {
|
|
70
70
|
za || (za = new TextEncoder()), n(za.encode(r));
|
|
71
71
|
});
|
|
72
72
|
})(t, (a) => {
|
|
@@ -1276,9 +1276,9 @@ function ha(t, e) {
|
|
|
1276
1276
|
Object.assign(ha, { Manager: qa, Socket: $t, io: ha, connect: ha });
|
|
1277
1277
|
class Tr {
|
|
1278
1278
|
constructor(e) {
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1279
|
+
N(this, "socket");
|
|
1280
|
+
N(this, "encode");
|
|
1281
|
+
N(this, "decode");
|
|
1282
1282
|
var a, n;
|
|
1283
1283
|
this.socket = ha(e.baseUrl, { transports: ["websocket"], path: "/analytics/ws", auth: { token: e.authToken }, query: e.query }), this.encode = (a = e.encoder) != null ? a : (r) => function(i) {
|
|
1284
1284
|
const o = new TextEncoder().encode(i);
|
|
@@ -1307,8 +1307,8 @@ class Tr {
|
|
|
1307
1307
|
}
|
|
1308
1308
|
class xr {
|
|
1309
1309
|
constructor(e) {
|
|
1310
|
-
|
|
1311
|
-
|
|
1310
|
+
N(this, "defaultTTL");
|
|
1311
|
+
N(this, "items");
|
|
1312
1312
|
if (this.defaultTTL = e, e <= 0) throw new Error("Default TTL must be a positive number.");
|
|
1313
1313
|
this.items = /* @__PURE__ */ new Map(), this.defaultTTL = e, setInterval(() => this.cleanup(), e);
|
|
1314
1314
|
}
|
|
@@ -1347,14 +1347,14 @@ var gt, pt;
|
|
|
1347
1347
|
}(pt || (pt = {}));
|
|
1348
1348
|
class Rr {
|
|
1349
1349
|
constructor(e) {
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1350
|
+
N(this, "options");
|
|
1351
|
+
N(this, "client");
|
|
1352
|
+
N(this, "userId");
|
|
1353
|
+
N(this, "global");
|
|
1354
|
+
N(this, "queue", []);
|
|
1355
|
+
N(this, "knownEvents", ["nudge.show"]);
|
|
1356
|
+
N(this, "eventListeners", {});
|
|
1357
|
+
N(this, "recentNudgeIds", new xr(1e3));
|
|
1358
1358
|
this.options = e;
|
|
1359
1359
|
const a = { sdk_name: e.sdk || "node", sdk_version: e.sdkVersion || "" };
|
|
1360
1360
|
this.client = new Tr({ baseUrl: e.apiUrl || "https://analytic.brainfi.sh", authToken: e.accessKey, query: a }), this.setupIncomingPayloadHandler();
|
|
@@ -1763,7 +1763,7 @@ function It(t) {
|
|
|
1763
1763
|
}
|
|
1764
1764
|
return e;
|
|
1765
1765
|
}
|
|
1766
|
-
function
|
|
1766
|
+
function Wr(t, e) {
|
|
1767
1767
|
return _(this, null, function* () {
|
|
1768
1768
|
if (t.ownerDocument == null) throw new Error("Provided element is not within a Document");
|
|
1769
1769
|
const a = Ae(t.ownerDocument.styleSheets), n = yield function(r, i) {
|
|
@@ -1810,11 +1810,11 @@ function Ur(t, e) {
|
|
|
1810
1810
|
}(n);
|
|
1811
1811
|
});
|
|
1812
1812
|
}
|
|
1813
|
-
function
|
|
1813
|
+
function Ur(t, e) {
|
|
1814
1814
|
return _(this, null, function* () {
|
|
1815
1815
|
const a = e.fontEmbedCSS != null ? e.fontEmbedCSS : e.skipFonts ? null : yield function(n, r) {
|
|
1816
1816
|
return _(this, null, function* () {
|
|
1817
|
-
const i = yield
|
|
1817
|
+
const i = yield Wr(n, r);
|
|
1818
1818
|
return (yield Promise.all(i.map((o) => {
|
|
1819
1819
|
const s = o.parentStyleSheet ? o.parentStyleSheet.href : null;
|
|
1820
1820
|
return rn(o.cssText, s, r);
|
|
@@ -1831,7 +1831,7 @@ function Wr(t, e) {
|
|
|
1831
1831
|
function Pr(a) {
|
|
1832
1832
|
return _(this, arguments, function* (t, e = {}) {
|
|
1833
1833
|
const { width: n, height: r } = en(t, e), i = yield ya(t, e, !0);
|
|
1834
|
-
return yield
|
|
1834
|
+
return yield Ur(i, e), yield on(i, e), function(o, s) {
|
|
1835
1835
|
const { style: l } = o;
|
|
1836
1836
|
s.backgroundColor && (l.backgroundColor = s.backgroundColor), s.width && (l.width = `${s.width}px`), s.height && (l.height = `${s.height}px`);
|
|
1837
1837
|
const c = s.style;
|
|
@@ -1905,8 +1905,8 @@ function sn(t) {
|
|
|
1905
1905
|
}
|
|
1906
1906
|
class ln {
|
|
1907
1907
|
constructor({ replaceWith: e = sn("default").toUpperCase(), regexpPattern: a }) {
|
|
1908
|
-
|
|
1909
|
-
|
|
1908
|
+
N(this, "regexpMatcher");
|
|
1909
|
+
N(this, "replaceWith");
|
|
1910
1910
|
this.replaceWith = e, this.regexpMatcher = a;
|
|
1911
1911
|
}
|
|
1912
1912
|
redact(e) {
|
|
@@ -1918,8 +1918,8 @@ function St(t) {
|
|
|
1918
1918
|
}
|
|
1919
1919
|
class Jr {
|
|
1920
1920
|
constructor(e) {
|
|
1921
|
-
|
|
1922
|
-
|
|
1921
|
+
N(this, "childRedactors", []);
|
|
1922
|
+
N(this, "redact", (e) => {
|
|
1923
1923
|
for (const a of this.childRedactors) e = a.redact(e);
|
|
1924
1924
|
return e;
|
|
1925
1925
|
});
|
|
@@ -1978,7 +1978,7 @@ function Je(t) {
|
|
|
1978
1978
|
function Qe(t) {
|
|
1979
1979
|
return Object.prototype.toString.call(t) === "[object ShadowRoot]";
|
|
1980
1980
|
}
|
|
1981
|
-
function
|
|
1981
|
+
function Wa(t) {
|
|
1982
1982
|
try {
|
|
1983
1983
|
var e = t.rules || t.cssRules;
|
|
1984
1984
|
return e ? ((a = Array.from(e).map(cn).join("")).includes(" background-clip: text;") && !a.includes(" -webkit-background-clip: text;") && (a = a.replace(" background-clip: text;", " -webkit-background-clip: text; background-clip: text;")), a) : null;
|
|
@@ -1992,7 +1992,7 @@ function cn(t) {
|
|
|
1992
1992
|
if (function(a) {
|
|
1993
1993
|
return "styleSheet" in a;
|
|
1994
1994
|
}(t)) try {
|
|
1995
|
-
e =
|
|
1995
|
+
e = Wa(t.styleSheet) || e;
|
|
1996
1996
|
} catch (a) {
|
|
1997
1997
|
}
|
|
1998
1998
|
return e;
|
|
@@ -2073,7 +2073,7 @@ function Ge(t, e) {
|
|
|
2073
2073
|
function si(t) {
|
|
2074
2074
|
return !!(t.tagName === "svg" || t.ownerSVGElement);
|
|
2075
2075
|
}
|
|
2076
|
-
function
|
|
2076
|
+
function Ua() {
|
|
2077
2077
|
var t = document.createElement("a");
|
|
2078
2078
|
return t.href = "", t.href;
|
|
2079
2079
|
}
|
|
@@ -2110,7 +2110,7 @@ function un(t, e, a, n) {
|
|
|
2110
2110
|
}
|
|
2111
2111
|
}
|
|
2112
2112
|
return l.join(", ");
|
|
2113
|
-
}(t, n) : a === "style" && n ? ua(n,
|
|
2113
|
+
}(t, n) : a === "style" && n ? ua(n, Ua()) : e === "object" && a === "data" && n ? Ge(t, n) : n : Ge(t, n);
|
|
2114
2114
|
}
|
|
2115
2115
|
function fa(t, e, a) {
|
|
2116
2116
|
if (!t) return !1;
|
|
@@ -2143,7 +2143,7 @@ function li(t, e) {
|
|
|
2143
2143
|
return { type: ie.DocumentType, name: t.name, publicId: t.publicId, systemId: t.systemId, rootId: M };
|
|
2144
2144
|
case t.ELEMENT_NODE:
|
|
2145
2145
|
return function(k, I) {
|
|
2146
|
-
for (var m = I.doc, w = I.blockClass, y = I.blockSelector, z = I.inlineStylesheet, S = I.maskInputOptions, E = S === void 0 ? {} : S, x = I.maskInputFn, f = I.dataURLOptions, F = f === void 0 ? {} : f,
|
|
2146
|
+
for (var m = I.doc, w = I.blockClass, y = I.blockSelector, z = I.inlineStylesheet, S = I.maskInputOptions, E = S === void 0 ? {} : S, x = I.maskInputFn, f = I.dataURLOptions, F = f === void 0 ? {} : f, U = I.inlineImages, D = I.recordCanvas, me = I.keepIframeSrcFn, ne = I.newlyAddedElement, ce = ne !== void 0 && ne, oe = I.rootId, W = function(ee, ge, ke) {
|
|
2147
2147
|
if (typeof ge == "string") {
|
|
2148
2148
|
if (ee.classList.contains(ge)) return !0;
|
|
2149
2149
|
} else for (var Ce = ee.classList.length; Ce--; ) {
|
|
@@ -2155,7 +2155,7 @@ function li(t, e) {
|
|
|
2155
2155
|
if (ee instanceof HTMLFormElement) return "form";
|
|
2156
2156
|
var ge = ee.tagName.toLowerCase().trim();
|
|
2157
2157
|
return ai.test(ge) ? "div" : ge;
|
|
2158
|
-
}(k), O = {},
|
|
2158
|
+
}(k), O = {}, R = k.attributes.length, Y = 0; Y < R; Y++) {
|
|
2159
2159
|
var X = k.attributes[Y];
|
|
2160
2160
|
O[X.name] = un(m, P, X.name, X.value);
|
|
2161
2161
|
}
|
|
@@ -2163,9 +2163,9 @@ function li(t, e) {
|
|
|
2163
2163
|
var J = Array.from(m.styleSheets).find(function(ee) {
|
|
2164
2164
|
return ee.href === k.href;
|
|
2165
2165
|
}), re = null;
|
|
2166
|
-
J && (re =
|
|
2166
|
+
J && (re = Wa(J)), re && (delete O.rel, delete O.href, O._cssText = ua(re, J.href));
|
|
2167
2167
|
}
|
|
2168
|
-
if (P === "style" && k.sheet && !(k.innerText || k.textContent || "").trim().length && (re =
|
|
2168
|
+
if (P === "style" && k.sheet && !(k.innerText || k.textContent || "").trim().length && (re = Wa(k.sheet)) && (O._cssText = ua(re, Ua())), P === "input" || P === "textarea" || P === "select") {
|
|
2169
2169
|
var L = k.value, A = k.checked;
|
|
2170
2170
|
O.type !== "radio" && O.type !== "checkbox" && O.type !== "submit" && O.type !== "button" && L ? O.value = at({ type: O.type, tagName: P, value: L, maskInputOptions: E, maskInputFn: x }) : A && (O.checked = A);
|
|
2171
2171
|
}
|
|
@@ -2186,7 +2186,7 @@ function li(t, e) {
|
|
|
2186
2186
|
K.width = k.width, K.height = k.height, G !== K.toDataURL(F.type, F.quality) && (O.rr_dataURL = G);
|
|
2187
2187
|
}
|
|
2188
2188
|
}
|
|
2189
|
-
if (P === "img" &&
|
|
2189
|
+
if (P === "img" && U) {
|
|
2190
2190
|
Fe || (Fe = m.createElement("canvas"), zt = Fe.getContext("2d"));
|
|
2191
2191
|
var Q = k, Z = Q.crossOrigin;
|
|
2192
2192
|
Q.crossOrigin = "anonymous";
|
|
@@ -2200,26 +2200,26 @@ function li(t, e) {
|
|
|
2200
2200
|
};
|
|
2201
2201
|
Q.complete && Q.naturalWidth !== 0 ? ye() : Q.onload = ye;
|
|
2202
2202
|
}
|
|
2203
|
-
if (P !== "audio" && P !== "video" || (O.rr_mediaState = k.paused ? "paused" : "played", O.rr_mediaCurrentTime = k.currentTime), ce || (k.scrollLeft && (O.rr_scrollLeft = k.scrollLeft), k.scrollTop && (O.rr_scrollTop = k.scrollTop)),
|
|
2203
|
+
if (P !== "audio" && P !== "video" || (O.rr_mediaState = k.paused ? "paused" : "played", O.rr_mediaCurrentTime = k.currentTime), ce || (k.scrollLeft && (O.rr_scrollLeft = k.scrollLeft), k.scrollTop && (O.rr_scrollTop = k.scrollTop)), W) {
|
|
2204
2204
|
var ze = k.getBoundingClientRect(), Oe = ze.width, $e = ze.height;
|
|
2205
2205
|
O = { class: O.class, rr_width: "".concat(Oe, "px"), rr_height: "".concat($e, "px") };
|
|
2206
2206
|
}
|
|
2207
|
-
return P !== "iframe" || me(O.src) || (k.contentDocument || (O.rr_src = O.src), delete O.src), { type: ie.Element, tagName: P, attributes: O, childNodes: [], isSVG: si(k) || void 0, needBlock:
|
|
2207
|
+
return P !== "iframe" || me(O.src) || (k.contentDocument || (O.rr_src = O.src), delete O.src), { type: ie.Element, tagName: P, attributes: O, childNodes: [], isSVG: si(k) || void 0, needBlock: W, rootId: oe };
|
|
2208
2208
|
}(t, { doc: a, blockClass: r, blockSelector: i, inlineStylesheet: l, maskInputOptions: h, maskInputFn: u, dataURLOptions: v, inlineImages: T, recordCanvas: p, keepIframeSrcFn: g, newlyAddedElement: j, rootId: M });
|
|
2209
2209
|
case t.TEXT_NODE:
|
|
2210
2210
|
return function(k, I) {
|
|
2211
2211
|
var m, w = I.maskTextClass, y = I.maskTextSelector, z = I.maskTextFn, S = I.rootId, E = k.parentNode && k.parentNode.tagName, x = k.textContent, f = E === "STYLE" || void 0, F = E === "SCRIPT" || void 0;
|
|
2212
2212
|
if (f && x) {
|
|
2213
2213
|
try {
|
|
2214
|
-
k.nextSibling || k.previousSibling || !((m = k.parentNode.sheet) === null || m === void 0) && m.cssRules && (x = (
|
|
2214
|
+
k.nextSibling || k.previousSibling || !((m = k.parentNode.sheet) === null || m === void 0) && m.cssRules && (x = (U = k.parentNode.sheet).cssRules ? Array.from(U.cssRules).map(function(D) {
|
|
2215
2215
|
return D.cssText || "";
|
|
2216
2216
|
}).join("") : "");
|
|
2217
2217
|
} catch (D) {
|
|
2218
2218
|
console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(D), k);
|
|
2219
2219
|
}
|
|
2220
|
-
x = ua(x,
|
|
2220
|
+
x = ua(x, Ua());
|
|
2221
2221
|
}
|
|
2222
|
-
var
|
|
2222
|
+
var U;
|
|
2223
2223
|
return F && (x = "SCRIPT_PLACEHOLDER"), !f && !F && x && mn(k, w, y) && (x = z ? z(x) : x.replace(/[\S]/g, "*")), { type: ie.Text, textContent: x || "", isStyle: f, rootId: S };
|
|
2224
2224
|
}(t, { maskTextClass: o, maskTextSelector: s, maskTextFn: d, rootId: M });
|
|
2225
2225
|
case t.CDATA_SECTION_NODE:
|
|
@@ -2233,35 +2233,35 @@ function li(t, e) {
|
|
|
2233
2233
|
function H(t) {
|
|
2234
2234
|
return t === void 0 ? "" : t.toLowerCase();
|
|
2235
2235
|
}
|
|
2236
|
-
function
|
|
2237
|
-
var a, n = e.doc, r = e.mirror, i = e.blockClass, o = e.blockSelector, s = e.maskTextClass, l = e.maskTextSelector, c = e.skipChild, h = c !== void 0 && c, d = e.inlineStylesheet, u = d === void 0 || d, b = e.maskInputOptions, v = b === void 0 ? {} : b, T = e.maskTextFn, p = e.maskInputFn, g = e.slimDOMOptions, C = e.dataURLOptions, j = C === void 0 ? {} : C, M = e.inlineImages, k = M !== void 0 && M, I = e.recordCanvas, m = I !== void 0 && I, w = e.onSerialize, y = e.onIframeLoad, z = e.iframeLoadTimeout, S = z === void 0 ? 5e3 : z, E = e.onStylesheetLoad, x = e.stylesheetLoadTimeout, f = x === void 0 ? 5e3 : x, F = e.keepIframeSrcFn,
|
|
2236
|
+
function We(t, e) {
|
|
2237
|
+
var a, n = e.doc, r = e.mirror, i = e.blockClass, o = e.blockSelector, s = e.maskTextClass, l = e.maskTextSelector, c = e.skipChild, h = c !== void 0 && c, d = e.inlineStylesheet, u = d === void 0 || d, b = e.maskInputOptions, v = b === void 0 ? {} : b, T = e.maskTextFn, p = e.maskInputFn, g = e.slimDOMOptions, C = e.dataURLOptions, j = C === void 0 ? {} : C, M = e.inlineImages, k = M !== void 0 && M, I = e.recordCanvas, m = I !== void 0 && I, w = e.onSerialize, y = e.onIframeLoad, z = e.iframeLoadTimeout, S = z === void 0 ? 5e3 : z, E = e.onStylesheetLoad, x = e.stylesheetLoadTimeout, f = x === void 0 ? 5e3 : x, F = e.keepIframeSrcFn, U = F === void 0 ? function() {
|
|
2238
2238
|
return !1;
|
|
2239
|
-
} : F, D = e.newlyAddedElement, me = D !== void 0 && D, ne = e.preserveWhiteSpace, ce = ne === void 0 || ne, oe = li(t, { doc: n, mirror: r, blockClass: i, blockSelector: o, maskTextClass: s, maskTextSelector: l, inlineStylesheet: u, maskInputOptions: v, maskTextFn: T, maskInputFn: p, dataURLOptions: j, inlineImages: k, recordCanvas: m, keepIframeSrcFn:
|
|
2239
|
+
} : F, D = e.newlyAddedElement, me = D !== void 0 && D, ne = e.preserveWhiteSpace, ce = ne === void 0 || ne, oe = li(t, { doc: n, mirror: r, blockClass: i, blockSelector: o, maskTextClass: s, maskTextSelector: l, inlineStylesheet: u, maskInputOptions: v, maskTextFn: T, maskInputFn: p, dataURLOptions: j, inlineImages: k, recordCanvas: m, keepIframeSrcFn: U, newlyAddedElement: me });
|
|
2240
2240
|
if (!oe) return console.warn(t, "not serialized"), null;
|
|
2241
2241
|
a = r.hasNode(t) ? r.getId(t) : !function(A, G) {
|
|
2242
2242
|
return !!(G.comment && A.type === ie.Comment || A.type === ie.Element && (G.script && (A.tagName === "script" || A.tagName === "link" && A.attributes.rel === "preload" && A.attributes.as === "script" || A.tagName === "link" && A.attributes.rel === "prefetch" && typeof A.attributes.href == "string" && A.attributes.href.endsWith(".js")) || G.headFavicon && (A.tagName === "link" && A.attributes.rel === "shortcut icon" || A.tagName === "meta" && (H(A.attributes.name).match(/^msapplication-tile(image|color)$/) || H(A.attributes.name) === "application-name" || H(A.attributes.rel) === "icon" || H(A.attributes.rel) === "apple-touch-icon" || H(A.attributes.rel) === "shortcut icon")) || A.tagName === "meta" && (G.headMetaDescKeywords && H(A.attributes.name).match(/^description|keywords$/) || G.headMetaSocial && (H(A.attributes.property).match(/^(og|twitter|fb):/) || H(A.attributes.name).match(/^(og|twitter):/) || H(A.attributes.name) === "pinterest") || G.headMetaRobots && (H(A.attributes.name) === "robots" || H(A.attributes.name) === "googlebot" || H(A.attributes.name) === "bingbot") || G.headMetaHttpEquiv && A.attributes["http-equiv"] !== void 0 || G.headMetaAuthorship && (H(A.attributes.name) === "author" || H(A.attributes.name) === "generator" || H(A.attributes.name) === "framework" || H(A.attributes.name) === "publisher" || H(A.attributes.name) === "progid" || H(A.attributes.property).match(/^article:/) || H(A.attributes.property).match(/^product:/)) || G.headMetaVerification && (H(A.attributes.name) === "google-site-verification" || H(A.attributes.name) === "yandex-verification" || H(A.attributes.name) === "csrf-token" || H(A.attributes.name) === "p:domain_verify" || H(A.attributes.name) === "verify-v1" || H(A.attributes.name) === "verification" || H(A.attributes.name) === "shopify-checkout-api-token"))));
|
|
2243
2243
|
}(oe, g) && (ce || oe.type !== ie.Text || oe.isStyle || oe.textContent.replace(/^\s+|\s+$/gm, "").length) ? dn() : -2;
|
|
2244
|
-
var
|
|
2245
|
-
if (r.add(t,
|
|
2244
|
+
var W = Object.assign(oe, { id: a });
|
|
2245
|
+
if (r.add(t, W), a === -2) return null;
|
|
2246
2246
|
w && w(t);
|
|
2247
2247
|
var P = !h;
|
|
2248
|
-
if (
|
|
2249
|
-
P = P && !
|
|
2248
|
+
if (W.type === ie.Element) {
|
|
2249
|
+
P = P && !W.needBlock, delete W.needBlock;
|
|
2250
2250
|
var O = t.shadowRoot;
|
|
2251
|
-
O && Qe(O) && (
|
|
2251
|
+
O && Qe(O) && (W.isShadowHost = !0);
|
|
2252
2252
|
}
|
|
2253
|
-
if ((
|
|
2254
|
-
g.headWhitespace &&
|
|
2255
|
-
for (var
|
|
2256
|
-
(L =
|
|
2253
|
+
if ((W.type === ie.Document || W.type === ie.Element) && P) {
|
|
2254
|
+
g.headWhitespace && W.type === ie.Element && W.tagName === "head" && (ce = !1);
|
|
2255
|
+
for (var R = { doc: n, mirror: r, blockClass: i, blockSelector: o, maskTextClass: s, maskTextSelector: l, skipChild: h, inlineStylesheet: u, maskInputOptions: v, maskTextFn: T, maskInputFn: p, slimDOMOptions: g, dataURLOptions: j, inlineImages: k, recordCanvas: m, preserveWhiteSpace: ce, onSerialize: w, onIframeLoad: y, iframeLoadTimeout: S, onStylesheetLoad: E, stylesheetLoadTimeout: f, keepIframeSrcFn: U }, Y = 0, X = Array.from(t.childNodes); Y < X.length; Y++)
|
|
2256
|
+
(L = We(X[Y], R)) && W.childNodes.push(L);
|
|
2257
2257
|
if (function(A) {
|
|
2258
2258
|
return A.nodeType === A.ELEMENT_NODE;
|
|
2259
2259
|
}(t) && t.shadowRoot) for (var J = 0, re = Array.from(t.shadowRoot.childNodes); J < re.length; J++) {
|
|
2260
2260
|
var L;
|
|
2261
|
-
(L =
|
|
2261
|
+
(L = We(re[J], R)) && (Qe(t.shadowRoot) && (L.isShadow = !0), W.childNodes.push(L));
|
|
2262
2262
|
}
|
|
2263
2263
|
}
|
|
2264
|
-
return t.parentNode && Je(t.parentNode) && Qe(t.parentNode) && (
|
|
2264
|
+
return t.parentNode && Je(t.parentNode) && Qe(t.parentNode) && (W.isShadow = !0), W.type === ie.Element && W.tagName === "iframe" && function(A, G, K) {
|
|
2265
2265
|
var Q = A.contentWindow;
|
|
2266
2266
|
if (Q) {
|
|
2267
2267
|
var Z, ye = !1;
|
|
@@ -2286,10 +2286,10 @@ function Ue(t, e) {
|
|
|
2286
2286
|
}(t, function() {
|
|
2287
2287
|
var A = t.contentDocument;
|
|
2288
2288
|
if (A && y) {
|
|
2289
|
-
var G =
|
|
2289
|
+
var G = We(A, { doc: A, mirror: r, blockClass: i, blockSelector: o, maskTextClass: s, maskTextSelector: l, skipChild: !1, inlineStylesheet: u, maskInputOptions: v, maskTextFn: T, maskInputFn: p, slimDOMOptions: g, dataURLOptions: j, inlineImages: k, recordCanvas: m, preserveWhiteSpace: ce, onSerialize: w, onIframeLoad: y, iframeLoadTimeout: S, onStylesheetLoad: E, stylesheetLoadTimeout: f, keepIframeSrcFn: U });
|
|
2290
2290
|
G && y(t, G);
|
|
2291
2291
|
}
|
|
2292
|
-
}, S),
|
|
2292
|
+
}, S), W.type === ie.Element && W.tagName === "link" && W.attributes.rel === "stylesheet" && function(A, G, K) {
|
|
2293
2293
|
var Q, Z = !1;
|
|
2294
2294
|
try {
|
|
2295
2295
|
Q = A.sheet;
|
|
@@ -2306,10 +2306,10 @@ function Ue(t, e) {
|
|
|
2306
2306
|
}
|
|
2307
2307
|
}(t, function() {
|
|
2308
2308
|
if (E) {
|
|
2309
|
-
var A =
|
|
2309
|
+
var A = We(t, { doc: n, mirror: r, blockClass: i, blockSelector: o, maskTextClass: s, maskTextSelector: l, skipChild: !1, inlineStylesheet: u, maskInputOptions: v, maskTextFn: T, maskInputFn: p, slimDOMOptions: g, dataURLOptions: j, inlineImages: k, recordCanvas: m, preserveWhiteSpace: ce, onSerialize: w, onIframeLoad: y, iframeLoadTimeout: S, onStylesheetLoad: E, stylesheetLoadTimeout: f, keepIframeSrcFn: U });
|
|
2310
2310
|
A && E(t, A);
|
|
2311
2311
|
}
|
|
2312
|
-
}, f),
|
|
2312
|
+
}, f), W;
|
|
2313
2313
|
}
|
|
2314
2314
|
function se(t, e, a = document) {
|
|
2315
2315
|
const n = { capture: !0, passive: !0 };
|
|
@@ -2468,7 +2468,7 @@ class di {
|
|
|
2468
2468
|
if (!s.parentNode || v) return;
|
|
2469
2469
|
const T = Je(s.parentNode) ? this.mirror.getId(u) : this.mirror.getId(s.parentNode), p = n(s);
|
|
2470
2470
|
if (T === -1 || p === -1) return a.addNode(s);
|
|
2471
|
-
const g =
|
|
2471
|
+
const g = We(s, { doc: this.doc, mirror: this.mirror, blockClass: this.blockClass, blockSelector: this.blockSelector, maskTextClass: this.maskTextClass, maskTextSelector: this.maskTextSelector, skipChild: !0, newlyAddedElement: !0, inlineStylesheet: this.inlineStylesheet, maskInputOptions: this.maskInputOptions, maskTextFn: this.maskTextFn, maskInputFn: this.maskInputFn, slimDOMOptions: this.slimDOMOptions, dataURLOptions: this.dataURLOptions, recordCanvas: this.recordCanvas, inlineImages: this.inlineImages, onSerialize: (C) => {
|
|
2472
2472
|
bn(C, this.mirror) && this.iframeManager.addIframe(C), kn(C, this.mirror) && this.stylesheetManager.trackLinkElement(C), wn(s) && this.shadowDomManager.addShadowRoot(s.shadowRoot, this.doc);
|
|
2473
2473
|
}, onIframeLoad: (C, j) => {
|
|
2474
2474
|
this.iframeManager.attachIframe(C, j), this.shadowDomManager.observeAttachShadow(C);
|
|
@@ -2753,36 +2753,36 @@ function gi(t, e = {}) {
|
|
|
2753
2753
|
g === j && C === M || (p({ width: Number(M), height: Number(j) }), g = j, C = M);
|
|
2754
2754
|
}, 200), window);
|
|
2755
2755
|
}(t), l = function({ inputCb: p, doc: g, mirror: C, blockClass: j, blockSelector: M, ignoreClass: k, maskInputOptions: I, maskInputFn: m, sampling: w, userTriggeredOnInput: y }) {
|
|
2756
|
-
function z(
|
|
2757
|
-
let D = Xe(
|
|
2758
|
-
const me =
|
|
2756
|
+
function z(U) {
|
|
2757
|
+
let D = Xe(U);
|
|
2758
|
+
const me = U.isTrusted;
|
|
2759
2759
|
if (D && D.tagName === "OPTION" && (D = D.parentElement), !D || !D.tagName || mi.indexOf(D.tagName) < 0 || le(D, j, M, !0)) return;
|
|
2760
2760
|
const ne = D.type;
|
|
2761
2761
|
if (D.classList.contains(k)) return;
|
|
2762
2762
|
let ce = D.value, oe = !1;
|
|
2763
2763
|
ne === "radio" || ne === "checkbox" ? oe = D.checked : (I[D.tagName.toLowerCase()] || I[ne]) && (ce = at({ maskInputOptions: I, tagName: D.tagName, type: ne, value: ce, maskInputFn: m })), S(D, Nt({ text: ce, isChecked: oe, userTriggered: me }, y));
|
|
2764
|
-
const
|
|
2765
|
-
ne === "radio" &&
|
|
2764
|
+
const W = D.name;
|
|
2765
|
+
ne === "radio" && W && oe && g.querySelectorAll(`input[type="radio"][name="${W}"]`).forEach((P) => {
|
|
2766
2766
|
P !== D && S(P, Nt({ text: P.value, isChecked: !oe, userTriggered: !1 }, y));
|
|
2767
2767
|
});
|
|
2768
2768
|
}
|
|
2769
|
-
function S(
|
|
2770
|
-
const me = Mt.get(
|
|
2769
|
+
function S(U, D) {
|
|
2770
|
+
const me = Mt.get(U);
|
|
2771
2771
|
if (!me || me.text !== D.text || me.isChecked !== D.isChecked) {
|
|
2772
|
-
Mt.set(
|
|
2773
|
-
const ne = C.getId(
|
|
2772
|
+
Mt.set(U, D);
|
|
2773
|
+
const ne = C.getId(U);
|
|
2774
2774
|
p(Object.assign(Object.assign({}, D), { id: ne }));
|
|
2775
2775
|
}
|
|
2776
2776
|
}
|
|
2777
|
-
const E = (w.input === "last" ? ["change"] : ["input", "change"]).map((
|
|
2777
|
+
const E = (w.input === "last" ? ["change"] : ["input", "change"]).map((U) => se(U, z, g)), x = g.defaultView;
|
|
2778
2778
|
if (!x) return () => {
|
|
2779
|
-
E.forEach((
|
|
2779
|
+
E.forEach((U) => U());
|
|
2780
2780
|
};
|
|
2781
2781
|
const f = x.Object.getOwnPropertyDescriptor(x.HTMLInputElement.prototype, "value"), F = [[x.HTMLInputElement.prototype, "value"], [x.HTMLInputElement.prototype, "checked"], [x.HTMLSelectElement.prototype, "value"], [x.HTMLTextAreaElement.prototype, "value"], [x.HTMLSelectElement.prototype, "selectedIndex"], [x.HTMLOptionElement.prototype, "selected"]];
|
|
2782
|
-
return f && f.set && E.push(...F.map((
|
|
2782
|
+
return f && f.set && E.push(...F.map((U) => Ia(U[0], U[1], { set() {
|
|
2783
2783
|
z({ target: this });
|
|
2784
2784
|
} }, !1, x))), () => {
|
|
2785
|
-
E.forEach((
|
|
2785
|
+
E.forEach((U) => U());
|
|
2786
2786
|
};
|
|
2787
2787
|
}(t), c = function({ mediaInteractionCb: p, blockClass: g, blockSelector: C, mirror: j, sampling: M }) {
|
|
2788
2788
|
const k = (m) => He((w) => {
|
|
@@ -2877,8 +2877,8 @@ function gi(t, e = {}) {
|
|
|
2877
2877
|
I = w.isCollapsed || !1;
|
|
2878
2878
|
const y = [], z = w.rangeCount || 0;
|
|
2879
2879
|
for (let S = 0; S < z; S++) {
|
|
2880
|
-
const E = w.getRangeAt(S), { startContainer: x, startOffset: f, endContainer: F, endOffset:
|
|
2881
|
-
le(x, j, M, !0) || le(F, j, M, !0) || y.push({ start: C.getId(x), startOffset: f, end: C.getId(F), endOffset:
|
|
2880
|
+
const E = w.getRangeAt(S), { startContainer: x, startOffset: f, endContainer: F, endOffset: U } = E;
|
|
2881
|
+
le(x, j, M, !0) || le(F, j, M, !0) || y.push({ start: C.getId(x), startOffset: f, end: C.getId(F), endOffset: U });
|
|
2882
2882
|
}
|
|
2883
2883
|
k({ ranges: y });
|
|
2884
2884
|
};
|
|
@@ -3348,15 +3348,15 @@ function Se(t = {}) {
|
|
|
3348
3348
|
let x = !1;
|
|
3349
3349
|
if (!E) try {
|
|
3350
3350
|
window.parent.document, x = !1;
|
|
3351
|
-
} catch (
|
|
3351
|
+
} catch (R) {
|
|
3352
3352
|
x = !0;
|
|
3353
3353
|
}
|
|
3354
3354
|
if (E && !e) throw new Error("emit function is required");
|
|
3355
3355
|
j !== void 0 && g.mousemove === void 0 && (g.mousemove = j), fe.reset();
|
|
3356
3356
|
const f = h === !0 ? { color: !0, date: !0, "datetime-local": !0, email: !0, month: !0, number: !0, range: !0, search: !0, tel: !0, text: !0, time: !0, url: !0, week: !0, textarea: !0, select: !0, password: !0 } : d !== void 0 ? d : { password: !0 }, F = u === !0 || u === "all" ? { script: !0, comment: !0, headFavicon: !0, headWhitespace: !0, headMetaSocial: !0, headMetaRobots: !0, headMetaHttpEquiv: !0, headMetaVerification: !0, headMetaAuthorship: u === "all", headMetaDescKeywords: u === "all" } : u || {};
|
|
3357
|
-
let
|
|
3358
|
-
(function(
|
|
3359
|
-
"NodeList" in
|
|
3357
|
+
let U;
|
|
3358
|
+
(function(R = window) {
|
|
3359
|
+
"NodeList" in R && !R.NodeList.prototype.forEach && (R.NodeList.prototype.forEach = Array.prototype.forEach), "DOMTokenList" in R && !R.DOMTokenList.prototype.forEach && (R.DOMTokenList.prototype.forEach = Array.prototype.forEach), Node.prototype.contains || (Node.prototype.contains = (...Y) => {
|
|
3360
3360
|
let X = Y[0];
|
|
3361
3361
|
if (!(0 in Y)) throw new TypeError("1 argument is required");
|
|
3362
3362
|
do
|
|
@@ -3366,73 +3366,73 @@ function Se(t = {}) {
|
|
|
3366
3366
|
});
|
|
3367
3367
|
})();
|
|
3368
3368
|
let D = 0;
|
|
3369
|
-
const me = (
|
|
3370
|
-
for (const Y of y || []) Y.eventProcessor && (
|
|
3371
|
-
return p && (
|
|
3369
|
+
const me = (R) => {
|
|
3370
|
+
for (const Y of y || []) Y.eventProcessor && (R = Y.eventProcessor(R));
|
|
3371
|
+
return p && (R = p(R)), R;
|
|
3372
3372
|
};
|
|
3373
|
-
$ = (
|
|
3373
|
+
$ = (R, Y) => {
|
|
3374
3374
|
var X;
|
|
3375
|
-
if (!(!((X = Me[0]) === null || X === void 0) && X.isFrozen()) ||
|
|
3375
|
+
if (!(!((X = Me[0]) === null || X === void 0) && X.isFrozen()) || R.type === q.FullSnapshot || R.type === q.IncrementalSnapshot && R.data.source === V.Mutation || Me.forEach((J) => J.unfreeze()), E) e == null || e(me(R), Y);
|
|
3376
3376
|
else if (x) {
|
|
3377
|
-
const J = { type: "rrweb", event: me(
|
|
3377
|
+
const J = { type: "rrweb", event: me(R), isCheckout: Y };
|
|
3378
3378
|
window.parent.postMessage(J, "*");
|
|
3379
3379
|
}
|
|
3380
|
-
if (
|
|
3381
|
-
else if (
|
|
3382
|
-
if (
|
|
3380
|
+
if (R.type === q.FullSnapshot) U = R, D = 0;
|
|
3381
|
+
else if (R.type === q.IncrementalSnapshot) {
|
|
3382
|
+
if (R.data.source === V.Mutation && R.data.isAttachIframe) return;
|
|
3383
3383
|
D++;
|
|
3384
|
-
const J = n && D >= n, re = a &&
|
|
3384
|
+
const J = n && D >= n, re = a && R.timestamp - U.timestamp > a;
|
|
3385
3385
|
(J || re) && ga(!0);
|
|
3386
3386
|
}
|
|
3387
3387
|
};
|
|
3388
|
-
const ne = (
|
|
3389
|
-
$(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.Mutation },
|
|
3390
|
-
}, ce = (
|
|
3391
|
-
for (const
|
|
3388
|
+
const ne = (R) => {
|
|
3389
|
+
$(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.Mutation }, R) }));
|
|
3390
|
+
}, ce = (R) => $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.Scroll }, R) })), oe = (R) => $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.CanvasMutation }, R) })), W = new Ai({ mutationCb: ne, adoptedStyleSheetCb: (R) => $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.AdoptedStyleSheet }, R) })) }), P = new pi({ mirror: fe, mutationCb: ne, stylesheetManager: W, recordCrossOriginIframes: k, wrappedEmit: $ });
|
|
3391
|
+
for (const R of y || []) R.getMirror && R.getMirror({ nodeMirror: fe, crossOriginIframeMirror: P.crossOriginIframeMirror, crossOriginIframeStyleMirror: P.crossOriginIframeStyleMirror });
|
|
3392
3392
|
Ma = new Si({ recordCanvas: M, mutationCb: oe, win: window, blockClass: r, blockSelector: i, mirror: fe, sampling: g.canvas, dataURLOptions: C });
|
|
3393
|
-
const O = new yi({ mutationCb: ne, scrollCb: ce, bypassOptions: { blockClass: r, blockSelector: i, maskTextClass: s, maskTextSelector: l, inlineStylesheet: c, maskInputOptions: f, dataURLOptions: C, maskTextFn: v, maskInputFn: b, recordCanvas: M, inlineImages: w, sampling: g, slimDOMOptions: F, iframeManager: P, stylesheetManager:
|
|
3394
|
-
ga = (
|
|
3393
|
+
const O = new yi({ mutationCb: ne, scrollCb: ce, bypassOptions: { blockClass: r, blockSelector: i, maskTextClass: s, maskTextSelector: l, inlineStylesheet: c, maskInputOptions: f, dataURLOptions: C, maskTextFn: v, maskInputFn: b, recordCanvas: M, inlineImages: w, sampling: g, slimDOMOptions: F, iframeManager: P, stylesheetManager: W, canvasManager: Ma, keepIframeSrcFn: z }, mirror: fe });
|
|
3394
|
+
ga = (R = !1) => {
|
|
3395
3395
|
var Y, X, J, re, L, A;
|
|
3396
|
-
$(te({ type: q.Meta, data: { href: window.location.href, width: pn(), height: gn() } }),
|
|
3396
|
+
$(te({ type: q.Meta, data: { href: window.location.href, width: pn(), height: gn() } }), R), W.reset(), Me.forEach((K) => K.lock());
|
|
3397
3397
|
const G = function(K, Q) {
|
|
3398
|
-
var Z = Q || {}, ye = Z.mirror, ze = ye === void 0 ? new hn() : ye, Oe = Z.blockClass, $e = Oe === void 0 ? "rr-block" : Oe, ee = Z.blockSelector, ge = ee === void 0 ? null : ee, ke = Z.maskTextClass, Ce = ke === void 0 ? "rr-mask" : ke, je = Z.maskTextSelector, Ca = je === void 0 ? null : je, ea = Z.inlineStylesheet, Bn = ea === void 0 || ea, tt = Z.inlineImages, qn = tt !== void 0 && tt, nt = Z.recordCanvas, Vn = nt !== void 0 && nt, rt = Z.maskAllInputs, Sa = rt !== void 0 && rt,
|
|
3399
|
-
return
|
|
3398
|
+
var Z = Q || {}, ye = Z.mirror, ze = ye === void 0 ? new hn() : ye, Oe = Z.blockClass, $e = Oe === void 0 ? "rr-block" : Oe, ee = Z.blockSelector, ge = ee === void 0 ? null : ee, ke = Z.maskTextClass, Ce = ke === void 0 ? "rr-mask" : ke, je = Z.maskTextSelector, Ca = je === void 0 ? null : je, ea = Z.inlineStylesheet, Bn = ea === void 0 || ea, tt = Z.inlineImages, qn = tt !== void 0 && tt, nt = Z.recordCanvas, Vn = nt !== void 0 && nt, rt = Z.maskAllInputs, Sa = rt !== void 0 && rt, Wn = Z.maskTextFn, Un = Z.maskInputFn, it = Z.slimDOM, Ue = it !== void 0 && it, Pn = Z.dataURLOptions, Zn = Z.preserveWhiteSpace, Gn = Z.onSerialize, Kn = Z.onIframeLoad, Hn = Z.iframeLoadTimeout, Yn = Z.onStylesheetLoad, Jn = Z.stylesheetLoadTimeout, ot = Z.keepIframeSrcFn;
|
|
3399
|
+
return We(K, { doc: K, mirror: ze, blockClass: $e, blockSelector: ge, maskTextClass: Ce, maskTextSelector: Ca, skipChild: !1, inlineStylesheet: Bn, maskInputOptions: Sa === !0 ? { color: !0, date: !0, "datetime-local": !0, email: !0, month: !0, number: !0, range: !0, search: !0, tel: !0, text: !0, time: !0, url: !0, week: !0, textarea: !0, select: !0, password: !0 } : Sa === !1 ? { password: !0 } : Sa, maskTextFn: Wn, maskInputFn: Un, slimDOMOptions: Ue === !0 || Ue === "all" ? { script: !0, comment: !0, headFavicon: !0, headWhitespace: !0, headMetaDescKeywords: Ue === "all", headMetaSocial: !0, headMetaRobots: !0, headMetaHttpEquiv: !0, headMetaAuthorship: !0, headMetaVerification: !0 } : Ue === !1 ? {} : Ue, dataURLOptions: Pn, inlineImages: qn, recordCanvas: Vn, preserveWhiteSpace: Zn, onSerialize: Gn, onIframeLoad: Kn, iframeLoadTimeout: Hn, onStylesheetLoad: Yn, stylesheetLoadTimeout: Jn, keepIframeSrcFn: ot === void 0 ? function() {
|
|
3400
3400
|
return !1;
|
|
3401
3401
|
} : ot, newlyAddedElement: !1 });
|
|
3402
3402
|
}(document, { mirror: fe, blockClass: r, blockSelector: i, maskTextClass: s, maskTextSelector: l, inlineStylesheet: c, maskAllInputs: f, maskTextFn: v, slimDOM: F, dataURLOptions: C, recordCanvas: M, inlineImages: w, onSerialize: (K) => {
|
|
3403
|
-
bn(K, fe) && P.addIframe(K), kn(K, fe) &&
|
|
3403
|
+
bn(K, fe) && P.addIframe(K), kn(K, fe) && W.trackLinkElement(K), wn(K) && O.addShadowRoot(K.shadowRoot, document);
|
|
3404
3404
|
}, onIframeLoad: (K, Q) => {
|
|
3405
3405
|
P.attachIframe(K, Q), O.observeAttachShadow(K);
|
|
3406
3406
|
}, onStylesheetLoad: (K, Q) => {
|
|
3407
|
-
|
|
3407
|
+
W.attachLinkElement(K, Q);
|
|
3408
3408
|
}, keepIframeSrcFn: z });
|
|
3409
3409
|
if (!G) return console.warn("Failed to snapshot the document");
|
|
3410
|
-
$(te({ type: q.FullSnapshot, data: { node: G, initialOffset: { left: window.pageXOffset !== void 0 ? window.pageXOffset : (document == null ? void 0 : document.documentElement.scrollLeft) || ((X = (Y = document == null ? void 0 : document.body) === null || Y === void 0 ? void 0 : Y.parentElement) === null || X === void 0 ? void 0 : X.scrollLeft) || ((J = document == null ? void 0 : document.body) === null || J === void 0 ? void 0 : J.scrollLeft) || 0, top: window.pageYOffset !== void 0 ? window.pageYOffset : (document == null ? void 0 : document.documentElement.scrollTop) || ((L = (re = document == null ? void 0 : document.body) === null || re === void 0 ? void 0 : re.parentElement) === null || L === void 0 ? void 0 : L.scrollTop) || ((A = document == null ? void 0 : document.body) === null || A === void 0 ? void 0 : A.scrollTop) || 0 } } })), Me.forEach((K) => K.unlock()), document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0 &&
|
|
3410
|
+
$(te({ type: q.FullSnapshot, data: { node: G, initialOffset: { left: window.pageXOffset !== void 0 ? window.pageXOffset : (document == null ? void 0 : document.documentElement.scrollLeft) || ((X = (Y = document == null ? void 0 : document.body) === null || Y === void 0 ? void 0 : Y.parentElement) === null || X === void 0 ? void 0 : X.scrollLeft) || ((J = document == null ? void 0 : document.body) === null || J === void 0 ? void 0 : J.scrollLeft) || 0, top: window.pageYOffset !== void 0 ? window.pageYOffset : (document == null ? void 0 : document.documentElement.scrollTop) || ((L = (re = document == null ? void 0 : document.body) === null || re === void 0 ? void 0 : re.parentElement) === null || L === void 0 ? void 0 : L.scrollTop) || ((A = document == null ? void 0 : document.body) === null || A === void 0 ? void 0 : A.scrollTop) || 0 } } })), Me.forEach((K) => K.unlock()), document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0 && W.adoptStyleSheets(document.adoptedStyleSheets, fe.getId(document));
|
|
3411
3411
|
};
|
|
3412
3412
|
try {
|
|
3413
|
-
const
|
|
3414
|
-
|
|
3413
|
+
const R = [];
|
|
3414
|
+
R.push(se("DOMContentLoaded", () => {
|
|
3415
3415
|
$(te({ type: q.DomContentLoaded, data: {} }));
|
|
3416
3416
|
}));
|
|
3417
3417
|
const Y = (J) => {
|
|
3418
3418
|
var re;
|
|
3419
3419
|
return gi({ mutationCb: ne, mousemoveCb: (L, A) => $(te({ type: q.IncrementalSnapshot, data: { source: A, positions: L } })), mouseInteractionCb: (L) => $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.MouseInteraction }, L) })), scrollCb: ce, viewportResizeCb: (L) => $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.ViewportResize }, L) })), inputCb: (L) => $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.Input }, L) })), mediaInteractionCb: (L) => $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.MediaInteraction }, L) })), styleSheetRuleCb: (L) => $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.StyleSheetRule }, L) })), styleDeclarationCb: (L) => $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.StyleDeclaration }, L) })), canvasMutationCb: oe, fontCb: (L) => $(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.Font }, L) })), selectionCb: (L) => {
|
|
3420
3420
|
$(te({ type: q.IncrementalSnapshot, data: Object.assign({ source: V.Selection }, L) }));
|
|
3421
|
-
}, blockClass: r, ignoreClass: o, maskTextClass: s, maskTextSelector: l, maskInputOptions: f, inlineStylesheet: c, sampling: g, recordCanvas: M, inlineImages: w, userTriggeredOnInput: I, collectFonts: m, doc: J, maskInputFn: b, maskTextFn: v, keepIframeSrcFn: z, blockSelector: i, slimDOMOptions: F, dataURLOptions: C, mirror: fe, iframeManager: P, stylesheetManager:
|
|
3421
|
+
}, blockClass: r, ignoreClass: o, maskTextClass: s, maskTextSelector: l, maskInputOptions: f, inlineStylesheet: c, sampling: g, recordCanvas: M, inlineImages: w, userTriggeredOnInput: I, collectFonts: m, doc: J, maskInputFn: b, maskTextFn: v, keepIframeSrcFn: z, blockSelector: i, slimDOMOptions: F, dataURLOptions: C, mirror: fe, iframeManager: P, stylesheetManager: W, shadowDomManager: O, canvasManager: Ma, ignoreCSSAttributes: S, plugins: ((re = y == null ? void 0 : y.filter((L) => L.observer)) === null || re === void 0 ? void 0 : re.map((L) => ({ observer: L.observer, options: L.options, callback: (A) => $(te({ type: q.Plugin, data: { plugin: L.name, payload: A } })) }))) || [] }, T);
|
|
3422
3422
|
};
|
|
3423
3423
|
P.addLoadListener((J) => {
|
|
3424
|
-
|
|
3424
|
+
R.push(Y(J.contentDocument));
|
|
3425
3425
|
});
|
|
3426
3426
|
const X = () => {
|
|
3427
|
-
ga(),
|
|
3427
|
+
ga(), R.push(Y(document)), ba = !0;
|
|
3428
3428
|
};
|
|
3429
|
-
return document.readyState === "interactive" || document.readyState === "complete" ? X() :
|
|
3429
|
+
return document.readyState === "interactive" || document.readyState === "complete" ? X() : R.push(se("load", () => {
|
|
3430
3430
|
$(te({ type: q.Load, data: {} })), X();
|
|
3431
3431
|
}, window)), () => {
|
|
3432
|
-
|
|
3432
|
+
R.forEach((J) => J()), ba = !1;
|
|
3433
3433
|
};
|
|
3434
|
-
} catch (
|
|
3435
|
-
console.warn(
|
|
3434
|
+
} catch (R) {
|
|
3435
|
+
console.warn(R);
|
|
3436
3436
|
}
|
|
3437
3437
|
}
|
|
3438
3438
|
Se.addCustomEvent = (t, e) => {
|
|
@@ -3622,8 +3622,8 @@ class xi extends Array {
|
|
|
3622
3622
|
}
|
|
3623
3623
|
class Ri {
|
|
3624
3624
|
constructor(e) {
|
|
3625
|
-
|
|
3626
|
-
|
|
3625
|
+
N(this, "agent");
|
|
3626
|
+
N(this, "eventBuffer");
|
|
3627
3627
|
this.agent = e, this.eventBuffer = new xi();
|
|
3628
3628
|
}
|
|
3629
3629
|
start() {
|
|
@@ -3645,10 +3645,10 @@ class Ri {
|
|
|
3645
3645
|
}
|
|
3646
3646
|
var pa = ((t) => (t[t.DomContentLoaded = 0] = "DomContentLoaded", t[t.Load = 1] = "Load", t[t.FullSnapshot = 2] = "FullSnapshot", t[t.IncrementalSnapshot = 3] = "IncrementalSnapshot", t[t.Meta = 4] = "Meta", t[t.Custom = 5] = "Custom", t[t.Plugin = 6] = "Plugin", t))(pa || {}), we = ((t) => (t[t.Mutation = 0] = "Mutation", t[t.MouseMove = 1] = "MouseMove", t[t.MouseInteraction = 2] = "MouseInteraction", t[t.Scroll = 3] = "Scroll", t[t.ViewportResize = 4] = "ViewportResize", t[t.Input = 5] = "Input", t[t.TouchMove = 6] = "TouchMove", t[t.MediaInteraction = 7] = "MediaInteraction", t[t.StyleSheetRule = 8] = "StyleSheetRule", t[t.CanvasMutation = 9] = "CanvasMutation", t[t.Font = 10] = "Font", t[t.Log = 11] = "Log", t[t.Drag = 12] = "Drag", t[t.StyleDeclaration = 13] = "StyleDeclaration", t[t.Selection = 14] = "Selection", t[t.AdoptedStyleSheet = 15] = "AdoptedStyleSheet", t[t.CustomElement = 16] = "CustomElement", t))(we || {}), On = ((t) => (t[t.MouseUp = 0] = "MouseUp", t[t.MouseDown = 1] = "MouseDown", t[t.Click = 2] = "Click", t[t.ContextMenu = 3] = "ContextMenu", t[t.DblClick = 4] = "DblClick", t[t.Focus = 5] = "Focus", t[t.Blur = 6] = "Blur", t[t.TouchStart = 7] = "TouchStart", t[t.TouchMove_Departed = 8] = "TouchMove_Departed", t[t.TouchEnd = 9] = "TouchEnd", t[t.TouchCancel = 10] = "TouchCancel", t))(On || {});
|
|
3647
3647
|
const Vt = { recordOptions: { blockClass: "data-bf-suppress", blockSelector: void 0, ignoreClass: "data-bf-ignore", ignoreCSSAttributes: void 0, maskTextClass: "data-bf-mask", maskTextSelector: void 0, maskAllInputs: !0, maskInputOptions: { password: !0 }, maskInputFn: void 0, maskTextFn: void 0 }, recordConsolePlugin: { level: ["error"], lengthThreshold: Number.POSITIVE_INFINITY, stringifyOptions: { stringLengthLimit: Number.POSITIVE_INFINITY, numOfKeysLimit: Number.POSITIVE_INFINITY, depthOfLimit: Number.POSITIVE_INFINITY } } };
|
|
3648
|
-
class
|
|
3648
|
+
class Wt {
|
|
3649
3649
|
constructor(e) {
|
|
3650
|
-
|
|
3651
|
-
|
|
3650
|
+
N(this, "options");
|
|
3651
|
+
N(this, "stop");
|
|
3652
3652
|
var a;
|
|
3653
3653
|
this.options = Le(de({}, Vt.recordOptions), { recordConsolePlugin: Vt.recordConsolePlugin, emit: e, plugins: [{ name: "rrweb/console@1", observer: Ti, options: a }] }), this.stop = null;
|
|
3654
3654
|
}
|
|
@@ -3668,9 +3668,9 @@ class Ut {
|
|
|
3668
3668
|
}
|
|
3669
3669
|
class Ni {
|
|
3670
3670
|
constructor(e) {
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3671
|
+
N(this, "recordingManager");
|
|
3672
|
+
N(this, "isRunning");
|
|
3673
|
+
N(this, "events");
|
|
3674
3674
|
this.recordingManager = e, this.isRunning = !1, this.events = [];
|
|
3675
3675
|
}
|
|
3676
3676
|
start() {
|
|
@@ -3859,10 +3859,10 @@ function Dn(t, e) {
|
|
|
3859
3859
|
const Li = [we.MouseMove, we.MouseInteraction, we.Scroll, we.ViewportResize, we.Input, we.TouchMove, we.MediaInteraction, we.Drag];
|
|
3860
3860
|
class Fi {
|
|
3861
3861
|
constructor(e) {
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
this.agent = e, this.recorder = new
|
|
3862
|
+
N(this, "agent");
|
|
3863
|
+
N(this, "recorder");
|
|
3864
|
+
N(this, "stasher");
|
|
3865
|
+
this.agent = e, this.recorder = new Wt(this.handleEvent.bind(this)), this.stasher = new Ni(this);
|
|
3866
3866
|
}
|
|
3867
3867
|
start() {
|
|
3868
3868
|
this.recorder.start();
|
|
@@ -3886,7 +3886,7 @@ class Fi {
|
|
|
3886
3886
|
this.agent.sender.handle(e), this.agent.timer && this.agent.timer.restart();
|
|
3887
3887
|
}
|
|
3888
3888
|
startRecorderWithStasher() {
|
|
3889
|
-
this.stasher.start(), this.recorder = new
|
|
3889
|
+
this.stasher.start(), this.recorder = new Wt(this.handleEvent.bind(this)), this.recorder.start();
|
|
3890
3890
|
}
|
|
3891
3891
|
isClick(e) {
|
|
3892
3892
|
return e.type === pa.IncrementalSnapshot && e.data.source === we.MouseInteraction && e.data.type === On.Click;
|
|
@@ -3904,9 +3904,9 @@ class Fi {
|
|
|
3904
3904
|
}
|
|
3905
3905
|
class Di {
|
|
3906
3906
|
constructor(e, a) {
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3907
|
+
N(this, "agent");
|
|
3908
|
+
N(this, "MAX_IDLE_TIME");
|
|
3909
|
+
N(this, "timeoutId");
|
|
3910
3910
|
this.agent = e, this.MAX_IDLE_TIME = a, this.timeoutId = 0;
|
|
3911
3911
|
}
|
|
3912
3912
|
restart() {
|
|
@@ -3921,9 +3921,9 @@ class Di {
|
|
|
3921
3921
|
}
|
|
3922
3922
|
const Re = class Re {
|
|
3923
3923
|
constructor() {
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3924
|
+
N(this, "sessionId", null);
|
|
3925
|
+
N(this, "lastScreenViewEventTime", 0);
|
|
3926
|
+
N(this, "isIdle", !1);
|
|
3927
3927
|
}
|
|
3928
3928
|
static getInstance() {
|
|
3929
3929
|
return Re.instance || (Re.instance = new Re()), Re.instance;
|
|
@@ -3956,29 +3956,28 @@ const Re = class Re {
|
|
|
3956
3956
|
return this.sessionId;
|
|
3957
3957
|
}
|
|
3958
3958
|
};
|
|
3959
|
-
|
|
3959
|
+
N(Re, "instance");
|
|
3960
3960
|
let ka = Re;
|
|
3961
3961
|
const Ne = class Ne {
|
|
3962
3962
|
constructor() {
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
R(this, "sessionCreationPromise", null);
|
|
3963
|
+
N(this, "recordingManager");
|
|
3964
|
+
N(this, "sender");
|
|
3965
|
+
N(this, "MAX_IDLE_TIME");
|
|
3966
|
+
N(this, "timer");
|
|
3967
|
+
N(this, "sendEvents");
|
|
3968
|
+
N(this, "sendScreenViewEvent");
|
|
3969
|
+
N(this, "recordingBlocklist", []);
|
|
3970
|
+
N(this, "_allowLocalhostRecording");
|
|
3971
|
+
N(this, "_allowScreenRecording");
|
|
3972
|
+
N(this, "sessionCreationPromise", null);
|
|
3974
3973
|
this.recordingManager = new Fi(this), this.sender = new Ri(this);
|
|
3975
3974
|
}
|
|
3976
3975
|
get sessionManager() {
|
|
3977
3976
|
return Ne._sessionManager;
|
|
3978
3977
|
}
|
|
3979
|
-
start(
|
|
3980
|
-
return _(this, arguments, function* ({
|
|
3981
|
-
this.
|
|
3978
|
+
start(o) {
|
|
3979
|
+
return _(this, arguments, function* ({ sendEvents: e, sendScreenViewEvent: a, recordingBlocklist: n, _allowLocalhostRecording: r, _allowScreenRecording: i }) {
|
|
3980
|
+
this.sendEvents = e, this.sendScreenViewEvent = a, this.recordingBlocklist = n, this._allowLocalhostRecording = r, this._allowScreenRecording = i, this.MAX_IDLE_TIME = 6e4, this.timer = new Di(this, this.MAX_IDLE_TIME), this.sender.start(), this.recordingManager.start();
|
|
3982
3981
|
});
|
|
3983
3982
|
}
|
|
3984
3983
|
handleTimeout() {
|
|
@@ -4005,17 +4004,17 @@ const Ne = class Ne {
|
|
|
4005
4004
|
});
|
|
4006
4005
|
}
|
|
4007
4006
|
};
|
|
4008
|
-
|
|
4007
|
+
N(Ne, "_sessionManager", ka.getInstance());
|
|
4009
4008
|
let Ka = Ne;
|
|
4010
|
-
const Bi = "0.0.
|
|
4009
|
+
const Bi = "0.0.15";
|
|
4011
4010
|
class Vi extends Rr {
|
|
4012
4011
|
constructor(a) {
|
|
4013
4012
|
super(de({ sdk: "web", sdkVersion: Bi }, a));
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4013
|
+
N(this, "lastPath", "");
|
|
4014
|
+
N(this, "debounceTimer", null);
|
|
4015
|
+
N(this, "agent");
|
|
4016
|
+
N(this, "sessionManager", ka.getInstance());
|
|
4017
|
+
N(this, "recordingBlocklist", []);
|
|
4019
4018
|
this.options = a, this.agent = new Ka(), this.recordingBlocklist = a.recordingBlocklist || [], this.isServer() || (this.setGlobalProperties({ __referrer: document.referrer }), this.options.trackOutgoingLinks && this.trackOutgoingLinks(), this.options.trackScreenViews && this.trackScreenViews(), this.options.trackAttributes && this.trackAttributes(), this.options.enableRecording && this.options._allowScreenRecording && this.startRecording());
|
|
4020
4019
|
}
|
|
4021
4020
|
debounce(a, n) {
|
|
@@ -4064,10 +4063,7 @@ class Vi extends Rr {
|
|
|
4064
4063
|
});
|
|
4065
4064
|
}
|
|
4066
4065
|
startRecording() {
|
|
4067
|
-
|
|
4068
|
-
const { apiUrl: a } = this.options;
|
|
4069
|
-
if (!a) throw new Error("API URL is required");
|
|
4070
|
-
this.agent.start({ endpoint: a, sendEvents: this.recordEventsToServer.bind(this), sendScreenViewEvent: this.sendScreenViewEvent.bind(this), recordingBlocklist: this.recordingBlocklist, _allowLocalhostRecording: this.options._allowLocalhostRecording });
|
|
4066
|
+
this.isServer() || this.agent.start({ sendEvents: this.recordEventsToServer.bind(this), sendScreenViewEvent: this.sendScreenViewEvent.bind(this), recordingBlocklist: this.recordingBlocklist, _allowLocalhostRecording: this.options._allowLocalhostRecording });
|
|
4071
4067
|
}
|
|
4072
4068
|
screenView(a, n) {
|
|
4073
4069
|
return _(this, null, function* () {
|