PageSourceSearch

https://www.fullty.io/it/chunk-MCHN37VS.js

js fullty.io collected 2026-10-09 23:07:55 UTC 124,640 bytes, 7 lines download raw bytes

1import{a as Sn,b as Qe,c as lr,d as bn,e as wn,f as In,g as Cn,h as ur,i as et,j as En,k as Oe,l as Mn,m as le,n as xn,o as dr,p as Rn,q as kn,r as tt}from"./chunk-MRNJ5ZFV.js";import{$ as gn,D as mn,Ea as vn,eb as yn,h as pn,m as hn,n as O,q as k,r as x,s as pe,t as ve,u as Ne}from"./chunk-XPHYESLE.js";import{a as ge,b as Me,f as Co,m as Ze,n as cr,o as fn}from"./chunk-3IKYG4ZB.js";var Eo={development:"",production:""},Mo={plan:{version:"7",branch:"main",source:"app",versionId:"61256620-9b7e-48d0-9e16-20481f5752a0"},ingestionMetadata:{sourceName:"browser-typescript-ampli",sourceVersion:"2.0.0"},serverZone:bn.ServerZone.EU},fr=class{constructor(e){this.event_properties=e,this.event_type="ReferralLinkCopied",this.event_properties=e}},pr=class{constructor(e){this.event_properties=e,this.event_type="TransferCreated",this.event_properties=e}},hr=class{constructor(e){this.event_properties=e,this.event_type="TransferDownloaded",this.event_properties=e}},mr=class{constructor(e){this.event_properties=e,this.event_type="TransferDownloadRequested",this.event_properties=e}},gr=class{constructor(e){this.event_properties=e,this.event_type="TransferPaymentRequested",this.event_properties=e}},vr=class{constructor(e){this.event_properties=e,this.event_type="TransferSenderVerified",this.event_properties=e}},yr=class{constructor(e){this.event_properties=e,this.event_type="TransferTypeConfirmed",this.event_properties=e}},Sr=class{constructor(){this.event_type="UserOnboardStarted"}},rt=()=>({promise:Promise.resolve()}),nt=class{constructor(){this.disabled=!1}get client(){return this.isInitializedAndEnabled(),this.amplitude}get isLoaded(){return this.amplitude!=null}isInitializedAndEnabled(){return this.amplitude?!this.disabled:(console.error("ERROR: Ampli is not yet initialized. Have you called ampli.load() on app start?"),!1)}load(e){if(this.disabled=e.disabled??!1,this.amplitude)return console.warn("WARNING: Ampli is already intialized. Ampli.load() should be called once at application startup."),rt();let r=null;if(e.client&&"apiKey"in e.client?r=e.client.apiKey:"environment"in e&&(r=Eo[e.environment]),e.client&&"instance"in e.client)this.amplitude=e.client.instance;else if(r){this.amplitude=kn();let n=e.client&&"configuration"in e.client?e.client.configuration:{};return this.amplitude.init(r,void 0,ge(ge({},Mo),n))}else console.error("ERROR: ampli.load() requires 'environment', 'client.apiKey', or 'client.instance'");return rt()}identify(e,r){if(!this.isInitializedAndEnabled())return rt();e&&(r=Me(ge({},r),{user_id:e}));let n=new Cn;return this.amplitude.identify(n,r)}flush(){return this.isInitializedAndEnabled()?this.amplitude.flush():rt()}track(e,r){return this.isInitializedAndEnabled()?this.amplitude.track(e,void 0,r):rt()}referralLinkCopied(e,r){return this.track(new fr(e),r)}transferCreated(e,r){return this.track(new pr(e),r)}transferDownloaded(e,r){return this.track(new hr(e),r)}transferDownloadRequested(e,r){return this.track(new mr(e),r)}transferPaymentRequested(e,r){return this.track(new gr(e),r)}transferSenderVerified(e,r){return this.track(new vr(e),r)}transferTypeConfirmed(e,r){return this.track(new yr(e),r)}userOnboardStarted(e){return this.track(new Sr,e)}},la=new nt;var _n="[Amplitude]",Tn="".concat(_n," Session Replay ID");var Nn=0,On=Qe.US,Ln="".concat(_n," Session Replay Debug"),Dn="amp-block",Mt="amp-mask",An="amp-unmask",Pn="https://api-sr.amplitude.com/sessions/v2/track",Fn="https://api-sr.eu.amplitude.com/sessions/v2/track",Wn="https://api-sr.stag2.amplitude.com/sessions/v2/track",ha="".concat(wn,"_replay_unsent"),Bn=1*1e6,Un=3e4,Gn=6e4,zn=500,Hn=10*1e3,ma=1e3*60*60*24*3,xt=1024,Rt=function(t){return t.GET_SR_PROPS="get-sr-props",t.DEBUG_INFO="debug-info",t}(Rt||{});var br=function(){return{flushMaxRetries:2,logLevel:Sn.Warn,loggerProvider:new et,transportProvider:new xn}},qn=function(t){hn(e,t);function e(r,n){var i=this,o=br();return i=t.call(this,O(O({transportProvider:o.transportProvider},n),{apiKey:r}))||this,i.flushMaxRetries=n.flushMaxRetries!==void 0&&n.flushMaxRetries<=o.flushMaxRetries?n.flushMaxRetries:o.flushMaxRetries,i.apiKey=r,i.sampleRate=n.sampleRate||Nn,i.serverZone=n.serverZone||On,i.configEndpointUrl=n.configEndpointUrl,i.shouldInlineStylesheet=n.shouldInlineStylesheet,n.privacyConfig&&(i.privacyConfig=n.privacyConfig),n.debugMode&&(i.debugMode=n.debugMode),i}return e}(En);var $=function(t){return t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t}($||{});function xo(t){return t.nodeType===t.ELEMENT_NODE}function Pe(t){let e=t?.host;return e?.shadowRoot===t}function De(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function Ro(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),t}function ko(t){let{cssText:e}=t;if(e.split('"').length<3)return e;let r=["@import",`url(${JSON.stringify(t.href)})`];return t.layerName===""?r.push("layer"):t.layerName&&r.push(`layer(${t.layerName})`),t.supportsText&&r.push(`supports(${t.supportsText})`),t.media.length&&r.push(t.media.mediaText),r.join(" ")+";"}function kt(t){try{let e=t.rules||t.cssRules;return e?Ro(Array.from(e,wr).join("")):null}catch{return null}}function wr(t){let e;if(To(t))try{e=kt(t.styleSheet)||ko(t)}catch{}else if(No(t)&&t.selectorText.includes(":"))return _o(t.cssText);return e||t.cssText}function _o(t){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function To(t){return"styleSheet"in t}function No(t){return"selectorText"in t}var _t=class{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){var r;if(!e)return-1;let n=(r=this.getMeta(e))===null||r===void 0?void 0:r.id;return n??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let r=this.getId(e);
1this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,r){let n=r.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,r)}replace(e,r){let n=this.getNode(e);if(n){let i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(e,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function $n(){return new _t}function ot({element:t,maskInputOptions:e,tagName:r,type:n,value:i,maskInputFn:o}){let a=i||"",c=n&&be(n);return(e[r.toLowerCase()]||c&&e[c])&&(o?a=o(a,t):a="*".repeat(a.length)),a}function be(t){return t.toLowerCase()}var Vn="__rrweb_original__";function Oo(t){let e=t.getContext("2d");if(!e)return!0;let r=50;for(let n=0;n<t.width;n+=r)for(let i=0;i<t.height;i+=r){let o=e.getImageData,a=Vn in o?o[Vn]:o;if(new Uint32Array(a.call(e,n,i,Math.min(r,t.width-n),Math.min(r,t.height-i)).data.buffer).some(s=>s!==0))return!1}return!0}function st(t){let e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?be(e):null}var Lo=1,Do=new RegExp("[^a-z0-9-_:]"),Ae=-2;function Ir(){return Lo++}function Ao(t){if(t instanceof HTMLFormElement)return"form";let e=be(t.tagName);return Do.test(e)?"div":e}function Po(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}var He,jn,Fo=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Wo=/^(?:[a-z+]+:)?\/\//i,Bo=/^www\..*/i,Uo=/^(data:)([^,]*),(.*)/i;function Tt(t,e){return(t||"").replace(Fo,(r,n,i,o,a,c)=>{let s=i||a||c,u=n||o||"";if(!s)return r;if(Wo.test(s)||Bo.test(s))return`url(${u}${s}${u})`;if(Uo.test(s))return`url(${u}${s}${u})`;if(s[0]==="/")return`url(${u}${Po(e)+s}${u})`;let l=e.split("/"),d=s.split("/");l.pop();for(let p of d)p!=="."&&(p===".."?l.pop():l.push(p));return`url(${u}${l.join("/")}${u})`})}var Go=/^[^ \t\n\r\u000c]+/,zo=/^[, \t\n\r\u000c]+/;function Ho(t,e){if(e.trim()==="")return e;let r=0;function n(o){let a,c=o.exec(e.substring(r));return c?(a=c[0],r+=a.length,a):""}let i=[];for(;n(zo),!(r>=e.length);){let o=n(Go);if(o.slice(-1)===",")o=qe(t,o.substring(0,o.length-1)),i.push(o);else{let a="";o=qe(t,o);let c=!1;for(;;){let s=e.charAt(r);if(s===""){i.push((o+a).trim());break}else if(c)s===")"&&(c=!1);else if(s===","){r+=1,i.push((o+a).trim());break}else s==="("&&(c=!0);a+=s,r+=1}}}return i.join(", ")}function qe(t,e){if(!e||e.trim()==="")return e;let r=t.createElement("a");return r.href=e,r.href}function qo(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function Cr(){let t=document.createElement("a");return t.href="",t.href}function Er(t,e,r,n){return n&&(r==="src"||r==="href"&&!(e==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&(e==="table"||e==="td"||e==="th")?qe(t,n):r==="srcset"?Ho(t,n):r==="style"?Tt(n,Cr()):e==="object"&&r==="data"?qe(t,n):n)}function Mr(t,e,r){return(t==="video"||t==="audio")&&e==="autoplay"}function Vo(t,e,r){try{if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(let n=t.classList.length;n--;){let i=t.classList[n];if(e.test(i))return!0}if(r)return t.matches(r)}catch{}return!1}function it(t,e,r){if(!t)return!1;
1if(t.nodeType!==t.ELEMENT_NODE)return r?it(t.parentNode,e,r):!1;for(let n=t.classList.length;n--;){let i=t.classList[n];if(e.test(i))return!0}return r?it(t.parentNode,e,r):!1}function xr(t,e,r){try{let n=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(n===null)return!1;if(typeof e=="string"){if(n.classList.contains(e)||n.closest(`.${e}`))return!0}else if(it(n,e,!0))return!0;if(r&&(n.matches(r)||n.closest(r)))return!0}catch{}return!1}function jo(t,e,r){let n=t.contentWindow;if(!n)return;let i=!1,o;try{o=n.document.readyState}catch{return}if(o!=="complete"){let c=setTimeout(()=>{i||(e(),i=!0)},r);t.addEventListener("load",()=>{clearTimeout(c),i=!0,e()});return}let a="about:blank";if(n.location.href!==a||t.src===a||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function $o(t,e,r){let n=!1,i;try{i=t.sheet}catch{return}if(i)return;let o=setTimeout(()=>{n||(e(),n=!0)},r);t.addEventListener("load",()=>{clearTimeout(o),n=!0,e()})}function Ko(t,e){let{doc:r,mirror:n,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:c,inlineStylesheet:s,maskInputOptions:u={},maskTextFn:l,maskInputFn:d,dataURLOptions:p={},inlineImages:f,recordCanvas:m,keepIframeSrcFn:h,newlyAddedElement:v=!1}=e,S=Xo(r,n);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:$.Document,childNodes:[],compatMode:t.compatMode}:{type:$.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:$.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:S};case t.ELEMENT_NODE:return Jo(t,{doc:r,blockClass:i,blockSelector:o,inlineStylesheet:s,maskInputOptions:u,maskInputFn:d,dataURLOptions:p,inlineImages:f,recordCanvas:m,keepIframeSrcFn:h,newlyAddedElement:v,rootId:S});case t.TEXT_NODE:return Yo(t,{maskTextClass:a,maskTextSelector:c,maskTextFn:l,rootId:S});case t.CDATA_SECTION_NODE:return{type:$.CDATA,textContent:"",rootId:S};case t.COMMENT_NODE:return{type:$.Comment,textContent:t.textContent||"",rootId:S};default:return!1}}function Xo(t,e){if(!e.hasNode(t))return;let r=e.getId(t);return r===1?void 0:r}function Yo(t,e){var r;let{maskTextClass:n,maskTextSelector:i,maskTextFn:o,rootId:a}=e,c=t.parentNode&&t.parentNode.tagName,s=t.textContent,u=c==="STYLE"?!0:void 0,l=c==="SCRIPT"?!0:void 0;if(u&&s){try{t.nextSibling||t.previousSibling||!((r=t.parentNode.sheet)===null||r===void 0)&&r.cssRules&&(s=kt(t.parentNode.sheet))}catch(d){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${d}`,t)}s=Tt(s,Cr())}return l&&(s="SCRIPT_PLACEHOLDER"),!u&&!l&&s&&xr(t,n,i)&&(s=o?o(s,t.parentElement):s.replace(/[\S]/g,"*")),{type:$.Text,textContent:s||"",isStyle:u,rootId:a}}function Jo(t,e){let{doc:r,blockClass:n,blockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskInputFn:c,dataURLOptions:s={},inlineImages:u,recordCanvas:l,keepIframeSrcFn:d,newlyAddedElement:p=!1,rootId:f}=e,m=Vo(t,n,i),h=Ao(t),v={},S=t.attributes.length;for(let g=0;g<S;g++){let y=t.attributes[g];Mr(h,y.name,y.value)||(v[y.name]=Er(r,h,be(y.name),y.value))}if(h==="link"&&o){let g=Array.from(r.styleSheets).find(w=>w.href===t.href),y=null;g&&(y=kt(g)),y&&(delete v.rel,delete v.href,v._cssText=Tt(y,g.href))}if(h==="style"&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){let g=kt(t.sheet);g&&(v._cssText=Tt(g,Cr()))}if(h==="input"||h==="textarea"||h==="select"){let g=t.value,y=t.checked;v.type!=="radio"&&v.type!=="checkbox"&&v.type!=="submit"&&v.type!=="button"&&g?v.value=ot({element:t,type:st(t),tagName:h,value:g,maskInputOptions:a,maskInputFn:c}):y&&(v.checked=y)}if(h==="option"&&(t.selected&&!a.select?v.selected=!0:delete v.selected),h==="canvas"&&l){if(t.__context==="2d")Oo(t)||(v.rr_dataURL=t.toDataURL(s.type,s.quality));else if(!("__context"in t)){let g=t.toDataURL(s.type,s.quality),y=document.createElement("canvas");y.width=t.width,y.height=t.height;let w=y.toDataURL(s.type,s.quality);g!==w&&(v.rr_dataURL=g)}}if(h==="img"&&u){He||(He=r.createElement("canvas"),jn=He.getContext("2d"));let g=t,y=g.crossOrigin;g.crossOrigin="anonymous";let w=()=>{g.removeEventListener("load",w);
1try{He.width=g.naturalWidth,He.height=g.naturalHeight,jn.drawImage(g,0,0),v.rr_dataURL=He.toDataURL(s.type,s.quality)}catch(I){console.warn(`Cannot inline img src=${g.currentSrc}! Error: ${I}`)}y?v.crossOrigin=y:g.removeAttribute("crossorigin")};g.complete&&g.naturalWidth!==0?w():g.addEventListener("load",w)}if((h==="audio"||h==="video")&&(v.rr_mediaState=t.paused?"paused":"played",v.rr_mediaCurrentTime=t.currentTime),p||(t.scrollLeft&&(v.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(v.rr_scrollTop=t.scrollTop)),m){let{width:g,height:y}=t.getBoundingClientRect();v={class:v.class,rr_width:`${g}px`,rr_height:`${y}px`}}return h==="iframe"&&!d(v.src)&&(t.contentDocument||(v.rr_src=v.src),delete v.src),{type:$.Element,tagName:h,attributes:v,childNodes:[],isSVG:qo(t)||void 0,needBlock:m,rootId:f}}function U(t){return t==null?"":t.toLowerCase()}function Zo(t,e){if(e.comment&&t.type===$.Comment)return!0;if(t.type===$.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"||t.attributes.rel==="modulepreload")&&t.attributes.as==="script"||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&t.attributes.href.endsWith(".js")))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(U(t.attributes.name).match(/^msapplication-tile(image|color)$/)||U(t.attributes.name)==="application-name"||U(t.attributes.rel)==="icon"||U(t.attributes.rel)==="apple-touch-icon"||U(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&U(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(U(t.attributes.property).match(/^(og|twitter|fb):/)||U(t.attributes.name).match(/^(og|twitter):/)||U(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(U(t.attributes.name)==="robots"||U(t.attributes.name)==="googlebot"||U(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(U(t.attributes.name)==="author"||U(t.attributes.name)==="generator"||U(t.attributes.name)==="framework"||U(t.attributes.name)==="publisher"||U(t.attributes.name)==="progid"||U(t.attributes.property).match(/^article:/)||U(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(U(t.attributes.name)==="google-site-verification"||U(t.attributes.name)==="yandex-verification"||U(t.attributes.name)==="csrf-token"||U(t.attributes.name)==="p:domain_verify"||U(t.attributes.name)==="verify-v1"||U(t.attributes.name)==="verification"||U(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Le(t,e){let{doc:r,mirror:n,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:c,skipChild:s=!1,inlineStylesheet:u=!0,maskInputOptions:l={},maskTextFn:d,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m={},inlineImages:h=!1,recordCanvas:v=!1,onSerialize:S,onIframeLoad:g,iframeLoadTimeout:y=5e3,onStylesheetLoad:w,stylesheetLoadTimeout:I=5e3,keepIframeSrcFn:E=()=>!1,newlyAddedElement:T=!1}=e,{preserveWhiteSpace:b=!0}=e,D=Ko(t,{doc:r,mirror:n,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:l,maskTextFn:d,maskInputFn:p,dataURLOptions:m,inlineImages:h,recordCanvas:v,keepIframeSrcFn:E,newlyAddedElement:T});if(!D)return console.warn(t,"not serialized"),null;let M;n.hasNode(t)?M=n.getId(t):Zo(D,f)||!b&&D.type===$.Text&&!D.isStyle&&!D.textContent.replace(/^\s+|\s+$/gm,"").length?M=Ae:M=Ir();let R=Object.assign(D,{id:M});if(n.add(t,R),M===Ae)return null;S&&S(t);let A=!s;if(R.type===$.Element){A=A&&!R.needBlock,delete R.needBlock;let F=t.shadowRoot;F&&De(F)&&(R.isShadowHost=!0)}if((R.type===$.Document||R.type===$.Element)&&A){f.headWhitespace&&R.type===$.Element&&R.tagName==="head"&&(b=!1);let F={doc:r,mirror:n,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:c,skipChild:s,inlineStylesheet:u,maskInputOptions:l,maskTextFn:d,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:h,recordCanvas:v,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:g,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:I,keepIframeSrcFn:E};if(!(R.type===$.Element&&R.tagName==="textarea"&&R.attributes.value!==void 0))for(let W of Array.from(t.childNodes)){let G=Le(W,F);G&&R.childNodes.push(G)}if(xo(t)&&t.shadowRoot)for(let W of Array.from(t.shadowRoot.childNodes)){let G=Le(W,F);G&&(De(t.shadowRoot)&&(G.isShadow=!0),R.childNodes.push(G))}}return t.parentNode&&Pe(t.parentNode)&&De(t.parentNode)&&(R.isShadow=!0),R.type===$.Element&&R.tagName==="iframe"&&jo(t,()=>{let F=t.contentDocument;if(F&&g){let W=Le(F,{doc:F,mirror:n,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:c,skipChild:!1,inlineStylesheet:u,maskInputOptions:l,maskTextFn:d,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:h,recordCanvas:v,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:g,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:I,keepIframeSrcFn:E});W&&g(t,W)}},y),R.type===$.Element&&R.tagName==="link"&&R.attributes.rel==="stylesheet"&&$o(t,()=>{if(w){let F=Le(t,{doc:r,mirror:n,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:c,skipChild:!1,inlineStylesheet:u,maskInputOptions:l,maskTextFn:d,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:h,recordCanvas:v,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:g,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:I,keepIframeSrcFn:E});F&&w(t,F)}},I),R}
1function Kn(t,e){let{mirror:r=new _t,blockClass:n="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,inlineStylesheet:c=!0,inlineImages:s=!1,recordCanvas:u=!1,maskAllInputs:l=!1,maskTextFn:d,maskInputFn:p,slimDOM:f=!1,dataURLOptions:m,preserveWhiteSpace:h,onSerialize:v,onIframeLoad:S,iframeLoadTimeout:g,onStylesheetLoad:y,stylesheetLoadTimeout:w,keepIframeSrcFn:I=()=>!1}=e||{};return Le(t,{doc:t,mirror:r,blockClass:n,blockSelector:i,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:l===!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}:l===!1?{password:!0}:l,maskTextFn:d,maskInputFn:p,slimDOMOptions:f===!0||f==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:f==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:f===!1?{}:f,dataURLOptions:m,inlineImages:s,recordCanvas:u,preserveWhiteSpace:h,onSerialize:v,onIframeLoad:S,iframeLoadTimeout:g,onStylesheetLoad:y,stylesheetLoadTimeout:w,keepIframeSrcFn:I,newlyAddedElement:!1})}var Qo=/(max|min)-device-(width|height)/,Ca=new RegExp(Qo.source,"g"),es=/([^\\]):hover/,Ea=new RegExp(es.source,"g");var L=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(L||{}),N=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t))(N||{}),oe=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(oe||{}),ye=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(ye||{}),we=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(we||{});var Be={};Co(Be,{StyleSheetMirror:()=>at,_mirror:()=>Rr,closestElementOfNode:()=>Nt,getBaseDimension:()=>Yn,getNestedRule:()=>Jn,getPositionsAndIndex:()=>rs,getRootShadowHost:()=>Zn,getShadowHost:()=>Lt,getWindowHeight:()=>lt,getWindowScroll:()=>ct,getWindowWidth:()=>ut,hasShadowRoot:()=>je,hookSetter:()=>xe,inDom:()=>mt,isAncestorRemoved:()=>Ot,isBlocked:()=>V,isIgnored:()=>dt,isSerialized:()=>kr,isSerializedIframe:()=>pt,isSerializedStylesheet:()=>ht,iterateResolveTree:()=>Xn,legacy_isTouchEvent:()=>ft,nowTimestamp:()=>We,on:()=>Q,patch:()=>he,polyfill:()=>_r,queueToResolveTrees:()=>ts,shadowHostInDom:()=>Qn,throttle:()=>Fe,uniqueTextMutations:()=>ns});function Q(t,e,r=document){let n={capture:!0,passive:!0};return r.addEventListener(t,e,n),()=>r.removeEventListener(t,e,n)}var Ve=`Please stop import mirror directly. Instead of that,\r
2now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
3or you can use record.mirror to access the mirror instance during recording.`,Rr={map:{},getId(){return console.error(Ve),-1},getNode(){return console.error(Ve),null},removeNodeFromMap(){console.error(Ve)},has(){return console.error(Ve),!1},reset(){console.error(Ve)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Rr=new Proxy(Rr,{get(t,e,r){return e==="map"&&console.error(Ve),Reflect.get(t,e,r)}}));function Fe(t,e,r={}){let n=null,i=0;return function(...o){let a=Date.now();!i&&r.leading===!1&&(i=a);let c=e-(a-i),s=this;c<=0||c>e?(n&&(clearTimeout(n),n=null),i=a,t.apply(s,o)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{i=r.leading===!1?0:Date.now(),n=null,t.apply(s,o)},c))}}function xe(t,e,r,n,i=window){let o=i.Object.getOwnPropertyDescriptor(t,e);
3return i.Object.defineProperty(t,e,n?r:{set(a){setTimeout(()=>{r.set.call(this,a)},0),o&&o.set&&o.set.call(this,a)}}),()=>xe(t,e,o||{},!0)}function he(t,e,r){try{if(!(e in t))return()=>{};let n=t[e],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),t[e]=i,()=>{t[e]=n}}catch{return()=>{}}}var We=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(We=()=>new Date().getTime());function ct(t){var e,r,n,i,o,a;let c=t.document;return{left:c.scrollingElement?c.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:c?.documentElement.scrollLeft||((r=(e=c?.body)===null||e===void 0?void 0:e.parentElement)===null||r===void 0?void 0:r.scrollLeft)||((n=c?.body)===null||n===void 0?void 0:n.scrollLeft)||0,top:c.scrollingElement?c.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:c?.documentElement.scrollTop||((o=(i=c?.body)===null||i===void 0?void 0:i.parentElement)===null||o===void 0?void 0:o.scrollTop)||((a=c?.body)===null||a===void 0?void 0:a.scrollTop)||0}}function lt(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ut(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Nt(t){return t?t.nodeType===t.ELEMENT_NODE?t:t.parentElement:null}function V(t,e,r,n){if(!t)return!1;let i=Nt(t);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||n&&i.closest("."+e)!==null)return!0}else if(it(i,e,n))return!0}catch{}return!!(r&&(i.matches(r)||n&&i.closest(r)!==null))}function kr(t,e){return e.getId(t)!==-1}function dt(t,e){return e.getId(t)===Ae}function Ot(t,e){if(Pe(t))return!1;let r=e.getId(t);return e.has(r)?t.parentNode&&t.parentNode.nodeType===t.DOCUMENT_NODE?!1:t.parentNode?Ot(t.parentNode,e):!0:!0}function ft(t){return!!t.changedTouches}function _r(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let r=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do if(this===r)return!0;while(r=r&&r.parentNode);return!1})}function ts(t){let e={},r=(i,o)=>{let a={value:i,parent:o,children:[]};return e[i.node.id]=a,a},n=[];for(let i of t){let{nextId:o,parentId:a}=i;if(o&&o in e){let c=e[o];if(c.parent){let s=c.parent.children.indexOf(c);c.parent.children.splice(s,0,r(i,c.parent))}else{let s=n.indexOf(c);n.splice(s,0,r(i,null))}continue}if(a in e){let c=e[a];
3c.children.push(r(i,c));continue}n.push(r(i,null))}return n}function Xn(t,e){e(t.value);for(let r=t.children.length-1;r>=0;r--)Xn(t.children[r],e)}function pt(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function ht(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function Yn(t,e){var r,n;let i=(n=(r=t.ownerDocument)===null||r===void 0?void 0:r.defaultView)===null||n===void 0?void 0:n.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};let o=i.getBoundingClientRect(),a=Yn(i,e),c=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:c,absoluteScale:a.absoluteScale*c}}function je(t){return!!t?.shadowRoot}function Jn(t,e){let r=t[e[0]];return e.length===1?r:Jn(r.cssRules[e[1]].cssRules,e.slice(2))}function rs(t){let e=[...t],r=e.pop();return{positions:e,index:r}}function ns(t){let e=new Set,r=[];for(let n=t.length;n--;){let i=t[n];e.has(i.id)||(r.push(i),e.add(i.id))}return r}var at=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){var r;return(r=this.styleIDMap.get(e))!==null&&r!==void 0?r:-1}has(e){return this.styleIDMap.has(e)}add(e,r){if(this.has(e))return this.getId(e);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function Lt(t){var e,r;let n=null;return((r=(e=t.getRootNode)===null||e===void 0?void 0:e.call(t))===null||r===void 0?void 0:r.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&t.getRootNode().host&&(n=t.getRootNode().host),n}function Zn(t){let e=t,r;for(;r=Lt(e);)e=r;return e}function Qn(t){let e=t.ownerDocument;if(!e)return!1;let r=Zn(t);return e.contains(r)}function mt(t){let e=t.ownerDocument;return e?e.contains(t)||Qn(t):!1}var gt;function ei(t){gt=t}function ti(){gt=void 0}var _=t=>gt?(...r)=>{try{return t(...r)}catch(n){if(gt&&gt(n)===!0)return;throw n}}:t;function Tr(t){return(...e)=>{try{return t(...e)}catch(r){try{r._external_=!0}catch{}throw r}}}var vt=class{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,r,n,i){let o=n||this.getIdToRemoteIdMap(e),a=i||this.getRemoteIdToIdMap(e),c=o.get(r);return c||(c=this.generateIdFn(),o.set(r,c),a.set(c,r)),c}getIds(e,r){let n=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return r.map(o=>this.getId(e,o,n,i))}getRemoteId(e,r,n){let i=n||this.getRemoteIdToIdMap(e);if(typeof r!="number")return r;let o=i.get(r);return o||-1}getRemoteIds(e,r){let n=this.getRemoteIdToIdMap(e);return r.map(i=>this.getRemoteId(e,i,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let r=this.iframeIdToRemoteIdMap.get(e);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(e,r)),r}getRemoteIdToIdMap(e){let r=this.iframeRemoteIdToIdMap.get(e);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(e,r)),r}};var Dt=class{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new vt(Ir),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new vt(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,r){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(n=this.loadListener)===null||n===void 0||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){let r=e;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!e.source)return;let i=this.crossOriginIframeMap.get(e.source);if(!i)return;let o=this.transformCrossOriginEvent(i,r.data.event);o&&this.wrappedEmit(o,r.data.isCheckout)}transformCrossOriginEvent(e,r){var n;switch(r.type){case L.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(r.data.node,e);let i=r.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(r.data.node,i),{timestamp:r.timestamp,type:L.IncrementalSnapshot,data:{source:N.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case L.Meta:case L.Load:case L.DomContentLoaded:return!1;case L.Plugin:return r;case L.Custom:return this.replaceIds(r.data.payload,e,["id","parentId","previousId","nextId"]),r;case L.IncrementalSnapshot:switch(r.data.source){case N.Mutation:return r.data.adds.forEach(i=>
3{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(i.node,o)}),r.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),r.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),r.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),r;case N.Drag:case N.TouchMove:case N.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),r;case N.ViewportResize:return!1;case N.MediaInteraction:case N.MouseInteraction:case N.Scroll:case N.CanvasMutation:case N.Input:return this.replaceIds(r.data,e,["id"]),r;case N.StyleSheetRule:case N.StyleDeclaration:return this.replaceIds(r.data,e,["id"]),this.replaceStyleIds(r.data,e,["styleId"]),r;case N.Font:return r;case N.Selection:return r.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),r;case N.AdoptedStyleSheet:return this.replaceIds(r.data,e,["id"]),this.replaceStyleIds(r.data,e,["styleIds"]),(n=r.data.styles)===null||n===void 0||n.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),r}}}replace(e,r,n,i){for(let o of i)!Array.isArray(r[o])&&typeof r[o]!="number"||(Array.isArray(r[o])?r[o]=e.getIds(n,r[o]):r[o]=e.getId(n,r[o]));return r}replaceIds(e,r,n){return this.replace(this.crossOriginIframeMirror,e,r,n)}replaceStyleIds(e,r,n){return this.replace(this.crossOriginIframeStyleMirror,e,r,n)}replaceIdOnNode(e,r){this.replaceIds(e,r,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(e,r){e.type!==$.Document&&!e.rootId&&(e.rootId=r),"childNodes"in e&&e.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}};function ri(t){return"__ln"in t}var Nr=class{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n<e;n++)r=r?.next||null;return r}addNode(e){let r={value:e,previous:null,next:null};if(e.__ln=r,e.previousSibling&&ri(e.previousSibling)){let n=e.previousSibling.__ln.next;r.next=n,r.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=r,n&&(n.previous=r)}else if(e.nextSibling&&ri(e.nextSibling)&&e.nextSibling.__ln.previous){let n=e.nextSibling.__ln.previous;r.previous=n,r.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=r,n&&(n.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(e){let r=e.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},ni=(t,e)=>`${t}@${e}`,At=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let e=[],r=new Set,n=new Nr,i=s=>{let u=s,l=Ae;for(;l===Ae;)u=u&&u.nextSibling,l=u&&this.mirror.getId(u);return l},o=s=>{if(!s.parentNode||!mt(s)||s.parentNode.tagName==="TEXTAREA")return;let u=Pe(s.parentNode)?this.mirror.getId(Lt(s)):this.mirror.getId(s.parentNode),l=i(s);if(u===-1||l===-1)return n.addNode(s);let d=Le(s,{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:p=>{pt(p,this.mirror)&&this.iframeManager.addIframe(p),ht(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),je(s)&&this.shadowDomManager.addShadowRoot(s.shadowRoot,this.doc)},onIframeLoad:(p,f)=>{this.iframeManager.attachIframe(p,f),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,f)=>{this.stylesheetManager.attachLinkElement(p,f)}});d&&(e.push({parentId:u,nextId:l,node:d}),r.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let s of this.movedSet)ii(this.removes,s,this.mirror)&&!this.movedSet.has(s.parentNode)||o(s);for(let s of this.addedSet)!oi(this.droppedSet,s)&&!ii(this.removes,s,this.mirror)||oi(this.movedSet,s)?o(s):this.droppedSet.add(s);let a=null;for(;n.length;){let s=null;if(a){let u=this.mirror.getId(a.value.parentNode),l=i(a.value);u!==-1&&l!==-1&&(s=a)}if(!s){let u=n.tail;for(;u;){let l=u;if(u=u.previous,l){let d=this.mirror.getId(l.value.parentNode);
3if(i(l.value)===-1)continue;if(d!==-1){s=l;break}else{let f=l.value;if(f.parentNode&&f.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let m=f.parentNode.host;if(this.mirror.getId(m)!==-1){s=l;break}}}}}}if(!s){for(;n.head;)n.removeNode(n.head.value);break}a=s.previous,n.removeNode(s.value),o(s.value)}let c={texts:this.texts.map(s=>{let u=s.node;return u.parentNode.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(u.parentNode),{id:this.mirror.getId(u),value:s.value}}).filter(s=>!r.has(s.id)).filter(s=>this.mirror.has(s.id)),attributes:this.attributes.map(s=>{let{attributes:u}=s;if(typeof u.style=="string"){let l=JSON.stringify(s.styleDiff),d=JSON.stringify(s._unchangedStyles);l.length<u.style.length&&(l+d).split("var(").length===u.style.split("var(").length&&(u.style=s.styleDiff)}return{id:this.mirror.getId(s.node),attributes:u}}).filter(s=>!r.has(s.id)).filter(s=>this.mirror.has(s.id)),removes:this.removes,adds:e};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(c))},this.genTextAreaValueMutation=e=>{let r=this.attributeMap.get(e);r||(r={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(e,r)),r.attributes.value=Array.from(e.childNodes,n=>n.textContent||"").join("")},this.processMutation=e=>{if(!dt(e.target,this.mirror))switch(e.type){case"characterData":{let r=e.target.textContent;!V(e.target,this.blockClass,this.blockSelector,!1)&&r!==e.oldValue&&this.texts.push({value:xr(e.target,this.maskTextClass,this.maskTextSelector)&&r?this.maskTextFn?this.maskTextFn(r,Nt(e.target)):r.replace(/[\S]/g,"*"):r,node:e.target});break}case"attributes":{let r=e.target,n=e.attributeName,i=e.target.getAttribute(n);if(n==="value"){let a=st(r);i=ot({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:a,value:i,maskInputFn:this.maskInputFn})}if(V(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let o=this.attributeMap.get(e.target);if(r.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)n="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),n==="type"&&r.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!Mr(r.tagName,n)&&(o.attributes[n]=Er(this.doc,be(r.tagName),be(n),i),n==="style")){let a;try{a=document.implementation.createHTMLDocument()}catch{a=this.doc}let c=a.createElement("span");e.oldValue&&c.setAttribute("style",e.oldValue);for(let s of Array.from(r.style)){let u=r.style.getPropertyValue(s),l=r.style.getPropertyPriority(s);u!==c.style.getPropertyValue(s)||l!==c.style.getPropertyPriority(s)?l===""?o.styleDiff[s]=u:o.styleDiff[s]=[u,l]:o._unchangedStyles[s]=[u,l]}for(let s of Array.from(c.style))r.style.getPropertyValue(s)===""&&(o.styleDiff[s]=!1)}break}case"childList":{if(V(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(r=>this.genAdds(r,e.target)),e.removedNodes.forEach(r=>{let n=this.mirror.getId(r),i=Pe(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);V(e.target,this.blockClass,this.blockSelector,!1)||dt(r,this.mirror)||!kr(r,this.mirror)||(this.addedSet.has(r)?(Or(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(e.target)&&n===-1||Ot(e.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[ni(n,i)]?Or(this.movedSet,r):this.removes.push({parentId:i,id:n,isShadow:Pe(e.target)&&De(e.target)?!0:void 0})),this.mapRemoves.push(r))});break}}},this.genAdds=(e,r)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(dt(e,this.mirror))return;this.movedSet.add(e);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[ni(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);V(e,this.blockClass,this.blockSelector,!1)||(e.childNodes.forEac
3h(n=>this.genAdds(n)),je(e)&&e.shadowRoot.childNodes.forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,e)}))}}}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=e[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 Or(t,e){t.delete(e),e.childNodes.forEach(r=>Or(t,r))}function ii(t,e,r){return t.length===0?!1:si(t,e,r)}function si(t,e,r){let{parentNode:n}=e;if(!n)return!1;let i=r.getId(n);return t.some(o=>o.id===i)?!0:si(t,n,r)}function oi(t,e){return t.size===0?!1:ai(t,e)}function ai(t,e){let{parentNode:r}=e;return r?t.has(r)?!0:ai(t,r):!1}var ke=[];function yt(t){try{if("composedPath"in t){let e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function Lr(t,e){var r,n;let i=new At;ke.push(i),i.init(t);let o=window.MutationObserver||window.__rrMutationObserver,a=(n=(r=window?.Zone)===null||r===void 0?void 0:r.__symbol__)===null||n===void 0?void 0:n.call(r,"MutationObserver");a&&window[a]&&(o=window[a]);let c=new o(_(i.processMutations.bind(i)));return c.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),c}function is({mousemoveCb:t,sampling:e,doc:r,mirror:n}){if(e.mousemove===!1)return()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,a=[],c,s=Fe(_(d=>{let p=Date.now()-c;t(a.map(f=>(f.timeOffset-=p,f)),d),a=[],c=null}),o),u=_(Fe(_(d=>{let p=yt(d),{clientX:f,clientY:m}=ft(d)?d.changedTouches[0]:d;c||(c=We()),a.push({x:f,y:m,id:n.getId(p),timeOffset:We()-c}),s(typeof DragEvent<"u"&&d instanceof DragEvent?N.Drag:d instanceof MouseEvent?N.MouseMove:N.TouchMove)}),i,{trailing:!1})),l=[Q("mousemove",u,r),Q("touchmove",u,r),Q("drag",u,r)];return _(()=>{l.forEach(d=>d())})}function os({mouseInteractionCb:t,doc:e,mirror:r,blockClass:n,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[],s=null,u=l=>d=>{let p=yt(d);if(V(p,n,i,!0))return;let f=null,m=l;if("pointerType"in d){switch(d.pointerType){case"mouse":f=ye.Mouse;break;case"touch":f=ye.Touch;break;case"pen":f=ye.Pen;break}f===ye.Touch?oe[l]===oe.MouseDown?m="TouchStart":oe[l]===oe.MouseUp&&(m="TouchEnd"):ye.Pen}else ft(d)&&(f=ye.Touch);f!==null?(s=f,(m.startsWith("Touch")&&f===ye.Touch||m.startsWith("Mouse")&&f===ye.Mouse)&&(f=null)):oe[l]===oe.Click&&(f=s,s=null);let h=ft(d)?d.changedTouches[0]:d;if(!h)return;let v=r.getId(p),{clientX:S,clientY:g}=h;_(t)(Object.assign({type:oe[m],id:v,x:S,y:g},f!==null&&{pointerType:f}))};return Object.keys(oe).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&a[l]!==!1).forEach(l=>{let d=be(l),p=u(l);if(window.PointerEvent)switch(oe[l]){case oe.MouseDown:case oe.MouseUp:d=d.replace("mouse","pointer");break;case oe.TouchStart:case oe.TouchEnd:return}c.push(Q(d,p,e))}),_(()=>{c.forEach(l=>l())})}function Dr({scrollCb:t,doc:e,mirror:r,blockClass:n,blockSelector:i,sampling:o}){let a=_(Fe(_(c=>{let s=yt(c);if(!s||V(s,n,i,!0))return;let u=r.getId(s);if(s===e&&e.defaultView){let l=ct(e.defaultView);t({id:u,x:l.left,y:l.top})}else t({id:u,x:s.scrollLeft,y:s.scrollTop})}),o.scroll||100));return Q("scroll",a,e)}function ss({viewportResizeCb:t},{win:e}){let r=-1,n=-1,i=_(Fe(_(()=>{let o=lt(),a=ut();(r!==o||n!==a)&&(t({width:Number(a),height:Number(o)}),r=o,n=a)}),200));return Q("resize",i,e)}function ci(t,e){let r=Object.assign({},t);return e||delete r.userTriggered,r}var as=["INPUT","TEXTAREA","SELECT"],li=new WeakMap;function cs({inputCb:t,doc:e,mirror:r,blockClass:n,blockSelector:i,ignoreClass:o,ignoreSelector:a,maskInputOptions:c,maskInputFn:s,sampling:u,userTriggeredOnInput:l}){function d(g){let y=yt(g),w=g.isTrusted,I=y&&y.tagName;if(y&&I==="OPTION"&&(y=y.parentElement),!y||!I||as.indexOf(I)<0||V(y,n,i,!0)||y.classList.contains(o)||a&&y.matches(a))return;let E=y.value,T=!1,b=st(y)||"";b==="radio"||b==="checkbox"?T=y.checked:(c[I.toLowerCase()]||c[b])&&(E=ot({element:y,maskInputOptions:c,tagName:I,type:b,value:E,maskInputFn:s})),p(y,_(ci)({text:E,isChecked:T,userTriggered:w},l));let D=y.name;b==="radio"&&D&&T&&e.querySelectorAll(`input[type="radio"][name="${D}"]`).forEach(M=>{M!==y&&p(M,_(ci)({text:M.value,isChecked:!T,userTriggered:!1},l))})}
vendor: 5,966 bytes, line 3
3function p(g,y){let w=li.get(g);if(!w||w.text!==y.text||w.isChecked!==y.isChecked){li.set(g,y);let I=r.getId(g);_(t)(Object.assign(Object.assign({},y),{id:I}))}}let m=(u.input==="last"?["change"]:["input","change"]).map(g=>Q(g,_(d),e)),h=e.defaultView;if(!h)return()=>{m.forEach(g=>g())};let v=h.Object.getOwnPropertyDescriptor(h.HTMLInputElement.prototype,"value"),S=[[h.HTMLInputElement.prototype,"value"],[h.HTMLInputElement.prototype,"checked"],[h.HTMLSelectElement.prototype,"value"],[h.HTMLTextAreaElement.prototype,"value"],[h.HTMLSelectElement.prototype,"selectedIndex"],[h.HTMLOptionElement.prototype,"selected"]];return v&&v.set&&m.push(...S.map(g=>xe(g[0],g[1],{set(){_(d)({target:this,isTrusted:!1})}},!1,h))),_(()=>{m.forEach(g=>g())})}function Wt(t){let e=[];function r(n,i){if(Pt("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||Pt("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||Pt("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||Pt("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){let a=Array.from(n.parentRule.cssRules).indexOf(n);i.unshift(a)}else if(n.parentStyleSheet){let a=Array.from(n.parentStyleSheet.cssRules).indexOf(n);i.unshift(a)}return i}return r(t,e)}function Re(t,e,r){let n,i;return t?(t.ownerNode?n=e.getId(t.ownerNode):i=r.getId(t),{styleId:i,id:n}):{}}function ls({styleSheetRuleCb:t,mirror:e,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};let i=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:_((l,d,p)=>{let[f,m]=p,{id:h,styleId:v}=Re(d,e,r.styleMirror);return(h&&h!==-1||v&&v!==-1)&&t({id:h,styleId:v,adds:[{rule:f,index:m}]}),Tr(()=>l.apply(d,p))()})});let o=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:_((l,d,p)=>{let[f]=p,{id:m,styleId:h}=Re(d,e,r.styleMirror);return(m&&m!==-1||h&&h!==-1)&&t({id:m,styleId:h,removes:[{index:f}]}),Tr(()=>l.apply(d,p))()})});let a;n.CSSStyleSheet.prototype.replace&&(a=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:_((l,d,p)=>{let[f]=p,{id:m,styleId:h}=Re(d,e,r.styleMirror);return(m&&m!==-1||h&&h!==-1)&&t({id:m,styleId:h,replace:f}),l.apply(d,p)})}));let c;n.CSSStyleSheet.prototype.replaceSync&&(c=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:_((l,d,p)=>{let[f]=p,{id:m,styleId:h}=Re(d,e,r.styleMirror);return(m&&m!==-1||h&&h!==-1)&&t({id:m,styleId:h,replaceSync:f}),l.apply(d,p)})}));let s={};Ft("CSSGroupingRule")?s.CSSGroupingRule=n.CSSGroupingRule:(Ft("CSSMediaRule")&&(s.CSSMediaRule=n.CSSMediaRule),Ft("CSSConditionRule")&&(s.CSSConditionRule=n.CSSConditionRule),Ft("CSSSupportsRule")&&(s.CSSSupportsRule=n.CSSSupportsRule));let u={};return Object.entries(s).forEach(([l,d])=>{u[l]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(u[l].insertRule,{apply:_((p,f,m)=>{let[h,v]=m,{id:S,styleId:g}=Re(f.parentStyleSheet,e,r.styleMirror);return(S&&S!==-1||g&&g!==-1)&&t({id:S,styleId:g,adds:[{rule:h,index:[...Wt(f),v||0]}]}),p.apply(f,m)})}),d.prototype.deleteRule=new Proxy(u[l].deleteRule,{apply:_((p,f,m)=>{let[h]=m,{id:v,styleId:S}=Re(f.parentStyleSheet,e,r.styleMirror);return(v&&v!==-1||S&&S!==-1)&&t({id:v,styleId:S,removes:[{index:[...Wt(f),h]}]}),p.apply(f,m)})})}),_(()=>{n.CSSStyleSheet.prototype.insertRule=i,n.CSSStyleSheet.prototype.deleteRule=o,a&&(n.CSSStyleSheet.prototype.replace=a),c&&(n.CSSStyleSheet.prototype.replaceSync=c),Object.entries(s).forEach(([l,d])=>{d.prototype.insertRule=u[l].insertRule,d.prototype.deleteRule=u[l].deleteRule})})}function Ar({mirror:t,stylesheetManager:e},r){var n,i,o;let a=null;r.nodeName==="#document"?a=t.getId(r):a=t.getId(r.host);let c=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,s=c?.prototype?Object.getOwnPropertyDescriptor(c?.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!c||!s?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){var u;return(u=s.get)===null||u===void 0?void 0:u.call(this)},set(u){var l;let d=(l=s.set)===null||l===void 0?void 0:l.call(this,u);if(a!==null&&a!==-1)try{e.adoptStyleSheets(u,a)}catch{}return d}}),_(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function us({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:r,stylesheetManager:n},{win:i}){let o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:_((c,s,u)=>{var l;let[d,p,f]=u;if(r.has(d))return o.apply(s,[d,p,f]);let{id:m,styleId:h}=Re((l=s.parentRule)===null||l===void 0?void 0:l.parentStyleSheet,e,n.styleMirror);return(m&&m!==-1||h&&h!==-1)&&t({id:m,styleId:h,set:{property:d,value:p,priority:f},index:Wt(s.parentRule)}),c.apply(s,u)})});let a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:_((c,s,u)=>{var l;let[d]=u;if(r.has(d))return a.apply(s,[d]);let{id:p,styleId:f}=Re((l=s.parentRule)===null||l===void 0?void 0:l.parentStyleSheet,e,n.styleMirror);return(p&&p!==-1||f&&f!==-1)&&t({id:p,styleId:f,remove:{property:d},index:Wt(s.parentRule)}),c.apply(s,u)})}),_(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=a})}function ds({mediaInteractionCb:t,blockClass:e,blockSelector:r,mirror:n,sampling:i,doc:o}){let a=_(s=>Fe(_(u=>{let l=yt(u);if(!l||V(l,e,r,!0))return;let{currentTime:d,volume:p,muted:f,playbackRate:m}=l;t({type:s,id:n.getId(l),currentTime:d,volume:p,muted:f,playbackRate:m})}),i.media||500)),c=[Q("play",a(0),o),Q("pause",a(1),o),Q("seeked",a(2),o),Q("volumechange",a(3),o),Q("ratechange",a(4),o)];return _(()=>
3{c.forEach(s=>s())})}function fs({fontCb:t,doc:e}){let r=e.defaultView;if(!r)return()=>{};let n=[],i=new WeakMap,o=r.FontFace;r.FontFace=function(s,u,l){let d=new o(s,u,l);return i.set(d,{family:s,buffer:typeof u!="string",descriptors:l,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),d};let a=he(e.fonts,"add",function(c){return function(s){return setTimeout(_(()=>{let u=i.get(s);u&&(t(u),i.delete(s))}),0),c.apply(this,[s])}});return n.push(()=>{r.FontFace=o}),n.push(a),_(()=>{n.forEach(c=>c())})}function ps(t){let{doc:e,mirror:r,blockClass:n,blockSelector:i,selectionCb:o}=t,a=!0,c=_(()=>{let s=e.getSelection();if(!s||a&&s?.isCollapsed)return;a=s.isCollapsed||!1;let u=[],l=s.rangeCount||0;for(let d=0;d<l;d++){let p=s.getRangeAt(d),{startContainer:f,startOffset:m,endContainer:h,endOffset:v}=p;V(f,n,i,!0)||V(h,n,i,!0)||u.push({start:r.getId(f),startOffset:m,end:r.getId(h),endOffset:v})}o({ranges:u})});return c(),Q("selectionchange",c)}function hs(t,e){let{mutationCb:r,mousemoveCb:n,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:a,inputCb:c,mediaInteractionCb:s,styleSheetRuleCb:u,styleDeclarationCb:l,canvasMutationCb:d,fontCb:p,selectionCb:f}=t;t.mutationCb=(...m)=>{e.mutation&&e.mutation(...m),r(...m)},t.mousemoveCb=(...m)=>{e.mousemove&&e.mousemove(...m),n(...m)},t.mouseInteractionCb=(...m)=>{e.mouseInteraction&&e.mouseInteraction(...m),i(...m)},t.scrollCb=(...m)=>{e.scroll&&e.scroll(...m),o(...m)},t.viewportResizeCb=(...m)=>{e.viewportResize&&e.viewportResize(...m),a(...m)},t.inputCb=(...m)=>{e.input&&e.input(...m),c(...m)},t.mediaInteractionCb=(...m)=>{e.mediaInteaction&&e.mediaInteaction(...m),s(...m)},t.styleSheetRuleCb=(...m)=>{e.styleSheetRule&&e.styleSheetRule(...m),u(...m)},t.styleDeclarationCb=(...m)=>{e.styleDeclaration&&e.styleDeclaration(...m),l(...m)},t.canvasMutationCb=(...m)=>{e.canvasMutation&&e.canvasMutation(...m),d(...m)},t.fontCb=(...m)=>{e.font&&e.font(...m),p(...m)},t.selectionCb=(...m)=>{e.selection&&e.selection(...m),f(...m)}}function ui(t,e={}){let r=t.doc.defaultView;if(!r)return()=>{};hs(t,e);let n;t.recordDOM&&(n=Lr(t,t.doc));let i=is(t),o=os(t),a=Dr(t),c=ss(t,{win:r}),s=cs(t),u=ds(t),l=()=>{},d=()=>{},p=()=>{},f=()=>{};t.recordDOM&&(l=ls(t,{win:r}),d=Ar(t,t.doc),p=us(t,{win:r}),t.collectFonts&&(f=fs(t)));let m=ps(t),h=[];for(let v of t.plugins)h.push(v.observer(v.callback,r,v.options));return _(()=>{ke.forEach(v=>v.reset()),n?.disconnect(),i(),o(),a(),c(),s(),u(),l(),d(),p(),f(),m(),h.forEach(v=>v())})}function Pt(t){return typeof window[t]<"u"}function Ft(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}function di(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function fi(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function c(l){try{u(n.next(l))}catch(d){a(d)}}function s(l){try{u(n.throw(l))}catch(d){a(d)}}function u(l){l.done?o(l.value):i(l.value).then(c,s)}u((n=n.apply(t,e||[])).next())})}function pi(t,e){var r=e===void 0?null:e,n=t.toString(),i=n.split(`
4`);i.pop(),i.shift();for(var o=i[0].search(/\S/),a=/(['"])__worker_loader_strict__(['"])/g,c=0,s=i.length;c<s;++c)i[c]=i[c].substring(o).replace(a,"$1use strict$2")+`
5`;return r&&i.push("//# sourceMappingURL="+r+`
6`),i}function ms(t,e){var r=pi(t,e),n=new Blob(r,{type:"application/javascript"});return URL.createObjectURL(n)}function hi(t,e){var r;return function(i){return r=r||ms(t,e),new Worker(r,i)}}var mi=hi(function(){(function(){"__worker_loader_strict__";function t(u,l,d,p){function f(m){return m instanceof d?m:new d(function(h){h(m)})}return new(d||(d=Promise))(function(m,h){function v(y){try{g(p.next(y))}catch(w){h(w)}}function S(y){try{g(p.throw(y))}catch(w){h(w)}}function g(y){y.done?m(y.value):f(y.value).then(v,S)}g((p=p.apply(u,l||[])).next())})}for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
6+/",r=typeof Uint8Array>"u"?[]:new Uint8Array(256),n=0;n<e.length;n++)r[e.charCodeAt(n)]=n;var i=function(u){var l=new Uint8Array(u),d,p=l.length,f="";for(d=0;d<p;d+=3)f+=e[l[d]>>2],f+=e[(l[d]&3)<<4|l[d+1]>>4],f+=e[(l[d+1]&15)<<2|l[d+2]>>6],f+=e[l[d+2]&63];return p%3===2?f=f.substring(0,f.length-1)+"=":p%3===1&&(f=f.substring(0,f.length-2)+"=="),f};let o=new Map,a=new Map;function c(u,l,d){return t(this,void 0,void 0,function*(){let p=`${u}-${l}`;if("OffscreenCanvas"in globalThis){if(a.has(p))return a.get(p);let f=new OffscreenCanvas(u,l);f.getContext("2d");let h=yield(yield f.convertToBlob(d)).arrayBuffer(),v=i(h);return a.set(p,v),v}else return""})}let s=self;s.onmessage=function(u){return t(this,void 0,void 0,function*(){if("OffscreenCanvas"in globalThis){let{id:l,bitmap:d,width:p,height:f,dataURLOptions:m}=u.data,h=c(p,f,m),v=new OffscreenCanvas(p,f);v.getContext("2d").drawImage(d,0,0),d.close();let g=yield v.convertToBlob(m),y=g.type,w=yield g.arrayBuffer(),I=i(w);if(!o.has(l)&&(yield h)===I)return o.set(l,I),s.postMessage({id:l});if(o.get(l)===I)return s.postMessage({id:l});s.postMessage({id:l,type:y,base64:I,width:p,height:f}),o.set(l,I)}else return s.postMessage({id:u.data.id})})}})()},null);var $e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gs=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(St=0;St<$e.length;St++)gs[$e.charCodeAt(St)]=St;var St,gi=function(t){var e=new Uint8Array(t),r,n=e.length,i="";for(r=0;r<n;r+=3)i+=$e[e[r]>>2],i+=$e[(e[r]&3)<<4|e[r+1]>>4],i+=$e[(e[r+1]&15)<<2|e[r+2]>>6],i+=$e[e[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};var vi=new Map;function vs(t,e){let r=vi.get(t);return r||(r=new Map,vi.set(t,r)),r.has(e)||r.set(e,[]),r.get(e)}var Pr=(t,e,r)=>{if(!t||!(yi(t,e)||typeof t=="object"))return;let n=t.constructor.name,i=vs(r,n),o=i.indexOf(t);return o===-1&&(o=i.length,i.push(t)),o};function Bt(t,e,r){if(t instanceof Array)return t.map(n=>Bt(n,e,r));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){let n=t.constructor.name,i=gi(t);return{rr_type:n,base64:i}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[Bt(t.buffer,e,r),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){let n=t.constructor.name,{src:i}=t;return{rr_type:n,src:i}}else if(t instanceof HTMLCanvasElement){let n="HTMLImageElement",i=t.toDataURL();return{rr_type:n,src:i}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[Bt(t.data,e,r),t.width,t.height]};if(yi(t,e)||typeof t=="object"){let n=t.constructor.name,i=Pr(t,e,r);return{rr_type:n,index:i}}}}return t}var Ut=(t,e,r)=>[...t].map(n=>Bt(n,e,r)),yi=(t,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>t instanceof e[i]);function Si(t,e,r,n){let i=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let a of o)try{if(typeof e.CanvasRenderingContext2D.prototype[a]!="function")continue;let c=he(e.CanvasRenderingContext2D.prototype,a,function(s){return function(...u){return V(this.canvas,r,n,!0)||setTimeout(()=>{let l=Ut([...u],e,this);t(this.canvas,{type:we["2D"],property:a,args:l})},0),s.apply(this,u)}});i.push(c)}catch{let s=xe(e.CanvasRenderingContext2D.prototype,a,{set(u){t(this.canvas,{type:we["2D"],property:a,args:[u],setter:!0})}});i.push(s)}return()=>{i.forEach(a=>a())}}function ys(t){return t==="experimental-webgl"?"webgl":t}function Fr(t,e,r,n){let i=[];try{let o=he(t.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...s){if(!V(this,e,r,!0)){let u=ys(c);if("__context"in this||(this.__context=u),n&&["webgl","webgl2"].includes(u))if(s[0]&&typeof s[0]=="object"){let l=s[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else s.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...s])}});i.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>
6{i.forEach(o=>o())}}function bi(t,e,r,n,i,o,a){let c=[],s=Object.getOwnPropertyNames(t);for(let u of s)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))try{if(typeof t[u]!="function")continue;let l=he(t,u,function(d){return function(...p){let f=d.apply(this,p);if(Pr(f,a,this),"tagName"in this.canvas&&!V(this.canvas,n,i,!0)){let m=Ut([...p],a,this),h={type:e,property:u,args:m};r(this.canvas,h)}return f}});c.push(l)}catch{let d=xe(t,u,{set(p){r(this.canvas,{type:e,property:u,args:[p],setter:!0})}});c.push(d)}return c}function wi(t,e,r,n,i){let o=[];return o.push(...bi(e.WebGLRenderingContext.prototype,we.WebGL,t,r,n,i,e)),typeof e.WebGL2RenderingContext<"u"&&o.push(...bi(e.WebGL2RenderingContext.prototype,we.WebGL2,t,r,n,i,e)),()=>{o.forEach(a=>a())}}var Gt=class{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(s,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(s)||this.pendingCanvasMutations.set(s,[]),this.pendingCanvasMutations.get(s).push(u)};let{sampling:r="all",win:n,blockClass:i,blockSelector:o,recordCanvas:a,dataURLOptions:c}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&r==="all"&&this.initCanvasMutationObserver(n,i,o),a&&typeof r=="number"&&this.initCanvasFPSObserver(r,n,i,o,{dataURLOptions:c})}initCanvasFPSObserver(e,r,n,i,o){let a=Fr(r,n,i,!0),c=new Map,s=new mi;s.onmessage=m=>{let{id:h}=m.data;if(c.set(h,!1),!("base64"in m.data))return;let{base64:v,type:S,width:g,height:y}=m.data;this.mutationCb({id:h,type:we["2D"],commands:[{property:"clearRect",args:[0,0,g,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:v}],type:S}]},0,0]}]})};let u=1e3/e,l=0,d,p=()=>{let m=[];return r.document.querySelectorAll("canvas").forEach(h=>{V(h,n,i,!0)||m.push(h)}),m},f=m=>{if(l&&m-l<u){d=requestAnimationFrame(f);return}l=m,p().forEach(h=>fi(this,void 0,void 0,function*(){var v;let S=this.mirror.getId(h);if(c.get(S))return;if(c.set(S,!0),["webgl","webgl2"].includes(h.__context)){let y=h.getContext(h.__context);((v=y?.getContextAttributes())===null||v===void 0?void 0:v.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}let g=yield createImageBitmap(h);s.postMessage({id:S,bitmap:g,width:h.width,height:h.height,dataURLOptions:o.dataURLOptions},[g])})),d=requestAnimationFrame(f)};d=requestAnimationFrame(f),this.resetObservers=()=>{a(),cancelAnimationFrame(d)}}initCanvasMutationObserver(e,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=Fr(e,r,n,!1),o=Si(this.processMutation.bind(this),e,r,n),a=wi(this.processMutation.bind(this),e,r,n,this.mirror);this.resetObservers=()=>{i(),o(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=r=>{this.rafStamps.latestId=r,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,r)=>{let n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,r){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||r===-1)return;let i=n.map(a=>di(a,["type"])),{type:o}=n[0];this.mutationCb({id:r,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}};var zt=class{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){requestAnimationFrame(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(e,r){let n=this.nodeMap.get(e);return n&&Array.from(n).some(i=>i!==r)}add(e,r){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(r))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}};var Ht=class{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,r){if(!De(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let n=Lr(Object.assign(Object.assign({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(Dr(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Ar({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,r){let n=this;this.restoreHandlers.push(he(e.prototype,"attachShadow",function(i){return function(o){let a=i.call(this,o);return this.shadowRoot&&mt(this)&&n.addShadowRoot(this.shadowRoot,r),a}}))}
6reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}};var qt=class{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new at,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,r){if(e.length===0)return;let n={id:r,styleIds:[]},i=[];for(let o of e){let a;this.styleMirror.has(o)?a=this.styleMirror.getId(o):(a=this.styleMirror.add(o),i.push({styleId:a,rules:Array.from(o.rules||CSSRule,(c,s)=>({rule:wr(c),index:s}))})),n.styleIds.push(a)}i.length>0&&(n.styles=i),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}};function J(t){return Object.assign(Object.assign({},t),{timestamp:We()})}var j,Vt,Wr,jt=!1,me=$n();function Se(t={}){let{emit:e,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:i="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskTextClass:s="rr-mask",maskTextSelector:u=null,inlineStylesheet:l=!0,maskAllInputs:d,maskInputOptions:p,slimDOMOptions:f,maskInputFn:m,maskTextFn:h,hooks:v,packFn:S,sampling:g={},dataURLOptions:y={},mousemoveWait:w,recordDOM:I=!0,recordCanvas:E=!1,recordCrossOriginIframes:T=!1,recordAfter:b=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:D=!1,collectFonts:M=!1,inlineImages:R=!1,plugins:A,keepIframeSrcFn:F=()=>!1,ignoreCSSAttributes:W=new Set([]),errorHandler:G}=t;ei(G);let ee=T?window.parent===window:!0,B=!1;if(!ee)try{window.parent.document&&(B=!1)}catch{B=!0}if(ee&&!e)throw new Error("emit function is required");w!==void 0&&g.mousemove===void 0&&(g.mousemove=w),me.reset();let K=d===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p!==void 0?p:{password:!0},ne=f===!0||f==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:f==="all",headMetaDescKeywords:f==="all"}:f||{};_r();let fe,X=0,ae=C=>{for(let ce of A||[])ce.eventProcessor&&(C=ce.eventProcessor(C));return S&&!B&&(C=S(C)),C};j=(C,ce)=>{var z;if(!((z=ke[0])===null||z===void 0)&&z.isFrozen()&&C.type!==L.FullSnapshot&&!(C.type===L.IncrementalSnapshot&&C.data.source===N.Mutation)&&ke.forEach(Y=>Y.unfreeze()),ee)e?.(ae(C),ce);else if(B){let Y={type:"rrweb",event:ae(C),origin:window.location.origin,isCheckout:ce};window.parent.postMessage(Y,"*")}if(C.type===L.FullSnapshot)fe=C,X=0;else if(C.type===L.IncrementalSnapshot){if(C.data.source===N.Mutation&&C.data.isAttachIframe)return;X++;let Y=n&&X>=n,Te=r&&C.timestamp-fe.timestamp>r;(Y||Te)&&Vt(!0)}};let te=C=>{j(J({type:L.IncrementalSnapshot,data:Object.assign({source:N.Mutation},C)}))},Z=C=>j(J({type:L.IncrementalSnapshot,data:Object.assign({source:N.Scroll},C)})),q=C=>j(J({type:L.IncrementalSnapshot,data:Object.assign({source:N.CanvasMutation},C)})),Ee=C=>j(J({type:L.IncrementalSnapshot,data:Object.assign({source:N.AdoptedStyleSheet},C)})),ie=new qt({mutationCb:te,adoptedStyleSheetCb:Ee}),re=new Dt({mirror:me,mutationCb:te,stylesheetManager:ie,recordCrossOriginIframes:T,wrappedEmit:j});for(let C of A||[])C.getMirror&&C.getMirror({nodeMirror:me,crossOriginIframeMirror:re.crossOriginIframeMirror,crossOriginIframeStyleMirror:re.crossOriginIframeStyleMirror});let Je=new zt;Wr=new Gt({recordCanvas:E,mutationCb:q,win:window,blockClass:i,blockSelector:o,mirror:me,sampling:g.canvas,dataURLOptions:y});let _e=new Ht({mutationCb:te,scrollCb:Z,bypassOptions:{blockClass:i,blockSelector:o,maskTextClass:s,maskTextSelector:u,inlineStylesheet:l,maskInputOptions:K,dataURLOptions:y,maskTextFn:h,maskInputFn:m,recordCanvas:E,inlineImages:R,sampling:g,slimDOMOptions:ne,iframeManager:re,stylesheetManager:ie,canvasManager:Wr,keepIframeSrcFn:F,processedNodeManager:Je},mirror:me});Vt=(C=!1)=>
vendor: 8,304 bytes, line 6
6{if(!I)return;j(J({type:L.Meta,data:{href:window.location.href,width:ut(),height:lt()}}),C),ie.reset(),_e.init(),ke.forEach(z=>z.lock());let ce=Kn(document,{mirror:me,blockClass:i,blockSelector:o,maskTextClass:s,maskTextSelector:u,inlineStylesheet:l,maskAllInputs:K,maskTextFn:h,maskInputFn:m,slimDOM:ne,dataURLOptions:y,recordCanvas:E,inlineImages:R,onSerialize:z=>{pt(z,me)&&re.addIframe(z),ht(z,me)&&ie.trackLinkElement(z),je(z)&&_e.addShadowRoot(z.shadowRoot,document)},onIframeLoad:(z,Y)=>{re.attachIframe(z,Y),_e.observeAttachShadow(z)},onStylesheetLoad:(z,Y)=>{ie.attachLinkElement(z,Y)},keepIframeSrcFn:F});if(!ce)return console.warn("Failed to snapshot the document");j(J({type:L.FullSnapshot,data:{node:ce,initialOffset:ct(window)}}),C),ke.forEach(z=>z.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ie.adoptStyleSheets(document.adoptedStyleSheets,me.getId(document))};try{let C=[],ce=Y=>{var Te;return _(ui)({mutationCb:te,mousemoveCb:(H,ar)=>j(J({type:L.IncrementalSnapshot,data:{source:ar,positions:H}})),mouseInteractionCb:H=>j(J({type:L.IncrementalSnapshot,data:Object.assign({source:N.MouseInteraction},H)})),scrollCb:Z,viewportResizeCb:H=>j(J({type:L.IncrementalSnapshot,data:Object.assign({source:N.ViewportResize},H)})),inputCb:H=>j(J({type:L.IncrementalSnapshot,data:Object.assign({source:N.Input},H)})),mediaInteractionCb:H=>j(J({type:L.IncrementalSnapshot,data:Object.assign({source:N.MediaInteraction},H)})),styleSheetRuleCb:H=>j(J({type:L.IncrementalSnapshot,data:Object.assign({source:N.StyleSheetRule},H)})),styleDeclarationCb:H=>j(J({type:L.IncrementalSnapshot,data:Object.assign({source:N.StyleDeclaration},H)})),canvasMutationCb:q,fontCb:H=>j(J({type:L.IncrementalSnapshot,data:Object.assign({source:N.Font},H)})),selectionCb:H=>{j(J({type:L.IncrementalSnapshot,data:Object.assign({source:N.Selection},H)}))},blockClass:i,ignoreClass:a,ignoreSelector:c,maskTextClass:s,maskTextSelector:u,maskInputOptions:K,inlineStylesheet:l,sampling:g,recordDOM:I,recordCanvas:E,inlineImages:R,userTriggeredOnInput:D,collectFonts:M,doc:Y,maskInputFn:m,maskTextFn:h,keepIframeSrcFn:F,blockSelector:o,slimDOMOptions:ne,dataURLOptions:y,mirror:me,iframeManager:re,stylesheetManager:ie,shadowDomManager:_e,processedNodeManager:Je,canvasManager:Wr,ignoreCSSAttributes:W,plugins:((Te=A?.filter(H=>H.observer))===null||Te===void 0?void 0:Te.map(H=>({observer:H.observer,options:H.options,callback:ar=>j(J({type:L.Plugin,data:{plugin:H.name,payload:ar}}))})))||[]},v)};re.addLoadListener(Y=>{try{C.push(ce(Y.contentDocument))}catch(Te){console.warn(Te)}});let z=()=>{Vt(),C.push(ce(document)),jt=!0};return document.readyState==="interactive"||document.readyState==="complete"?z():(C.push(Q("DOMContentLoaded",()=>{j(J({type:L.DomContentLoaded,data:{}})),b==="DOMContentLoaded"&&z()})),C.push(Q("load",()=>{j(J({type:L.Load,data:{}})),b==="load"&&z()},window))),()=>{C.forEach(Y=>Y()),Je.destroy(),jt=!1,ti()}}catch(C){console.warn(C)}}Se.addCustomEvent=(t,e)=>{if(!jt)throw new Error("please add custom event after start recording");j(J({type:L.Custom,data:{tag:t,payload:e}}))};Se.freezePage=()=>{ke.forEach(t=>t.freeze())};Se.takeFullSnapshot=t=>{if(!jt)throw new Error("please take full snapshot after start recording");Vt(t)};Se.mirror=me;var ue=Uint8Array,se=Uint16Array,Ct=Uint32Array,Hr=new ue([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),qr=new ue([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ii=new ue([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),xi=function(t,e){for(var r=new se(31),n=0;n<31;++n)r[n]=e+=1<<t[n-1];for(var i=new Ct(r[30]),n=1;n<30;++n)for(var o=r[n];o<r[n+1];++o)i[o]=o-r[n]<<5|n;return[r,i]},Ri=xi(Hr,2),Ss=Ri[0],Ur=Ri[1];Ss[28]=258,Ur[258]=28;var ki=xi(qr,0),Ac=ki[0],Ci=ki[1],Gr=new se(32768);for(P=0;P<32768;++P)Ie=(P&43690)>>>1|(P&21845)<<1,Ie=(Ie&52428)>>>2|(Ie&13107)<<2,Ie=(Ie&61680)>>>4|(Ie&3855)<<4,Gr[P]=((Ie&65280)>>>8|(Ie&255)<<8)>>>1;var Ie,P,It=function(t,e,r){for(var n=t.length,i=0,o=new se(e);i<n;++i)++o[t[i]-1];var a=new se(e);for(i=0;i<e;++i)a[i]=a[i-1]+o[i-1]<<1;var c;if(r){c=new se(1<<e);var s=15-e;for(i=0;i<n;++i)if(t[i])for(var u=i<<4|t[i],l=e-t[i],d=a[t[i]-1]++<<l,p=d|(1<<l)-1;d<=p;++d)c[Gr[d]>>>s]=u}else for(c=new se(n),i=0;i<n;++i)c[i]=Gr[a[t[i]-1]++]>>>15-t[i];return c},Ue=new ue(288);for(P=0;P<144;++P)Ue[P]=8;var P;for(P=144;P<256;++P)Ue[P]=9;var P;for(P=256;P<280;++P)Ue[P]=7;var P;for(P=280;P<288;++P)Ue[P]=8;var P,Kt=new ue(32);for(P=0;P<32;++P)Kt[P]=5;var P,bs=It(Ue,9,0);var ws=It(Kt,5,0);var _i=function(t){return(t/8>>0)+(t&7&&1)},Ti=function(t,e,r){(e==null||e<0)&&(e=0),(r==null||r>t.length)&&(r=t.length);var n=new(t instanceof se?se:t instanceof Ct?Ct:ue)(r-e);return n.set(t.subarray(e,r)),n};var Ce=function(t,e,r){r<<=e&7;var n=e/8>>0;t[n]|=r,t[n+1]|=r>>>8},bt=function(t,e,r){r<<=e&7;var n=e/8>>0;t[n]|=r,t[n+1]|=r>>>8,t[n+2]|=r>>>16},Br=function(t,e){for(var r=[],n=0;n<t.length;++n)t[n]&&r.push({s:n,f:t[n]});var i=r.length,o=r.slice();if(!i)return[new ue(0),0];if(i==1){var a=new ue(r[0].s+1);return a[r[0].s]=1,[a,1]}r.sort(function(I,E){return I.f-E.f}),r.push({s:-1,f:25001});var c=r[0],s=r[1],u=0,l=1,d=2;for(r[0]={s:-1,f:c.f+s.f,l:c,r:s};l!=i-1;)c=r[r[u].f<r[d].f?u++:d++],s=r[u!=l&&r[u].f<r[d].f?u++:d++],r[l++]={s:-1,f:c.f+s.f,l:c,r:s};for(var p=o[0].s,n=1;n<i;++n)o[n].s>p&&(p=o[n].s);var f=new se(p+1),m=zr(r[l-1],f,0);if(m>e){var n=0,h=0,v=m-e,S=1<<v;for(o.sort(function(E,T){return f[T.s]-f[E.s]||E.f-T.f});n<i;++n){var g=o[n].s;if(f[g]>e)h+=S-(1<<m-f[g]),f[g]=e;else break}for(h>>>=v;h>0;){var y=o[n].s;f[y]<e?h-=1<<e-f[y]++-1:++n}for(;n>=0&&h;--n){var w=o[n].s;f[w]==e&&(--f[w],++h)}m=e}return[new ue(f),m]},zr=function(t,e,r){return t.s==-1?Math.max(zr(t.l,e,r+1),zr(t.r,e,r+1)):e[t.s]=r},Ei=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new se(++e),n=0,i=t[0],o=1,a=function(s){r[n++]=s},c=1;c<=e;++c)if(t[c]==i&&c!=e)++o;else{if(!i&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(i),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(i);o=1,i=t[c]}return[r.subarray(0,n),e]},wt=function(t,e){for(var r=0,n=0;n<e.length;++n)r+=t[n]*e[n];return r},$t=function(t,e,r){var n=r.length,i=_i(e+2);t[i]=n&255,t[i+1]=n>>>8,t[i+2]=t[i]^255,t[i+3]=t[i+1]^255;for(var o=0;o<n;++o)t[i+o+4]=r[o];return(i+4+n)*8},Mi=function(t,e,r,n,i,o,a,c,s,u,l){Ce(e,l++,r),++i[256];for(var d=Br(i,15),p=d[0],f=d[1],m=Br(o,15),h=m[0],v=m[1],S=Ei(p),g=S[0],y=S[1],w=Ei(h),I=w[0],E=w[1],T=new se(19),b=0;b<g.length;++b)T[g[b]&31]++;for(var b=0;b<I.length;++b)T[I[b]&31]++;for(var D=Br(T,7),M=D[0],R=D[1],A=19;A>4&&!M[Ii[A-1]];--A);var F=u+5<<3,W=wt(i,Ue)+wt(o,Kt)+a,G=wt(i,p)+wt(o,h)+a+14+3*A+wt(T,M)+(2*T[16]+3*T[17]+7*T[18]);if(F<=W&&F<=G)return $t(e,l,t.subarray(s,s+u));var ee,B,K,ne;if(Ce(e,l,1+(G<W)),l+=2,G<W){ee=It(p,f,0),B=p,K=It(h,v,0),ne=h;var fe=It(M,R,0);Ce(e,l,y-257),Ce(e,l+5,E-1),Ce(e,l+10,A-4),l+=14;for(var b=0;b<A;++b)Ce(e,l+3*b,M[Ii[b]]);l+=3*A;for(var X=[g,I],ae=0;ae<2;++ae)for(var te=X[ae],b=0;b<te.length;++b){var Z=te[b]&31;Ce(e,l,fe[Z]),l+=M[Z],Z>15&&(Ce(e,l,te[b]>>>5&127),l+=te[b]>>>12)}}else ee=bs,B=Ue,K=ws,ne=Kt;for(var b=0;b<c;++b)if(n[b]>255){var Z=n[b]>>>18&31;bt(e,l,ee[Z+257]),l+=B[Z+257],Z>7&&(Ce(e,l,n[b]>>>23&31),l+=Hr[Z]);var q=n[b]&31;bt(e,l,K[q]),l+=ne[q],q>3&&(bt(e,l,n[b]>>>5&8191),l+=qr[q])}else bt(e,l,ee[n[b]]),l+=B[n[b]];return bt(e,l,ee[256]),l+B[256]},Is=new Ct([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Cs=new ue(0),Es=function(t,e,r,n,i,o){var a=t.length,c=new ue(n+a+5*(1+Math.floor(a/7e3))+i),s=c.subarray(n,c.length-i),u=0;if(!e||a<8)for(var l=0;l<=a;l+=65535){var d=l+65535;d<a?u=$t(s,u,t.subarray(l,d)):(s[l]=o,u=$t(s,u,t.subarray(l,a)))}else{for(var p=Is[e-1],f=p>>>13,m=p&8191,h=(1<<r)-1,v=new se(32768),S=new se(h+1),g=Math.ceil(r/3),y=2*g,w=function(Y){return(t[Y]^t[Y+1]<<g^t[Y+2]<<y)&h},I=new Ct(25e3),E=new se(288),T=new se(32),b=0,D=0,l=0,M=0,R=0,A=0;l<a;++l){var F=w(l),W=l&32767,G=S[F];if(v[W]=G,S[F]=W,R<=l){var ee=a-l;if((b>7e3||M>24576)&&ee>423){u=Mi(t,s,0,I,E,T,D,M,A,l-A,u),M=b=D=0,A=l;for(var B=0;B<286;++B)E[B]=0;for(var B=0;B<30;++B)T[B]=0}var K=2,ne=0,fe=m,X=W-G&32767;if(ee>2&&F==w(l-X))for(var ae=Math.min(f,ee)-1,te=Math.min(32767,l),Z=Math.min(258,ee);X<=te&&--fe&&W!=G;
vendor: 4,422 bytes, line 6
6){if(t[l+K]==t[l+K-X]){for(var q=0;q<Z&&t[l+q]==t[l+q-X];++q);if(q>K){if(K=q,ne=X,q>ae)break;for(var Ee=Math.min(X,q-2),ie=0,B=0;B<Ee;++B){var re=l-X+B+32768&32767,Je=v[re],_e=re-Je+32768&32767;_e>ie&&(ie=_e,G=re)}}}W=G,G=v[W],X+=W-G+32768&32767}if(ne){I[M++]=268435456|Ur[K]<<18|Ci[ne];var C=Ur[K]&31,ce=Ci[ne]&31;D+=Hr[C]+qr[ce],++E[257+C],++T[ce],R=l+K,++b}else I[M++]=t[l],++E[t[l]]}}u=Mi(t,s,o,I,E,T,D,M,A,l-A,u),o||(u=$t(s,u,Cs))}return Ti(c,0,n+_i(u)+i)},Ms=function(){var t=1,e=0;return{p:function(r){for(var n=t,i=e,o=r.length,a=0;a!=o;){for(var c=Math.min(a+5552,o);a<c;++a)n+=r[a],i+=n;n%=65521,i%=65521}t=n,e=i},d:function(){return(t>>>8<<16|(e&255)<<8|e>>>8)+((t&255)<<23)*2}}},xs=function(t,e,r,n,i){return Es(t,e.level==null?6:e.level,e.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):12+e.mem,r,n,!i)},Rs=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},ks=function(t,e){var r=e.level,n=r==0?0:r<6?1:r==9?3:2;t[0]=120,t[1]=n<<6|(n?32-2*n:1)};function Ni(t,e){e===void 0&&(e={});var r=Ms();r.p(t);var n=xs(t,e,2,4);return ks(n,e),Rs(n,n.length-4,r.d()),n}function Oi(t,e){var r=t.length;if(!e&&typeof TextEncoder<"u")return new TextEncoder().encode(t);for(var n=new ue(t.length+(t.length>>>1)),i=0,o=function(u){n[i++]=u},a=0;a<r;++a){if(i+5>n.length){var c=new ue(i+8+(r-a<<1));c.set(n),n=c}var s=t.charCodeAt(a);s<128||e?o(s):s<2048?(o(192|s>>>6),o(128|s&63)):s>55295&&s<57344?(s=65536+(s&1047552)|t.charCodeAt(++a)&1023,o(240|s>>>18),o(128|s>>>12&63),o(128|s>>>6&63),o(128|s&63)):(o(224|s>>>12),o(128|s>>>6&63),o(128|s&63))}return Ti(n,0,i)}function Li(t,e){var r="";if(!e&&typeof TextDecoder<"u")return new TextDecoder().decode(t);for(var n=0;n<t.length;){var i=t[n++];i<128||e?r+=String.fromCharCode(i):i<224?r+=String.fromCharCode((i&31)<<6|t[n++]&63):i<240?r+=String.fromCharCode((i&15)<<12|(t[n++]&63)<<6|t[n++]&63):(i=((i&15)<<18|(t[n++]&63)<<12|(t[n++]&63)<<6|t[n++]&63)-65536,r+=String.fromCharCode(55296|i>>10,56320|i&1023))}return r}var Di="v1";var Vr=t=>{let e=Object.assign(Object.assign({},t),{v:Di});return Li(Ni(Oi(JSON.stringify(e))),!0)};var Xt="medium";function _s(t){return t.toLowerCase()}function Ai(t){let e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?_s(e):null}var Vc=new RegExp("[^a-z0-9-_:]");var Ts=/(max|min)-device-(width|height)/,jc=new RegExp(Ts.source,"g"),Ns=/([^\\]):hover/,$c=new RegExp(Ns.source,"g");var Pi=function(t,e,r){switch(e){case"light":{if(t!=="input")return!0;var n=r?Ai(r):"";return n?!!(["password","hidden","email","tel"].includes(n)||r.autocomplete.startsWith("cc-")):!1}case"medium":case"conservative":return!0;default:return Pi(t,Xt,r)}},Os=function(t,e,r){var n,i,o;if(e===void 0&&(e={defaultMaskLevel:Xt}),r){if(r.closest("."+Mt))return!0;var a=((n=e.maskSelector)!==null&&n!==void 0?n:[]).some(function(s){return r.closest(s)});if(a)return!0;if(r.closest("."+An))return!1;var c=((i=e.unmaskSelector)!==null&&i!==void 0?i:[]).some(function(s){return r.closest(s)});if(c)return!1}return Pi(t,(o=e.defaultMaskLevel)!==null&&o!==void 0?o:Xt,r)},jr=function(t,e){return function(r,n){return Os(t,e,n)?r.replace(/[^\s]/g,"*"):r}},$r=function(t){var e=0;if(t.length===0)return e;for(var r=0;r<t.length;r++){var n=t.charCodeAt(r);e=(e<<5)-e+n,e|=0}return e},Fi=function(t,e){var r=$r(t.toString()),n=Math.abs(r),i=n*31,o=i%1e6;return o/1e6<e},Wi=function(){var t=le();return t?.location?t.location.href:""},Bi=function(t,e){return"".concat(e,"/").concat(t)},Yt=function(t){return t===Qe.STAGING?Wn:t===Qe.EU?Fn:Pn},Jt=function(){return k(void 0,void 0,void 0,function(){var t,e,r,n,i,o,a,c;return x(this,function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),t=le(),t?[4,t.navigator.storage.estimate()]:[3,2];case 1:return e=s.sent(),r=e.usage,n=e.quota,i=e.usageDetails,o=r?Math.round(r/xt):0,a=r&&n?Math.round((r/n+Number.EPSILON)*1e3)/1e3:0,[2,{totalStorageSize:o,percentOfQuota:a,usageDetails:JSON.stringify(i)}];case 2:return[3,4];case 3:return c=s.sent(),[3,4];case 4:return[2,{totalStorageSize:0,percentOfQuota:0,usageDetails:""}]}})})},Zt=function(t){var e=O({},t),r=e.apiKey;return e.apiKey="****".concat(r.substring(r.length-4)),e};var Ls=function(t,e){var r=document.createDocumentFragment(),n=function(i){if(i===void 0&&(i=[]),typeof i=="string"&&(i=[i]),i=i.filter(function(o){try{r.querySelector(o)}catch{return e.warn('[session-replay-browser] omitting selector "'.concat(o,'" because it is invali
6d')),!1}return!0}),i.length!==0)return i};return t.blockSelector=n(t.blockSelector),t.maskSelector=n(t.maskSelector),t.unmaskSelector=n(t.unmaskSelector),t},Ds=function(){function t(e,r){this.localConfig=new qn(e,r)}return t.prototype.initialize=function(){return k(this,void 0,void 0,function(){var e;return x(this,function(r){switch(r.label){case 0:return e=this,[4,Rn({localConfig:this.localConfig,configKeys:["sessionReplay"]})];case 1:return e.remoteConfigFetch=r.sent(),[2]}})})},t.prototype.generateJoinedConfig=function(e){var r,n,i;return k(this,void 0,void 0,function(){var o,a,c,s,u,l,d,p,f,m,h,v,S,g,y,w,I,E,T,b;return x(this,function(D){switch(D.label){case 0:o=O({},this.localConfig),o.optOut=this.localConfig.optOut,o.captureEnabled=!0,D.label=1;case 1:return D.trys.push([1,5,,6]),this.remoteConfigFetch?[4,this.remoteConfigFetch.getRemoteConfig("sessionReplay","sr_sampling_config",e)]:(o.captureEnabled=!1,[2,o]);case 2:return c=D.sent(),[4,this.remoteConfigFetch.getRemoteConfig("sessionReplay","sr_privacy_config",e)];case 3:return s=D.sent(),u=o,[4,this.remoteConfigFetch.getRemoteConfig("sessionReplay","sr_interaction_config",e)];case 4:return u.interactionConfig=D.sent(),(c||s)&&(a={},c&&(a.sr_sampling_config=c),s&&(a.sr_privacy_config=s)),[3,6];case 5:return l=D.sent(),d=l,this.localConfig.loggerProvider.warn(d.message),o.captureEnabled=!1,[3,6];case 6:if(!a)return[2,o];if(p=a.sr_sampling_config,f=a.sr_privacy_config,p&&Object.keys(p).length>0?(Object.prototype.hasOwnProperty.call(p,"capture_enabled")?o.captureEnabled=p.capture_enabled:o.captureEnabled=!1,Object.prototype.hasOwnProperty.call(p,"sample_rate")&&(o.sampleRate=p.sample_rate)):(o.captureEnabled=!0,this.localConfig.loggerProvider.debug("Remote config successfully fetched, but no values set for project, Session Replay capture enabled.")),f){m=(r=o.privacyConfig)!==null&&r!==void 0?r:{},h={defaultMaskLevel:(i=(n=f.defaultMaskLevel)!==null&&n!==void 0?n:m.defaultMaskLevel)!==null&&i!==void 0?i:"medium",blockSelector:[],maskSelector:[],unmaskSelector:[]},v=function(M){var R,A,F,W,G,ee,B,K,ne,fe={};typeof M.blockSelector=="string"&&(M.blockSelector=[M.blockSelector]);try{for(var X=pe((B=M.blockSelector)!==null&&B!==void 0?B:[]),ae=X.next();!ae.done;ae=X.next()){var te=ae.value;fe[te]="block"}}catch(re){R={error:re}}finally{try{ae&&!ae.done&&(A=X.return)&&A.call(X)}finally{if(R)throw R.error}}try{for(var Z=pe((K=M.maskSelector)!==null&&K!==void 0?K:[]),q=Z.next();!q.done;q=Z.next()){var te=q.value;fe[te]="mask"}}catch(re){F={error:re}}finally{try{q&&!q.done&&(W=Z.return)&&W.call(Z)}finally{if(F)throw F.error}}try{for(var Ee=pe((ne=M.unmaskSelector)!==null&&ne!==void 0?ne:[]),ie=Ee.next();!ie.done;ie=Ee.next()){var te=ie.value;fe[te]="unmask"}}catch(re){G={error:re}}finally{try{ie&&!ie.done&&(ee=Ee.return)&&ee.call(Ee)}finally{if(G)throw G.error}}return fe},S=O(O({},v(m)),v(f));try{for(g=pe(Object.entries(S)),y=g.next();!y.done;y=g.next())w=ve(y.value,2),I=w[0],E=w[1],E==="mask"?h.maskSelector.push(I):E==="block"?h.blockSelector.push(I):E==="unmask"&&h.unmaskSelector.push(I)}catch(M){T={error:M}}finally{try{y&&!y.done&&(b=g.return)&&b.call(g)}finally{if(T)throw T.error}}o.privacyConfig=Ls(h,this.localConfig.loggerProvider)}return this.localConfig.loggerProvider.debug(JSON.stringify({name:"session replay joined config",config:Zt(o)},null,2)),[2,o]}})})},t}();var Ui=function(t,e){return k(void 0,void 0,void 0,function(){var r;return x(this,function(n){switch(n.label){case 0:return r=new Ds(t,e),[4,r.initialize()];case 1:return n.sent(),[2,r]}})})};var Yr=(t,e)=>e.some(r=>t instanceof r),Gi,zi;function As(){return Gi||(Gi=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Ps(){return zi||(zi=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var Jr=new WeakMap,Kr=new WeakMap,Qt=new WeakMap;function Fs(t){let e=new Promise((r,n)=>{let i=()=>{t.removeEventListener("success",o),t.removeEventListener("error",a)},o=()=>{r(Ge(t.result)),i()},a=()=>{n(t.error),i()};t.addEventListener("success",o),t.addEventListener("error",a)});return Qt.set(e,t),e}function Ws(t){if(Jr.has(t))return;let e=new Promise((r,n)=>{let i=()=>{t.removeEventListener("complete",o),t.removeEventListener("error",a),t.removeEventListener("abort",a)},o=()=>{r(),i()},a=()=>{n(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",o),t.addEventListener("error",a),t.addEventListener("abort",a)});Jr.set(t,e)}var Zr={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return Jr.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Ge(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function ji(t){Zr=t(Zr)}function Bs(t){return Ps().includes(t)?function(...e){return t.apply(Qr(this),e),Ge(this.request)}:function(...e){return Ge(t.apply(Qr(this),e))}}function Us(t){return typeof t=="function"?Bs(t):(t instanceof IDBTransaction&&Ws(t),Yr(t,As())?new Proxy(t,Zr):t)}function Ge(t){if(t instanceof IDBRequest)return Fs(t);if(Kr.has(t))return Kr.get(t);let e=Us(t);return e!==t&&(Kr.set(t,e),Qt.set(e,t)),e}var Qr=t=>Qt.get(t);function $i(t,e,{blocked:r,upgrade:n,blocking:i,terminated:o}={}){let a=indexedDB.open(t,e),c=Ge(a);return n&&a.addEventListener("upgradeneeded",s=>{n(Ge(a.result),s.oldVersion,s.newVersion,Ge(a.transaction),s)}),r&&a.addEventListener("blocked",s=>r(s.oldVersion,s.newVersion,s)),c.then(s=>{o&&s.addEventListener("close",()=>o()),i&&s.addEventListener("versionchange",u=>i(u.oldVersion,u.newVersion,u))}).catch(()=>{}),c}var Gs=["get","getKey","getAll","getAllKeys","count"],zs=["put","add","delete","clear"],Xr=new Map;function Hi(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Xr.get(e))return Xr.get(e);
6let r=e.replace(/FromIndex$/,""),n=e!==r,i=zs.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||Gs.includes(r)))return;let o=function(a,...c){return Ze(this,null,function*(){let s=this.transaction(a,i?"readwrite":"readonly"),u=s.store;return n&&(u=u.index(c.shift())),(yield Promise.all([u[r](...c),i&&s.done]))[0]})};return Xr.set(e,o),o}ji(t=>Me(ge({},t),{get:(e,r,n)=>Hi(e,r)||t.get(e,r,n),has:(e,r)=>!!Hi(e,r)||t.has(e,r)}));var Hs=["continue","continuePrimaryKey","advance"],qi={},en=new WeakMap,Ki=new WeakMap,qs={get(t,e){if(!Hs.includes(e))return t[e];let r=qi[e];return r||(r=qi[e]=function(...n){en.set(this,Ki.get(this)[e](...n))}),r}};function Vs(...t){return fn(this,null,function*(){let e=this;if(e instanceof IDBCursor||(e=yield new cr(e.openCursor(...t))),!e)return;e=e;let r=new Proxy(e,qs);for(Ki.set(r,e),Qt.set(r,Qr(e));e;)yield r,e=yield new cr(en.get(r)||e.continue()),en.delete(r)})}function Vi(t,e){return e===Symbol.asyncIterator&&Yr(t,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&Yr(t,[IDBIndex,IDBObjectStore])}ji(t=>Me(ge({},t),{get(e,r,n){return Vi(e,r)?Vs:t.get(e,r,n)},has(e,r){return Vi(e,r)||t.has(e,r)}}));var Xi="Unexpected error occurred",Yi="Network error occurred, event batch rejected",Ji="Session replay event batch rejected due to exceeded retry count",Ke="Failed to store session replay events in IndexedDB",Zi="Session replay event batch not sent due to missing device ID",Qi="Session replay event batch not sent due to missing api key";var er=function(t){return t.RECORDING="recording",t.SENT="sent",t}(er||{});var Et="sessionCurrentSequence",Xe="sequencesToSend";var js=function(){var t=le();return new Promise(function(e,r){if(!t)return r(new Error("Global scope not found"));if(!t.indexedDB)return r(new Error("Session Replay: cannot find indexedDB"));try{var n=t.indexedDB.open("keyval-store");n.onupgradeneeded=function(){n.result.version===1&&(n.result.close(),n.transaction&&n.transaction.abort(),t.indexedDB.deleteDatabase("keyval-store"),e())},n.onsuccess=function(){e(n.result)}}catch(i){r(i)}})},eo=function(t){return k(void 0,void 0,void 0,function(){var e,r;return x(this,function(n){switch(n.label){case 0:return t.length>0?(e=10,r=t.splice(0,e),[4,Promise.all(r)]):[3,2];case 1:return n.sent(),[3,0];case 2:return[2]}})})},$s=function(t){var e,r;return t.objectStoreNames.contains(Et)||(r=t.createObjectStore(Et,{keyPath:"sessionId"})),t.objectStoreNames.contains(Xe)||(e=t.createObjectStore(Xe,{keyPath:"sequenceId",autoIncrement:!0}),e.createIndex("sessionId","sessionId")),{sequencesStore:e,currentSequenceStore:r}},Ks=function(t){return k(void 0,void 0,void 0,function(){return x(this,function(e){switch(e.label){case 0:return[4,$i(t,1,{upgrade:$s})];case 1:return[2,e.sent()]}})})},Xs=function(){function t(e){var r=e.loggerProvider,n=e.apiKey,i=e.minInterval,o=e.maxInterval,a=this;this.storageKey="",this.maxPersistedEventsSize=Bn,this.timeAtLastSplit=null,this.shouldSplitEventsList=function(c,s){var u=new Blob([s]).size,l=new Blob(c).size;return l+u>=a.maxPersistedEventsSize?!0:a.timeAtLastSplit!==null&&a.interval&&Date.now()-a.timeAtLastSplit>a.interval&&c.length?(a.interval=Math.min(a.maxInterval,a.interval+a.minInterval),a.timeAtLastSplit=Date.now(),!0):!1},this.getSequencesToSend=function(){return k(a,void 0,void 0,function(){var c,s,u;return x(this,function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),[4,(u=this.db)===null||u===void 0?void 0:u.getAll(Xe)];case 1:return c=l.sent(),[2,c];case 2:return s=l.sent(),this.loggerProvider.warn("".concat(Ke,": ").concat(s)),[3,3];case 3:return[2,void 0]}})})},this.storeCurrentSequence=function(c){return k(a,void 0,void 0,function(){var s,u,l;return x(this,function(d){switch(d.label){case 0:return d.trys.push([0,4,,5]),this.db?[4,this.db.get(Et,c)]:[2,void 0];case 1:return s=d.sent(),s?[4,this.db.put(Xe,{sessionId:c,events:s.events})]:[2,void 0];case 2:return u=d.sent(),[4,this.db.put(Et,{sessionId:c,events:[]})];case 3:return d.sent(),[2,O(O({},s),{sessionId:c,sequenceId:u})];case 4:return l=d.sent(),this.loggerProvider.warn("".concat(Ke,": ").concat(l)),[3,5];case 5:return[2,void 0]}})})},this.addEventToCurrentSequence=function(c,s){return k(a,void 0,void 0,function(){var u,l,d,p,f,m,h;return x(this,function(v){switch(v.label){case 0:this.interval===0&&(this.interval=this.minInterval),v.label=1;case 1:return v.trys.push([1,11,,12]),u=(h=this.db)===null||h===void 0?void 0:h.transaction(Et,"readwrite"),u?[4,u.store.get(c)]:[2];case 2:return l=v.sent(),l?[3,4]:[4,u.store.put({sessionId:c,events:[s]})];case 3:return v.sent(),[2];case 4:return d=void 0,this.shouldSplitEventsList(l.events,s)?(d=l.events,[4,u.store.put({sessionId:c,events:[s]})]):[3,6];case 5:return v.sent(),[3,8];case 6:return p=l.events.concat(s),[4,u.store.put({sessionId:c,events:p})];case 7:v.sent(),v.label=8;case 8:return[4,u.done];case 9:return v.sent(),d?[4,this.storeSendingEvents(c,d)]:[2,void 0];case 10:return f=v.sent(),f?[2,{events:d,sessionId:c,sequenceId:f}]:[2,void 0];case 11:return m=v.sent(),this.loggerProvider.warn("".concat(Ke,": ").concat(m)),[3,12];case 12:return[2,void 0]}})})},this.storeSendingEvents=function(c,s){return k(a,void 0,void 0,function(){var u,l,d;return x(this,function(p){switch(p.label){case 0:return p.trys.push([0,2,,3]),[4,(d=this.db)===null||d===void 0?void 0:d.put(Xe,{sessionId:c,events:s})];case 1:return u=p.sent(),[2,u];case 2:return l=p.sent(),this.loggerProvider.warn("".concat(Ke,": ").concat(l)),[3,3];case 3:return[2,void 0]}})})},this.cleanUpSessionEventsStore=function(c){return k(a,void 0,void 0,function(){var s,u;return x(this,function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),[4,(u=this.db)===null||u===void 0?void 0:u.delete(Xe,c)];case 1:return l.sent(),[3,3];case 2:return s=l.sent(),this.loggerProvider.warn("".concat(Ke,": ").concat(s)),[3,3];case 3:return[2]}})})},this.transitionFromKeyValStore=function(c){return k(a,void 0,void 0,function(){var s,u,l,d,p,f,m,h,v=this;return x(this,function(S){switch(S.label){case 0:return S.trys.push([0,6,,7]),[4,js()];case 1:if(s=S.sent(),!s)return[2];u=function(g,y){return k(v,void 0,void 0,function(){var w,I,E=this;return x(this,function(T){switch(T.label){case 0:return w=y.sessionSequences,I=[],Object.keys(w).forEac
vendor: 7,478 bytes, line 6
6h(function(b){var D=parseInt(b,10),M=w[D];if(D===y.currentSequenceId){var R=M.events.map(function(A){return k(E,void 0,void 0,function(){return x(this,function(F){return[2,this.addEventToCurrentSequence(g,A)]})})});I.concat(R)}else M.status!==er.SENT&&I.push(E.storeSendingEvents(g,M.events))}),[4,eo(I)];case 1:return T.sent(),[2]}})})},l="".concat(In,"_").concat(this.apiKey.substring(0,10)),S.label=2;case 2:return S.trys.push([2,4,,5]),d=s.transaction("keyval").objectStore("keyval").getAll(l),p=new Promise(function(g){d.onsuccess=function(y){return k(v,void 0,void 0,function(){var w,I,E,T=this;return x(this,function(b){switch(b.label){case 0:return w=y&&y.target.result,I=w&&w[0],I?(E=[],Object.keys(I).forEach(function(D){var M=parseInt(D,10),R=I[M];if(c===M)E.push(u(M,R));else{var A=R.sessionSequences;Object.keys(A).forEach(function(F){var W=parseInt(F,10);A[W].status!==er.SENT&&E.push(T.storeSendingEvents(M,A[W].events))})}}),[4,eo(E)]):[3,2];case 1:b.sent(),b.label=2;case 2:return g(),[2]}})})}}),[4,p];case 3:return S.sent(),f=le(),f&&f.indexedDB.deleteDatabase("keyval-store"),[3,5];case 4:return m=S.sent(),this.loggerProvider.warn("Failed to transition session replay events from keyval to new store: ".concat(m)),[3,5];case 5:return[3,7];case 6:return h=S.sent(),this.loggerProvider.warn("Failed to access keyval store: ".concat(h,". For more information, visit: https://www.docs.developers.amplitude.com/session-replay/sdks/standalone/#indexeddb-best-practices")),[3,7];case 7:return[2]}})})},this.loggerProvider=r,this.apiKey=n,this.maxInterval=o??Hn,this.minInterval=i??zn,this.interval=0}return t.prototype.initialize=function(e,r){return k(this,void 0,void 0,function(){var n,i,o;return x(this,function(a){switch(a.label){case 0:return n=e==="replay"?"":"_".concat(e),i="".concat(this.apiKey.substring(0,10),"_amp_session_replay_events").concat(n),o=this,[4,Ks(i)];case 1:return o.db=a.sent(),this.timeAtLastSplit=Date.now(),[4,this.transitionFromKeyValStore(r)];case 2:return a.sent(),[2]}})})},t}();var to=function(t){var e=t.loggerProvider,r=t.apiKey,n=t.sessionId,i=t.type,o=t.minInterval,a=t.maxInterval;return k(void 0,void 0,void 0,function(){var c;return x(this,function(s){switch(s.label){case 0:return c=new Xs({loggerProvider:e,apiKey:r,minInterval:o,maxInterval:a}),[4,c.initialize(i,n)];case 1:return s.sent(),[2,c]}})})};var tr="1.13.6";var ro=function(){function t(e){var r=e.loggerProvider,n=e.payloadBatcher;this.storageKey="",this.retryTimeout=1e3,this.scheduled=null,this.queue=[],this.loggerProvider=r,this.payloadBatcher=n||function(i){return i}}return t.prototype.sendEventsList=function(e){this.addToQueue(O(O({},e),{attempts:0,timeout:0}))},t.prototype.addToQueue=function(){for(var e=this,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=r.filter(function(o){return o.attempts<(o.flushMaxRetries||0)?(o.attempts+=1,!0):(e.completeRequest({context:o,err:"".concat(Ji,", batch sequence id, ").concat(o.sequenceId)}),!1)});i.forEach(function(o){if(e.queue=e.queue.concat(o),o.timeout===0){e.schedule(0);return}setTimeout(function(){o.timeout=0,e.schedule(0)},o.timeout)})},t.prototype.schedule=function(e){var r=this;this.scheduled||(this.scheduled=setTimeout(function(){r.flush(!0).then(function(){r.queue.length>0&&r.schedule(e)})},e))},t.prototype.flush=function(e){return e===void 0&&(e=!1),k(this,void 0,void 0,function(){var r,n,i=this;return x(this,function(o){switch(o.label){case 0:return r=[],n=[],this.queue.forEach(function(a){return a.timeout===0?r.push(a):n.push(a)}),this.queue=n,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),[4,Promise.all(r.map(function(a){return i.send(a,e)}))];case 1:return o.sent(),[2]}})})},t.prototype.send=function(e,r){var n,i;return r===void 0&&(r=!0),k(this,void 0,void 0,function(){var o,a,c,s,u,l,d,p,f,m,h,v,S;return x(this,function(g){switch(g.label){case 0:if(o=e.apiKey,!o)return[2,this.completeRequest({context:e,err:Qi})];if(a=e.deviceId,!a)return[2,this.completeRequest({context:e,err:Zi})];if(c=Wi(),s=tr,u=e.sampleRate,l=new URLSearchParams({device_id:a,session_id:"".concat(e.sessionId),seq_number:"".concat(e.sequenceId),type:"".concat(e.type)}),d="".concat(((n=e.version)===null||n===void 0?void 0:n.type)||"standalone","/").concat(((i=e.version)===null||i===void 0?void 0:i.version)||s),p=this.payloadBatcher({version:1,events:e.events}),p.events.length===0)return this.completeRequest({context:e}),[2];g.label=1;case 1:return g.trys.push([1,3,,4]),f={headers:{"Content-Type":"application/json",Accept:"*/*",Authorization:"Bearer ".concat(o),"X-Client-Version":s,"X-Client-Library":d,"X-Client-Url":c,"X-Client-Sample-Rate":"".concat(u)},body:JSON.stringify(p),method:"POST"},m="".concat(Yt(e.serverZone),"?").concat(l.toString()),[4,fetch(m,f)];case 2:if(h=g.sent(),h===null)return this.completeRequest({context:e,err:Xi}),[2];if(r)this.handleReponse(h.status,e);else{v="";try{v=JSON.stringify(h.body,null,2)}catch{}this.completeRequest({context:e,success:"".concat(h.status,": ").concat(v)})}return[3,4];case 3:return S=g.sent(),this.completeRequest({context:e,err:S}),[3,4];case 4:return[2]}})})},t.prototype.handleReponse=function(e,r){var n=new Mn().buildStatus(e);switch(n){case lr.Success:this.handleSuccessResponse(r);break;case lr.Failed:this.handleOtherResponse(r);break;default:this.completeRequest({context:r,err:Yi})}},t.prototype.handleSuccessResponse=function(e){var r=Math.round(new Blob(e.events).size/xt);this.completeRequest({context:e,success:"Session replay event batch with seq id ".concat(e.sequenceId," tracked successfully for session id ").concat(e.sessionId,", size of events: ").concat(r," KB")})},t.prototype.handleOtherResponse=function(e){this.addToQueue(O(O({},e),{timeout:e.attempts*this.retryTimeout}))},t.prototype.completeRequest=function(e){var r=e.context,n=e.err,i=e.success;r.onComplete(r.sequenceId),n?this.loggerProvider.warn(n):i&&this.loggerProvider.log(i)},t}();var tn=function(t){var e=t.config,r=t.sessionId,n=t.minInterval,i=t.maxInterval,o=t.type,a=t.payloadBatcher;return k(void 0,void 0,void 0,function(){function c(m){return m===void 0&&(m=!1),k(this,void 0,void 0,function(){return x(this,function(h){return[2,s.flush(m)]})})}var s,u,l,d,p,f;return x(this,function(m){switch(m.label){case 0:return s=new ro({loggerProvider:e.loggerProvider,payloadBatcher:a}),[4,to({loggerProvider:e.loggerProvider,apiKey:e.apiKey,sessionId:r,minInterval:n,maxInterval:i,type:o})];case 1:return u=m.sent(),l=function(h){var v=h.events,S=h.sessionId,g=h.deviceId,y=h.sequenceId;e.debugMode&&Jt().then(function(w){var I=w.totalStorageSize,E=w.percentOfQuota,T=w.usageDetails;e.loggerProvider.debug("Total storage size: ".concat(I," KB, percentage of quota: ").concat(E,"%, usage details: ").concat(T))}).catch(function(){}),s.sendEventsList({events:v,sequenceId:y,sessionId:S,flushMaxRetries:e.flushMaxRetries,apiKey:e.apiKey,deviceId:g,sampleRate:e.sampleRate,serverZone:e.serverZone,version:e.version,type:o,onComplete:u.cleanUpSessionEventsStore.bind(u)})},d=function(h){var v=h.sessionId,S=h.deviceId;u.storeCurrentSequence(v).then(function(g){g&&l({sequenceId:g.sequenceId,events:g.events,sessionId:g.sessionId,deviceId:S})}).catch(function(g){e.loggerProvider.warn("Failed to get current sequence of session replay events for session:",g)})},p=function(h){var v=h.deviceId;return k(void 0,void 0,void 0,function(){var S;return x(this,function(g){switch(g.label){case 0:return[4,u.getSequencesToSend()];
vendor: 5,901 bytes, line 6
6case 1:return S=g.sent(),S&&S.forEach(function(y){l({sequenceId:y.sequenceId,events:y.events,sessionId:y.sessionId,deviceId:v})}),[2]}})})},f=function(h){var v=h.event,S=h.sessionId,g=h.deviceId;u.addEventToCurrentSequence(S,v.data).then(function(y){return y&&l({sequenceId:y.sequenceId,events:y.events,sessionId:y.sessionId,deviceId:g})}).catch(function(y){e.loggerProvider.warn("Failed to add event to session replay capture:",y)})},[2,{sendCurrentSequenceEvents:d,addEvent:f,sendStoredEvents:p,flush:c}]}})})};var rn=function(){function t(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=new Map;e.forEach(function(i){n.set(i.name,i.manager)}),this.managers=n}return t.prototype.sendStoredEvents=function(e){return k(this,void 0,void 0,function(){var r;return x(this,function(n){switch(n.label){case 0:return r=[],this.managers.forEach(function(i){r.push(i.sendStoredEvents(e))}),[4,Promise.all(r)];case 1:return n.sent(),[2]}})})},t.prototype.addEvent=function(e){var r,n=e.sessionId,i=e.event,o=e.deviceId;(r=this.managers.get(i.type))===null||r===void 0||r.addEvent({sessionId:n,event:i,deviceId:o})},t.prototype.sendCurrentSequenceEvents=function(e){var r=e.sessionId,n=e.deviceId;this.managers.forEach(function(i){i.sendCurrentSequenceEvents({sessionId:r,deviceId:n})})},t.prototype.flush=function(e){return k(this,void 0,void 0,function(){var r;return x(this,function(n){switch(n.label){case 0:return r=[],this.managers.forEach(function(i){r.push(i.flush(e))}),[4,Promise.all(r)];case 1:return n.sent(),[2]}})})},t}();var nn=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(nn||{});var de,sn,so;function ao(t,e){if(so=new Date,t.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if(t.tagName.toLowerCase()==="html")return"html";var r={root:document.body,idName:function(o){return!0},className:function(o){return!0},tagName:function(o){return!0},attr:function(o,a){return!1},seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4,timeoutMs:void 0};de=O(O({},r),e),sn=Ys(de.root,r);var n=rr(t,"all",function(){return rr(t,"two",function(){return rr(t,"one",function(){return rr(t,"none")})})});if(n){var i=uo(fo(n,t));return i.length>0&&(n=i[0]),or(n)}else throw new Error("Selector was not found.")}function Ys(t,e){return t.nodeType===Node.DOCUMENT_NODE?t:t===e.root?t.ownerDocument:t}function rr(t,e,r){for(var n=null,i=[],o=t,a=0,c=function(){var u,l,d=new Date().getTime()-so.getTime();if(de.timeoutMs!==void 0&&d>de.timeoutMs)throw new Error("Timeout: Can't find a unique selector after ".concat(d,"ms"));var p=ir(Js(o))||ir.apply(void 0,Ne([],ve(Zs(o)),!1))||ir.apply(void 0,Ne([],ve(Qs(o)),!1))||ir(ea(o))||[oo()],f=ta(o);if(e=="all")f&&(p=p.concat(p.filter(on).map(function(g){return nr(g,f)})));else if(e=="two")p=p.slice(0,1),f&&(p=p.concat(p.filter(on).map(function(g){return nr(g,f)})));else if(e=="one"){var m=ve(p=p.slice(0,1),1),h=m[0];f&&on(h)&&(p=[nr(h,f)])}else e=="none"&&(p=[oo()],f&&(p=[nr(p[0],f)]));try{for(var v=(u=void 0,pe(p)),S=v.next();!S.done;S=v.next()){var h=S.value;h.level=a}}catch(g){u={error:g}}finally{try{S&&!S.done&&(l=v.return)&&l.call(v)}finally{if(u)throw u.error}}if(i.push(p),i.length>=de.seedMinLength&&(n=no(i,r),n))return"break";o=o.parentElement,a++};o;){var s=c();if(s==="break")break}return n||(n=no(i,r)),!n&&r?r():n}function no(t,e){var r,n,i=uo(lo(t));if(i.length>de.threshold)return e?e():null;try{for(var o=pe(i),a=o.next();!a.done;a=o.next()){var c=a.value;if(co(c))return c}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return null}function or(t){for(var e=t[0],r=e.name,n=1;n<t.length;n++){var i=t[n].level||0;e.level===i-1?r="".concat(t[n].name," > ").concat(r):r="".concat(t[n].name," ").concat(r),e=t[n]}return r}function io(t){return t.map(function(e){return e.penalty}).reduce(function(e,r){return e+r},0)}function co(t){var e=or(t);switch(sn.querySelectorAll(e).length){case 0:throw new Error("Can't select any node with this selector: ".concat(e));case 1:return!0;default:return!1}}function Js(t){var e=t.getAttribute("id");return e&&de.idName(e)?{name:"#"+CSS.escape(e),penalty:0}:null}function Zs(t){var e=Array.from(t.attributes).filter(function(r){return de.attr(r.name,r.value)});return e.map(function(r){return{name:"[".concat(CSS.escape(r.name),'="').concat(CSS.escape(r.value),'"]'),penalty:.5}})}function Qs(t){var e=Array.from(t.classList).filter(de.className);return e.map(function(r){return{name:"."+CSS.escape(r),penalty:1}})}function ea(t){var e=t.tagName.toLowerCase();return de.tagName(e)?{name:e,penalty:2}:null}function oo(){return{name:"*",penalty:3}}function ta(t){var e=t.parentNode;if(!e)return null;var r=e.firstChild;if(!r)return null;for(var n=0;r&&(r.nodeType===Node.ELEMENT_NODE&&n++,r!==t);)r=r.nextSibling;return n}function nr(t,e){return{name:t.name+":nth-child(".concat(e,")"),penalty:t.penalty+1}}function on(t){return t.name!=="html"&&!t.name.startsWith("#")}function ir(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t.filter(ra);return r.length>0?r:null}function ra(t){return t!=null}function lo(t,e){var r,n,i,o,a,c;return e===void 0&&(e=[]),x(this,function(s){switch(s.label){case 0:if(!(t.length>0))return[3,9];s.label=1;case 1:s.trys.push([1,6,7,8]),r=pe(t[0]),n=r.next(),s.label=2;case 2:return n.done?[3,5]:(i=n.value,[5,pe(lo(t.slice(1,t.length),e.concat(i)))]);case 3:s.sent(),s.label=4;case 4:return n=r.next(),[3,2];case 5:return[3,8];case 6:return o=s.sent(),a={error:o},[3,8];case 7:try{n&&!n.done&&(c=r.return)&&c.call(r)}finally{if(a)throw a.error}
6return[7];case 8:return[3,11];case 9:return[4,e];case 10:s.sent(),s.label=11;case 11:return[2]}})}function uo(t){return Ne([],ve(t),!1).sort(function(e,r){return io(e)-io(r)})}function fo(t,e,r){var n,i,o;return r===void 0&&(r={counter:0,visited:new Map}),x(this,function(a){switch(a.label){case 0:if(!(t.length>2&&t.length>de.optimizedMinLength))return[3,5];n=1,a.label=1;case 1:return n<t.length-1?r.counter>de.maxNumberOfTries?[2]:(r.counter+=1,i=Ne([],ve(t),!1),i.splice(n,1),o=or(i),r.visited.has(o)?[2]:co(i)&&na(i,e)?[4,i]:[3,4]):[3,5];case 2:return a.sent(),r.visited.set(o,!0),[5,pe(fo(i,e,r))];case 3:a.sent(),a.label=4;case 4:return n++,[3,1];case 5:return[2]}})}function na(t,e){return sn.querySelector(or(t))===e}var ia=36e5,po=function(t){var e=t.version,r=t.events,n=[];return r.forEach(function(i){var o=JSON.parse(i);o.count=1,o.type==="click"&&n.push(o)}),{version:e,events:n}},ho=function(t){var e=t.version,r=t.events,n=[];r.forEach(function(o){var a=JSON.parse(o);a.type==="click"&&n.push(a)});var i=n.reduce(function(o,a){var c=a.x,s=a.y,u=a.selector,l=a.timestamp,d=l-l%ia,p="".concat(c,":").concat(s,":").concat(u??"",":").concat(d);return o[p]?o[p].count+=1:o[p]=O(O({},a),{timestamp:d,count:1}),o},{});return{version:e,events:Object.values(i)}},mo=function(t){var e=t.eventsManager,r=t.sessionId,n=t.deviceIdFn;return function(i){if(i.type===nn.Click){var o=le();if(o){var a=o.location,c=o.innerHeight,s=o.innerWidth;if(a){var u=i.x,l=i.y,d=Se.mirror.getNode(i.id),p;d&&(p=ao(d));var f=Be.getWindowScroll(o),m=f.left,h=f.top,v={x:u+m,y:l+h,selector:p,viewportHeight:c,viewportWidth:s,pageUrl:a.href,timestamp:Date.now(),type:"click"},S=n();S&&e.addEvent({sessionId:r,event:{type:"interaction",data:JSON.stringify(v)},deviceId:S})}}}}};var go=function(){function t(e,r){var n=le();n&&n.navigator&&typeof n.navigator.sendBeacon=="function"?this.sendBeacon=function(i,o){try{if(n.navigator.sendBeacon(i,JSON.stringify(o)))return!0}catch{}return!1}:this.sendBeacon=function(){return!1},this.sendXhr=function(i,o){var a=new XMLHttpRequest;return a.open("POST",i,!0),a.setRequestHeader("Accept","*/*"),a.send(JSON.stringify(o)),!0},this.basePageUrl=Yt(r.serverZone),this.context=e}return t.prototype.send=function(e,r){var n=this.context,i=n.sessionId,o=n.type,a=new URLSearchParams({device_id:e,session_id:String(i),type:String(o)}),c="".concat(this.basePageUrl,"?").concat(a.toString());this.sendBeacon(c,r)||this.sendXhr(c,r)},t}();var an=Be.getWindowHeight,cn=Be.getWindowWidth,vo=function(){function t(e){var r=this;this.timestamp=Date.now(),this.hook=function(n){r.update(n)},this.send=function(n){return function(i){var o=n(),a=le();a&&o&&r.transport.send(o,{maxScrollX:r._maxScrollX,maxScrollY:r._maxScrollY,maxScrollWidth:r._maxScrollWidth,maxScrollHeight:r._maxScrollHeight,viewportHeight:an(),viewportWidth:cn(),pageUrl:a.location.href,timestamp:r.timestamp,type:"scroll"})}},this._maxScrollX=0,this._maxScrollY=0,this._maxScrollWidth=cn(),this._maxScrollHeight=an(),this.transport=e}return t.default=function(e,r){return new t(new go(e,r))},Object.defineProperty(t.prototype,"maxScrollX",{get:function(){return this._maxScrollX},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxScrollY",{get:function(){return this._maxScrollY},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxScrollWidth",{get:function(){return this._maxScrollWidth},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxScrollHeight",{get:function(){return this._maxScrollHeight},enumerable:!1,configurable:!0}),t.prototype.update=function(e){var r=Date.now();if(e.x>this._maxScrollX){var n=cn();this._maxScrollX=e.x;var i=e.x+n;i>this._maxScrollWidth&&(this._maxScrollWidth=i),this.timestamp=r}if(e.y>this._maxScrollY){var o=an();this._maxScrollY=e.y;var a=e.y+o;a>this._maxScrollHeight&&(this._maxScrollHeight=a),this.timestamp=r}},t}();var ln=function(){function t(e){var r=e.sessionId,n=e.deviceId;this.deviceId=n,this.sessionId=r,r&&n&&(this.sessionReplayId=Bi(r,n))}return t}();var yo=function(){function t(){var e=this;this.name="@amplitude/session-replay-browser",this.recordCancelCallback=null,this.eventCount=0,this.pageLeaveFns=[],this.teardownEventListeners=function(r){var n=le();n&&(n.removeEventListener("blur",e.blurListener),n.removeEventListener("focus",e.focusListener),!r&&n.addEventListener("blur",e.blurListener),!r&&n.addEventListener("focus",e.focusListener),n.self&&"onpagehide"in n.self?(n.removeEventListener("pagehide",e.pageLeaveListener),!r&&n.addEventListener("pagehide",e.pageLeaveListener)):(n.removeEventListener("beforeunload",e.pageLeaveListener),!r&&n.addEventListener("beforeunload",e.pageLeaveListener)))},this.blurListener=function(){e.sendEvents()},this.focusListener=function(){e.recordEvents()},this.pageLeaveListener=function(r){e.pageLeaveFns.forEach(function(n){n(r)})},this.addCustomRRWebEvent=function(r,n,i){return n===void 0&&(n={}),i===void 0&&(i=!0),k(e,void 0,void 0,function(){var o,a,c;return x(this,function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),o=void 0,this.config?(o={config:Zt(this.config),version:tr},i?[4,Jt()]:[3,2]):[3,2];case 1:a=s.sent(),o=O(O({},a),o),s.label=2;case 2:return this.recordCancelCallback?Se.addCustomEvent(r,O(O({},n),o)):this.loggerProvider.debug("Not able to add custom replay capture event ".concat(r," due to no ongoing recording.")),[3,4];case 3:return c=s.sent(),this.loggerProvider.debug("Error while adding custom replay capture event: ",c),[3,4];case 4:return[2]}})})},this.stopRecordingEvents=function(){try{e.loggerProvider.log("Session Replay capture stopping."),e.recordCancelCallback&&e.recordCancelCallback(),e.recordCancelCallback=null}catch(n){var r=n;e.loggerProvider.warn("Error occurred while stopping replay capture: ".concat(r.toString()))}},this.loggerProvider=new et}return t.prototype.init=function(e,r){return ur(this._init(e,r))},t.prototype._init=function(e,r){var n,i,o;return k(this,void 0,void 0,function(){var a,c,s,u,l,d,p;return x(this,function(f){switch(f.label){case 0:return this.loggerProvider=r.loggerProvider||new et,Object.prototype.hasOwnProperty.call(r,"logLevel")&&this.loggerProvider.enable(r.logLevel),this.identifiers=new ln({sessionId:r.sessionId,deviceId:r.deviceId}),a=this,[4,Ui(e,r)];case 1:return a.joinedConfigGenerator=f.sent(),c=this,[4,this.joinedConfigGenerator.generateJoinedConfig(this.identifiers.sessionId)];case 2:return c.config=f.sent(),r.sessionId&&(!((n=this.config.interactionConfig)===null||n===void 0)&&n.enabled)&&(s=vo.default({sessionId:r.sessionId,type:"interaction"},this.config),this.pageLeaveFns=[s.send(this.getDeviceId.bind(this))],this.scrollHook=s.hook.bind(s)),u=[],[4,tn({config:this.config,sessionId:this.identifiers.sessionId,type:"replay"})];case 3:return l=f.sent(),u.push({name:"replay",manager:l}),!((i=this.config.interactionConfig)===null||i===void 0)&&i.enabled?(d=this.config.interactionConfig.batch?ho:po,[4,tn({config:this.config,sessionId:this.identifiers.sessionId,type:"interaction",minInterval:(o=this.config.interactionConfig.trackEveryNms)!==null&&o!==void 0?o:Un,maxInterval:Gn,payloadBatcher:d})]):[3,5];case 4:p=f.sent(),u.push({name:"interaction",manager:p}),f.label=5;case 5:return this.eventsManager=new(rn.bind.apply(rn,Ne([void 0],ve(u),!1))),this.loggerProvider.log("Installing @amplitude/session-replay-browser."),this.teardownEventListeners(!1),this.initialize(!0),[2]}})})},t.prototype.setSessionId=function(e,r){return ur(this.asyncSetSessionId(e,r))},t.prototype.asyncSetSessionId=function(e,r){return k(this,void 0,void 0,function(){var n,i,o;return x(this,function(a){switch(a.label){case 0:return n=this.identifiers&&this.identifiers.sessionId,n&&this.sendEvents(n),i=r||this.getDeviceId(),this.identifiers=new ln({sessionId:e,deviceId:i}),this.joinedConfigGenerator&&n?(o=this,[4,this.joinedConfigGenerator.generateJoinedConfig(this.identifiers.sessionId)]):[3,2];
6case 1:o.config=a.sent(),a.label=2;case 2:return this.recordEvents(),[2]}})})},t.prototype.getSessionReplayDebugPropertyValue=function(){var e="";return this.config&&(e=$r(this.config.apiKey).toString()),JSON.stringify({appHash:e})},t.prototype.getSessionReplayProperties=function(){var e;if(!this.config||!this.identifiers)return this.loggerProvider.warn("Session replay init has not been called, cannot get session replay properties."),{};var r=this.getShouldRecord(),n={};return r&&(n=(e={},e[Tn]=this.identifiers.sessionReplayId?this.identifiers.sessionReplayId:null,e),this.config.debugMode&&(n[Ln]=this.getSessionReplayDebugPropertyValue())),this.addCustomRRWebEvent(Rt.GET_SR_PROPS,{shouldRecord:r,eventProperties:n},this.eventCount===10),this.eventCount===10&&(this.eventCount=0),this.eventCount++,n},t.prototype.sendEvents=function(e){var r,n=e||((r=this.identifiers)===null||r===void 0?void 0:r.sessionId),i=this.getDeviceId();this.eventsManager&&n&&i&&this.eventsManager.sendCurrentSequenceEvents({sessionId:n,deviceId:i})},t.prototype.initialize=function(e){var r;if(e===void 0&&(e=!1),!(!((r=this.identifiers)===null||r===void 0)&&r.sessionId)){this.loggerProvider.log("Session is not being recorded due to lack of session id.");return}var n=this.getDeviceId();if(!n){this.loggerProvider.log("Session is not being recorded due to lack of device id.");return}this.eventsManager&&e&&this.eventsManager.sendStoredEvents({deviceId:n}),this.recordEvents()},t.prototype.shouldOptOut=function(){var e,r,n;if(!((e=this.config)===null||e===void 0)&&e.instanceName){var i=dr(this.config.instanceName).identityStore;n=i.getIdentity().optOut}return n!==void 0?n:(r=this.config)===null||r===void 0?void 0:r.optOut},t.prototype.getShouldRecord=function(){if(!this.identifiers||!this.config||!this.identifiers.sessionId)return this.loggerProvider.warn("Session is not being recorded due to lack of config, please call sessionReplay.init."),!1;if(!this.config.captureEnabled)return this.loggerProvider.log("Session ".concat(this.identifiers.sessionId," not being captured due to capture being disabled for project or because the remote config could not be fetched.")),!1;if(this.shouldOptOut())return this.loggerProvider.log("Opting session ".concat(this.identifiers.sessionId," out of recording due to optOut config.")),!1;var e=Fi(this.identifiers.sessionId,this.config.sampleRate);return e||this.loggerProvider.log("Opting session ".concat(this.identifiers.sessionId," out of recording due to sample rate.")),e},t.prototype.getBlockSelectors=function(){var e,r,n,i=(n=(r=(e=this.config)===null||e===void 0?void 0:e.privacyConfig)===null||r===void 0?void 0:r.blockSelector)!==null&&n!==void 0?n:[];if(i.length!==0)return i},t.prototype.getMaskTextSelectors=function(){var e,r,n,i;if(((r=(e=this.config)===null||e===void 0?void 0:e.privacyConfig)===null||r===void 0?void 0:r.defaultMaskLevel)==="conservative")return"*";var o=(i=(n=this.config)===null||n===void 0?void 0:n.privacyConfig)===null||i===void 0?void 0:i.maskSelector;if(o)return o},t.prototype.recordEvents=function(){var e=this,r,n=this.getShouldRecord(),i=(r=this.identifiers)===null||r===void 0?void 0:r.sessionId;if(!(!n||!i||!this.config)){this.stopRecordingEvents();var o=this.config.privacyConfig;this.loggerProvider.log("Session Replay capture beginning."),this.recordCancelCallback=Se({emit:function(a){if(e.shouldOptOut()){e.loggerProvider.log("Opting session ".concat(i," out of recording due to optOut config.")),e.stopRecordingEvents(),e.sendEvents();return}var c=JSON.stringify(a),s=e.getDeviceId();e.eventsManager&&s&&e.eventsManager.addEvent({event:{type:"replay",data:c},sessionId:i,deviceId:s})},packFn:Vr,inlineStylesheet:this.config.shouldInlineStylesheet,hooks:{mouseInteraction:this.eventsManager&&mo({eventsManager:this.eventsManager,sessionId:i,deviceIdFn:this.getDeviceId.bind(this)}),scroll:this.scrollHook},maskAllInputs:!0,maskTextClass:Mt,blockClass:Dn,blockSelector:this.getBlockSelectors(),maskInputFn:jr("input",o),maskTextFn:jr("text",o),maskTextSelector:this.getMaskTextSelectors(),recordCanvas:!1,errorHandler:function(a){var c=a;if(c.message.includes("insertRule")&&c.message.includes("CSSStyleSheet")||c._external_)throw c;return e.loggerProvider.warn("Error while capturing replay: ",c.toString()),!0}}),this.addCustomRRWebEvent(Rt.DEBUG_INFO)}},t.prototype.getDeviceId=function(){var e,r,n;if(!((e=this.config)===null||e===void 0)&&e.instanceName){var i=dr(this.config.instanceName).identityStore;n=i.getIdentity().deviceId}return n||((r=this.identifiers)===null||r===void 0?void 0:r.deviceId)},t.prototype.getSessionId=function(){var e;return(e=this.identifiers)===null||e===void 0?void 0:e.sessionId},t.prototype.flush=function(e){var r;return e===void 0&&(e=!1),k(this,void 0,void 0,function(){return x(this,function(n){return[2,(r=this.eventsManager)===null||r===void 0?void 0:r.flush(e)]})})},t.prototype.shutdown=function(){this.teardownEventListeners(!0),this.stopRecordingEvents(),this.sendEvents()},t}();var Ye=function(t){return function(){var e=t.config,r=e||br(),n=r.loggerProvider,i=r.logLevel;return{logger:n,logLevel:i}}},oa=function(){var t=new yo;return{init:Oe(t.init.bind(t),"init",Ye(t)),setSessionId:Oe(t.setSessionId.bind(t),"setSessionId",Ye(t)),getSessionId:Oe(t.getSessionId.bind(t),"getSessionId",Ye(t)),getSessionReplayProperties:Oe(t.getSessionReplayProperties.bind(t),"getSessionReplayProperties",Ye(t)),flush:Oe(t.flush.bind(t),"flush",Ye(t)),shutdown:Oe(t.shutdown.bind(t),"shutdown",Ye(t))}},ze=oa();
6var So=ze.init,bo=ze.setSessionId,wo=ze.getSessionId,un=ze.getSessionReplayProperties,Su=ze.flush,Io=ze.shutdown;var dn="1.6.22";var aa=function(){function t(e){this.name="@amplitude/plugin-session-replay-browser",this.type="enrichment",this.options=O({},e),this.options.forceSessionTracking!==!1&&(this.options.forceSessionTracking=!0)}return t.prototype.setup=function(e){var r,n,i,o;return k(this,void 0,void 0,function(){return x(this,function(a){switch(a.label){case 0:return e.loggerProvider.log("Installing @amplitude/plugin-session-replay, version ".concat(dn,".")),this.config=e,this.options.forceSessionTracking&&(typeof e.defaultTracking=="boolean"?e.defaultTracking===!1&&(e.defaultTracking={pageViews:!1,formInteractions:!1,fileDownloads:!1,sessions:!0}):e.defaultTracking=O(O({},e.defaultTracking),{sessions:!0})),[4,So(e.apiKey,{instanceName:this.config.instanceName,deviceId:this.config.deviceId,optOut:this.config.optOut,sessionId:this.config.sessionId,loggerProvider:this.config.loggerProvider,logLevel:this.config.logLevel,flushMaxRetries:this.config.flushMaxRetries,serverZone:this.config.serverZone,sampleRate:this.options.sampleRate,privacyConfig:{blockSelector:(r=this.options.privacyConfig)===null||r===void 0?void 0:r.blockSelector,maskSelector:(n=this.options.privacyConfig)===null||n===void 0?void 0:n.maskSelector,unmaskSelector:(i=this.options.privacyConfig)===null||i===void 0?void 0:i.unmaskSelector,defaultMaskLevel:(o=this.options.privacyConfig)===null||o===void 0?void 0:o.defaultMaskLevel},debugMode:this.options.debugMode,configEndpointUrl:this.options.configEndpointUrl,shouldInlineStylesheet:this.options.shouldInlineStylesheet,version:{type:"plugin",version:dn}}).promise];case 1:return a.sent(),[2]}})})},t.prototype.execute=function(e){return k(this,void 0,void 0,function(){var r;return x(this,function(n){switch(n.label){case 0:return this.config.sessionId&&this.config.sessionId!==wo()?[4,bo(this.config.sessionId).promise]:[3,2];case 1:n.sent(),n.label=2;case 2:return this.config.sessionId&&this.config.sessionId===e.session_id&&(r=un(),e.event_properties=O(O({},e.event_properties),r)),[2,Promise.resolve(e)]}})})},t.prototype.teardown=function(){return k(this,void 0,void 0,function(){return x(this,function(e){return Io(),this.config=null,[2]})})},t.prototype.getSessionReplayProperties=function(){return un()},t}();var sr=function(t){return new aa(t)};var Nu=(()=>{let e=class e extends nt{constructor(){super(...arguments),this.loaded$=new pn(1)}enableTracking(){return Ze(this,null,function*(){try{if(yield this.load(Me(ge({},tt.amplitude.loadOptions),{disabled:!1})).promise,this.client?.setOptOut(!1),tt.amplitude.sessionReply){let n=sr(tt.amplitude.sessionReply);yield this.client?.add(n).promise}this.loaded$.next(!0)}catch{this.loaded$.next(!1)}})}disableTracking(){return Ze(this,null,function*(){try{this.isLoaded&&(this.client?.setOptOut(!0),yield this.load(Me(ge({},tt.amplitude.loadOptions),{disabled:!0})).promise)}catch{}this.loaded$.next(!1)})}reset(){this.isLoaded&&this.client?.reset()}deviceId(){return this.loaded$.pipe(gn(1),mn(n=>n&&this.isLoaded&&this.client?.getDeviceId()||void 0))}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=yn(e)))(o||e)}})(),e.\u0275prov=vn({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();export{Nu as a};
7/**i18n:223b62bb93d2a3e7bd7733f57a7bc04723744db96c93dcac397d58c320eb8b7b*/

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.