@appsurify-testmap/rrweb 2.1.0-alpha.3 → 2.1.0-alpha.5
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/rrweb.cjs +89 -137
- package/dist/rrweb.cjs.map +1 -1
- package/dist/rrweb.d.cts +4 -3
- package/dist/rrweb.d.ts +4 -3
- package/dist/rrweb.js +89 -137
- package/dist/rrweb.js.map +1 -1
- package/dist/rrweb.umd.cjs +89 -135
- package/dist/rrweb.umd.cjs.map +3 -3
- package/dist/rrweb.umd.min.cjs +24 -24
- package/dist/rrweb.umd.min.cjs.map +3 -3
- package/package.json +5 -5
package/dist/rrweb.umd.cjs
CHANGED
|
@@ -939,32 +939,14 @@ function transformAttribute(doc, tagName, name, value) {
|
|
|
939
939
|
}
|
|
940
940
|
return value;
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function ignoreAttribute(tagName, name, _value) {
|
|
943
943
|
return (tagName === "video" || tagName === "audio") && name === "autoplay";
|
|
944
944
|
}
|
|
945
|
-
function
|
|
946
|
-
|
|
947
|
-
const attributes = {};
|
|
948
|
-
const len = element.attributes.length;
|
|
949
|
-
for (let i2 = 0; i2 < len; i2++) {
|
|
950
|
-
const attr = element.attributes[i2];
|
|
951
|
-
const name = attr.name;
|
|
952
|
-
const value = attr.value;
|
|
953
|
-
const shouldIgnoreByName = typeof ignoreAttribute === "string" ? name === ignoreAttribute : ignoreAttribute.test(name);
|
|
954
|
-
if (!shouldIgnoreByName && !isIgnoreAttribute(tagName, name)) {
|
|
955
|
-
attributes[name] = transformAttribute(
|
|
956
|
-
doc,
|
|
957
|
-
tagName,
|
|
958
|
-
toLowerCase(name),
|
|
959
|
-
value
|
|
960
|
-
);
|
|
961
|
-
}
|
|
962
|
-
}
|
|
963
|
-
return attributes;
|
|
945
|
+
function isIncludeAttribute(name, include) {
|
|
946
|
+
return typeof include === "string" ? name.includes(include) : include.test(name);
|
|
964
947
|
}
|
|
965
|
-
function
|
|
966
|
-
|
|
967
|
-
return typeof ignore === "string" ? name === ignore : ignore.test(name);
|
|
948
|
+
function isExcludeAttribute(name, exclude) {
|
|
949
|
+
return typeof exclude === "string" ? name.includes(exclude) : exclude.test(name);
|
|
968
950
|
}
|
|
969
951
|
function _isBlockedElement(element, blockClass, blockSelector) {
|
|
970
952
|
try {
|
|
@@ -1095,7 +1077,8 @@ function serializeNode(n2, options) {
|
|
|
1095
1077
|
mirror: mirror2,
|
|
1096
1078
|
blockClass,
|
|
1097
1079
|
blockSelector,
|
|
1098
|
-
|
|
1080
|
+
excludeAttribute,
|
|
1081
|
+
includeAttribute,
|
|
1099
1082
|
needsMask,
|
|
1100
1083
|
inlineStylesheet,
|
|
1101
1084
|
maskInputOptions = {},
|
|
@@ -1141,7 +1124,8 @@ function serializeNode(n2, options) {
|
|
|
1141
1124
|
doc,
|
|
1142
1125
|
blockClass,
|
|
1143
1126
|
blockSelector,
|
|
1144
|
-
|
|
1127
|
+
excludeAttribute,
|
|
1128
|
+
includeAttribute,
|
|
1145
1129
|
inlineStylesheet,
|
|
1146
1130
|
maskInputOptions,
|
|
1147
1131
|
maskInputFn,
|
|
@@ -1219,7 +1203,8 @@ function serializeElementNode(n2, options) {
|
|
|
1219
1203
|
doc,
|
|
1220
1204
|
blockClass,
|
|
1221
1205
|
blockSelector,
|
|
1222
|
-
|
|
1206
|
+
excludeAttribute,
|
|
1207
|
+
includeAttribute,
|
|
1223
1208
|
inlineStylesheet,
|
|
1224
1209
|
maskInputOptions = {},
|
|
1225
1210
|
maskInputFn,
|
|
@@ -1233,7 +1218,22 @@ function serializeElementNode(n2, options) {
|
|
|
1233
1218
|
} = options;
|
|
1234
1219
|
const needBlock = _isBlockedElement(n2, blockClass, blockSelector);
|
|
1235
1220
|
const tagName = getValidTagName$1(n2);
|
|
1236
|
-
let attributes =
|
|
1221
|
+
let attributes = {};
|
|
1222
|
+
const len = n2.attributes.length;
|
|
1223
|
+
for (let i2 = 0; i2 < len; i2++) {
|
|
1224
|
+
const attr = n2.attributes[i2];
|
|
1225
|
+
if (isExcludeAttribute(attr.name, excludeAttribute) && !isIncludeAttribute(attr.name, includeAttribute)) {
|
|
1226
|
+
continue;
|
|
1227
|
+
}
|
|
1228
|
+
if (!ignoreAttribute(tagName, attr.name, attr.value)) {
|
|
1229
|
+
attributes[attr.name] = transformAttribute(
|
|
1230
|
+
doc,
|
|
1231
|
+
tagName,
|
|
1232
|
+
toLowerCase(attr.name),
|
|
1233
|
+
attr.value
|
|
1234
|
+
);
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
1237
|
if (tagName === "link" && inlineStylesheet) {
|
|
1238
1238
|
const stylesheet = Array.from(doc.styleSheets).find((s2) => {
|
|
1239
1239
|
return s2.href === n2.href;
|
|
@@ -1447,7 +1447,8 @@ function serializeNodeWithId(n2, options) {
|
|
|
1447
1447
|
blockSelector,
|
|
1448
1448
|
maskTextClass,
|
|
1449
1449
|
maskTextSelector,
|
|
1450
|
-
|
|
1450
|
+
excludeAttribute,
|
|
1451
|
+
includeAttribute,
|
|
1451
1452
|
skipChild = false,
|
|
1452
1453
|
inlineStylesheet = true,
|
|
1453
1454
|
maskInputOptions = {},
|
|
@@ -1482,7 +1483,8 @@ function serializeNodeWithId(n2, options) {
|
|
|
1482
1483
|
mirror: mirror2,
|
|
1483
1484
|
blockClass,
|
|
1484
1485
|
blockSelector,
|
|
1485
|
-
|
|
1486
|
+
excludeAttribute,
|
|
1487
|
+
includeAttribute,
|
|
1486
1488
|
needsMask,
|
|
1487
1489
|
inlineStylesheet,
|
|
1488
1490
|
maskInputOptions,
|
|
@@ -1535,7 +1537,8 @@ function serializeNodeWithId(n2, options) {
|
|
|
1535
1537
|
needsMask,
|
|
1536
1538
|
maskTextClass,
|
|
1537
1539
|
maskTextSelector,
|
|
1538
|
-
|
|
1540
|
+
excludeAttribute,
|
|
1541
|
+
includeAttribute,
|
|
1539
1542
|
skipChild,
|
|
1540
1543
|
inlineStylesheet,
|
|
1541
1544
|
maskInputOptions,
|
|
@@ -1595,7 +1598,8 @@ function serializeNodeWithId(n2, options) {
|
|
|
1595
1598
|
needsMask,
|
|
1596
1599
|
maskTextClass,
|
|
1597
1600
|
maskTextSelector,
|
|
1598
|
-
|
|
1601
|
+
excludeAttribute,
|
|
1602
|
+
includeAttribute,
|
|
1599
1603
|
skipChild: false,
|
|
1600
1604
|
inlineStylesheet,
|
|
1601
1605
|
maskInputOptions,
|
|
@@ -1637,7 +1641,8 @@ function serializeNodeWithId(n2, options) {
|
|
|
1637
1641
|
needsMask,
|
|
1638
1642
|
maskTextClass,
|
|
1639
1643
|
maskTextSelector,
|
|
1640
|
-
|
|
1644
|
+
excludeAttribute,
|
|
1645
|
+
includeAttribute,
|
|
1641
1646
|
skipChild: false,
|
|
1642
1647
|
inlineStylesheet,
|
|
1643
1648
|
maskInputOptions,
|
|
@@ -1675,7 +1680,8 @@ function snapshot(n2, options) {
|
|
|
1675
1680
|
blockSelector = null,
|
|
1676
1681
|
maskTextClass = "rr-mask",
|
|
1677
1682
|
maskTextSelector = null,
|
|
1678
|
-
|
|
1683
|
+
excludeAttribute = /^$a/,
|
|
1684
|
+
includeAttribute = /.+/i,
|
|
1679
1685
|
inlineStylesheet = true,
|
|
1680
1686
|
inlineImages = false,
|
|
1681
1687
|
recordCanvas = false,
|
|
@@ -1735,7 +1741,8 @@ function snapshot(n2, options) {
|
|
|
1735
1741
|
blockSelector,
|
|
1736
1742
|
maskTextClass,
|
|
1737
1743
|
maskTextSelector,
|
|
1738
|
-
|
|
1744
|
+
excludeAttribute,
|
|
1745
|
+
includeAttribute,
|
|
1739
1746
|
skipChild: false,
|
|
1740
1747
|
inlineStylesheet,
|
|
1741
1748
|
maskInputOptions,
|
|
@@ -10979,7 +10986,7 @@ function hookSetter(target, key, d, isRevoked, win = window) {
|
|
|
10979
10986
|
return () => hookSetter(target, key, original || {}, true);
|
|
10980
10987
|
}
|
|
10981
10988
|
function nowTimestamp() {
|
|
10982
|
-
return performance.timeOrigin + performance.now();
|
|
10989
|
+
return Math.round(performance.timeOrigin + performance.now());
|
|
10983
10990
|
}
|
|
10984
10991
|
function getWindowScroll(win = window) {
|
|
10985
10992
|
var _a2, _b, _c, _d;
|
|
@@ -11297,7 +11304,6 @@ var IncrementalSource = /* @__PURE__ */ ((IncrementalSource2) => {
|
|
|
11297
11304
|
IncrementalSource2[IncrementalSource2["Selection"] = 14] = "Selection";
|
|
11298
11305
|
IncrementalSource2[IncrementalSource2["AdoptedStyleSheet"] = 15] = "AdoptedStyleSheet";
|
|
11299
11306
|
IncrementalSource2[IncrementalSource2["CustomElement"] = 16] = "CustomElement";
|
|
11300
|
-
IncrementalSource2[IncrementalSource2["VisibilityChange"] = 17] = "VisibilityChange";
|
|
11301
11307
|
return IncrementalSource2;
|
|
11302
11308
|
})(IncrementalSource || {});
|
|
11303
11309
|
var MouseInteractions = /* @__PURE__ */ ((MouseInteractions2) => {
|
|
@@ -11463,7 +11469,8 @@ class MutationBuffer {
|
|
|
11463
11469
|
__publicField(this, "blockSelector");
|
|
11464
11470
|
__publicField(this, "maskTextClass");
|
|
11465
11471
|
__publicField(this, "maskTextSelector");
|
|
11466
|
-
__publicField(this, "
|
|
11472
|
+
__publicField(this, "excludeAttribute");
|
|
11473
|
+
__publicField(this, "includeAttribute");
|
|
11467
11474
|
__publicField(this, "inlineStylesheet");
|
|
11468
11475
|
__publicField(this, "maskInputOptions");
|
|
11469
11476
|
__publicField(this, "maskTextFn");
|
|
@@ -11527,7 +11534,8 @@ class MutationBuffer {
|
|
|
11527
11534
|
blockSelector: this.blockSelector,
|
|
11528
11535
|
maskTextClass: this.maskTextClass,
|
|
11529
11536
|
maskTextSelector: this.maskTextSelector,
|
|
11530
|
-
|
|
11537
|
+
excludeAttribute: this.excludeAttribute,
|
|
11538
|
+
includeAttribute: this.includeAttribute,
|
|
11531
11539
|
skipChild: true,
|
|
11532
11540
|
newlyAddedElement: true,
|
|
11533
11541
|
inlineStylesheet: this.inlineStylesheet,
|
|
@@ -11647,20 +11655,6 @@ class MutationBuffer {
|
|
|
11647
11655
|
};
|
|
11648
11656
|
}).filter((text) => !addedIds.has(text.id)).filter((text) => this.mirror.has(text.id)),
|
|
11649
11657
|
attributes: this.attributes.map((attribute) => {
|
|
11650
|
-
const element = attribute.node;
|
|
11651
|
-
const filtered = {};
|
|
11652
|
-
for (const [name, value] of Object.entries(attribute.attributes)) {
|
|
11653
|
-
const isIgnored2 = shouldIgnoreAttribute(this.ignoreAttribute, name);
|
|
11654
|
-
const existedBefore = element.hasAttribute(name);
|
|
11655
|
-
const keep = value !== null && !isIgnored2 || value === null && (!isIgnored2 || attribute.attributes[name] !== null || existedBefore);
|
|
11656
|
-
if (keep) {
|
|
11657
|
-
filtered[name] = value;
|
|
11658
|
-
}
|
|
11659
|
-
}
|
|
11660
|
-
return __spreadProps(__spreadValues({}, attribute), {
|
|
11661
|
-
attributes: filtered
|
|
11662
|
-
});
|
|
11663
|
-
}).filter((attribute) => Object.keys(attribute.attributes).length > 0).map((attribute) => {
|
|
11664
11658
|
const { attributes } = attribute;
|
|
11665
11659
|
if (typeof attributes.style === "string") {
|
|
11666
11660
|
const diffAsStr = JSON.stringify(attribute.styleDiff);
|
|
@@ -11742,8 +11736,13 @@ class MutationBuffer {
|
|
|
11742
11736
|
case "attributes": {
|
|
11743
11737
|
const target = m.target;
|
|
11744
11738
|
let attributeName = m.attributeName;
|
|
11745
|
-
let value = target.getAttribute(attributeName);
|
|
11746
|
-
|
|
11739
|
+
let value = m.target.getAttribute(attributeName);
|
|
11740
|
+
const propValue = target[attributeName];
|
|
11741
|
+
const isPhantomAttributeMutation = value === null && !target.hasAttribute(attributeName) && m.oldValue !== null && (propValue === "" || propValue === null || typeof propValue === "undefined");
|
|
11742
|
+
if (isPhantomAttributeMutation && !isIncludeAttribute(attributeName, this.includeAttribute)) {
|
|
11743
|
+
return;
|
|
11744
|
+
}
|
|
11745
|
+
if (isExcludeAttribute(attributeName, this.excludeAttribute)) {
|
|
11747
11746
|
return;
|
|
11748
11747
|
}
|
|
11749
11748
|
if (attributeName === "value") {
|
|
@@ -11781,14 +11780,21 @@ class MutationBuffer {
|
|
|
11781
11780
|
if (attributeName === "type" && target.tagName === "INPUT" && (m.oldValue || "").toLowerCase() === "password") {
|
|
11782
11781
|
target.setAttribute("data-rr-is-password", "true");
|
|
11783
11782
|
}
|
|
11784
|
-
if (!
|
|
11785
|
-
!shouldIgnoreAttribute(this.ignoreAttribute, attributeName)) {
|
|
11783
|
+
if (!ignoreAttribute(target.tagName, attributeName)) {
|
|
11786
11784
|
item.attributes[attributeName] = transformAttribute(
|
|
11787
11785
|
this.doc,
|
|
11788
11786
|
toLowerCase(target.tagName),
|
|
11789
11787
|
toLowerCase(attributeName),
|
|
11790
11788
|
value
|
|
11791
11789
|
);
|
|
11790
|
+
if (value === item.attributes[attributeName] && !isIncludeAttribute(attributeName, this.includeAttribute)) {
|
|
11791
|
+
delete item.attributes[attributeName];
|
|
11792
|
+
if (Object.keys(item.attributes).length === 0) {
|
|
11793
|
+
this.attributes = this.attributes.filter((a2) => a2 !== item);
|
|
11794
|
+
this.attributeMap.delete(m.target);
|
|
11795
|
+
}
|
|
11796
|
+
return;
|
|
11797
|
+
}
|
|
11792
11798
|
if (attributeName === "style") {
|
|
11793
11799
|
if (!this.unattachedDoc) {
|
|
11794
11800
|
try {
|
|
@@ -11901,7 +11907,8 @@ class MutationBuffer {
|
|
|
11901
11907
|
"blockSelector",
|
|
11902
11908
|
"maskTextClass",
|
|
11903
11909
|
"maskTextSelector",
|
|
11904
|
-
"
|
|
11910
|
+
"excludeAttribute",
|
|
11911
|
+
"includeAttribute",
|
|
11905
11912
|
"inlineStylesheet",
|
|
11906
11913
|
"maskInputOptions",
|
|
11907
11914
|
"maskTextFn",
|
|
@@ -12040,60 +12047,6 @@ function initMutationObserver(options, rootEl) {
|
|
|
12040
12047
|
});
|
|
12041
12048
|
return observer;
|
|
12042
12049
|
}
|
|
12043
|
-
function initVisibilityObserver({
|
|
12044
|
-
visibilityChangeCb,
|
|
12045
|
-
doc,
|
|
12046
|
-
mirror: mirror2,
|
|
12047
|
-
sampling
|
|
12048
|
-
}) {
|
|
12049
|
-
if (!visibilityChangeCb) {
|
|
12050
|
-
return () => {
|
|
12051
|
-
};
|
|
12052
|
-
}
|
|
12053
|
-
const observedElements = /* @__PURE__ */ new WeakMap();
|
|
12054
|
-
const debounceThreshold = typeof sampling.visibility === "number" ? sampling.visibility : 50;
|
|
12055
|
-
const throttledCb = throttle(
|
|
12056
|
-
callbackWrapper((entry) => {
|
|
12057
|
-
const target = entry.target;
|
|
12058
|
-
const id = mirror2.getId(target);
|
|
12059
|
-
const isVisible = entry.isIntersecting || entry.intersectionRatio > 0;
|
|
12060
|
-
if (id !== -1) {
|
|
12061
|
-
visibilityChangeCb({
|
|
12062
|
-
id,
|
|
12063
|
-
isVisible,
|
|
12064
|
-
visibilityRatio: entry.intersectionRatio
|
|
12065
|
-
});
|
|
12066
|
-
}
|
|
12067
|
-
}),
|
|
12068
|
-
debounceThreshold,
|
|
12069
|
-
{ leading: sampling.visibility !== false, trailing: true }
|
|
12070
|
-
);
|
|
12071
|
-
const observer = new IntersectionObserver((entries) => {
|
|
12072
|
-
entries.forEach((entry) => {
|
|
12073
|
-
const target = entry.target;
|
|
12074
|
-
if (observedElements.has(target)) {
|
|
12075
|
-
throttledCb(entry);
|
|
12076
|
-
} else {
|
|
12077
|
-
observedElements.set(target, true);
|
|
12078
|
-
}
|
|
12079
|
-
});
|
|
12080
|
-
}, { root: null, threshold: [0.1, 0.9] });
|
|
12081
|
-
doc.querySelectorAll("*").forEach((el) => observer.observe(el));
|
|
12082
|
-
const mutationObserver = new MutationObserver((mutations) => {
|
|
12083
|
-
mutations.forEach((mutation) => {
|
|
12084
|
-
mutation.addedNodes.forEach((node2) => {
|
|
12085
|
-
if (node2 instanceof Element) {
|
|
12086
|
-
observer.observe(node2);
|
|
12087
|
-
}
|
|
12088
|
-
});
|
|
12089
|
-
});
|
|
12090
|
-
});
|
|
12091
|
-
mutationObserver.observe(doc, { childList: true, subtree: true });
|
|
12092
|
-
return () => {
|
|
12093
|
-
observer.disconnect();
|
|
12094
|
-
mutationObserver.disconnect();
|
|
12095
|
-
};
|
|
12096
|
-
}
|
|
12097
12050
|
function initMoveObserver({
|
|
12098
12051
|
mousemoveCb,
|
|
12099
12052
|
sampling,
|
|
@@ -12372,6 +12325,20 @@ function initInputObserver({
|
|
|
12372
12325
|
}
|
|
12373
12326
|
function cbWithDedup(target, v2) {
|
|
12374
12327
|
const lastInputValue = lastInputValueMap.get(target);
|
|
12328
|
+
const el = target;
|
|
12329
|
+
const hasPlaceholder = el.hasAttribute("placeholder");
|
|
12330
|
+
const isEmpty = el.value === "";
|
|
12331
|
+
const isDefaultEmpty = typeof el.defaultValue === "string" ? el.defaultValue === "" : true;
|
|
12332
|
+
const isNonUser = !v2.userTriggered;
|
|
12333
|
+
const isRepeatEmpty = !lastInputValue || lastInputValue.text === "";
|
|
12334
|
+
const isLikelyPhantom = hasPlaceholder && isEmpty && isDefaultEmpty && isRepeatEmpty && isNonUser && !v2.isChecked && el.type !== "hidden" && INPUT_TAGS.includes(el.tagName);
|
|
12335
|
+
const isRenderDrivenTextInput = el.tagName === "INPUT" && el.type === "text" && !v2.userTriggered && v2.text === el.defaultValue && !lastInputValue && el.hasAttribute("placeholder");
|
|
12336
|
+
const isValueFromDefault = !v2.userTriggered && el.value === el.defaultValue && !lastInputValue && el.hasAttribute("placeholder") && !v2.isChecked && el.type !== "hidden" && INPUT_TAGS.includes(el.tagName);
|
|
12337
|
+
const isPhantomCheckbox = el.type === "checkbox" && !v2.userTriggered && !v2.isChecked && !lastInputValue;
|
|
12338
|
+
const isPhantomRadio = el.type === "radio" && !v2.userTriggered && !v2.isChecked && !lastInputValue;
|
|
12339
|
+
if (isLikelyPhantom || isRenderDrivenTextInput || isValueFromDefault || isPhantomCheckbox || isPhantomRadio) {
|
|
12340
|
+
return;
|
|
12341
|
+
}
|
|
12375
12342
|
if (!lastInputValue || lastInputValue.text !== v2.text || lastInputValue.isChecked !== v2.isChecked) {
|
|
12376
12343
|
lastInputValueMap.set(target, v2);
|
|
12377
12344
|
const id = mirror2.getId(target);
|
|
@@ -12908,7 +12875,6 @@ function initCustomElementObserver({
|
|
|
12908
12875
|
function mergeHooks(o2, hooks) {
|
|
12909
12876
|
const {
|
|
12910
12877
|
mutationCb,
|
|
12911
|
-
visibilityChangeCb,
|
|
12912
12878
|
mousemoveCb,
|
|
12913
12879
|
mouseInteractionCb,
|
|
12914
12880
|
scrollCb,
|
|
@@ -12928,12 +12894,6 @@ function mergeHooks(o2, hooks) {
|
|
|
12928
12894
|
}
|
|
12929
12895
|
mutationCb(...p);
|
|
12930
12896
|
};
|
|
12931
|
-
o2.visibilityChangeCb = (...p) => {
|
|
12932
|
-
if (hooks.visibilityChange) {
|
|
12933
|
-
hooks.visibilityChange(...p);
|
|
12934
|
-
}
|
|
12935
|
-
visibilityChangeCb(...p);
|
|
12936
|
-
};
|
|
12937
12897
|
o2.mousemoveCb = (...p) => {
|
|
12938
12898
|
if (hooks.mousemove) {
|
|
12939
12899
|
hooks.mousemove(...p);
|
|
@@ -13026,7 +12986,6 @@ function initObservers(o2, hooks = {}) {
|
|
|
13026
12986
|
});
|
|
13027
12987
|
const inputHandler = initInputObserver(o2);
|
|
13028
12988
|
const mediaInteractionHandler = initMediaInteractionObserver(o2);
|
|
13029
|
-
const visibleHandler = initVisibilityObserver(o2);
|
|
13030
12989
|
let styleSheetObserver = () => {
|
|
13031
12990
|
};
|
|
13032
12991
|
let adoptedStyleSheetObserver = () => {
|
|
@@ -13056,7 +13015,6 @@ function initObservers(o2, hooks = {}) {
|
|
|
13056
13015
|
return callbackWrapper(() => {
|
|
13057
13016
|
mutationBuffers.forEach((b) => b.reset());
|
|
13058
13017
|
mutationObserver == null ? void 0 : mutationObserver.disconnect();
|
|
13059
|
-
visibleHandler();
|
|
13060
13018
|
mousemoveHandler();
|
|
13061
13019
|
mouseInteractionHandler();
|
|
13062
13020
|
scrollHandler();
|
|
@@ -14141,12 +14099,12 @@ function record(options = {}) {
|
|
|
14141
14099
|
emit,
|
|
14142
14100
|
checkoutEveryNms,
|
|
14143
14101
|
checkoutEveryNth,
|
|
14144
|
-
checkoutEveryEvc,
|
|
14145
14102
|
blockClass = "rr-block",
|
|
14146
14103
|
blockSelector = null,
|
|
14147
14104
|
ignoreClass = "rr-ignore",
|
|
14148
14105
|
ignoreSelector = null,
|
|
14149
|
-
|
|
14106
|
+
excludeAttribute: _excludeAttribute,
|
|
14107
|
+
includeAttribute: _includeAttribute,
|
|
14150
14108
|
maskTextClass = "rr-mask",
|
|
14151
14109
|
maskTextSelector = null,
|
|
14152
14110
|
inlineStylesheet = true,
|
|
@@ -14195,6 +14153,8 @@ function record(options = {}) {
|
|
|
14195
14153
|
sampling.mousemove = mousemoveWait;
|
|
14196
14154
|
}
|
|
14197
14155
|
mirror.reset();
|
|
14156
|
+
const excludeAttribute = _excludeAttribute === void 0 ? /^$a/ : _excludeAttribute;
|
|
14157
|
+
const includeAttribute = _includeAttribute === void 0 ? /.+/i : _includeAttribute;
|
|
14198
14158
|
const maskInputOptions = maskAllInputs === true ? {
|
|
14199
14159
|
color: true,
|
|
14200
14160
|
date: true,
|
|
@@ -14271,8 +14231,7 @@ function record(options = {}) {
|
|
|
14271
14231
|
incrementalSnapshotCount++;
|
|
14272
14232
|
const exceedCount = checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth;
|
|
14273
14233
|
const exceedTime = checkoutEveryNms && e2.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;
|
|
14274
|
-
|
|
14275
|
-
if (exceedCount || exceedTime || isVisibilityChanged) {
|
|
14234
|
+
if (exceedCount || exceedTime) {
|
|
14276
14235
|
takeFullSnapshot$1(true);
|
|
14277
14236
|
}
|
|
14278
14237
|
}
|
|
@@ -14341,7 +14300,8 @@ function record(options = {}) {
|
|
|
14341
14300
|
blockSelector,
|
|
14342
14301
|
maskTextClass,
|
|
14343
14302
|
maskTextSelector,
|
|
14344
|
-
|
|
14303
|
+
excludeAttribute,
|
|
14304
|
+
includeAttribute,
|
|
14345
14305
|
inlineStylesheet,
|
|
14346
14306
|
maskInputOptions,
|
|
14347
14307
|
dataURLOptions,
|
|
@@ -14383,7 +14343,8 @@ function record(options = {}) {
|
|
|
14383
14343
|
blockSelector,
|
|
14384
14344
|
maskTextClass,
|
|
14385
14345
|
maskTextSelector,
|
|
14386
|
-
|
|
14346
|
+
excludeAttribute,
|
|
14347
|
+
includeAttribute,
|
|
14387
14348
|
inlineStylesheet,
|
|
14388
14349
|
maskAllInputs: maskInputOptions,
|
|
14389
14350
|
maskTextFn,
|
|
@@ -14439,14 +14400,6 @@ function record(options = {}) {
|
|
|
14439
14400
|
return callbackWrapper(initObservers)(
|
|
14440
14401
|
{
|
|
14441
14402
|
mutationCb: wrappedMutationEmit,
|
|
14442
|
-
visibilityChangeCb: (v2) => {
|
|
14443
|
-
wrappedEmit({
|
|
14444
|
-
type: EventType.IncrementalSnapshot,
|
|
14445
|
-
data: __spreadValues({
|
|
14446
|
-
source: IncrementalSource.VisibilityChange
|
|
14447
|
-
}, v2)
|
|
14448
|
-
});
|
|
14449
|
-
},
|
|
14450
14403
|
mousemoveCb: (positions, source) => wrappedEmit({
|
|
14451
14404
|
type: EventType.IncrementalSnapshot,
|
|
14452
14405
|
data: {
|
|
@@ -14519,7 +14472,8 @@ function record(options = {}) {
|
|
|
14519
14472
|
ignoreSelector,
|
|
14520
14473
|
maskTextClass,
|
|
14521
14474
|
maskTextSelector,
|
|
14522
|
-
|
|
14475
|
+
excludeAttribute,
|
|
14476
|
+
includeAttribute,
|
|
14523
14477
|
maskInputOptions,
|
|
14524
14478
|
inlineStylesheet,
|
|
14525
14479
|
sampling,
|