mixpanel-browser 2.49.0 → 2.50.0
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/build.sh +2 -1
- package/dist/mixpanel-js-wrapper.js +2 -2
- package/dist/mixpanel-recorder.js +5940 -0
- package/dist/mixpanel-recorder.min.js +24 -0
- package/dist/mixpanel.amd.js +141 -64
- package/dist/mixpanel.cjs.js +140 -63
- package/dist/mixpanel.globals.js +141 -64
- package/dist/mixpanel.min.js +110 -108
- package/dist/mixpanel.umd.js +142 -65
- package/package.json +7 -2
- package/src/config.js +1 -1
- package/src/mixpanel-core.js +53 -3
- package/src/recorder/index.js +153 -0
- package/src/recorder/rollup.config.js +19 -0
- package/src/utils.js +4 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
(function(){"use strict";var B;(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"})(B||(B={}));function qt(e){return e.nodeType===e.ELEMENT_NODE}function Se(e){var t=e?.host;return t?.shadowRoot===e}function be(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 Pe(e){try{var t=e.rules||e.cssRules;return t?jt(Array.from(t).map(ot).join("")):null}catch{return null}}function ot(e){var t=e.cssText;if($t(e))try{t=Pe(e.styleSheet)||t}catch{}return t}function $t(e){return"styleSheet"in e}var at=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(i){return r.removeNodeFromMap(i)})},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 i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function er(){return new at}function ze(e){var t=e.maskInputOptions,r=e.tagName,n=e.type,i=e.value,o=e.maskInputFn,s=i||"";return(t[r.toLowerCase()]||t[n])&&(o?s=o(s):s="*".repeat(s.length)),s}var st="__rrweb_original__";function tr(e){var t=e.getContext("2d");if(!t)return!0;for(var r=50,n=0;n<e.width;n+=r)for(var i=0;i<e.height;i+=r){var o=t.getImageData,s=st in o?o[st]:o,a=new Uint32Array(s.call(t,n,i,Math.min(r,e.width-n),Math.min(r,e.height-i)).data.buffer);if(a.some(function(l){return l!==0}))return!1}return!0}var rr=1,nr=new RegExp("[^a-z0-9-_:]"),Ae=-2;function lt(){return rr++}function ir(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return nr.test(t)?"div":t}function or(e){return e.cssRules?Array.from(e.cssRules).map(function(t){return t.cssText||""}).join(""):""}function ar(e){var t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var he,ct,sr=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,lr=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,cr=/^(data:)([^,]*),(.*)/i;function Ee(e,t){return(e||"").replace(sr,function(r,n,i,o,s,a){var l=i||s||a,c=n||o||"";if(!l)return r;if(!lr.test(l)||cr.test(l))return"url(".concat(c).concat(l).concat(c,")");if(l[0]==="/")return"url(".concat(c).concat(ar(t)+l).concat(c,")");var f=t.split("/"),h=l.split("/");f.pop();for(var g=0,p=h;g<p.length;g++){var d=p[g];d!=="."&&(d===".."?f.pop():f.push(d))}return"url(".concat(c).concat(f.join("/")).concat(c,")")})}var ur=/^[^ \t\n\r\u000c]+/,dr=/^[, \t\n\r\u000c]+/;function fr(e,t){if(t.trim()==="")return t;var r=0;function n(c){var f,h=c.exec(t.substring(r));return h?(f=h[0],r+=f.length,f):""}for(var i=[];n(dr),!(r>=t.length);){var o=n(ur);if(o.slice(-1)===",")o=ge(e,o.substring(0,o.length-1)),i.push(o);else{var s="";o=ge(e,o);for(var a=!1;;){var l=t.charAt(r);if(l===""){i.push((o+s).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){r+=1,i.push((o+s).trim());break}else l==="("&&(a=!0);s+=l,r+=1}}}return i.join(", ")}function ge(e,t){if(!t||t.trim()==="")return t;var r=e.createElement("a");return r.href=t,r.href}function hr(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Je(){var e=document.createElement("a");return e.href="",e.href}function ut(e,t,r,n){return r==="src"||r==="href"&&n&&!(t==="use"&&n[0]==="#")||r==="xlink:href"&&n&&n[0]!=="#"||r==="background"&&n&&(t==="table"||t==="td"||t==="th")?ge(e,n):r==="srcset"&&n?fr(e,n):r==="style"&&n?Ee(n,Je()):t==="object"&&r==="data"&&n?ge(e,n):n}function gr(e,t,r){if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;){var i=e.classList[n];if(t.test(i))return!0}return r?e.matches(r):!1}function xe(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?xe(e.parentNode,t,r):!1;for(var n=e.classList.length;n--;){var i=e.classList[n];if(t.test(i))return!0}return r?xe(e.parentNode,t,r):!1}function dt(e,t,r){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(xe(n,t,!0))return!0;return!!(r&&(n.matches(r)||n.closest(r)))}function pr(e,t,r){var n=e.contentWindow;if(n){var i=!1,o;try{o=n.document.readyState}catch{return}if(o!=="complete"){var s=setTimeout(function(){i||(t(),i=!0)},r);e.addEventListener("load",function(){clearTimeout(s),i=!0,t()});return}var a="about:blank";if(n.location.href!==a||e.src===a||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}function mr(e,t,r){var n=!1,i;try{i=e.sheet}catch{return}if(!i){var o=setTimeout(function(){n||(t(),n=!0)},r);e.addEventListener("load",function(){clearTimeout(o),n=!0,t()})}}function Ir(e,t){var r=t.doc,n=t.mirror,i=t.blockClass,o=t.blockSelector,s=t.maskTextClass,a=t.maskTextSelector,l=t.inlineStylesheet,c=t.maskInputOptions,f=c===void 0?{}:c,h=t.maskTextFn,g=t.maskInputFn,p=t.dataURLOptions,d=p===void 0?{}:p,C=t.inlineImages,y=t.recordCanvas,v=t.keepIframeSrcFn,m=t.newlyAddedElement,I=m===void 0?!1:m,b=Cr(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:B.Document,childNodes:[],compatMode:e.compatMode}:{type:B.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:B.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return vr(e,{doc:r,blockClass:i,blockSelector:o,inlineStylesheet:l,maskInputOptions:f,maskInputFn:g,dataURLOptions:d,inlineImages:C,recordCanvas:y,keepIframeSrcFn:v,newlyAddedElement:I,rootId:b});case e.TEXT_NODE:return yr(e,{maskTextClass:s,maskTextSelector:a,maskTextFn:h,rootId:b});case e.CDATA_SECTION_NODE:return{type:B.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:B.Comment,textContent:e.textContent||"",rootId:b};default:return!1}}function Cr(e,t){if(t.hasNode(e)){var r=t.getId(e);return r===1?void 0:r}}function yr(e,t){var r,n=t.maskTextClass,i=t.maskTextSelector,o=t.maskTextFn,s=t.rootId,a=e.parentNode&&e.parentNode.tagName,l=e.textContent,c=a==="STYLE"?!0:void 0,f=a==="SCRIPT"?!0:void 0;if(c&&l){try{e.nextSibling||e.previousSibling||!((r=e.parentNode.sheet)===null||r===void 0)&&r.cssRules&&(l=or(e.parentNode.sheet))}catch(h){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(h),e)}l=Ee(l,Je())}return f&&(l="SCRIPT_PLACEHOLDER"),!c&&!f&&l&&dt(e,n,i)&&(l=o?o(l):l.replace(/[\S]/g,"*")),{type:B.Text,textContent:l||"",isStyle:c,rootId:s}}function vr(e,t){for(var r=t.doc,n=t.blockClass,i=t.blockSelector,o=t.inlineStylesheet,s=t.maskInputOptions,a=s===void 0?{}:s,l=t.maskInputFn,c=t.dataURLOptions,f=c===void 0?{}:c,h=t.inlineImages,g=t.recordCanvas,p=t.keepIframeSrcFn,d=t.newlyAddedElement,C=d===void 0?!1:d,y=t.rootId,v=gr(e,n,i),m=ir(e),I={},b=e.attributes.length,R=0;R<b;R++){var D=e.attributes[R];I[D.name]=ut(r,m,D.name,D.value)}if(m==="link"&&o){var N=Array.from(r.styleSheets).find(function(Q){return Q.href===e.href}),A=null;N&&(A=Pe(N)),A&&(delete I.rel,delete I.href,I._cssText=Ee(A,N.href))}if(m==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var A=Pe(e.sheet);A&&(I._cssText=Ee(A,Je()))}if(m==="input"||m==="textarea"||m==="select"){var T=e.value,H=e.checked;I.type!=="radio"&&I.type!=="checkbox"&&I.type!=="submit"&&I.type!=="button"&&T?I.value=ze({type:I.type,tagName:m,value:T,maskInputOptions:a,maskInputFn:l}):H&&(I.checked=H)}if(m==="option"&&(e.selected&&!a.select?I.selected=!0:delete I.selected),m==="canvas"&&g){if(e.__context==="2d")tr(e)||(I.rr_dataURL=e.toDataURL(f.type,f.quality));else if(!("__context"in e)){var q=e.toDataURL(f.type,f.quality),j=document.createElement("canvas");j.width=e.width,j.height=e.height;var $=j.toDataURL(f.type,f.quality);q!==$&&(I.rr_dataURL=q)}}if(m==="img"&&h){he||(he=r.createElement("canvas"),ct=he.getContext("2d"));var L=e,Y=L.crossOrigin;L.crossOrigin="anonymous";var re=function(){try{he.width=L.naturalWidth,he.height=L.naturalHeight,ct.drawImage(L,0,0),I.rr_dataURL=he.toDataURL(f.type,f.quality)}catch(Q){console.warn("Cannot inline img src=".concat(L.currentSrc,"! Error: ").concat(Q))}Y?I.crossOrigin=Y:L.removeAttribute("crossorigin")};L.complete&&L.naturalWidth!==0?re():L.onload=re}if((m==="audio"||m==="video")&&(I.rr_mediaState=e.paused?"paused":"played",I.rr_mediaCurrentTime=e.currentTime),C||(e.scrollLeft&&(I.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(I.rr_scrollTop=e.scrollTop)),v){var ie=e.getBoundingClientRect(),ae=ie.width,K=ie.height;I={class:I.class,rr_width:"".concat(ae,"px"),rr_height:"".concat(K,"px")}}return m==="iframe"&&!p(I.src)&&(e.contentDocument||(I.rr_src=I.src),delete I.src),{type:B.Element,tagName:m,attributes:I,childNodes:[],isSVG:hr(e)||void 0,needBlock:v,rootId:y}}function O(e){return e===void 0?"":e.toLowerCase()}function Sr(e,t){if(t.comment&&e.type===B.Comment)return!0;if(e.type===B.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&e.attributes.rel==="preload"&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(O(e.attributes.name).match(/^msapplication-tile(image|color)$/)||O(e.attributes.name)==="application-name"||O(e.attributes.rel)==="icon"||O(e.attributes.rel)==="apple-touch-icon"||O(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&O(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(O(e.attributes.property).match(/^(og|twitter|fb):/)||O(e.attributes.name).match(/^(og|twitter):/)||O(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(O(e.attributes.name)==="robots"||O(e.attributes.name)==="googlebot"||O(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(O(e.attributes.name)==="author"||O(e.attributes.name)==="generator"||O(e.attributes.name)==="framework"||O(e.attributes.name)==="publisher"||O(e.attributes.name)==="progid"||O(e.attributes.property).match(/^article:/)||O(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(O(e.attributes.name)==="google-site-verification"||O(e.attributes.name)==="yandex-verification"||O(e.attributes.name)==="csrf-token"||O(e.attributes.name)==="p:domain_verify"||O(e.attributes.name)==="verify-v1"||O(e.attributes.name)==="verification"||O(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function pe(e,t){var r=t.doc,n=t.mirror,i=t.blockClass,o=t.blockSelector,s=t.maskTextClass,a=t.maskTextSelector,l=t.skipChild,c=l===void 0?!1:l,f=t.inlineStylesheet,h=f===void 0?!0:f,g=t.maskInputOptions,p=g===void 0?{}:g,d=t.maskTextFn,C=t.maskInputFn,y=t.slimDOMOptions,v=t.dataURLOptions,m=v===void 0?{}:v,I=t.inlineImages,b=I===void 0?!1:I,R=t.recordCanvas,D=R===void 0?!1:R,N=t.onSerialize,A=t.onIframeLoad,T=t.iframeLoadTimeout,H=T===void 0?5e3:T,q=t.onStylesheetLoad,j=t.stylesheetLoadTimeout,$=j===void 0?5e3:j,L=t.keepIframeSrcFn,Y=L===void 0?function(){return!1}:L,re=t.newlyAddedElement,ie=re===void 0?!1:re,ae=t.preserveWhiteSpace,K=ae===void 0?!0:ae,Q=Ir(e,{doc:r,mirror:n,blockClass:i,blockSelector:o,maskTextClass:s,maskTextSelector:a,inlineStylesheet:h,maskInputOptions:p,maskTextFn:d,maskInputFn:C,dataURLOptions:m,inlineImages:b,recordCanvas:D,keepIframeSrcFn:Y,newlyAddedElement:ie});if(!Q)return console.warn(e,"not serialized"),null;var ce;n.hasNode(e)?ce=n.getId(e):Sr(Q,y)||!K&&Q.type===B.Text&&!Q.isStyle&&!Q.textContent.replace(/^\s+|\s+$/gm,"").length?ce=Ae:ce=lt();var _=Object.assign(Q,{id:ce});if(n.add(e,_),ce===Ae)return null;N&&N(e);var ne=!c;if(_.type===B.Element){ne=ne&&!_.needBlock,delete _.needBlock;var oe=e.shadowRoot;oe&&be(oe)&&(_.isShadowHost=!0)}if((_.type===B.Document||_.type===B.Element)&&ne){y.headWhitespace&&_.type===B.Element&&_.tagName==="head"&&(K=!1);for(var ve={doc:r,mirror:n,blockClass:i,blockSelector:o,maskTextClass:s,maskTextSelector:a,skipChild:c,inlineStylesheet:h,maskInputOptions:p,maskTextFn:d,maskInputFn:C,slimDOMOptions:y,dataURLOptions:m,inlineImages:b,recordCanvas:D,preserveWhiteSpace:K,onSerialize:N,onIframeLoad:A,iframeLoadTimeout:H,onStylesheetLoad:q,stylesheetLoadTimeout:$,keepIframeSrcFn:Y},S=0,Z=Array.from(e.childNodes);S<Z.length;S++){var P=Z[S],E=pe(P,ve);E&&_.childNodes.push(E)}if(qt(e)&&e.shadowRoot)for(var X=0,M=Array.from(e.shadowRoot.childNodes);X<M.length;X++){var P=M[X],E=pe(P,ve);E&&(be(e.shadowRoot)&&(E.isShadow=!0),_.childNodes.push(E))}}return e.parentNode&&Se(e.parentNode)&&be(e.parentNode)&&(_.isShadow=!0),_.type===B.Element&&_.tagName==="iframe"&&pr(e,function(){var z=e.contentDocument;if(z&&A){var Re=pe(z,{doc:z,mirror:n,blockClass:i,blockSelector:o,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskTextFn:d,maskInputFn:C,slimDOMOptions:y,dataURLOptions:m,inlineImages:b,recordCanvas:D,preserveWhiteSpace:K,onSerialize:N,onIframeLoad:A,iframeLoadTimeout:H,onStylesheetLoad:q,stylesheetLoadTimeout:$,keepIframeSrcFn:Y});Re&&A(e,Re)}},H),_.type===B.Element&&_.tagName==="link"&&_.attributes.rel==="stylesheet"&&mr(e,function(){if(q){var z=pe(e,{doc:r,mirror:n,blockClass:i,blockSelector:o,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskTextFn:d,maskInputFn:C,slimDOMOptions:y,dataURLOptions:m,inlineImages:b,recordCanvas:D,preserveWhiteSpace:K,onSerialize:N,onIframeLoad:A,iframeLoadTimeout:H,onStylesheetLoad:q,stylesheetLoadTimeout:$,keepIframeSrcFn:Y});z&&q(e,z)}},$),_}function br(e,t){var r=t||{},n=r.mirror,i=n===void 0?new at:n,o=r.blockClass,s=o===void 0?"rr-block":o,a=r.blockSelector,l=a===void 0?null:a,c=r.maskTextClass,f=c===void 0?"rr-mask":c,h=r.maskTextSelector,g=h===void 0?null:h,p=r.inlineStylesheet,d=p===void 0?!0:p,C=r.inlineImages,y=C===void 0?!1:C,v=r.recordCanvas,m=v===void 0?!1:v,I=r.maskAllInputs,b=I===void 0?!1:I,R=r.maskTextFn,D=r.maskInputFn,N=r.slimDOM,A=N===void 0?!1:N,T=r.dataURLOptions,H=r.preserveWhiteSpace,q=r.onSerialize,j=r.onIframeLoad,$=r.iframeLoadTimeout,L=r.onStylesheetLoad,Y=r.stylesheetLoadTimeout,re=r.keepIframeSrcFn,ie=re===void 0?function(){return!1}:re,ae=b===!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}:b===!1?{password:!0}:b,K=A===!0||A==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:A==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:A===!1?{}:A;return pe(e,{doc:e,mirror:i,blockClass:s,blockSelector:l,maskTextClass:f,maskTextSelector:g,skipChild:!1,inlineStylesheet:d,maskInputOptions:ae,maskTextFn:R,maskInputFn:D,slimDOMOptions:K,dataURLOptions:T,inlineImages:y,recordCanvas:m,preserveWhiteSpace:H,onSerialize:q,onIframeLoad:j,iframeLoadTimeout:$,onStylesheetLoad:L,stylesheetLoadTimeout:Y,keepIframeSrcFn:ie,newlyAddedElement:!1})}function U(e,t,r=document){const n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}const me=`Please stop import mirror directly. Instead of that,\r
|
|
2
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
3
|
+
or you can use record.mirror to access the mirror instance during recording.`;let ft={map:{},getId(){return console.error(me),-1},getNode(){return console.error(me),null},removeNodeFromMap(){console.error(me)},has(){return console.error(me),!1},reset(){console.error(me)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(ft=new Proxy(ft,{get(e,t,r){return t==="map"&&console.error(me),Reflect.get(e,t,r)}}));function we(e,t,r={}){let n=null,i=0;return function(...o){const s=Date.now();!i&&r.leading===!1&&(i=s);const a=t-(s-i),l=this;a<=0||a>t?(n&&(clearTimeout(n),n=null),i=s,e.apply(l,o)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{i=r.leading===!1?0:Date.now(),n=null,e.apply(l,o)},a))}}function _e(e,t,r,n,i=window){const o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,n?r:{set(s){setTimeout(()=>{r.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>_e(e,t,o||{},!0)}function Ie(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch{return()=>{}}}function ht(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function gt(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function G(e,t,r,n){if(!e)return!1;const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!i)return!1;if(typeof t=="string"){if(i.classList.contains(t)||n&&i.closest("."+t)!==null)return!0}else if(xe(i,t,n))return!0;return!!(r&&(e.matches(r)||n&&i.closest(r)!==null))}function Ar(e,t){return t.getId(e)!==-1}function He(e,t){return t.getId(e)===Ae}function pt(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?pt(e.parentNode,t):!0:!0}function mt(e){return!!e.changedTouches}function wr(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 It(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Ct(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function yt(e){return!!e?.shadowRoot}class kr{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){var r;return(r=this.styleIDMap.get(t))!==null&&r!==void 0?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++}}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||{}),w=(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))(w||{}),Ye=(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))(Ye||{}),Ce=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ce||{});function vt(e){return"__ln"in e}class Mr{constructor(){this.length=0,this.head=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n<t;n++)r=r?.next||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&vt(t.previousSibling)){const n=t.previousSibling.__ln.next;r.next=n,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,n&&(n.previous=r)}else if(t.nextSibling&&vt(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;r.previous=n,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,n&&(n.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;this.length++}removeNode(t){const r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next&&(r.next.previous=r.previous)):(this.head=r.next,this.head&&(this.head.previous=null)),t.__ln&&delete t.__ln,this.length--)}}const St=(e,t)=>`${e}@${t}`;class Tr{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 Mr,n=a=>{let l=a,c=Ae;for(;c===Ae;)l=l&&l.nextSibling,c=l&&this.mirror.getId(l);return c},i=a=>{var l,c,f,h;let g=null;((c=(l=a.getRootNode)===null||l===void 0?void 0:l.call(a))===null||c===void 0?void 0:c.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&a.getRootNode().host&&(g=a.getRootNode().host);let p=g;for(;((h=(f=p?.getRootNode)===null||f===void 0?void 0:f.call(p))===null||h===void 0?void 0:h.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&p.getRootNode().host;)p=p.getRootNode().host;const d=!this.doc.contains(a)&&(!p||!this.doc.contains(p));if(!a.parentNode||d)return;const C=Se(a.parentNode)?this.mirror.getId(g):this.mirror.getId(a.parentNode),y=n(a);if(C===-1||y===-1)return r.addNode(a);const v=pe(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=>{It(m,this.mirror)&&this.iframeManager.addIframe(m),Ct(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),yt(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,this.doc)},onIframeLoad:(m,I)=>{this.iframeManager.attachIframe(m,I),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,I)=>{this.stylesheetManager.attachLinkElement(m,I)}});v&&t.push({parentId:C,nextId:y,node:v})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of Array.from(this.movedSet.values()))bt(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||i(a);for(const a of Array.from(this.addedSet.values()))!wt(this.droppedSet,a)&&!bt(this.removes,a,this.mirror)||wt(this.movedSet,a)?i(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){const l=this.mirror.getId(o.value.parentNode),c=n(o.value);l!==-1&&c!==-1&&(a=o)}if(!a)for(let l=r.length-1;l>=0;l--){const c=r.get(l);if(c){const f=this.mirror.getId(c.value.parentNode);if(n(c.value)===-1)continue;if(f!==-1){a=c;break}else{const g=c.value;if(g.parentNode&&g.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=g.parentNode.host;if(this.mirror.getId(p)!==-1){a=c;break}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),i(a.value)}const s={texts:this.texts.map(a=>({id:this.mirror.getId(a.node),value:a.value})).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>({id:this.mirror.getId(a.node),attributes:a.attributes})).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:t};!s.texts.length&&!s.attributes.length&&!s.removes.length&&!s.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(s))},this.processMutation=t=>{if(!He(t.target,this.mirror))switch(t.type){case"characterData":{const r=t.target.textContent;!G(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:dt(t.target,this.maskTextClass,this.maskTextSelector)&&r?this.maskTextFn?this.maskTextFn(r):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let n=t.target.getAttribute(t.attributeName);if(t.attributeName==="value"&&(n=ze({maskInputOptions:this.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:n,maskInputFn:this.maskInputFn})),G(t.target,this.blockClass,this.blockSelector,!1)||n===t.oldValue)return;let i=this.attributes.find(o=>o.node===t.target);if(r.tagName==="IFRAME"&&t.attributeName==="src"&&!this.keepIframeSrcFn(n))if(!r.contentDocument)t.attributeName="rr_src";else return;if(i||(i={node:t.target,attributes:{}},this.attributes.push(i)),t.attributeName==="style"){const o=this.doc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue),(i.attributes.style===void 0||i.attributes.style===null)&&(i.attributes.style={});const s=i.attributes.style;for(const a of Array.from(r.style)){const l=r.style.getPropertyValue(a),c=r.style.getPropertyPriority(a);(l!==o.style.getPropertyValue(a)||c!==o.style.getPropertyPriority(a))&&(c===""?s[a]=l:s[a]=[l,c])}for(const a of Array.from(o.style))r.style.getPropertyValue(a)===""&&(s[a]=!1)}else i.attributes[t.attributeName]=ut(this.doc,r.tagName,t.attributeName,n);break}case"childList":{if(G(t.target,this.blockClass,this.blockSelector,!0))return;t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const n=this.mirror.getId(r),i=Se(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);G(t.target,this.blockClass,this.blockSelector,!1)||He(r,this.mirror)||!Ar(r,this.mirror)||(this.addedSet.has(r)?(Qe(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&n===-1||pt(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[St(n,i)]?Qe(this.movedSet,r):this.removes.push({parentId:i,id:n,isShadow:Se(t.target)&&be(t.target)?!0:void 0})),this.mapRemoves.push(r))});break}}},this.genAdds=(t,r)=>{if(this.mirror.hasNode(t)){if(He(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[St(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))}}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager"].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 Qe(e,t){e.delete(t),t.childNodes.forEach(r=>Qe(e,r))}function bt(e,t,r){return e.length===0?!1:At(e,t,r)}function At(e,t,r){const{parentNode:n}=t;if(!n)return!1;const i=r.getId(n);return e.some(o=>o.id===i)?!0:At(e,n,r)}function wt(e,t){return e.size===0?!1:kt(e,t)}function kt(e,t){const{parentNode:r}=t;return r?e.has(r)?!0:kt(e,r):!1}const ue=[],Mt=typeof CSSGroupingRule<"u",Tt=typeof CSSMediaRule<"u",Ot=typeof CSSSupportsRule<"u",Nt=typeof CSSConditionRule<"u";function ke(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];return e.target}catch{return e.target}}function Rt(e,t){var r,n;const i=new Tr;ue.push(i),i.init(e);let o=window.MutationObserver||window.__rrMutationObserver;const s=(n=(r=window?.Zone)===null||r===void 0?void 0:r.__symbol__)===null||n===void 0?void 0:n.call(r,"MutationObserver");s&&window[s]&&(o=window[s]);const a=new o(i.processMutations.bind(i));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function Or({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let s=[],a;const l=we(h=>{const g=Date.now()-a;e(s.map(p=>(p.timeOffset-=g,p)),h),s=[],a=null},o),c=we(h=>{const g=ke(h),{clientX:p,clientY:d}=mt(h)?h.changedTouches[0]:h;a||(a=Date.now()),s.push({x:p,y:d,id:n.getId(g),timeOffset:Date.now()-a}),l(typeof DragEvent<"u"&&h instanceof DragEvent?w.Drag:h instanceof MouseEvent?w.MouseMove:w.TouchMove)},i,{trailing:!1}),f=[U("mousemove",c,r),U("touchmove",c,r),U("drag",c,r)];return()=>{f.forEach(h=>h())}}function Nr({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[],l=c=>f=>{const h=ke(f);if(G(h,n,i,!0))return;const g=mt(f)?f.changedTouches[0]:f;if(!g)return;const p=r.getId(h),{clientX:d,clientY:C}=g;e({type:Ye[c],id:p,x:d,y:C})};return Object.keys(Ye).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&s[c]!==!1).forEach(c=>{const f=c.toLowerCase(),h=l(c);a.push(U(f,h,t))}),()=>{a.forEach(c=>c())}}function Et({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,sampling:o}){const s=we(a=>{const l=ke(a);if(!l||G(l,n,i,!0))return;const c=r.getId(l);if(l===t){const f=t.scrollingElement||t.documentElement;e({id:c,x:f.scrollLeft,y:f.scrollTop})}else e({id:c,x:l.scrollLeft,y:l.scrollTop})},o.scroll||100);return U("scroll",s,t)}function Rr({viewportResizeCb:e}){let t=-1,r=-1;const n=we(()=>{const i=ht(),o=gt();(t!==i||r!==o)&&(e({width:Number(o),height:Number(i)}),t=i,r=o)},200);return U("resize",n,window)}function xt(e,t){const r=Object.assign({},e);return t||delete r.userTriggered,r}const Er=["INPUT","TEXTAREA","SELECT"],_t=new WeakMap;function xr({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,ignoreClass:o,maskInputOptions:s,maskInputFn:a,sampling:l,userTriggeredOnInput:c}){function f(v){let m=ke(v);const I=v.isTrusted;if(m&&m.tagName==="OPTION"&&(m=m.parentElement),!m||!m.tagName||Er.indexOf(m.tagName)<0||G(m,n,i,!0))return;const b=m.type;if(m.classList.contains(o))return;let R=m.value,D=!1;b==="radio"||b==="checkbox"?D=m.checked:(s[m.tagName.toLowerCase()]||s[b])&&(R=ze({maskInputOptions:s,tagName:m.tagName,type:b,value:R,maskInputFn:a})),h(m,xt({text:R,isChecked:D,userTriggered:I},c));const N=m.name;b==="radio"&&N&&D&&t.querySelectorAll(`input[type="radio"][name="${N}"]`).forEach(A=>{A!==m&&h(A,xt({text:A.value,isChecked:!D,userTriggered:!1},c))})}function h(v,m){const I=_t.get(v);if(!I||I.text!==m.text||I.isChecked!==m.isChecked){_t.set(v,m);const b=r.getId(v);e(Object.assign(Object.assign({},m),{id:b}))}}const p=(l.input==="last"?["change"]:["input","change"]).map(v=>U(v,f,t)),d=t.defaultView;if(!d)return()=>{p.forEach(v=>v())};const C=d.Object.getOwnPropertyDescriptor(d.HTMLInputElement.prototype,"value"),y=[[d.HTMLInputElement.prototype,"value"],[d.HTMLInputElement.prototype,"checked"],[d.HTMLSelectElement.prototype,"value"],[d.HTMLTextAreaElement.prototype,"value"],[d.HTMLSelectElement.prototype,"selectedIndex"],[d.HTMLOptionElement.prototype,"selected"]];return C&&C.set&&p.push(...y.map(v=>_e(v[0],v[1],{set(){f({target:this})}},!1,d))),()=>{p.forEach(v=>v())}}function Fe(e){const t=[];function r(n,i){if(Mt&&n.parentRule instanceof CSSGroupingRule||Tt&&n.parentRule instanceof CSSMediaRule||Ot&&n.parentRule instanceof CSSSupportsRule||Nt&&n.parentRule instanceof CSSConditionRule){const s=Array.from(n.parentRule.cssRules).indexOf(n);i.unshift(s)}else if(n.parentStyleSheet){const s=Array.from(n.parentStyleSheet.cssRules).indexOf(n);i.unshift(s)}return i}return r(e,t)}function se(e,t,r){let n,i;return e?(e.ownerNode?n=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:n}):{}}function _r({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){const i=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=function(f,h){const{id:g,styleId:p}=se(this,t,r.styleMirror);return(g&&g!==-1||p&&p!==-1)&&e({id:g,styleId:p,adds:[{rule:f,index:h}]}),i.apply(this,[f,h])};const o=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=function(f){const{id:h,styleId:g}=se(this,t,r.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,removes:[{index:f}]}),o.apply(this,[f])};let s;n.CSSStyleSheet.prototype.replace&&(s=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=function(f){const{id:h,styleId:g}=se(this,t,r.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,replace:f}),s.apply(this,[f])});let a;n.CSSStyleSheet.prototype.replaceSync&&(a=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=function(f){const{id:h,styleId:g}=se(this,t,r.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,replaceSync:f}),a.apply(this,[f])});const l={};Mt?l.CSSGroupingRule=n.CSSGroupingRule:(Tt&&(l.CSSMediaRule=n.CSSMediaRule),Nt&&(l.CSSConditionRule=n.CSSConditionRule),Ot&&(l.CSSSupportsRule=n.CSSSupportsRule));const c={};return Object.entries(l).forEach(([f,h])=>{c[f]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=function(g,p){const{id:d,styleId:C}=se(this.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||C&&C!==-1)&&e({id:d,styleId:C,adds:[{rule:g,index:[...Fe(this),p||0]}]}),c[f].insertRule.apply(this,[g,p])},h.prototype.deleteRule=function(g){const{id:p,styleId:d}=se(this.parentStyleSheet,t,r.styleMirror);return(p&&p!==-1||d&&d!==-1)&&e({id:p,styleId:d,removes:[{index:[...Fe(this),g]}]}),c[f].deleteRule.apply(this,[g])}}),()=>{n.CSSStyleSheet.prototype.insertRule=i,n.CSSStyleSheet.prototype.deleteRule=o,s&&(n.CSSStyleSheet.prototype.replace=s),a&&(n.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([f,h])=>{h.prototype.insertRule=c[f].insertRule,h.prototype.deleteRule=c[f].deleteRule})}}function Ft({mirror:e,stylesheetManager:t},r){var n,i,o;let s=null;r.nodeName==="#document"?s=e.getId(r):s=e.getId(r.host);const a=r.nodeName==="#document"?(n=r.defaultView)===null||n===void 0?void 0:n.Document:(o=(i=r.ownerDocument)===null||i===void 0?void 0:i.defaultView)===null||o===void 0?void 0:o.ShadowRoot,l=Object.getOwnPropertyDescriptor(a?.prototype,"adoptedStyleSheets");return s===null||s===-1||!a||!l?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var c;return(c=l.get)===null||c===void 0?void 0:c.call(this)},set(c){var f;const h=(f=l.set)===null||f===void 0?void 0:f.call(this,c);if(s!==null&&s!==-1)try{t.adoptStyleSheets(c,s)}catch{}return h}}),()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})}function Fr({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=function(a,l,c){var f;if(r.has(a))return o.apply(this,[a,l,c]);const{id:h,styleId:g}=se((f=this.parentRule)===null||f===void 0?void 0:f.parentStyleSheet,t,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,set:{property:a,value:l,priority:c},index:Fe(this.parentRule)}),o.apply(this,[a,l,c])};const s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=function(a){var l;if(r.has(a))return s.apply(this,[a]);const{id:c,styleId:f}=se((l=this.parentRule)===null||l===void 0?void 0:l.parentStyleSheet,t,n.styleMirror);return(c&&c!==-1||f&&f!==-1)&&e({id:c,styleId:f,remove:{property:a},index:Fe(this.parentRule)}),s.apply(this,[a])},()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s}}function Dr({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:i}){const o=a=>we(l=>{const c=ke(l);if(!c||G(c,t,r,!0))return;const{currentTime:f,volume:h,muted:g,playbackRate:p}=c;e({type:a,id:n.getId(c),currentTime:f,volume:h,muted:g,playbackRate:p})},i.media||500),s=[U("play",o(0)),U("pause",o(1)),U("seeked",o(2)),U("volumechange",o(3)),U("ratechange",o(4))];return()=>{s.forEach(a=>a())}}function Lr({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const n=[],i=new WeakMap,o=r.FontFace;r.FontFace=function(l,c,f){const h=new o(l,c,f);return i.set(h,{family:l,buffer:typeof c!="string",descriptors:f,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),h};const s=Ie(t.fonts,"add",function(a){return function(l){return setTimeout(()=>{const c=i.get(l);c&&(e(c),i.delete(l))},0),a.apply(this,[l])}});return n.push(()=>{r.FontFace=o}),n.push(s),()=>{n.forEach(a=>a())}}function Br(e){const{doc:t,mirror:r,blockClass:n,blockSelector:i,selectionCb:o}=e;let s=!0;const a=()=>{const l=t.getSelection();if(!l||s&&l?.isCollapsed)return;s=l.isCollapsed||!1;const c=[],f=l.rangeCount||0;for(let h=0;h<f;h++){const g=l.getRangeAt(h),{startContainer:p,startOffset:d,endContainer:C,endOffset:y}=g;G(p,n,i,!0)||G(C,n,i,!0)||c.push({start:r.getId(p),startOffset:d,end:r.getId(C),endOffset:y})}o({ranges:c})};return a(),U("selectionchange",a)}function Wr(e,t){const{mutationCb:r,mousemoveCb:n,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:s,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:f,canvasMutationCb:h,fontCb:g,selectionCb:p}=e;e.mutationCb=(...d)=>{t.mutation&&t.mutation(...d),r(...d)},e.mousemoveCb=(...d)=>{t.mousemove&&t.mousemove(...d),n(...d)},e.mouseInteractionCb=(...d)=>{t.mouseInteraction&&t.mouseInteraction(...d),i(...d)},e.scrollCb=(...d)=>{t.scroll&&t.scroll(...d),o(...d)},e.viewportResizeCb=(...d)=>{t.viewportResize&&t.viewportResize(...d),s(...d)},e.inputCb=(...d)=>{t.input&&t.input(...d),a(...d)},e.mediaInteractionCb=(...d)=>{t.mediaInteaction&&t.mediaInteaction(...d),l(...d)},e.styleSheetRuleCb=(...d)=>{t.styleSheetRule&&t.styleSheetRule(...d),c(...d)},e.styleDeclarationCb=(...d)=>{t.styleDeclaration&&t.styleDeclaration(...d),f(...d)},e.canvasMutationCb=(...d)=>{t.canvasMutation&&t.canvasMutation(...d),h(...d)},e.fontCb=(...d)=>{t.font&&t.font(...d),g(...d)},e.selectionCb=(...d)=>{t.selection&&t.selection(...d),p(...d)}}function Ur(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};Wr(e,t);const n=Rt(e,e.doc),i=Or(e),o=Nr(e),s=Et(e),a=Rr(e),l=xr(e),c=Dr(e),f=_r(e,{win:r}),h=Ft(e,e.doc),g=Fr(e,{win:r}),p=e.collectFonts?Lr(e):()=>{},d=Br(e),C=[];for(const y of e.plugins)C.push(y.observer(y.callback,r,y.options));return()=>{ue.forEach(y=>y.reset()),n.disconnect(),i(),o(),s(),a(),l(),c(),f(),h(),g(),p(),d(),C.forEach(y=>y())}}class Dt{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,r,n,i){const o=n||this.getIdToRemoteIdMap(t),s=i||this.getRemoteIdToIdMap(t);let a=o.get(r);return a||(a=this.generateIdFn(),o.set(r,a),s.set(a,r)),a}getIds(t,r){const n=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return r.map(o=>this.getId(t,o,n,i))}getRemoteId(t,r,n){const i=n||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;const o=i.get(r);return o||-1}getRemoteIds(t,r){const n=this.getRemoteIdToIdMap(t);return r.map(i=>this.getRemoteId(t,i,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 Gr{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Dt(lt),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Dt(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===void 0||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){if(t.data.type==="rrweb"){if(!t.source)return;const n=this.crossOriginIframeMap.get(t.source);if(!n)return;const i=this.transformCrossOriginEvent(n,t.data.event);i&&this.wrappedEmit(i,t.data.isCheckout)}}transformCrossOriginEvent(t,r){var n;switch(r.type){case k.FullSnapshot:return this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t),{timestamp:r.timestamp,type:k.IncrementalSnapshot,data:{source:w.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 w.Mutation:return r.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t)}),r.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),r.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),r.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case w.Drag:case w.TouchMove:case w.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case w.ViewportResize:return!1;case w.MediaInteraction:case w.MouseInteraction:case w.Scroll:case w.CanvasMutation:case w.Input:return this.replaceIds(r.data,t,["id"]),r;case w.StyleSheetRule:case w.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case w.Font:return r;case w.Selection:return r.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),r;case w.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(n=r.data.styles)===null||n===void 0||n.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),r}}}replace(t,r,n,i){for(const o of i)!Array.isArray(r[o])&&typeof r[o]!="number"||(Array.isArray(r[o])?r[o]=t.getIds(n,r[o]):r[o]=t.getId(n,r[o]));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"]),"childNodes"in t&&t.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}}class Zr{constructor(t){this.shadowDoms=new WeakSet,this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;const r=this;this.restorePatches.push(Ie(Element.prototype,"attachShadow",function(n){return function(i){const o=n.call(this,i);return this.shadowRoot&&r.addShadowRoot(this.shadowRoot,this.ownerDocument),o}}))}addShadowRoot(t,r){be(t)&&(this.shadowDoms.has(t)||(this.shadowDoms.add(t),Rt(Object.assign(Object.assign({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),Et(Object.assign(Object.assign({},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)),Ft({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t)},0)))}observeAttachShadow(t){if(t.contentWindow){const r=this;this.restorePatches.push(Ie(t.contentWindow.HTMLElement.prototype,"attachShadow",function(n){return function(i){const o=n.call(this,i);return this.shadowRoot&&r.addShadowRoot(this.shadowRoot,t.contentDocument),o}}))}}reset(){this.restorePatches.forEach(t=>t()),this.shadowDoms=new WeakSet}}/*! *****************************************************************************
|
|
4
|
+
Copyright (c) Microsoft Corporation.
|
|
5
|
+
|
|
6
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
7
|
+
purpose with or without fee is hereby granted.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
10
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
11
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
12
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
13
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
14
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
15
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
16
|
+
***************************************************************************** */function Vr(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Kr(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(f){try{c(n.next(f))}catch(h){s(h)}}function l(f){try{c(n.throw(f))}catch(h){s(h)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((n=n.apply(e,t||[])).next())})}for(var ye="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pr=typeof Uint8Array>"u"?[]:new Uint8Array(256),De=0;De<ye.length;De++)Pr[ye.charCodeAt(De)]=De;var zr=function(e){var t=new Uint8Array(e),r,n=t.length,i="";for(r=0;r<n;r+=3)i+=ye[t[r]>>2],i+=ye[(t[r]&3)<<4|t[r+1]>>4],i+=ye[(t[r+1]&15)<<2|t[r+2]>>6],i+=ye[t[r+2]&63];return n%3===2?i=i.substring(0,i.length-1)+"=":n%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const Lt=new Map;function Jr(e,t){let r=Lt.get(e);return r||(r=new Map,Lt.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const Bt=(e,t,r)=>{if(!e||!(Ut(e,t)||typeof e=="object"))return;const n=e.constructor.name,i=Jr(r,n);let o=i.indexOf(e);return o===-1&&(o=i.length,i.push(e)),o};function Le(e,t,r){if(e instanceof Array)return e.map(n=>Le(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,i=zr(e);return{rr_type:n,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Le(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const n=e.constructor.name,{src:i}=e;return{rr_type:n,src:i}}else if(e instanceof HTMLCanvasElement){const n="HTMLImageElement",i=e.toDataURL();return{rr_type:n,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Le(e.data,t,r),e.width,e.height]};if(Ut(e,t)||typeof e=="object"){const n=e.constructor.name,i=Bt(e,t,r);return{rr_type:n,index:i}}}}return e}const Wt=(e,t,r)=>[...e].map(n=>Le(n,t,r)),Ut=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function Hr(e,t,r,n){const i=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const s of o)try{if(typeof t.CanvasRenderingContext2D.prototype[s]!="function")continue;const a=Ie(t.CanvasRenderingContext2D.prototype,s,function(l){return function(...c){return G(this.canvas,r,n,!0)||setTimeout(()=>{const f=Wt([...c],t,this);e(this.canvas,{type:Ce["2D"],property:s,args:f})},0),l.apply(this,c)}});i.push(a)}catch{const l=_e(t.CanvasRenderingContext2D.prototype,s,{set(c){e(this.canvas,{type:Ce["2D"],property:s,args:[c],setter:!0})}});i.push(l)}return()=>{i.forEach(s=>s())}}function Gt(e,t,r){const n=[];try{const i=Ie(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(s,...a){return G(this,t,r,!0)||"__context"in this||(this.__context=s),o.apply(this,[s,...a])}});n.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(i=>i())}}function Zt(e,t,r,n,i,o,s){const a=[],l=Object.getOwnPropertyNames(e);for(const c of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if(typeof e[c]!="function")continue;const f=Ie(e,c,function(h){return function(...g){const p=h.apply(this,g);if(Bt(p,s,this),!G(this.canvas,n,i,!0)){const d=Wt([...g],s,this),C={type:t,property:c,args:d};r(this.canvas,C)}return p}});a.push(f)}catch{const h=_e(e,c,{set(g){r(this.canvas,{type:t,property:c,args:[g],setter:!0})}});a.push(h)}return a}function Yr(e,t,r,n,i){const o=[];return o.push(...Zt(t.WebGLRenderingContext.prototype,Ce.WebGL,e,r,n,i,t)),typeof t.WebGL2RenderingContext<"u"&&o.push(...Zt(t.WebGL2RenderingContext.prototype,Ce.WebGL2,e,r,n,i,t)),()=>{o.forEach(s=>s())}}var Vt=null;try{var Qr=typeof module<"u"&&typeof module.require=="function"&&module.require("worker_threads")||typeof __non_webpack_require__=="function"&&__non_webpack_require__("worker_threads")||typeof require=="function"&&require("worker_threads");Vt=Qr.Worker}catch{}function Xr(e,t){return Buffer.from(e,"base64").toString(t?"utf16":"utf8")}function qr(e,t,r){var n=t===void 0?null:t,i=r===void 0?!1:r,o=Xr(e,i),s=o.indexOf(`
|
|
17
|
+
`,10)+1,a=o.substring(s)+(n?"//# sourceMappingURL="+n:"");return function(c){return new Vt(a,Object.assign({},c,{eval:!0}))}}function jr(e,t){var r=atob(e);if(t){for(var n=new Uint8Array(r.length),i=0,o=r.length;i<o;++i)n[i]=r.charCodeAt(i);return String.fromCharCode.apply(null,new Uint16Array(n.buffer))}return r}function $r(e,t,r){var n=t===void 0?null:t,i=r===void 0?!1:r,o=jr(e,i),s=o.indexOf(`
|
|
18
|
+
`,10)+1,a=o.substring(s)+(n?"//# sourceMappingURL="+n:""),l=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(l)}function en(e,t,r){var n;return function(o){return n=n||$r(e,t,r),new Worker(n,o)}}var tn=Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]";function rn(){return tn}function nn(e,t,r){return rn()?qr(e,t,r):en(e,t,r)}var on=nn("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=",null,!1);class an{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(l,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(c)};const{sampling:r="all",win:n,blockClass:i,blockSelector:o,recordCanvas:s,dataURLOptions:a}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&r==="all"&&this.initCanvasMutationObserver(n,i,o),s&&typeof r=="number"&&this.initCanvasFPSObserver(r,n,i,o,{dataURLOptions:a})}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,i,o){const s=Gt(r,n,i),a=new Map,l=new on;l.onmessage=d=>{const{id:C}=d.data;if(a.set(C,!1),!("base64"in d.data))return;const{base64:y,type:v,width:m,height:I}=d.data;this.mutationCb({id:C,type:Ce["2D"],commands:[{property:"clearRect",args:[0,0,m,I]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:y}],type:v}]},0,0]}]})};const c=1e3/t;let f=0,h;const g=()=>{const d=[];return r.document.querySelectorAll("canvas").forEach(C=>{G(C,n,i,!0)||d.push(C)}),d},p=d=>{if(f&&d-f<c){h=requestAnimationFrame(p);return}f=d,g().forEach(C=>Kr(this,void 0,void 0,function*(){var y;const v=this.mirror.getId(C);if(a.get(v))return;if(a.set(v,!0),["webgl","webgl2"].includes(C.__context)){const I=C.getContext(C.__context);((y=I?.getContextAttributes())===null||y===void 0?void 0:y.preserveDrawingBuffer)===!1&&I?.clear(I.COLOR_BUFFER_BIT)}const m=yield createImageBitmap(C);l.postMessage({id:v,bitmap:m,width:C.width,height:C.height,dataURLOptions:o.dataURLOptions},[m])})),h=requestAnimationFrame(p)};h=requestAnimationFrame(p),this.resetObservers=()=>{s(),cancelAnimationFrame(h)}}initCanvasMutationObserver(t,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Gt(t,r,n),o=Hr(this.processMutation.bind(this),t,r,n),s=Yr(this.processMutation.bind(this),t,r,n,this.mirror);this.resetObservers=()=>{i(),o(),s()}}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 i=n.map(s=>Vr(s,["type"])),{type:o}=n[0];this.mutationCb({id:r,type:o,commands:i}),this.pendingCanvasMutations.delete(t)}}class sn{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new kr,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:[]},i=[];for(const o of t){let s;if(this.styleMirror.has(o))s=this.styleMirror.getId(o);else{s=this.styleMirror.add(o);const a=Array.from(o.rules||CSSRule);i.push({styleId:s,rules:a.map((l,c)=>({rule:ot(l),index:c}))})}n.styleIds.push(s)}i.length>0&&(n.styles=i),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}function F(e){return Object.assign(Object.assign({},e),{timestamp:Date.now()})}let x,Be,Xe,We=!1;const ee=er();function Me(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:i="rr-block",blockSelector:o=null,ignoreClass:s="rr-ignore",maskTextClass:a="rr-mask",maskTextSelector:l=null,inlineStylesheet:c=!0,maskAllInputs:f,maskInputOptions:h,slimDOMOptions:g,maskInputFn:p,maskTextFn:d,hooks:C,packFn:y,sampling:v={},dataURLOptions:m={},mousemoveWait:I,recordCanvas:b=!1,recordCrossOriginIframes:R=!1,userTriggeredOnInput:D=!1,collectFonts:N=!1,inlineImages:A=!1,plugins:T,keepIframeSrcFn:H=()=>!1,ignoreCSSAttributes:q=new Set([])}=e,j=R?window.parent===window:!0;let $=!1;if(!j)try{window.parent.document,$=!1}catch{$=!0}if(j&&!t)throw new Error("emit function is required");I!==void 0&&v.mousemove===void 0&&(v.mousemove=I),ee.reset();const L=f===!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}:h!==void 0?h:{password:!0},Y=g===!0||g==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:g==="all",headMetaDescKeywords:g==="all"}:g||{};wr();let re,ie=0;const ae=S=>{for(const Z of T||[])Z.eventProcessor&&(S=Z.eventProcessor(S));return y&&(S=y(S)),S};x=(S,Z)=>{var P;if(!((P=ue[0])===null||P===void 0)&&P.isFrozen()&&S.type!==k.FullSnapshot&&!(S.type===k.IncrementalSnapshot&&S.data.source===w.Mutation)&&ue.forEach(E=>E.unfreeze()),j)t?.(ae(S),Z);else if($){const E={type:"rrweb",event:ae(S),isCheckout:Z};window.parent.postMessage(E,"*")}if(S.type===k.FullSnapshot)re=S,ie=0;else if(S.type===k.IncrementalSnapshot){if(S.data.source===w.Mutation&&S.data.isAttachIframe)return;ie++;const E=n&&ie>=n,X=r&&S.timestamp-re.timestamp>r;(E||X)&&Be(!0)}};const K=S=>{x(F({type:k.IncrementalSnapshot,data:Object.assign({source:w.Mutation},S)}))},Q=S=>x(F({type:k.IncrementalSnapshot,data:Object.assign({source:w.Scroll},S)})),ce=S=>x(F({type:k.IncrementalSnapshot,data:Object.assign({source:w.CanvasMutation},S)})),_=S=>x(F({type:k.IncrementalSnapshot,data:Object.assign({source:w.AdoptedStyleSheet},S)})),ne=new sn({mutationCb:K,adoptedStyleSheetCb:_}),oe=new Gr({mirror:ee,mutationCb:K,stylesheetManager:ne,recordCrossOriginIframes:R,wrappedEmit:x});for(const S of T||[])S.getMirror&&S.getMirror({nodeMirror:ee,crossOriginIframeMirror:oe.crossOriginIframeMirror,crossOriginIframeStyleMirror:oe.crossOriginIframeStyleMirror});Xe=new an({recordCanvas:b,mutationCb:ce,win:window,blockClass:i,blockSelector:o,mirror:ee,sampling:v.canvas,dataURLOptions:m});const ve=new Zr({mutationCb:K,scrollCb:Q,bypassOptions:{blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:l,inlineStylesheet:c,maskInputOptions:L,dataURLOptions:m,maskTextFn:d,maskInputFn:p,recordCanvas:b,inlineImages:A,sampling:v,slimDOMOptions:Y,iframeManager:oe,stylesheetManager:ne,canvasManager:Xe,keepIframeSrcFn:H},mirror:ee});Be=(S=!1)=>{var Z,P,E,X,M,z;x(F({type:k.Meta,data:{href:window.location.href,width:gt(),height:ht()}}),S),ne.reset(),ue.forEach(V=>V.lock());const Re=br(document,{mirror:ee,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:l,inlineStylesheet:c,maskAllInputs:L,maskTextFn:d,slimDOM:Y,dataURLOptions:m,recordCanvas:b,inlineImages:A,onSerialize:V=>{It(V,ee)&&oe.addIframe(V),Ct(V,ee)&&ne.trackLinkElement(V),yt(V)&&ve.addShadowRoot(V.shadowRoot,document)},onIframeLoad:(V,it)=>{oe.attachIframe(V,it),ve.observeAttachShadow(V)},onStylesheetLoad:(V,it)=>{ne.attachLinkElement(V,it)},keepIframeSrcFn:H});if(!Re)return console.warn("Failed to snapshot the document");x(F({type:k.FullSnapshot,data:{node:Re,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((P=(Z=document?.body)===null||Z===void 0?void 0:Z.parentElement)===null||P===void 0?void 0:P.scrollLeft)||((E=document?.body)===null||E===void 0?void 0:E.scrollLeft)||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((M=(X=document?.body)===null||X===void 0?void 0:X.parentElement)===null||M===void 0?void 0:M.scrollTop)||((z=document?.body)===null||z===void 0?void 0:z.scrollTop)||0}}})),ue.forEach(V=>V.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ne.adoptStyleSheets(document.adoptedStyleSheets,ee.getId(document))};try{const S=[];S.push(U("DOMContentLoaded",()=>{x(F({type:k.DomContentLoaded,data:{}}))}));const Z=E=>{var X;return Ur({mutationCb:K,mousemoveCb:(M,z)=>x(F({type:k.IncrementalSnapshot,data:{source:z,positions:M}})),mouseInteractionCb:M=>x(F({type:k.IncrementalSnapshot,data:Object.assign({source:w.MouseInteraction},M)})),scrollCb:Q,viewportResizeCb:M=>x(F({type:k.IncrementalSnapshot,data:Object.assign({source:w.ViewportResize},M)})),inputCb:M=>x(F({type:k.IncrementalSnapshot,data:Object.assign({source:w.Input},M)})),mediaInteractionCb:M=>x(F({type:k.IncrementalSnapshot,data:Object.assign({source:w.MediaInteraction},M)})),styleSheetRuleCb:M=>x(F({type:k.IncrementalSnapshot,data:Object.assign({source:w.StyleSheetRule},M)})),styleDeclarationCb:M=>x(F({type:k.IncrementalSnapshot,data:Object.assign({source:w.StyleDeclaration},M)})),canvasMutationCb:ce,fontCb:M=>x(F({type:k.IncrementalSnapshot,data:Object.assign({source:w.Font},M)})),selectionCb:M=>{x(F({type:k.IncrementalSnapshot,data:Object.assign({source:w.Selection},M)}))},blockClass:i,ignoreClass:s,maskTextClass:a,maskTextSelector:l,maskInputOptions:L,inlineStylesheet:c,sampling:v,recordCanvas:b,inlineImages:A,userTriggeredOnInput:D,collectFonts:N,doc:E,maskInputFn:p,maskTextFn:d,keepIframeSrcFn:H,blockSelector:o,slimDOMOptions:Y,dataURLOptions:m,mirror:ee,iframeManager:oe,stylesheetManager:ne,shadowDomManager:ve,canvasManager:Xe,ignoreCSSAttributes:q,plugins:((X=T?.filter(M=>M.observer))===null||X===void 0?void 0:X.map(M=>({observer:M.observer,options:M.options,callback:z=>x(F({type:k.Plugin,data:{plugin:M.name,payload:z}}))})))||[]},C)};oe.addLoadListener(E=>{S.push(Z(E.contentDocument))});const P=()=>{Be(),S.push(Z(document)),We=!0};return document.readyState==="interactive"||document.readyState==="complete"?P():S.push(U("load",()=>{x(F({type:k.Load,data:{}})),P()},window)),()=>{S.forEach(E=>E()),We=!1}}catch(S){console.warn(S)}}Me.addCustomEvent=(e,t)=>{if(!We)throw new Error("please add custom event after start recording");x(F({type:k.Custom,data:{tag:e,payload:t}}))},Me.freezePage=()=>{ue.forEach(e=>e.freeze())},Me.takeFullSnapshot=e=>{if(!We)throw new Error("please take full snapshot after start recording");Be(e)},Me.mirror=ee;var ln={DEBUG:!1,LIB_VERSION:"2.50.0"},W;if(typeof window>"u"){var Kt={hostname:""};W={navigator:{userAgent:""},document:{location:Kt,referrer:""},screen:{width:0,height:0},location:Kt}}else W=window;var Ue=24*60*60*1e3,Ge=Array.prototype,cn=Function.prototype,Pt=Object.prototype,de=Ge.slice,Te=Pt.toString,Ze=Pt.hasOwnProperty,Oe=W.console,Ne=W.navigator,J=W.document,Ve=W.opera,Ke=W.screen,fe=Ne.userAgent,qe=cn.bind,zt=Ge.forEach,Jt=Ge.indexOf,Ht=Ge.map,un=Array.isArray,je={},u={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},te={log:function(){},warn:function(){},error:function(){},critical:function(){if(!u.isUndefined(Oe)&&Oe){var e=["Mixpanel error:"].concat(u.toArray(arguments));try{Oe.error.apply(Oe,e)}catch{u.each(e,function(r){Oe.error(r)})}}}},$e=function(e,t){return function(){return arguments[0]="["+t+"] "+arguments[0],e.apply(te,arguments)}},dn=function(e){return{log:$e(te.log,e),error:$e(te.error,e),critical:$e(te.critical,e)}};u.bind=function(e,t){var r,n;if(qe&&e.bind===qe)return qe.apply(e,de.call(arguments,1));if(!u.isFunction(e))throw new TypeError;return r=de.call(arguments,2),n=function(){if(!(this instanceof n))return e.apply(t,r.concat(de.call(arguments)));var i={};i.prototype=e.prototype;var o=new i;i.prototype=null;var s=e.apply(o,r.concat(de.call(arguments)));return Object(s)===s?s:o},n},u.each=function(e,t,r){if(e!=null){if(zt&&e.forEach===zt)e.forEach(t,r);else if(e.length===+e.length){for(var n=0,i=e.length;n<i;n++)if(n in e&&t.call(r,e[n],n,e)===je)return}else for(var o in e)if(Ze.call(e,o)&&t.call(r,e[o],o,e)===je)return}},u.extend=function(e){return u.each(de.call(arguments,1),function(t){for(var r in t)t[r]!==void 0&&(e[r]=t[r])}),e},u.isArray=un||function(e){return Te.call(e)==="[object Array]"},u.isFunction=function(e){try{return/^\s*\bfunction\b/.test(e)}catch{return!1}},u.isArguments=function(e){return!!(e&&Ze.call(e,"callee"))},u.toArray=function(e){return e?e.toArray?e.toArray():u.isArray(e)||u.isArguments(e)?de.call(e):u.values(e):[]},u.map=function(e,t,r){if(Ht&&e.map===Ht)return e.map(t,r);var n=[];return u.each(e,function(i){n.push(t.call(r,i))}),n},u.keys=function(e){var t=[];return e===null||u.each(e,function(r,n){t[t.length]=n}),t},u.values=function(e){var t=[];return e===null||u.each(e,function(r){t[t.length]=r}),t},u.include=function(e,t){var r=!1;return e===null?r:Jt&&e.indexOf===Jt?e.indexOf(t)!=-1:(u.each(e,function(n){if(r||(r=n===t))return je}),r)},u.includes=function(e,t){return e.indexOf(t)!==-1},u.inherit=function(e,t){return e.prototype=new t,e.prototype.constructor=e,e.superclass=t.prototype,e},u.isObject=function(e){return e===Object(e)&&!u.isArray(e)},u.isEmptyObject=function(e){if(u.isObject(e)){for(var t in e)if(Ze.call(e,t))return!1;return!0}return!1},u.isUndefined=function(e){return e===void 0},u.isString=function(e){return Te.call(e)=="[object String]"},u.isDate=function(e){return Te.call(e)=="[object Date]"},u.isNumber=function(e){return Te.call(e)=="[object Number]"},u.isElement=function(e){return!!(e&&e.nodeType===1)},u.encodeDates=function(e){return u.each(e,function(t,r){u.isDate(t)?e[r]=u.formatDate(t):u.isObject(t)&&(e[r]=u.encodeDates(t))}),e},u.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},u.formatDate=function(e){function t(r){return r<10?"0"+r:r}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())},u.strip_empty_properties=function(e){var t={};return u.each(e,function(r,n){u.isString(r)&&r.length>0&&(t[n]=r)}),t},u.truncate=function(e,t){var r;return typeof e=="string"?r=e.slice(0,t):u.isArray(e)?(r=[],u.each(e,function(n){r.push(u.truncate(n,t))})):u.isObject(e)?(r={},u.each(e,function(n,i){r[i]=u.truncate(n,t)})):r=e,r},u.JSONEncode=function(){return function(e){var t=e,r=function(i){var o=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return o.lastIndex=0,o.test(i)?'"'+i.replace(o,function(a){var l=s[a];return typeof l=="string"?l:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+i+'"'},n=function(i,o){var s="",a=" ",l=0,c="",f="",h=0,g=s,p=[],d=o[i];switch(d&&typeof d=="object"&&typeof d.toJSON=="function"&&(d=d.toJSON(i)),typeof d){case"string":return r(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(s+=a,p=[],Te.apply(d)==="[object Array]"){for(h=d.length,l=0;l<h;l+=1)p[l]=n(l,d)||"null";return f=p.length===0?"[]":s?`[
|
|
19
|
+
`+s+p.join(`,
|
|
20
|
+
`+s)+`
|
|
21
|
+
`+g+"]":"["+p.join(",")+"]",s=g,f}for(c in d)Ze.call(d,c)&&(f=n(c,d),f&&p.push(r(c)+(s?": ":":")+f));return f=p.length===0?"{}":s?"{"+p.join(",")+g+"}":"{"+p.join(",")+"}",s=g,f}};return n("",{"":t})}}(),u.JSONDecode=function(){var e,t,r={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
22
|
+
`,r:"\r",t:" "},n,i=function(p){var d=new SyntaxError(p);throw d.at=e,d.text=n,d},o=function(p){return p&&p!==t&&i("Expected '"+p+"' instead of '"+t+"'"),t=n.charAt(e),e+=1,t},s=function(){var p,d="";for(t==="-"&&(d="-",o("-"));t>="0"&&t<="9";)d+=t,o();if(t===".")for(d+=".";o()&&t>="0"&&t<="9";)d+=t;if(t==="e"||t==="E")for(d+=t,o(),(t==="-"||t==="+")&&(d+=t,o());t>="0"&&t<="9";)d+=t,o();if(p=+d,!isFinite(p))i("Bad number");else return p},a=function(){var p,d,C="",y;if(t==='"')for(;o();){if(t==='"')return o(),C;if(t==="\\")if(o(),t==="u"){for(y=0,d=0;d<4&&(p=parseInt(o(),16),!!isFinite(p));d+=1)y=y*16+p;C+=String.fromCharCode(y)}else if(typeof r[t]=="string")C+=r[t];else break;else C+=t}i("Bad string")},l=function(){for(;t&&t<=" ";)o()},c=function(){switch(t){case"t":return o("t"),o("r"),o("u"),o("e"),!0;case"f":return o("f"),o("a"),o("l"),o("s"),o("e"),!1;case"n":return o("n"),o("u"),o("l"),o("l"),null}i('Unexpected "'+t+'"')},f,h=function(){var p=[];if(t==="["){if(o("["),l(),t==="]")return o("]"),p;for(;t;){if(p.push(f()),l(),t==="]")return o("]"),p;o(","),l()}}i("Bad array")},g=function(){var p,d={};if(t==="{"){if(o("{"),l(),t==="}")return o("}"),d;for(;t;){if(p=a(),l(),o(":"),Object.hasOwnProperty.call(d,p)&&i('Duplicate key "'+p+'"'),d[p]=f(),l(),t==="}")return o("}"),d;o(","),l()}}i("Bad object")};return f=function(){switch(l(),t){case"{":return g();case"[":return h();case'"':return a();case"-":return s();default:return t>="0"&&t<="9"?s():c()}},function(p){var d;return n=p,e=0,t=" ",d=f(),l(),t&&i("Syntax error"),d}}(),u.base64Encode=function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r,n,i,o,s,a,l,c,f=0,h=0,g="",p=[];if(!e)return e;e=u.utf8Encode(e);do r=e.charCodeAt(f++),n=e.charCodeAt(f++),i=e.charCodeAt(f++),c=r<<16|n<<8|i,o=c>>18&63,s=c>>12&63,a=c>>6&63,l=c&63,p[h++]=t.charAt(o)+t.charAt(s)+t.charAt(a)+t.charAt(l);while(f<e.length);switch(g=p.join(""),e.length%3){case 1:g=g.slice(0,-2)+"==";break;case 2:g=g.slice(0,-1)+"=";break}return g},u.utf8Encode=function(e){e=(e+"").replace(/\r\n/g,`
|
|
23
|
+
`).replace(/\r/g,`
|
|
24
|
+
`);var t="",r,n,i=0,o;for(r=n=0,i=e.length,o=0;o<i;o++){var s=e.charCodeAt(o),a=null;s<128?n++:s>127&&s<2048?a=String.fromCharCode(s>>6|192,s&63|128):a=String.fromCharCode(s>>12|224,s>>6&63|128,s&63|128),a!==null&&(n>r&&(t+=e.substring(r,n)),t+=a,r=n=o+1)}return n>r&&(t+=e.substring(r,e.length)),t},u.UUID=function(){var e=function(){var n=1*new Date,i;if(W.performance&&W.performance.now)i=W.performance.now();else for(i=0;n==1*new Date;)i++;return n.toString(16)+Math.floor(i).toString(16)},t=function(){return Math.random().toString(16).replace(".","")},r=function(){var n=fe,i,o,s=[],a=0;function l(c,f){var h,g=0;for(h=0;h<f.length;h++)g|=s[h]<<h*8;return c^g}for(i=0;i<n.length;i++)o=n.charCodeAt(i),s.unshift(o&255),s.length>=4&&(a=l(a,s),s=[]);return s.length>0&&(a=l(a,s)),a.toString(16)};return function(){var n=(Ke.height*Ke.width).toString(16);return e()+"-"+t()+"-"+r()+"-"+n+"-"+e()}}();var Yt=["ahrefsbot","ahrefssiteaudit","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];u.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t<Yt.length;t++)if(e.indexOf(Yt[t])!==-1)return!0;return!1},u.HTTPBuildQuery=function(e,t){var r,n,i=[];return u.isUndefined(t)&&(t="&"),u.each(e,function(o,s){r=encodeURIComponent(o.toString()),n=encodeURIComponent(s),i[i.length]=n+"="+r}),i.join(t)},u.getQueryParam=function(e,t){t=t.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var r="[\\?&]"+t+"=([^&#]*)",n=new RegExp(r),i=n.exec(e);if(i===null||i&&typeof i[1]!="string"&&i[1].length)return"";var o=i[1];try{o=decodeURIComponent(o)}catch{te.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},u.cookie={get:function(e){for(var t=e+"=",r=J.cookie.split(";"),n=0;n<r.length;n++){for(var i=r[n];i.charAt(0)==" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return decodeURIComponent(i.substring(t.length,i.length))}return null},parse:function(e){var t;try{t=u.JSONDecode(u.cookie.get(e))||{}}catch{}return t},set_seconds:function(e,t,r,n,i,o,s){var a="",l="",c="";if(s)a="; domain="+s;else if(n){var f=Xt(J.location.hostname);a=f?"; domain=."+f:""}if(r){var h=new Date;h.setTime(h.getTime()+r*1e3),l="; expires="+h.toGMTString()}o&&(i=!0,c="; SameSite=None"),i&&(c+="; secure"),J.cookie=e+"="+encodeURIComponent(t)+l+"; path=/"+a+c},set:function(e,t,r,n,i,o,s){var a="",l="",c="";if(s)a="; domain="+s;else if(n){var f=Xt(J.location.hostname);a=f?"; domain=."+f:""}if(r){var h=new Date;h.setTime(h.getTime()+r*24*60*60*1e3),l="; expires="+h.toGMTString()}o&&(i=!0,c="; SameSite=None"),i&&(c+="; secure");var g=e+"="+encodeURIComponent(t)+l+"; path=/"+a+c;return J.cookie=g,g},remove:function(e,t,r){u.cookie.set(e,"",-1,t,!1,!1,r)}};var et=null,fn=function(e,t){if(et!==null&&!t)return et;var r=!0;try{e=e||window.localStorage;var n="__mplss_"+Qt(8),i="xyz";e.setItem(n,i),e.getItem(n)!==i&&(r=!1),e.removeItem(n)}catch{r=!1}return et=r,r};u.localStorage={is_supported:function(e){var t=fn(null,e);return t||te.error("localStorage unsupported; falling back to cookie store"),t},error:function(e){te.error("localStorage error: "+e)},get:function(e){try{return window.localStorage.getItem(e)}catch(t){u.localStorage.error(t)}return null},parse:function(e){try{return u.JSONDecode(u.localStorage.get(e))||{}}catch{}return null},set:function(e,t){try{window.localStorage.setItem(e,t)}catch(r){u.localStorage.error(r)}},remove:function(e){try{window.localStorage.removeItem(e)}catch(t){u.localStorage.error(t)}}},u.register_event=function(){var e=function(n,i,o,s,a){if(!n){te.error("No valid element provided to register_event");return}if(n.addEventListener&&!s)n.addEventListener(i,o,!!a);else{var l="on"+i,c=n[l];n[l]=t(n,o,c)}};function t(n,i,o){var s=function(a){if(a=a||r(window.event),!!a){var l=!0,c,f;return u.isFunction(o)&&(c=o(a)),f=i.call(n,a),(c===!1||f===!1)&&(l=!1),l}};return s}function r(n){return n&&(n.preventDefault=r.preventDefault,n.stopPropagation=r.stopPropagation),n}return r.preventDefault=function(){this.returnValue=!1},r.stopPropagation=function(){this.cancelBubble=!0},e}();var hn=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');u.dom_query=function(){function e(i){return i.all?i.all:i.getElementsByTagName("*")}var t=/[\t\r\n]/g;function r(i,o){var s=" "+o+" ";return(" "+i.className+" ").replace(t," ").indexOf(s)>=0}function n(i){if(!J.getElementsByTagName)return[];var o=i.split(" "),s,a,l,c,f,h,g,p,d,C,y=[J];for(h=0;h<o.length;h++){if(s=o[h].replace(/^\s+/,"").replace(/\s+$/,""),s.indexOf("#")>-1){a=s.split("#"),l=a[0];var v=a[1],m=J.getElementById(v);if(!m||l&&m.nodeName.toLowerCase()!=l)return[];y=[m];continue}if(s.indexOf(".")>-1){a=s.split("."),l=a[0];var I=a[1];for(l||(l="*"),c=[],f=0,g=0;g<y.length;g++)for(l=="*"?d=e(y[g]):d=y[g].getElementsByTagName(l),p=0;p<d.length;p++)c[f++]=d[p];for(y=[],C=0,g=0;g<c.length;g++)c[g].className&&u.isString(c[g].className)&&r(c[g],I)&&(y[C++]=c[g]);continue}var b=s.match(hn);if(b){l=b[1];var R=b[2],D=b[3],N=b[4];for(l||(l="*"),c=[],f=0,g=0;g<y.length;g++)for(l=="*"?d=e(y[g]):d=y[g].getElementsByTagName(l),p=0;p<d.length;p++)c[f++]=d[p];y=[],C=0;var A;switch(D){case"=":A=function(T){return T.getAttribute(R)==N};break;case"~":A=function(T){return T.getAttribute(R).match(new RegExp("\\b"+N+"\\b"))};break;case"|":A=function(T){return T.getAttribute(R).match(new RegExp("^"+N+"-?"))};break;case"^":A=function(T){return T.getAttribute(R).indexOf(N)===0};break;case"$":A=function(T){return T.getAttribute(R).lastIndexOf(N)==T.getAttribute(R).length-N.length};break;case"*":A=function(T){return T.getAttribute(R).indexOf(N)>-1};break;default:A=function(T){return T.getAttribute(R)}}for(y=[],C=0,g=0;g<c.length;g++)A(c[g])&&(y[C++]=c[g]);continue}for(l=s,c=[],f=0,g=0;g<y.length;g++)for(d=y[g].getElementsByTagName(l),p=0;p<d.length;p++)c[f++]=d[p];y=c}return y}return function(i){return u.isElement(i)?[i]:u.isObject(i)&&!u.isUndefined(i.length)?i:n.call(this,i)}}();var gn=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],pn=["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","ttclid","twclid","wbraid"];u.info={campaignParams:function(e){var t="",r={};return u.each(gn,function(n){t=u.getQueryParam(J.URL,n),t.length?r[n]=t:e!==void 0&&(r[n]=e)}),r},clickParams:function(){var e="",t={};return u.each(pn,function(r){e=u.getQueryParam(J.URL,r),e.length&&(t[r]=e)}),t},marketingParams:function(){return u.extend(u.info.campaignParams(),u.info.clickParams())},searchEngine:function(e){return e.search("https?://(.*)google.([^/?]*)")===0?"google":e.search("https?://(.*)bing.com")===0?"bing":e.search("https?://(.*)yahoo.com")===0?"yahoo":e.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null},searchInfo:function(e){var t=u.info.searchEngine(e),r=t!="yahoo"?"q":"p",n={};if(t!==null){n.$search_engine=t;var i=u.getQueryParam(e,r);i.length&&(n.mp_keyword=i)}return n},browser:function(e,t,r){return t=t||"",r||u.includes(e," OPR/")?u.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":u.includes(e,"IEMobile")||u.includes(e,"WPDesktop")?"Internet Explorer Mobile":u.includes(e,"SamsungBrowser/")?"Samsung Internet":u.includes(e,"Edge")||u.includes(e,"Edg/")?"Microsoft Edge":u.includes(e,"FBIOS")?"Facebook Mobile":u.includes(e,"Chrome")?"Chrome":u.includes(e,"CriOS")?"Chrome iOS":u.includes(e,"UCWEB")||u.includes(e,"UCBrowser")?"UC Browser":u.includes(e,"FxiOS")?"Firefox iOS":u.includes(t,"Apple")?u.includes(e,"Mobile")?"Mobile Safari":"Safari":u.includes(e,"Android")?"Android Mobile":u.includes(e,"Konqueror")?"Konqueror":u.includes(e,"Firefox")?"Firefox":u.includes(e,"MSIE")||u.includes(e,"Trident/")?"Internet Explorer":u.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,t,r){var n=u.info.browser(e,t,r),i={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/},o=i[n];if(o===void 0)return null;var s=e.match(o);return s?parseFloat(s[s.length-2]):null},os:function(){var e=fe;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""},referringDomain:function(e){var t=e.split("/");return t.length>=3?t[2]:""},currentUrl:function(){return W.location.href},properties:function(e){return typeof e!="object"&&(e={}),u.extend(u.strip_empty_properties({$os:u.info.os(),$browser:u.info.browser(fe,Ne.vendor,Ve),$referrer:J.referrer,$referring_domain:u.info.referringDomain(J.referrer),$device:u.info.device(fe)}),{$current_url:u.info.currentUrl(),$browser_version:u.info.browserVersion(fe,Ne.vendor,Ve),$screen_height:Ke.height,$screen_width:Ke.width,mp_lib:"web",$lib_version:ln.LIB_VERSION,$insert_id:Qt(),time:u.timestamp()/1e3},u.strip_empty_properties(e))},people_properties:function(){return u.extend(u.strip_empty_properties({$os:u.info.os(),$browser:u.info.browser(fe,Ne.vendor,Ve)}),{$browser_version:u.info.browserVersion(fe,Ne.vendor,Ve)})},mpPageViewProperties:function(){return u.strip_empty_properties({current_page_title:J.title,current_domain:W.location.hostname,current_url_path:W.location.pathname,current_url_protocol:W.location.protocol,current_url_search:W.location.search})}};var Qt=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},mn=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,In=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,Xt=function(e){var t=In,r=e.split("."),n=r[r.length-1];(n.length>4||n==="com"||n==="org")&&(t=mn);var i=e.match(t);return i?i[0]:""},tt=null,rt=null;typeof JSON<"u"&&(tt=JSON.stringify,rt=JSON.parse),tt=tt||u.JSONEncode,rt=rt||u.JSONDecode,u.toArray=u.toArray,u.isObject=u.isObject,u.JSONEncode=u.JSONEncode,u.JSONDecode=u.JSONDecode,u.isBlockedUA=u.isBlockedUA,u.isEmptyObject=u.isEmptyObject,u.info=u.info,u.info.device=u.info.device,u.info.browser=u.info.browser,u.info.browserVersion=u.info.browserVersion,u.info.properties=u.info.properties;var Cn="__mp_opt_in_out_";function yn(e,t){if(wn(t))return te.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var r=An(e,t)==="0";return r&&te.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),r}function vn(e){return kn(e,function(t){return this.get_config(t)})}function Sn(e){return e=e||{},e.persistenceType==="localStorage"?u.localStorage:u.cookie}function bn(e,t){return t=t||{},(t.persistencePrefix||Cn)+e}function An(e,t){return Sn(t).get(bn(e,t))}function wn(e){if(e&&e.ignoreDnt)return!1;var t=e&&e.window||W,r=t.navigator||{},n=!1;return u.each([r.doNotTrack,r.msDoNotTrack,t.doNotTrack],function(i){u.includes([!0,1,"1","yes"],i)&&(n=!0)}),n}function kn(e,t){return function(){var r=!1;try{var n=t.call(this,"token"),i=t.call(this,"ignore_dnt"),o=t.call(this,"opt_out_tracking_persistence_type"),s=t.call(this,"opt_out_tracking_cookie_prefix"),a=t.call(this,"window");n&&(r=yn(n,{ignoreDnt:i,persistenceType:o,persistencePrefix:s,window:a}))}catch(c){te.error("Unexpected error when checking tracking opt-out status: "+c)}if(!r)return e.apply(this,arguments);var l=arguments[arguments.length-1];typeof l=="function"&&l(0)}}var nt=dn("recorder"),le=function(e){this._mixpanel=e,this._stopRecording=null,this.recEvents=[],this.seqNo=0,this.replayId=null,this.replayStartTime=null,this.batchStartTime=null,this.replayLengthMs=0,this.sendBatchId=null,this.idleTimeoutId=null,this.maxTimeoutId=null,this.recordMaxMs=Ue};le.prototype.get_config=function(e){return this._mixpanel.get_config(e)},le.prototype.startRecording=function(){if(this._stopRecording!==null){nt.log("Recording already in progress, skipping startRecording.");return}this.recordMaxMs=this.get_config("record_max_ms"),this.recordMaxMs>Ue&&(this.recordMaxMs=Ue,nt.critical("record_max_ms cannot be greater than "+Ue+"ms. Capping value.")),this.recEvents=[],this.seqNo=0,this.startDate=new Date,this.replayStartTime=this.startDate.getTime(),this.batchStartTime=this.replayStartTime,this.replayId=u.UUID(),this.replayLengthMs=0;var e=u.bind(function(){clearTimeout(this.idleTimeoutId),this.idleTimeoutId=setTimeout(u.bind(function(){nt.log("Idle timeout reached, restarting recording."),this.resetRecording()},this),this.get_config("record_idle_timeout_ms"))},this);this._stopRecording=Me({emit:u.bind(function(t){this.recEvents.push(t),this.replayLengthMs=new Date().getTime()-this.replayStartTime,e()},this),maskAllInputs:!0,maskTextSelector:this.get_config("record_mask_text_selector")}),e(),this.sendBatchId=setInterval(u.bind(this.flushEventsWithOptOut,this),1e4),this.maxTimeoutId=setTimeout(u.bind(this.resetRecording,this),this.recordMaxMs)},le.prototype.resetRecording=function(){this.stopRecording(),this.startRecording()},le.prototype.stopRecording=function(){this._stopRecording!==null&&(this._stopRecording(),this._stopRecording=null),this._flushEvents(),this.replayId=null,clearInterval(this.sendBatchId),clearTimeout(this.idleTimeoutId),clearTimeout(this.maxTimeoutId)},le.prototype.flushEventsWithOptOut=function(){this._flushEvents(u.bind(this._onOptOut,this))},le.prototype._onOptOut=function(e){e===0&&(this.recEvents=[],this.stopRecording())},le.prototype._flushEvents=vn(function(){var e=this.recEvents.length;if(e>0){var t={distinct_id:String(this._mixpanel.get_distinct_id()),events:this.recEvents,seq:this.seqNo++,batch_start_time:this.batchStartTime/1e3,replay_id:this.replayId,replay_length_ms:this.replayLengthMs,replay_start_time:this.replayStartTime/1e3},r=this._mixpanel.get_property("$device_id");r&&(t.$device_id=r);var n=this._mixpanel.get_property("$user_id");n&&(t.$user_id=n),window.fetch(this.get_config("api_host")+"/"+this.get_config("api_routes").record,{method:"POST",headers:{Authorization:"Basic "+btoa(this.get_config("token")+":"),"Content-Type":"application/json"},body:u.JSONEncode(t)}),this.recEvents=this.recEvents.slice(e),this.batchStartTime=new Date().getTime()}}),window.__mp_recorder=le})();
|