posthog-js 1.373.2 → 1.373.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/array.full.es5.js +1 -1
- package/dist/array.full.js +1 -1
- package/dist/array.full.no-external.js +1 -1
- package/dist/array.js +1 -1
- package/dist/array.no-external.js +1 -1
- package/dist/customizations.full.js +1 -1
- package/dist/default-extensions.js +1 -1
- package/dist/extension-bundles.js +1 -1
- package/dist/lazy-recorder.js +1 -1
- package/dist/main.js +1 -1
- package/dist/module.full.js +1 -1
- package/dist/module.full.no-external.js +1 -1
- package/dist/module.js +1 -1
- package/dist/module.no-external.js +1 -1
- package/dist/module.slim.js +1 -1
- package/dist/module.slim.no-external.js +1 -1
- package/dist/posthog-recorder.js +1 -1
- package/lib/package.json +1 -1
- package/package.json +6 -6
package/dist/lazy-recorder.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(){"use strict";var t="undefined"!=typeof window?window:void 0,e="undefined"!=typeof globalThis?globalThis:t;"undefined"==typeof self&&(e.self=e),"undefined"==typeof File&&(e.File=function(){});var r=null==e?void 0:e.document;null!=e&&e.XMLHttpRequest&&new e.XMLHttpRequest;var i=null!=t?t:{};function n(t,e,r,i,n,s,a){try{var o=t[s](a),u=o.value}catch(t){return void r(t)}o.done?e(u):Promise.resolve(u).then(i,n)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(i,s){var a=t.apply(e,r);function o(t){n(a,i,s,o,u,"next",t)}function u(t){n(a,i,s,o,u,"throw",t)}o(void 0)}))}}function a(){return a=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var i in r)({}).hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},a.apply(null,arguments)}var o={DomContentLoaded:0,Load:1,FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Custom:5,Plugin:6},u=Object.prototype,l=u.hasOwnProperty,h=u.toString,d=Array.isArray||function(t){return"[object Array]"===h.call(t)},c=t=>"function"==typeof t,f=t=>t===Object(t)&&!d(t),v=t=>void 0===t,p=t=>"[object String]"==h.call(t),m=t=>null===t,g=t=>v(t)||m(t),y=t=>"[object Number]"==h.call(t)&&t==t,b=t=>"[object Boolean]"===h.call(t),w=t=>t instanceof FormData;function k(t,e,r,i,n){return e>r&&(i.warn("min cannot be greater than max."),e=r),y(t)?t>r?(i.warn(" cannot be greater than max: "+r+". Using max value instead."),r):e>t?(i.warn(" cannot be less than min: "+e+". Using min value instead."),e):t:(i.warn(" must be a number. using max or fallback. max: "+r+", fallback: "+n),k(n||r,e,r,i))}class S{constructor(t){this.$t={},this.zt=t.zt,this.Zt=k(t.bucketSize,0,100,t.Gt),this.Qt=k(t.refillRate,0,this.Zt,t.Gt),this.Jt=k(t.refillInterval,0,864e5,t.Gt)}Kt(t,e){var r=Math.floor((e-t.lastAccess)/this.Jt);r>0&&(t.tokens=Math.min(t.tokens+r*this.Qt,this.Zt),t.lastAccess=t.lastAccess+r*this.Jt)}consumeRateLimit(t){var e,r=Date.now(),i=String(t),n=this.$t[i];return n?this.Kt(n,r):this.$t[i]=n={tokens:this.Zt,lastAccess:r},0===n.tokens||(n.tokens--,0===n.tokens&&(null==(e=this.zt)||e.call(this,t)),0===n.tokens)}stop(){this.$t={}}}var I="1.373.2",_="web",C=function(e,r){var{debugEnabled:n}=void 0===r?{}:r,s={k(r){if(t&&(i.POSTHOG_DEBUG||n)&&!v(t.console)&&t.console){for(var s=("__rrweb_original__"in t.console[r]?t.console[r].__rrweb_original__:t.console[r]),a=arguments.length,o=new Array(a>1?a-1:0),u=1;a>u;u++)o[u-1]=arguments[u];s(e,...o)}},debug(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];s.k("debug",...e)},info(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];s.k("log",...e)},warn(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];s.k("warn",...e)},error(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];s.k("error",...e)},critical(){for(var t=arguments.length,r=new Array(t),i=0;t>i;i++)r[i]=arguments[i];console.error(e,...r)},uninitializedWarning(t){s.error("You must initialize PostHog before calling "+t)},createLogger:(t,r)=>C(e+" "+t,r)};return s},M=C("[PostHog.js]"),T=M.createLogger;function x(t,e){if(!g(t))if(d(t))t.forEach(e);else if(w(t))t.forEach(((t,r)=>e(t,r)));else for(var r in t)l.call(t,r)&&e(t[r],r)}function R(t,e,r,i){var{capture:n=!1,passive:s=!0}={};null==t||t.addEventListener(e,r,{capture:n,passive:s})}var O=["localhost","127.0.0.1"],A=t=>{var e=null==r?void 0:r.createElement("a");return v(e)?null:(e.href=t,e)},L=function(t,e){var r,i;void 0===e&&(e="&");var n=[];return x(t,(function(t,e){v(t)||v(e)||"undefined"===e||(r=encodeURIComponent((t=>t instanceof File)(t)?t.name:t.toString()),i=encodeURIComponent(e),n[n.length]=i+"="+r)})),n.join(e)},F="$session_recording_remote_config",N="$replay_override_sampling",E="$replay_override_linked_flag",D="$replay_override_url_trigger",B="$replay_override_event_trigger",P="$session_is_sampled",U="$session_past_minimum_duration",W="$session_recording_url_trigger_activated_session",z="$session_recording_event_trigger_activated_session",j="$posthog_sr_group_event_trigger_",q="$posthog_sr_group_url_trigger_",H="$posthog_sr_group_sampling_",G="$debug_first_full_snapshot_timestamp",V="$stored_person_properties",Z="$sdk_debug_replay_remote_trigger_matching_config",J=new RegExp("(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})"),X=new RegExp("(\\d{3}-?\\d{2}-?\\d{4})"),Y="[SessionRecording]",K="redacted",Q={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:t=>t,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","analytics.google.com","bam.nr-data.net"]},tt=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],et=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],rt=["/s/","/e/","/i/"];function it(t,e,r,i){if(g(t))return t;var n=(null==e?void 0:e["content-length"])||function(t){return new Blob([t]).size}(t);return p(n)&&(n=parseInt(n)),n>r?Y+" "+i+" body too large to record ("+n+" bytes)":t}function nt(t,e){if(g(t))return t;var r=t;return function(t,e){if(g(t))return!1;if(p(t)){if(t=t.trim(),J.test((t||"").replace(/[- ]/g,"")))return!1;if(X.test(t))return!1}return!0}(r)||(r=Y+" "+e+" body "+K),x(et,(t=>{var i,n;null!=(i=r)&&i.length&&-1!==(null==(n=r)?void 0:n.indexOf(t))&&(r=Y+" "+e+" body "+K+" as might contain: "+t)})),r}var st="disabled",at="sampled",ot="active",ut="buffering",lt="paused",ht="rrweb_error",dt="trigger",ct=dt+"_activated",ft=dt+"_pending",vt=dt+"_"+st;function pt(t,e,r){return e.some((e=>{var i;return"regex"===e.matching&&(null!==(i=null==r?void 0:r.get(e.url))&&void 0!==i?i:new RegExp(e.url)).test(t)}))}class mt{constructor(t){this.t=t}triggerStatus(t){var e=this.t.map((e=>e.triggerStatus(t)));return e.includes(ct)?ct:e.includes(ft)?ft:vt}stop(){this.t.forEach((t=>t.stop()))}}class gt{constructor(t){this.t=t}triggerStatus(t){var e=new Set;for(var r of this.t)e.add(r.triggerStatus(t));switch(e.delete(vt),e.size){case 0:return vt;case 1:return Array.from(e)[0];default:return ft}}stop(){this.t.forEach((t=>t.stop()))}}class yt{triggerStatus(){return ct}stop(){}}var bt=t=>"sessionRecording"in t;class wt{constructor(t,e){this.u=[],this.Ma=[],this.Ra=new Map,this.Oa=new Map,this.Aa="",this.urlBlocked=!1,this._instance=t,this.La=e}onConfig(t){var e,r;this.u=(bt(t)?f(t.sessionRecording)?null==(e=t.sessionRecording)?void 0:e.urlTriggers:[]:null==t?void 0:t.urlTriggers)||[],this.Ma=(bt(t)?f(t.sessionRecording)?null==(r=t.sessionRecording)?void 0:r.urlBlocklist:[]:null==t?void 0:t.urlBlocklist)||[],this.Fa()}Fa(){for(var t of(this.Ra.clear(),this.Oa.clear(),this.u))if("regex"===t.matching&&!this.Ra.has(t.url))try{this.Ra.set(t.url,new RegExp(t.url))}catch(e){M.error("Invalid URL trigger regex pattern:",t.url,e)}for(var e of this.Ma)if("regex"===e.matching&&!this.Oa.has(e.url))try{this.Oa.set(e.url,new RegExp(e.url))}catch(t){M.error("Invalid URL blocklist regex pattern:",e.url,t)}}onRemoteConfig(t){this.onConfig(t)}Na(t){var e;return 0===this.u.length?vt:(null==(e=this._instance)?void 0:e.get_property(this.La?q+this.La:W))===t?ct:ft}triggerStatus(t){var e=this.Na(t),r=e===ct?ct:e===ft?ft:vt;return this._instance.register_for_session({$sdk_debug_replay_url_trigger_status:r}),r}checkUrlBlocklist(e,r){if(void 0!==t&&t.location.href){var i=t.location.href;if(i!==this.Aa){this.Aa=i;var n=this.urlBlocked,s=pt(i,this.Ma,this.Oa);n&&s||(s&&!n?e():!s&&n&&r())}}}checkUrlTriggerConditions(e,r,i,n){if(void 0!==t&&t.location.href){var s=t.location.href;if(s!==this.Aa){this.Aa=s;var a=this.urlBlocked,o=pt(s,this.Ma,this.Oa);o&&!a?e():!o&&a&&r();var u=this.Na(n)===ct,l=pt(s,this.u,this.Ra);!u&&l&&i("url",s)}}}stop(){this.Aa=""}}class kt{constructor(t){this.linkedFlag=null,this.linkedFlagSeen=!1,this.Da=()=>{},this._instance=t}triggerStatus(){var t=ft;return g(this.linkedFlag)&&(t=vt),this.linkedFlagSeen&&(t=ct),this._instance.register_for_session({$sdk_debug_replay_linked_flag_trigger_status:t}),t}onConfig(t,e){var r;if(this.linkedFlag=(bt(t)?f(t.sessionRecording)?null==(r=t.sessionRecording)?void 0:r.linkedFlag:null:null==t?void 0:t.linkedFlag)||null,!g(this.linkedFlag)&&!this.linkedFlagSeen){var i=p(this.linkedFlag)?this.linkedFlag:this.linkedFlag.flag,n=p(this.linkedFlag)?null:this.linkedFlag.variant;this.Da=this._instance.onFeatureFlags(((t,r)=>{var s=!1;if(f(r)&&i in r){var a=r[i];s=b(a)?!0===a:n?a===n:!!a}this.linkedFlagSeen=s,s&&e(i,n)}))}}onRemoteConfig(t,e){this.onConfig(t,e)}stop(){this.Da()}}class St{constructor(t,e){this.Ba=[],this._instance=t,this.La=e}onConfig(t){var e;this.Ba=(bt(t)?f(t.sessionRecording)?null==(e=t.sessionRecording)?void 0:e.eventTriggers:[]:null==t?void 0:t.eventTriggers)||[]}onRemoteConfig(t){this.onConfig(t)}Pa(t){var e;return 0===this.Ba.length?vt:(null==(e=this._instance)?void 0:e.get_property(this.La?j+this.La:z))===t?ct:ft}triggerStatus(t){var e=this.Pa(t),r=e===ct?ct:e===ft?ft:vt;return this._instance.register_for_session({$sdk_debug_replay_event_trigger_status:r}),r}checkEventTriggerConditions(t,e,r){if(0!==this.Ba.length){var i=this.Pa(r)===ct,n=this.Ba.includes(t);!i&&n&&e("event",t)}}stop(){}}class It{constructor(t,e,r){if(this._instance=t,this.group=e,this.Ua=new wt(t,e.id),this.Wa=new St(t,e.id),this.$a=new kt(t),e.conditions.events&&e.conditions.events.length>0||e.conditions.urls&&e.conditions.urls.length>0||e.conditions.flag){var i=(e.conditions.events||[]).map((t=>t.name)),n={urlTriggers:e.conditions.urls||[],eventTriggers:i,linkedFlag:e.conditions.flag||null,urlBlocklist:[]};this.Ua.onConfig(n),this.Wa.onConfig(n),this.$a.onConfig(n,r);var s=[this.Wa,this.Ua,this.$a];this.za="any"===e.conditions.matchType?new mt(s):new gt(s)}else this.za=new yt}triggerStatus(t){return this.za.triggerStatus(t)}checkEventTriggerConditions(t,e,r){this.Wa.checkEventTriggerConditions(t,e,r)}checkUrlTriggerConditions(t,e,r,i){this.Ua.checkUrlTriggerConditions(t,e,r,i)}activateTrigger(t,e){var r;null==(r=this._instance.persistence)||r.register({["url"===t?q+this.group.id:j+this.group.id]:e})}stop(){this.Ua.stop(),this.Wa.stop(),this.$a.stop()}}function _t(t){if(t.rrwebError)return ht;if(!t.receivedFlags)return ut;if(!t.isRecordingEnabled)return st;if(t.urlTriggerMatching.urlBlocked)return lt;var e=!0===t.isSampled,r=new mt([t.eventTriggerMatching,t.urlTriggerMatching,t.linkedFlagMatching]).triggerStatus(t.sessionId);return e?at:r===ct?ot:r===ft?ut:!1===t.isSampled?st:ot}function Ct(t){if(t.rrwebError)return ht;if(!t.receivedFlags)return ut;if(!t.isRecordingEnabled)return st;if(t.urlTriggerMatching.urlBlocked)return lt;var e=new gt([t.eventTriggerMatching,t.urlTriggerMatching,t.linkedFlagMatching]).triggerStatus(t.sessionId),r=e!==vt,i=b(t.isSampled);return r&&e===ft?ut:r&&e===vt||i&&!t.isSampled?st:!0===t.isSampled?at:ot}function Mt(t){var e,r;return(null==(e=JSON.stringify(t,(r=[],function(t,e){if(f(e)){for(;r.length>0&&r[r.length-1]!==this;)r.pop();return r.includes(e)?"[Circular]":(r.push(e),e)}return e})))?void 0:e.length)||0}function Tt(t){if(m(t))return 4;if(v(t))return 0;switch(typeof t){case"string":return t.length+2;case"number":return String(t).length;case"boolean":return t?4:5;case"object":if(d(t)){for(var e=2,r=0;t.length>r;r++){r>0&&(e+=1);var i=t[r];e+=v(i)||m(i)?4:Tt(i)}return e}var n=t,s=2,a=!0;for(var o in n)if({}.hasOwnProperty.call(n,o)){var u=n[o];v(u)||(a||(s+=1),a=!1,s+=o.length+3+Tt(u))}return s;default:return 0}}var xt=Uint8Array,Rt=Uint16Array,Ot=Uint32Array,At=new xt([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]),Lt=new xt([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]),Ft=new xt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Nt=function(t,e){for(var r=new Rt(31),i=0;31>i;++i)r[i]=e+=1<<t[i-1];var n=new Ot(r[30]);for(i=1;30>i;++i)for(var s=r[i];r[i+1]>s;++s)n[s]=s-r[i]<<5|i;return[r,n]},Et=Nt(At,2),Dt=Et[1];Et[0][28]=258,Dt[258]=28;for(var Bt=Nt(Lt,0)[1],Pt=new Rt(32768),Ut=0;32768>Ut;++Ut){var Wt=(43690&Ut)>>>1|(21845&Ut)<<1;Pt[Ut]=((65280&(Wt=(61680&(Wt=(52428&Wt)>>>2|(13107&Wt)<<2))>>>4|(3855&Wt)<<4))>>>8|(255&Wt)<<8)>>>1}var $t=function(t,e,r){for(var i=t.length,n=0,s=new Rt(e);i>n;++n)++s[t[n]-1];var a,o=new Rt(e);for(n=0;e>n;++n)o[n]=o[n-1]+s[n-1]<<1;if(r){a=new Rt(1<<e);var u=15-e;for(n=0;i>n;++n)if(t[n])for(var l=n<<4|t[n],h=e-t[n],d=o[t[n]-1]++<<h,c=d|(1<<h)-1;c>=d;++d)a[Pt[d]>>>u]=l}else for(a=new Rt(i),n=0;i>n;++n)a[n]=Pt[o[t[n]-1]++]>>>15-t[n];return a},zt=new xt(288);for(Ut=0;144>Ut;++Ut)zt[Ut]=8;for(Ut=144;256>Ut;++Ut)zt[Ut]=9;for(Ut=256;280>Ut;++Ut)zt[Ut]=7;for(Ut=280;288>Ut;++Ut)zt[Ut]=8;var jt=new xt(32);for(Ut=0;32>Ut;++Ut)jt[Ut]=5;var qt=$t(zt,9,0),Ht=$t(jt,5,0),Gt=function(t){return(t/8>>0)+(7&t&&1)},Vt=function(t,e,r){(null==r||r>t.length)&&(r=t.length);var i=new(t instanceof Rt?Rt:t instanceof Ot?Ot:xt)(r-e);return i.set(t.subarray(e,r)),i},Zt=function(t,e,r){var i=e/8>>0;t[i]|=r<<=7&e,t[i+1]|=r>>>8},Jt=function(t,e,r){var i=e/8>>0;t[i]|=r<<=7&e,t[i+1]|=r>>>8,t[i+2]|=r>>>16},Xt=function(t,e){for(var r=[],i=0;t.length>i;++i)t[i]&&r.push({s:i,f:t[i]});var n=r.length,s=r.slice();if(!n)return[new xt(0),0];if(1==n){var a=new xt(r[0].s+1);return a[r[0].s]=1,[a,1]}r.sort((function(t,e){return t.f-e.f})),r.push({s:-1,f:25001});var o=r[0],u=r[1],l=0,h=1,d=2;for(r[0]={s:-1,f:o.f+u.f,l:o,r:u};h!=n-1;)o=r[r[d].f>r[l].f?l++:d++],u=r[l!=h&&r[d].f>r[l].f?l++:d++],r[h++]={s:-1,f:o.f+u.f,l:o,r:u};var c=s[0].s;for(i=1;n>i;++i)s[i].s>c&&(c=s[i].s);var f=new Rt(c+1),v=Yt(r[h-1],f,0);if(v>e){i=0;var p=0,m=v-e,g=1<<m;for(s.sort((function(t,e){return f[e.s]-f[t.s]||t.f-e.f}));n>i;++i){var y=s[i].s;if(e>=f[y])break;p+=g-(1<<v-f[y]),f[y]=e}for(p>>>=m;p>0;){var b=s[i].s;e>f[b]?p-=1<<e-f[b]++-1:++i}for(;i>=0&&p;--i){var w=s[i].s;f[w]==e&&(--f[w],++p)}v=e}return[new xt(f),v]},Yt=function(t,e,r){return-1==t.s?Math.max(Yt(t.l,e,r+1),Yt(t.r,e,r+1)):e[t.s]=r},Kt=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new Rt(++e),i=0,n=t[0],s=1,a=function(t){r[i++]=t},o=1;e>=o;++o)if(t[o]==n&&o!=e)++s;else{if(!n&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(n),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(n);s=1,n=t[o]}return[r.subarray(0,i),e]},Qt=function(t,e){for(var r=0,i=0;e.length>i;++i)r+=t[i]*e[i];return r},te=function(t,e,r){var i=r.length,n=Gt(e+2);t[n]=255&i,t[n+1]=i>>>8,t[n+2]=255^t[n],t[n+3]=255^t[n+1];for(var s=0;i>s;++s)t[n+s+4]=r[s];return 8*(n+4+i)},ee=function(t,e,r,i,n,s,a,o,u,l,h){Zt(e,h++,r),++n[256];for(var d=Xt(n,15),c=d[0],f=d[1],v=Xt(s,15),p=v[0],m=v[1],g=Kt(c),y=g[0],b=g[1],w=Kt(p),k=w[0],S=w[1],I=new Rt(19),_=0;y.length>_;++_)I[31&y[_]]++;for(_=0;k.length>_;++_)I[31&k[_]]++;for(var C=Xt(I,7),M=C[0],T=C[1],x=19;x>4&&!M[Ft[x-1]];--x);var R,O,A,L,F=l+5<<3,N=Qt(n,zt)+Qt(s,jt)+a,E=Qt(n,c)+Qt(s,p)+a+14+3*x+Qt(I,M)+(2*I[16]+3*I[17]+7*I[18]);if(N>=F&&E>=F)return te(e,h,t.subarray(u,u+l));if(Zt(e,h,1+(N>E)),h+=2,N>E){R=$t(c,f,0),O=c,A=$t(p,m,0),L=p;var D=$t(M,T,0);for(Zt(e,h,b-257),Zt(e,h+5,S-1),Zt(e,h+10,x-4),h+=14,_=0;x>_;++_)Zt(e,h+3*_,M[Ft[_]]);h+=3*x;for(var B=[y,k],P=0;2>P;++P){var U=B[P];for(_=0;U.length>_;++_)Zt(e,h,D[W=31&U[_]]),h+=M[W],W>15&&(Zt(e,h,U[_]>>>5&127),h+=U[_]>>>12)}}else R=qt,O=zt,A=Ht,L=jt;for(_=0;o>_;++_)if(i[_]>255){var W;Jt(e,h,R[257+(W=i[_]>>>18&31)]),h+=O[W+257],W>7&&(Zt(e,h,i[_]>>>23&31),h+=At[W]);var z=31&i[_];Jt(e,h,A[z]),h+=L[z],z>3&&(Jt(e,h,i[_]>>>5&8191),h+=Lt[z])}else Jt(e,h,R[i[_]]),h+=O[i[_]];return Jt(e,h,R[256]),h+O[256]},re=new Ot([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ie=function(){for(var t=new Ot(256),e=0;256>e;++e){for(var r=e,i=9;--i;)r=(1&r&&3988292384)^r>>>1;t[e]=r}return t}(),ne=function(){var t=4294967295;return{p(e){for(var r=t,i=0;e.length>i;++i)r=ie[255&r^e[i]]^r>>>8;t=r},d:()=>4294967295^t}},se=function(t,e,r,i,n){return function(t,e,r,i,n,s){var a=t.length,o=new xt(i+a+5*(1+Math.floor(a/7e3))+n),u=o.subarray(i,o.length-n),l=0;if(!e||8>a)for(var h=0;a>=h;h+=65535){var d=h+65535;a>d?l=te(u,l,t.subarray(h,d)):(u[h]=true,l=te(u,l,t.subarray(h,a)))}else{for(var c=re[e-1],f=c>>>13,v=8191&c,p=(1<<r)-1,m=new Rt(32768),g=new Rt(p+1),y=Math.ceil(r/3),b=2*y,w=function(e){return(t[e]^t[e+1]<<y^t[e+2]<<b)&p},k=new Ot(25e3),S=new Rt(288),I=new Rt(32),_=0,C=0,M=(h=0,0),T=0,x=0;a>h;++h){var R=w(h),O=32767&h,A=g[R];if(m[O]=A,g[R]=O,h>=T){var L=a-h;if((_>7e3||M>24576)&&L>423){l=ee(t,u,0,k,S,I,C,M,x,h-x,l),M=_=C=0,x=h;for(var F=0;286>F;++F)S[F]=0;for(F=0;30>F;++F)I[F]=0}var N=2,E=0,D=v,B=O-A&32767;if(L>2&&R==w(h-B))for(var P=Math.min(f,L)-1,U=Math.min(32767,h),W=Math.min(258,L);U>=B&&--D&&O!=A;){if(t[h+N]==t[h+N-B]){for(var z=0;W>z&&t[h+z]==t[h+z-B];++z);if(z>N){if(N=z,E=B,z>P)break;var j=Math.min(B,z-2),q=0;for(F=0;j>F;++F){var H=h-B+F+32768&32767,G=H-m[H]+32768&32767;G>q&&(q=G,A=H)}}}B+=(O=A)-(A=m[O])+32768&32767}if(E){k[M++]=268435456|Dt[N]<<18|Bt[E];var V=31&Dt[N],Z=31&Bt[E];C+=At[V]+Lt[Z],++S[257+V],++I[Z],T=h+N,++_}else k[M++]=t[h],++S[t[h]]}}l=ee(t,u,true,k,S,I,C,M,x,h-x,l)}return Vt(o,0,i+Gt(l)+n)}(t,null==e.level?6:e.level,null==e.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,r,i)},ae=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},oe=function(t,e){var r=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=2>e.level?4:9==e.level?2:0,t[9]=3,0!=e.mtime&&ae(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),r){t[3]=8;for(var i=0;r.length>=i;++i)t[i+10]=r.charCodeAt(i)}},ue=function(t){return 10+(t.filename&&t.filename.length+1||0)};class le{constructor(t,e){var r,i;void 0===e&&(e={}),this.ja={},this.qa=t=>{if(!this.ja[t]){var e,r;this.ja[t]=!0;var i=this.Ha(t);null==(e=(r=this.Ga).onBlockedNode)||e.call(r,t,i)}},this.Va=t=>{var e=this.Ha(t);if("svg"!==(null==e?void 0:e.nodeName)&&e instanceof Element){var r=e.closest("svg");if(r)return[this._rrweb.mirror.getId(r),r]}return[t,e]},this.Ha=t=>this._rrweb.mirror.getNode(t),this.Za=t=>{var e,r,i,n,s,a,o,u;return(null!==(e=null==(r=t.removes)?void 0:r.length)&&void 0!==e?e:0)+(null!==(i=null==(n=t.attributes)?void 0:n.length)&&void 0!==i?i:0)+(null!==(s=null==(a=t.texts)?void 0:a.length)&&void 0!==s?s:0)+(null!==(o=null==(u=t.adds)?void 0:u.length)&&void 0!==o?o:0)},this.throttleMutations=t=>{if(3!==t.type||0!==t.data.source)return t;var e=t.data,r=this.Za(e);e.attributes&&(e.attributes=e.attributes.filter((t=>{var[e]=this.Va(t.id);return!this.do.consumeRateLimit(e)&&t})));var i=this.Za(e);return 0!==i||r===i?t:void 0},this._rrweb=t,this.Ga=e,this.do=new S({bucketSize:null!==(r=this.Ga.bucketSize)&&void 0!==r?r:100,refillRate:null!==(i=this.Ga.refillRate)&&void 0!==i?i:10,refillInterval:1e3,zt:this.qa,Gt:M})}reset(){this.ja={}}stop(){this.do.stop(),this.reset()}}var he="$sess_rec_flush_size";class de{constructor(t){if(!t.persistence)throw new Error("it is not valid to not have persistence and be this far into setting up the application");this.Ja=t.get_property.bind(t),this.Xa=t.persistence.set_property.bind(t.persistence)}trackSize(t){var e=Number(this.Ja(he))||0;this.Xa(he,e+t)}reset(){return this.Xa(he,0)}get currentTrackedSize(){return Number(this.Ja(he))||0}}function ce(t,e){return function(t){for(var e=0,r=0;t.length>r;r++)e=(e<<5)-e+t.charCodeAt(r),e|=0;return Math.abs(e)}(t)%100<k(100*e,0,100,M)}var fe=function(t,e){if(!function(t){try{new RegExp(t)}catch(t){return!1}return!0}(e))return!1;try{return new RegExp(e).test(t)}catch(t){return!1}},ve={exact:(t,e)=>e.some((e=>t.some((t=>e===t)))),is_not:(t,e)=>e.every((e=>t.every((t=>e!==t)))),regex:(t,e)=>e.some((e=>t.some((t=>fe(e,t))))),not_regex:(t,e)=>e.every((e=>t.every((t=>!fe(e,t))))),icontains:(t,e)=>e.map(pe).some((e=>t.map(pe).some((t=>e.includes(t))))),not_icontains:(t,e)=>e.map(pe).every((e=>t.map(pe).every((t=>!e.includes(t))))),gt:(t,e)=>e.some((e=>{var r=parseFloat(e);return!isNaN(r)&&t.some((t=>r>parseFloat(t)))})),lt:(t,e)=>e.some((e=>{var r=parseFloat(e);return!isNaN(r)&&t.some((t=>r<parseFloat(t)))}))},pe=t=>t.toLowerCase(),me=new Set(["is_not","not_icontains","not_regex"]);function ge(t,e,r){return!t||0===t.length||t.every((t=>{var i="person"===t.type?r:e,n=null==i?void 0:i[t.key],s=t.operator||"exact";if(v(n)||m(n))return me.has(s);var a=ve[s];return!!a&&!v(t.value)&&!m(t.value)&&a(d(t.value)?t.value.map(String):[String(t.value)],d(n)?n.map(String):[String(n)])}))}var ye=T("[SessionRecording]");class be{constructor(t,e,r,i,n,s){this.Ya=null,this.Ka=Ct,this._instance=t,this.Ua=e,this.Wa=r,this.$a=i,this.Qa=n,this.tu=s}onRemoteConfig(t){this.Ya=y(t.sampleRate)?t.sampleRate:null,"any"===t.triggerMatchType?(this.eu=new mt([this.Wa,this.Ua]),this.Ka=_t):(this.eu=new gt([this.Wa,this.Ua]),this.Ka=Ct),this._instance.register_for_session({[Z]:t.triggerMatchType}),this.Ua.onConfig(t),this.Wa.onConfig(t),this.$a.onConfig(t,((t,e)=>{this.Qa("linked_flag_matched",{flag:t,variant:e})}))}getStatus(t){return this.Ka({receivedFlags:!0,isRecordingEnabled:!0,isSampled:t.isSampled,rrwebError:t.rrwebError,urlTriggerMatching:t.urlTriggerMatching,eventTriggerMatching:t.eventTriggerMatching,linkedFlagMatching:t.linkedFlagMatching,sessionId:t.sessionId})}getMinimumDuration(t){var e=this._instance.get_property("$session_recording_remote_config"),r=null==e?void 0:e.minimumDurationMilliseconds;return y(r)?r:null}checkUrlTriggers(t,e,r,i){this.Ua.checkUrlTriggerConditions(e,r,i,t)}setupEventTriggerListeners(t,e,r){if(0!==this.Wa.Ba.length&&g(this.ru))return this.ru=t((t=>{try{this.Wa.checkEventTriggerConditions(t.event,r,e)}catch(t){ye.error("Could not activate event trigger",t)}})),this.ru}makeSamplingDecisions(t){var e,r=this.Ya;if(y(r)){var i=this._instance.get_property(P),n=i===t||!1!==i&&null,s="string"==typeof i&&i!==t||!b(n),a=s?ce(t,r):n;s&&(a?this.Qa("sampled"):ye.warn("Sample rate ("+r+") has determined that this sessionId ("+t+") will not be sent to the server.")),null==(e=this._instance.persistence)||e.register({[P]:!!a&&t})}else{var o;null==(o=this._instance.persistence)||o.unregister(P)}}onFlushComplete(){}clearConditionalRecordingPersistence(){var t,e,r,i;null==(t=this._instance.persistence)||t.unregister(z),null==(e=this._instance.persistence)||e.unregister(W),null==(r=this._instance.persistence)||r.unregister(P),null==(i=this._instance.persistence)||i.unregister(U)}updateActiveTriggers(t){}hasPendingTriggers(t){var e;return(null==(e=this.eu)?void 0:e.triggerStatus(t))===ft}stop(){var t;null==(t=this.ru)||t.call(this),this.ru=void 0,this.Wa.stop(),this.Ua.stop(),this.$a.stop()}}class we{constructor(t,e,r,i){this.iu=[],this.nu=new Map,this.su=!1,this._instance=t,this.Ua=e,this.Qa=r,this.au=i}onRemoteConfig(t){t.triggerGroups&&0!==t.triggerGroups.length?(this.ou(t.triggerGroups),this._instance.register_for_session({[Z]:"v2_trigger_groups",$sdk_debug_replay_trigger_groups_count:t.triggerGroups.length}),this.Ua.onConfig(t)):ye.warn("[V2Strategy] No trigger groups configured")}getStatus(t){return function(t){if(t.rrwebError)return ht;if(t.urlTriggerMatching.urlBlocked)return lt;var e=t.triggerGroupMatchers,r=t.triggerGroupSamplingResults;if(0===e.length)return st;var i=!1,n=!1;for(var s of e){var a=s.triggerStatus(t.sessionId);if(a===ct){var o=s.group.id,u=r.get(o);v(u)?M.warn("[V2 Triggers] Group activated but no sampling decision found",{groupId:o}):!0===u&&(n=!0)}else a===ft&&(i=!0)}return n?at:i?ut:st}({isSampled:t.isSampled,rrwebError:t.rrwebError,urlTriggerMatching:t.urlTriggerMatching,eventTriggerMatching:t.eventTriggerMatching,linkedFlagMatching:t.linkedFlagMatching,sessionId:t.sessionId,triggerGroupMatchers:this.iu,triggerGroupSamplingResults:this.nu,minimumDuration:this.getMinimumDuration(t.sessionId)})}getMinimumDuration(t){var e=null;for(var r of this.iu)if("trigger_activated"===r.triggerStatus(t)){var i=r.group.minDurationMs;y(i)&&(m(e)||e>i)&&(e=i)}return e}checkUrlTriggers(t,e,r,i){var n=this;this.Ua.checkUrlBlocklist(e,r);var s=function(i){i.checkUrlTriggerConditions(e,r,(e=>{n.uu(i,void 0)&&(i.activateTrigger(e,t),n.updateActiveTriggers(t))}),t)};for(var a of this.iu)s(a)}setupEventTriggerListeners(t,e,r){var i=this;return this.ru=t((t=>{var r;if(this.su)return ye.info("[SessionRecorder] Stopping trigger checks - initial buffer flushed"),null==(r=this.ru)||r.call(this),void(this.ru=void 0);try{var n=function(r){r.checkEventTriggerConditions(t.event,(n=>{if(i.uu(r,t.properties)){var s=(r.group.conditions.events||[]).filter((e=>e.name===t.event)),a=i._instance.get_property(V);s.some((e=>!e.properties||0===e.properties.length||ge(e.properties,t.properties,a)))&&(r.activateTrigger(n,e),i.updateActiveTriggers(e))}}),e)};for(var s of this.iu)n(s)}catch(t){ye.error("Could not activate event trigger for trigger groups",t)}})),this.ru}makeSamplingDecisions(t){for(var e of this.iu){var r,i=e.group,n=i.id,s=i.sampleRate,a=H+n,o=this._instance.get_property(a),u=o===t||!1!==o&&null,l="string"==typeof o&&o!==t||!b(u),h=l?ce(t+n,s):u;l&&this.au("triggerGroupSamplingDecisionMade",{group_id:n,group_name:i.name,sampleRate:s,isSampled:h}),this.nu.set(n,h),null==(r=this._instance.persistence)||r.register({[a]:!!h&&t})}this.updateActiveTriggers(t)}onFlushComplete(){this.su=!0}clearConditionalRecordingPersistence(){var t,e;for(var r of(null==(t=this._instance.persistence)||t.unregister(P),null==(e=this._instance.persistence)||e.unregister(U),this.iu)){var i,n,s,a=r.group.id;null==(i=this._instance.persistence)||i.unregister(j+a),null==(n=this._instance.persistence)||n.unregister(q+a),null==(s=this._instance.persistence)||s.unregister(H+a)}}updateActiveTriggers(t){var e=[];for(var r of this.iu){var i=r.group,n=i.id,s="trigger_activated"===r.triggerStatus(t),a=!0===this.nu.get(n);s&&e.push({id:n,name:i.name,matched:!0,sampled:a})}this._instance.register_for_session({$sdk_debug_replay_matched_recording_trigger_groups:e})}hasPendingTriggers(t){for(var e of this.iu)if(e.triggerStatus(t)===ft)return!0;return!1}stop(){var t;null==(t=this.ru)||t.call(this),this.ru=void 0,this.iu.forEach((t=>t.stop())),this.iu=[],this.nu.clear(),this.Ua.stop()}uu(t,e){var r=t.group.conditions.properties;return!r||0===r.length||ge(r,e,this._instance.get_property(V))}ou(t){var e=this;this.iu.forEach((t=>t.stop())),this.iu=[],this.nu.clear();var r=function(t){var r=new It(e._instance,t,((r,i)=>{e.Qa("linked_flag_matched",{flag:r,variant:i,group_id:t.id,group_name:t.name})}));e.iu.push(r)};for(var i of t)r(i)}}function ke(t){return f(t)?t.network_timing:t}var Se,Ie="[SessionRecording]",_e=T(Ie),Ce=[1,2,3,4,5,6,7,12],Me=t=>({rrwebMethod:t,enqueuedAt:Date.now(),attempt:1});function Te(){var t;return null==i||null==(t=i.__PosthogExtensions__)?void 0:t.rrweb}function xe(){var t;return null==(t=Te())?void 0:t.record}function Re(t){return function(t,e){for(var r="",i=0;t.length>i;){var n=t[i++];r+=String.fromCharCode(n)}return r}(function(t,e){void 0===e&&(e={});var r=ne(),i=t.length;r.p(t);var n=se(t,e,ue(e),8),s=n.length;return oe(n,e),ae(n,s-8,r.d()),ae(n,s-4,i),n}(function(t,e){var r=t.length;if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(t);for(var i=new xt(t.length+(t.length>>>1)),n=0,s=function(t){i[n++]=t},a=0;r>a;++a){if(n+5>i.length){var o=new xt(n+8+(r-a<<1));o.set(i),i=o}var u=t.charCodeAt(a);128>u?s(u):2048>u?(s(192|u>>>6),s(128|63&u)):u>55295&&57344>u?(s(240|(u=65536+(1047552&u)|1023&t.charCodeAt(++a))>>>18),s(128|u>>>12&63),s(128|u>>>6&63),s(128|63&u)):(s(224|u>>>12),s(128|u>>>6&63),s(128|63&u))}return Vt(i,0,n)}(JSON.stringify(t))))}function Oe(t){return d(t)&&0===t.length?Se=null!=Se?Se:Re([]):Re(t)}function Ae(t,e){return t.type===o.Custom&&t.data.tag===e}function Le(t){return Ae(t,"sessionIdle")}function Fe(t){return Ae(t,"$session_ending")}function Ne(t){return Ae(t,"$session_starting")}function Ee(t,e){if(void 0===e&&(e=6606028.8),t.size>=e&&t.data.length>1){var r=Math.floor(t.data.length/2),i=t.sizes.slice(0,r),n=t.sizes.slice(r);return[Ee({size:i.reduce(((t,e)=>t+e),0),data:t.data.slice(0,r),sizes:i,sessionId:t.sessionId,windowId:t.windowId}),Ee({size:n.reduce(((t,e)=>t+e),0),data:t.data.slice(r),sizes:n,sessionId:t.sessionId,windowId:t.windowId})].flatMap((t=>t))}return[t]}class De{get sessionId(){return this.di}get lu(){if(!this._instance.sessionManager)throw new Error(Ie+" must be started with a valid sessionManager.");return this._instance.sessionManager}get hu(){return this._instance.config.session_recording.session_idle_threshold_ms||3e5}get du(){var t=this._instance.get_property(P);return!0===t?null:!1!==t&&(p(t)?t===this.sessionId:null)}get Ya(){var t,e=null==(t=this.ea)?void 0:t.sampleRate;return y(e)?e:null}get cu(){var t,e;return null!==(t=null==(e=this.fu)?void 0:e.getMinimumDuration(this.sessionId))&&void 0!==t?t:null}constructor(t){this.vu="/s/",this._forceAllowLocalhostNetworkCapture=!1,this.pu=void 0,this.mu=Date.now(),this.gu=!1,this.yu=[],this.bu="unknown",this.wu=!1,this.ku=!1,this.Su=[],this.Iu=void 0,this.ru=void 0,this._u=void 0,this.Cu=void 0,this.Mu=void 0,this.Tu=void 0,this.ti=(t,e,r)=>{var i,n;if(r&&(t!==this.di||e!==this.ci)){var s,a,o=!r.noSessionId&&(r.activityTimeout||r.sessionPastMaximumLength),u=this.di,l=this.ci;o&&this.au("$session_ending",{currentSessionId:u,currentWindowId:l,nextSessionId:t,nextWindowId:e,changeReason:r,lastActivityTimestamp:this.mu,flushed_size:null==(s=this.xu)?void 0:s.currentTrackedSize}),this.xu&&this.xu.reset(),null==(i=this._instance.persistence)||i.unregister(G),this.ku=!1,null==(n=Te())||null==n.resetMaxDepthState||n.resetMaxDepthState(),this.au("$session_id_change",{sessionId:t,windowId:e,changeReason:r}),this.Ru(),!0===this.bu&&(this.bu="unknown",this.stop(),this.start("session_id_changed")),o&&this.au("$session_starting",{previousSessionId:u,previousWindowId:l,nextSessionId:t,nextWindowId:e,changeReason:r,lastActivityTimestamp:this.mu}),y(this.Ya)&&g(this.Mu)&&(null==(a=this.fu)||a.makeSamplingDecisions(t))}},this.Ou=()=>{var t;return(null==(t=this._instance.persistence)?void 0:t.props[U])===this.di},this.Au=()=>{var t,e;if(0===this.M.data.length)return null;var r=null==(t=this.M.data[0])?void 0:t.timestamp,i=null==(e=this.M.data[this.M.data.length-1])?void 0:e.timestamp;return y(r)&&y(i)?i-r:null},this.Lu=()=>{var t,e,r=this.cu;if(!y(r))return!1;if(null===(t=null==(e=this._instance.config.session_recording)?void 0:e.strictMinimumDuration)||void 0===t||!t){var i=this.Fu;return y(i)&&i>=0&&r>i}if(this.Ou())return!1;var n,s=this.Au();return!!m(s)||r>s||(null==(n=this._instance.persistence)||n.register({[U]:this.di}),!1)},this.Nu=()=>{this.status!==ut?this.Eu():this.Du()},this.Bu=()=>{this.au("browser offline",{})},this.Pu=()=>{this.au("browser online",{})},this.At=()=>{null!=r&&r.visibilityState&&this.au("window "+r.visibilityState,{})},this._instance=t;var{sessionId:e,windowId:i}=this.lu.checkAndGetSessionAndWindowId();this.di=e,this.ci=i,this.$a=new kt(this._instance),this.Ua=new wt(this._instance),this.Wa=new St(this._instance),this.M=this.Du(),this.lu.sessionTimeoutMs>this.hu||_e.warn("session_idle_threshold_ms ("+this.hu+") is greater than the session timeout ("+this.lu.sessionTimeoutMs+"). Session will never be detected as idle"),this.xu=new de(this._instance)}get Uu(){var t,e,r,i,n,s,a,o=null==(t=this.ea)?void 0:t.masking,u={maskAllInputs:null==(e=this._instance.config.session_recording)?void 0:e.maskAllInputs,maskTextSelector:null==(r=this._instance.config.session_recording)?void 0:r.maskTextSelector,blockSelector:null==(i=this._instance.config.session_recording)?void 0:i.blockSelector},l=null!==(n=null==u?void 0:u.maskAllInputs)&&void 0!==n?n:null==o?void 0:o.maskAllInputs,h=null!==(s=null==u?void 0:u.maskTextSelector)&&void 0!==s?s:null==o?void 0:o.maskTextSelector,d=null!==(a=null==u?void 0:u.blockSelector)&&void 0!==a?a:null==o?void 0:o.blockSelector;return v(l)&&v(h)&&v(d)?void 0:{maskAllInputs:null==l||l,maskTextSelector:h,blockSelector:d}}get Wu(){var t,e,r,i,n,s,a,o=this._instance.config.session_recording.captureCanvas,u=null==(t=this.ea)?void 0:t.canvasRecording,l=null!==(e=null!==(r=null==o?void 0:o.recordCanvas)&&void 0!==r?r:null==u?void 0:u.enabled)&&void 0!==e&&e,h=null!==(i=null!==(n=null==o?void 0:o.canvasFps)&&void 0!==n?n:null==u?void 0:u.fps)&&void 0!==i?i:4,d=null!==(s=null!==(a=null==o?void 0:o.canvasQuality)&&void 0!==a?a:null==u?void 0:u.quality)&&void 0!==s?s:.4;if("string"==typeof d){var c=parseFloat(d);d=isNaN(c)?.4:c}return{enabled:l,fps:k(h,0,12,T("canvas recording fps"),4),quality:k(d,0,1,T("canvas recording quality"),.4)}}get $u(){var t,e=!(null==(t=this.ea)||!t.consoleLogRecordingEnabled),r=this._instance.config.enable_recording_console_log;return null!=r?r:e}get zu(){var t,e,r,i=null==(t=this.ea)?void 0:t.networkPayloadCapture,n={recordHeaders:null==(e=this._instance.config.session_recording)?void 0:e.recordHeaders,recordBody:null==(r=this._instance.config.session_recording)?void 0:r.recordBody},s=(null==n?void 0:n.recordHeaders)||(null==i?void 0:i.recordHeaders),a=(null==n?void 0:n.recordBody)||(null==i?void 0:i.recordBody),o=ke(this._instance.config.capture_performance),u=ke(null==i?void 0:i.capturePerformance),l=!!(b(o)?o:u);return s||a||l?{recordHeaders:s,recordBody:a,recordPerformance:l}:void 0}ju(){var t,e,r=[],n=null==(t=i.__PosthogExtensions__)||null==(t=t.rrwebPlugins)?void 0:t.getRecordConsolePlugin;n&&this.$u&&r.push(n());var s,o,u,l,h,d,f,p,m,y,b,w=null==(e=i.__PosthogExtensions__)||null==(e=e.rrwebPlugins)?void 0:e.getRecordNetworkPlugin;return this.zu&&c(w)&&(!O.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?r.push(w((h={payloadSizeLimitBytes:Q.payloadSizeLimitBytes,performanceEntryTypeToObserve:[...Q.performanceEntryTypeToObserve],payloadHostDenyList:[...(o=this.zu).payloadHostDenyList||[],...Q.payloadHostDenyList]},d=!1!==(s=this._instance.config).session_recording.recordHeaders&&o.recordHeaders,f=!1!==s.session_recording.recordBody&&o.recordBody,p=!1!==s.capture_performance&&o.recordPerformance,l=Math.min(1e6,null!==(u=h.payloadSizeLimitBytes)&&void 0!==u?u:1e6),m=t=>(null!=t&&t.requestBody&&(t.requestBody=it(t.requestBody,t.requestHeaders,l,"Request")),null!=t&&t.responseBody&&(t.responseBody=it(t.responseBody,t.responseHeaders,l,"Response")),t),y=t=>{return m(((t,e)=>{var r,i=A(t.name),n=0===e.indexOf("http")?null==(r=A(e))?void 0:r.pathname:e;"/"===n&&(n="");var s=null==i?void 0:i.pathname.replace(n||"","");if(!(i&&s&&rt.some((t=>0===s.indexOf(t)))))return t})((g(r=(e=t).requestHeaders)||x(Object.keys(null!=r?r:{}),(t=>{tt.includes(t.toLowerCase())&&(r[t]=K)})),e),s.api_host));var e,r},(b=c(s.session_recording.maskNetworkRequestFn))&&c(s.session_recording.maskCapturedNetworkRequestFn)&&M.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),b&&(s.session_recording.maskCapturedNetworkRequestFn=t=>{var e=s.session_recording.maskNetworkRequestFn({url:t.name});return a({},t,{name:null==e?void 0:e.url})}),h.maskRequestFn=c(s.session_recording.maskCapturedNetworkRequestFn)?t=>{var e,r=y(t);return r&&null!==(e=null==s.session_recording.maskCapturedNetworkRequestFn?void 0:s.session_recording.maskCapturedNetworkRequestFn(r))&&void 0!==e?e:void 0}:t=>function(t){if(!v(t))return t.requestBody=nt(t.requestBody,"Request"),t.responseBody=nt(t.responseBody,"Response"),t}(y(t)),a({},Q,h,{recordHeaders:d,recordBody:f,recordPerformance:p,recordInitialRequests:p})))):_e.info("NetworkCapture not started because we are on localhost.")),r}qu(t){var e=this._instance.config.session_recording;if(e.maskCapturedNetworkRequestFn){var r,i=e.maskCapturedNetworkRequestFn({name:t});return null!==(r=null==i?void 0:i.name)&&void 0!==r?r:null==i?void 0:i.url}if(e.maskNetworkRequestFn){var n=e.maskNetworkRequestFn({url:t});return null==n?void 0:n.url}return t}Hu(t){try{return t.rrwebMethod(),!0}catch(e){return 10>this.yu.length?this.yu.push({enqueuedAt:t.enqueuedAt||Date.now(),attempt:t.attempt+1,rrwebMethod:t.rrwebMethod}):_e.warn("could not emit queued rrweb event.",e,t),!1}}au(t,e){return this.Hu(Me((()=>xe().addCustomEvent(t,e))))}Gu(){try{if(this._instance.config.capture_pageview||!t)return;var e=new URL(t.location.href),r=this.qu(e.origin+e.pathname+e.search);this.Vu!==r&&(this.Vu=r,this.au("$url_changed",{href:r}))}catch(t){}}Zu(){if(this.yu.length){var t=[...this.yu];this.yu=[],t.forEach((t=>{Date.now()-t.enqueuedAt>2e3||this.Hu(t)}))}}tu(){return this.Hu(Me((()=>xe().takeFullSnapshot())))}get Ju(){var t,e,r;return null!=(t=this.fu)&&t.hasPendingTriggers(this.sessionId)&&!["sampled","active"].includes(this.status)?6e4:null!==(e=null==(r=this._instance.config.session_recording)?void 0:r.full_snapshot_interval_millis)&&void 0!==e?e:3e5}Xu(){if(this.Yu&&clearInterval(this.Yu),!0!==this.bu){var t=this.Ju;t&&(this.Yu=setInterval((()=>{this.tu()}),t))}}Ku(){this.Ua.urlBlocked||(this.Ua.urlBlocked=!0,clearInterval(this.Yu),_e.info("recording paused due to URL blocker"),this.au("recording paused",{reason:"url blocker"}))}Qu(){this.Ua.urlBlocked&&(this.Ua.urlBlocked=!1,this.tu(),this.Xu(),this.au("recording resumed",{reason:"left blocked url"}),_e.info("recording resumed"))}th(t,e){var r;if(!this.gu&&null!=(r=this.fu)&&r.hasPendingTriggers(this.sessionId)){this.gu=!0;try{var i,n;null==(i=this._instance.persistence)||i.register({["url"===t?W:z]:this.sessionId}),null==(n=this.fu)||n.updateActiveTriggers(this.sessionId),this.Eu(),this.Qa(t+"_trigger_matched",{["url"===t?"matchedUrl":"matchedEvent"]:e})}finally{this.gu=!1}}}get isStarted(){return!!this.pu}get ea(){var t=this._instance.get_property(F);if(t){var e;try{e=f(t)?t:JSON.parse(t)}catch(t){return void _e.warn("persisted remote config for session recording is invalid and will be ignored",t)}if(!this.isStarted){var r,i,n=null!==(r=e.cache_timestamp)&&void 0!==r?r:Date.now();if(Date.now()-n>36e5)return _e.info("persisted remote config for session recording is stale and will be ignored",{cacheTimestamp:n,persistedConfig:t}),void(null==(i=this._instance.persistence)||i.unregister(F))}return e}}eh(t,e,r){this._instance.get_property(t)&&(e(),r())}start(e){var r,i,n=this.ea;if(n){var{sessionId:s,windowId:a}=this.lu.checkAndGetSessionAndWindowId();this.di=s,this.ci=a,null==(r=this._instance.persistence)||r.unregister(G),null!=n&&n.endpoint&&(this.vu=null==n?void 0:n.endpoint),this.fu=2===(null==n?void 0:n.version)&&(null==n?void 0:n.triggerGroups)&&n.triggerGroups.length>0?new we(this._instance,this.Ua,this.Qa.bind(this),this.au.bind(this)):new be(this._instance,this.Ua,this.Wa,this.$a,this.Qa.bind(this),this.tu.bind(this)),this.fu.onRemoteConfig(n),null==(i=this.ru)||i.call(this),this.ru=this.fu.setupEventTriggerListeners(this._instance.on.bind(this._instance,"eventCaptured"),this.sessionId,((t,e)=>this.th(t,e))),this.eh(N,(()=>{this.overrideSampling()}),(()=>{var t;return null==(t=this._instance.persistence)?void 0:t.unregister(N)})),this.eh(E,(()=>{this.overrideLinkedFlag()}),(()=>{var t;return null==(t=this._instance.persistence)?void 0:t.unregister(E)})),this.eh(B,(()=>{this.overrideTrigger("event")}),(()=>{var t;return null==(t=this._instance.persistence)?void 0:t.unregister(B)})),this.eh(D,(()=>{this.overrideTrigger("url")}),(()=>{var t;return null==(t=this._instance.persistence)?void 0:t.unregister(D)})),this.fu.makeSamplingDecisions(this.sessionId),this.rh(),this.wu||(R(t,"beforeunload",this.Nu),R(t,"offline",this.Bu),R(t,"online",this.Pu),R(t,"visibilitychange",this.At),this._u||(this._u=this.lu.onSessionId(this.ti)),this.Cu||(this.Cu=this.lu.on("forcedIdleReset",(()=>{this.Ru(),this.bu="unknown",this.stop(),this.Tu=this.lu.onSessionId(((t,e,r)=>{var i;null==(i=this.Tu)||i.call(this),this.Tu=void 0,this.ti(t,e,r)}))}))),g(this.Iu)&&(this.Iu=this._instance.on("eventCaptured",(t=>{try{if("$pageview"===t.event){var e=null!=t&&t.properties.$current_url?this.qu(null==t?void 0:t.properties.$current_url):"";if(!e)return;this.au("$pageview",{href:e})}}catch(t){_e.error("Could not add $pageview to rrweb session",t)}}))),this.status===ot&&this.Qa(e||"recording_initialized"))}else _e.info("remote config must be stored in persistence before recording can start")}ih(){var e,r,i,n,s,a,o,u,l;null==t||t.removeEventListener("beforeunload",this.Nu),null==t||t.removeEventListener("offline",this.Bu),null==t||t.removeEventListener("online",this.Pu),null==t||t.removeEventListener("visibilitychange",this.At),clearInterval(this.Yu),this.nh(),null==(e=this.Iu)||e.call(this),this.Iu=void 0,null==(r=this.ru)||r.call(this),this.ru=void 0,null==(i=this._u)||i.call(this),this._u=void 0,null==(n=this.Cu)||n.call(this),this.Cu=void 0,null==(s=this.Mu)||s.call(this),this.Mu=void 0,null==(a=this.Tu)||a.call(this),this.Tu=void 0,null==(o=this.fu)||o.stop(),null==(u=this.sh)||u.stop(),this.yu=[],null==(l=this.pu)||l.call(this),this.pu=void 0}stop(){this.Eu(),this.Du(),this.ih(),_e.info("stopped")}discard(){this.Du(),this.ih(),_e.info("discarded")}onRRwebEmit(t){var e,r,i,n,s,u,l,h;if(this._instance.sessionManager&&(this.Zu(),t&&f(t))){if(t.type===o.Meta){var d=this.qu(t.data.href);if(this.Vu=d,!d)return;t.data.href=d}else this.Gu();if(null==(e=this.fu)||e.checkUrlTriggers(this.sessionId,(()=>this.Ku()),(()=>this.Qu()),((t,e)=>this.th(t,e))),!this.Ua.urlBlocked||(c=t).type===o.Custom&&"recording paused"===c.data.tag){var c,v,p;t.type===o.FullSnapshot&&(this.Xu(),null==(v=this.sh)||v.reset(),null==(p=this._instance.persistence)||p.register_once({[G]:t.timestamp},void 0)),t.type===o.FullSnapshot&&null!=(r=this.fu)&&r.hasPendingTriggers(this.sessionId)&&this.ah();var m=this.sh?this.sh.throttleMutations(t):t;if(m){var g=function(t){var e=t;if(e&&f(e)&&6===e.type&&f(e.data)&&"rrweb/console@1"===e.data.plugin){e.data.payload.payload.length>10&&(e.data.payload.payload=e.data.payload.payload.slice(0,10),e.data.payload.payload.push("...[truncated]"));for(var r=[],i=0;e.data.payload.payload.length>i;i++)r.push(e.data.payload.payload[i]&&e.data.payload.payload[i].length>2e3?e.data.payload.payload[i].slice(0,2e3)+"...[truncated]":e.data.payload.payload[i]);return e.data.payload.payload=r,t}return t}(m),y=function(t){return Fe(t)?t.data.payload:null}(g),b=function(t){return Ne(t)?t.data.payload:null}(g);if(y||b){var w=null!=y?y:b;null!=w&&w.lastActivityTimestamp&&(g.timestamp=w.lastActivityTimestamp)}else this.oh(g);t.type===o.FullSnapshot&&(this.Su.push([this.di,t.timestamp]),this.Su.length>6&&(this.Su=this.Su.slice(-6)));var k=null!==(i=null!==(n=null==y?void 0:y.currentSessionId)&&void 0!==n?n:null==b?void 0:b.nextSessionId)&&void 0!==i?i:this.di,S=null!==(s=null!==(u=null==y?void 0:y.currentWindowId)&&void 0!==u?u:null==b?void 0:b.nextWindowId)&&void 0!==s?s:this.ci;if(!0!==this.bu||function(t){return Le(t)||Fe(t)||Ne(t)}(g)){if(Le(g)){var I=g.data.payload;I&&(g.timestamp=I.lastActivityTimestamp+I.threshold)}var{event:_,size:C}=null===(l=this._instance.config.session_recording.compress_events)||void 0===l||l?function(t){try{if(t.type===o.FullSnapshot){var e=a({},t,{data:Re(t.data),cv:"2024-10"});return{event:e,size:Tt(e)}}if(t.type===o.IncrementalSnapshot&&0===t.data.source){var r=a({},t,{cv:"2024-10",data:a({},t.data,{texts:Oe(t.data.texts),attributes:Oe(t.data.attributes),removes:Oe(t.data.removes),adds:Oe(t.data.adds)})});return{event:r,size:Tt(r)}}if(t.type===o.IncrementalSnapshot&&8===t.data.source){var i=a({},t,{cv:"2024-10",data:a({},t.data,{adds:t.data.adds?Re(t.data.adds):void 0,removes:t.data.removes?Re(t.data.removes):void 0})});return{event:i,size:Tt(i)}}}catch(t){_e.error("could not compress event - will use uncompressed event",t)}return{event:t,size:Mt(t)}}(g):{event:g,size:Mt(g)},M={$snapshot_bytes:C,$snapshot_data:_,$session_id:k,$window_id:S};g.type===o.FullSnapshot&&null!=(h=Te())&&null!=h.wasMaxDepthReached&&h.wasMaxDepthReached()&&(this.ku=!0),this.status!==st?this.uh(M):this.Du()}}}}}get status(){return this.fu?this.fu.getStatus({instance:this._instance,sessionId:this.sessionId,isSampled:this.du,rrwebError:this.wu,urlTriggerMatching:this.Ua,eventTriggerMatching:this.Wa,linkedFlagMatching:this.$a,remoteConfig:this.ea}):st}log(t,e){var r;void 0===e&&(e="log"),null==(r=this._instance.sessionRecording)||r.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:e,trace:[],payload:[JSON.stringify(t)]}},timestamp:Date.now()})}overrideLinkedFlag(){this.$a.linkedFlagSeen=!0,this.tu(),this.Qa("linked_flag_overridden")}overrideSampling(){var t;null==(t=this._instance.persistence)||t.register({[P]:this.sessionId}),this.tu(),this.Qa("sampling_overridden")}overrideTrigger(t){this.th(t)}nh(){this.lh&&(clearTimeout(this.lh),this.lh=void 0)}Eu(){this.nh();var t,e=this.Lu();return this.status===ut||this.status===lt||this.status===st||e?(this.lh=setTimeout((()=>{this.Eu()}),2e3),this.M):(this.M.data.length>0&&(Ee(this.M).forEach((t=>{var e;null==(e=this.xu)||e.trackSize(t.size),this.hh({$snapshot_bytes:t.size,$snapshot_data:t.data,$session_id:t.sessionId,$window_id:t.windowId,$lib:_,$lib_version:I})})),null==(t=this.fu)||t.onFlushComplete()),this.Du())}uh(t){var e,r=2+((null==(e=this.M)?void 0:e.data.length)||0),i=t.$session_id;this.bu||943718.4>=this.M.size+t.$snapshot_bytes+r&&this.M.sessionId===i||(this.M=this.Eu(),this.M.sessionId=i,this.M.windowId=t.$window_id),this.M.size+=t.$snapshot_bytes,this.M.data.push(t.$snapshot_data),this.M.sizes.push(t.$snapshot_bytes),this.lh||this.bu||(this.lh=setTimeout((()=>{this.Eu()}),2e3))}hh(t){this._instance.capture("$snapshot",t,{_url:this._instance.requestRouter.endpointFor("api",this.vu),_noTruncate:!0,_batchKey:"recordings",skip_client_rate_limiting:!0})}get Fu(){var t,e,r=null==(t=this.M)?void 0:t.data[(null==(e=this.M)?void 0:e.data.length)-1],{sessionStartTimestamp:i}=this.lu.checkAndGetSessionAndWindowId(!0);return r?r.timestamp-i:null}ah(){if(!this.M||0===this.M.data.length)return this.Du();for(var t=-1,e=this.M.data.length-1;e>=0;e--)if(this.M.data[e].type===o.Meta){t=e;break}return 0>t?this.Du():(this.M.data=this.M.data.slice(t),this.M.sizes=this.M.sizes.slice(t),this.M.size=this.M.sizes.reduce(((t,e)=>t+e),0),this.M)}Du(){return this.M={size:0,data:[],sizes:[],sessionId:this.di,windowId:this.ci},this.M}Qa(t,e){this._instance.register_for_session({$session_recording_start_reason:t}),_e.info(t.replace("_"," "),e),"session_id_changed"!==t&&this.au("$recording_started",a({reason:t},e))}dh(t){var e;return 3===t.type&&-1!==Ce.indexOf(null==(e=t.data)?void 0:e.source)}oh(t){var e=this.dh(t);e||this.bu||t.timestamp-this.mu>this.hu&&(this.bu=!0,clearInterval(this.Yu),this.au("sessionIdle",{eventTimestamp:t.timestamp,lastActivityTimestamp:this.mu,threshold:this.hu,bufferLength:this.M.data.length,bufferSize:this.M.size}),this.Eu());var r=!1;if(e&&(this.mu=t.timestamp,this.bu)){var i="unknown"===this.bu;this.bu=!1,i||(this.au("sessionNoLongerIdle",{reason:"user activity",type:t.type}),r=!0)}if(!this.bu){var{windowId:n,sessionId:s}=this.lu.checkAndGetSessionAndWindowId(!e,t.timestamp),a=this.di!==s,o=this.ci!==n;this.ci=n,this.di=s,a||o?(this.stop(),this.start("session_id_changed")):r&&this.Xu()}}Ru(){var t;null==(t=this.fu)||t.clearConditionalRecordingPersistence()}get sdkDebugProperties(){var t,{sessionStartTimestamp:e}=this.lu.checkAndGetSessionAndWindowId(!0);return{$recording_status:this.status,$sdk_debug_replay_internal_buffer_length:this.M.data.length,$sdk_debug_replay_internal_buffer_size:this.M.size,$sdk_debug_current_session_duration:this.Fu,$sdk_debug_session_start:e,$sdk_debug_replay_flushed_size:null==(t=this.xu)?void 0:t.currentTrackedSize,$sdk_debug_replay_full_snapshots:this.Su,$snapshot_max_depth_exceeded:this.ku,$sdk_debug_replay_rrweb_error:this.wu}}rh(){var t;if(!this.pu){var e,r,i,n={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1},s=this._instance.config.session_recording;for(var[o,u]of Object.entries(s||{}))o in n&&("maskInputOptions"===o?n.maskInputOptions=a({password:!0},u):n[o]=u);this.Wu&&this.Wu.enabled&&(n.recordCanvas=!0,n.sampling={canvas:this.Wu.fps},n.dataURLOptions={type:"image/webp",quality:this.Wu.quality}),this.Uu&&(n.maskAllInputs=null===(e=this.Uu.maskAllInputs)||void 0===e||e,n.maskTextSelector=null!==(r=this.Uu.maskTextSelector)&&void 0!==r?r:void 0,n.blockSelector=null!==(i=this.Uu.blockSelector)&&void 0!==i?i:void 0);var l=xe();if(l){this.sh=null!==(t=this.sh)&&void 0!==t?t:new le(l,{refillRate:this._instance.config.session_recording.__mutationThrottlerRefillRate,bucketSize:this._instance.config.session_recording.__mutationThrottlerBucketSize,onBlockedNode:(t,e)=>{var r="Too many mutations on node '"+t+"'. Rate limiting. This could be due to SVG animations or something similar";_e.info(r,{node:e}),this.log(Ie+" "+r,"warn")}});var h=this.ju();if(this.pu=l(a({emit:t=>{this.onRRwebEmit(t)},plugins:h},n)),!this.pu)return this.wu=!0,void _e.error("rrweb failed to start - Loss of recording data is possible. Check the browser console for rrweb errors.");this.wu=!1,this.mu=Date.now(),this.bu=b(this.bu)?this.bu:"unknown",this.tryAddCustomEvent("$remote_config_received",this.ea),this.au("$session_options",{sessionRecordingOptions:n,activePlugins:h.map((t=>null==t?void 0:t.name))}),this.au("$posthog_config",{config:this._instance.config})}else _e.error("_startRecorder was called but rrwebRecord is not available. This indicates something has gone wrong.")}}tryAddCustomEvent(t,e){return this.au(t,e)}}var Be,Pe=["type"],Ue=Object.defineProperty,We=(t,e,r)=>((t,e,r)=>e in t?Ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),$e=(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))($e||{}),ze=(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[t.CustomElement=16]="CustomElement",t))(ze||{}),je=(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))(je||{}),qe=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(qe||{}),He=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(He||{}),Ge=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(Ge||{}),Ve=(t=>(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))(Ve||{}),Ze={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},Je={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},Xe={};function Ye(t){if(Xe[t])return Xe[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in Ze?Ze[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in Je?Je[t]:void 0,a=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&a)return Xe[t]=e.prototype,e.prototype;var o=document.createElement("iframe");try{document.body.appendChild(o);var u=o.contentWindow;if(!u)return e.prototype;var l=u[t].prototype;return l?Xe[t]=l:r}catch(t){return r}finally{o.parentNode&&document.body.removeChild(o)}}var Ke={};function Qe(t,e,r){var i,n=t+"."+String(r);if(Ke[n])return Ke[n].call(e);var s=Ye(t),a=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return a?(Ke[n]=a,a.call(e)):e[r]}var tr={};function er(t,e,r){var i=t+"."+String(r);if(tr[i])return tr[i].bind(e);var n=Ye(t)[r];return"function"!=typeof n?e[r]:(tr[i]=n,n.bind(e))}function rr(){return Ye("MutationObserver").constructor}function ir(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}var nr={childNodes:t=>Qe("Node",t,"childNodes"),parentNode:t=>Qe("Node",t,"parentNode"),parentElement:t=>Qe("Node",t,"parentElement"),textContent:t=>Qe("Node",t,"textContent"),contains:(t,e)=>er("Node",t,"contains")(e),getRootNode:t=>er("Node",t,"getRootNode")(),host:t=>t&&"host"in t?Qe("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?Qe("Element",t,"shadowRoot"):null,querySelector:(t,e)=>er("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>er("Element",t,"querySelectorAll")(e),mutationObserver:rr,patch:ir};function sr(t){return t.nodeType===t.ELEMENT_NODE}function ar(t){var e=t&&"host"in t&&"mode"in t&&nr.host(t)||null;return Boolean(e&&"shadowRoot"in e&&nr.shadowRoot(e)===t)}function or(t){return"[object ShadowRoot]"==={}.toString.call(t)}function ur(t){try{var e=t.rules||t.cssRules;if(!e)return null;var r=t.href;return!r&&t.ownerNode&&(r=t.ownerNode.baseURI),(i=Array.from(e,(t=>lr(t,r))).join("")).includes(" background-clip: text;")&&!i.includes(" -webkit-background-clip: text;")&&(i=i.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),i}catch(t){return null}var i}function lr(t,e){var r;if(function(t){return"styleSheet"in t}(t)){var i;try{i=ur(t.styleSheet)||function(t){var{cssText:e}=t;if(3>e.split('"').length)return e;var 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(" ")+";"}(t)}catch(e){i=t.cssText}try{if(i&&(null==(r=t.styleSheet)?void 0:r.href))return wr(i,t.styleSheet.href)}catch(t){}return i}var n=t.cssText;return function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":")&&(n=n.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),e?wr(n,e):n}class hr{constructor(){We(this,"idNodeMap",new Map),We(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var r=null==(e=this.getMeta(t))?void 0:e.id;return null!=r?r:-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){var e=this.getId(t);if(this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t))),sr(t)){var r=nr.shadowRoot(t);r&&this.removeNodeFromMap(r),"IFRAME"===t.nodeName&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function dr(t){var{element:e,maskInputOptions:r,tagName:i,type:n,value:s,maskInputFn:a}=t,o=s||"",u=n&&cr(n);return(r[i.toLowerCase()]||u&&r[u])&&(o=a?a(o,e):"*".repeat(o.length)),o}function cr(t){return t.toLowerCase()}var fr="__rrweb_original__";function vr(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?cr(e):null}function pr(t,e){var r,i;try{i=new URL(t,null!=e?e:window.location.href)}catch(t){return null}var n=i.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(r=null==n?void 0:n[1])&&void 0!==r?r:null}var mr=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,gr=/^(?:[a-z+]+:)?\/\//i,yr=/^www\..*/i,br=/^(data:)([^,]*),(.*)/i;function wr(t,e){return(t||"").replace(mr,((t,r,i,n,s,a)=>{var o,u=i||s||a,l=r||n||"";if(!u)return t;if(gr.test(u)||yr.test(u))return"url("+l+u+l+")";if(br.test(u))return"url("+l+u+l+")";if("/"===u[0])return"url("+l+(((o=e).indexOf("//")>-1?o.split("/").slice(0,3).join("/"):o.split("/")[0]).split("?")[0]+u)+l+")";var h=e.split("/"),d=u.split("/");for(var c of(h.pop(),d))"."!==c&&(".."===c?h.pop():h.push(c));return"url("+l+h.join("/")+l+")"}))}var kr,Sr,Ir="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",_r=4096,Cr=1,Mr=new RegExp("[^a-z0-9-_:]"),Tr=-2;function xr(){return Cr++}var Rr=/^[^ \t\n\r\u000c]+/,Or=/^[, \t\n\r\u000c]+/,Ar=new WeakMap;function Lr(t,e){return e&&""!==e.trim()?Fr(t,e):e}function Fr(t,e){var r=Ar.get(t);if(r||(r=t.createElement("a"),Ar.set(t,r)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return r.setAttribute("href",e),r.href}function Nr(t,e,r,i,n,s){if(!i)return i;if("src"===r||"href"===r&&("use"!==e||"#"!==i[0])){var a=Lr(t,i);if("img"===e&&a.startsWith("data:")&&n){var o=a;return((null==s?void 0:s.type)||void 0!==(null==s?void 0:s.quality))&&(o=function(t,e,r,i){if(!t.complete||0===t.naturalWidth)return e;if(t.naturalWidth>_r||t.naturalHeight>_r)return e;try{var n=document.createElement("canvas");n.width=t.naturalWidth,n.height=t.naturalHeight;var s=n.getContext("2d");return s?(s.drawImage(t,0,0),n.toDataURL(r||"image/webp",null!=i?i:.4)):e}catch(t){return e}}(n,a,s.type,s.quality)),(null==s?void 0:s.maxBase64ImageLength)&&(u=o,o=(l=s.maxBase64ImageLength)&&u.length>l?Ir:u),o}return a}return"xlink:href"===r&&"#"!==i[0]?Lr(t,i):"background"!==r||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===r?function(t,e){if(""===e.trim())return e;var r=0;function i(t){var i,n=t.exec(e.substring(r));return n?(r+=(i=n[0]).length,i):""}for(var n=[];i(Or),e.length>r;){var s=i(Rr);if(","===s.slice(-1))s=Lr(t,s.substring(0,s.length-1)),n.push(s);else{var a="";s=Lr(t,s);for(var o=!1;;){var u=e.charAt(r);if(""===u){n.push((s+a).trim());break}if(o)")"===u&&(o=!1);else{if(","===u){r+=1,n.push((s+a).trim());break}"("===u&&(o=!0)}a+=u,r+=1}}}return n.join(", ")}(t,i):"style"===r?wr(i,Fr(t)):"object"===e&&"data"===r?Lr(t,i):i:Lr(t,i);var u,l}function Er(t,e,r){return("video"===t||"audio"===t)&&"autoplay"===e}function Dr(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!r&&Dr(nr.parentNode(t),e,r);for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;return!!r&&Dr(nr.parentNode(t),e,r)}function Br(t,e,r,i){var n;if(sr(t)){if(!nr.childNodes(n=t).length)return!1}else{if(null===nr.parentElement(t))return!1;n=nr.parentElement(t)}try{if("string"==typeof e){if(i){if(n.closest("."+e))return!0}else if(n.classList.contains(e))return!0}else if(Dr(n,e,i))return!0;if(r)if(i){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(t){}return!1}function Pr(t,e){return Array.from(t.styleSheets).find((t=>t.href===e))}function Ur(t){return null==t?"":t.toLowerCase()}var Wr=50,$r=!1,zr=!1;function jr(t,e){var{doc:r,mirror:i,blockClass:n,blockSelector:s,maskTextClass:a,maskTextSelector:o,skipChild:u=!1,inlineStylesheet:l=!0,maskInputOptions:h={},maskTextFn:d,maskInputFn:c,slimDOMOptions:f,dataURLOptions:v={},inlineImages:p=!1,recordCanvas:m=!1,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:b=5e3,onStylesheetLoad:w,stylesheetLoadTimeout:k=5e3,keepIframeSrcFn:S=(()=>!1),newlyAddedElement:I=!1,depth:_=0,maxDepth:C=Wr}=e,{needsMask:M}=e,{preserveWhiteSpace:T=!0}=e;if(_>=C)return zr=!0,$r||($r=!0,console.warn("[rrweb-snapshot] DOM tree depth exceeded max depth of "+C+". Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.")),null;M||(M=Br(t,a,o,void 0===M));var x,R=function(t,e){var{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:a,inlineStylesheet:o,maskInputOptions:u={},maskTextFn:l,maskInputFn:h,dataURLOptions:d={},inlineImages:c,recordCanvas:f,keepIframeSrcFn:v,newlyAddedElement:p=!1}=e,m=function(t,e){if(e.hasNode(t)){var r=e.getId(t);return 1===r?void 0:r}}(r,i);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:Ve.Document,childNodes:[],compatMode:t.compatMode}:{type:Ve.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:Ve.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:m};case t.ELEMENT_NODE:return function(t,e){for(var r,i,n,{doc:s,blockClass:a,blockSelector:o,inlineStylesheet:u,maskInputOptions:l={},maskInputFn:h,dataURLOptions:d={},inlineImages:c,recordCanvas:f,keepIframeSrcFn:v,newlyAddedElement:p=!1,rootId:m}=e,g=function(t,e,r){try{if("string"==typeof e){if(t.classList.contains(e))return!0}else for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;if(r)return t.matches(r)}catch(t){}return!1}(t,a,o),y=function(t){if(t instanceof HTMLFormElement)return"form";var e=cr(t.tagName);return Mr.test(e)?"div":e}(t),b={},w=t.attributes.length,k=0;w>k;k++){var S=t.attributes[k];Er(y,S.name)||(b[S.name]=Nr(s,y,cr(S.name),S.value,t,d))}if("link"===y&&u){var I=function(t){return t.href}(t);if(I){var _=Pr(s,I);!_&&I.includes(".css")&&(_=Pr(s,window.location.origin+"/"+I.replace(window.location.href,"")));var C=null;_&&(C=ur(_)),C&&(delete b.rel,delete b.href,b._cssText=C)}}if("style"===y&&t.sheet&&!(t.innerText||nr.textContent(t)||"").trim().length){var M=ur(t.sheet);M&&(b._cssText=M)}if("input"===y||"textarea"===y||"select"===y){var T=t.value,x=t.checked;"radio"!==b.type&&"checkbox"!==b.type&&"submit"!==b.type&&"button"!==b.type&&T?b.value=dr({element:t,type:vr(t),tagName:y,value:T,maskInputOptions:l,maskInputFn:h}):x&&(b.checked=x)}if("option"===y&&(t.selected&&!l.select?b.selected=!0:delete b.selected),"dialog"===y&&t.open)try{b.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"}catch(t){b.rr_open_mode="modal",b.ph_rr_could_not_detect_modal=!0}if("canvas"===y&&f)if("2d"===t.__context)(function(t){var e=t.getContext("2d");if(!e)return!0;for(var r=0;t.width>r;r+=50)for(var i=0;t.height>i;i+=50){var n=e.getImageData;if(new Uint32Array((fr in n?n[fr]:n).call(e,r,i,Math.min(50,t.width-r),Math.min(50,t.height-i)).data.buffer).some((t=>0!==t)))return!1}return!0})(t)||(b.rr_dataURL=t.toDataURL(d.type,d.quality));else if(!("__context"in t)){var R=t.toDataURL(d.type,d.quality),O=s.createElement("canvas");O.width=t.width,O.height=t.height,R!==O.toDataURL(d.type,d.quality)&&(b.rr_dataURL=R)}if("img"===y&&c){kr||(kr=s.createElement("canvas"),Sr=kr.getContext("2d"));var A=t,L=A.currentSrc||A.getAttribute("src")||"<unknown-src>",F=A.crossOrigin,N=()=>{A.removeEventListener("load",N);try{kr.width=A.naturalWidth,kr.height=A.naturalHeight,Sr.drawImage(A,0,0),b.rr_dataURL=kr.toDataURL(d.type,d.quality)}catch(t){if("anonymous"!==A.crossOrigin)return A.crossOrigin="anonymous",void(A.complete&&0!==A.naturalWidth?N():A.addEventListener("load",N));console.warn("Cannot inline img src="+L+"! Error: "+t)}"anonymous"===A.crossOrigin&&(F?b.crossOrigin=F:A.removeAttribute("crossorigin"))};A.complete&&0!==A.naturalWidth?N():A.addEventListener("load",N)}if("audio"===y||"video"===y){var E=b;E.rr_mediaState=t.paused?"paused":"played",E.rr_mediaCurrentTime=t.currentTime,E.rr_mediaPlaybackRate=t.playbackRate,E.rr_mediaMuted=t.muted,E.rr_mediaLoop=t.loop,E.rr_mediaVolume=t.volume}if(p||(t.scrollLeft&&(b.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(b.rr_scrollTop=t.scrollTop)),g){var{width:D,height:B,left:P,top:U}=t.getBoundingClientRect();b={class:b.class,rr_width:D+"px",rr_height:B+"px",rr_left:Math.floor(P+((null==(r=s.defaultView)?void 0:r.scrollX)||0))+"px",rr_top:Math.floor(U+((null==(i=s.defaultView)?void 0:i.scrollY)||0))+"px"}}"iframe"!==y||v(b.src)||(t.contentDocument||(b.rr_src=b.src),delete b.src);try{customElements.get(y)&&(n=!0)}catch(t){}return{type:Ve.Element,tagName:y,attributes:b,childNodes:[],isSVG:(W=t,Boolean("svg"===W.tagName||W.ownerSVGElement)||void 0),needBlock:g,rootId:m,isCustom:n};var W}(t,{doc:r,blockClass:n,blockSelector:s,inlineStylesheet:o,maskInputOptions:u,maskInputFn:h,dataURLOptions:d,inlineImages:c,recordCanvas:f,keepIframeSrcFn:v,newlyAddedElement:p,rootId:m});case t.TEXT_NODE:return function(t,e){var r,{needsMask:i,maskTextFn:n,rootId:s}=e,a=nr.parentNode(t),o=a&&a.tagName,u=nr.textContent(t),l="STYLE"===o||void 0,h="SCRIPT"===o||void 0;if(l&&u){try{if(t.nextSibling||t.previousSibling);else if(null==(r=a.sheet)?void 0:r.cssRules){var d=ur(a.sheet);d&&!/(?:^|[\s;{}])-?[a-zA-Z][\w-]*\s*:\s*;/.test(d)&&(u=d)}}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: "+e,t)}u=wr(u,Fr(e.doc))}return h&&(u="SCRIPT_PLACEHOLDER"),!l&&!h&&u&&i&&(u=n?n(u,nr.parentElement(t)):u.replace(/[\S]/g,"*")),{type:Ve.Text,textContent:u||"",isStyle:l,rootId:s}}(t,{doc:r,needsMask:a,maskTextFn:l,rootId:m});case t.CDATA_SECTION_NODE:return{type:Ve.CDATA,textContent:"",rootId:m};case t.COMMENT_NODE:return{type:Ve.Comment,textContent:nr.textContent(t)||"",rootId:m};default:return!1}}(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:M,inlineStylesheet:l,maskInputOptions:h,maskTextFn:d,maskInputFn:c,dataURLOptions:v,inlineImages:p,recordCanvas:m,keepIframeSrcFn:S,newlyAddedElement:I});if(!R)return console.warn(t,"not serialized"),null;x=i.hasNode(t)?i.getId(t):!function(t,e){if(e.comment&&t.type===Ve.Comment)return!0;if(t.type===Ve.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===pr(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(Ur(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Ur(t.attributes.name)||["icon","apple-touch-icon","shortcut icon"].includes(Ur(t.attributes.rel)))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&Ur(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Ur(t.attributes.property).match(/^(og|twitter|fb):/)||Ur(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===Ur(t.attributes.name)))return!0;if(e.headMetaRobots&&["robots","googlebot","bingbot"].includes(Ur(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&(["author","generator","framework","publisher","progid"].includes(Ur(t.attributes.name))||Ur(t.attributes.property).match(/^article:/)||Ur(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&["google-site-verification","yandex-verification","csrf-token","p:domain_verify","verify-v1","verification","shopify-checkout-api-token"].includes(Ur(t.attributes.name)))return!0}}return!1}(R,f)&&(T||R.type!==Ve.Text||R.isStyle||R.textContent.replace(/^\s+|\s+$/gm,"").length)?xr():Tr;var O=Object.assign(R,{id:x});if(i.add(t,O),x===Tr)return null;g&&g(t);var A=!u;if(O.type===Ve.Element){A=A&&!O.needBlock,delete O.needBlock;var L=nr.shadowRoot(t);L&&or(L)&&(O.isShadowHost=!0)}if((O.type===Ve.Document||O.type===Ve.Element)&&A){f.headWhitespace&&O.type===Ve.Element&&"head"===O.tagName&&(T=!1);var F={doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:M,maskTextClass:a,maskTextSelector:o,skipChild:u,inlineStylesheet:l,maskInputOptions:h,maskTextFn:d,maskInputFn:c,slimDOMOptions:f,dataURLOptions:v,inlineImages:p,recordCanvas:m,preserveWhiteSpace:T,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:k,keepIframeSrcFn:S,depth:_+1,maxDepth:C};if(O.type===Ve.Element&&"textarea"===O.tagName&&void 0!==O.attributes.value);else for(var N of Array.from(nr.childNodes(t))){var E=jr(N,F);E&&O.childNodes.push(E)}var D=null;if(sr(t)&&(D=nr.shadowRoot(t)))for(var B of Array.from(nr.childNodes(D))){var P=jr(B,F);P&&(or(D)&&(P.isShadow=!0),O.childNodes.push(P))}}var U=nr.parentNode(t);return U&&ar(U)&&or(U)&&(O.isShadow=!0),O.type===Ve.Element&&"iframe"===O.tagName&&function(t,e,r){var i=t.contentWindow;if(i){var n,s=!1;try{n=i.document.readyState}catch(t){return}if("complete"===n){var a="about:blank";if(i.location.href!==a||t.src===a||""===t.src)return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}else{var o=setTimeout((()=>{s||(e(),s=!0)}),r);t.addEventListener("load",(()=>{clearTimeout(o),s=!0,e()}))}}}(t,(()=>{var e=t.contentDocument;if(e&&y){var r=jr(e,{doc:e,mirror:i,blockClass:n,blockSelector:s,needsMask:M,maskTextClass:a,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:h,maskTextFn:d,maskInputFn:c,slimDOMOptions:f,dataURLOptions:v,inlineImages:p,recordCanvas:m,preserveWhiteSpace:T,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:k,keepIframeSrcFn:S,depth:_+1,maxDepth:C});r&&y(t,r)}}),b),O.type===Ve.Element&&"link"===O.tagName&&"string"==typeof O.attributes.rel&&("stylesheet"===O.attributes.rel||"preload"===O.attributes.rel&&"string"==typeof O.attributes.href&&"css"===pr(O.attributes.href))&&function(t,e,r){var i,n=!1;try{i=t.sheet}catch(t){return}if(!i){var s=setTimeout((()=>{n||(e(),n=!0)}),r);t.addEventListener("load",(()=>{clearTimeout(s),n=!0,e()}))}}(t,(()=>{if(w){var e=jr(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:M,maskTextClass:a,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:h,maskTextFn:d,maskInputFn:c,slimDOMOptions:f,dataURLOptions:v,inlineImages:p,recordCanvas:m,preserveWhiteSpace:T,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:k,keepIframeSrcFn:S,depth:_,maxDepth:C});e&&w(t,e)}}),k),O}function qr(t){return!0===t||"all"===t?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===t,headMetaDescKeywords:"all"===t,headTitleMutations:"all"===t}:!1===t?{}:t}class Hr{constructor(){We(this,"parentElement",null),We(this,"parentNode",null),We(this,"ownerDocument"),We(this,"firstChild",null),We(this,"lastChild",null),We(this,"previousSibling",null),We(this,"nextSibling",null),We(this,"ELEMENT_NODE",1),We(this,"TEXT_NODE",3),We(this,"nodeType"),We(this,"nodeName"),We(this,"RRNodeType")}get childNodes(){for(var t=[],e=this.firstChild;e;)t.push(e),e=e.nextSibling;return t}contains(t){if(!(t instanceof Hr))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,e){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}function Gr(t,e,r){void 0===r&&(r=document);var i={capture:!0,passive:!0};return r.addEventListener(t,e,i),()=>r.removeEventListener(t,e,i)}function Vr(t){try{t()}catch(t){if(!(t instanceof DOMException&&"SecurityError"===t.name))throw t}}var Zr="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",Jr={map:{},getId(){return console.error(Zr),-1},getNode(){return console.error(Zr),null},removeNodeFromMap(){console.error(Zr)},has(){return console.error(Zr),!1},reset(){console.error(Zr)}};function Xr(t,e,r){void 0===r&&(r={});var i=null,n=0;return function(){for(var s=arguments.length,a=new Array(s),o=0;s>o;o++)a[o]=arguments[o];var u=Date.now();n||!1!==r.leading||(n=u);var l=e-(u-n),h=this;0>=l||l>e?(i&&(clearTimeout(i),i=null),n=u,t.apply(h,a)):i||!1===r.trailing||(i=setTimeout((()=>{n=!1===r.leading?0:Date.now(),i=null,t.apply(h,a)}),l))}}function Yr(t,e,r,i,n){void 0===n&&(n=window);var s=n.Object.getOwnPropertyDescriptor(t,e);return n.Object.defineProperty(t,e,i?r:{set(t){setTimeout((()=>{r.set.call(this,t)}),0),s&&s.set&&s.set.call(this,t)}}),()=>Yr(t,e,s||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Jr=new Proxy(Jr,{get(t,e,r){return"map"===e&&console.error(Zr),Reflect.get(t,e,r)}}));var Kr=Date.now;function Qr(t){var e,r,i,n,s=t.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:s.documentElement.scrollLeft||(null==s?void 0:s.body)&&(null==(e=nr.parentElement(s.body))?void 0:e.scrollLeft)||(null==(r=null==s?void 0:s.body)?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==s?void 0:s.documentElement.scrollTop)||(null==s?void 0:s.body)&&(null==(i=nr.parentElement(s.body))?void 0:i.scrollTop)||(null==(n=null==s?void 0:s.body)?void 0:n.scrollTop)||0}}function ti(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ei(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ri(t){return t?t.nodeType===t.ELEMENT_NODE?t:nr.parentElement(t):null}function ii(t,e,r,i){if(!t)return!1;var n=ri(t);if(!n)return!1;try{if("string"==typeof e){if(n.classList.contains(e))return!0;if(i&&null!==n.closest("."+e))return!0}else if(Dr(n,e,i))return!0}catch(t){}if(r){if(n.matches(r))return!0;if(i&&null!==n.closest(r))return!0}return!1}function ni(t,e,r){return!("TITLE"!==t.tagName||!r.headTitleMutations)||e.getId(t)===Tr}function si(t,e){if(ar(t))return!1;var r=e.getId(t);if(!e.has(r))return!0;var i=nr.parentNode(t);return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||si(i,e))}function ai(t){return Boolean(t.changedTouches)}function oi(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function ui(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function li(t){return!!t&&(t instanceof Hr&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(nr.shadowRoot(t)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Kr=()=>(new Date).getTime());class hi{constructor(){We(this,"id",1),We(this,"styleIDMap",new WeakMap),We(this,"idStyleMap",new Map)}getId(t){var e;return null!==(e=this.styleIDMap.get(t))&&void 0!==e?e:-1}has(t){return this.styleIDMap.has(t)}add(t,e){return this.has(t)?this.getId(t):(r=void 0===e?this.id++:e,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r);var r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function di(t){var e,r=null;return"getRootNode"in t&&(null==(e=nr.getRootNode(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&nr.host(nr.getRootNode(t))&&(r=nr.host(nr.getRootNode(t))),r}function ci(t){var e=t.ownerDocument;return!!e&&(nr.contains(e,t)||function(t){var e=t.ownerDocument;if(!e)return!1;var r=function(t){for(var e,r=t;e=di(r);)r=e;return r}(t);return nr.contains(e,r)}(t))}function fi(t){return"__ln"in t}class vi{constructor(){We(this,"length",0),We(this,"head",null),We(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");for(var e=this.head,r=0;t>r;r++)e=(null==e?void 0:e.next)||null;return e}addNode(t){var e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&fi(t.previousSibling)){var r=t.previousSibling.__ln.next;e.next=r,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,r&&(r.previous=e)}else if(t.nextSibling&&fi(t.nextSibling)&&t.nextSibling.__ln.previous){var i=t.nextSibling.__ln.previous;e.previous=i,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,i&&(i.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;null===e.next&&(this.tail=e),this.length++}removeNode(t){var e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}var pi,mi=(t,e)=>t+"@"+e;class gi{constructor(){We(this,"frozen",!1),We(this,"locked",!1),We(this,"texts",[]),We(this,"attributes",[]),We(this,"attributeMap",new WeakMap),We(this,"removes",[]),We(this,"mapRemoves",[]),We(this,"movedMap",{}),We(this,"addedSet",new Set),We(this,"movedSet",new Set),We(this,"droppedSet",new Set),We(this,"removesSubTreeCache",new Set),We(this,"mutationCb"),We(this,"blockClass"),We(this,"blockSelector"),We(this,"maskTextClass"),We(this,"maskTextSelector"),We(this,"inlineStylesheet"),We(this,"maskInputOptions"),We(this,"maskTextFn"),We(this,"maskInputFn"),We(this,"keepIframeSrcFn"),We(this,"recordCanvas"),We(this,"inlineImages"),We(this,"slimDOMOptions"),We(this,"dataURLOptions"),We(this,"doc"),We(this,"mirror"),We(this,"iframeManager"),We(this,"stylesheetManager"),We(this,"shadowDomManager"),We(this,"canvasManager"),We(this,"processedNodeManager"),We(this,"unattachedDoc"),We(this,"processMutations",(t=>{t.forEach(this.processMutation),this.emit()})),We(this,"emit",(()=>{if(!this.frozen&&!this.locked){for(var t=[],e=new Set,r=new vi,i=t=>{for(var e=t,r=Tr;r===Tr;)r=(e=e&&e.nextSibling)&&this.mirror.getId(e);return r},n=n=>{var s=nr.parentNode(n);if(s&&ci(n)&&"TEXTAREA"!==s.tagName){var a=ar(s)?this.mirror.getId(di(n)):this.mirror.getId(s),o=i(n);if(-1===a||-1===o)return r.addNode(n);var u=jr(n,{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:t=>{oi(t,this.mirror)&&this.iframeManager.addIframe(t),ui(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),li(n)&&this.shadowDomManager.addShadowRoot(nr.shadowRoot(n),this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)}});u&&(t.push({parentId:a,nextId:o,node:u}),e.add(u.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var s of this.movedSet)bi(this.removesSubTreeCache,s)&&!this.movedSet.has(nr.parentNode(s))||n(s);for(var a of this.addedSet)wi(this.droppedSet,a)||bi(this.removesSubTreeCache,a)?wi(this.movedSet,a)?n(a):this.droppedSet.add(a):n(a);for(var o=null;r.length;){var u=null;if(o){var l=this.mirror.getId(nr.parentNode(o.value)),h=i(o.value);-1!==l&&-1!==h&&(u=o)}if(!u)for(var d=r.tail;d;){var c=d;if(d=d.previous,c){var f=this.mirror.getId(nr.parentNode(c.value));if(-1===i(c.value))continue;if(-1!==f){u=c;break}var v=nr.parentNode(c.value);if(v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var p=nr.host(v);if(-1!==this.mirror.getId(p)){u=c;break}}}}if(!u){for(;r.head;)r.removeNode(r.head.value);break}o=u.previous,r.removeNode(u.value),n(u.value)}var m={texts:this.texts.map((t=>{var e=t.node,r=nr.parentNode(e);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(e),value:t.value}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),attributes:this.attributes.map((t=>{var{attributes:e}=t;if("string"==typeof e.style){var r=JSON.stringify(t.styleDiff),i=JSON.stringify(t._unchangedStyles);e.style.length>r.length&&(r+i).split("var(").length===e.style.split("var(").length&&(e.style=t.styleDiff)}return{id:this.mirror.getId(t.node),attributes:e}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),removes:this.removes,adds:t};(m.texts.length||m.attributes.length||m.removes.length||m.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(m))}})),We(this,"bufferBelongsToIframe",(t=>this.doc===t.contentDocument)),We(this,"genTextAreaValueMutation",(t=>{var e=this.attributeMap.get(t);e||(this.attributes.push(e={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t,e));var r=Array.from(nr.childNodes(t),(t=>nr.textContent(t)||"")).join("");e.attributes.value=dr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:vr(t),value:r,maskInputFn:this.maskInputFn})})),We(this,"processMutation",(t=>{if(!ni(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":var e=nr.textContent(t.target);ii(t.target,this.blockClass,this.blockSelector,!1)||e===t.oldValue||this.texts.push({value:Br(t.target,this.maskTextClass,this.maskTextSelector,!0)&&e?this.maskTextFn?this.maskTextFn(e,ri(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break;case"attributes":var r=t.target,i=t.attributeName,n=t.target.getAttribute(i);if("value"===i){var s=vr(r);n=dr({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:s,value:n,maskInputFn:this.maskInputFn})}if(ii(t.target,this.blockClass,this.blockSelector,!1)||n===t.oldValue)return;var a=this.attributeMap.get(t.target);if("IFRAME"===r.tagName&&"src"===i&&!this.keepIframeSrcFn(n)){if(r.contentDocument)return;i="rr_src"}if(a||(this.attributes.push(a={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t.target,a)),"type"===i&&"INPUT"===r.tagName&&"password"===(t.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!Er(r.tagName,i))if(a.attributes[i]=Nr(this.doc,cr(r.tagName),cr(i),n,r,this.dataURLOptions),"style"===i){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}var o=this.unattachedDoc.createElement("span");for(var u of(t.oldValue&&o.setAttribute("style",t.oldValue),Array.from(r.style))){var l=r.style.getPropertyValue(u),h=r.style.getPropertyPriority(u);l!==o.style.getPropertyValue(u)||h!==o.style.getPropertyPriority(u)?a.styleDiff[u]=""===h?l:[l,h]:a._unchangedStyles[u]=[l,h]}for(var d of Array.from(o.style))""===r.style.getPropertyValue(d)&&(a.styleDiff[d]=!1)}else"open"===i&&"DIALOG"===r.tagName&&(a.attributes.rr_open_mode=r.matches("dialog:modal")?"modal":"non-modal");break;case"childList":if(ii(t.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===t.target.tagName)return void this.genTextAreaValueMutation(t.target);t.addedNodes.forEach((e=>this.genAdds(e,t.target))),t.removedNodes.forEach((e=>{var r=this.mirror.getId(e),i=ar(t.target)?this.mirror.getId(nr.host(t.target)):this.mirror.getId(t.target);ii(t.target,this.blockClass,this.blockSelector,!1)||ni(e,this.mirror,this.slimDOMOptions)||!function(t,e){return-1!==e.getId(t)}(e,this.mirror)||(this.addedSet.has(e)?(yi(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===r||si(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[mi(r,i)]?yi(this.movedSet,e):(this.removes.push({parentId:i,id:r,isShadow:!(!ar(t.target)||!or(t.target))||void 0}),function(t,e){for(var r=[t];r.length;){var i=r.pop();e.has(i)||(e.add(i),nr.childNodes(i).forEach((t=>r.push(t))))}}(e,this.removesSubTreeCache))),this.mapRemoves.push(e))}))}})),We(this,"genAdds",((t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(ni(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);var r=null;e&&this.mirror.hasNode(e)&&(r=this.mirror.getId(e)),r&&-1!==r&&(this.movedMap[mi(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ii(t,this.blockClass,this.blockSelector,!1)||(nr.childNodes(t).forEach((t=>this.genAdds(t))),li(t)&&nr.childNodes(nr.shadowRoot(t)).forEach((e=>{this.processedNodeManager.add(e,this),this.genAdds(e,t)})))}}))}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((e=>{this[e]=t[e]}))}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()}destroy(){for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}}function yi(t,e){t.delete(e),nr.childNodes(e).forEach((e=>yi(t,e)))}function bi(t,e,r){return 0!==t.size&&function(t,e,r){var i=nr.parentNode(e);return!!i&&t.has(i)}(t,e)}function wi(t,e){return 0!==t.size&&ki(t,e)}function ki(t,e){var r=nr.parentNode(e);return!!r&&(!!t.has(r)||ki(t,r))}var Si=t=>pi?function(){try{return t(...arguments)}catch(t){if(pi&&!0===pi(t))return;throw t}}:t,Ii=[];function _i(t){try{if("composedPath"in t){var e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function Ci(t,e){var r=new gi;Ii.push(r),r.init(t);var i=new(rr())(Si(r.processMutations.bind(r)));return i.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{observer:i,buffer:r}}function Mi(t){var{scrollCb:e,doc:r,mirror:i,blockClass:n,blockSelector:s,sampling:a}=t;return Gr("scroll",Si(Xr(Si((t=>{var a=_i(t);if(a&&!ii(a,n,s,!0)){var o=i.getId(a);if(a===r&&r.defaultView){var u=Qr(r.defaultView);e({id:o,x:u.left,y:u.top})}else e({id:o,x:a.scrollLeft,y:a.scrollTop})}})),a.scroll||100)),r)}var Ti=["INPUT","TEXTAREA","SELECT"],xi=new WeakMap;function Ri(t){return function t(e,r){if(Fi("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Fi("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Fi("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Fi("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var i=Array.from(e.parentRule.cssRules).indexOf(e);return r.unshift(i),t(e.parentRule,r)}if(e.parentStyleSheet){var n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);r.unshift(n)}return r}(t,[])}function Oi(t,e,r){var i,n;return t?(t.ownerNode?i=e.getId(t.ownerNode):n=r.getId(t),{styleId:n,id:i}):{}}function Ai(t,e){var r,i,n,s,{mirror:a,stylesheetManager:o}=t;s=a.getId("#document"===e.nodeName?e:nr.host(e));var u="#document"===e.nodeName?null==(r=e.defaultView)?void 0:r.Document:null==(n=null==(i=e.ownerDocument)?void 0:i.defaultView)?void 0:n.ShadowRoot,l=(null==u?void 0:u.prototype)?Object.getOwnPropertyDescriptor(null==u?void 0:u.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&u&&l?(Object.defineProperty(e,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var t;return null==(t=l.get)?void 0:t.call(this)},set(t){var e,r=null==(e=l.set)?void 0:e.call(this,t);if(null!==s&&-1!==s)try{o.adoptStyleSheets(t,s)}catch(t){}return r}}),Si((()=>{Object.defineProperty(e,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))):()=>{}}function Li(t,e){void 0===e&&(e={});var r,i,n=t.doc.defaultView;if(!n)return()=>{};if(function(t,e){var{mutationCb:r,mousemoveCb:i,mouseInteractionCb:n,scrollCb:s,viewportResizeCb:a,inputCb:o,mediaInteractionCb:u,styleSheetRuleCb:l,styleDeclarationCb:h,canvasMutationCb:d,fontCb:c,selectionCb:f,customElementCb:v}=t;t.mutationCb=function(){e.mutation&&e.mutation(...arguments),r(...arguments)},t.mousemoveCb=function(){e.mousemove&&e.mousemove(...arguments),i(...arguments)},t.mouseInteractionCb=function(){e.mouseInteraction&&e.mouseInteraction(...arguments),n(...arguments)},t.scrollCb=function(){e.scroll&&e.scroll(...arguments),s(...arguments)},t.viewportResizeCb=function(){e.viewportResize&&e.viewportResize(...arguments),a(...arguments)},t.inputCb=function(){e.input&&e.input(...arguments),o(...arguments)},t.mediaInteractionCb=function(){e.mediaInteaction&&e.mediaInteaction(...arguments),u(...arguments)},t.styleSheetRuleCb=function(){e.styleSheetRule&&e.styleSheetRule(...arguments),l(...arguments)},t.styleDeclarationCb=function(){e.styleDeclaration&&e.styleDeclaration(...arguments),h(...arguments)},t.canvasMutationCb=function(){e.canvasMutation&&e.canvasMutation(...arguments),d(...arguments)},t.fontCb=function(){e.font&&e.font(...arguments),c(...arguments)},t.selectionCb=function(){e.selection&&e.selection(...arguments),f(...arguments)},t.customElementCb=function(){e.customElement&&e.customElement(...arguments),v(...arguments)}}(t,e),t.recordDOM){var s=Ci(t,t.doc);r=s.observer,i=s.buffer}var o=function(t){var{mousemoveCb:e,sampling:r,doc:i,mirror:n}=t;if(!1===r.mousemove)return()=>{};var s,a="number"==typeof r.mousemove?r.mousemove:50,o="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,u=[],l=Xr(Si((t=>{var r=Date.now()-s;e(u.map((t=>(t.timeOffset-=r,t))),t),u=[],s=null})),o),h=Si(Xr(Si((t=>{var e=_i(t),{clientX:r,clientY:i}=ai(t)?t.changedTouches[0]:t;s||(s=Kr()),u.push({x:r,y:i,id:n.getId(e),timeOffset:Kr()-s}),l("undefined"!=typeof DragEvent&&t instanceof DragEvent?ze.Drag:t instanceof MouseEvent?ze.MouseMove:ze.TouchMove)})),a,{trailing:!1})),d=[Gr("mousemove",h,i),Gr("touchmove",h,i),Gr("drag",h,i)];return Si((()=>{d.forEach((t=>t()))}))}(t),u=function(t){var{mouseInteractionCb:e,doc:r,mirror:i,blockClass:n,blockSelector:s,sampling:o}=t;if(!1===o.mouseInteraction)return()=>{};var u=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,l=[],h=null;return Object.keys(je).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==u[t])).forEach((t=>{var o=cr(t),u=(t=>r=>{var o=_i(r);if(!ii(o,n,s,!0)){var u=null,l=t;if("pointerType"in r){switch(r.pointerType){case"mouse":u=qe.Mouse;break;case"touch":u=qe.Touch;break;case"pen":u=qe.Pen}u===qe.Touch&&(je[t]===je.MouseDown?l="TouchStart":je[t]===je.MouseUp&&(l="TouchEnd"))}else ai(r)&&(u=qe.Touch);null!==u?(h=u,(l.startsWith("Touch")&&u===qe.Touch||l.startsWith("Mouse")&&u===qe.Mouse)&&(u=null)):je[t]===je.Click&&(u=h,h=null);var d=ai(r)?r.changedTouches[0]:r;if(d){var c=i.getId(o),{clientX:f,clientY:v}=d;Si(e)(a({type:je[l],id:c,x:f,y:v},null!==u&&{pointerType:u}))}}})(t);if(window.PointerEvent)switch(je[t]){case je.MouseDown:case je.MouseUp:o=o.replace("mouse","pointer");break;case je.TouchStart:case je.TouchEnd:return}l.push(Gr(o,u,r))})),Si((()=>{l.forEach((t=>t()))}))}(t),l=Mi(t),h=function(t,e){var{viewportResizeCb:r}=t,{win:i}=e,n=-1,s=-1;return Gr("resize",Si(Xr(Si((()=>{var t=ti(),e=ei();n===t&&s===e||(r({width:Number(e),height:Number(t)}),n=t,s=e)})),200)),i)}(t,{win:n}),d=function(t){var{inputCb:e,doc:r,mirror:i,blockClass:n,blockSelector:s,ignoreClass:o,ignoreSelector:u,maskInputOptions:l,maskInputFn:h,sampling:d,userTriggeredOnInput:c}=t;function f(t){var e=_i(t),i=t.isTrusted,a=e&&e.tagName;if(e&&"OPTION"===a&&(e=nr.parentElement(e)),e&&a&&Ti.indexOf(a)>=0&&!ii(e,n,s,!0)&&!(e.classList.contains(o)||u&&e.matches(u))){var d=e.value,f=!1,p=vr(e)||"";"radio"===p||"checkbox"===p?f=e.checked:(l[a.toLowerCase()]||l[p])&&(d=dr({element:e,maskInputOptions:l,tagName:a,type:p,value:d,maskInputFn:h})),v(e,c?{text:d,isChecked:f,userTriggered:i}:{text:d,isChecked:f});var m=e.name;"radio"===p&&m&&f&&r.querySelectorAll('input[type="radio"][name="'+m+'"]').forEach((t=>{if(t!==e){var r=t.value;v(t,c?{text:r,isChecked:!f,userTriggered:!1}:{text:r,isChecked:!f})}}))}}function v(t,r){var n=xi.get(t);if(!n||n.text!==r.text||n.isChecked!==r.isChecked){xi.set(t,r);var s=i.getId(t);Si(e)(a({},r,{id:s}))}}var p=("last"===d.input?["change"]:["input","change"]).map((t=>Gr(t,Si(f),r))),m=r.defaultView;if(!m)return()=>{p.forEach((t=>t()))};var g=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value");return g&&g.set&&p.push(...[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]].map((t=>Yr(t[0],t[1],{set(){Si(f)({target:this,isTrusted:!1})}},!1,m)))),Si((()=>{p.forEach((t=>t()))}))}(t),c=function(t){var{mediaInteractionCb:e,blockClass:r,blockSelector:i,mirror:n,sampling:s,doc:a}=t,o=Si((t=>Xr(Si((s=>{var a=_i(s);if(a&&!ii(a,r,i,!0)){var{currentTime:o,volume:u,muted:l,playbackRate:h,loop:d}=a;e({type:t,id:n.getId(a),currentTime:o,volume:u,muted:l,playbackRate:h,loop:d})}})),s.media||500))),u=[Gr("play",o(Ge.Play),a),Gr("pause",o(Ge.Pause),a),Gr("seeked",o(Ge.Seeked),a),Gr("volumechange",o(Ge.VolumeChange),a),Gr("ratechange",o(Ge.RateChange),a)];return Si((()=>{u.forEach((t=>t()))}))}(t),f=()=>{},v=()=>{},p=()=>{},m=()=>{};t.recordDOM&&(f=function(t,e){var{styleSheetRuleCb:r,mirror:i,stylesheetManager:n}=t,{win:s}=e;if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};var a=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:Si(((t,e,s)=>{var[a,o]=s,{id:u,styleId:l}=Oi(e,i,n.styleMirror);return(u&&-1!==u||l&&-1!==l)&&r({id:u,styleId:l,adds:[{rule:a,index:o}]}),t.apply(e,s)}))}),s.CSSStyleSheet.prototype.addRule=function(t,e,r){return void 0===r&&(r=this.cssRules.length),s.CSSStyleSheet.prototype.insertRule.apply(this,[t+" { "+e+" }",r])};var o,u,l=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(l,{apply:Si(((t,e,s)=>{var[a]=s,{id:o,styleId:u}=Oi(e,i,n.styleMirror);return(o&&-1!==o||u&&-1!==u)&&r({id:o,styleId:u,removes:[{index:a}]}),t.apply(e,s)}))}),s.CSSStyleSheet.prototype.removeRule=function(t){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[t])},s.CSSStyleSheet.prototype.replace&&(o=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:Si(((t,e,s)=>{var[a]=s,{id:o,styleId:u}=Oi(e,i,n.styleMirror);return(o&&-1!==o||u&&-1!==u)&&r({id:o,styleId:u,replace:a}),t.apply(e,s)}))})),s.CSSStyleSheet.prototype.replaceSync&&(u=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:Si(((t,e,s)=>{var[a]=s,{id:o,styleId:u}=Oi(e,i,n.styleMirror);return(o&&-1!==o||u&&-1!==u)&&r({id:o,styleId:u,replaceSync:a}),t.apply(e,s)}))}));var h={};Ni("CSSGroupingRule")?h.CSSGroupingRule=s.CSSGroupingRule:(Ni("CSSMediaRule")&&(h.CSSMediaRule=s.CSSMediaRule),Ni("CSSConditionRule")&&(h.CSSConditionRule=s.CSSConditionRule),Ni("CSSSupportsRule")&&(h.CSSSupportsRule=s.CSSSupportsRule));var d={};return Object.entries(h).forEach((t=>{var[e,s]=t;d[e]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(d[e].insertRule,{apply:Si(((t,e,s)=>{var[a,o]=s,{id:u,styleId:l}=Oi(e.parentStyleSheet,i,n.styleMirror);return(u&&-1!==u||l&&-1!==l)&&r({id:u,styleId:l,adds:[{rule:a,index:[...Ri(e),o||0]}]}),t.apply(e,s)}))}),s.prototype.deleteRule=new Proxy(d[e].deleteRule,{apply:Si(((t,e,s)=>{var[a]=s,{id:o,styleId:u}=Oi(e.parentStyleSheet,i,n.styleMirror);return(o&&-1!==o||u&&-1!==u)&&r({id:o,styleId:u,removes:[{index:[...Ri(e),a]}]}),t.apply(e,s)}))})})),Si((()=>{s.CSSStyleSheet.prototype.insertRule=a,s.CSSStyleSheet.prototype.deleteRule=l,o&&(s.CSSStyleSheet.prototype.replace=o),u&&(s.CSSStyleSheet.prototype.replaceSync=u),Object.entries(h).forEach((t=>{var[e,r]=t;r.prototype.insertRule=d[e].insertRule,r.prototype.deleteRule=d[e].deleteRule}))}))}(t,{win:n}),v=Ai(t,t.doc),p=function(t,e){var{styleDeclarationCb:r,mirror:i,ignoreCSSAttributes:n,stylesheetManager:s}=t,{win:a}=e,o=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:Si(((t,e,a)=>{var u,[l,h,d]=a;if(n.has(l))return o.apply(e,[l,h,d]);var{id:c,styleId:f}=Oi(null==(u=e.parentRule)?void 0:u.parentStyleSheet,i,s.styleMirror);return(c&&-1!==c||f&&-1!==f)&&r({id:c,styleId:f,set:{property:l,value:h,priority:d},index:Ri(e.parentRule)}),t.apply(e,a)}))});var u=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(u,{apply:Si(((t,e,a)=>{var o,[l]=a;if(n.has(l))return u.apply(e,[l]);var{id:h,styleId:d}=Oi(null==(o=e.parentRule)?void 0:o.parentStyleSheet,i,s.styleMirror);return(h&&-1!==h||d&&-1!==d)&&r({id:h,styleId:d,remove:{property:l},index:Ri(e.parentRule)}),t.apply(e,a)}))}),Si((()=>{a.CSSStyleDeclaration.prototype.setProperty=o,a.CSSStyleDeclaration.prototype.removeProperty=u}))}(t,{win:n}),t.collectFonts&&(m=function(t){var{fontCb:e,doc:r}=t,i=r.defaultView;if(!i)return()=>{};var n=[],s=new WeakMap,a=i.FontFace;i.FontFace=function(t,e,r){var i=new a(t,e,r);return s.set(i,{family:t,buffer:"string"!=typeof e,descriptors:r,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),i};var o=ir(r.fonts,"add",(function(t){return function(r){return setTimeout(Si((()=>{var t=s.get(r);t&&(e(t),s.delete(r))})),0),t.apply(this,[r])}}));return n.push((()=>{i.FontFace=a})),n.push(o),Si((()=>{n.forEach((t=>t()))}))}(t)));var g=function(t){var{doc:e,mirror:r,blockClass:i,blockSelector:n,selectionCb:s}=t,a=!0,o=Si((()=>{var t=e.getSelection();if(!(!t||a&&(null==t?void 0:t.isCollapsed))){a=t.isCollapsed||!1;for(var o=[],u=t.rangeCount||0,l=0;u>l;l++){var h=t.getRangeAt(l),{startContainer:d,startOffset:c,endContainer:f,endOffset:v}=h;ii(d,i,n,!0)||ii(f,i,n,!0)||o.push({start:r.getId(d),startOffset:c,end:r.getId(f),endOffset:v})}s({ranges:o})}}));return o(),Gr("selectionchange",o)}(t),y=function(t){var{doc:e,customElementCb:r}=t,i=e.defaultView;return i&&i.customElements?ir(i.customElements,"define",(function(t){return function(e,i,n){try{r({define:{name:e}})}catch(t){console.warn("Custom element callback failed for "+e)}return t.apply(this,[e,i,n])}})):()=>{}}(t),b=[];for(var w of t.plugins)b.push(w.observer(w.callback,n,w.options));return Si((()=>{if(i){i.destroy(),i.reset();var t=Ii.indexOf(i);-1!==t&&Ii.splice(t,1)}null==r||r.disconnect(),o(),u(),l(),h(),d(),c(),f(),v(),p(),m(),g(),y(),b.forEach((t=>t()))}))}function Fi(t){return void 0!==window[t]}function Ni(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Ei{constructor(t){We(this,"iframeIdToRemoteIdMap",new WeakMap),We(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,r,i){var n=r||this.getIdToRemoteIdMap(t),s=i||this.getRemoteIdToIdMap(t),a=n.get(e);return a||(a=this.generateIdFn(),n.set(e,a),s.set(a,e)),a}getIds(t,e){var r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return e.map((e=>this.getId(t,e,r,i)))}getRemoteId(t,e,r){var i=r||this.getRemoteIdToIdMap(t);return"number"!=typeof e?e:i.get(e)||-1}getRemoteIds(t,e){var r=this.getRemoteIdToIdMap(t);return e.map((e=>this.getRemoteId(t,e,r)))}reset(t){if(!t)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){var e=this.iframeIdToRemoteIdMap.get(t);return e||this.iframeIdToRemoteIdMap.set(t,e=new Map),e}getRemoteIdToIdMap(t){var e=this.iframeRemoteIdToIdMap.get(t);return e||this.iframeRemoteIdToIdMap.set(t,e=new Map),e}}class Di{constructor(t){We(this,"iframes",new WeakMap),We(this,"crossOriginIframeMap",new WeakMap),We(this,"crossOriginIframeMirror",new Ei(xr)),We(this,"crossOriginIframeStyleMirror"),We(this,"crossOriginIframeRootIdMap",new WeakMap),We(this,"mirror"),We(this,"mutationCb"),We(this,"wrappedEmit"),We(this,"loadListener"),We(this,"pageHideListener"),We(this,"stylesheetManager"),We(this,"recordCrossOriginIframes"),We(this,"messageHandler"),We(this,"nestedIframeListeners",new Map),We(this,"attachedIframes",new Map),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ei(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}addPageHideListener(t){this.pageHideListener=t}removeLoadListener(){this.loadListener=void 0}trackIframeContent(t,e){var r=this.mirror.getId(t);return this.attachedIframes.set(r,{element:t,content:e}),r}attachIframe(t,e){var r,i=this.trackIframeContent(t,e);this.mutationCb({adds:[{parentId:i,nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0});var n=t.contentWindow;if(this.recordCrossOriginIframes&&n&&!this.nestedIframeListeners.has(n)){var s=this.handleMessage.bind(this);Vr((()=>{n.addEventListener("message",s),this.nestedIframeListeners.set(n,s)}))}Vr((()=>{var e;return null==(e=t.contentWindow)?void 0:e.addEventListener("pagehide",(()=>{var e;null==(e=this.pageHideListener)||e.call(this,t),t.contentDocument&&this.mirror.removeNodeFromMap(t.contentDocument),t.contentWindow&&this.crossOriginIframeMap.delete(t.contentWindow)}))})),null==(r=this.loadListener)||r.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){var e=t;if("rrweb"===e.data.type&&e.origin===e.data.origin&&t.source){var r=this.crossOriginIframeMap.get(t.source);if(r){var i=this.transformCrossOriginEvent(r,e.data.event);i&&this.wrappedEmit(i,e.data.isCheckout)}}}transformCrossOriginEvent(t,e){var r;switch(e.type){case $e.FullSnapshot:this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);var i=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(e.data.node,i),this.trackIframeContent(t,e.data.node),{timestamp:e.timestamp,type:$e.IncrementalSnapshot,data:{source:ze.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case $e.Meta:case $e.Load:case $e.DomContentLoaded:return!1;case $e.Plugin:return e;case $e.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case $e.IncrementalSnapshot:switch(e.data.source){case ze.Mutation:return e.data.adds.forEach((e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);var r=this.crossOriginIframeRootIdMap.get(t);r&&this.patchRootIdOnNode(e.node,r)})),e.data.removes.forEach((e=>{this.replaceIds(e,t,["parentId","id"])})),e.data.attributes.forEach((e=>{this.replaceIds(e,t,["id"])})),e.data.texts.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case ze.Drag:case ze.TouchMove:case ze.MouseMove:return e.data.positions.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case ze.ViewportResize:return!1;case ze.MediaInteraction:case ze.MouseInteraction:case ze.Scroll:case ze.CanvasMutation:case ze.Input:return this.replaceIds(e.data,t,["id"]),e;case ze.StyleSheetRule:case ze.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case ze.Font:return e;case ze.Selection:return e.data.ranges.forEach((e=>{this.replaceIds(e,t,["start","end"])})),e;case ze.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),null==(r=e.data.styles)||r.forEach((e=>{this.replaceStyleIds(e,t,["styleId"])})),e}}return!1}replace(t,e,r,i){for(var n of i)(Array.isArray(e[n])||"number"==typeof e[n])&&(e[n]=Array.isArray(e[n])?t.getIds(r,e[n]):t.getId(r,e[n]));return e}replaceIds(t,e,r){return this.replace(this.crossOriginIframeMirror,t,e,r)}replaceStyleIds(t,e,r){return this.replace(this.crossOriginIframeStyleMirror,t,e,r)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach((t=>{this.replaceIdOnNode(t,e)}))}patchRootIdOnNode(t,e){t.type===Ve.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach((t=>{this.patchRootIdOnNode(t,e)}))}removeIframeById(t){var e=this.attachedIframes.get(t),r=(null==e?void 0:e.element)||this.mirror.getNode(t);if(r){var i=r.contentWindow;if(i&&this.nestedIframeListeners.has(i)){var n=this.nestedIframeListeners.get(i);Vr((()=>i.removeEventListener("message",n))),this.nestedIframeListeners.delete(i)}i&&this.crossOriginIframeMap.delete(i),this.iframes.delete(r)}e&&this.attachedIframes.delete(t)}reattachIframes(){this.attachedIframes.forEach(((t,e)=>{var{content:r}=t;this.mirror.has(e)?this.mutationCb({adds:[{parentId:e,nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}):this.attachedIframes.delete(e)}))}destroy(){this.recordCrossOriginIframes&&window.removeEventListener("message",this.messageHandler),this.nestedIframeListeners.forEach(((t,e)=>{Vr((()=>e.removeEventListener("message",t)))})),this.nestedIframeListeners.clear(),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear(),this.crossOriginIframeMap=new WeakMap,this.iframes=new WeakMap,this.crossOriginIframeRootIdMap=new WeakMap}}class Bi{constructor(t){We(this,"shadowDoms",new WeakSet),We(this,"mutationCb"),We(this,"scrollCb"),We(this,"bypassOptions"),We(this,"mirror"),We(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,e){if(or(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);var{observer:r,buffer:i}=Ci(a({},this.bypassOptions,{doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push((()=>{r.disconnect(),i.destroy();var t=Ii.indexOf(i);-1!==t&&Ii.splice(t,1)})),this.restoreHandlers.push(Mi(a({},this.bypassOptions,{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout((()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(nr.host(t))),this.restoreHandlers.push(Ai({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))}),0)}}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,e){var r=this;this.restoreHandlers.push(ir(t.prototype,"attachShadow",(function(t){return function(i){var n=t.call(this,i),s=nr.shadowRoot(this);return s&&ci(this)&&r.addShadowRoot(s,e),n}})))}reset(){this.restoreHandlers.forEach((t=>{try{t()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Pi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ui="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Wi=0;64>Wi;Wi++)Ui[Pi.charCodeAt(Wi)]=Wi;var $i=new Map,zi=(t,e,r)=>{if(t&&(Hi(t,e)||"object"==typeof t)){var i=function(t,e){var r=$i.get(t);return r||$i.set(t,r=new Map),r.has(e)||r.set(e,[]),r.get(e)}(r,t.constructor.name),n=i.indexOf(t);return-1===n&&(n=i.length,i.push(t)),n}};function ji(t,e,r,i){if(t instanceof Array)return t.map((t=>ji(t,e,r,i)));if(null===t)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){var n=t.constructor.name,s=function(t){var e,r=new Uint8Array(t),i=r.length,n="";for(e=0;i>e;e+=3)n+=Pi[r[e]>>2],n+=Pi[(3&r[e])<<4|r[e+1]>>4],n+=Pi[(15&r[e+1])<<2|r[e+2]>>6],n+=Pi[63&r[e+2]];return i%3==2?n=n.substring(0,n.length-1)+"=":i%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(t);return{rr_type:n,base64:s}}if(t instanceof DataView)return{rr_type:t.constructor.name,args:[ji(t.buffer,e,r,i),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){var a=t.constructor.name,{src:o}=t;return{rr_type:a,src:o}}return t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL(i.type,i.quality)}:t instanceof ImageData?{rr_type:t.constructor.name,args:[ji(t.data,e,r,i),t.width,t.height]}:Hi(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:zi(t,e,r)}:t}var qi=(t,e,r,i)=>t.map((t=>ji(t,e,r,i))),Hi=(t,e)=>{var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((t=>"function"==typeof e[t]));return Boolean(r.find((r=>t instanceof e[r])))},Gi=["webgl","webgl2"];function Vi(t){return"nodeType"in t}function Zi(t,e,r,i){var n=[];try{if(i){var s=function(t,e,r){var i=t.GPUCanvasContext;if((null==i?void 0:i.prototype)&&"function"==typeof i.prototype.configure)return ir(i.prototype,"configure",(function(i){return function(n){var s=function(t){var{canvas:e}=t;return e&&"object"==typeof e?e:null}(this);if(!s||Vi(s)&&ii(s,e,r,!0))return i.call(this,n);Vi(s)&&!("__context"in s)&&(s.__context="webgpu");var o=function(t){var e=t.GPUTextureUsage;return e?e.COPY_SRC|e.RENDER_ATTACHMENT:null}(t);return i.call(this,null!==o&&n?a({},n,{usage:"number"==typeof n.usage?n.usage|o:o}):n)}}))}(t,e,r);s&&n.push(s)}var o=ir(t.HTMLCanvasElement.prototype,"getContext",(function(t){return function(n){for(var s=function(t){return"experimental-webgl"===t?"webgl":t}(n),a=arguments.length,o=new Array(a>1?a-1:0),u=1;a>u;u++)o[u-1]=arguments[u];if(!ii(this,e,r,!0)&&("__context"in this||(this.__context=s),i&&Gi.includes(s)))if(o[0]&&"object"==typeof o[0]){var l=o[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0});return t.apply(this,[n,...o])}}));n.push(o)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach((t=>t()))}}function Ji(t,e,r,i,n,s,a){var o=[],u=Object.getOwnPropertyNames(t),l=function(u){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))return 0;try{if("function"!=typeof t[u])return 0;var l=ir(t,u,(function(t){return function(){for(var o=arguments.length,l=new Array(o),h=0;o>h;h++)l[h]=arguments[h];var d=t.apply(this,l);if(zi(d,s,this),"tagName"in this.canvas&&!ii(this.canvas,i,n,!0)){var c=qi(l,s,this,a);r(this.canvas,{type:e,property:u,args:c})}return d}}));o.push(l)}catch(i){var h=Yr(t,u,{set(t){r(this.canvas,{type:e,property:u,args:[t],setter:!0})}});o.push(h)}};for(var h of u)l(h);return o}var Xi,Yi,Ki,Qi='(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastFingerprintMap = /* @__PURE__ */ new Map();\n const transparentBlobMap = /* @__PURE__ */ new Map();\n function fnv1aHash(buffer) {\n const view = new Uint8Array(buffer);\n let hash = 2166136261;\n for (let i2 = 0; i2 < view.length; i2++) {\n hash ^= view[i2];\n hash = hash * 16777619 | 0;\n }\n return (hash >>> 0).toString(16);\n }\n async function getTransparentBlobFor(width, height, dataURLOptions) {\n const id = `${width}-${height}`;\n if ("OffscreenCanvas" in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext("2d");\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return "";\n }\n }\n const worker = self;\n let reusableCanvas = null;\n let reusableCtx = null;\n worker.onmessage = async function(e) {\n if ("OffscreenCanvas" in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n try {\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions\n );\n if (!reusableCanvas || reusableCanvas.width !== width || reusableCanvas.height !== height) {\n reusableCanvas = new OffscreenCanvas(width, height);\n reusableCtx = reusableCanvas.getContext("2d");\n }\n reusableCtx.clearRect(0, 0, width, height);\n reusableCtx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await reusableCanvas.convertToBlob(dataURLOptions);\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const fingerprint = fnv1aHash(arrayBuffer);\n if (!lastFingerprintMap.has(id)) {\n const base642 = encode(arrayBuffer);\n if (await transparentBase64 === base642) {\n lastFingerprintMap.set(id, fingerprint);\n return worker.postMessage({ id });\n }\n lastFingerprintMap.set(id, fingerprint);\n worker.postMessage({ id, type, base64: base642, width, height });\n return;\n }\n if (lastFingerprintMap.get(id) === fingerprint)\n return worker.postMessage({ id });\n const base64 = encode(arrayBuffer);\n worker.postMessage({ id, type, base64, width, height });\n lastFingerprintMap.set(id, fingerprint);\n } catch {\n worker.postMessage({ id });\n }\n } else {\n e.data.bitmap.close();\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n//# sourceMappingURL=image-bitmap-data-url-worker-Ca9A-vl6.js.map\n',tn="undefined"!=typeof self&&self.Blob&&new Blob([Qi],{type:"text/javascript;charset=utf-8"});function en(t){var e;try{if(!(e=tn&&(self.URL||self.webkitURL).createObjectURL(tn)))throw"";var r=new Worker(e,{name:null==t?void 0:t.name});return r.addEventListener("error",(()=>{(self.URL||self.webkitURL).revokeObjectURL(e)})),r}catch(e){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Qi),{name:null==t?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class rn{constructor(t){We(this,"pendingCanvasMutations",new Map),We(this,"rafStamps",{latestId:0,invokeId:null}),We(this,"mirror"),We(this,"mutationCb"),We(this,"resetObservers"),We(this,"frozen",!1),We(this,"locked",!1),We(this,"rafIdTimestamp",null),We(this,"rafIdFlush",null),We(this,"processMutation",((t,e)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)}));var{sampling:e="all",win:r,blockClass:i,blockSelector:n,recordCanvas:s,dataURLOptions:a}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&"all"===e&&this.initCanvasMutationObserver(r,i,n,a),s&&"number"==typeof e&&this.initCanvasFPSObserver(e,r,i,n,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),null!==this.rafIdTimestamp&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),null!==this.rafIdFlush&&(cancelAnimationFrame(this.rafIdFlush),this.rafIdFlush=null)}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,e,r,i,n){var a=this;if("OffscreenCanvas"in e){var o=Zi(e,r,i,!0),u=new Map,l=new en;l.onmessage=t=>{var{id:e}=t.data;if(u.set(e,!1),"base64"in t.data){var{base64:r,type:i,width:n,height:s}=t.data;this.mutationCb({id:e,type:He["2D"],commands:[{property:"clearRect",args:[0,0,n,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0]}],displayWidth:n,displayHeight:s})}};var h,d=1e3/t,c=0,f=t=>{var o,v;c&&d>t-c||(c=t,(o=[],v=t=>{try{t.querySelectorAll("canvas").forEach((t=>{ii(t,r,i,!0)||o.push(t)})),t.querySelectorAll("*").forEach((t=>{t.shadowRoot&&v(t.shadowRoot)}))}catch(t){}},v(e.document),o).forEach(function(){var t=s((function*(t){var e,r,i=a.mirror.getId(t);if(!u.get(i)&&0!==t.width&&0!==t.height){u.set(i,!0);try{if(["webgl","webgl2"].includes(t.__context)){var s=t.getContext(t.__context);if(null==(e=null==s?void 0:s.isContextLost)?void 0:e.call(s))return void u.set(i,!1);!1===(null==(r=null==s?void 0:s.getContextAttributes())?void 0:r.preserveDrawingBuffer)&&s.clear(s.COLOR_BUFFER_BIT)}var o=t.clientWidth||t.width,h=t.clientHeight||t.height,d=yield createImageBitmap(t,{resizeWidth:o,resizeHeight:h});l.postMessage({id:i,bitmap:d,width:o,height:h,dataURLOptions:n.dataURLOptions},[d])}catch(t){u.set(i,!1)}}}));return function(e){return t.apply(this,arguments)}}())),h=requestAnimationFrame(f)};h=requestAnimationFrame(f),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}}initCanvasMutationObserver(t,e,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=Zi(t,e,r,!1),s=function(t,e,r,i,n){var s=[],a=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype),o=function(a){try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[a])return 1;var o=ir(e.CanvasRenderingContext2D.prototype,a,(function(s){return function(){for(var o=arguments.length,u=new Array(o),l=0;o>l;l++)u[l]=arguments[l];return ii(this.canvas,r,i,!0)||setTimeout((()=>{var r=qi(u,e,this,n);t(this.canvas,{type:He["2D"],property:a,args:r})}),0),s.apply(this,u)}}));s.push(o)}catch(r){var u=Yr(e.CanvasRenderingContext2D.prototype,a,{set(e){t(this.canvas,{type:He["2D"],property:a,args:[e],setter:!0})}});s.push(u)}};for(var u of a)o(u);return()=>{s.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,r,i),a=function(t,e,r,i,n){var s=[];return void 0!==e.WebGLRenderingContext&&s.push(...Ji(e.WebGLRenderingContext.prototype,He.WebGL,t,r,i,e,n)),void 0!==e.WebGL2RenderingContext&&s.push(...Ji(e.WebGL2RenderingContext.prototype,He.WebGL2,t,r,i,e,n)),()=>{s.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,r,i);this.resetObservers=()=>{n(),s(),a()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){var t=e=>{this.rafStamps.latestId=e,this.rafIdTimestamp=requestAnimationFrame(t)};this.rafIdTimestamp=requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((t,e)=>{var r=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,r)})),this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(t,e){if(!this.frozen&&!this.locked){var r=this.pendingCanvasMutations.get(t);if(r&&-1!==e){var i=r.map((t=>function(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;r[i]=t[i]}return r}(t,Pe))),{type:n}=r[0];this.mutationCb({id:e,type:n,commands:i}),this.pendingCanvasMutations.delete(t)}}}}class nn{constructor(t){We(this,"trackedLinkElements",new WeakSet),We(this,"mutationCb"),We(this,"adoptedStyleSheetCb"),We(this,"styleMirror",new hi),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){var r=this;if(0!==t.length){var i={id:e,styleIds:[]},n=[],s=function(t){var e;r.styleMirror.has(t)?e=r.styleMirror.getId(t):(e=r.styleMirror.add(t),n.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,r)=>({rule:lr(e,t.href),index:r})))})),i.styleIds.push(e)};for(var a of t)s(a);n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class sn{constructor(){We(this,"nodeMap",new WeakMap),We(this,"active",!1)}inOtherBuffer(t,e){var r=this.nodeMap.get(t);return r&&Array.from(r).some((t=>t!==e))}add(t,e){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}destroy(){}}var an=!1;try{if(2!==Array.from([1],(t=>2*t))[0]){var on=document.createElement("iframe");document.body.appendChild(on),Array.from=(null==(Be=on.contentWindow)?void 0:Be.Array.from)||Array.from,document.body.removeChild(on)}}catch(t){console.debug("Unable to override Array.from",t)}var un=new hr;function ln(t){void 0===t&&(t={});var{emit:e,checkoutEveryNms:r,checkoutEveryNth:i,blockClass:n="rr-block",blockSelector:s=null,ignoreClass:o="rr-ignore",ignoreSelector:u=null,maskTextClass:l="rr-mask",maskTextSelector:h=null,inlineStylesheet:d=!0,maskAllInputs:c,maskInputOptions:f,slimDOMOptions:v,maskInputFn:p,maskTextFn:m,hooks:g,packFn:y,sampling:b={},dataURLOptions:w={},mousemoveWait:k,recordDOM:S=!0,recordCanvas:I=!1,recordCrossOriginIframes:_=!1,recordAfter:C=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:M=!1,collectFonts:T=!1,inlineImages:x=!1,plugins:R,keepIframeSrcFn:O=(()=>!1),ignoreCSSAttributes:A=new Set([]),errorHandler:L}=t;pi=L;var F=a({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},w),N=!_||window.parent===window,E=!1;if(!N)try{window.parent.document&&(E=!1)}catch(t){E=!0}if(N&&!e)throw new Error("emit function is required");if(!N&&!E)return()=>{};void 0!==k&&void 0===b.mousemove&&(b.mousemove=k),un.reset();var D,B=!0===c?{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}:void 0!==f?f:{password:!0},P=qr(void 0!==v&&v);!function(t){void 0===t&&(t=window),"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=[].forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=[].forEach)}();var U=0,W=new Map,z=t=>{for(var e of R||[])e.eventProcessor&&(t=e.eventProcessor(t));return y&&!E&&(t=y(t)),t};Xi=(t,n)=>{var s,a=t;if(a.timestamp=Kr(),!(null==(s=Ii[0])?void 0:s.isFrozen())||a.type===$e.FullSnapshot||a.type===$e.IncrementalSnapshot&&a.data.source===ze.Mutation||Ii.forEach((t=>t.unfreeze())),N)null==e||e(z(a),n);else if(E){var o={type:"rrweb",event:z(a),origin:window.location.origin,isCheckout:n};window.parent.postMessage(o,"*")}if(a.type===$e.FullSnapshot)D=a,U=0;else if(a.type===$e.IncrementalSnapshot){if(a.data.source===ze.Mutation&&a.data.isAttachIframe)return;U++,(i&&U>=i||r&&a.timestamp-D.timestamp>r)&&Yi(!0)}};var j=t=>{if(_&&t.removes&&t.removes.length>0){var e=t.adds.length>0?new Set(t.adds.map((t=>t.node.id))):null;t.removes.forEach((t=>{var{id:r}=t;if(!e||!e.has(r)){var i=W.get(r);i&&(i(),W.delete(r)),V.removeIframeById(r)}})),function(){for(var[t,e]of W){var r=un.getNode(t);if(r)try{r.contentDocument&&r.contentDocument.defaultView||(e(),W.delete(t))}catch(r){e(),W.delete(t)}else e(),W.delete(t)}}()}Xi({type:$e.IncrementalSnapshot,data:a({source:ze.Mutation},t)})},q=t=>Xi({type:$e.IncrementalSnapshot,data:a({source:ze.Scroll},t)}),H=t=>Xi({type:$e.IncrementalSnapshot,data:a({source:ze.CanvasMutation},t)}),G=new nn({mutationCb:j,adoptedStyleSheetCb:t=>Xi({type:$e.IncrementalSnapshot,data:a({source:ze.AdoptedStyleSheet},t)})}),V=new Di({mirror:un,mutationCb:j,stylesheetManager:G,recordCrossOriginIframes:_,wrappedEmit:Xi});for(var Z of R||[])Z.getMirror&&Z.getMirror({nodeMirror:un,crossOriginIframeMirror:V.crossOriginIframeMirror,crossOriginIframeStyleMirror:V.crossOriginIframeStyleMirror});var J=new sn;Ki=new rn({recordCanvas:I,mutationCb:H,win:window,blockClass:n,blockSelector:s,mirror:un,sampling:b.canvas,dataURLOptions:F});var X=new Bi({mutationCb:j,scrollCb:q,bypassOptions:{blockClass:n,blockSelector:s,maskTextClass:l,maskTextSelector:h,inlineStylesheet:d,maskInputOptions:B,dataURLOptions:F,maskTextFn:m,maskInputFn:p,recordCanvas:I,inlineImages:x,sampling:b,slimDOMOptions:P,iframeManager:V,stylesheetManager:G,canvasManager:Ki,keepIframeSrcFn:O,processedNodeManager:J},mirror:un});Yi=function(t){if(void 0===t&&(t=!1),S){Xi({type:$e.Meta,data:{href:window.location.href,width:ei(),height:ti()}},t),G.reset(),X.init(),Ii.forEach((t=>t.lock()));var e=function(t,e){var{mirror:r=new hr,blockClass:i="rr-block",blockSelector:n=null,maskTextClass:s="rr-mask",maskTextSelector:a=null,inlineStylesheet:o=!0,inlineImages:u=!1,recordCanvas:l=!1,maskAllInputs:h=!1,maskTextFn:d,maskInputFn:c,slimDOM:f=!1,dataURLOptions:v,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:g,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:w,keepIframeSrcFn:k=(()=>!1),maxDepth:S}=e||{};return jr(t,{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:o,maskInputOptions:!0===h?{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}:!1===h?{password:!0}:h,maskTextFn:d,maskInputFn:c,slimDOMOptions:qr(f),dataURLOptions:v,inlineImages:u,recordCanvas:l,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:g,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:w,keepIframeSrcFn:k,newlyAddedElement:!1,maxDepth:S})}(document,{mirror:un,blockClass:n,blockSelector:s,maskTextClass:l,maskTextSelector:h,inlineStylesheet:d,maskAllInputs:B,maskTextFn:m,maskInputFn:p,slimDOM:P,dataURLOptions:F,recordCanvas:I,inlineImages:x,onSerialize(t){oi(t,un)&&V.addIframe(t),ui(t,un)&&G.trackLinkElement(t),li(t)&&X.addShadowRoot(nr.shadowRoot(t),document)},onIframeLoad(t,e){V.attachIframe(t,e),X.observeAttachShadow(t)},onStylesheetLoad(t,e){G.attachLinkElement(t,e)},keepIframeSrcFn:O});if(!e)return console.warn("Failed to snapshot the document");Xi({type:$e.FullSnapshot,data:{node:e,initialOffset:Qr(window)}},t),Ii.forEach((t=>t.unlock())),_&&V.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&G.adoptStyleSheets(document.adoptedStyleSheets,un.getId(document))}};try{var Y=[],K=t=>{var e;return Si(Li)({mutationCb:j,mousemoveCb:(t,e)=>Xi({type:$e.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>Xi({type:$e.IncrementalSnapshot,data:a({source:ze.MouseInteraction},t)}),scrollCb:q,viewportResizeCb:t=>Xi({type:$e.IncrementalSnapshot,data:a({source:ze.ViewportResize},t)}),inputCb:t=>Xi({type:$e.IncrementalSnapshot,data:a({source:ze.Input},t)}),mediaInteractionCb:t=>Xi({type:$e.IncrementalSnapshot,data:a({source:ze.MediaInteraction},t)}),styleSheetRuleCb:t=>Xi({type:$e.IncrementalSnapshot,data:a({source:ze.StyleSheetRule},t)}),styleDeclarationCb:t=>Xi({type:$e.IncrementalSnapshot,data:a({source:ze.StyleDeclaration},t)}),canvasMutationCb:H,fontCb:t=>Xi({type:$e.IncrementalSnapshot,data:a({source:ze.Font},t)}),selectionCb(t){Xi({type:$e.IncrementalSnapshot,data:a({source:ze.Selection},t)})},customElementCb(t){Xi({type:$e.IncrementalSnapshot,data:a({source:ze.CustomElement},t)})},blockClass:n,ignoreClass:o,ignoreSelector:u,maskTextClass:l,maskTextSelector:h,maskInputOptions:B,inlineStylesheet:d,sampling:b,recordDOM:S,recordCanvas:I,inlineImages:x,userTriggeredOnInput:M,collectFonts:T,doc:t,maskInputFn:p,maskTextFn:m,keepIframeSrcFn:O,blockSelector:s,slimDOMOptions:P,dataURLOptions:F,mirror:un,iframeManager:V,stylesheetManager:G,shadowDomManager:X,processedNodeManager:J,canvasManager:Ki,ignoreCSSAttributes:A,plugins:(null==(e=null==R?void 0:R.filter((t=>t.observer)))?void 0:e.map((t=>({observer:t.observer,options:t.options,callback:e=>Xi({type:$e.Plugin,data:{plugin:t.name,payload:e}})}))))||[]},g)};V.addLoadListener((t=>{try{var e=un.getId(t),r=K(t.contentDocument);Y.push(r),-1!==e&&W.set(e,r)}catch(t){console.warn(t)}})),V.addPageHideListener((t=>{var e=un.getId(t),r=W.get(e);r&&(r(),W.delete(e)),function(t){for(var e=Ii.length-1;e>=0;e--){var r=Ii[e];(null==r?void 0:r.bufferBelongsToIframe(t))&&(r.reset(),Ii.splice(e,1))}}(t)}));var Q=()=>{Yi(),Y.push(K(document)),an=!0};return["interactive","complete"].includes(document.readyState)?Q():(Y.push(Gr("DOMContentLoaded",(()=>{Xi({type:$e.DomContentLoaded,data:{}}),"DOMContentLoaded"===C&&Q()}))),Y.push(Gr("load",(()=>{Xi({type:$e.Load,data:{}}),"load"===C&&Q()}),window))),()=>{Y.forEach((t=>Vr(t))),J.destroy(),V.removeLoadListener(),V.destroy(),W.clear(),un.reset(),an=!1,pi=void 0}}catch(t){console.warn(t)}}ln.addCustomEvent=(t,e)=>{if(!an)throw new Error("please add custom event after start recording");Xi({type:$e.Custom,data:{tag:t,payload:e}})},ln.freezePage=()=>{Ii.forEach((t=>t.freeze()))},ln.takeFullSnapshot=t=>{if(!an)throw new Error("please take full snapshot after start recording");Yi(t)},ln.mirror=un;var hn=Object.defineProperty,dn=(t,e,r)=>((t,e,r)=>e in t?hn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r);class cn{constructor(t){dn(this,"fileName"),dn(this,"functionName"),dn(this,"lineNumber"),dn(this,"columnNumber"),this.fileName=t.fileName||"",this.functionName=t.functionName||"",this.lineNumber=t.lineNumber,this.columnNumber=t.columnNumber}toString(){var t=this.lineNumber||"",e=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+t+":"+e+")":this.fileName+":"+t+":"+e}}var fn=/(^|@)\S+:\d+/,vn=/^\s*at .*(\S+:\d+|\(native\))/m,pn=/^(eval@)?(\[native code])?$/,mn={parse(t){return t?void 0!==t.stacktrace||void 0!==t["opera#sourceloc"]?this.parseOpera(t):t.stack&&t.stack.match(vn)?this.parseV8OrIE(t):t.stack?this.parseFFOrSafari(t):[]:[]},extractLocation(t){if(-1===t.indexOf(":"))return[t];var e=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/[()]/g,""));if(!e)throw new Error("Cannot parse given url: "+t);return[e[1],e[2]||void 0,e[3]||void 0]},parseV8OrIE(t){return t.stack.split("\n").filter((function(t){return!!t.match(vn)}),this).map((function(t){t.indexOf("(eval ")>-1&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var e=t.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=e.match(/ (\((.+):(\d+):(\d+)\)$)/),i=(e=r?e.replace(r[0],""):e).split(/\s+/).slice(1),n=this.extractLocation(r?r[1]:i.pop()),s=i.join(" ")||void 0,a=["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0];return new cn({functionName:s,fileName:a,lineNumber:n[1],columnNumber:n[2]})}),this)},parseFFOrSafari(t){return t.stack.split("\n").filter((function(t){return!t.match(pn)}),this).map((function(t){if(t.indexOf(" > eval")>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===t.indexOf("@")&&-1===t.indexOf(":"))return new cn({functionName:t});var e=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=t.match(e),i=r&&r[1]?r[1]:void 0,n=this.extractLocation(t.replace(e,""));return new cn({functionName:i,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}),this)},parseOpera(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9(t){for(var e=/Line (\d+).*script (?:in )?(\S+)/i,r=t.message.split("\n"),i=[],n=2,s=r.length;s>n;n+=2){var a=e.exec(r[n]);a&&i.push(new cn({fileName:a[2],lineNumber:parseFloat(a[1])}))}return i},parseOpera10(t){for(var e=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=t.stacktrace.split("\n"),i=[],n=0,s=r.length;s>n;n+=2){var a=e.exec(r[n]);a&&i.push(new cn({functionName:a[3]||void 0,fileName:a[2],lineNumber:parseFloat(a[1])}))}return i},parseOpera11(t){return t.stack.split("\n").filter((function(t){return!!t.match(fn)&&!t.match(/^Error created at/)}),this).map((function(t){var e=t.split("@"),r=this.extractLocation(e.pop()),i=(e.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new cn({functionName:i,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})}),this)}};function gn(t){if(!t||!t.outerHTML)return"";for(var e="";t.parentElement;){var r=t.localName;if(!r)break;r=r.toLowerCase();var i=t.parentElement,n=[];if(i.children&&i.children.length>0)for(var s=0;i.children.length>s;s++){var a=i.children[s];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===r&&n.push(a)}n.length>1&&(r+=":eq("+n.indexOf(t)+")"),e=r+(e?">"+e:""),t=i}return e}function yn(t){return Array.isArray(t)}function bn(t){return"object"==typeof t&&null!==t&&!yn(t)}function wn(t,e){if(0===e)return!0;var r=Object.keys(t);for(var i of r)if(bn(t[i])&&wn(t[i],e-1))return!0;return!1}function kn(t,e){var r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,e);var i=[],n=[];return JSON.stringify(t,(function(t,e){if(i.length>0){var s=i.indexOf(this);~s?i.splice(s+1):i.push(this),~s?n.splice(s,1/0,t):n.push(t),~i.indexOf(e)&&(e=i[0]===e?"[Circular ~]":"[Circular ~."+n.slice(0,i.indexOf(e)).join(".")+"]")}else i.push(e);if(null===e)return e;if(void 0===e)return"undefined";if(bn(a=e)&&Object.keys(a).length>r.numOfKeysLimit||"function"==typeof a||bn(a)&&wn(a,r.depthOfLimit))return function(t){var e=t.toString();return r.stringLengthLimit&&e.length>r.stringLengthLimit&&(e=e.slice(0,r.stringLengthLimit)+"..."),e}(e);var a;if("bigint"==typeof e)return e.toString()+"n";if(e instanceof Event){var o={};for(var u in e){var l=e[u];o[u]=yn(l)?gn(l.length?l[0]:null):l}return o}return e instanceof Node?e instanceof HTMLElement?e?e.outerHTML:"":e.nodeName:e instanceof Error?e.stack?e.stack+"\nEnd of stack for Error object":e.name+": "+e.message:e}))}var Sn={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function In(t,e,r){var i,n=r?Object.assign({},Sn,r):Sn,s=n.logger;if(!s)return()=>{};i="string"==typeof s?e[s]:s;var a=0,o=!1,u=[];if(n.level.includes("error")){var l=e=>{var r=e.message,i=mn.parse(e.error).map((t=>t.toString())),s=[kn(r,n.stringifyOptions)];t({level:"error",trace:i,payload:s})};e.addEventListener("error",l),u.push((()=>{e.removeEventListener("error",l)}));var h=e=>{var r,i;e.reason instanceof Error?i=[kn("Uncaught (in promise) "+(r=e.reason).name+": "+r.message,n.stringifyOptions)]:(r=new Error,i=[kn("Uncaught (in promise)",n.stringifyOptions),kn(e.reason,n.stringifyOptions)]);var s=mn.parse(r).map((t=>t.toString()));t({level:"error",trace:s,payload:i})};e.addEventListener("unhandledrejection",h),u.push((()=>{e.removeEventListener("unhandledrejection",h)}))}for(var d of n.level)u.push(c(i,d));return()=>{u.forEach((t=>t()))};function c(e,r){var i=this;return e[r]?function(e,s,u){try{if(!(s in e))return()=>{};var l=e[s],h=(e=>function(){for(var s=arguments.length,u=new Array(s),l=0;s>l;l++)u[l]=arguments[l];if(e.apply(i,u),!("assert"===r&&u[0]||o)){o=!0;try{var h=mn.parse(new Error).map((t=>t.toString())).splice(1),d=("assert"===r?u.slice(1):u).map((t=>kn(t,n.stringifyOptions)));a++,n.lengthThreshold>a?t({level:r,trace:h,payload:d}):a===n.lengthThreshold&&t({level:"warn",trace:[],payload:[kn("The number of log records reached the threshold.")]})}catch(t){e("rrweb logger error:",t,...u)}finally{o=!1}}})(l);return"function"==typeof h&&(h.prototype=h.prototype||{},Object.defineProperties(h,{__rrweb_original__:{enumerable:!1,value:l}})),e[s]=h,()=>{e[s]=l}}catch(t){return()=>{}}}(e,r):()=>{}}}var _n=t=>({name:"rrweb/console@1",observer:In,options:t}),Cn=t=>t instanceof Document;function Mn(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return c(n)&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__posthog_wrapped__:{enumerable:!1,value:!0}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}function Tn(t,e){var r,i=function(t){try{return"string"==typeof t?new URL(t).hostname:"url"in t?new URL(t.url).hostname:t.hostname}catch(t){return null}}(t),n={hostname:i,isHostDenied:!1};if(null==(r=e.payloadHostDenyList)||!r.length||null==i||!i.trim().length)return n;for(var s of e.payloadHostDenyList)if(i.endsWith(s))return{hostname:i,isHostDenied:!0};return n}var xn=T("[Recorder]"),Rn=t=>"navigation"===t.entryType,On=t=>"resource"===t.entryType;function An(t,e){return!!e&&(b(e)||e[t])}function Ln(t){var{type:e,recordBody:r,headers:i,url:n}=t;function s(t){var e=Object.keys(i).find((t=>"content-type"===t.toLowerCase())),r=e&&i[e];return t.some((t=>null==r?void 0:r.includes(t)))}if(!r)return!1;if(function t(e){try{return"string"==typeof e?e.startsWith("blob:"):e instanceof URL?"blob:"===e.protocol:e instanceof Request&&t(e.url)}catch(t){return!1}}(n))return!1;if(b(r))return!0;if(d(r))return s(r);var a=r[e];return b(a)?a:s(a)}function Fn(t,e,r,i,n,s){return Nn.apply(this,arguments)}function Nn(){return Nn=s((function*(t,e,r,i,n,s){if(void 0===s&&(s=0),s>10)return xn.warn("Failed to get performance entry for request",{url:r,initiatorType:e}),null;var a=function(t,r){for(var s=t.length-1;s>=0;s-=1)if(On(a=t[s])&&a.initiatorType===e&&(v(i)||a.startTime>=i)&&(v(n)||n>=a.startTime))return t[s];var a}(t.performance.getEntriesByName(r));return a||(yield new Promise((t=>setTimeout(t,50*s))),Fn(t,e,r,i,n,s+1))})),Nn.apply(this,arguments)}function En(t){var{body:e,options:r,url:i}=t;if(g(e))return null;var{hostname:n,isHostDenied:s}=Tn(i,r);if(s)return n+" is in deny list";if(p(e))return e;if(Cn(e))return e.textContent;if(w(e))return L(e);if(f(e))try{return JSON.stringify(e)}catch(t){return"[SessionReplay] Failed to stringify response object"}return"[SessionReplay] Cannot read body of type "+toString.call(e)}var Dn=t=>!m(t)&&("navigation"===t.entryType||"resource"===t.entryType);function Bn(t){var{entry:e,method:r,status:i,networkRequest:n,isInitial:s,start:o,end:u,url:l,initiatorType:h}=t;o=e?e.startTime:o,u=e?e.responseEnd:u;var d=Math.floor(Date.now()-performance.now()),c=Math.floor(d+(o||0)),f=[a({},e?e.toJSON():{name:l},{startTime:v(o)?void 0:Math.round(o),endTime:v(u)?void 0:Math.round(u),timeOrigin:d,timestamp:c,method:r,initiatorType:h||(e?e.initiatorType:void 0),status:i,requestHeaders:n.requestHeaders,requestBody:n.requestBody,responseHeaders:n.responseHeaders,responseBody:n.responseBody,isInitial:s})];if(Dn(e))for(var p of e.serverTiming||[])f.push({timeOrigin:d,timestamp:c,startTime:Math.round(e.startTime),name:p.name,duration:p.duration,entryType:"serverTiming"});return f}var Pn=["video/","audio/"];function Un(t){return new Promise((e=>{var r=setTimeout((()=>e("[SessionReplay] Timeout while trying to read body")),500);try{t.clone().text().then((t=>e(t)),(t=>e("[SessionReplay] Failed to read body: "+t))).finally((()=>clearTimeout(r)))}catch(t){clearTimeout(r),e("[SessionReplay] Failed to read body")}}))}function Wn(){return(Wn=s((function*(t){var{r:e,options:r,url:i}=t,{hostname:n,isHostDenied:s}=Tn(i,r);return s?Promise.resolve(n+" is in deny list"):Un(e)}))).apply(this,arguments)}function $n(){return($n=s((function*(t){var{r:e,options:r,url:i}=t,n=function(t){var e,{r:r,options:i,url:n}=t;if("chunked"===r.headers.get("Transfer-Encoding"))return"Chunked Transfer-Encoding is not supported";var s=null==(e=r.headers.get("Content-Type"))?void 0:e.toLowerCase(),a=Pn.some((t=>null==s?void 0:s.startsWith(t)));if(s&&a)return"Content-Type "+s+" is not supported";var{hostname:o,isHostDenied:u}=Tn(n,i);return u?o+" is in deny list":null}({r:e,options:r,url:i});return m(n)?Un(e):Promise.resolve(n)}))).apply(this,arguments)}var zn=null;function jn(t,e,r){if(!("performance"in e))return()=>{};if(zn)return xn.warn("Network observer already initialised, doing nothing"),()=>{};var i=r?Object.assign({},Q,r):Q,n=e=>{var r=[];e.requests.forEach((t=>{var e=i.maskRequestFn(t);e&&r.push(e)})),r.length>0&&t(a({},e,{requests:r}))},o=function(t,e,r){if(r.recordInitialRequests){var i=e.performance.getEntries().filter((t=>Rn(t)||On(t)&&r.initiatorTypes.includes(t.initiatorType)));t({requests:i.flatMap((t=>Bn({entry:t,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}var n=new e.PerformanceObserver((e=>{var i=e.getEntries().filter((t=>Rn(t)||On(t)&&r.initiatorTypes.includes(t.initiatorType)&&(t=>!r.recordBody&&!r.recordHeaders||"xmlhttprequest"!==t.initiatorType&&"fetch"!==t.initiatorType)(t)));t({requests:i.flatMap((t=>Bn({entry:t,method:void 0,status:void 0,networkRequest:{}})))})})),s=PerformanceObserver.supportedEntryTypes.filter((t=>r.performanceEntryTypeToObserve.includes(t)));return n.observe({entryTypes:s}),()=>{n.disconnect()}}(n,e,i),u=()=>{},l=()=>{};return(i.recordHeaders||i.recordBody)&&(u=function(t,e,r){if(!r.initiatorTypes.includes("xmlhttprequest"))return()=>{};var i=An("request",r.recordHeaders),n=An("response",r.recordHeaders),s=Mn(e.XMLHttpRequest.prototype,"open",(s=>function(a,o,u,l,h){void 0===u&&(u=!0);var d,c,f=this,v=new Request(o),p={},m={},g=f.setRequestHeader.bind(f);f.setRequestHeader=(t,e)=>(m[t]=e,g(t,e)),i&&(p.requestHeaders=m);var y=f.send.bind(f);f.send=t=>(Ln({type:"request",headers:m,url:o,recordBody:r.recordBody})&&(p.requestBody=En({body:t,options:r,url:o})),d=e.performance.now(),y(t));var b=()=>{f.removeEventListener("readystatechange",w),f.removeEventListener("error",b),f.removeEventListener("abort",b),f.removeEventListener("timeout",b)},w=()=>{if(f.readyState===f.DONE){b(),c=e.performance.now();var i={};f.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{var e=t.split(": "),r=e.shift(),n=e.join(": ");r&&(i[r]=n)})),n&&(p.responseHeaders=i),Ln({type:"response",headers:i,url:o,recordBody:r.recordBody})&&(p.responseBody=En({body:f.response,options:r,url:o})),Fn(e,"xmlhttprequest",v.url,d,c).then((e=>{var r=Bn({entry:e,method:a,status:null==f?void 0:f.status,networkRequest:p,start:d,end:c,url:o.toString(),initiatorType:"xmlhttprequest"});t({requests:r})})).catch((()=>{}))}};f.addEventListener("readystatechange",w),f.addEventListener("error",b),f.addEventListener("abort",b),f.addEventListener("timeout",b),s.call(f,a,o.toString(),u,l,h)}));return()=>{s()}}(n,e,i),l=function(t,e,r){if(!r.initiatorTypes.includes("fetch"))return()=>{};var i=An("request",r.recordHeaders),n=An("response",r.recordHeaders),a=Mn(e,"fetch",(a=>function(){var o=s((function*(s,o){var u,l,h,d=new Request(s,o),c={};try{var f={};d.headers.forEach(((t,e)=>{f[e]=t})),i&&(c.requestHeaders=f),Ln({type:"request",headers:f,url:s,recordBody:r.recordBody})&&(c.requestBody=yield function(t){return Wn.apply(this,arguments)}({r:d,options:r,url:s})),l=e.performance.now(),u=yield a(d),h=e.performance.now();var v={};return u.headers.forEach(((t,e)=>{v[e]=t})),n&&(c.responseHeaders=v),Ln({type:"response",headers:v,url:s,recordBody:r.recordBody})&&(c.responseBody=yield function(t){return $n.apply(this,arguments)}({r:u,options:r,url:s})),u}finally{Fn(e,"fetch",d.url,l,h).then((e=>{var r,i=Bn({entry:e,method:d.method,status:null==(r=u)?void 0:r.status,networkRequest:c,start:l,end:h,url:d.url,initiatorType:"fetch"});t({requests:i})})).catch((()=>{}))}}));return function(t,e){return o.apply(this,arguments)}}()));return()=>{a()}}(n,e,i)),zn=()=>{o(),u(),l(),zn=null}}var qn=t=>({name:"rrweb/network@1",observer:jn,options:t});i.__PosthogExtensions__=i.__PosthogExtensions__||{},i.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:_n,getRecordNetworkPlugin:qn},i.__PosthogExtensions__.rrweb={record:ln,version:"v2",wasMaxDepthReached:()=>zr,resetMaxDepthState(){zr=!1,$r=!1}},i.rrweb={record:ln,version:"v2"},i.rrwebConsoleRecord={getRecordConsolePlugin:_n},i.getRecordNetworkPlugin=qn,i.__PosthogExtensions__=i.__PosthogExtensions__||{},i.__PosthogExtensions__.initSessionRecording=t=>new De(t)}();
|
|
1
|
+
!function(){"use strict";var t="undefined"!=typeof window?window:void 0,e="undefined"!=typeof globalThis?globalThis:t;"undefined"==typeof self&&(e.self=e),"undefined"==typeof File&&(e.File=function(){});var r=null==e?void 0:e.document;null!=e&&e.XMLHttpRequest&&new e.XMLHttpRequest;var i=null!=t?t:{};function n(t,e,r,i,n,s,a){try{var o=t[s](a),u=o.value}catch(t){return void r(t)}o.done?e(u):Promise.resolve(u).then(i,n)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(i,s){var a=t.apply(e,r);function o(t){n(a,i,s,o,u,"next",t)}function u(t){n(a,i,s,o,u,"throw",t)}o(void 0)}))}}function a(){return a=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var i in r)({}).hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},a.apply(null,arguments)}var o={DomContentLoaded:0,Load:1,FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Custom:5,Plugin:6},u=Object.prototype,l=u.hasOwnProperty,h=u.toString,d=Array.isArray||function(t){return"[object Array]"===h.call(t)},c=t=>"function"==typeof t,f=t=>t===Object(t)&&!d(t),v=t=>void 0===t,p=t=>"[object String]"==h.call(t),m=t=>null===t,g=t=>v(t)||m(t),y=t=>"[object Number]"==h.call(t)&&t==t,b=t=>"[object Boolean]"===h.call(t),w=t=>t instanceof FormData;function k(t,e,r,i,n){return e>r&&(i.warn("min cannot be greater than max."),e=r),y(t)?t>r?(i.warn(" cannot be greater than max: "+r+". Using max value instead."),r):e>t?(i.warn(" cannot be less than min: "+e+". Using min value instead."),e):t:(i.warn(" must be a number. using max or fallback. max: "+r+", fallback: "+n),k(n||r,e,r,i))}class S{constructor(t){this.$t={},this.zt=t.zt,this.Zt=k(t.bucketSize,0,100,t.Gt),this.Qt=k(t.refillRate,0,this.Zt,t.Gt),this.Jt=k(t.refillInterval,0,864e5,t.Gt)}Kt(t,e){var r=Math.floor((e-t.lastAccess)/this.Jt);r>0&&(t.tokens=Math.min(t.tokens+r*this.Qt,this.Zt),t.lastAccess=t.lastAccess+r*this.Jt)}consumeRateLimit(t){var e,r=Date.now(),i=String(t),n=this.$t[i];return n?this.Kt(n,r):this.$t[i]=n={tokens:this.Zt,lastAccess:r},0===n.tokens||(n.tokens--,0===n.tokens&&(null==(e=this.zt)||e.call(this,t)),0===n.tokens)}stop(){this.$t={}}}var I="1.373.3",_="web",C=function(e,r){var{debugEnabled:n}=void 0===r?{}:r,s={k(r){if(t&&(i.POSTHOG_DEBUG||n)&&!v(t.console)&&t.console){for(var s=("__rrweb_original__"in t.console[r]?t.console[r].__rrweb_original__:t.console[r]),a=arguments.length,o=new Array(a>1?a-1:0),u=1;a>u;u++)o[u-1]=arguments[u];s(e,...o)}},debug(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];s.k("debug",...e)},info(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];s.k("log",...e)},warn(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];s.k("warn",...e)},error(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];s.k("error",...e)},critical(){for(var t=arguments.length,r=new Array(t),i=0;t>i;i++)r[i]=arguments[i];console.error(e,...r)},uninitializedWarning(t){s.error("You must initialize PostHog before calling "+t)},createLogger:(t,r)=>C(e+" "+t,r)};return s},M=C("[PostHog.js]"),T=M.createLogger;function x(t,e){if(!g(t))if(d(t))t.forEach(e);else if(w(t))t.forEach(((t,r)=>e(t,r)));else for(var r in t)l.call(t,r)&&e(t[r],r)}function R(t,e,r,i){var{capture:n=!1,passive:s=!0}={};null==t||t.addEventListener(e,r,{capture:n,passive:s})}var O=["localhost","127.0.0.1"],A=t=>{var e=null==r?void 0:r.createElement("a");return v(e)?null:(e.href=t,e)},L=function(t,e){var r,i;void 0===e&&(e="&");var n=[];return x(t,(function(t,e){v(t)||v(e)||"undefined"===e||(r=encodeURIComponent((t=>t instanceof File)(t)?t.name:t.toString()),i=encodeURIComponent(e),n[n.length]=i+"="+r)})),n.join(e)},F="$session_recording_remote_config",N="$replay_override_sampling",E="$replay_override_linked_flag",D="$replay_override_url_trigger",B="$replay_override_event_trigger",P="$session_is_sampled",U="$session_past_minimum_duration",W="$session_recording_url_trigger_activated_session",z="$session_recording_event_trigger_activated_session",j="$posthog_sr_group_event_trigger_",q="$posthog_sr_group_url_trigger_",H="$posthog_sr_group_sampling_",G="$debug_first_full_snapshot_timestamp",V="$stored_person_properties",Z="$sdk_debug_replay_remote_trigger_matching_config",J=new RegExp("(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})"),X=new RegExp("(\\d{3}-?\\d{2}-?\\d{4})"),Y="[SessionRecording]",K="redacted",Q={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:t=>t,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","analytics.google.com","bam.nr-data.net"]},tt=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],et=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],rt=["/s/","/e/","/i/"];function it(t,e,r,i){if(g(t))return t;var n=(null==e?void 0:e["content-length"])||function(t){return new Blob([t]).size}(t);return p(n)&&(n=parseInt(n)),n>r?Y+" "+i+" body too large to record ("+n+" bytes)":t}function nt(t,e){if(g(t))return t;var r=t;return function(t,e){if(g(t))return!1;if(p(t)){if(t=t.trim(),J.test((t||"").replace(/[- ]/g,"")))return!1;if(X.test(t))return!1}return!0}(r)||(r=Y+" "+e+" body "+K),x(et,(t=>{var i,n;null!=(i=r)&&i.length&&-1!==(null==(n=r)?void 0:n.indexOf(t))&&(r=Y+" "+e+" body "+K+" as might contain: "+t)})),r}var st="disabled",at="sampled",ot="active",ut="buffering",lt="paused",ht="rrweb_error",dt="trigger",ct=dt+"_activated",ft=dt+"_pending",vt=dt+"_"+st;function pt(t,e,r){return e.some((e=>{var i;return"regex"===e.matching&&(null!==(i=null==r?void 0:r.get(e.url))&&void 0!==i?i:new RegExp(e.url)).test(t)}))}class mt{constructor(t){this.t=t}triggerStatus(t){var e=this.t.map((e=>e.triggerStatus(t)));return e.includes(ct)?ct:e.includes(ft)?ft:vt}stop(){this.t.forEach((t=>t.stop()))}}class gt{constructor(t){this.t=t}triggerStatus(t){var e=new Set;for(var r of this.t)e.add(r.triggerStatus(t));switch(e.delete(vt),e.size){case 0:return vt;case 1:return Array.from(e)[0];default:return ft}}stop(){this.t.forEach((t=>t.stop()))}}class yt{triggerStatus(){return ct}stop(){}}var bt=t=>"sessionRecording"in t;class wt{constructor(t,e){this.u=[],this.Ma=[],this.Ra=new Map,this.Oa=new Map,this.Aa="",this.urlBlocked=!1,this._instance=t,this.La=e}onConfig(t){var e,r;this.u=(bt(t)?f(t.sessionRecording)?null==(e=t.sessionRecording)?void 0:e.urlTriggers:[]:null==t?void 0:t.urlTriggers)||[],this.Ma=(bt(t)?f(t.sessionRecording)?null==(r=t.sessionRecording)?void 0:r.urlBlocklist:[]:null==t?void 0:t.urlBlocklist)||[],this.Fa()}Fa(){for(var t of(this.Ra.clear(),this.Oa.clear(),this.u))if("regex"===t.matching&&!this.Ra.has(t.url))try{this.Ra.set(t.url,new RegExp(t.url))}catch(e){M.error("Invalid URL trigger regex pattern:",t.url,e)}for(var e of this.Ma)if("regex"===e.matching&&!this.Oa.has(e.url))try{this.Oa.set(e.url,new RegExp(e.url))}catch(t){M.error("Invalid URL blocklist regex pattern:",e.url,t)}}onRemoteConfig(t){this.onConfig(t)}Na(t){var e;return 0===this.u.length?vt:(null==(e=this._instance)?void 0:e.get_property(this.La?q+this.La:W))===t?ct:ft}triggerStatus(t){var e=this.Na(t),r=e===ct?ct:e===ft?ft:vt;return this._instance.register_for_session({$sdk_debug_replay_url_trigger_status:r}),r}checkUrlBlocklist(e,r){if(void 0!==t&&t.location.href){var i=t.location.href;if(i!==this.Aa){this.Aa=i;var n=this.urlBlocked,s=pt(i,this.Ma,this.Oa);n&&s||(s&&!n?e():!s&&n&&r())}}}checkUrlTriggerConditions(e,r,i,n){if(void 0!==t&&t.location.href){var s=t.location.href;if(s!==this.Aa){this.Aa=s;var a=this.urlBlocked,o=pt(s,this.Ma,this.Oa);o&&!a?e():!o&&a&&r();var u=this.Na(n)===ct,l=pt(s,this.u,this.Ra);!u&&l&&i("url",s)}}}stop(){this.Aa=""}}class kt{constructor(t){this.linkedFlag=null,this.linkedFlagSeen=!1,this.Da=()=>{},this._instance=t}triggerStatus(){var t=ft;return g(this.linkedFlag)&&(t=vt),this.linkedFlagSeen&&(t=ct),this._instance.register_for_session({$sdk_debug_replay_linked_flag_trigger_status:t}),t}onConfig(t,e){var r;if(this.linkedFlag=(bt(t)?f(t.sessionRecording)?null==(r=t.sessionRecording)?void 0:r.linkedFlag:null:null==t?void 0:t.linkedFlag)||null,!g(this.linkedFlag)&&!this.linkedFlagSeen){var i=p(this.linkedFlag)?this.linkedFlag:this.linkedFlag.flag,n=p(this.linkedFlag)?null:this.linkedFlag.variant;this.Da=this._instance.onFeatureFlags(((t,r)=>{var s=!1;if(f(r)&&i in r){var a=r[i];s=b(a)?!0===a:n?a===n:!!a}this.linkedFlagSeen=s,s&&e(i,n)}))}}onRemoteConfig(t,e){this.onConfig(t,e)}stop(){this.Da()}}class St{constructor(t,e){this.Ba=[],this._instance=t,this.La=e}onConfig(t){var e;this.Ba=(bt(t)?f(t.sessionRecording)?null==(e=t.sessionRecording)?void 0:e.eventTriggers:[]:null==t?void 0:t.eventTriggers)||[]}onRemoteConfig(t){this.onConfig(t)}Pa(t){var e;return 0===this.Ba.length?vt:(null==(e=this._instance)?void 0:e.get_property(this.La?j+this.La:z))===t?ct:ft}triggerStatus(t){var e=this.Pa(t),r=e===ct?ct:e===ft?ft:vt;return this._instance.register_for_session({$sdk_debug_replay_event_trigger_status:r}),r}checkEventTriggerConditions(t,e,r){if(0!==this.Ba.length){var i=this.Pa(r)===ct,n=this.Ba.includes(t);!i&&n&&e("event",t)}}stop(){}}class It{constructor(t,e,r){if(this._instance=t,this.group=e,this.Ua=new wt(t,e.id),this.Wa=new St(t,e.id),this.$a=new kt(t),e.conditions.events&&e.conditions.events.length>0||e.conditions.urls&&e.conditions.urls.length>0||e.conditions.flag){var i=(e.conditions.events||[]).map((t=>t.name)),n={urlTriggers:e.conditions.urls||[],eventTriggers:i,linkedFlag:e.conditions.flag||null,urlBlocklist:[]};this.Ua.onConfig(n),this.Wa.onConfig(n),this.$a.onConfig(n,r);var s=[this.Wa,this.Ua,this.$a];this.za="any"===e.conditions.matchType?new mt(s):new gt(s)}else this.za=new yt}triggerStatus(t){return this.za.triggerStatus(t)}checkEventTriggerConditions(t,e,r){this.Wa.checkEventTriggerConditions(t,e,r)}checkUrlTriggerConditions(t,e,r,i){this.Ua.checkUrlTriggerConditions(t,e,r,i)}activateTrigger(t,e){var r;null==(r=this._instance.persistence)||r.register({["url"===t?q+this.group.id:j+this.group.id]:e})}stop(){this.Ua.stop(),this.Wa.stop(),this.$a.stop()}}function _t(t){if(t.rrwebError)return ht;if(!t.receivedFlags)return ut;if(!t.isRecordingEnabled)return st;if(t.urlTriggerMatching.urlBlocked)return lt;var e=!0===t.isSampled,r=new mt([t.eventTriggerMatching,t.urlTriggerMatching,t.linkedFlagMatching]).triggerStatus(t.sessionId);return e?at:r===ct?ot:r===ft?ut:!1===t.isSampled?st:ot}function Ct(t){if(t.rrwebError)return ht;if(!t.receivedFlags)return ut;if(!t.isRecordingEnabled)return st;if(t.urlTriggerMatching.urlBlocked)return lt;var e=new gt([t.eventTriggerMatching,t.urlTriggerMatching,t.linkedFlagMatching]).triggerStatus(t.sessionId),r=e!==vt,i=b(t.isSampled);return r&&e===ft?ut:r&&e===vt||i&&!t.isSampled?st:!0===t.isSampled?at:ot}function Mt(t){var e,r;return(null==(e=JSON.stringify(t,(r=[],function(t,e){if(f(e)){for(;r.length>0&&r[r.length-1]!==this;)r.pop();return r.includes(e)?"[Circular]":(r.push(e),e)}return e})))?void 0:e.length)||0}function Tt(t){if(m(t))return 4;if(v(t))return 0;switch(typeof t){case"string":return t.length+2;case"number":return String(t).length;case"boolean":return t?4:5;case"object":if(d(t)){for(var e=2,r=0;t.length>r;r++){r>0&&(e+=1);var i=t[r];e+=v(i)||m(i)?4:Tt(i)}return e}var n=t,s=2,a=!0;for(var o in n)if({}.hasOwnProperty.call(n,o)){var u=n[o];v(u)||(a||(s+=1),a=!1,s+=o.length+3+Tt(u))}return s;default:return 0}}var xt=Uint8Array,Rt=Uint16Array,Ot=Uint32Array,At=new xt([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]),Lt=new xt([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]),Ft=new xt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Nt=function(t,e){for(var r=new Rt(31),i=0;31>i;++i)r[i]=e+=1<<t[i-1];var n=new Ot(r[30]);for(i=1;30>i;++i)for(var s=r[i];r[i+1]>s;++s)n[s]=s-r[i]<<5|i;return[r,n]},Et=Nt(At,2),Dt=Et[1];Et[0][28]=258,Dt[258]=28;for(var Bt=Nt(Lt,0)[1],Pt=new Rt(32768),Ut=0;32768>Ut;++Ut){var Wt=(43690&Ut)>>>1|(21845&Ut)<<1;Pt[Ut]=((65280&(Wt=(61680&(Wt=(52428&Wt)>>>2|(13107&Wt)<<2))>>>4|(3855&Wt)<<4))>>>8|(255&Wt)<<8)>>>1}var $t=function(t,e,r){for(var i=t.length,n=0,s=new Rt(e);i>n;++n)++s[t[n]-1];var a,o=new Rt(e);for(n=0;e>n;++n)o[n]=o[n-1]+s[n-1]<<1;if(r){a=new Rt(1<<e);var u=15-e;for(n=0;i>n;++n)if(t[n])for(var l=n<<4|t[n],h=e-t[n],d=o[t[n]-1]++<<h,c=d|(1<<h)-1;c>=d;++d)a[Pt[d]>>>u]=l}else for(a=new Rt(i),n=0;i>n;++n)a[n]=Pt[o[t[n]-1]++]>>>15-t[n];return a},zt=new xt(288);for(Ut=0;144>Ut;++Ut)zt[Ut]=8;for(Ut=144;256>Ut;++Ut)zt[Ut]=9;for(Ut=256;280>Ut;++Ut)zt[Ut]=7;for(Ut=280;288>Ut;++Ut)zt[Ut]=8;var jt=new xt(32);for(Ut=0;32>Ut;++Ut)jt[Ut]=5;var qt=$t(zt,9,0),Ht=$t(jt,5,0),Gt=function(t){return(t/8>>0)+(7&t&&1)},Vt=function(t,e,r){(null==r||r>t.length)&&(r=t.length);var i=new(t instanceof Rt?Rt:t instanceof Ot?Ot:xt)(r-e);return i.set(t.subarray(e,r)),i},Zt=function(t,e,r){var i=e/8>>0;t[i]|=r<<=7&e,t[i+1]|=r>>>8},Jt=function(t,e,r){var i=e/8>>0;t[i]|=r<<=7&e,t[i+1]|=r>>>8,t[i+2]|=r>>>16},Xt=function(t,e){for(var r=[],i=0;t.length>i;++i)t[i]&&r.push({s:i,f:t[i]});var n=r.length,s=r.slice();if(!n)return[new xt(0),0];if(1==n){var a=new xt(r[0].s+1);return a[r[0].s]=1,[a,1]}r.sort((function(t,e){return t.f-e.f})),r.push({s:-1,f:25001});var o=r[0],u=r[1],l=0,h=1,d=2;for(r[0]={s:-1,f:o.f+u.f,l:o,r:u};h!=n-1;)o=r[r[d].f>r[l].f?l++:d++],u=r[l!=h&&r[d].f>r[l].f?l++:d++],r[h++]={s:-1,f:o.f+u.f,l:o,r:u};var c=s[0].s;for(i=1;n>i;++i)s[i].s>c&&(c=s[i].s);var f=new Rt(c+1),v=Yt(r[h-1],f,0);if(v>e){i=0;var p=0,m=v-e,g=1<<m;for(s.sort((function(t,e){return f[e.s]-f[t.s]||t.f-e.f}));n>i;++i){var y=s[i].s;if(e>=f[y])break;p+=g-(1<<v-f[y]),f[y]=e}for(p>>>=m;p>0;){var b=s[i].s;e>f[b]?p-=1<<e-f[b]++-1:++i}for(;i>=0&&p;--i){var w=s[i].s;f[w]==e&&(--f[w],++p)}v=e}return[new xt(f),v]},Yt=function(t,e,r){return-1==t.s?Math.max(Yt(t.l,e,r+1),Yt(t.r,e,r+1)):e[t.s]=r},Kt=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new Rt(++e),i=0,n=t[0],s=1,a=function(t){r[i++]=t},o=1;e>=o;++o)if(t[o]==n&&o!=e)++s;else{if(!n&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(n),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(n);s=1,n=t[o]}return[r.subarray(0,i),e]},Qt=function(t,e){for(var r=0,i=0;e.length>i;++i)r+=t[i]*e[i];return r},te=function(t,e,r){var i=r.length,n=Gt(e+2);t[n]=255&i,t[n+1]=i>>>8,t[n+2]=255^t[n],t[n+3]=255^t[n+1];for(var s=0;i>s;++s)t[n+s+4]=r[s];return 8*(n+4+i)},ee=function(t,e,r,i,n,s,a,o,u,l,h){Zt(e,h++,r),++n[256];for(var d=Xt(n,15),c=d[0],f=d[1],v=Xt(s,15),p=v[0],m=v[1],g=Kt(c),y=g[0],b=g[1],w=Kt(p),k=w[0],S=w[1],I=new Rt(19),_=0;y.length>_;++_)I[31&y[_]]++;for(_=0;k.length>_;++_)I[31&k[_]]++;for(var C=Xt(I,7),M=C[0],T=C[1],x=19;x>4&&!M[Ft[x-1]];--x);var R,O,A,L,F=l+5<<3,N=Qt(n,zt)+Qt(s,jt)+a,E=Qt(n,c)+Qt(s,p)+a+14+3*x+Qt(I,M)+(2*I[16]+3*I[17]+7*I[18]);if(N>=F&&E>=F)return te(e,h,t.subarray(u,u+l));if(Zt(e,h,1+(N>E)),h+=2,N>E){R=$t(c,f,0),O=c,A=$t(p,m,0),L=p;var D=$t(M,T,0);for(Zt(e,h,b-257),Zt(e,h+5,S-1),Zt(e,h+10,x-4),h+=14,_=0;x>_;++_)Zt(e,h+3*_,M[Ft[_]]);h+=3*x;for(var B=[y,k],P=0;2>P;++P){var U=B[P];for(_=0;U.length>_;++_)Zt(e,h,D[W=31&U[_]]),h+=M[W],W>15&&(Zt(e,h,U[_]>>>5&127),h+=U[_]>>>12)}}else R=qt,O=zt,A=Ht,L=jt;for(_=0;o>_;++_)if(i[_]>255){var W;Jt(e,h,R[257+(W=i[_]>>>18&31)]),h+=O[W+257],W>7&&(Zt(e,h,i[_]>>>23&31),h+=At[W]);var z=31&i[_];Jt(e,h,A[z]),h+=L[z],z>3&&(Jt(e,h,i[_]>>>5&8191),h+=Lt[z])}else Jt(e,h,R[i[_]]),h+=O[i[_]];return Jt(e,h,R[256]),h+O[256]},re=new Ot([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ie=function(){for(var t=new Ot(256),e=0;256>e;++e){for(var r=e,i=9;--i;)r=(1&r&&3988292384)^r>>>1;t[e]=r}return t}(),ne=function(){var t=4294967295;return{p(e){for(var r=t,i=0;e.length>i;++i)r=ie[255&r^e[i]]^r>>>8;t=r},d:()=>4294967295^t}},se=function(t,e,r,i,n){return function(t,e,r,i,n,s){var a=t.length,o=new xt(i+a+5*(1+Math.floor(a/7e3))+n),u=o.subarray(i,o.length-n),l=0;if(!e||8>a)for(var h=0;a>=h;h+=65535){var d=h+65535;a>d?l=te(u,l,t.subarray(h,d)):(u[h]=true,l=te(u,l,t.subarray(h,a)))}else{for(var c=re[e-1],f=c>>>13,v=8191&c,p=(1<<r)-1,m=new Rt(32768),g=new Rt(p+1),y=Math.ceil(r/3),b=2*y,w=function(e){return(t[e]^t[e+1]<<y^t[e+2]<<b)&p},k=new Ot(25e3),S=new Rt(288),I=new Rt(32),_=0,C=0,M=(h=0,0),T=0,x=0;a>h;++h){var R=w(h),O=32767&h,A=g[R];if(m[O]=A,g[R]=O,h>=T){var L=a-h;if((_>7e3||M>24576)&&L>423){l=ee(t,u,0,k,S,I,C,M,x,h-x,l),M=_=C=0,x=h;for(var F=0;286>F;++F)S[F]=0;for(F=0;30>F;++F)I[F]=0}var N=2,E=0,D=v,B=O-A&32767;if(L>2&&R==w(h-B))for(var P=Math.min(f,L)-1,U=Math.min(32767,h),W=Math.min(258,L);U>=B&&--D&&O!=A;){if(t[h+N]==t[h+N-B]){for(var z=0;W>z&&t[h+z]==t[h+z-B];++z);if(z>N){if(N=z,E=B,z>P)break;var j=Math.min(B,z-2),q=0;for(F=0;j>F;++F){var H=h-B+F+32768&32767,G=H-m[H]+32768&32767;G>q&&(q=G,A=H)}}}B+=(O=A)-(A=m[O])+32768&32767}if(E){k[M++]=268435456|Dt[N]<<18|Bt[E];var V=31&Dt[N],Z=31&Bt[E];C+=At[V]+Lt[Z],++S[257+V],++I[Z],T=h+N,++_}else k[M++]=t[h],++S[t[h]]}}l=ee(t,u,true,k,S,I,C,M,x,h-x,l)}return Vt(o,0,i+Gt(l)+n)}(t,null==e.level?6:e.level,null==e.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,r,i)},ae=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},oe=function(t,e){var r=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=2>e.level?4:9==e.level?2:0,t[9]=3,0!=e.mtime&&ae(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),r){t[3]=8;for(var i=0;r.length>=i;++i)t[i+10]=r.charCodeAt(i)}},ue=function(t){return 10+(t.filename&&t.filename.length+1||0)};class le{constructor(t,e){var r,i;void 0===e&&(e={}),this.ja={},this.qa=t=>{if(!this.ja[t]){var e,r;this.ja[t]=!0;var i=this.Ha(t);null==(e=(r=this.Ga).onBlockedNode)||e.call(r,t,i)}},this.Va=t=>{var e=this.Ha(t);if("svg"!==(null==e?void 0:e.nodeName)&&e instanceof Element){var r=e.closest("svg");if(r)return[this._rrweb.mirror.getId(r),r]}return[t,e]},this.Ha=t=>this._rrweb.mirror.getNode(t),this.Za=t=>{var e,r,i,n,s,a,o,u;return(null!==(e=null==(r=t.removes)?void 0:r.length)&&void 0!==e?e:0)+(null!==(i=null==(n=t.attributes)?void 0:n.length)&&void 0!==i?i:0)+(null!==(s=null==(a=t.texts)?void 0:a.length)&&void 0!==s?s:0)+(null!==(o=null==(u=t.adds)?void 0:u.length)&&void 0!==o?o:0)},this.throttleMutations=t=>{if(3!==t.type||0!==t.data.source)return t;var e=t.data,r=this.Za(e);e.attributes&&(e.attributes=e.attributes.filter((t=>{var[e]=this.Va(t.id);return!this.do.consumeRateLimit(e)&&t})));var i=this.Za(e);return 0!==i||r===i?t:void 0},this._rrweb=t,this.Ga=e,this.do=new S({bucketSize:null!==(r=this.Ga.bucketSize)&&void 0!==r?r:100,refillRate:null!==(i=this.Ga.refillRate)&&void 0!==i?i:10,refillInterval:1e3,zt:this.qa,Gt:M})}reset(){this.ja={}}stop(){this.do.stop(),this.reset()}}var he="$sess_rec_flush_size";class de{constructor(t){if(!t.persistence)throw new Error("it is not valid to not have persistence and be this far into setting up the application");this.Ja=t.get_property.bind(t),this.Xa=t.persistence.set_property.bind(t.persistence)}trackSize(t){var e=Number(this.Ja(he))||0;this.Xa(he,e+t)}reset(){return this.Xa(he,0)}get currentTrackedSize(){return Number(this.Ja(he))||0}}function ce(t,e){return function(t){for(var e=0,r=0;t.length>r;r++)e=(e<<5)-e+t.charCodeAt(r),e|=0;return Math.abs(e)}(t)%100<k(100*e,0,100,M)}var fe=function(t,e){if(!function(t){try{new RegExp(t)}catch(t){return!1}return!0}(e))return!1;try{return new RegExp(e).test(t)}catch(t){return!1}},ve={exact:(t,e)=>e.some((e=>t.some((t=>e===t)))),is_not:(t,e)=>e.every((e=>t.every((t=>e!==t)))),regex:(t,e)=>e.some((e=>t.some((t=>fe(e,t))))),not_regex:(t,e)=>e.every((e=>t.every((t=>!fe(e,t))))),icontains:(t,e)=>e.map(pe).some((e=>t.map(pe).some((t=>e.includes(t))))),not_icontains:(t,e)=>e.map(pe).every((e=>t.map(pe).every((t=>!e.includes(t))))),gt:(t,e)=>e.some((e=>{var r=parseFloat(e);return!isNaN(r)&&t.some((t=>r>parseFloat(t)))})),lt:(t,e)=>e.some((e=>{var r=parseFloat(e);return!isNaN(r)&&t.some((t=>r<parseFloat(t)))}))},pe=t=>t.toLowerCase(),me=new Set(["is_not","not_icontains","not_regex"]);function ge(t,e,r){return!t||0===t.length||t.every((t=>{var i="person"===t.type?r:e,n=null==i?void 0:i[t.key],s=t.operator||"exact";if(v(n)||m(n))return me.has(s);var a=ve[s];return!!a&&!v(t.value)&&!m(t.value)&&a(d(t.value)?t.value.map(String):[String(t.value)],d(n)?n.map(String):[String(n)])}))}var ye=T("[SessionRecording]");class be{constructor(t,e,r,i,n,s){this.Ya=null,this.Ka=Ct,this._instance=t,this.Ua=e,this.Wa=r,this.$a=i,this.Qa=n,this.tu=s}onRemoteConfig(t){this.Ya=y(t.sampleRate)?t.sampleRate:null,"any"===t.triggerMatchType?(this.eu=new mt([this.Wa,this.Ua]),this.Ka=_t):(this.eu=new gt([this.Wa,this.Ua]),this.Ka=Ct),this._instance.register_for_session({[Z]:t.triggerMatchType}),this.Ua.onConfig(t),this.Wa.onConfig(t),this.$a.onConfig(t,((t,e)=>{this.Qa("linked_flag_matched",{flag:t,variant:e})}))}getStatus(t){return this.Ka({receivedFlags:!0,isRecordingEnabled:!0,isSampled:t.isSampled,rrwebError:t.rrwebError,urlTriggerMatching:t.urlTriggerMatching,eventTriggerMatching:t.eventTriggerMatching,linkedFlagMatching:t.linkedFlagMatching,sessionId:t.sessionId})}getMinimumDuration(t){var e=this._instance.get_property("$session_recording_remote_config"),r=null==e?void 0:e.minimumDurationMilliseconds;return y(r)?r:null}checkUrlTriggers(t,e,r,i){this.Ua.checkUrlTriggerConditions(e,r,i,t)}setupEventTriggerListeners(t,e,r){if(0!==this.Wa.Ba.length&&g(this.ru))return this.ru=t((t=>{try{this.Wa.checkEventTriggerConditions(t.event,r,e)}catch(t){ye.error("Could not activate event trigger",t)}})),this.ru}makeSamplingDecisions(t){var e,r=this.Ya;if(y(r)){var i=this._instance.get_property(P),n=i===t||!1!==i&&null,s="string"==typeof i&&i!==t||!b(n),a=s?ce(t,r):n;s&&(a?this.Qa("sampled"):ye.warn("Sample rate ("+r+") has determined that this sessionId ("+t+") will not be sent to the server.")),null==(e=this._instance.persistence)||e.register({[P]:!!a&&t})}else{var o;null==(o=this._instance.persistence)||o.unregister(P)}}onFlushComplete(){}clearConditionalRecordingPersistence(){var t,e,r,i;null==(t=this._instance.persistence)||t.unregister(z),null==(e=this._instance.persistence)||e.unregister(W),null==(r=this._instance.persistence)||r.unregister(P),null==(i=this._instance.persistence)||i.unregister(U)}updateActiveTriggers(t){}hasPendingTriggers(t){var e;return(null==(e=this.eu)?void 0:e.triggerStatus(t))===ft}stop(){var t;null==(t=this.ru)||t.call(this),this.ru=void 0,this.Wa.stop(),this.Ua.stop(),this.$a.stop()}}class we{constructor(t,e,r,i){this.iu=[],this.nu=new Map,this.su=!1,this._instance=t,this.Ua=e,this.Qa=r,this.au=i}onRemoteConfig(t){t.triggerGroups&&0!==t.triggerGroups.length?(this.ou(t.triggerGroups),this._instance.register_for_session({[Z]:"v2_trigger_groups",$sdk_debug_replay_trigger_groups_count:t.triggerGroups.length}),this.Ua.onConfig(t)):ye.warn("[V2Strategy] No trigger groups configured")}getStatus(t){return function(t){if(t.rrwebError)return ht;if(t.urlTriggerMatching.urlBlocked)return lt;var e=t.triggerGroupMatchers,r=t.triggerGroupSamplingResults;if(0===e.length)return st;var i=!1,n=!1;for(var s of e){var a=s.triggerStatus(t.sessionId);if(a===ct){var o=s.group.id,u=r.get(o);v(u)?M.warn("[V2 Triggers] Group activated but no sampling decision found",{groupId:o}):!0===u&&(n=!0)}else a===ft&&(i=!0)}return n?at:i?ut:st}({isSampled:t.isSampled,rrwebError:t.rrwebError,urlTriggerMatching:t.urlTriggerMatching,eventTriggerMatching:t.eventTriggerMatching,linkedFlagMatching:t.linkedFlagMatching,sessionId:t.sessionId,triggerGroupMatchers:this.iu,triggerGroupSamplingResults:this.nu,minimumDuration:this.getMinimumDuration(t.sessionId)})}getMinimumDuration(t){var e=null;for(var r of this.iu)if("trigger_activated"===r.triggerStatus(t)){var i=r.group.minDurationMs;y(i)&&(m(e)||e>i)&&(e=i)}return e}checkUrlTriggers(t,e,r,i){var n=this;this.Ua.checkUrlBlocklist(e,r);var s=function(i){i.checkUrlTriggerConditions(e,r,(e=>{n.uu(i,void 0)&&(i.activateTrigger(e,t),n.updateActiveTriggers(t))}),t)};for(var a of this.iu)s(a)}setupEventTriggerListeners(t,e,r){var i=this;return this.ru=t((t=>{var r;if(this.su)return ye.info("[SessionRecorder] Stopping trigger checks - initial buffer flushed"),null==(r=this.ru)||r.call(this),void(this.ru=void 0);try{var n=function(r){r.checkEventTriggerConditions(t.event,(n=>{if(i.uu(r,t.properties)){var s=(r.group.conditions.events||[]).filter((e=>e.name===t.event)),a=i._instance.get_property(V);s.some((e=>!e.properties||0===e.properties.length||ge(e.properties,t.properties,a)))&&(r.activateTrigger(n,e),i.updateActiveTriggers(e))}}),e)};for(var s of this.iu)n(s)}catch(t){ye.error("Could not activate event trigger for trigger groups",t)}})),this.ru}makeSamplingDecisions(t){for(var e of this.iu){var r,i=e.group,n=i.id,s=i.sampleRate,a=H+n,o=this._instance.get_property(a),u=o===t||!1!==o&&null,l="string"==typeof o&&o!==t||!b(u),h=l?ce(t+n,s):u;l&&this.au("triggerGroupSamplingDecisionMade",{group_id:n,group_name:i.name,sampleRate:s,isSampled:h}),this.nu.set(n,h),null==(r=this._instance.persistence)||r.register({[a]:!!h&&t})}this.updateActiveTriggers(t)}onFlushComplete(){this.su=!0}clearConditionalRecordingPersistence(){var t,e;for(var r of(null==(t=this._instance.persistence)||t.unregister(P),null==(e=this._instance.persistence)||e.unregister(U),this.iu)){var i,n,s,a=r.group.id;null==(i=this._instance.persistence)||i.unregister(j+a),null==(n=this._instance.persistence)||n.unregister(q+a),null==(s=this._instance.persistence)||s.unregister(H+a)}}updateActiveTriggers(t){var e=[];for(var r of this.iu){var i=r.group,n=i.id,s="trigger_activated"===r.triggerStatus(t),a=!0===this.nu.get(n);s&&e.push({id:n,name:i.name,matched:!0,sampled:a})}this._instance.register_for_session({$sdk_debug_replay_matched_recording_trigger_groups:e})}hasPendingTriggers(t){for(var e of this.iu)if(e.triggerStatus(t)===ft)return!0;return!1}stop(){var t;null==(t=this.ru)||t.call(this),this.ru=void 0,this.iu.forEach((t=>t.stop())),this.iu=[],this.nu.clear(),this.Ua.stop()}uu(t,e){var r=t.group.conditions.properties;return!r||0===r.length||ge(r,e,this._instance.get_property(V))}ou(t){var e=this;this.iu.forEach((t=>t.stop())),this.iu=[],this.nu.clear();var r=function(t){var r=new It(e._instance,t,((r,i)=>{e.Qa("linked_flag_matched",{flag:r,variant:i,group_id:t.id,group_name:t.name})}));e.iu.push(r)};for(var i of t)r(i)}}function ke(t){return f(t)?t.network_timing:t}var Se,Ie="[SessionRecording]",_e=T(Ie),Ce=[1,2,3,4,5,6,7,12],Me=t=>({rrwebMethod:t,enqueuedAt:Date.now(),attempt:1});function Te(){var t;return null==i||null==(t=i.__PosthogExtensions__)?void 0:t.rrweb}function xe(){var t;return null==(t=Te())?void 0:t.record}function Re(t){return function(t,e){for(var r="",i=0;t.length>i;){var n=t[i++];r+=String.fromCharCode(n)}return r}(function(t,e){void 0===e&&(e={});var r=ne(),i=t.length;r.p(t);var n=se(t,e,ue(e),8),s=n.length;return oe(n,e),ae(n,s-8,r.d()),ae(n,s-4,i),n}(function(t,e){var r=t.length;if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(t);for(var i=new xt(t.length+(t.length>>>1)),n=0,s=function(t){i[n++]=t},a=0;r>a;++a){if(n+5>i.length){var o=new xt(n+8+(r-a<<1));o.set(i),i=o}var u=t.charCodeAt(a);128>u?s(u):2048>u?(s(192|u>>>6),s(128|63&u)):u>55295&&57344>u?(s(240|(u=65536+(1047552&u)|1023&t.charCodeAt(++a))>>>18),s(128|u>>>12&63),s(128|u>>>6&63),s(128|63&u)):(s(224|u>>>12),s(128|u>>>6&63),s(128|63&u))}return Vt(i,0,n)}(JSON.stringify(t))))}function Oe(t){return d(t)&&0===t.length?Se=null!=Se?Se:Re([]):Re(t)}function Ae(t,e){return t.type===o.Custom&&t.data.tag===e}function Le(t){return Ae(t,"sessionIdle")}function Fe(t){return Ae(t,"$session_ending")}function Ne(t){return Ae(t,"$session_starting")}function Ee(t,e){if(void 0===e&&(e=6606028.8),t.size>=e&&t.data.length>1){var r=Math.floor(t.data.length/2),i=t.sizes.slice(0,r),n=t.sizes.slice(r);return[Ee({size:i.reduce(((t,e)=>t+e),0),data:t.data.slice(0,r),sizes:i,sessionId:t.sessionId,windowId:t.windowId}),Ee({size:n.reduce(((t,e)=>t+e),0),data:t.data.slice(r),sizes:n,sessionId:t.sessionId,windowId:t.windowId})].flatMap((t=>t))}return[t]}class De{get sessionId(){return this.di}get lu(){if(!this._instance.sessionManager)throw new Error(Ie+" must be started with a valid sessionManager.");return this._instance.sessionManager}get hu(){return this._instance.config.session_recording.session_idle_threshold_ms||3e5}get du(){var t=this._instance.get_property(P);return!0===t?null:!1!==t&&(p(t)?t===this.sessionId:null)}get Ya(){var t,e=null==(t=this.ea)?void 0:t.sampleRate;return y(e)?e:null}get cu(){var t,e;return null!==(t=null==(e=this.fu)?void 0:e.getMinimumDuration(this.sessionId))&&void 0!==t?t:null}constructor(t){this.vu="/s/",this._forceAllowLocalhostNetworkCapture=!1,this.pu=void 0,this.mu=Date.now(),this.gu=!1,this.yu=[],this.bu="unknown",this.wu=!1,this.ku=!1,this.Su=[],this.Iu=void 0,this.ru=void 0,this._u=void 0,this.Cu=void 0,this.Mu=void 0,this.Tu=void 0,this.ti=(t,e,r)=>{var i,n;if(r&&(t!==this.di||e!==this.ci)){var s,a,o=!r.noSessionId&&(r.activityTimeout||r.sessionPastMaximumLength),u=this.di,l=this.ci;o&&this.au("$session_ending",{currentSessionId:u,currentWindowId:l,nextSessionId:t,nextWindowId:e,changeReason:r,lastActivityTimestamp:this.mu,flushed_size:null==(s=this.xu)?void 0:s.currentTrackedSize}),this.xu&&this.xu.reset(),null==(i=this._instance.persistence)||i.unregister(G),this.ku=!1,null==(n=Te())||null==n.resetMaxDepthState||n.resetMaxDepthState(),this.au("$session_id_change",{sessionId:t,windowId:e,changeReason:r}),this.Ru(),!0===this.bu&&(this.bu="unknown",this.stop(),this.start("session_id_changed")),o&&this.au("$session_starting",{previousSessionId:u,previousWindowId:l,nextSessionId:t,nextWindowId:e,changeReason:r,lastActivityTimestamp:this.mu}),y(this.Ya)&&g(this.Mu)&&(null==(a=this.fu)||a.makeSamplingDecisions(t))}},this.Ou=()=>{var t;return(null==(t=this._instance.persistence)?void 0:t.props[U])===this.di},this.Au=()=>{var t,e;if(0===this.M.data.length)return null;var r=null==(t=this.M.data[0])?void 0:t.timestamp,i=null==(e=this.M.data[this.M.data.length-1])?void 0:e.timestamp;return y(r)&&y(i)?i-r:null},this.Lu=()=>{var t,e,r=this.cu;if(!y(r))return!1;if(null===(t=null==(e=this._instance.config.session_recording)?void 0:e.strictMinimumDuration)||void 0===t||!t){var i=this.Fu;return y(i)&&i>=0&&r>i}if(this.Ou())return!1;var n,s=this.Au();return!!m(s)||r>s||(null==(n=this._instance.persistence)||n.register({[U]:this.di}),!1)},this.Nu=()=>{this.status!==ut?this.Eu():this.Du()},this.Bu=()=>{this.au("browser offline",{})},this.Pu=()=>{this.au("browser online",{})},this.At=()=>{null!=r&&r.visibilityState&&this.au("window "+r.visibilityState,{})},this._instance=t;var{sessionId:e,windowId:i}=this.lu.checkAndGetSessionAndWindowId();this.di=e,this.ci=i,this.$a=new kt(this._instance),this.Ua=new wt(this._instance),this.Wa=new St(this._instance),this.M=this.Du(),this.lu.sessionTimeoutMs>this.hu||_e.warn("session_idle_threshold_ms ("+this.hu+") is greater than the session timeout ("+this.lu.sessionTimeoutMs+"). Session will never be detected as idle"),this.xu=new de(this._instance)}get Uu(){var t,e,r,i,n,s,a,o=null==(t=this.ea)?void 0:t.masking,u={maskAllInputs:null==(e=this._instance.config.session_recording)?void 0:e.maskAllInputs,maskTextSelector:null==(r=this._instance.config.session_recording)?void 0:r.maskTextSelector,blockSelector:null==(i=this._instance.config.session_recording)?void 0:i.blockSelector},l=null!==(n=null==u?void 0:u.maskAllInputs)&&void 0!==n?n:null==o?void 0:o.maskAllInputs,h=null!==(s=null==u?void 0:u.maskTextSelector)&&void 0!==s?s:null==o?void 0:o.maskTextSelector,d=null!==(a=null==u?void 0:u.blockSelector)&&void 0!==a?a:null==o?void 0:o.blockSelector;return v(l)&&v(h)&&v(d)?void 0:{maskAllInputs:null==l||l,maskTextSelector:h,blockSelector:d}}get Wu(){var t,e,r,i,n,s,a,o=this._instance.config.session_recording.captureCanvas,u=null==(t=this.ea)?void 0:t.canvasRecording,l=null!==(e=null!==(r=null==o?void 0:o.recordCanvas)&&void 0!==r?r:null==u?void 0:u.enabled)&&void 0!==e&&e,h=null!==(i=null!==(n=null==o?void 0:o.canvasFps)&&void 0!==n?n:null==u?void 0:u.fps)&&void 0!==i?i:4,d=null!==(s=null!==(a=null==o?void 0:o.canvasQuality)&&void 0!==a?a:null==u?void 0:u.quality)&&void 0!==s?s:.4;if("string"==typeof d){var c=parseFloat(d);d=isNaN(c)?.4:c}return{enabled:l,fps:k(h,0,12,T("canvas recording fps"),4),quality:k(d,0,1,T("canvas recording quality"),.4)}}get $u(){var t,e=!(null==(t=this.ea)||!t.consoleLogRecordingEnabled),r=this._instance.config.enable_recording_console_log;return null!=r?r:e}get zu(){var t,e,r,i=null==(t=this.ea)?void 0:t.networkPayloadCapture,n={recordHeaders:null==(e=this._instance.config.session_recording)?void 0:e.recordHeaders,recordBody:null==(r=this._instance.config.session_recording)?void 0:r.recordBody},s=(null==n?void 0:n.recordHeaders)||(null==i?void 0:i.recordHeaders),a=(null==n?void 0:n.recordBody)||(null==i?void 0:i.recordBody),o=ke(this._instance.config.capture_performance),u=ke(null==i?void 0:i.capturePerformance),l=!!(b(o)?o:u);return s||a||l?{recordHeaders:s,recordBody:a,recordPerformance:l}:void 0}ju(){var t,e,r=[],n=null==(t=i.__PosthogExtensions__)||null==(t=t.rrwebPlugins)?void 0:t.getRecordConsolePlugin;n&&this.$u&&r.push(n());var s,o,u,l,h,d,f,p,m,y,b,w=null==(e=i.__PosthogExtensions__)||null==(e=e.rrwebPlugins)?void 0:e.getRecordNetworkPlugin;return this.zu&&c(w)&&(!O.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?r.push(w((h={payloadSizeLimitBytes:Q.payloadSizeLimitBytes,performanceEntryTypeToObserve:[...Q.performanceEntryTypeToObserve],payloadHostDenyList:[...(o=this.zu).payloadHostDenyList||[],...Q.payloadHostDenyList]},d=!1!==(s=this._instance.config).session_recording.recordHeaders&&o.recordHeaders,f=!1!==s.session_recording.recordBody&&o.recordBody,p=!1!==s.capture_performance&&o.recordPerformance,l=Math.min(1e6,null!==(u=h.payloadSizeLimitBytes)&&void 0!==u?u:1e6),m=t=>(null!=t&&t.requestBody&&(t.requestBody=it(t.requestBody,t.requestHeaders,l,"Request")),null!=t&&t.responseBody&&(t.responseBody=it(t.responseBody,t.responseHeaders,l,"Response")),t),y=t=>{return m(((t,e)=>{var r,i=A(t.name),n=0===e.indexOf("http")?null==(r=A(e))?void 0:r.pathname:e;"/"===n&&(n="");var s=null==i?void 0:i.pathname.replace(n||"","");if(!(i&&s&&rt.some((t=>0===s.indexOf(t)))))return t})((g(r=(e=t).requestHeaders)||x(Object.keys(null!=r?r:{}),(t=>{tt.includes(t.toLowerCase())&&(r[t]=K)})),e),s.api_host));var e,r},(b=c(s.session_recording.maskNetworkRequestFn))&&c(s.session_recording.maskCapturedNetworkRequestFn)&&M.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),b&&(s.session_recording.maskCapturedNetworkRequestFn=t=>{var e=s.session_recording.maskNetworkRequestFn({url:t.name});return a({},t,{name:null==e?void 0:e.url})}),h.maskRequestFn=c(s.session_recording.maskCapturedNetworkRequestFn)?t=>{var e,r=y(t);return r&&null!==(e=null==s.session_recording.maskCapturedNetworkRequestFn?void 0:s.session_recording.maskCapturedNetworkRequestFn(r))&&void 0!==e?e:void 0}:t=>function(t){if(!v(t))return t.requestBody=nt(t.requestBody,"Request"),t.responseBody=nt(t.responseBody,"Response"),t}(y(t)),a({},Q,h,{recordHeaders:d,recordBody:f,recordPerformance:p,recordInitialRequests:p})))):_e.info("NetworkCapture not started because we are on localhost.")),r}qu(t){var e=this._instance.config.session_recording;if(e.maskCapturedNetworkRequestFn){var r,i=e.maskCapturedNetworkRequestFn({name:t});return null!==(r=null==i?void 0:i.name)&&void 0!==r?r:null==i?void 0:i.url}if(e.maskNetworkRequestFn){var n=e.maskNetworkRequestFn({url:t});return null==n?void 0:n.url}return t}Hu(t){try{return t.rrwebMethod(),!0}catch(e){return 10>this.yu.length?this.yu.push({enqueuedAt:t.enqueuedAt||Date.now(),attempt:t.attempt+1,rrwebMethod:t.rrwebMethod}):_e.warn("could not emit queued rrweb event.",e,t),!1}}au(t,e){return this.Hu(Me((()=>xe().addCustomEvent(t,e))))}Gu(){try{if(this._instance.config.capture_pageview||!t)return;var e=new URL(t.location.href),r=this.qu(e.origin+e.pathname+e.search);this.Vu!==r&&(this.Vu=r,this.au("$url_changed",{href:r}))}catch(t){}}Zu(){if(this.yu.length){var t=[...this.yu];this.yu=[],t.forEach((t=>{Date.now()-t.enqueuedAt>2e3||this.Hu(t)}))}}tu(){return this.Hu(Me((()=>xe().takeFullSnapshot())))}get Ju(){var t,e,r;return null!=(t=this.fu)&&t.hasPendingTriggers(this.sessionId)&&!["sampled","active"].includes(this.status)?6e4:null!==(e=null==(r=this._instance.config.session_recording)?void 0:r.full_snapshot_interval_millis)&&void 0!==e?e:3e5}Xu(){if(this.Yu&&clearInterval(this.Yu),!0!==this.bu){var t=this.Ju;t&&(this.Yu=setInterval((()=>{this.tu()}),t))}}Ku(){this.Ua.urlBlocked||(this.Ua.urlBlocked=!0,clearInterval(this.Yu),_e.info("recording paused due to URL blocker"),this.au("recording paused",{reason:"url blocker"}))}Qu(){this.Ua.urlBlocked&&(this.Ua.urlBlocked=!1,this.tu(),this.Xu(),this.au("recording resumed",{reason:"left blocked url"}),_e.info("recording resumed"))}th(t,e){var r;if(!this.gu&&null!=(r=this.fu)&&r.hasPendingTriggers(this.sessionId)){this.gu=!0;try{var i,n;null==(i=this._instance.persistence)||i.register({["url"===t?W:z]:this.sessionId}),null==(n=this.fu)||n.updateActiveTriggers(this.sessionId),this.Eu(),this.Qa(t+"_trigger_matched",{["url"===t?"matchedUrl":"matchedEvent"]:e})}finally{this.gu=!1}}}get isStarted(){return!!this.pu}get ea(){var t=this._instance.get_property(F);if(t){var e;try{e=f(t)?t:JSON.parse(t)}catch(t){return void _e.warn("persisted remote config for session recording is invalid and will be ignored",t)}if(!this.isStarted){var r,i,n=null!==(r=e.cache_timestamp)&&void 0!==r?r:Date.now();if(Date.now()-n>36e5)return _e.info("persisted remote config for session recording is stale and will be ignored",{cacheTimestamp:n,persistedConfig:t}),void(null==(i=this._instance.persistence)||i.unregister(F))}return e}}eh(t,e,r){this._instance.get_property(t)&&(e(),r())}start(e){var r,i,n=this.ea;if(n){var{sessionId:s,windowId:a}=this.lu.checkAndGetSessionAndWindowId();this.di=s,this.ci=a,null==(r=this._instance.persistence)||r.unregister(G),null!=n&&n.endpoint&&(this.vu=null==n?void 0:n.endpoint),this.fu=2===(null==n?void 0:n.version)&&(null==n?void 0:n.triggerGroups)&&n.triggerGroups.length>0?new we(this._instance,this.Ua,this.Qa.bind(this),this.au.bind(this)):new be(this._instance,this.Ua,this.Wa,this.$a,this.Qa.bind(this),this.tu.bind(this)),this.fu.onRemoteConfig(n),null==(i=this.ru)||i.call(this),this.ru=this.fu.setupEventTriggerListeners(this._instance.on.bind(this._instance,"eventCaptured"),this.sessionId,((t,e)=>this.th(t,e))),this.eh(N,(()=>{this.overrideSampling()}),(()=>{var t;return null==(t=this._instance.persistence)?void 0:t.unregister(N)})),this.eh(E,(()=>{this.overrideLinkedFlag()}),(()=>{var t;return null==(t=this._instance.persistence)?void 0:t.unregister(E)})),this.eh(B,(()=>{this.overrideTrigger("event")}),(()=>{var t;return null==(t=this._instance.persistence)?void 0:t.unregister(B)})),this.eh(D,(()=>{this.overrideTrigger("url")}),(()=>{var t;return null==(t=this._instance.persistence)?void 0:t.unregister(D)})),this.fu.makeSamplingDecisions(this.sessionId),this.rh(),this.wu||(R(t,"beforeunload",this.Nu),R(t,"offline",this.Bu),R(t,"online",this.Pu),R(t,"visibilitychange",this.At),this._u||(this._u=this.lu.onSessionId(this.ti)),this.Cu||(this.Cu=this.lu.on("forcedIdleReset",(()=>{this.Ru(),this.bu="unknown",this.stop(),this.Tu=this.lu.onSessionId(((t,e,r)=>{var i;null==(i=this.Tu)||i.call(this),this.Tu=void 0,this.ti(t,e,r)}))}))),g(this.Iu)&&(this.Iu=this._instance.on("eventCaptured",(t=>{try{if("$pageview"===t.event){var e=null!=t&&t.properties.$current_url?this.qu(null==t?void 0:t.properties.$current_url):"";if(!e)return;this.au("$pageview",{href:e})}}catch(t){_e.error("Could not add $pageview to rrweb session",t)}}))),this.status===ot&&this.Qa(e||"recording_initialized"))}else _e.info("remote config must be stored in persistence before recording can start")}ih(){var e,r,i,n,s,a,o,u,l;null==t||t.removeEventListener("beforeunload",this.Nu),null==t||t.removeEventListener("offline",this.Bu),null==t||t.removeEventListener("online",this.Pu),null==t||t.removeEventListener("visibilitychange",this.At),clearInterval(this.Yu),this.nh(),null==(e=this.Iu)||e.call(this),this.Iu=void 0,null==(r=this.ru)||r.call(this),this.ru=void 0,null==(i=this._u)||i.call(this),this._u=void 0,null==(n=this.Cu)||n.call(this),this.Cu=void 0,null==(s=this.Mu)||s.call(this),this.Mu=void 0,null==(a=this.Tu)||a.call(this),this.Tu=void 0,null==(o=this.fu)||o.stop(),null==(u=this.sh)||u.stop(),this.yu=[],null==(l=this.pu)||l.call(this),this.pu=void 0}stop(){this.Eu(),this.Du(),this.ih(),_e.info("stopped")}discard(){this.Du(),this.ih(),_e.info("discarded")}onRRwebEmit(t){var e,r,i,n,s,u,l,h;if(this._instance.sessionManager&&(this.Zu(),t&&f(t))){if(t.type===o.Meta){var d=this.qu(t.data.href);if(this.Vu=d,!d)return;t.data.href=d}else this.Gu();if(null==(e=this.fu)||e.checkUrlTriggers(this.sessionId,(()=>this.Ku()),(()=>this.Qu()),((t,e)=>this.th(t,e))),!this.Ua.urlBlocked||(c=t).type===o.Custom&&"recording paused"===c.data.tag){var c,v,p;t.type===o.FullSnapshot&&(this.Xu(),null==(v=this.sh)||v.reset(),null==(p=this._instance.persistence)||p.register_once({[G]:t.timestamp},void 0)),t.type===o.FullSnapshot&&null!=(r=this.fu)&&r.hasPendingTriggers(this.sessionId)&&this.ah();var m=this.sh?this.sh.throttleMutations(t):t;if(m){var g=function(t){var e=t;if(e&&f(e)&&6===e.type&&f(e.data)&&"rrweb/console@1"===e.data.plugin){e.data.payload.payload.length>10&&(e.data.payload.payload=e.data.payload.payload.slice(0,10),e.data.payload.payload.push("...[truncated]"));for(var r=[],i=0;e.data.payload.payload.length>i;i++)r.push(e.data.payload.payload[i]&&e.data.payload.payload[i].length>2e3?e.data.payload.payload[i].slice(0,2e3)+"...[truncated]":e.data.payload.payload[i]);return e.data.payload.payload=r,t}return t}(m),y=function(t){return Fe(t)?t.data.payload:null}(g),b=function(t){return Ne(t)?t.data.payload:null}(g);if(y||b){var w=null!=y?y:b;null!=w&&w.lastActivityTimestamp&&(g.timestamp=w.lastActivityTimestamp)}else this.oh(g);t.type===o.FullSnapshot&&(this.Su.push([this.di,t.timestamp]),this.Su.length>6&&(this.Su=this.Su.slice(-6)));var k=null!==(i=null!==(n=null==y?void 0:y.currentSessionId)&&void 0!==n?n:null==b?void 0:b.nextSessionId)&&void 0!==i?i:this.di,S=null!==(s=null!==(u=null==y?void 0:y.currentWindowId)&&void 0!==u?u:null==b?void 0:b.nextWindowId)&&void 0!==s?s:this.ci;if(!0!==this.bu||function(t){return Le(t)||Fe(t)||Ne(t)}(g)){if(Le(g)){var I=g.data.payload;I&&(g.timestamp=I.lastActivityTimestamp+I.threshold)}var{event:_,size:C}=null===(l=this._instance.config.session_recording.compress_events)||void 0===l||l?function(t){try{if(t.type===o.FullSnapshot){var e=a({},t,{data:Re(t.data),cv:"2024-10"});return{event:e,size:Tt(e)}}if(t.type===o.IncrementalSnapshot&&0===t.data.source){var r=a({},t,{cv:"2024-10",data:a({},t.data,{texts:Oe(t.data.texts),attributes:Oe(t.data.attributes),removes:Oe(t.data.removes),adds:Oe(t.data.adds)})});return{event:r,size:Tt(r)}}if(t.type===o.IncrementalSnapshot&&8===t.data.source){var i=a({},t,{cv:"2024-10",data:a({},t.data,{adds:t.data.adds?Re(t.data.adds):void 0,removes:t.data.removes?Re(t.data.removes):void 0})});return{event:i,size:Tt(i)}}}catch(t){_e.error("could not compress event - will use uncompressed event",t)}return{event:t,size:Mt(t)}}(g):{event:g,size:Mt(g)},M={$snapshot_bytes:C,$snapshot_data:_,$session_id:k,$window_id:S};g.type===o.FullSnapshot&&null!=(h=Te())&&null!=h.wasMaxDepthReached&&h.wasMaxDepthReached()&&(this.ku=!0),this.status!==st?this.uh(M):this.Du()}}}}}get status(){return this.fu?this.fu.getStatus({instance:this._instance,sessionId:this.sessionId,isSampled:this.du,rrwebError:this.wu,urlTriggerMatching:this.Ua,eventTriggerMatching:this.Wa,linkedFlagMatching:this.$a,remoteConfig:this.ea}):st}log(t,e){var r;void 0===e&&(e="log"),null==(r=this._instance.sessionRecording)||r.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:e,trace:[],payload:[JSON.stringify(t)]}},timestamp:Date.now()})}overrideLinkedFlag(){this.$a.linkedFlagSeen=!0,this.tu(),this.Qa("linked_flag_overridden")}overrideSampling(){var t;null==(t=this._instance.persistence)||t.register({[P]:this.sessionId}),this.tu(),this.Qa("sampling_overridden")}overrideTrigger(t){this.th(t)}nh(){this.lh&&(clearTimeout(this.lh),this.lh=void 0)}Eu(){this.nh();var t,e=this.Lu();return this.status===ut||this.status===lt||this.status===st||e?(this.lh=setTimeout((()=>{this.Eu()}),2e3),this.M):(this.M.data.length>0&&(Ee(this.M).forEach((t=>{var e;null==(e=this.xu)||e.trackSize(t.size),this.hh({$snapshot_bytes:t.size,$snapshot_data:t.data,$session_id:t.sessionId,$window_id:t.windowId,$lib:_,$lib_version:I})})),null==(t=this.fu)||t.onFlushComplete()),this.Du())}uh(t){var e,r=2+((null==(e=this.M)?void 0:e.data.length)||0),i=t.$session_id;this.bu||943718.4>=this.M.size+t.$snapshot_bytes+r&&this.M.sessionId===i||(this.M=this.Eu(),this.M.sessionId=i,this.M.windowId=t.$window_id),this.M.size+=t.$snapshot_bytes,this.M.data.push(t.$snapshot_data),this.M.sizes.push(t.$snapshot_bytes),this.lh||this.bu||(this.lh=setTimeout((()=>{this.Eu()}),2e3))}hh(t){this._instance.capture("$snapshot",t,{_url:this._instance.requestRouter.endpointFor("api",this.vu),_noTruncate:!0,_batchKey:"recordings",skip_client_rate_limiting:!0})}get Fu(){var t,e,r=null==(t=this.M)?void 0:t.data[(null==(e=this.M)?void 0:e.data.length)-1],{sessionStartTimestamp:i}=this.lu.checkAndGetSessionAndWindowId(!0);return r?r.timestamp-i:null}ah(){if(!this.M||0===this.M.data.length)return this.Du();for(var t=-1,e=this.M.data.length-1;e>=0;e--)if(this.M.data[e].type===o.Meta){t=e;break}return 0>t?this.Du():(this.M.data=this.M.data.slice(t),this.M.sizes=this.M.sizes.slice(t),this.M.size=this.M.sizes.reduce(((t,e)=>t+e),0),this.M)}Du(){return this.M={size:0,data:[],sizes:[],sessionId:this.di,windowId:this.ci},this.M}Qa(t,e){this._instance.register_for_session({$session_recording_start_reason:t}),_e.info(t.replace("_"," "),e),"session_id_changed"!==t&&this.au("$recording_started",a({reason:t},e))}dh(t){var e;return 3===t.type&&-1!==Ce.indexOf(null==(e=t.data)?void 0:e.source)}oh(t){var e=this.dh(t);e||this.bu||t.timestamp-this.mu>this.hu&&(this.bu=!0,clearInterval(this.Yu),this.au("sessionIdle",{eventTimestamp:t.timestamp,lastActivityTimestamp:this.mu,threshold:this.hu,bufferLength:this.M.data.length,bufferSize:this.M.size}),this.Eu());var r=!1;if(e&&(this.mu=t.timestamp,this.bu)){var i="unknown"===this.bu;this.bu=!1,i||(this.au("sessionNoLongerIdle",{reason:"user activity",type:t.type}),r=!0)}if(!this.bu){var{windowId:n,sessionId:s}=this.lu.checkAndGetSessionAndWindowId(!e,t.timestamp),a=this.di!==s,o=this.ci!==n;this.ci=n,this.di=s,a||o?(this.stop(),this.start("session_id_changed")):r&&this.Xu()}}Ru(){var t;null==(t=this.fu)||t.clearConditionalRecordingPersistence()}get sdkDebugProperties(){var t,{sessionStartTimestamp:e}=this.lu.checkAndGetSessionAndWindowId(!0);return{$recording_status:this.status,$sdk_debug_replay_internal_buffer_length:this.M.data.length,$sdk_debug_replay_internal_buffer_size:this.M.size,$sdk_debug_current_session_duration:this.Fu,$sdk_debug_session_start:e,$sdk_debug_replay_flushed_size:null==(t=this.xu)?void 0:t.currentTrackedSize,$sdk_debug_replay_full_snapshots:this.Su,$snapshot_max_depth_exceeded:this.ku,$sdk_debug_replay_rrweb_error:this.wu}}rh(){var t;if(!this.pu){var e,r,i,n={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1},s=this._instance.config.session_recording;for(var[o,u]of Object.entries(s||{}))o in n&&("maskInputOptions"===o?n.maskInputOptions=a({password:!0},u):n[o]=u);this.Wu&&this.Wu.enabled&&(n.recordCanvas=!0,n.sampling={canvas:this.Wu.fps},n.dataURLOptions={type:"image/webp",quality:this.Wu.quality}),this.Uu&&(n.maskAllInputs=null===(e=this.Uu.maskAllInputs)||void 0===e||e,n.maskTextSelector=null!==(r=this.Uu.maskTextSelector)&&void 0!==r?r:void 0,n.blockSelector=null!==(i=this.Uu.blockSelector)&&void 0!==i?i:void 0);var l=xe();if(l){this.sh=null!==(t=this.sh)&&void 0!==t?t:new le(l,{refillRate:this._instance.config.session_recording.__mutationThrottlerRefillRate,bucketSize:this._instance.config.session_recording.__mutationThrottlerBucketSize,onBlockedNode:(t,e)=>{var r="Too many mutations on node '"+t+"'. Rate limiting. This could be due to SVG animations or something similar";_e.info(r,{node:e}),this.log(Ie+" "+r,"warn")}});var h=this.ju();if(this.pu=l(a({emit:t=>{this.onRRwebEmit(t)},plugins:h},n)),!this.pu)return this.wu=!0,void _e.error("rrweb failed to start - Loss of recording data is possible. Check the browser console for rrweb errors.");this.wu=!1,this.mu=Date.now(),this.bu=b(this.bu)?this.bu:"unknown",this.tryAddCustomEvent("$remote_config_received",this.ea),this.au("$session_options",{sessionRecordingOptions:n,activePlugins:h.map((t=>null==t?void 0:t.name))}),this.au("$posthog_config",{config:this._instance.config})}else _e.error("_startRecorder was called but rrwebRecord is not available. This indicates something has gone wrong.")}}tryAddCustomEvent(t,e){return this.au(t,e)}}var Be,Pe=["type"],Ue=Object.defineProperty,We=(t,e,r)=>((t,e,r)=>e in t?Ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),$e=(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))($e||{}),ze=(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[t.CustomElement=16]="CustomElement",t))(ze||{}),je=(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))(je||{}),qe=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(qe||{}),He=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(He||{}),Ge=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(Ge||{}),Ve=(t=>(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))(Ve||{}),Ze={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},Je={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},Xe={};function Ye(t){if(Xe[t])return Xe[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in Ze?Ze[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in Je?Je[t]:void 0,a=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&a)return Xe[t]=e.prototype,e.prototype;var o=document.createElement("iframe");try{document.body.appendChild(o);var u=o.contentWindow;if(!u)return e.prototype;var l=u[t].prototype;return l?Xe[t]=l:r}catch(t){return r}finally{o.parentNode&&document.body.removeChild(o)}}var Ke={};function Qe(t,e,r){var i,n=t+"."+String(r);if(Ke[n])return Ke[n].call(e);var s=Ye(t),a=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return a?(Ke[n]=a,a.call(e)):e[r]}var tr={};function er(t,e,r){var i=t+"."+String(r);if(tr[i])return tr[i].bind(e);var n=Ye(t)[r];return"function"!=typeof n?e[r]:(tr[i]=n,n.bind(e))}function rr(){return Ye("MutationObserver").constructor}function ir(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}var nr={childNodes:t=>Qe("Node",t,"childNodes"),parentNode:t=>Qe("Node",t,"parentNode"),parentElement:t=>Qe("Node",t,"parentElement"),textContent:t=>Qe("Node",t,"textContent"),contains:(t,e)=>er("Node",t,"contains")(e),getRootNode:t=>er("Node",t,"getRootNode")(),host:t=>t&&"host"in t?Qe("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?Qe("Element",t,"shadowRoot"):null,querySelector:(t,e)=>er("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>er("Element",t,"querySelectorAll")(e),mutationObserver:rr,patch:ir};function sr(t){return t.nodeType===t.ELEMENT_NODE}function ar(t){var e=t&&"host"in t&&"mode"in t&&nr.host(t)||null;return Boolean(e&&"shadowRoot"in e&&nr.shadowRoot(e)===t)}function or(t){return"[object ShadowRoot]"==={}.toString.call(t)}function ur(t){try{var e=t.rules||t.cssRules;if(!e)return null;var r=t.href;return!r&&t.ownerNode&&(r=t.ownerNode.baseURI),(i=Array.from(e,(t=>lr(t,r))).join("")).includes(" background-clip: text;")&&!i.includes(" -webkit-background-clip: text;")&&(i=i.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),i}catch(t){return null}var i}function lr(t,e){var r;if(function(t){return"styleSheet"in t}(t)){var i;try{i=ur(t.styleSheet)||function(t){var{cssText:e}=t;if(3>e.split('"').length)return e;var 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(" ")+";"}(t)}catch(e){i=t.cssText}try{if(i&&(null==(r=t.styleSheet)?void 0:r.href))return wr(i,t.styleSheet.href)}catch(t){}return i}var n=t.cssText;return function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":")&&(n=n.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),e?wr(n,e):n}class hr{constructor(){We(this,"idNodeMap",new Map),We(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var r=null==(e=this.getMeta(t))?void 0:e.id;return null!=r?r:-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){var e=this.getId(t);if(this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t))),sr(t)){var r=nr.shadowRoot(t);r&&this.removeNodeFromMap(r),"IFRAME"===t.nodeName&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function dr(t){var{element:e,maskInputOptions:r,tagName:i,type:n,value:s,maskInputFn:a}=t,o=s||"",u=n&&cr(n);return(r[i.toLowerCase()]||u&&r[u])&&(o=a?a(o,e):"*".repeat(o.length)),o}function cr(t){return t.toLowerCase()}var fr="__rrweb_original__";function vr(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?cr(e):null}function pr(t,e){var r,i;try{i=new URL(t,null!=e?e:window.location.href)}catch(t){return null}var n=i.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(r=null==n?void 0:n[1])&&void 0!==r?r:null}var mr=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,gr=/^(?:[a-z+]+:)?\/\//i,yr=/^www\..*/i,br=/^(data:)([^,]*),(.*)/i;function wr(t,e){return(t||"").replace(mr,((t,r,i,n,s,a)=>{var o,u=i||s||a,l=r||n||"";if(!u)return t;if(gr.test(u)||yr.test(u))return"url("+l+u+l+")";if(br.test(u))return"url("+l+u+l+")";if("/"===u[0])return"url("+l+(((o=e).indexOf("//")>-1?o.split("/").slice(0,3).join("/"):o.split("/")[0]).split("?")[0]+u)+l+")";var h=e.split("/"),d=u.split("/");for(var c of(h.pop(),d))"."!==c&&(".."===c?h.pop():h.push(c));return"url("+l+h.join("/")+l+")"}))}var kr,Sr,Ir="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",_r=4096,Cr=1,Mr=new RegExp("[^a-z0-9-_:]"),Tr=-2;function xr(){return Cr++}var Rr=/^[^ \t\n\r\u000c]+/,Or=/^[, \t\n\r\u000c]+/,Ar=new WeakMap;function Lr(t,e){return e&&""!==e.trim()?Fr(t,e):e}function Fr(t,e){var r=Ar.get(t);if(r||(r=t.createElement("a"),Ar.set(t,r)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return r.setAttribute("href",e),r.href}function Nr(t,e,r,i,n,s){if(!i)return i;if("src"===r||"href"===r&&("use"!==e||"#"!==i[0])){var a=Lr(t,i);if("img"===e&&a.startsWith("data:")&&n){var o=a;return((null==s?void 0:s.type)||void 0!==(null==s?void 0:s.quality))&&(o=function(t,e,r,i){if(!t.complete||0===t.naturalWidth)return e;if(t.naturalWidth>_r||t.naturalHeight>_r)return e;try{var n=document.createElement("canvas");n.width=t.naturalWidth,n.height=t.naturalHeight;var s=n.getContext("2d");return s?(s.drawImage(t,0,0),n.toDataURL(r||"image/webp",null!=i?i:.4)):e}catch(t){return e}}(n,a,s.type,s.quality)),(null==s?void 0:s.maxBase64ImageLength)&&(u=o,o=(l=s.maxBase64ImageLength)&&u.length>l?Ir:u),o}return a}return"xlink:href"===r&&"#"!==i[0]?Lr(t,i):"background"!==r||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===r?function(t,e){if(""===e.trim())return e;var r=0;function i(t){var i,n=t.exec(e.substring(r));return n?(r+=(i=n[0]).length,i):""}for(var n=[];i(Or),e.length>r;){var s=i(Rr);if(","===s.slice(-1))s=Lr(t,s.substring(0,s.length-1)),n.push(s);else{var a="";s=Lr(t,s);for(var o=!1;;){var u=e.charAt(r);if(""===u){n.push((s+a).trim());break}if(o)")"===u&&(o=!1);else{if(","===u){r+=1,n.push((s+a).trim());break}"("===u&&(o=!0)}a+=u,r+=1}}}return n.join(", ")}(t,i):"style"===r?wr(i,Fr(t)):"object"===e&&"data"===r?Lr(t,i):i:Lr(t,i);var u,l}function Er(t,e,r){return("video"===t||"audio"===t)&&"autoplay"===e}function Dr(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!r&&Dr(nr.parentNode(t),e,r);for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;return!!r&&Dr(nr.parentNode(t),e,r)}function Br(t,e,r,i){var n;if(sr(t)){if(!nr.childNodes(n=t).length)return!1}else{if(null===nr.parentElement(t))return!1;n=nr.parentElement(t)}try{if("string"==typeof e){if(i){if(n.closest("."+e))return!0}else if(n.classList.contains(e))return!0}else if(Dr(n,e,i))return!0;if(r)if(i){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(t){}return!1}function Pr(t,e){return Array.from(t.styleSheets).find((t=>t.href===e))}function Ur(t){return null==t?"":t.toLowerCase()}var Wr=50,$r=!1,zr=!1;function jr(t,e){var{doc:r,mirror:i,blockClass:n,blockSelector:s,maskTextClass:a,maskTextSelector:o,skipChild:u=!1,inlineStylesheet:l=!0,maskInputOptions:h={},maskTextFn:d,maskInputFn:c,slimDOMOptions:f,dataURLOptions:v={},inlineImages:p=!1,recordCanvas:m=!1,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:b=5e3,onStylesheetLoad:w,stylesheetLoadTimeout:k=5e3,keepIframeSrcFn:S=(()=>!1),newlyAddedElement:I=!1,depth:_=0,maxDepth:C=Wr}=e,{needsMask:M}=e,{preserveWhiteSpace:T=!0}=e;if(_>=C)return zr=!0,$r||($r=!0,console.warn("[rrweb-snapshot] DOM tree depth exceeded max depth of "+C+". Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.")),null;M||(M=Br(t,a,o,void 0===M));var x,R=function(t,e){var{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:a,inlineStylesheet:o,maskInputOptions:u={},maskTextFn:l,maskInputFn:h,dataURLOptions:d={},inlineImages:c,recordCanvas:f,keepIframeSrcFn:v,newlyAddedElement:p=!1}=e,m=function(t,e){if(e.hasNode(t)){var r=e.getId(t);return 1===r?void 0:r}}(r,i);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:Ve.Document,childNodes:[],compatMode:t.compatMode}:{type:Ve.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:Ve.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:m};case t.ELEMENT_NODE:return function(t,e){for(var r,i,n,{doc:s,blockClass:a,blockSelector:o,inlineStylesheet:u,maskInputOptions:l={},maskInputFn:h,dataURLOptions:d={},inlineImages:c,recordCanvas:f,keepIframeSrcFn:v,newlyAddedElement:p=!1,rootId:m}=e,g=function(t,e,r){try{if("string"==typeof e){if(t.classList.contains(e))return!0}else for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;if(r)return t.matches(r)}catch(t){}return!1}(t,a,o),y=function(t){if(t instanceof HTMLFormElement)return"form";var e=cr(t.tagName);return Mr.test(e)?"div":e}(t),b={},w=t.attributes.length,k=0;w>k;k++){var S=t.attributes[k];Er(y,S.name)||(b[S.name]=Nr(s,y,cr(S.name),S.value,t,d))}if("link"===y&&u){var I=function(t){return t.href}(t);if(I){var _=Pr(s,I);!_&&I.includes(".css")&&(_=Pr(s,window.location.origin+"/"+I.replace(window.location.href,"")));var C=null;_&&(C=ur(_)),C&&(delete b.rel,delete b.href,b._cssText=C)}}if("style"===y&&t.sheet&&!(t.innerText||nr.textContent(t)||"").trim().length){var M=ur(t.sheet);M&&(b._cssText=M)}if("input"===y||"textarea"===y||"select"===y){var T=t.value,x=t.checked;"radio"!==b.type&&"checkbox"!==b.type&&"submit"!==b.type&&"button"!==b.type&&T?b.value=dr({element:t,type:vr(t),tagName:y,value:T,maskInputOptions:l,maskInputFn:h}):x&&(b.checked=x)}if("option"===y&&(t.selected&&!l.select?b.selected=!0:delete b.selected),"dialog"===y&&t.open)try{b.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"}catch(t){b.rr_open_mode="modal",b.ph_rr_could_not_detect_modal=!0}if("canvas"===y&&f)if("2d"===t.__context)(function(t){var e=t.getContext("2d");if(!e)return!0;for(var r=0;t.width>r;r+=50)for(var i=0;t.height>i;i+=50){var n=e.getImageData;if(new Uint32Array((fr in n?n[fr]:n).call(e,r,i,Math.min(50,t.width-r),Math.min(50,t.height-i)).data.buffer).some((t=>0!==t)))return!1}return!0})(t)||(b.rr_dataURL=t.toDataURL(d.type,d.quality));else if(!("__context"in t)){var R=t.toDataURL(d.type,d.quality),O=s.createElement("canvas");O.width=t.width,O.height=t.height,R!==O.toDataURL(d.type,d.quality)&&(b.rr_dataURL=R)}if("img"===y&&c){kr||(kr=s.createElement("canvas"),Sr=kr.getContext("2d"));var A=t,L=A.currentSrc||A.getAttribute("src")||"<unknown-src>",F=A.crossOrigin,N=()=>{A.removeEventListener("load",N);try{kr.width=A.naturalWidth,kr.height=A.naturalHeight,Sr.drawImage(A,0,0),b.rr_dataURL=kr.toDataURL(d.type,d.quality)}catch(t){if("anonymous"!==A.crossOrigin)return A.crossOrigin="anonymous",void(A.complete&&0!==A.naturalWidth?N():A.addEventListener("load",N));console.warn("Cannot inline img src="+L+"! Error: "+t)}"anonymous"===A.crossOrigin&&(F?b.crossOrigin=F:A.removeAttribute("crossorigin"))};A.complete&&0!==A.naturalWidth?N():A.addEventListener("load",N)}if("audio"===y||"video"===y){var E=b;E.rr_mediaState=t.paused?"paused":"played",E.rr_mediaCurrentTime=t.currentTime,E.rr_mediaPlaybackRate=t.playbackRate,E.rr_mediaMuted=t.muted,E.rr_mediaLoop=t.loop,E.rr_mediaVolume=t.volume}if(p||(t.scrollLeft&&(b.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(b.rr_scrollTop=t.scrollTop)),g){var{width:D,height:B,left:P,top:U}=t.getBoundingClientRect();b={class:b.class,rr_width:D+"px",rr_height:B+"px",rr_left:Math.floor(P+((null==(r=s.defaultView)?void 0:r.scrollX)||0))+"px",rr_top:Math.floor(U+((null==(i=s.defaultView)?void 0:i.scrollY)||0))+"px"}}"iframe"!==y||v(b.src)||(t.contentDocument||(b.rr_src=b.src),delete b.src);try{customElements.get(y)&&(n=!0)}catch(t){}return{type:Ve.Element,tagName:y,attributes:b,childNodes:[],isSVG:(W=t,Boolean("svg"===W.tagName||W.ownerSVGElement)||void 0),needBlock:g,rootId:m,isCustom:n};var W}(t,{doc:r,blockClass:n,blockSelector:s,inlineStylesheet:o,maskInputOptions:u,maskInputFn:h,dataURLOptions:d,inlineImages:c,recordCanvas:f,keepIframeSrcFn:v,newlyAddedElement:p,rootId:m});case t.TEXT_NODE:return function(t,e){var r,{needsMask:i,maskTextFn:n,rootId:s}=e,a=nr.parentNode(t),o=a&&a.tagName,u=nr.textContent(t),l="STYLE"===o||void 0,h="SCRIPT"===o||void 0;if(l&&u){try{if(t.nextSibling||t.previousSibling);else if(null==(r=a.sheet)?void 0:r.cssRules){var d=ur(a.sheet);d&&!/(?:^|[\s;{}])-?[a-zA-Z][\w-]*\s*:\s*;/.test(d)&&(u=d)}}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: "+e,t)}u=wr(u,Fr(e.doc))}return h&&(u="SCRIPT_PLACEHOLDER"),!l&&!h&&u&&i&&(u=n?n(u,nr.parentElement(t)):u.replace(/[\S]/g,"*")),{type:Ve.Text,textContent:u||"",isStyle:l,rootId:s}}(t,{doc:r,needsMask:a,maskTextFn:l,rootId:m});case t.CDATA_SECTION_NODE:return{type:Ve.CDATA,textContent:"",rootId:m};case t.COMMENT_NODE:return{type:Ve.Comment,textContent:nr.textContent(t)||"",rootId:m};default:return!1}}(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:M,inlineStylesheet:l,maskInputOptions:h,maskTextFn:d,maskInputFn:c,dataURLOptions:v,inlineImages:p,recordCanvas:m,keepIframeSrcFn:S,newlyAddedElement:I});if(!R)return console.warn(t,"not serialized"),null;x=i.hasNode(t)?i.getId(t):!function(t,e){if(e.comment&&t.type===Ve.Comment)return!0;if(t.type===Ve.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===pr(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(Ur(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Ur(t.attributes.name)||["icon","apple-touch-icon","shortcut icon"].includes(Ur(t.attributes.rel)))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&Ur(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Ur(t.attributes.property).match(/^(og|twitter|fb):/)||Ur(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===Ur(t.attributes.name)))return!0;if(e.headMetaRobots&&["robots","googlebot","bingbot"].includes(Ur(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&(["author","generator","framework","publisher","progid"].includes(Ur(t.attributes.name))||Ur(t.attributes.property).match(/^article:/)||Ur(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&["google-site-verification","yandex-verification","csrf-token","p:domain_verify","verify-v1","verification","shopify-checkout-api-token"].includes(Ur(t.attributes.name)))return!0}}return!1}(R,f)&&(T||R.type!==Ve.Text||R.isStyle||R.textContent.replace(/^\s+|\s+$/gm,"").length)?xr():Tr;var O=Object.assign(R,{id:x});if(i.add(t,O),x===Tr)return null;g&&g(t);var A=!u;if(O.type===Ve.Element){A=A&&!O.needBlock,delete O.needBlock;var L=nr.shadowRoot(t);L&&or(L)&&(O.isShadowHost=!0)}if((O.type===Ve.Document||O.type===Ve.Element)&&A){f.headWhitespace&&O.type===Ve.Element&&"head"===O.tagName&&(T=!1);var F={doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:M,maskTextClass:a,maskTextSelector:o,skipChild:u,inlineStylesheet:l,maskInputOptions:h,maskTextFn:d,maskInputFn:c,slimDOMOptions:f,dataURLOptions:v,inlineImages:p,recordCanvas:m,preserveWhiteSpace:T,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:k,keepIframeSrcFn:S,depth:_+1,maxDepth:C};if(O.type===Ve.Element&&"textarea"===O.tagName&&void 0!==O.attributes.value);else for(var N of Array.from(nr.childNodes(t))){var E=jr(N,F);E&&O.childNodes.push(E)}var D=null;if(sr(t)&&(D=nr.shadowRoot(t)))for(var B of Array.from(nr.childNodes(D))){var P=jr(B,F);P&&(or(D)&&(P.isShadow=!0),O.childNodes.push(P))}}var U=nr.parentNode(t);return U&&ar(U)&&or(U)&&(O.isShadow=!0),O.type===Ve.Element&&"iframe"===O.tagName&&function(t,e,r){var i=t.contentWindow;if(i){var n,s=!1;try{n=i.document.readyState}catch(t){return}if("complete"===n){var a="about:blank";if(i.location.href!==a||t.src===a||""===t.src)return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}else{var o=setTimeout((()=>{s||(e(),s=!0)}),r);t.addEventListener("load",(()=>{clearTimeout(o),s=!0,e()}))}}}(t,(()=>{var e=t.contentDocument;if(e&&y){var r=jr(e,{doc:e,mirror:i,blockClass:n,blockSelector:s,needsMask:M,maskTextClass:a,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:h,maskTextFn:d,maskInputFn:c,slimDOMOptions:f,dataURLOptions:v,inlineImages:p,recordCanvas:m,preserveWhiteSpace:T,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:k,keepIframeSrcFn:S,depth:_+1,maxDepth:C});r&&y(t,r)}}),b),O.type===Ve.Element&&"link"===O.tagName&&"string"==typeof O.attributes.rel&&("stylesheet"===O.attributes.rel||"preload"===O.attributes.rel&&"string"==typeof O.attributes.href&&"css"===pr(O.attributes.href))&&function(t,e,r){var i,n=!1;try{i=t.sheet}catch(t){return}if(!i){var s=setTimeout((()=>{n||(e(),n=!0)}),r);t.addEventListener("load",(()=>{clearTimeout(s),n=!0,e()}))}}(t,(()=>{if(w){var e=jr(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:M,maskTextClass:a,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:h,maskTextFn:d,maskInputFn:c,slimDOMOptions:f,dataURLOptions:v,inlineImages:p,recordCanvas:m,preserveWhiteSpace:T,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:k,keepIframeSrcFn:S,depth:_,maxDepth:C});e&&w(t,e)}}),k),O}function qr(t){return!0===t||"all"===t?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===t,headMetaDescKeywords:"all"===t,headTitleMutations:"all"===t}:!1===t?{}:t}class Hr{constructor(){We(this,"parentElement",null),We(this,"parentNode",null),We(this,"ownerDocument"),We(this,"firstChild",null),We(this,"lastChild",null),We(this,"previousSibling",null),We(this,"nextSibling",null),We(this,"ELEMENT_NODE",1),We(this,"TEXT_NODE",3),We(this,"nodeType"),We(this,"nodeName"),We(this,"RRNodeType")}get childNodes(){for(var t=[],e=this.firstChild;e;)t.push(e),e=e.nextSibling;return t}contains(t){if(!(t instanceof Hr))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,e){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}function Gr(t,e,r){void 0===r&&(r=document);var i={capture:!0,passive:!0};return r.addEventListener(t,e,i),()=>r.removeEventListener(t,e,i)}function Vr(t){try{t()}catch(t){if(!(t instanceof DOMException&&"SecurityError"===t.name))throw t}}var Zr="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",Jr={map:{},getId(){return console.error(Zr),-1},getNode(){return console.error(Zr),null},removeNodeFromMap(){console.error(Zr)},has(){return console.error(Zr),!1},reset(){console.error(Zr)}};function Xr(t,e,r){void 0===r&&(r={});var i=null,n=0;return function(){for(var s=arguments.length,a=new Array(s),o=0;s>o;o++)a[o]=arguments[o];var u=Date.now();n||!1!==r.leading||(n=u);var l=e-(u-n),h=this;0>=l||l>e?(i&&(clearTimeout(i),i=null),n=u,t.apply(h,a)):i||!1===r.trailing||(i=setTimeout((()=>{n=!1===r.leading?0:Date.now(),i=null,t.apply(h,a)}),l))}}function Yr(t,e,r,i,n){void 0===n&&(n=window);var s=n.Object.getOwnPropertyDescriptor(t,e);return n.Object.defineProperty(t,e,i?r:{set(t){setTimeout((()=>{r.set.call(this,t)}),0),s&&s.set&&s.set.call(this,t)}}),()=>Yr(t,e,s||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Jr=new Proxy(Jr,{get(t,e,r){return"map"===e&&console.error(Zr),Reflect.get(t,e,r)}}));var Kr=Date.now;function Qr(t){var e,r,i,n,s=t.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:s.documentElement.scrollLeft||(null==s?void 0:s.body)&&(null==(e=nr.parentElement(s.body))?void 0:e.scrollLeft)||(null==(r=null==s?void 0:s.body)?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==s?void 0:s.documentElement.scrollTop)||(null==s?void 0:s.body)&&(null==(i=nr.parentElement(s.body))?void 0:i.scrollTop)||(null==(n=null==s?void 0:s.body)?void 0:n.scrollTop)||0}}function ti(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ei(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ri(t){return t?t.nodeType===t.ELEMENT_NODE?t:nr.parentElement(t):null}function ii(t,e,r,i){if(!t)return!1;var n=ri(t);if(!n)return!1;try{if("string"==typeof e){if(n.classList.contains(e))return!0;if(i&&null!==n.closest("."+e))return!0}else if(Dr(n,e,i))return!0}catch(t){}if(r){if(n.matches(r))return!0;if(i&&null!==n.closest(r))return!0}return!1}function ni(t,e,r){return!("TITLE"!==t.tagName||!r.headTitleMutations)||e.getId(t)===Tr}function si(t,e){if(ar(t))return!1;var r=e.getId(t);if(!e.has(r))return!0;var i=nr.parentNode(t);return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||si(i,e))}function ai(t){return Boolean(t.changedTouches)}function oi(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function ui(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function li(t){return!!t&&(t instanceof Hr&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(nr.shadowRoot(t)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Kr=()=>(new Date).getTime());class hi{constructor(){We(this,"id",1),We(this,"styleIDMap",new WeakMap),We(this,"idStyleMap",new Map)}getId(t){var e;return null!==(e=this.styleIDMap.get(t))&&void 0!==e?e:-1}has(t){return this.styleIDMap.has(t)}add(t,e){return this.has(t)?this.getId(t):(r=void 0===e?this.id++:e,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r);var r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function di(t){var e,r=null;return"getRootNode"in t&&(null==(e=nr.getRootNode(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&nr.host(nr.getRootNode(t))&&(r=nr.host(nr.getRootNode(t))),r}function ci(t){var e=t.ownerDocument;return!!e&&(nr.contains(e,t)||function(t){var e=t.ownerDocument;if(!e)return!1;var r=function(t){for(var e,r=t;e=di(r);)r=e;return r}(t);return nr.contains(e,r)}(t))}function fi(t){return"__ln"in t}class vi{constructor(){We(this,"length",0),We(this,"head",null),We(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");for(var e=this.head,r=0;t>r;r++)e=(null==e?void 0:e.next)||null;return e}addNode(t){var e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&fi(t.previousSibling)){var r=t.previousSibling.__ln.next;e.next=r,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,r&&(r.previous=e)}else if(t.nextSibling&&fi(t.nextSibling)&&t.nextSibling.__ln.previous){var i=t.nextSibling.__ln.previous;e.previous=i,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,i&&(i.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;null===e.next&&(this.tail=e),this.length++}removeNode(t){var e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}var pi,mi=(t,e)=>t+"@"+e;class gi{constructor(){We(this,"frozen",!1),We(this,"locked",!1),We(this,"texts",[]),We(this,"attributes",[]),We(this,"attributeMap",new WeakMap),We(this,"removes",[]),We(this,"mapRemoves",[]),We(this,"movedMap",{}),We(this,"addedSet",new Set),We(this,"movedSet",new Set),We(this,"droppedSet",new Set),We(this,"removesSubTreeCache",new Set),We(this,"mutationCb"),We(this,"blockClass"),We(this,"blockSelector"),We(this,"maskTextClass"),We(this,"maskTextSelector"),We(this,"inlineStylesheet"),We(this,"maskInputOptions"),We(this,"maskTextFn"),We(this,"maskInputFn"),We(this,"keepIframeSrcFn"),We(this,"recordCanvas"),We(this,"inlineImages"),We(this,"slimDOMOptions"),We(this,"dataURLOptions"),We(this,"doc"),We(this,"mirror"),We(this,"iframeManager"),We(this,"stylesheetManager"),We(this,"shadowDomManager"),We(this,"canvasManager"),We(this,"processedNodeManager"),We(this,"unattachedDoc"),We(this,"processMutations",(t=>{t.forEach(this.processMutation),this.emit()})),We(this,"emit",(()=>{if(!this.frozen&&!this.locked){for(var t=[],e=new Set,r=new vi,i=t=>{for(var e=t,r=Tr;r===Tr;)r=(e=e&&e.nextSibling)&&this.mirror.getId(e);return r},n=n=>{var s=nr.parentNode(n);if(s&&ci(n)&&"TEXTAREA"!==s.tagName){var a=ar(s)?this.mirror.getId(di(n)):this.mirror.getId(s),o=i(n);if(-1===a||-1===o)return r.addNode(n);var u=jr(n,{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:t=>{oi(t,this.mirror)&&this.iframeManager.addIframe(t),ui(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),li(n)&&this.shadowDomManager.addShadowRoot(nr.shadowRoot(n),this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)}});u&&(t.push({parentId:a,nextId:o,node:u}),e.add(u.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var s of this.movedSet)bi(this.removesSubTreeCache,s)&&!this.movedSet.has(nr.parentNode(s))||n(s);for(var a of this.addedSet)wi(this.droppedSet,a)||bi(this.removesSubTreeCache,a)?wi(this.movedSet,a)?n(a):this.droppedSet.add(a):n(a);for(var o=null;r.length;){var u=null;if(o){var l=this.mirror.getId(nr.parentNode(o.value)),h=i(o.value);-1!==l&&-1!==h&&(u=o)}if(!u)for(var d=r.tail;d;){var c=d;if(d=d.previous,c){var f=this.mirror.getId(nr.parentNode(c.value));if(-1===i(c.value))continue;if(-1!==f){u=c;break}var v=nr.parentNode(c.value);if(v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var p=nr.host(v);if(-1!==this.mirror.getId(p)){u=c;break}}}}if(!u){for(;r.head;)r.removeNode(r.head.value);break}o=u.previous,r.removeNode(u.value),n(u.value)}var m={texts:this.texts.map((t=>{var e=t.node,r=nr.parentNode(e);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(e),value:t.value}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),attributes:this.attributes.map((t=>{var{attributes:e}=t;if("string"==typeof e.style){var r=JSON.stringify(t.styleDiff),i=JSON.stringify(t._unchangedStyles);e.style.length>r.length&&(r+i).split("var(").length===e.style.split("var(").length&&(e.style=t.styleDiff)}return{id:this.mirror.getId(t.node),attributes:e}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),removes:this.removes,adds:t};(m.texts.length||m.attributes.length||m.removes.length||m.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(m))}})),We(this,"bufferBelongsToIframe",(t=>this.doc===t.contentDocument)),We(this,"genTextAreaValueMutation",(t=>{var e=this.attributeMap.get(t);e||(this.attributes.push(e={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t,e));var r=Array.from(nr.childNodes(t),(t=>nr.textContent(t)||"")).join("");e.attributes.value=dr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:vr(t),value:r,maskInputFn:this.maskInputFn})})),We(this,"processMutation",(t=>{if(!ni(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":var e=nr.textContent(t.target);ii(t.target,this.blockClass,this.blockSelector,!1)||e===t.oldValue||this.texts.push({value:Br(t.target,this.maskTextClass,this.maskTextSelector,!0)&&e?this.maskTextFn?this.maskTextFn(e,ri(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break;case"attributes":var r=t.target,i=t.attributeName,n=t.target.getAttribute(i);if("value"===i){var s=vr(r);n=dr({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:s,value:n,maskInputFn:this.maskInputFn})}if(ii(t.target,this.blockClass,this.blockSelector,!1)||n===t.oldValue)return;var a=this.attributeMap.get(t.target);if("IFRAME"===r.tagName&&"src"===i&&!this.keepIframeSrcFn(n)){if(r.contentDocument)return;i="rr_src"}if(a||(this.attributes.push(a={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t.target,a)),"type"===i&&"INPUT"===r.tagName&&"password"===(t.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!Er(r.tagName,i))if(a.attributes[i]=Nr(this.doc,cr(r.tagName),cr(i),n,r,this.dataURLOptions),"style"===i){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}var o=this.unattachedDoc.createElement("span");for(var u of(t.oldValue&&o.setAttribute("style",t.oldValue),Array.from(r.style))){var l=r.style.getPropertyValue(u),h=r.style.getPropertyPriority(u);l!==o.style.getPropertyValue(u)||h!==o.style.getPropertyPriority(u)?a.styleDiff[u]=""===h?l:[l,h]:a._unchangedStyles[u]=[l,h]}for(var d of Array.from(o.style))""===r.style.getPropertyValue(d)&&(a.styleDiff[d]=!1)}else"open"===i&&"DIALOG"===r.tagName&&(a.attributes.rr_open_mode=r.matches("dialog:modal")?"modal":"non-modal");break;case"childList":if(ii(t.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===t.target.tagName)return void this.genTextAreaValueMutation(t.target);t.addedNodes.forEach((e=>this.genAdds(e,t.target))),t.removedNodes.forEach((e=>{var r=this.mirror.getId(e),i=ar(t.target)?this.mirror.getId(nr.host(t.target)):this.mirror.getId(t.target);ii(t.target,this.blockClass,this.blockSelector,!1)||ni(e,this.mirror,this.slimDOMOptions)||!function(t,e){return-1!==e.getId(t)}(e,this.mirror)||(this.addedSet.has(e)?(yi(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===r||si(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[mi(r,i)]?yi(this.movedSet,e):(this.removes.push({parentId:i,id:r,isShadow:!(!ar(t.target)||!or(t.target))||void 0}),function(t,e){for(var r=[t];r.length;){var i=r.pop();e.has(i)||(e.add(i),nr.childNodes(i).forEach((t=>r.push(t))))}}(e,this.removesSubTreeCache))),this.mapRemoves.push(e))}))}})),We(this,"genAdds",((t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(ni(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);var r=null;e&&this.mirror.hasNode(e)&&(r=this.mirror.getId(e)),r&&-1!==r&&(this.movedMap[mi(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ii(t,this.blockClass,this.blockSelector,!1)||(nr.childNodes(t).forEach((t=>this.genAdds(t))),li(t)&&nr.childNodes(nr.shadowRoot(t)).forEach((e=>{this.processedNodeManager.add(e,this),this.genAdds(e,t)})))}}))}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((e=>{this[e]=t[e]}))}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()}destroy(){for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}}function yi(t,e){t.delete(e),nr.childNodes(e).forEach((e=>yi(t,e)))}function bi(t,e,r){return 0!==t.size&&function(t,e,r){var i=nr.parentNode(e);return!!i&&t.has(i)}(t,e)}function wi(t,e){return 0!==t.size&&ki(t,e)}function ki(t,e){var r=nr.parentNode(e);return!!r&&(!!t.has(r)||ki(t,r))}var Si=t=>pi?function(){try{return t(...arguments)}catch(t){if(pi&&!0===pi(t))return;throw t}}:t,Ii=[];function _i(t){try{if("composedPath"in t){var e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function Ci(t,e){var r=new gi;Ii.push(r),r.init(t);var i=new(rr())(Si(r.processMutations.bind(r)));return i.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{observer:i,buffer:r}}function Mi(t){var{scrollCb:e,doc:r,mirror:i,blockClass:n,blockSelector:s,sampling:a}=t;return Gr("scroll",Si(Xr(Si((t=>{var a=_i(t);if(a&&!ii(a,n,s,!0)){var o=i.getId(a);if(a===r&&r.defaultView){var u=Qr(r.defaultView);e({id:o,x:u.left,y:u.top})}else e({id:o,x:a.scrollLeft,y:a.scrollTop})}})),a.scroll||100)),r)}var Ti=["INPUT","TEXTAREA","SELECT"],xi=new WeakMap;function Ri(t){return function t(e,r){if(Fi("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Fi("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Fi("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Fi("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var i=Array.from(e.parentRule.cssRules).indexOf(e);return r.unshift(i),t(e.parentRule,r)}if(e.parentStyleSheet){var n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);r.unshift(n)}return r}(t,[])}function Oi(t,e,r){var i,n;return t?(t.ownerNode?i=e.getId(t.ownerNode):n=r.getId(t),{styleId:n,id:i}):{}}function Ai(t,e){var r,i,n,s,{mirror:a,stylesheetManager:o}=t;s=a.getId("#document"===e.nodeName?e:nr.host(e));var u="#document"===e.nodeName?null==(r=e.defaultView)?void 0:r.Document:null==(n=null==(i=e.ownerDocument)?void 0:i.defaultView)?void 0:n.ShadowRoot,l=(null==u?void 0:u.prototype)?Object.getOwnPropertyDescriptor(null==u?void 0:u.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&u&&l?(Object.defineProperty(e,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var t;return null==(t=l.get)?void 0:t.call(this)},set(t){var e,r=null==(e=l.set)?void 0:e.call(this,t);if(null!==s&&-1!==s)try{o.adoptStyleSheets(t,s)}catch(t){}return r}}),Si((()=>{Object.defineProperty(e,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))):()=>{}}function Li(t,e){void 0===e&&(e={});var r,i,n=t.doc.defaultView;if(!n)return()=>{};if(function(t,e){var{mutationCb:r,mousemoveCb:i,mouseInteractionCb:n,scrollCb:s,viewportResizeCb:a,inputCb:o,mediaInteractionCb:u,styleSheetRuleCb:l,styleDeclarationCb:h,canvasMutationCb:d,fontCb:c,selectionCb:f,customElementCb:v}=t;t.mutationCb=function(){e.mutation&&e.mutation(...arguments),r(...arguments)},t.mousemoveCb=function(){e.mousemove&&e.mousemove(...arguments),i(...arguments)},t.mouseInteractionCb=function(){e.mouseInteraction&&e.mouseInteraction(...arguments),n(...arguments)},t.scrollCb=function(){e.scroll&&e.scroll(...arguments),s(...arguments)},t.viewportResizeCb=function(){e.viewportResize&&e.viewportResize(...arguments),a(...arguments)},t.inputCb=function(){e.input&&e.input(...arguments),o(...arguments)},t.mediaInteractionCb=function(){e.mediaInteaction&&e.mediaInteaction(...arguments),u(...arguments)},t.styleSheetRuleCb=function(){e.styleSheetRule&&e.styleSheetRule(...arguments),l(...arguments)},t.styleDeclarationCb=function(){e.styleDeclaration&&e.styleDeclaration(...arguments),h(...arguments)},t.canvasMutationCb=function(){e.canvasMutation&&e.canvasMutation(...arguments),d(...arguments)},t.fontCb=function(){e.font&&e.font(...arguments),c(...arguments)},t.selectionCb=function(){e.selection&&e.selection(...arguments),f(...arguments)},t.customElementCb=function(){e.customElement&&e.customElement(...arguments),v(...arguments)}}(t,e),t.recordDOM){var s=Ci(t,t.doc);r=s.observer,i=s.buffer}var o=function(t){var{mousemoveCb:e,sampling:r,doc:i,mirror:n}=t;if(!1===r.mousemove)return()=>{};var s,a="number"==typeof r.mousemove?r.mousemove:50,o="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,u=[],l=Xr(Si((t=>{var r=Date.now()-s;e(u.map((t=>(t.timeOffset-=r,t))),t),u=[],s=null})),o),h=Si(Xr(Si((t=>{var e=_i(t),{clientX:r,clientY:i}=ai(t)?t.changedTouches[0]:t;s||(s=Kr()),u.push({x:r,y:i,id:n.getId(e),timeOffset:Kr()-s}),l("undefined"!=typeof DragEvent&&t instanceof DragEvent?ze.Drag:t instanceof MouseEvent?ze.MouseMove:ze.TouchMove)})),a,{trailing:!1})),d=[Gr("mousemove",h,i),Gr("touchmove",h,i),Gr("drag",h,i)];return Si((()=>{d.forEach((t=>t()))}))}(t),u=function(t){var{mouseInteractionCb:e,doc:r,mirror:i,blockClass:n,blockSelector:s,sampling:o}=t;if(!1===o.mouseInteraction)return()=>{};var u=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,l=[],h=null;return Object.keys(je).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==u[t])).forEach((t=>{var o=cr(t),u=(t=>r=>{var o=_i(r);if(!ii(o,n,s,!0)){var u=null,l=t;if("pointerType"in r){switch(r.pointerType){case"mouse":u=qe.Mouse;break;case"touch":u=qe.Touch;break;case"pen":u=qe.Pen}u===qe.Touch&&(je[t]===je.MouseDown?l="TouchStart":je[t]===je.MouseUp&&(l="TouchEnd"))}else ai(r)&&(u=qe.Touch);null!==u?(h=u,(l.startsWith("Touch")&&u===qe.Touch||l.startsWith("Mouse")&&u===qe.Mouse)&&(u=null)):je[t]===je.Click&&(u=h,h=null);var d=ai(r)?r.changedTouches[0]:r;if(d){var c=i.getId(o),{clientX:f,clientY:v}=d;Si(e)(a({type:je[l],id:c,x:f,y:v},null!==u&&{pointerType:u}))}}})(t);if(window.PointerEvent)switch(je[t]){case je.MouseDown:case je.MouseUp:o=o.replace("mouse","pointer");break;case je.TouchStart:case je.TouchEnd:return}l.push(Gr(o,u,r))})),Si((()=>{l.forEach((t=>t()))}))}(t),l=Mi(t),h=function(t,e){var{viewportResizeCb:r}=t,{win:i}=e,n=-1,s=-1;return Gr("resize",Si(Xr(Si((()=>{var t=ti(),e=ei();n===t&&s===e||(r({width:Number(e),height:Number(t)}),n=t,s=e)})),200)),i)}(t,{win:n}),d=function(t){var{inputCb:e,doc:r,mirror:i,blockClass:n,blockSelector:s,ignoreClass:o,ignoreSelector:u,maskInputOptions:l,maskInputFn:h,sampling:d,userTriggeredOnInput:c}=t;function f(t){var e=_i(t),i=t.isTrusted,a=e&&e.tagName;if(e&&"OPTION"===a&&(e=nr.parentElement(e)),e&&a&&Ti.indexOf(a)>=0&&!ii(e,n,s,!0)&&!(e.classList.contains(o)||u&&e.matches(u))){var d=e.value,f=!1,p=vr(e)||"";"radio"===p||"checkbox"===p?f=e.checked:(l[a.toLowerCase()]||l[p])&&(d=dr({element:e,maskInputOptions:l,tagName:a,type:p,value:d,maskInputFn:h})),v(e,c?{text:d,isChecked:f,userTriggered:i}:{text:d,isChecked:f});var m=e.name;"radio"===p&&m&&f&&r.querySelectorAll('input[type="radio"][name="'+m+'"]').forEach((t=>{if(t!==e){var r=t.value;v(t,c?{text:r,isChecked:!f,userTriggered:!1}:{text:r,isChecked:!f})}}))}}function v(t,r){var n=xi.get(t);if(!n||n.text!==r.text||n.isChecked!==r.isChecked){xi.set(t,r);var s=i.getId(t);Si(e)(a({},r,{id:s}))}}var p=("last"===d.input?["change"]:["input","change"]).map((t=>Gr(t,Si(f),r))),m=r.defaultView;if(!m)return()=>{p.forEach((t=>t()))};var g=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value");return g&&g.set&&p.push(...[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]].map((t=>Yr(t[0],t[1],{set(){Si(f)({target:this,isTrusted:!1})}},!1,m)))),Si((()=>{p.forEach((t=>t()))}))}(t),c=function(t){var{mediaInteractionCb:e,blockClass:r,blockSelector:i,mirror:n,sampling:s,doc:a}=t,o=Si((t=>Xr(Si((s=>{var a=_i(s);if(a&&!ii(a,r,i,!0)){var{currentTime:o,volume:u,muted:l,playbackRate:h,loop:d}=a;e({type:t,id:n.getId(a),currentTime:o,volume:u,muted:l,playbackRate:h,loop:d})}})),s.media||500))),u=[Gr("play",o(Ge.Play),a),Gr("pause",o(Ge.Pause),a),Gr("seeked",o(Ge.Seeked),a),Gr("volumechange",o(Ge.VolumeChange),a),Gr("ratechange",o(Ge.RateChange),a)];return Si((()=>{u.forEach((t=>t()))}))}(t),f=()=>{},v=()=>{},p=()=>{},m=()=>{};t.recordDOM&&(f=function(t,e){var{styleSheetRuleCb:r,mirror:i,stylesheetManager:n}=t,{win:s}=e;if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};var a=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:Si(((t,e,s)=>{var[a,o]=s,{id:u,styleId:l}=Oi(e,i,n.styleMirror);return(u&&-1!==u||l&&-1!==l)&&r({id:u,styleId:l,adds:[{rule:a,index:o}]}),t.apply(e,s)}))}),s.CSSStyleSheet.prototype.addRule=function(t,e,r){return void 0===r&&(r=this.cssRules.length),s.CSSStyleSheet.prototype.insertRule.apply(this,[t+" { "+e+" }",r])};var o,u,l=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(l,{apply:Si(((t,e,s)=>{var[a]=s,{id:o,styleId:u}=Oi(e,i,n.styleMirror);return(o&&-1!==o||u&&-1!==u)&&r({id:o,styleId:u,removes:[{index:a}]}),t.apply(e,s)}))}),s.CSSStyleSheet.prototype.removeRule=function(t){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[t])},s.CSSStyleSheet.prototype.replace&&(o=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:Si(((t,e,s)=>{var[a]=s,{id:o,styleId:u}=Oi(e,i,n.styleMirror);return(o&&-1!==o||u&&-1!==u)&&r({id:o,styleId:u,replace:a}),t.apply(e,s)}))})),s.CSSStyleSheet.prototype.replaceSync&&(u=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:Si(((t,e,s)=>{var[a]=s,{id:o,styleId:u}=Oi(e,i,n.styleMirror);return(o&&-1!==o||u&&-1!==u)&&r({id:o,styleId:u,replaceSync:a}),t.apply(e,s)}))}));var h={};Ni("CSSGroupingRule")?h.CSSGroupingRule=s.CSSGroupingRule:(Ni("CSSMediaRule")&&(h.CSSMediaRule=s.CSSMediaRule),Ni("CSSConditionRule")&&(h.CSSConditionRule=s.CSSConditionRule),Ni("CSSSupportsRule")&&(h.CSSSupportsRule=s.CSSSupportsRule));var d={};return Object.entries(h).forEach((t=>{var[e,s]=t;d[e]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(d[e].insertRule,{apply:Si(((t,e,s)=>{var[a,o]=s,{id:u,styleId:l}=Oi(e.parentStyleSheet,i,n.styleMirror);return(u&&-1!==u||l&&-1!==l)&&r({id:u,styleId:l,adds:[{rule:a,index:[...Ri(e),o||0]}]}),t.apply(e,s)}))}),s.prototype.deleteRule=new Proxy(d[e].deleteRule,{apply:Si(((t,e,s)=>{var[a]=s,{id:o,styleId:u}=Oi(e.parentStyleSheet,i,n.styleMirror);return(o&&-1!==o||u&&-1!==u)&&r({id:o,styleId:u,removes:[{index:[...Ri(e),a]}]}),t.apply(e,s)}))})})),Si((()=>{s.CSSStyleSheet.prototype.insertRule=a,s.CSSStyleSheet.prototype.deleteRule=l,o&&(s.CSSStyleSheet.prototype.replace=o),u&&(s.CSSStyleSheet.prototype.replaceSync=u),Object.entries(h).forEach((t=>{var[e,r]=t;r.prototype.insertRule=d[e].insertRule,r.prototype.deleteRule=d[e].deleteRule}))}))}(t,{win:n}),v=Ai(t,t.doc),p=function(t,e){var{styleDeclarationCb:r,mirror:i,ignoreCSSAttributes:n,stylesheetManager:s}=t,{win:a}=e,o=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:Si(((t,e,a)=>{var u,[l,h,d]=a;if(n.has(l))return o.apply(e,[l,h,d]);var{id:c,styleId:f}=Oi(null==(u=e.parentRule)?void 0:u.parentStyleSheet,i,s.styleMirror);return(c&&-1!==c||f&&-1!==f)&&r({id:c,styleId:f,set:{property:l,value:h,priority:d},index:Ri(e.parentRule)}),t.apply(e,a)}))});var u=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(u,{apply:Si(((t,e,a)=>{var o,[l]=a;if(n.has(l))return u.apply(e,[l]);var{id:h,styleId:d}=Oi(null==(o=e.parentRule)?void 0:o.parentStyleSheet,i,s.styleMirror);return(h&&-1!==h||d&&-1!==d)&&r({id:h,styleId:d,remove:{property:l},index:Ri(e.parentRule)}),t.apply(e,a)}))}),Si((()=>{a.CSSStyleDeclaration.prototype.setProperty=o,a.CSSStyleDeclaration.prototype.removeProperty=u}))}(t,{win:n}),t.collectFonts&&(m=function(t){var{fontCb:e,doc:r}=t,i=r.defaultView;if(!i)return()=>{};var n=[],s=new WeakMap,a=i.FontFace;i.FontFace=function(t,e,r){var i=new a(t,e,r);return s.set(i,{family:t,buffer:"string"!=typeof e,descriptors:r,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),i};var o=ir(r.fonts,"add",(function(t){return function(r){return setTimeout(Si((()=>{var t=s.get(r);t&&(e(t),s.delete(r))})),0),t.apply(this,[r])}}));return n.push((()=>{i.FontFace=a})),n.push(o),Si((()=>{n.forEach((t=>t()))}))}(t)));var g=function(t){var{doc:e,mirror:r,blockClass:i,blockSelector:n,selectionCb:s}=t,a=!0,o=Si((()=>{var t=e.getSelection();if(!(!t||a&&(null==t?void 0:t.isCollapsed))){a=t.isCollapsed||!1;for(var o=[],u=t.rangeCount||0,l=0;u>l;l++){var h=t.getRangeAt(l),{startContainer:d,startOffset:c,endContainer:f,endOffset:v}=h;ii(d,i,n,!0)||ii(f,i,n,!0)||o.push({start:r.getId(d),startOffset:c,end:r.getId(f),endOffset:v})}s({ranges:o})}}));return o(),Gr("selectionchange",o)}(t),y=function(t){var{doc:e,customElementCb:r}=t,i=e.defaultView;return i&&i.customElements?ir(i.customElements,"define",(function(t){return function(e,i,n){try{r({define:{name:e}})}catch(t){console.warn("Custom element callback failed for "+e)}return t.apply(this,[e,i,n])}})):()=>{}}(t),b=[];for(var w of t.plugins)b.push(w.observer(w.callback,n,w.options));return Si((()=>{if(i){i.destroy(),i.reset();var t=Ii.indexOf(i);-1!==t&&Ii.splice(t,1)}null==r||r.disconnect(),o(),u(),l(),h(),d(),c(),f(),v(),p(),m(),g(),y(),b.forEach((t=>t()))}))}function Fi(t){return void 0!==window[t]}function Ni(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Ei{constructor(t){We(this,"iframeIdToRemoteIdMap",new WeakMap),We(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,r,i){var n=r||this.getIdToRemoteIdMap(t),s=i||this.getRemoteIdToIdMap(t),a=n.get(e);return a||(a=this.generateIdFn(),n.set(e,a),s.set(a,e)),a}getIds(t,e){var r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return e.map((e=>this.getId(t,e,r,i)))}getRemoteId(t,e,r){var i=r||this.getRemoteIdToIdMap(t);return"number"!=typeof e?e:i.get(e)||-1}getRemoteIds(t,e){var r=this.getRemoteIdToIdMap(t);return e.map((e=>this.getRemoteId(t,e,r)))}reset(t){if(!t)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){var e=this.iframeIdToRemoteIdMap.get(t);return e||this.iframeIdToRemoteIdMap.set(t,e=new Map),e}getRemoteIdToIdMap(t){var e=this.iframeRemoteIdToIdMap.get(t);return e||this.iframeRemoteIdToIdMap.set(t,e=new Map),e}}class Di{constructor(t){We(this,"iframes",new WeakMap),We(this,"crossOriginIframeMap",new WeakMap),We(this,"crossOriginIframeMirror",new Ei(xr)),We(this,"crossOriginIframeStyleMirror"),We(this,"crossOriginIframeRootIdMap",new WeakMap),We(this,"mirror"),We(this,"mutationCb"),We(this,"wrappedEmit"),We(this,"loadListener"),We(this,"pageHideListener"),We(this,"stylesheetManager"),We(this,"recordCrossOriginIframes"),We(this,"messageHandler"),We(this,"nestedIframeListeners",new Map),We(this,"attachedIframes",new Map),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ei(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}addPageHideListener(t){this.pageHideListener=t}removeLoadListener(){this.loadListener=void 0}trackIframeContent(t,e){var r=this.mirror.getId(t);return this.attachedIframes.set(r,{element:t,content:e}),r}attachIframe(t,e){var r,i=this.trackIframeContent(t,e);this.mutationCb({adds:[{parentId:i,nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0});var n=t.contentWindow;if(this.recordCrossOriginIframes&&n&&!this.nestedIframeListeners.has(n)){var s=this.handleMessage.bind(this);Vr((()=>{n.addEventListener("message",s),this.nestedIframeListeners.set(n,s)}))}Vr((()=>{var e;return null==(e=t.contentWindow)?void 0:e.addEventListener("pagehide",(()=>{var e;null==(e=this.pageHideListener)||e.call(this,t),t.contentDocument&&this.mirror.removeNodeFromMap(t.contentDocument),t.contentWindow&&this.crossOriginIframeMap.delete(t.contentWindow)}))})),null==(r=this.loadListener)||r.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){var e=t;if("rrweb"===e.data.type&&e.origin===e.data.origin&&t.source){var r=this.crossOriginIframeMap.get(t.source);if(r){var i=this.transformCrossOriginEvent(r,e.data.event);i&&this.wrappedEmit(i,e.data.isCheckout)}}}transformCrossOriginEvent(t,e){var r;switch(e.type){case $e.FullSnapshot:this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);var i=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(e.data.node,i),this.trackIframeContent(t,e.data.node),{timestamp:e.timestamp,type:$e.IncrementalSnapshot,data:{source:ze.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case $e.Meta:case $e.Load:case $e.DomContentLoaded:return!1;case $e.Plugin:return e;case $e.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case $e.IncrementalSnapshot:switch(e.data.source){case ze.Mutation:return e.data.adds.forEach((e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);var r=this.crossOriginIframeRootIdMap.get(t);r&&this.patchRootIdOnNode(e.node,r)})),e.data.removes.forEach((e=>{this.replaceIds(e,t,["parentId","id"])})),e.data.attributes.forEach((e=>{this.replaceIds(e,t,["id"])})),e.data.texts.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case ze.Drag:case ze.TouchMove:case ze.MouseMove:return e.data.positions.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case ze.ViewportResize:return!1;case ze.MediaInteraction:case ze.MouseInteraction:case ze.Scroll:case ze.CanvasMutation:case ze.Input:return this.replaceIds(e.data,t,["id"]),e;case ze.StyleSheetRule:case ze.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case ze.Font:return e;case ze.Selection:return e.data.ranges.forEach((e=>{this.replaceIds(e,t,["start","end"])})),e;case ze.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),null==(r=e.data.styles)||r.forEach((e=>{this.replaceStyleIds(e,t,["styleId"])})),e}}return!1}replace(t,e,r,i){for(var n of i)(Array.isArray(e[n])||"number"==typeof e[n])&&(e[n]=Array.isArray(e[n])?t.getIds(r,e[n]):t.getId(r,e[n]));return e}replaceIds(t,e,r){return this.replace(this.crossOriginIframeMirror,t,e,r)}replaceStyleIds(t,e,r){return this.replace(this.crossOriginIframeStyleMirror,t,e,r)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach((t=>{this.replaceIdOnNode(t,e)}))}patchRootIdOnNode(t,e){t.type===Ve.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach((t=>{this.patchRootIdOnNode(t,e)}))}removeIframeById(t){var e=this.attachedIframes.get(t),r=(null==e?void 0:e.element)||this.mirror.getNode(t);if(r){var i=r.contentWindow;if(i&&this.nestedIframeListeners.has(i)){var n=this.nestedIframeListeners.get(i);Vr((()=>i.removeEventListener("message",n))),this.nestedIframeListeners.delete(i)}i&&this.crossOriginIframeMap.delete(i),this.iframes.delete(r)}e&&this.attachedIframes.delete(t)}reattachIframes(){this.attachedIframes.forEach(((t,e)=>{var{content:r}=t;this.mirror.has(e)?this.mutationCb({adds:[{parentId:e,nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}):this.attachedIframes.delete(e)}))}destroy(){this.recordCrossOriginIframes&&window.removeEventListener("message",this.messageHandler),this.nestedIframeListeners.forEach(((t,e)=>{Vr((()=>e.removeEventListener("message",t)))})),this.nestedIframeListeners.clear(),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear(),this.crossOriginIframeMap=new WeakMap,this.iframes=new WeakMap,this.crossOriginIframeRootIdMap=new WeakMap}}class Bi{constructor(t){We(this,"shadowDoms",new WeakSet),We(this,"mutationCb"),We(this,"scrollCb"),We(this,"bypassOptions"),We(this,"mirror"),We(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,e){if(or(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);var{observer:r,buffer:i}=Ci(a({},this.bypassOptions,{doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push((()=>{r.disconnect(),i.destroy();var t=Ii.indexOf(i);-1!==t&&Ii.splice(t,1)})),this.restoreHandlers.push(Mi(a({},this.bypassOptions,{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout((()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(nr.host(t))),this.restoreHandlers.push(Ai({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))}),0)}}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,e){var r=this;this.restoreHandlers.push(ir(t.prototype,"attachShadow",(function(t){return function(i){var n=t.call(this,i),s=nr.shadowRoot(this);return s&&ci(this)&&r.addShadowRoot(s,e),n}})))}reset(){this.restoreHandlers.forEach((t=>{try{t()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Pi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ui="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Wi=0;64>Wi;Wi++)Ui[Pi.charCodeAt(Wi)]=Wi;var $i=new Map,zi=(t,e,r)=>{if(t&&(Hi(t,e)||"object"==typeof t)){var i=function(t,e){var r=$i.get(t);return r||$i.set(t,r=new Map),r.has(e)||r.set(e,[]),r.get(e)}(r,t.constructor.name),n=i.indexOf(t);return-1===n&&(n=i.length,i.push(t)),n}};function ji(t,e,r,i){if(t instanceof Array)return t.map((t=>ji(t,e,r,i)));if(null===t)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){var n=t.constructor.name,s=function(t){var e,r=new Uint8Array(t),i=r.length,n="";for(e=0;i>e;e+=3)n+=Pi[r[e]>>2],n+=Pi[(3&r[e])<<4|r[e+1]>>4],n+=Pi[(15&r[e+1])<<2|r[e+2]>>6],n+=Pi[63&r[e+2]];return i%3==2?n=n.substring(0,n.length-1)+"=":i%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(t);return{rr_type:n,base64:s}}if(t instanceof DataView)return{rr_type:t.constructor.name,args:[ji(t.buffer,e,r,i),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){var a=t.constructor.name,{src:o}=t;return{rr_type:a,src:o}}return t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL(i.type,i.quality)}:t instanceof ImageData?{rr_type:t.constructor.name,args:[ji(t.data,e,r,i),t.width,t.height]}:Hi(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:zi(t,e,r)}:t}var qi=(t,e,r,i)=>t.map((t=>ji(t,e,r,i))),Hi=(t,e)=>{var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((t=>"function"==typeof e[t]));return Boolean(r.find((r=>t instanceof e[r])))},Gi=["webgl","webgl2"];function Vi(t){return"nodeType"in t}function Zi(t,e,r,i){var n=[];try{if(i){var s=function(t,e,r){var i=t.GPUCanvasContext;if((null==i?void 0:i.prototype)&&"function"==typeof i.prototype.configure)return ir(i.prototype,"configure",(function(i){return function(n){var s=function(t){var{canvas:e}=t;return e&&"object"==typeof e?e:null}(this);if(!s||Vi(s)&&ii(s,e,r,!0))return i.call(this,n);Vi(s)&&!("__context"in s)&&(s.__context="webgpu");var o=function(t){var e=t.GPUTextureUsage;return e?e.COPY_SRC|e.RENDER_ATTACHMENT:null}(t);return i.call(this,null!==o&&n?a({},n,{usage:"number"==typeof n.usage?n.usage|o:o}):n)}}))}(t,e,r);s&&n.push(s)}var o=ir(t.HTMLCanvasElement.prototype,"getContext",(function(t){return function(n){for(var s=function(t){return"experimental-webgl"===t?"webgl":t}(n),a=arguments.length,o=new Array(a>1?a-1:0),u=1;a>u;u++)o[u-1]=arguments[u];if(!ii(this,e,r,!0)&&("__context"in this||(this.__context=s),i&&Gi.includes(s)))if(o[0]&&"object"==typeof o[0]){var l=o[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0});return t.apply(this,[n,...o])}}));n.push(o)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach((t=>t()))}}function Ji(t,e,r,i,n,s,a){var o=[],u=Object.getOwnPropertyNames(t),l=function(u){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))return 0;try{if("function"!=typeof t[u])return 0;var l=ir(t,u,(function(t){return function(){for(var o=arguments.length,l=new Array(o),h=0;o>h;h++)l[h]=arguments[h];var d=t.apply(this,l);if(zi(d,s,this),"tagName"in this.canvas&&!ii(this.canvas,i,n,!0)){var c=qi(l,s,this,a);r(this.canvas,{type:e,property:u,args:c})}return d}}));o.push(l)}catch(i){var h=Yr(t,u,{set(t){r(this.canvas,{type:e,property:u,args:[t],setter:!0})}});o.push(h)}};for(var h of u)l(h);return o}var Xi,Yi,Ki,Qi='(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastFingerprintMap = /* @__PURE__ */ new Map();\n const transparentBlobMap = /* @__PURE__ */ new Map();\n function fnv1aHash(buffer) {\n const view = new Uint8Array(buffer);\n let hash = 2166136261;\n for (let i2 = 0; i2 < view.length; i2++) {\n hash ^= view[i2];\n hash = hash * 16777619 | 0;\n }\n return (hash >>> 0).toString(16);\n }\n async function getTransparentBlobFor(width, height, dataURLOptions) {\n const id = `${width}-${height}`;\n if ("OffscreenCanvas" in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext("2d");\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return "";\n }\n }\n const worker = self;\n let reusableCanvas = null;\n let reusableCtx = null;\n worker.onmessage = async function(e) {\n if ("OffscreenCanvas" in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n try {\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions\n );\n if (!reusableCanvas || reusableCanvas.width !== width || reusableCanvas.height !== height) {\n reusableCanvas = new OffscreenCanvas(width, height);\n reusableCtx = reusableCanvas.getContext("2d");\n }\n reusableCtx.clearRect(0, 0, width, height);\n reusableCtx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await reusableCanvas.convertToBlob(dataURLOptions);\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const fingerprint = fnv1aHash(arrayBuffer);\n if (!lastFingerprintMap.has(id)) {\n const base642 = encode(arrayBuffer);\n if (await transparentBase64 === base642) {\n lastFingerprintMap.set(id, fingerprint);\n return worker.postMessage({ id });\n }\n lastFingerprintMap.set(id, fingerprint);\n worker.postMessage({ id, type, base64: base642, width, height });\n return;\n }\n if (lastFingerprintMap.get(id) === fingerprint)\n return worker.postMessage({ id });\n const base64 = encode(arrayBuffer);\n worker.postMessage({ id, type, base64, width, height });\n lastFingerprintMap.set(id, fingerprint);\n } catch {\n worker.postMessage({ id });\n }\n } else {\n e.data.bitmap.close();\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n//# sourceMappingURL=image-bitmap-data-url-worker-Ca9A-vl6.js.map\n',tn="undefined"!=typeof self&&self.Blob&&new Blob([Qi],{type:"text/javascript;charset=utf-8"});function en(t){var e;try{if(!(e=tn&&(self.URL||self.webkitURL).createObjectURL(tn)))throw"";var r=new Worker(e,{name:null==t?void 0:t.name});return r.addEventListener("error",(()=>{(self.URL||self.webkitURL).revokeObjectURL(e)})),r}catch(e){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Qi),{name:null==t?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class rn{constructor(t){We(this,"pendingCanvasMutations",new Map),We(this,"rafStamps",{latestId:0,invokeId:null}),We(this,"mirror"),We(this,"mutationCb"),We(this,"resetObservers"),We(this,"frozen",!1),We(this,"locked",!1),We(this,"rafIdTimestamp",null),We(this,"rafIdFlush",null),We(this,"processMutation",((t,e)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)}));var{sampling:e="all",win:r,blockClass:i,blockSelector:n,recordCanvas:s,dataURLOptions:a}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&"all"===e&&this.initCanvasMutationObserver(r,i,n,a),s&&"number"==typeof e&&this.initCanvasFPSObserver(e,r,i,n,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),null!==this.rafIdTimestamp&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),null!==this.rafIdFlush&&(cancelAnimationFrame(this.rafIdFlush),this.rafIdFlush=null)}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,e,r,i,n){var a=this;if("OffscreenCanvas"in e){var o=Zi(e,r,i,!0),u=new Map,l=new en;l.onmessage=t=>{var{id:e}=t.data;if(u.set(e,!1),"base64"in t.data){var{base64:r,type:i,width:n,height:s}=t.data;this.mutationCb({id:e,type:He["2D"],commands:[{property:"clearRect",args:[0,0,n,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0]}],displayWidth:n,displayHeight:s})}};var h,d=1e3/t,c=0,f=t=>{var o,v;c&&d>t-c||(c=t,(o=[],v=t=>{try{t.querySelectorAll("canvas").forEach((t=>{ii(t,r,i,!0)||o.push(t)})),t.querySelectorAll("*").forEach((t=>{t.shadowRoot&&v(t.shadowRoot)}))}catch(t){}},v(e.document),o).forEach(function(){var t=s((function*(t){var e,r,i=a.mirror.getId(t);if(!u.get(i)&&0!==t.width&&0!==t.height){u.set(i,!0);try{if(["webgl","webgl2"].includes(t.__context)){var s=t.getContext(t.__context);if(null==(e=null==s?void 0:s.isContextLost)?void 0:e.call(s))return void u.set(i,!1);!1===(null==(r=null==s?void 0:s.getContextAttributes())?void 0:r.preserveDrawingBuffer)&&s.clear(s.COLOR_BUFFER_BIT)}var o=t.clientWidth||t.width,h=t.clientHeight||t.height,d=yield createImageBitmap(t,{resizeWidth:o,resizeHeight:h});l.postMessage({id:i,bitmap:d,width:o,height:h,dataURLOptions:n.dataURLOptions},[d])}catch(t){u.set(i,!1)}}}));return function(e){return t.apply(this,arguments)}}())),h=requestAnimationFrame(f)};h=requestAnimationFrame(f),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}}initCanvasMutationObserver(t,e,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=Zi(t,e,r,!1),s=function(t,e,r,i,n){var s=[],a=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype),o=function(a){try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[a])return 1;var o=ir(e.CanvasRenderingContext2D.prototype,a,(function(s){return function(){for(var o=arguments.length,u=new Array(o),l=0;o>l;l++)u[l]=arguments[l];return ii(this.canvas,r,i,!0)||setTimeout((()=>{var r=qi(u,e,this,n);t(this.canvas,{type:He["2D"],property:a,args:r})}),0),s.apply(this,u)}}));s.push(o)}catch(r){var u=Yr(e.CanvasRenderingContext2D.prototype,a,{set(e){t(this.canvas,{type:He["2D"],property:a,args:[e],setter:!0})}});s.push(u)}};for(var u of a)o(u);return()=>{s.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,r,i),a=function(t,e,r,i,n){var s=[];return void 0!==e.WebGLRenderingContext&&s.push(...Ji(e.WebGLRenderingContext.prototype,He.WebGL,t,r,i,e,n)),void 0!==e.WebGL2RenderingContext&&s.push(...Ji(e.WebGL2RenderingContext.prototype,He.WebGL2,t,r,i,e,n)),()=>{s.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,r,i);this.resetObservers=()=>{n(),s(),a()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){var t=e=>{this.rafStamps.latestId=e,this.rafIdTimestamp=requestAnimationFrame(t)};this.rafIdTimestamp=requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((t,e)=>{var r=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,r)})),this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(t,e){if(!this.frozen&&!this.locked){var r=this.pendingCanvasMutations.get(t);if(r&&-1!==e){var i=r.map((t=>function(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;r[i]=t[i]}return r}(t,Pe))),{type:n}=r[0];this.mutationCb({id:e,type:n,commands:i}),this.pendingCanvasMutations.delete(t)}}}}class nn{constructor(t){We(this,"trackedLinkElements",new WeakSet),We(this,"mutationCb"),We(this,"adoptedStyleSheetCb"),We(this,"styleMirror",new hi),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){var r=this;if(0!==t.length){var i={id:e,styleIds:[]},n=[],s=function(t){var e;r.styleMirror.has(t)?e=r.styleMirror.getId(t):(e=r.styleMirror.add(t),n.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,r)=>({rule:lr(e,t.href),index:r})))})),i.styleIds.push(e)};for(var a of t)s(a);n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class sn{constructor(){We(this,"nodeMap",new WeakMap),We(this,"active",!1)}inOtherBuffer(t,e){var r=this.nodeMap.get(t);return r&&Array.from(r).some((t=>t!==e))}add(t,e){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}destroy(){}}var an=!1;try{if(2!==Array.from([1],(t=>2*t))[0]){var on=document.createElement("iframe");document.body.appendChild(on),Array.from=(null==(Be=on.contentWindow)?void 0:Be.Array.from)||Array.from,document.body.removeChild(on)}}catch(t){console.debug("Unable to override Array.from",t)}var un=new hr;function ln(t){void 0===t&&(t={});var{emit:e,checkoutEveryNms:r,checkoutEveryNth:i,blockClass:n="rr-block",blockSelector:s=null,ignoreClass:o="rr-ignore",ignoreSelector:u=null,maskTextClass:l="rr-mask",maskTextSelector:h=null,inlineStylesheet:d=!0,maskAllInputs:c,maskInputOptions:f,slimDOMOptions:v,maskInputFn:p,maskTextFn:m,hooks:g,packFn:y,sampling:b={},dataURLOptions:w={},mousemoveWait:k,recordDOM:S=!0,recordCanvas:I=!1,recordCrossOriginIframes:_=!1,recordAfter:C=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:M=!1,collectFonts:T=!1,inlineImages:x=!1,plugins:R,keepIframeSrcFn:O=(()=>!1),ignoreCSSAttributes:A=new Set([]),errorHandler:L}=t;pi=L;var F=a({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},w),N=!_||window.parent===window,E=!1;if(!N)try{window.parent.document&&(E=!1)}catch(t){E=!0}if(N&&!e)throw new Error("emit function is required");if(!N&&!E)return()=>{};void 0!==k&&void 0===b.mousemove&&(b.mousemove=k),un.reset();var D,B=!0===c?{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}:void 0!==f?f:{password:!0},P=qr(void 0!==v&&v);!function(t){void 0===t&&(t=window),"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=[].forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=[].forEach)}();var U=0,W=new Map,z=t=>{for(var e of R||[])e.eventProcessor&&(t=e.eventProcessor(t));return y&&!E&&(t=y(t)),t};Xi=(t,n)=>{var s,a=t;if(a.timestamp=Kr(),!(null==(s=Ii[0])?void 0:s.isFrozen())||a.type===$e.FullSnapshot||a.type===$e.IncrementalSnapshot&&a.data.source===ze.Mutation||Ii.forEach((t=>t.unfreeze())),N)null==e||e(z(a),n);else if(E){var o={type:"rrweb",event:z(a),origin:window.location.origin,isCheckout:n};window.parent.postMessage(o,"*")}if(a.type===$e.FullSnapshot)D=a,U=0;else if(a.type===$e.IncrementalSnapshot){if(a.data.source===ze.Mutation&&a.data.isAttachIframe)return;U++,(i&&U>=i||r&&a.timestamp-D.timestamp>r)&&Yi(!0)}};var j=t=>{if(_&&t.removes&&t.removes.length>0){var e=t.adds.length>0?new Set(t.adds.map((t=>t.node.id))):null;t.removes.forEach((t=>{var{id:r}=t;if(!e||!e.has(r)){var i=W.get(r);i&&(i(),W.delete(r)),V.removeIframeById(r)}})),function(){for(var[t,e]of W){var r=un.getNode(t);if(r)try{r.contentDocument&&r.contentDocument.defaultView||(e(),W.delete(t))}catch(r){e(),W.delete(t)}else e(),W.delete(t)}}()}Xi({type:$e.IncrementalSnapshot,data:a({source:ze.Mutation},t)})},q=t=>Xi({type:$e.IncrementalSnapshot,data:a({source:ze.Scroll},t)}),H=t=>Xi({type:$e.IncrementalSnapshot,data:a({source:ze.CanvasMutation},t)}),G=new nn({mutationCb:j,adoptedStyleSheetCb:t=>Xi({type:$e.IncrementalSnapshot,data:a({source:ze.AdoptedStyleSheet},t)})}),V=new Di({mirror:un,mutationCb:j,stylesheetManager:G,recordCrossOriginIframes:_,wrappedEmit:Xi});for(var Z of R||[])Z.getMirror&&Z.getMirror({nodeMirror:un,crossOriginIframeMirror:V.crossOriginIframeMirror,crossOriginIframeStyleMirror:V.crossOriginIframeStyleMirror});var J=new sn;Ki=new rn({recordCanvas:I,mutationCb:H,win:window,blockClass:n,blockSelector:s,mirror:un,sampling:b.canvas,dataURLOptions:F});var X=new Bi({mutationCb:j,scrollCb:q,bypassOptions:{blockClass:n,blockSelector:s,maskTextClass:l,maskTextSelector:h,inlineStylesheet:d,maskInputOptions:B,dataURLOptions:F,maskTextFn:m,maskInputFn:p,recordCanvas:I,inlineImages:x,sampling:b,slimDOMOptions:P,iframeManager:V,stylesheetManager:G,canvasManager:Ki,keepIframeSrcFn:O,processedNodeManager:J},mirror:un});Yi=function(t){if(void 0===t&&(t=!1),S){Xi({type:$e.Meta,data:{href:window.location.href,width:ei(),height:ti()}},t),G.reset(),X.init(),Ii.forEach((t=>t.lock()));var e=function(t,e){var{mirror:r=new hr,blockClass:i="rr-block",blockSelector:n=null,maskTextClass:s="rr-mask",maskTextSelector:a=null,inlineStylesheet:o=!0,inlineImages:u=!1,recordCanvas:l=!1,maskAllInputs:h=!1,maskTextFn:d,maskInputFn:c,slimDOM:f=!1,dataURLOptions:v,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:g,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:w,keepIframeSrcFn:k=(()=>!1),maxDepth:S}=e||{};return jr(t,{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:o,maskInputOptions:!0===h?{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}:!1===h?{password:!0}:h,maskTextFn:d,maskInputFn:c,slimDOMOptions:qr(f),dataURLOptions:v,inlineImages:u,recordCanvas:l,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:g,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:w,keepIframeSrcFn:k,newlyAddedElement:!1,maxDepth:S})}(document,{mirror:un,blockClass:n,blockSelector:s,maskTextClass:l,maskTextSelector:h,inlineStylesheet:d,maskAllInputs:B,maskTextFn:m,maskInputFn:p,slimDOM:P,dataURLOptions:F,recordCanvas:I,inlineImages:x,onSerialize(t){oi(t,un)&&V.addIframe(t),ui(t,un)&&G.trackLinkElement(t),li(t)&&X.addShadowRoot(nr.shadowRoot(t),document)},onIframeLoad(t,e){V.attachIframe(t,e),X.observeAttachShadow(t)},onStylesheetLoad(t,e){G.attachLinkElement(t,e)},keepIframeSrcFn:O});if(!e)return console.warn("Failed to snapshot the document");Xi({type:$e.FullSnapshot,data:{node:e,initialOffset:Qr(window)}},t),Ii.forEach((t=>t.unlock())),_&&V.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&G.adoptStyleSheets(document.adoptedStyleSheets,un.getId(document))}};try{var Y=[],K=t=>{var e;return Si(Li)({mutationCb:j,mousemoveCb:(t,e)=>Xi({type:$e.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>Xi({type:$e.IncrementalSnapshot,data:a({source:ze.MouseInteraction},t)}),scrollCb:q,viewportResizeCb:t=>Xi({type:$e.IncrementalSnapshot,data:a({source:ze.ViewportResize},t)}),inputCb:t=>Xi({type:$e.IncrementalSnapshot,data:a({source:ze.Input},t)}),mediaInteractionCb:t=>Xi({type:$e.IncrementalSnapshot,data:a({source:ze.MediaInteraction},t)}),styleSheetRuleCb:t=>Xi({type:$e.IncrementalSnapshot,data:a({source:ze.StyleSheetRule},t)}),styleDeclarationCb:t=>Xi({type:$e.IncrementalSnapshot,data:a({source:ze.StyleDeclaration},t)}),canvasMutationCb:H,fontCb:t=>Xi({type:$e.IncrementalSnapshot,data:a({source:ze.Font},t)}),selectionCb(t){Xi({type:$e.IncrementalSnapshot,data:a({source:ze.Selection},t)})},customElementCb(t){Xi({type:$e.IncrementalSnapshot,data:a({source:ze.CustomElement},t)})},blockClass:n,ignoreClass:o,ignoreSelector:u,maskTextClass:l,maskTextSelector:h,maskInputOptions:B,inlineStylesheet:d,sampling:b,recordDOM:S,recordCanvas:I,inlineImages:x,userTriggeredOnInput:M,collectFonts:T,doc:t,maskInputFn:p,maskTextFn:m,keepIframeSrcFn:O,blockSelector:s,slimDOMOptions:P,dataURLOptions:F,mirror:un,iframeManager:V,stylesheetManager:G,shadowDomManager:X,processedNodeManager:J,canvasManager:Ki,ignoreCSSAttributes:A,plugins:(null==(e=null==R?void 0:R.filter((t=>t.observer)))?void 0:e.map((t=>({observer:t.observer,options:t.options,callback:e=>Xi({type:$e.Plugin,data:{plugin:t.name,payload:e}})}))))||[]},g)};V.addLoadListener((t=>{try{var e=un.getId(t),r=K(t.contentDocument);Y.push(r),-1!==e&&W.set(e,r)}catch(t){console.warn(t)}})),V.addPageHideListener((t=>{var e=un.getId(t),r=W.get(e);r&&(r(),W.delete(e)),function(t){for(var e=Ii.length-1;e>=0;e--){var r=Ii[e];(null==r?void 0:r.bufferBelongsToIframe(t))&&(r.reset(),Ii.splice(e,1))}}(t)}));var Q=()=>{Yi(),Y.push(K(document)),an=!0};return["interactive","complete"].includes(document.readyState)?Q():(Y.push(Gr("DOMContentLoaded",(()=>{Xi({type:$e.DomContentLoaded,data:{}}),"DOMContentLoaded"===C&&Q()}))),Y.push(Gr("load",(()=>{Xi({type:$e.Load,data:{}}),"load"===C&&Q()}),window))),()=>{Y.forEach((t=>Vr(t))),J.destroy(),V.removeLoadListener(),V.destroy(),W.clear(),un.reset(),an=!1,pi=void 0}}catch(t){console.warn(t)}}ln.addCustomEvent=(t,e)=>{if(!an)throw new Error("please add custom event after start recording");Xi({type:$e.Custom,data:{tag:t,payload:e}})},ln.freezePage=()=>{Ii.forEach((t=>t.freeze()))},ln.takeFullSnapshot=t=>{if(!an)throw new Error("please take full snapshot after start recording");Yi(t)},ln.mirror=un;var hn=Object.defineProperty,dn=(t,e,r)=>((t,e,r)=>e in t?hn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r);class cn{constructor(t){dn(this,"fileName"),dn(this,"functionName"),dn(this,"lineNumber"),dn(this,"columnNumber"),this.fileName=t.fileName||"",this.functionName=t.functionName||"",this.lineNumber=t.lineNumber,this.columnNumber=t.columnNumber}toString(){var t=this.lineNumber||"",e=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+t+":"+e+")":this.fileName+":"+t+":"+e}}var fn=/(^|@)\S+:\d+/,vn=/^\s*at .*(\S+:\d+|\(native\))/m,pn=/^(eval@)?(\[native code])?$/,mn={parse(t){return t?void 0!==t.stacktrace||void 0!==t["opera#sourceloc"]?this.parseOpera(t):t.stack&&t.stack.match(vn)?this.parseV8OrIE(t):t.stack?this.parseFFOrSafari(t):[]:[]},extractLocation(t){if(-1===t.indexOf(":"))return[t];var e=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/[()]/g,""));if(!e)throw new Error("Cannot parse given url: "+t);return[e[1],e[2]||void 0,e[3]||void 0]},parseV8OrIE(t){return t.stack.split("\n").filter((function(t){return!!t.match(vn)}),this).map((function(t){t.indexOf("(eval ")>-1&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var e=t.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=e.match(/ (\((.+):(\d+):(\d+)\)$)/),i=(e=r?e.replace(r[0],""):e).split(/\s+/).slice(1),n=this.extractLocation(r?r[1]:i.pop()),s=i.join(" ")||void 0,a=["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0];return new cn({functionName:s,fileName:a,lineNumber:n[1],columnNumber:n[2]})}),this)},parseFFOrSafari(t){return t.stack.split("\n").filter((function(t){return!t.match(pn)}),this).map((function(t){if(t.indexOf(" > eval")>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===t.indexOf("@")&&-1===t.indexOf(":"))return new cn({functionName:t});var e=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=t.match(e),i=r&&r[1]?r[1]:void 0,n=this.extractLocation(t.replace(e,""));return new cn({functionName:i,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}),this)},parseOpera(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9(t){for(var e=/Line (\d+).*script (?:in )?(\S+)/i,r=t.message.split("\n"),i=[],n=2,s=r.length;s>n;n+=2){var a=e.exec(r[n]);a&&i.push(new cn({fileName:a[2],lineNumber:parseFloat(a[1])}))}return i},parseOpera10(t){for(var e=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=t.stacktrace.split("\n"),i=[],n=0,s=r.length;s>n;n+=2){var a=e.exec(r[n]);a&&i.push(new cn({functionName:a[3]||void 0,fileName:a[2],lineNumber:parseFloat(a[1])}))}return i},parseOpera11(t){return t.stack.split("\n").filter((function(t){return!!t.match(fn)&&!t.match(/^Error created at/)}),this).map((function(t){var e=t.split("@"),r=this.extractLocation(e.pop()),i=(e.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new cn({functionName:i,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})}),this)}};function gn(t){if(!t||!t.outerHTML)return"";for(var e="";t.parentElement;){var r=t.localName;if(!r)break;r=r.toLowerCase();var i=t.parentElement,n=[];if(i.children&&i.children.length>0)for(var s=0;i.children.length>s;s++){var a=i.children[s];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===r&&n.push(a)}n.length>1&&(r+=":eq("+n.indexOf(t)+")"),e=r+(e?">"+e:""),t=i}return e}function yn(t){return Array.isArray(t)}function bn(t){return"object"==typeof t&&null!==t&&!yn(t)}function wn(t,e){if(0===e)return!0;var r=Object.keys(t);for(var i of r)if(bn(t[i])&&wn(t[i],e-1))return!0;return!1}function kn(t,e){var r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,e);var i=[],n=[];return JSON.stringify(t,(function(t,e){if(i.length>0){var s=i.indexOf(this);~s?i.splice(s+1):i.push(this),~s?n.splice(s,1/0,t):n.push(t),~i.indexOf(e)&&(e=i[0]===e?"[Circular ~]":"[Circular ~."+n.slice(0,i.indexOf(e)).join(".")+"]")}else i.push(e);if(null===e)return e;if(void 0===e)return"undefined";if(bn(a=e)&&Object.keys(a).length>r.numOfKeysLimit||"function"==typeof a||bn(a)&&wn(a,r.depthOfLimit))return function(t){var e=t.toString();return r.stringLengthLimit&&e.length>r.stringLengthLimit&&(e=e.slice(0,r.stringLengthLimit)+"..."),e}(e);var a;if("bigint"==typeof e)return e.toString()+"n";if(e instanceof Event){var o={};for(var u in e){var l=e[u];o[u]=yn(l)?gn(l.length?l[0]:null):l}return o}return e instanceof Node?e instanceof HTMLElement?e?e.outerHTML:"":e.nodeName:e instanceof Error?e.stack?e.stack+"\nEnd of stack for Error object":e.name+": "+e.message:e}))}var Sn={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function In(t,e,r){var i,n=r?Object.assign({},Sn,r):Sn,s=n.logger;if(!s)return()=>{};i="string"==typeof s?e[s]:s;var a=0,o=!1,u=[];if(n.level.includes("error")){var l=e=>{var r=e.message,i=mn.parse(e.error).map((t=>t.toString())),s=[kn(r,n.stringifyOptions)];t({level:"error",trace:i,payload:s})};e.addEventListener("error",l),u.push((()=>{e.removeEventListener("error",l)}));var h=e=>{var r,i;e.reason instanceof Error?i=[kn("Uncaught (in promise) "+(r=e.reason).name+": "+r.message,n.stringifyOptions)]:(r=new Error,i=[kn("Uncaught (in promise)",n.stringifyOptions),kn(e.reason,n.stringifyOptions)]);var s=mn.parse(r).map((t=>t.toString()));t({level:"error",trace:s,payload:i})};e.addEventListener("unhandledrejection",h),u.push((()=>{e.removeEventListener("unhandledrejection",h)}))}for(var d of n.level)u.push(c(i,d));return()=>{u.forEach((t=>t()))};function c(e,r){var i=this;return e[r]?function(e,s,u){try{if(!(s in e))return()=>{};var l=e[s],h=(e=>function(){for(var s=arguments.length,u=new Array(s),l=0;s>l;l++)u[l]=arguments[l];if(e.apply(i,u),!("assert"===r&&u[0]||o)){o=!0;try{var h=mn.parse(new Error).map((t=>t.toString())).splice(1),d=("assert"===r?u.slice(1):u).map((t=>kn(t,n.stringifyOptions)));a++,n.lengthThreshold>a?t({level:r,trace:h,payload:d}):a===n.lengthThreshold&&t({level:"warn",trace:[],payload:[kn("The number of log records reached the threshold.")]})}catch(t){e("rrweb logger error:",t,...u)}finally{o=!1}}})(l);return"function"==typeof h&&(h.prototype=h.prototype||{},Object.defineProperties(h,{__rrweb_original__:{enumerable:!1,value:l}})),e[s]=h,()=>{e[s]=l}}catch(t){return()=>{}}}(e,r):()=>{}}}var _n=t=>({name:"rrweb/console@1",observer:In,options:t}),Cn=t=>t instanceof Document;function Mn(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return c(n)&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__posthog_wrapped__:{enumerable:!1,value:!0}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}function Tn(t,e){var r,i=function(t){try{return"string"==typeof t?new URL(t).hostname:"url"in t?new URL(t.url).hostname:t.hostname}catch(t){return null}}(t),n={hostname:i,isHostDenied:!1};if(null==(r=e.payloadHostDenyList)||!r.length||null==i||!i.trim().length)return n;for(var s of e.payloadHostDenyList)if(i.endsWith(s))return{hostname:i,isHostDenied:!0};return n}var xn=T("[Recorder]"),Rn=t=>"navigation"===t.entryType,On=t=>"resource"===t.entryType;function An(t,e){return!!e&&(b(e)||e[t])}function Ln(t){var{type:e,recordBody:r,headers:i,url:n}=t;function s(t){var e=Object.keys(i).find((t=>"content-type"===t.toLowerCase())),r=e&&i[e];return t.some((t=>null==r?void 0:r.includes(t)))}if(!r)return!1;if(function t(e){try{return"string"==typeof e?e.startsWith("blob:"):e instanceof URL?"blob:"===e.protocol:e instanceof Request&&t(e.url)}catch(t){return!1}}(n))return!1;if(b(r))return!0;if(d(r))return s(r);var a=r[e];return b(a)?a:s(a)}function Fn(t,e,r,i,n,s){return Nn.apply(this,arguments)}function Nn(){return Nn=s((function*(t,e,r,i,n,s){if(void 0===s&&(s=0),s>10)return xn.warn("Failed to get performance entry for request",{url:r,initiatorType:e}),null;var a=function(t,r){for(var s=t.length-1;s>=0;s-=1)if(On(a=t[s])&&a.initiatorType===e&&(v(i)||a.startTime>=i)&&(v(n)||n>=a.startTime))return t[s];var a}(t.performance.getEntriesByName(r));return a||(yield new Promise((t=>setTimeout(t,50*s))),Fn(t,e,r,i,n,s+1))})),Nn.apply(this,arguments)}function En(t){var{body:e,options:r,url:i}=t;if(g(e))return null;var{hostname:n,isHostDenied:s}=Tn(i,r);if(s)return n+" is in deny list";if(p(e))return e;if(Cn(e))return e.textContent;if(w(e))return L(e);if(f(e))try{return JSON.stringify(e)}catch(t){return"[SessionReplay] Failed to stringify response object"}return"[SessionReplay] Cannot read body of type "+toString.call(e)}var Dn=t=>!m(t)&&("navigation"===t.entryType||"resource"===t.entryType);function Bn(t){var{entry:e,method:r,status:i,networkRequest:n,isInitial:s,start:o,end:u,url:l,initiatorType:h}=t;o=e?e.startTime:o,u=e?e.responseEnd:u;var d=Math.floor(Date.now()-performance.now()),c=Math.floor(d+(o||0)),f=[a({},e?e.toJSON():{name:l},{startTime:v(o)?void 0:Math.round(o),endTime:v(u)?void 0:Math.round(u),timeOrigin:d,timestamp:c,method:r,initiatorType:h||(e?e.initiatorType:void 0),status:i,requestHeaders:n.requestHeaders,requestBody:n.requestBody,responseHeaders:n.responseHeaders,responseBody:n.responseBody,isInitial:s})];if(Dn(e))for(var p of e.serverTiming||[])f.push({timeOrigin:d,timestamp:c,startTime:Math.round(e.startTime),name:p.name,duration:p.duration,entryType:"serverTiming"});return f}var Pn=["video/","audio/"];function Un(t){return new Promise((e=>{var r=setTimeout((()=>e("[SessionReplay] Timeout while trying to read body")),500);try{t.clone().text().then((t=>e(t)),(t=>e("[SessionReplay] Failed to read body: "+t))).finally((()=>clearTimeout(r)))}catch(t){clearTimeout(r),e("[SessionReplay] Failed to read body")}}))}function Wn(){return(Wn=s((function*(t){var{r:e,options:r,url:i}=t,{hostname:n,isHostDenied:s}=Tn(i,r);return s?Promise.resolve(n+" is in deny list"):Un(e)}))).apply(this,arguments)}function $n(){return($n=s((function*(t){var{r:e,options:r,url:i}=t,n=function(t){var e,{r:r,options:i,url:n}=t;if("chunked"===r.headers.get("Transfer-Encoding"))return"Chunked Transfer-Encoding is not supported";var s=null==(e=r.headers.get("Content-Type"))?void 0:e.toLowerCase(),a=Pn.some((t=>null==s?void 0:s.startsWith(t)));if(s&&a)return"Content-Type "+s+" is not supported";var{hostname:o,isHostDenied:u}=Tn(n,i);return u?o+" is in deny list":null}({r:e,options:r,url:i});return m(n)?Un(e):Promise.resolve(n)}))).apply(this,arguments)}var zn=null;function jn(t,e,r){if(!("performance"in e))return()=>{};if(zn)return xn.warn("Network observer already initialised, doing nothing"),()=>{};var i=r?Object.assign({},Q,r):Q,n=e=>{var r=[];e.requests.forEach((t=>{var e=i.maskRequestFn(t);e&&r.push(e)})),r.length>0&&t(a({},e,{requests:r}))},o=function(t,e,r){if(r.recordInitialRequests){var i=e.performance.getEntries().filter((t=>Rn(t)||On(t)&&r.initiatorTypes.includes(t.initiatorType)));t({requests:i.flatMap((t=>Bn({entry:t,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}var n=new e.PerformanceObserver((e=>{var i=e.getEntries().filter((t=>Rn(t)||On(t)&&r.initiatorTypes.includes(t.initiatorType)&&(t=>!r.recordBody&&!r.recordHeaders||"xmlhttprequest"!==t.initiatorType&&"fetch"!==t.initiatorType)(t)));t({requests:i.flatMap((t=>Bn({entry:t,method:void 0,status:void 0,networkRequest:{}})))})})),s=PerformanceObserver.supportedEntryTypes.filter((t=>r.performanceEntryTypeToObserve.includes(t)));return n.observe({entryTypes:s}),()=>{n.disconnect()}}(n,e,i),u=()=>{},l=()=>{};return(i.recordHeaders||i.recordBody)&&(u=function(t,e,r){if(!r.initiatorTypes.includes("xmlhttprequest"))return()=>{};var i=An("request",r.recordHeaders),n=An("response",r.recordHeaders),s=Mn(e.XMLHttpRequest.prototype,"open",(s=>function(a,o,u,l,h){void 0===u&&(u=!0);var d,c,f=this,v=new Request(o),p={},m={},g=f.setRequestHeader.bind(f);f.setRequestHeader=(t,e)=>(m[t]=e,g(t,e)),i&&(p.requestHeaders=m);var y=f.send.bind(f);f.send=t=>(Ln({type:"request",headers:m,url:o,recordBody:r.recordBody})&&(p.requestBody=En({body:t,options:r,url:o})),d=e.performance.now(),y(t));var b=()=>{f.removeEventListener("readystatechange",w),f.removeEventListener("error",b),f.removeEventListener("abort",b),f.removeEventListener("timeout",b)},w=()=>{if(f.readyState===f.DONE){b(),c=e.performance.now();var i={};f.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{var e=t.split(": "),r=e.shift(),n=e.join(": ");r&&(i[r]=n)})),n&&(p.responseHeaders=i),Ln({type:"response",headers:i,url:o,recordBody:r.recordBody})&&(p.responseBody=En({body:f.response,options:r,url:o})),Fn(e,"xmlhttprequest",v.url,d,c).then((e=>{var r=Bn({entry:e,method:a,status:null==f?void 0:f.status,networkRequest:p,start:d,end:c,url:o.toString(),initiatorType:"xmlhttprequest"});t({requests:r})})).catch((()=>{}))}};f.addEventListener("readystatechange",w),f.addEventListener("error",b),f.addEventListener("abort",b),f.addEventListener("timeout",b),s.call(f,a,o.toString(),u,l,h)}));return()=>{s()}}(n,e,i),l=function(t,e,r){if(!r.initiatorTypes.includes("fetch"))return()=>{};var i=An("request",r.recordHeaders),n=An("response",r.recordHeaders),a=Mn(e,"fetch",(a=>function(){var o=s((function*(s,o){var u,l,h,d=new Request(s,o),c={};try{var f={};d.headers.forEach(((t,e)=>{f[e]=t})),i&&(c.requestHeaders=f),Ln({type:"request",headers:f,url:s,recordBody:r.recordBody})&&(c.requestBody=yield function(t){return Wn.apply(this,arguments)}({r:d,options:r,url:s})),l=e.performance.now(),u=yield a(d),h=e.performance.now();var v={};return u.headers.forEach(((t,e)=>{v[e]=t})),n&&(c.responseHeaders=v),Ln({type:"response",headers:v,url:s,recordBody:r.recordBody})&&(c.responseBody=yield function(t){return $n.apply(this,arguments)}({r:u,options:r,url:s})),u}finally{Fn(e,"fetch",d.url,l,h).then((e=>{var r,i=Bn({entry:e,method:d.method,status:null==(r=u)?void 0:r.status,networkRequest:c,start:l,end:h,url:d.url,initiatorType:"fetch"});t({requests:i})})).catch((()=>{}))}}));return function(t,e){return o.apply(this,arguments)}}()));return()=>{a()}}(n,e,i)),zn=()=>{o(),u(),l(),zn=null}}var qn=t=>({name:"rrweb/network@1",observer:jn,options:t});i.__PosthogExtensions__=i.__PosthogExtensions__||{},i.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:_n,getRecordNetworkPlugin:qn},i.__PosthogExtensions__.rrweb={record:ln,version:"v2",wasMaxDepthReached:()=>zr,resetMaxDepthState(){zr=!1,$r=!1}},i.rrweb={record:ln,version:"v2"},i.rrwebConsoleRecord={getRecordConsolePlugin:_n},i.getRecordNetworkPlugin=qn,i.__PosthogExtensions__=i.__PosthogExtensions__||{},i.__PosthogExtensions__.initSessionRecording=t=>new De(t)}();
|
|
2
2
|
//# sourceMappingURL=lazy-recorder.js.map
|