@posthog/rrweb-snapshot 0.0.36 → 0.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  (function (g, f) {if ("object" == typeof exports && "object" == typeof module) {module.exports = f();} else if ("function" == typeof define && define.amd) {define("rrwebSnapshotRecord", [], f);} else if ("object" == typeof exports) {exports["rrwebSnapshotRecord"] = f();} else {g["rrwebSnapshotRecord"] = f();}}(typeof self !== 'undefined' ? self : typeof globalThis !== 'undefined' ? globalThis : this, () => {var exports = {};var module = { exports };
2
- "use strict";var xe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var pe=xe(S=>{"use strict";var Ce=Object.defineProperty,Ee=(e,t,r)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ee=(e,t,r)=>Ee(e,typeof t!="symbol"?t+"":t,r),k=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(k||{}),te={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},re={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},z={};function we(e){var t,r;let i=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(i&&globalThis[i])return globalThis[i]}function J(e){if(z[e])return z[e];let t=we(e)||globalThis[e],r=t.prototype,i=e in te?te[e]:void 0,o=!!(i&&i.every(u=>{var l,f;return!!((f=(l=Object.getOwnPropertyDescriptor(r,u))==null?void 0:l.get)!=null&&f.toString().includes("[native code]"))})),a=e in re?re[e]:void 0,c=!!(a&&a.every(u=>{var l;return typeof r[u]=="function"&&((l=r[u])==null?void 0:l.toString().includes("[native code]"))}));if(o&&c)return z[e]=t.prototype,t.prototype;try{let u=document.createElement("iframe");document.body.appendChild(u);let l=u.contentWindow;if(!l)return t.prototype;let f=l[e].prototype;return document.body.removeChild(u),f?z[e]=f:r}catch(u){return r}}var V={};function A(e,t,r){var i;let o=`${e}.${String(r)}`;if(V[o])return V[o].call(t);let a=J(e),c=(i=Object.getOwnPropertyDescriptor(a,r))==null?void 0:i.get;return c?(V[o]=c,c.call(t)):t[r]}var G={};function ne(e,t,r){let i=`${e}.${String(r)}`;if(G[i])return G[i].bind(t);let a=J(e)[r];return typeof a!="function"?t[r]:(G[i]=a,a.bind(t))}function ve(e){return A("Node",e,"childNodes")}function Me(e){return A("Node",e,"parentNode")}function _e(e){return A("Node",e,"parentElement")}function Te(e){return A("Node",e,"textContent")}function Re(e,t){return ne("Node",e,"contains")(t)}function De(e){return ne("Node",e,"getRootNode")()}function ke(e){return!e||!("host"in e)?null:A("ShadowRoot",e,"host")}function Ae(e){return e.styleSheets}function Le(e){return!e||!("shadowRoot"in e)?null:A("Element",e,"shadowRoot")}function $e(e,t){return A("Element",e,"querySelector")(t)}function Oe(e,t){return A("Element",e,"querySelectorAll")(t)}function Pe(){return J("MutationObserver").constructor}function Be(e,t,r){try{if(!(t in e))return()=>{};let i=e[t],o=r(i);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=o,()=>{e[t]=i}}catch(i){return()=>{}}}var q={childNodes:ve,parentNode:Me,parentElement:_e,textContent:Te,contains:Re,getRootNode:De,host:ke,styleSheets:Ae,shadowRoot:Le,querySelector:$e,querySelectorAll:Oe,mutationObserver:Pe,patch:Be};function We(e){return e.nodeType===e.ELEMENT_NODE}function ze(e){let t=e&&"host"in e&&"mode"in e&&q.host(e)||null;return!!(t&&"shadowRoot"in t&&q.shadowRoot(t)===e)}function Ue(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Fe(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function ae(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function se(e){try{let t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);let i=Array.from(t,o=>le(o,r)).join("");return Fe(i)}catch(t){return null}}function le(e,t){var r;if(ue(e)){let i;try{i=se(e.styleSheet)||ae(e)}catch(o){i=e.cssText}try{if(i&&((r=e.styleSheet)!=null&&r.href))return Y(i,e.styleSheet.href)}catch(o){}return i}else{let i=e.cssText;return de(e)&&e.selectorText.includes(":")&&(i=ce(i)),t?Y(i,t):i}}function ce(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function ue(e){return"styleSheet"in e}function de(e){return"selectorText"in e}var U=class{constructor(){ee(this,"idNodeMap",new Map),ee(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;let i=(r=this.getMeta(t))==null?void 0:r.id;return i!=null?i:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let i=r.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,r)}replace(t,r){let i=this.getNode(t);if(i){let o=this.nodeMetaMap.get(i);o&&this.nodeMetaMap.set(r,o)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function He(){return new U}function Ze({element:e,maskInputOptions:t,tagName:r,type:i,value:o,maskInputFn:a}){let c=o||"",u=i&&K(i);return(t[r.toLowerCase()]||u&&t[u])&&(a?c=a(c,e):c="*".repeat(c.length)),c}function K(e){return e.toLowerCase()}var ie="__rrweb_original__";function je(e){let t=e.getContext("2d");if(!t)return!0;let r=50;for(let i=0;i<e.width;i+=r)for(let o=0;o<e.height;o+=r){let a=t.getImageData,c=ie in a?a[ie]:a;if(new Uint32Array(c.call(t,i,o,Math.min(r,e.width-i),Math.min(r,e.height-o)).data.buffer).some(l=>l!==0))return!1}return!0}function Ve(e,t){return!e||!t||e.type!==t.type?!1:e.type===k.Document?e.compatMode===t.compatMode:e.type===k.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===k.Comment||e.type===k.Text||e.type===k.CDATA?e.textContent===t.textContent:e.type===k.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function Ge(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?K(t):null}function qe(e,t){var a;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(c){return null}let i=/\.([0-9a-z]+)(?:$)/i,o=r.pathname.match(i);return(a=o==null?void 0:o[1])!=null?a:null}function Ye(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var Je=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ke=/^(?:[a-z+]+:)?\/\//i,Xe=/^www\..*/i,Qe=/^(data:)([^,]*),(.*)/i;function Y(e,t){return(e||"").replace(Je,(r,i,o,a,c,u)=>{let l=o||c||u,f=i||a||"";if(!l)return r;if(Ke.test(l)||Xe.test(l))return`url(${f}${l}${f})`;if(Qe.test(l))return`url(${f}${l}${f})`;if(l[0]==="/")return`url(${f}${Ye(t)+l}${f})`;let p=t.split("/"),x=l.split("/");p.pop();for(let C of x)C!=="."&&(C===".."?p.pop():p.push(C));return`url(${f}${p.join("/")}${f})`})}var et="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",oe=4096;function tt(e,t,r,i){if(!e.complete||e.naturalWidth===0||e.naturalWidth>oe||e.naturalHeight>oe)return t;try{let o=document.createElement("canvas");o.width=e.naturalWidth,o.height=e.naturalHeight;let a=o.getContext("2d");return a?(a.drawImage(e,0,0),o.toDataURL(r||"image/webp",i!=null?i:.4)):t}catch(o){return t}}function rt(e,t){return!t||e.length<=t?e:et}var fe=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(fe||{});S.Mirror=U;S.NodeType=fe;S.NodeType$1=k;S.absolutifyURLs=Y;S.checkDataURLSize=rt;S.createMirror=He;S.escapeImportStatement=ae;S.extractFileExtension=qe;S.fixSafariColons=ce;S.getInputType=Ge;S.index=q;S.is2DCanvasBlank=je;S.isCSSImportRule=ue;S.isCSSStyleRule=de;S.isElement=We;S.isNativeShadowDom=Ue;S.isNodeMetaEqual=Ve;S.isShadowRoot=ze;S.maskInputValue=Ze;S.recompressBase64Image=tt;S.stringifyRule=le;S.stringifyStylesheet=se;S.toLowerCase=K});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var n=pe(),ye=1,it=new RegExp("[^a-z0-9-_:]"),X=-2;function Se(){return ye++}function ot(e){if(e instanceof HTMLFormElement)return"form";let t=n.toLowerCase(e.tagName);return it.test(t)?"div":t}var O,he,nt=/^[^ \t\n\r\u000c]+/,at=/^[, \t\n\r\u000c]+/;function st(e,t){if(t.trim()==="")return t;let r=0;function i(a){let c,u=a.exec(t.substring(r));return u?(c=u[0],r+=c.length,c):""}let o=[];for(;i(at),!(r>=t.length);){let a=i(nt);if(a.slice(-1)===",")a=P(e,a.substring(0,a.length-1)),o.push(a);else{let c="";a=P(e,a);let u=!1;for(;;){let l=t.charAt(r);if(l===""){o.push((a+c).trim());break}else if(u)l===")"&&(u=!1);else if(l===","){r+=1,o.push((a+c).trim());break}else l==="("&&(u=!0);c+=l,r+=1}}}return o.join(", ")}var me=new WeakMap;function P(e,t){return!t||t.trim()===""?t:Q(e,t)}function lt(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Q(e,t){let r=me.get(e);if(r||(r=e.createElement("a"),me.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function Ne(e,t,r,i,o,a){if(!i)return i;if(r==="src"||r==="href"&&!(t==="use"&&i[0]==="#")){let c=P(e,i);if(t==="img"&&c.startsWith("data:")&&o){let u=o,l=c;return(a!=null&&a.type||(a==null?void 0:a.quality)!==void 0)&&(l=n.recompressBase64Image(u,c,a.type,a.quality)),a!=null&&a.maxBase64ImageLength&&(l=n.checkDataURLSize(l,a.maxBase64ImageLength)),l}return c}else{if(r==="xlink:href"&&i[0]!=="#")return P(e,i);if(r==="background"&&(t==="table"||t==="td"||t==="th"))return P(e,i);if(r==="srcset")return st(e,i);if(r==="style")return n.absolutifyURLs(i,Q(e));if(t==="object"&&r==="data")return P(e,i)}return i}function be(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function ct(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let i=e.classList.length;i--;){let o=e.classList[i];if(t.test(o))return!0}if(r)return e.matches(r)}catch(i){}return!1}function F(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?F(n.index.parentNode(e),t,r):!1;for(let i=e.classList.length;i--;){let o=e.classList[i];if(t.test(o))return!0}return r?F(n.index.parentNode(e),t,r):!1}function Ie(e,t,r,i){let o;if(n.isElement(e)){if(o=e,!n.index.childNodes(o).length)return!1}else{if(n.index.parentElement(e)===null)return!1;o=n.index.parentElement(e)}try{if(typeof t=="string"){if(i){if(o.closest(`.${t}`))return!0}else if(o.classList.contains(t))return!0}else if(F(o,t,i))return!0;if(r){if(i){if(o.closest(r))return!0}else if(o.matches(r))return!0}}catch(a){}return!1}function ut(e,t,r){let i=e.contentWindow;if(!i)return;let o=!1,a;try{a=i.document.readyState}catch(u){return}if(a!=="complete"){let u=setTimeout(()=>{o||(t(),o=!0)},r);e.addEventListener("load",()=>{clearTimeout(u),o=!0,t()});return}let c="about:blank";if(i.location.href!==c||e.src===c||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function dt(e,t,r){let i=!1,o;try{o=e.sheet}catch(c){return}if(o)return;let a=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(a),i=!0,t()})}function ft(e,t){let{doc:r,mirror:i,blockClass:o,blockSelector:a,needsMask:c,inlineStylesheet:u,maskInputOptions:l={},maskTextFn:f,maskInputFn:p,dataURLOptions:x={},inlineImages:C,recordCanvas:b,keepIframeSrcFn:v,newlyAddedElement:M=!1}=t,I=pt(r,i);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:n.NodeType$1.Document,childNodes:[],compatMode:e.compatMode}:{type:n.NodeType$1.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:n.NodeType$1.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:I};case e.ELEMENT_NODE:return gt(e,{doc:r,blockClass:o,blockSelector:a,inlineStylesheet:u,maskInputOptions:l,maskInputFn:p,dataURLOptions:x,inlineImages:C,recordCanvas:b,keepIframeSrcFn:v,newlyAddedElement:M,rootId:I});case e.TEXT_NODE:return ht(e,{doc:r,needsMask:c,maskTextFn:f,rootId:I});case e.CDATA_SECTION_NODE:return{type:n.NodeType$1.CDATA,textContent:"",rootId:I};case e.COMMENT_NODE:return{type:n.NodeType$1.Comment,textContent:n.index.textContent(e)||"",rootId:I};default:return!1}}function pt(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return r===1?void 0:r}function ht(e,t){var r;let{needsMask:i,maskTextFn:o,rootId:a}=t,c=n.index.parentNode(e),u=c&&c.tagName,l=n.index.textContent(e),f=u==="STYLE"?!0:void 0,p=u==="SCRIPT"?!0:void 0;if(f&&l){try{e.nextSibling||e.previousSibling||(r=c.sheet)!=null&&r.cssRules&&(l=n.stringifyStylesheet(c.sheet))}catch(x){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${x}`,e)}l=n.absolutifyURLs(l,Q(t.doc))}return p&&(l="SCRIPT_PLACEHOLDER"),!f&&!p&&l&&i&&(l=o?o(l,n.index.parentElement(e)):l.replace(/[\S]/g,"*")),{type:n.NodeType$1.Text,textContent:l||"",isStyle:f,rootId:a}}function ge(e,t){return Array.from(e.styleSheets).find(r=>r.href===t)}function mt(e){return e.href}function gt(e,t){var r,i;let{doc:o,blockClass:a,blockSelector:c,inlineStylesheet:u,maskInputOptions:l={},maskInputFn:f,dataURLOptions:p={},inlineImages:x,recordCanvas:C,keepIframeSrcFn:b,newlyAddedElement:v=!1,rootId:M}=t,I=ct(e,a,c),g=ot(e),d={},R=e.attributes.length;for(let s=0;s<R;s++){let h=e.attributes[s];be(g,h.name,h.value)||(d[h.name]=Ne(o,g,n.toLowerCase(h.name),h.value,e,p))}if(g==="link"&&u){let s=mt(e);if(s){let h=ge(o,s);if(!h&&s.includes(".css")){let N=window.location.origin,T=s.replace(window.location.href,""),D=N+"/"+T;h=ge(o,D)}let E=null;h&&(E=n.stringifyStylesheet(h)),E&&(delete d.rel,delete d.href,d._cssText=E)}}if(g==="style"&&e.sheet&&!(e.innerText||n.index.textContent(e)||"").trim().length){let s=n.stringifyStylesheet(e.sheet);s&&(d._cssText=s)}if(g==="input"||g==="textarea"||g==="select"){let s=e.value,h=e.checked;d.type!=="radio"&&d.type!=="checkbox"&&d.type!=="submit"&&d.type!=="button"&&s?d.value=n.maskInputValue({element:e,type:n.getInputType(e),tagName:g,value:s,maskInputOptions:l,maskInputFn:f}):h&&(d.checked=h)}if(g==="option"&&(e.selected&&!l.select?d.selected=!0:delete d.selected),g==="dialog"&&e.open)try{d.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(s){d.rr_open_mode="modal",d.ph_rr_could_not_detect_modal=!0}if(g==="canvas"&&C){if(e.__context==="2d")n.is2DCanvasBlank(e)||(d.rr_dataURL=e.toDataURL(p.type,p.quality));else if(!("__context"in e)){let s=e.toDataURL(p.type,p.quality),h=o.createElement("canvas");h.width=e.width,h.height=e.height;let E=h.toDataURL(p.type,p.quality);s!==E&&(d.rr_dataURL=s)}}if(g==="img"&&x){O||(O=o.createElement("canvas"),he=O.getContext("2d"));let s=e,h=s.currentSrc||s.getAttribute("src")||"<unknown-src>",E=s.crossOrigin,N=()=>{s.removeEventListener("load",N);try{O.width=s.naturalWidth,O.height=s.naturalHeight,he.drawImage(s,0,0),d.rr_dataURL=O.toDataURL(p.type,p.quality)}catch(T){if(s.crossOrigin!=="anonymous"){s.crossOrigin="anonymous",s.complete&&s.naturalWidth!==0?N():s.addEventListener("load",N);return}else console.warn(`Cannot inline img src=${h}! Error: ${T}`)}s.crossOrigin==="anonymous"&&(E?d.crossOrigin=E:s.removeAttribute("crossorigin"))};s.complete&&s.naturalWidth!==0?N():s.addEventListener("load",N)}if(g==="audio"||g==="video"){let s=d;s.rr_mediaState=e.paused?"paused":"played",s.rr_mediaCurrentTime=e.currentTime,s.rr_mediaPlaybackRate=e.playbackRate,s.rr_mediaMuted=e.muted,s.rr_mediaLoop=e.loop,s.rr_mediaVolume=e.volume}if(v||(e.scrollLeft&&(d.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(d.rr_scrollTop=e.scrollTop)),I){let{width:s,height:h,left:E,top:N}=e.getBoundingClientRect();d={class:d.class,rr_width:`${s}px`,rr_height:`${h}px`,rr_left:`${Math.floor(E+(((r=o.defaultView)==null?void 0:r.scrollX)||0))}px`,rr_top:`${Math.floor(N+(((i=o.defaultView)==null?void 0:i.scrollY)||0))}px`}}g==="iframe"&&!b(d.src)&&(e.contentDocument||(d.rr_src=d.src),delete d.src);let _;try{customElements.get(g)&&(_=!0)}catch(s){}return{type:n.NodeType$1.Element,tagName:g,attributes:d,childNodes:[],isSVG:lt(e)||void 0,needBlock:I,rootId:M,isCustom:_}}function m(e){return e==null?"":e.toLowerCase()}function yt(e,t){if(t.comment&&e.type===n.NodeType$1.Comment)return!0;if(e.type===n.NodeType$1.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&n.extractFileExtension(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(m(e.attributes.name).match(/^msapplication-tile(image|color)$/)||m(e.attributes.name)==="application-name"||m(e.attributes.rel)==="icon"||m(e.attributes.rel)==="apple-touch-icon"||m(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&m(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(m(e.attributes.property).match(/^(og|twitter|fb):/)||m(e.attributes.name).match(/^(og|twitter):/)||m(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(m(e.attributes.name)==="robots"||m(e.attributes.name)==="googlebot"||m(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(m(e.attributes.name)==="author"||m(e.attributes.name)==="generator"||m(e.attributes.name)==="framework"||m(e.attributes.name)==="publisher"||m(e.attributes.name)==="progid"||m(e.attributes.property).match(/^article:/)||m(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(m(e.attributes.name)==="google-site-verification"||m(e.attributes.name)==="yandex-verification"||m(e.attributes.name)==="csrf-token"||m(e.attributes.name)==="p:domain_verify"||m(e.attributes.name)==="verify-v1"||m(e.attributes.name)==="verification"||m(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function B(e,t){let{doc:r,mirror:i,blockClass:o,blockSelector:a,maskTextClass:c,maskTextSelector:u,skipChild:l=!1,inlineStylesheet:f=!0,maskInputOptions:p={},maskTextFn:x,maskInputFn:C,slimDOMOptions:b,dataURLOptions:v={},inlineImages:M=!1,recordCanvas:I=!1,onSerialize:g,onIframeLoad:d,iframeLoadTimeout:R=5e3,onStylesheetLoad:_,stylesheetLoadTimeout:s=5e3,keepIframeSrcFn:h=()=>!1,newlyAddedElement:E=!1}=t,{needsMask:N}=t,{preserveWhiteSpace:T=!0}=t;N||(N=Ie(e,c,u,N===void 0));let D=ft(e,{doc:r,mirror:i,blockClass:o,blockSelector:a,needsMask:N,inlineStylesheet:f,maskInputOptions:p,maskTextFn:x,maskInputFn:C,dataURLOptions:v,inlineImages:M,recordCanvas:I,keepIframeSrcFn:h,newlyAddedElement:E});if(!D)return console.warn(e,"not serialized"),null;let W;i.hasNode(e)?W=i.getId(e):yt(D,b)||!T&&D.type===n.NodeType$1.Text&&!D.isStyle&&!D.textContent.replace(/^\s+|\s+$/gm,"").length?W=X:W=Se();let y=Object.assign(D,{id:W});if(i.add(e,y),W===X)return null;g&&g(e);let H=!l;if(y.type===n.NodeType$1.Element){H=H&&!y.needBlock,delete y.needBlock;let w=n.index.shadowRoot(e);w&&n.isNativeShadowDom(w)&&(y.isShadowHost=!0)}if((y.type===n.NodeType$1.Document||y.type===n.NodeType$1.Element)&&H){b.headWhitespace&&y.type===n.NodeType$1.Element&&y.tagName==="head"&&(T=!1);let w={doc:r,mirror:i,blockClass:o,blockSelector:a,needsMask:N,maskTextClass:c,maskTextSelector:u,skipChild:l,inlineStylesheet:f,maskInputOptions:p,maskTextFn:x,maskInputFn:C,slimDOMOptions:b,dataURLOptions:v,inlineImages:M,recordCanvas:I,preserveWhiteSpace:T,onSerialize:g,onIframeLoad:d,iframeLoadTimeout:R,onStylesheetLoad:_,stylesheetLoadTimeout:s,keepIframeSrcFn:h};if(!(y.type===n.NodeType$1.Element&&y.tagName==="textarea"&&y.attributes.value!==void 0))for(let j of Array.from(n.index.childNodes(e))){let $=B(j,w);$&&y.childNodes.push($)}let L=null;if(n.isElement(e)&&(L=n.index.shadowRoot(e)))for(let j of Array.from(n.index.childNodes(L))){let $=B(j,w);$&&(n.isNativeShadowDom(L)&&($.isShadow=!0),y.childNodes.push($))}}let Z=n.index.parentNode(e);return Z&&n.isShadowRoot(Z)&&n.isNativeShadowDom(Z)&&(y.isShadow=!0),y.type===n.NodeType$1.Element&&y.tagName==="iframe"&&ut(e,()=>{let w=e.contentDocument;if(w&&d){let L=B(w,{doc:w,mirror:i,blockClass:o,blockSelector:a,needsMask:N,maskTextClass:c,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskTextFn:x,maskInputFn:C,slimDOMOptions:b,dataURLOptions:v,inlineImages:M,recordCanvas:I,preserveWhiteSpace:T,onSerialize:g,onIframeLoad:d,iframeLoadTimeout:R,onStylesheetLoad:_,stylesheetLoadTimeout:s,keepIframeSrcFn:h});L&&d(e,L)}},R),y.type===n.NodeType$1.Element&&y.tagName==="link"&&typeof y.attributes.rel=="string"&&(y.attributes.rel==="stylesheet"||y.attributes.rel==="preload"&&typeof y.attributes.href=="string"&&n.extractFileExtension(y.attributes.href)==="css")&&dt(e,()=>{if(_){let w=B(e,{doc:r,mirror:i,blockClass:o,blockSelector:a,needsMask:N,maskTextClass:c,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskTextFn:x,maskInputFn:C,slimDOMOptions:b,dataURLOptions:v,inlineImages:M,recordCanvas:I,preserveWhiteSpace:T,onSerialize:g,onIframeLoad:d,iframeLoadTimeout:R,onStylesheetLoad:_,stylesheetLoadTimeout:s,keepIframeSrcFn:h});w&&_(e,w)}},s),y}function St(e,t){let{mirror:r=new n.Mirror,blockClass:i="rr-block",blockSelector:o=null,maskTextClass:a="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,inlineImages:l=!1,recordCanvas:f=!1,maskAllInputs:p=!1,maskTextFn:x,maskInputFn:C,slimDOM:b=!1,dataURLOptions:v,preserveWhiteSpace:M,onSerialize:I,onIframeLoad:g,iframeLoadTimeout:d,onStylesheetLoad:R,stylesheetLoadTimeout:_,keepIframeSrcFn:s=()=>!1}=t||{};return B(e,{doc:e,mirror:r,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:c,skipChild:!1,inlineStylesheet:u,maskInputOptions:p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p===!1?{password:!0}:p,maskTextFn:x,maskInputFn:C,slimDOMOptions:b===!0||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:b==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:b===!1?{}:b,dataURLOptions:v,inlineImages:l,recordCanvas:f,preserveWhiteSpace:M,onSerialize:I,onIframeLoad:g,iframeLoadTimeout:d,onStylesheetLoad:R,stylesheetLoadTimeout:_,keepIframeSrcFn:s,newlyAddedElement:!1})}function Nt(e,t){function r(i){t(i),(i.type===n.NodeType$1.Document||i.type===n.NodeType$1.Element)&&i.childNodes.forEach(r)}r(e)}function bt(){ye=1}exports.Mirror=n.Mirror;exports.NodeType=n.NodeType;exports.absolutifyURLs=n.absolutifyURLs;exports.checkDataURLSize=n.checkDataURLSize;exports.createMirror=n.createMirror;exports.escapeImportStatement=n.escapeImportStatement;exports.extractFileExtension=n.extractFileExtension;exports.fixSafariColons=n.fixSafariColons;exports.getInputType=n.getInputType;exports.is2DCanvasBlank=n.is2DCanvasBlank;exports.isCSSImportRule=n.isCSSImportRule;exports.isCSSStyleRule=n.isCSSStyleRule;exports.isElement=n.isElement;exports.isNativeShadowDom=n.isNativeShadowDom;exports.isNodeMetaEqual=n.isNodeMetaEqual;exports.isShadowRoot=n.isShadowRoot;exports.maskInputValue=n.maskInputValue;exports.recompressBase64Image=n.recompressBase64Image;exports.stringifyRule=n.stringifyRule;exports.stringifyStylesheet=n.stringifyStylesheet;exports.toLowerCase=n.toLowerCase;exports.IGNORED_NODE=X;exports.classMatchesRegex=F;exports.cleanupSnapshot=bt;exports.genId=Se;exports.ignoreAttribute=be;exports.needMaskingText=Ie;exports.serializeNodeWithId=B;exports.snapshot=St;exports.transformAttribute=Ne;exports.visitSnapshot=Nt;
2
+ "use strict";var Ce=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var me=Ce(S=>{"use strict";var Ee=Object.defineProperty,we=(e,t,r)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ee=(e,t,r)=>we(e,typeof t!="symbol"?t+"":t,r),k=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(k||{}),te={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},re={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},z={};function ve(e){var t,r;let o=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(o&&globalThis[o])return globalThis[o]}function J(e){if(z[e])return z[e];let t=ve(e)||globalThis[e],r=t.prototype,o=e in te?te[e]:void 0,i=!!(o&&o.every(u=>{var l,f;return!!((f=(l=Object.getOwnPropertyDescriptor(r,u))==null?void 0:l.get)!=null&&f.toString().includes("[native code]"))})),a=e in re?re[e]:void 0,c=!!(a&&a.every(u=>{var l;return typeof r[u]=="function"&&((l=r[u])==null?void 0:l.toString().includes("[native code]"))}));if(i&&c)return z[e]=t.prototype,t.prototype;try{let u=document.createElement("iframe");document.body.appendChild(u);let l=u.contentWindow;if(!l)return t.prototype;let f=l[e].prototype;return document.body.removeChild(u),f?z[e]=f:r}catch(u){return r}}var G={};function A(e,t,r){var o;let i=`${e}.${String(r)}`;if(G[i])return G[i].call(t);let a=J(e),c=(o=Object.getOwnPropertyDescriptor(a,r))==null?void 0:o.get;return c?(G[i]=c,c.call(t)):t[r]}var q={};function ne(e,t,r){let o=`${e}.${String(r)}`;if(q[o])return q[o].bind(t);let a=J(e)[r];return typeof a!="function"?t[r]:(q[o]=a,a.bind(t))}function Me(e){return A("Node",e,"childNodes")}function _e(e){return A("Node",e,"parentNode")}function Te(e){return A("Node",e,"parentElement")}function Re(e){return A("Node",e,"textContent")}function De(e,t){return ne("Node",e,"contains")(t)}function ke(e){return ne("Node",e,"getRootNode")()}function Ae(e){return!e||!("host"in e)?null:A("ShadowRoot",e,"host")}function Le(e){return e.styleSheets}function $e(e){return!e||!("shadowRoot"in e)?null:A("Element",e,"shadowRoot")}function Oe(e,t){return A("Element",e,"querySelector")(t)}function Pe(e,t){return A("Element",e,"querySelectorAll")(t)}function Be(){return J("MutationObserver").constructor}function We(e,t,r){try{if(!(t in e))return()=>{};let o=e[t],i=r(o);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=i,()=>{e[t]=o}}catch(o){return()=>{}}}var F={childNodes:Me,parentNode:_e,parentElement:Te,textContent:Re,contains:De,getRootNode:ke,host:Ae,styleSheets:Le,shadowRoot:$e,querySelector:Oe,querySelectorAll:Pe,mutationObserver:Be,patch:We};function ae(e){return e.nodeType===e.ELEMENT_NODE}function ze(e){let t=e&&"host"in e&&"mode"in e&&F.host(e)||null;return!!(t&&"shadowRoot"in t&&F.shadowRoot(t)===e)}function Fe(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Ue(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function se(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function le(e){try{let t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);let o=Array.from(t,i=>ce(i,r)).join("");return Ue(o)}catch(t){return null}}function ce(e,t){var r;if(de(e)){let o;try{o=le(e.styleSheet)||se(e)}catch(i){o=e.cssText}try{if(o&&((r=e.styleSheet)!=null&&r.href))return Y(o,e.styleSheet.href)}catch(i){}return o}else{let o=e.cssText;return fe(e)&&e.selectorText.includes(":")&&(o=ue(o)),t?Y(o,t):o}}function ue(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function de(e){return"styleSheet"in e}function fe(e){return"selectorText"in e}var U=class{constructor(){ee(this,"idNodeMap",new Map),ee(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;let o=(r=this.getMeta(t))==null?void 0:r.id;return o!=null?o:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let r=this.getId(t);if(this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(o=>this.removeNodeFromMap(o)),ae(t)){let o=F.shadowRoot(t);o&&this.removeNodeFromMap(o),t.nodeName==="IFRAME"&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let o=r.id;this.idNodeMap.set(o,t),this.nodeMetaMap.set(t,r)}replace(t,r){let o=this.getNode(t);if(o){let i=this.nodeMetaMap.get(o);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function He(){return new U}function Ze({element:e,maskInputOptions:t,tagName:r,type:o,value:i,maskInputFn:a}){let c=i||"",u=o&&K(o);return(t[r.toLowerCase()]||u&&t[u])&&(a?c=a(c,e):c="*".repeat(c.length)),c}function K(e){return e.toLowerCase()}var oe="__rrweb_original__";function je(e){let t=e.getContext("2d");if(!t)return!0;let r=50;for(let o=0;o<e.width;o+=r)for(let i=0;i<e.height;i+=r){let a=t.getImageData,c=oe in a?a[oe]:a;if(new Uint32Array(c.call(t,o,i,Math.min(r,e.width-o),Math.min(r,e.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function Ve(e,t){return!e||!t||e.type!==t.type?!1:e.type===k.Document?e.compatMode===t.compatMode:e.type===k.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===k.Comment||e.type===k.Text||e.type===k.CDATA?e.textContent===t.textContent:e.type===k.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function Ge(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?K(t):null}function qe(e,t){var a;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(c){return null}let o=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(o);return(a=i==null?void 0:i[1])!=null?a:null}function Ye(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var Je=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ke=/^(?:[a-z+]+:)?\/\//i,Xe=/^www\..*/i,Qe=/^(data:)([^,]*),(.*)/i;function Y(e,t){return(e||"").replace(Je,(r,o,i,a,c,u)=>{let l=i||c||u,f=o||a||"";if(!l)return r;if(Ke.test(l)||Xe.test(l))return`url(${f}${l}${f})`;if(Qe.test(l))return`url(${f}${l}${f})`;if(l[0]==="/")return`url(${f}${Ye(t)+l}${f})`;let p=t.split("/"),x=l.split("/");p.pop();for(let C of x)C!=="."&&(C===".."?p.pop():p.push(C));return`url(${f}${p.join("/")}${f})`})}var et="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",ie=4096;function tt(e,t,r,o){if(!e.complete||e.naturalWidth===0||e.naturalWidth>ie||e.naturalHeight>ie)return t;try{let i=document.createElement("canvas");i.width=e.naturalWidth,i.height=e.naturalHeight;let a=i.getContext("2d");return a?(a.drawImage(e,0,0),i.toDataURL(r||"image/webp",o!=null?o:.4)):t}catch(i){return t}}function rt(e,t){return!t||e.length<=t?e:et}var pe=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(pe||{});S.Mirror=U;S.NodeType=pe;S.NodeType$1=k;S.absolutifyURLs=Y;S.checkDataURLSize=rt;S.createMirror=He;S.escapeImportStatement=se;S.extractFileExtension=qe;S.fixSafariColons=ue;S.getInputType=Ge;S.index=F;S.is2DCanvasBlank=je;S.isCSSImportRule=de;S.isCSSStyleRule=fe;S.isElement=ae;S.isNativeShadowDom=Fe;S.isNodeMetaEqual=Ve;S.isShadowRoot=ze;S.maskInputValue=Ze;S.recompressBase64Image=tt;S.stringifyRule=ce;S.stringifyStylesheet=le;S.toLowerCase=K});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var n=me(),Se=1,ot=new RegExp("[^a-z0-9-_:]"),X=-2;function Ne(){return Se++}function it(e){if(e instanceof HTMLFormElement)return"form";let t=n.toLowerCase(e.tagName);return ot.test(t)?"div":t}var O,he,nt=/^[^ \t\n\r\u000c]+/,at=/^[, \t\n\r\u000c]+/;function st(e,t){if(t.trim()==="")return t;let r=0;function o(a){let c,u=a.exec(t.substring(r));return u?(c=u[0],r+=c.length,c):""}let i=[];for(;o(at),!(r>=t.length);){let a=o(nt);if(a.slice(-1)===",")a=P(e,a.substring(0,a.length-1)),i.push(a);else{let c="";a=P(e,a);let u=!1;for(;;){let l=t.charAt(r);if(l===""){i.push((a+c).trim());break}else if(u)l===")"&&(u=!1);else if(l===","){r+=1,i.push((a+c).trim());break}else l==="("&&(u=!0);c+=l,r+=1}}}return i.join(", ")}var ge=new WeakMap;function P(e,t){return!t||t.trim()===""?t:Q(e,t)}function lt(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Q(e,t){let r=ge.get(e);if(r||(r=e.createElement("a"),ge.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function be(e,t,r,o,i,a){if(!o)return o;if(r==="src"||r==="href"&&!(t==="use"&&o[0]==="#")){let c=P(e,o);if(t==="img"&&c.startsWith("data:")&&i){let u=i,l=c;return(a!=null&&a.type||(a==null?void 0:a.quality)!==void 0)&&(l=n.recompressBase64Image(u,c,a.type,a.quality)),a!=null&&a.maxBase64ImageLength&&(l=n.checkDataURLSize(l,a.maxBase64ImageLength)),l}return c}else{if(r==="xlink:href"&&o[0]!=="#")return P(e,o);if(r==="background"&&(t==="table"||t==="td"||t==="th"))return P(e,o);if(r==="srcset")return st(e,o);if(r==="style")return n.absolutifyURLs(o,Q(e));if(t==="object"&&r==="data")return P(e,o)}return o}function Ie(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function ct(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){let i=e.classList[o];if(t.test(i))return!0}if(r)return e.matches(r)}catch(o){}return!1}function H(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?H(n.index.parentNode(e),t,r):!1;for(let o=e.classList.length;o--;){let i=e.classList[o];if(t.test(i))return!0}return r?H(n.index.parentNode(e),t,r):!1}function xe(e,t,r,o){let i;if(n.isElement(e)){if(i=e,!n.index.childNodes(i).length)return!1}else{if(n.index.parentElement(e)===null)return!1;i=n.index.parentElement(e)}try{if(typeof t=="string"){if(o){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(H(i,t,o))return!0;if(r){if(o){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch(a){}return!1}function ut(e,t,r){let o=e.contentWindow;if(!o)return;let i=!1,a;try{a=o.document.readyState}catch(u){return}if(a!=="complete"){let u=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(u),i=!0,t()});return}let c="about:blank";if(o.location.href!==c||e.src===c||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function dt(e,t,r){let o=!1,i;try{i=e.sheet}catch(c){return}if(i)return;let a=setTimeout(()=>{o||(t(),o=!0)},r);e.addEventListener("load",()=>{clearTimeout(a),o=!0,t()})}function ft(e,t){let{doc:r,mirror:o,blockClass:i,blockSelector:a,needsMask:c,inlineStylesheet:u,maskInputOptions:l={},maskTextFn:f,maskInputFn:p,dataURLOptions:x={},inlineImages:C,recordCanvas:b,keepIframeSrcFn:v,newlyAddedElement:M=!1}=t,I=pt(r,o);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:n.NodeType$1.Document,childNodes:[],compatMode:e.compatMode}:{type:n.NodeType$1.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:n.NodeType$1.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:I};case e.ELEMENT_NODE:return gt(e,{doc:r,blockClass:i,blockSelector:a,inlineStylesheet:u,maskInputOptions:l,maskInputFn:p,dataURLOptions:x,inlineImages:C,recordCanvas:b,keepIframeSrcFn:v,newlyAddedElement:M,rootId:I});case e.TEXT_NODE:return mt(e,{doc:r,needsMask:c,maskTextFn:f,rootId:I});case e.CDATA_SECTION_NODE:return{type:n.NodeType$1.CDATA,textContent:"",rootId:I};case e.COMMENT_NODE:return{type:n.NodeType$1.Comment,textContent:n.index.textContent(e)||"",rootId:I};default:return!1}}function pt(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return r===1?void 0:r}function mt(e,t){var r;let{needsMask:o,maskTextFn:i,rootId:a}=t,c=n.index.parentNode(e),u=c&&c.tagName,l=n.index.textContent(e),f=u==="STYLE"?!0:void 0,p=u==="SCRIPT"?!0:void 0;if(f&&l){try{e.nextSibling||e.previousSibling||(r=c.sheet)!=null&&r.cssRules&&(l=n.stringifyStylesheet(c.sheet))}catch(x){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${x}`,e)}l=n.absolutifyURLs(l,Q(t.doc))}return p&&(l="SCRIPT_PLACEHOLDER"),!f&&!p&&l&&o&&(l=i?i(l,n.index.parentElement(e)):l.replace(/[\S]/g,"*")),{type:n.NodeType$1.Text,textContent:l||"",isStyle:f,rootId:a}}function ye(e,t){return Array.from(e.styleSheets).find(r=>r.href===t)}function ht(e){return e.href}function gt(e,t){var r,o;let{doc:i,blockClass:a,blockSelector:c,inlineStylesheet:u,maskInputOptions:l={},maskInputFn:f,dataURLOptions:p={},inlineImages:x,recordCanvas:C,keepIframeSrcFn:b,newlyAddedElement:v=!1,rootId:M}=t,I=ct(e,a,c),g=it(e),d={},R=e.attributes.length;for(let s=0;s<R;s++){let m=e.attributes[s];Ie(g,m.name,m.value)||(d[m.name]=be(i,g,n.toLowerCase(m.name),m.value,e,p))}if(g==="link"&&u){let s=ht(e);if(s){let m=ye(i,s);if(!m&&s.includes(".css")){let N=window.location.origin,T=s.replace(window.location.href,""),D=N+"/"+T;m=ye(i,D)}let E=null;m&&(E=n.stringifyStylesheet(m)),E&&(delete d.rel,delete d.href,d._cssText=E)}}if(g==="style"&&e.sheet&&!(e.innerText||n.index.textContent(e)||"").trim().length){let s=n.stringifyStylesheet(e.sheet);s&&(d._cssText=s)}if(g==="input"||g==="textarea"||g==="select"){let s=e.value,m=e.checked;d.type!=="radio"&&d.type!=="checkbox"&&d.type!=="submit"&&d.type!=="button"&&s?d.value=n.maskInputValue({element:e,type:n.getInputType(e),tagName:g,value:s,maskInputOptions:l,maskInputFn:f}):m&&(d.checked=m)}if(g==="option"&&(e.selected&&!l.select?d.selected=!0:delete d.selected),g==="dialog"&&e.open)try{d.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(s){d.rr_open_mode="modal",d.ph_rr_could_not_detect_modal=!0}if(g==="canvas"&&C){if(e.__context==="2d")n.is2DCanvasBlank(e)||(d.rr_dataURL=e.toDataURL(p.type,p.quality));else if(!("__context"in e)){let s=e.toDataURL(p.type,p.quality),m=i.createElement("canvas");m.width=e.width,m.height=e.height;let E=m.toDataURL(p.type,p.quality);s!==E&&(d.rr_dataURL=s)}}if(g==="img"&&x){O||(O=i.createElement("canvas"),he=O.getContext("2d"));let s=e,m=s.currentSrc||s.getAttribute("src")||"<unknown-src>",E=s.crossOrigin,N=()=>{s.removeEventListener("load",N);try{O.width=s.naturalWidth,O.height=s.naturalHeight,he.drawImage(s,0,0),d.rr_dataURL=O.toDataURL(p.type,p.quality)}catch(T){if(s.crossOrigin!=="anonymous"){s.crossOrigin="anonymous",s.complete&&s.naturalWidth!==0?N():s.addEventListener("load",N);return}else console.warn(`Cannot inline img src=${m}! Error: ${T}`)}s.crossOrigin==="anonymous"&&(E?d.crossOrigin=E:s.removeAttribute("crossorigin"))};s.complete&&s.naturalWidth!==0?N():s.addEventListener("load",N)}if(g==="audio"||g==="video"){let s=d;s.rr_mediaState=e.paused?"paused":"played",s.rr_mediaCurrentTime=e.currentTime,s.rr_mediaPlaybackRate=e.playbackRate,s.rr_mediaMuted=e.muted,s.rr_mediaLoop=e.loop,s.rr_mediaVolume=e.volume}if(v||(e.scrollLeft&&(d.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(d.rr_scrollTop=e.scrollTop)),I){let{width:s,height:m,left:E,top:N}=e.getBoundingClientRect();d={class:d.class,rr_width:`${s}px`,rr_height:`${m}px`,rr_left:`${Math.floor(E+(((r=i.defaultView)==null?void 0:r.scrollX)||0))}px`,rr_top:`${Math.floor(N+(((o=i.defaultView)==null?void 0:o.scrollY)||0))}px`}}g==="iframe"&&!b(d.src)&&(e.contentDocument||(d.rr_src=d.src),delete d.src);let _;try{customElements.get(g)&&(_=!0)}catch(s){}return{type:n.NodeType$1.Element,tagName:g,attributes:d,childNodes:[],isSVG:lt(e)||void 0,needBlock:I,rootId:M,isCustom:_}}function h(e){return e==null?"":e.toLowerCase()}function yt(e,t){if(t.comment&&e.type===n.NodeType$1.Comment)return!0;if(e.type===n.NodeType$1.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&n.extractFileExtension(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(h(e.attributes.name).match(/^msapplication-tile(image|color)$/)||h(e.attributes.name)==="application-name"||h(e.attributes.rel)==="icon"||h(e.attributes.rel)==="apple-touch-icon"||h(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&h(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(h(e.attributes.property).match(/^(og|twitter|fb):/)||h(e.attributes.name).match(/^(og|twitter):/)||h(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(h(e.attributes.name)==="robots"||h(e.attributes.name)==="googlebot"||h(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(h(e.attributes.name)==="author"||h(e.attributes.name)==="generator"||h(e.attributes.name)==="framework"||h(e.attributes.name)==="publisher"||h(e.attributes.name)==="progid"||h(e.attributes.property).match(/^article:/)||h(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(h(e.attributes.name)==="google-site-verification"||h(e.attributes.name)==="yandex-verification"||h(e.attributes.name)==="csrf-token"||h(e.attributes.name)==="p:domain_verify"||h(e.attributes.name)==="verify-v1"||h(e.attributes.name)==="verification"||h(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function B(e,t){let{doc:r,mirror:o,blockClass:i,blockSelector:a,maskTextClass:c,maskTextSelector:u,skipChild:l=!1,inlineStylesheet:f=!0,maskInputOptions:p={},maskTextFn:x,maskInputFn:C,slimDOMOptions:b,dataURLOptions:v={},inlineImages:M=!1,recordCanvas:I=!1,onSerialize:g,onIframeLoad:d,iframeLoadTimeout:R=5e3,onStylesheetLoad:_,stylesheetLoadTimeout:s=5e3,keepIframeSrcFn:m=()=>!1,newlyAddedElement:E=!1}=t,{needsMask:N}=t,{preserveWhiteSpace:T=!0}=t;N||(N=xe(e,c,u,N===void 0));let D=ft(e,{doc:r,mirror:o,blockClass:i,blockSelector:a,needsMask:N,inlineStylesheet:f,maskInputOptions:p,maskTextFn:x,maskInputFn:C,dataURLOptions:v,inlineImages:M,recordCanvas:I,keepIframeSrcFn:m,newlyAddedElement:E});if(!D)return console.warn(e,"not serialized"),null;let W;o.hasNode(e)?W=o.getId(e):yt(D,b)||!T&&D.type===n.NodeType$1.Text&&!D.isStyle&&!D.textContent.replace(/^\s+|\s+$/gm,"").length?W=X:W=Ne();let y=Object.assign(D,{id:W});if(o.add(e,y),W===X)return null;g&&g(e);let Z=!l;if(y.type===n.NodeType$1.Element){Z=Z&&!y.needBlock,delete y.needBlock;let w=n.index.shadowRoot(e);w&&n.isNativeShadowDom(w)&&(y.isShadowHost=!0)}if((y.type===n.NodeType$1.Document||y.type===n.NodeType$1.Element)&&Z){b.headWhitespace&&y.type===n.NodeType$1.Element&&y.tagName==="head"&&(T=!1);let w={doc:r,mirror:o,blockClass:i,blockSelector:a,needsMask:N,maskTextClass:c,maskTextSelector:u,skipChild:l,inlineStylesheet:f,maskInputOptions:p,maskTextFn:x,maskInputFn:C,slimDOMOptions:b,dataURLOptions:v,inlineImages:M,recordCanvas:I,preserveWhiteSpace:T,onSerialize:g,onIframeLoad:d,iframeLoadTimeout:R,onStylesheetLoad:_,stylesheetLoadTimeout:s,keepIframeSrcFn:m};if(!(y.type===n.NodeType$1.Element&&y.tagName==="textarea"&&y.attributes.value!==void 0))for(let V of Array.from(n.index.childNodes(e))){let $=B(V,w);$&&y.childNodes.push($)}let L=null;if(n.isElement(e)&&(L=n.index.shadowRoot(e)))for(let V of Array.from(n.index.childNodes(L))){let $=B(V,w);$&&(n.isNativeShadowDom(L)&&($.isShadow=!0),y.childNodes.push($))}}let j=n.index.parentNode(e);return j&&n.isShadowRoot(j)&&n.isNativeShadowDom(j)&&(y.isShadow=!0),y.type===n.NodeType$1.Element&&y.tagName==="iframe"&&ut(e,()=>{let w=e.contentDocument;if(w&&d){let L=B(w,{doc:w,mirror:o,blockClass:i,blockSelector:a,needsMask:N,maskTextClass:c,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskTextFn:x,maskInputFn:C,slimDOMOptions:b,dataURLOptions:v,inlineImages:M,recordCanvas:I,preserveWhiteSpace:T,onSerialize:g,onIframeLoad:d,iframeLoadTimeout:R,onStylesheetLoad:_,stylesheetLoadTimeout:s,keepIframeSrcFn:m});L&&d(e,L)}},R),y.type===n.NodeType$1.Element&&y.tagName==="link"&&typeof y.attributes.rel=="string"&&(y.attributes.rel==="stylesheet"||y.attributes.rel==="preload"&&typeof y.attributes.href=="string"&&n.extractFileExtension(y.attributes.href)==="css")&&dt(e,()=>{if(_){let w=B(e,{doc:r,mirror:o,blockClass:i,blockSelector:a,needsMask:N,maskTextClass:c,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskTextFn:x,maskInputFn:C,slimDOMOptions:b,dataURLOptions:v,inlineImages:M,recordCanvas:I,preserveWhiteSpace:T,onSerialize:g,onIframeLoad:d,iframeLoadTimeout:R,onStylesheetLoad:_,stylesheetLoadTimeout:s,keepIframeSrcFn:m});w&&_(e,w)}},s),y}function St(e,t){let{mirror:r=new n.Mirror,blockClass:o="rr-block",blockSelector:i=null,maskTextClass:a="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,inlineImages:l=!1,recordCanvas:f=!1,maskAllInputs:p=!1,maskTextFn:x,maskInputFn:C,slimDOM:b=!1,dataURLOptions:v,preserveWhiteSpace:M,onSerialize:I,onIframeLoad:g,iframeLoadTimeout:d,onStylesheetLoad:R,stylesheetLoadTimeout:_,keepIframeSrcFn:s=()=>!1}=t||{};return B(e,{doc:e,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:c,skipChild:!1,inlineStylesheet:u,maskInputOptions:p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p===!1?{password:!0}:p,maskTextFn:x,maskInputFn:C,slimDOMOptions:b===!0||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:b==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:b===!1?{}:b,dataURLOptions:v,inlineImages:l,recordCanvas:f,preserveWhiteSpace:M,onSerialize:I,onIframeLoad:g,iframeLoadTimeout:d,onStylesheetLoad:R,stylesheetLoadTimeout:_,keepIframeSrcFn:s,newlyAddedElement:!1})}function Nt(e,t){function r(o){t(o),(o.type===n.NodeType$1.Document||o.type===n.NodeType$1.Element)&&o.childNodes.forEach(r)}r(e)}function bt(){Se=1}exports.Mirror=n.Mirror;exports.NodeType=n.NodeType;exports.absolutifyURLs=n.absolutifyURLs;exports.checkDataURLSize=n.checkDataURLSize;exports.createMirror=n.createMirror;exports.escapeImportStatement=n.escapeImportStatement;exports.extractFileExtension=n.extractFileExtension;exports.fixSafariColons=n.fixSafariColons;exports.getInputType=n.getInputType;exports.is2DCanvasBlank=n.is2DCanvasBlank;exports.isCSSImportRule=n.isCSSImportRule;exports.isCSSStyleRule=n.isCSSStyleRule;exports.isElement=n.isElement;exports.isNativeShadowDom=n.isNativeShadowDom;exports.isNodeMetaEqual=n.isNodeMetaEqual;exports.isShadowRoot=n.isShadowRoot;exports.maskInputValue=n.maskInputValue;exports.recompressBase64Image=n.recompressBase64Image;exports.stringifyRule=n.stringifyRule;exports.stringifyStylesheet=n.stringifyStylesheet;exports.toLowerCase=n.toLowerCase;exports.IGNORED_NODE=X;exports.classMatchesRegex=H;exports.cleanupSnapshot=bt;exports.genId=Ne;exports.ignoreAttribute=Ie;exports.needMaskingText=xe;exports.serializeNodeWithId=B;exports.snapshot=St;exports.transformAttribute=be;exports.visitSnapshot=Nt;
3
3
  ;if (typeof module.exports == "object" && typeof exports == "object") {
4
4
  var __cp = (to, from, except, desc) => {
5
5
  if ((from && typeof from === "object") || typeof from === "function") {