iris-recorder 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";var Iris=(()=>{var ut=Object.defineProperty;var aa=Object.getOwnPropertyDescriptor;var la=Object.getOwnPropertyNames;var ua=Object.prototype.hasOwnProperty;var ca=(e,t,r)=>t in e?ut(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var fa=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var ha=(e,t)=>{for(var r in t)ut(e,r,{get:t[r],enumerable:!0})},da=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of la(t))!ua.call(e,n)&&n!==r&&ut(e,n,{get:()=>t[n],enumerable:!(s=aa(t,n))||s.enumerable});return e};var pa=e=>da(ut({},"__esModule",{value:!0}),e);var Ae=(e,t,r)=>ca(e,typeof t!="symbol"?t+"":t,r);var cc={};ha(cc,{currentSessionId:()=>Qt,record:()=>uc});function ct(e){let r=Zn(e,1,{keys:32});return r&&Object.keys(r).length>0?r:void 0}function Zn(e,t,r){if(typeof e!="object"||e===null||Array.isArray(e))return;let s={};for(let[n,o]of Object.entries(e)){if(r.keys<=0)break;let c=n.slice(0,64);if(c){if(typeof o=="string")s[c]=o.slice(0,300),r.keys-=1;else if(typeof o=="number"||typeof o=="boolean")s[c]=String(o),r.keys-=1;else if(typeof o=="object"&&o!==null&&!Array.isArray(o)&&t<3){r.keys-=1;let p=Zn(o,t+1,r);p&&Object.keys(p).length>0?s[c]=p:r.keys+=1}}}return s}function ft(e){for(let t of["id","userId","email","username","name"]){let r=e[t];if(typeof r=="string"&&r)return r}for(let t of Object.values(e))if(typeof t=="string"&&t)return t}var Kt="iris.sid",ma=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Zt(e){return typeof e=="string"&&ma.test(e)}function Qt(){try{let e=sessionStorage.getItem(Kt);return Zt(e)?e:void 0}catch(e){return}}function ga(e){try{if(Zt(e))return sessionStorage.setItem(Kt,e),e;let t=Qt();if(t)return t;let r=crypto.randomUUID();return sessionStorage.setItem(Kt,r),r}catch(t){return Zt(e)?e:crypto.randomUUID()}}function Qn(e,t,r){let s=ct(typeof t=="string"?{id:t}:t);return{sessionId:ga(r),user:s,userId:s?ft(s):void 0,release:e,startedAt:Date.now(),url:location.href,userAgent:navigator.userAgent}}var is=fa("module"),ya=(0,is.createRequire)("/"),Fe,va,wa;try{Fe=ya("worker_threads"),va=Fe.Worker,wa=Fe.isMarkedAsUntransferable}catch(e){}var ce=Uint8Array,de=Uint16Array,ir=Int32Array,or=new ce([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]),ar=new ce([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]),es=new ce([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),os=function(e,t){for(var r=new de(31),s=0;s<31;++s)r[s]=t+=1<<e[s-1];for(var n=new ir(r[30]),s=1;s<30;++s)for(var o=r[s];o<r[s+1];++o)n[o]=o-r[s]<<5|s;return{b:r,r:n}},Fe=os(or,2),ba=Fe.b,tr=Fe.r;ba[28]=258,tr[258]=28;var as=os(ar,0),mc=as.b,ts=as.r,rr=new de(32768);for(V=0;V<32768;++V)xe=(V&43690)>>1|(V&21845)<<1,xe=(xe&52428)>>2|(xe&13107)<<2,xe=(xe&61680)>>4|(xe&3855)<<4,rr[V]=((xe&65280)>>8|(xe&255)<<8)>>1;var xe,V,Je=(function(e,t,r){for(var s=e.length,n=0,o=new de(t);n<s;++n)e[n]&&++o[e[n]-1];var c=new de(t);for(n=1;n<t;++n)c[n]=c[n-1]+o[n-1]<<1;var p;if(r){p=new de(1<<t);var a=15-t;for(n=0;n<s;++n)if(e[n])for(var d=n<<4|e[n],i=t-e[n],h=c[e[n]-1]++<<i,u=h|(1<<i)-1;h<=u;++h)p[rr[h]>>a]=d}else for(p=new de(s),n=0;n<s;++n)e[n]&&(p[n]=rr[c[e[n]-1]++]>>15-e[n]);return p}),De=new ce(288);for(V=0;V<144;++V)De[V]=8;var V;for(V=144;V<256;++V)De[V]=9;var V;for(V=256;V<280;++V)De[V]=7;var V;for(V=280;V<288;++V)De[V]=8;var V,ht=new ce(32);for(V=0;V<32;++V)ht[V]=5;var V,Sa=Je(De,9,0);var Ca=Je(ht,5,0);var ls=function(e){return(e+7)/8|0},us=function(e,t,r){return(t==null||t<0)&&(t=0),(r==null||r>e.length)&&(r=e.length),new ce(e.subarray(t,r))};var Ee=function(e,t,r){r<<=t&7;var s=t/8|0;e[s]|=r,e[s+1]|=r>>8},Ye=function(e,t,r){r<<=t&7;var s=t/8|0;e[s]|=r,e[s+1]|=r>>8,e[s+2]|=r>>16},er=function(e,t){for(var r=[],s=0;s<e.length;++s)e[s]&&r.push({s,f:e[s]});var n=r.length,o=r.slice();if(!n)return{t:fs,l:0};if(n==1){var c=new ce(r[0].s+1);return c[r[0].s]=1,{t:c,l:1}}r.sort(function(b,y){return b.f-y.f}),r.push({s:-1,f:25001});var p=r[0],a=r[1],d=0,i=1,h=2;for(r[0]={s:-1,f:p.f+a.f,l:p,r:a};i!=n-1;)p=r[r[d].f<r[h].f?d++:h++],a=r[d!=i&&r[d].f<r[h].f?d++:h++],r[i++]={s:-1,f:p.f+a.f,l:p,r:a};for(var u=o[0].s,s=1;s<n;++s)o[s].s>u&&(u=o[s].s);var l=new de(u+1),m=nr(r[i-1],l,0);if(m>t){var s=0,f=0,g=m-t,C=1<<g;for(o.sort(function(y,v){return l[v.s]-l[y.s]||y.f-v.f});s<n;++s){var w=o[s].s;if(l[w]>t)f+=C-(1<<m-l[w]),l[w]=t;else break}for(f>>=g;f>0;){var S=o[s].s;l[S]<t?f-=1<<t-l[S]++-1:++s}for(;s>=0&&f;--s){var E=o[s].s;l[E]==t&&(--l[E],++f)}m=t}return{t:new ce(l),l:m}},nr=function(e,t,r){return e.s==-1?Math.max(nr(e.l,t,r+1),nr(e.r,t,r+1)):t[e.s]=r},rs=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new de(++t),s=0,n=e[0],o=1,c=function(a){r[s++]=a},p=1;p<=t;++p)if(e[p]==n&&p!=t)++o;else{if(!n&&o>2){for(;o>138;o-=138)c(32754);o>2&&(c(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(c(n),--o;o>6;o-=6)c(8304);o>2&&(c(o-3<<5|8208),o=0)}for(;o--;)c(n);o=1,n=e[p]}return{c:r.subarray(0,s),n:t}},Xe=function(e,t){for(var r=0,s=0;s<t.length;++s)r+=e[s]*t[s];return r},cs=function(e,t,r){var s=r.length,n=ls(t+2);e[n]=s&255,e[n+1]=s>>8,e[n+2]=e[n]^255,e[n+3]=e[n+1]^255;for(var o=0;o<s;++o)e[n+o+4]=r[o];return(n+4+s)*8},ns=function(e,t,r,s,n,o,c,p,a,d,i){Ee(t,i++,r),++n[256];for(var h=er(n,15),u=h.t,l=h.l,m=er(o,15),f=m.t,g=m.l,C=rs(u),w=C.c,S=C.n,E=rs(f),b=E.c,y=E.n,v=new de(19),x=0;x<w.length;++x)++v[w[x]&31];for(var x=0;x<b.length;++x)++v[b[x]&31];for(var I=er(v,7),R=I.t,A=I.l,O=19;O>4&&!R[es[O-1]];--O);var M=d+5<<3,P=Xe(n,De)+Xe(o,ht)+c,U=Xe(n,u)+Xe(o,f)+c+14+3*O+Xe(v,R)+2*v[16]+3*v[17]+7*v[18];if(a>=0&&M<=P&&M<=U)return cs(t,i,e.subarray(a,a+d));var k,T,_,Y;if(Ee(t,i,1+(U<P)),i+=2,U<P){k=Je(u,l,0),T=u,_=Je(f,g,0),Y=f;var H=Je(R,A,0);Ee(t,i,S-257),Ee(t,i+5,y-1),Ee(t,i+10,O-4),i+=14;for(var x=0;x<O;++x)Ee(t,i+3*x,R[es[x]]);i+=3*O;for(var F=[w,b],ne=0;ne<2;++ne)for(var N=F[ne],x=0;x<N.length;++x){var K=N[x]&31;Ee(t,i,H[K]),i+=R[K],K>15&&(Ee(t,i,N[x]>>5&127),i+=N[x]>>12)}}else k=Sa,T=De,_=Ca,Y=ht;for(var x=0;x<p;++x){var z=s[x];if(z>255){var K=z>>18&31;Ye(t,i,k[K+257]),i+=T[K+257],K>7&&(Ee(t,i,z>>23&31),i+=or[K]);var ie=z&31;Ye(t,i,_[ie]),i+=Y[ie],ie>3&&(Ye(t,i,z>>5&8191),i+=ar[ie])}else Ye(t,i,k[z]),i+=T[z]}return Ye(t,i,k[256]),i+T[256]},xa=new ir([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),fs=new ce(0),Ea=function(e,t,r,s,n,o){var c=o.z||e.length,p=new ce(s+c+5*(1+Math.ceil(c/7e3))+n),a=p.subarray(s,p.length-n),d=o.l,i=(o.r||0)&7;if(t){i&&(a[0]=o.r>>3);for(var h=xa[t-1],u=h>>13,l=h&8191,m=(1<<r)-1,f=o.p||new de(32768),g=o.h||new de(m+1),C=Math.ceil(r/3),w=2*C,S=function(X){return(e[X]^e[X+1]<<C^e[X+2]<<w)&m},E=new ir(25e3),b=new de(288),y=new de(32),v=0,x=0,I=o.i||0,R=0,A=o.w||0,O=0;I+2<c;++I){var M=S(I),P=I&32767,U=g[M];if(f[P]=U,g[M]=P,A<=I){var k=c-I;if((v>7e3||R>24576)&&(k>423||!d)){i=ns(e,a,0,E,b,y,x,R,O,I-O,i),R=v=x=0,O=I;for(var T=0;T<286;++T)b[T]=0;for(var T=0;T<30;++T)y[T]=0}var _=2,Y=0,H=l,F=P-U&32767;if(k>2&&M==S(I-F))for(var ne=Math.min(u,k)-1,N=Math.min(32767,I),K=Math.min(258,k);F<=N&&--H&&P!=U;){if(e[I+_]==e[I+_-F]){for(var z=0;z<K&&e[I+z]==e[I+z-F];++z);if(z>_){if(_=z,Y=F,z>ne)break;for(var ie=Math.min(F,z-2),se=0,T=0;T<ie;++T){var ae=I-F+T&32767,Ce=f[ae],me=ae-Ce&32767;me>se&&(se=me,U=ae)}}}P=U,U=f[P],F+=P-U&32767}if(Y){E[R++]=268435456|tr[_]<<18|ts[Y];var L=tr[_]&31,ee=ts[Y]&31;x+=or[L]+ar[ee],++b[257+L],++y[ee],A=I+_,++v}else E[R++]=e[I],++b[e[I]]}}for(I=Math.max(I,A);I<c;++I)E[R++]=e[I],++b[e[I]];i=ns(e,a,d,E,b,y,x,R,O,I-O,i),d||(o.r=i&7|a[i/8|0]<<3,i-=7,o.h=g,o.p=f,o.i=I,o.w=A)}else{for(var I=o.w||0;I<c+d;I+=65535){var j=I+65535;j>=c&&(a[i/8|0]=d,j=c),i=cs(a,i+1,e.subarray(I,j))}o.i=c}return us(p,0,s+ls(i)+n)},Ma=(function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,s=9;--s;)r=(r&1&&-306674912)^r>>>1;e[t]=r}return e})(),Ra=function(){var e=-1;return{p:function(t){for(var r=e,s=0;s<t.length;++s)r=Ma[r&255^t[s]]^r>>>8;e=r},d:function(){return~e}}};var Ia=function(e,t,r,s,n){if(!n&&(n={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),c=new ce(o.length+e.length);c.set(o),c.set(e,o.length),e=c,n.w=o.length}return Ea(e,t.level==null?6:t.level,t.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,s,n)};var sr=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},Oa=function(e,t){var r=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:t.level==9?2:0,e[9]=3,t.mtime!=0&&sr(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){e[3]=8;for(var s=0;s<=r.length;++s)e[s+10]=r.charCodeAt(s)}};var Na=function(e){return 10+(e.filename?e.filename.length+1:0)};function hs(e,t){t||(t={});var r=Ra(),s=e.length;r.p(e);var n=Ia(e,t,Na(t),8),o=n.length;return Oa(n,t),sr(n,o-8,r.d()),sr(n,o-4,s),n}var ss=typeof TextEncoder!="undefined"&&new TextEncoder,Aa=typeof TextDecoder!="undefined"&&new TextDecoder,Da=0;try{Aa.decode(fs,{stream:!0}),Da=1}catch(e){}function ds(e,t){if(t){for(var r=new ce(e.length),s=0;s<e.length;++s)r[s]=e.charCodeAt(s);return r}if(ss)return ss.encode(e);for(var n=e.length,o=new ce(e.length+(e.length>>1)),c=0,p=function(i){o[c++]=i},s=0;s<n;++s){if(c+5>o.length){var a=new ce(c+8+(n-s<<1));a.set(o),o=a}var d=e.charCodeAt(s);d<128||t?p(d):d<2048?(p(192|d>>6),p(128|d&63)):d>55295&&d<57344?(d=65536+(d&1047552)|e.charCodeAt(++s)&1023,p(240|d>>18),p(128|d>>12&63),p(128|d>>6&63),p(128|d&63)):(p(224|d>>12),p(128|d>>6&63),p(128|d&63))}return us(o,0,c)}var dt=class{constructor(t){Ae(this,"opts",t);Ae(this,"queue",[]);Ae(this,"bytes",0);Ae(this,"timer");Ae(this,"flushBytes");Ae(this,"maxBytes",4e6);var r,s;this.flushBytes=(r=t.flushBytes)!=null?r:64e3,this.timer=setInterval(()=>this.flush(!1),(s=t.flushMs)!=null?s:5e3),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&this.flush(!0)}),addEventListener("pagehide",()=>this.flush(!0))}push(t){this.queue.push(t),this.bytes+=ps(t),this.bytes>=this.flushBytes&&this.flush(!1)}flush(t){if(this.queue.length===0)return;let r=this.queue;this.queue=[],this.bytes=0;let s={meta:this.opts.meta,events:r},n=hs(ds(JSON.stringify(s))),o=`${this.opts.endpoint}/v1/ingest`;if(this.log(`flush via ${t?"beacon":"fetch"}: ${r.length} events, ${n.length}b gz \u2192 ${o}`),t&&"sendBeacon"in navigator){let c=!1;try{c=navigator.sendBeacon(o,new Blob([n],{type:"application/octet-stream"}))}catch(p){c=!1}c||(this.log("beacon refused \u2014 re-queueing"),this.requeue(r));return}fetch(o,{method:"POST",body:n,keepalive:t,headers:{"content-encoding":"gzip","content-type":"application/octet-stream","x-iris-key":this.opts.projectKey}}).then(c=>{this.log(`ingest responded ${c.status}`),c.ok||this.requeue(r)}).catch(c=>{this.log("ingest request failed",c),this.requeue(r)})}identify(t){var s;let r=ct(typeof t=="string"?{id:t}:t);r&&(this.opts.meta.user=r,this.opts.meta.userId=ft(r),this.log(`identified as ${(s=this.opts.meta.userId)!=null?s:"(unnamed user)"}`))}log(...t){this.opts.debug&&console.debug("[iris]",...t)}requeue(t){let r=t.concat(this.queue),s=0;for(let n of r)s+=ps(n);s>this.maxBytes||(this.queue=r,this.bytes=s)}stop(){this.timer&&clearInterval(this.timer),this.flush(!0)}};function ps(e){return JSON.stringify(e).length}var Ta=["authorization","cookie","set-cookie","proxy-authorization","x-api-key","x-auth-token","x-csrf-token","x-xsrf-token"],ka=/pass(word|wd)?|secret|token|api[-_]?key|auth|credential|session|cvv|card[-_]?(number|num)?|ssn|pin/i;var _a="[redacted]",Ke="[masked]";function Ue(e={}){var l,m,f,g;let t=new Set([...Ta,...((l=e.redactHeaders)!=null?l:[]).map(C=>C.toLowerCase())]),r=(m=e.maskKeys)!=null?m:ka,s=new Set(((f=e.maskExtraKeys)!=null?f:[]).map(C=>C.toLowerCase())),n=C=>r.test(C)||s.has(C.toLowerCase()),o=(g=e.maxBodyChars)!=null?g:1e4,c=()=>typeof location!="undefined"?location.href:void 0,p=C=>{try{let w=new URL(C,c()),S=!1;for(let E of[...w.searchParams.keys()])n(E)&&(w.searchParams.set(E,Ke),S=!0);return S?w.toString():C}catch(w){return C}},a=C=>{let w={};for(let S of Object.keys(C))w[S]=t.has(S.toLowerCase())?_a:C[S];return w},d=C=>{if(Array.isArray(C))return C.map(d);if(C&&typeof C=="object"){let w={};for(let[S,E]of Object.entries(C))w[S]=n(S)?Ke:d(E);return w}return C},i=(C,w=o)=>C.length>w?`${C.slice(0,w)}\u2026[+${C.length-w} chars]`:C;return{maskUrl:p,maskHeaders:a,maskBody:(C,w=o)=>{if(C==null||C==="")return;let S=String(C),E;try{E=JSON.stringify(d(JSON.parse(S)))}catch(b){if(/^[^={}\s]+=[^&]*(?:&[^=]+=[^&]*)*$/.test(S))try{let y=new URLSearchParams(S);for(let v of[...y.keys()])n(v)&&y.set(v,Ke);E=y.toString()}catch(y){E=S}else E=S}return i(E,w)},maskObject:C=>d(C),truncate:i,isMaskedKey:n,maxBodyChars:o}}var La=500,Pa=8e3,Fa=120;function ms(e,t={},r={}){var a,d;let s=Ue(t),n=(a=r.maxEvents)!=null?a:La,o=(d=r.maxPropsChars)!=null?d:Pa,c=0,p=!1;return(i,h)=>{try{let u=typeof i=="string"?i.trim().slice(0,Fa):"";if(!u)return;if(c>=n){p||(p=!0,console.warn(`[iris] track() budget exhausted (${n} events) \u2014 further events are dropped`));return}c++;let l={type:"custom",ts:Date.now(),name:u};if(h!=null&&typeof h=="object"){let m=null,f=1/0;try{m=s.maskObject(h),f=JSON.stringify(m).length}catch(g){m=null}l.props=m!=null&&f<=o?m:{"[iris]":`props dropped (${Number.isFinite(f)?`${f} chars > ${o}`:"not serializable"})`}}e(l)}catch(u){}}}var Ua=Object.defineProperty,Ba=(e,t,r)=>t in e?Ua(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,D=(e,t,r)=>Ba(e,typeof t!="symbol"?t+"":t,r),gs,za=Object.defineProperty,$a=(e,t,r)=>t in e?za(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ys=(e,t,r)=>$a(e,typeof t!="symbol"?t+"":t,r),re=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(re||{}),vs={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ws={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},pt={},zi={},Wa=()=>!!globalThis.Zone;function On(e){if(pt[e])return pt[e];let t=globalThis[e],r=t.prototype,s=e in vs?vs[e]:void 0,n=!!(s&&s.every(p=>{var a,d;return!!((d=(a=Object.getOwnPropertyDescriptor(r,p))==null?void 0:a.get)!=null&&d.toString().includes("[native code]"))})),o=e in ws?ws[e]:void 0,c=!!(o&&o.every(p=>{var a;return typeof r[p]=="function"&&((a=r[p])==null?void 0:a.toString().includes("[native code]"))}));if(n&&c&&!Wa())return pt[e]=t.prototype,t.prototype;try{let p=document.createElement("iframe");p.style.display="none",document.body.appendChild(p);let a=p.contentWindow;if(!a)return t.prototype;let d=a[e].prototype;if(!d)return p.remove(),r;let i=navigator.userAgent;return i.includes("Safari")&&!i.includes("Chrome")?(p.classList.add("rr-block"),p.setAttribute("__rrwebUntaintedMutationObserver",""),zi[e]=()=>p.remove()):p.remove(),pt[e]=d}catch(p){return r}}var lr={};function Re(e,t,r){var s;let n=`${e}.${String(r)}`;if(lr[n])return lr[n].call(t);let o=On(e),c=(s=Object.getOwnPropertyDescriptor(o,r))==null?void 0:s.get;return c?(lr[n]=c,c.call(t)):t[r]}var ur={};function $i(e,t,r){let s=`${e}.${String(r)}`;if(ur[s])return ur[s].bind(t);let o=On(e)[r];return typeof o!="function"?t[r]:(ur[s]=o,o.bind(t))}function qa(e){return Re("Node",e,"ownerDocument")}function ja(e){return Re("Node",e,"childNodes")}function Va(e){return Re("Node",e,"parentNode")}function Ha(e){return Re("Node",e,"parentElement")}function Ga(e){return Re("Node",e,"textContent")}function Ya(e,t){return $i("Node",e,"contains")(t)}function Xa(e){return $i("Node",e,"getRootNode")()}function Ja(e){return!e||!("host"in e)?null:Re("ShadowRoot",e,"host")}function Ka(e){return e.styleSheets}function Za(e){return!e||!("shadowRoot"in e)?null:Re("Element",e,"shadowRoot")}function Qa(e,t){return Re("Element",e,"querySelector")(t)}function el(e,t){return Re("Element",e,"querySelectorAll")(t)}function tl(){var e;return[On("MutationObserver").constructor,(e=zi.MutationObserver)!=null?e:(()=>{})]}var Wi=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Wi=()=>new Date().getTime());function rl(e,t,r){try{if(!(t in e))return()=>{};let s=e[t],n=r(s);return typeof n=="function"&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=n,()=>{e[t]=s}}catch(s){return()=>{}}}var oe={ownerDocument:qa,childNodes:ja,parentNode:Va,parentElement:Ha,textContent:Ga,contains:Ya,getRootNode:Xa,host:Ja,styleSheets:Ka,shadowRoot:Za,querySelector:Qa,querySelectorAll:el,nowTimestamp:Wi,mutationObserverCtor:tl,patch:rl};function qi(e){return e.nodeType===e.ELEMENT_NODE}function Qe(e){let t=e&&"host"in e&&"mode"in e&&oe.host(e)||null;return!!(t&&"shadowRoot"in t&&oe.shadowRoot(t)===e)}function et(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function nl(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function sl(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function mn(e){try{let t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);let s=Array.from(t,n=>ji(n,r)).join("");return nl(s)}catch(t){return null}}function ji(e,t){if(ol(e)){let r;try{r=mn(e.styleSheet)||sl(e)}catch(s){r=e.cssText}return e.styleSheet.href?Ot(r,e.styleSheet.href):r}else{let r=e.cssText;return al(e)&&e.selectorText.includes(":")&&(r=il(r)),t?Ot(r,t):r}}function il(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function ol(e){return"styleSheet"in e}function al(e){return"selectorText"in e}var Mt=class{constructor(){ys(this,"idNodeMap",new Map),ys(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;let s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){let s=this.getNode(t);if(s){let n=this.nodeMetaMap.get(s);n&&this.nodeMetaMap.set(r,n)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function ll(){return new Mt}function Rt({element:e,maskInputOptions:t,tagName:r,type:s,value:n,maskInputFn:o}){let c=n||"",p=s&&ke(s);return(t[r.toLowerCase()]||p&&t[p])&&(o?c=o(c,e):c="*".repeat(c.length)),c}function ke(e){return e.toLowerCase()}var bs="__rrweb_original__";function ul(e){let t=e.getContext("2d");if(!t)return!0;let r=50;for(let s=0;s<e.width;s+=r)for(let n=0;n<e.height;n+=r){let o=t.getImageData,c=bs in o?o[bs]:o;if(new Uint32Array(c.call(t,s,n,Math.min(r,e.width-s),Math.min(r,e.height-n)).data.buffer).some(a=>a!==0))return!1}return!0}function It(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?ke(t):null}function Vi(e,t){var o;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(c){return null}let s=/\.([0-9a-z]+)(?:$)/i,n=r.pathname.match(s);return(o=n==null?void 0:n[1])!=null?o:null}function cl(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var fl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,hl=/^(?:[a-z+]+:)?\/\//i,dl=/^www\..*/i,pl=/^(data:)([^,]*),(.*)/i;function Ot(e,t){return(e||"").replace(fl,(r,s,n,o,c,p)=>{let a=n||c||p,d=s||o||"";if(!a)return r;if(hl.test(a)||dl.test(a))return`url(${d}${a}${d})`;if(pl.test(a))return`url(${d}${a}${d})`;if(a[0]==="/")return`url(${d}${cl(t)+a}${d})`;let i=t.split("/"),h=a.split("/");i.pop();for(let u of h)u!=="."&&(u===".."?i.pop():i.push(u));return`url(${d}${i.join("/")}${d})`})}function mt(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function ml(e,t,r=!1){let s=Array.from(t.childNodes),n=[],o=0;if(s.length>1&&e&&typeof e=="string"){let c=mt(e,r),p=c.length/e.length;for(let a=1;a<s.length;a++)if(s[a].textContent&&typeof s[a].textContent=="string"){let d=mt(s[a].textContent,r),i=100,h=3;for(;h<d.length&&(d[h].match(/[a-zA-Z0-9]/)||d.indexOf(d.substring(0,h),1)!==-1);h++);for(;h<d.length;h++){let u=d.substring(0,h),l=c.split(u),m=-1;if(l.length===2)m=l[0].length;else if(l.length>2&&l[0]===""&&s[a-1].textContent!=="")m=c.indexOf(u,1);else if(l.length===1){if(u=u.substring(0,u.length-1),l=c.split(u),l.length<=1)return n.push(e),n;h=i+1}else h===d.length-1&&(m=c.indexOf(u));if(l.length>=2&&h>i){let f=s[a-1].textContent;if(f&&typeof f=="string"){let g=mt(f).length;m=c.indexOf(u,g)}m===-1&&(m=l[0].length)}if(m!==-1){let f=Math.floor(m/p);for(;f>0&&f<e.length;){if(o+=1,o>50*s.length)return n.push(e),n;let g=mt(e.substring(0,f),r);if(g.length===m){n.push(e.substring(0,f)),e=e.substring(f),c=c.substring(m);break}else g.length<m?f+=Math.max(1,Math.floor((m-g.length)/p)):f-=Math.max(1,Math.floor((g.length-m)*p))}break}}}}return n.push(e),n}function gl(e,t){return ml(e,t).join("/* rr_split */")}var yl=1,vl=new RegExp("[^a-z0-9-_:]"),rt=-2;function Hi(){return yl++}function wl(e){if(e instanceof HTMLFormElement)return"form";let t=ke(e.tagName);return vl.test(t)?"div":t}var Be,Ss,bl=/^[^ \t\n\r\u000c]+/,Sl=/^[, \t\n\r\u000c]+/;function Cl(e,t){if(t.trim()==="")return t;let r=0;function s(o){let c,p=o.exec(t.substring(r));return p?(c=p[0],r+=c.length,c):""}let n=[];for(;s(Sl),!(r>=t.length);){let o=s(bl);if(o.slice(-1)===",")o=We(e,o.substring(0,o.length-1)),n.push(o);else{let c="";o=We(e,o);let p=!1;for(;;){let a=t.charAt(r);if(a===""){n.push((o+c).trim());break}else if(p)a===")"&&(p=!1);else if(a===","){r+=1,n.push((o+c).trim());break}else a==="("&&(p=!0);c+=a,r+=1}}}return n.join(", ")}var Cs=new WeakMap;function We(e,t){return!t||t.trim()===""?t:Nn(e,t)}function xl(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Nn(e,t){let r=Cs.get(e);if(r||(r=e.createElement("a"),Cs.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function Gi(e,t,r,s){return s&&(r==="src"||r==="href"&&!(t==="use"&&s[0]==="#")||r==="xlink:href"&&s[0]!=="#"||r==="background"&&["table","td","th"].includes(t)?We(e,s):r==="srcset"?Cl(e,s):r==="style"?Ot(s,Nn(e)):t==="object"&&r==="data"?We(e,s):s)}function Yi(e,t,r){return["video","audio"].includes(e)&&t==="autoplay"}function El(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){let n=e.classList[s];if(t.test(n))return!0}if(r)return e.matches(r)}catch(s){}return!1}function Nt(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Nt(oe.parentNode(e),t,r):!1;for(let s=e.classList.length;s--;){let n=e.classList[s];if(t.test(n))return!0}return r?Nt(oe.parentNode(e),t,r):!1}function Xi(e,t,r,s){let n;if(qi(e)){if(n=e,!oe.childNodes(n).length)return!1}else{if(oe.parentElement(e)===null)return!1;n=oe.parentElement(e)}try{if(typeof t=="string"){if(s){if(n.closest(`.${t}`))return!0}else if(n.classList.contains(t))return!0}else if(Nt(n,t,s))return!0;if(r){if(s){if(n.closest(r))return!0}else if(n.matches(r))return!0}}catch(o){}return!1}function Ml(e,t,r){let s=e.contentWindow;if(!s)return;let n=!1,o;try{o=s.document.readyState}catch(p){return}if(o!=="complete"){let p=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(p),n=!0,t()});return}let c="about:blank";if(s.location.href!==c||e.src===c||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Rl(e,t,r){let s=!1,n;try{n=e.sheet}catch(c){return}if(n)return;let o=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(o),s=!0,t()})}function Il(e,t){let{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:c,inlineStylesheet:p,maskInputOptions:a={},maskTextFn:d,maskInputFn:i,dataURLOptions:h={},inlineImages:u,recordCanvas:l,keepIframeSrcFn:m,newlyAddedElement:f=!1,cssCaptured:g=!1}=t,C=Ol(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:re.Document,childNodes:[],compatMode:e.compatMode}:{type:re.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:re.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:C};case e.ELEMENT_NODE:return Al(e,{doc:r,blockClass:n,blockSelector:o,inlineStylesheet:p,maskInputOptions:a,maskInputFn:i,dataURLOptions:h,inlineImages:u,recordCanvas:l,keepIframeSrcFn:m,newlyAddedElement:f,rootId:C});case e.TEXT_NODE:return Nl(e,{doc:r,needsMask:c,maskTextFn:d,rootId:C,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:re.CDATA,textContent:"",rootId:C};case e.COMMENT_NODE:return{type:re.Comment,textContent:oe.textContent(e)||"",rootId:C};default:return!1}}function Ol(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return r===1?void 0:r}function Nl(e,t){let{needsMask:r,maskTextFn:s,rootId:n,cssCaptured:o}=t,c=oe.parentNode(e),p=c&&c.tagName,a="",d=p==="STYLE"?!0:void 0,i=p==="SCRIPT"?!0:void 0;return i?a="SCRIPT_PLACEHOLDER":o||(a=oe.textContent(e),d&&a&&(a=Ot(a,Nn(t.doc)))),!d&&!i&&a&&r&&(a=s?s(a,oe.parentElement(e)):a.replace(/[\S]/g,"*")),{type:re.Text,textContent:a||"",rootId:n}}function Al(e,t){let{doc:r,blockClass:s,blockSelector:n,inlineStylesheet:o,maskInputOptions:c={},maskInputFn:p,dataURLOptions:a={},inlineImages:d,recordCanvas:i,keepIframeSrcFn:h,newlyAddedElement:u=!1,rootId:l}=t,m=El(e,s,n),f=wl(e),g={},C=e.attributes.length;for(let S=0;S<C;S++){let E=e.attributes[S];Yi(f,E.name,E.value)||(g[E.name]=Gi(r,f,ke(E.name),E.value))}if(f==="link"&&o){let S=Array.from(r.styleSheets).find(b=>b.href===e.href),E=null;S&&(E=mn(S)),E&&(delete g.rel,delete g.href,g._cssText=E)}if(f==="style"&&e.sheet){let S=mn(e.sheet);S&&(e.childNodes.length>1&&(S=gl(S,e)),g._cssText=S)}if(["input","textarea","select"].includes(f)){let S=e.value,E=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&S?g.value=Rt({element:e,type:It(e),tagName:f,value:S,maskInputOptions:c,maskInputFn:p}):E&&(g.checked=E)}if(f==="option"&&(e.selected&&!c.select?g.selected=!0:delete g.selected),f==="dialog"&&e.open&&(g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),f==="canvas"&&i){if(e.__context==="2d")ul(e)||(g.rr_dataURL=e.toDataURL(a.type,a.quality));else if(!("__context"in e)){let S=e.toDataURL(a.type,a.quality),E=r.createElement("canvas");E.width=e.width,E.height=e.height;let b=E.toDataURL(a.type,a.quality);S!==b&&(g.rr_dataURL=S)}}if(f==="img"&&d){Be||(Be=r.createElement("canvas"),Ss=Be.getContext("2d"));let S=e,E=S.currentSrc||S.getAttribute("src")||"<unknown-src>",b=S.crossOrigin,y=()=>{S.removeEventListener("load",y);try{Be.width=S.naturalWidth,Be.height=S.naturalHeight,Ss.drawImage(S,0,0),g.rr_dataURL=Be.toDataURL(a.type,a.quality)}catch(v){if(S.crossOrigin!=="anonymous"){S.crossOrigin="anonymous",S.complete&&S.naturalWidth!==0?y():S.addEventListener("load",y);return}else console.warn(`Cannot inline img src=${E}! Error: ${v}`)}S.crossOrigin==="anonymous"&&(b?g.crossOrigin=b:S.removeAttribute("crossorigin"))};S.complete&&S.naturalWidth!==0?y():S.addEventListener("load",y)}if(["audio","video"].includes(f)){let S=g;S.rr_mediaState=e.paused?"paused":"played",S.rr_mediaCurrentTime=e.currentTime,S.rr_mediaPlaybackRate=e.playbackRate,S.rr_mediaMuted=e.muted,S.rr_mediaLoop=e.loop,S.rr_mediaVolume=e.volume}if(u||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),m){let{width:S,height:E}=e.getBoundingClientRect();g={class:g.class,rr_width:`${S}px`,rr_height:`${E}px`}}f==="iframe"&&!h(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let w;try{customElements.get(f)&&(w=!0)}catch(S){}return{type:re.Element,tagName:f,attributes:g,childNodes:[],isSVG:xl(e)||void 0,needBlock:m,rootId:l,isCustom:w}}function J(e){return e==null?"":e.toLowerCase()}function Ji(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function Dl(e,t){if(t.comment&&e.type===re.Comment)return!0;if(e.type===re.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Vi(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(J(e.attributes.name).match(/^msapplication-tile(image|color)$/)||J(e.attributes.name)==="application-name"||J(e.attributes.rel)==="icon"||J(e.attributes.rel)==="apple-touch-icon"||J(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&J(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(J(e.attributes.property).match(/^(og|twitter|fb):/)||J(e.attributes.name).match(/^(og|twitter):/)||J(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(J(e.attributes.name)==="robots"||J(e.attributes.name)==="googlebot"||J(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(J(e.attributes.name)==="author"||J(e.attributes.name)==="generator"||J(e.attributes.name)==="framework"||J(e.attributes.name)==="publisher"||J(e.attributes.name)==="progid"||J(e.attributes.property).match(/^article:/)||J(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(J(e.attributes.name)==="google-site-verification"||J(e.attributes.name)==="yandex-verification"||J(e.attributes.name)==="csrf-token"||J(e.attributes.name)==="p:domain_verify"||J(e.attributes.name)==="verify-v1"||J(e.attributes.name)==="verification"||J(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function qe(e,t){let{doc:r,mirror:s,blockClass:n,blockSelector:o,maskTextClass:c,maskTextSelector:p,skipChild:a=!1,inlineStylesheet:d=!0,maskInputOptions:i={},maskTextFn:h,maskInputFn:u,slimDOMOptions:l,dataURLOptions:m={},inlineImages:f=!1,recordCanvas:g=!1,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:S=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:b=5e3,keepIframeSrcFn:y=()=>!1,newlyAddedElement:v=!1,cssCaptured:x=!1}=t,{needsMask:I}=t,{preserveWhiteSpace:R=!0}=t;I||(I=Xi(e,c,p,I===void 0));let A=Il(e,{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:I,inlineStylesheet:d,maskInputOptions:i,maskTextFn:h,maskInputFn:u,dataURLOptions:m,inlineImages:f,recordCanvas:g,keepIframeSrcFn:y,newlyAddedElement:v,cssCaptured:x});if(!A)return console.warn(e,"not serialized"),null;let O;s.hasNode(e)?O=s.getId(e):Dl(A,l)||!R&&A.type===re.Text&&!A.textContent.replace(/^\s+|\s+$/gm,"").length?O=rt:O=Hi();let M=Object.assign(A,{id:O});if(s.add(e,M),O===rt)return null;C&&C(e);let P=!a;if(M.type===re.Element){P=P&&!M.needBlock,delete M.needBlock;let k=oe.shadowRoot(e);k&&et(k)&&(M.isShadowHost=!0)}if((M.type===re.Document||M.type===re.Element)&&P){l.headWhitespace&&M.type===re.Element&&M.tagName==="head"&&(R=!1);let k={doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:I,maskTextClass:c,maskTextSelector:p,skipChild:a,inlineStylesheet:d,maskInputOptions:i,maskTextFn:h,maskInputFn:u,slimDOMOptions:l,dataURLOptions:m,inlineImages:f,recordCanvas:g,preserveWhiteSpace:R,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:b,keepIframeSrcFn:y,cssCaptured:!1};if(!(M.type===re.Element&&M.tagName==="textarea"&&M.attributes.value!==void 0)){M.type===re.Element&&M.attributes._cssText!==void 0&&typeof M.attributes._cssText=="string"&&(k.cssCaptured=!0);for(let _ of Array.from(oe.childNodes(e))){let Y=qe(_,k);Y&&M.childNodes.push(Y)}}let T=null;if(qi(e)&&(T=oe.shadowRoot(e)))for(let _ of Array.from(oe.childNodes(T))){let Y=qe(_,k);Y&&(et(T)&&(Y.isShadow=!0),M.childNodes.push(Y))}}let U=oe.parentNode(e);return U&&Qe(U)&&et(U)&&(M.isShadow=!0),M.type===re.Element&&M.tagName==="iframe"&&Ml(e,()=>{let k=e.contentDocument;if(k&&w){let T=qe(k,{doc:k,mirror:s,blockClass:n,blockSelector:o,needsMask:I,maskTextClass:c,maskTextSelector:p,skipChild:!1,inlineStylesheet:d,maskInputOptions:i,maskTextFn:h,maskInputFn:u,slimDOMOptions:l,dataURLOptions:m,inlineImages:f,recordCanvas:g,preserveWhiteSpace:R,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:b,keepIframeSrcFn:y});T&&w(e,T)}},S),M.type===re.Element&&M.tagName==="link"&&typeof M.attributes.rel=="string"&&(M.attributes.rel==="stylesheet"||M.attributes.rel==="preload"&&typeof M.attributes.href=="string"&&Vi(M.attributes.href)==="css")&&Rl(e,()=>{if(E){let k=qe(e,{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:I,maskTextClass:c,maskTextSelector:p,skipChild:!1,inlineStylesheet:d,maskInputOptions:i,maskTextFn:h,maskInputFn:u,slimDOMOptions:l,dataURLOptions:m,inlineImages:f,recordCanvas:g,preserveWhiteSpace:R,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:b,keepIframeSrcFn:y});k&&E(e,k)}},b),M}function Tl(e,t){let{mirror:r=new Mt,blockClass:s="rr-block",blockSelector:n=null,maskTextClass:o="rr-mask",maskTextSelector:c=null,inlineStylesheet:p=!0,inlineImages:a=!1,recordCanvas:d=!1,maskAllInputs:i=!1,maskTextFn:h,maskInputFn:u,slimDOM:l=!1,dataURLOptions:m,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:b=()=>!1}=t,y=i===!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}:i===!1?{password:!0}:i,v=Ji(l);return qe(e,{doc:e,mirror:r,blockClass:s,blockSelector:n,maskTextClass:o,maskTextSelector:c,skipChild:!1,inlineStylesheet:p,maskInputOptions:y,maskTextFn:h,maskInputFn:u,slimDOMOptions:v,dataURLOptions:m,inlineImages:a,recordCanvas:d,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:b,newlyAddedElement:!1})}var kl=/(max|min)-device-(width|height)/,Ec=new RegExp(kl.source,"g");function _l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ll(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,n.get?n:{enumerable:!0,get:function(){return e[s]}})}),r}var gt={exports:{}},xs;function Pl(){if(xs)return gt.exports;xs=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return gt.exports=t(),gt.exports.createColors=t,gt.exports}var Fl={},Ul=Object.freeze(Object.defineProperty({__proto__:null,default:Fl},Symbol.toStringTag,{value:"Module"})),ye=Ll(Ul),cr,Es;function An(){if(Es)return cr;Es=1;let e=Pl(),t=ye;class r extends Error{constructor(n,o,c,p,a,d){super(n),this.name="CssSyntaxError",this.reason=n,a&&(this.file=a),p&&(this.source=p),d&&(this.plugin=d),typeof o!="undefined"&&typeof c!="undefined"&&(typeof o=="number"?(this.line=o,this.column=c):(this.line=o.line,this.column=o.column,this.endLine=c.line,this.endColumn=c.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(n){if(!this.source)return"";let o=this.source;n==null&&(n=e.isColorSupported),t&&n&&(o=t(o));let c=o.split(/\r?\n/),p=Math.max(this.line-3,0),a=Math.min(this.line+2,c.length),d=String(a).length,i,h;if(n){let{bold:u,gray:l,red:m}=e.createColors(!0);i=f=>u(m(f)),h=f=>l(f)}else i=h=u=>u;return c.slice(p,a).map((u,l)=>{let m=p+1+l,f=" "+(" "+m).slice(-d)+" | ";if(m===this.line){let g=h(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+h(f)+u+`
1
+ "use strict";var Iris=(()=>{var ut=Object.defineProperty;var aa=Object.getOwnPropertyDescriptor;var la=Object.getOwnPropertyNames;var ua=Object.prototype.hasOwnProperty;var ca=(e,t,r)=>t in e?ut(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var fa=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var ha=(e,t)=>{for(var r in t)ut(e,r,{get:t[r],enumerable:!0})},da=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of la(t))!ua.call(e,n)&&n!==r&&ut(e,n,{get:()=>t[n],enumerable:!(s=aa(t,n))||s.enumerable});return e};var pa=e=>da(ut({},"__esModule",{value:!0}),e);var Ae=(e,t,r)=>ca(e,typeof t!="symbol"?t+"":t,r);var cc={};ha(cc,{currentSessionId:()=>Qt,record:()=>uc});function ct(e){let r=Zn(e,1,{keys:32});return r&&Object.keys(r).length>0?r:void 0}function Zn(e,t,r){if(typeof e!="object"||e===null||Array.isArray(e))return;let s={};for(let[n,o]of Object.entries(e)){if(r.keys<=0)break;let c=n.slice(0,64);if(c){if(typeof o=="string")s[c]=o.slice(0,300),r.keys-=1;else if(typeof o=="number"||typeof o=="boolean")s[c]=String(o),r.keys-=1;else if(typeof o=="object"&&o!==null&&!Array.isArray(o)&&t<3){r.keys-=1;let p=Zn(o,t+1,r);p&&Object.keys(p).length>0?s[c]=p:r.keys+=1}}}return s}function ft(e){for(let t of["id","userId","email","username","name"]){let r=e[t];if(typeof r=="string"&&r)return r}for(let t of Object.values(e))if(typeof t=="string"&&t)return t}var Kt="iris.sid",ma=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Zt(e){return typeof e=="string"&&ma.test(e)}function Qt(){try{let e=sessionStorage.getItem(Kt);return Zt(e)?e:void 0}catch(e){return}}function ga(e){try{if(Zt(e))return sessionStorage.setItem(Kt,e),e;let t=Qt();if(t)return t;let r=crypto.randomUUID();return sessionStorage.setItem(Kt,r),r}catch(t){return Zt(e)?e:crypto.randomUUID()}}function Qn(e,t,r){let s=ct(typeof t=="string"?{id:t}:t);return{sessionId:ga(r),user:s,userId:s?ft(s):void 0,release:e,startedAt:Date.now(),url:location.href,userAgent:navigator.userAgent}}var is=fa("module"),ya=(0,is.createRequire)("/"),Fe,va,wa;try{Fe=ya("worker_threads"),va=Fe.Worker,wa=Fe.isMarkedAsUntransferable}catch(e){}var ce=Uint8Array,de=Uint16Array,ir=Int32Array,or=new ce([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]),ar=new ce([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]),es=new ce([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),os=function(e,t){for(var r=new de(31),s=0;s<31;++s)r[s]=t+=1<<e[s-1];for(var n=new ir(r[30]),s=1;s<30;++s)for(var o=r[s];o<r[s+1];++o)n[o]=o-r[s]<<5|s;return{b:r,r:n}},Fe=os(or,2),ba=Fe.b,tr=Fe.r;ba[28]=258,tr[258]=28;var as=os(ar,0),mc=as.b,ts=as.r,rr=new de(32768);for(V=0;V<32768;++V)xe=(V&43690)>>1|(V&21845)<<1,xe=(xe&52428)>>2|(xe&13107)<<2,xe=(xe&61680)>>4|(xe&3855)<<4,rr[V]=((xe&65280)>>8|(xe&255)<<8)>>1;var xe,V,Je=(function(e,t,r){for(var s=e.length,n=0,o=new de(t);n<s;++n)e[n]&&++o[e[n]-1];var c=new de(t);for(n=1;n<t;++n)c[n]=c[n-1]+o[n-1]<<1;var p;if(r){p=new de(1<<t);var a=15-t;for(n=0;n<s;++n)if(e[n])for(var d=n<<4|e[n],i=t-e[n],h=c[e[n]-1]++<<i,u=h|(1<<i)-1;h<=u;++h)p[rr[h]>>a]=d}else for(p=new de(s),n=0;n<s;++n)e[n]&&(p[n]=rr[c[e[n]-1]++]>>15-e[n]);return p}),De=new ce(288);for(V=0;V<144;++V)De[V]=8;var V;for(V=144;V<256;++V)De[V]=9;var V;for(V=256;V<280;++V)De[V]=7;var V;for(V=280;V<288;++V)De[V]=8;var V,ht=new ce(32);for(V=0;V<32;++V)ht[V]=5;var V,Sa=Je(De,9,0);var Ca=Je(ht,5,0);var ls=function(e){return(e+7)/8|0},us=function(e,t,r){return(t==null||t<0)&&(t=0),(r==null||r>e.length)&&(r=e.length),new ce(e.subarray(t,r))};var Ee=function(e,t,r){r<<=t&7;var s=t/8|0;e[s]|=r,e[s+1]|=r>>8},Ye=function(e,t,r){r<<=t&7;var s=t/8|0;e[s]|=r,e[s+1]|=r>>8,e[s+2]|=r>>16},er=function(e,t){for(var r=[],s=0;s<e.length;++s)e[s]&&r.push({s,f:e[s]});var n=r.length,o=r.slice();if(!n)return{t:fs,l:0};if(n==1){var c=new ce(r[0].s+1);return c[r[0].s]=1,{t:c,l:1}}r.sort(function(b,y){return b.f-y.f}),r.push({s:-1,f:25001});var p=r[0],a=r[1],d=0,i=1,h=2;for(r[0]={s:-1,f:p.f+a.f,l:p,r:a};i!=n-1;)p=r[r[d].f<r[h].f?d++:h++],a=r[d!=i&&r[d].f<r[h].f?d++:h++],r[i++]={s:-1,f:p.f+a.f,l:p,r:a};for(var u=o[0].s,s=1;s<n;++s)o[s].s>u&&(u=o[s].s);var l=new de(u+1),m=nr(r[i-1],l,0);if(m>t){var s=0,f=0,g=m-t,C=1<<g;for(o.sort(function(y,v){return l[v.s]-l[y.s]||y.f-v.f});s<n;++s){var w=o[s].s;if(l[w]>t)f+=C-(1<<m-l[w]),l[w]=t;else break}for(f>>=g;f>0;){var S=o[s].s;l[S]<t?f-=1<<t-l[S]++-1:++s}for(;s>=0&&f;--s){var E=o[s].s;l[E]==t&&(--l[E],++f)}m=t}return{t:new ce(l),l:m}},nr=function(e,t,r){return e.s==-1?Math.max(nr(e.l,t,r+1),nr(e.r,t,r+1)):t[e.s]=r},rs=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new de(++t),s=0,n=e[0],o=1,c=function(a){r[s++]=a},p=1;p<=t;++p)if(e[p]==n&&p!=t)++o;else{if(!n&&o>2){for(;o>138;o-=138)c(32754);o>2&&(c(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(c(n),--o;o>6;o-=6)c(8304);o>2&&(c(o-3<<5|8208),o=0)}for(;o--;)c(n);o=1,n=e[p]}return{c:r.subarray(0,s),n:t}},Xe=function(e,t){for(var r=0,s=0;s<t.length;++s)r+=e[s]*t[s];return r},cs=function(e,t,r){var s=r.length,n=ls(t+2);e[n]=s&255,e[n+1]=s>>8,e[n+2]=e[n]^255,e[n+3]=e[n+1]^255;for(var o=0;o<s;++o)e[n+o+4]=r[o];return(n+4+s)*8},ns=function(e,t,r,s,n,o,c,p,a,d,i){Ee(t,i++,r),++n[256];for(var h=er(n,15),u=h.t,l=h.l,m=er(o,15),f=m.t,g=m.l,C=rs(u),w=C.c,S=C.n,E=rs(f),b=E.c,y=E.n,v=new de(19),x=0;x<w.length;++x)++v[w[x]&31];for(var x=0;x<b.length;++x)++v[b[x]&31];for(var I=er(v,7),R=I.t,A=I.l,O=19;O>4&&!R[es[O-1]];--O);var M=d+5<<3,P=Xe(n,De)+Xe(o,ht)+c,U=Xe(n,u)+Xe(o,f)+c+14+3*O+Xe(v,R)+2*v[16]+3*v[17]+7*v[18];if(a>=0&&M<=P&&M<=U)return cs(t,i,e.subarray(a,a+d));var k,T,_,Y;if(Ee(t,i,1+(U<P)),i+=2,U<P){k=Je(u,l,0),T=u,_=Je(f,g,0),Y=f;var H=Je(R,A,0);Ee(t,i,S-257),Ee(t,i+5,y-1),Ee(t,i+10,O-4),i+=14;for(var x=0;x<O;++x)Ee(t,i+3*x,R[es[x]]);i+=3*O;for(var F=[w,b],ne=0;ne<2;++ne)for(var N=F[ne],x=0;x<N.length;++x){var K=N[x]&31;Ee(t,i,H[K]),i+=R[K],K>15&&(Ee(t,i,N[x]>>5&127),i+=N[x]>>12)}}else k=Sa,T=De,_=Ca,Y=ht;for(var x=0;x<p;++x){var z=s[x];if(z>255){var K=z>>18&31;Ye(t,i,k[K+257]),i+=T[K+257],K>7&&(Ee(t,i,z>>23&31),i+=or[K]);var ie=z&31;Ye(t,i,_[ie]),i+=Y[ie],ie>3&&(Ye(t,i,z>>5&8191),i+=ar[ie])}else Ye(t,i,k[z]),i+=T[z]}return Ye(t,i,k[256]),i+T[256]},xa=new ir([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),fs=new ce(0),Ea=function(e,t,r,s,n,o){var c=o.z||e.length,p=new ce(s+c+5*(1+Math.ceil(c/7e3))+n),a=p.subarray(s,p.length-n),d=o.l,i=(o.r||0)&7;if(t){i&&(a[0]=o.r>>3);for(var h=xa[t-1],u=h>>13,l=h&8191,m=(1<<r)-1,f=o.p||new de(32768),g=o.h||new de(m+1),C=Math.ceil(r/3),w=2*C,S=function(X){return(e[X]^e[X+1]<<C^e[X+2]<<w)&m},E=new ir(25e3),b=new de(288),y=new de(32),v=0,x=0,I=o.i||0,R=0,A=o.w||0,O=0;I+2<c;++I){var M=S(I),P=I&32767,U=g[M];if(f[P]=U,g[M]=P,A<=I){var k=c-I;if((v>7e3||R>24576)&&(k>423||!d)){i=ns(e,a,0,E,b,y,x,R,O,I-O,i),R=v=x=0,O=I;for(var T=0;T<286;++T)b[T]=0;for(var T=0;T<30;++T)y[T]=0}var _=2,Y=0,H=l,F=P-U&32767;if(k>2&&M==S(I-F))for(var ne=Math.min(u,k)-1,N=Math.min(32767,I),K=Math.min(258,k);F<=N&&--H&&P!=U;){if(e[I+_]==e[I+_-F]){for(var z=0;z<K&&e[I+z]==e[I+z-F];++z);if(z>_){if(_=z,Y=F,z>ne)break;for(var ie=Math.min(F,z-2),se=0,T=0;T<ie;++T){var ae=I-F+T&32767,Ce=f[ae],me=ae-Ce&32767;me>se&&(se=me,U=ae)}}}P=U,U=f[P],F+=P-U&32767}if(Y){E[R++]=268435456|tr[_]<<18|ts[Y];var L=tr[_]&31,ee=ts[Y]&31;x+=or[L]+ar[ee],++b[257+L],++y[ee],A=I+_,++v}else E[R++]=e[I],++b[e[I]]}}for(I=Math.max(I,A);I<c;++I)E[R++]=e[I],++b[e[I]];i=ns(e,a,d,E,b,y,x,R,O,I-O,i),d||(o.r=i&7|a[i/8|0]<<3,i-=7,o.h=g,o.p=f,o.i=I,o.w=A)}else{for(var I=o.w||0;I<c+d;I+=65535){var j=I+65535;j>=c&&(a[i/8|0]=d,j=c),i=cs(a,i+1,e.subarray(I,j))}o.i=c}return us(p,0,s+ls(i)+n)},Ma=(function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,s=9;--s;)r=(r&1&&-306674912)^r>>>1;e[t]=r}return e})(),Ra=function(){var e=-1;return{p:function(t){for(var r=e,s=0;s<t.length;++s)r=Ma[r&255^t[s]]^r>>>8;e=r},d:function(){return~e}}};var Ia=function(e,t,r,s,n){if(!n&&(n={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),c=new ce(o.length+e.length);c.set(o),c.set(e,o.length),e=c,n.w=o.length}return Ea(e,t.level==null?6:t.level,t.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,s,n)};var sr=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},Oa=function(e,t){var r=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:t.level==9?2:0,e[9]=3,t.mtime!=0&&sr(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){e[3]=8;for(var s=0;s<=r.length;++s)e[s+10]=r.charCodeAt(s)}};var Na=function(e){return 10+(e.filename?e.filename.length+1:0)};function hs(e,t){t||(t={});var r=Ra(),s=e.length;r.p(e);var n=Ia(e,t,Na(t),8),o=n.length;return Oa(n,t),sr(n,o-8,r.d()),sr(n,o-4,s),n}var ss=typeof TextEncoder!="undefined"&&new TextEncoder,Aa=typeof TextDecoder!="undefined"&&new TextDecoder,Da=0;try{Aa.decode(fs,{stream:!0}),Da=1}catch(e){}function ds(e,t){if(t){for(var r=new ce(e.length),s=0;s<e.length;++s)r[s]=e.charCodeAt(s);return r}if(ss)return ss.encode(e);for(var n=e.length,o=new ce(e.length+(e.length>>1)),c=0,p=function(i){o[c++]=i},s=0;s<n;++s){if(c+5>o.length){var a=new ce(c+8+(n-s<<1));a.set(o),o=a}var d=e.charCodeAt(s);d<128||t?p(d):d<2048?(p(192|d>>6),p(128|d&63)):d>55295&&d<57344?(d=65536+(d&1047552)|e.charCodeAt(++s)&1023,p(240|d>>18),p(128|d>>12&63),p(128|d>>6&63),p(128|d&63)):(p(224|d>>12),p(128|d>>6&63),p(128|d&63))}return us(o,0,c)}var dt=class{constructor(t){Ae(this,"opts",t);Ae(this,"queue",[]);Ae(this,"bytes",0);Ae(this,"timer");Ae(this,"flushBytes");Ae(this,"maxBytes",4e6);var r,s;this.flushBytes=(r=t.flushBytes)!=null?r:64e3,this.timer=setInterval(()=>this.flush(!1),(s=t.flushMs)!=null?s:5e3),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&this.flush(!0)}),addEventListener("pagehide",()=>this.flush(!0))}push(t){this.queue.push(t),this.bytes+=ps(t),this.bytes>=this.flushBytes&&this.flush(!1)}flush(t){if(this.queue.length===0)return;let r=this.queue;this.queue=[],this.bytes=0;let s={meta:this.opts.meta,events:r},n=hs(ds(JSON.stringify(s))),o=`${this.opts.endpoint}/v1/ingest`;if(this.log(`flush via ${t?"beacon":"fetch"}: ${r.length} events, ${n.length}b gz \u2192 ${o}`),t&&"sendBeacon"in navigator){let c=!1;try{let p=`${o}?k=${encodeURIComponent(this.opts.projectKey)}`;c=navigator.sendBeacon(p,new Blob([n],{type:"text/plain"}))}catch(p){c=!1}c||(this.log("beacon refused \u2014 re-queueing"),this.requeue(r));return}fetch(o,{method:"POST",body:n,keepalive:t,headers:{"content-encoding":"gzip","content-type":"application/octet-stream","x-iris-key":this.opts.projectKey}}).then(c=>{this.log(`ingest responded ${c.status}`),c.ok||this.requeue(r)}).catch(c=>{this.log("ingest request failed",c),this.requeue(r)})}identify(t){var s;let r=ct(typeof t=="string"?{id:t}:t);r&&(this.opts.meta.user=r,this.opts.meta.userId=ft(r),this.log(`identified as ${(s=this.opts.meta.userId)!=null?s:"(unnamed user)"}`))}log(...t){this.opts.debug&&console.debug("[iris]",...t)}requeue(t){let r=t.concat(this.queue),s=0;for(let n of r)s+=ps(n);s>this.maxBytes||(this.queue=r,this.bytes=s)}stop(){this.timer&&clearInterval(this.timer),this.flush(!0)}};function ps(e){return JSON.stringify(e).length}var Ta=["authorization","cookie","set-cookie","proxy-authorization","x-api-key","x-auth-token","x-csrf-token","x-xsrf-token"],ka=/pass(word|wd)?|secret|token|api[-_]?key|auth|credential|session|cvv|card[-_]?(number|num)?|ssn|pin/i;var _a="[redacted]",Ke="[masked]";function Ue(e={}){var l,m,f,g;let t=new Set([...Ta,...((l=e.redactHeaders)!=null?l:[]).map(C=>C.toLowerCase())]),r=(m=e.maskKeys)!=null?m:ka,s=new Set(((f=e.maskExtraKeys)!=null?f:[]).map(C=>C.toLowerCase())),n=C=>r.test(C)||s.has(C.toLowerCase()),o=(g=e.maxBodyChars)!=null?g:1e4,c=()=>typeof location!="undefined"?location.href:void 0,p=C=>{try{let w=new URL(C,c()),S=!1;for(let E of[...w.searchParams.keys()])n(E)&&(w.searchParams.set(E,Ke),S=!0);return S?w.toString():C}catch(w){return C}},a=C=>{let w={};for(let S of Object.keys(C))w[S]=t.has(S.toLowerCase())?_a:C[S];return w},d=C=>{if(Array.isArray(C))return C.map(d);if(C&&typeof C=="object"){let w={};for(let[S,E]of Object.entries(C))w[S]=n(S)?Ke:d(E);return w}return C},i=(C,w=o)=>C.length>w?`${C.slice(0,w)}\u2026[+${C.length-w} chars]`:C;return{maskUrl:p,maskHeaders:a,maskBody:(C,w=o)=>{if(C==null||C==="")return;let S=String(C),E;try{E=JSON.stringify(d(JSON.parse(S)))}catch(b){if(/^[^={}\s]+=[^&]*(?:&[^=]+=[^&]*)*$/.test(S))try{let y=new URLSearchParams(S);for(let v of[...y.keys()])n(v)&&y.set(v,Ke);E=y.toString()}catch(y){E=S}else E=S}return i(E,w)},maskObject:C=>d(C),truncate:i,isMaskedKey:n,maxBodyChars:o}}var La=500,Pa=8e3,Fa=120;function ms(e,t={},r={}){var a,d;let s=Ue(t),n=(a=r.maxEvents)!=null?a:La,o=(d=r.maxPropsChars)!=null?d:Pa,c=0,p=!1;return(i,h)=>{try{let u=typeof i=="string"?i.trim().slice(0,Fa):"";if(!u)return;if(c>=n){p||(p=!0,console.warn(`[iris] track() budget exhausted (${n} events) \u2014 further events are dropped`));return}c++;let l={type:"custom",ts:Date.now(),name:u};if(h!=null&&typeof h=="object"){let m=null,f=1/0;try{m=s.maskObject(h),f=JSON.stringify(m).length}catch(g){m=null}l.props=m!=null&&f<=o?m:{"[iris]":`props dropped (${Number.isFinite(f)?`${f} chars > ${o}`:"not serializable"})`}}e(l)}catch(u){}}}var Ua=Object.defineProperty,Ba=(e,t,r)=>t in e?Ua(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,D=(e,t,r)=>Ba(e,typeof t!="symbol"?t+"":t,r),gs,za=Object.defineProperty,$a=(e,t,r)=>t in e?za(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ys=(e,t,r)=>$a(e,typeof t!="symbol"?t+"":t,r),re=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(re||{}),vs={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ws={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},pt={},zi={},Wa=()=>!!globalThis.Zone;function On(e){if(pt[e])return pt[e];let t=globalThis[e],r=t.prototype,s=e in vs?vs[e]:void 0,n=!!(s&&s.every(p=>{var a,d;return!!((d=(a=Object.getOwnPropertyDescriptor(r,p))==null?void 0:a.get)!=null&&d.toString().includes("[native code]"))})),o=e in ws?ws[e]:void 0,c=!!(o&&o.every(p=>{var a;return typeof r[p]=="function"&&((a=r[p])==null?void 0:a.toString().includes("[native code]"))}));if(n&&c&&!Wa())return pt[e]=t.prototype,t.prototype;try{let p=document.createElement("iframe");p.style.display="none",document.body.appendChild(p);let a=p.contentWindow;if(!a)return t.prototype;let d=a[e].prototype;if(!d)return p.remove(),r;let i=navigator.userAgent;return i.includes("Safari")&&!i.includes("Chrome")?(p.classList.add("rr-block"),p.setAttribute("__rrwebUntaintedMutationObserver",""),zi[e]=()=>p.remove()):p.remove(),pt[e]=d}catch(p){return r}}var lr={};function Re(e,t,r){var s;let n=`${e}.${String(r)}`;if(lr[n])return lr[n].call(t);let o=On(e),c=(s=Object.getOwnPropertyDescriptor(o,r))==null?void 0:s.get;return c?(lr[n]=c,c.call(t)):t[r]}var ur={};function $i(e,t,r){let s=`${e}.${String(r)}`;if(ur[s])return ur[s].bind(t);let o=On(e)[r];return typeof o!="function"?t[r]:(ur[s]=o,o.bind(t))}function qa(e){return Re("Node",e,"ownerDocument")}function ja(e){return Re("Node",e,"childNodes")}function Va(e){return Re("Node",e,"parentNode")}function Ha(e){return Re("Node",e,"parentElement")}function Ga(e){return Re("Node",e,"textContent")}function Ya(e,t){return $i("Node",e,"contains")(t)}function Xa(e){return $i("Node",e,"getRootNode")()}function Ja(e){return!e||!("host"in e)?null:Re("ShadowRoot",e,"host")}function Ka(e){return e.styleSheets}function Za(e){return!e||!("shadowRoot"in e)?null:Re("Element",e,"shadowRoot")}function Qa(e,t){return Re("Element",e,"querySelector")(t)}function el(e,t){return Re("Element",e,"querySelectorAll")(t)}function tl(){var e;return[On("MutationObserver").constructor,(e=zi.MutationObserver)!=null?e:(()=>{})]}var Wi=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Wi=()=>new Date().getTime());function rl(e,t,r){try{if(!(t in e))return()=>{};let s=e[t],n=r(s);return typeof n=="function"&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=n,()=>{e[t]=s}}catch(s){return()=>{}}}var oe={ownerDocument:qa,childNodes:ja,parentNode:Va,parentElement:Ha,textContent:Ga,contains:Ya,getRootNode:Xa,host:Ja,styleSheets:Ka,shadowRoot:Za,querySelector:Qa,querySelectorAll:el,nowTimestamp:Wi,mutationObserverCtor:tl,patch:rl};function qi(e){return e.nodeType===e.ELEMENT_NODE}function Qe(e){let t=e&&"host"in e&&"mode"in e&&oe.host(e)||null;return!!(t&&"shadowRoot"in t&&oe.shadowRoot(t)===e)}function et(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function nl(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function sl(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function mn(e){try{let t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);let s=Array.from(t,n=>ji(n,r)).join("");return nl(s)}catch(t){return null}}function ji(e,t){if(ol(e)){let r;try{r=mn(e.styleSheet)||sl(e)}catch(s){r=e.cssText}return e.styleSheet.href?Ot(r,e.styleSheet.href):r}else{let r=e.cssText;return al(e)&&e.selectorText.includes(":")&&(r=il(r)),t?Ot(r,t):r}}function il(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function ol(e){return"styleSheet"in e}function al(e){return"selectorText"in e}var Mt=class{constructor(){ys(this,"idNodeMap",new Map),ys(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;let s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){let s=this.getNode(t);if(s){let n=this.nodeMetaMap.get(s);n&&this.nodeMetaMap.set(r,n)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function ll(){return new Mt}function Rt({element:e,maskInputOptions:t,tagName:r,type:s,value:n,maskInputFn:o}){let c=n||"",p=s&&ke(s);return(t[r.toLowerCase()]||p&&t[p])&&(o?c=o(c,e):c="*".repeat(c.length)),c}function ke(e){return e.toLowerCase()}var bs="__rrweb_original__";function ul(e){let t=e.getContext("2d");if(!t)return!0;let r=50;for(let s=0;s<e.width;s+=r)for(let n=0;n<e.height;n+=r){let o=t.getImageData,c=bs in o?o[bs]:o;if(new Uint32Array(c.call(t,s,n,Math.min(r,e.width-s),Math.min(r,e.height-n)).data.buffer).some(a=>a!==0))return!1}return!0}function It(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?ke(t):null}function Vi(e,t){var o;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(c){return null}let s=/\.([0-9a-z]+)(?:$)/i,n=r.pathname.match(s);return(o=n==null?void 0:n[1])!=null?o:null}function cl(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var fl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,hl=/^(?:[a-z+]+:)?\/\//i,dl=/^www\..*/i,pl=/^(data:)([^,]*),(.*)/i;function Ot(e,t){return(e||"").replace(fl,(r,s,n,o,c,p)=>{let a=n||c||p,d=s||o||"";if(!a)return r;if(hl.test(a)||dl.test(a))return`url(${d}${a}${d})`;if(pl.test(a))return`url(${d}${a}${d})`;if(a[0]==="/")return`url(${d}${cl(t)+a}${d})`;let i=t.split("/"),h=a.split("/");i.pop();for(let u of h)u!=="."&&(u===".."?i.pop():i.push(u));return`url(${d}${i.join("/")}${d})`})}function mt(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function ml(e,t,r=!1){let s=Array.from(t.childNodes),n=[],o=0;if(s.length>1&&e&&typeof e=="string"){let c=mt(e,r),p=c.length/e.length;for(let a=1;a<s.length;a++)if(s[a].textContent&&typeof s[a].textContent=="string"){let d=mt(s[a].textContent,r),i=100,h=3;for(;h<d.length&&(d[h].match(/[a-zA-Z0-9]/)||d.indexOf(d.substring(0,h),1)!==-1);h++);for(;h<d.length;h++){let u=d.substring(0,h),l=c.split(u),m=-1;if(l.length===2)m=l[0].length;else if(l.length>2&&l[0]===""&&s[a-1].textContent!=="")m=c.indexOf(u,1);else if(l.length===1){if(u=u.substring(0,u.length-1),l=c.split(u),l.length<=1)return n.push(e),n;h=i+1}else h===d.length-1&&(m=c.indexOf(u));if(l.length>=2&&h>i){let f=s[a-1].textContent;if(f&&typeof f=="string"){let g=mt(f).length;m=c.indexOf(u,g)}m===-1&&(m=l[0].length)}if(m!==-1){let f=Math.floor(m/p);for(;f>0&&f<e.length;){if(o+=1,o>50*s.length)return n.push(e),n;let g=mt(e.substring(0,f),r);if(g.length===m){n.push(e.substring(0,f)),e=e.substring(f),c=c.substring(m);break}else g.length<m?f+=Math.max(1,Math.floor((m-g.length)/p)):f-=Math.max(1,Math.floor((g.length-m)*p))}break}}}}return n.push(e),n}function gl(e,t){return ml(e,t).join("/* rr_split */")}var yl=1,vl=new RegExp("[^a-z0-9-_:]"),rt=-2;function Hi(){return yl++}function wl(e){if(e instanceof HTMLFormElement)return"form";let t=ke(e.tagName);return vl.test(t)?"div":t}var Be,Ss,bl=/^[^ \t\n\r\u000c]+/,Sl=/^[, \t\n\r\u000c]+/;function Cl(e,t){if(t.trim()==="")return t;let r=0;function s(o){let c,p=o.exec(t.substring(r));return p?(c=p[0],r+=c.length,c):""}let n=[];for(;s(Sl),!(r>=t.length);){let o=s(bl);if(o.slice(-1)===",")o=We(e,o.substring(0,o.length-1)),n.push(o);else{let c="";o=We(e,o);let p=!1;for(;;){let a=t.charAt(r);if(a===""){n.push((o+c).trim());break}else if(p)a===")"&&(p=!1);else if(a===","){r+=1,n.push((o+c).trim());break}else a==="("&&(p=!0);c+=a,r+=1}}}return n.join(", ")}var Cs=new WeakMap;function We(e,t){return!t||t.trim()===""?t:Nn(e,t)}function xl(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Nn(e,t){let r=Cs.get(e);if(r||(r=e.createElement("a"),Cs.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function Gi(e,t,r,s){return s&&(r==="src"||r==="href"&&!(t==="use"&&s[0]==="#")||r==="xlink:href"&&s[0]!=="#"||r==="background"&&["table","td","th"].includes(t)?We(e,s):r==="srcset"?Cl(e,s):r==="style"?Ot(s,Nn(e)):t==="object"&&r==="data"?We(e,s):s)}function Yi(e,t,r){return["video","audio"].includes(e)&&t==="autoplay"}function El(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){let n=e.classList[s];if(t.test(n))return!0}if(r)return e.matches(r)}catch(s){}return!1}function Nt(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Nt(oe.parentNode(e),t,r):!1;for(let s=e.classList.length;s--;){let n=e.classList[s];if(t.test(n))return!0}return r?Nt(oe.parentNode(e),t,r):!1}function Xi(e,t,r,s){let n;if(qi(e)){if(n=e,!oe.childNodes(n).length)return!1}else{if(oe.parentElement(e)===null)return!1;n=oe.parentElement(e)}try{if(typeof t=="string"){if(s){if(n.closest(`.${t}`))return!0}else if(n.classList.contains(t))return!0}else if(Nt(n,t,s))return!0;if(r){if(s){if(n.closest(r))return!0}else if(n.matches(r))return!0}}catch(o){}return!1}function Ml(e,t,r){let s=e.contentWindow;if(!s)return;let n=!1,o;try{o=s.document.readyState}catch(p){return}if(o!=="complete"){let p=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(p),n=!0,t()});return}let c="about:blank";if(s.location.href!==c||e.src===c||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Rl(e,t,r){let s=!1,n;try{n=e.sheet}catch(c){return}if(n)return;let o=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(o),s=!0,t()})}function Il(e,t){let{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:c,inlineStylesheet:p,maskInputOptions:a={},maskTextFn:d,maskInputFn:i,dataURLOptions:h={},inlineImages:u,recordCanvas:l,keepIframeSrcFn:m,newlyAddedElement:f=!1,cssCaptured:g=!1}=t,C=Ol(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:re.Document,childNodes:[],compatMode:e.compatMode}:{type:re.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:re.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:C};case e.ELEMENT_NODE:return Al(e,{doc:r,blockClass:n,blockSelector:o,inlineStylesheet:p,maskInputOptions:a,maskInputFn:i,dataURLOptions:h,inlineImages:u,recordCanvas:l,keepIframeSrcFn:m,newlyAddedElement:f,rootId:C});case e.TEXT_NODE:return Nl(e,{doc:r,needsMask:c,maskTextFn:d,rootId:C,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:re.CDATA,textContent:"",rootId:C};case e.COMMENT_NODE:return{type:re.Comment,textContent:oe.textContent(e)||"",rootId:C};default:return!1}}function Ol(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return r===1?void 0:r}function Nl(e,t){let{needsMask:r,maskTextFn:s,rootId:n,cssCaptured:o}=t,c=oe.parentNode(e),p=c&&c.tagName,a="",d=p==="STYLE"?!0:void 0,i=p==="SCRIPT"?!0:void 0;return i?a="SCRIPT_PLACEHOLDER":o||(a=oe.textContent(e),d&&a&&(a=Ot(a,Nn(t.doc)))),!d&&!i&&a&&r&&(a=s?s(a,oe.parentElement(e)):a.replace(/[\S]/g,"*")),{type:re.Text,textContent:a||"",rootId:n}}function Al(e,t){let{doc:r,blockClass:s,blockSelector:n,inlineStylesheet:o,maskInputOptions:c={},maskInputFn:p,dataURLOptions:a={},inlineImages:d,recordCanvas:i,keepIframeSrcFn:h,newlyAddedElement:u=!1,rootId:l}=t,m=El(e,s,n),f=wl(e),g={},C=e.attributes.length;for(let S=0;S<C;S++){let E=e.attributes[S];Yi(f,E.name,E.value)||(g[E.name]=Gi(r,f,ke(E.name),E.value))}if(f==="link"&&o){let S=Array.from(r.styleSheets).find(b=>b.href===e.href),E=null;S&&(E=mn(S)),E&&(delete g.rel,delete g.href,g._cssText=E)}if(f==="style"&&e.sheet){let S=mn(e.sheet);S&&(e.childNodes.length>1&&(S=gl(S,e)),g._cssText=S)}if(["input","textarea","select"].includes(f)){let S=e.value,E=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&S?g.value=Rt({element:e,type:It(e),tagName:f,value:S,maskInputOptions:c,maskInputFn:p}):E&&(g.checked=E)}if(f==="option"&&(e.selected&&!c.select?g.selected=!0:delete g.selected),f==="dialog"&&e.open&&(g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),f==="canvas"&&i){if(e.__context==="2d")ul(e)||(g.rr_dataURL=e.toDataURL(a.type,a.quality));else if(!("__context"in e)){let S=e.toDataURL(a.type,a.quality),E=r.createElement("canvas");E.width=e.width,E.height=e.height;let b=E.toDataURL(a.type,a.quality);S!==b&&(g.rr_dataURL=S)}}if(f==="img"&&d){Be||(Be=r.createElement("canvas"),Ss=Be.getContext("2d"));let S=e,E=S.currentSrc||S.getAttribute("src")||"<unknown-src>",b=S.crossOrigin,y=()=>{S.removeEventListener("load",y);try{Be.width=S.naturalWidth,Be.height=S.naturalHeight,Ss.drawImage(S,0,0),g.rr_dataURL=Be.toDataURL(a.type,a.quality)}catch(v){if(S.crossOrigin!=="anonymous"){S.crossOrigin="anonymous",S.complete&&S.naturalWidth!==0?y():S.addEventListener("load",y);return}else console.warn(`Cannot inline img src=${E}! Error: ${v}`)}S.crossOrigin==="anonymous"&&(b?g.crossOrigin=b:S.removeAttribute("crossorigin"))};S.complete&&S.naturalWidth!==0?y():S.addEventListener("load",y)}if(["audio","video"].includes(f)){let S=g;S.rr_mediaState=e.paused?"paused":"played",S.rr_mediaCurrentTime=e.currentTime,S.rr_mediaPlaybackRate=e.playbackRate,S.rr_mediaMuted=e.muted,S.rr_mediaLoop=e.loop,S.rr_mediaVolume=e.volume}if(u||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),m){let{width:S,height:E}=e.getBoundingClientRect();g={class:g.class,rr_width:`${S}px`,rr_height:`${E}px`}}f==="iframe"&&!h(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let w;try{customElements.get(f)&&(w=!0)}catch(S){}return{type:re.Element,tagName:f,attributes:g,childNodes:[],isSVG:xl(e)||void 0,needBlock:m,rootId:l,isCustom:w}}function J(e){return e==null?"":e.toLowerCase()}function Ji(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function Dl(e,t){if(t.comment&&e.type===re.Comment)return!0;if(e.type===re.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Vi(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(J(e.attributes.name).match(/^msapplication-tile(image|color)$/)||J(e.attributes.name)==="application-name"||J(e.attributes.rel)==="icon"||J(e.attributes.rel)==="apple-touch-icon"||J(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&J(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(J(e.attributes.property).match(/^(og|twitter|fb):/)||J(e.attributes.name).match(/^(og|twitter):/)||J(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(J(e.attributes.name)==="robots"||J(e.attributes.name)==="googlebot"||J(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(J(e.attributes.name)==="author"||J(e.attributes.name)==="generator"||J(e.attributes.name)==="framework"||J(e.attributes.name)==="publisher"||J(e.attributes.name)==="progid"||J(e.attributes.property).match(/^article:/)||J(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(J(e.attributes.name)==="google-site-verification"||J(e.attributes.name)==="yandex-verification"||J(e.attributes.name)==="csrf-token"||J(e.attributes.name)==="p:domain_verify"||J(e.attributes.name)==="verify-v1"||J(e.attributes.name)==="verification"||J(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function qe(e,t){let{doc:r,mirror:s,blockClass:n,blockSelector:o,maskTextClass:c,maskTextSelector:p,skipChild:a=!1,inlineStylesheet:d=!0,maskInputOptions:i={},maskTextFn:h,maskInputFn:u,slimDOMOptions:l,dataURLOptions:m={},inlineImages:f=!1,recordCanvas:g=!1,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:S=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:b=5e3,keepIframeSrcFn:y=()=>!1,newlyAddedElement:v=!1,cssCaptured:x=!1}=t,{needsMask:I}=t,{preserveWhiteSpace:R=!0}=t;I||(I=Xi(e,c,p,I===void 0));let A=Il(e,{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:I,inlineStylesheet:d,maskInputOptions:i,maskTextFn:h,maskInputFn:u,dataURLOptions:m,inlineImages:f,recordCanvas:g,keepIframeSrcFn:y,newlyAddedElement:v,cssCaptured:x});if(!A)return console.warn(e,"not serialized"),null;let O;s.hasNode(e)?O=s.getId(e):Dl(A,l)||!R&&A.type===re.Text&&!A.textContent.replace(/^\s+|\s+$/gm,"").length?O=rt:O=Hi();let M=Object.assign(A,{id:O});if(s.add(e,M),O===rt)return null;C&&C(e);let P=!a;if(M.type===re.Element){P=P&&!M.needBlock,delete M.needBlock;let k=oe.shadowRoot(e);k&&et(k)&&(M.isShadowHost=!0)}if((M.type===re.Document||M.type===re.Element)&&P){l.headWhitespace&&M.type===re.Element&&M.tagName==="head"&&(R=!1);let k={doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:I,maskTextClass:c,maskTextSelector:p,skipChild:a,inlineStylesheet:d,maskInputOptions:i,maskTextFn:h,maskInputFn:u,slimDOMOptions:l,dataURLOptions:m,inlineImages:f,recordCanvas:g,preserveWhiteSpace:R,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:b,keepIframeSrcFn:y,cssCaptured:!1};if(!(M.type===re.Element&&M.tagName==="textarea"&&M.attributes.value!==void 0)){M.type===re.Element&&M.attributes._cssText!==void 0&&typeof M.attributes._cssText=="string"&&(k.cssCaptured=!0);for(let _ of Array.from(oe.childNodes(e))){let Y=qe(_,k);Y&&M.childNodes.push(Y)}}let T=null;if(qi(e)&&(T=oe.shadowRoot(e)))for(let _ of Array.from(oe.childNodes(T))){let Y=qe(_,k);Y&&(et(T)&&(Y.isShadow=!0),M.childNodes.push(Y))}}let U=oe.parentNode(e);return U&&Qe(U)&&et(U)&&(M.isShadow=!0),M.type===re.Element&&M.tagName==="iframe"&&Ml(e,()=>{let k=e.contentDocument;if(k&&w){let T=qe(k,{doc:k,mirror:s,blockClass:n,blockSelector:o,needsMask:I,maskTextClass:c,maskTextSelector:p,skipChild:!1,inlineStylesheet:d,maskInputOptions:i,maskTextFn:h,maskInputFn:u,slimDOMOptions:l,dataURLOptions:m,inlineImages:f,recordCanvas:g,preserveWhiteSpace:R,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:b,keepIframeSrcFn:y});T&&w(e,T)}},S),M.type===re.Element&&M.tagName==="link"&&typeof M.attributes.rel=="string"&&(M.attributes.rel==="stylesheet"||M.attributes.rel==="preload"&&typeof M.attributes.href=="string"&&Vi(M.attributes.href)==="css")&&Rl(e,()=>{if(E){let k=qe(e,{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:I,maskTextClass:c,maskTextSelector:p,skipChild:!1,inlineStylesheet:d,maskInputOptions:i,maskTextFn:h,maskInputFn:u,slimDOMOptions:l,dataURLOptions:m,inlineImages:f,recordCanvas:g,preserveWhiteSpace:R,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:b,keepIframeSrcFn:y});k&&E(e,k)}},b),M}function Tl(e,t){let{mirror:r=new Mt,blockClass:s="rr-block",blockSelector:n=null,maskTextClass:o="rr-mask",maskTextSelector:c=null,inlineStylesheet:p=!0,inlineImages:a=!1,recordCanvas:d=!1,maskAllInputs:i=!1,maskTextFn:h,maskInputFn:u,slimDOM:l=!1,dataURLOptions:m,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:b=()=>!1}=t,y=i===!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}:i===!1?{password:!0}:i,v=Ji(l);return qe(e,{doc:e,mirror:r,blockClass:s,blockSelector:n,maskTextClass:o,maskTextSelector:c,skipChild:!1,inlineStylesheet:p,maskInputOptions:y,maskTextFn:h,maskInputFn:u,slimDOMOptions:v,dataURLOptions:m,inlineImages:a,recordCanvas:d,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:b,newlyAddedElement:!1})}var kl=/(max|min)-device-(width|height)/,Ec=new RegExp(kl.source,"g");function _l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ll(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,n.get?n:{enumerable:!0,get:function(){return e[s]}})}),r}var gt={exports:{}},xs;function Pl(){if(xs)return gt.exports;xs=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return gt.exports=t(),gt.exports.createColors=t,gt.exports}var Fl={},Ul=Object.freeze(Object.defineProperty({__proto__:null,default:Fl},Symbol.toStringTag,{value:"Module"})),ye=Ll(Ul),cr,Es;function An(){if(Es)return cr;Es=1;let e=Pl(),t=ye;class r extends Error{constructor(n,o,c,p,a,d){super(n),this.name="CssSyntaxError",this.reason=n,a&&(this.file=a),p&&(this.source=p),d&&(this.plugin=d),typeof o!="undefined"&&typeof c!="undefined"&&(typeof o=="number"?(this.line=o,this.column=c):(this.line=o.line,this.column=o.column,this.endLine=c.line,this.endColumn=c.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(n){if(!this.source)return"";let o=this.source;n==null&&(n=e.isColorSupported),t&&n&&(o=t(o));let c=o.split(/\r?\n/),p=Math.max(this.line-3,0),a=Math.min(this.line+2,c.length),d=String(a).length,i,h;if(n){let{bold:u,gray:l,red:m}=e.createColors(!0);i=f=>u(m(f)),h=f=>l(f)}else i=h=u=>u;return c.slice(p,a).map((u,l)=>{let m=p+1+l,f=" "+(" "+m).slice(-d)+" | ";if(m===this.line){let g=h(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+h(f)+u+`
2
2
  `+g+i("^")}return" "+h(f)+u}).join(`
3
3
  `)}toString(){let n=this.showSourceCode();return n&&(n=`
4
4