@appsurify-testmap/rrweb-record 3.4.0-alpha.1 → 3.5.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rrweb-record.cjs +2 -4
- package/dist/rrweb-record.cjs.map +1 -1
- package/dist/rrweb-record.js +2 -4
- package/dist/rrweb-record.js.map +1 -1
- package/dist/rrweb-record.umd.cjs +2 -4
- package/dist/rrweb-record.umd.cjs.map +2 -2
- package/dist/rrweb-record.umd.min.cjs +1 -1
- package/dist/rrweb-record.umd.min.cjs.map +2 -2
- package/package.json +4 -4
|
@@ -75,7 +75,7 @@ Common causes:
|
|
|
75
75
|
2. Element from one iframe, root from another
|
|
76
76
|
3. Element from main document, root from iframe (or vice versa)
|
|
77
77
|
|
|
78
|
-
Solution: Ensure element and root parameter are from the same document context.`)}function _p(s,e={}){var U,J,K,I;var t;if(!s||!s.ownerDocument||!s.isConnected)return null;const r=A(A({},ap),e);if(r.root)try{Pp(s,r.root)}catch(P){return console.error("Cross-document generation detected:",P),null}const i=(U=r.cache)!=null?U:Lp(),n=i.getEID(s);if(n!==void 0)return n;if(s.tagName.toLowerCase()==="html"){const P=new Fn(r,i),te=Bp(s,r,P);return i.setEID(s,te),te}const a=new lp(r,i),l=new pp(r,i),o=new Fn(r,i),u=new Op,c=a.findAnchor(s);if(!c&&!r.fallbackToBody)return null;const h=(K=(J=c==null?void 0:c.element)!=null?J:(t=s.ownerDocument)==null?void 0:t.body)!=null?K:null;if(!h)return null;const d=!c||c.tier==="C",p=h.tagName.toLowerCase(),m=h.parentElement;let g;if(m&&p!=="body"&&p!=="html"){const P=Array.from(m.children).indexOf(h);P!==-1&&(g=P+1)}const f=o.extract(h),w={tag:h.tagName.toLowerCase(),semantics:f,score:(I=c==null?void 0:c.score)!=null?I:Ce.DEGRADED_SCORE,degraded:d,nthChild:g},v=l.buildPath(h,s,o),C=o.extract(s);r.enableSvgFingerprint&&zp(s)&&(C.svg=u.fingerprint(s));const b=s.parentElement;let S;if(b){const P=Array.from(b.children).indexOf(s);P!==-1&&(S=P+1)}const x={tag:s.tagName.toLowerCase(),semantics:C,score:o.scoreElement(s),nthChild:S},E=[],M={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},L=w.degraded||v.degraded,z=Fp(w.degraded,v),D={version:"1.0",anchor:w,path:v.path,target:x,constraints:E,fallback:M,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:r.source,degraded:L,degradationReason:z}};return D.meta.confidence=Tp(D),D.meta.confidence<r.confidenceThreshold?null:(i.setEID(s,D),D)}function zp(s){return s.namespaceURI==="http://www.w3.org/2000/svg"||s.tagName.toLowerCase()==="svg"||s instanceof SVGElement}function Fp(s,e){if(s&&e.degraded)return"anchor-and-path-degraded";if(s)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function Bp(s,e,t,r){const i={tag:"html",semantics:t.extract(s),score:1,degraded:!1,nthChild:void 0};return{version:"1.0",anchor:i,path:[],target:i,constraints:[],fallback:{onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},meta:{confidence:1,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:e.source,degraded:!1,degradationReason:void 0}}}const Ja={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function Wn(s){return s==="id"?101:ke[s]!==void 0?ke[s]:s.startsWith("data-")?ke["data-*"]:s.startsWith("aria-")?ke["aria-*"]:0}function Wp(s){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(s)}function Hp(s){return!!(/@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/.test(s)||/(\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/.test(s)||/\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}/.test(s))}function Up(s,e){const t=A(A({},Ja),e),r=`v${s.version}`,i=cs(s.anchor,!1,t),n=s.path.length>0?s.path.map(o=>cs(o,!1,t)).join(" > ")+" > ":"",a=cs(s.target,!0,t),l=t.includeConstraints?Vp(s):"";return`${r}: ${i} :: ${n}${a}${l}`}function cs(s,e=!1,t=Ja){const{tag:r,semantics:i}=s;let n=r;const a=[],l=A({},i.attributes);i.id&&(l.id=i.id),i.role&&!l.role&&(l.role=i.role);const o=Object.entries(l).map(([h,d])=>{const p=Wn(h),m=h==="href"||h==="src"?Za(h,d):d;return{name:h,value:m,priority:p}}).filter(h=>h.name!=="id"&&h.name!=="class"&&ja.has(h.name)||Ga.has(h.name)&&Ya(h.value)?!1:h.priority>0||h.name==="role"||h.name==="id");o.sort((h,d)=>d.priority-h.priority);const u=o.slice(0,t.maxAttributes);u.sort((h,d)=>h.name.localeCompare(d.name));for(const{name:h,value:d}of u)a.push(`${h}="${Ys(d)}"`);if(t.includeText&&i.text&&!Hp(i.text.normalized)){const h=i.text.normalized;h.length>0&&h.length<=t.maxTextLength&&a.push(`text="${Ys(h)}"`)}let c=a;if(a.length>0&&(e&&t.simplifyTarget&&i.id&&(c=a.filter(h=>{const d=h.split("=")[0];return Wn(d)>=60||d==="text"||d==="id"||d==="role"})),c.length>0&&c.sort((h,d)=>h.localeCompare(d))),i.classes&&i.classes.length>0){const h=dp(i.classes),d=!!i.id||a.some(p=>p.startsWith("href=")||p.startsWith("data-testid=")||p.startsWith("text=")||p.startsWith("role="));if(!(e&&t.simplifyTarget&&d)&&h.length>0){const p=h.sort().slice(0,t.maxClasses);n+=p.map(m=>`.${m}`).join("")}}if(c.length>0&&(n+=`[${c.join(",")}]`),"nthChild"in s&&s.nthChild){const h=!!i.id||i.attributes&&Object.keys(i.attributes).some(Wp);e&&t.simplifyTarget&&h||(n+=`#${s.nthChild}`)}return n}function Vp(s){if(!s.constraints||s.constraints.length===0)return"";const e=[];for(const t of s.constraints)switch(t.type){case"uniqueness":e.push("unique=true");break;case"position":t.params&&t.params.strategy&&e.push(`pos=${t.params.strategy}`);break;case"text-proximity":if(t.params&&t.params.reference){const r=Ys(String(t.params.reference));e.push(`text="${r}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function Ys(s){return s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function jp(s,e,t){const r=_p(s,e);return r?Up(r,t):null}const dt={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0};function Gp(s){var e,t,r,i;return s===!1?null:s===!0||s===void 0?A({},dt):{maxPathDepth:(e=s.maxPathDepth)!=null?e:dt.maxPathDepth,enableSvgFingerprint:(t=s.enableSvgFingerprint)!=null?t:dt.enableSvgFingerprint,confidenceThreshold:(r=s.confidenceThreshold)!=null?r:dt.confidenceThreshold,fallbackToBody:(i=s.fallbackToBody)!=null?i:dt.fallbackToBody}}function Hn(s,e,t,r){const i=e.getMeta(s),n=i==null?void 0:i.selector;if(n&&!(r!=null&&r.force))return n;const a=s.nodeType===Node.ELEMENT_NODE?s:Ai(s);if(!a)return n;const l=e.getMeta(a),o=l==null?void 0:l.selector;if(o&&!(r!=null&&r.force))return o;if(!t)return o!=null?o:n;const u={maxPathDepth:t.maxPathDepth,enableSvgFingerprint:t.enableSvgFingerprint,fallbackToBody:t.fallbackToBody};try{const c=jp(a,u);if(c)return l?l.selector=c:i&&(i.selector=c),c}catch(c){}return o!=null?o:n}function Un(s){return"__ln"in s}class Yp{constructor(){y(this,"length",0),y(this,"head",null),y(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Un(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Un(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Vn=(s,e)=>`${s}@${e}`,Zp=new Set(["id","class","name","role","title","alt","placeholder","for","type"]);function Jp(s){const e=s.toLowerCase();return Zp.has(e)||e.startsWith("data-")||e.startsWith("aria-")}class Xp{constructor(){y(this,"frozen",!1),y(this,"locked",!1),y(this,"texts",[]),y(this,"attributes",[]),y(this,"attributeMap",new WeakMap),y(this,"removes",[]),y(this,"mapRemoves",[]),y(this,"movedMap",{}),y(this,"addedSet",new Set),y(this,"movedSet",new Set),y(this,"droppedSet",new Set),y(this,"removesSubTreeCache",new Set),y(this,"mutationCb"),y(this,"blockClass"),y(this,"blockSelector"),y(this,"maskTextClass"),y(this,"maskTextSelector"),y(this,"excludeAttribute"),y(this,"inlineStylesheet"),y(this,"maskInputOptions"),y(this,"maskTextFn"),y(this,"maskInputFn"),y(this,"keepIframeSrcFn"),y(this,"recordCanvas"),y(this,"inlineImages"),y(this,"slimDOMOptions"),y(this,"dataURLOptions"),y(this,"selectorOptions",null),y(this,"doc"),y(this,"mirror"),y(this,"iframeManager"),y(this,"stylesheetManager"),y(this,"shadowDomManager"),y(this,"canvasManager"),y(this,"processedNodeManager"),y(this,"unattachedDoc"),y(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),y(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Yp,i=o=>{let u=o,c=bt;for(;c===bt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=o=>{const u=T.parentNode(o);if(!u||!Ua(o))return;let c=!1;if(o.nodeType===Node.TEXT_NODE){const m=u.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const h=pt(u)?this.mirror.getId(Ha(o)):this.mirror.getId(u),d=i(o);if(h===-1||d===-1)return r.addNode(o);const p=Ye(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,excludeAttribute:this.excludeAttribute,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:m=>{Ba(m,this.mirror)&&this.iframeManager.addIframe(m),Wa(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Gs(o)&&this.shadowDomManager.addShadowRoot(T.shadowRoot(o),this.doc)},onIframeLoad:(m,g)=>{this.iframeManager.attachIframe(m,g),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,g)=>{this.stylesheetManager.attachLinkElement(m,g)},cssCaptured:c,selectorOptions:this.selectorOptions});p&&(e.push({parentId:h,nextId:d,node:p}),t.add(p.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const o of this.movedSet)jn(this.removesSubTreeCache,o,this.mirror)&&!this.movedSet.has(T.parentNode(o))||n(o);for(const o of this.addedSet)!Gn(this.droppedSet,o)&&!jn(this.removesSubTreeCache,o,this.mirror)||Gn(this.movedSet,o)?n(o):this.droppedSet.add(o);let a=null;for(;r.length;){let o=null;if(a){const u=this.mirror.getId(T.parentNode(a.value)),c=i(a.value);u!==-1&&c!==-1&&(o=a)}if(!o){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const h=this.mirror.getId(T.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){o=c;break}else{const p=c.value,m=T.parentNode(p);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const g=T.host(m);if(this.mirror.getId(g)!==-1){o=c;break}}}}}}if(!o){for(;r.head;)r.removeNode(r.head.value);break}a=o.previous,r.removeNode(o.value),n(o.value)}const l={texts:this.texts.map(o=>{const u=o.node,c=T.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:o.value,selector:Hn(u,this.mirror,this.selectorOptions)}}).filter(o=>!t.has(o.id)).filter(o=>this.mirror.has(o.id)),attributes:this.attributes.map(o=>{const{attributes:u}=o;if(typeof u.style=="string"){const c=JSON.stringify(o.styleDiff),h=JSON.stringify(o._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=o.styleDiff)}return{id:this.mirror.getId(o.node),attributes:u,selector:Hn(o.node,this.mirror,this.selectorOptions,{force:Object.keys(u).some(Jp)})}}).filter(o=>!t.has(o.id)).filter(o=>this.mirror.has(o.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),y(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from(T.childNodes(e),i=>T.textContent(i)||"").join("");t.attributes.value=mr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:gr(e),value:r,maskInputFn:this.maskInputFn})}),y(this,"processMutation",e=>{if(!as(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=T.textContent(e.target);!ne(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:mo(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Ai(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);const a=t[r],l=typeof a=="boolean",o=document.contains(t),u=Xs(t),c=ps(r,this.excludeAttribute);if(i===null&&!t.hasAttribute(r)&&e.oldValue!==null&&(a===""||a===null||typeof a=="undefined")){console.debug(`[${ge()}] [rrweb:record/mutation] \u26D4 phantom attribute mutation ignored`,{node:T.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:a,isBooleanAttr:l,inDOM:o,isVisible:u,isExcludeAttributeName:c});return}if(ps(r,this.excludeAttribute)){console.debug(`[${ge()}] [rrweb:record/mutation] \u26D4 excluded attribute mutation ignored`,{node:T.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:a,isBooleanAttr:l,inDOM:o,isVisible:u,isExcludeAttributeName:c});return}if(r==="value"){const p=gr(t);i=mr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:p,value:i,maskInputFn:this.maskInputFn})}if(ne(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let d=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(d||(d={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(d),this.attributeMap.set(e.target,d)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!po(t.tagName,r))if(d.attributes[r]=fo(this.doc,ze(t.tagName),ze(r),i),r!=="class"&&(e.oldValue===null||i===""||i!==e.oldValue)&&console.debug(`[${ge()}] [rrweb:record/mutation] \u26A0\uFE0F suspicious attribute mutation`,{reason:[i===e.oldValue?"no change in value":null,i===a?"mirrored in DOM property":null,i===d.attributes[r]?"redundant assignment":null].filter(Boolean).join(", ")||"uncategorized",node:T.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,transformedValue:d.attributes[r],excludeAttribute:this.excludeAttribute,propValue:a,isBooleanAttr:l,inDOM:o,isVisible:u,isExcludeAttributeName:c}),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(g){this.unattachedDoc=this.doc}const m=this.unattachedDoc.createElement("span");e.oldValue&&m.setAttribute("style",e.oldValue);for(const g of Array.from(t.style)){const f=t.style.getPropertyValue(g),w=t.style.getPropertyPriority(g);f!==m.style.getPropertyValue(g)||w!==m.style.getPropertyPriority(g)?w===""?d.styleDiff[g]=f:d.styleDiff[g]=[f,w]:d._unchangedStyles[g]=[f,w]}for(const g of Array.from(m.style))t.style.getPropertyValue(g)===""&&(d.styleDiff[g]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?d.attributes.rr_open_mode="modal":d.attributes.rr_open_mode="non-modal");break}case"childList":{if(ne(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),i=pt(e.target)?this.mirror.getId(T.host(e.target)):this.mirror.getId(e.target);ne(e.target,this.blockClass,this.blockSelector,!1)||as(t,this.mirror,this.slimDOMOptions)||!ep(t,this.mirror)||(this.addedSet.has(t)?(Zs(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Fa(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Vn(r,i)]?Zs(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:pt(e.target)&&mt(e.target)?!0:void 0}),Kp(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),y(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(as(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[Vn(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);ne(e,this.blockClass,this.blockSelector,!1)||(T.childNodes(e).forEach(r=>this.genAdds(r)),Gs(e)&&T.childNodes(T.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","excludeAttribute","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","selectorOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}resetBuffers(){this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.mapRemoves=[],this.movedMap={},this.attributes=[],this.texts=[],this.attributeMap=new WeakMap,this.removes=[]}unsetFrozen(){this.frozen=!1,this.canvasManager.unfreeze()}}function Zs(s,e){s.delete(e),T.childNodes(e).forEach(t=>Zs(s,t))}function Kp(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),T.childNodes(r).forEach(i=>t.push(i)))}}function jn(s,e,t){return s.size===0?!1:qp(s,e)}function qp(s,e,t){const r=T.parentNode(e);return r?s.has(r):!1}function Gn(s,e){return s.size===0?!1:Xa(s,e)}function Xa(s,e){const t=T.parentNode(e);return t?s.has(t)?!0:Xa(s,t):!1}let gt;function Qp(s){gt=s}function em(){gt=void 0}const N=s=>gt?(...t)=>{try{return s(...t)}catch(r){if(gt&>(r)===!0)return;throw r}}:s,me=[];function rt(s){try{if("composedPath"in s){const e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch(e){}return s&&s.target}function Ka(s,e){const t=new Xp;me.push(t),t.init(s);const r=new(xi())(N(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function tm({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let a=[],l;const o=$t(N(h=>{const d=Date.now()-l;s(a.map(p=>(p.timeOffset-=d,p)),h),a=[],l=null}),n),u=N($t(N(h=>{const d=rt(h),{clientX:p,clientY:m}=js(h)?h.changedTouches[0]:h;l||(l=ge()),a.push({x:p,y:m,id:r.getId(d),timeOffset:ge()-l}),o(typeof DragEvent!="undefined"&&h instanceof DragEvent?k.Drag:h instanceof MouseEvent?k.MouseMove:k.TouchMove)}),i,{trailing:!1})),c=[ee("mousemove",u,t),ee("touchmove",u,t),ee("drag",u,t)];return N(()=>{c.forEach(h=>h())})}function rm({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{console.debug("MouseInteractionObserver: No operation needed")};const a=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let o=null;const u=c=>h=>{const d=rt(h);if(ne(d,r,i,!0))return;let p=null,m=c;if("pointerType"in h){switch(h.pointerType){case"mouse":p=Ie.Mouse;break;case"touch":p=Ie.Touch;break;case"pen":p=Ie.Pen;break}p===Ie.Touch?ae[c]===ae.MouseDown?m="TouchStart":ae[c]===ae.MouseUp&&(m="TouchEnd"):Ie.Pen}else js(h)&&(p=Ie.Touch);p!==null?(o=p,(m.startsWith("Touch")&&p===Ie.Touch||m.startsWith("Mouse")&&p===Ie.Mouse)&&(p=null)):ae[c]===ae.Click&&(p=o,o=null);const g=js(h)?h.changedTouches[0]:h;if(!g)return;const f=t.getId(d),{clientX:w,clientY:v}=g;N(s)(A({type:ae[m],id:f,x:w,y:v},p!==null&&{pointerType:p}))};return Object.keys(ae).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&a[c]!==!1).forEach(c=>{let h=ze(c);const d=u(c);if(window.PointerEvent)switch(ae[c]){case ae.MouseDown:case ae.MouseUp:h=h.replace("mouse","pointer");break;case ae.TouchStart:case ae.TouchEnd:return}l.push(ee(h,d,e))}),N(()=>{l.forEach(c=>c())})}function qa({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const a=N($t(N(l=>{const o=rt(l);if(!o||ne(o,r,i,!0))return;const u=t.getId(o);if(o===e&&e.defaultView){const c=Pa(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:o.scrollLeft,y:o.scrollTop})}),n.scroll||100));return ee("scroll",a,e)}function sm({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=N($t(N(()=>{const n=_a(),a=za();(t!==n||r!==a)&&(s({width:Number(a),height:Number(n)}),t=n,r=a)}),200));return ee("resize",i,e)}function im({navigationCb:s,doc:e,sampling:t}){var c;if(t.navigation===!1)return()=>{};const r=e.defaultView;if(!r)return()=>{};let i=r.location.href;const n=[],a=N(h=>{const d=r.location.href;d!==i&&(s({href:d,oldHref:i,navigationType:h}),i=d)}),l=Me(r.history,"pushState",function(h){return function(...d){const p=h.apply(this,d);return a("pushState"),p}});n.push(l);const o=Me(r.history,"replaceState",function(h){return function(...d){const p=h.apply(this,d);return a("replaceState"),p}});if(n.push(o),n.push(ee("popstate",()=>a("popstate"),r)),n.push(ee("hashchange",()=>a("hashchange"),r)),(typeof t.navigation=="object"&&(c=t.navigation.useNavigationAPI)!=null?c:!0)&&"navigation"in r)try{const h=r.navigation,d=p=>{var m;const g=p;if(g.navigationType==="push"||g.navigationType==="replace"){const f=(m=g.destination)==null?void 0:m.url;f&&f!==i&&(s({href:f,oldHref:i,navigationType:"navigate"}),i=f)}};h.addEventListener("navigate",d),n.push(()=>h.removeEventListener("navigate",d))}catch(h){}return N(()=>{n.forEach(h=>h())})}const us=["INPUT","TEXTAREA","SELECT"],Yn=new WeakMap,nm=["Enter","Tab","Escape","ArrowDown","ArrowUp","Delete"],Zn=new WeakMap;function om({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:a,maskInputOptions:l,maskInputFn:o,sampling:u,userTriggeredOnInput:c}){function h(C){let b=rt(C);const S=C.isTrusted,x=b&&b.tagName;if(b&&x==="OPTION"&&(b=T.parentElement(b)),!b||!x||us.indexOf(x)<0||ne(b,r,i,!0)||b.classList.contains(n)||a&&b.matches(a))return;let E=b.value,M=!1;const L=gr(b)||"";L==="radio"||L==="checkbox"?M=b.checked:(l[x.toLowerCase()]||l[L])&&(E=mr({element:b,maskInputOptions:l,tagName:x,type:L,value:E,maskInputFn:o})),d(b,c?{text:E,isChecked:M,userTriggered:S}:{text:E,isChecked:M});const z=b.name;L==="radio"&&z&&M&&e.querySelectorAll(`input[type="radio"][name="${z}"]`).forEach(D=>{if(D!==b){const U=D.value;d(D,c?{text:U,isChecked:!M,userTriggered:!1}:{text:U,isChecked:!M})}})}function d(C,b){const S=Yn.get(C),x=C,E=x.hasAttribute("placeholder"),M=x.value==="",L=typeof x.defaultValue=="string"?x.defaultValue==="":!0,z=!b.userTriggered,D=!S||S.text==="",U=E&&M&&L&&D&&z&&!b.isChecked&&x.type!=="hidden"&&us.includes(x.tagName),J=x.tagName==="INPUT"&&x.type==="text"&&!b.userTriggered&&b.text===x.defaultValue&&!S&&x.hasAttribute("placeholder"),K=!b.userTriggered&&x.value===x.defaultValue&&!S&&x.hasAttribute("placeholder")&&!b.isChecked&&x.type!=="hidden"&&us.includes(x.tagName),I=x.type==="checkbox"&&!b.userTriggered&&!b.isChecked&&!S,P=x.type==="radio"&&!b.userTriggered&&!b.isChecked&&!S;if(U||J||K||I||P){console.debug(`[${ge()}] [rrweb:record/observer] \u26D4 phantom input ignored`,{node:T.describeNode(x),tag:x.tagName,nodeType:x.nodeType,attribute:x.attributes,value:x.value,isLikelyPhantom:U,isRenderDrivenTextInput:J,isValueFromDefault:K,isPhantomCheckbox:I,isPhantomRadio:P});return}if(!S||S.text!==b.text||S.isChecked!==b.isChecked){Yn.set(C,b);const te=t.getId(C);N(s)(oe(A({},b),{id:te}))}}const m=(u.input==="last"?["change"]:["input","change"]).map(C=>ee(C,N(h),e)),g=C=>{const b=rt(C);if(!b||!b.tagName)return;if(u.input==="all"){h(C);return}const S=b.tagName,x=C.key,E=nm.includes(x),M=S==="TEXTAREA",L=e.activeElement===b,z=b.value,D=Zn.get(b);if(Zn.set(b,z),!L){h(C);return}if(E){if(!M){h(C);return}let U=D!=null?D:"",J=0;const K=2,I=()=>{const P=b.value,te=e.activeElement===b,X=P!==U;if(!te){h(C);return}if(X)J=0,U=P;else if(J++,J>=K){h(C);return}requestAnimationFrame(I)};requestAnimationFrame(I);return}};m.push(ee("keydown",N(g),e));const f=e.defaultView;if(!f)return()=>{m.forEach(C=>C())};const w=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),v=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return w&&w.set&&m.push(...v.map(C=>Fr(C[0],C[1],{set(){N(h)({target:this,isTrusted:!1})}},!1,f))),N(()=>{m.forEach(C=>C())})}function $r(s){const e=[];function t(r,i){if(or("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||or("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||or("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||or("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const a=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(a)}else if(r.parentStyleSheet){const a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(a)}return i}return t(s,e)}function Te(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function am({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:N((c,h,d)=>{const[p,m]=d,{id:g,styleId:f}=Te(h,e,t.styleMirror);return(g&&g!==-1||f&&f!==-1)&&s({id:g,styleId:f,adds:[{rule:p,index:m}]}),c.apply(h,d)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,d=this.cssRules.length){const p=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[p,d])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:N((c,h,d)=>{const[p]=d,{id:m,styleId:g}=Te(h,e,t.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,removes:[{index:p}]}),c.apply(h,d)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:N((c,h,d)=>{const[p]=d,{id:m,styleId:g}=Te(h,e,t.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,replace:p}),c.apply(h,d)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:N((c,h,d)=>{const[p]=d,{id:m,styleId:g}=Te(h,e,t.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,replaceSync:p}),c.apply(h,d)})}));const o={};ar("CSSGroupingRule")?o.CSSGroupingRule=r.CSSGroupingRule:(ar("CSSMediaRule")&&(o.CSSMediaRule=r.CSSMediaRule),ar("CSSConditionRule")&&(o.CSSConditionRule=r.CSSConditionRule),ar("CSSSupportsRule")&&(o.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(o).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:N((d,p,m)=>{const[g,f]=m,{id:w,styleId:v}=Te(p.parentStyleSheet,e,t.styleMirror);return(w&&w!==-1||v&&v!==-1)&&s({id:w,styleId:v,adds:[{rule:g,index:[...$r(p),f||0]}]}),d.apply(p,m)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:N((d,p,m)=>{const[g]=m,{id:f,styleId:w}=Te(p.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||w&&w!==-1)&&s({id:f,styleId:w,removes:[{index:[...$r(p),g]}]}),d.apply(p,m)})})}),N(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,a&&(r.CSSStyleSheet.prototype.replace=a),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(o).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function Qa({mirror:s,stylesheetManager:e},t){var r,i,n;let a=null;t.nodeName==="#document"?a=s.getId(t):a=s.getId(T.host(t));const l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,o=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!l||!o?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){var u;return(u=o.get)==null?void 0:u.call(this)},set(u){var c;const h=(c=o.set)==null?void 0:c.call(this,u);if(a!==null&&a!==-1)try{e.adoptStyleSheets(u,a)}catch(d){}return h}}),N(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function lm({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:N((l,o,u)=>{var c;const[h,d,p]=u;if(t.has(h))return n.apply(o,[h,d,p]);const{id:m,styleId:g}=Te((c=o.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,set:{property:h,value:d,priority:p},index:$r(o.parentRule)}),l.apply(o,u)})});const a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:N((l,o,u)=>{var c;const[h]=u;if(t.has(h))return a.apply(o,[h]);const{id:d,styleId:p}=Te((c=o.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(d&&d!==-1||p&&p!==-1)&&s({id:d,styleId:p,remove:{property:h},index:$r(o.parentRule)}),l.apply(o,u)})}),N(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=a})}function cm({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const a=N(o=>$t(N(u=>{const c=rt(u);if(!c||ne(c,e,t,!0))return;const{currentTime:h,volume:d,muted:p,playbackRate:m,loop:g}=c;s({type:o,id:r.getId(c),currentTime:h,volume:d,muted:p,playbackRate:m,loop:g})}),i.media||500)),l=[ee("play",a(je.Play),n),ee("pause",a(je.Pause),n),ee("seeked",a(je.Seeked),n),ee("volumechange",a(je.VolumeChange),n),ee("ratechange",a(je.RateChange),n)];return N(()=>{l.forEach(o=>o())})}function um({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(o,u,c){const h=new n(o,u,c);return i.set(h,{family:o,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(ArrayBuffer.isView(u)?new Uint8Array(u.buffer,u.byteOffset,u.byteLength):new Uint8Array(u)))}),h};const a=Me(e.fonts,"add",function(l){return function(o){return setTimeout(N(()=>{const u=i.get(o);u&&(s(u),i.delete(o))}),0),l.apply(this,[o])}});return r.push(()=>{t.FontFace=n}),r.push(a),N(()=>{r.forEach(l=>l())})}function hm(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let a=!0;const l=N(()=>{const o=e.getSelection();if(!o||a&&(o!=null&&o.isCollapsed))return;a=o.isCollapsed||!1;const u=[],c=o.rangeCount||0;for(let h=0;h<c;h++){const d=o.getRangeAt(h),{startContainer:p,startOffset:m,endContainer:g,endOffset:f}=d;ne(p,r,i,!0)||ne(g,r,i,!0)||u.push({start:t.getId(p),startOffset:m,end:t.getId(g),endOffset:f})}n({ranges:u})});return l(),ee("selectionchange",l)}function dm({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Me(t.customElements,"define",function(i){return function(n,a,l){try{e({define:{name:n}})}catch(o){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,a,l])}})}function fm(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:a,navigationCb:l,inputCb:o,mediaInteractionCb:u,styleSheetRuleCb:c,styleDeclarationCb:h,canvasMutationCb:d,fontCb:p,selectionCb:m,customElementCb:g}=s;s.mutationCb=(...f)=>{e.mutation&&e.mutation(...f),t(...f)},s.mousemoveCb=(...f)=>{e.mousemove&&e.mousemove(...f),r(...f)},s.mouseInteractionCb=(...f)=>{e.mouseInteraction&&e.mouseInteraction(...f),i(...f)},s.scrollCb=(...f)=>{e.scroll&&e.scroll(...f),n(...f)},s.viewportResizeCb=(...f)=>{e.viewportResize&&e.viewportResize(...f),a(...f)},s.navigationCb=(...f)=>{e.navigation&&e.navigation(...f),l(...f)},s.inputCb=(...f)=>{e.input&&e.input(...f),o(...f)},s.mediaInteractionCb=(...f)=>{e.mediaInteaction&&e.mediaInteaction(...f),u(...f)},s.styleSheetRuleCb=(...f)=>{e.styleSheetRule&&e.styleSheetRule(...f),c(...f)},s.styleDeclarationCb=(...f)=>{e.styleDeclaration&&e.styleDeclaration(...f),h(...f)},s.canvasMutationCb=(...f)=>{e.canvasMutation&&e.canvasMutation(...f),d(...f)},s.fontCb=(...f)=>{e.font&&e.font(...f),p(...f)},s.selectionCb=(...f)=>{e.selection&&e.selection(...f),m(...f)},s.customElementCb=(...f)=>{e.customElement&&e.customElement(...f),g(...f)}}function pm(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};fm(s,e);let r;s.recordDOM&&(r=Ka(s,s.doc));const i=tm(s),n=rm(s),a=qa(s),l=sm(s,{win:t}),o=im(s),u=om(s),c=cm(s);let h=()=>{},d=()=>{},p=()=>{},m=()=>{};s.recordDOM&&(h=am(s,{win:t}),d=Qa(s,s.doc),p=lm(s,{win:t}),s.collectFonts&&(m=um(s)));const g=hm(s),f=dm(s),w=[];for(const v of s.plugins)w.push(v.observer(v.callback,t,v.options));return N(()=>{var v;me.forEach(C=>C.reset()),(v=s.visibilityManager)==null||v.reset(),r==null||r.disconnect(),i(),n(),a(),l(),o(),u(),c(),h(),d(),p(),m(),g(),f(),w.forEach(C=>C())})}function or(s){return typeof window[s]!="undefined"}function ar(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class Jn{constructor(e){y(this,"iframeIdToRemoteIdMap",new WeakMap),y(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),a=i||this.getRemoteIdToIdMap(e);let l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),a.set(l,t)),l}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class mm{constructor(e){y(this,"iframes",new WeakMap),y(this,"crossOriginIframeMap",new WeakMap),y(this,"crossOriginIframeMirror",new Jn(ho)),y(this,"crossOriginIframeStyleMirror"),y(this,"crossOriginIframeRootIdMap",new WeakMap),y(this,"mirror"),y(this,"mutationCb"),y(this,"wrappedEmit"),y(this,"loadListener"),y(this,"stylesheetManager"),y(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Jn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case _.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:_.IncrementalSnapshot,data:{source:k.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case _.Meta:case _.Load:case _.DomContentLoaded:return!1;case _.Plugin:return t;case _.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case _.IncrementalSnapshot:switch(t.data.source){case k.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case k.Drag:case k.TouchMove:case k.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case k.ViewportResize:return!1;case k.MediaInteraction:case k.MouseInteraction:case k.Scroll:case k.CanvasMutation:case k.Input:return this.replaceIds(t.data,e,["id"]),t;case k.StyleSheetRule:case k.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case k.Font:return t;case k.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case k.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==Va.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class gm{constructor(e){y(this,"shadowDoms",new WeakSet),y(this,"mutationCb"),y(this,"scrollCb"),y(this,"bypassOptions"),y(this,"mirror"),y(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!mt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Ka(oe(A({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(qa(oe(A({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(T.host(e))),this.restoreHandlers.push(Qa({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(Me(e.prototype,"attachShadow",function(i){return function(n){const a=i.call(this,n),l=T.shadowRoot(this);return l&&Ua(this)&&r.addShadowRoot(l,t),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ym=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var lr=0;lr<Ze.length;lr++)ym[Ze.charCodeAt(lr)]=lr;var bm=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Ze[e[t]>>2],i+=Ze[(e[t]&3)<<4|e[t+1]>>4],i+=Ze[(e[t+1]&15)<<2|e[t+2]>>6],i+=Ze[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const Xn=new Map;function wm(s,e){let t=Xn.get(s);return t||(t=new Map,Xn.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const el=(s,e,t)=>{if(!s||!(rl(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=wm(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function pr(s,e,t){if(s instanceof Array)return s.map(r=>pr(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){const r=s.constructor.name,i=bm(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[pr(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[pr(s.data,e,t),s.width,s.height]};if(rl(s,e)||typeof s=="object"){const r=s.constructor.name,i=el(s,e,t);return{rr_type:r,index:i}}}}return s}const tl=(s,e,t)=>s.map(r=>pr(r,e,t)),rl=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function Sm(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const a of n)try{if(typeof e.CanvasRenderingContext2D.prototype[a]!="function")continue;const l=Me(e.CanvasRenderingContext2D.prototype,a,function(o){return function(...u){return ne(this.canvas,t,r,!0)||setTimeout(()=>{const c=tl(u,e,this);s(this.canvas,{type:tt["2D"],property:a,args:c})},0),o.apply(this,u)}});i.push(l)}catch(l){const o=Fr(e.CanvasRenderingContext2D.prototype,a,{set(u){s(this.canvas,{type:tt["2D"],property:a,args:[u],setter:!0})}});i.push(o)}return()=>{i.forEach(a=>a())}}function vm(s){return s==="experimental-webgl"?"webgl":s}function Kn(s,e,t,r){const i=[];try{const n=Me(s.HTMLCanvasElement.prototype,"getContext",function(a){return function(l,...o){if(!ne(this,e,t,!0)){const u=vm(l);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(o[0]&&typeof o[0]=="object"){const c=o[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[l,...o])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function qn(s,e,t,r,i,n){const a=[],l=Object.getOwnPropertyNames(s);for(const o of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(o))try{if(typeof s[o]!="function")continue;const u=Me(s,o,function(c){return function(...h){const d=c.apply(this,h);if(el(d,n,this),"tagName"in this.canvas&&!ne(this.canvas,r,i,!0)){const p=tl(h,n,this),m={type:e,property:o,args:p};t(this.canvas,m)}return d}});a.push(u)}catch(u){const c=Fr(s,o,{set(h){t(this.canvas,{type:e,property:o,args:[h],setter:!0})}});a.push(c)}return a}function Cm(s,e,t,r){const i=[];return i.push(...qn(e.WebGLRenderingContext.prototype,tt.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...qn(e.WebGL2RenderingContext.prototype,tt.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const sl="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",xm=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),Qn=typeof self!="undefined"&&self.Blob&&new Blob([xm(sl)],{type:"text/javascript;charset=utf-8"});function Am(s){let e;try{if(e=Qn&&(self.URL||self.webkitURL).createObjectURL(Qn),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+sl,{name:s==null?void 0:s.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class Im{constructor(e){y(this,"pendingCanvasMutations",new Map),y(this,"rafStamps",{latestId:0,invokeId:null}),y(this,"mirror"),y(this,"mutationCb"),y(this,"resetObservers"),y(this,"frozen",!1),y(this,"locked",!1),y(this,"processMutation",(o,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(o)||this.pendingCanvasMutations.set(o,[]),this.pendingCanvasMutations.get(o).push(u)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:a,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&t==="all"&&this.initCanvasMutationObserver(r,i,n),a&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){const a=Kn(t,r,i,!0),l=new Map,o=new Am;o.onmessage=m=>{const{id:g}=m.data;if(l.set(g,!1),!("base64"in m.data))return;const{base64:f,type:w,width:v,height:C}=m.data;this.mutationCb({id:g,type:tt["2D"],commands:[{property:"clearRect",args:[0,0,v,C]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:w}]},0,0]}]})};const u=1e3/e;let c=0,h;const d=()=>{const m=[];return t.document.querySelectorAll("canvas").forEach(g=>{ne(g,r,i,!0)||m.push(g)}),m},p=m=>{if(c&&m-c<u){h=requestAnimationFrame(p);return}c=m,d().forEach(async g=>{var f;const w=this.mirror.getId(g);if(l.get(w)||g.width===0||g.height===0)return;if(l.set(w,!0),["webgl","webgl2"].includes(g.__context)){const C=g.getContext(g.__context);((f=C==null?void 0:C.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&C.clear(C.COLOR_BUFFER_BIT)}const v=await createImageBitmap(g);o.postMessage({id:w,bitmap:v,width:g.width,height:g.height,dataURLOptions:n.dataURLOptions},[v])}),h=requestAnimationFrame(p)};h=requestAnimationFrame(p),this.resetObservers=()=>{a(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Kn(e,t,r,!1),n=Sm(this.processMutation.bind(this),e,t,r),a=Cm(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(a=>{const u=a,{type:l}=u;return He(u,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}function eo(s,e,t){var c,h,d,p,m,g;const r=(c=t==null?void 0:t.root)!=null?c:null,i=(h=t==null?void 0:t.threshold)!=null?h:.5,n=(d=t==null?void 0:t.sensitivity)!=null?d:.05,a=Em((p=t==null?void 0:t.rootMargin)!=null?p:"0px"),l=new Map,o=$m(r),u=Mm(o,a);for(const f of s){const w=f.getBoundingClientRect();let v=Tm(),C=0;w.width>0&&w.height>0&&(v=Rm(w,u),C=Om(w,v),C=Math.round(C*100)/100);const b=Nm(f),S=(m=e.get(f))!=null?m:null,x=(g=S==null?void 0:S.intersectionRatio)!=null?g:0,E=C,M=(S==null?void 0:S.isStyleVisible)&&x>i,L=b&&E>i;!S||M!==L||M!==L&&Math.abs(E-x)>n?l.set(f,{target:f,isVisible:L,isStyleVisible:b,intersectionRatio:E,intersectionRect:v,oldValue:S}):l.set(f,S)}return l}function Em(s){const e=s.trim().split(/\s+/),t=(r,i)=>r.endsWith("%")?parseFloat(r)/100*i:parseFloat(r)||0;return function(r){const i=t(e[0]||"0px",r.height),n=t(e[1]||e[0]||"0px",r.width),a=t(e[2]||e[0]||"0px",r.height),l=t(e[3]||e[1]||e[0]||"0px",r.width);return{top:i,right:n,bottom:a,left:l,width:0,height:0}}}function $m(s){return s?s.getBoundingClientRect():new DOMRect(0,0,window.innerWidth,window.innerHeight)}function Mm(s,e){const t=e(s);return new DOMRect(s.left-t.left,s.top-t.top,s.width+t.left+t.right,s.height+t.top+t.bottom)}function Rm(s,e){const t=Math.max(s.top,e.top),r=Math.max(s.left,e.left),i=Math.min(s.bottom,e.bottom),n=Math.min(s.right,e.right),a=Math.max(0,n-r),l=Math.max(0,i-t);return{top:t,left:r,bottom:i,right:n,width:a,height:l}}function Om(s,e){const t=s.width*s.height,r=e.width*e.height;return t>0?r/t:0}function Tm(){return{top:0,left:0,right:0,bottom:0,width:0,height:0}}function Nm(s){const e=getComputedStyle(s);return e&&e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity||"1")>0}class km{constructor(e){var u,c,h,d,p,m;y(this,"frozen",!1),y(this,"locked",!1),y(this,"pending",new Map),y(this,"mirror"),y(this,"mutationCb"),y(this,"rafId",null),y(this,"intervalId",null),y(this,"rafThrottle"),y(this,"lastFlushTime",0),y(this,"elements",new Set),y(this,"previousState",new Map),y(this,"root",null),y(this,"threshold"),y(this,"sensitivity"),y(this,"rootMargin"),y(this,"hasInitialized",!1),y(this,"mode","none"),y(this,"debounce",50),y(this,"throttle",100),y(this,"buffer",new Map),y(this,"debounceTimer",null),y(this,"lastThrottleTime",0),y(this,"disabled",!1),y(this,"notifyActivity");const{doc:t,mirror:r,sampling:i,mutationCb:n,notifyActivity:a}=e;if(this.mirror=r,this.mutationCb=n,this.notifyActivity=a,this.rootMargin="0px",i===!1){this.disabled=!0;return}const l=typeof i=="object"&&i!==null?i:{};this.mode=(u=l==null?void 0:l.mode)!=null?u:"none",this.debounce=Number((c=l==null?void 0:l.debounce)!=null?c:100),this.throttle=Number((h=l==null?void 0:l.throttle)!=null?h:100),this.threshold=Number((d=l==null?void 0:l.threshold)!=null?d:.5),this.sensitivity=Number((p=l==null?void 0:l.sensitivity)!=null?p:.05),this.rafThrottle=Number((m=l==null?void 0:l.rafThrottle)!=null?m:50),t.querySelectorAll("*").forEach(g=>this.observe(g)),new MutationObserver(g=>{g.forEach(f=>{f.addedNodes.forEach(w=>{w.nodeType===Node.ELEMENT_NODE&&(this.observe(w),w.querySelectorAll("*").forEach(v=>this.observe(v)))}),f.removedNodes.forEach(w=>{w.nodeType===Node.ELEMENT_NODE&&this.unobserve(w)})})}).observe(t.body,{childList:!0,subtree:!0}),this.startPendingFlushLoop()}startPendingFlushLoop(){if(!this.disabled)if(typeof requestAnimationFrame=="function"){const e=t=>{t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations()),this.rafId=requestAnimationFrame(e)};this.rafId=requestAnimationFrame(e)}else{const e=()=>{const t=performance.now();t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations())};this.intervalId=setInterval(e,this.rafThrottle)}}flushPendingVisibilityMutations(){if(this.disabled||this.frozen||this.locked||this.elements.size===0)return;const e=eo(this.elements,this.previousState,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin});for(const[t,r]of e.entries()){const i=this.previousState.get(t);if(!i||i.isVisible!==r.isVisible||Math.abs(i.intersectionRatio-r.intersectionRatio)>this.sensitivity){const a=this.mirror.getId(t);a!==-1&&this.buffer.set(t,{id:a,isVisible:r.isVisible,ratio:r.intersectionRatio}),this.previousState.set(t,r)}}if(this.previousState=e,!this.hasInitialized){this.hasInitialized=!0,this.buffer.clear();return}this.scheduleEmit()}scheduleEmit(){if(this.mode==="debounce")clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.flushBuffer(),this.debounce);else if(this.mode==="throttle"){const e=performance.now();e-this.lastThrottleTime>=this.throttle&&(this.lastThrottleTime=e,this.flushBuffer())}else this.flushBuffer()}flushBuffer(){var e;if(this.frozen||this.locked||this.buffer.size===0)return;const t=Array.from(this.buffer.values()),r=t.length;this.buffer.clear(),this.mutationCb({mutations:t}),(e=this.notifyActivity)==null||e.call(this,r)}observe(e){this.disabled||this.elements.add(e)}unobserve(e){this.disabled||(this.elements.delete(e),this.previousState.delete(e),this.pending.delete(e))}freeze(){this.frozen=!0,this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}unfreeze(){this.frozen=!1,this.flushPendingVisibilityMutations()}lock(){this.locked=!0,this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}unlock(){this.locked=!1,this.buffer.clear(),this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),!this.disabled&&this.elements.size>0&&(this.previousState=eo(this.elements,new Map,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin}))}unsetFrozen(){this.frozen=!1}reset(){this.elements.clear(),this.previousState.clear(),this.pending.clear(),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}}const Dm=150,Lm=5e3,Pm=100;class _m{constructor(e){var n,a,l;y(this,"frozen",!1),y(this,"locked",!1),y(this,"disabled",!1),y(this,"settleTimeout"),y(this,"maxWait"),y(this,"debounceMs"),y(this,"settlingObserver",null),y(this,"debounceTimer",null),y(this,"settleCheckTimer",null),y(this,"maxWaitTimer",null),y(this,"lastMutationTime",0),y(this,"pendingNavigation",null),y(this,"doc"),y(this,"onSnapshot");const{doc:t,config:r,onSnapshot:i}=e;this.doc=t,this.onSnapshot=N(i),this.settleTimeout=(n=r.settleTimeout)!=null?n:Dm,this.maxWait=(a=r.maxWait)!=null?a:Lm,this.debounceMs=(l=r.debounce)!=null?l:Pm}handleNavigation(e){this.disabled||this.locked||(this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=e,!this.frozen&&this.startDebounce())}cancelPending(){this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=null}freeze(){this.frozen=!0,this.cancelTimers(),this.disconnectSettlingObserver()}unfreeze(){this.frozen=!1,this.pendingNavigation&&!this.locked&&!this.disabled&&this.startDebounce()}lock(){this.locked=!0,this.cancelTimers(),this.disconnectSettlingObserver()}unlock(){this.locked=!1,this.pendingNavigation=null}unsetFrozen(){this.frozen=!1}reset(){this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=null,this.frozen=!1,this.locked=!1}destroy(){const e=this.pendingNavigation!==null;this.reset(),this.disabled=!0,e&&this.onSnapshot(!0)}startDebounce(){this.debounceTimer=setTimeout(()=>{this.debounceTimer=null,this.startDOMSettling()},this.debounceMs)}startDOMSettling(){if(this.frozen||this.locked||this.disabled)return;this.lastMutationTime=performance.now();const e=xi();this.settlingObserver=new e(()=>{this.lastMutationTime=performance.now(),this.settleCheckTimer!==null&&clearTimeout(this.settleCheckTimer),this.settleCheckTimer=setTimeout(()=>this.checkSettled(),this.settleTimeout)}),this.settlingObserver.observe(this.doc,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),this.settleCheckTimer=setTimeout(()=>this.checkSettled(),this.settleTimeout),this.maxWaitTimer=setTimeout(()=>{this.maxWaitTimer=null,this.completeSettling()},this.maxWait)}checkSettled(){this.settleCheckTimer=null;const e=performance.now()-this.lastMutationTime;e>=this.settleTimeout?this.completeSettling():this.settleCheckTimer=setTimeout(()=>this.checkSettled(),this.settleTimeout-e)}completeSettling(){this.frozen||this.locked||this.disabled||this.pendingNavigation&&(this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=null,this.onSnapshot(!0))}cancelTimers(){this.debounceTimer!==null&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.settleCheckTimer!==null&&(clearTimeout(this.settleCheckTimer),this.settleCheckTimer=null),this.maxWaitTimer!==null&&(clearTimeout(this.maxWaitTimer),this.maxWaitTimer=null)}disconnectSettlingObserver(){this.settlingObserver&&(this.settlingObserver.disconnect(),this.settlingObserver=null)}}class zm{constructor(e){y(this,"trackedLinkElements",new WeakSet),y(this,"mutationCb"),y(this,"adoptedStyleSheetCb"),y(this,"styleMirror",new rp),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},i=[];for(const n of e){let a;this.styleMirror.has(n)?a=this.styleMirror.getId(n):(a=this.styleMirror.add(n),i.push({styleId:a,rules:Array.from(n.rules||CSSRule,(l,o)=>({rule:so(l,n.href),index:o}))})),r.styleIds.push(a)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Fm{constructor(){y(this,"nodeMap",new WeakMap),y(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}const Bm="3.4.0-alpha.1";let G,Oe,hs,Rt=!1;const Mr=[];let ft;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((Pi=s.contentWindow)==null?void 0:Pi.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const fe=_l();function le(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,checkoutEveryNvm:i,checkoutDebounce:n,blockClass:a="rr-block",blockSelector:l=null,ignoreClass:o="rr-ignore",ignoreSelector:u=null,excludeAttribute:c,maskTextClass:h="rr-mask",maskTextSelector:d=null,inlineStylesheet:p=!0,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:f,maskInputFn:w,maskTextFn:v,hooks:C,packFn:b,sampling:S={},dataURLOptions:x={},mousemoveWait:E,recordDOM:M=!0,recordCanvas:L=!1,recordCrossOriginIframes:z=!1,recordAfter:D=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",flushCustomEvent:U=s.flushCustomEvent!==void 0?s.flushCustomEvent:"after",userTriggeredOnInput:J=!1,collectFonts:K=!1,inlineImages:I=!1,plugins:P,keepIframeSrcFn:te=()=>!1,ignoreCSSAttributes:X=new Set([]),selector:ue,errorHandler:st}=s;Qp(st);const pe=z?window.parent===window:!0;let it=!1;if(!pe)try{window.parent.document&&(it=!1)}catch($){it=!0}if(pe&&!e)throw new Error("emit function is required");if(!pe&&!it)return()=>{};E!==void 0&&S.mousemove===void 0&&(S.mousemove=E),fe.reset();const Br=c===void 0?/.^/:c,Wr=m===!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}:g!==void 0?g:{password:!0},Hr=f===!0||f==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:f==="all",headMetaDescKeywords:f==="all",headTitleMutations:f==="all"}:f||{},$i=Gp(ue);tp();let Mi,Ur=0,Dt=0,Ri=0,Re=!1,ce=null,We=null;const Oi=$=>{for(const ie of P||[])ie.eventProcessor&&($=ie.eventProcessor($));return b&&!it&&($=b($)),$},Lt=()=>{ce=null,Re=!1,We=null,se==null||se.cancelPending(),Oe(!0),me.forEach($=>{$.resetBuffers(),$.unsetFrozen()}),re&&re.unsetFrozen(),se&&se.unsetFrozen()};G=($,ie)=>{var H;const V=$;if(V.timestamp=ge(),V.checkoutId=Ri,(H=me[0])!=null&&H.isFrozen()&&!Re&&V.type!==_.FullSnapshot&&!(V.type===_.IncrementalSnapshot&&V.data.source===k.Mutation)&&(me.forEach(he=>he.unfreeze()),re==null||re.unfreeze(),se==null||se.unfreeze()),pe)e==null||e(Oi(V),ie);else if(it){const he={type:"rrweb",event:Oi(V),isCheckout:ie};window.parent.postMessage(he,"*")}if(V.type===_.FullSnapshot)Mi=V,Ur=0,Dt=0;else if(V.type===_.IncrementalSnapshot){if(V.data.source===k.Mutation&&V.data.isAttachIframe)return;if(V.data.source!==k.Visibility){Ur++;const he=r&&Ur>=r,F=t&&V.timestamp-Mi.timestamp>t;if(he||F)if(n){Re||(Re=!0,We=ge(),me.forEach(ll=>ll.freeze()),re==null||re.freeze()),ce&&clearTimeout(ce);const nt=ge()-We,al=n*3;nt>=al?Lt():ce=setTimeout(()=>Lt(),n)}else Oe(!0)}}};const Pt=$=>{G({type:_.IncrementalSnapshot,data:A({source:k.Mutation},$)})},il=$=>{G({type:_.IncrementalSnapshot,data:A({source:k.Visibility},$)})},Ti=$=>G({type:_.IncrementalSnapshot,data:A({source:k.Scroll},$)}),Ni=$=>G({type:_.IncrementalSnapshot,data:A({source:k.CanvasMutation},$)}),nl=$=>G({type:_.IncrementalSnapshot,data:A({source:k.AdoptedStyleSheet},$)}),Pe=new zm({mutationCb:Pt,adoptedStyleSheetCb:nl}),_e=new mm({mirror:fe,mutationCb:Pt,stylesheetManager:Pe,recordCrossOriginIframes:z,wrappedEmit:G});for(const $ of P||[])$.getMirror&&$.getMirror({nodeMirror:fe,crossOriginIframeMirror:_e.crossOriginIframeMirror,crossOriginIframeStyleMirror:_e.crossOriginIframeStyleMirror});const Vr=new Fm;hs=new Im({recordCanvas:L,mutationCb:Ni,win:window,blockClass:a,blockSelector:l,mirror:fe,sampling:S.canvas,dataURLOptions:x});const _t=new gm({mutationCb:Pt,scrollCb:Ti,bypassOptions:{blockClass:a,blockSelector:l,maskTextClass:h,maskTextSelector:d,excludeAttribute:Br,inlineStylesheet:p,maskInputOptions:Wr,dataURLOptions:x,maskTextFn:v,maskInputFn:w,recordCanvas:L,inlineImages:I,sampling:S,slimDOMOptions:Hr,iframeManager:_e,stylesheetManager:Pe,canvasManager:hs,keepIframeSrcFn:te,processedNodeManager:Vr,selectorOptions:$i},mirror:fe}),ol=M&&(i!=null||(S==null?void 0:S.visibility)!==void 0&&(S==null?void 0:S.visibility)!==!1);let re;if(ol){const $=typeof(S==null?void 0:S.visibility)=="object"&&(S==null?void 0:S.visibility)!==null?S.visibility:{},ie=$.recordVisibility===!0;re=new km({doc:document,mirror:fe,sampling:$,mutationCb:ie?il:()=>{},notifyActivity:i!=null?H=>{if(Dt+=H,Dt>=i)if(Dt=0,n){Re||(Re=!0,We=ge(),me.forEach(F=>F.freeze()),re==null||re.freeze()),ce&&clearTimeout(ce);const V=ge()-We,he=n*3;V>=he?Lt():ce=setTimeout(()=>Lt(),n)}else Oe(!0)}:void 0})}Oe=($=!1)=>{if(!M)return;Ri++,G({type:_.Meta,data:{href:window.location.href,width:za(),height:_a()}},$),Pe.reset(),_t.init(),me.forEach(H=>H.lock()),re==null||re.lock(),se==null||se.lock();const ie=ru(document,{mirror:fe,blockClass:a,blockSelector:l,maskTextClass:h,maskTextSelector:d,excludeAttribute:Br,inlineStylesheet:p,maskAllInputs:Wr,maskTextFn:v,maskInputFn:w,slimDOM:Hr,dataURLOptions:x,recordCanvas:L,inlineImages:I,onSerialize:H=>{Ba(H,fe)&&_e.addIframe(H),Wa(H,fe)&&Pe.trackLinkElement(H),Gs(H)&&_t.addShadowRoot(T.shadowRoot(H),document)},onIframeLoad:(H,V)=>{_e.attachIframe(H,V),_t.observeAttachShadow(H)},onStylesheetLoad:(H,V)=>{Pe.attachLinkElement(H,V)},keepIframeSrcFn:te,selector:ue});if(!ie)return console.warn("Failed to snapshot the document");G({type:_.FullSnapshot,data:{node:ie,initialOffset:Pa(window)}},$),me.forEach(H=>H.unlock()),re==null||re.unlock(),se==null||se.unlock(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Pe.adoptStyleSheets(document.adoptedStyleSheets,fe.getId(document))},ft=()=>{for(const $ of Mr)G($);Mr.length=0};let se;const jr=S.navigation;if(jr!==!1){const $=typeof jr=="object"?jr:{};se=new _m({doc:document,config:$,onSnapshot:ie=>{Re&&(ce&&(clearTimeout(ce),ce=null),Re=!1,We=null,me.forEach(H=>{H.resetBuffers(),H.unsetFrozen()}),re==null||re.unsetFrozen()),Oe(ie)}})}try{const $=[],ie=V=>{var he;return N(pm)({mutationCb:Pt,mousemoveCb:(F,nt)=>G({type:_.IncrementalSnapshot,data:{source:nt,positions:F}}),mouseInteractionCb:F=>G({type:_.IncrementalSnapshot,data:A({source:k.MouseInteraction},F)}),scrollCb:Ti,viewportResizeCb:F=>G({type:_.IncrementalSnapshot,data:A({source:k.ViewportResize},F)}),navigationCb:F=>{se?se.handleNavigation(F):Oe(!0)},inputCb:F=>G({type:_.IncrementalSnapshot,data:A({source:k.Input},F)}),mediaInteractionCb:F=>G({type:_.IncrementalSnapshot,data:A({source:k.MediaInteraction},F)}),styleSheetRuleCb:F=>G({type:_.IncrementalSnapshot,data:A({source:k.StyleSheetRule},F)}),styleDeclarationCb:F=>G({type:_.IncrementalSnapshot,data:A({source:k.StyleDeclaration},F)}),canvasMutationCb:Ni,visibilityManager:re,fontCb:F=>G({type:_.IncrementalSnapshot,data:A({source:k.Font},F)}),selectionCb:F=>{G({type:_.IncrementalSnapshot,data:A({source:k.Selection},F)})},customElementCb:F=>{G({type:_.IncrementalSnapshot,data:A({source:k.CustomElement},F)})},blockClass:a,ignoreClass:o,ignoreSelector:u,maskTextClass:h,maskTextSelector:d,excludeAttribute:Br,maskInputOptions:Wr,inlineStylesheet:p,sampling:S,recordDOM:M,recordCanvas:L,inlineImages:I,userTriggeredOnInput:J,collectFonts:K,doc:V,maskInputFn:w,maskTextFn:v,keepIframeSrcFn:te,blockSelector:l,slimDOMOptions:Hr,dataURLOptions:x,selectorOptions:$i,mirror:fe,iframeManager:_e,stylesheetManager:Pe,shadowDomManager:_t,processedNodeManager:Vr,canvasManager:hs,ignoreCSSAttributes:X,plugins:((he=P==null?void 0:P.filter(F=>F.observer))==null?void 0:he.map(F=>({observer:F.observer,options:F.options,callback:nt=>G({type:_.Plugin,data:{plugin:F.name,payload:nt}})})))||[]},C)};_e.addLoadListener(V=>{try{$.push(ie(V.contentDocument))}catch(he){console.warn(he)}});const H=()=>{U==="before"&&ft(),Oe(),$.push(ie(document)),Rt=!0,U==="after"&&ft()};return document.readyState==="interactive"||document.readyState==="complete"?H():($.push(ee("DOMContentLoaded",()=>{G({type:_.DomContentLoaded,data:{}}),D==="DOMContentLoaded"&&H()})),$.push(ee("load",()=>{G({type:_.Load,data:{}}),D==="load"&&H()},window))),()=>{ce&&(clearTimeout(ce),ce=null),ft(),$.forEach(V=>V()),se==null||se.destroy(),Vr.destroy(),Rt=!1,em()}}catch($){console.warn($)}}le.getVersion=()=>Bm;le.isRecording=()=>Rt;le.flushCustomEventQueue=()=>{console.warn(`[rrweb] CustomEvent flushing: ${Mr.length} events`),ft()};le.addCustomEvent=(s,e)=>{const t={type:_.Custom,data:{tag:s,payload:e}};if(!Rt){console.warn(`[rrweb] CustomEvent buffered before/after recording start: ${s}`),Mr.push(t);return}G(t)};le.freezePage=()=>{me.forEach(s=>s.freeze())};le.takeFullSnapshot=s=>{if(!Rt)throw new Error("please take full snapshot after start recording");Oe(s)};le.mirror=fe;var to;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(to||(to={}));const{getVersion:Eg}=le,{isRecording:$g}=le,{flushCustomEventQueue:Mg}=le,{addCustomEvent:Rg}=le,{freezePage:Og}=le,{takeFullSnapshot:Tg}=le;exports.record=le;
|
|
78
|
+
Solution: Ensure element and root parameter are from the same document context.`)}function _p(s,e={}){var U,J,K,I;var t;if(!s||!s.ownerDocument||!s.isConnected)return null;const r=A(A({},ap),e);if(r.root)try{Pp(s,r.root)}catch(P){return console.error("Cross-document generation detected:",P),null}const i=(U=r.cache)!=null?U:Lp(),n=i.getEID(s);if(n!==void 0)return n;if(s.tagName.toLowerCase()==="html"){const P=new Fn(r,i),te=Bp(s,r,P);return i.setEID(s,te),te}const a=new lp(r,i),l=new pp(r,i),o=new Fn(r,i),u=new Op,c=a.findAnchor(s);if(!c&&!r.fallbackToBody)return null;const h=(K=(J=c==null?void 0:c.element)!=null?J:(t=s.ownerDocument)==null?void 0:t.body)!=null?K:null;if(!h)return null;const d=!c||c.tier==="C",p=h.tagName.toLowerCase(),m=h.parentElement;let g;if(m&&p!=="body"&&p!=="html"){const P=Array.from(m.children).indexOf(h);P!==-1&&(g=P+1)}const f=o.extract(h),w={tag:h.tagName.toLowerCase(),semantics:f,score:(I=c==null?void 0:c.score)!=null?I:Ce.DEGRADED_SCORE,degraded:d,nthChild:g},v=l.buildPath(h,s,o),C=o.extract(s);r.enableSvgFingerprint&&zp(s)&&(C.svg=u.fingerprint(s));const b=s.parentElement;let S;if(b){const P=Array.from(b.children).indexOf(s);P!==-1&&(S=P+1)}const x={tag:s.tagName.toLowerCase(),semantics:C,score:o.scoreElement(s),nthChild:S},E=[],M={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},L=w.degraded||v.degraded,z=Fp(w.degraded,v),D={version:"1.0",anchor:w,path:v.path,target:x,constraints:E,fallback:M,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:r.source,degraded:L,degradationReason:z}};return D.meta.confidence=Tp(D),D.meta.confidence<r.confidenceThreshold?null:(i.setEID(s,D),D)}function zp(s){return s.namespaceURI==="http://www.w3.org/2000/svg"||s.tagName.toLowerCase()==="svg"||s instanceof SVGElement}function Fp(s,e){if(s&&e.degraded)return"anchor-and-path-degraded";if(s)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function Bp(s,e,t,r){const i={tag:"html",semantics:t.extract(s),score:1,degraded:!1,nthChild:void 0};return{version:"1.0",anchor:i,path:[],target:i,constraints:[],fallback:{onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},meta:{confidence:1,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:e.source,degraded:!1,degradationReason:void 0}}}const Ja={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function Wn(s){return s==="id"?101:ke[s]!==void 0?ke[s]:s.startsWith("data-")?ke["data-*"]:s.startsWith("aria-")?ke["aria-*"]:0}function Wp(s){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(s)}function Hp(s){return!!(/@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/.test(s)||/(\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/.test(s)||/\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}/.test(s))}function Up(s,e){const t=A(A({},Ja),e),r=`v${s.version}`,i=cs(s.anchor,!1,t),n=s.path.length>0?s.path.map(o=>cs(o,!1,t)).join(" > ")+" > ":"",a=cs(s.target,!0,t),l=t.includeConstraints?Vp(s):"";return`${r}: ${i} :: ${n}${a}${l}`}function cs(s,e=!1,t=Ja){const{tag:r,semantics:i}=s;let n=r;const a=[],l=A({},i.attributes);i.id&&(l.id=i.id),i.role&&!l.role&&(l.role=i.role);const o=Object.entries(l).map(([h,d])=>{const p=Wn(h),m=h==="href"||h==="src"?Za(h,d):d;return{name:h,value:m,priority:p}}).filter(h=>h.name!=="id"&&h.name!=="class"&&ja.has(h.name)||Ga.has(h.name)&&Ya(h.value)?!1:h.priority>0||h.name==="role"||h.name==="id");o.sort((h,d)=>d.priority-h.priority);const u=o.slice(0,t.maxAttributes);u.sort((h,d)=>h.name.localeCompare(d.name));for(const{name:h,value:d}of u)a.push(`${h}="${Ys(d)}"`);if(t.includeText&&i.text&&!Hp(i.text.normalized)){const h=i.text.normalized;h.length>0&&h.length<=t.maxTextLength&&a.push(`text="${Ys(h)}"`)}let c=a;if(a.length>0&&(e&&t.simplifyTarget&&i.id&&(c=a.filter(h=>{const d=h.split("=")[0];return Wn(d)>=60||d==="text"||d==="id"||d==="role"})),c.length>0&&c.sort((h,d)=>h.localeCompare(d))),i.classes&&i.classes.length>0){const h=dp(i.classes),d=!!i.id||a.some(p=>p.startsWith("href=")||p.startsWith("data-testid=")||p.startsWith("text=")||p.startsWith("role="));if(!(e&&t.simplifyTarget&&d)&&h.length>0){const p=h.sort().slice(0,t.maxClasses);n+=p.map(m=>`.${m}`).join("")}}if(c.length>0&&(n+=`[${c.join(",")}]`),"nthChild"in s&&s.nthChild){const h=!!i.id||i.attributes&&Object.keys(i.attributes).some(Wp);e&&t.simplifyTarget&&h||(n+=`#${s.nthChild}`)}return n}function Vp(s){if(!s.constraints||s.constraints.length===0)return"";const e=[];for(const t of s.constraints)switch(t.type){case"uniqueness":e.push("unique=true");break;case"position":t.params&&t.params.strategy&&e.push(`pos=${t.params.strategy}`);break;case"text-proximity":if(t.params&&t.params.reference){const r=Ys(String(t.params.reference));e.push(`text="${r}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function Ys(s){return s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function jp(s,e,t){const r=_p(s,e);return r?Up(r,t):null}const dt={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0};function Gp(s){var e,t,r,i;return s===!1?null:s===!0||s===void 0?A({},dt):{maxPathDepth:(e=s.maxPathDepth)!=null?e:dt.maxPathDepth,enableSvgFingerprint:(t=s.enableSvgFingerprint)!=null?t:dt.enableSvgFingerprint,confidenceThreshold:(r=s.confidenceThreshold)!=null?r:dt.confidenceThreshold,fallbackToBody:(i=s.fallbackToBody)!=null?i:dt.fallbackToBody}}function Hn(s,e,t,r){const i=e.getMeta(s),n=i==null?void 0:i.selector;if(n&&!(r!=null&&r.force))return n;const a=s.nodeType===Node.ELEMENT_NODE?s:Ai(s);if(!a)return n;const l=e.getMeta(a),o=l==null?void 0:l.selector;if(o&&!(r!=null&&r.force))return o;if(!t)return o!=null?o:n;const u={maxPathDepth:t.maxPathDepth,enableSvgFingerprint:t.enableSvgFingerprint,fallbackToBody:t.fallbackToBody};try{const c=jp(a,u);if(c)return l?l.selector=c:i&&(i.selector=c),c}catch(c){}return o!=null?o:n}function Un(s){return"__ln"in s}class Yp{constructor(){y(this,"length",0),y(this,"head",null),y(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Un(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Un(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Vn=(s,e)=>`${s}@${e}`,Zp=new Set(["id","class","name","role","title","alt","placeholder","for","type"]);function Jp(s){const e=s.toLowerCase();return Zp.has(e)||e.startsWith("data-")||e.startsWith("aria-")}class Xp{constructor(){y(this,"frozen",!1),y(this,"locked",!1),y(this,"texts",[]),y(this,"attributes",[]),y(this,"attributeMap",new WeakMap),y(this,"removes",[]),y(this,"mapRemoves",[]),y(this,"movedMap",{}),y(this,"addedSet",new Set),y(this,"movedSet",new Set),y(this,"droppedSet",new Set),y(this,"removesSubTreeCache",new Set),y(this,"mutationCb"),y(this,"blockClass"),y(this,"blockSelector"),y(this,"maskTextClass"),y(this,"maskTextSelector"),y(this,"excludeAttribute"),y(this,"inlineStylesheet"),y(this,"maskInputOptions"),y(this,"maskTextFn"),y(this,"maskInputFn"),y(this,"keepIframeSrcFn"),y(this,"recordCanvas"),y(this,"inlineImages"),y(this,"slimDOMOptions"),y(this,"dataURLOptions"),y(this,"selectorOptions",null),y(this,"doc"),y(this,"mirror"),y(this,"iframeManager"),y(this,"stylesheetManager"),y(this,"shadowDomManager"),y(this,"canvasManager"),y(this,"processedNodeManager"),y(this,"unattachedDoc"),y(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),y(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Yp,i=o=>{let u=o,c=bt;for(;c===bt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=o=>{const u=T.parentNode(o);if(!u||!Ua(o))return;let c=!1;if(o.nodeType===Node.TEXT_NODE){const m=u.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const h=pt(u)?this.mirror.getId(Ha(o)):this.mirror.getId(u),d=i(o);if(h===-1||d===-1)return r.addNode(o);const p=Ye(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,excludeAttribute:this.excludeAttribute,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:m=>{Ba(m,this.mirror)&&this.iframeManager.addIframe(m),Wa(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Gs(o)&&this.shadowDomManager.addShadowRoot(T.shadowRoot(o),this.doc)},onIframeLoad:(m,g)=>{this.iframeManager.attachIframe(m,g),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,g)=>{this.stylesheetManager.attachLinkElement(m,g)},cssCaptured:c,selectorOptions:this.selectorOptions});p&&(e.push({parentId:h,nextId:d,node:p}),t.add(p.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const o of this.movedSet)jn(this.removesSubTreeCache,o,this.mirror)&&!this.movedSet.has(T.parentNode(o))||n(o);for(const o of this.addedSet)!Gn(this.droppedSet,o)&&!jn(this.removesSubTreeCache,o,this.mirror)||Gn(this.movedSet,o)?n(o):this.droppedSet.add(o);let a=null;for(;r.length;){let o=null;if(a){const u=this.mirror.getId(T.parentNode(a.value)),c=i(a.value);u!==-1&&c!==-1&&(o=a)}if(!o){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const h=this.mirror.getId(T.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){o=c;break}else{const p=c.value,m=T.parentNode(p);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const g=T.host(m);if(this.mirror.getId(g)!==-1){o=c;break}}}}}}if(!o){for(;r.head;)r.removeNode(r.head.value);break}a=o.previous,r.removeNode(o.value),n(o.value)}const l={texts:this.texts.map(o=>{const u=o.node,c=T.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:o.value,selector:Hn(u,this.mirror,this.selectorOptions)}}).filter(o=>!t.has(o.id)).filter(o=>this.mirror.has(o.id)),attributes:this.attributes.map(o=>{const{attributes:u}=o;if(typeof u.style=="string"){const c=JSON.stringify(o.styleDiff),h=JSON.stringify(o._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=o.styleDiff)}return{id:this.mirror.getId(o.node),attributes:u,selector:Hn(o.node,this.mirror,this.selectorOptions,{force:Object.keys(u).some(Jp)})}}).filter(o=>!t.has(o.id)).filter(o=>this.mirror.has(o.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),y(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from(T.childNodes(e),i=>T.textContent(i)||"").join("");t.attributes.value=mr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:gr(e),value:r,maskInputFn:this.maskInputFn})}),y(this,"processMutation",e=>{if(!as(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=T.textContent(e.target);!ne(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:mo(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Ai(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);const a=t[r],l=typeof a=="boolean",o=document.contains(t),u=Xs(t),c=ps(r,this.excludeAttribute);if(i===null&&!t.hasAttribute(r)&&e.oldValue!==null&&(a===""||a===null||typeof a=="undefined")){console.debug(`[${ge()}] [rrweb:record/mutation] \u26D4 phantom attribute mutation ignored`,{node:T.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:a,isBooleanAttr:l,inDOM:o,isVisible:u,isExcludeAttributeName:c});return}if(ps(r,this.excludeAttribute)){console.debug(`[${ge()}] [rrweb:record/mutation] \u26D4 excluded attribute mutation ignored`,{node:T.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:a,isBooleanAttr:l,inDOM:o,isVisible:u,isExcludeAttributeName:c});return}if(r==="value"){const p=gr(t);i=mr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:p,value:i,maskInputFn:this.maskInputFn})}if(ne(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let d=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(d||(d={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(d),this.attributeMap.set(e.target,d)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!po(t.tagName,r))if(d.attributes[r]=fo(this.doc,ze(t.tagName),ze(r),i),r!=="class"&&(e.oldValue===null||i===""||i!==e.oldValue)&&console.debug(`[${ge()}] [rrweb:record/mutation] \u26A0\uFE0F suspicious attribute mutation`,{reason:[i===e.oldValue?"no change in value":null,i===a?"mirrored in DOM property":null,i===d.attributes[r]?"redundant assignment":null].filter(Boolean).join(", ")||"uncategorized",node:T.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,transformedValue:d.attributes[r],excludeAttribute:this.excludeAttribute,propValue:a,isBooleanAttr:l,inDOM:o,isVisible:u,isExcludeAttributeName:c}),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(g){this.unattachedDoc=this.doc}const m=this.unattachedDoc.createElement("span");e.oldValue&&m.setAttribute("style",e.oldValue);for(const g of Array.from(t.style)){const f=t.style.getPropertyValue(g),w=t.style.getPropertyPriority(g);f!==m.style.getPropertyValue(g)||w!==m.style.getPropertyPriority(g)?w===""?d.styleDiff[g]=f:d.styleDiff[g]=[f,w]:d._unchangedStyles[g]=[f,w]}for(const g of Array.from(m.style))t.style.getPropertyValue(g)===""&&(d.styleDiff[g]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?d.attributes.rr_open_mode="modal":d.attributes.rr_open_mode="non-modal");break}case"childList":{if(ne(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),i=pt(e.target)?this.mirror.getId(T.host(e.target)):this.mirror.getId(e.target);ne(e.target,this.blockClass,this.blockSelector,!1)||as(t,this.mirror,this.slimDOMOptions)||!ep(t,this.mirror)||(this.addedSet.has(t)?(Zs(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Fa(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Vn(r,i)]?Zs(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:pt(e.target)&&mt(e.target)?!0:void 0}),Kp(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),y(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(as(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[Vn(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);ne(e,this.blockClass,this.blockSelector,!1)||(T.childNodes(e).forEach(r=>this.genAdds(r)),Gs(e)&&T.childNodes(T.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","excludeAttribute","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","selectorOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}resetBuffers(){this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.mapRemoves=[],this.movedMap={},this.attributes=[],this.texts=[],this.attributeMap=new WeakMap,this.removes=[]}unsetFrozen(){this.frozen=!1,this.canvasManager.unfreeze()}}function Zs(s,e){s.delete(e),T.childNodes(e).forEach(t=>Zs(s,t))}function Kp(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),T.childNodes(r).forEach(i=>t.push(i)))}}function jn(s,e,t){return s.size===0?!1:qp(s,e)}function qp(s,e,t){const r=T.parentNode(e);return r?s.has(r):!1}function Gn(s,e){return s.size===0?!1:Xa(s,e)}function Xa(s,e){const t=T.parentNode(e);return t?s.has(t)?!0:Xa(s,t):!1}let gt;function Qp(s){gt=s}function em(){gt=void 0}const N=s=>gt?(...t)=>{try{return s(...t)}catch(r){if(gt&>(r)===!0)return;throw r}}:s,me=[];function rt(s){try{if("composedPath"in s){const e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch(e){}return s&&s.target}function Ka(s,e){const t=new Xp;me.push(t),t.init(s);const r=new(xi())(N(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function tm({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let a=[],l;const o=$t(N(h=>{const d=Date.now()-l;s(a.map(p=>(p.timeOffset-=d,p)),h),a=[],l=null}),n),u=N($t(N(h=>{const d=rt(h),{clientX:p,clientY:m}=js(h)?h.changedTouches[0]:h;l||(l=ge()),a.push({x:p,y:m,id:r.getId(d),timeOffset:ge()-l}),o(typeof DragEvent!="undefined"&&h instanceof DragEvent?k.Drag:h instanceof MouseEvent?k.MouseMove:k.TouchMove)}),i,{trailing:!1})),c=[ee("mousemove",u,t),ee("touchmove",u,t),ee("drag",u,t)];return N(()=>{c.forEach(h=>h())})}function rm({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{console.debug("MouseInteractionObserver: No operation needed")};const a=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let o=null;const u=c=>h=>{const d=rt(h);if(ne(d,r,i,!0))return;let p=null,m=c;if("pointerType"in h){switch(h.pointerType){case"mouse":p=Ie.Mouse;break;case"touch":p=Ie.Touch;break;case"pen":p=Ie.Pen;break}p===Ie.Touch?ae[c]===ae.MouseDown?m="TouchStart":ae[c]===ae.MouseUp&&(m="TouchEnd"):Ie.Pen}else js(h)&&(p=Ie.Touch);p!==null?(o=p,(m.startsWith("Touch")&&p===Ie.Touch||m.startsWith("Mouse")&&p===Ie.Mouse)&&(p=null)):ae[c]===ae.Click&&(p=o,o=null);const g=js(h)?h.changedTouches[0]:h;if(!g)return;const f=t.getId(d),{clientX:w,clientY:v}=g;N(s)(A({type:ae[m],id:f,x:w,y:v},p!==null&&{pointerType:p}))};return Object.keys(ae).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&a[c]!==!1).forEach(c=>{let h=ze(c);const d=u(c);if(window.PointerEvent)switch(ae[c]){case ae.MouseDown:case ae.MouseUp:h=h.replace("mouse","pointer");break;case ae.TouchStart:case ae.TouchEnd:return}l.push(ee(h,d,e))}),N(()=>{l.forEach(c=>c())})}function qa({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const a=N($t(N(l=>{const o=rt(l);if(!o||ne(o,r,i,!0))return;const u=t.getId(o);if(o===e&&e.defaultView){const c=Pa(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:o.scrollLeft,y:o.scrollTop})}),n.scroll||100));return ee("scroll",a,e)}function sm({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=N($t(N(()=>{const n=_a(),a=za();(t!==n||r!==a)&&(s({width:Number(a),height:Number(n)}),t=n,r=a)}),200));return ee("resize",i,e)}function im({navigationCb:s,doc:e,sampling:t}){var c;if(t.navigation===!1)return()=>{};const r=e.defaultView;if(!r)return()=>{};let i=r.location.href;const n=[],a=N(h=>{const d=r.location.href;d!==i&&(s({href:d,oldHref:i,navigationType:h}),i=d)}),l=Me(r.history,"pushState",function(h){return function(...d){const p=h.apply(this,d);return a("pushState"),p}});n.push(l);const o=Me(r.history,"replaceState",function(h){return function(...d){const p=h.apply(this,d);return a("replaceState"),p}});if(n.push(o),n.push(ee("popstate",()=>a("popstate"),r)),n.push(ee("hashchange",()=>a("hashchange"),r)),(typeof t.navigation=="object"&&(c=t.navigation.useNavigationAPI)!=null?c:!0)&&"navigation"in r)try{const h=r.navigation,d=p=>{var m;const g=p;if(g.navigationType==="push"||g.navigationType==="replace"){const f=(m=g.destination)==null?void 0:m.url;f&&f!==i&&(s({href:f,oldHref:i,navigationType:"navigate"}),i=f)}};h.addEventListener("navigate",d),n.push(()=>h.removeEventListener("navigate",d))}catch(h){}return N(()=>{n.forEach(h=>h())})}const us=["INPUT","TEXTAREA","SELECT"],Yn=new WeakMap,nm=["Enter","Tab","Escape","ArrowDown","ArrowUp","Delete"],Zn=new WeakMap;function om({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:a,maskInputOptions:l,maskInputFn:o,sampling:u,userTriggeredOnInput:c}){function h(C){let b=rt(C);const S=C.isTrusted,x=b&&b.tagName;if(b&&x==="OPTION"&&(b=T.parentElement(b)),!b||!x||us.indexOf(x)<0||ne(b,r,i,!0)||b.classList.contains(n)||a&&b.matches(a))return;let E=b.value,M=!1;const L=gr(b)||"";L==="radio"||L==="checkbox"?M=b.checked:(l[x.toLowerCase()]||l[L])&&(E=mr({element:b,maskInputOptions:l,tagName:x,type:L,value:E,maskInputFn:o})),d(b,c?{text:E,isChecked:M,userTriggered:S}:{text:E,isChecked:M});const z=b.name;L==="radio"&&z&&M&&e.querySelectorAll(`input[type="radio"][name="${z}"]`).forEach(D=>{if(D!==b){const U=D.value;d(D,c?{text:U,isChecked:!M,userTriggered:!1}:{text:U,isChecked:!M})}})}function d(C,b){const S=Yn.get(C),x=C,E=x.hasAttribute("placeholder"),M=x.value==="",L=typeof x.defaultValue=="string"?x.defaultValue==="":!0,z=!b.userTriggered,D=!S||S.text==="",U=E&&M&&L&&D&&z&&!b.isChecked&&x.type!=="hidden"&&us.includes(x.tagName),J=x.tagName==="INPUT"&&x.type==="text"&&!b.userTriggered&&b.text===x.defaultValue&&!S&&x.hasAttribute("placeholder"),K=!b.userTriggered&&x.value===x.defaultValue&&!S&&x.hasAttribute("placeholder")&&!b.isChecked&&x.type!=="hidden"&&us.includes(x.tagName),I=x.type==="checkbox"&&!b.userTriggered&&!b.isChecked&&!S,P=x.type==="radio"&&!b.userTriggered&&!b.isChecked&&!S;if(U||J||K||I||P){console.debug(`[${ge()}] [rrweb:record/observer] \u26D4 phantom input ignored`,{node:T.describeNode(x),tag:x.tagName,nodeType:x.nodeType,attribute:x.attributes,value:x.value,isLikelyPhantom:U,isRenderDrivenTextInput:J,isValueFromDefault:K,isPhantomCheckbox:I,isPhantomRadio:P});return}if(!S||S.text!==b.text||S.isChecked!==b.isChecked){Yn.set(C,b);const te=t.getId(C);N(s)(oe(A({},b),{id:te}))}}const m=(u.input==="last"?["change"]:["input","change"]).map(C=>ee(C,N(h),e)),g=C=>{const b=rt(C);if(!b||!b.tagName)return;if(u.input==="all"){h(C);return}const S=b.tagName,x=C.key,E=nm.includes(x),M=S==="TEXTAREA",L=e.activeElement===b,z=b.value,D=Zn.get(b);if(Zn.set(b,z),!L){h(C);return}if(E){if(!M){h(C);return}let U=D!=null?D:"",J=0;const K=2,I=()=>{const P=b.value,te=e.activeElement===b,X=P!==U;if(!te){h(C);return}if(X)J=0,U=P;else if(J++,J>=K){h(C);return}requestAnimationFrame(I)};requestAnimationFrame(I);return}};m.push(ee("keydown",N(g),e));const f=e.defaultView;if(!f)return()=>{m.forEach(C=>C())};const w=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),v=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return w&&w.set&&m.push(...v.map(C=>Fr(C[0],C[1],{set(){N(h)({target:this,isTrusted:!1})}},!1,f))),N(()=>{m.forEach(C=>C())})}function $r(s){const e=[];function t(r,i){if(or("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||or("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||or("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||or("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const a=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(a)}else if(r.parentStyleSheet){const a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(a)}return i}return t(s,e)}function Te(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function am({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:N((c,h,d)=>{const[p,m]=d,{id:g,styleId:f}=Te(h,e,t.styleMirror);return(g&&g!==-1||f&&f!==-1)&&s({id:g,styleId:f,adds:[{rule:p,index:m}]}),c.apply(h,d)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,d=this.cssRules.length){const p=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[p,d])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:N((c,h,d)=>{const[p]=d,{id:m,styleId:g}=Te(h,e,t.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,removes:[{index:p}]}),c.apply(h,d)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:N((c,h,d)=>{const[p]=d,{id:m,styleId:g}=Te(h,e,t.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,replace:p}),c.apply(h,d)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:N((c,h,d)=>{const[p]=d,{id:m,styleId:g}=Te(h,e,t.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,replaceSync:p}),c.apply(h,d)})}));const o={};ar("CSSGroupingRule")?o.CSSGroupingRule=r.CSSGroupingRule:(ar("CSSMediaRule")&&(o.CSSMediaRule=r.CSSMediaRule),ar("CSSConditionRule")&&(o.CSSConditionRule=r.CSSConditionRule),ar("CSSSupportsRule")&&(o.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(o).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:N((d,p,m)=>{const[g,f]=m,{id:w,styleId:v}=Te(p.parentStyleSheet,e,t.styleMirror);return(w&&w!==-1||v&&v!==-1)&&s({id:w,styleId:v,adds:[{rule:g,index:[...$r(p),f||0]}]}),d.apply(p,m)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:N((d,p,m)=>{const[g]=m,{id:f,styleId:w}=Te(p.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||w&&w!==-1)&&s({id:f,styleId:w,removes:[{index:[...$r(p),g]}]}),d.apply(p,m)})})}),N(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,a&&(r.CSSStyleSheet.prototype.replace=a),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(o).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function Qa({mirror:s,stylesheetManager:e},t){var r,i,n;let a=null;t.nodeName==="#document"?a=s.getId(t):a=s.getId(T.host(t));const l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,o=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!l||!o?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){var u;return(u=o.get)==null?void 0:u.call(this)},set(u){var c;const h=(c=o.set)==null?void 0:c.call(this,u);if(a!==null&&a!==-1)try{e.adoptStyleSheets(u,a)}catch(d){}return h}}),N(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function lm({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:N((l,o,u)=>{var c;const[h,d,p]=u;if(t.has(h))return n.apply(o,[h,d,p]);const{id:m,styleId:g}=Te((c=o.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,set:{property:h,value:d,priority:p},index:$r(o.parentRule)}),l.apply(o,u)})});const a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:N((l,o,u)=>{var c;const[h]=u;if(t.has(h))return a.apply(o,[h]);const{id:d,styleId:p}=Te((c=o.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(d&&d!==-1||p&&p!==-1)&&s({id:d,styleId:p,remove:{property:h},index:$r(o.parentRule)}),l.apply(o,u)})}),N(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=a})}function cm({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const a=N(o=>$t(N(u=>{const c=rt(u);if(!c||ne(c,e,t,!0))return;const{currentTime:h,volume:d,muted:p,playbackRate:m,loop:g}=c;s({type:o,id:r.getId(c),currentTime:h,volume:d,muted:p,playbackRate:m,loop:g})}),i.media||500)),l=[ee("play",a(je.Play),n),ee("pause",a(je.Pause),n),ee("seeked",a(je.Seeked),n),ee("volumechange",a(je.VolumeChange),n),ee("ratechange",a(je.RateChange),n)];return N(()=>{l.forEach(o=>o())})}function um({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(o,u,c){const h=new n(o,u,c);return i.set(h,{family:o,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(ArrayBuffer.isView(u)?new Uint8Array(u.buffer,u.byteOffset,u.byteLength):new Uint8Array(u)))}),h};const a=Me(e.fonts,"add",function(l){return function(o){return setTimeout(N(()=>{const u=i.get(o);u&&(s(u),i.delete(o))}),0),l.apply(this,[o])}});return r.push(()=>{t.FontFace=n}),r.push(a),N(()=>{r.forEach(l=>l())})}function hm(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let a=!0;const l=N(()=>{const o=e.getSelection();if(!o||a&&(o!=null&&o.isCollapsed))return;a=o.isCollapsed||!1;const u=[],c=o.rangeCount||0;for(let h=0;h<c;h++){const d=o.getRangeAt(h),{startContainer:p,startOffset:m,endContainer:g,endOffset:f}=d;ne(p,r,i,!0)||ne(g,r,i,!0)||u.push({start:t.getId(p),startOffset:m,end:t.getId(g),endOffset:f})}n({ranges:u})});return l(),ee("selectionchange",l)}function dm({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Me(t.customElements,"define",function(i){return function(n,a,l){try{e({define:{name:n}})}catch(o){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,a,l])}})}function fm(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:a,navigationCb:l,inputCb:o,mediaInteractionCb:u,styleSheetRuleCb:c,styleDeclarationCb:h,canvasMutationCb:d,fontCb:p,selectionCb:m,customElementCb:g}=s;s.mutationCb=(...f)=>{e.mutation&&e.mutation(...f),t(...f)},s.mousemoveCb=(...f)=>{e.mousemove&&e.mousemove(...f),r(...f)},s.mouseInteractionCb=(...f)=>{e.mouseInteraction&&e.mouseInteraction(...f),i(...f)},s.scrollCb=(...f)=>{e.scroll&&e.scroll(...f),n(...f)},s.viewportResizeCb=(...f)=>{e.viewportResize&&e.viewportResize(...f),a(...f)},s.navigationCb=(...f)=>{e.navigation&&e.navigation(...f),l(...f)},s.inputCb=(...f)=>{e.input&&e.input(...f),o(...f)},s.mediaInteractionCb=(...f)=>{e.mediaInteaction&&e.mediaInteaction(...f),u(...f)},s.styleSheetRuleCb=(...f)=>{e.styleSheetRule&&e.styleSheetRule(...f),c(...f)},s.styleDeclarationCb=(...f)=>{e.styleDeclaration&&e.styleDeclaration(...f),h(...f)},s.canvasMutationCb=(...f)=>{e.canvasMutation&&e.canvasMutation(...f),d(...f)},s.fontCb=(...f)=>{e.font&&e.font(...f),p(...f)},s.selectionCb=(...f)=>{e.selection&&e.selection(...f),m(...f)},s.customElementCb=(...f)=>{e.customElement&&e.customElement(...f),g(...f)}}function pm(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};fm(s,e);let r;s.recordDOM&&(r=Ka(s,s.doc));const i=tm(s),n=rm(s),a=qa(s),l=sm(s,{win:t}),o=im(s),u=om(s),c=cm(s);let h=()=>{},d=()=>{},p=()=>{},m=()=>{};s.recordDOM&&(h=am(s,{win:t}),d=Qa(s,s.doc),p=lm(s,{win:t}),s.collectFonts&&(m=um(s)));const g=hm(s),f=dm(s),w=[];for(const v of s.plugins)w.push(v.observer(v.callback,t,v.options));return N(()=>{var v;me.forEach(C=>C.reset()),(v=s.visibilityManager)==null||v.reset(),r==null||r.disconnect(),i(),n(),a(),l(),o(),u(),c(),h(),d(),p(),m(),g(),f(),w.forEach(C=>C())})}function or(s){return typeof window[s]!="undefined"}function ar(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class Jn{constructor(e){y(this,"iframeIdToRemoteIdMap",new WeakMap),y(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),a=i||this.getRemoteIdToIdMap(e);let l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),a.set(l,t)),l}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class mm{constructor(e){y(this,"iframes",new WeakMap),y(this,"crossOriginIframeMap",new WeakMap),y(this,"crossOriginIframeMirror",new Jn(ho)),y(this,"crossOriginIframeStyleMirror"),y(this,"crossOriginIframeRootIdMap",new WeakMap),y(this,"mirror"),y(this,"mutationCb"),y(this,"wrappedEmit"),y(this,"loadListener"),y(this,"stylesheetManager"),y(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Jn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case _.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:_.IncrementalSnapshot,data:{source:k.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case _.Meta:case _.Load:case _.DomContentLoaded:return!1;case _.Plugin:return t;case _.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case _.IncrementalSnapshot:switch(t.data.source){case k.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case k.Drag:case k.TouchMove:case k.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case k.ViewportResize:return!1;case k.MediaInteraction:case k.MouseInteraction:case k.Scroll:case k.CanvasMutation:case k.Input:return this.replaceIds(t.data,e,["id"]),t;case k.StyleSheetRule:case k.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case k.Font:return t;case k.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case k.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==Va.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class gm{constructor(e){y(this,"shadowDoms",new WeakSet),y(this,"mutationCb"),y(this,"scrollCb"),y(this,"bypassOptions"),y(this,"mirror"),y(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!mt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Ka(oe(A({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(qa(oe(A({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(T.host(e))),this.restoreHandlers.push(Qa({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(Me(e.prototype,"attachShadow",function(i){return function(n){const a=i.call(this,n),l=T.shadowRoot(this);return l&&Ua(this)&&r.addShadowRoot(l,t),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ym=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var lr=0;lr<Ze.length;lr++)ym[Ze.charCodeAt(lr)]=lr;var bm=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Ze[e[t]>>2],i+=Ze[(e[t]&3)<<4|e[t+1]>>4],i+=Ze[(e[t+1]&15)<<2|e[t+2]>>6],i+=Ze[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const Xn=new Map;function wm(s,e){let t=Xn.get(s);return t||(t=new Map,Xn.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const el=(s,e,t)=>{if(!s||!(rl(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=wm(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function pr(s,e,t){if(s instanceof Array)return s.map(r=>pr(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){const r=s.constructor.name,i=bm(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[pr(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[pr(s.data,e,t),s.width,s.height]};if(rl(s,e)||typeof s=="object"){const r=s.constructor.name,i=el(s,e,t);return{rr_type:r,index:i}}}}return s}const tl=(s,e,t)=>s.map(r=>pr(r,e,t)),rl=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function Sm(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const a of n)try{if(typeof e.CanvasRenderingContext2D.prototype[a]!="function")continue;const l=Me(e.CanvasRenderingContext2D.prototype,a,function(o){return function(...u){return ne(this.canvas,t,r,!0)||setTimeout(()=>{const c=tl(u,e,this);s(this.canvas,{type:tt["2D"],property:a,args:c})},0),o.apply(this,u)}});i.push(l)}catch(l){const o=Fr(e.CanvasRenderingContext2D.prototype,a,{set(u){s(this.canvas,{type:tt["2D"],property:a,args:[u],setter:!0})}});i.push(o)}return()=>{i.forEach(a=>a())}}function vm(s){return s==="experimental-webgl"?"webgl":s}function Kn(s,e,t,r){const i=[];try{const n=Me(s.HTMLCanvasElement.prototype,"getContext",function(a){return function(l,...o){if(!ne(this,e,t,!0)){const u=vm(l);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(o[0]&&typeof o[0]=="object"){const c=o[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[l,...o])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function qn(s,e,t,r,i,n){const a=[],l=Object.getOwnPropertyNames(s);for(const o of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(o))try{if(typeof s[o]!="function")continue;const u=Me(s,o,function(c){return function(...h){const d=c.apply(this,h);if(el(d,n,this),"tagName"in this.canvas&&!ne(this.canvas,r,i,!0)){const p=tl(h,n,this),m={type:e,property:o,args:p};t(this.canvas,m)}return d}});a.push(u)}catch(u){const c=Fr(s,o,{set(h){t(this.canvas,{type:e,property:o,args:[h],setter:!0})}});a.push(c)}return a}function Cm(s,e,t,r){const i=[];return i.push(...qn(e.WebGLRenderingContext.prototype,tt.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...qn(e.WebGL2RenderingContext.prototype,tt.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const sl="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",xm=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),Qn=typeof self!="undefined"&&self.Blob&&new Blob([xm(sl)],{type:"text/javascript;charset=utf-8"});function Am(s){let e;try{if(e=Qn&&(self.URL||self.webkitURL).createObjectURL(Qn),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+sl,{name:s==null?void 0:s.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class Im{constructor(e){y(this,"pendingCanvasMutations",new Map),y(this,"rafStamps",{latestId:0,invokeId:null}),y(this,"mirror"),y(this,"mutationCb"),y(this,"resetObservers"),y(this,"frozen",!1),y(this,"locked",!1),y(this,"processMutation",(o,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(o)||this.pendingCanvasMutations.set(o,[]),this.pendingCanvasMutations.get(o).push(u)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:a,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&t==="all"&&this.initCanvasMutationObserver(r,i,n),a&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){const a=Kn(t,r,i,!0),l=new Map,o=new Am;o.onmessage=m=>{const{id:g}=m.data;if(l.set(g,!1),!("base64"in m.data))return;const{base64:f,type:w,width:v,height:C}=m.data;this.mutationCb({id:g,type:tt["2D"],commands:[{property:"clearRect",args:[0,0,v,C]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:w}]},0,0]}]})};const u=1e3/e;let c=0,h;const d=()=>{const m=[];return t.document.querySelectorAll("canvas").forEach(g=>{ne(g,r,i,!0)||m.push(g)}),m},p=m=>{if(c&&m-c<u){h=requestAnimationFrame(p);return}c=m,d().forEach(async g=>{var f;const w=this.mirror.getId(g);if(l.get(w)||g.width===0||g.height===0)return;if(l.set(w,!0),["webgl","webgl2"].includes(g.__context)){const C=g.getContext(g.__context);((f=C==null?void 0:C.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&C.clear(C.COLOR_BUFFER_BIT)}const v=await createImageBitmap(g);o.postMessage({id:w,bitmap:v,width:g.width,height:g.height,dataURLOptions:n.dataURLOptions},[v])}),h=requestAnimationFrame(p)};h=requestAnimationFrame(p),this.resetObservers=()=>{a(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Kn(e,t,r,!1),n=Sm(this.processMutation.bind(this),e,t,r),a=Cm(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(a=>{const u=a,{type:l}=u;return He(u,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}function eo(s,e,t){var c,h,d,p,m,g;const r=(c=t==null?void 0:t.root)!=null?c:null,i=(h=t==null?void 0:t.threshold)!=null?h:.5,n=(d=t==null?void 0:t.sensitivity)!=null?d:.05,a=Em((p=t==null?void 0:t.rootMargin)!=null?p:"0px"),l=new Map,o=$m(r),u=Mm(o,a);for(const f of s){const w=f.getBoundingClientRect();let v=Tm(),C=0;w.width>0&&w.height>0&&(v=Rm(w,u),C=Om(w,v),C=Math.round(C*100)/100);const b=Nm(f),S=(m=e.get(f))!=null?m:null,x=(g=S==null?void 0:S.intersectionRatio)!=null?g:0,E=C,M=(S==null?void 0:S.isStyleVisible)&&x>i,L=b&&E>i;!S||M!==L||M!==L&&Math.abs(E-x)>n?l.set(f,{target:f,isVisible:L,isStyleVisible:b,intersectionRatio:E,intersectionRect:v,oldValue:S}):l.set(f,S)}return l}function Em(s){const e=s.trim().split(/\s+/),t=(r,i)=>r.endsWith("%")?parseFloat(r)/100*i:parseFloat(r)||0;return function(r){const i=t(e[0]||"0px",r.height),n=t(e[1]||e[0]||"0px",r.width),a=t(e[2]||e[0]||"0px",r.height),l=t(e[3]||e[1]||e[0]||"0px",r.width);return{top:i,right:n,bottom:a,left:l,width:0,height:0}}}function $m(s){return s?s.getBoundingClientRect():new DOMRect(0,0,window.innerWidth,window.innerHeight)}function Mm(s,e){const t=e(s);return new DOMRect(s.left-t.left,s.top-t.top,s.width+t.left+t.right,s.height+t.top+t.bottom)}function Rm(s,e){const t=Math.max(s.top,e.top),r=Math.max(s.left,e.left),i=Math.min(s.bottom,e.bottom),n=Math.min(s.right,e.right),a=Math.max(0,n-r),l=Math.max(0,i-t);return{top:t,left:r,bottom:i,right:n,width:a,height:l}}function Om(s,e){const t=s.width*s.height,r=e.width*e.height;return t>0?r/t:0}function Tm(){return{top:0,left:0,right:0,bottom:0,width:0,height:0}}function Nm(s){const e=getComputedStyle(s);return e&&e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity||"1")>0}class km{constructor(e){var u,c,h,d,p,m;y(this,"frozen",!1),y(this,"locked",!1),y(this,"pending",new Map),y(this,"mirror"),y(this,"mutationCb"),y(this,"rafId",null),y(this,"intervalId",null),y(this,"rafThrottle"),y(this,"lastFlushTime",0),y(this,"elements",new Set),y(this,"previousState",new Map),y(this,"root",null),y(this,"threshold"),y(this,"sensitivity"),y(this,"rootMargin"),y(this,"hasInitialized",!1),y(this,"mode","none"),y(this,"debounce",50),y(this,"throttle",100),y(this,"buffer",new Map),y(this,"debounceTimer",null),y(this,"lastThrottleTime",0),y(this,"disabled",!1),y(this,"notifyActivity");const{doc:t,mirror:r,sampling:i,mutationCb:n,notifyActivity:a}=e;if(this.mirror=r,this.mutationCb=n,this.notifyActivity=a,this.rootMargin="0px",i===!1){this.disabled=!0;return}const l=typeof i=="object"&&i!==null?i:{};this.mode=(u=l==null?void 0:l.mode)!=null?u:"none",this.debounce=Number((c=l==null?void 0:l.debounce)!=null?c:100),this.throttle=Number((h=l==null?void 0:l.throttle)!=null?h:100),this.threshold=Number((d=l==null?void 0:l.threshold)!=null?d:.5),this.sensitivity=Number((p=l==null?void 0:l.sensitivity)!=null?p:.05),this.rafThrottle=Number((m=l==null?void 0:l.rafThrottle)!=null?m:50),t.querySelectorAll("*").forEach(g=>this.observe(g)),new MutationObserver(g=>{g.forEach(f=>{f.addedNodes.forEach(w=>{w.nodeType===Node.ELEMENT_NODE&&(this.observe(w),w.querySelectorAll("*").forEach(v=>this.observe(v)))}),f.removedNodes.forEach(w=>{w.nodeType===Node.ELEMENT_NODE&&this.unobserve(w)})})}).observe(t.body,{childList:!0,subtree:!0}),this.startPendingFlushLoop()}startPendingFlushLoop(){if(!this.disabled)if(typeof requestAnimationFrame=="function"){const e=t=>{t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations()),this.rafId=requestAnimationFrame(e)};this.rafId=requestAnimationFrame(e)}else{const e=()=>{const t=performance.now();t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations())};this.intervalId=setInterval(e,this.rafThrottle)}}flushPendingVisibilityMutations(){if(this.disabled||this.frozen||this.locked||this.elements.size===0)return;const e=eo(this.elements,this.previousState,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin});for(const[t,r]of e.entries()){const i=this.previousState.get(t);if(!i||i.isVisible!==r.isVisible||Math.abs(i.intersectionRatio-r.intersectionRatio)>this.sensitivity){const a=this.mirror.getId(t);a!==-1&&this.buffer.set(t,{id:a,isVisible:r.isVisible,ratio:r.intersectionRatio}),this.previousState.set(t,r)}}if(this.previousState=e,!this.hasInitialized){this.hasInitialized=!0,this.buffer.clear();return}this.scheduleEmit()}scheduleEmit(){if(this.mode==="debounce")clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.flushBuffer(),this.debounce);else if(this.mode==="throttle"){const e=performance.now();e-this.lastThrottleTime>=this.throttle&&(this.lastThrottleTime=e,this.flushBuffer())}else this.flushBuffer()}flushBuffer(){var e;if(this.frozen||this.locked||this.buffer.size===0)return;const t=Array.from(this.buffer.values()),r=t.length;this.buffer.clear(),this.mutationCb({mutations:t}),(e=this.notifyActivity)==null||e.call(this,r)}observe(e){this.disabled||this.elements.add(e)}unobserve(e){this.disabled||(this.elements.delete(e),this.previousState.delete(e),this.pending.delete(e))}freeze(){this.frozen=!0,this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}unfreeze(){this.frozen=!1,this.flushPendingVisibilityMutations()}lock(){this.locked=!0,this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}unlock(){this.locked=!1,this.buffer.clear(),this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),!this.disabled&&this.elements.size>0&&(this.previousState=eo(this.elements,new Map,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin}))}unsetFrozen(){this.frozen=!1}reset(){this.elements.clear(),this.previousState.clear(),this.pending.clear(),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}}const Dm=150,Lm=5e3,Pm=100;class _m{constructor(e){var n,a,l;y(this,"frozen",!1),y(this,"locked",!1),y(this,"disabled",!1),y(this,"settleTimeout"),y(this,"maxWait"),y(this,"debounceMs"),y(this,"settlingObserver",null),y(this,"debounceTimer",null),y(this,"settleCheckTimer",null),y(this,"maxWaitTimer",null),y(this,"lastMutationTime",0),y(this,"pendingNavigation",null),y(this,"doc"),y(this,"onSnapshot");const{doc:t,config:r,onSnapshot:i}=e;this.doc=t,this.onSnapshot=N(i),this.settleTimeout=(n=r.settleTimeout)!=null?n:Dm,this.maxWait=(a=r.maxWait)!=null?a:Lm,this.debounceMs=(l=r.debounce)!=null?l:Pm}handleNavigation(e){this.disabled||this.locked||(this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=e,!this.frozen&&this.startDebounce())}cancelPending(){this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=null}freeze(){this.frozen=!0,this.cancelTimers(),this.disconnectSettlingObserver()}unfreeze(){this.frozen=!1,this.pendingNavigation&&!this.locked&&!this.disabled&&this.startDebounce()}lock(){this.locked=!0,this.cancelTimers(),this.disconnectSettlingObserver()}unlock(){this.locked=!1,this.pendingNavigation=null}unsetFrozen(){this.frozen=!1}reset(){this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=null,this.frozen=!1,this.locked=!1}destroy(){const e=this.pendingNavigation!==null;this.reset(),this.disabled=!0,e&&this.onSnapshot(!0)}startDebounce(){this.debounceTimer=setTimeout(()=>{this.debounceTimer=null,this.startDOMSettling()},this.debounceMs)}startDOMSettling(){if(this.frozen||this.locked||this.disabled)return;this.lastMutationTime=performance.now();const e=xi();this.settlingObserver=new e(()=>{this.lastMutationTime=performance.now(),this.settleCheckTimer!==null&&clearTimeout(this.settleCheckTimer),this.settleCheckTimer=setTimeout(()=>this.checkSettled(),this.settleTimeout)}),this.settlingObserver.observe(this.doc,{childList:!0,subtree:!0}),this.settleCheckTimer=setTimeout(()=>this.checkSettled(),this.settleTimeout),this.maxWaitTimer=setTimeout(()=>{this.maxWaitTimer=null,this.completeSettling()},this.maxWait)}checkSettled(){this.settleCheckTimer=null;const e=performance.now()-this.lastMutationTime;e>=this.settleTimeout?this.completeSettling():this.settleCheckTimer=setTimeout(()=>this.checkSettled(),this.settleTimeout-e)}completeSettling(){this.frozen||this.locked||this.disabled||this.pendingNavigation&&(this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=null,this.onSnapshot(!0))}cancelTimers(){this.debounceTimer!==null&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.settleCheckTimer!==null&&(clearTimeout(this.settleCheckTimer),this.settleCheckTimer=null),this.maxWaitTimer!==null&&(clearTimeout(this.maxWaitTimer),this.maxWaitTimer=null)}disconnectSettlingObserver(){this.settlingObserver&&(this.settlingObserver.disconnect(),this.settlingObserver=null)}}class zm{constructor(e){y(this,"trackedLinkElements",new WeakSet),y(this,"mutationCb"),y(this,"adoptedStyleSheetCb"),y(this,"styleMirror",new rp),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},i=[];for(const n of e){let a;this.styleMirror.has(n)?a=this.styleMirror.getId(n):(a=this.styleMirror.add(n),i.push({styleId:a,rules:Array.from(n.rules||CSSRule,(l,o)=>({rule:so(l,n.href),index:o}))})),r.styleIds.push(a)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Fm{constructor(){y(this,"nodeMap",new WeakMap),y(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}const Bm="3.5.0-alpha.1";let G,Oe,hs,Rt=!1;const Mr=[];let ft;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((Pi=s.contentWindow)==null?void 0:Pi.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const fe=_l();function le(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,checkoutEveryNvm:i,checkoutDebounce:n,blockClass:a="rr-block",blockSelector:l=null,ignoreClass:o="rr-ignore",ignoreSelector:u=null,excludeAttribute:c,maskTextClass:h="rr-mask",maskTextSelector:d=null,inlineStylesheet:p=!0,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:f,maskInputFn:w,maskTextFn:v,hooks:C,packFn:b,sampling:S={},dataURLOptions:x={},mousemoveWait:E,recordDOM:M=!0,recordCanvas:L=!1,recordCrossOriginIframes:z=!1,recordAfter:D=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",flushCustomEvent:U=s.flushCustomEvent!==void 0?s.flushCustomEvent:"after",userTriggeredOnInput:J=!1,collectFonts:K=!1,inlineImages:I=!1,plugins:P,keepIframeSrcFn:te=()=>!1,ignoreCSSAttributes:X=new Set([]),selector:ue,errorHandler:st}=s;Qp(st);const pe=z?window.parent===window:!0;let it=!1;if(!pe)try{window.parent.document&&(it=!1)}catch($){it=!0}if(pe&&!e)throw new Error("emit function is required");if(!pe&&!it)return()=>{};E!==void 0&&S.mousemove===void 0&&(S.mousemove=E),fe.reset();const Br=c===void 0?/.^/:c,Wr=m===!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}:g!==void 0?g:{password:!0},Hr=f===!0||f==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:f==="all",headMetaDescKeywords:f==="all",headTitleMutations:f==="all"}:f||{},$i=Gp(ue);tp();let Mi,Ur=0,Dt=0,Ri=0,Re=!1,ce=null,We=null;const Oi=$=>{for(const ie of P||[])ie.eventProcessor&&($=ie.eventProcessor($));return b&&!it&&($=b($)),$},Lt=()=>{ce=null,Re=!1,We=null,se==null||se.cancelPending(),Oe(!0),me.forEach($=>{$.resetBuffers(),$.unsetFrozen()}),re&&re.unsetFrozen(),se&&se.unsetFrozen()};G=($,ie)=>{var H;const V=$;if(V.timestamp=ge(),V.checkoutId=Ri,(H=me[0])!=null&&H.isFrozen()&&!Re&&V.type!==_.FullSnapshot&&!(V.type===_.IncrementalSnapshot&&V.data.source===k.Mutation)&&(me.forEach(he=>he.unfreeze()),re==null||re.unfreeze(),se==null||se.unfreeze()),pe)e==null||e(Oi(V),ie);else if(it){const he={type:"rrweb",event:Oi(V),isCheckout:ie};window.parent.postMessage(he,"*")}if(V.type===_.FullSnapshot)Mi=V,Ur=0,Dt=0;else if(V.type===_.IncrementalSnapshot){if(V.data.source===k.Mutation&&V.data.isAttachIframe)return;if(V.data.source!==k.Visibility){Ur++;const he=r&&Ur>=r,F=t&&V.timestamp-Mi.timestamp>t;if(he||F)if(n){Re||(Re=!0,We=ge(),me.forEach(ll=>ll.freeze()),re==null||re.freeze()),ce&&clearTimeout(ce);const nt=ge()-We,al=n*3;nt>=al?Lt():ce=setTimeout(()=>Lt(),n)}else Oe(!0)}}};const Pt=$=>{G({type:_.IncrementalSnapshot,data:A({source:k.Mutation},$)})},il=$=>{G({type:_.IncrementalSnapshot,data:A({source:k.Visibility},$)})},Ti=$=>G({type:_.IncrementalSnapshot,data:A({source:k.Scroll},$)}),Ni=$=>G({type:_.IncrementalSnapshot,data:A({source:k.CanvasMutation},$)}),nl=$=>G({type:_.IncrementalSnapshot,data:A({source:k.AdoptedStyleSheet},$)}),Pe=new zm({mutationCb:Pt,adoptedStyleSheetCb:nl}),_e=new mm({mirror:fe,mutationCb:Pt,stylesheetManager:Pe,recordCrossOriginIframes:z,wrappedEmit:G});for(const $ of P||[])$.getMirror&&$.getMirror({nodeMirror:fe,crossOriginIframeMirror:_e.crossOriginIframeMirror,crossOriginIframeStyleMirror:_e.crossOriginIframeStyleMirror});const Vr=new Fm;hs=new Im({recordCanvas:L,mutationCb:Ni,win:window,blockClass:a,blockSelector:l,mirror:fe,sampling:S.canvas,dataURLOptions:x});const _t=new gm({mutationCb:Pt,scrollCb:Ti,bypassOptions:{blockClass:a,blockSelector:l,maskTextClass:h,maskTextSelector:d,excludeAttribute:Br,inlineStylesheet:p,maskInputOptions:Wr,dataURLOptions:x,maskTextFn:v,maskInputFn:w,recordCanvas:L,inlineImages:I,sampling:S,slimDOMOptions:Hr,iframeManager:_e,stylesheetManager:Pe,canvasManager:hs,keepIframeSrcFn:te,processedNodeManager:Vr,selectorOptions:$i},mirror:fe}),ol=M&&(i!=null||(S==null?void 0:S.visibility)!==void 0&&(S==null?void 0:S.visibility)!==!1);let re;if(ol){const $=typeof(S==null?void 0:S.visibility)=="object"&&(S==null?void 0:S.visibility)!==null?S.visibility:{},ie=$.recordVisibility===!0;re=new km({doc:document,mirror:fe,sampling:$,mutationCb:ie?il:()=>{},notifyActivity:i!=null?H=>{if(Dt+=H,Dt>=i)if(Dt=0,n){Re||(Re=!0,We=ge(),me.forEach(F=>F.freeze()),re==null||re.freeze()),ce&&clearTimeout(ce);const V=ge()-We,he=n*3;V>=he?Lt():ce=setTimeout(()=>Lt(),n)}else Oe(!0)}:void 0})}Oe=($=!1)=>{if(!M)return;Ri++,G({type:_.Meta,data:{href:window.location.href,width:za(),height:_a()}},$),Pe.reset(),_t.init(),me.forEach(H=>H.lock()),re==null||re.lock(),se==null||se.lock();const ie=ru(document,{mirror:fe,blockClass:a,blockSelector:l,maskTextClass:h,maskTextSelector:d,excludeAttribute:Br,inlineStylesheet:p,maskAllInputs:Wr,maskTextFn:v,maskInputFn:w,slimDOM:Hr,dataURLOptions:x,recordCanvas:L,inlineImages:I,onSerialize:H=>{Ba(H,fe)&&_e.addIframe(H),Wa(H,fe)&&Pe.trackLinkElement(H),Gs(H)&&_t.addShadowRoot(T.shadowRoot(H),document)},onIframeLoad:(H,V)=>{_e.attachIframe(H,V),_t.observeAttachShadow(H)},onStylesheetLoad:(H,V)=>{Pe.attachLinkElement(H,V)},keepIframeSrcFn:te,selector:ue});if(!ie)return console.warn("Failed to snapshot the document");G({type:_.FullSnapshot,data:{node:ie,initialOffset:Pa(window)}},$),me.forEach(H=>H.unlock()),re==null||re.unlock(),se==null||se.unlock(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Pe.adoptStyleSheets(document.adoptedStyleSheets,fe.getId(document))},ft=()=>{for(const $ of Mr)G($);Mr.length=0};let se;const jr=S.navigation;if(jr!==!1){const $=typeof jr=="object"?jr:{};se=new _m({doc:document,config:$,onSnapshot:ie=>{Re&&(ce&&(clearTimeout(ce),ce=null),Re=!1,We=null,me.forEach(H=>{H.resetBuffers(),H.unsetFrozen()}),re==null||re.unsetFrozen()),Oe(ie)}})}try{const $=[],ie=V=>{var he;return N(pm)({mutationCb:Pt,mousemoveCb:(F,nt)=>G({type:_.IncrementalSnapshot,data:{source:nt,positions:F}}),mouseInteractionCb:F=>G({type:_.IncrementalSnapshot,data:A({source:k.MouseInteraction},F)}),scrollCb:Ti,viewportResizeCb:F=>G({type:_.IncrementalSnapshot,data:A({source:k.ViewportResize},F)}),navigationCb:F=>{se?se.handleNavigation(F):Oe(!0)},inputCb:F=>G({type:_.IncrementalSnapshot,data:A({source:k.Input},F)}),mediaInteractionCb:F=>G({type:_.IncrementalSnapshot,data:A({source:k.MediaInteraction},F)}),styleSheetRuleCb:F=>G({type:_.IncrementalSnapshot,data:A({source:k.StyleSheetRule},F)}),styleDeclarationCb:F=>G({type:_.IncrementalSnapshot,data:A({source:k.StyleDeclaration},F)}),canvasMutationCb:Ni,visibilityManager:re,fontCb:F=>G({type:_.IncrementalSnapshot,data:A({source:k.Font},F)}),selectionCb:F=>{G({type:_.IncrementalSnapshot,data:A({source:k.Selection},F)})},customElementCb:F=>{G({type:_.IncrementalSnapshot,data:A({source:k.CustomElement},F)})},blockClass:a,ignoreClass:o,ignoreSelector:u,maskTextClass:h,maskTextSelector:d,excludeAttribute:Br,maskInputOptions:Wr,inlineStylesheet:p,sampling:S,recordDOM:M,recordCanvas:L,inlineImages:I,userTriggeredOnInput:J,collectFonts:K,doc:V,maskInputFn:w,maskTextFn:v,keepIframeSrcFn:te,blockSelector:l,slimDOMOptions:Hr,dataURLOptions:x,selectorOptions:$i,mirror:fe,iframeManager:_e,stylesheetManager:Pe,shadowDomManager:_t,processedNodeManager:Vr,canvasManager:hs,ignoreCSSAttributes:X,plugins:((he=P==null?void 0:P.filter(F=>F.observer))==null?void 0:he.map(F=>({observer:F.observer,options:F.options,callback:nt=>G({type:_.Plugin,data:{plugin:F.name,payload:nt}})})))||[]},C)};_e.addLoadListener(V=>{try{$.push(ie(V.contentDocument))}catch(he){console.warn(he)}});const H=()=>{U==="before"&&ft(),Oe(),$.push(ie(document)),Rt=!0,U==="after"&&ft()};return document.readyState==="interactive"||document.readyState==="complete"?H():($.push(ee("DOMContentLoaded",()=>{G({type:_.DomContentLoaded,data:{}}),D==="DOMContentLoaded"&&H()})),$.push(ee("load",()=>{G({type:_.Load,data:{}}),D==="load"&&H()},window))),()=>{ce&&(clearTimeout(ce),ce=null),ft(),$.forEach(V=>V()),se==null||se.destroy(),Vr.destroy(),Rt=!1,em()}}catch($){console.warn($)}}le.getVersion=()=>Bm;le.isRecording=()=>Rt;le.flushCustomEventQueue=()=>{console.warn(`[rrweb] CustomEvent flushing: ${Mr.length} events`),ft()};le.addCustomEvent=(s,e)=>{const t={type:_.Custom,data:{tag:s,payload:e}};if(!Rt){console.warn(`[rrweb] CustomEvent buffered before/after recording start: ${s}`),Mr.push(t);return}G(t)};le.freezePage=()=>{me.forEach(s=>s.freeze())};le.takeFullSnapshot=s=>{if(!Rt)throw new Error("please take full snapshot after start recording");Oe(s)};le.mirror=fe;var to;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(to||(to={}));const{getVersion:Eg}=le,{isRecording:$g}=le,{flushCustomEventQueue:Mg}=le,{addCustomEvent:Rg}=le,{freezePage:Og}=le,{takeFullSnapshot:Tg}=le;exports.record=le;
|
|
79
79
|
;if (typeof module.exports == "object" && typeof exports == "object") {
|
|
80
80
|
var __cp = (to, from, except, desc) => {
|
|
81
81
|
if ((from && typeof from === "object") || typeof from === "function") {
|