@appsurify-testmap/rrweb-record 2.0.0-alpha.22 → 2.0.0-alpha.24
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-record.cjs +284 -77
- package/dist/rrweb-record.cjs.map +1 -1
- package/dist/rrweb-record.js +284 -77
- package/dist/rrweb-record.js.map +1 -1
- package/dist/rrweb-record.umd.cjs +283 -77
- package/dist/rrweb-record.umd.cjs.map +2 -2
- package/dist/rrweb-record.umd.min.cjs +24 -24
- package/dist/rrweb-record.umd.min.cjs.map +3 -3
- package/package.json +3 -3
package/dist/rrweb-record.cjs
CHANGED
|
@@ -7,6 +7,46 @@ var _a;
|
|
|
7
7
|
var __defProp$1 = Object.defineProperty;
|
|
8
8
|
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
9
|
var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
10
|
+
var InteractiveEvent = /* @__PURE__ */ ((InteractiveEvent2) => {
|
|
11
|
+
InteractiveEvent2[InteractiveEvent2["Change"] = 0] = "Change";
|
|
12
|
+
InteractiveEvent2[InteractiveEvent2["Submit"] = 1] = "Submit";
|
|
13
|
+
InteractiveEvent2[InteractiveEvent2["DragStart"] = 2] = "DragStart";
|
|
14
|
+
InteractiveEvent2[InteractiveEvent2["Drop"] = 3] = "Drop";
|
|
15
|
+
InteractiveEvent2[InteractiveEvent2["PointerDown"] = 4] = "PointerDown";
|
|
16
|
+
InteractiveEvent2[InteractiveEvent2["PointerUp"] = 5] = "PointerUp";
|
|
17
|
+
InteractiveEvent2[InteractiveEvent2["Input"] = 6] = "Input";
|
|
18
|
+
InteractiveEvent2[InteractiveEvent2["KeyDown"] = 7] = "KeyDown";
|
|
19
|
+
InteractiveEvent2[InteractiveEvent2["KeyUp"] = 8] = "KeyUp";
|
|
20
|
+
InteractiveEvent2[InteractiveEvent2["KeyPress"] = 9] = "KeyPress";
|
|
21
|
+
InteractiveEvent2[InteractiveEvent2["MouseEnter"] = 10] = "MouseEnter";
|
|
22
|
+
InteractiveEvent2[InteractiveEvent2["MouseLeave"] = 11] = "MouseLeave";
|
|
23
|
+
InteractiveEvent2[InteractiveEvent2["MouseUp"] = 12] = "MouseUp";
|
|
24
|
+
InteractiveEvent2[InteractiveEvent2["MouseDown"] = 13] = "MouseDown";
|
|
25
|
+
InteractiveEvent2[InteractiveEvent2["Click"] = 14] = "Click";
|
|
26
|
+
InteractiveEvent2[InteractiveEvent2["ContextMenu"] = 15] = "ContextMenu";
|
|
27
|
+
InteractiveEvent2[InteractiveEvent2["DblClick"] = 16] = "DblClick";
|
|
28
|
+
InteractiveEvent2[InteractiveEvent2["Focus"] = 17] = "Focus";
|
|
29
|
+
InteractiveEvent2[InteractiveEvent2["Blur"] = 18] = "Blur";
|
|
30
|
+
InteractiveEvent2[InteractiveEvent2["TouchStart"] = 19] = "TouchStart";
|
|
31
|
+
InteractiveEvent2[InteractiveEvent2["TouchMove"] = 20] = "TouchMove";
|
|
32
|
+
InteractiveEvent2[InteractiveEvent2["TouchEnd"] = 21] = "TouchEnd";
|
|
33
|
+
InteractiveEvent2[InteractiveEvent2["TouchCancel"] = 22] = "TouchCancel";
|
|
34
|
+
return InteractiveEvent2;
|
|
35
|
+
})(InteractiveEvent || {});
|
|
36
|
+
var interactiveTag = /* @__PURE__ */ ((interactiveTag2) => {
|
|
37
|
+
interactiveTag2[interactiveTag2["Input"] = 0] = "Input";
|
|
38
|
+
interactiveTag2[interactiveTag2["Button"] = 1] = "Button";
|
|
39
|
+
interactiveTag2[interactiveTag2["A"] = 2] = "A";
|
|
40
|
+
interactiveTag2[interactiveTag2["Select"] = 3] = "Select";
|
|
41
|
+
interactiveTag2[interactiveTag2["Textarea"] = 4] = "Textarea";
|
|
42
|
+
interactiveTag2[interactiveTag2["Label"] = 5] = "Label";
|
|
43
|
+
interactiveTag2[interactiveTag2["Details"] = 6] = "Details";
|
|
44
|
+
interactiveTag2[interactiveTag2["Summary"] = 7] = "Summary";
|
|
45
|
+
interactiveTag2[interactiveTag2["Dialog"] = 8] = "Dialog";
|
|
46
|
+
interactiveTag2[interactiveTag2["Video"] = 9] = "Video";
|
|
47
|
+
interactiveTag2[interactiveTag2["Audio"] = 10] = "Audio";
|
|
48
|
+
return interactiveTag2;
|
|
49
|
+
})(interactiveTag || {});
|
|
10
50
|
var NodeType$3 = /* @__PURE__ */ ((NodeType2) => {
|
|
11
51
|
NodeType2[NodeType2["Document"] = 0] = "Document";
|
|
12
52
|
NodeType2[NodeType2["DocumentType"] = 1] = "DocumentType";
|
|
@@ -158,53 +198,6 @@ const index$1 = {
|
|
|
158
198
|
querySelectorAll: querySelectorAll$1,
|
|
159
199
|
mutationObserver: mutationObserverCtor$1
|
|
160
200
|
};
|
|
161
|
-
function getXPath(n2) {
|
|
162
|
-
if (n2.id) {
|
|
163
|
-
return `//*[@id="${n2.id}"]`;
|
|
164
|
-
}
|
|
165
|
-
if (n2 === document.body) {
|
|
166
|
-
return "/html/body";
|
|
167
|
-
}
|
|
168
|
-
if (!n2.tagName) {
|
|
169
|
-
return "";
|
|
170
|
-
}
|
|
171
|
-
const parentNode2 = index$1.parentNode(n2);
|
|
172
|
-
if (!parentNode2 || !(parentNode2 instanceof Element)) {
|
|
173
|
-
return "";
|
|
174
|
-
}
|
|
175
|
-
const siblings = Array.from(parentNode2.children).filter(
|
|
176
|
-
(node2) => node2.tagName && node2.tagName === n2.tagName
|
|
177
|
-
);
|
|
178
|
-
const index$1$1 = siblings.length > 1 ? `[${siblings.indexOf(n2) + 1}]` : "";
|
|
179
|
-
return getXPath(parentNode2) + "/" + n2.tagName.toLowerCase() + index$1$1;
|
|
180
|
-
}
|
|
181
|
-
function isElement(n2) {
|
|
182
|
-
return n2.nodeType === n2.ELEMENT_NODE;
|
|
183
|
-
}
|
|
184
|
-
function isTextVisible(n2) {
|
|
185
|
-
var _a2;
|
|
186
|
-
const parent = index$1.parentNode(n2);
|
|
187
|
-
const parentElement2 = parent && parent;
|
|
188
|
-
if (!parentElement2) {
|
|
189
|
-
return false;
|
|
190
|
-
}
|
|
191
|
-
const isParentVisible = isElementVisible(parentElement2);
|
|
192
|
-
if (!isParentVisible) {
|
|
193
|
-
return false;
|
|
194
|
-
}
|
|
195
|
-
const textContent2 = (_a2 = n2.textContent) == null ? void 0 : _a2.trim();
|
|
196
|
-
return textContent2 !== "";
|
|
197
|
-
}
|
|
198
|
-
function isElementVisible(n2) {
|
|
199
|
-
return isStyleVisible(n2) && isRectVisible(n2.getBoundingClientRect());
|
|
200
|
-
}
|
|
201
|
-
function isStyleVisible(n2) {
|
|
202
|
-
const style = window.getComputedStyle(n2);
|
|
203
|
-
return style.display !== "none" && style.visibility !== "hidden" && parseFloat(style.opacity) !== 0;
|
|
204
|
-
}
|
|
205
|
-
function isRectVisible(rect) {
|
|
206
|
-
return rect.width > 0 && rect.height > 0 && rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth);
|
|
207
|
-
}
|
|
208
201
|
function isShadowRoot(n2) {
|
|
209
202
|
const hostEl = (
|
|
210
203
|
// anchor and textarea elements also have a `host` property
|
|
@@ -540,6 +533,140 @@ function splitCssText(cssText, style) {
|
|
|
540
533
|
function markCssSplits(cssText, style) {
|
|
541
534
|
return splitCssText(cssText, style).join("/* rr_split */");
|
|
542
535
|
}
|
|
536
|
+
function getXPath(node2) {
|
|
537
|
+
if (node2.nodeType === Node.DOCUMENT_NODE) {
|
|
538
|
+
return "/";
|
|
539
|
+
}
|
|
540
|
+
if (node2.nodeType === Node.DOCUMENT_TYPE_NODE) {
|
|
541
|
+
return "/html/doctype";
|
|
542
|
+
}
|
|
543
|
+
if (node2.nodeType === Node.ELEMENT_NODE) {
|
|
544
|
+
const element = node2;
|
|
545
|
+
if (element.id) {
|
|
546
|
+
return `//*[@id="${element.id}"]`;
|
|
547
|
+
}
|
|
548
|
+
if (element.tagName && element.tagName.toLowerCase() === "html") {
|
|
549
|
+
return "/html";
|
|
550
|
+
}
|
|
551
|
+
if (element === document.head) {
|
|
552
|
+
return "/html/head";
|
|
553
|
+
}
|
|
554
|
+
if (element === document.body) {
|
|
555
|
+
return "/html/body";
|
|
556
|
+
}
|
|
557
|
+
const parentNode2 = element.parentNode;
|
|
558
|
+
if (!parentNode2 || !(parentNode2 instanceof Element)) {
|
|
559
|
+
return "";
|
|
560
|
+
}
|
|
561
|
+
const siblings = Array.from(parentNode2.children).filter(
|
|
562
|
+
(sibling) => sibling.tagName === element.tagName
|
|
563
|
+
);
|
|
564
|
+
const index2 = siblings.length > 1 ? `[${siblings.indexOf(element) + 1}]` : "";
|
|
565
|
+
return `${getXPath(parentNode2)}/${element.tagName.toLowerCase()}${index2}`;
|
|
566
|
+
}
|
|
567
|
+
if (node2.nodeType === Node.TEXT_NODE) {
|
|
568
|
+
const parent = node2.parentNode;
|
|
569
|
+
if (!parent) {
|
|
570
|
+
return "";
|
|
571
|
+
}
|
|
572
|
+
const textSiblings = Array.from(parent.childNodes).filter(
|
|
573
|
+
(sibling) => sibling.nodeType === Node.TEXT_NODE
|
|
574
|
+
);
|
|
575
|
+
const index2 = textSiblings.length > 1 ? `[${textSiblings.indexOf(node2) + 1}]` : "";
|
|
576
|
+
return `${getXPath(parent)}/text()${index2}`;
|
|
577
|
+
}
|
|
578
|
+
if (node2.nodeType === Node.CDATA_SECTION_NODE) {
|
|
579
|
+
const parent = node2.parentNode;
|
|
580
|
+
if (!parent) {
|
|
581
|
+
return "";
|
|
582
|
+
}
|
|
583
|
+
const cdataSiblings = Array.from(parent.childNodes).filter(
|
|
584
|
+
(sibling) => sibling.nodeType === Node.CDATA_SECTION_NODE
|
|
585
|
+
);
|
|
586
|
+
const index2 = cdataSiblings.length > 1 ? `[${cdataSiblings.indexOf(node2) + 1}]` : "";
|
|
587
|
+
return `${getXPath(parent)}/text()${index2}`;
|
|
588
|
+
}
|
|
589
|
+
if (node2.nodeType === Node.COMMENT_NODE) {
|
|
590
|
+
const parent = node2.parentNode;
|
|
591
|
+
if (!parent) {
|
|
592
|
+
return "";
|
|
593
|
+
}
|
|
594
|
+
const commentSiblings = Array.from(parent.childNodes).filter(
|
|
595
|
+
(sibling) => sibling.nodeType === Node.COMMENT_NODE
|
|
596
|
+
);
|
|
597
|
+
const index2 = commentSiblings.length > 1 ? `[${commentSiblings.indexOf(node2) + 1}]` : "";
|
|
598
|
+
return `${getXPath(parent)}/comment()${index2}`;
|
|
599
|
+
}
|
|
600
|
+
return "";
|
|
601
|
+
}
|
|
602
|
+
function isElement(n2) {
|
|
603
|
+
return n2.nodeType === n2.ELEMENT_NODE;
|
|
604
|
+
}
|
|
605
|
+
function isTextVisible(n2) {
|
|
606
|
+
var _a2;
|
|
607
|
+
const parent = index$1.parentNode(n2);
|
|
608
|
+
const parentElement2 = parent && parent;
|
|
609
|
+
if (!parentElement2) {
|
|
610
|
+
return false;
|
|
611
|
+
}
|
|
612
|
+
const isParentVisible = isElementVisible(parentElement2);
|
|
613
|
+
if (!isParentVisible) {
|
|
614
|
+
return false;
|
|
615
|
+
}
|
|
616
|
+
const textContent2 = (_a2 = n2.textContent) == null ? void 0 : _a2.trim();
|
|
617
|
+
return textContent2 !== "";
|
|
618
|
+
}
|
|
619
|
+
function isElementVisible(n2) {
|
|
620
|
+
return isStyleVisible(n2) && isRectVisible(n2.getBoundingClientRect());
|
|
621
|
+
}
|
|
622
|
+
function isStyleVisible(n2) {
|
|
623
|
+
const style = window.getComputedStyle(n2);
|
|
624
|
+
return style.display !== "none" && style.visibility !== "hidden" && parseFloat(style.opacity) !== 0;
|
|
625
|
+
}
|
|
626
|
+
function isRectVisible(rect) {
|
|
627
|
+
return rect.width > 0 && rect.height > 0 && rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth);
|
|
628
|
+
}
|
|
629
|
+
function getInteractiveEvents() {
|
|
630
|
+
return Object.keys(InteractiveEvent).filter((key) => isNaN(Number(key))).map((key) => key.toLowerCase().replace(/_/g, "-"));
|
|
631
|
+
}
|
|
632
|
+
function getInteractiveTags() {
|
|
633
|
+
return Object.keys(interactiveTag).filter((key) => isNaN(Number(key))).map((key) => key.toLowerCase().replace(/_/g, "-"));
|
|
634
|
+
}
|
|
635
|
+
function hasEventListeners(n2) {
|
|
636
|
+
return getInteractiveEvents().some((eventType) => {
|
|
637
|
+
let hasListener = false;
|
|
638
|
+
const testListener = () => {
|
|
639
|
+
hasListener = true;
|
|
640
|
+
};
|
|
641
|
+
n2.addEventListener(eventType, testListener);
|
|
642
|
+
n2.dispatchEvent(new Event(eventType));
|
|
643
|
+
n2.removeEventListener(eventType, testListener);
|
|
644
|
+
return hasListener;
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
function isElementInteractive(n2) {
|
|
648
|
+
var _a2;
|
|
649
|
+
const allowedTags = getInteractiveTags();
|
|
650
|
+
if (n2.nodeType === Node.ELEMENT_NODE) {
|
|
651
|
+
const element = n2;
|
|
652
|
+
const tagName = element.tagName.toLowerCase();
|
|
653
|
+
if (!allowedTags.includes(tagName)) {
|
|
654
|
+
return false;
|
|
655
|
+
}
|
|
656
|
+
const hasTabIndex = element.hasAttribute("tabindex") && element.getAttribute("tabindex") !== "-1";
|
|
657
|
+
const hasRoleInteractive = ["button", "link", "checkbox", "switch", "menuitem"].includes(
|
|
658
|
+
element.getAttribute("role") || ""
|
|
659
|
+
);
|
|
660
|
+
const result2 = hasEventListeners(element) || hasTabIndex || hasRoleInteractive || element instanceof HTMLAnchorElement && element.hasAttribute("href") || element instanceof HTMLButtonElement && !element.disabled;
|
|
661
|
+
return result2;
|
|
662
|
+
}
|
|
663
|
+
if (n2.nodeType === Node.TEXT_NODE) {
|
|
664
|
+
const textNode = n2;
|
|
665
|
+
const parentElement2 = textNode.parentElement;
|
|
666
|
+
return parentElement2 !== null && allowedTags.includes(parentElement2.tagName.toLowerCase()) && isElementVisible(parentElement2) && ((_a2 = textNode.textContent) == null ? void 0 : _a2.trim().length) !== 0 && isElementInteractive(parentElement2);
|
|
667
|
+
}
|
|
668
|
+
return false;
|
|
669
|
+
}
|
|
543
670
|
let _id = 1;
|
|
544
671
|
const tagNameRegex = new RegExp("[^a-z0-9-_:]");
|
|
545
672
|
const IGNORED_NODE = -2;
|
|
@@ -895,11 +1022,13 @@ function serializeTextNode(n2, options) {
|
|
|
895
1022
|
textContent2 = maskTextFn ? maskTextFn(textContent2, index$1.parentElement(n2)) : textContent2.replace(/[\S]/g, "*");
|
|
896
1023
|
}
|
|
897
1024
|
const isVisible = isTextVisible(n2);
|
|
1025
|
+
const isInteractive = isElementInteractive(n2);
|
|
898
1026
|
return {
|
|
899
1027
|
type: NodeType$3.Text,
|
|
900
1028
|
textContent: textContent2 || "",
|
|
901
1029
|
rootId,
|
|
902
1030
|
isVisible,
|
|
1031
|
+
isInteractive,
|
|
903
1032
|
xPath
|
|
904
1033
|
};
|
|
905
1034
|
}
|
|
@@ -1085,6 +1214,7 @@ function serializeElementNode(n2, options) {
|
|
|
1085
1214
|
} catch (e2) {
|
|
1086
1215
|
}
|
|
1087
1216
|
const isVisible = isElementVisible(n2);
|
|
1217
|
+
const isInteractive = isElementInteractive(n2);
|
|
1088
1218
|
return {
|
|
1089
1219
|
type: NodeType$3.Element,
|
|
1090
1220
|
tagName,
|
|
@@ -1095,6 +1225,7 @@ function serializeElementNode(n2, options) {
|
|
|
1095
1225
|
rootId,
|
|
1096
1226
|
isCustom: isCustomElement,
|
|
1097
1227
|
isVisible,
|
|
1228
|
+
isInteractive,
|
|
1098
1229
|
xPath
|
|
1099
1230
|
};
|
|
1100
1231
|
}
|
|
@@ -1899,7 +2030,7 @@ function cloneNode$1(obj, parent) {
|
|
|
1899
2030
|
}
|
|
1900
2031
|
return cloned;
|
|
1901
2032
|
}
|
|
1902
|
-
let Node$
|
|
2033
|
+
let Node$5$1 = class Node2 {
|
|
1903
2034
|
constructor(defaults = {}) {
|
|
1904
2035
|
this.raws = {};
|
|
1905
2036
|
this[isClean$2$1] = false;
|
|
@@ -2191,10 +2322,10 @@ let Node$4$1 = class Node2 {
|
|
|
2191
2322
|
return this;
|
|
2192
2323
|
}
|
|
2193
2324
|
};
|
|
2194
|
-
var node$1 = Node$
|
|
2195
|
-
Node$
|
|
2196
|
-
let Node$
|
|
2197
|
-
let Declaration$4$1 = class Declaration extends Node$
|
|
2325
|
+
var node$1 = Node$5$1;
|
|
2326
|
+
Node$5$1.default = Node$5$1;
|
|
2327
|
+
let Node$4$1 = node$1;
|
|
2328
|
+
let Declaration$4$1 = class Declaration extends Node$4$1 {
|
|
2198
2329
|
constructor(defaults) {
|
|
2199
2330
|
if (defaults && typeof defaults.value !== "undefined" && typeof defaults.value !== "string") {
|
|
2200
2331
|
defaults = { ...defaults, value: String(defaults.value) };
|
|
@@ -2850,8 +2981,8 @@ let MapGenerator$2$1 = class MapGenerator {
|
|
|
2850
2981
|
}
|
|
2851
2982
|
};
|
|
2852
2983
|
var mapGenerator$1 = MapGenerator$2$1;
|
|
2853
|
-
let Node$
|
|
2854
|
-
let Comment$4$1 = class Comment extends Node$
|
|
2984
|
+
let Node$3$1 = node$1;
|
|
2985
|
+
let Comment$4$1 = class Comment extends Node$3$1 {
|
|
2855
2986
|
constructor(defaults) {
|
|
2856
2987
|
super(defaults);
|
|
2857
2988
|
this.type = "comment";
|
|
@@ -2862,7 +2993,7 @@ Comment$4$1.default = Comment$4$1;
|
|
|
2862
2993
|
let { isClean: isClean$1$1, my: my$1$1 } = symbols$1;
|
|
2863
2994
|
let Declaration$3$1 = declaration$1;
|
|
2864
2995
|
let Comment$3$1 = comment$1;
|
|
2865
|
-
let Node$
|
|
2996
|
+
let Node$2$1 = node$1;
|
|
2866
2997
|
let parse$4$1, Rule$4$1, AtRule$4$1, Root$6$1;
|
|
2867
2998
|
function cleanSource$1(nodes) {
|
|
2868
2999
|
return nodes.map((i2) => {
|
|
@@ -2879,7 +3010,7 @@ function markDirtyUp$1(node2) {
|
|
|
2879
3010
|
}
|
|
2880
3011
|
}
|
|
2881
3012
|
}
|
|
2882
|
-
let Container$7$1 = class Container extends Node$
|
|
3013
|
+
let Container$7$1 = class Container extends Node$2$1 {
|
|
2883
3014
|
append(...children) {
|
|
2884
3015
|
for (let child of children) {
|
|
2885
3016
|
let nodes = this.normalize(child, this.last);
|
|
@@ -4906,7 +5037,7 @@ let parse$5 = parse_1$1;
|
|
|
4906
5037
|
let list$3 = list_1$1;
|
|
4907
5038
|
let Rule2$1 = rule$1;
|
|
4908
5039
|
let Root2$1 = root$1;
|
|
4909
|
-
let
|
|
5040
|
+
let Node$1$1 = node$1;
|
|
4910
5041
|
function postcss$3(...plugins) {
|
|
4911
5042
|
if (plugins.length === 1 && Array.isArray(plugins[0])) {
|
|
4912
5043
|
plugins = plugins[0];
|
|
@@ -4966,7 +5097,7 @@ postcss$3.Result = Result2$1;
|
|
|
4966
5097
|
postcss$3.Input = Input2$1;
|
|
4967
5098
|
postcss$3.Rule = Rule2$1;
|
|
4968
5099
|
postcss$3.Root = Root2$1;
|
|
4969
|
-
postcss$3.Node =
|
|
5100
|
+
postcss$3.Node = Node$1$1;
|
|
4970
5101
|
LazyResult2$1.registerPostcss(postcss$3);
|
|
4971
5102
|
var postcss_1$1 = postcss$3;
|
|
4972
5103
|
postcss$3.default = postcss$3;
|
|
@@ -5451,7 +5582,7 @@ function cloneNode(obj, parent) {
|
|
|
5451
5582
|
}
|
|
5452
5583
|
return cloned;
|
|
5453
5584
|
}
|
|
5454
|
-
let Node$
|
|
5585
|
+
let Node$5 = class Node22 {
|
|
5455
5586
|
constructor(defaults = {}) {
|
|
5456
5587
|
this.raws = {};
|
|
5457
5588
|
this[isClean$2] = false;
|
|
@@ -5743,10 +5874,10 @@ let Node$4 = class Node3 {
|
|
|
5743
5874
|
return this;
|
|
5744
5875
|
}
|
|
5745
5876
|
};
|
|
5746
|
-
var node = Node$
|
|
5747
|
-
Node$
|
|
5748
|
-
let Node$
|
|
5749
|
-
let Declaration$4 = class Declaration2 extends Node$
|
|
5877
|
+
var node = Node$5;
|
|
5878
|
+
Node$5.default = Node$5;
|
|
5879
|
+
let Node$4 = node;
|
|
5880
|
+
let Declaration$4 = class Declaration2 extends Node$4 {
|
|
5750
5881
|
constructor(defaults) {
|
|
5751
5882
|
if (defaults && typeof defaults.value !== "undefined" && typeof defaults.value !== "string") {
|
|
5752
5883
|
defaults = { ...defaults, value: String(defaults.value) };
|
|
@@ -6402,8 +6533,8 @@ let MapGenerator$2 = class MapGenerator2 {
|
|
|
6402
6533
|
}
|
|
6403
6534
|
};
|
|
6404
6535
|
var mapGenerator = MapGenerator$2;
|
|
6405
|
-
let Node$
|
|
6406
|
-
let Comment$4 = class Comment2 extends Node$
|
|
6536
|
+
let Node$3 = node;
|
|
6537
|
+
let Comment$4 = class Comment2 extends Node$3 {
|
|
6407
6538
|
constructor(defaults) {
|
|
6408
6539
|
super(defaults);
|
|
6409
6540
|
this.type = "comment";
|
|
@@ -6414,7 +6545,7 @@ Comment$4.default = Comment$4;
|
|
|
6414
6545
|
let { isClean: isClean$1, my: my$1 } = symbols;
|
|
6415
6546
|
let Declaration$3 = declaration;
|
|
6416
6547
|
let Comment$3 = comment;
|
|
6417
|
-
let Node$
|
|
6548
|
+
let Node$2 = node;
|
|
6418
6549
|
let parse$4, Rule$4, AtRule$4, Root$6;
|
|
6419
6550
|
function cleanSource(nodes) {
|
|
6420
6551
|
return nodes.map((i2) => {
|
|
@@ -6431,7 +6562,7 @@ function markDirtyUp(node2) {
|
|
|
6431
6562
|
}
|
|
6432
6563
|
}
|
|
6433
6564
|
}
|
|
6434
|
-
let Container$7 = class Container2 extends Node$
|
|
6565
|
+
let Container$7 = class Container2 extends Node$2 {
|
|
6435
6566
|
append(...children) {
|
|
6436
6567
|
for (let child of children) {
|
|
6437
6568
|
let nodes = this.normalize(child, this.last);
|
|
@@ -8458,7 +8589,7 @@ let parse = parse_1;
|
|
|
8458
8589
|
let list = list_1;
|
|
8459
8590
|
let Rule22 = rule;
|
|
8460
8591
|
let Root22 = root;
|
|
8461
|
-
let
|
|
8592
|
+
let Node$1 = node;
|
|
8462
8593
|
function postcss(...plugins) {
|
|
8463
8594
|
if (plugins.length === 1 && Array.isArray(plugins[0])) {
|
|
8464
8595
|
plugins = plugins[0];
|
|
@@ -8518,7 +8649,7 @@ postcss.Result = Result22;
|
|
|
8518
8649
|
postcss.Input = Input22;
|
|
8519
8650
|
postcss.Rule = Rule22;
|
|
8520
8651
|
postcss.Root = Root22;
|
|
8521
|
-
postcss.Node =
|
|
8652
|
+
postcss.Node = Node$1;
|
|
8522
8653
|
LazyResult22.registerPostcss(postcss);
|
|
8523
8654
|
var postcss_1 = postcss;
|
|
8524
8655
|
postcss.default = postcss;
|
|
@@ -9043,20 +9174,20 @@ var IncrementalSource = /* @__PURE__ */ ((IncrementalSource2) => {
|
|
|
9043
9174
|
IncrementalSource2[IncrementalSource2["Selection"] = 14] = "Selection";
|
|
9044
9175
|
IncrementalSource2[IncrementalSource2["AdoptedStyleSheet"] = 15] = "AdoptedStyleSheet";
|
|
9045
9176
|
IncrementalSource2[IncrementalSource2["CustomElement"] = 16] = "CustomElement";
|
|
9177
|
+
IncrementalSource2[IncrementalSource2["VisibilityChange"] = 17] = "VisibilityChange";
|
|
9046
9178
|
return IncrementalSource2;
|
|
9047
9179
|
})(IncrementalSource || {});
|
|
9048
9180
|
var MouseInteractions = /* @__PURE__ */ ((MouseInteractions2) => {
|
|
9049
9181
|
MouseInteractions2[MouseInteractions2["MouseUp"] = 0] = "MouseUp";
|
|
9050
9182
|
MouseInteractions2[MouseInteractions2["MouseDown"] = 1] = "MouseDown";
|
|
9051
9183
|
MouseInteractions2[MouseInteractions2["Click"] = 2] = "Click";
|
|
9052
|
-
MouseInteractions2[MouseInteractions2["
|
|
9053
|
-
MouseInteractions2[MouseInteractions2["
|
|
9054
|
-
MouseInteractions2[MouseInteractions2["
|
|
9055
|
-
MouseInteractions2[MouseInteractions2["
|
|
9056
|
-
MouseInteractions2[MouseInteractions2["
|
|
9057
|
-
MouseInteractions2[MouseInteractions2["
|
|
9058
|
-
MouseInteractions2[MouseInteractions2["
|
|
9059
|
-
MouseInteractions2[MouseInteractions2["TouchCancel"] = 10] = "TouchCancel";
|
|
9184
|
+
MouseInteractions2[MouseInteractions2["DblClick"] = 3] = "DblClick";
|
|
9185
|
+
MouseInteractions2[MouseInteractions2["Focus"] = 4] = "Focus";
|
|
9186
|
+
MouseInteractions2[MouseInteractions2["Blur"] = 5] = "Blur";
|
|
9187
|
+
MouseInteractions2[MouseInteractions2["TouchStart"] = 6] = "TouchStart";
|
|
9188
|
+
MouseInteractions2[MouseInteractions2["TouchMove_Departed"] = 7] = "TouchMove_Departed";
|
|
9189
|
+
MouseInteractions2[MouseInteractions2["TouchEnd"] = 8] = "TouchEnd";
|
|
9190
|
+
MouseInteractions2[MouseInteractions2["TouchCancel"] = 9] = "TouchCancel";
|
|
9060
9191
|
return MouseInteractions2;
|
|
9061
9192
|
})(MouseInteractions || {});
|
|
9062
9193
|
var PointerTypes = /* @__PURE__ */ ((PointerTypes2) => {
|
|
@@ -9736,6 +9867,54 @@ function initMutationObserver(options, rootEl) {
|
|
|
9736
9867
|
});
|
|
9737
9868
|
return observer;
|
|
9738
9869
|
}
|
|
9870
|
+
function initVisibilityObserver({
|
|
9871
|
+
visibilityChangeCb,
|
|
9872
|
+
doc,
|
|
9873
|
+
mirror: mirror2
|
|
9874
|
+
}) {
|
|
9875
|
+
if (!visibilityChangeCb) {
|
|
9876
|
+
return () => {
|
|
9877
|
+
};
|
|
9878
|
+
}
|
|
9879
|
+
const observedElements = /* @__PURE__ */ new WeakMap();
|
|
9880
|
+
const observer = new IntersectionObserver(
|
|
9881
|
+
(entries) => {
|
|
9882
|
+
entries.forEach((entry) => {
|
|
9883
|
+
const target = entry.target;
|
|
9884
|
+
const id = mirror2.getId(target);
|
|
9885
|
+
const isVisible = entry.isIntersecting || entry.intersectionRatio > 0;
|
|
9886
|
+
if (id !== -1) {
|
|
9887
|
+
if (observedElements.has(target)) {
|
|
9888
|
+
visibilityChangeCb({
|
|
9889
|
+
id,
|
|
9890
|
+
isVisible,
|
|
9891
|
+
visibilityRatio: entry.intersectionRatio,
|
|
9892
|
+
boundingRect: entry.boundingClientRect
|
|
9893
|
+
});
|
|
9894
|
+
} else {
|
|
9895
|
+
observedElements.set(target, true);
|
|
9896
|
+
}
|
|
9897
|
+
}
|
|
9898
|
+
});
|
|
9899
|
+
},
|
|
9900
|
+
{ root: null, threshold: [0.1, 0.9] }
|
|
9901
|
+
);
|
|
9902
|
+
doc.querySelectorAll("*").forEach((el) => observer.observe(el));
|
|
9903
|
+
const mutationObserver = new MutationObserver((mutations) => {
|
|
9904
|
+
mutations.forEach((mutation) => {
|
|
9905
|
+
mutation.addedNodes.forEach((node2) => {
|
|
9906
|
+
if (node2 instanceof Element) {
|
|
9907
|
+
observer.observe(node2);
|
|
9908
|
+
}
|
|
9909
|
+
});
|
|
9910
|
+
});
|
|
9911
|
+
});
|
|
9912
|
+
mutationObserver.observe(doc, { childList: true, subtree: true });
|
|
9913
|
+
return () => {
|
|
9914
|
+
observer.disconnect();
|
|
9915
|
+
mutationObserver.disconnect();
|
|
9916
|
+
};
|
|
9917
|
+
}
|
|
9739
9918
|
function initMoveObserver({
|
|
9740
9919
|
mousemoveCb,
|
|
9741
9920
|
sampling,
|
|
@@ -10551,6 +10730,7 @@ function initCustomElementObserver({
|
|
|
10551
10730
|
function mergeHooks(o2, hooks) {
|
|
10552
10731
|
const {
|
|
10553
10732
|
mutationCb,
|
|
10733
|
+
visibilityChangeCb,
|
|
10554
10734
|
mousemoveCb,
|
|
10555
10735
|
mouseInteractionCb,
|
|
10556
10736
|
scrollCb,
|
|
@@ -10570,6 +10750,12 @@ function mergeHooks(o2, hooks) {
|
|
|
10570
10750
|
}
|
|
10571
10751
|
mutationCb(...p);
|
|
10572
10752
|
};
|
|
10753
|
+
o2.visibilityChangeCb = (...p) => {
|
|
10754
|
+
if (hooks.visibilityChange) {
|
|
10755
|
+
hooks.visibilityChange(...p);
|
|
10756
|
+
}
|
|
10757
|
+
visibilityChangeCb(...p);
|
|
10758
|
+
};
|
|
10573
10759
|
o2.mousemoveCb = (...p) => {
|
|
10574
10760
|
if (hooks.mousemove) {
|
|
10575
10761
|
hooks.mousemove(...p);
|
|
@@ -10644,6 +10830,7 @@ function mergeHooks(o2, hooks) {
|
|
|
10644
10830
|
};
|
|
10645
10831
|
}
|
|
10646
10832
|
function initObservers(o2, hooks = {}) {
|
|
10833
|
+
console.info("initObservers", o2);
|
|
10647
10834
|
const currentWindow = o2.doc.defaultView;
|
|
10648
10835
|
if (!currentWindow) {
|
|
10649
10836
|
return () => {
|
|
@@ -10662,6 +10849,7 @@ function initObservers(o2, hooks = {}) {
|
|
|
10662
10849
|
});
|
|
10663
10850
|
const inputHandler = initInputObserver(o2);
|
|
10664
10851
|
const mediaInteractionHandler = initMediaInteractionObserver(o2);
|
|
10852
|
+
const visibleHandler = initVisibilityObserver(o2);
|
|
10665
10853
|
let styleSheetObserver = () => {
|
|
10666
10854
|
};
|
|
10667
10855
|
let adoptedStyleSheetObserver = () => {
|
|
@@ -10691,6 +10879,7 @@ function initObservers(o2, hooks = {}) {
|
|
|
10691
10879
|
return callbackWrapper(() => {
|
|
10692
10880
|
mutationBuffers.forEach((b) => b.reset());
|
|
10693
10881
|
mutationObserver == null ? void 0 : mutationObserver.disconnect();
|
|
10882
|
+
visibleHandler();
|
|
10694
10883
|
mousemoveHandler();
|
|
10695
10884
|
mouseInteractionHandler();
|
|
10696
10885
|
scrollHandler();
|
|
@@ -11757,6 +11946,7 @@ function record(options = {}) {
|
|
|
11757
11946
|
emit,
|
|
11758
11947
|
checkoutEveryNms,
|
|
11759
11948
|
checkoutEveryNth,
|
|
11949
|
+
checkoutEveryEvc,
|
|
11760
11950
|
blockClass = "rr-block",
|
|
11761
11951
|
blockSelector = null,
|
|
11762
11952
|
ignoreClass = "rr-ignore",
|
|
@@ -12047,6 +12237,11 @@ function record(options = {}) {
|
|
|
12047
12237
|
mirror.getId(document)
|
|
12048
12238
|
);
|
|
12049
12239
|
};
|
|
12240
|
+
const debouncedFullSnapshot = throttle(() => {
|
|
12241
|
+
if (checkoutEveryEvc) {
|
|
12242
|
+
takeFullSnapshot$1(true);
|
|
12243
|
+
}
|
|
12244
|
+
}, 100, { leading: false, trailing: true });
|
|
12050
12245
|
try {
|
|
12051
12246
|
const handlers = [];
|
|
12052
12247
|
const observe = (doc) => {
|
|
@@ -12054,6 +12249,18 @@ function record(options = {}) {
|
|
|
12054
12249
|
return callbackWrapper(initObservers)(
|
|
12055
12250
|
{
|
|
12056
12251
|
mutationCb: wrappedMutationEmit,
|
|
12252
|
+
visibilityChangeCb: (v2) => {
|
|
12253
|
+
debouncedFullSnapshot();
|
|
12254
|
+
if (sampling.visibility) {
|
|
12255
|
+
return wrappedEmit({
|
|
12256
|
+
type: EventType.IncrementalSnapshot,
|
|
12257
|
+
data: {
|
|
12258
|
+
source: IncrementalSource.VisibilityChange,
|
|
12259
|
+
...v2
|
|
12260
|
+
}
|
|
12261
|
+
});
|
|
12262
|
+
}
|
|
12263
|
+
},
|
|
12057
12264
|
mousemoveCb: (positions, source) => wrappedEmit({
|
|
12058
12265
|
type: EventType.IncrementalSnapshot,
|
|
12059
12266
|
data: {
|