@checksum-ai/runtime 1.1.71 → 1.1.72-beta

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.
Files changed (5) hide show
  1. package/.env +1 -1
  2. package/checksumlib.js +245 -160
  3. package/cli.js +345 -345
  4. package/index.js +2 -2
  5. package/package.json +1 -1
package/checksumlib.js CHANGED
@@ -11621,7 +11621,7 @@
11621
11621
  var __defProp$1 = Object.defineProperty;
11622
11622
  var __defNormalProp$1 = /* @__PURE__ */ __name((obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value, "__defNormalProp$1");
11623
11623
  var __publicField$1 = /* @__PURE__ */ __name((obj, key, value) => __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value), "__publicField$1");
11624
- var NodeType$2 = /* @__PURE__ */ ((NodeType2) => {
11624
+ var NodeType$3 = /* @__PURE__ */ ((NodeType2) => {
11625
11625
  NodeType2[NodeType2["Document"] = 0] = "Document";
11626
11626
  NodeType2[NodeType2["DocumentType"] = 1] = "DocumentType";
11627
11627
  NodeType2[NodeType2["Element"] = 2] = "Element";
@@ -11629,7 +11629,7 @@
11629
11629
  NodeType2[NodeType2["CDATA"] = 4] = "CDATA";
11630
11630
  NodeType2[NodeType2["Comment"] = 5] = "Comment";
11631
11631
  return NodeType2;
11632
- })(NodeType$2 || {});
11632
+ })(NodeType$3 || {});
11633
11633
  var testableAccessors$1 = {
11634
11634
  Node: ["childNodes", "parentNode", "parentElement", "textContent"],
11635
11635
  ShadowRoot: ["host", "styleSheets"],
@@ -11643,6 +11643,9 @@
11643
11643
  MutationObserver: ["constructor"]
11644
11644
  };
11645
11645
  var untaintedBasePrototype$1 = {};
11646
+ var isAngularZonePresent$1 = /* @__PURE__ */ __name(() => {
11647
+ return !!globalThis.Zone;
11648
+ }, "isAngularZonePresent$1");
11646
11649
  function getUntaintedPrototype$1(key) {
11647
11650
  if (untaintedBasePrototype$1[key])
11648
11651
  return untaintedBasePrototype$1[key];
@@ -11670,7 +11673,7 @@
11670
11673
  }
11671
11674
  )
11672
11675
  );
11673
- if (isUntaintedAccessors && isUntaintedMethods) {
11676
+ if (isUntaintedAccessors && isUntaintedMethods && !isAngularZonePresent$1()) {
11674
11677
  untaintedBasePrototype$1[key] = defaultObj.prototype;
11675
11678
  return defaultObj.prototype;
11676
11679
  }
@@ -11837,9 +11840,13 @@
11837
11840
  if (!rules2) {
11838
11841
  return null;
11839
11842
  }
11843
+ let sheetHref = s2.href;
11844
+ if (!sheetHref && s2.ownerNode && s2.ownerNode.ownerDocument) {
11845
+ sheetHref = s2.ownerNode.ownerDocument.location.href;
11846
+ }
11840
11847
  const stringifiedRules = Array.from(
11841
11848
  rules2,
11842
- (rule2) => stringifyRule(rule2, s2.href)
11849
+ (rule2) => stringifyRule(rule2, sheetHref)
11843
11850
  ).join("");
11844
11851
  return fixBrowserCompatibilityIssuesInCSS(stringifiedRules);
11845
11852
  } catch (error) {
@@ -12000,13 +12007,13 @@
12000
12007
  __name(is2DCanvasBlank, "is2DCanvasBlank");
12001
12008
  function isNodeMetaEqual(a2, b) {
12002
12009
  if (!a2 || !b || a2.type !== b.type) return false;
12003
- if (a2.type === NodeType$2.Document)
12010
+ if (a2.type === NodeType$3.Document)
12004
12011
  return a2.compatMode === b.compatMode;
12005
- else if (a2.type === NodeType$2.DocumentType)
12012
+ else if (a2.type === NodeType$3.DocumentType)
12006
12013
  return a2.name === b.name && a2.publicId === b.publicId && a2.systemId === b.systemId;
12007
- else if (a2.type === NodeType$2.Comment || a2.type === NodeType$2.Text || a2.type === NodeType$2.CDATA)
12014
+ else if (a2.type === NodeType$3.Comment || a2.type === NodeType$3.Text || a2.type === NodeType$3.CDATA)
12008
12015
  return a2.textContent === b.textContent;
12009
- else if (a2.type === NodeType$2.Element)
12016
+ else if (a2.type === NodeType$3.Element)
12010
12017
  return a2.tagName === b.tagName && JSON.stringify(a2.attributes) === JSON.stringify(b.attributes) && a2.isSVG === b.isSVG && a2.needBlock === b.needBlock;
12011
12018
  return false;
12012
12019
  }
@@ -12081,6 +12088,43 @@
12081
12088
  );
12082
12089
  }
12083
12090
  __name(absolutifyURLs, "absolutifyURLs");
12091
+ function normalizeCssString(cssText) {
12092
+ return cssText.replace(/(\/\*[^*]*\*\/)|[\s;]/g, "");
12093
+ }
12094
+ __name(normalizeCssString, "normalizeCssString");
12095
+ function splitCssText(cssText, style) {
12096
+ const childNodes2 = Array.from(style.childNodes);
12097
+ const splits = [];
12098
+ if (childNodes2.length > 1 && cssText && typeof cssText === "string") {
12099
+ const cssTextNorm = normalizeCssString(cssText);
12100
+ for (let i2 = 1; i2 < childNodes2.length; i2++) {
12101
+ if (childNodes2[i2].textContent && typeof childNodes2[i2].textContent === "string") {
12102
+ const textContentNorm = normalizeCssString(childNodes2[i2].textContent);
12103
+ for (let j = 3; j < textContentNorm.length; j++) {
12104
+ const bit = textContentNorm.substring(0, j);
12105
+ if (cssTextNorm.split(bit).length === 2) {
12106
+ const splitNorm = cssTextNorm.indexOf(bit);
12107
+ for (let k = splitNorm; k < cssText.length; k++) {
12108
+ if (normalizeCssString(cssText.substring(0, k)).length === splitNorm) {
12109
+ splits.push(cssText.substring(0, k));
12110
+ cssText = cssText.substring(k);
12111
+ break;
12112
+ }
12113
+ }
12114
+ break;
12115
+ }
12116
+ }
12117
+ }
12118
+ }
12119
+ }
12120
+ splits.push(cssText);
12121
+ return splits;
12122
+ }
12123
+ __name(splitCssText, "splitCssText");
12124
+ function markCssSplits(cssText, style) {
12125
+ return splitCssText(cssText, style).join("/* rr_split */");
12126
+ }
12127
+ __name(markCssSplits, "markCssSplits");
12084
12128
  var _id = 1;
12085
12129
  var tagNameRegex = new RegExp("[^a-z0-9-_:]");
12086
12130
  var IGNORED_NODE = -2;
@@ -12353,27 +12397,28 @@
12353
12397
  inlineImages,
12354
12398
  recordCanvas,
12355
12399
  keepIframeSrcFn,
12356
- newlyAddedElement = false
12400
+ newlyAddedElement = false,
12401
+ cssCaptured = false
12357
12402
  } = options;
12358
12403
  const rootId = getRootId(doc, mirror2);
12359
12404
  switch (n2.nodeType) {
12360
12405
  case n2.DOCUMENT_NODE:
12361
12406
  if (n2.compatMode !== "CSS1Compat") {
12362
12407
  return {
12363
- type: NodeType$2.Document,
12408
+ type: NodeType$3.Document,
12364
12409
  childNodes: [],
12365
12410
  compatMode: n2.compatMode
12366
12411
  // probably "BackCompat"
12367
12412
  };
12368
12413
  } else {
12369
12414
  return {
12370
- type: NodeType$2.Document,
12415
+ type: NodeType$3.Document,
12371
12416
  childNodes: []
12372
12417
  };
12373
12418
  }
12374
12419
  case n2.DOCUMENT_TYPE_NODE:
12375
12420
  return {
12376
- type: NodeType$2.DocumentType,
12421
+ type: NodeType$3.DocumentType,
12377
12422
  name: n2.name,
12378
12423
  publicId: n2.publicId,
12379
12424
  systemId: n2.systemId,
@@ -12399,17 +12444,18 @@
12399
12444
  doc,
12400
12445
  needsMask,
12401
12446
  maskTextFn,
12402
- rootId
12447
+ rootId,
12448
+ cssCaptured
12403
12449
  });
12404
12450
  case n2.CDATA_SECTION_NODE:
12405
12451
  return {
12406
- type: NodeType$2.CDATA,
12452
+ type: NodeType$3.CDATA,
12407
12453
  textContent: "",
12408
12454
  rootId
12409
12455
  };
12410
12456
  case n2.COMMENT_NODE:
12411
12457
  return {
12412
- type: NodeType$2.Comment,
12458
+ type: NodeType$3.Comment,
12413
12459
  textContent: index$1.textContent(n2) || "",
12414
12460
  rootId
12415
12461
  };
@@ -12425,37 +12471,26 @@
12425
12471
  }
12426
12472
  __name(getRootId, "getRootId");
12427
12473
  function serializeTextNode(n2, options) {
12428
- var _a2;
12429
- const { needsMask, maskTextFn, rootId } = options;
12474
+ const { needsMask, maskTextFn, rootId, cssCaptured } = options;
12430
12475
  const parent = index$1.parentNode(n2);
12431
12476
  const parentTagName = parent && parent.tagName;
12432
- let text = index$1.textContent(n2);
12477
+ let textContent2 = "";
12433
12478
  const isStyle = parentTagName === "STYLE" ? true : void 0;
12434
12479
  const isScript = parentTagName === "SCRIPT" ? true : void 0;
12435
- if (isStyle && text) {
12436
- try {
12437
- if (n2.nextSibling || n2.previousSibling) {
12438
- } else if ((_a2 = parent.sheet) == null ? void 0 : _a2.cssRules) {
12439
- text = stringifyStylesheet(parent.sheet);
12440
- }
12441
- } catch (err) {
12442
- console.warn(
12443
- `Cannot get CSS styles from text's parentNode. Error: ${err}`,
12444
- n2
12445
- );
12446
- }
12447
- text = absolutifyURLs(text, getHref(options.doc));
12448
- }
12449
12480
  if (isScript) {
12450
- text = "SCRIPT_PLACEHOLDER";
12481
+ textContent2 = "SCRIPT_PLACEHOLDER";
12482
+ } else if (!cssCaptured) {
12483
+ textContent2 = index$1.textContent(n2);
12484
+ if (isStyle && textContent2) {
12485
+ textContent2 = absolutifyURLs(textContent2, getHref(options.doc));
12486
+ }
12451
12487
  }
12452
- if (!isStyle && !isScript && text && needsMask) {
12453
- text = maskTextFn ? maskTextFn(text, index$1.parentElement(n2)) : text.replace(/[\S]/g, "*");
12488
+ if (!isStyle && !isScript && textContent2 && needsMask) {
12489
+ textContent2 = maskTextFn ? maskTextFn(textContent2, index$1.parentElement(n2)) : textContent2.replace(/[\S]/g, "*");
12454
12490
  }
12455
12491
  return {
12456
- type: NodeType$2.Text,
12457
- textContent: text || "",
12458
- isStyle,
12492
+ type: NodeType$3.Text,
12493
+ textContent: textContent2 || "",
12459
12494
  rootId
12460
12495
  };
12461
12496
  }
@@ -12504,12 +12539,14 @@
12504
12539
  attributes._cssText = cssText;
12505
12540
  }
12506
12541
  }
12507
- if (tagName === "style" && n2.sheet && // TODO: Currently we only try to get dynamic stylesheet when it is an empty style element
12508
- !(n2.innerText || index$1.textContent(n2) || "").trim().length) {
12509
- const cssText = stringifyStylesheet(
12542
+ if (tagName === "style" && n2.sheet) {
12543
+ let cssText = stringifyStylesheet(
12510
12544
  n2.sheet
12511
12545
  );
12512
12546
  if (cssText) {
12547
+ if (n2.childNodes.length > 1) {
12548
+ cssText = markCssSplits(cssText, n2);
12549
+ }
12513
12550
  attributes._cssText = cssText;
12514
12551
  }
12515
12552
  }
@@ -12639,7 +12676,7 @@
12639
12676
  } catch (e2) {
12640
12677
  }
12641
12678
  return {
12642
- type: NodeType$2.Element,
12679
+ type: NodeType$3.Element,
12643
12680
  tagName,
12644
12681
  attributes,
12645
12682
  childNodes: [],
@@ -12659,9 +12696,9 @@
12659
12696
  }
12660
12697
  __name(lowerIfExists, "lowerIfExists");
12661
12698
  function slimDOMExcluded(sn, slimDOMOptions) {
12662
- if (slimDOMOptions.comment && sn.type === NodeType$2.Comment) {
12699
+ if (slimDOMOptions.comment && sn.type === NodeType$3.Comment) {
12663
12700
  return true;
12664
- } else if (sn.type === NodeType$2.Element) {
12701
+ } else if (sn.type === NodeType$3.Element) {
12665
12702
  if (slimDOMOptions.script && // script tag
12666
12703
  (sn.tagName === "script" || // (module)preload link
12667
12704
  sn.tagName === "link" && (sn.attributes.rel === "preload" || sn.attributes.rel === "modulepreload") && sn.attributes.as === "script" || // prefetch link
@@ -12714,7 +12751,8 @@
12714
12751
  onStylesheetLoad,
12715
12752
  stylesheetLoadTimeout = 5e3,
12716
12753
  keepIframeSrcFn = /* @__PURE__ */ __name(() => false, "keepIframeSrcFn"),
12717
- newlyAddedElement = false
12754
+ newlyAddedElement = false,
12755
+ cssCaptured = false
12718
12756
  } = options;
12719
12757
  let { needsMask } = options;
12720
12758
  let { preserveWhiteSpace = true } = options;
@@ -12741,7 +12779,8 @@
12741
12779
  inlineImages,
12742
12780
  recordCanvas,
12743
12781
  keepIframeSrcFn,
12744
- newlyAddedElement
12782
+ newlyAddedElement,
12783
+ cssCaptured
12745
12784
  });
12746
12785
  if (!_serializedNode) {
12747
12786
  console.warn(n2, "not serialized");
@@ -12750,7 +12789,7 @@
12750
12789
  let id;
12751
12790
  if (mirror2.hasNode(n2)) {
12752
12791
  id = mirror2.getId(n2);
12753
- } else if (slimDOMExcluded(_serializedNode, slimDOMOptions) || !preserveWhiteSpace && _serializedNode.type === NodeType$2.Text && !_serializedNode.isStyle && !_serializedNode.textContent.replace(/^\s+|\s+$/gm, "").length) {
12792
+ } else if (slimDOMExcluded(_serializedNode, slimDOMOptions) || !preserveWhiteSpace && _serializedNode.type === NodeType$3.Text && !_serializedNode.textContent.replace(/^\s+|\s+$/gm, "").length) {
12754
12793
  id = IGNORED_NODE;
12755
12794
  } else {
12756
12795
  id = genId();
@@ -12764,15 +12803,15 @@
12764
12803
  onSerialize(n2);
12765
12804
  }
12766
12805
  let recordChild = !skipChild;
12767
- if (serializedNode.type === NodeType$2.Element) {
12806
+ if (serializedNode.type === NodeType$3.Element) {
12768
12807
  recordChild = recordChild && !serializedNode.needBlock;
12769
12808
  delete serializedNode.needBlock;
12770
12809
  const shadowRootEl = index$1.shadowRoot(n2);
12771
12810
  if (shadowRootEl && isNativeShadowDom(shadowRootEl))
12772
12811
  serializedNode.isShadowHost = true;
12773
12812
  }
12774
- if ((serializedNode.type === NodeType$2.Document || serializedNode.type === NodeType$2.Element) && recordChild) {
12775
- if (slimDOMOptions.headWhitespace && serializedNode.type === NodeType$2.Element && serializedNode.tagName === "head") {
12813
+ if ((serializedNode.type === NodeType$3.Document || serializedNode.type === NodeType$3.Element) && recordChild) {
12814
+ if (slimDOMOptions.headWhitespace && serializedNode.type === NodeType$3.Element && serializedNode.tagName === "head") {
12776
12815
  preserveWhiteSpace = false;
12777
12816
  }
12778
12817
  const bypassOptions = {
@@ -12798,10 +12837,14 @@
12798
12837
  iframeLoadTimeout,
12799
12838
  onStylesheetLoad,
12800
12839
  stylesheetLoadTimeout,
12801
- keepIframeSrcFn
12840
+ keepIframeSrcFn,
12841
+ cssCaptured: false
12802
12842
  };
12803
- if (serializedNode.type === NodeType$2.Element && serializedNode.tagName === "textarea" && serializedNode.attributes.value !== void 0) ;
12843
+ if (serializedNode.type === NodeType$3.Element && serializedNode.tagName === "textarea" && serializedNode.attributes.value !== void 0) ;
12804
12844
  else {
12845
+ if (serializedNode.type === NodeType$3.Element && serializedNode.attributes._cssText !== void 0 && typeof serializedNode.attributes._cssText === "string") {
12846
+ bypassOptions.cssCaptured = true;
12847
+ }
12805
12848
  for (const childN of Array.from(index$1.childNodes(n2))) {
12806
12849
  const serializedChildNode = serializeNodeWithId(childN, bypassOptions);
12807
12850
  if (serializedChildNode) {
@@ -12824,7 +12867,7 @@
12824
12867
  if (parent && isShadowRoot(parent) && isNativeShadowDom(parent)) {
12825
12868
  serializedNode.isShadow = true;
12826
12869
  }
12827
- if (serializedNode.type === NodeType$2.Element && serializedNode.tagName === "iframe") {
12870
+ if (serializedNode.type === NodeType$3.Element && serializedNode.tagName === "iframe") {
12828
12871
  onceIframeLoaded(
12829
12872
  n2,
12830
12873
  () => {
@@ -12866,7 +12909,7 @@
12866
12909
  iframeLoadTimeout
12867
12910
  );
12868
12911
  }
12869
- if (serializedNode.type === NodeType$2.Element && serializedNode.tagName === "link" && typeof serializedNode.attributes.rel === "string" && (serializedNode.attributes.rel === "stylesheet" || serializedNode.attributes.rel === "preload" && typeof serializedNode.attributes.href === "string" && extractFileExtension(serializedNode.attributes.href) === "css")) {
12912
+ if (serializedNode.type === NodeType$3.Element && serializedNode.tagName === "link" && typeof serializedNode.attributes.rel === "string" && (serializedNode.attributes.rel === "stylesheet" || serializedNode.attributes.rel === "preload" && typeof serializedNode.attributes.href === "string" && extractFileExtension(serializedNode.attributes.href) === "css")) {
12870
12913
  onceStylesheetLoaded(
12871
12914
  n2,
12872
12915
  () => {
@@ -13022,43 +13065,9 @@
13022
13065
  }
13023
13066
  fixed.push(rule2);
13024
13067
  rule2.selectors.forEach(function(selector) {
13025
- if (!selector.includes(":")) {
13026
- return;
13027
- }
13028
- const selectorParts = selector.replace(/\n/g, " ").split(" ");
13029
- const pseudoedSelectorParts = [];
13030
- selectorParts.forEach(function(selectorPart) {
13031
- const pseudos = selectorPart.match(/::?([^:]+)/g);
13032
- if (!pseudos) {
13033
- pseudoedSelectorParts.push(selectorPart);
13034
- return;
13035
- }
13036
- const baseSelector = selectorPart.substr(
13037
- 0,
13038
- selectorPart.length - pseudos.join("").length
13039
- );
13040
- const classPseudos = pseudos.map(function(pseudo) {
13041
- const pseudoToCheck = pseudo.replace(/\(.*/g, "");
13042
- if (pseudoToCheck !== ":hover") {
13043
- return pseudo;
13044
- }
13045
- if (pseudo.match(/^::/)) {
13046
- return pseudo;
13047
- }
13048
- pseudo = pseudo.substr(1);
13049
- pseudo = pseudo.replace(/\(/g, "\\(");
13050
- pseudo = pseudo.replace(/\)/g, "\\)");
13051
- return ".\\:" + pseudo;
13052
- });
13053
- pseudoedSelectorParts.push(baseSelector + classPseudos.join(""));
13054
- });
13055
- addSelector(pseudoedSelectorParts.join(" "));
13056
- function addSelector(newSelector) {
13057
- if (newSelector && newSelector !== selector) {
13058
- rule2.selector += ",\n" + newSelector;
13059
- }
13068
+ if (selector.includes(":hover")) {
13069
+ rule2.selector += ",\n" + selector.replace(/:hover/g, ".\\:hover");
13060
13070
  }
13061
- __name(addSelector, "addSelector");
13062
13071
  });
13063
13072
  }, "Rule")
13064
13073
  };
@@ -16764,19 +16773,51 @@
16764
16773
  };
16765
16774
  }
16766
16775
  __name(createCache, "createCache");
16776
+ function applyCssSplits(n2, cssText, hackCss, cache) {
16777
+ const childTextNodes = [];
16778
+ for (const scn of n2.childNodes) {
16779
+ if (scn.type === NodeType$3.Text) {
16780
+ childTextNodes.push(scn);
16781
+ }
16782
+ }
16783
+ const cssTextSplits = cssText.split("/* rr_split */");
16784
+ while (cssTextSplits.length > 1 && cssTextSplits.length > childTextNodes.length) {
16785
+ cssTextSplits.splice(-2, 2, cssTextSplits.slice(-2).join(""));
16786
+ }
16787
+ for (let i2 = 0; i2 < childTextNodes.length; i2++) {
16788
+ const childTextNode = childTextNodes[i2];
16789
+ const cssTextSection = cssTextSplits[i2];
16790
+ if (childTextNode && cssTextSection) {
16791
+ childTextNode.textContent = hackCss ? adaptCssForReplay(cssTextSection, cache) : cssTextSection;
16792
+ }
16793
+ }
16794
+ }
16795
+ __name(applyCssSplits, "applyCssSplits");
16796
+ function buildStyleNode(n2, styleEl, cssText, options) {
16797
+ const { doc, hackCss, cache } = options;
16798
+ if (n2.childNodes.length) {
16799
+ applyCssSplits(n2, cssText, hackCss, cache);
16800
+ } else {
16801
+ if (hackCss) {
16802
+ cssText = adaptCssForReplay(cssText, cache);
16803
+ }
16804
+ styleEl.appendChild(doc.createTextNode(cssText));
16805
+ }
16806
+ }
16807
+ __name(buildStyleNode, "buildStyleNode");
16767
16808
  function buildNode(n2, options) {
16768
16809
  var _a2;
16769
16810
  const { doc, hackCss, cache } = options;
16770
16811
  switch (n2.type) {
16771
- case NodeType$2.Document:
16812
+ case NodeType$3.Document:
16772
16813
  return doc.implementation.createDocument(null, "", null);
16773
- case NodeType$2.DocumentType:
16814
+ case NodeType$3.DocumentType:
16774
16815
  return doc.implementation.createDocumentType(
16775
16816
  n2.name || "html",
16776
16817
  n2.publicId,
16777
16818
  n2.systemId
16778
16819
  );
16779
- case NodeType$2.Element: {
16820
+ case NodeType$3.Element: {
16780
16821
  const tagName = getTagName(n2);
16781
16822
  let node2;
16782
16823
  if (n2.isSVG) {
@@ -16812,12 +16853,11 @@
16812
16853
  specialAttributes[name] = value;
16813
16854
  continue;
16814
16855
  }
16815
- const isTextarea = tagName === "textarea" && name === "value";
16816
- const isRemoteOrDynamicCss = tagName === "style" && name === "_cssText";
16817
- if (isRemoteOrDynamicCss && hackCss && typeof value === "string") {
16818
- value = adaptCssForReplay(value, cache);
16819
- }
16820
- if ((isTextarea || isRemoteOrDynamicCss) && typeof value === "string") {
16856
+ if (typeof value !== "string") ;
16857
+ else if (tagName === "style" && name === "_cssText") {
16858
+ buildStyleNode(n2, node2, value, options);
16859
+ continue;
16860
+ } else if (tagName === "textarea" && name === "value") {
16821
16861
  node2.appendChild(doc.createTextNode(value));
16822
16862
  n2.childNodes = [];
16823
16863
  continue;
@@ -16871,9 +16911,9 @@
16871
16911
  }
16872
16912
  }
16873
16913
  if (name === "rr_width") {
16874
- node2.style.width = value.toString();
16914
+ node2.style.setProperty("width", value.toString());
16875
16915
  } else if (name === "rr_height") {
16876
- node2.style.height = value.toString();
16916
+ node2.style.setProperty("height", value.toString());
16877
16917
  } else if (name === "rr_mediaCurrentTime" && typeof value === "number") {
16878
16918
  node2.currentTime = value;
16879
16919
  } else if (name === "rr_mediaState") {
@@ -16911,13 +16951,14 @@
16911
16951
  }
16912
16952
  return node2;
16913
16953
  }
16914
- case NodeType$2.Text:
16915
- return doc.createTextNode(
16916
- n2.isStyle && hackCss ? adaptCssForReplay(n2.textContent, cache) : n2.textContent
16917
- );
16918
- case NodeType$2.CDATA:
16954
+ case NodeType$3.Text:
16955
+ if (n2.isStyle && hackCss) {
16956
+ return doc.createTextNode(adaptCssForReplay(n2.textContent, cache));
16957
+ }
16958
+ return doc.createTextNode(n2.textContent);
16959
+ case NodeType$3.CDATA:
16919
16960
  return doc.createCDATASection(n2.textContent);
16920
- case NodeType$2.Comment:
16961
+ case NodeType$3.Comment:
16921
16962
  return doc.createComment(n2.textContent);
16922
16963
  default:
16923
16964
  return null;
@@ -16945,11 +16986,11 @@
16945
16986
  if (n2.rootId && mirror2.getNode(n2.rootId) !== doc) {
16946
16987
  mirror2.replace(n2.rootId, doc);
16947
16988
  }
16948
- if (n2.type === NodeType$2.Document) {
16989
+ if (n2.type === NodeType$3.Document) {
16949
16990
  doc.close();
16950
16991
  doc.open();
16951
- if (n2.compatMode === "BackCompat" && n2.childNodes && n2.childNodes[0].type !== NodeType$2.DocumentType) {
16952
- if (n2.childNodes[0].type === NodeType$2.Element && "xmlns" in n2.childNodes[0].attributes && n2.childNodes[0].attributes.xmlns === "http://www.w3.org/1999/xhtml") {
16992
+ if (n2.compatMode === "BackCompat" && n2.childNodes && n2.childNodes[0].type !== NodeType$3.DocumentType) {
16993
+ if (n2.childNodes[0].type === NodeType$3.Element && "xmlns" in n2.childNodes[0].attributes && n2.childNodes[0].attributes.xmlns === "http://www.w3.org/1999/xhtml") {
16953
16994
  doc.write(
16954
16995
  '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'
16955
16996
  );
@@ -16962,7 +17003,7 @@
16962
17003
  node2 = doc;
16963
17004
  }
16964
17005
  mirror2.add(node2, n2);
16965
- if ((n2.type === NodeType$2.Document || n2.type === NodeType$2.Element) && !skipChild) {
17006
+ if ((n2.type === NodeType$3.Document || n2.type === NodeType$3.Element) && !skipChild) {
16966
17007
  for (const childN of n2.childNodes) {
16967
17008
  const childNode = buildNodeWithSN(childN, {
16968
17009
  doc,
@@ -16978,7 +17019,7 @@
16978
17019
  }
16979
17020
  if (childN.isShadow && isElement(node2) && node2.shadowRoot) {
16980
17021
  node2.shadowRoot.appendChild(childNode);
16981
- } else if (n2.type === NodeType$2.Document && childN.type == NodeType$2.Element) {
17022
+ } else if (n2.type === NodeType$3.Document && childN.type == NodeType$3.Element) {
16982
17023
  const htmlElement = childNode;
16983
17024
  let body = null;
16984
17025
  htmlElement.childNodes.forEach((child) => {
@@ -17016,7 +17057,7 @@
17016
17057
  __name(visit, "visit");
17017
17058
  function handleScroll(node2, mirror2) {
17018
17059
  const n2 = mirror2.getMeta(node2);
17019
- if ((n2 == null ? void 0 : n2.type) !== NodeType$2.Element) {
17060
+ if ((n2 == null ? void 0 : n2.type) !== NodeType$3.Element) {
17020
17061
  return;
17021
17062
  }
17022
17063
  const el = node2;
@@ -17066,15 +17107,6 @@
17066
17107
  var __defProp222 = Object.defineProperty;
17067
17108
  var __defNormalProp22 = /* @__PURE__ */ __name((obj, key, value) => key in obj ? __defProp222(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value, "__defNormalProp22");
17068
17109
  var __publicField22 = /* @__PURE__ */ __name((obj, key, value) => __defNormalProp22(obj, typeof key !== "symbol" ? key + "" : key, value), "__publicField22");
17069
- var NodeType$1 = /* @__PURE__ */ ((NodeType2) => {
17070
- NodeType2[NodeType2["Document"] = 0] = "Document";
17071
- NodeType2[NodeType2["DocumentType"] = 1] = "DocumentType";
17072
- NodeType2[NodeType2["Element"] = 2] = "Element";
17073
- NodeType2[NodeType2["Text"] = 3] = "Text";
17074
- NodeType2[NodeType2["CDATA"] = 4] = "CDATA";
17075
- NodeType2[NodeType2["Comment"] = 5] = "Comment";
17076
- return NodeType2;
17077
- })(NodeType$1 || {});
17078
17110
  var Mirror$1 = class Mirror2 {
17079
17111
  static {
17080
17112
  __name(this, "Mirror2");
@@ -20770,6 +20802,15 @@
20770
20802
  postcss$1.Rule;
20771
20803
  postcss$1.Root;
20772
20804
  postcss$1.Node;
20805
+ var NodeType$1 = /* @__PURE__ */ ((NodeType2) => {
20806
+ NodeType2[NodeType2["Document"] = 0] = "Document";
20807
+ NodeType2[NodeType2["DocumentType"] = 1] = "DocumentType";
20808
+ NodeType2[NodeType2["Element"] = 2] = "Element";
20809
+ NodeType2[NodeType2["Text"] = 3] = "Text";
20810
+ NodeType2[NodeType2["CDATA"] = 4] = "CDATA";
20811
+ NodeType2[NodeType2["Comment"] = 5] = "Comment";
20812
+ return NodeType2;
20813
+ })(NodeType$1 || {});
20773
20814
  function parseCSSText(cssText) {
20774
20815
  const res = {};
20775
20816
  const listDelimiter = /;(?![^(]*\))/g;
@@ -21314,7 +21355,7 @@
21314
21355
  return child;
21315
21356
  }
21316
21357
  __name(removeChild, "removeChild");
21317
- var NodeType = /* @__PURE__ */ ((NodeType2) => {
21358
+ var NodeType$2 = /* @__PURE__ */ ((NodeType2) => {
21318
21359
  NodeType2[NodeType2["PLACEHOLDER"] = 0] = "PLACEHOLDER";
21319
21360
  NodeType2[NodeType2["ELEMENT_NODE"] = 1] = "ELEMENT_NODE";
21320
21361
  NodeType2[NodeType2["ATTRIBUTE_NODE"] = 2] = "ATTRIBUTE_NODE";
@@ -21328,7 +21369,7 @@
21328
21369
  NodeType2[NodeType2["DOCUMENT_TYPE_NODE"] = 10] = "DOCUMENT_TYPE_NODE";
21329
21370
  NodeType2[NodeType2["DOCUMENT_FRAGMENT_NODE"] = 11] = "DOCUMENT_FRAGMENT_NODE";
21330
21371
  return NodeType2;
21331
- })(NodeType || {});
21372
+ })(NodeType$2 || {});
21332
21373
  var NAMESPACES = {
21333
21374
  svg: "http://www.w3.org/2000/svg",
21334
21375
  "xlink:href": "http://www.w3.org/1999/xlink",
@@ -21563,7 +21604,13 @@
21563
21604
  }
21564
21605
  };
21565
21606
  } else if (newTree.tagName === "IFRAME" && name === "srcdoc") continue;
21566
- else oldTree.setAttribute(name, newValue);
21607
+ else {
21608
+ try {
21609
+ oldTree.setAttribute(name, newValue);
21610
+ } catch (err) {
21611
+ console.warn(err);
21612
+ }
21613
+ }
21567
21614
  }
21568
21615
  for (const { name } of Array.from(oldAttributes))
21569
21616
  if (!(name in newAttributes)) oldTree.removeAttribute(name);
@@ -21911,7 +21958,7 @@
21911
21958
  function buildFromNode(node2, rrdom, domMirror, parentRRNode) {
21912
21959
  let rrNode;
21913
21960
  switch (node2.nodeType) {
21914
- case NodeType.DOCUMENT_NODE:
21961
+ case NodeType$2.DOCUMENT_NODE:
21915
21962
  if (parentRRNode && parentRRNode.nodeName === "IFRAME")
21916
21963
  rrNode = parentRRNode.contentDocument;
21917
21964
  else {
@@ -21919,7 +21966,7 @@
21919
21966
  rrNode.compatMode = node2.compatMode;
21920
21967
  }
21921
21968
  break;
21922
- case NodeType.DOCUMENT_TYPE_NODE: {
21969
+ case NodeType$2.DOCUMENT_TYPE_NODE: {
21923
21970
  const documentType = node2;
21924
21971
  rrNode = rrdom.createDocumentType(
21925
21972
  documentType.name,
@@ -21928,7 +21975,7 @@
21928
21975
  );
21929
21976
  break;
21930
21977
  }
21931
- case NodeType.ELEMENT_NODE: {
21978
+ case NodeType$2.ELEMENT_NODE: {
21932
21979
  const elementNode = node2;
21933
21980
  const tagName = getValidTagName(elementNode);
21934
21981
  rrNode = rrdom.createElement(tagName);
@@ -21940,16 +21987,16 @@
21940
21987
  elementNode.scrollTop && (rrElement.scrollTop = elementNode.scrollTop);
21941
21988
  break;
21942
21989
  }
21943
- case NodeType.TEXT_NODE:
21990
+ case NodeType$2.TEXT_NODE:
21944
21991
  rrNode = rrdom.createTextNode(node2.textContent || "");
21945
21992
  break;
21946
- case NodeType.CDATA_SECTION_NODE:
21993
+ case NodeType$2.CDATA_SECTION_NODE:
21947
21994
  rrNode = rrdom.createCDATASection(node2.data);
21948
21995
  break;
21949
- case NodeType.COMMENT_NODE:
21996
+ case NodeType$2.COMMENT_NODE:
21950
21997
  rrNode = rrdom.createComment(node2.textContent || "");
21951
21998
  break;
21952
- case NodeType.DOCUMENT_FRAGMENT_NODE:
21999
+ case NodeType$2.DOCUMENT_FRAGMENT_NODE:
21953
22000
  rrNode = parentRRNode.attachShadow({ mode: "open" });
21954
22001
  break;
21955
22002
  default:
@@ -21973,7 +22020,7 @@
21973
22020
  if (
21974
22021
  // if the parentRRNode isn't a RRIFrameElement
21975
22022
  (parentRRNode == null ? void 0 : parentRRNode.nodeName) !== "IFRAME" && // if node isn't a shadow root
21976
- node2.nodeType !== NodeType.DOCUMENT_FRAGMENT_NODE
22023
+ node2.nodeType !== NodeType$2.DOCUMENT_FRAGMENT_NODE
21977
22024
  ) {
21978
22025
  parentRRNode == null ? void 0 : parentRRNode.appendChild(rrNode);
21979
22026
  rrNode.parentNode = parentRRNode;
@@ -21982,8 +22029,8 @@
21982
22029
  if (node2.nodeName === "IFRAME") {
21983
22030
  const iframeDoc = node2.contentDocument;
21984
22031
  iframeDoc && walk2(iframeDoc, rrNode);
21985
- } else if (node2.nodeType === NodeType.DOCUMENT_NODE || node2.nodeType === NodeType.ELEMENT_NODE || node2.nodeType === NodeType.DOCUMENT_FRAGMENT_NODE) {
21986
- if (node2.nodeType === NodeType.ELEMENT_NODE && node2.shadowRoot)
22032
+ } else if (node2.nodeType === NodeType$2.DOCUMENT_NODE || node2.nodeType === NodeType$2.ELEMENT_NODE || node2.nodeType === NodeType$2.DOCUMENT_FRAGMENT_NODE) {
22033
+ if (node2.nodeType === NodeType$2.ELEMENT_NODE && node2.shadowRoot)
21987
22034
  walk2(node2.shadowRoot, rrNode);
21988
22035
  node2.childNodes.forEach((childNode) => walk2(childNode, rrNode));
21989
22036
  }
@@ -22114,6 +22161,9 @@
22114
22161
  MutationObserver: ["constructor"]
22115
22162
  };
22116
22163
  var untaintedBasePrototype = {};
22164
+ var isAngularZonePresent = /* @__PURE__ */ __name(() => {
22165
+ return !!globalThis.Zone;
22166
+ }, "isAngularZonePresent");
22117
22167
  function getUntaintedPrototype(key) {
22118
22168
  if (untaintedBasePrototype[key])
22119
22169
  return untaintedBasePrototype[key];
@@ -22141,7 +22191,7 @@
22141
22191
  }
22142
22192
  )
22143
22193
  );
22144
- if (isUntaintedAccessors && isUntaintedMethods) {
22194
+ if (isUntaintedAccessors && isUntaintedMethods && !isAngularZonePresent()) {
22145
22195
  untaintedBasePrototype[key] = defaultObj.prototype;
22146
22196
  return defaultObj.prototype;
22147
22197
  }
@@ -22731,6 +22781,15 @@
22731
22781
  ReplayerEvents2["Destroy"] = "destroy";
22732
22782
  return ReplayerEvents2;
22733
22783
  })(ReplayerEvents || {});
22784
+ var NodeType = /* @__PURE__ */ ((NodeType2) => {
22785
+ NodeType2[NodeType2["Document"] = 0] = "Document";
22786
+ NodeType2[NodeType2["DocumentType"] = 1] = "DocumentType";
22787
+ NodeType2[NodeType2["Element"] = 2] = "Element";
22788
+ NodeType2[NodeType2["Text"] = 3] = "Text";
22789
+ NodeType2[NodeType2["CDATA"] = 4] = "CDATA";
22790
+ NodeType2[NodeType2["Comment"] = 5] = "Comment";
22791
+ return NodeType2;
22792
+ })(NodeType || {});
22734
22793
  function isNodeInLinkedList(n2) {
22735
22794
  return "__ln" in n2;
22736
22795
  }
@@ -22832,6 +22891,7 @@
22832
22891
  __publicField(this, "addedSet", /* @__PURE__ */ new Set());
22833
22892
  __publicField(this, "movedSet", /* @__PURE__ */ new Set());
22834
22893
  __publicField(this, "droppedSet", /* @__PURE__ */ new Set());
22894
+ __publicField(this, "removesSubTreeCache", /* @__PURE__ */ new Set());
22835
22895
  __publicField(this, "mutationCb");
22836
22896
  __publicField(this, "blockClass");
22837
22897
  __publicField(this, "blockSelector");
@@ -22876,9 +22936,18 @@
22876
22936
  }, "getNextId");
22877
22937
  const pushAdd = /* @__PURE__ */ __name((n2) => {
22878
22938
  const parent = index.parentNode(n2);
22879
- if (!parent || !inDom(n2) || parent.tagName === "TEXTAREA") {
22939
+ if (!parent || !inDom(n2)) {
22880
22940
  return;
22881
22941
  }
22942
+ let cssCaptured = false;
22943
+ if (n2.nodeType === Node.TEXT_NODE) {
22944
+ const parentTag = parent.tagName;
22945
+ if (parentTag === "TEXTAREA") {
22946
+ return;
22947
+ } else if (parentTag === "STYLE" && this.addedSet.has(parent)) {
22948
+ cssCaptured = true;
22949
+ }
22950
+ }
22882
22951
  const parentId = isShadowRoot(parent) ? this.mirror.getId(getShadowHost(n2)) : this.mirror.getId(parent);
22883
22952
  const nextId = getNextId(n2);
22884
22953
  if (parentId === -1 || nextId === -1) {
@@ -22920,7 +22989,8 @@
22920
22989
  }, "onIframeLoad"),
22921
22990
  onStylesheetLoad: /* @__PURE__ */ __name((link, childSn) => {
22922
22991
  this.stylesheetManager.attachLinkElement(link, childSn);
22923
- }, "onStylesheetLoad")
22992
+ }, "onStylesheetLoad"),
22993
+ cssCaptured
22924
22994
  });
22925
22995
  if (sn) {
22926
22996
  adds.push({
@@ -22935,13 +23005,13 @@
22935
23005
  this.mirror.removeNodeFromMap(this.mapRemoves.shift());
22936
23006
  }
22937
23007
  for (const n2 of this.movedSet) {
22938
- if (isParentRemoved(this.removes, n2, this.mirror) && !this.movedSet.has(index.parentNode(n2))) {
23008
+ if (isParentRemoved(this.removesSubTreeCache, n2, this.mirror) && !this.movedSet.has(index.parentNode(n2))) {
22939
23009
  continue;
22940
23010
  }
22941
23011
  pushAdd(n2);
22942
23012
  }
22943
23013
  for (const n2 of this.addedSet) {
22944
- if (!isAncestorInSet(this.droppedSet, n2) && !isParentRemoved(this.removes, n2, this.mirror)) {
23014
+ if (!isAncestorInSet(this.droppedSet, n2) && !isParentRemoved(this.removesSubTreeCache, n2, this.mirror)) {
22945
23015
  pushAdd(n2);
22946
23016
  } else if (isAncestorInSet(this.movedSet, n2)) {
22947
23017
  pushAdd(n2);
@@ -23037,6 +23107,7 @@
23037
23107
  this.addedSet = /* @__PURE__ */ new Set();
23038
23108
  this.movedSet = /* @__PURE__ */ new Set();
23039
23109
  this.droppedSet = /* @__PURE__ */ new Set();
23110
+ this.removesSubTreeCache = /* @__PURE__ */ new Set();
23040
23111
  this.movedMap = {};
23041
23112
  this.mutationCb(payload);
23042
23113
  });
@@ -23191,6 +23262,7 @@
23191
23262
  id: nodeId,
23192
23263
  isShadow: isShadowRoot(m.target) && isNativeShadowDom(m.target) ? true : void 0
23193
23264
  });
23265
+ processRemoves(n2, this.removesSubTreeCache);
23194
23266
  }
23195
23267
  this.mapRemoves.push(n2);
23196
23268
  });
@@ -23286,21 +23358,26 @@
23286
23358
  index.childNodes(n2).forEach((childN) => deepDelete(addsSet, childN));
23287
23359
  }
23288
23360
  __name(deepDelete, "deepDelete");
23361
+ function processRemoves(n2, cache) {
23362
+ const queue = [n2];
23363
+ while (queue.length) {
23364
+ const next = queue.pop();
23365
+ if (cache.has(next)) continue;
23366
+ cache.add(next);
23367
+ index.childNodes(next).forEach((n22) => queue.push(n22));
23368
+ }
23369
+ return;
23370
+ }
23371
+ __name(processRemoves, "processRemoves");
23289
23372
  function isParentRemoved(removes, n2, mirror2) {
23290
- if (removes.length === 0) return false;
23291
- return _isParentRemoved(removes, n2, mirror2);
23373
+ if (removes.size === 0) return false;
23374
+ return _isParentRemoved(removes, n2);
23292
23375
  }
23293
23376
  __name(isParentRemoved, "isParentRemoved");
23294
- function _isParentRemoved(removes, n2, mirror2) {
23295
- let node2 = index.parentNode(n2);
23296
- while (node2) {
23297
- const parentId = mirror2.getId(node2);
23298
- if (removes.some((r2) => r2.id === parentId)) {
23299
- return true;
23300
- }
23301
- node2 = index.parentNode(node2);
23302
- }
23303
- return false;
23377
+ function _isParentRemoved(removes, n2, _mirror2) {
23378
+ const node2 = index.parentNode(n2);
23379
+ if (!node2) return false;
23380
+ return removes.has(node2);
23304
23381
  }
23305
23382
  __name(_isParentRemoved, "_isParentRemoved");
23306
23383
  function isAncestorInSet(set, n2) {
@@ -24672,7 +24749,7 @@
24672
24749
  }
24673
24750
  }
24674
24751
  patchRootIdOnNode(node2, rootId) {
24675
- if (node2.type !== NodeType$2.Document && !node2.rootId) node2.rootId = rootId;
24752
+ if (node2.type !== NodeType.Document && !node2.rootId) node2.rootId = rootId;
24676
24753
  if ("childNodes" in node2) {
24677
24754
  node2.childNodes.forEach((child) => {
24678
24755
  this.patchRootIdOnNode(child, rootId);
@@ -27763,6 +27840,9 @@
27763
27840
  "html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"
27764
27841
  );
27765
27842
  }
27843
+ if (!injectStylesRules.length) {
27844
+ return;
27845
+ }
27766
27846
  if (this.usingVirtualDom) {
27767
27847
  const styleEl = this.virtualDom.createElement("style");
27768
27848
  this.virtualDom.mirror.add(
@@ -27797,7 +27877,7 @@
27797
27877
  collectedDialogs.add(builtNode);
27798
27878
  this.collectIframeAndAttachDocument(collectedIframes, builtNode);
27799
27879
  const sn = mirror2.getMeta(builtNode);
27800
- if ((sn == null ? void 0 : sn.type) === NodeType$2.Element && (sn == null ? void 0 : sn.tagName.toUpperCase()) === "HTML") {
27880
+ if ((sn == null ? void 0 : sn.type) === NodeType.Element && (sn == null ? void 0 : sn.tagName.toUpperCase()) === "HTML") {
27801
27881
  const { documentElement, head } = iframeEl.contentDocument;
27802
27882
  this.insertStyleRules(
27803
27883
  documentElement,
@@ -28273,7 +28353,7 @@
28273
28353
  mutation.parentId
28274
28354
  );
28275
28355
  if (!parent) {
28276
- if (mutation.node.type === NodeType$2.Document) {
28356
+ if (mutation.node.type === NodeType.Document) {
28277
28357
  return this.newDocumentQueue.push(mutation);
28278
28358
  }
28279
28359
  return queue.push(mutation);
@@ -28335,7 +28415,7 @@
28335
28415
  return;
28336
28416
  }
28337
28417
  const parentSn = mirror2.getMeta(parent);
28338
- if (parentSn && parentSn.type === NodeType$2.Element && mutation.node.type === NodeType$2.Text) {
28418
+ if (parentSn && parentSn.type === NodeType.Element && mutation.node.type === NodeType.Text) {
28339
28419
  const prospectiveSiblings = Array.isArray(parent.childNodes) ? parent.childNodes : Array.from(parent.childNodes);
28340
28420
  if (parentSn.tagName === "textarea") {
28341
28421
  for (const c2 of prospectiveSiblings) {
@@ -28351,9 +28431,9 @@
28351
28431
  }
28352
28432
  }
28353
28433
  }
28354
- } else if ((parentSn == null ? void 0 : parentSn.type) === NodeType$2.Document) {
28434
+ } else if ((parentSn == null ? void 0 : parentSn.type) === NodeType.Document) {
28355
28435
  const parentDoc = parent;
28356
- if (mutation.node.type === NodeType$2.DocumentType && ((_a2 = parentDoc.childNodes[0]) == null ? void 0 : _a2.nodeType) === Node.DOCUMENT_TYPE_NODE)
28436
+ if (mutation.node.type === NodeType.DocumentType && ((_a2 = parentDoc.childNodes[0]) == null ? void 0 : _a2.nodeType) === Node.DOCUMENT_TYPE_NODE)
28357
28437
  parentDoc.removeChild(parentDoc.childNodes[0]);
28358
28438
  if (target.nodeName === "HTML" && parentDoc.documentElement)
28359
28439
  parentDoc.removeChild(
@@ -28437,7 +28517,12 @@
28437
28517
  }
28438
28518
  return this.warnNodeNotFound(d, mutation.id);
28439
28519
  }
28440
- target.textContent = mutation.value;
28520
+ const parentEl = target.parentElement;
28521
+ if (mutation.value && parentEl && parentEl.tagName === "STYLE") {
28522
+ target.textContent = adaptCssForReplay(mutation.value, this.cache);
28523
+ } else {
28524
+ target.textContent = mutation.value;
28525
+ }
28441
28526
  if (this.usingVirtualDom) {
28442
28527
  const parent = target.parentNode;
28443
28528
  if (((_a2 = parent == null ? void 0 : parent.rules) == null ? void 0 : _a2.length) > 0) parent.rules = [];
@@ -28554,7 +28639,7 @@
28554
28639
  left: d.x,
28555
28640
  behavior: isSync ? "auto" : "smooth"
28556
28641
  });
28557
- } else if ((sn == null ? void 0 : sn.type) === NodeType$2.Document) {
28642
+ } else if ((sn == null ? void 0 : sn.type) === NodeType.Document) {
28558
28643
  (_b = target.defaultView) == null ? void 0 : _b.scrollTo({
28559
28644
  top: d.y,
28560
28645
  left: d.x,