(() => { let pixel_url_base = "https:\/\/boltbytes.com\/"; let pixel_key = "KufPC2m5kiKYcj2P"; let pixel_exposed_identifier = "analytics"; let pixel_track_events_children = true; let pixel_track_sessions_replays = true; let pixel_heatmaps = [{"heatmap_id":"2","user_id":"1","website_id":"7","snapshot_id_desktop":"99","snapshot_id_tablet":null,"snapshot_id_mobile":"93","name":"ZZvibe","path":"\/","is_enabled":"1","last_datetime":null,"datetime":"2025-03-02 22:04:58","url":"zzvibe.com\/"}]; let pixel_goals = []; let pixel_query_parameters_tracking_is_enabled = 1; /* Helper messages */ let pixel_key_dnt_message = "Do Not Track is active. Your privacy is respected; no tracking will occur."; let pixel_key_optout_message = "Tracking opt-out acknowledged. Your privacy and decision are respected; no tracking will be conducted."; let get_random_string=(e,t)=>{let o="";for(let r=e;r>0;--r)o+=t[Math.round(Math.random()*(t.length-1))];return o},get_dynamic_var=e=>`__${pixel_key}_${e}`,get_random_id=()=>{let e=get_random_string(16,"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"),t=new Date;return e+=t.getFullYear(),e+=t.getMonth(),e+=t.getDate(),e+=t.getHours(),e+=t.getMinutes(),btoa(e+=t.getSeconds())},is_do_not_track=()=>(!!window.doNotTrack||!!navigator.doNotTrack||!!navigator.msDoNotTrack)&&("1"==window.doNotTrack||"yes"==navigator.doNotTrack||"1"==navigator.doNotTrack||"1"==navigator.msDoNotTrack),is_optout=()=>{let e=new URL(document.location).searchParams.get("pixel_optout");return null!==e?(e="true"==e)?(localStorage.setItem(get_dynamic_var("pixel_optout"),"true"),!0):(localStorage.setItem(get_dynamic_var("pixel_optout"),"false"),!1):"true"==localStorage.getItem(get_dynamic_var("pixel_optout"))},get_device_type=()=>{let e=/(?:ipad|playbook|(?:android|bb\d+|meego|silk)(?! .+? mobile))/gi;return/(?:phone|windows\s+phone|ipod|blackberry|(?:android|bb\d+|meego|silk|googlebot) .+? mobile|palm|windows\s+ce|opera mini|avantgo|mobilesafari|docomo)/gi.test(navigator.userAgent)?"mobile":e.test(navigator.userAgent)?"tablet":"desktop"},get_current_url_domain_no_www=()=>{let e=window.location.href.replace(window.location.protocol+"//","");return e.startsWith("www.")&&(e=e.replace("www.","")),e}; var rrwebRecord=function(){"use strict";var F;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(F||(F={}));function Vt(e){return e.nodeType===e.ELEMENT_NODE}function Se(e){var t=e?.host;return Boolean(t?.shadowRoot===e)}function ve(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function jt(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function Zt(e){var t=e.cssText;if(t.split('"').length<3)return t;var r=["@import","url(".concat(JSON.stringify(e.href),")")];return e.layerName===""?r.push("layer"):e.layerName&&r.push("layer(".concat(e.layerName,")")),e.supportsText&&r.push("supports(".concat(e.supportsText,")")),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function Te(e){try{var t=e.rules||e.cssRules;return t?jt(Array.from(t).map(Je).join("")):null}catch{return null}}function Je(e){var t;if(Ht(e))try{t=Te(e.styleSheet)||Zt(e)}catch{}return Ut(t||e.cssText)}function Ut(e){if(e.includes(":")){var t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}return e}function Ht(e){return"styleSheet"in e}var Qe=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var r;if(!t)return-1;var n=(r=this.getMeta(t))===null||r===void 0?void 0:r.id;return n??-1},e.prototype.getNode=function(t){return this.idNodeMap.get(t)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(t){return this.nodeMetaMap.get(t)||null},e.prototype.removeNodeFromMap=function(t){var r=this,n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(function(o){return r.removeNodeFromMap(o)})},e.prototype.has=function(t){return this.idNodeMap.has(t)},e.prototype.hasNode=function(t){return this.nodeMetaMap.has(t)},e.prototype.add=function(t,r){var n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)},e.prototype.replace=function(t,r){var n=this.getNode(t);if(n){var o=this.nodeMetaMap.get(n);o&&this.nodeMetaMap.set(r,o)}this.idNodeMap.set(t,r)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function Bt(){return new Qe}function Ve(e){var t=e.element,r=e.maskInputOptions,n=e.tagName,o=e.type,s=e.value,l=e.maskInputFn,i=s||"",a=o&&ie(o);return(r[n.toLowerCase()]||a&&r[a])&&(l?i=l(i,t):i="*".repeat(i.length)),i}function ie(e){return e.toLowerCase()}var qe="__rrweb_original__";function Xt(e){var t=e.getContext("2d");if(!t)return!0;for(var r=50,n=0;n-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var de,tt,Qt=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,qt=/^(?:[a-z+]+:)?\/\//i,er=/^www\..*/i,tr=/^(data:)([^,]*),(.*)/i;function Ee(e,t){return(e||"").replace(Qt,function(r,n,o,s,l,i){var a=o||l||i,d=n||s||"";if(!a)return r;if(qt.test(a)||er.test(a)||tr.test(a))return"url(".concat(d).concat(a).concat(d,")");if(a[0]==="/")return"url(".concat(d).concat(Jt(t)+a).concat(d,")");var c=t.split("/"),p=a.split("/");c.pop();for(var m=0,h=p;m=t.length);){var s=n(rr);if(s.slice(-1)===",")s=Re(e,s.substring(0,s.length-1)),o.push(s);else{var l="";s=Re(e,s);for(var i=!1;;){var a=t.charAt(r);if(a===""){o.push((s+l).trim());break}else if(i)a===")"&&(i=!1);else if(a===","){r+=1,o.push((s+l).trim());break}else a==="("&&(i=!0);l+=a,r+=1}}}return o.join(", ")}function Re(e,t){if(!t||t.trim()==="")return t;var r=e.createElement("a");return r.href=t,r.href}function ar(e){return Boolean(e.tagName==="svg"||e.ownerSVGElement)}function Ze(){var e=document.createElement("a");return e.href="",e.href}function rt(e,t,r,n){return n&&(r==="src"||r==="href"&&!(t==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&(t==="table"||t==="td"||t==="th")?Re(e,n):r==="srcset"?or(e,n):r==="style"?Ee(n,Ze()):t==="object"&&r==="data"?Re(e,n):n)}function nt(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function sr(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;){var o=e.classList[n];if(t.test(o))return!0}if(r)return e.matches(r)}catch{}return!1}function Le(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Le(e.parentNode,t,r):!1;for(var n=e.classList.length;n--;){var o=e.classList[n];if(t.test(o))return!0}return r?Le(e.parentNode,t,r):!1}function ot(e,t,r){try{var n=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(n===null)return!1;if(typeof t=="string"){if(n.classList.contains(t)||n.closest(".".concat(t)))return!0}else if(Le(n,t,!0))return!0;if(r&&(n.matches(r)||n.closest(r)))return!0}catch{}return!1}function ir(e,t,r){var n=e.contentWindow;if(n){var o=!1,s;try{s=n.document.readyState}catch{return}if(s!=="complete"){var l=setTimeout(function(){o||(t(),o=!0)},r);e.addEventListener("load",function(){clearTimeout(l),o=!0,t()});return}var i="about:blank";if(n.location.href!==i||e.src===i||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}function lr(e,t,r){var n=!1,o;try{o=e.sheet}catch{return}if(!o){var s=setTimeout(function(){n||(t(),n=!0)},r);e.addEventListener("load",function(){clearTimeout(s),n=!0,t()})}}function cr(e,t){var r=t.doc,n=t.mirror,o=t.blockClass,s=t.blockSelector,l=t.maskTextClass,i=t.maskTextSelector,a=t.inlineStylesheet,d=t.maskInputOptions,c=d===void 0?{}:d,p=t.maskTextFn,m=t.maskInputFn,h=t.dataURLOptions,u=h===void 0?{}:h,f=t.inlineImages,b=t.recordCanvas,S=t.keepIframeSrcFn,y=t.newlyAddedElement,g=y===void 0?!1:y,w=dr(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:F.Document,childNodes:[],compatMode:e.compatMode}:{type:F.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:F.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:w};case e.ELEMENT_NODE:return pr(e,{doc:r,blockClass:o,blockSelector:s,inlineStylesheet:a,maskInputOptions:c,maskInputFn:m,dataURLOptions:u,inlineImages:f,recordCanvas:b,keepIframeSrcFn:S,newlyAddedElement:g,rootId:w});case e.TEXT_NODE:return ur(e,{maskTextClass:l,maskTextSelector:i,maskTextFn:p,rootId:w});case e.CDATA_SECTION_NODE:return{type:F.CDATA,textContent:"",rootId:w};case e.COMMENT_NODE:return{type:F.Comment,textContent:e.textContent||"",rootId:w};default:return!1}}function dr(e,t){if(t.hasNode(e)){var r=t.getId(e);return r===1?void 0:r}}function ur(e,t){var r,n=t.maskTextClass,o=t.maskTextSelector,s=t.maskTextFn,l=t.rootId,i=e.parentNode&&e.parentNode.tagName,a=e.textContent,d=i==="STYLE"?!0:void 0,c=i==="SCRIPT"?!0:void 0;if(d&&a){try{e.nextSibling||e.previousSibling||!((r=e.parentNode.sheet)===null||r===void 0)&&r.cssRules&&(a=Te(e.parentNode.sheet))}catch(p){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(p),e)}a=Ee(a,Ze())}return c&&(a="SCRIPT_PLACEHOLDER"),!d&&!c&&a&&ot(e,n,o)&&(a=s?s(a):a.replace(/[\S]/g,"*")),{type:F.Text,textContent:a||"",isStyle:d,rootId:l}}function pr(e,t){for(var r=t.doc,n=t.blockClass,o=t.blockSelector,s=t.inlineStylesheet,l=t.maskInputOptions,i=l===void 0?{}:l,a=t.maskInputFn,d=t.dataURLOptions,c=d===void 0?{}:d,p=t.inlineImages,m=t.recordCanvas,h=t.keepIframeSrcFn,u=t.newlyAddedElement,f=u===void 0?!1:u,b=t.rootId,S=sr(e,n,o),y=Kt(e),g={},w=e.attributes.length,W=0;Wr.removeEventListener(e,t,n)}const pe=`Please stop import mirror directly. Instead of that,\r now you can use replayer.getMirror() to access the mirror instance of a replayer,\r or you can use record.mirror to access the mirror instance during recording.`;let at={map:{},getId(){return console.error(pe),-1},getNode(){return console.error(pe),null},removeNodeFromMap(){console.error(pe)},has(){return console.error(pe),!1},reset(){console.error(pe)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(at=new Proxy(at,{get(e,t,r){return t==="map"&&console.error(pe),Reflect.get(e,t,r)}}));function Ie(e,t,r={}){let n=null,o=0;return function(...s){const l=Date.now();!o&&r.leading===!1&&(o=l);const i=t-(l-o),a=this;i<=0||i>t?(n&&(clearTimeout(n),n=null),o=l,e.apply(a,s)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{o=r.leading===!1?0:Date.now(),n=null,e.apply(a,s)},i))}}function Ne(e,t,r,n,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,n?r:{set(l){setTimeout(()=>{r.set.call(this,l)},0),s&&s.set&&s.set.call(this,l)}}),()=>Ne(e,t,s||{},!0)}function Ce(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],o=r(n);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=o,()=>{e[t]=n}}catch{return()=>{}}}let xe=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(xe=()=>new Date().getTime());function st(e){var t,r,n,o,s,l;const i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:i?.documentElement.scrollLeft||((r=(t=i?.body)==null?void 0:t.parentElement)==null?void 0:r.scrollLeft)||((n=i?.body)==null?void 0:n.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:i?.documentElement.scrollTop||((s=(o=i?.body)==null?void 0:o.parentElement)==null?void 0:s.scrollTop)||((l=i?.body)==null?void 0:l.scrollTop)||0}}function it(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function lt(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function G(e,t,r,n){if(!e)return!1;const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!o)return!1;try{if(typeof t=="string"){if(o.classList.contains(t)||n&&o.closest("."+t)!==null)return!0}else if(Le(o,t,n))return!0}catch{}return!!(r&&(o.matches(r)||n&&o.closest(r)!==null))}function fr(e,t){return t.getId(e)!==-1}function Ue(e,t){return t.getId(e)===be}function ct(e,t){if(Se(e))return!1;const r=t.getId(e);return t.has(r)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?ct(e.parentNode,t):!0:!0}function He(e){return Boolean(e.changedTouches)}function yr(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let r=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===r)return!0;while(r=r&&r.parentNode);return!1})}function dt(e,t){return Boolean(e.nodeName==="IFRAME"&&t.getMeta(e))}function ut(e,t){return Boolean(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Be(e){return Boolean(e?.shadowRoot)}class gr{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){var r;return(r=this.styleIDMap.get(t))!=null?r:-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function pt(e){var t,r;let n=null;return((r=(t=e.getRootNode)==null?void 0:t.call(e))==null?void 0:r.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(n=e.getRootNode().host),n}function Sr(e){let t=e,r;for(;r=pt(t);)t=r;return t}function vr(e){const t=e.ownerDocument;if(!t)return!1;const r=Sr(e);return t.contains(r)}function ht(e){const t=e.ownerDocument;return t?t.contains(e)||vr(e):!1}var k=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(k||{}),C=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e))(C||{}),z=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(z||{}),oe=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(oe||{}),he=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(he||{}),me=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(me||{}),br=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e))(br||{});function mt(e){return"__ln"in e}class Ir{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n`${e}@${t}`;class Cr{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],r=new Set,n=new Ir,o=a=>{let d=a,c=be;for(;c===be;)d=d&&d.nextSibling,c=d&&this.mirror.getId(d);return c},s=a=>{if(!a.parentNode||!ht(a))return;const d=Se(a.parentNode)?this.mirror.getId(pt(a)):this.mirror.getId(a.parentNode),c=o(a);if(d===-1||c===-1)return n.addNode(a);const p=ue(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,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=>{dt(m,this.mirror)&&this.iframeManager.addIframe(m),ut(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Be(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,this.doc)},onIframeLoad:(m,h)=>{this.iframeManager.attachIframe(m,h),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,h)=>{this.stylesheetManager.attachLinkElement(m,h)}});p&&(t.push({parentId:d,nextId:c,node:p}),r.add(p.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)yt(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||s(a);for(const a of this.addedSet)!St(this.droppedSet,a)&&!yt(this.removes,a,this.mirror)||St(this.movedSet,a)?s(a):this.droppedSet.add(a);let l=null;for(;n.length;){let a=null;if(l){const d=this.mirror.getId(l.value.parentNode),c=o(l.value);d!==-1&&c!==-1&&(a=l)}if(!a){let d=n.tail;for(;d;){const c=d;if(d=d.previous,c){const p=this.mirror.getId(c.value.parentNode);if(o(c.value)===-1)continue;if(p!==-1){a=c;break}else{const m=c.value;if(m.parentNode&&m.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const h=m.parentNode.host;if(this.mirror.getId(h)!==-1){a=c;break}}}}}}if(!a){for(;n.head;)n.removeNode(n.head.value);break}l=a.previous,n.removeNode(a.value),s(a.value)}const i={texts:this.texts.map(a=>({id:this.mirror.getId(a.node),value:a.value})).filter(a=>!r.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:d}=a;if(typeof d.style=="string"){const c=JSON.stringify(a.styleDiff),p=JSON.stringify(a._unchangedStyles);c.length!r.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:t};!i.texts.length&&!i.attributes.length&&!i.removes.length&&!i.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(i))},this.processMutation=t=>{if(Ue(t.target,this.mirror))return;let r;try{r=document.implementation.createHTMLDocument()}catch{r=this.doc}switch(t.type){case"characterData":{const n=t.target.textContent;!G(t.target,this.blockClass,this.blockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:ot(t.target,this.maskTextClass,this.maskTextSelector)&&n?this.maskTextFn?this.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let o=t.attributeName,s=t.target.getAttribute(o);if(o==="value"){const i=je(n);s=Ve({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:i,value:s,maskInputFn:this.maskInputFn})}if(G(t.target,this.blockClass,this.blockSelector,!1)||s===t.oldValue)return;let l=this.attributes.find(i=>i.node===t.target);if(n.tagName==="IFRAME"&&o==="src"&&!this.keepIframeSrcFn(s))if(!n.contentDocument)o="rr_src";else return;if(l||(l={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(l)),o==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!nt(n.tagName,o)&&(l.attributes[o]=rt(this.doc,ie(n.tagName),ie(o),s),o==="style")){const i=r.createElement("span");t.oldValue&&i.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const d=n.style.getPropertyValue(a),c=n.style.getPropertyPriority(a);d!==i.style.getPropertyValue(a)||c!==i.style.getPropertyPriority(a)?c===""?l.styleDiff[a]=d:l.styleDiff[a]=[d,c]:l._unchangedStyles[a]=[d,c]}for(const a of Array.from(i.style))n.style.getPropertyValue(a)===""&&(l.styleDiff[a]=!1)}break}case"childList":{if(G(t.target,this.blockClass,this.blockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const o=this.mirror.getId(n),s=Se(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);G(t.target,this.blockClass,this.blockSelector,!1)||Ue(n,this.mirror)||!fr(n,this.mirror)||(this.addedSet.has(n)?(Xe(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&o===-1||ct(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[ft(o,s)]?Xe(this.movedSet,n):this.removes.push({parentId:s,id:o,isShadow:Se(t.target)&&ve(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Ue(t,this.mirror))return;this.movedSet.add(t);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[ft(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);G(t,this.blockClass,this.blockSelector,!1)||(t.childNodes.forEach(n=>this.genAdds(n)),Be(t)&&t.shadowRoot.childNodes.forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}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()}}function Xe(e,t){e.delete(t),t.childNodes.forEach(r=>Xe(e,r))}function yt(e,t,r){return e.length===0?!1:gt(e,t,r)}function gt(e,t,r){const{parentNode:n}=t;if(!n)return!1;const o=r.getId(n);return e.some(s=>s.id===o)?!0:gt(e,n,r)}function St(e,t){return e.size===0?!1:vt(e,t)}function vt(e,t){const{parentNode:r}=t;return r?e.has(r)?!0:vt(e,r):!1}let ke;function kr(e){ke=e}function Mr(){ke=void 0}const I=e=>ke?(...t)=>{try{return e(...t)}catch(r){if(ke&&ke(r)===!0)return;throw r}}:e;var wr=Object.defineProperty,Or=Object.defineProperties,Tr=Object.getOwnPropertyDescriptors,bt=Object.getOwnPropertySymbols,Er=Object.prototype.hasOwnProperty,Rr=Object.prototype.propertyIsEnumerable,It=(e,t,r)=>t in e?wr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ye=(e,t)=>{for(var r in t||(t={}))Er.call(t,r)&&It(e,r,t[r]);if(bt)for(var r of bt(t))Rr.call(t,r)&&It(e,r,t[r]);return e},Lr=(e,t)=>Or(e,Tr(t));const le=[];function Me(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Ct(e,t){var r,n;const o=new Cr;le.push(o),o.init(e);let s=window.MutationObserver||window.__rrMutationObserver;const l=(n=(r=window?.Zone)==null?void 0:r.__symbol__)==null?void 0:n.call(r,"MutationObserver");l&&window[l]&&(s=window[l]);const i=new s(I(o.processMutations.bind(o)));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function Nr({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let l=[],i;const a=Ie(I(p=>{const m=Date.now()-i;e(l.map(h=>(h.timeOffset-=m,h)),p),l=[],i=null}),s),d=I(Ie(I(p=>{const m=Me(p),{clientX:h,clientY:u}=He(p)?p.changedTouches[0]:p;i||(i=xe()),l.push({x:h,y:u,id:n.getId(m),timeOffset:xe()-i}),a(typeof DragEvent<"u"&&p instanceof DragEvent?C.Drag:p instanceof MouseEvent?C.MouseMove:C.TouchMove)}),o,{trailing:!1})),c=[_("mousemove",d,r),_("touchmove",d,r),_("drag",d,r)];return I(()=>{c.forEach(p=>p())})}function xr({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,sampling:s}){if(s.mouseInteraction===!1)return()=>{};const l=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,i=[];let a=null;const d=c=>p=>{const m=Me(p);if(G(m,n,o,!0))return;let h=null,u=c;if("pointerType"in p){switch(p.pointerType){case"mouse":h=oe.Mouse;break;case"touch":h=oe.Touch;break;case"pen":h=oe.Pen;break}h===oe.Touch?z[c]===z.MouseDown?u="TouchStart":z[c]===z.MouseUp&&(u="TouchEnd"):oe.Pen}else He(p)&&(h=oe.Touch);h!==null?(a=h,(u.startsWith("Touch")&&h===oe.Touch||u.startsWith("Mouse")&&h===oe.Mouse)&&(h=null)):z[c]===z.Click&&(h=a,a=null);const f=He(p)?p.changedTouches[0]:p;if(!f)return;const b=r.getId(m),{clientX:S,clientY:y}=f;I(e)(Ye({type:z[u],id:b,x:S,y},h!==null&&{pointerType:h}))};return Object.keys(z).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&l[c]!==!1).forEach(c=>{let p=ie(c);const m=d(c);if(window.PointerEvent)switch(z[c]){case z.MouseDown:case z.MouseUp:p=p.replace("mouse","pointer");break;case z.TouchStart:case z.TouchEnd:return}i.push(_(p,m,t))}),I(()=>{i.forEach(c=>c())})}function kt({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,sampling:s}){const l=I(Ie(I(i=>{const a=Me(i);if(!a||G(a,n,o,!0))return;const d=r.getId(a);if(a===t&&t.defaultView){const c=st(t.defaultView);e({id:d,x:c.left,y:c.top})}else e({id:d,x:a.scrollLeft,y:a.scrollTop})}),s.scroll||100));return _("scroll",l,t)}function Dr({viewportResizeCb:e},{win:t}){let r=-1,n=-1;const o=I(Ie(I(()=>{const s=it(),l=lt();(r!==s||n!==l)&&(e({width:Number(l),height:Number(s)}),r=s,n=l)}),200));return _("resize",o,t)}function Mt(e,t){const r=Ye({},e);return t||delete r.userTriggered,r}const Fr=["INPUT","TEXTAREA","SELECT"],wt=new WeakMap;function Ar({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,ignoreClass:s,ignoreSelector:l,maskInputOptions:i,maskInputFn:a,sampling:d,userTriggeredOnInput:c}){function p(S){let y=Me(S);const g=S.isTrusted,w=y&&y.tagName;if(y&&w==="OPTION"&&(y=y.parentElement),!y||!w||Fr.indexOf(w)<0||G(y,n,o,!0)||y.classList.contains(s)||l&&y.matches(l))return;let W=y.value,D=!1;const x=je(y)||"";x==="radio"||x==="checkbox"?D=y.checked:(i[w.toLowerCase()]||i[x])&&(W=Ve({element:y,maskInputOptions:i,tagName:w,type:x,value:W,maskInputFn:a})),m(y,I(Mt)({text:W,isChecked:D,userTriggered:g},c));const T=y.name;x==="radio"&&T&&D&&t.querySelectorAll(`input[type="radio"][name="${T}"]`).forEach(U=>{U!==y&&m(U,I(Mt)({text:U.value,isChecked:!D,userTriggered:!1},c))})}function m(S,y){const g=wt.get(S);if(!g||g.text!==y.text||g.isChecked!==y.isChecked){wt.set(S,y);const w=r.getId(S);I(e)(Lr(Ye({},y),{id:w}))}}const h=(d.input==="last"?["change"]:["input","change"]).map(S=>_(S,I(p),t)),u=t.defaultView;if(!u)return()=>{h.forEach(S=>S())};const f=u.Object.getOwnPropertyDescriptor(u.HTMLInputElement.prototype,"value"),b=[[u.HTMLInputElement.prototype,"value"],[u.HTMLInputElement.prototype,"checked"],[u.HTMLSelectElement.prototype,"value"],[u.HTMLTextAreaElement.prototype,"value"],[u.HTMLSelectElement.prototype,"selectedIndex"],[u.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&h.push(...b.map(S=>Ne(S[0],S[1],{set(){I(p)({target:this,isTrusted:!1})}},!1,u))),I(()=>{h.forEach(S=>S())})}function De(e){const t=[];function r(n,o){if(Fe("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||Fe("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||Fe("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||Fe("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){const s=Array.from(n.parentRule.cssRules).indexOf(n);o.unshift(s)}else if(n.parentStyleSheet){const s=Array.from(n.parentStyleSheet.cssRules).indexOf(n);o.unshift(s)}return o}return r(e,t)}function ae(e,t,r){let n,o;return e?(e.ownerNode?n=t.getId(e.ownerNode):o=r.getId(e),{styleId:o,id:n}):{}}function Pr({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const o=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:I((c,p,m)=>{const[h,u]=m,{id:f,styleId:b}=ae(p,t,r.styleMirror);return(f&&f!==-1||b&&b!==-1)&&e({id:f,styleId:b,adds:[{rule:h,index:u}]}),c.apply(p,m)})});const s=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:I((c,p,m)=>{const[h]=m,{id:u,styleId:f}=ae(p,t,r.styleMirror);return(u&&u!==-1||f&&f!==-1)&&e({id:u,styleId:f,removes:[{index:h}]}),c.apply(p,m)})});let l;n.CSSStyleSheet.prototype.replace&&(l=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(l,{apply:I((c,p,m)=>{const[h]=m,{id:u,styleId:f}=ae(p,t,r.styleMirror);return(u&&u!==-1||f&&f!==-1)&&e({id:u,styleId:f,replace:h}),c.apply(p,m)})}));let i;n.CSSStyleSheet.prototype.replaceSync&&(i=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(i,{apply:I((c,p,m)=>{const[h]=m,{id:u,styleId:f}=ae(p,t,r.styleMirror);return(u&&u!==-1||f&&f!==-1)&&e({id:u,styleId:f,replaceSync:h}),c.apply(p,m)})}));const a={};Ae("CSSGroupingRule")?a.CSSGroupingRule=n.CSSGroupingRule:(Ae("CSSMediaRule")&&(a.CSSMediaRule=n.CSSMediaRule),Ae("CSSConditionRule")&&(a.CSSConditionRule=n.CSSConditionRule),Ae("CSSSupportsRule")&&(a.CSSSupportsRule=n.CSSSupportsRule));const d={};return Object.entries(a).forEach(([c,p])=>{d[c]={insertRule:p.prototype.insertRule,deleteRule:p.prototype.deleteRule},p.prototype.insertRule=new Proxy(d[c].insertRule,{apply:I((m,h,u)=>{const[f,b]=u,{id:S,styleId:y}=ae(h.parentStyleSheet,t,r.styleMirror);return(S&&S!==-1||y&&y!==-1)&&e({id:S,styleId:y,adds:[{rule:f,index:[...De(h),b||0]}]}),m.apply(h,u)})}),p.prototype.deleteRule=new Proxy(d[c].deleteRule,{apply:I((m,h,u)=>{const[f]=u,{id:b,styleId:S}=ae(h.parentStyleSheet,t,r.styleMirror);return(b&&b!==-1||S&&S!==-1)&&e({id:b,styleId:S,removes:[{index:[...De(h),f]}]}),m.apply(h,u)})})}),I(()=>{n.CSSStyleSheet.prototype.insertRule=o,n.CSSStyleSheet.prototype.deleteRule=s,l&&(n.CSSStyleSheet.prototype.replace=l),i&&(n.CSSStyleSheet.prototype.replaceSync=i),Object.entries(a).forEach(([c,p])=>{p.prototype.insertRule=d[c].insertRule,p.prototype.deleteRule=d[c].deleteRule})})}function Ot({mirror:e,stylesheetManager:t},r){var n,o,s;let l=null;r.nodeName==="#document"?l=e.getId(r):l=e.getId(r.host);const i=r.nodeName==="#document"?(n=r.defaultView)==null?void 0:n.Document:(s=(o=r.ownerDocument)==null?void 0:o.defaultView)==null?void 0:s.ShadowRoot,a=Object.getOwnPropertyDescriptor(i?.prototype,"adoptedStyleSheets");return l===null||l===-1||!i||!a?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var d;return(d=a.get)==null?void 0:d.call(this)},set(d){var c;const p=(c=a.set)==null?void 0:c.call(this,d);if(l!==null&&l!==-1)try{t.adoptStyleSheets(d,l)}catch{}return p}}),I(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function Wr({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:I((i,a,d)=>{var c;const[p,m,h]=d;if(r.has(p))return s.apply(a,[p,m,h]);const{id:u,styleId:f}=ae((c=a.parentRule)==null?void 0:c.parentStyleSheet,t,n.styleMirror);return(u&&u!==-1||f&&f!==-1)&&e({id:u,styleId:f,set:{property:p,value:m,priority:h},index:De(a.parentRule)}),i.apply(a,d)})});const l=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:I((i,a,d)=>{var c;const[p]=d;if(r.has(p))return l.apply(a,[p]);const{id:m,styleId:h}=ae((c=a.parentRule)==null?void 0:c.parentStyleSheet,t,n.styleMirror);return(m&&m!==-1||h&&h!==-1)&&e({id:m,styleId:h,remove:{property:p},index:De(a.parentRule)}),i.apply(a,d)})}),I(()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=l})}function _r({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:o,doc:s}){const l=I(a=>Ie(I(d=>{const c=Me(d);if(!c||G(c,t,r,!0))return;const{currentTime:p,volume:m,muted:h,playbackRate:u}=c;e({type:a,id:n.getId(c),currentTime:p,volume:m,muted:h,playbackRate:u})}),o.media||500)),i=[_("play",l(me.Play),s),_("pause",l(me.Pause),s),_("seeked",l(me.Seeked),s),_("volumechange",l(me.VolumeChange),s),_("ratechange",l(me.RateChange),s)];return I(()=>{i.forEach(a=>a())})}function Gr({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const n=[],o=new WeakMap,s=r.FontFace;r.FontFace=function(i,a,d){const c=new s(i,a,d);return o.set(c,{family:i,buffer:typeof a!="string",descriptors:d,fontSource:typeof a=="string"?a:JSON.stringify(Array.from(new Uint8Array(a)))}),c};const l=Ce(t.fonts,"add",function(i){return function(a){return setTimeout(I(()=>{const d=o.get(a);d&&(e(d),o.delete(a))}),0),i.apply(this,[a])}});return n.push(()=>{r.FontFace=s}),n.push(l),I(()=>{n.forEach(i=>i())})}function zr(e){const{doc:t,mirror:r,blockClass:n,blockSelector:o,selectionCb:s}=e;let l=!0;const i=I(()=>{const a=t.getSelection();if(!a||l&&a?.isCollapsed)return;l=a.isCollapsed||!1;const d=[],c=a.rangeCount||0;for(let p=0;p{t.mutation&&t.mutation(...u),r(...u)},e.mousemoveCb=(...u)=>{t.mousemove&&t.mousemove(...u),n(...u)},e.mouseInteractionCb=(...u)=>{t.mouseInteraction&&t.mouseInteraction(...u),o(...u)},e.scrollCb=(...u)=>{t.scroll&&t.scroll(...u),s(...u)},e.viewportResizeCb=(...u)=>{t.viewportResize&&t.viewportResize(...u),l(...u)},e.inputCb=(...u)=>{t.input&&t.input(...u),i(...u)},e.mediaInteractionCb=(...u)=>{t.mediaInteaction&&t.mediaInteaction(...u),a(...u)},e.styleSheetRuleCb=(...u)=>{t.styleSheetRule&&t.styleSheetRule(...u),d(...u)},e.styleDeclarationCb=(...u)=>{t.styleDeclaration&&t.styleDeclaration(...u),c(...u)},e.canvasMutationCb=(...u)=>{t.canvasMutation&&t.canvasMutation(...u),p(...u)},e.fontCb=(...u)=>{t.font&&t.font(...u),m(...u)},e.selectionCb=(...u)=>{t.selection&&t.selection(...u),h(...u)}}function jr(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};Vr(e,t);const n=Ct(e,e.doc),o=Nr(e),s=xr(e),l=kt(e),i=Dr(e,{win:r}),a=Ar(e),d=_r(e),c=Pr(e,{win:r}),p=Ot(e,e.doc),m=Wr(e,{win:r}),h=e.collectFonts?Gr(e):()=>{},u=zr(e),f=[];for(const b of e.plugins)f.push(b.observer(b.callback,r,b.options));return I(()=>{le.forEach(b=>b.reset()),n.disconnect(),o(),s(),l(),i(),a(),d(),c(),p(),m(),h(),u(),f.forEach(b=>b())})}function Fe(e){return typeof window[e]<"u"}function Ae(e){return Boolean(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Tt{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,r,n,o){const s=n||this.getIdToRemoteIdMap(t),l=o||this.getRemoteIdToIdMap(t);let i=s.get(r);return i||(i=this.generateIdFn(),s.set(r,i),l.set(i,r)),i}getIds(t,r){const n=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return r.map(s=>this.getId(t,s,n,o))}getRemoteId(t,r,n){const o=n||this.getRemoteIdToIdMap(t);return typeof r!="number"?r:o.get(r)||-1}getRemoteIds(t,r){const n=this.getRemoteIdToIdMap(t);return r.map(o=>this.getRemoteId(t,o,n))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}}class Zr{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Tt(et),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Tt(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(n=this.loadListener)==null||n.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;const n=this.crossOriginIframeMap.get(t.source);if(!n)return;const o=this.transformCrossOriginEvent(n,r.data.event);o&&this.wrappedEmit(o,r.data.isCheckout)}transformCrossOriginEvent(t,r){var n;switch(r.type){case k.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);const o=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,o),this.patchRootIdOnNode(r.data.node,o),{timestamp:r.timestamp,type:k.IncrementalSnapshot,data:{source:C.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case k.Meta:case k.Load:case k.DomContentLoaded:return!1;case k.Plugin:return r;case k.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case k.IncrementalSnapshot:switch(r.data.source){case C.Mutation:return r.data.adds.forEach(o=>{this.replaceIds(o,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(o.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(o.node,s)}),r.data.removes.forEach(o=>{this.replaceIds(o,t,["parentId","id"])}),r.data.attributes.forEach(o=>{this.replaceIds(o,t,["id"])}),r.data.texts.forEach(o=>{this.replaceIds(o,t,["id"])}),r;case C.Drag:case C.TouchMove:case C.MouseMove:return r.data.positions.forEach(o=>{this.replaceIds(o,t,["id"])}),r;case C.ViewportResize:return!1;case C.MediaInteraction:case C.MouseInteraction:case C.Scroll:case C.CanvasMutation:case C.Input:return this.replaceIds(r.data,t,["id"]),r;case C.StyleSheetRule:case C.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case C.Font:return r;case C.Selection:return r.data.ranges.forEach(o=>{this.replaceIds(o,t,["start","end"])}),r;case C.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(n=r.data.styles)==null||n.forEach(o=>{this.replaceStyleIds(o,t,["styleId"])}),r}}}replace(t,r,n,o){for(const s of o)!Array.isArray(r[s])&&typeof r[s]!="number"||(Array.isArray(r[s])?r[s]=t.getIds(n,r[s]):r[s]=t.getId(n,r[s]));return r}replaceIds(t,r,n){return this.replace(this.crossOriginIframeMirror,t,r,n)}replaceStyleIds(t,r,n){return this.replace(this.crossOriginIframeStyleMirror,t,r,n)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(t,r){t.type!==F.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}}var Ur=Object.defineProperty,Hr=Object.defineProperties,Br=Object.getOwnPropertyDescriptors,Et=Object.getOwnPropertySymbols,Xr=Object.prototype.hasOwnProperty,Yr=Object.prototype.propertyIsEnumerable,Rt=(e,t,r)=>t in e?Ur(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Lt=(e,t)=>{for(var r in t||(t={}))Xr.call(t,r)&&Rt(e,r,t[r]);if(Et)for(var r of Et(t))Yr.call(t,r)&&Rt(e,r,t[r]);return e},Nt=(e,t)=>Hr(e,Br(t));class $r{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!ve(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const n=Ct(Nt(Lt({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(kt(Nt(Lt({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(Ot({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){const n=this;this.restoreHandlers.push(Ce(t.prototype,"attachShadow",function(o){return function(s){const l=o.call(this,s);return this.shadowRoot&&ht(this)&&n.addShadowRoot(this.shadowRoot,r),l}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Kr=typeof Uint8Array>"u"?[]:new Uint8Array(256),Pe=0;Pe>2],o+=fe[(t[r]&3)<<4|t[r+1]>>4],o+=fe[(t[r+1]&15)<<2|t[r+2]>>6],o+=fe[t[r+2]&63];return n%3===2?o=o.substring(0,o.length-1)+"=":n%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const xt=new Map;function Qr(e,t){let r=xt.get(e);return r||(r=new Map,xt.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const Dt=(e,t,r)=>{if(!e||!(At(e,t)||typeof e=="object"))return;const n=e.constructor.name,o=Qr(r,n);let s=o.indexOf(e);return s===-1&&(s=o.length,o.push(e)),s};function We(e,t,r){if(e instanceof Array)return e.map(n=>We(n,t,r));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const n=e.constructor.name,o=Jr(e);return{rr_type:n,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[We(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const n=e.constructor.name,{src:o}=e;return{rr_type:n,src:o}}else if(e instanceof HTMLCanvasElement){const n="HTMLImageElement",o=e.toDataURL();return{rr_type:n,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[We(e.data,t,r),e.width,e.height]};if(At(e,t)||typeof e=="object"){const n=e.constructor.name,o=Dt(e,t,r);return{rr_type:n,index:o}}}}return e}const Ft=(e,t,r)=>[...e].map(n=>We(n,t,r)),At=(e,t)=>{const r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(n=>typeof t[n]=="function");return Boolean(r.find(n=>e instanceof t[n]))};function qr(e,t,r,n){const o=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const l of s)try{if(typeof t.CanvasRenderingContext2D.prototype[l]!="function")continue;const i=Ce(t.CanvasRenderingContext2D.prototype,l,function(a){return function(...d){return G(this.canvas,r,n,!0)||setTimeout(()=>{const c=Ft([...d],t,this);e(this.canvas,{type:he["2D"],property:l,args:c})},0),a.apply(this,d)}});o.push(i)}catch{const a=Ne(t.CanvasRenderingContext2D.prototype,l,{set(d){e(this.canvas,{type:he["2D"],property:l,args:[d],setter:!0})}});o.push(a)}return()=>{o.forEach(l=>l())}}function en(e){return e==="experimental-webgl"?"webgl":e}function Pt(e,t,r,n){const o=[];try{const s=Ce(e.HTMLCanvasElement.prototype,"getContext",function(l){return function(i,...a){if(!G(this,t,r,!0)){const d=en(i);if("__context"in this||(this.__context=d),n&&["webgl","webgl2"].includes(d))if(a[0]&&typeof a[0]=="object"){const c=a[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return l.apply(this,[i,...a])}});o.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(s=>s())}}function Wt(e,t,r,n,o,s,l){const i=[],a=Object.getOwnPropertyNames(e);for(const d of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(d))try{if(typeof e[d]!="function")continue;const c=Ce(e,d,function(p){return function(...m){const h=p.apply(this,m);if(Dt(h,l,this),"tagName"in this.canvas&&!G(this.canvas,n,o,!0)){const u=Ft([...m],l,this),f={type:t,property:d,args:u};r(this.canvas,f)}return h}});i.push(c)}catch{const p=Ne(e,d,{set(m){r(this.canvas,{type:t,property:d,args:[m],setter:!0})}});i.push(p)}return i}function tn(e,t,r,n,o){const s=[];return s.push(...Wt(t.WebGLRenderingContext.prototype,he.WebGL,e,r,n,o,t)),typeof t.WebGL2RenderingContext<"u"&&s.push(...Wt(t.WebGL2RenderingContext.prototype,he.WebGL2,e,r,n,o,t)),()=>{s.forEach(l=>l())}}function rn(e,t){var r=atob(e);if(t){for(var n=new Uint8Array(r.length),o=0,s=r.length;o{var r={};for(var n in e)sn.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&_t)for(var n of _t(e))t.indexOf(n)<0&&ln.call(e,n)&&(r[n]=e[n]);return r},dn=(e,t,r)=>new Promise((n,o)=>{var s=a=>{try{i(r.next(a))}catch(d){o(d)}},l=a=>{try{i(r.throw(a))}catch(d){o(d)}},i=a=>a.done?n(a.value):Promise.resolve(a.value).then(s,l);i((r=r.apply(e,t)).next())});class un{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(a,d)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(d)};const{sampling:r="all",win:n,blockClass:o,blockSelector:s,recordCanvas:l,dataURLOptions:i}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,l&&r==="all"&&this.initCanvasMutationObserver(n,o,s),l&&typeof r=="number"&&this.initCanvasFPSObserver(r,n,o,s,{dataURLOptions:i})}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(t,r,n,o,s){const l=Pt(r,n,o,!0),i=new Map,a=new an;a.onmessage=u=>{const{id:f}=u.data;if(i.set(f,!1),!("base64"in u.data))return;const{base64:b,type:S,width:y,height:g}=u.data;this.mutationCb({id:f,type:he["2D"],commands:[{property:"clearRect",args:[0,0,y,g]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:b}],type:S}]},0,0]}]})};const d=1e3/t;let c=0,p;const m=()=>{const u=[];return r.document.querySelectorAll("canvas").forEach(f=>{G(f,n,o,!0)||u.push(f)}),u},h=u=>{if(c&&u-cdn(this,null,function*(){var b;const S=this.mirror.getId(f);if(i.get(S))return;if(i.set(S,!0),["webgl","webgl2"].includes(f.__context)){const g=f.getContext(f.__context);((b=g?.getContextAttributes())==null?void 0:b.preserveDrawingBuffer)===!1&&g.clear(g.COLOR_BUFFER_BIT)}const y=yield createImageBitmap(f);a.postMessage({id:S,bitmap:y,width:f.width,height:f.height,dataURLOptions:s.dataURLOptions},[y])})),p=requestAnimationFrame(h)};p=requestAnimationFrame(h),this.resetObservers=()=>{l(),cancelAnimationFrame(p)}}initCanvasMutationObserver(t,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const o=Pt(t,r,n,!1),s=qr(this.processMutation.bind(this),t,r,n),l=tn(this.processMutation.bind(this),t,r,n,this.mirror);this.resetObservers=()=>{o(),s(),l()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(t);if(!n||r===-1)return;const o=n.map(l=>cn(l,["type"])),{type:s}=n[0];this.mutationCb({id:r,type:s,commands:o}),this.pendingCanvasMutations.delete(t)}}class pn{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new gr,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;const n={id:r,styleIds:[]},o=[];for(const s of t){let l;if(this.styleMirror.has(s))l=this.styleMirror.getId(s);else{l=this.styleMirror.add(s);const i=Array.from(s.rules||CSSRule);o.push({styleId:l,rules:i.map((a,d)=>({rule:Je(a),index:d}))})}n.styleIds.push(l)}o.length>0&&(n.styles=o),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class hn{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){requestAnimationFrame(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(t,r){const n=this.nodeMap.get(t);return n&&Array.from(n).some(o=>o!==r)}add(t,r){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}var mn=Object.defineProperty,fn=Object.defineProperties,yn=Object.getOwnPropertyDescriptors,Gt=Object.getOwnPropertySymbols,gn=Object.prototype.hasOwnProperty,Sn=Object.prototype.propertyIsEnumerable,zt=(e,t,r)=>t in e?mn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Z=(e,t)=>{for(var r in t||(t={}))gn.call(t,r)&&zt(e,r,t[r]);if(Gt)for(var r of Gt(t))Sn.call(t,r)&&zt(e,r,t[r]);return e},vn=(e,t)=>fn(e,yn(t));function A(e){return vn(Z({},e),{timestamp:xe()})}let N,_e,$e,Ge=!1;const J=Bt();function we(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:o="rr-block",blockSelector:s=null,ignoreClass:l="rr-ignore",ignoreSelector:i=null,maskTextClass:a="rr-mask",maskTextSelector:d=null,inlineStylesheet:c=!0,maskAllInputs:p,maskInputOptions:m,slimDOMOptions:h,maskInputFn:u,maskTextFn:f,hooks:b,packFn:S,sampling:y={},dataURLOptions:g={},mousemoveWait:w,recordCanvas:W=!1,recordCrossOriginIframes:D=!1,recordAfter:x=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:T=!1,collectFonts:U=!1,inlineImages:H=!1,plugins:V,keepIframeSrcFn:Q=()=>!1,ignoreCSSAttributes:X=new Set([]),errorHandler:se}=e;kr(se);const L=D?window.parent===window:!0;let B=!1;if(!L)try{window.parent.document&&(B=!1)}catch{B=!0}if(L&&!t)throw new Error("emit function is required");w!==void 0&&y.mousemove===void 0&&(y.mousemove=w),J.reset();const q=p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:m!==void 0?m:{password:!0},ee=h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:h==="all",headMetaDescKeywords:h==="all"}:h||{};yr();let Y,$=0;const K=v=>{for(const j of V||[])j.eventProcessor&&(v=j.eventProcessor(v));return S&&!B&&(v=S(v)),v};N=(v,j)=>{var M;if(((M=le[0])==null?void 0:M.isFrozen())&&v.type!==k.FullSnapshot&&!(v.type===k.IncrementalSnapshot&&v.data.source===C.Mutation)&&le.forEach(P=>P.unfreeze()),L)t?.(K(v),j);else if(B){const P={type:"rrweb",event:K(v),origin:window.location.origin,isCheckout:j};window.parent.postMessage(P,"*")}if(v.type===k.FullSnapshot)Y=v,$=0;else if(v.type===k.IncrementalSnapshot){if(v.data.source===C.Mutation&&v.data.isAttachIframe)return;$++;const P=n&&$>=n,ge=r&&v.timestamp-Y.timestamp>r;(P||ge)&&_e(!0)}};const E=v=>{N(A({type:k.IncrementalSnapshot,data:Z({source:C.Mutation},v)}))},ye=v=>N(A({type:k.IncrementalSnapshot,data:Z({source:C.Scroll},v)})),Oe=v=>N(A({type:k.IncrementalSnapshot,data:Z({source:C.CanvasMutation},v)})),ze=v=>N(A({type:k.IncrementalSnapshot,data:Z({source:C.AdoptedStyleSheet},v)})),te=new pn({mutationCb:E,adoptedStyleSheetCb:ze}),ne=new Zr({mirror:J,mutationCb:E,stylesheetManager:te,recordCrossOriginIframes:D,wrappedEmit:N});for(const v of V||[])v.getMirror&&v.getMirror({nodeMirror:J,crossOriginIframeMirror:ne.crossOriginIframeMirror,crossOriginIframeStyleMirror:ne.crossOriginIframeStyleMirror});const ce=new hn;$e=new un({recordCanvas:W,mutationCb:Oe,win:window,blockClass:o,blockSelector:s,mirror:J,sampling:y.canvas,dataURLOptions:g});const re=new $r({mutationCb:E,scrollCb:ye,bypassOptions:{blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:d,inlineStylesheet:c,maskInputOptions:q,dataURLOptions:g,maskTextFn:f,maskInputFn:u,recordCanvas:W,inlineImages:H,sampling:y,slimDOMOptions:ee,iframeManager:ne,stylesheetManager:te,canvasManager:$e,keepIframeSrcFn:Q,processedNodeManager:ce},mirror:J});_e=(v=!1)=>{N(A({type:k.Meta,data:{href:window.location.href,width:lt(),height:it()}}),v),te.reset(),re.init(),le.forEach(M=>M.lock());const j=mr(document,{mirror:J,blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:d,inlineStylesheet:c,maskAllInputs:q,maskTextFn:f,slimDOM:ee,dataURLOptions:g,recordCanvas:W,inlineImages:H,onSerialize:M=>{dt(M,J)&&ne.addIframe(M),ut(M,J)&&te.trackLinkElement(M),Be(M)&&re.addShadowRoot(M.shadowRoot,document)},onIframeLoad:(M,P)=>{ne.attachIframe(M,P),re.observeAttachShadow(M)},onStylesheetLoad:(M,P)=>{te.attachLinkElement(M,P)},keepIframeSrcFn:Q});if(!j)return console.warn("Failed to snapshot the document");N(A({type:k.FullSnapshot,data:{node:j,initialOffset:st(window)}}),v),le.forEach(M=>M.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&te.adoptStyleSheets(document.adoptedStyleSheets,J.getId(document))};try{const v=[],j=P=>{var ge;return I(jr)({mutationCb:E,mousemoveCb:(R,Ke)=>N(A({type:k.IncrementalSnapshot,data:{source:Ke,positions:R}})),mouseInteractionCb:R=>N(A({type:k.IncrementalSnapshot,data:Z({source:C.MouseInteraction},R)})),scrollCb:ye,viewportResizeCb:R=>N(A({type:k.IncrementalSnapshot,data:Z({source:C.ViewportResize},R)})),inputCb:R=>N(A({type:k.IncrementalSnapshot,data:Z({source:C.Input},R)})),mediaInteractionCb:R=>N(A({type:k.IncrementalSnapshot,data:Z({source:C.MediaInteraction},R)})),styleSheetRuleCb:R=>N(A({type:k.IncrementalSnapshot,data:Z({source:C.StyleSheetRule},R)})),styleDeclarationCb:R=>N(A({type:k.IncrementalSnapshot,data:Z({source:C.StyleDeclaration},R)})),canvasMutationCb:Oe,fontCb:R=>N(A({type:k.IncrementalSnapshot,data:Z({source:C.Font},R)})),selectionCb:R=>{N(A({type:k.IncrementalSnapshot,data:Z({source:C.Selection},R)}))},blockClass:o,ignoreClass:l,ignoreSelector:i,maskTextClass:a,maskTextSelector:d,maskInputOptions:q,inlineStylesheet:c,sampling:y,recordCanvas:W,inlineImages:H,userTriggeredOnInput:T,collectFonts:U,doc:P,maskInputFn:u,maskTextFn:f,keepIframeSrcFn:Q,blockSelector:s,slimDOMOptions:ee,dataURLOptions:g,mirror:J,iframeManager:ne,stylesheetManager:te,shadowDomManager:re,processedNodeManager:ce,canvasManager:$e,ignoreCSSAttributes:X,plugins:((ge=V?.filter(R=>R.observer))==null?void 0:ge.map(R=>({observer:R.observer,options:R.options,callback:Ke=>N(A({type:k.Plugin,data:{plugin:R.name,payload:Ke}}))})))||[]},b)};ne.addLoadListener(P=>{try{v.push(j(P.contentDocument))}catch(ge){console.warn(ge)}});const M=()=>{_e(),v.push(j(document)),Ge=!0};return document.readyState==="interactive"||document.readyState==="complete"?M():(v.push(_("DOMContentLoaded",()=>{N(A({type:k.DomContentLoaded,data:{}})),x==="DOMContentLoaded"&&M()})),v.push(_("load",()=>{N(A({type:k.Load,data:{}})),x==="load"&&M()},window))),()=>{v.forEach(P=>P()),ce.destroy(),Ge=!1,Mr()}}catch(v){console.warn(v)}}return we.addCustomEvent=(e,t)=>{if(!Ge)throw new Error("please add custom event after start recording");N(A({type:k.Custom,data:{tag:e,payload:t}}))},we.freezePage=()=>{le.forEach(e=>e.freeze())},we.takeFullSnapshot=e=>{if(!Ge)throw new Error("please take full snapshot after start recording");_e(e)},we.mirror=J,we}(); let send_data_fetch=async t=>{try{t.url=window.location.href;let e=new FormData;e.append("data",JSON.stringify(t));let i=await (await fetch(`${pixel_url_base}pixel-track/${pixel_key}`,{method:"POST",body:e})).text();return""==i?i:JSON.parse(i)}catch(s){console.log(`Analytics pixel: ${s}`)}},send_data_beacon=t=>{try{t.url=window.location.href;let e=new FormData;e.append("data",JSON.stringify(t)),navigator.sendBeacon(`${pixel_url_base}pixel-track/${pixel_key}`,e)}catch(i){console.log(`Analytics pixel: ${i}`)}};class AltumCodeVisitor{async initiate(){if(localStorage.getItem(get_dynamic_var("visitor_uuid"))&&""!=localStorage.getItem(get_dynamic_var("visitor_uuid")).trim()){this.visitor_uuid=localStorage.getItem(get_dynamic_var("visitor_uuid")).trim();let t=this.get_custom_parameters();t&&(!localStorage.getItem(get_dynamic_var("visitor_custom_parameters"))||localStorage.getItem(get_dynamic_var("visitor_custom_parameters"))&&localStorage.getItem(get_dynamic_var("visitor_custom_parameters"))!=btoa(JSON.stringify(t)))&&await send_data_fetch({visitor_uuid:this.visitor_uuid,type:"initiate_visitor",data:this.get_extra_details()})}else{let e=get_random_id();this.visitor_uuid=e,localStorage.setItem(get_dynamic_var("visitor_uuid"),this.visitor_uuid);await send_data_fetch({visitor_uuid:e,type:"initiate_visitor",data:this.get_extra_details()})}}get_extra_details(){let t={resolution:{width:window.screen.width,height:window.screen.height}},e=this.get_custom_parameters();return e&&(t.custom_parameters=e,localStorage.setItem(get_dynamic_var("visitor_custom_parameters"),btoa(JSON.stringify(e)))),t}get_custom_parameters(){let t=document.querySelector(`script[src$="pixel/${pixel_key}"]`);if(!t.dataset.customParameters)return!1;try{return JSON.parse(t.dataset.customParameters)}catch(e){return!1}}}class AltumCodeEvents{async initiate(){this.visitor_uuid=localStorage.getItem(get_dynamic_var("visitor_uuid")),this.visitor_session_uuid=localStorage.getItem(get_dynamic_var("visitor_session_uuid")),localStorage.setItem(get_dynamic_var("visitor_session_event_uuid"),get_random_id()),this.visitor_session_event_uuid=localStorage.getItem(get_dynamic_var("visitor_session_event_uuid"));let t=localStorage.getItem(get_dynamic_var("visitor_session_date")),e=new Date;if(!t||t&&e-new Date(t)>18e5?(this.visitor_session_uuid=get_random_id(),localStorage.setItem(get_dynamic_var("visitor_session_uuid"),this.visitor_session_uuid),await this.event_landing_page()):await this.event_pageview(),localStorage.setItem(get_dynamic_var("visitor_session_date"),e.toJSON()),window[pixel_exposed_identifier]={goal:async t=>{await this.event_goal_conversion(t)}},pixel_track_events_children&&this.initiate_event_handlers(),pixel_goals.length){let i=get_current_url_domain_no_www();for(let s of pixel_goals)"pageview"==s.type&&(s.url==i||s.url=="www."+i)&&await this.event_goal_conversion(s.key)}let a=[],r=!1;if(pixel_heatmaps.length){let n=get_device_type(),o=get_current_url_domain_no_www();for(let d of pixel_heatmaps)if(d.url==o||d.url=="www."+o){d[`snapshot_id_${n}`]||rrwebRecord({async emit(t){r=!0,a.push(t),2==a.length&&4==a[0].type&&2==a[1].type&&await send_data_fetch({type:"heatmap_snapshot",heatmap_id:d.heatmap_id,data:a})},maskAllInputs:!0,slimDOMOptions:{comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}}),this.initiate_event_handler_click(d.heatmap_id);break}}if(pixel_track_sessions_replays){r||rrwebRecord({maskAllInputs:!0,slimDOMOptions:{comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0},emit(t){a.push(t)}});let u=async()=>{a.length&&(await send_data_fetch({visitor_uuid:this.visitor_uuid,visitor_session_uuid:this.visitor_session_uuid,visitor_session_event_uuid:this.visitor_session_event_uuid,type:"replays",data:a}),a=[])};setInterval(u,1e3);let l=!1;document.addEventListener("click",t=>{if(!t.isTrusted)return!1;l=setTimeout(()=>u,"A"!=t.target.tagName||t.target.getAttribute("href").startsWith("#")?500:0)}),document.querySelectorAll("form").forEach(t=>{t.addEventListener("submit",u)});let h="onpagehide"in self?"pagehide":"unload";window.addEventListener(h,u,{capture:!0})}}initiate_event_handlers(){this.initiate_event_handler_click(),this.initiate_event_handler_scroll(),this.initiate_event_handler_forms(),this.initiate_event_handler_resize()}initiate_event_handler_click(t=null){let e="",i=1,s=!1;document.addEventListener("click",a=>{if(!a.isTrusted)return!1;let r="A"!=a.target.tagName||a.target.getAttribute("href").startsWith("#")?500:0,n=a.target.innerText.length>61?`${a.target.innerText.substr(0,61)}...`:a.target.innerText,o={mouse:{x:a.pageX,y:a.pageY},text:n,element:a.target.tagName.toLowerCase()};JSON.stringify(o)==e&&(i++,clearInterval(s)),e=JSON.stringify(o),s=setTimeout(()=>{this.event_child("click",o,i,t),i=1},r)})}initiate_event_handler_scroll(t=null){let e=!1;document.addEventListener("scroll",i=>{if(!i.isTrusted)return!1;let s={scroll:{percentage:parseInt((document.documentElement.scrollTop||document.body.scrollTop)/((document.documentElement.scrollHeight||document.body.scrollHeight)-document.documentElement.clientHeight)*100)}};clearInterval(e),e=setTimeout(()=>{this.event_child("scroll",s,1,t)},500)})}initiate_event_handler_forms(){let t=t=>{this.event_child("form",{form:{}})};document.querySelectorAll("form").forEach(e=>{e.addEventListener("submit",t)})}initiate_event_handler_resize(){let t=!1;window.addEventListener("resize",e=>{if(!e.isTrusted)return!1;let i={viewport:this.get_viewport()};clearInterval(t),t=setTimeout(()=>{this.event_child("resize",i)},500)})}async event_landing_page(){await this.send_data({visitor_uuid:this.visitor_uuid,visitor_session_uuid:this.visitor_session_uuid,visitor_session_event_uuid:this.visitor_session_event_uuid,type:"landing_page",data:{path:window.location.pathname+(pixel_query_parameters_tracking_is_enabled?"?"+new URL(document.location.toString()).searchParams.toString():""),title:document.title,referrer:document.referrer.includes(`${location.protocol}//${location.host}${location.pathname}`)?null:document.referrer,utm:this.get_utm_params(),viewport:this.get_viewport()}})}async event_pageview(){await this.send_data({visitor_uuid:this.visitor_uuid,visitor_session_uuid:this.visitor_session_uuid,visitor_session_event_uuid:this.visitor_session_event_uuid,type:"pageview",data:{path:window.location.pathname+(pixel_query_parameters_tracking_is_enabled?"?"+new URL(document.location.toString()).searchParams.toString():""),title:document.title,referrer:document.referrer.includes(`${location.protocol}//${location.host}${location.pathname}`)?null:document.referrer,utm:this.get_utm_params(),viewport:this.get_viewport()}})}event_child(t,e={},i=1,s=null){send_data_beacon({visitor_uuid:this.visitor_uuid,visitor_session_uuid:this.visitor_session_uuid,visitor_session_event_uuid:this.visitor_session_event_uuid,type:t,data:e,count:i,heatmap_id:s})}async event_goal_conversion(t){for(let e of pixel_goals)if(e.key==t&&!localStorage.getItem(get_dynamic_var(`visitor_goal_${e.key}`))){await send_data_fetch({visitor_uuid:this.visitor_uuid,visitor_session_uuid:this.visitor_session_uuid,visitor_session_event_uuid:this.visitor_session_event_uuid,type:"goal_conversion",goal_key:e.key}),localStorage.setItem(get_dynamic_var(`visitor_goal_${e.key}`),!0);break}}async send_data(t){let e=await send_data_fetch(t);if(e&&e.details&&e.details.refresh)switch(e.details.refresh){case"visitor":localStorage.removeItem(get_dynamic_var("visitor_uuid"));await new AltumCodeVisitor().initiate();break;case"session":localStorage.removeItem(get_dynamic_var("visitor_session_uuid")),localStorage.removeItem(get_dynamic_var("visitor_session_date"));await new AltumCodeEvents().initiate()}}get_viewport(){return{width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}}get_utm_params(){let t=new URLSearchParams(window.location.search);return{source:t.get("utm_source"),medium:t.get("utm_medium"),campaign:t.get("utm_campaign"),term:t.get("utm_term"),content:t.get("utm_content")}}} let altumcodestart=async()=>{let t=document.querySelector(`script[src$="pixel/${pixel_key}"]`),e=is_do_not_track(),a=is_optout();if(!a&&(!e||e&&t.dataset.ignoreDnt)){await new AltumCodeVisitor().initiate();await new AltumCodeEvents().initiate()}else e&&console.log(`${pixel_url_base}: ${pixel_key_dnt_message}`),a&&console.log(`${pixel_url_base}: ${pixel_key_optout_message}`)},altumcodeprestart=()=>{altumcodestart()};"complete"!==document.readyState&&("loading"===document.readyState||document.documentElement.doScroll)?document.addEventListener("DOMContentLoaded",()=>{altumcodeprestart()}):altumcodeprestart(); })();