@screeb/rrweb 1.0.5 → 1.0.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"image-bitmap-data-url-worker-IJpC7g_b.js","sources":["../../../node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js","../src/record/workers/image-bitmap-data-url-worker.ts"],"sourcesContent":["/*\n * base64-arraybuffer 1.0.2 <https://github.com/niklasvh/base64-arraybuffer>\n * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>\n * Released under MIT License\n */\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n// Use a lookup table to find the index.\nvar lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\nvar encode = function (arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';\n for (i = 0; i < len; i += 3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + '=';\n }\n else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + '==';\n }\n return base64;\n};\nvar decode = function (base64) {\n var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n var arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n return arraybuffer;\n};\n\nexport { decode, encode };\n//# sourceMappingURL=base64-arraybuffer.es5.js.map\n","import { encode } from 'base64-arraybuffer';\nimport type { DataURLOptions } from 'rrweb-snapshot';\nimport type {\n ImageBitmapDataURLWorkerParams,\n ImageBitmapDataURLWorkerResponse,\n} from '@rrweb/types';\n\nconst lastBlobMap: Map<number, string> = new Map();\nconst transparentBlobMap: Map<string, string> = new Map();\n\nexport interface ImageBitmapDataURLRequestWorker {\n postMessage: (\n message: ImageBitmapDataURLWorkerParams,\n transfer?: [ImageBitmap],\n ) => void;\n onmessage: (message: MessageEvent<ImageBitmapDataURLWorkerResponse>) => void;\n}\n\ninterface ImageBitmapDataURLResponseWorker {\n onmessage:\n | null\n | ((message: MessageEvent<ImageBitmapDataURLWorkerParams>) => void);\n postMessage(e: ImageBitmapDataURLWorkerResponse): void;\n}\n\nasync function getTransparentBlobFor(\n width: number,\n height: number,\n dataURLOptions: DataURLOptions,\n): Promise<string> {\n const id = `${width}-${height}`;\n if ('OffscreenCanvas' in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id)!;\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext('2d'); // creates rendering context for `converToBlob`\n const blob = await offscreen.convertToBlob(dataURLOptions); // takes a while\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer); // cpu intensive\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return '';\n }\n}\n\n// `as any` because: https://github.com/Microsoft/TypeScript/issues/20595\nconst worker: ImageBitmapDataURLResponseWorker = self;\n\n// eslint-disable-next-line @typescript-eslint/no-misused-promises\nworker.onmessage = async function (e) {\n if ('OffscreenCanvas' in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions,\n );\n\n const offscreen = new OffscreenCanvas(width, height);\n const ctx = offscreen.getContext('2d')!;\n\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await offscreen.convertToBlob(dataURLOptions); // takes a while\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer); // cpu intensive\n\n // on first try we should check if canvas is transparent,\n // no need to save it's contents in that case\n if (!lastBlobMap.has(id) && (await transparentBase64) === base64) {\n lastBlobMap.set(id, base64);\n return worker.postMessage({ id });\n }\n\n if (lastBlobMap.get(id) === base64) return worker.postMessage({ id }); // unchanged\n worker.postMessage({\n id,\n type,\n base64,\n width,\n height,\n });\n lastBlobMap.set(id, base64);\n } else {\n return worker.postMessage({ id: e.data.id });\n }\n};\n"],"names":["i"],"mappings":";;AAKA,MAAI,QAAQ;AAEZ,MAAI,SAAS,OAAO,eAAe,cAAc,CAAE,IAAG,IAAI,WAAW,GAAG;AACxE,WAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACnC,WAAO,MAAM,WAAW,CAAC,CAAC,IAAI;AAAA,EAClC;AACA,MAAI,SAAS,SAAU,aAAa;AAChC,QAAI,QAAQ,IAAI,WAAW,WAAW,GAAGA,IAAG,MAAM,MAAM,QAAQ,SAAS;AACzE,SAAKA,KAAI,GAAGA,KAAI,KAAKA,MAAK,GAAG;AACzB,gBAAU,MAAM,MAAMA,EAAC,KAAK,CAAC;AAC7B,gBAAU,OAAQ,MAAMA,EAAC,IAAI,MAAM,IAAM,MAAMA,KAAI,CAAC,KAAK,CAAE;AAC3D,gBAAU,OAAQ,MAAMA,KAAI,CAAC,IAAI,OAAO,IAAM,MAAMA,KAAI,CAAC,KAAK,CAAE;AAChE,gBAAU,MAAM,MAAMA,KAAI,CAAC,IAAI,EAAE;AAAA,IACpC;AACD,QAAI,MAAM,MAAM,GAAG;AACf,eAAS,OAAO,UAAU,GAAG,OAAO,SAAS,CAAC,IAAI;AAAA,IACrD,WACQ,MAAM,MAAM,GAAG;AACpB,eAAS,OAAO,UAAU,GAAG,OAAO,SAAS,CAAC,IAAI;AAAA,IACrD;AACD,WAAO;AAAA,EACX;ACnBA,QAAM,kCAAuC;AAC7C,QAAM,yCAA8C;AAiBpD,iBAAe,sBACb,OACA,QACA,gBACiB;AACjB,UAAM,KAAK,GAAG,KAAK,IAAI,MAAM;AAC7B,QAAI,qBAAqB,YAAY;AACnC,UAAI,mBAAmB,IAAI,EAAE,EAAU,QAAA,mBAAmB,IAAI,EAAE;AAChE,YAAM,YAAY,IAAI,gBAAgB,OAAO,MAAM;AACnD,gBAAU,WAAW,IAAI;AACzB,YAAM,OAAO,MAAM,UAAU,cAAc,cAAc;AACnD,YAAA,cAAc,MAAM,KAAK;AACzB,YAAA,SAAS,OAAO,WAAW;AACd,yBAAA,IAAI,IAAI,MAAM;AAC1B,aAAA;AAAA,IAAA,OACF;AACE,aAAA;AAAA,IACT;AAAA,EACF;AAGA,QAAM,SAA2C;AAGjD,SAAO,YAAY,eAAgB,GAAG;AACpC,QAAI,qBAAqB,YAAY;AACnC,YAAM,EAAE,IAAI,QAAQ,OAAO,QAAQ,mBAAmB,EAAE;AAExD,YAAM,oBAAoB;AAAA,QACxB;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAGF,YAAM,YAAY,IAAI,gBAAgB,OAAO,MAAM;AAC7C,YAAA,MAAM,UAAU,WAAW,IAAI;AAEjC,UAAA,UAAU,QAAQ,GAAG,CAAC;AAC1B,aAAO,MAAM;AACb,YAAM,OAAO,MAAM,UAAU,cAAc,cAAc;AACzD,YAAM,OAAO,KAAK;AACZ,YAAA,cAAc,MAAM,KAAK;AACzB,YAAA,SAAS,OAAO,WAAW;AAIjC,UAAI,CAAC,YAAY,IAAI,EAAE,KAAM,MAAM,sBAAuB,QAAQ;AACpD,oBAAA,IAAI,IAAI,MAAM;AAC1B,eAAO,OAAO,YAAY,EAAE,GAAI,CAAA;AAAA,MAClC;AAEI,UAAA,YAAY,IAAI,EAAE,MAAM,eAAe,OAAO,YAAY,EAAE,GAAA,CAAI;AACpE,aAAO,YAAY;AAAA,QACjB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA,CACD;AACW,kBAAA,IAAI,IAAI,MAAM;AAAA,IAAA,OACrB;AACL,aAAO,OAAO,YAAY,EAAE,IAAI,EAAE,KAAK,IAAI;AAAA,IAC7C;AAAA,EACF;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"image-bitmap-data-url-worker-IJpC7g_b.js","sources":["../../../node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js","../src/record/workers/image-bitmap-data-url-worker.ts"],"sourcesContent":["/*\n * base64-arraybuffer 1.0.2 <https://github.com/niklasvh/base64-arraybuffer>\n * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>\n * Released under MIT License\n */\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n// Use a lookup table to find the index.\nvar lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\nvar encode = function (arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';\n for (i = 0; i < len; i += 3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + '=';\n }\n else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + '==';\n }\n return base64;\n};\nvar decode = function (base64) {\n var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n var arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n return arraybuffer;\n};\n\nexport { decode, encode };\n//# sourceMappingURL=base64-arraybuffer.es5.js.map\n","import { encode } from 'base64-arraybuffer';\nimport type {\n DataURLOptions,\n ImageBitmapDataURLWorkerParams,\n ImageBitmapDataURLWorkerResponse,\n} from '@rrweb/types';\n\nconst lastBlobMap: Map<number, string> = new Map();\nconst transparentBlobMap: Map<string, string> = new Map();\n\nexport interface ImageBitmapDataURLRequestWorker {\n postMessage: (\n message: ImageBitmapDataURLWorkerParams,\n transfer?: [ImageBitmap],\n ) => void;\n onmessage: (message: MessageEvent<ImageBitmapDataURLWorkerResponse>) => void;\n}\n\ninterface ImageBitmapDataURLResponseWorker {\n onmessage:\n | null\n | ((message: MessageEvent<ImageBitmapDataURLWorkerParams>) => void);\n postMessage(e: ImageBitmapDataURLWorkerResponse): void;\n}\n\nasync function getTransparentBlobFor(\n width: number,\n height: number,\n dataURLOptions: DataURLOptions,\n): Promise<string> {\n const id = `${width}-${height}`;\n if ('OffscreenCanvas' in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id)!;\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext('2d'); // creates rendering context for `converToBlob`\n const blob = await offscreen.convertToBlob(dataURLOptions); // takes a while\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer); // cpu intensive\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return '';\n }\n}\n\n// `as any` because: https://github.com/Microsoft/TypeScript/issues/20595\nconst worker: ImageBitmapDataURLResponseWorker = self;\n\n// eslint-disable-next-line @typescript-eslint/no-misused-promises\nworker.onmessage = async function (e) {\n if ('OffscreenCanvas' in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions,\n );\n\n const offscreen = new OffscreenCanvas(width, height);\n const ctx = offscreen.getContext('2d')!;\n\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await offscreen.convertToBlob(dataURLOptions); // takes a while\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer); // cpu intensive\n\n // on first try we should check if canvas is transparent,\n // no need to save it's contents in that case\n if (!lastBlobMap.has(id) && (await transparentBase64) === base64) {\n lastBlobMap.set(id, base64);\n return worker.postMessage({ id });\n }\n\n if (lastBlobMap.get(id) === base64) return worker.postMessage({ id }); // unchanged\n worker.postMessage({\n id,\n type,\n base64,\n width,\n height,\n });\n lastBlobMap.set(id, base64);\n } else {\n return worker.postMessage({ id: e.data.id });\n }\n};\n"],"names":["i"],"mappings":";;AAKA,MAAI,QAAQ;AAEZ,MAAI,SAAS,OAAO,eAAe,cAAc,CAAE,IAAG,IAAI,WAAW,GAAG;AACxE,WAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACnC,WAAO,MAAM,WAAW,CAAC,CAAC,IAAI;AAAA,EAClC;AACA,MAAI,SAAS,SAAU,aAAa;AAChC,QAAI,QAAQ,IAAI,WAAW,WAAW,GAAGA,IAAG,MAAM,MAAM,QAAQ,SAAS;AACzE,SAAKA,KAAI,GAAGA,KAAI,KAAKA,MAAK,GAAG;AACzB,gBAAU,MAAM,MAAMA,EAAC,KAAK,CAAC;AAC7B,gBAAU,OAAQ,MAAMA,EAAC,IAAI,MAAM,IAAM,MAAMA,KAAI,CAAC,KAAK,CAAE;AAC3D,gBAAU,OAAQ,MAAMA,KAAI,CAAC,IAAI,OAAO,IAAM,MAAMA,KAAI,CAAC,KAAK,CAAE;AAChE,gBAAU,MAAM,MAAMA,KAAI,CAAC,IAAI,EAAE;AAAA,IACpC;AACD,QAAI,MAAM,MAAM,GAAG;AACf,eAAS,OAAO,UAAU,GAAG,OAAO,SAAS,CAAC,IAAI;AAAA,IACrD,WACQ,MAAM,MAAM,GAAG;AACpB,eAAS,OAAO,UAAU,GAAG,OAAO,SAAS,CAAC,IAAI;AAAA,IACrD;AACD,WAAO;AAAA,EACX;ACnBA,QAAM,kCAAuC;AAC7C,QAAM,yCAA8C;AAiBpD,iBAAe,sBACb,OACA,QACA,gBACiB;AACjB,UAAM,KAAK,GAAG,KAAK,IAAI,MAAM;AAC7B,QAAI,qBAAqB,YAAY;AACnC,UAAI,mBAAmB,IAAI,EAAE,EAAU,QAAA,mBAAmB,IAAI,EAAE;AAChE,YAAM,YAAY,IAAI,gBAAgB,OAAO,MAAM;AACnD,gBAAU,WAAW,IAAI;AACzB,YAAM,OAAO,MAAM,UAAU,cAAc,cAAc;AACnD,YAAA,cAAc,MAAM,KAAK;AACzB,YAAA,SAAS,OAAO,WAAW;AACd,yBAAA,IAAI,IAAI,MAAM;AAC1B,aAAA;AAAA,IAAA,OACF;AACE,aAAA;AAAA,IACT;AAAA,EACF;AAGA,QAAM,SAA2C;AAGjD,SAAO,YAAY,eAAgB,GAAG;AACpC,QAAI,qBAAqB,YAAY;AACnC,YAAM,EAAE,IAAI,QAAQ,OAAO,QAAQ,mBAAmB,EAAE;AAExD,YAAM,oBAAoB;AAAA,QACxB;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAGF,YAAM,YAAY,IAAI,gBAAgB,OAAO,MAAM;AAC7C,YAAA,MAAM,UAAU,WAAW,IAAI;AAEjC,UAAA,UAAU,QAAQ,GAAG,CAAC;AAC1B,aAAO,MAAM;AACb,YAAM,OAAO,MAAM,UAAU,cAAc,cAAc;AACzD,YAAM,OAAO,KAAK;AACZ,YAAA,cAAc,MAAM,KAAK;AACzB,YAAA,SAAS,OAAO,WAAW;AAIjC,UAAI,CAAC,YAAY,IAAI,EAAE,KAAM,MAAM,sBAAuB,QAAQ;AACpD,oBAAA,IAAI,IAAI,MAAM;AAC1B,eAAO,OAAO,YAAY,EAAE,GAAI,CAAA;AAAA,MAClC;AAEI,UAAA,YAAY,IAAI,EAAE,MAAM,eAAe,OAAO,YAAY,EAAE,GAAA,CAAI;AACpE,aAAO,YAAY;AAAA,QACjB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA,CACD;AACW,kBAAA,IAAI,IAAI,MAAM;AAAA,IAAA,OACrB;AACL,aAAO,OAAO,YAAY,EAAE,IAAI,EAAE,KAAK,IAAI;AAAA,IAC7C;AAAA,EACF;;","x_google_ignoreList":[0]}
package/dist/rrweb.cjs CHANGED
@@ -7,7 +7,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
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 NodeType$2 = /* @__PURE__ */ ((NodeType2) => {
10
+ var NodeType$3 = /* @__PURE__ */ ((NodeType2) => {
11
11
  NodeType2[NodeType2["Document"] = 0] = "Document";
12
12
  NodeType2[NodeType2["DocumentType"] = 1] = "DocumentType";
13
13
  NodeType2[NodeType2["Element"] = 2] = "Element";
@@ -15,7 +15,7 @@ var NodeType$2 = /* @__PURE__ */ ((NodeType2) => {
15
15
  NodeType2[NodeType2["CDATA"] = 4] = "CDATA";
16
16
  NodeType2[NodeType2["Comment"] = 5] = "Comment";
17
17
  return NodeType2;
18
- })(NodeType$2 || {});
18
+ })(NodeType$3 || {});
19
19
  const testableAccessors$1 = {
20
20
  Node: ["childNodes", "parentNode", "parentElement", "textContent"],
21
21
  ShadowRoot: ["host", "styleSheets"],
@@ -29,6 +29,9 @@ const testableMethods$1 = {
29
29
  MutationObserver: ["constructor"]
30
30
  };
31
31
  const untaintedBasePrototype$1 = {};
32
+ const isAngularZonePresent$1 = () => {
33
+ return !!globalThis.Zone;
34
+ };
32
35
  function getUntaintedPrototype$1(key) {
33
36
  if (untaintedBasePrototype$1[key])
34
37
  return untaintedBasePrototype$1[key];
@@ -56,7 +59,7 @@ function getUntaintedPrototype$1(key) {
56
59
  }
57
60
  )
58
61
  );
59
- if (isUntaintedAccessors && isUntaintedMethods) {
62
+ if (isUntaintedAccessors && isUntaintedMethods && !isAngularZonePresent$1()) {
60
63
  untaintedBasePrototype$1[key] = defaultObj.prototype;
61
64
  return defaultObj.prototype;
62
65
  }
@@ -358,13 +361,13 @@ function is2DCanvasBlank(canvas) {
358
361
  }
359
362
  function isNodeMetaEqual(a2, b) {
360
363
  if (!a2 || !b || a2.type !== b.type) return false;
361
- if (a2.type === NodeType$2.Document)
364
+ if (a2.type === NodeType$3.Document)
362
365
  return a2.compatMode === b.compatMode;
363
- else if (a2.type === NodeType$2.DocumentType)
366
+ else if (a2.type === NodeType$3.DocumentType)
364
367
  return a2.name === b.name && a2.publicId === b.publicId && a2.systemId === b.systemId;
365
- else if (a2.type === NodeType$2.Comment || a2.type === NodeType$2.Text || a2.type === NodeType$2.CDATA)
368
+ else if (a2.type === NodeType$3.Comment || a2.type === NodeType$3.Text || a2.type === NodeType$3.CDATA)
366
369
  return a2.textContent === b.textContent;
367
- else if (a2.type === NodeType$2.Element)
370
+ else if (a2.type === NodeType$3.Element)
368
371
  return a2.tagName === b.tagName && JSON.stringify(a2.attributes) === JSON.stringify(b.attributes) && a2.isSVG === b.isSVG && a2.needBlock === b.needBlock;
369
372
  return false;
370
373
  }
@@ -637,6 +640,21 @@ function needMaskingText(node2, maskTextClass, maskTextSelector, checkAncestors)
637
640
  el = index$1.parentElement(node2);
638
641
  }
639
642
  try {
643
+ if (el.tagName === "INPUT") {
644
+ const autocomplete = el.getAttribute("autocomplete");
645
+ const disallowedAutocompleteValues = [
646
+ "current-password",
647
+ "new-password",
648
+ "cc-number",
649
+ "cc-exp",
650
+ "cc-exp-month",
651
+ "cc-exp-year",
652
+ "cc-csc"
653
+ ];
654
+ if (disallowedAutocompleteValues.includes(autocomplete)) {
655
+ return true;
656
+ }
657
+ }
640
658
  if (typeof maskTextClass === "string") {
641
659
  if (checkAncestors) {
642
660
  if (el.closest(`.${maskTextClass}`)) return true;
@@ -734,20 +752,20 @@ function serializeNode(n2, options) {
734
752
  case n2.DOCUMENT_NODE:
735
753
  if (n2.compatMode !== "CSS1Compat") {
736
754
  return {
737
- type: NodeType$2.Document,
755
+ type: NodeType$3.Document,
738
756
  childNodes: [],
739
757
  compatMode: n2.compatMode
740
758
  // probably "BackCompat"
741
759
  };
742
760
  } else {
743
761
  return {
744
- type: NodeType$2.Document,
762
+ type: NodeType$3.Document,
745
763
  childNodes: []
746
764
  };
747
765
  }
748
766
  case n2.DOCUMENT_TYPE_NODE:
749
767
  return {
750
- type: NodeType$2.DocumentType,
768
+ type: NodeType$3.DocumentType,
751
769
  name: n2.name,
752
770
  publicId: n2.publicId,
753
771
  systemId: n2.systemId,
@@ -778,13 +796,13 @@ function serializeNode(n2, options) {
778
796
  });
779
797
  case n2.CDATA_SECTION_NODE:
780
798
  return {
781
- type: NodeType$2.CDATA,
799
+ type: NodeType$3.CDATA,
782
800
  textContent: "",
783
801
  rootId
784
802
  };
785
803
  case n2.COMMENT_NODE:
786
804
  return {
787
- type: NodeType$2.Comment,
805
+ type: NodeType$3.Comment,
788
806
  textContent: index$1.textContent(n2) || "",
789
807
  rootId
790
808
  };
@@ -816,7 +834,7 @@ function serializeTextNode(n2, options) {
816
834
  textContent2 = maskTextFn ? maskTextFn(textContent2, index$1.parentElement(n2)) : textContent2.replace(/[\S]/g, "*");
817
835
  }
818
836
  return {
819
- type: NodeType$2.Text,
837
+ type: NodeType$3.Text,
820
838
  textContent: textContent2 || "",
821
839
  rootId
822
840
  };
@@ -1002,7 +1020,7 @@ function serializeElementNode(n2, options) {
1002
1020
  } catch (e2) {
1003
1021
  }
1004
1022
  return {
1005
- type: NodeType$2.Element,
1023
+ type: NodeType$3.Element,
1006
1024
  tagName,
1007
1025
  attributes,
1008
1026
  childNodes: [],
@@ -1020,9 +1038,9 @@ function lowerIfExists(maybeAttr) {
1020
1038
  }
1021
1039
  }
1022
1040
  function slimDOMExcluded(sn, slimDOMOptions) {
1023
- if (slimDOMOptions.comment && sn.type === NodeType$2.Comment) {
1041
+ if (slimDOMOptions.comment && sn.type === NodeType$3.Comment) {
1024
1042
  return true;
1025
- } else if (sn.type === NodeType$2.Element) {
1043
+ } else if (sn.type === NodeType$3.Element) {
1026
1044
  if (slimDOMOptions.script && // script tag
1027
1045
  (sn.tagName === "script" || // (module)preload link
1028
1046
  sn.tagName === "link" && (sn.attributes.rel === "preload" || sn.attributes.rel === "modulepreload") && sn.attributes.as === "script" || // prefetch link
@@ -1112,7 +1130,7 @@ function serializeNodeWithId(n2, options) {
1112
1130
  let id;
1113
1131
  if (mirror2.hasNode(n2)) {
1114
1132
  id = mirror2.getId(n2);
1115
- } else if (slimDOMExcluded(_serializedNode, slimDOMOptions) || !preserveWhiteSpace && _serializedNode.type === NodeType$2.Text && !_serializedNode.textContent.replace(/^\s+|\s+$/gm, "").length) {
1133
+ } else if (slimDOMExcluded(_serializedNode, slimDOMOptions) || !preserveWhiteSpace && _serializedNode.type === NodeType$3.Text && !_serializedNode.textContent.replace(/^\s+|\s+$/gm, "").length) {
1116
1134
  id = IGNORED_NODE;
1117
1135
  } else {
1118
1136
  id = genId();
@@ -1126,15 +1144,15 @@ function serializeNodeWithId(n2, options) {
1126
1144
  onSerialize(n2);
1127
1145
  }
1128
1146
  let recordChild = !skipChild;
1129
- if (serializedNode.type === NodeType$2.Element) {
1147
+ if (serializedNode.type === NodeType$3.Element) {
1130
1148
  recordChild = recordChild && !serializedNode.needBlock;
1131
1149
  delete serializedNode.needBlock;
1132
1150
  const shadowRootEl = index$1.shadowRoot(n2);
1133
1151
  if (shadowRootEl && isNativeShadowDom(shadowRootEl))
1134
1152
  serializedNode.isShadowHost = true;
1135
1153
  }
1136
- if ((serializedNode.type === NodeType$2.Document || serializedNode.type === NodeType$2.Element) && recordChild) {
1137
- if (slimDOMOptions.headWhitespace && serializedNode.type === NodeType$2.Element && serializedNode.tagName === "head") {
1154
+ if ((serializedNode.type === NodeType$3.Document || serializedNode.type === NodeType$3.Element) && recordChild) {
1155
+ if (slimDOMOptions.headWhitespace && serializedNode.type === NodeType$3.Element && serializedNode.tagName === "head") {
1138
1156
  preserveWhiteSpace = false;
1139
1157
  }
1140
1158
  const bypassOptions = {
@@ -1163,9 +1181,9 @@ function serializeNodeWithId(n2, options) {
1163
1181
  keepIframeSrcFn,
1164
1182
  cssCaptured: false
1165
1183
  };
1166
- if (serializedNode.type === NodeType$2.Element && serializedNode.tagName === "textarea" && serializedNode.attributes.value !== void 0) ;
1184
+ if (serializedNode.type === NodeType$3.Element && serializedNode.tagName === "textarea" && serializedNode.attributes.value !== void 0) ;
1167
1185
  else {
1168
- if (serializedNode.type === NodeType$2.Element && serializedNode.attributes._cssText !== void 0 && typeof serializedNode.attributes._cssText === "string") {
1186
+ if (serializedNode.type === NodeType$3.Element && serializedNode.attributes._cssText !== void 0 && typeof serializedNode.attributes._cssText === "string") {
1169
1187
  bypassOptions.cssCaptured = true;
1170
1188
  }
1171
1189
  for (const childN of Array.from(index$1.childNodes(n2))) {
@@ -1190,7 +1208,7 @@ function serializeNodeWithId(n2, options) {
1190
1208
  if (parent && isShadowRoot(parent) && isNativeShadowDom(parent)) {
1191
1209
  serializedNode.isShadow = true;
1192
1210
  }
1193
- if (serializedNode.type === NodeType$2.Element && serializedNode.tagName === "iframe") {
1211
+ if (serializedNode.type === NodeType$3.Element && serializedNode.tagName === "iframe") {
1194
1212
  onceIframeLoaded(
1195
1213
  n2,
1196
1214
  () => {
@@ -1232,7 +1250,7 @@ function serializeNodeWithId(n2, options) {
1232
1250
  iframeLoadTimeout
1233
1251
  );
1234
1252
  }
1235
- 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")) {
1253
+ 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")) {
1236
1254
  onceStylesheetLoaded(
1237
1255
  n2,
1238
1256
  () => {
@@ -5010,7 +5028,7 @@ function createCache() {
5010
5028
  function applyCssSplits(n2, cssText, hackCss, cache) {
5011
5029
  const childTextNodes = [];
5012
5030
  for (const scn of n2.childNodes) {
5013
- if (scn.type === NodeType$2.Text) {
5031
+ if (scn.type === NodeType$3.Text) {
5014
5032
  childTextNodes.push(scn);
5015
5033
  }
5016
5034
  }
@@ -5041,15 +5059,15 @@ function buildNode(n2, options) {
5041
5059
  var _a2;
5042
5060
  const { doc, hackCss, cache } = options;
5043
5061
  switch (n2.type) {
5044
- case NodeType$2.Document:
5062
+ case NodeType$3.Document:
5045
5063
  return doc.implementation.createDocument(null, "", null);
5046
- case NodeType$2.DocumentType:
5064
+ case NodeType$3.DocumentType:
5047
5065
  return doc.implementation.createDocumentType(
5048
5066
  n2.name || "html",
5049
5067
  n2.publicId,
5050
5068
  n2.systemId
5051
5069
  );
5052
- case NodeType$2.Element: {
5070
+ case NodeType$3.Element: {
5053
5071
  const tagName = getTagName(n2);
5054
5072
  let node2;
5055
5073
  if (n2.isSVG) {
@@ -5183,14 +5201,14 @@ function buildNode(n2, options) {
5183
5201
  }
5184
5202
  return node2;
5185
5203
  }
5186
- case NodeType$2.Text:
5204
+ case NodeType$3.Text:
5187
5205
  if (n2.isStyle && hackCss) {
5188
5206
  return doc.createTextNode(adaptCssForReplay(n2.textContent, cache));
5189
5207
  }
5190
5208
  return doc.createTextNode(n2.textContent);
5191
- case NodeType$2.CDATA:
5209
+ case NodeType$3.CDATA:
5192
5210
  return doc.createCDATASection(n2.textContent);
5193
- case NodeType$2.Comment:
5211
+ case NodeType$3.Comment:
5194
5212
  return doc.createComment(n2.textContent);
5195
5213
  default:
5196
5214
  return null;
@@ -5217,11 +5235,11 @@ function buildNodeWithSN(n2, options) {
5217
5235
  if (n2.rootId && mirror2.getNode(n2.rootId) !== doc) {
5218
5236
  mirror2.replace(n2.rootId, doc);
5219
5237
  }
5220
- if (n2.type === NodeType$2.Document) {
5238
+ if (n2.type === NodeType$3.Document) {
5221
5239
  doc.close();
5222
5240
  doc.open();
5223
- if (n2.compatMode === "BackCompat" && n2.childNodes && n2.childNodes[0].type !== NodeType$2.DocumentType) {
5224
- 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") {
5241
+ if (n2.compatMode === "BackCompat" && n2.childNodes && n2.childNodes[0].type !== NodeType$3.DocumentType) {
5242
+ 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") {
5225
5243
  doc.write(
5226
5244
  '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'
5227
5245
  );
@@ -5234,7 +5252,7 @@ function buildNodeWithSN(n2, options) {
5234
5252
  node2 = doc;
5235
5253
  }
5236
5254
  mirror2.add(node2, n2);
5237
- if ((n2.type === NodeType$2.Document || n2.type === NodeType$2.Element) && !skipChild) {
5255
+ if ((n2.type === NodeType$3.Document || n2.type === NodeType$3.Element) && !skipChild) {
5238
5256
  for (const childN of n2.childNodes) {
5239
5257
  const childNode = buildNodeWithSN(childN, {
5240
5258
  doc,
@@ -5250,7 +5268,7 @@ function buildNodeWithSN(n2, options) {
5250
5268
  }
5251
5269
  if (childN.isShadow && isElement(node2) && node2.shadowRoot) {
5252
5270
  node2.shadowRoot.appendChild(childNode);
5253
- } else if (n2.type === NodeType$2.Document && childN.type == NodeType$2.Element) {
5271
+ } else if (n2.type === NodeType$3.Document && childN.type == NodeType$3.Element) {
5254
5272
  const htmlElement = childNode;
5255
5273
  let body = null;
5256
5274
  htmlElement.childNodes.forEach((child) => {
@@ -5285,7 +5303,7 @@ function visit(mirror2, onVisit) {
5285
5303
  }
5286
5304
  function handleScroll(node2, mirror2) {
5287
5305
  const n2 = mirror2.getMeta(node2);
5288
- if ((n2 == null ? void 0 : n2.type) !== NodeType$2.Element) {
5306
+ if ((n2 == null ? void 0 : n2.type) !== NodeType$3.Element) {
5289
5307
  return;
5290
5308
  }
5291
5309
  const el = node2;
@@ -5333,15 +5351,6 @@ var __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== "
5333
5351
  var __defProp22 = Object.defineProperty;
5334
5352
  var __defNormalProp22 = (obj, key, value) => key in obj ? __defProp22(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5335
5353
  var __publicField22 = (obj, key, value) => __defNormalProp22(obj, typeof key !== "symbol" ? key + "" : key, value);
5336
- var NodeType$1 = /* @__PURE__ */ ((NodeType2) => {
5337
- NodeType2[NodeType2["Document"] = 0] = "Document";
5338
- NodeType2[NodeType2["DocumentType"] = 1] = "DocumentType";
5339
- NodeType2[NodeType2["Element"] = 2] = "Element";
5340
- NodeType2[NodeType2["Text"] = 3] = "Text";
5341
- NodeType2[NodeType2["CDATA"] = 4] = "CDATA";
5342
- NodeType2[NodeType2["Comment"] = 5] = "Comment";
5343
- return NodeType2;
5344
- })(NodeType$1 || {});
5345
5354
  let Mirror$1 = class Mirror2 {
5346
5355
  constructor() {
5347
5356
  __publicField22(this, "idNodeMap", /* @__PURE__ */ new Map());
@@ -8949,6 +8958,15 @@ postcss$1.Input;
8949
8958
  postcss$1.Rule;
8950
8959
  postcss$1.Root;
8951
8960
  postcss$1.Node;
8961
+ var NodeType$1 = /* @__PURE__ */ ((NodeType2) => {
8962
+ NodeType2[NodeType2["Document"] = 0] = "Document";
8963
+ NodeType2[NodeType2["DocumentType"] = 1] = "DocumentType";
8964
+ NodeType2[NodeType2["Element"] = 2] = "Element";
8965
+ NodeType2[NodeType2["Text"] = 3] = "Text";
8966
+ NodeType2[NodeType2["CDATA"] = 4] = "CDATA";
8967
+ NodeType2[NodeType2["Comment"] = 5] = "Comment";
8968
+ return NodeType2;
8969
+ })(NodeType$1 || {});
8952
8970
  function parseCSSText(cssText) {
8953
8971
  const res = {};
8954
8972
  const listDelimiter = /;(?![^(]*\))/g;
@@ -9458,7 +9476,7 @@ function removeChild(parent, child) {
9458
9476
  child.parentNode = null;
9459
9477
  return child;
9460
9478
  }
9461
- var NodeType = /* @__PURE__ */ ((NodeType2) => {
9479
+ var NodeType$2 = /* @__PURE__ */ ((NodeType2) => {
9462
9480
  NodeType2[NodeType2["PLACEHOLDER"] = 0] = "PLACEHOLDER";
9463
9481
  NodeType2[NodeType2["ELEMENT_NODE"] = 1] = "ELEMENT_NODE";
9464
9482
  NodeType2[NodeType2["ATTRIBUTE_NODE"] = 2] = "ATTRIBUTE_NODE";
@@ -9472,7 +9490,7 @@ var NodeType = /* @__PURE__ */ ((NodeType2) => {
9472
9490
  NodeType2[NodeType2["DOCUMENT_TYPE_NODE"] = 10] = "DOCUMENT_TYPE_NODE";
9473
9491
  NodeType2[NodeType2["DOCUMENT_FRAGMENT_NODE"] = 11] = "DOCUMENT_FRAGMENT_NODE";
9474
9492
  return NodeType2;
9475
- })(NodeType || {});
9493
+ })(NodeType$2 || {});
9476
9494
  const NAMESPACES = {
9477
9495
  svg: "http://www.w3.org/2000/svg",
9478
9496
  "xlink:href": "http://www.w3.org/1999/xlink",
@@ -10031,7 +10049,7 @@ function getValidTagName(element) {
10031
10049
  function buildFromNode(node2, rrdom, domMirror, parentRRNode) {
10032
10050
  let rrNode;
10033
10051
  switch (node2.nodeType) {
10034
- case NodeType.DOCUMENT_NODE:
10052
+ case NodeType$2.DOCUMENT_NODE:
10035
10053
  if (parentRRNode && parentRRNode.nodeName === "IFRAME")
10036
10054
  rrNode = parentRRNode.contentDocument;
10037
10055
  else {
@@ -10039,7 +10057,7 @@ function buildFromNode(node2, rrdom, domMirror, parentRRNode) {
10039
10057
  rrNode.compatMode = node2.compatMode;
10040
10058
  }
10041
10059
  break;
10042
- case NodeType.DOCUMENT_TYPE_NODE: {
10060
+ case NodeType$2.DOCUMENT_TYPE_NODE: {
10043
10061
  const documentType = node2;
10044
10062
  rrNode = rrdom.createDocumentType(
10045
10063
  documentType.name,
@@ -10048,7 +10066,7 @@ function buildFromNode(node2, rrdom, domMirror, parentRRNode) {
10048
10066
  );
10049
10067
  break;
10050
10068
  }
10051
- case NodeType.ELEMENT_NODE: {
10069
+ case NodeType$2.ELEMENT_NODE: {
10052
10070
  const elementNode = node2;
10053
10071
  const tagName = getValidTagName(elementNode);
10054
10072
  rrNode = rrdom.createElement(tagName);
@@ -10060,16 +10078,16 @@ function buildFromNode(node2, rrdom, domMirror, parentRRNode) {
10060
10078
  elementNode.scrollTop && (rrElement.scrollTop = elementNode.scrollTop);
10061
10079
  break;
10062
10080
  }
10063
- case NodeType.TEXT_NODE:
10081
+ case NodeType$2.TEXT_NODE:
10064
10082
  rrNode = rrdom.createTextNode(node2.textContent || "");
10065
10083
  break;
10066
- case NodeType.CDATA_SECTION_NODE:
10084
+ case NodeType$2.CDATA_SECTION_NODE:
10067
10085
  rrNode = rrdom.createCDATASection(node2.data);
10068
10086
  break;
10069
- case NodeType.COMMENT_NODE:
10087
+ case NodeType$2.COMMENT_NODE:
10070
10088
  rrNode = rrdom.createComment(node2.textContent || "");
10071
10089
  break;
10072
- case NodeType.DOCUMENT_FRAGMENT_NODE:
10090
+ case NodeType$2.DOCUMENT_FRAGMENT_NODE:
10073
10091
  rrNode = parentRRNode.attachShadow({ mode: "open" });
10074
10092
  break;
10075
10093
  default:
@@ -10092,7 +10110,7 @@ function buildFromDom(dom, domMirror = createMirror$1(), rrdom = new RRDocument(
10092
10110
  if (
10093
10111
  // if the parentRRNode isn't a RRIFrameElement
10094
10112
  (parentRRNode == null ? void 0 : parentRRNode.nodeName) !== "IFRAME" && // if node isn't a shadow root
10095
- node2.nodeType !== NodeType.DOCUMENT_FRAGMENT_NODE
10113
+ node2.nodeType !== NodeType$2.DOCUMENT_FRAGMENT_NODE
10096
10114
  ) {
10097
10115
  parentRRNode == null ? void 0 : parentRRNode.appendChild(rrNode);
10098
10116
  rrNode.parentNode = parentRRNode;
@@ -10101,8 +10119,8 @@ function buildFromDom(dom, domMirror = createMirror$1(), rrdom = new RRDocument(
10101
10119
  if (node2.nodeName === "IFRAME") {
10102
10120
  const iframeDoc = node2.contentDocument;
10103
10121
  iframeDoc && walk2(iframeDoc, rrNode);
10104
- } else if (node2.nodeType === NodeType.DOCUMENT_NODE || node2.nodeType === NodeType.ELEMENT_NODE || node2.nodeType === NodeType.DOCUMENT_FRAGMENT_NODE) {
10105
- if (node2.nodeType === NodeType.ELEMENT_NODE && node2.shadowRoot)
10122
+ } else if (node2.nodeType === NodeType$2.DOCUMENT_NODE || node2.nodeType === NodeType$2.ELEMENT_NODE || node2.nodeType === NodeType$2.DOCUMENT_FRAGMENT_NODE) {
10123
+ if (node2.nodeType === NodeType$2.ELEMENT_NODE && node2.shadowRoot)
10106
10124
  walk2(node2.shadowRoot, rrNode);
10107
10125
  node2.childNodes.forEach((childNode) => walk2(childNode, rrNode));
10108
10126
  }
@@ -10226,6 +10244,9 @@ const testableMethods = {
10226
10244
  MutationObserver: ["constructor"]
10227
10245
  };
10228
10246
  const untaintedBasePrototype = {};
10247
+ const isAngularZonePresent = () => {
10248
+ return !!globalThis.Zone;
10249
+ };
10229
10250
  function getUntaintedPrototype(key) {
10230
10251
  if (untaintedBasePrototype[key])
10231
10252
  return untaintedBasePrototype[key];
@@ -10253,7 +10274,7 @@ function getUntaintedPrototype(key) {
10253
10274
  }
10254
10275
  )
10255
10276
  );
10256
- if (isUntaintedAccessors && isUntaintedMethods) {
10277
+ if (isUntaintedAccessors && isUntaintedMethods && !isAngularZonePresent()) {
10257
10278
  untaintedBasePrototype[key] = defaultObj.prototype;
10258
10279
  return defaultObj.prototype;
10259
10280
  }
@@ -10835,6 +10856,15 @@ var ReplayerEvents = /* @__PURE__ */ ((ReplayerEvents2) => {
10835
10856
  ReplayerEvents2["Destroy"] = "destroy";
10836
10857
  return ReplayerEvents2;
10837
10858
  })(ReplayerEvents || {});
10859
+ var NodeType = /* @__PURE__ */ ((NodeType2) => {
10860
+ NodeType2[NodeType2["Document"] = 0] = "Document";
10861
+ NodeType2[NodeType2["DocumentType"] = 1] = "DocumentType";
10862
+ NodeType2[NodeType2["Element"] = 2] = "Element";
10863
+ NodeType2[NodeType2["Text"] = 3] = "Text";
10864
+ NodeType2[NodeType2["CDATA"] = 4] = "CDATA";
10865
+ NodeType2[NodeType2["Comment"] = 5] = "Comment";
10866
+ return NodeType2;
10867
+ })(NodeType || {});
10838
10868
  function isNodeInLinkedList(n2) {
10839
10869
  return "__ln" in n2;
10840
10870
  }
@@ -12771,7 +12801,7 @@ class IframeManager {
12771
12801
  }
12772
12802
  }
12773
12803
  patchRootIdOnNode(node2, rootId) {
12774
- if (node2.type !== NodeType$2.Document && !node2.rootId) node2.rootId = rootId;
12804
+ if (node2.type !== NodeType.Document && !node2.rootId) node2.rootId = rootId;
12775
12805
  if ("childNodes" in node2) {
12776
12806
  node2.childNodes.forEach((child) => {
12777
12807
  this.patchRootIdOnNode(child, rootId);
@@ -15858,7 +15888,7 @@ class Replayer {
15858
15888
  collectedDialogs.add(builtNode);
15859
15889
  this.collectIframeAndAttachDocument(collectedIframes, builtNode);
15860
15890
  const sn = mirror2.getMeta(builtNode);
15861
- if ((sn == null ? void 0 : sn.type) === NodeType$2.Element && (sn == null ? void 0 : sn.tagName.toUpperCase()) === "HTML") {
15891
+ if ((sn == null ? void 0 : sn.type) === NodeType.Element && (sn == null ? void 0 : sn.tagName.toUpperCase()) === "HTML") {
15862
15892
  const { documentElement, head } = iframeEl.contentDocument;
15863
15893
  this.insertStyleRules(
15864
15894
  documentElement,
@@ -16334,7 +16364,7 @@ class Replayer {
16334
16364
  mutation.parentId
16335
16365
  );
16336
16366
  if (!parent) {
16337
- if (mutation.node.type === NodeType$2.Document) {
16367
+ if (mutation.node.type === NodeType.Document) {
16338
16368
  return this.newDocumentQueue.push(mutation);
16339
16369
  }
16340
16370
  return queue.push(mutation);
@@ -16396,7 +16426,7 @@ class Replayer {
16396
16426
  return;
16397
16427
  }
16398
16428
  const parentSn = mirror2.getMeta(parent);
16399
- if (parentSn && parentSn.type === NodeType$2.Element && mutation.node.type === NodeType$2.Text) {
16429
+ if (parentSn && parentSn.type === NodeType.Element && mutation.node.type === NodeType.Text) {
16400
16430
  const prospectiveSiblings = Array.isArray(parent.childNodes) ? parent.childNodes : Array.from(parent.childNodes);
16401
16431
  if (parentSn.tagName === "textarea") {
16402
16432
  for (const c2 of prospectiveSiblings) {
@@ -16412,9 +16442,9 @@ class Replayer {
16412
16442
  }
16413
16443
  }
16414
16444
  }
16415
- } else if ((parentSn == null ? void 0 : parentSn.type) === NodeType$2.Document) {
16445
+ } else if ((parentSn == null ? void 0 : parentSn.type) === NodeType.Document) {
16416
16446
  const parentDoc = parent;
16417
- if (mutation.node.type === NodeType$2.DocumentType && ((_a2 = parentDoc.childNodes[0]) == null ? void 0 : _a2.nodeType) === Node.DOCUMENT_TYPE_NODE)
16447
+ if (mutation.node.type === NodeType.DocumentType && ((_a2 = parentDoc.childNodes[0]) == null ? void 0 : _a2.nodeType) === Node.DOCUMENT_TYPE_NODE)
16418
16448
  parentDoc.removeChild(parentDoc.childNodes[0]);
16419
16449
  if (target.nodeName === "HTML" && parentDoc.documentElement)
16420
16450
  parentDoc.removeChild(
@@ -16620,7 +16650,7 @@ class Replayer {
16620
16650
  left: d.x,
16621
16651
  behavior: isSync ? "auto" : "smooth"
16622
16652
  });
16623
- } else if ((sn == null ? void 0 : sn.type) === NodeType$2.Document) {
16653
+ } else if ((sn == null ? void 0 : sn.type) === NodeType.Document) {
16624
16654
  (_b = target.defaultView) == null ? void 0 : _b.scrollTo({
16625
16655
  top: d.y,
16626
16656
  left: d.x,