@appsurify-testmap/rrweb-all 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-all.cjs +284 -77
- package/dist/rrweb-all.cjs.map +1 -1
- package/dist/rrweb-all.js +284 -77
- package/dist/rrweb-all.js.map +1 -1
- package/dist/rrweb-all.umd.cjs +283 -77
- package/dist/rrweb-all.umd.cjs.map +2 -2
- package/dist/rrweb-all.umd.min.cjs +28 -28
- package/dist/rrweb-all.umd.min.cjs.map +3 -3
- package/package.json +4 -4
package/dist/rrweb-all.cjs
CHANGED
|
@@ -7,6 +7,46 @@ var _a$1;
|
|
|
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
|
|
@@ -552,6 +545,140 @@ function splitCssText(cssText, style) {
|
|
|
552
545
|
function markCssSplits(cssText, style) {
|
|
553
546
|
return splitCssText(cssText, style).join("/* rr_split */");
|
|
554
547
|
}
|
|
548
|
+
function getXPath(node2) {
|
|
549
|
+
if (node2.nodeType === Node.DOCUMENT_NODE) {
|
|
550
|
+
return "/";
|
|
551
|
+
}
|
|
552
|
+
if (node2.nodeType === Node.DOCUMENT_TYPE_NODE) {
|
|
553
|
+
return "/html/doctype";
|
|
554
|
+
}
|
|
555
|
+
if (node2.nodeType === Node.ELEMENT_NODE) {
|
|
556
|
+
const element = node2;
|
|
557
|
+
if (element.id) {
|
|
558
|
+
return `//*[@id="${element.id}"]`;
|
|
559
|
+
}
|
|
560
|
+
if (element.tagName && element.tagName.toLowerCase() === "html") {
|
|
561
|
+
return "/html";
|
|
562
|
+
}
|
|
563
|
+
if (element === document.head) {
|
|
564
|
+
return "/html/head";
|
|
565
|
+
}
|
|
566
|
+
if (element === document.body) {
|
|
567
|
+
return "/html/body";
|
|
568
|
+
}
|
|
569
|
+
const parentNode2 = element.parentNode;
|
|
570
|
+
if (!parentNode2 || !(parentNode2 instanceof Element)) {
|
|
571
|
+
return "";
|
|
572
|
+
}
|
|
573
|
+
const siblings = Array.from(parentNode2.children).filter(
|
|
574
|
+
(sibling) => sibling.tagName === element.tagName
|
|
575
|
+
);
|
|
576
|
+
const index2 = siblings.length > 1 ? `[${siblings.indexOf(element) + 1}]` : "";
|
|
577
|
+
return `${getXPath(parentNode2)}/${element.tagName.toLowerCase()}${index2}`;
|
|
578
|
+
}
|
|
579
|
+
if (node2.nodeType === Node.TEXT_NODE) {
|
|
580
|
+
const parent = node2.parentNode;
|
|
581
|
+
if (!parent) {
|
|
582
|
+
return "";
|
|
583
|
+
}
|
|
584
|
+
const textSiblings = Array.from(parent.childNodes).filter(
|
|
585
|
+
(sibling) => sibling.nodeType === Node.TEXT_NODE
|
|
586
|
+
);
|
|
587
|
+
const index2 = textSiblings.length > 1 ? `[${textSiblings.indexOf(node2) + 1}]` : "";
|
|
588
|
+
return `${getXPath(parent)}/text()${index2}`;
|
|
589
|
+
}
|
|
590
|
+
if (node2.nodeType === Node.CDATA_SECTION_NODE) {
|
|
591
|
+
const parent = node2.parentNode;
|
|
592
|
+
if (!parent) {
|
|
593
|
+
return "";
|
|
594
|
+
}
|
|
595
|
+
const cdataSiblings = Array.from(parent.childNodes).filter(
|
|
596
|
+
(sibling) => sibling.nodeType === Node.CDATA_SECTION_NODE
|
|
597
|
+
);
|
|
598
|
+
const index2 = cdataSiblings.length > 1 ? `[${cdataSiblings.indexOf(node2) + 1}]` : "";
|
|
599
|
+
return `${getXPath(parent)}/text()${index2}`;
|
|
600
|
+
}
|
|
601
|
+
if (node2.nodeType === Node.COMMENT_NODE) {
|
|
602
|
+
const parent = node2.parentNode;
|
|
603
|
+
if (!parent) {
|
|
604
|
+
return "";
|
|
605
|
+
}
|
|
606
|
+
const commentSiblings = Array.from(parent.childNodes).filter(
|
|
607
|
+
(sibling) => sibling.nodeType === Node.COMMENT_NODE
|
|
608
|
+
);
|
|
609
|
+
const index2 = commentSiblings.length > 1 ? `[${commentSiblings.indexOf(node2) + 1}]` : "";
|
|
610
|
+
return `${getXPath(parent)}/comment()${index2}`;
|
|
611
|
+
}
|
|
612
|
+
return "";
|
|
613
|
+
}
|
|
614
|
+
function isElement(n2) {
|
|
615
|
+
return n2.nodeType === n2.ELEMENT_NODE;
|
|
616
|
+
}
|
|
617
|
+
function isTextVisible(n2) {
|
|
618
|
+
var _a2;
|
|
619
|
+
const parent = index$1.parentNode(n2);
|
|
620
|
+
const parentElement2 = parent && parent;
|
|
621
|
+
if (!parentElement2) {
|
|
622
|
+
return false;
|
|
623
|
+
}
|
|
624
|
+
const isParentVisible = isElementVisible(parentElement2);
|
|
625
|
+
if (!isParentVisible) {
|
|
626
|
+
return false;
|
|
627
|
+
}
|
|
628
|
+
const textContent2 = (_a2 = n2.textContent) == null ? void 0 : _a2.trim();
|
|
629
|
+
return textContent2 !== "";
|
|
630
|
+
}
|
|
631
|
+
function isElementVisible(n2) {
|
|
632
|
+
return isStyleVisible(n2) && isRectVisible(n2.getBoundingClientRect());
|
|
633
|
+
}
|
|
634
|
+
function isStyleVisible(n2) {
|
|
635
|
+
const style = window.getComputedStyle(n2);
|
|
636
|
+
return style.display !== "none" && style.visibility !== "hidden" && parseFloat(style.opacity) !== 0;
|
|
637
|
+
}
|
|
638
|
+
function isRectVisible(rect) {
|
|
639
|
+
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);
|
|
640
|
+
}
|
|
641
|
+
function getInteractiveEvents() {
|
|
642
|
+
return Object.keys(InteractiveEvent).filter((key) => isNaN(Number(key))).map((key) => key.toLowerCase().replace(/_/g, "-"));
|
|
643
|
+
}
|
|
644
|
+
function getInteractiveTags() {
|
|
645
|
+
return Object.keys(interactiveTag).filter((key) => isNaN(Number(key))).map((key) => key.toLowerCase().replace(/_/g, "-"));
|
|
646
|
+
}
|
|
647
|
+
function hasEventListeners(n2) {
|
|
648
|
+
return getInteractiveEvents().some((eventType) => {
|
|
649
|
+
let hasListener = false;
|
|
650
|
+
const testListener = () => {
|
|
651
|
+
hasListener = true;
|
|
652
|
+
};
|
|
653
|
+
n2.addEventListener(eventType, testListener);
|
|
654
|
+
n2.dispatchEvent(new Event(eventType));
|
|
655
|
+
n2.removeEventListener(eventType, testListener);
|
|
656
|
+
return hasListener;
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
function isElementInteractive(n2) {
|
|
660
|
+
var _a2;
|
|
661
|
+
const allowedTags = getInteractiveTags();
|
|
662
|
+
if (n2.nodeType === Node.ELEMENT_NODE) {
|
|
663
|
+
const element = n2;
|
|
664
|
+
const tagName = element.tagName.toLowerCase();
|
|
665
|
+
if (!allowedTags.includes(tagName)) {
|
|
666
|
+
return false;
|
|
667
|
+
}
|
|
668
|
+
const hasTabIndex = element.hasAttribute("tabindex") && element.getAttribute("tabindex") !== "-1";
|
|
669
|
+
const hasRoleInteractive = ["button", "link", "checkbox", "switch", "menuitem"].includes(
|
|
670
|
+
element.getAttribute("role") || ""
|
|
671
|
+
);
|
|
672
|
+
const result2 = hasEventListeners(element) || hasTabIndex || hasRoleInteractive || element instanceof HTMLAnchorElement && element.hasAttribute("href") || element instanceof HTMLButtonElement && !element.disabled;
|
|
673
|
+
return result2;
|
|
674
|
+
}
|
|
675
|
+
if (n2.nodeType === Node.TEXT_NODE) {
|
|
676
|
+
const textNode = n2;
|
|
677
|
+
const parentElement2 = textNode.parentElement;
|
|
678
|
+
return parentElement2 !== null && allowedTags.includes(parentElement2.tagName.toLowerCase()) && isElementVisible(parentElement2) && ((_a2 = textNode.textContent) == null ? void 0 : _a2.trim().length) !== 0 && isElementInteractive(parentElement2);
|
|
679
|
+
}
|
|
680
|
+
return false;
|
|
681
|
+
}
|
|
555
682
|
let _id = 1;
|
|
556
683
|
const tagNameRegex = new RegExp("[^a-z0-9-_:]");
|
|
557
684
|
const IGNORED_NODE = -2;
|
|
@@ -907,11 +1034,13 @@ function serializeTextNode(n2, options) {
|
|
|
907
1034
|
textContent2 = maskTextFn ? maskTextFn(textContent2, index$1.parentElement(n2)) : textContent2.replace(/[\S]/g, "*");
|
|
908
1035
|
}
|
|
909
1036
|
const isVisible = isTextVisible(n2);
|
|
1037
|
+
const isInteractive = isElementInteractive(n2);
|
|
910
1038
|
return {
|
|
911
1039
|
type: NodeType$3.Text,
|
|
912
1040
|
textContent: textContent2 || "",
|
|
913
1041
|
rootId,
|
|
914
1042
|
isVisible,
|
|
1043
|
+
isInteractive,
|
|
915
1044
|
xPath
|
|
916
1045
|
};
|
|
917
1046
|
}
|
|
@@ -1097,6 +1226,7 @@ function serializeElementNode(n2, options) {
|
|
|
1097
1226
|
} catch (e2) {
|
|
1098
1227
|
}
|
|
1099
1228
|
const isVisible = isElementVisible(n2);
|
|
1229
|
+
const isInteractive = isElementInteractive(n2);
|
|
1100
1230
|
return {
|
|
1101
1231
|
type: NodeType$3.Element,
|
|
1102
1232
|
tagName,
|
|
@@ -1107,6 +1237,7 @@ function serializeElementNode(n2, options) {
|
|
|
1107
1237
|
rootId,
|
|
1108
1238
|
isCustom: isCustomElement,
|
|
1109
1239
|
isVisible,
|
|
1240
|
+
isInteractive,
|
|
1110
1241
|
xPath
|
|
1111
1242
|
};
|
|
1112
1243
|
}
|
|
@@ -1945,7 +2076,7 @@ function cloneNode$1(obj, parent) {
|
|
|
1945
2076
|
}
|
|
1946
2077
|
return cloned;
|
|
1947
2078
|
}
|
|
1948
|
-
let Node$
|
|
2079
|
+
let Node$5$1 = class Node2 {
|
|
1949
2080
|
constructor(defaults = {}) {
|
|
1950
2081
|
this.raws = {};
|
|
1951
2082
|
this[isClean$2$1] = false;
|
|
@@ -2237,10 +2368,10 @@ let Node$4$1 = class Node2 {
|
|
|
2237
2368
|
return this;
|
|
2238
2369
|
}
|
|
2239
2370
|
};
|
|
2240
|
-
var node$1 = Node$
|
|
2241
|
-
Node$
|
|
2242
|
-
let Node$
|
|
2243
|
-
let Declaration$4$1 = class Declaration extends Node$
|
|
2371
|
+
var node$1 = Node$5$1;
|
|
2372
|
+
Node$5$1.default = Node$5$1;
|
|
2373
|
+
let Node$4$1 = node$1;
|
|
2374
|
+
let Declaration$4$1 = class Declaration extends Node$4$1 {
|
|
2244
2375
|
constructor(defaults) {
|
|
2245
2376
|
if (defaults && typeof defaults.value !== "undefined" && typeof defaults.value !== "string") {
|
|
2246
2377
|
defaults = { ...defaults, value: String(defaults.value) };
|
|
@@ -2896,8 +3027,8 @@ let MapGenerator$2$1 = class MapGenerator {
|
|
|
2896
3027
|
}
|
|
2897
3028
|
};
|
|
2898
3029
|
var mapGenerator$1 = MapGenerator$2$1;
|
|
2899
|
-
let Node$
|
|
2900
|
-
let Comment$4$1 = class Comment extends Node$
|
|
3030
|
+
let Node$3$1 = node$1;
|
|
3031
|
+
let Comment$4$1 = class Comment extends Node$3$1 {
|
|
2901
3032
|
constructor(defaults) {
|
|
2902
3033
|
super(defaults);
|
|
2903
3034
|
this.type = "comment";
|
|
@@ -2908,7 +3039,7 @@ Comment$4$1.default = Comment$4$1;
|
|
|
2908
3039
|
let { isClean: isClean$1$1, my: my$1$1 } = symbols$1;
|
|
2909
3040
|
let Declaration$3$1 = declaration$1;
|
|
2910
3041
|
let Comment$3$1 = comment$1;
|
|
2911
|
-
let Node$
|
|
3042
|
+
let Node$2$1 = node$1;
|
|
2912
3043
|
let parse$4$1, Rule$4$1, AtRule$4$1, Root$6$1;
|
|
2913
3044
|
function cleanSource$1(nodes) {
|
|
2914
3045
|
return nodes.map((i2) => {
|
|
@@ -2925,7 +3056,7 @@ function markDirtyUp$1(node2) {
|
|
|
2925
3056
|
}
|
|
2926
3057
|
}
|
|
2927
3058
|
}
|
|
2928
|
-
let Container$7$1 = class Container extends Node$
|
|
3059
|
+
let Container$7$1 = class Container extends Node$2$1 {
|
|
2929
3060
|
append(...children) {
|
|
2930
3061
|
for (let child of children) {
|
|
2931
3062
|
let nodes = this.normalize(child, this.last);
|
|
@@ -4952,7 +5083,7 @@ let parse$5 = parse_1$1;
|
|
|
4952
5083
|
let list$3 = list_1$1;
|
|
4953
5084
|
let Rule2$1 = rule$1;
|
|
4954
5085
|
let Root2$1 = root$1;
|
|
4955
|
-
let
|
|
5086
|
+
let Node$1$1 = node$1;
|
|
4956
5087
|
function postcss$3(...plugins) {
|
|
4957
5088
|
if (plugins.length === 1 && Array.isArray(plugins[0])) {
|
|
4958
5089
|
plugins = plugins[0];
|
|
@@ -5012,7 +5143,7 @@ postcss$3.Result = Result2$1;
|
|
|
5012
5143
|
postcss$3.Input = Input2$1;
|
|
5013
5144
|
postcss$3.Rule = Rule2$1;
|
|
5014
5145
|
postcss$3.Root = Root2$1;
|
|
5015
|
-
postcss$3.Node =
|
|
5146
|
+
postcss$3.Node = Node$1$1;
|
|
5016
5147
|
LazyResult2$1.registerPostcss(postcss$3);
|
|
5017
5148
|
var postcss_1$1 = postcss$3;
|
|
5018
5149
|
postcss$3.default = postcss$3;
|
|
@@ -5942,7 +6073,7 @@ function cloneNode(obj, parent) {
|
|
|
5942
6073
|
}
|
|
5943
6074
|
return cloned;
|
|
5944
6075
|
}
|
|
5945
|
-
let Node$
|
|
6076
|
+
let Node$5 = class Node22 {
|
|
5946
6077
|
constructor(defaults = {}) {
|
|
5947
6078
|
this.raws = {};
|
|
5948
6079
|
this[isClean$2] = false;
|
|
@@ -6234,10 +6365,10 @@ let Node$4 = class Node3 {
|
|
|
6234
6365
|
return this;
|
|
6235
6366
|
}
|
|
6236
6367
|
};
|
|
6237
|
-
var node = Node$
|
|
6238
|
-
Node$
|
|
6239
|
-
let Node$
|
|
6240
|
-
let Declaration$4 = class Declaration2 extends Node$
|
|
6368
|
+
var node = Node$5;
|
|
6369
|
+
Node$5.default = Node$5;
|
|
6370
|
+
let Node$4 = node;
|
|
6371
|
+
let Declaration$4 = class Declaration2 extends Node$4 {
|
|
6241
6372
|
constructor(defaults) {
|
|
6242
6373
|
if (defaults && typeof defaults.value !== "undefined" && typeof defaults.value !== "string") {
|
|
6243
6374
|
defaults = { ...defaults, value: String(defaults.value) };
|
|
@@ -6893,8 +7024,8 @@ let MapGenerator$2 = class MapGenerator2 {
|
|
|
6893
7024
|
}
|
|
6894
7025
|
};
|
|
6895
7026
|
var mapGenerator = MapGenerator$2;
|
|
6896
|
-
let Node$
|
|
6897
|
-
let Comment$4 = class Comment2 extends Node$
|
|
7027
|
+
let Node$3 = node;
|
|
7028
|
+
let Comment$4 = class Comment2 extends Node$3 {
|
|
6898
7029
|
constructor(defaults) {
|
|
6899
7030
|
super(defaults);
|
|
6900
7031
|
this.type = "comment";
|
|
@@ -6905,7 +7036,7 @@ Comment$4.default = Comment$4;
|
|
|
6905
7036
|
let { isClean: isClean$1, my: my$1 } = symbols;
|
|
6906
7037
|
let Declaration$3 = declaration;
|
|
6907
7038
|
let Comment$3 = comment;
|
|
6908
|
-
let Node$
|
|
7039
|
+
let Node$2 = node;
|
|
6909
7040
|
let parse$4, Rule$4, AtRule$4, Root$6;
|
|
6910
7041
|
function cleanSource(nodes) {
|
|
6911
7042
|
return nodes.map((i2) => {
|
|
@@ -6922,7 +7053,7 @@ function markDirtyUp(node2) {
|
|
|
6922
7053
|
}
|
|
6923
7054
|
}
|
|
6924
7055
|
}
|
|
6925
|
-
let Container$7 = class Container2 extends Node$
|
|
7056
|
+
let Container$7 = class Container2 extends Node$2 {
|
|
6926
7057
|
append(...children) {
|
|
6927
7058
|
for (let child of children) {
|
|
6928
7059
|
let nodes = this.normalize(child, this.last);
|
|
@@ -8949,7 +9080,7 @@ let parse = parse_1;
|
|
|
8949
9080
|
let list = list_1;
|
|
8950
9081
|
let Rule22 = rule;
|
|
8951
9082
|
let Root22 = root;
|
|
8952
|
-
let
|
|
9083
|
+
let Node$1 = node;
|
|
8953
9084
|
function postcss(...plugins) {
|
|
8954
9085
|
if (plugins.length === 1 && Array.isArray(plugins[0])) {
|
|
8955
9086
|
plugins = plugins[0];
|
|
@@ -9009,7 +9140,7 @@ postcss.Result = Result22;
|
|
|
9009
9140
|
postcss.Input = Input22;
|
|
9010
9141
|
postcss.Rule = Rule22;
|
|
9011
9142
|
postcss.Root = Root22;
|
|
9012
|
-
postcss.Node =
|
|
9143
|
+
postcss.Node = Node$1;
|
|
9013
9144
|
LazyResult22.registerPostcss(postcss);
|
|
9014
9145
|
var postcss_1 = postcss;
|
|
9015
9146
|
postcss.default = postcss;
|
|
@@ -10880,20 +11011,20 @@ var IncrementalSource = /* @__PURE__ */ ((IncrementalSource2) => {
|
|
|
10880
11011
|
IncrementalSource2[IncrementalSource2["Selection"] = 14] = "Selection";
|
|
10881
11012
|
IncrementalSource2[IncrementalSource2["AdoptedStyleSheet"] = 15] = "AdoptedStyleSheet";
|
|
10882
11013
|
IncrementalSource2[IncrementalSource2["CustomElement"] = 16] = "CustomElement";
|
|
11014
|
+
IncrementalSource2[IncrementalSource2["VisibilityChange"] = 17] = "VisibilityChange";
|
|
10883
11015
|
return IncrementalSource2;
|
|
10884
11016
|
})(IncrementalSource || {});
|
|
10885
11017
|
var MouseInteractions = /* @__PURE__ */ ((MouseInteractions2) => {
|
|
10886
11018
|
MouseInteractions2[MouseInteractions2["MouseUp"] = 0] = "MouseUp";
|
|
10887
11019
|
MouseInteractions2[MouseInteractions2["MouseDown"] = 1] = "MouseDown";
|
|
10888
11020
|
MouseInteractions2[MouseInteractions2["Click"] = 2] = "Click";
|
|
10889
|
-
MouseInteractions2[MouseInteractions2["
|
|
10890
|
-
MouseInteractions2[MouseInteractions2["
|
|
10891
|
-
MouseInteractions2[MouseInteractions2["
|
|
10892
|
-
MouseInteractions2[MouseInteractions2["
|
|
10893
|
-
MouseInteractions2[MouseInteractions2["
|
|
10894
|
-
MouseInteractions2[MouseInteractions2["
|
|
10895
|
-
MouseInteractions2[MouseInteractions2["
|
|
10896
|
-
MouseInteractions2[MouseInteractions2["TouchCancel"] = 10] = "TouchCancel";
|
|
11021
|
+
MouseInteractions2[MouseInteractions2["DblClick"] = 3] = "DblClick";
|
|
11022
|
+
MouseInteractions2[MouseInteractions2["Focus"] = 4] = "Focus";
|
|
11023
|
+
MouseInteractions2[MouseInteractions2["Blur"] = 5] = "Blur";
|
|
11024
|
+
MouseInteractions2[MouseInteractions2["TouchStart"] = 6] = "TouchStart";
|
|
11025
|
+
MouseInteractions2[MouseInteractions2["TouchMove_Departed"] = 7] = "TouchMove_Departed";
|
|
11026
|
+
MouseInteractions2[MouseInteractions2["TouchEnd"] = 8] = "TouchEnd";
|
|
11027
|
+
MouseInteractions2[MouseInteractions2["TouchCancel"] = 9] = "TouchCancel";
|
|
10897
11028
|
return MouseInteractions2;
|
|
10898
11029
|
})(MouseInteractions || {});
|
|
10899
11030
|
var PointerTypes = /* @__PURE__ */ ((PointerTypes2) => {
|
|
@@ -11593,6 +11724,54 @@ function initMutationObserver(options, rootEl) {
|
|
|
11593
11724
|
});
|
|
11594
11725
|
return observer;
|
|
11595
11726
|
}
|
|
11727
|
+
function initVisibilityObserver({
|
|
11728
|
+
visibilityChangeCb,
|
|
11729
|
+
doc,
|
|
11730
|
+
mirror: mirror2
|
|
11731
|
+
}) {
|
|
11732
|
+
if (!visibilityChangeCb) {
|
|
11733
|
+
return () => {
|
|
11734
|
+
};
|
|
11735
|
+
}
|
|
11736
|
+
const observedElements = /* @__PURE__ */ new WeakMap();
|
|
11737
|
+
const observer = new IntersectionObserver(
|
|
11738
|
+
(entries) => {
|
|
11739
|
+
entries.forEach((entry) => {
|
|
11740
|
+
const target = entry.target;
|
|
11741
|
+
const id = mirror2.getId(target);
|
|
11742
|
+
const isVisible = entry.isIntersecting || entry.intersectionRatio > 0;
|
|
11743
|
+
if (id !== -1) {
|
|
11744
|
+
if (observedElements.has(target)) {
|
|
11745
|
+
visibilityChangeCb({
|
|
11746
|
+
id,
|
|
11747
|
+
isVisible,
|
|
11748
|
+
visibilityRatio: entry.intersectionRatio,
|
|
11749
|
+
boundingRect: entry.boundingClientRect
|
|
11750
|
+
});
|
|
11751
|
+
} else {
|
|
11752
|
+
observedElements.set(target, true);
|
|
11753
|
+
}
|
|
11754
|
+
}
|
|
11755
|
+
});
|
|
11756
|
+
},
|
|
11757
|
+
{ root: null, threshold: [0.1, 0.9] }
|
|
11758
|
+
);
|
|
11759
|
+
doc.querySelectorAll("*").forEach((el) => observer.observe(el));
|
|
11760
|
+
const mutationObserver = new MutationObserver((mutations) => {
|
|
11761
|
+
mutations.forEach((mutation) => {
|
|
11762
|
+
mutation.addedNodes.forEach((node2) => {
|
|
11763
|
+
if (node2 instanceof Element) {
|
|
11764
|
+
observer.observe(node2);
|
|
11765
|
+
}
|
|
11766
|
+
});
|
|
11767
|
+
});
|
|
11768
|
+
});
|
|
11769
|
+
mutationObserver.observe(doc, { childList: true, subtree: true });
|
|
11770
|
+
return () => {
|
|
11771
|
+
observer.disconnect();
|
|
11772
|
+
mutationObserver.disconnect();
|
|
11773
|
+
};
|
|
11774
|
+
}
|
|
11596
11775
|
function initMoveObserver({
|
|
11597
11776
|
mousemoveCb,
|
|
11598
11777
|
sampling,
|
|
@@ -12408,6 +12587,7 @@ function initCustomElementObserver({
|
|
|
12408
12587
|
function mergeHooks(o2, hooks) {
|
|
12409
12588
|
const {
|
|
12410
12589
|
mutationCb,
|
|
12590
|
+
visibilityChangeCb,
|
|
12411
12591
|
mousemoveCb,
|
|
12412
12592
|
mouseInteractionCb,
|
|
12413
12593
|
scrollCb,
|
|
@@ -12427,6 +12607,12 @@ function mergeHooks(o2, hooks) {
|
|
|
12427
12607
|
}
|
|
12428
12608
|
mutationCb(...p);
|
|
12429
12609
|
};
|
|
12610
|
+
o2.visibilityChangeCb = (...p) => {
|
|
12611
|
+
if (hooks.visibilityChange) {
|
|
12612
|
+
hooks.visibilityChange(...p);
|
|
12613
|
+
}
|
|
12614
|
+
visibilityChangeCb(...p);
|
|
12615
|
+
};
|
|
12430
12616
|
o2.mousemoveCb = (...p) => {
|
|
12431
12617
|
if (hooks.mousemove) {
|
|
12432
12618
|
hooks.mousemove(...p);
|
|
@@ -12501,6 +12687,7 @@ function mergeHooks(o2, hooks) {
|
|
|
12501
12687
|
};
|
|
12502
12688
|
}
|
|
12503
12689
|
function initObservers(o2, hooks = {}) {
|
|
12690
|
+
console.info("initObservers", o2);
|
|
12504
12691
|
const currentWindow = o2.doc.defaultView;
|
|
12505
12692
|
if (!currentWindow) {
|
|
12506
12693
|
return () => {
|
|
@@ -12519,6 +12706,7 @@ function initObservers(o2, hooks = {}) {
|
|
|
12519
12706
|
});
|
|
12520
12707
|
const inputHandler = initInputObserver(o2);
|
|
12521
12708
|
const mediaInteractionHandler = initMediaInteractionObserver(o2);
|
|
12709
|
+
const visibleHandler = initVisibilityObserver(o2);
|
|
12522
12710
|
let styleSheetObserver = () => {
|
|
12523
12711
|
};
|
|
12524
12712
|
let adoptedStyleSheetObserver = () => {
|
|
@@ -12548,6 +12736,7 @@ function initObservers(o2, hooks = {}) {
|
|
|
12548
12736
|
return callbackWrapper(() => {
|
|
12549
12737
|
mutationBuffers.forEach((b) => b.reset());
|
|
12550
12738
|
mutationObserver == null ? void 0 : mutationObserver.disconnect();
|
|
12739
|
+
visibleHandler();
|
|
12551
12740
|
mousemoveHandler();
|
|
12552
12741
|
mouseInteractionHandler();
|
|
12553
12742
|
scrollHandler();
|
|
@@ -13634,6 +13823,7 @@ function record(options = {}) {
|
|
|
13634
13823
|
emit,
|
|
13635
13824
|
checkoutEveryNms,
|
|
13636
13825
|
checkoutEveryNth,
|
|
13826
|
+
checkoutEveryEvc,
|
|
13637
13827
|
blockClass = "rr-block",
|
|
13638
13828
|
blockSelector = null,
|
|
13639
13829
|
ignoreClass = "rr-ignore",
|
|
@@ -13924,6 +14114,11 @@ function record(options = {}) {
|
|
|
13924
14114
|
mirror.getId(document)
|
|
13925
14115
|
);
|
|
13926
14116
|
};
|
|
14117
|
+
const debouncedFullSnapshot = throttle(() => {
|
|
14118
|
+
if (checkoutEveryEvc) {
|
|
14119
|
+
takeFullSnapshot$1(true);
|
|
14120
|
+
}
|
|
14121
|
+
}, 100, { leading: false, trailing: true });
|
|
13927
14122
|
try {
|
|
13928
14123
|
const handlers = [];
|
|
13929
14124
|
const observe = (doc) => {
|
|
@@ -13931,6 +14126,18 @@ function record(options = {}) {
|
|
|
13931
14126
|
return callbackWrapper(initObservers)(
|
|
13932
14127
|
{
|
|
13933
14128
|
mutationCb: wrappedMutationEmit,
|
|
14129
|
+
visibilityChangeCb: (v2) => {
|
|
14130
|
+
debouncedFullSnapshot();
|
|
14131
|
+
if (sampling.visibility) {
|
|
14132
|
+
return wrappedEmit({
|
|
14133
|
+
type: EventType.IncrementalSnapshot,
|
|
14134
|
+
data: {
|
|
14135
|
+
source: IncrementalSource.VisibilityChange,
|
|
14136
|
+
...v2
|
|
14137
|
+
}
|
|
14138
|
+
});
|
|
14139
|
+
}
|
|
14140
|
+
},
|
|
13934
14141
|
mousemoveCb: (positions, source) => wrappedEmit({
|
|
13935
14142
|
type: EventType.IncrementalSnapshot,
|
|
13936
14143
|
data: {
|