@posthog/rrweb-snapshot 0.0.37 → 0.0.39
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/record.cjs +1 -1
- package/dist/record.js +2 -2
- package/dist/record.umd.cjs +15 -4
- package/dist/record.umd.cjs.map +2 -2
- package/dist/record.umd.min.cjs +1 -1
- package/dist/record.umd.min.cjs.map +3 -3
- package/dist/replay.cjs +1 -1
- package/dist/replay.js +2 -2
- package/dist/replay.umd.cjs +15 -4
- package/dist/replay.umd.cjs.map +2 -2
- package/dist/replay.umd.min.cjs +9 -9
- package/dist/replay.umd.min.cjs.map +3 -3
- package/dist/rrweb-snapshot.cjs +1 -1
- package/dist/rrweb-snapshot.js +1 -1
- package/dist/rrweb-snapshot.umd.cjs +17 -6
- package/dist/rrweb-snapshot.umd.cjs.map +2 -2
- package/dist/rrweb-snapshot.umd.min.cjs +9 -9
- package/dist/rrweb-snapshot.umd.min.cjs.map +3 -3
- package/dist/{types-pLXhbZlp.cjs → types-B7TTv7Jc.cjs} +12 -1
- package/dist/types-B7TTv7Jc.cjs.map +1 -0
- package/dist/{types-pLXhbZlp.umd.cjs → types-B7TTv7Jc.umd.cjs} +13 -2
- package/dist/{types-pLXhbZlp.umd.cjs.map → types-B7TTv7Jc.umd.cjs.map} +2 -2
- package/dist/types-B7TTv7Jc.umd.min.cjs +20 -0
- package/dist/{types-pLXhbZlp.umd.min.cjs.map → types-B7TTv7Jc.umd.min.cjs.map} +3 -3
- package/dist/{types-FDk_ocpu.js → types-OLXvwyjP.js} +12 -1
- package/dist/types-OLXvwyjP.js.map +1 -0
- package/package.json +3 -3
- package/dist/types-FDk_ocpu.js.map +0 -1
- package/dist/types-pLXhbZlp.cjs.map +0 -1
- package/dist/types-pLXhbZlp.umd.min.cjs +0 -20
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../types/dist/rrweb-types.js", "../../utils/dist/rrweb-utils.js", "../src/utils.ts", "../src/types.ts"],
|
|
4
|
-
"sourcesContent": ["var EventType = /* @__PURE__ */ ((EventType2) => {\n EventType2[EventType2[\"DomContentLoaded\"] = 0] = \"DomContentLoaded\";\n EventType2[EventType2[\"Load\"] = 1] = \"Load\";\n EventType2[EventType2[\"FullSnapshot\"] = 2] = \"FullSnapshot\";\n EventType2[EventType2[\"IncrementalSnapshot\"] = 3] = \"IncrementalSnapshot\";\n EventType2[EventType2[\"Meta\"] = 4] = \"Meta\";\n EventType2[EventType2[\"Custom\"] = 5] = \"Custom\";\n EventType2[EventType2[\"Plugin\"] = 6] = \"Plugin\";\n return EventType2;\n})(EventType || {});\nvar IncrementalSource = /* @__PURE__ */ ((IncrementalSource2) => {\n IncrementalSource2[IncrementalSource2[\"Mutation\"] = 0] = \"Mutation\";\n IncrementalSource2[IncrementalSource2[\"MouseMove\"] = 1] = \"MouseMove\";\n IncrementalSource2[IncrementalSource2[\"MouseInteraction\"] = 2] = \"MouseInteraction\";\n IncrementalSource2[IncrementalSource2[\"Scroll\"] = 3] = \"Scroll\";\n IncrementalSource2[IncrementalSource2[\"ViewportResize\"] = 4] = \"ViewportResize\";\n IncrementalSource2[IncrementalSource2[\"Input\"] = 5] = \"Input\";\n IncrementalSource2[IncrementalSource2[\"TouchMove\"] = 6] = \"TouchMove\";\n IncrementalSource2[IncrementalSource2[\"MediaInteraction\"] = 7] = \"MediaInteraction\";\n IncrementalSource2[IncrementalSource2[\"StyleSheetRule\"] = 8] = \"StyleSheetRule\";\n IncrementalSource2[IncrementalSource2[\"CanvasMutation\"] = 9] = \"CanvasMutation\";\n IncrementalSource2[IncrementalSource2[\"Font\"] = 10] = \"Font\";\n IncrementalSource2[IncrementalSource2[\"Log\"] = 11] = \"Log\";\n IncrementalSource2[IncrementalSource2[\"Drag\"] = 12] = \"Drag\";\n IncrementalSource2[IncrementalSource2[\"StyleDeclaration\"] = 13] = \"StyleDeclaration\";\n IncrementalSource2[IncrementalSource2[\"Selection\"] = 14] = \"Selection\";\n IncrementalSource2[IncrementalSource2[\"AdoptedStyleSheet\"] = 15] = \"AdoptedStyleSheet\";\n IncrementalSource2[IncrementalSource2[\"CustomElement\"] = 16] = \"CustomElement\";\n return IncrementalSource2;\n})(IncrementalSource || {});\nvar MouseInteractions = /* @__PURE__ */ ((MouseInteractions2) => {\n MouseInteractions2[MouseInteractions2[\"MouseUp\"] = 0] = \"MouseUp\";\n MouseInteractions2[MouseInteractions2[\"MouseDown\"] = 1] = \"MouseDown\";\n MouseInteractions2[MouseInteractions2[\"Click\"] = 2] = \"Click\";\n MouseInteractions2[MouseInteractions2[\"ContextMenu\"] = 3] = \"ContextMenu\";\n MouseInteractions2[MouseInteractions2[\"DblClick\"] = 4] = \"DblClick\";\n MouseInteractions2[MouseInteractions2[\"Focus\"] = 5] = \"Focus\";\n MouseInteractions2[MouseInteractions2[\"Blur\"] = 6] = \"Blur\";\n MouseInteractions2[MouseInteractions2[\"TouchStart\"] = 7] = \"TouchStart\";\n MouseInteractions2[MouseInteractions2[\"TouchMove_Departed\"] = 8] = \"TouchMove_Departed\";\n MouseInteractions2[MouseInteractions2[\"TouchEnd\"] = 9] = \"TouchEnd\";\n MouseInteractions2[MouseInteractions2[\"TouchCancel\"] = 10] = \"TouchCancel\";\n return MouseInteractions2;\n})(MouseInteractions || {});\nvar PointerTypes = /* @__PURE__ */ ((PointerTypes2) => {\n PointerTypes2[PointerTypes2[\"Mouse\"] = 0] = \"Mouse\";\n PointerTypes2[PointerTypes2[\"Pen\"] = 1] = \"Pen\";\n PointerTypes2[PointerTypes2[\"Touch\"] = 2] = \"Touch\";\n return PointerTypes2;\n})(PointerTypes || {});\nvar CanvasContext = /* @__PURE__ */ ((CanvasContext2) => {\n CanvasContext2[CanvasContext2[\"2D\"] = 0] = \"2D\";\n CanvasContext2[CanvasContext2[\"WebGL\"] = 1] = \"WebGL\";\n CanvasContext2[CanvasContext2[\"WebGL2\"] = 2] = \"WebGL2\";\n return CanvasContext2;\n})(CanvasContext || {});\nvar MediaInteractions = /* @__PURE__ */ ((MediaInteractions2) => {\n MediaInteractions2[MediaInteractions2[\"Play\"] = 0] = \"Play\";\n MediaInteractions2[MediaInteractions2[\"Pause\"] = 1] = \"Pause\";\n MediaInteractions2[MediaInteractions2[\"Seeked\"] = 2] = \"Seeked\";\n MediaInteractions2[MediaInteractions2[\"VolumeChange\"] = 3] = \"VolumeChange\";\n MediaInteractions2[MediaInteractions2[\"RateChange\"] = 4] = \"RateChange\";\n return MediaInteractions2;\n})(MediaInteractions || {});\nvar ReplayerEvents = /* @__PURE__ */ ((ReplayerEvents2) => {\n ReplayerEvents2[\"Start\"] = \"start\";\n ReplayerEvents2[\"Pause\"] = \"pause\";\n ReplayerEvents2[\"Resume\"] = \"resume\";\n ReplayerEvents2[\"Resize\"] = \"resize\";\n ReplayerEvents2[\"Finish\"] = \"finish\";\n ReplayerEvents2[\"FullsnapshotRebuilded\"] = \"fullsnapshot-rebuilded\";\n ReplayerEvents2[\"LoadStylesheetStart\"] = \"load-stylesheet-start\";\n ReplayerEvents2[\"LoadStylesheetEnd\"] = \"load-stylesheet-end\";\n ReplayerEvents2[\"SkipStart\"] = \"skip-start\";\n ReplayerEvents2[\"SkipEnd\"] = \"skip-end\";\n ReplayerEvents2[\"MouseInteraction\"] = \"mouse-interaction\";\n ReplayerEvents2[\"EventCast\"] = \"event-cast\";\n ReplayerEvents2[\"CustomEvent\"] = \"custom-event\";\n ReplayerEvents2[\"Flush\"] = \"flush\";\n ReplayerEvents2[\"StateChange\"] = \"state-change\";\n ReplayerEvents2[\"PlayBack\"] = \"play-back\";\n ReplayerEvents2[\"Destroy\"] = \"destroy\";\n return ReplayerEvents2;\n})(ReplayerEvents || {});\nvar NodeType = /* @__PURE__ */ ((NodeType2) => {\n NodeType2[NodeType2[\"Document\"] = 0] = \"Document\";\n NodeType2[NodeType2[\"DocumentType\"] = 1] = \"DocumentType\";\n NodeType2[NodeType2[\"Element\"] = 2] = \"Element\";\n NodeType2[NodeType2[\"Text\"] = 3] = \"Text\";\n NodeType2[NodeType2[\"CDATA\"] = 4] = \"CDATA\";\n NodeType2[NodeType2[\"Comment\"] = 5] = \"Comment\";\n return NodeType2;\n})(NodeType || {});\nexport {\n CanvasContext,\n EventType,\n IncrementalSource,\n MediaInteractions,\n MouseInteractions,\n NodeType,\n PointerTypes,\n ReplayerEvents\n};\n//# sourceMappingURL=rrweb-types.js.map\n", "const testableAccessors = {\n Node: [\"childNodes\", \"parentNode\", \"parentElement\", \"textContent\"],\n ShadowRoot: [\"host\", \"styleSheets\"],\n Element: [\"shadowRoot\", \"querySelector\", \"querySelectorAll\"],\n MutationObserver: []\n};\nconst testableMethods = {\n Node: [\"contains\", \"getRootNode\"],\n ShadowRoot: [\"getSelection\"],\n Element: [],\n MutationObserver: [\"constructor\"]\n};\nconst untaintedBasePrototype = {};\nfunction angularZoneUnpatchedAlternative(key) {\n var _a, _b;\n const angularUnpatchedVersionSymbol = (_b = (_a = globalThis == null ? void 0 : globalThis.Zone) == null ? void 0 : _a.__symbol__) == null ? void 0 : _b.call(_a, key);\n if (angularUnpatchedVersionSymbol && globalThis[angularUnpatchedVersionSymbol]) {\n return globalThis[angularUnpatchedVersionSymbol];\n } else {\n return void 0;\n }\n}\nfunction getUntaintedPrototype(key) {\n if (untaintedBasePrototype[key])\n return untaintedBasePrototype[key];\n const candidate = angularZoneUnpatchedAlternative(key) || globalThis[key];\n const defaultPrototype = candidate.prototype;\n const accessorNames = key in testableAccessors ? testableAccessors[key] : void 0;\n const isUntaintedAccessors = Boolean(\n accessorNames && // @ts-expect-error 2345\n accessorNames.every(\n (accessor) => {\n var _a, _b;\n return Boolean(\n (_b = (_a = Object.getOwnPropertyDescriptor(defaultPrototype, accessor)) == null ? void 0 : _a.get) == null ? void 0 : _b.toString().includes(\"[native code]\")\n );\n }\n )\n );\n const methodNames = key in testableMethods ? testableMethods[key] : void 0;\n const isUntaintedMethods = Boolean(\n methodNames && methodNames.every(\n // @ts-expect-error 2345\n (method) => {\n var _a;\n return typeof defaultPrototype[method] === \"function\" && ((_a = defaultPrototype[method]) == null ? void 0 : _a.toString().includes(\"[native code]\"));\n }\n )\n );\n if (isUntaintedAccessors && isUntaintedMethods) {\n untaintedBasePrototype[key] = candidate.prototype;\n return candidate.prototype;\n }\n try {\n const iframeEl = document.createElement(\"iframe\");\n document.body.appendChild(iframeEl);\n const win = iframeEl.contentWindow;\n if (!win) return candidate.prototype;\n const untaintedObject = win[key].prototype;\n document.body.removeChild(iframeEl);\n if (!untaintedObject) return defaultPrototype;\n return untaintedBasePrototype[key] = untaintedObject;\n } catch {\n return defaultPrototype;\n }\n}\nconst untaintedAccessorCache = {};\nfunction getUntaintedAccessor(key, instance, accessor) {\n var _a;\n const cacheKey = `${key}.${String(accessor)}`;\n if (untaintedAccessorCache[cacheKey])\n return untaintedAccessorCache[cacheKey].call(\n instance\n );\n const untaintedPrototype = getUntaintedPrototype(key);\n const untaintedAccessor = (_a = Object.getOwnPropertyDescriptor(\n untaintedPrototype,\n accessor\n )) == null ? void 0 : _a.get;\n if (!untaintedAccessor) return instance[accessor];\n untaintedAccessorCache[cacheKey] = untaintedAccessor;\n return untaintedAccessor.call(instance);\n}\nconst untaintedMethodCache = {};\nfunction getUntaintedMethod(key, instance, method) {\n const cacheKey = `${key}.${String(method)}`;\n if (untaintedMethodCache[cacheKey])\n return untaintedMethodCache[cacheKey].bind(\n instance\n );\n const untaintedPrototype = getUntaintedPrototype(key);\n const untaintedMethod = untaintedPrototype[method];\n if (typeof untaintedMethod !== \"function\") return instance[method];\n untaintedMethodCache[cacheKey] = untaintedMethod;\n return untaintedMethod.bind(instance);\n}\nfunction childNodes(n) {\n return getUntaintedAccessor(\"Node\", n, \"childNodes\");\n}\nfunction parentNode(n) {\n return getUntaintedAccessor(\"Node\", n, \"parentNode\");\n}\nfunction parentElement(n) {\n return getUntaintedAccessor(\"Node\", n, \"parentElement\");\n}\nfunction textContent(n) {\n return getUntaintedAccessor(\"Node\", n, \"textContent\");\n}\nfunction contains(n, other) {\n return getUntaintedMethod(\"Node\", n, \"contains\")(other);\n}\nfunction getRootNode(n) {\n return getUntaintedMethod(\"Node\", n, \"getRootNode\")();\n}\nfunction host(n) {\n if (!n || !(\"host\" in n)) return null;\n return getUntaintedAccessor(\"ShadowRoot\", n, \"host\");\n}\nfunction styleSheets(n) {\n return n.styleSheets;\n}\nfunction shadowRoot(n) {\n if (!n || !(\"shadowRoot\" in n)) return null;\n return getUntaintedAccessor(\"Element\", n, \"shadowRoot\");\n}\nfunction querySelector(n, selectors) {\n return getUntaintedAccessor(\"Element\", n, \"querySelector\")(selectors);\n}\nfunction querySelectorAll(n, selectors) {\n return getUntaintedAccessor(\"Element\", n, \"querySelectorAll\")(selectors);\n}\nfunction mutationObserverCtor() {\n return getUntaintedPrototype(\"MutationObserver\").constructor;\n}\nfunction patch(source, name, replacement) {\n try {\n if (!(name in source)) {\n return () => {\n };\n }\n const original = source[name];\n const wrapped = replacement(original);\n if (typeof wrapped === \"function\") {\n wrapped.prototype = wrapped.prototype || {};\n Object.defineProperties(wrapped, {\n __rrweb_original__: {\n enumerable: false,\n value: original\n }\n });\n }\n source[name] = wrapped;\n return () => {\n source[name] = original;\n };\n } catch {\n return () => {\n };\n }\n}\nconst index = {\n childNodes,\n parentNode,\n parentElement,\n textContent,\n contains,\n getRootNode,\n host,\n styleSheets,\n shadowRoot,\n querySelector,\n querySelectorAll,\n mutationObserver: mutationObserverCtor,\n patch\n};\nexport {\n childNodes,\n contains,\n index as default,\n getRootNode,\n getUntaintedAccessor,\n getUntaintedMethod,\n getUntaintedPrototype,\n host,\n mutationObserverCtor,\n parentElement,\n parentNode,\n patch,\n querySelector,\n querySelectorAll,\n shadowRoot,\n styleSheets,\n textContent\n};\n//# sourceMappingURL=rrweb-utils.js.map\n", "import type {\n idNodeMap,\n MaskInputFn,\n MaskInputOptions,\n nodeMetaMap,\n} from './types';\n\nimport { NodeType } from '@posthog/rrweb-types';\nimport type {\n IMirror,\n serializedNodeWithId,\n serializedNode,\n documentNode,\n documentTypeNode,\n textNode,\n elementNode,\n} from '@posthog/rrweb-types';\nimport dom from '@posthog/rrweb-utils';\n\nexport function isElement(n: Node): n is Element {\n return n.nodeType === n.ELEMENT_NODE;\n}\n\nexport function isShadowRoot(n: Node): n is ShadowRoot {\n const hostEl: Element | null =\n // anchor and textarea elements also have a `host` property\n // but only shadow roots have a `mode` property\n (n && 'host' in n && 'mode' in n && dom.host(n as ShadowRoot)) || null;\n return Boolean(\n hostEl && 'shadowRoot' in hostEl && dom.shadowRoot(hostEl) === n,\n );\n}\n\n/**\n * To fix the issue https://github.com/rrweb-io/rrweb/issues/933.\n * Some websites use polyfilled shadow dom and this function is used to detect this situation.\n */\nexport function isNativeShadowDom(shadowRoot: ShadowRoot): boolean {\n return Object.prototype.toString.call(shadowRoot) === '[object ShadowRoot]';\n}\n\n/**\n * Browsers sometimes destructively modify the css rules they receive.\n * This function tries to rectify the modifications the browser made to make it more cross platform compatible.\n * @param cssText - output of `CSSStyleRule.cssText`\n * @returns `cssText` with browser inconsistencies fixed.\n */\nfunction fixBrowserCompatibilityIssuesInCSS(cssText: string): string {\n /**\n * Chrome outputs `-webkit-background-clip` as `background-clip` in `CSSStyleRule.cssText`.\n * But then Chrome ignores `background-clip` as css input.\n * Re-introduce `-webkit-background-clip` to fix this issue.\n */\n if (\n cssText.includes(' background-clip: text;') &&\n !cssText.includes(' -webkit-background-clip: text;')\n ) {\n cssText = cssText.replace(\n /\\sbackground-clip:\\s*text;/g,\n ' -webkit-background-clip: text; background-clip: text;',\n );\n }\n return cssText;\n}\n\n// Remove this declaration once typescript has added `CSSImportRule.supportsText` to the lib.\ndeclare interface CSSImportRule extends CSSRule {\n readonly href: string;\n readonly layerName: string | null;\n readonly media: MediaList;\n readonly styleSheet: CSSStyleSheet;\n /**\n * experimental API, currently only supported in firefox\n * https://developer.mozilla.org/en-US/docs/Web/API/CSSImportRule/supportsText\n */\n readonly supportsText?: string | null;\n}\n\n/**\n * Browsers sometimes incorrectly escape `@import` on `.cssText` statements.\n * This function tries to correct the escaping.\n * more info: https://bugs.chromium.org/p/chromium/issues/detail?id=1472259\n * @param cssImportRule\n * @returns `cssText` with browser inconsistencies fixed, or null if not applicable.\n */\nexport function escapeImportStatement(rule: CSSImportRule): string {\n const { cssText } = rule;\n if (cssText.split('\"').length < 3) return cssText;\n\n const statement = ['@import', `url(${JSON.stringify(rule.href)})`];\n if (rule.layerName === '') {\n statement.push(`layer`);\n } else if (rule.layerName) {\n statement.push(`layer(${rule.layerName})`);\n }\n if (rule.supportsText) {\n statement.push(`supports(${rule.supportsText})`);\n }\n if (rule.media.length) {\n statement.push(rule.media.mediaText);\n }\n return statement.join(' ') + ';';\n}\n\nexport function stringifyStylesheet(s: CSSStyleSheet): string | null {\n try {\n const rules = s.rules || s.cssRules;\n if (!rules) {\n return null;\n }\n let sheetHref = s.href;\n if (!sheetHref && s.ownerNode) {\n // an inline <style> element\n sheetHref = s.ownerNode.baseURI;\n }\n const stringifiedRules = Array.from(rules, (rule: CSSRule) =>\n stringifyRule(rule, sheetHref),\n ).join('');\n return fixBrowserCompatibilityIssuesInCSS(stringifiedRules);\n } catch (error) {\n return null;\n }\n}\n\nexport function stringifyRule(rule: CSSRule, sheetHref: string | null): string {\n if (isCSSImportRule(rule)) {\n let importStringified;\n try {\n importStringified =\n // for same-origin stylesheets,\n // we can access the imported stylesheet rules directly\n stringifyStylesheet(rule.styleSheet) ||\n // work around browser issues with the raw string `@import url(...)` statement\n escapeImportStatement(rule);\n } catch (error) {\n importStringified = rule.cssText;\n }\n // if importStringified is not null,\n // there should be a stylesheet and a rule here,\n // but we avoid errors in this method by checking for null\n // see https://github.com/rrweb-io/rrweb/pull/1686\n try {\n if (importStringified && rule.styleSheet?.href) {\n // url()s within the imported stylesheet are relative to _that_ sheet's href\n return absolutifyURLs(importStringified, rule.styleSheet.href);\n }\n } catch {\n // swallow this, we'll return null\n }\n return importStringified;\n } else {\n let ruleStringified = rule.cssText;\n if (isCSSStyleRule(rule) && rule.selectorText.includes(':')) {\n // Safari does not escape selectors with : properly\n // see https://bugs.webkit.org/show_bug.cgi?id=184604\n ruleStringified = fixSafariColons(ruleStringified);\n }\n if (sheetHref) {\n return absolutifyURLs(ruleStringified, sheetHref);\n }\n return ruleStringified;\n }\n}\n\nexport function fixSafariColons(cssStringified: string): string {\n // Replace e.g. [aa:bb] with [aa\\\\:bb]\n const regex = /(\\[(?:[\\w-]+)[^\\\\])(:(?:[\\w-]+)\\])/gm;\n return cssStringified.replace(regex, '$1\\\\$2');\n}\n\nexport function isCSSImportRule(rule: CSSRule): rule is CSSImportRule {\n return 'styleSheet' in rule;\n}\n\nexport function isCSSStyleRule(rule: CSSRule): rule is CSSStyleRule {\n return 'selectorText' in rule;\n}\n\nexport class Mirror implements IMirror<Node> {\n private idNodeMap: idNodeMap = new Map();\n private nodeMetaMap: nodeMetaMap = new WeakMap();\n\n getId(n: Node | undefined | null): number {\n if (!n) return -1;\n\n const id = this.getMeta(n)?.id;\n\n // if n is not a serialized Node, use -1 as its id.\n return id ?? -1;\n }\n\n getNode(id: number): Node | null {\n return this.idNodeMap.get(id) || null;\n }\n\n getIds(): number[] {\n return Array.from(this.idNodeMap.keys());\n }\n\n getMeta(n: Node): serializedNodeWithId | null {\n return this.nodeMetaMap.get(n) || null;\n }\n\n // removes the node from idNodeMap\n // doesn't remove the node from nodeMetaMap\n removeNodeFromMap(n: Node) {\n const id = this.getId(n);\n this.idNodeMap.delete(id);\n\n if (n.childNodes) {\n n.childNodes.forEach((childNode) =>\n this.removeNodeFromMap(childNode as unknown as Node),\n );\n }\n }\n has(id: number): boolean {\n return this.idNodeMap.has(id);\n }\n\n hasNode(node: Node): boolean {\n return this.nodeMetaMap.has(node);\n }\n\n add(n: Node, meta: serializedNodeWithId) {\n const id = meta.id;\n this.idNodeMap.set(id, n);\n this.nodeMetaMap.set(n, meta);\n }\n\n replace(id: number, n: Node) {\n const oldNode = this.getNode(id);\n if (oldNode) {\n const meta = this.nodeMetaMap.get(oldNode);\n if (meta) this.nodeMetaMap.set(n, meta);\n }\n this.idNodeMap.set(id, n);\n }\n\n reset() {\n this.idNodeMap = new Map();\n this.nodeMetaMap = new WeakMap();\n }\n}\n\nexport function createMirror(): Mirror {\n return new Mirror();\n}\n\nexport function maskInputValue({\n element,\n maskInputOptions,\n tagName,\n type,\n value,\n maskInputFn,\n}: {\n element: HTMLElement;\n maskInputOptions: MaskInputOptions;\n tagName: string;\n type: string | null;\n value: string | null;\n maskInputFn?: MaskInputFn;\n}): string {\n let text = value || '';\n const actualType = type && toLowerCase(type);\n\n if (\n maskInputOptions[tagName.toLowerCase() as keyof MaskInputOptions] ||\n (actualType && maskInputOptions[actualType as keyof MaskInputOptions])\n ) {\n if (maskInputFn) {\n text = maskInputFn(text, element);\n } else {\n text = '*'.repeat(text.length);\n }\n }\n return text;\n}\n\nexport function toLowerCase<T extends string>(str: T): Lowercase<T> {\n return str.toLowerCase() as unknown as Lowercase<T>;\n}\n\nconst ORIGINAL_ATTRIBUTE_NAME = '__rrweb_original__';\ntype PatchedGetImageData = {\n [ORIGINAL_ATTRIBUTE_NAME]: CanvasImageData['getImageData'];\n} & CanvasImageData['getImageData'];\n\nexport function is2DCanvasBlank(canvas: HTMLCanvasElement): boolean {\n const ctx = canvas.getContext('2d');\n if (!ctx) return true;\n\n const chunkSize = 50;\n\n // get chunks of the canvas and check if it is blank\n for (let x = 0; x < canvas.width; x += chunkSize) {\n for (let y = 0; y < canvas.height; y += chunkSize) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const getImageData = ctx.getImageData as PatchedGetImageData;\n const originalGetImageData =\n ORIGINAL_ATTRIBUTE_NAME in getImageData\n ? getImageData[ORIGINAL_ATTRIBUTE_NAME]\n : getImageData;\n // by getting the canvas in chunks we avoid an expensive\n // `getImageData` call that retrieves everything\n // even if we can already tell from the first chunk(s) that\n // the canvas isn't blank\n const pixelBuffer = new Uint32Array(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access\n originalGetImageData.call(\n ctx,\n x,\n y,\n Math.min(chunkSize, canvas.width - x),\n Math.min(chunkSize, canvas.height - y),\n ).data.buffer,\n );\n if (pixelBuffer.some((pixel) => pixel !== 0)) return false;\n }\n }\n return true;\n}\n\nexport function isNodeMetaEqual(a: serializedNode, b: serializedNode): boolean {\n if (!a || !b || a.type !== b.type) return false;\n if (a.type === NodeType.Document)\n return a.compatMode === (b as documentNode).compatMode;\n else if (a.type === NodeType.DocumentType)\n return (\n a.name === (b as documentTypeNode).name &&\n a.publicId === (b as documentTypeNode).publicId &&\n a.systemId === (b as documentTypeNode).systemId\n );\n else if (\n a.type === NodeType.Comment ||\n a.type === NodeType.Text ||\n a.type === NodeType.CDATA\n )\n return a.textContent === (b as textNode).textContent;\n else if (a.type === NodeType.Element)\n return (\n a.tagName === (b as elementNode).tagName &&\n JSON.stringify(a.attributes) ===\n JSON.stringify((b as elementNode).attributes) &&\n a.isSVG === (b as elementNode).isSVG &&\n a.needBlock === (b as elementNode).needBlock\n );\n return false;\n}\n\n/**\n * Get the type of an input element.\n * This takes care of the case where a password input is changed to a text input.\n * In this case, we continue to consider this of type password, in order to avoid leaking sensitive data\n * where passwords should be masked.\n */\nexport function getInputType(element: HTMLElement): Lowercase<string> | null {\n // when omitting the type of input element(e.g. <input />), the type is treated as text\n const type = (element as HTMLInputElement).type;\n\n return element.hasAttribute('data-rr-is-password')\n ? 'password'\n : type\n ? // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n toLowerCase(type)\n : null;\n}\n\n/**\n * Extracts the file extension from an a path, considering search parameters and fragments.\n * @param path - Path to file\n * @param baseURL - [optional] Base URL of the page, used to resolve relative paths. Defaults to current page URL.\n */\nexport function extractFileExtension(\n path: string,\n baseURL?: string,\n): string | null {\n let url;\n try {\n url = new URL(path, baseURL ?? window.location.href);\n } catch (err) {\n return null;\n }\n const regex = /\\.([0-9a-z]+)(?:$)/i;\n const match = url.pathname.match(regex);\n return match?.[1] ?? null;\n}\n\nfunction extractOrigin(url: string): string {\n let origin = '';\n if (url.indexOf('//') > -1) {\n origin = url.split('/').slice(0, 3).join('/');\n } else {\n origin = url.split('/')[0];\n }\n origin = origin.split('?')[0];\n return origin;\n}\n\nconst URL_IN_CSS_REF = /url\\((?:(')([^']*)'|(\")(.*?)\"|([^)]*))\\)/gm;\nconst URL_PROTOCOL_MATCH = /^(?:[a-z+]+:)?\\/\\//i;\nconst URL_WWW_MATCH = /^www\\..*/i;\nconst DATA_URI = /^(data:)([^,]*),(.*)/i;\nexport function absolutifyURLs(cssText: string | null, href: string): string {\n return (cssText || '').replace(\n URL_IN_CSS_REF,\n (\n origin: string,\n quote1: string,\n path1: string,\n quote2: string,\n path2: string,\n path3: string,\n ) => {\n const filePath = path1 || path2 || path3;\n const maybeQuote = quote1 || quote2 || '';\n if (!filePath) {\n return origin;\n }\n if (URL_PROTOCOL_MATCH.test(filePath) || URL_WWW_MATCH.test(filePath)) {\n return `url(${maybeQuote}${filePath}${maybeQuote})`;\n }\n if (DATA_URI.test(filePath)) {\n return `url(${maybeQuote}${filePath}${maybeQuote})`;\n }\n if (filePath[0] === '/') {\n return `url(${maybeQuote}${\n extractOrigin(href) + filePath\n }${maybeQuote})`;\n }\n const stack = href.split('/');\n const parts = filePath.split('/');\n stack.pop();\n for (const part of parts) {\n if (part === '.') {\n continue;\n } else if (part === '..') {\n stack.pop();\n } else {\n stack.push(part);\n }\n }\n return `url(${maybeQuote}${stack.join('/')}${maybeQuote})`;\n },\n );\n}\n\nconst STRIPED_PLACEHOLDER_SVG =\n 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==';\n\nconst MAX_IMAGE_DIMENSION_FOR_RECOMPRESSION = 4096;\n\nexport function recompressBase64Image(\n img: HTMLImageElement,\n dataURL: string,\n type?: string,\n quality?: number,\n): string {\n if (!img.complete || img.naturalWidth === 0) {\n return dataURL;\n }\n\n // don't recompress very large images to avoid performance issues\n if (\n img.naturalWidth > MAX_IMAGE_DIMENSION_FOR_RECOMPRESSION ||\n img.naturalHeight > MAX_IMAGE_DIMENSION_FOR_RECOMPRESSION\n ) {\n return dataURL;\n }\n\n try {\n const canvas = document.createElement('canvas');\n canvas.width = img.naturalWidth;\n canvas.height = img.naturalHeight;\n const ctx = canvas.getContext('2d');\n\n if (!ctx) {\n return dataURL;\n }\n\n ctx.drawImage(img, 0, 0);\n const recompressed = canvas.toDataURL(type || 'image/webp', quality ?? 0.4);\n\n return recompressed;\n } catch (err) {\n return dataURL;\n }\n}\n\nexport function checkDataURLSize(\n dataURL: string,\n maxLength: number | undefined,\n): string {\n if (!maxLength || dataURL.length <= maxLength) {\n return dataURL;\n }\n\n return STRIPED_PLACEHOLDER_SVG;\n}\n", "export enum NodeType {\n Document,\n DocumentType,\n Element,\n Text,\n CDATA,\n Comment,\n}\n\nexport type documentNode = {\n type: NodeType.Document;\n childNodes: serializedNodeWithId[];\n compatMode?: string;\n};\n\nexport type documentTypeNode = {\n type: NodeType.DocumentType;\n name: string;\n publicId: string;\n systemId: string;\n};\n\nexport type attributes = {\n [key: string]: string | number | true | null;\n};\nexport type legacyAttributes = {\n /**\n * @deprecated old bug in rrweb was causing these to always be set\n * @see https://github.com/rrweb-io/rrweb/pull/651\n */\n selected: false;\n};\n\nexport type elementNode = {\n type: NodeType.Element;\n tagName: string;\n attributes: attributes;\n childNodes: serializedNodeWithId[];\n isSVG?: true;\n needBlock?: boolean;\n // This is a custom element or not.\n isCustom?: true;\n};\n\nexport type textNode = {\n type: NodeType.Text;\n textContent: string;\n isStyle?: true;\n};\n\nexport type cdataNode = {\n type: NodeType.CDATA;\n textContent: '';\n};\n\nexport type commentNode = {\n type: NodeType.Comment;\n textContent: string;\n};\n\nexport type serializedNode = (\n | documentNode\n | documentTypeNode\n | elementNode\n | textNode\n | cdataNode\n | commentNode\n) & {\n rootId?: number;\n isShadowHost?: boolean;\n isShadow?: boolean;\n};\n\nimport type { serializedNodeWithId } from '@posthog/rrweb-types';\n\nexport type serializedElementNodeWithId = Extract<\n serializedNodeWithId,\n Record<'type', NodeType.Element>\n>;\n\nexport type tagMap = {\n [key: string]: string;\n};\n\nexport type DialogAttributes = {\n open: string;\n /**\n * Represents the dialog's open mode.\n * `modal` means the dialog is opened with `showModal()`.\n * `non-modal` means the dialog is opened with `show()` or\n * by adding an `open` attribute.\n */\n rr_open_mode: 'modal' | 'non-modal';\n /**\n * Currently unimplemented, but in future can be used to:\n * Represents the order of which of the dialog was opened.\n * This is useful for replaying the dialog `.showModal()` in the correct order.\n */\n // rr_open_mode_index?: number;\n};\n\nexport interface ICanvas extends HTMLCanvasElement {\n __context: string;\n}\n\nexport type idNodeMap = Map<number, Node>;\n\nexport type nodeMetaMap = WeakMap<Node, serializedNodeWithId>;\n\nexport type MaskInputOptions = Partial<{\n color: boolean;\n date: boolean;\n 'datetime-local': boolean;\n email: boolean;\n month: boolean;\n number: boolean;\n range: boolean;\n search: boolean;\n tel: boolean;\n text: boolean;\n time: boolean;\n url: boolean;\n week: boolean;\n // unify textarea and select element with text input\n textarea: boolean;\n select: boolean;\n password: boolean;\n}>;\n\nexport type SlimDOMOptions = Partial<{\n script: boolean;\n comment: boolean;\n headFavicon: boolean;\n headWhitespace: boolean;\n headMetaDescKeywords: boolean;\n headMetaSocial: boolean;\n headMetaRobots: boolean;\n headMetaHttpEquiv: boolean;\n headMetaAuthorship: boolean;\n headMetaVerification: boolean;\n /**\n * blocks title tag 'animations' which can generate a lot of mutations that aren't usually displayed in replayers\n **/\n headTitleMutations: boolean;\n}>;\n\nexport type MaskTextFn = (text: string, element: HTMLElement | null) => string;\nexport type MaskInputFn = (text: string, element: HTMLElement) => string;\n\nexport type KeepIframeSrcFn = (src: string) => boolean;\n\nexport type BuildCache = {\n stylesWithHoverClass: Map<string, string>;\n};\n"],
|
|
5
|
-
"mappings": ";yKAoFIA,GAA6BC,IAC/BA,EAAUA,EAAU,SAAc,CAAC,EAAI,WACvCA,EAAUA,EAAU,aAAkB,CAAC,EAAI,eAC3CA,EAAUA,EAAU,QAAa,CAAC,EAAI,UACtCA,EAAUA,EAAU,KAAU,CAAC,EAAI,OACnCA,EAAUA,EAAU,MAAW,CAAC,EAAI,QACpCA,EAAUA,EAAU,QAAa,CAAC,EAAI,UAC/BA,IACND,GAAY,CAAA,CAAE,EC5FXE,EAAoB,CACxB,KAAM,CAAC,aAAc,aAAc,gBAAiB,aAAa,EACjE,WAAY,CAAC,OAAQ,aAAa,EAClC,QAAS,CAAC,aAAc,gBAAiB,kBAAkB,EAC3D,iBAAkB,CAAA,CACpB,EACMC,EAAkB,CACtB,KAAM,CAAC,WAAY,aAAa,EAChC,WAAY,CAAC,cAAc,EAC3B,QAAS,CAAA,EACT,iBAAkB,CAAC,aAAa,CAClC,EACMC,EAAyB,CAAA,EAC/B,SAASC,EAAgCC,EAAK,CAC5C,IAAIC,EAAIC,EACR,IAAMC,GAAiCD,GAAMD,EAAK,YAAc,KAAO,OAAS,WAAW,OAAS,KAAO,OAASA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IAAS,KAClBF,EAAM,IAAA,EAENA,EAAM,KAAKE,CAAI,GAGnB,MAAO,OAAOH,CAAU,GAAGC,EAAM,KAAK,GAAG,CAAC,GAAGD,CAAU,GACzD,CAAA,CAEJ,CAEA,IAAMI,GACJ,qjBAEIC,EAAwC,KAEvC,SAASC,GACdC,EACAC,EACAhD,EACAiD,EACQ,CAMR,GALI,CAACF,EAAI,UAAYA,EAAI,eAAiB,GAMxCA,EAAI,aAAeF,GACnBE,EAAI,cAAgBF,EAEpB,OAAOG,EAGT,GAAI,CACF,IAAMvC,EAAS,SAAS,cAAc,QAAQ,EAC9CA,EAAO,MAAQsC,EAAI,aACnBtC,EAAO,OAASsC,EAAI,cACpB,IAAMrC,EAAMD,EAAO,WAAW,IAAI,EAElC,OAAKC,GAILA,EAAI,UAAUqC,EAAK,EAAG,CAAC,EACFtC,EAAO,UAAUT,GAAQ,aAAciD,GAAA,KAAAA,EAAW,EAAG,GAJjED,CAOX,OAASvB,EAAK,CACZ,OAAOuB,CACT,CACF,CAEO,SAASE,GACdF,EACAG,EACQ,CACR,MAAI,CAACA,GAAaH,EAAQ,QAAUG,EAC3BH,EAGFJ,EACT,CClfO,IAAKvI,GAAAA,IACVA,EAAAA,EAAA,SAAA,CAAA,EAAA,WACAA,EAAAA,EAAA,aAAA,CAAA,EAAA,eACAA,EAAAA,EAAA,QAAA,CAAA,EAAA,UACAA,EAAAA,EAAA,KAAA,CAAA,EAAA,OACAA,EAAAA,EAAA,MAAA,CAAA,EAAA,QACAA,EAAAA,EAAA,QAAA,CAAA,EAAA,UANUA,IAAAA,GAAA,CAAA,CAAA",
|
|
6
|
-
"names": ["NodeType", "NodeType2", "testableAccessors", "testableMethods", "untaintedBasePrototype", "angularZoneUnpatchedAlternative", "key", "_a", "_b", "angularUnpatchedVersionSymbol", "getUntaintedPrototype", "candidate", "defaultPrototype", "accessorNames", "isUntaintedAccessors", "accessor", "methodNames", "isUntaintedMethods", "method", "iframeEl", "win", "untaintedObject", "e", "untaintedAccessorCache", "getUntaintedAccessor", "instance", "cacheKey", "untaintedPrototype", "untaintedAccessor", "untaintedMethodCache", "getUntaintedMethod", "untaintedMethod", "childNodes", "n", "parentNode", "parentElement", "textContent", "contains", "other", "getRootNode", "host", "styleSheets", "shadowRoot", "querySelector", "selectors", "querySelectorAll", "mutationObserverCtor", "patch", "source", "name", "replacement", "original", "wrapped", "index", "isElement", "isShadowRoot", "hostEl", "dom", "isNativeShadowDom", "fixBrowserCompatibilityIssuesInCSS", "cssText", "escapeImportStatement", "rule", "statement", "stringifyStylesheet", "s", "rules", "sheetHref", "stringifiedRules", "stringifyRule", "error", "isCSSImportRule", "importStringified", "absolutifyURLs", "ruleStringified", "isCSSStyleRule", "fixSafariColons", "cssStringified", "regex", "Mirror", "__publicField", "id", "childNode", "node", "meta", "oldNode", "createMirror", "maskInputValue", "element", "maskInputOptions", "tagName", "type", "value", "maskInputFn", "text", "actualType", "toLowerCase", "str", "ORIGINAL_ATTRIBUTE_NAME", "is2DCanvasBlank", "canvas", "ctx", "chunkSize", "x", "y", "getImageData", "originalGetImageData", "pixel", "isNodeMetaEqual", "a", "b", "getInputType", "extractFileExtension", "path", "baseURL", "url", "err", "match", "extractOrigin", "origin", "URL_IN_CSS_REF", "URL_PROTOCOL_MATCH", "URL_WWW_MATCH", "DATA_URI", "href", "quote1", "path1", "quote2", "path2", "path3", "filePath", "maybeQuote", "stack", "parts", "part", "STRIPED_PLACEHOLDER_SVG", "MAX_IMAGE_DIMENSION_FOR_RECOMPRESSION", "recompressBase64Image", "img", "dataURL", "quality", "checkDataURLSize", "maxLength"]
|
|
4
|
+
"sourcesContent": ["var EventType = /* @__PURE__ */ ((EventType2) => {\n EventType2[EventType2[\"DomContentLoaded\"] = 0] = \"DomContentLoaded\";\n EventType2[EventType2[\"Load\"] = 1] = \"Load\";\n EventType2[EventType2[\"FullSnapshot\"] = 2] = \"FullSnapshot\";\n EventType2[EventType2[\"IncrementalSnapshot\"] = 3] = \"IncrementalSnapshot\";\n EventType2[EventType2[\"Meta\"] = 4] = \"Meta\";\n EventType2[EventType2[\"Custom\"] = 5] = \"Custom\";\n EventType2[EventType2[\"Plugin\"] = 6] = \"Plugin\";\n return EventType2;\n})(EventType || {});\nvar IncrementalSource = /* @__PURE__ */ ((IncrementalSource2) => {\n IncrementalSource2[IncrementalSource2[\"Mutation\"] = 0] = \"Mutation\";\n IncrementalSource2[IncrementalSource2[\"MouseMove\"] = 1] = \"MouseMove\";\n IncrementalSource2[IncrementalSource2[\"MouseInteraction\"] = 2] = \"MouseInteraction\";\n IncrementalSource2[IncrementalSource2[\"Scroll\"] = 3] = \"Scroll\";\n IncrementalSource2[IncrementalSource2[\"ViewportResize\"] = 4] = \"ViewportResize\";\n IncrementalSource2[IncrementalSource2[\"Input\"] = 5] = \"Input\";\n IncrementalSource2[IncrementalSource2[\"TouchMove\"] = 6] = \"TouchMove\";\n IncrementalSource2[IncrementalSource2[\"MediaInteraction\"] = 7] = \"MediaInteraction\";\n IncrementalSource2[IncrementalSource2[\"StyleSheetRule\"] = 8] = \"StyleSheetRule\";\n IncrementalSource2[IncrementalSource2[\"CanvasMutation\"] = 9] = \"CanvasMutation\";\n IncrementalSource2[IncrementalSource2[\"Font\"] = 10] = \"Font\";\n IncrementalSource2[IncrementalSource2[\"Log\"] = 11] = \"Log\";\n IncrementalSource2[IncrementalSource2[\"Drag\"] = 12] = \"Drag\";\n IncrementalSource2[IncrementalSource2[\"StyleDeclaration\"] = 13] = \"StyleDeclaration\";\n IncrementalSource2[IncrementalSource2[\"Selection\"] = 14] = \"Selection\";\n IncrementalSource2[IncrementalSource2[\"AdoptedStyleSheet\"] = 15] = \"AdoptedStyleSheet\";\n IncrementalSource2[IncrementalSource2[\"CustomElement\"] = 16] = \"CustomElement\";\n return IncrementalSource2;\n})(IncrementalSource || {});\nvar MouseInteractions = /* @__PURE__ */ ((MouseInteractions2) => {\n MouseInteractions2[MouseInteractions2[\"MouseUp\"] = 0] = \"MouseUp\";\n MouseInteractions2[MouseInteractions2[\"MouseDown\"] = 1] = \"MouseDown\";\n MouseInteractions2[MouseInteractions2[\"Click\"] = 2] = \"Click\";\n MouseInteractions2[MouseInteractions2[\"ContextMenu\"] = 3] = \"ContextMenu\";\n MouseInteractions2[MouseInteractions2[\"DblClick\"] = 4] = \"DblClick\";\n MouseInteractions2[MouseInteractions2[\"Focus\"] = 5] = \"Focus\";\n MouseInteractions2[MouseInteractions2[\"Blur\"] = 6] = \"Blur\";\n MouseInteractions2[MouseInteractions2[\"TouchStart\"] = 7] = \"TouchStart\";\n MouseInteractions2[MouseInteractions2[\"TouchMove_Departed\"] = 8] = \"TouchMove_Departed\";\n MouseInteractions2[MouseInteractions2[\"TouchEnd\"] = 9] = \"TouchEnd\";\n MouseInteractions2[MouseInteractions2[\"TouchCancel\"] = 10] = \"TouchCancel\";\n return MouseInteractions2;\n})(MouseInteractions || {});\nvar PointerTypes = /* @__PURE__ */ ((PointerTypes2) => {\n PointerTypes2[PointerTypes2[\"Mouse\"] = 0] = \"Mouse\";\n PointerTypes2[PointerTypes2[\"Pen\"] = 1] = \"Pen\";\n PointerTypes2[PointerTypes2[\"Touch\"] = 2] = \"Touch\";\n return PointerTypes2;\n})(PointerTypes || {});\nvar CanvasContext = /* @__PURE__ */ ((CanvasContext2) => {\n CanvasContext2[CanvasContext2[\"2D\"] = 0] = \"2D\";\n CanvasContext2[CanvasContext2[\"WebGL\"] = 1] = \"WebGL\";\n CanvasContext2[CanvasContext2[\"WebGL2\"] = 2] = \"WebGL2\";\n return CanvasContext2;\n})(CanvasContext || {});\nvar MediaInteractions = /* @__PURE__ */ ((MediaInteractions2) => {\n MediaInteractions2[MediaInteractions2[\"Play\"] = 0] = \"Play\";\n MediaInteractions2[MediaInteractions2[\"Pause\"] = 1] = \"Pause\";\n MediaInteractions2[MediaInteractions2[\"Seeked\"] = 2] = \"Seeked\";\n MediaInteractions2[MediaInteractions2[\"VolumeChange\"] = 3] = \"VolumeChange\";\n MediaInteractions2[MediaInteractions2[\"RateChange\"] = 4] = \"RateChange\";\n return MediaInteractions2;\n})(MediaInteractions || {});\nvar ReplayerEvents = /* @__PURE__ */ ((ReplayerEvents2) => {\n ReplayerEvents2[\"Start\"] = \"start\";\n ReplayerEvents2[\"Pause\"] = \"pause\";\n ReplayerEvents2[\"Resume\"] = \"resume\";\n ReplayerEvents2[\"Resize\"] = \"resize\";\n ReplayerEvents2[\"Finish\"] = \"finish\";\n ReplayerEvents2[\"FullsnapshotRebuilded\"] = \"fullsnapshot-rebuilded\";\n ReplayerEvents2[\"LoadStylesheetStart\"] = \"load-stylesheet-start\";\n ReplayerEvents2[\"LoadStylesheetEnd\"] = \"load-stylesheet-end\";\n ReplayerEvents2[\"SkipStart\"] = \"skip-start\";\n ReplayerEvents2[\"SkipEnd\"] = \"skip-end\";\n ReplayerEvents2[\"MouseInteraction\"] = \"mouse-interaction\";\n ReplayerEvents2[\"EventCast\"] = \"event-cast\";\n ReplayerEvents2[\"CustomEvent\"] = \"custom-event\";\n ReplayerEvents2[\"Flush\"] = \"flush\";\n ReplayerEvents2[\"StateChange\"] = \"state-change\";\n ReplayerEvents2[\"PlayBack\"] = \"play-back\";\n ReplayerEvents2[\"Destroy\"] = \"destroy\";\n return ReplayerEvents2;\n})(ReplayerEvents || {});\nvar NodeType = /* @__PURE__ */ ((NodeType2) => {\n NodeType2[NodeType2[\"Document\"] = 0] = \"Document\";\n NodeType2[NodeType2[\"DocumentType\"] = 1] = \"DocumentType\";\n NodeType2[NodeType2[\"Element\"] = 2] = \"Element\";\n NodeType2[NodeType2[\"Text\"] = 3] = \"Text\";\n NodeType2[NodeType2[\"CDATA\"] = 4] = \"CDATA\";\n NodeType2[NodeType2[\"Comment\"] = 5] = \"Comment\";\n return NodeType2;\n})(NodeType || {});\nexport {\n CanvasContext,\n EventType,\n IncrementalSource,\n MediaInteractions,\n MouseInteractions,\n NodeType,\n PointerTypes,\n ReplayerEvents\n};\n//# sourceMappingURL=rrweb-types.js.map\n", "const testableAccessors = {\n Node: [\"childNodes\", \"parentNode\", \"parentElement\", \"textContent\"],\n ShadowRoot: [\"host\", \"styleSheets\"],\n Element: [\"shadowRoot\", \"querySelector\", \"querySelectorAll\"],\n MutationObserver: []\n};\nconst testableMethods = {\n Node: [\"contains\", \"getRootNode\"],\n ShadowRoot: [\"getSelection\"],\n Element: [],\n MutationObserver: [\"constructor\"]\n};\nconst untaintedBasePrototype = {};\nfunction angularZoneUnpatchedAlternative(key) {\n var _a, _b;\n const angularUnpatchedVersionSymbol = (_b = (_a = globalThis == null ? void 0 : globalThis.Zone) == null ? void 0 : _a.__symbol__) == null ? void 0 : _b.call(_a, key);\n if (angularUnpatchedVersionSymbol && globalThis[angularUnpatchedVersionSymbol]) {\n return globalThis[angularUnpatchedVersionSymbol];\n } else {\n return void 0;\n }\n}\nfunction getUntaintedPrototype(key) {\n if (untaintedBasePrototype[key])\n return untaintedBasePrototype[key];\n const candidate = angularZoneUnpatchedAlternative(key) || globalThis[key];\n const defaultPrototype = candidate.prototype;\n const accessorNames = key in testableAccessors ? testableAccessors[key] : void 0;\n const isUntaintedAccessors = Boolean(\n accessorNames && // @ts-expect-error 2345\n accessorNames.every(\n (accessor) => {\n var _a, _b;\n return Boolean(\n (_b = (_a = Object.getOwnPropertyDescriptor(defaultPrototype, accessor)) == null ? void 0 : _a.get) == null ? void 0 : _b.toString().includes(\"[native code]\")\n );\n }\n )\n );\n const methodNames = key in testableMethods ? testableMethods[key] : void 0;\n const isUntaintedMethods = Boolean(\n methodNames && methodNames.every(\n // @ts-expect-error 2345\n (method) => {\n var _a;\n return typeof defaultPrototype[method] === \"function\" && ((_a = defaultPrototype[method]) == null ? void 0 : _a.toString().includes(\"[native code]\"));\n }\n )\n );\n if (isUntaintedAccessors && isUntaintedMethods) {\n untaintedBasePrototype[key] = candidate.prototype;\n return candidate.prototype;\n }\n try {\n const iframeEl = document.createElement(\"iframe\");\n document.body.appendChild(iframeEl);\n const win = iframeEl.contentWindow;\n if (!win) return candidate.prototype;\n const untaintedObject = win[key].prototype;\n document.body.removeChild(iframeEl);\n if (!untaintedObject) return defaultPrototype;\n return untaintedBasePrototype[key] = untaintedObject;\n } catch {\n return defaultPrototype;\n }\n}\nconst untaintedAccessorCache = {};\nfunction getUntaintedAccessor(key, instance, accessor) {\n var _a;\n const cacheKey = `${key}.${String(accessor)}`;\n if (untaintedAccessorCache[cacheKey])\n return untaintedAccessorCache[cacheKey].call(\n instance\n );\n const untaintedPrototype = getUntaintedPrototype(key);\n const untaintedAccessor = (_a = Object.getOwnPropertyDescriptor(\n untaintedPrototype,\n accessor\n )) == null ? void 0 : _a.get;\n if (!untaintedAccessor) return instance[accessor];\n untaintedAccessorCache[cacheKey] = untaintedAccessor;\n return untaintedAccessor.call(instance);\n}\nconst untaintedMethodCache = {};\nfunction getUntaintedMethod(key, instance, method) {\n const cacheKey = `${key}.${String(method)}`;\n if (untaintedMethodCache[cacheKey])\n return untaintedMethodCache[cacheKey].bind(\n instance\n );\n const untaintedPrototype = getUntaintedPrototype(key);\n const untaintedMethod = untaintedPrototype[method];\n if (typeof untaintedMethod !== \"function\") return instance[method];\n untaintedMethodCache[cacheKey] = untaintedMethod;\n return untaintedMethod.bind(instance);\n}\nfunction childNodes(n) {\n return getUntaintedAccessor(\"Node\", n, \"childNodes\");\n}\nfunction parentNode(n) {\n return getUntaintedAccessor(\"Node\", n, \"parentNode\");\n}\nfunction parentElement(n) {\n return getUntaintedAccessor(\"Node\", n, \"parentElement\");\n}\nfunction textContent(n) {\n return getUntaintedAccessor(\"Node\", n, \"textContent\");\n}\nfunction contains(n, other) {\n return getUntaintedMethod(\"Node\", n, \"contains\")(other);\n}\nfunction getRootNode(n) {\n return getUntaintedMethod(\"Node\", n, \"getRootNode\")();\n}\nfunction host(n) {\n if (!n || !(\"host\" in n)) return null;\n return getUntaintedAccessor(\"ShadowRoot\", n, \"host\");\n}\nfunction styleSheets(n) {\n return n.styleSheets;\n}\nfunction shadowRoot(n) {\n if (!n || !(\"shadowRoot\" in n)) return null;\n return getUntaintedAccessor(\"Element\", n, \"shadowRoot\");\n}\nfunction querySelector(n, selectors) {\n return getUntaintedAccessor(\"Element\", n, \"querySelector\")(selectors);\n}\nfunction querySelectorAll(n, selectors) {\n return getUntaintedAccessor(\"Element\", n, \"querySelectorAll\")(selectors);\n}\nfunction mutationObserverCtor() {\n return getUntaintedPrototype(\"MutationObserver\").constructor;\n}\nfunction patch(source, name, replacement) {\n try {\n if (!(name in source)) {\n return () => {\n };\n }\n const original = source[name];\n const wrapped = replacement(original);\n if (typeof wrapped === \"function\") {\n wrapped.prototype = wrapped.prototype || {};\n Object.defineProperties(wrapped, {\n __rrweb_original__: {\n enumerable: false,\n value: original\n }\n });\n }\n source[name] = wrapped;\n return () => {\n source[name] = original;\n };\n } catch {\n return () => {\n };\n }\n}\nconst index = {\n childNodes,\n parentNode,\n parentElement,\n textContent,\n contains,\n getRootNode,\n host,\n styleSheets,\n shadowRoot,\n querySelector,\n querySelectorAll,\n mutationObserver: mutationObserverCtor,\n patch\n};\nexport {\n childNodes,\n contains,\n index as default,\n getRootNode,\n getUntaintedAccessor,\n getUntaintedMethod,\n getUntaintedPrototype,\n host,\n mutationObserverCtor,\n parentElement,\n parentNode,\n patch,\n querySelector,\n querySelectorAll,\n shadowRoot,\n styleSheets,\n textContent\n};\n//# sourceMappingURL=rrweb-utils.js.map\n", "import type {\n idNodeMap,\n MaskInputFn,\n MaskInputOptions,\n nodeMetaMap,\n} from './types';\n\nimport { NodeType } from '@posthog/rrweb-types';\nimport type {\n IMirror,\n serializedNodeWithId,\n serializedNode,\n documentNode,\n documentTypeNode,\n textNode,\n elementNode,\n} from '@posthog/rrweb-types';\nimport dom from '@posthog/rrweb-utils';\n\nexport function isElement(n: Node): n is Element {\n return n.nodeType === n.ELEMENT_NODE;\n}\n\nexport function isShadowRoot(n: Node): n is ShadowRoot {\n const hostEl: Element | null =\n // anchor and textarea elements also have a `host` property\n // but only shadow roots have a `mode` property\n (n && 'host' in n && 'mode' in n && dom.host(n as ShadowRoot)) || null;\n return Boolean(\n hostEl && 'shadowRoot' in hostEl && dom.shadowRoot(hostEl) === n,\n );\n}\n\n/**\n * To fix the issue https://github.com/rrweb-io/rrweb/issues/933.\n * Some websites use polyfilled shadow dom and this function is used to detect this situation.\n */\nexport function isNativeShadowDom(shadowRoot: ShadowRoot): boolean {\n return Object.prototype.toString.call(shadowRoot) === '[object ShadowRoot]';\n}\n\n/**\n * Browsers sometimes destructively modify the css rules they receive.\n * This function tries to rectify the modifications the browser made to make it more cross platform compatible.\n * @param cssText - output of `CSSStyleRule.cssText`\n * @returns `cssText` with browser inconsistencies fixed.\n */\nfunction fixBrowserCompatibilityIssuesInCSS(cssText: string): string {\n /**\n * Chrome outputs `-webkit-background-clip` as `background-clip` in `CSSStyleRule.cssText`.\n * But then Chrome ignores `background-clip` as css input.\n * Re-introduce `-webkit-background-clip` to fix this issue.\n */\n if (\n cssText.includes(' background-clip: text;') &&\n !cssText.includes(' -webkit-background-clip: text;')\n ) {\n cssText = cssText.replace(\n /\\sbackground-clip:\\s*text;/g,\n ' -webkit-background-clip: text; background-clip: text;',\n );\n }\n return cssText;\n}\n\n// Remove this declaration once typescript has added `CSSImportRule.supportsText` to the lib.\ndeclare interface CSSImportRule extends CSSRule {\n readonly href: string;\n readonly layerName: string | null;\n readonly media: MediaList;\n readonly styleSheet: CSSStyleSheet;\n /**\n * experimental API, currently only supported in firefox\n * https://developer.mozilla.org/en-US/docs/Web/API/CSSImportRule/supportsText\n */\n readonly supportsText?: string | null;\n}\n\n/**\n * Browsers sometimes incorrectly escape `@import` on `.cssText` statements.\n * This function tries to correct the escaping.\n * more info: https://bugs.chromium.org/p/chromium/issues/detail?id=1472259\n * @param cssImportRule\n * @returns `cssText` with browser inconsistencies fixed, or null if not applicable.\n */\nexport function escapeImportStatement(rule: CSSImportRule): string {\n const { cssText } = rule;\n if (cssText.split('\"').length < 3) return cssText;\n\n const statement = ['@import', `url(${JSON.stringify(rule.href)})`];\n if (rule.layerName === '') {\n statement.push(`layer`);\n } else if (rule.layerName) {\n statement.push(`layer(${rule.layerName})`);\n }\n if (rule.supportsText) {\n statement.push(`supports(${rule.supportsText})`);\n }\n if (rule.media.length) {\n statement.push(rule.media.mediaText);\n }\n return statement.join(' ') + ';';\n}\n\nexport function stringifyStylesheet(s: CSSStyleSheet): string | null {\n try {\n const rules = s.rules || s.cssRules;\n if (!rules) {\n return null;\n }\n let sheetHref = s.href;\n if (!sheetHref && s.ownerNode) {\n // an inline <style> element\n sheetHref = s.ownerNode.baseURI;\n }\n const stringifiedRules = Array.from(rules, (rule: CSSRule) =>\n stringifyRule(rule, sheetHref),\n ).join('');\n return fixBrowserCompatibilityIssuesInCSS(stringifiedRules);\n } catch (error) {\n return null;\n }\n}\n\nexport function stringifyRule(rule: CSSRule, sheetHref: string | null): string {\n if (isCSSImportRule(rule)) {\n let importStringified;\n try {\n importStringified =\n // for same-origin stylesheets,\n // we can access the imported stylesheet rules directly\n stringifyStylesheet(rule.styleSheet) ||\n // work around browser issues with the raw string `@import url(...)` statement\n escapeImportStatement(rule);\n } catch (error) {\n importStringified = rule.cssText;\n }\n // if importStringified is not null,\n // there should be a stylesheet and a rule here,\n // but we avoid errors in this method by checking for null\n // see https://github.com/rrweb-io/rrweb/pull/1686\n try {\n if (importStringified && rule.styleSheet?.href) {\n // url()s within the imported stylesheet are relative to _that_ sheet's href\n return absolutifyURLs(importStringified, rule.styleSheet.href);\n }\n } catch {\n // swallow this, we'll return null\n }\n return importStringified;\n } else {\n let ruleStringified = rule.cssText;\n if (isCSSStyleRule(rule) && rule.selectorText.includes(':')) {\n // Safari does not escape selectors with : properly\n // see https://bugs.webkit.org/show_bug.cgi?id=184604\n ruleStringified = fixSafariColons(ruleStringified);\n }\n if (sheetHref) {\n return absolutifyURLs(ruleStringified, sheetHref);\n }\n return ruleStringified;\n }\n}\n\nexport function fixSafariColons(cssStringified: string): string {\n // Replace e.g. [aa:bb] with [aa\\\\:bb]\n const regex = /(\\[(?:[\\w-]+)[^\\\\])(:(?:[\\w-]+)\\])/gm;\n return cssStringified.replace(regex, '$1\\\\$2');\n}\n\nexport function isCSSImportRule(rule: CSSRule): rule is CSSImportRule {\n return 'styleSheet' in rule;\n}\n\nexport function isCSSStyleRule(rule: CSSRule): rule is CSSStyleRule {\n return 'selectorText' in rule;\n}\n\nexport class Mirror implements IMirror<Node> {\n private idNodeMap: idNodeMap = new Map();\n private nodeMetaMap: nodeMetaMap = new WeakMap();\n\n getId(n: Node | undefined | null): number {\n if (!n) return -1;\n\n const id = this.getMeta(n)?.id;\n\n // if n is not a serialized Node, use -1 as its id.\n return id ?? -1;\n }\n\n getNode(id: number): Node | null {\n return this.idNodeMap.get(id) || null;\n }\n\n getIds(): number[] {\n return Array.from(this.idNodeMap.keys());\n }\n\n getMeta(n: Node): serializedNodeWithId | null {\n return this.nodeMetaMap.get(n) || null;\n }\n\n // removes the node from idNodeMap\n // doesn't remove the node from nodeMetaMap\n removeNodeFromMap(n: Node) {\n const id = this.getId(n);\n this.idNodeMap.delete(id);\n\n if (n.childNodes) {\n n.childNodes.forEach((childNode) =>\n this.removeNodeFromMap(childNode as unknown as Node),\n );\n }\n\n if (isElement(n)) {\n const shadowRootEl = dom.shadowRoot(n);\n if (shadowRootEl) {\n this.removeNodeFromMap(shadowRootEl as unknown as Node);\n }\n\n if (n.nodeName === 'IFRAME' && (n as HTMLIFrameElement).contentDocument) {\n this.removeNodeFromMap(\n (n as HTMLIFrameElement).contentDocument as unknown as Node,\n );\n }\n }\n }\n has(id: number): boolean {\n return this.idNodeMap.has(id);\n }\n\n hasNode(node: Node): boolean {\n return this.nodeMetaMap.has(node);\n }\n\n add(n: Node, meta: serializedNodeWithId) {\n const id = meta.id;\n this.idNodeMap.set(id, n);\n this.nodeMetaMap.set(n, meta);\n }\n\n replace(id: number, n: Node) {\n const oldNode = this.getNode(id);\n if (oldNode) {\n const meta = this.nodeMetaMap.get(oldNode);\n if (meta) this.nodeMetaMap.set(n, meta);\n }\n this.idNodeMap.set(id, n);\n }\n\n reset() {\n this.idNodeMap = new Map();\n this.nodeMetaMap = new WeakMap();\n }\n}\n\nexport function createMirror(): Mirror {\n return new Mirror();\n}\n\nexport function maskInputValue({\n element,\n maskInputOptions,\n tagName,\n type,\n value,\n maskInputFn,\n}: {\n element: HTMLElement;\n maskInputOptions: MaskInputOptions;\n tagName: string;\n type: string | null;\n value: string | null;\n maskInputFn?: MaskInputFn;\n}): string {\n let text = value || '';\n const actualType = type && toLowerCase(type);\n\n if (\n maskInputOptions[tagName.toLowerCase() as keyof MaskInputOptions] ||\n (actualType && maskInputOptions[actualType as keyof MaskInputOptions])\n ) {\n if (maskInputFn) {\n text = maskInputFn(text, element);\n } else {\n text = '*'.repeat(text.length);\n }\n }\n return text;\n}\n\nexport function toLowerCase<T extends string>(str: T): Lowercase<T> {\n return str.toLowerCase() as unknown as Lowercase<T>;\n}\n\nconst ORIGINAL_ATTRIBUTE_NAME = '__rrweb_original__';\ntype PatchedGetImageData = {\n [ORIGINAL_ATTRIBUTE_NAME]: CanvasImageData['getImageData'];\n} & CanvasImageData['getImageData'];\n\nexport function is2DCanvasBlank(canvas: HTMLCanvasElement): boolean {\n const ctx = canvas.getContext('2d');\n if (!ctx) return true;\n\n const chunkSize = 50;\n\n // get chunks of the canvas and check if it is blank\n for (let x = 0; x < canvas.width; x += chunkSize) {\n for (let y = 0; y < canvas.height; y += chunkSize) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const getImageData = ctx.getImageData as PatchedGetImageData;\n const originalGetImageData =\n ORIGINAL_ATTRIBUTE_NAME in getImageData\n ? getImageData[ORIGINAL_ATTRIBUTE_NAME]\n : getImageData;\n // by getting the canvas in chunks we avoid an expensive\n // `getImageData` call that retrieves everything\n // even if we can already tell from the first chunk(s) that\n // the canvas isn't blank\n const pixelBuffer = new Uint32Array(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access\n originalGetImageData.call(\n ctx,\n x,\n y,\n Math.min(chunkSize, canvas.width - x),\n Math.min(chunkSize, canvas.height - y),\n ).data.buffer,\n );\n if (pixelBuffer.some((pixel) => pixel !== 0)) return false;\n }\n }\n return true;\n}\n\nexport function isNodeMetaEqual(a: serializedNode, b: serializedNode): boolean {\n if (!a || !b || a.type !== b.type) return false;\n if (a.type === NodeType.Document)\n return a.compatMode === (b as documentNode).compatMode;\n else if (a.type === NodeType.DocumentType)\n return (\n a.name === (b as documentTypeNode).name &&\n a.publicId === (b as documentTypeNode).publicId &&\n a.systemId === (b as documentTypeNode).systemId\n );\n else if (\n a.type === NodeType.Comment ||\n a.type === NodeType.Text ||\n a.type === NodeType.CDATA\n )\n return a.textContent === (b as textNode).textContent;\n else if (a.type === NodeType.Element)\n return (\n a.tagName === (b as elementNode).tagName &&\n JSON.stringify(a.attributes) ===\n JSON.stringify((b as elementNode).attributes) &&\n a.isSVG === (b as elementNode).isSVG &&\n a.needBlock === (b as elementNode).needBlock\n );\n return false;\n}\n\n/**\n * Get the type of an input element.\n * This takes care of the case where a password input is changed to a text input.\n * In this case, we continue to consider this of type password, in order to avoid leaking sensitive data\n * where passwords should be masked.\n */\nexport function getInputType(element: HTMLElement): Lowercase<string> | null {\n // when omitting the type of input element(e.g. <input />), the type is treated as text\n const type = (element as HTMLInputElement).type;\n\n return element.hasAttribute('data-rr-is-password')\n ? 'password'\n : type\n ? // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n toLowerCase(type)\n : null;\n}\n\n/**\n * Extracts the file extension from an a path, considering search parameters and fragments.\n * @param path - Path to file\n * @param baseURL - [optional] Base URL of the page, used to resolve relative paths. Defaults to current page URL.\n */\nexport function extractFileExtension(\n path: string,\n baseURL?: string,\n): string | null {\n let url;\n try {\n url = new URL(path, baseURL ?? window.location.href);\n } catch (err) {\n return null;\n }\n const regex = /\\.([0-9a-z]+)(?:$)/i;\n const match = url.pathname.match(regex);\n return match?.[1] ?? null;\n}\n\nfunction extractOrigin(url: string): string {\n let origin = '';\n if (url.indexOf('//') > -1) {\n origin = url.split('/').slice(0, 3).join('/');\n } else {\n origin = url.split('/')[0];\n }\n origin = origin.split('?')[0];\n return origin;\n}\n\nconst URL_IN_CSS_REF = /url\\((?:(')([^']*)'|(\")(.*?)\"|([^)]*))\\)/gm;\nconst URL_PROTOCOL_MATCH = /^(?:[a-z+]+:)?\\/\\//i;\nconst URL_WWW_MATCH = /^www\\..*/i;\nconst DATA_URI = /^(data:)([^,]*),(.*)/i;\nexport function absolutifyURLs(cssText: string | null, href: string): string {\n return (cssText || '').replace(\n URL_IN_CSS_REF,\n (\n origin: string,\n quote1: string,\n path1: string,\n quote2: string,\n path2: string,\n path3: string,\n ) => {\n const filePath = path1 || path2 || path3;\n const maybeQuote = quote1 || quote2 || '';\n if (!filePath) {\n return origin;\n }\n if (URL_PROTOCOL_MATCH.test(filePath) || URL_WWW_MATCH.test(filePath)) {\n return `url(${maybeQuote}${filePath}${maybeQuote})`;\n }\n if (DATA_URI.test(filePath)) {\n return `url(${maybeQuote}${filePath}${maybeQuote})`;\n }\n if (filePath[0] === '/') {\n return `url(${maybeQuote}${\n extractOrigin(href) + filePath\n }${maybeQuote})`;\n }\n const stack = href.split('/');\n const parts = filePath.split('/');\n stack.pop();\n for (const part of parts) {\n if (part === '.') {\n continue;\n } else if (part === '..') {\n stack.pop();\n } else {\n stack.push(part);\n }\n }\n return `url(${maybeQuote}${stack.join('/')}${maybeQuote})`;\n },\n );\n}\n\nconst STRIPED_PLACEHOLDER_SVG =\n 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==';\n\nconst MAX_IMAGE_DIMENSION_FOR_RECOMPRESSION = 4096;\n\nexport function recompressBase64Image(\n img: HTMLImageElement,\n dataURL: string,\n type?: string,\n quality?: number,\n): string {\n if (!img.complete || img.naturalWidth === 0) {\n return dataURL;\n }\n\n // don't recompress very large images to avoid performance issues\n if (\n img.naturalWidth > MAX_IMAGE_DIMENSION_FOR_RECOMPRESSION ||\n img.naturalHeight > MAX_IMAGE_DIMENSION_FOR_RECOMPRESSION\n ) {\n return dataURL;\n }\n\n try {\n const canvas = document.createElement('canvas');\n canvas.width = img.naturalWidth;\n canvas.height = img.naturalHeight;\n const ctx = canvas.getContext('2d');\n\n if (!ctx) {\n return dataURL;\n }\n\n ctx.drawImage(img, 0, 0);\n const recompressed = canvas.toDataURL(type || 'image/webp', quality ?? 0.4);\n\n return recompressed;\n } catch (err) {\n return dataURL;\n }\n}\n\nexport function checkDataURLSize(\n dataURL: string,\n maxLength: number | undefined,\n): string {\n if (!maxLength || dataURL.length <= maxLength) {\n return dataURL;\n }\n\n return STRIPED_PLACEHOLDER_SVG;\n}\n", "export enum NodeType {\n Document,\n DocumentType,\n Element,\n Text,\n CDATA,\n Comment,\n}\n\nexport type documentNode = {\n type: NodeType.Document;\n childNodes: serializedNodeWithId[];\n compatMode?: string;\n};\n\nexport type documentTypeNode = {\n type: NodeType.DocumentType;\n name: string;\n publicId: string;\n systemId: string;\n};\n\nexport type attributes = {\n [key: string]: string | number | true | null;\n};\nexport type legacyAttributes = {\n /**\n * @deprecated old bug in rrweb was causing these to always be set\n * @see https://github.com/rrweb-io/rrweb/pull/651\n */\n selected: false;\n};\n\nexport type elementNode = {\n type: NodeType.Element;\n tagName: string;\n attributes: attributes;\n childNodes: serializedNodeWithId[];\n isSVG?: true;\n needBlock?: boolean;\n // This is a custom element or not.\n isCustom?: true;\n};\n\nexport type textNode = {\n type: NodeType.Text;\n textContent: string;\n isStyle?: true;\n};\n\nexport type cdataNode = {\n type: NodeType.CDATA;\n textContent: '';\n};\n\nexport type commentNode = {\n type: NodeType.Comment;\n textContent: string;\n};\n\nexport type serializedNode = (\n | documentNode\n | documentTypeNode\n | elementNode\n | textNode\n | cdataNode\n | commentNode\n) & {\n rootId?: number;\n isShadowHost?: boolean;\n isShadow?: boolean;\n};\n\nimport type { serializedNodeWithId } from '@posthog/rrweb-types';\n\nexport type serializedElementNodeWithId = Extract<\n serializedNodeWithId,\n Record<'type', NodeType.Element>\n>;\n\nexport type tagMap = {\n [key: string]: string;\n};\n\nexport type DialogAttributes = {\n open: string;\n /**\n * Represents the dialog's open mode.\n * `modal` means the dialog is opened with `showModal()`.\n * `non-modal` means the dialog is opened with `show()` or\n * by adding an `open` attribute.\n */\n rr_open_mode: 'modal' | 'non-modal';\n /**\n * Currently unimplemented, but in future can be used to:\n * Represents the order of which of the dialog was opened.\n * This is useful for replaying the dialog `.showModal()` in the correct order.\n */\n // rr_open_mode_index?: number;\n};\n\nexport interface ICanvas extends HTMLCanvasElement {\n __context: string;\n}\n\nexport type idNodeMap = Map<number, Node>;\n\nexport type nodeMetaMap = WeakMap<Node, serializedNodeWithId>;\n\nexport type MaskInputOptions = Partial<{\n color: boolean;\n date: boolean;\n 'datetime-local': boolean;\n email: boolean;\n month: boolean;\n number: boolean;\n range: boolean;\n search: boolean;\n tel: boolean;\n text: boolean;\n time: boolean;\n url: boolean;\n week: boolean;\n // unify textarea and select element with text input\n textarea: boolean;\n select: boolean;\n password: boolean;\n}>;\n\nexport type SlimDOMOptions = Partial<{\n script: boolean;\n comment: boolean;\n headFavicon: boolean;\n headWhitespace: boolean;\n headMetaDescKeywords: boolean;\n headMetaSocial: boolean;\n headMetaRobots: boolean;\n headMetaHttpEquiv: boolean;\n headMetaAuthorship: boolean;\n headMetaVerification: boolean;\n /**\n * blocks title tag 'animations' which can generate a lot of mutations that aren't usually displayed in replayers\n **/\n headTitleMutations: boolean;\n}>;\n\nexport type MaskTextFn = (text: string, element: HTMLElement | null) => string;\nexport type MaskInputFn = (text: string, element: HTMLElement) => string;\n\nexport type KeepIframeSrcFn = (src: string) => boolean;\n\nexport type BuildCache = {\n stylesWithHoverClass: Map<string, string>;\n};\n"],
|
|
5
|
+
"mappings": ";yKAoFIA,GAA6BC,IAC/BA,EAAUA,EAAU,SAAc,CAAC,EAAI,WACvCA,EAAUA,EAAU,aAAkB,CAAC,EAAI,eAC3CA,EAAUA,EAAU,QAAa,CAAC,EAAI,UACtCA,EAAUA,EAAU,KAAU,CAAC,EAAI,OACnCA,EAAUA,EAAU,MAAW,CAAC,EAAI,QACpCA,EAAUA,EAAU,QAAa,CAAC,EAAI,UAC/BA,IACND,GAAY,CAAA,CAAE,EC5FXE,EAAoB,CACxB,KAAM,CAAC,aAAc,aAAc,gBAAiB,aAAa,EACjE,WAAY,CAAC,OAAQ,aAAa,EAClC,QAAS,CAAC,aAAc,gBAAiB,kBAAkB,EAC3D,iBAAkB,CAAA,CACpB,EACMC,EAAkB,CACtB,KAAM,CAAC,WAAY,aAAa,EAChC,WAAY,CAAC,cAAc,EAC3B,QAAS,CAAA,EACT,iBAAkB,CAAC,aAAa,CAClC,EACMC,EAAyB,CAAA,EAC/B,SAASC,EAAgCC,EAAK,CAC5C,IAAIC,EAAIC,EACR,IAAMC,GAAiCD,GAAMD,EAAK,YAAc,KAAO,OAAS,WAAW,OAAS,KAAO,OAASA,EAAG,aAAe,KAAO,OAASC,EAAG,KAAKD,EAAID,CAAG,EACrK,GAAIG,GAAiC,WAA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,EAAQR,EAAK,MAAM,GAAG,EACtBS,EAAQH,EAAS,MAAM,GAAG,EAChCE,EAAM,IAAA,EACN,QAAWE,KAAQD,EACbC,IAAS,MAEFA,IAAS,KAClBF,EAAM,IAAA,EAENA,EAAM,KAAKE,CAAI,GAGnB,MAAO,OAAOH,CAAU,GAAGC,EAAM,KAAK,GAAG,CAAC,GAAGD,CAAU,GACzD,CAAA,CAEJ,CAEA,IAAMI,GACJ,qjBAEIC,EAAwC,KAEvC,SAASC,GACdC,EACAC,EACAhD,EACAiD,EACQ,CAMR,GALI,CAACF,EAAI,UAAYA,EAAI,eAAiB,GAMxCA,EAAI,aAAeF,GACnBE,EAAI,cAAgBF,EAEpB,OAAOG,EAGT,GAAI,CACF,IAAMvC,EAAS,SAAS,cAAc,QAAQ,EAC9CA,EAAO,MAAQsC,EAAI,aACnBtC,EAAO,OAASsC,EAAI,cACpB,IAAMrC,EAAMD,EAAO,WAAW,IAAI,EAElC,OAAKC,GAILA,EAAI,UAAUqC,EAAK,EAAG,CAAC,EACFtC,EAAO,UAAUT,GAAQ,aAAciD,GAAA,KAAAA,EAAW,EAAG,GAJjED,CAOX,OAASvB,EAAK,CACZ,OAAOuB,CACT,CACF,CAEO,SAASE,GACdF,EACAG,EACQ,CACR,MAAI,CAACA,GAAaH,EAAQ,QAAUG,EAC3BH,EAGFJ,EACT,CC/fO,IAAKxI,GAAAA,IACVA,EAAAA,EAAA,SAAA,CAAA,EAAA,WACAA,EAAAA,EAAA,aAAA,CAAA,EAAA,eACAA,EAAAA,EAAA,QAAA,CAAA,EAAA,UACAA,EAAAA,EAAA,KAAA,CAAA,EAAA,OACAA,EAAAA,EAAA,MAAA,CAAA,EAAA,QACAA,EAAAA,EAAA,QAAA,CAAA,EAAA,UANUA,IAAAA,GAAA,CAAA,CAAA",
|
|
6
|
+
"names": ["NodeType", "NodeType2", "testableAccessors", "testableMethods", "untaintedBasePrototype", "angularZoneUnpatchedAlternative", "key", "_a", "_b", "angularUnpatchedVersionSymbol", "getUntaintedPrototype", "candidate", "defaultPrototype", "accessorNames", "isUntaintedAccessors", "accessor", "methodNames", "isUntaintedMethods", "method", "iframeEl", "win", "untaintedObject", "e", "untaintedAccessorCache", "getUntaintedAccessor", "instance", "cacheKey", "untaintedPrototype", "untaintedAccessor", "untaintedMethodCache", "getUntaintedMethod", "untaintedMethod", "childNodes", "n", "parentNode", "parentElement", "textContent", "contains", "other", "getRootNode", "host", "styleSheets", "shadowRoot", "querySelector", "selectors", "querySelectorAll", "mutationObserverCtor", "patch", "source", "name", "replacement", "original", "wrapped", "index", "isElement", "isShadowRoot", "hostEl", "dom", "isNativeShadowDom", "fixBrowserCompatibilityIssuesInCSS", "cssText", "escapeImportStatement", "rule", "statement", "stringifyStylesheet", "s", "rules", "sheetHref", "stringifiedRules", "stringifyRule", "error", "isCSSImportRule", "importStringified", "absolutifyURLs", "ruleStringified", "isCSSStyleRule", "fixSafariColons", "cssStringified", "regex", "Mirror", "__publicField", "id", "childNode", "shadowRootEl", "node", "meta", "oldNode", "createMirror", "maskInputValue", "element", "maskInputOptions", "tagName", "type", "value", "maskInputFn", "text", "actualType", "toLowerCase", "str", "ORIGINAL_ATTRIBUTE_NAME", "is2DCanvasBlank", "canvas", "ctx", "chunkSize", "x", "y", "getImageData", "originalGetImageData", "pixel", "isNodeMetaEqual", "a", "b", "getInputType", "extractFileExtension", "path", "baseURL", "url", "err", "match", "extractOrigin", "origin", "URL_IN_CSS_REF", "URL_PROTOCOL_MATCH", "URL_WWW_MATCH", "DATA_URI", "href", "quote1", "path1", "quote2", "path2", "path3", "filePath", "maybeQuote", "stack", "parts", "part", "STRIPED_PLACEHOLDER_SVG", "MAX_IMAGE_DIMENSION_FOR_RECOMPRESSION", "recompressBase64Image", "img", "dataURL", "quality", "checkDataURLSize", "maxLength"]
|
|
7
7
|
}
|
|
@@ -316,6 +316,17 @@ class Mirror {
|
|
|
316
316
|
(childNode) => this.removeNodeFromMap(childNode)
|
|
317
317
|
);
|
|
318
318
|
}
|
|
319
|
+
if (isElement(n)) {
|
|
320
|
+
const shadowRootEl = index.shadowRoot(n);
|
|
321
|
+
if (shadowRootEl) {
|
|
322
|
+
this.removeNodeFromMap(shadowRootEl);
|
|
323
|
+
}
|
|
324
|
+
if (n.nodeName === "IFRAME" && n.contentDocument) {
|
|
325
|
+
this.removeNodeFromMap(
|
|
326
|
+
n.contentDocument
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
319
330
|
}
|
|
320
331
|
has(id) {
|
|
321
332
|
return this.idNodeMap.has(id);
|
|
@@ -532,4 +543,4 @@ export {
|
|
|
532
543
|
toLowerCase as t,
|
|
533
544
|
index as u
|
|
534
545
|
};
|
|
535
|
-
//# sourceMappingURL=types-
|
|
546
|
+
//# sourceMappingURL=types-OLXvwyjP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-OLXvwyjP.js","sources":["../../types/dist/rrweb-types.js","../../utils/dist/rrweb-utils.js","../src/utils.ts","../src/types.ts"],"sourcesContent":["var EventType = /* @__PURE__ */ ((EventType2) => {\n EventType2[EventType2[\"DomContentLoaded\"] = 0] = \"DomContentLoaded\";\n EventType2[EventType2[\"Load\"] = 1] = \"Load\";\n EventType2[EventType2[\"FullSnapshot\"] = 2] = \"FullSnapshot\";\n EventType2[EventType2[\"IncrementalSnapshot\"] = 3] = \"IncrementalSnapshot\";\n EventType2[EventType2[\"Meta\"] = 4] = \"Meta\";\n EventType2[EventType2[\"Custom\"] = 5] = \"Custom\";\n EventType2[EventType2[\"Plugin\"] = 6] = \"Plugin\";\n return EventType2;\n})(EventType || {});\nvar IncrementalSource = /* @__PURE__ */ ((IncrementalSource2) => {\n IncrementalSource2[IncrementalSource2[\"Mutation\"] = 0] = \"Mutation\";\n IncrementalSource2[IncrementalSource2[\"MouseMove\"] = 1] = \"MouseMove\";\n IncrementalSource2[IncrementalSource2[\"MouseInteraction\"] = 2] = \"MouseInteraction\";\n IncrementalSource2[IncrementalSource2[\"Scroll\"] = 3] = \"Scroll\";\n IncrementalSource2[IncrementalSource2[\"ViewportResize\"] = 4] = \"ViewportResize\";\n IncrementalSource2[IncrementalSource2[\"Input\"] = 5] = \"Input\";\n IncrementalSource2[IncrementalSource2[\"TouchMove\"] = 6] = \"TouchMove\";\n IncrementalSource2[IncrementalSource2[\"MediaInteraction\"] = 7] = \"MediaInteraction\";\n IncrementalSource2[IncrementalSource2[\"StyleSheetRule\"] = 8] = \"StyleSheetRule\";\n IncrementalSource2[IncrementalSource2[\"CanvasMutation\"] = 9] = \"CanvasMutation\";\n IncrementalSource2[IncrementalSource2[\"Font\"] = 10] = \"Font\";\n IncrementalSource2[IncrementalSource2[\"Log\"] = 11] = \"Log\";\n IncrementalSource2[IncrementalSource2[\"Drag\"] = 12] = \"Drag\";\n IncrementalSource2[IncrementalSource2[\"StyleDeclaration\"] = 13] = \"StyleDeclaration\";\n IncrementalSource2[IncrementalSource2[\"Selection\"] = 14] = \"Selection\";\n IncrementalSource2[IncrementalSource2[\"AdoptedStyleSheet\"] = 15] = \"AdoptedStyleSheet\";\n IncrementalSource2[IncrementalSource2[\"CustomElement\"] = 16] = \"CustomElement\";\n return IncrementalSource2;\n})(IncrementalSource || {});\nvar MouseInteractions = /* @__PURE__ */ ((MouseInteractions2) => {\n MouseInteractions2[MouseInteractions2[\"MouseUp\"] = 0] = \"MouseUp\";\n MouseInteractions2[MouseInteractions2[\"MouseDown\"] = 1] = \"MouseDown\";\n MouseInteractions2[MouseInteractions2[\"Click\"] = 2] = \"Click\";\n MouseInteractions2[MouseInteractions2[\"ContextMenu\"] = 3] = \"ContextMenu\";\n MouseInteractions2[MouseInteractions2[\"DblClick\"] = 4] = \"DblClick\";\n MouseInteractions2[MouseInteractions2[\"Focus\"] = 5] = \"Focus\";\n MouseInteractions2[MouseInteractions2[\"Blur\"] = 6] = \"Blur\";\n MouseInteractions2[MouseInteractions2[\"TouchStart\"] = 7] = \"TouchStart\";\n MouseInteractions2[MouseInteractions2[\"TouchMove_Departed\"] = 8] = \"TouchMove_Departed\";\n MouseInteractions2[MouseInteractions2[\"TouchEnd\"] = 9] = \"TouchEnd\";\n MouseInteractions2[MouseInteractions2[\"TouchCancel\"] = 10] = \"TouchCancel\";\n return MouseInteractions2;\n})(MouseInteractions || {});\nvar PointerTypes = /* @__PURE__ */ ((PointerTypes2) => {\n PointerTypes2[PointerTypes2[\"Mouse\"] = 0] = \"Mouse\";\n PointerTypes2[PointerTypes2[\"Pen\"] = 1] = \"Pen\";\n PointerTypes2[PointerTypes2[\"Touch\"] = 2] = \"Touch\";\n return PointerTypes2;\n})(PointerTypes || {});\nvar CanvasContext = /* @__PURE__ */ ((CanvasContext2) => {\n CanvasContext2[CanvasContext2[\"2D\"] = 0] = \"2D\";\n CanvasContext2[CanvasContext2[\"WebGL\"] = 1] = \"WebGL\";\n CanvasContext2[CanvasContext2[\"WebGL2\"] = 2] = \"WebGL2\";\n return CanvasContext2;\n})(CanvasContext || {});\nvar MediaInteractions = /* @__PURE__ */ ((MediaInteractions2) => {\n MediaInteractions2[MediaInteractions2[\"Play\"] = 0] = \"Play\";\n MediaInteractions2[MediaInteractions2[\"Pause\"] = 1] = \"Pause\";\n MediaInteractions2[MediaInteractions2[\"Seeked\"] = 2] = \"Seeked\";\n MediaInteractions2[MediaInteractions2[\"VolumeChange\"] = 3] = \"VolumeChange\";\n MediaInteractions2[MediaInteractions2[\"RateChange\"] = 4] = \"RateChange\";\n return MediaInteractions2;\n})(MediaInteractions || {});\nvar ReplayerEvents = /* @__PURE__ */ ((ReplayerEvents2) => {\n ReplayerEvents2[\"Start\"] = \"start\";\n ReplayerEvents2[\"Pause\"] = \"pause\";\n ReplayerEvents2[\"Resume\"] = \"resume\";\n ReplayerEvents2[\"Resize\"] = \"resize\";\n ReplayerEvents2[\"Finish\"] = \"finish\";\n ReplayerEvents2[\"FullsnapshotRebuilded\"] = \"fullsnapshot-rebuilded\";\n ReplayerEvents2[\"LoadStylesheetStart\"] = \"load-stylesheet-start\";\n ReplayerEvents2[\"LoadStylesheetEnd\"] = \"load-stylesheet-end\";\n ReplayerEvents2[\"SkipStart\"] = \"skip-start\";\n ReplayerEvents2[\"SkipEnd\"] = \"skip-end\";\n ReplayerEvents2[\"MouseInteraction\"] = \"mouse-interaction\";\n ReplayerEvents2[\"EventCast\"] = \"event-cast\";\n ReplayerEvents2[\"CustomEvent\"] = \"custom-event\";\n ReplayerEvents2[\"Flush\"] = \"flush\";\n ReplayerEvents2[\"StateChange\"] = \"state-change\";\n ReplayerEvents2[\"PlayBack\"] = \"play-back\";\n ReplayerEvents2[\"Destroy\"] = \"destroy\";\n return ReplayerEvents2;\n})(ReplayerEvents || {});\nvar NodeType = /* @__PURE__ */ ((NodeType2) => {\n NodeType2[NodeType2[\"Document\"] = 0] = \"Document\";\n NodeType2[NodeType2[\"DocumentType\"] = 1] = \"DocumentType\";\n NodeType2[NodeType2[\"Element\"] = 2] = \"Element\";\n NodeType2[NodeType2[\"Text\"] = 3] = \"Text\";\n NodeType2[NodeType2[\"CDATA\"] = 4] = \"CDATA\";\n NodeType2[NodeType2[\"Comment\"] = 5] = \"Comment\";\n return NodeType2;\n})(NodeType || {});\nexport {\n CanvasContext,\n EventType,\n IncrementalSource,\n MediaInteractions,\n MouseInteractions,\n NodeType,\n PointerTypes,\n ReplayerEvents\n};\n//# sourceMappingURL=rrweb-types.js.map\n","const testableAccessors = {\n Node: [\"childNodes\", \"parentNode\", \"parentElement\", \"textContent\"],\n ShadowRoot: [\"host\", \"styleSheets\"],\n Element: [\"shadowRoot\", \"querySelector\", \"querySelectorAll\"],\n MutationObserver: []\n};\nconst testableMethods = {\n Node: [\"contains\", \"getRootNode\"],\n ShadowRoot: [\"getSelection\"],\n Element: [],\n MutationObserver: [\"constructor\"]\n};\nconst untaintedBasePrototype = {};\nfunction angularZoneUnpatchedAlternative(key) {\n var _a, _b;\n const angularUnpatchedVersionSymbol = (_b = (_a = globalThis == null ? void 0 : globalThis.Zone) == null ? void 0 : _a.__symbol__) == null ? void 0 : _b.call(_a, key);\n if (angularUnpatchedVersionSymbol && globalThis[angularUnpatchedVersionSymbol]) {\n return globalThis[angularUnpatchedVersionSymbol];\n } else {\n return void 0;\n }\n}\nfunction getUntaintedPrototype(key) {\n if (untaintedBasePrototype[key])\n return untaintedBasePrototype[key];\n const candidate = angularZoneUnpatchedAlternative(key) || globalThis[key];\n const defaultPrototype = candidate.prototype;\n const accessorNames = key in testableAccessors ? testableAccessors[key] : void 0;\n const isUntaintedAccessors = Boolean(\n accessorNames && // @ts-expect-error 2345\n accessorNames.every(\n (accessor) => {\n var _a, _b;\n return Boolean(\n (_b = (_a = Object.getOwnPropertyDescriptor(defaultPrototype, accessor)) == null ? void 0 : _a.get) == null ? void 0 : _b.toString().includes(\"[native code]\")\n );\n }\n )\n );\n const methodNames = key in testableMethods ? testableMethods[key] : void 0;\n const isUntaintedMethods = Boolean(\n methodNames && methodNames.every(\n // @ts-expect-error 2345\n (method) => {\n var _a;\n return typeof defaultPrototype[method] === \"function\" && ((_a = defaultPrototype[method]) == null ? void 0 : _a.toString().includes(\"[native code]\"));\n }\n )\n );\n if (isUntaintedAccessors && isUntaintedMethods) {\n untaintedBasePrototype[key] = candidate.prototype;\n return candidate.prototype;\n }\n try {\n const iframeEl = document.createElement(\"iframe\");\n document.body.appendChild(iframeEl);\n const win = iframeEl.contentWindow;\n if (!win) return candidate.prototype;\n const untaintedObject = win[key].prototype;\n document.body.removeChild(iframeEl);\n if (!untaintedObject) return defaultPrototype;\n return untaintedBasePrototype[key] = untaintedObject;\n } catch {\n return defaultPrototype;\n }\n}\nconst untaintedAccessorCache = {};\nfunction getUntaintedAccessor(key, instance, accessor) {\n var _a;\n const cacheKey = `${key}.${String(accessor)}`;\n if (untaintedAccessorCache[cacheKey])\n return untaintedAccessorCache[cacheKey].call(\n instance\n );\n const untaintedPrototype = getUntaintedPrototype(key);\n const untaintedAccessor = (_a = Object.getOwnPropertyDescriptor(\n untaintedPrototype,\n accessor\n )) == null ? void 0 : _a.get;\n if (!untaintedAccessor) return instance[accessor];\n untaintedAccessorCache[cacheKey] = untaintedAccessor;\n return untaintedAccessor.call(instance);\n}\nconst untaintedMethodCache = {};\nfunction getUntaintedMethod(key, instance, method) {\n const cacheKey = `${key}.${String(method)}`;\n if (untaintedMethodCache[cacheKey])\n return untaintedMethodCache[cacheKey].bind(\n instance\n );\n const untaintedPrototype = getUntaintedPrototype(key);\n const untaintedMethod = untaintedPrototype[method];\n if (typeof untaintedMethod !== \"function\") return instance[method];\n untaintedMethodCache[cacheKey] = untaintedMethod;\n return untaintedMethod.bind(instance);\n}\nfunction childNodes(n) {\n return getUntaintedAccessor(\"Node\", n, \"childNodes\");\n}\nfunction parentNode(n) {\n return getUntaintedAccessor(\"Node\", n, \"parentNode\");\n}\nfunction parentElement(n) {\n return getUntaintedAccessor(\"Node\", n, \"parentElement\");\n}\nfunction textContent(n) {\n return getUntaintedAccessor(\"Node\", n, \"textContent\");\n}\nfunction contains(n, other) {\n return getUntaintedMethod(\"Node\", n, \"contains\")(other);\n}\nfunction getRootNode(n) {\n return getUntaintedMethod(\"Node\", n, \"getRootNode\")();\n}\nfunction host(n) {\n if (!n || !(\"host\" in n)) return null;\n return getUntaintedAccessor(\"ShadowRoot\", n, \"host\");\n}\nfunction styleSheets(n) {\n return n.styleSheets;\n}\nfunction shadowRoot(n) {\n if (!n || !(\"shadowRoot\" in n)) return null;\n return getUntaintedAccessor(\"Element\", n, \"shadowRoot\");\n}\nfunction querySelector(n, selectors) {\n return getUntaintedAccessor(\"Element\", n, \"querySelector\")(selectors);\n}\nfunction querySelectorAll(n, selectors) {\n return getUntaintedAccessor(\"Element\", n, \"querySelectorAll\")(selectors);\n}\nfunction mutationObserverCtor() {\n return getUntaintedPrototype(\"MutationObserver\").constructor;\n}\nfunction patch(source, name, replacement) {\n try {\n if (!(name in source)) {\n return () => {\n };\n }\n const original = source[name];\n const wrapped = replacement(original);\n if (typeof wrapped === \"function\") {\n wrapped.prototype = wrapped.prototype || {};\n Object.defineProperties(wrapped, {\n __rrweb_original__: {\n enumerable: false,\n value: original\n }\n });\n }\n source[name] = wrapped;\n return () => {\n source[name] = original;\n };\n } catch {\n return () => {\n };\n }\n}\nconst index = {\n childNodes,\n parentNode,\n parentElement,\n textContent,\n contains,\n getRootNode,\n host,\n styleSheets,\n shadowRoot,\n querySelector,\n querySelectorAll,\n mutationObserver: mutationObserverCtor,\n patch\n};\nexport {\n childNodes,\n contains,\n index as default,\n getRootNode,\n getUntaintedAccessor,\n getUntaintedMethod,\n getUntaintedPrototype,\n host,\n mutationObserverCtor,\n parentElement,\n parentNode,\n patch,\n querySelector,\n querySelectorAll,\n shadowRoot,\n styleSheets,\n textContent\n};\n//# sourceMappingURL=rrweb-utils.js.map\n","import type {\n idNodeMap,\n MaskInputFn,\n MaskInputOptions,\n nodeMetaMap,\n} from './types';\n\nimport { NodeType } from '@posthog/rrweb-types';\nimport type {\n IMirror,\n serializedNodeWithId,\n serializedNode,\n documentNode,\n documentTypeNode,\n textNode,\n elementNode,\n} from '@posthog/rrweb-types';\nimport dom from '@posthog/rrweb-utils';\n\nexport function isElement(n: Node): n is Element {\n return n.nodeType === n.ELEMENT_NODE;\n}\n\nexport function isShadowRoot(n: Node): n is ShadowRoot {\n const hostEl: Element | null =\n // anchor and textarea elements also have a `host` property\n // but only shadow roots have a `mode` property\n (n && 'host' in n && 'mode' in n && dom.host(n as ShadowRoot)) || null;\n return Boolean(\n hostEl && 'shadowRoot' in hostEl && dom.shadowRoot(hostEl) === n,\n );\n}\n\n/**\n * To fix the issue https://github.com/rrweb-io/rrweb/issues/933.\n * Some websites use polyfilled shadow dom and this function is used to detect this situation.\n */\nexport function isNativeShadowDom(shadowRoot: ShadowRoot): boolean {\n return Object.prototype.toString.call(shadowRoot) === '[object ShadowRoot]';\n}\n\n/**\n * Browsers sometimes destructively modify the css rules they receive.\n * This function tries to rectify the modifications the browser made to make it more cross platform compatible.\n * @param cssText - output of `CSSStyleRule.cssText`\n * @returns `cssText` with browser inconsistencies fixed.\n */\nfunction fixBrowserCompatibilityIssuesInCSS(cssText: string): string {\n /**\n * Chrome outputs `-webkit-background-clip` as `background-clip` in `CSSStyleRule.cssText`.\n * But then Chrome ignores `background-clip` as css input.\n * Re-introduce `-webkit-background-clip` to fix this issue.\n */\n if (\n cssText.includes(' background-clip: text;') &&\n !cssText.includes(' -webkit-background-clip: text;')\n ) {\n cssText = cssText.replace(\n /\\sbackground-clip:\\s*text;/g,\n ' -webkit-background-clip: text; background-clip: text;',\n );\n }\n return cssText;\n}\n\n// Remove this declaration once typescript has added `CSSImportRule.supportsText` to the lib.\ndeclare interface CSSImportRule extends CSSRule {\n readonly href: string;\n readonly layerName: string | null;\n readonly media: MediaList;\n readonly styleSheet: CSSStyleSheet;\n /**\n * experimental API, currently only supported in firefox\n * https://developer.mozilla.org/en-US/docs/Web/API/CSSImportRule/supportsText\n */\n readonly supportsText?: string | null;\n}\n\n/**\n * Browsers sometimes incorrectly escape `@import` on `.cssText` statements.\n * This function tries to correct the escaping.\n * more info: https://bugs.chromium.org/p/chromium/issues/detail?id=1472259\n * @param cssImportRule\n * @returns `cssText` with browser inconsistencies fixed, or null if not applicable.\n */\nexport function escapeImportStatement(rule: CSSImportRule): string {\n const { cssText } = rule;\n if (cssText.split('\"').length < 3) return cssText;\n\n const statement = ['@import', `url(${JSON.stringify(rule.href)})`];\n if (rule.layerName === '') {\n statement.push(`layer`);\n } else if (rule.layerName) {\n statement.push(`layer(${rule.layerName})`);\n }\n if (rule.supportsText) {\n statement.push(`supports(${rule.supportsText})`);\n }\n if (rule.media.length) {\n statement.push(rule.media.mediaText);\n }\n return statement.join(' ') + ';';\n}\n\nexport function stringifyStylesheet(s: CSSStyleSheet): string | null {\n try {\n const rules = s.rules || s.cssRules;\n if (!rules) {\n return null;\n }\n let sheetHref = s.href;\n if (!sheetHref && s.ownerNode) {\n // an inline <style> element\n sheetHref = s.ownerNode.baseURI;\n }\n const stringifiedRules = Array.from(rules, (rule: CSSRule) =>\n stringifyRule(rule, sheetHref),\n ).join('');\n return fixBrowserCompatibilityIssuesInCSS(stringifiedRules);\n } catch (error) {\n return null;\n }\n}\n\nexport function stringifyRule(rule: CSSRule, sheetHref: string | null): string {\n if (isCSSImportRule(rule)) {\n let importStringified;\n try {\n importStringified =\n // for same-origin stylesheets,\n // we can access the imported stylesheet rules directly\n stringifyStylesheet(rule.styleSheet) ||\n // work around browser issues with the raw string `@import url(...)` statement\n escapeImportStatement(rule);\n } catch (error) {\n importStringified = rule.cssText;\n }\n // if importStringified is not null,\n // there should be a stylesheet and a rule here,\n // but we avoid errors in this method by checking for null\n // see https://github.com/rrweb-io/rrweb/pull/1686\n try {\n if (importStringified && rule.styleSheet?.href) {\n // url()s within the imported stylesheet are relative to _that_ sheet's href\n return absolutifyURLs(importStringified, rule.styleSheet.href);\n }\n } catch {\n // swallow this, we'll return null\n }\n return importStringified;\n } else {\n let ruleStringified = rule.cssText;\n if (isCSSStyleRule(rule) && rule.selectorText.includes(':')) {\n // Safari does not escape selectors with : properly\n // see https://bugs.webkit.org/show_bug.cgi?id=184604\n ruleStringified = fixSafariColons(ruleStringified);\n }\n if (sheetHref) {\n return absolutifyURLs(ruleStringified, sheetHref);\n }\n return ruleStringified;\n }\n}\n\nexport function fixSafariColons(cssStringified: string): string {\n // Replace e.g. [aa:bb] with [aa\\\\:bb]\n const regex = /(\\[(?:[\\w-]+)[^\\\\])(:(?:[\\w-]+)\\])/gm;\n return cssStringified.replace(regex, '$1\\\\$2');\n}\n\nexport function isCSSImportRule(rule: CSSRule): rule is CSSImportRule {\n return 'styleSheet' in rule;\n}\n\nexport function isCSSStyleRule(rule: CSSRule): rule is CSSStyleRule {\n return 'selectorText' in rule;\n}\n\nexport class Mirror implements IMirror<Node> {\n private idNodeMap: idNodeMap = new Map();\n private nodeMetaMap: nodeMetaMap = new WeakMap();\n\n getId(n: Node | undefined | null): number {\n if (!n) return -1;\n\n const id = this.getMeta(n)?.id;\n\n // if n is not a serialized Node, use -1 as its id.\n return id ?? -1;\n }\n\n getNode(id: number): Node | null {\n return this.idNodeMap.get(id) || null;\n }\n\n getIds(): number[] {\n return Array.from(this.idNodeMap.keys());\n }\n\n getMeta(n: Node): serializedNodeWithId | null {\n return this.nodeMetaMap.get(n) || null;\n }\n\n // removes the node from idNodeMap\n // doesn't remove the node from nodeMetaMap\n removeNodeFromMap(n: Node) {\n const id = this.getId(n);\n this.idNodeMap.delete(id);\n\n if (n.childNodes) {\n n.childNodes.forEach((childNode) =>\n this.removeNodeFromMap(childNode as unknown as Node),\n );\n }\n\n if (isElement(n)) {\n const shadowRootEl = dom.shadowRoot(n);\n if (shadowRootEl) {\n this.removeNodeFromMap(shadowRootEl as unknown as Node);\n }\n\n if (n.nodeName === 'IFRAME' && (n as HTMLIFrameElement).contentDocument) {\n this.removeNodeFromMap(\n (n as HTMLIFrameElement).contentDocument as unknown as Node,\n );\n }\n }\n }\n has(id: number): boolean {\n return this.idNodeMap.has(id);\n }\n\n hasNode(node: Node): boolean {\n return this.nodeMetaMap.has(node);\n }\n\n add(n: Node, meta: serializedNodeWithId) {\n const id = meta.id;\n this.idNodeMap.set(id, n);\n this.nodeMetaMap.set(n, meta);\n }\n\n replace(id: number, n: Node) {\n const oldNode = this.getNode(id);\n if (oldNode) {\n const meta = this.nodeMetaMap.get(oldNode);\n if (meta) this.nodeMetaMap.set(n, meta);\n }\n this.idNodeMap.set(id, n);\n }\n\n reset() {\n this.idNodeMap = new Map();\n this.nodeMetaMap = new WeakMap();\n }\n}\n\nexport function createMirror(): Mirror {\n return new Mirror();\n}\n\nexport function maskInputValue({\n element,\n maskInputOptions,\n tagName,\n type,\n value,\n maskInputFn,\n}: {\n element: HTMLElement;\n maskInputOptions: MaskInputOptions;\n tagName: string;\n type: string | null;\n value: string | null;\n maskInputFn?: MaskInputFn;\n}): string {\n let text = value || '';\n const actualType = type && toLowerCase(type);\n\n if (\n maskInputOptions[tagName.toLowerCase() as keyof MaskInputOptions] ||\n (actualType && maskInputOptions[actualType as keyof MaskInputOptions])\n ) {\n if (maskInputFn) {\n text = maskInputFn(text, element);\n } else {\n text = '*'.repeat(text.length);\n }\n }\n return text;\n}\n\nexport function toLowerCase<T extends string>(str: T): Lowercase<T> {\n return str.toLowerCase() as unknown as Lowercase<T>;\n}\n\nconst ORIGINAL_ATTRIBUTE_NAME = '__rrweb_original__';\ntype PatchedGetImageData = {\n [ORIGINAL_ATTRIBUTE_NAME]: CanvasImageData['getImageData'];\n} & CanvasImageData['getImageData'];\n\nexport function is2DCanvasBlank(canvas: HTMLCanvasElement): boolean {\n const ctx = canvas.getContext('2d');\n if (!ctx) return true;\n\n const chunkSize = 50;\n\n // get chunks of the canvas and check if it is blank\n for (let x = 0; x < canvas.width; x += chunkSize) {\n for (let y = 0; y < canvas.height; y += chunkSize) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const getImageData = ctx.getImageData as PatchedGetImageData;\n const originalGetImageData =\n ORIGINAL_ATTRIBUTE_NAME in getImageData\n ? getImageData[ORIGINAL_ATTRIBUTE_NAME]\n : getImageData;\n // by getting the canvas in chunks we avoid an expensive\n // `getImageData` call that retrieves everything\n // even if we can already tell from the first chunk(s) that\n // the canvas isn't blank\n const pixelBuffer = new Uint32Array(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access\n originalGetImageData.call(\n ctx,\n x,\n y,\n Math.min(chunkSize, canvas.width - x),\n Math.min(chunkSize, canvas.height - y),\n ).data.buffer,\n );\n if (pixelBuffer.some((pixel) => pixel !== 0)) return false;\n }\n }\n return true;\n}\n\nexport function isNodeMetaEqual(a: serializedNode, b: serializedNode): boolean {\n if (!a || !b || a.type !== b.type) return false;\n if (a.type === NodeType.Document)\n return a.compatMode === (b as documentNode).compatMode;\n else if (a.type === NodeType.DocumentType)\n return (\n a.name === (b as documentTypeNode).name &&\n a.publicId === (b as documentTypeNode).publicId &&\n a.systemId === (b as documentTypeNode).systemId\n );\n else if (\n a.type === NodeType.Comment ||\n a.type === NodeType.Text ||\n a.type === NodeType.CDATA\n )\n return a.textContent === (b as textNode).textContent;\n else if (a.type === NodeType.Element)\n return (\n a.tagName === (b as elementNode).tagName &&\n JSON.stringify(a.attributes) ===\n JSON.stringify((b as elementNode).attributes) &&\n a.isSVG === (b as elementNode).isSVG &&\n a.needBlock === (b as elementNode).needBlock\n );\n return false;\n}\n\n/**\n * Get the type of an input element.\n * This takes care of the case where a password input is changed to a text input.\n * In this case, we continue to consider this of type password, in order to avoid leaking sensitive data\n * where passwords should be masked.\n */\nexport function getInputType(element: HTMLElement): Lowercase<string> | null {\n // when omitting the type of input element(e.g. <input />), the type is treated as text\n const type = (element as HTMLInputElement).type;\n\n return element.hasAttribute('data-rr-is-password')\n ? 'password'\n : type\n ? // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n toLowerCase(type)\n : null;\n}\n\n/**\n * Extracts the file extension from an a path, considering search parameters and fragments.\n * @param path - Path to file\n * @param baseURL - [optional] Base URL of the page, used to resolve relative paths. Defaults to current page URL.\n */\nexport function extractFileExtension(\n path: string,\n baseURL?: string,\n): string | null {\n let url;\n try {\n url = new URL(path, baseURL ?? window.location.href);\n } catch (err) {\n return null;\n }\n const regex = /\\.([0-9a-z]+)(?:$)/i;\n const match = url.pathname.match(regex);\n return match?.[1] ?? null;\n}\n\nfunction extractOrigin(url: string): string {\n let origin = '';\n if (url.indexOf('//') > -1) {\n origin = url.split('/').slice(0, 3).join('/');\n } else {\n origin = url.split('/')[0];\n }\n origin = origin.split('?')[0];\n return origin;\n}\n\nconst URL_IN_CSS_REF = /url\\((?:(')([^']*)'|(\")(.*?)\"|([^)]*))\\)/gm;\nconst URL_PROTOCOL_MATCH = /^(?:[a-z+]+:)?\\/\\//i;\nconst URL_WWW_MATCH = /^www\\..*/i;\nconst DATA_URI = /^(data:)([^,]*),(.*)/i;\nexport function absolutifyURLs(cssText: string | null, href: string): string {\n return (cssText || '').replace(\n URL_IN_CSS_REF,\n (\n origin: string,\n quote1: string,\n path1: string,\n quote2: string,\n path2: string,\n path3: string,\n ) => {\n const filePath = path1 || path2 || path3;\n const maybeQuote = quote1 || quote2 || '';\n if (!filePath) {\n return origin;\n }\n if (URL_PROTOCOL_MATCH.test(filePath) || URL_WWW_MATCH.test(filePath)) {\n return `url(${maybeQuote}${filePath}${maybeQuote})`;\n }\n if (DATA_URI.test(filePath)) {\n return `url(${maybeQuote}${filePath}${maybeQuote})`;\n }\n if (filePath[0] === '/') {\n return `url(${maybeQuote}${\n extractOrigin(href) + filePath\n }${maybeQuote})`;\n }\n const stack = href.split('/');\n const parts = filePath.split('/');\n stack.pop();\n for (const part of parts) {\n if (part === '.') {\n continue;\n } else if (part === '..') {\n stack.pop();\n } else {\n stack.push(part);\n }\n }\n return `url(${maybeQuote}${stack.join('/')}${maybeQuote})`;\n },\n );\n}\n\nconst STRIPED_PLACEHOLDER_SVG =\n 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==';\n\nconst MAX_IMAGE_DIMENSION_FOR_RECOMPRESSION = 4096;\n\nexport function recompressBase64Image(\n img: HTMLImageElement,\n dataURL: string,\n type?: string,\n quality?: number,\n): string {\n if (!img.complete || img.naturalWidth === 0) {\n return dataURL;\n }\n\n // don't recompress very large images to avoid performance issues\n if (\n img.naturalWidth > MAX_IMAGE_DIMENSION_FOR_RECOMPRESSION ||\n img.naturalHeight > MAX_IMAGE_DIMENSION_FOR_RECOMPRESSION\n ) {\n return dataURL;\n }\n\n try {\n const canvas = document.createElement('canvas');\n canvas.width = img.naturalWidth;\n canvas.height = img.naturalHeight;\n const ctx = canvas.getContext('2d');\n\n if (!ctx) {\n return dataURL;\n }\n\n ctx.drawImage(img, 0, 0);\n const recompressed = canvas.toDataURL(type || 'image/webp', quality ?? 0.4);\n\n return recompressed;\n } catch (err) {\n return dataURL;\n }\n}\n\nexport function checkDataURLSize(\n dataURL: string,\n maxLength: number | undefined,\n): string {\n if (!maxLength || dataURL.length <= maxLength) {\n return dataURL;\n }\n\n return STRIPED_PLACEHOLDER_SVG;\n}\n","export enum NodeType {\n Document,\n DocumentType,\n Element,\n Text,\n CDATA,\n Comment,\n}\n\nexport type documentNode = {\n type: NodeType.Document;\n childNodes: serializedNodeWithId[];\n compatMode?: string;\n};\n\nexport type documentTypeNode = {\n type: NodeType.DocumentType;\n name: string;\n publicId: string;\n systemId: string;\n};\n\nexport type attributes = {\n [key: string]: string | number | true | null;\n};\nexport type legacyAttributes = {\n /**\n * @deprecated old bug in rrweb was causing these to always be set\n * @see https://github.com/rrweb-io/rrweb/pull/651\n */\n selected: false;\n};\n\nexport type elementNode = {\n type: NodeType.Element;\n tagName: string;\n attributes: attributes;\n childNodes: serializedNodeWithId[];\n isSVG?: true;\n needBlock?: boolean;\n // This is a custom element or not.\n isCustom?: true;\n};\n\nexport type textNode = {\n type: NodeType.Text;\n textContent: string;\n isStyle?: true;\n};\n\nexport type cdataNode = {\n type: NodeType.CDATA;\n textContent: '';\n};\n\nexport type commentNode = {\n type: NodeType.Comment;\n textContent: string;\n};\n\nexport type serializedNode = (\n | documentNode\n | documentTypeNode\n | elementNode\n | textNode\n | cdataNode\n | commentNode\n) & {\n rootId?: number;\n isShadowHost?: boolean;\n isShadow?: boolean;\n};\n\nimport type { serializedNodeWithId } from '@posthog/rrweb-types';\n\nexport type serializedElementNodeWithId = Extract<\n serializedNodeWithId,\n Record<'type', NodeType.Element>\n>;\n\nexport type tagMap = {\n [key: string]: string;\n};\n\nexport type DialogAttributes = {\n open: string;\n /**\n * Represents the dialog's open mode.\n * `modal` means the dialog is opened with `showModal()`.\n * `non-modal` means the dialog is opened with `show()` or\n * by adding an `open` attribute.\n */\n rr_open_mode: 'modal' | 'non-modal';\n /**\n * Currently unimplemented, but in future can be used to:\n * Represents the order of which of the dialog was opened.\n * This is useful for replaying the dialog `.showModal()` in the correct order.\n */\n // rr_open_mode_index?: number;\n};\n\nexport interface ICanvas extends HTMLCanvasElement {\n __context: string;\n}\n\nexport type idNodeMap = Map<number, Node>;\n\nexport type nodeMetaMap = WeakMap<Node, serializedNodeWithId>;\n\nexport type MaskInputOptions = Partial<{\n color: boolean;\n date: boolean;\n 'datetime-local': boolean;\n email: boolean;\n month: boolean;\n number: boolean;\n range: boolean;\n search: boolean;\n tel: boolean;\n text: boolean;\n time: boolean;\n url: boolean;\n week: boolean;\n // unify textarea and select element with text input\n textarea: boolean;\n select: boolean;\n password: boolean;\n}>;\n\nexport type SlimDOMOptions = Partial<{\n script: boolean;\n comment: boolean;\n headFavicon: boolean;\n headWhitespace: boolean;\n headMetaDescKeywords: boolean;\n headMetaSocial: boolean;\n headMetaRobots: boolean;\n headMetaHttpEquiv: boolean;\n headMetaAuthorship: boolean;\n headMetaVerification: boolean;\n /**\n * blocks title tag 'animations' which can generate a lot of mutations that aren't usually displayed in replayers\n **/\n headTitleMutations: boolean;\n}>;\n\nexport type MaskTextFn = (text: string, element: HTMLElement | null) => string;\nexport type MaskInputFn = (text: string, element: HTMLElement) => string;\n\nexport type KeepIframeSrcFn = (src: string) => boolean;\n\nexport type BuildCache = {\n stylesWithHoverClass: Map<string, string>;\n};\n"],"names":["NodeType","dom","shadowRoot"],"mappings":";;;AAoFG,IAACA,aAA4B,kBAAC,cAAc;AAC7C,YAAU,UAAU,UAAU,IAAI,CAAC,IAAI;AACvC,YAAU,UAAU,cAAc,IAAI,CAAC,IAAI;AAC3C,YAAU,UAAU,SAAS,IAAI,CAAC,IAAI;AACtC,YAAU,UAAU,MAAM,IAAI,CAAC,IAAI;AACnC,YAAU,UAAU,OAAO,IAAI,CAAC,IAAI;AACpC,YAAU,UAAU,SAAS,IAAI,CAAC,IAAI;AACtC,SAAO;AACT,GAAGA,cAAY,CAAA,CAAE;AC5FjB,MAAM,oBAAoB;AAAA,EACxB,MAAM,CAAC,cAAc,cAAc,iBAAiB,aAAa;AAAA,EACjE,YAAY,CAAC,QAAQ,aAAa;AAAA,EAClC,SAAS,CAAC,cAAc,iBAAiB,kBAAkB;AAAA,EAC3D,kBAAkB,CAAA;AACpB;AACA,MAAM,kBAAkB;AAAA,EACtB,MAAM,CAAC,YAAY,aAAa;AAAA,EAChC,YAAY,CAAC,cAAc;AAAA,EAC3B,SAAS,CAAA;AAAA,EACT,kBAAkB,CAAC,aAAa;AAClC;AACA,MAAM,yBAAyB,CAAA;AAC/B,SAAS,gCAAgC,KAAK;AAC5C,MAAI,IAAI;AACR,QAAM,iCAAiC,MAAM,KAAK,cAAc,OAAO,SAAS,WAAW,SAAS,OAAO,SAAS,GAAG,eAAe,OAAO,SAAS,GAAG,KAAK,IAAI,GAAG;AACrK,MAAI,iCAAiC,WAAW,6BAA6B,GAAG;AAC9E,WAAO,WAAW,6BAA6B;AAAA,EACjD,OAAO;AACL,WAAO;AAAA,EACT;AACF;AACA,SAAS,sBAAsB,KAAK;AAClC,MAAI,uBAAuB,GAAG;AAC5B,WAAO,uBAAuB,GAAG;AACnC,QAAM,YAAY,gCAAgC,GAAG,KAAK,WAAW,GAAG;AACxE,QAAM,mBAAmB,UAAU;AACnC,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C,QAAI,CAAC,KAAK;AACR,aAAO;AAAA,IACT;AAEA,QAAI,UAAU,KAAK,GAAG,CAAC;AACvB,UAAM,eAAe,OAAO,UAAU,QAAQ,cAAc,WAAW,GAAG;AAE1E,WAAO;AAAA,EACT,SAAS,KAAK;AACZ,WAAO;AAAA,EACT;AACF;AAEO,SAAS,iBACd,SACA,WACQ;AACR,MAAI,CAAC,aAAa,QAAQ,UAAU,WAAW;AAC7C,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AC/fO,IAAK,6BAAAA,cAAL;AACLA,YAAAA,UAAA,UAAA,IAAA,CAAA,IAAA;AACAA,YAAAA,UAAA,cAAA,IAAA,CAAA,IAAA;AACAA,YAAAA,UAAA,SAAA,IAAA,CAAA,IAAA;AACAA,YAAAA,UAAA,MAAA,IAAA,CAAA,IAAA;AACAA,YAAAA,UAAA,OAAA,IAAA,CAAA,IAAA;AACAA,YAAAA,UAAA,SAAA,IAAA,CAAA,IAAA;AANU,SAAAA;AAAA,GAAA,YAAA,CAAA,CAAA;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@posthog/rrweb-snapshot",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.39",
|
|
4
4
|
"description": "rrweb's component to take a snapshot of DOM, aka DOM serializer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"vite": "^6.2.0",
|
|
61
61
|
"vite-plugin-dts": "^3.9.1",
|
|
62
62
|
"vitest": "^1.4.0",
|
|
63
|
-
"@posthog/rrweb-types": "0.0.
|
|
64
|
-
"@posthog/rrweb-utils": "0.0.
|
|
63
|
+
"@posthog/rrweb-types": "0.0.39",
|
|
64
|
+
"@posthog/rrweb-utils": "0.0.39"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@types/postcss-safe-parser": "^5.0.4",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-FDk_ocpu.js","sources":["../../types/dist/rrweb-types.js","../../utils/dist/rrweb-utils.js","../src/utils.ts","../src/types.ts"],"sourcesContent":["var EventType = /* @__PURE__ */ ((EventType2) => {\n EventType2[EventType2[\"DomContentLoaded\"] = 0] = \"DomContentLoaded\";\n EventType2[EventType2[\"Load\"] = 1] = \"Load\";\n EventType2[EventType2[\"FullSnapshot\"] = 2] = \"FullSnapshot\";\n EventType2[EventType2[\"IncrementalSnapshot\"] = 3] = \"IncrementalSnapshot\";\n EventType2[EventType2[\"Meta\"] = 4] = \"Meta\";\n EventType2[EventType2[\"Custom\"] = 5] = \"Custom\";\n EventType2[EventType2[\"Plugin\"] = 6] = \"Plugin\";\n return EventType2;\n})(EventType || {});\nvar IncrementalSource = /* @__PURE__ */ ((IncrementalSource2) => {\n IncrementalSource2[IncrementalSource2[\"Mutation\"] = 0] = \"Mutation\";\n IncrementalSource2[IncrementalSource2[\"MouseMove\"] = 1] = \"MouseMove\";\n IncrementalSource2[IncrementalSource2[\"MouseInteraction\"] = 2] = \"MouseInteraction\";\n IncrementalSource2[IncrementalSource2[\"Scroll\"] = 3] = \"Scroll\";\n IncrementalSource2[IncrementalSource2[\"ViewportResize\"] = 4] = \"ViewportResize\";\n IncrementalSource2[IncrementalSource2[\"Input\"] = 5] = \"Input\";\n IncrementalSource2[IncrementalSource2[\"TouchMove\"] = 6] = \"TouchMove\";\n IncrementalSource2[IncrementalSource2[\"MediaInteraction\"] = 7] = \"MediaInteraction\";\n IncrementalSource2[IncrementalSource2[\"StyleSheetRule\"] = 8] = \"StyleSheetRule\";\n IncrementalSource2[IncrementalSource2[\"CanvasMutation\"] = 9] = \"CanvasMutation\";\n IncrementalSource2[IncrementalSource2[\"Font\"] = 10] = \"Font\";\n IncrementalSource2[IncrementalSource2[\"Log\"] = 11] = \"Log\";\n IncrementalSource2[IncrementalSource2[\"Drag\"] = 12] = \"Drag\";\n IncrementalSource2[IncrementalSource2[\"StyleDeclaration\"] = 13] = \"StyleDeclaration\";\n IncrementalSource2[IncrementalSource2[\"Selection\"] = 14] = \"Selection\";\n IncrementalSource2[IncrementalSource2[\"AdoptedStyleSheet\"] = 15] = \"AdoptedStyleSheet\";\n IncrementalSource2[IncrementalSource2[\"CustomElement\"] = 16] = \"CustomElement\";\n return IncrementalSource2;\n})(IncrementalSource || {});\nvar MouseInteractions = /* @__PURE__ */ ((MouseInteractions2) => {\n MouseInteractions2[MouseInteractions2[\"MouseUp\"] = 0] = \"MouseUp\";\n MouseInteractions2[MouseInteractions2[\"MouseDown\"] = 1] = \"MouseDown\";\n MouseInteractions2[MouseInteractions2[\"Click\"] = 2] = \"Click\";\n MouseInteractions2[MouseInteractions2[\"ContextMenu\"] = 3] = \"ContextMenu\";\n MouseInteractions2[MouseInteractions2[\"DblClick\"] = 4] = \"DblClick\";\n MouseInteractions2[MouseInteractions2[\"Focus\"] = 5] = \"Focus\";\n MouseInteractions2[MouseInteractions2[\"Blur\"] = 6] = \"Blur\";\n MouseInteractions2[MouseInteractions2[\"TouchStart\"] = 7] = \"TouchStart\";\n MouseInteractions2[MouseInteractions2[\"TouchMove_Departed\"] = 8] = \"TouchMove_Departed\";\n MouseInteractions2[MouseInteractions2[\"TouchEnd\"] = 9] = \"TouchEnd\";\n MouseInteractions2[MouseInteractions2[\"TouchCancel\"] = 10] = \"TouchCancel\";\n return MouseInteractions2;\n})(MouseInteractions || {});\nvar PointerTypes = /* @__PURE__ */ ((PointerTypes2) => {\n PointerTypes2[PointerTypes2[\"Mouse\"] = 0] = \"Mouse\";\n PointerTypes2[PointerTypes2[\"Pen\"] = 1] = \"Pen\";\n PointerTypes2[PointerTypes2[\"Touch\"] = 2] = \"Touch\";\n return PointerTypes2;\n})(PointerTypes || {});\nvar CanvasContext = /* @__PURE__ */ ((CanvasContext2) => {\n CanvasContext2[CanvasContext2[\"2D\"] = 0] = \"2D\";\n CanvasContext2[CanvasContext2[\"WebGL\"] = 1] = \"WebGL\";\n CanvasContext2[CanvasContext2[\"WebGL2\"] = 2] = \"WebGL2\";\n return CanvasContext2;\n})(CanvasContext || {});\nvar MediaInteractions = /* @__PURE__ */ ((MediaInteractions2) => {\n MediaInteractions2[MediaInteractions2[\"Play\"] = 0] = \"Play\";\n MediaInteractions2[MediaInteractions2[\"Pause\"] = 1] = \"Pause\";\n MediaInteractions2[MediaInteractions2[\"Seeked\"] = 2] = \"Seeked\";\n MediaInteractions2[MediaInteractions2[\"VolumeChange\"] = 3] = \"VolumeChange\";\n MediaInteractions2[MediaInteractions2[\"RateChange\"] = 4] = \"RateChange\";\n return MediaInteractions2;\n})(MediaInteractions || {});\nvar ReplayerEvents = /* @__PURE__ */ ((ReplayerEvents2) => {\n ReplayerEvents2[\"Start\"] = \"start\";\n ReplayerEvents2[\"Pause\"] = \"pause\";\n ReplayerEvents2[\"Resume\"] = \"resume\";\n ReplayerEvents2[\"Resize\"] = \"resize\";\n ReplayerEvents2[\"Finish\"] = \"finish\";\n ReplayerEvents2[\"FullsnapshotRebuilded\"] = \"fullsnapshot-rebuilded\";\n ReplayerEvents2[\"LoadStylesheetStart\"] = \"load-stylesheet-start\";\n ReplayerEvents2[\"LoadStylesheetEnd\"] = \"load-stylesheet-end\";\n ReplayerEvents2[\"SkipStart\"] = \"skip-start\";\n ReplayerEvents2[\"SkipEnd\"] = \"skip-end\";\n ReplayerEvents2[\"MouseInteraction\"] = \"mouse-interaction\";\n ReplayerEvents2[\"EventCast\"] = \"event-cast\";\n ReplayerEvents2[\"CustomEvent\"] = \"custom-event\";\n ReplayerEvents2[\"Flush\"] = \"flush\";\n ReplayerEvents2[\"StateChange\"] = \"state-change\";\n ReplayerEvents2[\"PlayBack\"] = \"play-back\";\n ReplayerEvents2[\"Destroy\"] = \"destroy\";\n return ReplayerEvents2;\n})(ReplayerEvents || {});\nvar NodeType = /* @__PURE__ */ ((NodeType2) => {\n NodeType2[NodeType2[\"Document\"] = 0] = \"Document\";\n NodeType2[NodeType2[\"DocumentType\"] = 1] = \"DocumentType\";\n NodeType2[NodeType2[\"Element\"] = 2] = \"Element\";\n NodeType2[NodeType2[\"Text\"] = 3] = \"Text\";\n NodeType2[NodeType2[\"CDATA\"] = 4] = \"CDATA\";\n NodeType2[NodeType2[\"Comment\"] = 5] = \"Comment\";\n return NodeType2;\n})(NodeType || {});\nexport {\n CanvasContext,\n EventType,\n IncrementalSource,\n MediaInteractions,\n MouseInteractions,\n NodeType,\n PointerTypes,\n ReplayerEvents\n};\n//# sourceMappingURL=rrweb-types.js.map\n","const testableAccessors = {\n Node: [\"childNodes\", \"parentNode\", \"parentElement\", \"textContent\"],\n ShadowRoot: [\"host\", \"styleSheets\"],\n Element: [\"shadowRoot\", \"querySelector\", \"querySelectorAll\"],\n MutationObserver: []\n};\nconst testableMethods = {\n Node: [\"contains\", \"getRootNode\"],\n ShadowRoot: [\"getSelection\"],\n Element: [],\n MutationObserver: [\"constructor\"]\n};\nconst untaintedBasePrototype = {};\nfunction angularZoneUnpatchedAlternative(key) {\n var _a, _b;\n const angularUnpatchedVersionSymbol = (_b = (_a = globalThis == null ? void 0 : globalThis.Zone) == null ? void 0 : _a.__symbol__) == null ? void 0 : _b.call(_a, key);\n if (angularUnpatchedVersionSymbol && globalThis[angularUnpatchedVersionSymbol]) {\n return globalThis[angularUnpatchedVersionSymbol];\n } else {\n return void 0;\n }\n}\nfunction getUntaintedPrototype(key) {\n if (untaintedBasePrototype[key])\n return untaintedBasePrototype[key];\n const candidate = angularZoneUnpatchedAlternative(key) || globalThis[key];\n const defaultPrototype = candidate.prototype;\n const accessorNames = key in testableAccessors ? testableAccessors[key] : void 0;\n const isUntaintedAccessors = Boolean(\n accessorNames && // @ts-expect-error 2345\n accessorNames.every(\n (accessor) => {\n var _a, _b;\n return Boolean(\n (_b = (_a = Object.getOwnPropertyDescriptor(defaultPrototype, accessor)) == null ? void 0 : _a.get) == null ? void 0 : _b.toString().includes(\"[native code]\")\n );\n }\n )\n );\n const methodNames = key in testableMethods ? testableMethods[key] : void 0;\n const isUntaintedMethods = Boolean(\n methodNames && methodNames.every(\n // @ts-expect-error 2345\n (method) => {\n var _a;\n return typeof defaultPrototype[method] === \"function\" && ((_a = defaultPrototype[method]) == null ? void 0 : _a.toString().includes(\"[native code]\"));\n }\n )\n );\n if (isUntaintedAccessors && isUntaintedMethods) {\n untaintedBasePrototype[key] = candidate.prototype;\n return candidate.prototype;\n }\n try {\n const iframeEl = document.createElement(\"iframe\");\n document.body.appendChild(iframeEl);\n const win = iframeEl.contentWindow;\n if (!win) return candidate.prototype;\n const untaintedObject = win[key].prototype;\n document.body.removeChild(iframeEl);\n if (!untaintedObject) return defaultPrototype;\n return untaintedBasePrototype[key] = untaintedObject;\n } catch {\n return defaultPrototype;\n }\n}\nconst untaintedAccessorCache = {};\nfunction getUntaintedAccessor(key, instance, accessor) {\n var _a;\n const cacheKey = `${key}.${String(accessor)}`;\n if (untaintedAccessorCache[cacheKey])\n return untaintedAccessorCache[cacheKey].call(\n instance\n );\n const untaintedPrototype = getUntaintedPrototype(key);\n const untaintedAccessor = (_a = Object.getOwnPropertyDescriptor(\n untaintedPrototype,\n accessor\n )) == null ? void 0 : _a.get;\n if (!untaintedAccessor) return instance[accessor];\n untaintedAccessorCache[cacheKey] = untaintedAccessor;\n return untaintedAccessor.call(instance);\n}\nconst untaintedMethodCache = {};\nfunction getUntaintedMethod(key, instance, method) {\n const cacheKey = `${key}.${String(method)}`;\n if (untaintedMethodCache[cacheKey])\n return untaintedMethodCache[cacheKey].bind(\n instance\n );\n const untaintedPrototype = getUntaintedPrototype(key);\n const untaintedMethod = untaintedPrototype[method];\n if (typeof untaintedMethod !== \"function\") return instance[method];\n untaintedMethodCache[cacheKey] = untaintedMethod;\n return untaintedMethod.bind(instance);\n}\nfunction childNodes(n) {\n return getUntaintedAccessor(\"Node\", n, \"childNodes\");\n}\nfunction parentNode(n) {\n return getUntaintedAccessor(\"Node\", n, \"parentNode\");\n}\nfunction parentElement(n) {\n return getUntaintedAccessor(\"Node\", n, \"parentElement\");\n}\nfunction textContent(n) {\n return getUntaintedAccessor(\"Node\", n, \"textContent\");\n}\nfunction contains(n, other) {\n return getUntaintedMethod(\"Node\", n, \"contains\")(other);\n}\nfunction getRootNode(n) {\n return getUntaintedMethod(\"Node\", n, \"getRootNode\")();\n}\nfunction host(n) {\n if (!n || !(\"host\" in n)) return null;\n return getUntaintedAccessor(\"ShadowRoot\", n, \"host\");\n}\nfunction styleSheets(n) {\n return n.styleSheets;\n}\nfunction shadowRoot(n) {\n if (!n || !(\"shadowRoot\" in n)) return null;\n return getUntaintedAccessor(\"Element\", n, \"shadowRoot\");\n}\nfunction querySelector(n, selectors) {\n return getUntaintedAccessor(\"Element\", n, \"querySelector\")(selectors);\n}\nfunction querySelectorAll(n, selectors) {\n return getUntaintedAccessor(\"Element\", n, \"querySelectorAll\")(selectors);\n}\nfunction mutationObserverCtor() {\n return getUntaintedPrototype(\"MutationObserver\").constructor;\n}\nfunction patch(source, name, replacement) {\n try {\n if (!(name in source)) {\n return () => {\n };\n }\n const original = source[name];\n const wrapped = replacement(original);\n if (typeof wrapped === \"function\") {\n wrapped.prototype = wrapped.prototype || {};\n Object.defineProperties(wrapped, {\n __rrweb_original__: {\n enumerable: false,\n value: original\n }\n });\n }\n source[name] = wrapped;\n return () => {\n source[name] = original;\n };\n } catch {\n return () => {\n };\n }\n}\nconst index = {\n childNodes,\n parentNode,\n parentElement,\n textContent,\n contains,\n getRootNode,\n host,\n styleSheets,\n shadowRoot,\n querySelector,\n querySelectorAll,\n mutationObserver: mutationObserverCtor,\n patch\n};\nexport {\n childNodes,\n contains,\n index as default,\n getRootNode,\n getUntaintedAccessor,\n getUntaintedMethod,\n getUntaintedPrototype,\n host,\n mutationObserverCtor,\n parentElement,\n parentNode,\n patch,\n querySelector,\n querySelectorAll,\n shadowRoot,\n styleSheets,\n textContent\n};\n//# sourceMappingURL=rrweb-utils.js.map\n","import type {\n idNodeMap,\n MaskInputFn,\n MaskInputOptions,\n nodeMetaMap,\n} from './types';\n\nimport { NodeType } from '@posthog/rrweb-types';\nimport type {\n IMirror,\n serializedNodeWithId,\n serializedNode,\n documentNode,\n documentTypeNode,\n textNode,\n elementNode,\n} from '@posthog/rrweb-types';\nimport dom from '@posthog/rrweb-utils';\n\nexport function isElement(n: Node): n is Element {\n return n.nodeType === n.ELEMENT_NODE;\n}\n\nexport function isShadowRoot(n: Node): n is ShadowRoot {\n const hostEl: Element | null =\n // anchor and textarea elements also have a `host` property\n // but only shadow roots have a `mode` property\n (n && 'host' in n && 'mode' in n && dom.host(n as ShadowRoot)) || null;\n return Boolean(\n hostEl && 'shadowRoot' in hostEl && dom.shadowRoot(hostEl) === n,\n );\n}\n\n/**\n * To fix the issue https://github.com/rrweb-io/rrweb/issues/933.\n * Some websites use polyfilled shadow dom and this function is used to detect this situation.\n */\nexport function isNativeShadowDom(shadowRoot: ShadowRoot): boolean {\n return Object.prototype.toString.call(shadowRoot) === '[object ShadowRoot]';\n}\n\n/**\n * Browsers sometimes destructively modify the css rules they receive.\n * This function tries to rectify the modifications the browser made to make it more cross platform compatible.\n * @param cssText - output of `CSSStyleRule.cssText`\n * @returns `cssText` with browser inconsistencies fixed.\n */\nfunction fixBrowserCompatibilityIssuesInCSS(cssText: string): string {\n /**\n * Chrome outputs `-webkit-background-clip` as `background-clip` in `CSSStyleRule.cssText`.\n * But then Chrome ignores `background-clip` as css input.\n * Re-introduce `-webkit-background-clip` to fix this issue.\n */\n if (\n cssText.includes(' background-clip: text;') &&\n !cssText.includes(' -webkit-background-clip: text;')\n ) {\n cssText = cssText.replace(\n /\\sbackground-clip:\\s*text;/g,\n ' -webkit-background-clip: text; background-clip: text;',\n );\n }\n return cssText;\n}\n\n// Remove this declaration once typescript has added `CSSImportRule.supportsText` to the lib.\ndeclare interface CSSImportRule extends CSSRule {\n readonly href: string;\n readonly layerName: string | null;\n readonly media: MediaList;\n readonly styleSheet: CSSStyleSheet;\n /**\n * experimental API, currently only supported in firefox\n * https://developer.mozilla.org/en-US/docs/Web/API/CSSImportRule/supportsText\n */\n readonly supportsText?: string | null;\n}\n\n/**\n * Browsers sometimes incorrectly escape `@import` on `.cssText` statements.\n * This function tries to correct the escaping.\n * more info: https://bugs.chromium.org/p/chromium/issues/detail?id=1472259\n * @param cssImportRule\n * @returns `cssText` with browser inconsistencies fixed, or null if not applicable.\n */\nexport function escapeImportStatement(rule: CSSImportRule): string {\n const { cssText } = rule;\n if (cssText.split('\"').length < 3) return cssText;\n\n const statement = ['@import', `url(${JSON.stringify(rule.href)})`];\n if (rule.layerName === '') {\n statement.push(`layer`);\n } else if (rule.layerName) {\n statement.push(`layer(${rule.layerName})`);\n }\n if (rule.supportsText) {\n statement.push(`supports(${rule.supportsText})`);\n }\n if (rule.media.length) {\n statement.push(rule.media.mediaText);\n }\n return statement.join(' ') + ';';\n}\n\nexport function stringifyStylesheet(s: CSSStyleSheet): string | null {\n try {\n const rules = s.rules || s.cssRules;\n if (!rules) {\n return null;\n }\n let sheetHref = s.href;\n if (!sheetHref && s.ownerNode) {\n // an inline <style> element\n sheetHref = s.ownerNode.baseURI;\n }\n const stringifiedRules = Array.from(rules, (rule: CSSRule) =>\n stringifyRule(rule, sheetHref),\n ).join('');\n return fixBrowserCompatibilityIssuesInCSS(stringifiedRules);\n } catch (error) {\n return null;\n }\n}\n\nexport function stringifyRule(rule: CSSRule, sheetHref: string | null): string {\n if (isCSSImportRule(rule)) {\n let importStringified;\n try {\n importStringified =\n // for same-origin stylesheets,\n // we can access the imported stylesheet rules directly\n stringifyStylesheet(rule.styleSheet) ||\n // work around browser issues with the raw string `@import url(...)` statement\n escapeImportStatement(rule);\n } catch (error) {\n importStringified = rule.cssText;\n }\n // if importStringified is not null,\n // there should be a stylesheet and a rule here,\n // but we avoid errors in this method by checking for null\n // see https://github.com/rrweb-io/rrweb/pull/1686\n try {\n if (importStringified && rule.styleSheet?.href) {\n // url()s within the imported stylesheet are relative to _that_ sheet's href\n return absolutifyURLs(importStringified, rule.styleSheet.href);\n }\n } catch {\n // swallow this, we'll return null\n }\n return importStringified;\n } else {\n let ruleStringified = rule.cssText;\n if (isCSSStyleRule(rule) && rule.selectorText.includes(':')) {\n // Safari does not escape selectors with : properly\n // see https://bugs.webkit.org/show_bug.cgi?id=184604\n ruleStringified = fixSafariColons(ruleStringified);\n }\n if (sheetHref) {\n return absolutifyURLs(ruleStringified, sheetHref);\n }\n return ruleStringified;\n }\n}\n\nexport function fixSafariColons(cssStringified: string): string {\n // Replace e.g. [aa:bb] with [aa\\\\:bb]\n const regex = /(\\[(?:[\\w-]+)[^\\\\])(:(?:[\\w-]+)\\])/gm;\n return cssStringified.replace(regex, '$1\\\\$2');\n}\n\nexport function isCSSImportRule(rule: CSSRule): rule is CSSImportRule {\n return 'styleSheet' in rule;\n}\n\nexport function isCSSStyleRule(rule: CSSRule): rule is CSSStyleRule {\n return 'selectorText' in rule;\n}\n\nexport class Mirror implements IMirror<Node> {\n private idNodeMap: idNodeMap = new Map();\n private nodeMetaMap: nodeMetaMap = new WeakMap();\n\n getId(n: Node | undefined | null): number {\n if (!n) return -1;\n\n const id = this.getMeta(n)?.id;\n\n // if n is not a serialized Node, use -1 as its id.\n return id ?? -1;\n }\n\n getNode(id: number): Node | null {\n return this.idNodeMap.get(id) || null;\n }\n\n getIds(): number[] {\n return Array.from(this.idNodeMap.keys());\n }\n\n getMeta(n: Node): serializedNodeWithId | null {\n return this.nodeMetaMap.get(n) || null;\n }\n\n // removes the node from idNodeMap\n // doesn't remove the node from nodeMetaMap\n removeNodeFromMap(n: Node) {\n const id = this.getId(n);\n this.idNodeMap.delete(id);\n\n if (n.childNodes) {\n n.childNodes.forEach((childNode) =>\n this.removeNodeFromMap(childNode as unknown as Node),\n );\n }\n }\n has(id: number): boolean {\n return this.idNodeMap.has(id);\n }\n\n hasNode(node: Node): boolean {\n return this.nodeMetaMap.has(node);\n }\n\n add(n: Node, meta: serializedNodeWithId) {\n const id = meta.id;\n this.idNodeMap.set(id, n);\n this.nodeMetaMap.set(n, meta);\n }\n\n replace(id: number, n: Node) {\n const oldNode = this.getNode(id);\n if (oldNode) {\n const meta = this.nodeMetaMap.get(oldNode);\n if (meta) this.nodeMetaMap.set(n, meta);\n }\n this.idNodeMap.set(id, n);\n }\n\n reset() {\n this.idNodeMap = new Map();\n this.nodeMetaMap = new WeakMap();\n }\n}\n\nexport function createMirror(): Mirror {\n return new Mirror();\n}\n\nexport function maskInputValue({\n element,\n maskInputOptions,\n tagName,\n type,\n value,\n maskInputFn,\n}: {\n element: HTMLElement;\n maskInputOptions: MaskInputOptions;\n tagName: string;\n type: string | null;\n value: string | null;\n maskInputFn?: MaskInputFn;\n}): string {\n let text = value || '';\n const actualType = type && toLowerCase(type);\n\n if (\n maskInputOptions[tagName.toLowerCase() as keyof MaskInputOptions] ||\n (actualType && maskInputOptions[actualType as keyof MaskInputOptions])\n ) {\n if (maskInputFn) {\n text = maskInputFn(text, element);\n } else {\n text = '*'.repeat(text.length);\n }\n }\n return text;\n}\n\nexport function toLowerCase<T extends string>(str: T): Lowercase<T> {\n return str.toLowerCase() as unknown as Lowercase<T>;\n}\n\nconst ORIGINAL_ATTRIBUTE_NAME = '__rrweb_original__';\ntype PatchedGetImageData = {\n [ORIGINAL_ATTRIBUTE_NAME]: CanvasImageData['getImageData'];\n} & CanvasImageData['getImageData'];\n\nexport function is2DCanvasBlank(canvas: HTMLCanvasElement): boolean {\n const ctx = canvas.getContext('2d');\n if (!ctx) return true;\n\n const chunkSize = 50;\n\n // get chunks of the canvas and check if it is blank\n for (let x = 0; x < canvas.width; x += chunkSize) {\n for (let y = 0; y < canvas.height; y += chunkSize) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const getImageData = ctx.getImageData as PatchedGetImageData;\n const originalGetImageData =\n ORIGINAL_ATTRIBUTE_NAME in getImageData\n ? getImageData[ORIGINAL_ATTRIBUTE_NAME]\n : getImageData;\n // by getting the canvas in chunks we avoid an expensive\n // `getImageData` call that retrieves everything\n // even if we can already tell from the first chunk(s) that\n // the canvas isn't blank\n const pixelBuffer = new Uint32Array(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access\n originalGetImageData.call(\n ctx,\n x,\n y,\n Math.min(chunkSize, canvas.width - x),\n Math.min(chunkSize, canvas.height - y),\n ).data.buffer,\n );\n if (pixelBuffer.some((pixel) => pixel !== 0)) return false;\n }\n }\n return true;\n}\n\nexport function isNodeMetaEqual(a: serializedNode, b: serializedNode): boolean {\n if (!a || !b || a.type !== b.type) return false;\n if (a.type === NodeType.Document)\n return a.compatMode === (b as documentNode).compatMode;\n else if (a.type === NodeType.DocumentType)\n return (\n a.name === (b as documentTypeNode).name &&\n a.publicId === (b as documentTypeNode).publicId &&\n a.systemId === (b as documentTypeNode).systemId\n );\n else if (\n a.type === NodeType.Comment ||\n a.type === NodeType.Text ||\n a.type === NodeType.CDATA\n )\n return a.textContent === (b as textNode).textContent;\n else if (a.type === NodeType.Element)\n return (\n a.tagName === (b as elementNode).tagName &&\n JSON.stringify(a.attributes) ===\n JSON.stringify((b as elementNode).attributes) &&\n a.isSVG === (b as elementNode).isSVG &&\n a.needBlock === (b as elementNode).needBlock\n );\n return false;\n}\n\n/**\n * Get the type of an input element.\n * This takes care of the case where a password input is changed to a text input.\n * In this case, we continue to consider this of type password, in order to avoid leaking sensitive data\n * where passwords should be masked.\n */\nexport function getInputType(element: HTMLElement): Lowercase<string> | null {\n // when omitting the type of input element(e.g. <input />), the type is treated as text\n const type = (element as HTMLInputElement).type;\n\n return element.hasAttribute('data-rr-is-password')\n ? 'password'\n : type\n ? // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n toLowerCase(type)\n : null;\n}\n\n/**\n * Extracts the file extension from an a path, considering search parameters and fragments.\n * @param path - Path to file\n * @param baseURL - [optional] Base URL of the page, used to resolve relative paths. Defaults to current page URL.\n */\nexport function extractFileExtension(\n path: string,\n baseURL?: string,\n): string | null {\n let url;\n try {\n url = new URL(path, baseURL ?? window.location.href);\n } catch (err) {\n return null;\n }\n const regex = /\\.([0-9a-z]+)(?:$)/i;\n const match = url.pathname.match(regex);\n return match?.[1] ?? null;\n}\n\nfunction extractOrigin(url: string): string {\n let origin = '';\n if (url.indexOf('//') > -1) {\n origin = url.split('/').slice(0, 3).join('/');\n } else {\n origin = url.split('/')[0];\n }\n origin = origin.split('?')[0];\n return origin;\n}\n\nconst URL_IN_CSS_REF = /url\\((?:(')([^']*)'|(\")(.*?)\"|([^)]*))\\)/gm;\nconst URL_PROTOCOL_MATCH = /^(?:[a-z+]+:)?\\/\\//i;\nconst URL_WWW_MATCH = /^www\\..*/i;\nconst DATA_URI = /^(data:)([^,]*),(.*)/i;\nexport function absolutifyURLs(cssText: string | null, href: string): string {\n return (cssText || '').replace(\n URL_IN_CSS_REF,\n (\n origin: string,\n quote1: string,\n path1: string,\n quote2: string,\n path2: string,\n path3: string,\n ) => {\n const filePath = path1 || path2 || path3;\n const maybeQuote = quote1 || quote2 || '';\n if (!filePath) {\n return origin;\n }\n if (URL_PROTOCOL_MATCH.test(filePath) || URL_WWW_MATCH.test(filePath)) {\n return `url(${maybeQuote}${filePath}${maybeQuote})`;\n }\n if (DATA_URI.test(filePath)) {\n return `url(${maybeQuote}${filePath}${maybeQuote})`;\n }\n if (filePath[0] === '/') {\n return `url(${maybeQuote}${\n extractOrigin(href) + filePath\n }${maybeQuote})`;\n }\n const stack = href.split('/');\n const parts = filePath.split('/');\n stack.pop();\n for (const part of parts) {\n if (part === '.') {\n continue;\n } else if (part === '..') {\n stack.pop();\n } else {\n stack.push(part);\n }\n }\n return `url(${maybeQuote}${stack.join('/')}${maybeQuote})`;\n },\n );\n}\n\nconst STRIPED_PLACEHOLDER_SVG =\n 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==';\n\nconst MAX_IMAGE_DIMENSION_FOR_RECOMPRESSION = 4096;\n\nexport function recompressBase64Image(\n img: HTMLImageElement,\n dataURL: string,\n type?: string,\n quality?: number,\n): string {\n if (!img.complete || img.naturalWidth === 0) {\n return dataURL;\n }\n\n // don't recompress very large images to avoid performance issues\n if (\n img.naturalWidth > MAX_IMAGE_DIMENSION_FOR_RECOMPRESSION ||\n img.naturalHeight > MAX_IMAGE_DIMENSION_FOR_RECOMPRESSION\n ) {\n return dataURL;\n }\n\n try {\n const canvas = document.createElement('canvas');\n canvas.width = img.naturalWidth;\n canvas.height = img.naturalHeight;\n const ctx = canvas.getContext('2d');\n\n if (!ctx) {\n return dataURL;\n }\n\n ctx.drawImage(img, 0, 0);\n const recompressed = canvas.toDataURL(type || 'image/webp', quality ?? 0.4);\n\n return recompressed;\n } catch (err) {\n return dataURL;\n }\n}\n\nexport function checkDataURLSize(\n dataURL: string,\n maxLength: number | undefined,\n): string {\n if (!maxLength || dataURL.length <= maxLength) {\n return dataURL;\n }\n\n return STRIPED_PLACEHOLDER_SVG;\n}\n","export enum NodeType {\n Document,\n DocumentType,\n Element,\n Text,\n CDATA,\n Comment,\n}\n\nexport type documentNode = {\n type: NodeType.Document;\n childNodes: serializedNodeWithId[];\n compatMode?: string;\n};\n\nexport type documentTypeNode = {\n type: NodeType.DocumentType;\n name: string;\n publicId: string;\n systemId: string;\n};\n\nexport type attributes = {\n [key: string]: string | number | true | null;\n};\nexport type legacyAttributes = {\n /**\n * @deprecated old bug in rrweb was causing these to always be set\n * @see https://github.com/rrweb-io/rrweb/pull/651\n */\n selected: false;\n};\n\nexport type elementNode = {\n type: NodeType.Element;\n tagName: string;\n attributes: attributes;\n childNodes: serializedNodeWithId[];\n isSVG?: true;\n needBlock?: boolean;\n // This is a custom element or not.\n isCustom?: true;\n};\n\nexport type textNode = {\n type: NodeType.Text;\n textContent: string;\n isStyle?: true;\n};\n\nexport type cdataNode = {\n type: NodeType.CDATA;\n textContent: '';\n};\n\nexport type commentNode = {\n type: NodeType.Comment;\n textContent: string;\n};\n\nexport type serializedNode = (\n | documentNode\n | documentTypeNode\n | elementNode\n | textNode\n | cdataNode\n | commentNode\n) & {\n rootId?: number;\n isShadowHost?: boolean;\n isShadow?: boolean;\n};\n\nimport type { serializedNodeWithId } from '@posthog/rrweb-types';\n\nexport type serializedElementNodeWithId = Extract<\n serializedNodeWithId,\n Record<'type', NodeType.Element>\n>;\n\nexport type tagMap = {\n [key: string]: string;\n};\n\nexport type DialogAttributes = {\n open: string;\n /**\n * Represents the dialog's open mode.\n * `modal` means the dialog is opened with `showModal()`.\n * `non-modal` means the dialog is opened with `show()` or\n * by adding an `open` attribute.\n */\n rr_open_mode: 'modal' | 'non-modal';\n /**\n * Currently unimplemented, but in future can be used to:\n * Represents the order of which of the dialog was opened.\n * This is useful for replaying the dialog `.showModal()` in the correct order.\n */\n // rr_open_mode_index?: number;\n};\n\nexport interface ICanvas extends HTMLCanvasElement {\n __context: string;\n}\n\nexport type idNodeMap = Map<number, Node>;\n\nexport type nodeMetaMap = WeakMap<Node, serializedNodeWithId>;\n\nexport type MaskInputOptions = Partial<{\n color: boolean;\n date: boolean;\n 'datetime-local': boolean;\n email: boolean;\n month: boolean;\n number: boolean;\n range: boolean;\n search: boolean;\n tel: boolean;\n text: boolean;\n time: boolean;\n url: boolean;\n week: boolean;\n // unify textarea and select element with text input\n textarea: boolean;\n select: boolean;\n password: boolean;\n}>;\n\nexport type SlimDOMOptions = Partial<{\n script: boolean;\n comment: boolean;\n headFavicon: boolean;\n headWhitespace: boolean;\n headMetaDescKeywords: boolean;\n headMetaSocial: boolean;\n headMetaRobots: boolean;\n headMetaHttpEquiv: boolean;\n headMetaAuthorship: boolean;\n headMetaVerification: boolean;\n /**\n * blocks title tag 'animations' which can generate a lot of mutations that aren't usually displayed in replayers\n **/\n headTitleMutations: boolean;\n}>;\n\nexport type MaskTextFn = (text: string, element: HTMLElement | null) => string;\nexport type MaskInputFn = (text: string, element: HTMLElement) => string;\n\nexport type KeepIframeSrcFn = (src: string) => boolean;\n\nexport type BuildCache = {\n stylesWithHoverClass: Map<string, string>;\n};\n"],"names":["NodeType","dom","shadowRoot"],"mappings":";;;AAoFG,IAACA,aAA4B,kBAAC,cAAc;AAC7C,YAAU,UAAU,UAAU,IAAI,CAAC,IAAI;AACvC,YAAU,UAAU,cAAc,IAAI,CAAC,IAAI;AAC3C,YAAU,UAAU,SAAS,IAAI,CAAC,IAAI;AACtC,YAAU,UAAU,MAAM,IAAI,CAAC,IAAI;AACnC,YAAU,UAAU,OAAO,IAAI,CAAC,IAAI;AACpC,YAAU,UAAU,SAAS,IAAI,CAAC,IAAI;AACtC,SAAO;AACT,GAAGA,cAAY,CAAA,CAAE;AC5FjB,MAAM,oBAAoB;AAAA,EACxB,MAAM,CAAC,cAAc,cAAc,iBAAiB,aAAa;AAAA,EACjE,YAAY,CAAC,QAAQ,aAAa;AAAA,EAClC,SAAS,CAAC,cAAc,iBAAiB,kBAAkB;AAAA,EAC3D,kBAAkB,CAAA;AACpB;AACA,MAAM,kBAAkB;AAAA,EACtB,MAAM,CAAC,YAAY,aAAa;AAAA,EAChC,YAAY,CAAC,cAAc;AAAA,EAC3B,SAAS,CAAA;AAAA,EACT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