{"version":3,"file":"PublicPlayer.69254b91.js","sources":["../../../app/assets/images/Record-Once-logo-405x64px-light.svg","../../../app/javascript/components/PlayerControls.vue","../../../app/javascript/components/PlayerDebugger.vue","../../../app/javascript/components/timeline/PublicPlayerTimelineItem.vue","../../../app/javascript/components/PublicPlayerTimeline.vue","../../../node_modules/rrweb-snapshot/dist/rrweb-snapshot.js","../../../app/javascript/modules/event_asset_extractor.ts","../../../app/javascript/components/PreloadStyleheetsFromEvents.vue","../../../app/javascript/modules/beep.ts","../../../app/javascript/public/PublicPlayer.vue"],"sourcesContent":["export default \"__VITE_ASSET__fc6474c2__\"","\n\n\n","\n\n\n","\n\n\n","\n\n\n","var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\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 || {});\nfunction isElement(n) {\n return n.nodeType === n.ELEMENT_NODE;\n}\nfunction isShadowRoot(n) {\n const host = n == null ? void 0 : n.host;\n return Boolean((host == null ? void 0 : host.shadowRoot) === n);\n}\nfunction isNativeShadowDom(shadowRoot) {\n return Object.prototype.toString.call(shadowRoot) === \"[object ShadowRoot]\";\n}\nfunction fixBrowserCompatibilityIssuesInCSS(cssText) {\n if (cssText.includes(\" background-clip: text;\") && !cssText.includes(\" -webkit-background-clip: text;\")) {\n cssText = cssText.replace(\n /\\sbackground-clip:\\s*text;/g,\n \" -webkit-background-clip: text; background-clip: text;\"\n );\n }\n return cssText;\n}\nfunction escapeImportStatement(rule) {\n const { cssText } = rule;\n if (cssText.split('\"').length < 3)\n return cssText;\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}\nfunction stringifyStylesheet(s) {\n try {\n const rules = s.rules || s.cssRules;\n return rules ? fixBrowserCompatibilityIssuesInCSS(\n Array.from(rules, stringifyRule).join(\"\")\n ) : null;\n } catch (error) {\n return null;\n }\n}\nfunction stringifyRule(rule) {\n let importStringified;\n if (isCSSImportRule(rule)) {\n try {\n importStringified = // for same-origin stylesheets,\n // we can access the imported stylesheet rules directly\n stringifyStylesheet(rule.styleSheet) || // work around browser issues with the raw string `@import url(...)` statement\n escapeImportStatement(rule);\n } catch (error) {\n }\n } else if (isCSSStyleRule(rule) && rule.selectorText.includes(\":\")) {\n return fixSafariColons(rule.cssText);\n }\n return importStringified || rule.cssText;\n}\nfunction fixSafariColons(cssStringified) {\n const regex = /(\\[(?:[\\w-]+)[^\\\\])(:(?:[\\w-]+)\\])/gm;\n return cssStringified.replace(regex, \"$1\\\\$2\");\n}\nfunction isCSSImportRule(rule) {\n return \"styleSheet\" in rule;\n}\nfunction isCSSStyleRule(rule) {\n return \"selectorText\" in rule;\n}\nclass Mirror {\n constructor() {\n __publicField(this, \"idNodeMap\", /* @__PURE__ */ new Map());\n __publicField(this, \"nodeMetaMap\", /* @__PURE__ */ new WeakMap());\n }\n getId(n) {\n var _a;\n if (!n)\n return -1;\n const id = (_a = this.getMeta(n)) == null ? void 0 : _a.id;\n return id ?? -1;\n }\n getNode(id) {\n return this.idNodeMap.get(id) || null;\n }\n getIds() {\n return Array.from(this.idNodeMap.keys());\n }\n getMeta(n) {\n return this.nodeMetaMap.get(n) || null;\n }\n // removes the node from idNodeMap\n // doesn't remove the node from nodeMetaMap\n removeNodeFromMap(n) {\n const id = this.getId(n);\n this.idNodeMap.delete(id);\n if (n.childNodes) {\n n.childNodes.forEach(\n (childNode) => this.removeNodeFromMap(childNode)\n );\n }\n }\n has(id) {\n return this.idNodeMap.has(id);\n }\n hasNode(node) {\n return this.nodeMetaMap.has(node);\n }\n add(n, meta) {\n const id = meta.id;\n this.idNodeMap.set(id, n);\n this.nodeMetaMap.set(n, meta);\n }\n replace(id, n) {\n const oldNode = this.getNode(id);\n if (oldNode) {\n const meta = this.nodeMetaMap.get(oldNode);\n if (meta)\n this.nodeMetaMap.set(n, meta);\n }\n this.idNodeMap.set(id, n);\n }\n reset() {\n this.idNodeMap = /* @__PURE__ */ new Map();\n this.nodeMetaMap = /* @__PURE__ */ new WeakMap();\n }\n}\nfunction createMirror() {\n return new Mirror();\n}\nfunction maskInputValue({\n element,\n maskInputOptions,\n tagName,\n type,\n value,\n maskInputFn\n}) {\n let text = value || \"\";\n const actualType = type && toLowerCase(type);\n if (maskInputOptions[tagName.toLowerCase()] || actualType && maskInputOptions[actualType]) {\n if (maskInputFn) {\n text = maskInputFn(text, element);\n } else {\n text = \"*\".repeat(text.length);\n }\n }\n return text;\n}\nfunction toLowerCase(str) {\n return str.toLowerCase();\n}\nconst ORIGINAL_ATTRIBUTE_NAME = \"__rrweb_original__\";\nfunction is2DCanvasBlank(canvas) {\n const ctx = canvas.getContext(\"2d\");\n if (!ctx)\n return true;\n const chunkSize = 50;\n for (let x = 0; x < canvas.width; x += chunkSize) {\n for (let y = 0; y < canvas.height; y += chunkSize) {\n const getImageData = ctx.getImageData;\n const originalGetImageData = ORIGINAL_ATTRIBUTE_NAME in getImageData ? getImageData[ORIGINAL_ATTRIBUTE_NAME] : getImageData;\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))\n return false;\n }\n }\n return true;\n}\nfunction isNodeMetaEqual(a, b) {\n if (!a || !b || a.type !== b.type)\n return false;\n if (a.type === NodeType.Document)\n return a.compatMode === b.compatMode;\n else if (a.type === NodeType.DocumentType)\n return a.name === b.name && a.publicId === b.publicId && a.systemId === b.systemId;\n else if (a.type === NodeType.Comment || a.type === NodeType.Text || a.type === NodeType.CDATA)\n return a.textContent === b.textContent;\n else if (a.type === NodeType.Element)\n return a.tagName === b.tagName && JSON.stringify(a.attributes) === JSON.stringify(b.attributes) && a.isSVG === b.isSVG && a.needBlock === b.needBlock;\n return false;\n}\nfunction getInputType(element) {\n const type = element.type;\n return element.hasAttribute(\"data-rr-is-password\") ? \"password\" : type ? (\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n toLowerCase(type)\n ) : null;\n}\nfunction extractFileExtension(path, baseURL) {\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 == null ? void 0 : match[1]) ?? null;\n}\nlet _id = 1;\nconst tagNameRegex = new RegExp(\"[^a-z0-9-_:]\");\nconst IGNORED_NODE = -2;\nfunction genId() {\n return _id++;\n}\nfunction getValidTagName(element) {\n if (element instanceof HTMLFormElement) {\n return \"form\";\n }\n const processedTagName = toLowerCase(element.tagName);\n if (tagNameRegex.test(processedTagName)) {\n return \"div\";\n }\n return processedTagName;\n}\nfunction extractOrigin(url) {\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}\nlet canvasService;\nlet canvasCtx;\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;\nfunction absoluteToStylesheet(cssText, href) {\n return (cssText || \"\").replace(\n URL_IN_CSS_REF,\n (origin, quote1, path1, quote2, path2, path3) => {\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}${extractOrigin(href) + filePath}${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}\nconst SRCSET_NOT_SPACES = /^[^ \\t\\n\\r\\u000c]+/;\nconst SRCSET_COMMAS_OR_SPACES = /^[, \\t\\n\\r\\u000c]+/;\nfunction getAbsoluteSrcsetString(doc, attributeValue) {\n if (attributeValue.trim() === \"\") {\n return attributeValue;\n }\n let pos = 0;\n function collectCharacters(regEx) {\n let chars;\n const match = regEx.exec(attributeValue.substring(pos));\n if (match) {\n chars = match[0];\n pos += chars.length;\n return chars;\n }\n return \"\";\n }\n const output = [];\n while (true) {\n collectCharacters(SRCSET_COMMAS_OR_SPACES);\n if (pos >= attributeValue.length) {\n break;\n }\n let url = collectCharacters(SRCSET_NOT_SPACES);\n if (url.slice(-1) === \",\") {\n url = absoluteToDoc(doc, url.substring(0, url.length - 1));\n output.push(url);\n } else {\n let descriptorsStr = \"\";\n url = absoluteToDoc(doc, url);\n let inParens = false;\n while (true) {\n const c = attributeValue.charAt(pos);\n if (c === \"\") {\n output.push((url + descriptorsStr).trim());\n break;\n } else if (!inParens) {\n if (c === \",\") {\n pos += 1;\n output.push((url + descriptorsStr).trim());\n break;\n } else if (c === \"(\") {\n inParens = true;\n }\n } else {\n if (c === \")\") {\n inParens = false;\n }\n }\n descriptorsStr += c;\n pos += 1;\n }\n }\n }\n return output.join(\", \");\n}\nconst cachedDocument = /* @__PURE__ */ new WeakMap();\nfunction absoluteToDoc(doc, attributeValue) {\n if (!attributeValue || attributeValue.trim() === \"\") {\n return attributeValue;\n }\n return getHref(doc, attributeValue);\n}\nfunction isSVGElement(el) {\n return Boolean(el.tagName === \"svg\" || el.ownerSVGElement);\n}\nfunction getHref(doc, customHref) {\n let a = cachedDocument.get(doc);\n if (!a) {\n a = doc.createElement(\"a\");\n cachedDocument.set(doc, a);\n }\n if (!customHref) {\n customHref = \"\";\n } else if (customHref.startsWith(\"blob:\") || customHref.startsWith(\"data:\")) {\n return customHref;\n }\n a.setAttribute(\"href\", customHref);\n return a.href;\n}\nfunction transformAttribute(doc, tagName, name, value) {\n if (!value) {\n return value;\n }\n if (name === \"src\" || name === \"href\" && !(tagName === \"use\" && value[0] === \"#\")) {\n return absoluteToDoc(doc, value);\n } else if (name === \"xlink:href\" && value[0] !== \"#\") {\n return absoluteToDoc(doc, value);\n } else if (name === \"background\" && (tagName === \"table\" || tagName === \"td\" || tagName === \"th\")) {\n return absoluteToDoc(doc, value);\n } else if (name === \"srcset\") {\n return getAbsoluteSrcsetString(doc, value);\n } else if (name === \"style\") {\n return absoluteToStylesheet(value, getHref(doc));\n } else if (tagName === \"object\" && name === \"data\") {\n return absoluteToDoc(doc, value);\n }\n return value;\n}\nfunction ignoreAttribute(tagName, name, _value) {\n return (tagName === \"video\" || tagName === \"audio\") && name === \"autoplay\";\n}\nfunction _isBlockedElement(element, blockClass, blockSelector) {\n try {\n if (typeof blockClass === \"string\") {\n if (element.classList.contains(blockClass)) {\n return true;\n }\n } else {\n for (let eIndex = element.classList.length; eIndex--; ) {\n const className = element.classList[eIndex];\n if (blockClass.test(className)) {\n return true;\n }\n }\n }\n if (blockSelector) {\n return element.matches(blockSelector);\n }\n } catch (e) {\n }\n return false;\n}\nfunction classMatchesRegex(node, regex, checkAncestors) {\n if (!node)\n return false;\n if (node.nodeType !== node.ELEMENT_NODE) {\n if (!checkAncestors)\n return false;\n return classMatchesRegex(node.parentNode, regex, checkAncestors);\n }\n for (let eIndex = node.classList.length; eIndex--; ) {\n const className = node.classList[eIndex];\n if (regex.test(className)) {\n return true;\n }\n }\n if (!checkAncestors)\n return false;\n return classMatchesRegex(node.parentNode, regex, checkAncestors);\n}\nfunction needMaskingText(node, maskTextClass, maskTextSelector, checkAncestors) {\n try {\n const el = node.nodeType === node.ELEMENT_NODE ? node : node.parentElement;\n if (el === null)\n return false;\n if (typeof maskTextClass === \"string\") {\n if (checkAncestors) {\n if (el.closest(`.${maskTextClass}`))\n return true;\n } else {\n if (el.classList.contains(maskTextClass))\n return true;\n }\n } else {\n if (classMatchesRegex(el, maskTextClass, checkAncestors))\n return true;\n }\n if (maskTextSelector) {\n if (checkAncestors) {\n if (el.closest(maskTextSelector))\n return true;\n } else {\n if (el.matches(maskTextSelector))\n return true;\n }\n }\n } catch (e) {\n }\n return false;\n}\nfunction onceIframeLoaded(iframeEl, listener, iframeLoadTimeout) {\n const win = iframeEl.contentWindow;\n if (!win) {\n return;\n }\n let fired = false;\n let readyState;\n try {\n readyState = win.document.readyState;\n } catch (error) {\n return;\n }\n if (readyState !== \"complete\") {\n const timer = setTimeout(() => {\n if (!fired) {\n listener();\n fired = true;\n }\n }, iframeLoadTimeout);\n iframeEl.addEventListener(\"load\", () => {\n clearTimeout(timer);\n fired = true;\n listener();\n });\n return;\n }\n const blankUrl = \"about:blank\";\n if (win.location.href !== blankUrl || iframeEl.src === blankUrl || iframeEl.src === \"\") {\n setTimeout(listener, 0);\n return iframeEl.addEventListener(\"load\", listener);\n }\n iframeEl.addEventListener(\"load\", listener);\n}\nfunction onceStylesheetLoaded(link, listener, styleSheetLoadTimeout) {\n let fired = false;\n let styleSheetLoaded;\n try {\n styleSheetLoaded = link.sheet;\n } catch (error) {\n return;\n }\n if (styleSheetLoaded)\n return;\n const timer = setTimeout(() => {\n if (!fired) {\n listener();\n fired = true;\n }\n }, styleSheetLoadTimeout);\n link.addEventListener(\"load\", () => {\n clearTimeout(timer);\n fired = true;\n listener();\n });\n}\nfunction serializeNode(n, options) {\n const {\n doc,\n mirror,\n blockClass,\n blockSelector,\n needsMask,\n inlineStylesheet,\n maskInputOptions = {},\n maskTextFn,\n maskInputFn,\n dataURLOptions = {},\n inlineImages,\n recordCanvas,\n keepIframeSrcFn,\n newlyAddedElement = false\n } = options;\n const rootId = getRootId(doc, mirror);\n switch (n.nodeType) {\n case n.DOCUMENT_NODE:\n if (n.compatMode !== \"CSS1Compat\") {\n return {\n type: NodeType.Document,\n childNodes: [],\n compatMode: n.compatMode\n // probably \"BackCompat\"\n };\n } else {\n return {\n type: NodeType.Document,\n childNodes: []\n };\n }\n case n.DOCUMENT_TYPE_NODE:\n return {\n type: NodeType.DocumentType,\n name: n.name,\n publicId: n.publicId,\n systemId: n.systemId,\n rootId\n };\n case n.ELEMENT_NODE:\n return serializeElementNode(n, {\n doc,\n blockClass,\n blockSelector,\n inlineStylesheet,\n maskInputOptions,\n maskInputFn,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n keepIframeSrcFn,\n newlyAddedElement,\n rootId\n });\n case n.TEXT_NODE:\n return serializeTextNode(n, {\n doc,\n needsMask,\n maskTextFn,\n rootId\n });\n case n.CDATA_SECTION_NODE:\n return {\n type: NodeType.CDATA,\n textContent: \"\",\n rootId\n };\n case n.COMMENT_NODE:\n return {\n type: NodeType.Comment,\n textContent: n.textContent || \"\",\n rootId\n };\n default:\n return false;\n }\n}\nfunction getRootId(doc, mirror) {\n if (!mirror.hasNode(doc))\n return void 0;\n const docId = mirror.getId(doc);\n return docId === 1 ? void 0 : docId;\n}\nfunction serializeTextNode(n, options) {\n var _a;\n const { needsMask, maskTextFn, rootId } = options;\n const parentTagName = n.parentNode && n.parentNode.tagName;\n let textContent = n.textContent;\n const isStyle = parentTagName === \"STYLE\" ? true : void 0;\n const isScript = parentTagName === \"SCRIPT\" ? true : void 0;\n if (isStyle && textContent) {\n try {\n if (n.nextSibling || n.previousSibling) {\n } else if ((_a = n.parentNode.sheet) == null ? void 0 : _a.cssRules) {\n textContent = stringifyStylesheet(\n n.parentNode.sheet\n );\n }\n } catch (err) {\n console.warn(\n `Cannot get CSS styles from text's parentNode. Error: ${err}`,\n n\n );\n }\n textContent = absoluteToStylesheet(textContent, getHref(options.doc));\n }\n if (isScript) {\n textContent = \"SCRIPT_PLACEHOLDER\";\n }\n if (!isStyle && !isScript && textContent && needsMask) {\n textContent = maskTextFn ? maskTextFn(textContent, n.parentElement) : textContent.replace(/[\\S]/g, \"*\");\n }\n return {\n type: NodeType.Text,\n textContent: textContent || \"\",\n isStyle,\n rootId\n };\n}\nfunction serializeElementNode(n, options) {\n const {\n doc,\n blockClass,\n blockSelector,\n inlineStylesheet,\n maskInputOptions = {},\n maskInputFn,\n dataURLOptions = {},\n inlineImages,\n recordCanvas,\n keepIframeSrcFn,\n newlyAddedElement = false,\n rootId\n } = options;\n const needBlock = _isBlockedElement(n, blockClass, blockSelector);\n const tagName = getValidTagName(n);\n let attributes2 = {};\n const len = n.attributes.length;\n for (let i = 0; i < len; i++) {\n const attr = n.attributes[i];\n if (!ignoreAttribute(tagName, attr.name, attr.value)) {\n attributes2[attr.name] = transformAttribute(\n doc,\n tagName,\n toLowerCase(attr.name),\n attr.value\n );\n }\n }\n if (tagName === \"link\" && inlineStylesheet) {\n const stylesheet = Array.from(doc.styleSheets).find((s) => {\n return s.href === n.href;\n });\n let cssText = null;\n if (stylesheet) {\n cssText = stringifyStylesheet(stylesheet);\n }\n if (cssText) {\n delete attributes2.rel;\n delete attributes2.href;\n attributes2._cssText = absoluteToStylesheet(cssText, stylesheet.href);\n }\n }\n if (tagName === \"style\" && n.sheet && // TODO: Currently we only try to get dynamic stylesheet when it is an empty style element\n !(n.innerText || n.textContent || \"\").trim().length) {\n const cssText = stringifyStylesheet(\n n.sheet\n );\n if (cssText) {\n attributes2._cssText = absoluteToStylesheet(cssText, getHref(doc));\n }\n }\n if (tagName === \"input\" || tagName === \"textarea\" || tagName === \"select\") {\n const value = n.value;\n const checked = n.checked;\n if (attributes2.type !== \"radio\" && attributes2.type !== \"checkbox\" && attributes2.type !== \"submit\" && attributes2.type !== \"button\" && value) {\n attributes2.value = maskInputValue({\n element: n,\n type: getInputType(n),\n tagName,\n value,\n maskInputOptions,\n maskInputFn\n });\n } else if (checked) {\n attributes2.checked = checked;\n }\n }\n if (tagName === \"option\") {\n if (n.selected && !maskInputOptions[\"select\"]) {\n attributes2.selected = true;\n } else {\n delete attributes2.selected;\n }\n }\n if (tagName === \"canvas\" && recordCanvas) {\n if (n.__context === \"2d\") {\n if (!is2DCanvasBlank(n)) {\n attributes2.rr_dataURL = n.toDataURL(\n dataURLOptions.type,\n dataURLOptions.quality\n );\n }\n } else if (!(\"__context\" in n)) {\n const canvasDataURL = n.toDataURL(\n dataURLOptions.type,\n dataURLOptions.quality\n );\n const blankCanvas = doc.createElement(\"canvas\");\n blankCanvas.width = n.width;\n blankCanvas.height = n.height;\n const blankCanvasDataURL = blankCanvas.toDataURL(\n dataURLOptions.type,\n dataURLOptions.quality\n );\n if (canvasDataURL !== blankCanvasDataURL) {\n attributes2.rr_dataURL = canvasDataURL;\n }\n }\n }\n if (tagName === \"img\" && inlineImages) {\n if (!canvasService) {\n canvasService = doc.createElement(\"canvas\");\n canvasCtx = canvasService.getContext(\"2d\");\n }\n const image = n;\n const imageSrc = image.currentSrc || image.getAttribute(\"src\") || \"\";\n const priorCrossOrigin = image.crossOrigin;\n const recordInlineImage = () => {\n image.removeEventListener(\"load\", recordInlineImage);\n try {\n canvasService.width = image.naturalWidth;\n canvasService.height = image.naturalHeight;\n canvasCtx.drawImage(image, 0, 0);\n attributes2.rr_dataURL = canvasService.toDataURL(\n dataURLOptions.type,\n dataURLOptions.quality\n );\n } catch (err) {\n if (image.crossOrigin !== \"anonymous\") {\n image.crossOrigin = \"anonymous\";\n if (image.complete && image.naturalWidth !== 0)\n recordInlineImage();\n else\n image.addEventListener(\"load\", recordInlineImage);\n return;\n } else {\n console.warn(\n `Cannot inline img src=${imageSrc}! Error: ${err}`\n );\n }\n }\n if (image.crossOrigin === \"anonymous\") {\n priorCrossOrigin ? attributes2.crossOrigin = priorCrossOrigin : image.removeAttribute(\"crossorigin\");\n }\n };\n if (image.complete && image.naturalWidth !== 0)\n recordInlineImage();\n else\n image.addEventListener(\"load\", recordInlineImage);\n }\n if (tagName === \"audio\" || tagName === \"video\") {\n const mediaAttributes = attributes2;\n mediaAttributes.rr_mediaState = n.paused ? \"paused\" : \"played\";\n mediaAttributes.rr_mediaCurrentTime = n.currentTime;\n mediaAttributes.rr_mediaPlaybackRate = n.playbackRate;\n mediaAttributes.rr_mediaMuted = n.muted;\n mediaAttributes.rr_mediaLoop = n.loop;\n mediaAttributes.rr_mediaVolume = n.volume;\n }\n if (!newlyAddedElement) {\n if (n.scrollLeft) {\n attributes2.rr_scrollLeft = n.scrollLeft;\n }\n if (n.scrollTop) {\n attributes2.rr_scrollTop = n.scrollTop;\n }\n }\n if (needBlock) {\n const { width, height } = n.getBoundingClientRect();\n attributes2 = {\n class: attributes2.class,\n rr_width: `${width}px`,\n rr_height: `${height}px`\n };\n }\n if (tagName === \"iframe\" && !keepIframeSrcFn(attributes2.src)) {\n if (!n.contentDocument) {\n attributes2.rr_src = attributes2.src;\n }\n delete attributes2.src;\n }\n let isCustomElement;\n try {\n if (customElements.get(tagName))\n isCustomElement = true;\n } catch (e) {\n }\n return {\n type: NodeType.Element,\n tagName,\n attributes: attributes2,\n childNodes: [],\n isSVG: isSVGElement(n) || void 0,\n needBlock,\n rootId,\n isCustom: isCustomElement\n };\n}\nfunction lowerIfExists(maybeAttr) {\n if (maybeAttr === void 0 || maybeAttr === null) {\n return \"\";\n } else {\n return maybeAttr.toLowerCase();\n }\n}\nfunction slimDOMExcluded(sn, slimDOMOptions) {\n if (slimDOMOptions.comment && sn.type === NodeType.Comment) {\n return true;\n } else if (sn.type === NodeType.Element) {\n if (slimDOMOptions.script && // script tag\n (sn.tagName === \"script\" || // (module)preload link\n sn.tagName === \"link\" && (sn.attributes.rel === \"preload\" || sn.attributes.rel === \"modulepreload\") && sn.attributes.as === \"script\" || // prefetch link\n sn.tagName === \"link\" && sn.attributes.rel === \"prefetch\" && typeof sn.attributes.href === \"string\" && extractFileExtension(sn.attributes.href) === \"js\")) {\n return true;\n } else if (slimDOMOptions.headFavicon && (sn.tagName === \"link\" && sn.attributes.rel === \"shortcut icon\" || sn.tagName === \"meta\" && (lowerIfExists(sn.attributes.name).match(\n /^msapplication-tile(image|color)$/\n ) || lowerIfExists(sn.attributes.name) === \"application-name\" || lowerIfExists(sn.attributes.rel) === \"icon\" || lowerIfExists(sn.attributes.rel) === \"apple-touch-icon\" || lowerIfExists(sn.attributes.rel) === \"shortcut icon\"))) {\n return true;\n } else if (sn.tagName === \"meta\") {\n if (slimDOMOptions.headMetaDescKeywords && lowerIfExists(sn.attributes.name).match(/^description|keywords$/)) {\n return true;\n } else if (slimDOMOptions.headMetaSocial && (lowerIfExists(sn.attributes.property).match(/^(og|twitter|fb):/) || // og = opengraph (facebook)\n lowerIfExists(sn.attributes.name).match(/^(og|twitter):/) || lowerIfExists(sn.attributes.name) === \"pinterest\")) {\n return true;\n } else if (slimDOMOptions.headMetaRobots && (lowerIfExists(sn.attributes.name) === \"robots\" || lowerIfExists(sn.attributes.name) === \"googlebot\" || lowerIfExists(sn.attributes.name) === \"bingbot\")) {\n return true;\n } else if (slimDOMOptions.headMetaHttpEquiv && sn.attributes[\"http-equiv\"] !== void 0) {\n return true;\n } else if (slimDOMOptions.headMetaAuthorship && (lowerIfExists(sn.attributes.name) === \"author\" || lowerIfExists(sn.attributes.name) === \"generator\" || lowerIfExists(sn.attributes.name) === \"framework\" || lowerIfExists(sn.attributes.name) === \"publisher\" || lowerIfExists(sn.attributes.name) === \"progid\" || lowerIfExists(sn.attributes.property).match(/^article:/) || lowerIfExists(sn.attributes.property).match(/^product:/))) {\n return true;\n } else if (slimDOMOptions.headMetaVerification && (lowerIfExists(sn.attributes.name) === \"google-site-verification\" || lowerIfExists(sn.attributes.name) === \"yandex-verification\" || lowerIfExists(sn.attributes.name) === \"csrf-token\" || lowerIfExists(sn.attributes.name) === \"p:domain_verify\" || lowerIfExists(sn.attributes.name) === \"verify-v1\" || lowerIfExists(sn.attributes.name) === \"verification\" || lowerIfExists(sn.attributes.name) === \"shopify-checkout-api-token\")) {\n return true;\n }\n }\n }\n return false;\n}\nfunction serializeNodeWithId(n, options) {\n const {\n doc,\n mirror,\n blockClass,\n blockSelector,\n maskTextClass,\n maskTextSelector,\n skipChild = false,\n inlineStylesheet = true,\n maskInputOptions = {},\n maskTextFn,\n maskInputFn,\n slimDOMOptions,\n dataURLOptions = {},\n inlineImages = false,\n recordCanvas = false,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout = 5e3,\n onStylesheetLoad,\n stylesheetLoadTimeout = 5e3,\n keepIframeSrcFn = () => false,\n newlyAddedElement = false\n } = options;\n let { needsMask } = options;\n let { preserveWhiteSpace = true } = options;\n if (!needsMask && n.childNodes) {\n const checkAncestors = needsMask === void 0;\n needsMask = needMaskingText(\n n,\n maskTextClass,\n maskTextSelector,\n checkAncestors\n );\n }\n const _serializedNode = serializeNode(n, {\n doc,\n mirror,\n blockClass,\n blockSelector,\n needsMask,\n inlineStylesheet,\n maskInputOptions,\n maskTextFn,\n maskInputFn,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n keepIframeSrcFn,\n newlyAddedElement\n });\n if (!_serializedNode) {\n console.warn(n, \"not serialized\");\n return null;\n }\n let id;\n if (mirror.hasNode(n)) {\n id = mirror.getId(n);\n } else if (slimDOMExcluded(_serializedNode, slimDOMOptions) || !preserveWhiteSpace && _serializedNode.type === NodeType.Text && !_serializedNode.isStyle && !_serializedNode.textContent.replace(/^\\s+|\\s+$/gm, \"\").length) {\n id = IGNORED_NODE;\n } else {\n id = genId();\n }\n const serializedNode2 = Object.assign(_serializedNode, { id });\n mirror.add(n, serializedNode2);\n if (id === IGNORED_NODE) {\n return null;\n }\n if (onSerialize) {\n onSerialize(n);\n }\n let recordChild = !skipChild;\n if (serializedNode2.type === NodeType.Element) {\n recordChild = recordChild && !serializedNode2.needBlock;\n delete serializedNode2.needBlock;\n const shadowRoot = n.shadowRoot;\n if (shadowRoot && isNativeShadowDom(shadowRoot))\n serializedNode2.isShadowHost = true;\n }\n if ((serializedNode2.type === NodeType.Document || serializedNode2.type === NodeType.Element) && recordChild) {\n if (slimDOMOptions.headWhitespace && serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"head\") {\n preserveWhiteSpace = false;\n }\n const bypassOptions = {\n doc,\n mirror,\n blockClass,\n blockSelector,\n needsMask,\n maskTextClass,\n maskTextSelector,\n skipChild,\n inlineStylesheet,\n maskInputOptions,\n maskTextFn,\n maskInputFn,\n slimDOMOptions,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n preserveWhiteSpace,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout,\n onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn\n };\n if (serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"textarea\" && serializedNode2.attributes.value !== void 0)\n ;\n else {\n for (const childN of Array.from(n.childNodes)) {\n const serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n if (serializedChildNode) {\n serializedNode2.childNodes.push(serializedChildNode);\n }\n }\n }\n if (isElement(n) && n.shadowRoot) {\n for (const childN of Array.from(n.shadowRoot.childNodes)) {\n const serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n if (serializedChildNode) {\n isNativeShadowDom(n.shadowRoot) && (serializedChildNode.isShadow = true);\n serializedNode2.childNodes.push(serializedChildNode);\n }\n }\n }\n }\n if (n.parentNode && isShadowRoot(n.parentNode) && isNativeShadowDom(n.parentNode)) {\n serializedNode2.isShadow = true;\n }\n if (serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"iframe\") {\n onceIframeLoaded(\n n,\n () => {\n const iframeDoc = n.contentDocument;\n if (iframeDoc && onIframeLoad) {\n const serializedIframeNode = serializeNodeWithId(iframeDoc, {\n doc: iframeDoc,\n mirror,\n blockClass,\n blockSelector,\n needsMask,\n maskTextClass,\n maskTextSelector,\n skipChild: false,\n inlineStylesheet,\n maskInputOptions,\n maskTextFn,\n maskInputFn,\n slimDOMOptions,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n preserveWhiteSpace,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout,\n onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn\n });\n if (serializedIframeNode) {\n onIframeLoad(\n n,\n serializedIframeNode\n );\n }\n }\n },\n iframeLoadTimeout\n );\n }\n if (serializedNode2.type === NodeType.Element && serializedNode2.tagName === \"link\" && typeof serializedNode2.attributes.rel === \"string\" && (serializedNode2.attributes.rel === \"stylesheet\" || serializedNode2.attributes.rel === \"preload\" && typeof serializedNode2.attributes.href === \"string\" && extractFileExtension(serializedNode2.attributes.href) === \"css\")) {\n onceStylesheetLoaded(\n n,\n () => {\n if (onStylesheetLoad) {\n const serializedLinkNode = serializeNodeWithId(n, {\n doc,\n mirror,\n blockClass,\n blockSelector,\n needsMask,\n maskTextClass,\n maskTextSelector,\n skipChild: false,\n inlineStylesheet,\n maskInputOptions,\n maskTextFn,\n maskInputFn,\n slimDOMOptions,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n preserveWhiteSpace,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout,\n onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn\n });\n if (serializedLinkNode) {\n onStylesheetLoad(\n n,\n serializedLinkNode\n );\n }\n }\n },\n stylesheetLoadTimeout\n );\n }\n return serializedNode2;\n}\nfunction snapshot(n, options) {\n const {\n mirror = new Mirror(),\n blockClass = \"rr-block\",\n blockSelector = null,\n maskTextClass = \"rr-mask\",\n maskTextSelector = null,\n inlineStylesheet = true,\n inlineImages = false,\n recordCanvas = false,\n maskAllInputs = false,\n maskTextFn,\n maskInputFn,\n slimDOM = false,\n dataURLOptions,\n preserveWhiteSpace,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout,\n onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn = () => false\n } = options || {};\n const maskInputOptions = maskAllInputs === true ? {\n color: true,\n date: true,\n \"datetime-local\": true,\n email: true,\n month: true,\n number: true,\n range: true,\n search: true,\n tel: true,\n text: true,\n time: true,\n url: true,\n week: true,\n textarea: true,\n select: true,\n password: true\n } : maskAllInputs === false ? {\n password: true\n } : maskAllInputs;\n const slimDOMOptions = slimDOM === true || slimDOM === \"all\" ? (\n // if true: set of sensible options that should not throw away any information\n {\n script: true,\n comment: true,\n headFavicon: true,\n headWhitespace: true,\n headMetaDescKeywords: slimDOM === \"all\",\n // destructive\n headMetaSocial: true,\n headMetaRobots: true,\n headMetaHttpEquiv: true,\n headMetaAuthorship: true,\n headMetaVerification: true\n }\n ) : slimDOM === false ? {} : slimDOM;\n return serializeNodeWithId(n, {\n doc: n,\n mirror,\n blockClass,\n blockSelector,\n maskTextClass,\n maskTextSelector,\n skipChild: false,\n inlineStylesheet,\n maskInputOptions,\n maskTextFn,\n maskInputFn,\n slimDOMOptions,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n preserveWhiteSpace,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout,\n onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn,\n newlyAddedElement: false\n });\n}\nfunction visitSnapshot(node, onVisit) {\n function walk(current) {\n onVisit(current);\n if (current.type === NodeType.Document || current.type === NodeType.Element) {\n current.childNodes.forEach(walk);\n }\n }\n walk(node);\n}\nfunction cleanupSnapshot() {\n _id = 1;\n}\nconst commentre = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\nfunction parse(css, options = {}) {\n let lineno = 1;\n let column = 1;\n function updatePosition(str) {\n const lines = str.match(/\\n/g);\n if (lines) {\n lineno += lines.length;\n }\n const i = str.lastIndexOf(\"\\n\");\n column = i === -1 ? column + str.length : str.length - i;\n }\n function position() {\n const start = { line: lineno, column };\n return (node) => {\n node.position = new Position(start);\n whitespace();\n return node;\n };\n }\n const _Position = class _Position {\n constructor(start) {\n __publicField(this, \"content\");\n __publicField(this, \"start\");\n __publicField(this, \"end\");\n __publicField(this, \"source\");\n this.start = start;\n this.end = { line: lineno, column };\n this.source = options.source;\n this.content = _Position.content;\n }\n };\n __publicField(_Position, \"content\");\n let Position = _Position;\n Position.content = css;\n const errorsList = [];\n function error(msg) {\n const err = new Error(\n `${options.source || \"\"}:${lineno}:${column}: ${msg}`\n );\n err.reason = msg;\n err.filename = options.source;\n err.line = lineno;\n err.column = column;\n err.source = css;\n if (options.silent) {\n errorsList.push(err);\n } else {\n throw err;\n }\n }\n function stylesheet() {\n const rulesList = rules();\n return {\n type: \"stylesheet\",\n stylesheet: {\n source: options.source,\n rules: rulesList,\n parsingErrors: errorsList\n }\n };\n }\n function open() {\n return match(/^{\\s*/);\n }\n function close() {\n return match(/^}/);\n }\n function rules() {\n let node;\n const rules2 = [];\n whitespace();\n comments(rules2);\n while (css.length && css.charAt(0) !== \"}\" && (node = atrule() || rule())) {\n if (node) {\n rules2.push(node);\n comments(rules2);\n }\n }\n return rules2;\n }\n function match(re) {\n const m = re.exec(css);\n if (!m) {\n return;\n }\n const str = m[0];\n updatePosition(str);\n css = css.slice(str.length);\n return m;\n }\n function whitespace() {\n match(/^\\s*/);\n }\n function comments(rules2 = []) {\n let c;\n while (c = comment()) {\n if (c) {\n rules2.push(c);\n }\n c = comment();\n }\n return rules2;\n }\n function comment() {\n const pos = position();\n if (\"/\" !== css.charAt(0) || \"*\" !== css.charAt(1)) {\n return;\n }\n let i = 2;\n while (\"\" !== css.charAt(i) && (\"*\" !== css.charAt(i) || \"/\" !== css.charAt(i + 1))) {\n ++i;\n }\n i += 2;\n if (\"\" === css.charAt(i - 1)) {\n return error(\"End of comment missing\");\n }\n const str = css.slice(2, i - 2);\n column += 2;\n updatePosition(str);\n css = css.slice(i);\n column += 2;\n return pos({\n type: \"comment\",\n comment: str\n });\n }\n const selectorMatcher = new RegExp(\n \"^((\" + [\n /[^\\\\]\"(?:\\\\\"|[^\"])*\"/.source,\n // consume any quoted parts (checking that the double quote isn't itself escaped)\n /[^\\\\]'(?:\\\\'|[^'])*'/.source,\n // same but for single quotes\n \"[^{]\"\n ].join(\"|\") + \")+)\"\n );\n function selector() {\n whitespace();\n while (css[0] == \"}\") {\n error(\"extra closing bracket\");\n css = css.slice(1);\n whitespace();\n }\n const m = match(selectorMatcher);\n if (!m) {\n return;\n }\n const cleanedInput = m[0].trim().replace(/\\/\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*\\/+/g, \"\").replace(/\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'/g, (m2) => {\n return m2.replace(/,/g, \"‌\");\n });\n return customSplit(cleanedInput).map(\n (s) => s.replace(/\\u200C/g, \",\").trim()\n );\n }\n function customSplit(input) {\n const result = [];\n let currentSegment = \"\";\n let depthParentheses = 0;\n let depthBrackets = 0;\n let currentStringChar = null;\n for (const char of input) {\n const hasStringEscape = currentSegment.endsWith(\"\\\\\");\n if (currentStringChar) {\n if (currentStringChar === char && !hasStringEscape) {\n currentStringChar = null;\n }\n } else if (char === \"(\") {\n depthParentheses++;\n } else if (char === \")\") {\n depthParentheses--;\n } else if (char === \"[\") {\n depthBrackets++;\n } else if (char === \"]\") {\n depthBrackets--;\n } else if (`'\"`.includes(char)) {\n currentStringChar = char;\n }\n if (char === \",\" && depthParentheses === 0 && depthBrackets === 0) {\n result.push(currentSegment);\n currentSegment = \"\";\n } else {\n currentSegment += char;\n }\n }\n if (currentSegment) {\n result.push(currentSegment);\n }\n return result;\n }\n function declaration() {\n const pos = position();\n const propMatch = match(/^(\\*?[-#\\/\\*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/);\n if (!propMatch) {\n return;\n }\n const prop = trim(propMatch[0]);\n if (!match(/^:\\s*/)) {\n return error(`property missing ':'`);\n }\n const val = match(/^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^\\)]*?\\)|[^};])+)/);\n const ret = pos({\n type: \"declaration\",\n property: prop.replace(commentre, \"\"),\n value: val ? trim(val[0]).replace(commentre, \"\") : \"\"\n });\n match(/^[;\\s]*/);\n return ret;\n }\n function declarations() {\n const decls = [];\n if (!open()) {\n return error(`missing '{'`);\n }\n comments(decls);\n let decl;\n while (decl = declaration()) {\n if (decl !== false) {\n decls.push(decl);\n comments(decls);\n }\n decl = declaration();\n }\n if (!close()) {\n return error(`missing '}'`);\n }\n return decls;\n }\n function keyframe() {\n let m;\n const vals = [];\n const pos = position();\n while (m = match(/^((\\d+\\.\\d+|\\.\\d+|\\d+)%?|[a-z]+)\\s*/)) {\n vals.push(m[1]);\n match(/^,\\s*/);\n }\n if (!vals.length) {\n return;\n }\n return pos({\n type: \"keyframe\",\n values: vals,\n declarations: declarations()\n });\n }\n function atkeyframes() {\n const pos = position();\n let m = match(/^@([-\\w]+)?keyframes\\s*/);\n if (!m) {\n return;\n }\n const vendor = m[1];\n m = match(/^([-\\w]+)\\s*/);\n if (!m) {\n return error(\"@keyframes missing name\");\n }\n const name = m[1];\n if (!open()) {\n return error(`@keyframes missing '{'`);\n }\n let frame;\n let frames = comments();\n while (frame = keyframe()) {\n frames.push(frame);\n frames = frames.concat(comments());\n }\n if (!close()) {\n return error(`@keyframes missing '}'`);\n }\n return pos({\n type: \"keyframes\",\n name,\n vendor,\n keyframes: frames\n });\n }\n function atsupports() {\n const pos = position();\n const m = match(/^@supports *([^{]+)/);\n if (!m) {\n return;\n }\n const supports = trim(m[1]);\n if (!open()) {\n return error(`@supports missing '{'`);\n }\n const style = comments().concat(rules());\n if (!close()) {\n return error(`@supports missing '}'`);\n }\n return pos({\n type: \"supports\",\n supports,\n rules: style\n });\n }\n function athost() {\n const pos = position();\n const m = match(/^@host\\s*/);\n if (!m) {\n return;\n }\n if (!open()) {\n return error(`@host missing '{'`);\n }\n const style = comments().concat(rules());\n if (!close()) {\n return error(`@host missing '}'`);\n }\n return pos({\n type: \"host\",\n rules: style\n });\n }\n function atmedia() {\n const pos = position();\n const m = match(/^@media *([^{]+)/);\n if (!m) {\n return;\n }\n const media = trim(m[1]);\n if (!open()) {\n return error(`@media missing '{'`);\n }\n const style = comments().concat(rules());\n if (!close()) {\n return error(`@media missing '}'`);\n }\n return pos({\n type: \"media\",\n media,\n rules: style\n });\n }\n function atcustommedia() {\n const pos = position();\n const m = match(/^@custom-media\\s+(--[^\\s]+)\\s*([^{;]+);/);\n if (!m) {\n return;\n }\n return pos({\n type: \"custom-media\",\n name: trim(m[1]),\n media: trim(m[2])\n });\n }\n function atpage() {\n const pos = position();\n const m = match(/^@page */);\n if (!m) {\n return;\n }\n const sel = selector() || [];\n if (!open()) {\n return error(`@page missing '{'`);\n }\n let decls = comments();\n let decl;\n while (decl = declaration()) {\n decls.push(decl);\n decls = decls.concat(comments());\n }\n if (!close()) {\n return error(`@page missing '}'`);\n }\n return pos({\n type: \"page\",\n selectors: sel,\n declarations: decls\n });\n }\n function atdocument() {\n const pos = position();\n const m = match(/^@([-\\w]+)?document *([^{]+)/);\n if (!m) {\n return;\n }\n const vendor = trim(m[1]);\n const doc = trim(m[2]);\n if (!open()) {\n return error(`@document missing '{'`);\n }\n const style = comments().concat(rules());\n if (!close()) {\n return error(`@document missing '}'`);\n }\n return pos({\n type: \"document\",\n document: doc,\n vendor,\n rules: style\n });\n }\n function atfontface() {\n const pos = position();\n const m = match(/^@font-face\\s*/);\n if (!m) {\n return;\n }\n if (!open()) {\n return error(`@font-face missing '{'`);\n }\n let decls = comments();\n let decl;\n while (decl = declaration()) {\n decls.push(decl);\n decls = decls.concat(comments());\n }\n if (!close()) {\n return error(`@font-face missing '}'`);\n }\n return pos({\n type: \"font-face\",\n declarations: decls\n });\n }\n const atimport = _compileAtrule(\"import\");\n const atcharset = _compileAtrule(\"charset\");\n const atnamespace = _compileAtrule(\"namespace\");\n function _compileAtrule(name) {\n const re = new RegExp(\n \"^@\" + name + \"\\\\s*((?:\" + [\n /[^\\\\]\"(?:\\\\\"|[^\"])*\"/.source,\n // consume any quoted parts (checking that the double quote isn't itself escaped)\n /[^\\\\]'(?:\\\\'|[^'])*'/.source,\n // same but for single quotes\n \"[^;]\"\n ].join(\"|\") + \")+);\"\n );\n return () => {\n const pos = position();\n const m = match(re);\n if (!m) {\n return;\n }\n const ret = { type: name };\n ret[name] = m[1].trim();\n return pos(ret);\n };\n }\n function atrule() {\n if (css[0] !== \"@\") {\n return;\n }\n return atkeyframes() || atmedia() || atcustommedia() || atsupports() || atimport() || atcharset() || atnamespace() || atdocument() || atpage() || athost() || atfontface();\n }\n function rule() {\n const pos = position();\n const sel = selector();\n if (!sel) {\n return error(\"selector missing\");\n }\n comments();\n return pos({\n type: \"rule\",\n selectors: sel,\n declarations: declarations()\n });\n }\n return addParent(stylesheet());\n}\nfunction trim(str) {\n return str ? str.replace(/^\\s+|\\s+$/g, \"\") : \"\";\n}\nfunction addParent(obj, parent) {\n const isNode = obj && typeof obj.type === \"string\";\n const childParent = isNode ? obj : parent;\n for (const k of Object.keys(obj)) {\n const value = obj[k];\n if (Array.isArray(value)) {\n value.forEach((v) => {\n addParent(v, childParent);\n });\n } else if (value && typeof value === \"object\") {\n addParent(value, childParent);\n }\n }\n if (isNode) {\n Object.defineProperty(obj, \"parent\", {\n configurable: true,\n writable: true,\n enumerable: false,\n value: parent || null\n });\n }\n return obj;\n}\nconst tagMap = {\n script: \"noscript\",\n // camel case svg element tag names\n altglyph: \"altGlyph\",\n altglyphdef: \"altGlyphDef\",\n altglyphitem: \"altGlyphItem\",\n animatecolor: \"animateColor\",\n animatemotion: \"animateMotion\",\n animatetransform: \"animateTransform\",\n clippath: \"clipPath\",\n feblend: \"feBlend\",\n fecolormatrix: \"feColorMatrix\",\n fecomponenttransfer: \"feComponentTransfer\",\n fecomposite: \"feComposite\",\n feconvolvematrix: \"feConvolveMatrix\",\n fediffuselighting: \"feDiffuseLighting\",\n fedisplacementmap: \"feDisplacementMap\",\n fedistantlight: \"feDistantLight\",\n fedropshadow: \"feDropShadow\",\n feflood: \"feFlood\",\n fefunca: \"feFuncA\",\n fefuncb: \"feFuncB\",\n fefuncg: \"feFuncG\",\n fefuncr: \"feFuncR\",\n fegaussianblur: \"feGaussianBlur\",\n feimage: \"feImage\",\n femerge: \"feMerge\",\n femergenode: \"feMergeNode\",\n femorphology: \"feMorphology\",\n feoffset: \"feOffset\",\n fepointlight: \"fePointLight\",\n fespecularlighting: \"feSpecularLighting\",\n fespotlight: \"feSpotLight\",\n fetile: \"feTile\",\n feturbulence: \"feTurbulence\",\n foreignobject: \"foreignObject\",\n glyphref: \"glyphRef\",\n lineargradient: \"linearGradient\",\n radialgradient: \"radialGradient\"\n};\nfunction getTagName(n) {\n let tagName = tagMap[n.tagName] ? tagMap[n.tagName] : n.tagName;\n if (tagName === \"link\" && n.attributes._cssText) {\n tagName = \"style\";\n }\n return tagName;\n}\nfunction escapeRegExp(str) {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\nconst MEDIA_SELECTOR = /(max|min)-device-(width|height)/;\nconst MEDIA_SELECTOR_GLOBAL = new RegExp(MEDIA_SELECTOR.source, \"g\");\nconst HOVER_SELECTOR = /([^\\\\]):hover/;\nconst HOVER_SELECTOR_GLOBAL = new RegExp(HOVER_SELECTOR.source, \"g\");\nfunction adaptCssForReplay(cssText, cache) {\n const cachedStyle = cache == null ? void 0 : cache.stylesWithHoverClass.get(cssText);\n if (cachedStyle)\n return cachedStyle;\n const ast = parse(cssText, {\n silent: true\n });\n if (!ast.stylesheet) {\n return cssText;\n }\n const selectors = [];\n const medias = [];\n function getSelectors(rule) {\n if (\"selectors\" in rule && rule.selectors) {\n rule.selectors.forEach((selector) => {\n if (HOVER_SELECTOR.test(selector)) {\n selectors.push(selector);\n }\n });\n }\n if (\"media\" in rule && rule.media && MEDIA_SELECTOR.test(rule.media)) {\n medias.push(rule.media);\n }\n if (\"rules\" in rule && rule.rules) {\n rule.rules.forEach(getSelectors);\n }\n }\n getSelectors(ast.stylesheet);\n let result = cssText;\n if (selectors.length > 0) {\n const selectorMatcher = new RegExp(\n selectors.filter((selector, index) => selectors.indexOf(selector) === index).sort((a, b) => b.length - a.length).map((selector) => {\n return escapeRegExp(selector);\n }).join(\"|\"),\n \"g\"\n );\n result = result.replace(selectorMatcher, (selector) => {\n const newSelector = selector.replace(\n HOVER_SELECTOR_GLOBAL,\n \"$1.\\\\:hover\"\n );\n return `${selector}, ${newSelector}`;\n });\n }\n if (medias.length > 0) {\n const mediaMatcher = new RegExp(\n medias.filter((media, index) => medias.indexOf(media) === index).sort((a, b) => b.length - a.length).map((media) => {\n return escapeRegExp(media);\n }).join(\"|\"),\n \"g\"\n );\n result = result.replace(mediaMatcher, (media) => {\n return media.replace(MEDIA_SELECTOR_GLOBAL, \"$1-$2\");\n });\n }\n cache == null ? void 0 : cache.stylesWithHoverClass.set(cssText, result);\n return result;\n}\nfunction createCache() {\n const stylesWithHoverClass = /* @__PURE__ */ new Map();\n return {\n stylesWithHoverClass\n };\n}\nfunction buildNode(n, options) {\n var _a;\n const { doc, hackCss, cache } = options;\n switch (n.type) {\n case NodeType.Document:\n return doc.implementation.createDocument(null, \"\", null);\n case NodeType.DocumentType:\n return doc.implementation.createDocumentType(\n n.name || \"html\",\n n.publicId,\n n.systemId\n );\n case NodeType.Element: {\n const tagName = getTagName(n);\n let node;\n if (n.isSVG) {\n node = doc.createElementNS(\"http://www.w3.org/2000/svg\", tagName);\n } else {\n if (\n // If the tag name is a custom element name\n n.isCustom && // If the browser supports custom elements\n ((_a = doc.defaultView) == null ? void 0 : _a.customElements) && // If the custom element hasn't been defined yet\n !doc.defaultView.customElements.get(n.tagName)\n )\n doc.defaultView.customElements.define(\n n.tagName,\n class extends doc.defaultView.HTMLElement {\n }\n );\n node = doc.createElement(tagName);\n }\n const specialAttributes = {};\n for (const name in n.attributes) {\n if (!Object.prototype.hasOwnProperty.call(n.attributes, name)) {\n continue;\n }\n let value = n.attributes[name];\n if (tagName === \"option\" && name === \"selected\" && value === false) {\n continue;\n }\n if (value === null) {\n continue;\n }\n if (value === true)\n value = \"\";\n if (name.startsWith(\"rr_\")) {\n specialAttributes[name] = value;\n continue;\n }\n const isTextarea = tagName === \"textarea\" && name === \"value\";\n const isRemoteOrDynamicCss = tagName === \"style\" && name === \"_cssText\";\n if (isRemoteOrDynamicCss && hackCss && typeof value === \"string\") {\n value = adaptCssForReplay(value, cache);\n }\n if ((isTextarea || isRemoteOrDynamicCss) && typeof value === \"string\") {\n node.appendChild(doc.createTextNode(value));\n n.childNodes = [];\n continue;\n }\n try {\n if (n.isSVG && name === \"xlink:href\") {\n node.setAttributeNS(\n \"http://www.w3.org/1999/xlink\",\n name,\n value.toString()\n );\n } else if (name === \"onload\" || name === \"onclick\" || name.substring(0, 7) === \"onmouse\") {\n node.setAttribute(\"_\" + name, value.toString());\n } else if (tagName === \"meta\" && n.attributes[\"http-equiv\"] === \"Content-Security-Policy\" && name === \"content\") {\n node.setAttribute(\"csp-content\", value.toString());\n continue;\n } else if (tagName === \"link\" && (n.attributes.rel === \"preload\" || n.attributes.rel === \"modulepreload\") && n.attributes.as === \"script\") {\n } else if (tagName === \"link\" && n.attributes.rel === \"prefetch\" && typeof n.attributes.href === \"string\" && n.attributes.href.endsWith(\".js\")) {\n } else if (tagName === \"img\" && n.attributes.srcset && n.attributes.rr_dataURL) {\n node.setAttribute(\n \"rrweb-original-srcset\",\n n.attributes.srcset\n );\n } else {\n node.setAttribute(name, value.toString());\n }\n } catch (error) {\n }\n }\n for (const name in specialAttributes) {\n const value = specialAttributes[name];\n if (tagName === \"canvas\" && name === \"rr_dataURL\") {\n const image = doc.createElement(\"img\");\n image.onload = () => {\n const ctx = node.getContext(\"2d\");\n if (ctx) {\n ctx.drawImage(image, 0, 0, image.width, image.height);\n }\n };\n image.src = value.toString();\n if (node.RRNodeType)\n node.rr_dataURL = value.toString();\n } else if (tagName === \"img\" && name === \"rr_dataURL\") {\n const image = node;\n if (!image.currentSrc.startsWith(\"data:\")) {\n image.setAttribute(\n \"rrweb-original-src\",\n n.attributes.src\n );\n image.src = value.toString();\n }\n }\n if (name === \"rr_width\") {\n node.style.width = value.toString();\n } else if (name === \"rr_height\") {\n node.style.height = value.toString();\n } else if (name === \"rr_mediaCurrentTime\" && typeof value === \"number\") {\n node.currentTime = value;\n } else if (name === \"rr_mediaState\") {\n switch (value) {\n case \"played\":\n node.play().catch((e) => console.warn(\"media playback error\", e));\n break;\n case \"paused\":\n node.pause();\n break;\n }\n } else if (name === \"rr_mediaPlaybackRate\" && typeof value === \"number\") {\n node.playbackRate = value;\n } else if (name === \"rr_mediaMuted\" && typeof value === \"boolean\") {\n node.muted = value;\n } else if (name === \"rr_mediaLoop\" && typeof value === \"boolean\") {\n node.loop = value;\n } else if (name === \"rr_mediaVolume\" && typeof value === \"number\") {\n node.volume = value;\n }\n }\n if (n.isShadowHost) {\n if (!node.shadowRoot) {\n node.attachShadow({ mode: \"open\" });\n } else {\n while (node.shadowRoot.firstChild) {\n node.shadowRoot.removeChild(node.shadowRoot.firstChild);\n }\n }\n }\n return node;\n }\n case NodeType.Text:\n return doc.createTextNode(\n n.isStyle && hackCss ? adaptCssForReplay(n.textContent, cache) : n.textContent\n );\n case NodeType.CDATA:\n return doc.createCDATASection(n.textContent);\n case NodeType.Comment:\n return doc.createComment(n.textContent);\n default:\n return null;\n }\n}\nfunction buildNodeWithSN(n, options) {\n const {\n doc,\n mirror,\n skipChild = false,\n hackCss = true,\n afterAppend,\n cache\n } = options;\n if (mirror.has(n.id)) {\n const nodeInMirror = mirror.getNode(n.id);\n const meta = mirror.getMeta(nodeInMirror);\n if (isNodeMetaEqual(meta, n))\n return mirror.getNode(n.id);\n }\n let node = buildNode(n, { doc, hackCss, cache });\n if (!node) {\n return null;\n }\n if (n.rootId && mirror.getNode(n.rootId) !== doc) {\n mirror.replace(n.rootId, doc);\n }\n if (n.type === NodeType.Document) {\n doc.close();\n doc.open();\n if (n.compatMode === \"BackCompat\" && n.childNodes && n.childNodes[0].type !== NodeType.DocumentType) {\n if (n.childNodes[0].type === NodeType.Element && \"xmlns\" in n.childNodes[0].attributes && n.childNodes[0].attributes.xmlns === \"http://www.w3.org/1999/xhtml\") {\n doc.write(\n ''\n );\n } else {\n doc.write(\n ''\n );\n }\n }\n node = doc;\n }\n mirror.add(node, n);\n if ((n.type === NodeType.Document || n.type === NodeType.Element) && !skipChild) {\n for (const childN of n.childNodes) {\n const childNode = buildNodeWithSN(childN, {\n doc,\n mirror,\n skipChild: false,\n hackCss,\n afterAppend,\n cache\n });\n if (!childNode) {\n console.warn(\"Failed to rebuild\", childN);\n continue;\n }\n if (childN.isShadow && isElement(node) && node.shadowRoot) {\n node.shadowRoot.appendChild(childNode);\n } else if (n.type === NodeType.Document && childN.type == NodeType.Element) {\n const htmlElement = childNode;\n let body = null;\n htmlElement.childNodes.forEach((child) => {\n if (child.nodeName === \"BODY\")\n body = child;\n });\n if (body) {\n htmlElement.removeChild(body);\n node.appendChild(childNode);\n htmlElement.appendChild(body);\n } else {\n node.appendChild(childNode);\n }\n } else {\n node.appendChild(childNode);\n }\n if (afterAppend) {\n afterAppend(childNode, childN.id);\n }\n }\n }\n return node;\n}\nfunction visit(mirror, onVisit) {\n function walk(node) {\n onVisit(node);\n }\n for (const id of mirror.getIds()) {\n if (mirror.has(id)) {\n walk(mirror.getNode(id));\n }\n }\n}\nfunction handleScroll(node, mirror) {\n const n = mirror.getMeta(node);\n if ((n == null ? void 0 : n.type) !== NodeType.Element) {\n return;\n }\n const el = node;\n for (const name in n.attributes) {\n if (!(Object.prototype.hasOwnProperty.call(n.attributes, name) && name.startsWith(\"rr_\"))) {\n continue;\n }\n const value = n.attributes[name];\n if (name === \"rr_scrollLeft\") {\n el.scrollLeft = value;\n }\n if (name === \"rr_scrollTop\") {\n el.scrollTop = value;\n }\n }\n}\nfunction rebuild(n, options) {\n const {\n doc,\n onVisit,\n hackCss = true,\n afterAppend,\n cache,\n mirror = new Mirror()\n } = options;\n const node = buildNodeWithSN(n, {\n doc,\n mirror,\n skipChild: false,\n hackCss,\n afterAppend,\n cache\n });\n visit(mirror, (visitedNode) => {\n if (onVisit) {\n onVisit(visitedNode);\n }\n handleScroll(visitedNode, mirror);\n });\n return node;\n}\nexport {\n IGNORED_NODE,\n Mirror,\n NodeType,\n adaptCssForReplay,\n buildNodeWithSN,\n classMatchesRegex,\n cleanupSnapshot,\n createCache,\n createMirror,\n escapeImportStatement,\n extractFileExtension,\n fixSafariColons,\n genId,\n getInputType,\n ignoreAttribute,\n is2DCanvasBlank,\n isCSSImportRule,\n isCSSStyleRule,\n isElement,\n isNativeShadowDom,\n isNodeMetaEqual,\n isShadowRoot,\n maskInputValue,\n needMaskingText,\n rebuild,\n serializeNodeWithId,\n snapshot,\n stringifyRule,\n stringifyStylesheet,\n toLowerCase,\n transformAttribute,\n visitSnapshot\n};\n//# sourceMappingURL=rrweb-snapshot.js.map\n","import type { documentNode, elementNode } from \"rrweb-snapshot\";\nimport { NodeType } from \"rrweb-snapshot\";\nimport { EventType } from \"rrweb\";\nimport type { eventWithTime, fullSnapshotEvent } from \"@rrweb/types\";\n\n// TODO: take into account media conditions: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-media\n// for example its best to filter out css files that are only used in print\n\nconst getHTMLElementNode = (event: fullSnapshotEvent): elementNode | undefined => {\n const { node } = event.data;\n if (node.type !== NodeType.Document) return undefined;\n const HTMLElement = node.childNodes.find(\n (element) => element.type === NodeType.Element && element.tagName === \"html\",\n ) as elementNode | undefined;\n\n return HTMLElement;\n};\n\n// function that loops through nested child nodes to find nodes with tagname link\nconst getLinksFromHTMLElementNode = (node: elementNode | documentNode): elementNode[] => {\n const links: elementNode[] = [];\n\n const { childNodes } = node;\n for (const childNode of childNodes) {\n if (\n childNode.type === NodeType.Element &&\n childNode.tagName === \"link\" &&\n childNode.attributes.href &&\n childNode.attributes.rel === \"stylesheet\"\n ) {\n links.push(childNode);\n }\n if (\"childNodes\" in childNode && childNode.childNodes.length > 0) {\n links.push(...getLinksFromHTMLElementNode(childNode));\n }\n }\n return links;\n};\n\nexport const extractStylesheets = (events: eventWithTime[]): string[] => {\n const links = new Set();\n\n events.forEach((event) => {\n if (event.type !== EventType.FullSnapshot) return;\n const HTMLElement = getHTMLElementNode(event);\n if (!HTMLElement) return;\n\n getLinksFromHTMLElementNode(HTMLElement).forEach((link) => {\n if (typeof link.attributes.href !== \"string\") return;\n links.add(link.attributes.href);\n });\n });\n\n // flatten and remove undefined values\n return [...links] as string[];\n};\nexport default extractStylesheets;\n","\n\n\n","import { noop } from 'lodash';\n\n\nexport function beep({\n duration = 500,\n frequency = 400,\n volume = 1,\n type = 'sine',\n callback = noop,\n}: {\n duration?: number,\n frequency?: number,\n volume?: number,\n type?: OscillatorNode['type'],\n callback?: () => void,\n}): void {\n const audioCtx = new AudioContext();\n const oscillator = audioCtx.createOscillator();\n const gainNode = audioCtx.createGain();\n\n oscillator.connect(gainNode);\n gainNode.connect(audioCtx.destination);\n\n if (volume) {\n gainNode.gain.value = volume;\n }\n if (frequency) {\n oscillator.frequency.value = frequency;\n }\n if (type) {\n oscillator.type = type;\n }\n if (callback) {\n oscillator.onended = callback;\n }\n\n oscillator.start(audioCtx.currentTime);\n oscillator.stop(audioCtx.currentTime + (duration || 500) / 1000);\n};\n\nexport default beep;","\n\n\n\n\n"],"names":["_imports_0","muted","toggleMuted","videoHasSubtitles","subtitlesEnabled","toggleSubtitles","firstAction","currentAction","currentActionIndex","previousAction","nextAction","elapsedTime","formattedElapsedTime","formattedRemainingTime","goTo","usePlayerControls","props","emit","status","computed","toggleButtonIcon","toggleLabel","formattedVideoRuntime","formatSecondsAsString","languageCode","ref","sortedLanguages","a","b","watch","newLanguageCode","_sfc_main","defineComponent","Video","Action","_hoisted_4","_ctx","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_cache","_hoisted_2","_hoisted_3","_Fragment","_renderList","action","_normalizeStyle","$event","_hoisted_5","_toDisplayString","_createTextVNode","_createCommentVNode","inTheFuture","selectActionId","id","groups","getGroupWidthPercentage","useCachedTimeBasedTimeline","calculateStartAt","actionId","allGroups","startAt","group","NodeType","NodeType2","getHTMLElementNode","event","node","element","getLinksFromHTMLElementNode","links","childNodes","childNode","extractStylesheets","events","EventType","HTMLElement","link","assets","refreshAssets","onMounted","listenToEvent","beep","duration","frequency","volume","type","callback","noop","audioCtx","oscillator","gainNode","HEADLESS_STATUS_BAR_HEIGHT","router","useRouter","eventsApi","axios","isLoading","isLoadingEvents","playerIsReady","_a","shouldBePlaying","isPlaying","isSeeking","hasStartedPlayer","isFinished","videoId","currentActionId","error","lastToggleAction","isFullScreen","showAboutScreen","aboutScreen","lastToggledPlayAt","idle","lastActive","useIdle","inInitialState","openAboutScreen","pause","onClickOutside","video","audioRecordings","AudioRecording","voiceOvers","VoiceOver","showDebugger","switchLanguage","code","fullscreenIsSupported","isFullscreen","toggleFullScreen","useFullscreen","playerRoot","mouseIsOutsidePlayerRoot","useMouseInElement","windowSize","useWindowSize","showToggle","showControls","showTimeline","showHeader","lastToggleActionIcon","toggleIcon","visibleActions","value","videoRuntime","calculateRuntime","videoDimensions","_b","setActionPreviewable","useActionManipulators","toggleButton","triggerToggleButton","nextTick","play","_c","newPlayingState","onBeforeUnmount","isBuffering","sendToAppsignal","useAppsignal","togglePlay","triggerSilentAudioPlayback","isReady","clapboard","val","preferredLanguageCodes","usePreferredLanguages","preferredAvailableLanguages","l","currentLanguageCode","translatedLanguageCodeForAPI","onBeforeMount","vid","eventsResponse","eventHub","err","getErrorMessage","onUnmounted","reachedActionId","jumpToActionId","provideElapsedTime","provide"],"mappings":"6qCAAA,IAAeA,GAAA,+hCCiCT,CACJ,MAAAC,EACA,YAAAC,EACA,kBAAAC,EACA,iBAAAC,EACA,gBAAAC,EACA,YAAAC,EACA,cAAAC,EACA,mBAAAC,EACA,eAAAC,EACA,WAAAC,EACA,YAAAC,EACA,qBAAAC,EACA,uBAAAC,EACA,KAAAC,CAAA,EACEC,GAAkBC,EAAOC,CAAI,EAE3BC,EAASC,EAAS,IAClBH,EAAM,UAAkB,UACrBR,EAAmB,QAAUQ,EAAM,QAAQ,OAAS,EAAI,YAAc,QAC9E,EAEKI,EAAmBD,EAAS,IAC5BD,EAAO,QAAU,YACZ,8BAELA,EAAO,QAAU,UAAkB,aAChC,WACR,EAEKG,GAAcF,EAAS,IACvBD,EAAO,QAAU,YACZ,SAELA,EAAO,QAAU,UAAkB,QAChC,MACR,EAEKI,GAAwBH,EAAS,IAAMI,GAAsBP,EAAM,YAAY,CAAC,EAEhFQ,EAAeC,EAAIT,EAAM,mBAAmB,EAC5CU,EAAkBP,EAAS,IAC/B,CAAC,GAAIH,EAAM,WAAa,CAAG,CAAA,EAAE,KAAK,CAACW,EAAGC,IAAMD,EAAE,KAAK,cAAcC,EAAE,IAAI,CAAC,CAAA,EAEpE,OAAAC,GAAAL,EAAeM,GAAoB,CACnCA,GAAiBb,EAAK,kBAAmBa,CAAe,CAAA,CAC7D,4rHCvEIC,GAAaC,EAAa,CAC7B,WAAY,CAAC,EACb,MAAO,CACL,QAAS,CACP,KAAM,OACN,SAAU,EACZ,EACA,gBAAiB,CACf,KAAM,OACN,SAAU,GACV,QAAS,IACX,EACA,UAAW,CACT,KAAM,QACN,QAAS,EACX,EACA,UAAW,CACT,KAAM,QACN,QAAS,EACX,CACF,EACA,MAAO,CAAC,oBAAqB,OAAQ,OAAO,EAC5C,SAAU,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