@posthog/rrweb-player 0.0.49 → 0.0.50
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-player.cjs +26 -17
- package/dist/rrweb-player.cjs.map +1 -1
- package/dist/rrweb-player.js +26 -17
- package/dist/rrweb-player.js.map +1 -1
- package/dist/rrweb-player.umd.cjs +22 -17
- package/dist/rrweb-player.umd.cjs.map +2 -2
- package/dist/rrweb-player.umd.min.cjs +16 -16
- package/dist/rrweb-player.umd.min.cjs.map +3 -3
- package/package.json +4 -4
package/dist/rrweb-player.js
CHANGED
|
@@ -10811,14 +10811,14 @@ function hasShadowRoot(n2) {
|
|
|
10811
10811
|
return Boolean(index.shadowRoot(n2));
|
|
10812
10812
|
}
|
|
10813
10813
|
function getNestedRule(rules2, position2) {
|
|
10814
|
-
const rule2 = rules2[position2[0]];
|
|
10814
|
+
const rule2 = rules2 == null ? void 0 : rules2[position2[0]];
|
|
10815
|
+
if (!rule2) {
|
|
10816
|
+
return null;
|
|
10817
|
+
}
|
|
10815
10818
|
if (position2.length === 1) {
|
|
10816
10819
|
return rule2;
|
|
10817
10820
|
} else {
|
|
10818
|
-
return getNestedRule(
|
|
10819
|
-
rule2.cssRules[position2[1]].cssRules,
|
|
10820
|
-
position2.slice(2)
|
|
10821
|
-
);
|
|
10821
|
+
return getNestedRule(rule2.cssRules, position2.slice(1));
|
|
10822
10822
|
}
|
|
10823
10823
|
}
|
|
10824
10824
|
function getPositionsAndIndex(nestedIndex) {
|
|
@@ -13524,18 +13524,27 @@ class Replayer {
|
|
|
13524
13524
|
const newSn = mirror2.getMeta(
|
|
13525
13525
|
target
|
|
13526
13526
|
);
|
|
13527
|
+
const newNode = buildNodeWithSN(
|
|
13528
|
+
{
|
|
13529
|
+
...newSn,
|
|
13530
|
+
attributes: {
|
|
13531
|
+
...newSn.attributes,
|
|
13532
|
+
...mutation.attributes
|
|
13533
|
+
}
|
|
13534
|
+
},
|
|
13535
|
+
{
|
|
13536
|
+
doc: target.ownerDocument,
|
|
13537
|
+
// can be Document or RRDocument
|
|
13538
|
+
mirror: mirror2,
|
|
13539
|
+
skipChild: true,
|
|
13540
|
+
hackCss: true,
|
|
13541
|
+
cache: this.cache
|
|
13542
|
+
}
|
|
13543
|
+
);
|
|
13527
13544
|
Object.assign(
|
|
13528
13545
|
newSn.attributes,
|
|
13529
13546
|
mutation.attributes
|
|
13530
13547
|
);
|
|
13531
|
-
const newNode = buildNodeWithSN(newSn, {
|
|
13532
|
-
doc: target.ownerDocument,
|
|
13533
|
-
// can be Document or RRDocument
|
|
13534
|
-
mirror: mirror2,
|
|
13535
|
-
skipChild: true,
|
|
13536
|
-
hackCss: true,
|
|
13537
|
-
cache: this.cache
|
|
13538
|
-
});
|
|
13539
13548
|
const siblingNode = target.nextSibling;
|
|
13540
13549
|
const parentNode2 = target.parentNode;
|
|
13541
13550
|
if (newNode && parentNode2) {
|
|
@@ -13685,7 +13694,7 @@ class Replayer {
|
|
|
13685
13694
|
if (Array.isArray(nestedIndex)) {
|
|
13686
13695
|
const { positions, index: index2 } = getPositionsAndIndex(nestedIndex);
|
|
13687
13696
|
const nestedRule = getNestedRule(styleSheet.cssRules, positions);
|
|
13688
|
-
nestedRule.insertRule(rule2, index2);
|
|
13697
|
+
nestedRule == null ? void 0 : nestedRule.insertRule(rule2, index2);
|
|
13689
13698
|
} else {
|
|
13690
13699
|
const index2 = nestedIndex === void 0 ? void 0 : Math.min(nestedIndex, styleSheet.cssRules.length);
|
|
13691
13700
|
styleSheet == null ? void 0 : styleSheet.insertRule(rule2, index2);
|
|
@@ -13698,19 +13707,19 @@ class Replayer {
|
|
|
13698
13707
|
if (Array.isArray(nestedIndex)) {
|
|
13699
13708
|
const { positions, index: index2 } = getPositionsAndIndex(nestedIndex);
|
|
13700
13709
|
const nestedRule = getNestedRule(styleSheet.cssRules, positions);
|
|
13701
|
-
nestedRule.deleteRule(index2 || 0);
|
|
13710
|
+
nestedRule == null ? void 0 : nestedRule.deleteRule(index2 || 0);
|
|
13702
13711
|
} else {
|
|
13703
13712
|
styleSheet == null ? void 0 : styleSheet.deleteRule(nestedIndex);
|
|
13704
13713
|
}
|
|
13705
13714
|
} catch (e2) {
|
|
13706
13715
|
}
|
|
13707
13716
|
});
|
|
13708
|
-
if (data.replace)
|
|
13717
|
+
if (typeof data.replace === "string")
|
|
13709
13718
|
try {
|
|
13710
13719
|
void ((_c = styleSheet.replace) == null ? void 0 : _c.call(styleSheet, data.replace));
|
|
13711
13720
|
} catch (e2) {
|
|
13712
13721
|
}
|
|
13713
|
-
if (data.replaceSync)
|
|
13722
|
+
if (typeof data.replaceSync === "string")
|
|
13714
13723
|
try {
|
|
13715
13724
|
(_d = styleSheet.replaceSync) == null ? void 0 : _d.call(styleSheet, data.replaceSync);
|
|
13716
13725
|
} catch (e2) {
|