@statsig/js-client 3.20.3 → 3.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/statsig-js-client+session-replay+web-analytics.min.js +1 -1
- package/build/statsig-js-client+session-replay.min.js +1 -1
- package/build/statsig-js-client+web-analytics.min.js +1 -1
- package/build/statsig-js-client.min.js +1 -1
- package/package.json +2 -2
- package/src/EvaluationStore.js +3 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
var $Q=(e)=>Object.defineProperty(e,"__esModule",{value:!0});var $Q2=(a,b,c)=>Object.defineProperty(a,b,c);var $P=(a,b)=>Object.assign(a,b);var $A=()=>((t,r,u,l)=>{return new(u=u||Promise)(function(n,e){function i(t){try{s(l.next(t))}catch(t){e(t)}}function o(t){try{s(l.throw(t))}catch(t){e(t)}}function s(t){var e;t.done?n(t.value):((e=t.value)instanceof u?e:new u(function(t){t(e)})).then(i,o)}s((l=l.apply(t,r||[])).next())})});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).webVitals={})}(this,(function(e){"use strict";let t=-1;const n=e=>{addEventListener("pageshow",(n=>{n.persisted&&(t=n.timeStamp,e(n))}),!0)},i=(e,t,n,i)=>{let o,s;return r=>{t.value>=0&&(r||i)&&(s=t.value-(o??0),(s||void 0===o)&&(o=t.value,t.delta=s,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},o=e=>{requestAnimationFrame((()=>requestAnimationFrame((()=>e()))))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},r=()=>{const e=s();return e?.activationStart??0},c=(e,n=-1)=>{const i=s();let o="navigate";t>=0?o="back-forward-cache":i&&(document.prerendering||r()>0?o="prerender":document.wasDiscarded?o="restore":i.type&&(o=i.type.replace(/_/g,"-")));return{name:e,value:n,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:o}},a=new WeakMap;function d(e,t){return a.get(e)||a.set(e,new t),a.get(e)}class h{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}}const f=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const i=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries())}))}));return i.observe({type:e,buffered:!0,...n}),i}}catch{}},u=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let l=-1;const m=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,p=e=>{"hidden"===document.visibilityState&&l>-1&&(l="visibilitychange"===e.type?e.timeStamp:0,v())},g=()=>{addEventListener("visibilitychange",p,!0),addEventListener("prerenderingchange",p,!0)},v=()=>{removeEventListener("visibilitychange",p,!0),removeEventListener("prerenderingchange",p,!0)},y=()=>{if(l<0){const e=r(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter((t=>"hidden"===t.name&&t.startTime>e))[0]?.startTime;l=t??m(),g(),n((()=>{setTimeout((()=>{l=m(),g()}))}))}return{get firstHiddenTime(){return l}}},b=e=>{document.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},T=[1800,3e3],P=(e,t={})=>{b((()=>{const s=y();let a,d=c("FCP");const h=f("paint",(e=>{for(const t of e)"first-contentful-paint"===t.name&&(h.disconnect(),t.startTime<s.firstHiddenTime&&(d.value=Math.max(t.startTime-r(),0),d.entries.push(t),a(!0)))}));h&&(a=i(e,d,T,t.reportAllChanges),n((n=>{d=c("FCP"),a=i(e,d,T,t.reportAllChanges),o((()=>{d.value=performance.now()-n.timeStamp,a(!0)}))})))}))},E=[.1,.25];let _=0,L=1/0,M=0;const C=e=>{for(const t of e)t.interactionId&&(L=Math.min(L,t.interactionId),M=Math.max(M,t.interactionId),_=M?(M-L)/7+1:0)};let I;const w=()=>I?_:performance.interactionCount??0,F=()=>{"interactionCount"in performance||I||(I=f("event",C,{type:"event",buffered:!0,durationThreshold:0}))};let k=0;class x{u=[];l=new Map;m;p;v(){k=w(),this.u.length=0,this.l.clear()}T(){const e=Math.min(this.u.length-1,Math.floor((w()-k)/50));return this.u[e]}h(e){if(this.m?.(e),!e.interactionId&&"first-input"!==e.entryType)return;const t=this.u.at(-1);let n=this.l.get(e.interactionId);if(n||this.u.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.l.set(n.id,n),this.u.push(n)),this.u.sort(((e,t)=>t.P-e.P)),this.u.length>10){const e=this.u.splice(10);for(const t of e)this.l.delete(t.id)}this.p?.(n)}}}const A=e=>{const t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(e=u(e),document.addEventListener("visibilitychange",e,{once:!0}),t((()=>{e(),document.removeEventListener("visibilitychange",e)})))},B=[200,500];class N{m;h(e){this.m?.(e)}}const S=[2500,4e3],q=[800,1800],O=e=>{document.prerendering?b((()=>O(e))):"complete"!==document.readyState?addEventListener("load",(()=>O(e)),!0):setTimeout(e)};e.CLSThresholds=E,e.FCPThresholds=T,e.INPThresholds=B,e.LCPThresholds=S,e.TTFBThresholds=q,e.onCLS=(e,t={})=>{P(u((()=>{let s,r=c("CLS",0);const a=d(t,h),u=e=>{for(const t of e)a.h(t);a.i>r.value&&(r.value=a.i,r.entries=a.o,s())},l=f("layout-shift",u);l&&(s=i(e,r,E,t.reportAllChanges),document.addEventListener("visibilitychange",(()=>{"hidden"===document.visibilityState&&(u(l.takeRecords()),s(!0))})),n((()=>{a.i=0,r=c("CLS",0),s=i(e,r,E,t.reportAllChanges),o((()=>s()))})),setTimeout(s))})))},e.onFCP=P,e.onINP=(e,t={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&b((()=>{F();let o,s=c("INP");const r=d(t,x),a=e=>{A((()=>{for(const t of e)r.h(t);const t=r.T();t&&t.P!==s.value&&(s.value=t.P,s.entries=t.entries,o())}))},h=f("event",a,{durationThreshold:t.durationThreshold??40});o=i(e,s,B,t.reportAllChanges),h&&(h.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(()=>{"hidden"===document.visibilityState&&(a(h.takeRecords()),o(!0))})),n((()=>{r.v(),s=c("INP"),o=i(e,s,B,t.reportAllChanges)})))}))},e.onLCP=(e,t={})=>{b((()=>{const s=y();let a,h=c("LCP");const l=d(t,N),m=e=>{t.reportAllChanges||(e=e.slice(-1));for(const t of e)l.h(t),t.startTime<s.firstHiddenTime&&(h.value=Math.max(t.startTime-r(),0),h.entries=[t],a())},p=f("largest-contentful-paint",m);if(p){a=i(e,h,S,t.reportAllChanges);const s=u((()=>{m(p.takeRecords()),p.disconnect(),a(!0)}));for(const e of["keydown","click","visibilitychange"])addEventListener(e,(()=>A(s)),{capture:!0,once:!0});n((n=>{h=c("LCP"),a=i(e,h,S,t.reportAllChanges),o((()=>{h.value=performance.now()-n.timeStamp,a(!0)}))}))}}))},e.onTTFB=(e,t={})=>{let o=c("TTFB"),a=i(e,o,q,t.reportAllChanges);O((()=>{const d=s();d&&(o.value=Math.max(d.responseStart-r(),0),o.entries=[d],a(!0),n((()=>{o=c("TTFB",0),a=i(e,o,q,t.reportAllChanges),a(!0)})))}))}}));
|
|
2
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Statsig=e():t.Statsig=e()}(this,()=>{return i={1845:(t,i,e)=>{"use strict";var s;Object.defineProperty(i,"__esModule",{value:!0}),i.t=i.i=i.l=void 0;const r=e(7512);i.l=()=>{try{return"undefined"!=typeof __STATSIG__?__STATSIG__:l}catch(t){return l}},i.i=t=>(0,i.l)()[t];i.t=t=>{var e=(0,i.l)();return t?e.instances&&e.instances[t]:(e.instances&&1<Object.keys(e.instances).length&&r.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),e.firstInstance)};var n="__STATSIG__",o="undefined"!=typeof window?window:{},e=void 0!==e.g?e.g:{},a="undefined"!=typeof globalThis?globalThis:{};const l=null!=(s=null!=(s=null!=(s=o[n])?s:e[n])?s:a[n])?s:{instance:i.t};o[n]=l,e[n]=l,a[n]=l},2137:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.o=e.u=void 0;const r=i(1406);function s(t,e,i){if(i)return i(t,e);const s=e&&e.customIDs?e.customIDs:{};e=["uid:"+(null!=(i=null==e?void 0:e.userID)?i:""),"cids:"+Object.keys(s).sort((t,e)=>t.localeCompare(e)).map(t=>t+"-"+s[t]).join(","),"k:"+t];return(0,r.h)(e.join("|"))}e.u=s,e.o=function(t,e,i){return e?s(t,e,i):(0,r.h)("k:"+t)}},6427:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},694:function(t,e,i){"use strict";var r=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0}),e.Wn=e.DataAdapterCore=void 0;const l=i(7512),h=i(9122),n=i(8578),o=i(4534),u=i(3401);function c(t,e,i,s){return{source:t,data:e,receivedAt:Date.now(),stableID:i,fullUserHash:(0,n.v)(s)}}e.DataAdapterCore=class{constructor(t,e){this._=t,this.p=e,this.m=null,this.O=null,this.j="statsig.last_modified_time."+e,this.S=new s}attach(t,e,i){this.O=t,this.m=e}getDataSync(t){var t=t&&(0,n.T)(t,this.m),e=this.k(t),i=this.S.get(e,t);return i&&this.Li(i)?i:(i=this.I(e))&&this.Li(i)?(this.S.add(e,i),this.S.get(e,t)):null}setData(t,e){var e=e&&(0,n.T)(e,this.m),i=this.k(e);this.S.add(i,c("Bootstrap",t,null,e))}Li(t){return null==t.stableID||t.stableID===h.StableID.get(this.C())}D(e,i,s){return r(this,void 0,void 0,function*(){o.Storage.isReady()||(yield o.Storage.isReadyResolver());var t=null!=e?e:this.getDataSync(i),t=[this.M(t,i,s)];return null!=s&&s.timeoutMs&&t.push(new Promise(t=>setTimeout(t,s.timeoutMs)).then(()=>(l.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(t)})}A(i,s){return r(this,void 0,void 0,function*(){var t=i&&(0,n.T)(i,this.m),e=this.k(t),t=yield this.D(null,t,s);t&&this.S.add(e,Object.assign(Object.assign({},t),{source:"Prefetch"}))})}M(n,o,a){return r(this,void 0,void 0,function*(){var t=null!=(t=null==n?void 0:n.data)?t:null,e=null!=n&&this.N(n,o),e=yield this.R(t,o,a,e);if(!e)return l.Log.debug("No response returned for latest value"),null;var i=(0,u.P)(e,"has_updates","Response"),s=this.C(),s=h.StableID.get(s);let r=null;if(!0===(null==i?void 0:i.has_updates))r=c("Network",e,s,o);else{if(!t||!1!==(null==i?void 0:i.has_updates))return null;r=c("NetworkNotModified",t,s,o)}e=this.k(o);return this.S.add(e,r),this.U(e,r),r})}C(){return null!=this.O?this.O:(l.Log.error(this._+" is not attached to a Client"),"")}I(t){var e=null==(e=o.Storage.getItem)?void 0:e.call(o.Storage,t);return null!=e&&(t=(0,u.P)(e,"source","Cached Result"))?Object.assign(Object.assign({},t),{source:"Cache"}):null}U(t,e){o.Storage.setItem(t,JSON.stringify(e)),this.F(t)}F(t){var e=null!=(e=(0,o.G)(this.j))?e:{},t=(e[t]=Date.now(),a(e,10));t&&(delete e[t],o.Storage.removeItem(t)),(0,o.L)(this.j,e)}},e.Wn=c;class s{constructor(){this.K={}}get(t,e){var t=this.K[t],i=null==t?void 0:t.stableID,e=null==(e=null==e?void 0:e.customIDs)?void 0:e.stableID;return e&&i&&e!==i?(l.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):t}add(t,e){var i=a(this.K,9);i&&delete this.K[i],this.K[t]=e}merge(t){this.K=Object.assign(Object.assign({},this.K),t)}}function a(r,t){var e=Object.keys(r);return e.length<=t?null:e.reduce((t,e)=>{var i=r[t],s=r[e];return"object"==typeof i&&"object"==typeof s?s.receivedAt<i.receivedAt?e:t:s<i?e:t})}},8962:(t,o)=>{"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.Diagnostics=void 0;const s=new Map,i="start";function r(t,e,i,s){return Object.assign({key:i,action:e,step:s,timestamp:Date.now()},t)}function n(t,e){var i=null!=(i=s.get(t))?i:[];i.push(e),s.set(t,i)}function e(t,e){if(e in t)return t[e]}o.Diagnostics={q:t=>s.get(t),B:t=>{n(t,r({},i,"overall"))},V:(t,e,i)=>{n(t,r({success:e,error:e?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:i},"end","overall"))},J:(t,e)=>{n(t,r(e,i,"initialize","network_request"))},$:(t,e)=>{n(t,r(e,"end","initialize","network_request"))},W:t=>{n(t,r({},i,"initialize","process"))},H:(t,e)=>{n(t,r(e,"end","initialize","process"))},Y:t=>{s.delete(t)},X(t){if(t&&"object"==typeof t)return{code:e(t,"code"),name:e(t,"name"),message:e(t,"message")}},Z(t,e,i,s){return{success:!0===(null==t?void 0:t.ok),statusCode:null==t?void 0:t.status,sdkRegion:null==(t=null==t?void 0:t.headers)?void 0:t.get("x-statsig-region"),isDelta:!0===i.includes('"is_delta":true')||void 0,attempt:e,error:o.Diagnostics.X(s)}},tt(t,e,i,s){var r,n=o.Diagnostics.q(i);return null==n||n.length<=0?-1:(r=n[n.length-1].timestamp-n[0].timestamp,o.Diagnostics.Y(i),i=function(t,e){t={eventName:"statsig::diagnostics",user:t,value:null,metadata:e,time:Date.now()};return t}(t,{context:"initialize",markers:n.slice(),statsigOptions:s}),e.enqueue(i),r)}}},8809:function(t,e){"use strict";var i=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0}),e.et=void 0;const r=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),n="https://cloudflare-dns.com/dns-query",o=["i","e","d"],a=200;e.et=function(e){return i(this,void 0,void 0,function*(){var i=yield e(n,{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:r});if(i.ok){var t,i=yield i.arrayBuffer(),i=new Uint8Array(i);{var s=i,i=s.findIndex((t,e)=>e<a&&"="===String.fromCharCode(t)&&o.includes(String.fromCharCode(s[e-1])));if(-1===i)throw(t=new Error("Failed to parse TXT records from DNS")).name="DnsTxtParseError",t;let e="";for(let t=i-1;t<s.length;t++)e+=String.fromCharCode(s[t]);return e.split(",")}}throw(t=new Error("Failed to fetch TXT records from DNS")).name="DnsTxtFetchError",t})}},3539:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},5542:function(t,a,e){"use strict";var i=this&&this.__awaiter||$A();Object.defineProperty(a,"__esModule",{value:!0}),a.ErrorBoundary=a.EXCEPTION_ENDPOINT=void 0;const s=e(7512),l=e(5902),h=e(8e3),u=(a.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception","[Statsig] UnknownError");function c(t){return t instanceof Error?t:"string"==typeof t?new Error(t):new Error("An unknown error occurred.")}a.ErrorBoundary=class{constructor(t,e,i,s){this.O=t,this.m=e,this.nt=i,this.qn=s,this.it=new Set}wrap(s){try{const t=s;!function(t){const e=new Set;let i=Object.getPrototypeOf(t);for(;i&&i!==Object.prototype;)Object.getOwnPropertyNames(i).filter(t=>"function"==typeof(null===i||void 0===i?void 0:i[t])).forEach(t=>e.add(t)),i=Object.getPrototypeOf(i);return Array.from(e)}(t).forEach(e=>{const i=t[e];"$EB"in i||(t[e]=(...t)=>this.rt(e,()=>i.apply(s,t)),t[e].$EB=!0)})}catch(t){this.st("eb:wrap",t)}}logError(t,e){this.st(t,e)}getLastSeenErrorAndReset(){var t=this.qn;return this.qn=void 0,null!=t?t:null}attachErrorIfNoneExists(t){this.qn||(this.qn=c(t))}rt(e,t){try{var i=t();return i&&i instanceof Promise?i.catch(t=>this.st(e,t)):i}catch(t){return this.st(e,t),null}}st(n,o){try{s.Log.warn("Caught error in "+n,{error:o});i(this,void 0,void 0,function*(){var t,e=o||Error(u),i=e instanceof Error,s=i?e.name:"No Name",r=c(e);this.qn=r,this.it.has(s)||(this.it.add(s),null!=(r=null==(r=this.m)?void 0:r.networkConfig)&&r.preventAllNetworkTraffic?null!=(r=this.nt)&&r.call(this,{name:"error",error:o,tag:n}):(r=l.SDKType.lt(this.O),t=h.StatsigMetadataProvider.get(),i=i?e.stack:function(t){try{return JSON.stringify(t)}catch(t){return u}}(e),e=Object.assign({tag:n,exception:s,info:i,statsigOptions:function(t){if(!t)return{};const i={};return Object.entries(t).forEach(([t,e])=>{switch(typeof e){case"number":case"bigint":case"boolean":i[String(t)]=e;break;case"string":e.length<50?i[String(t)]=e:i[String(t)]="set";break;case"object":"environment"===t?i.environment=e:"networkConfig"===t?i.networkConfig=e:i[String(t)]=null!=e?"set":"unset"}}),i}(this.m)},Object.assign(Object.assign({},t),{sdkType:r})),yield(null!=(s=null==(i=null==(s=this.m)?void 0:s.networkConfig)?void 0:i.networkOverrideFunc)?s:fetch)(a.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this.O,"STATSIG-SDK-TYPE":String(r),"STATSIG-SDK-VERSION":String(t.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(e)}),null!=(i=this.nt)&&i.call(this,{name:"error",error:o,tag:n})))}).then(()=>{}).catch(()=>{})}catch(t){}}}},2922:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},2417:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},7770:function(t,e,i){"use strict";var s=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0}),e.EventLogger=void 0;const r=i(2137),n=i(1406),o=i(7512),a=i(7410),l=i(6830),h=i(1637),u=i(586),c=i(4534),d=i(1881),f=i(2397),v={},p={Startup:"startup",GainedFocus:"gained_focus"};class m{static ot(t){null!=(t=v[t])&&t.flush().catch(()=>{})}static ut(t){null!=(t=v[t])&&t.ct(p.GainedFocus)}constructor(t,e,i,s){this.O=t,this.nt=e,this.ht=i,this.m=s,this.dt=[],this.vt={},this.ft={},this._t=!1,this.gt=Date.now(),this.Yn=null!=(t=null==s?void 0:s.loggingEnabled)?t:!0===(null==s?void 0:s.disableLogging)?u.LoggingEnabledOption.disabled:u.LoggingEnabledOption.browserOnly,null!=s&&s.loggingEnabled&&void 0!==s.disableLogging&&o.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this.yt=null!=(e=null==s?void 0:s.loggingBufferMaxSize)?e:100;i=null==s?void 0:s.networkConfig;this.Ot=new d.UrlConfiguration(a.Endpoint.jt,null==i?void 0:i.logEventUrl,null==i?void 0:i.api,null==i?void 0:i.logEventFallbackUrls)}setLogEventCompressionMode(t){this.ht.setLogEventCompressionMode(t)}setLoggingEnabled(t){this.Yn=t}enqueue(t){this.St(t)&&(this.wt(t),this.Tt(),this.dt.length>this.yt)&&m.ot(this.O)}incrementNonExposureCount(t){var e=null!=(e=this.ft[t])?e:0;this.ft[t]=e+1}reset(){this.flush().catch(()=>{}),this.vt={}}start(){var t,e=(0,l.kt)();e&&"always"!==(null==(t=this.m)?void 0:t.loggingEnabled)||(v[this.O]=this,e||(0,f.It)(t=>{"background"===t?m.ot(this.O):"foreground"===t&&m.ut(this.O)}),this.ct(p.Startup),this.Dt())}stop(){return s(this,void 0,void 0,function*(){this.Et&&(clearInterval(this.Et),this.Et=null),delete v[this.O],yield this.flush()})}flush(){return s(this,void 0,void 0,function*(){var t;this.Mt(),0!==this.dt.length&&(t=this.dt,this.dt=[],yield this.At(t))})}Tt(){this._t||(this._t=!0,200<Date.now()-this.gt)||setTimeout(()=>m.ot(this.O),200)}St(t){if("always"!==(null==(e=this.m)?void 0:e.loggingEnabled)&&(0,l.kt)())return!1;if((0,h.xt)(t)){var e=t.user||{statsigEnvironment:void 0},e=(0,r.u)(this.O,e),i=t.metadata||{},t=[t.eventName,e,i.gate,i.config,i.ruleID,i.allocatedExperiment,i.parameterName,String(i.isExplicitParameter),i.reason].join("|"),e=this.vt[t],i=Date.now();if(e&&i-e<6e5)return!1;1e3<Object.keys(this.vt).length&&(this.vt={}),this.vt[t]=i}return!0}At(r){return s(this,void 0,void 0,function*(){var t,e;if("disabled"===this.Yn)return this.Nt(r),!1;try{var i=(0,f.Rt)()&&this.ht.isBeaconSupported()&&null==(null==(e=null==(t=this.m)?void 0:t.networkConfig)?void 0:e.networkOverrideFunc),s=(this.nt({name:"pre_logs_flushed",events:r}),i?this.Pt(r):yield this.Ct(r));return s.success?(this.nt({name:"logs_flushed",events:r}),!0):(o.Log.warn("Failed to flush events."),this.Nt(r),!1)}catch(t){return o.Log.warn("Failed to flush events."),!1}})}Ct(e){return s(this,void 0,void 0,function*(){var t=yield this.ht.post(this.Ut(e)),t=null!=(t=null==t?void 0:t.code)?t:-1;return{success:200<=t&&t<300}})}Pt(t){return{success:this.ht.beacon(this.Ut(t))}}Ut(t){return{sdkKey:this.O,data:{events:t},urlConfig:this.Ot,retries:3,isCompressable:!0,params:{[a.NetworkParam.EventCount]:String(t.length)},credentials:"same-origin"}}Nt(t){for(;500<t.length;)t.shift();var e=this.o();try{(0,c.L)(e,t)}catch(t){o.Log.warn("Unable to save failed logs to storage")}}ct(e){const i=this.o();s(this,void 0,void 0,function*(){c.Storage.isReady()||(yield c.Storage.isReadyResolver());var t=(0,c.G)(i);t&&(e===p.Startup&&c.Storage.removeItem(i),yield this.At(t))&&e===p.GainedFocus&&c.Storage.removeItem(i)}).catch(()=>{o.Log.warn("Failed to flush stored logs")})}o(){return"statsig.failed_logs."+(0,n.h)(this.O)}wt(t){t.user&&(t.user=Object.assign({},t.user),delete t.user.privateAttributes);var e={},i=this.Ft(),i=(i&&(e.statsigMetadata={currentPage:i}),Object.assign(Object.assign({},t),e));o.Log.debug("Enqueued Event:",i),this.dt.push(i)}Mt(){0!==Object.keys(this.ft).length&&(this.wt({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this.ft)}}),this.ft={})}Ft(){var t;if(!1!==(null==(t=this.m)?void 0:t.includeCurrentPageUrlWithEvents))return(0,l.Gt)()}Dt(){var t=null!=(t=null==(t=this.m)?void 0:t.loggingIntervalMs)?t:1e4;const e=setInterval(()=>{var t=v[this.O];t&&t.Et===e?m.ot(this.O):clearInterval(e)},t);this.Et=e}}e.EventLogger=m},1406:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Lt=n.Kt=n.h=void 0;const o=e(6634);n.h=e=>{let i=0;for(let t=0;t<e.length;t++){var s=e.charCodeAt(t);i=(i<<5)-i+s,i&=i}return String(i>>>0)},n.Kt=(t,e)=>(0,n.h)(JSON.stringify((0,n.Lt)(t,e)));n.Lt=(i,s)=>{if(null==i)return null;var t=Object.keys(i).sort();const r={};return t.forEach(t=>{var e=i[t];0===s||"object"!==(0,o.zt)(e)?r[t]=e:r[t]=(0,n.Lt)(e,null!=s?s-1:s)}),r}},1333:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},7512:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Log=e.LogLevel=void 0;function i(t){return t.unshift("[Statsig]"),t}e.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class s{static info(...t){s.level>=e.LogLevel.Info&&console.info(" INFO ",...i(t))}static debug(...t){s.level>=e.LogLevel.Debug&&console.debug(" DEBUG ",...i(t))}static warn(...t){s.level>=e.LogLevel.Warn&&console.warn(" WARN ",...i(t))}static error(...t){s.level>=e.LogLevel.Error&&console.error(" ERROR ",...i(t))}}(e.Log=s).level=e.LogLevel.Warn},7787:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMemoKey=e.MemoPrefix=void 0,e.MemoPrefix={Kn:"g",Ln:"c",Vn:"e",xs:"cl",$n:"l",Bn:"p"};const n=new Set([]),o=new Set(["userPersistedValues"]);e.createMemoKey=function(t,e,i){let s=t+"|"+e;if(i)for(const r of Object.keys(i)){if(o.has(r))return;n.has(r)?s+=`|${r}=true`:s+=`|${r}=`+i[r]}return s}},7410:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NetworkParam=e.NetworkDefault=e.Endpoint=void 0,e.Endpoint={qt:"initialize",jt:"rgstr",Bt:"download_config_specs"},e.NetworkDefault={[e.Endpoint.jt]:"https://prodregistryv2.org/v1",[e.Endpoint.qt]:"https://featureassets.org/v1",[e.Endpoint.Bt]:"https://api.statsigcdn.com/v1"},e.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}},7023:function(t,e,i){"use strict";var w=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0}),e.NetworkCore=void 0,i(1845);const f=i(1845),S=i(8962),I=i(7512),C=i(7410),s=i(308),v=i(3091),o=i(5902),r=i(6830),a=i(4143),l=i(9122),k=i(2636),h=i(8e3),p=i(586),_=i(2397),O=500,M=3e4;const A=new Set([408,500,502,503,504,522,524,599]);e.NetworkCore=class{constructor(t,e){this.nt=e,this.$t=null,this.Vt=1e4,this.Jt={},this.m={},this.Oi={},this.Jn=null,t&&(this.m=t),this.m.networkConfig&&(this.Jt=this.m.networkConfig),this.Jt.networkTimeoutMs&&(this.Vt=this.Jt.networkTimeoutMs),this.Wt=new s.NetworkFallbackResolver(this.m),this.setLogEventCompressionMode(this.Qn(t))}setLogEventCompressionMode(t){this.m.logEventCompressionMode=t}setErrorBoundary(t){this.$t=t,this.$t.wrap(this),this.$t.wrap(this.Wt),this.Wt.setErrorBoundary(t)}isBeaconSupported(){return"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon}getLastUsedInitUrlAndReset(){var t=this.Jn;return this.Jn=null,t}beacon(t){var e,i;return!!j(t)&&(t=this.Ht("POST",t),e=this.Xt(t),(i=navigator).sendBeacon.bind(i)(e,t.body))}post(e){return w(this,void 0,void 0,function*(){var t=this.Ht("POST",e);return this.Pi(t),yield this.Ci(t),this.Zt(t)})}get(t){t=this.Ht("GET",t);return this.Zt(t)}Zt(y){return w(this,void 0,void 0,function*(){var e;if(!j(y))return null;if(this.Jt.preventAllNetworkTraffic)return null;var{method:i,body:s,retries:r,attempt:n}=y,o=y.urlConfig.endpoint;if(this.Si(o))return I.Log.warn(`Request to ${o} was blocked because you are making requests too frequently.`),null;n=null!=n?n:1;const a="undefined"!=typeof AbortController?new AbortController:null;var t=setTimeout(()=>{null!==a&&void 0!==a&&a.abort(`Timeout of ${this.Vt}ms expired.`)},this.Vt),l=this.Xt(y);let h=null;var u,c=(0,_.Rt)();try{var d,f,v,p={method:i,body:s,headers:Object.assign({},y.headers),signal:null===a||void 0===a?void 0:a.signal,priority:y.priority,keepalive:c},m=(u=n,(b=y).urlConfig.endpoint===C.Endpoint.qt&&S.Diagnostics.J(b.sdkKey,{attempt:u}),this.Oi[o]),g=(m&&(m.lastRequestTime=Date.now(),this.Oi[o]=m),null!=(e=this.Jt.networkOverrideFunc)?e:fetch);if(h=yield g(l,p),clearTimeout(t),h.ok)return v=yield h.text(),R(y,h,n,v),this.Wt.tryBumpExpiryTime(y.sdkKey,y.urlConfig),{body:v,code:h.status};throw d=yield h.text().catch(()=>"No Text"),(f=new Error(`NetworkError: ${l} `+d)).name="NetworkError",f}catch(t){var s=function(t,e){if(null!=t&&t.signal.aborted&&"string"==typeof t.signal.reason)return t.signal.reason;if("string"==typeof e)return e;if(e instanceof Error)return e.name+": "+e.message;return"Unknown Error"}(a,t),c=function(t){t=(null==t?void 0:t.signal.aborted)&&"string"==typeof t.signal.reason&&t.signal.reason.includes("Timeout");return t||!1}(a),b=(R(y,h,n,"",t),yield this.Wt.tryFetchUpdatedFallbackInfo(y.sdkKey,y.urlConfig,s,c));return(b&&(y.fallbackUrl=this.Wt.getActiveFallbackUrl(y.sdkKey,y.urlConfig)),!r||r<n||!A.has(null!=(u=null===h||void 0===h?void 0:h.status)?u:500))?(null!=(o=this.nt)&&o.call(this,{name:"error",error:t,tag:k.ErrorTag.NetworkError,requestArgs:y}),m=`A networking error occurred during ${i} request to ${l}.`,I.Log.error(m,s,t),null!=(e=this.$t)&&e.attachErrorIfNoneExists(m),null):(yield function(e){return w(this,void 0,void 0,function*(){yield new Promise(t=>setTimeout(t,Math.min(O*(e*e),M)))})}(n),this.Zt(Object.assign(Object.assign({},y),{retries:r,attempt:n+1})))}})}Qn(t){let e=null==t?void 0:t.logEventCompressionMode;return e=(e=e||!0!==(null==t?void 0:t.disableCompression)?e:p.LogEventCompressionMode.Disabled)||p.LogEventCompressionMode.Enabled}Si(t){var e=Date.now(),i=null!=(i=this.Oi[t])?i:{count:0,lastRequestTime:e},s=e-i.lastRequestTime,s=Math.floor(.05*s);return i.count=Math.max(0,i.count-s),50<=i.count||(i.count+=1,i.lastRequestTime=e,this.Oi[t]=i,!1)}Xt(t){var e=null!=(e=t.fallbackUrl)?e:t.urlConfig.getUrl();t.urlConfig.endpoint!==C.Endpoint.qt&&t.urlConfig.endpoint!==C.Endpoint.Bt||(this.Jn=e);const i=Object.assign({[C.NetworkParam.SdkKey]:t.sdkKey,[C.NetworkParam.SdkType]:o.SDKType.lt(t.sdkKey),[C.NetworkParam.SdkVersion]:h.SDK_VERSION,[C.NetworkParam.Time]:String(Date.now()),[C.NetworkParam.SessionID]:a.SessionID.get(t.sdkKey)},t.params);t=Object.keys(i).map(t=>encodeURIComponent(t)+"="+encodeURIComponent(i[t])).join("&");return e+(t?"?"+t:"")}Pi(e){var t,i=(0,r.te)(),s=e.body;if(e.isStatsigEncodable&&!this.m.disableStatsigEncoding&&"string"==typeof s&&null==(0,f.i)("no-encode")&&null!=i&&i.btoa)try{e.body=i.btoa(s).split("").reverse().join(""),e.params=Object.assign(Object.assign({},null!=(t=e.params)?t:{}),{[C.NetworkParam.StatsigEncoded]:"1"})}catch(t){I.Log.warn("Request encoding failed for "+e.urlConfig.getUrl(),t)}}Ci(d){return w(this,void 0,void 0,function*(){var e,i=d.body;if("string"==typeof i&&function(t,e){if(!t.isCompressable)return;if(null!=(0,f.i)("no-compress")||"undefined"==typeof CompressionStream||"undefined"==typeof TextEncoder)return;var i=null!=t.urlConfig.customUrl||null!=t.urlConfig.fallbackUrls,s=!0===v.SDKFlags.get(t.sdkKey,"enable_log_event_compression");switch(e.logEventCompressionMode){case p.LogEventCompressionMode.Disabled:return;case p.LogEventCompressionMode.Enabled:return i&&!s?void 0:1;case p.LogEventCompressionMode.Forced:return 1;default:return}}(d,this.m))try{for(var s,r=(new TextEncoder).encode(i),n=new CompressionStream("gzip"),o=n.writable.getWriter(),a=(o.write(r).catch(I.Log.error),o.close().catch(I.Log.error),n.readable.getReader()),l=[];!(s=yield a.read()).done;)l.push(s.value);var h=l.reduce((t,e)=>t+e.length,0),u=new Uint8Array(h);let t=0;for(const c of l)u.set(c,t),t+=c.length;d.body=u,d.params=Object.assign(Object.assign({},null!=(e=d.params)?e:{}),{[C.NetworkParam.IsGzipped]:"1"})}catch(t){I.Log.warn("Request compression failed for "+d.urlConfig.getUrl(),t)}})}Ht(t,e){var i=this.Wt.getActiveFallbackUrl(e.sdkKey,e.urlConfig),t=Object.assign(Object.assign({},e),{method:t,fallbackUrl:i});return"data"in e&&n(t,e.data),t}};const j=t=>!!t.sdkKey||(I.Log.warn("Unable to make request without an SDK key"),!1),n=(t,e)=>{var{sdkKey:i,fallbackUrl:s}=t,r=l.StableID.get(i),n=a.SessionID.get(i),i=o.SDKType.lt(i);t.body=JSON.stringify(Object.assign(Object.assign({},e),{statsigMetadata:Object.assign(Object.assign({},h.StatsigMetadataProvider.get()),{stableID:r,sessionID:n,sdkType:i,fallbackUrl:s})}))};function R(t,e,i,s,r){t.urlConfig.endpoint===C.Endpoint.qt&&S.Diagnostics.$(t.sdkKey,S.Diagnostics.Z(e,i,s,r))}},308:function(t,e,i){"use strict";var a=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0}),e.ee=e.NetworkFallbackResolver=void 0;const o=i(8809),s=i(1406),n=i(7512),l=i(4534);function h(t,e){t=null!=(t=null==t?void 0:t.toLowerCase())?t:"";return e||t.includes("uncaught exception")||t.includes("failed to fetch")||t.includes("networkerror when attempting to fetch resource")}function u(t){return"statsig.network_fallback."+(0,s.h)(t)}function c(t,e){t=u(t);e&&0!==Object.keys(e).length?l.Storage.setItem(t,JSON.stringify(e)):l.Storage.removeItem(t)}e.NetworkFallbackResolver=class{constructor(t){this.ne=null,this.$t=null,this.ie={},this.re=null==(t=t.networkConfig)?void 0:t.networkOverrideFunc}setErrorBoundary(t){this.$t=t}tryBumpExpiryTime(t,e){var i=null==(i=this.ne)?void 0:i[e.endpoint];i&&(i.expiryTime=Date.now()+6048e5,c(t,Object.assign(Object.assign({},this.ne),{[e.endpoint]:i})))}getActiveFallbackUrl(t,e){var i;if(null!=e.customUrl&&null!=e.fallbackUrls)return null;let s=this.ne;null==s&&(s=null!=(r=function(t){t=u(t),t=l.Storage.getItem(t);if(!t)return null;try{return JSON.parse(t)}catch(t){return n.Log.error("Failed to parse FallbackInfo"),null}}(t))?r:{},this.ne=s);var r=s[e.endpoint];return!r||Date.now()>(null!=(i=r.expiryTime)?i:0)||e.getChecksum()!==r.urlConfigChecksum?(delete s[e.endpoint],this.ne=s,c(t,this.ne),null):r.url||null}tryFetchUpdatedFallbackInfo(s,r,n,o){return a(this,void 0,void 0,function*(){var e,t,i;try{return h(n,o)?(t=null==r.customUrl&&null==r.fallbackUrls?yield this.se(r):r.fallbackUrls,!!(i=this.le(null==(e=this.ne)?void 0:e[r.endpoint],t))&&(this.oe(s,r,i),!0)):!1}catch(t){return null!=(e=this.$t)&&e.logError("tryFetchUpdatedFallbackInfo",t),!1}})}oe(t,e,i){var i={urlConfigChecksum:e.getChecksum(),url:i,expiryTime:Date.now()+6048e5,previous:[]},e=e.endpoint,s=null==(s=this.ne)?void 0:s[e],s=(s&&i.previous.push(...s.previous),10<i.previous.length&&(i.previous=[]),null==(s=null==(s=this.ne)?void 0:s[e])?void 0:s.url);null!=s&&i.previous.push(s),this.ne=Object.assign(Object.assign({},this.ne),{[e]:i}),c(t,this.ne)}se(n){return a(this,void 0,void 0,function*(){var t=this.ie[n.endpoint];if(t&&Date.now()<t)return null;this.ie[n.endpoint]=Date.now()+144e5;var e=[],t=yield(0,o.et)(null!=(t=this.re)?t:fetch),i=function(t){try{return new URL(t).pathname}catch(t){return null}}(n.defaultUrl);for(const r of t)if(r.startsWith(n.endpointDnsKey+"=")){var s=r.split("=");if(1<s.length){let t=s[1];t.endsWith("/")&&(t=t.slice(0,-1)),e.push("https://"+t+i)}}return e})}le(t,e){var i;if(null==e)return null;var s=new Set(null!=(i=null==t?void 0:t.previous)?i:[]),r=null==t?void 0:t.url;let n=null;for(const a of e){var o=a.endsWith("/")?a.slice(0,-1):a;if(!s.has(a)&&o!==r){n=o;break}}return n}},e.ee=h},1405:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},1361:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},3091:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SDKFlags=void 0;const i={};e.SDKFlags={setFlags:(t,e)=>{i[t]=e},get:(t,e)=>{return null!=(t=null==(t=i[t])?void 0:t[e])&&t}}},5902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SDKType=void 0;const i={};let s;e.SDKType={lt:t=>{return(null!=(t=i[t])?t:"js-mono")+(null!==s&&void 0!==s?s:"")},ue(t,e){i[t]=e},ae(t){s&&"-react"!==s||(s="-"+t)}}},6830:(t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Hn=s.Gt=s.ce=s.he=s.kt=s.de=s.te=void 0;s.te=()=>"undefined"!=typeof window?window:null,s.de=()=>{var t=(0,s.te)();return null!=(t=null==t?void 0:t.document)?t:null},s.kt=()=>{var t;return null===(0,s.de)()&&(t="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,"string"==typeof EdgeRuntime||t)},s.he=(t,e)=>{var i=(0,s.te)();"function"==typeof(null==i?void 0:i.addEventListener)&&i.addEventListener(t,e)},s.ce=(t,e)=>{var i=(0,s.de)();"function"==typeof(null==i?void 0:i.addEventListener)&&i.addEventListener(t,e)},s.Gt=()=>{var t;try{return null==(t=(0,s.te)())?void 0:t.location.href.split(/[?#]/)[0]}catch(t){}};s.Hn=()=>{var t=(0,s.te)();return t&&"onpagehide"in t?"pagehide":"beforeunload"}},4143:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigSession=e.SessionID=void 0;const s=i(1845),r=i(2137),a=i(7512),l=i(4534),h=i(8023),u=18e5,c=144e5,d={};function f(e,t){return setTimeout(()=>{var t=null==(t=(0,s.l)())?void 0:t.instance(e);t&&t.$emt({name:"session_expired"})},t)}function v(t){return"statsig.session_id."+(0,r.o)(t)}e.SessionID={get:t=>e.StatsigSession.get(t).data.sessionID},e.StatsigSession={get:t=>{null==d[t]&&(d[t]=function(t){let e=function(t){t=v(t);return(0,l.G)(t)}(t);var i=Date.now();e=e||{sessionID:(0,h.getUUID)(),startTime:i,lastUpdate:i};return{data:e,sdkKey:t}}(t));var t=d[t],e=Date.now(),i=t.data,s=t.sdkKey,r=((function({lastUpdate:t}){return Date.now()-t>u}(i)||function({startTime:t}){return Date.now()-t>c}(i))&&(i.sessionID=(0,h.getUUID)(),i.startTime=e,o=null===__STATSIG__||void 0===__STATSIG__?void 0:__STATSIG__.instance(s))&&o.$emt({name:"session_expired"}),i.lastUpdate=e,i),n=t.sdkKey;n=v(n);try{(0,l.L)(n,r)}catch(t){a.Log.warn("Failed to save SessionID")}clearTimeout(t.idleTimeoutID),clearTimeout(t.ageTimeoutID);var o=e-i.startTime;return t.idleTimeoutID=f(s,u),t.ageTimeoutID=f(s,c-o),t},overrideInitialSessionID:(t,e)=>{var i;d[e]=(t=t,e=e,i=Date.now(),{data:{sessionID:t,startTime:i,lastUpdate:i},sdkKey:e})}}},2176:(t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.hi=void 0;a.hi=(e,i)=>{let s=0;var r=Object.keys(e);for(let t=0;t<r.length;t++){var n=r[t],o=e[n];if((s=(s+=n.length)+("object"==typeof o&&null!==o?(0,a.hi)(o,i)+2:String(o).length+1))>=i)return s}return s}},9122:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StableID=void 0;const s=i(2137),r=i(7512),n=i(6830),o=i(4534),a=i(8023),l={},h={},u={};function c(t){return"statsig.stable_id."+(0,s.o)(t)}function d(t,e){e=c(e);try{(0,o.L)(e,t)}catch(t){r.Log.warn("Failed to save StableID to storage")}}function f(t,e){var i;h[e]&&document&&((i=new Date).setFullYear(i.getFullYear()+1),document.cookie=`${v(e)}=${encodeURIComponent(t)}; expires=${i.toUTCString()}; path=/`)}function v(t){return"statsig.stable_id."+(0,s.o)(t)}e.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:t=>{if(u[t])return null;if(null!=l[t])return l[t];let e=null;return null!=(e=function(t){if(h[t]&&null!=(0,n.de)())for(const s of document.cookie.split(";")){var[e,i]=s.trim().split("=");if(e===v(t))return decodeURIComponent(i)}return null}(t))?d(l[t]=e,t):(d(e=null==(e=function(t){t=c(t);return(0,o.G)(t)}(t))?(0,a.getUUID)():e,t),f(e,t),l[t]=e),e},setOverride:(t,e)=>{d(l[e]=t,e),f(t,e)},Xn:(t,e)=>{h[t]=e},_e:(t,e)=>{u[t]=e}}},1375:function(t,e,i){"use strict";var s=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigClientBase=void 0,i(1845);const o=i(1845),a=i(5542),l=i(7770),h=i(7512),n=i(7787),u=i(6830),c=i(4143),d=i(9122),r=i(586),f=i(4534);e.StatsigClientBase=class{constructor(t,e,i,s){this.loadingStatus="Uninitialized",this.ve=null,this.fe={};var r,n=this.$emt.bind(this);null!=(null==s?void 0:s.logLevel)&&(h.Log.level=s.logLevel),null!=s&&s.disableStorage&&f.Storage._e(!0),null!=s&&s.initialSessionID&&c.StatsigSession.overrideInitialSessionID(s.initialSessionID,t),null!=s&&s.storageProvider&&f.Storage.ge(s.storageProvider),null!=s&&s.enableCookies&&d.StableID.Xn(t,s.enableCookies),null!=s&&s.disableStableID&&d.StableID._e(t,!0),this.O=t,this.m=null!=s?s:{},this.ji={},this.overrideAdapter=null!=(r=null==s?void 0:s.overrideAdapter)?r:null,this.pe=new l.EventLogger(t,n,i,s),this.$t=new a.ErrorBoundary(t,s,n),this.$t.wrap(this),this.$t.wrap(e),this.$t.wrap(this.pe),i.setErrorBoundary(this.$t),this.dataAdapter=e,this.dataAdapter.attach(t,s,i),this.storageProvider=f.Storage,null!=(e=null==(n=null==(r=this.overrideAdapter)?void 0:r.loadFromStorage)?void 0:n.call(r))&&e.catch(t=>this.$t.logError("OA::loadFromStorage",t)),this.be(),s=t,i=this,(0,u.kt)()||(n=(0,o.l)(),r=null!=(r=n.instances)?r:{},i=i,null!=r[s]&&h.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),r[s]=i,n.firstInstance||(n.firstInstance=i),n.instances=r,__STATSIG__=n)}updateRuntimeOptions(t){t.loggingEnabled?(this.m.loggingEnabled=t.loggingEnabled,this.pe.setLoggingEnabled(t.loggingEnabled)):null!=t.disableLogging&&(this.m.disableLogging=t.disableLogging,this.pe.setLoggingEnabled(t.disableLogging?"disabled":"browser-only")),null!=t.disableStorage&&(this.m.disableStorage=t.disableStorage,f.Storage._e(t.disableStorage)),null!=t.enableCookies&&(this.m.enableCookies=t.enableCookies,d.StableID.Xn(this.O,t.enableCookies)),t.logEventCompressionMode?this.pe.setLogEventCompressionMode(t.logEventCompressionMode):t.disableCompression&&this.pe.setLogEventCompressionMode(r.LogEventCompressionMode.Disabled)}flush(){return this.pe.flush()}shutdown(){return s(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this.me("Uninitialized",null),this.ve=null,yield this.pe.stop()})}on(t,e){this.fe[t]||(this.fe[t]=[]),this.fe[t].push(e)}off(t,e){this.fe[t]&&-1!==(e=this.fe[t].indexOf(e))&&this.fe[t].splice(e,1)}$on(t,e){e.__isInternal=!0,this.on(t,e)}$emt(i){var t;const e=e=>{try{e(i)}catch(t){!0===e.__isInternal?this.$t.logError("__emit:"+i.name,t):h.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",i)}};this.fe[i.name]&&this.fe[i.name].forEach(t=>e(t)),null!=(t=this.fe["*"])&&t.forEach(e)}me(t,e){this.loadingStatus=t,this.ji={},this.$emt({name:"values_updated",status:t,values:e})}ye(t,e,i){!0===(null==i?void 0:i.disableExposureLog)?this.pe.incrementNonExposureCount(t):this.pe.enqueue(e)}wi(s,r){return(t,e)=>{var i;return!this.m.disableEvaluationMemoization&&(i=(0,n.createMemoKey)(s,t,e))?(i in this.ji||(3e3<=Object.keys(this.ji).length&&(this.ji={}),this.ji[i]=r(t,e)),this.ji[i]):r(t,e)}}}},2636:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorTag=void 0,e.ErrorTag={NetworkError:"NetworkError"}},3206:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataAdapterCachePrefix=void 0,e.DataAdapterCachePrefix="statsig.cached"},1637:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Oe=e.je=e.Ui=e.Se=e.xt=void 0;const n="statsig::config_exposure",o="statsig::gate_exposure",h="statsig::layer_exposure",u=(t,e,i,s,r)=>(i.bootstrapMetadata&&(s.bootstrapMetadata=i.bootstrapMetadata),{eventName:t,user:e,value:null,metadata:a(i,s),secondaryExposures:r,time:Date.now()});e.xt=({eventName:t})=>t===o||t===n||t===h;function c(t,e){return t.map(t=>"string"==typeof t?(null!=e?e:{})[t]:t).filter(t=>null!=t)}e.Se=(t,e,i)=>{var s,r={gate:e.name,gateValue:String(e.value),ruleID:e.ruleID};return null!=(null==(s=e.__evaluation)?void 0:s.version)&&(r.configVersion=e.__evaluation.version),u(o,t,e.details,r,c(null!=(t=null==(s=e.__evaluation)?void 0:s.secondary_exposures)?t:[],i))},e.Ui=c;e.je=(t,e,i)=>{var s,r={config:e.name,ruleID:e.ruleID};return null!=(null==(s=e.__evaluation)?void 0:s.version)&&(r.configVersion=e.__evaluation.version),null!=(null==(s=e.__evaluation)?void 0:s.passed)&&(r.rulePassed=String(e.__evaluation.passed)),u(n,t,e.details,r,c(null!=(t=null==(s=e.__evaluation)?void 0:s.secondary_exposures)?t:[],i))};e.Oe=(t,e,i,s)=>{var r=e.__evaluation,n=!0===(null==(n=null==r?void 0:r.explicit_parameters)?void 0:n.includes(i));let o="",a=null!=(l=null==r?void 0:r.undelegated_secondary_exposures)?l:[];n&&(o=null!=(l=r.allocated_experiment_name)?l:"",a=null!=(l=r.secondary_exposures)?l:[]);var l=null==(r=e.__evaluation)?void 0:r.parameter_rule_ids,l={config:e.name,parameterName:i,ruleID:null!=(r=null==l?void 0:l[i])?r:e.ruleID,allocatedExperiment:o,isExplicitParameter:String(n)};return null!=(null==(i=e.__evaluation)?void 0:i.version)&&(l.configVersion=e.__evaluation.version),u(h,t,e.details,l,c(a,s))};const a=(t,e)=>(e.reason=t.reason,t.lcut&&(e.lcut=String(t.lcut)),t.receivedAt&&(e.receivedAt=String(t.receivedAt)),e)},8e3:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigMetadataProvider=e.SDK_VERSION=void 0,e.SDK_VERSION="3.20.3";let i={sdkVersion:e.SDK_VERSION,sdkType:"js-mono"};e.StatsigMetadataProvider={get:()=>i,add:t=>{i=Object.assign(Object.assign({},i),t)}}},586:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LoggingEnabledOption=e.LogEventCompressionMode=void 0,e.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},e.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}},1098:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},2059:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.we=e.Te=e.ke=e.Ie=e.De=e.Ee=void 0;const o=i(7512),a=i(6634);function r(t,e,i,s){return{name:t,details:e,ruleID:null!=(t=null==i?void 0:i.rule_id)?t:"",__evaluation:i,value:s}}function s(t,e,i){var s=null!=(s=null==i?void 0:i.value)?s:{};return Object.assign(Object.assign({},r(t,e,i,s)),{get:n(t,null==i?void 0:i.value)})}function n(s,r,n){return(t,e)=>{var i=null!=(i=null==r?void 0:r[t])?i:null;return null==i?null!=e?e:null:null==e||(0,a.Me)(i,e)?(null!=n&&n(t),i):(o.Log.warn(`Parameter type mismatch. '${s}.${t}' was found to be type '${typeof i}' but fallback/return type is '${typeof e}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),null!=e?e:null)}}e.Ee=function(t,e,i){return Object.assign(Object.assign({},r(t,e,i,!0===(null==i?void 0:i.value))),{idType:null!=(t=null==i?void 0:i.id_type)?t:null})},e.De=s,e.Ie=function(t,e,i){return t=s(t,e,i),Object.assign(Object.assign({},t),{groupName:null!=(e=null==i?void 0:i.group_name)?e:null})},e.ke=function(t,e,i,s){return Object.assign(Object.assign({},r(t,e,i,void 0)),{get:n(t,null==i?void 0:i.value,s),groupName:null!=(e=null==i?void 0:i.group_name)?e:null,__value:null!=(t=null==i?void 0:i.value)?t:{}})},e.Te=function(t,e,i,s){return Object.assign(Object.assign(Object.assign({},t),e),{get:n(t.name,i,s)})},e.we=n},1812:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},3932:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UPDATE_DETAIL_ERROR_MESSAGES=e.createUpdateDetails=void 0;e.createUpdateDetails=(t,e,i,s,r,n)=>({duration:i,source:e,success:t,error:s,sourceUrl:r,warnings:n}),e.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."}},8578:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.v=e.T=void 0;const s=i(1406),r=i(7512);e.T=function(t,e,i){try{var s=JSON.parse(JSON.stringify(t));return null!=e&&null!=e.environment?s.statsigEnvironment=e.environment:null!=i&&(s.statsigEnvironment={tier:i}),s}catch(t){return r.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}},e.v=function(t){return t?(0,s.Kt)(t):null}},4534:(t,i,e)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.L=i.G=i.Storage=void 0;var s=e(7512),e=e(6830);const r={},n={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:t=>r[t]||null,setItem:(t,e)=>{r[t]=e},removeItem:t=>{delete r[t]},getAllKeys:()=>Object.keys(r)};let o=null;try{const u=(0,e.te)();u&&u.localStorage&&"function"==typeof u.localStorage.getItem&&(o={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:t=>u.localStorage.getItem(t),setItem:(t,e)=>u.localStorage.setItem(t,e),removeItem:t=>u.localStorage.removeItem(t),getAllKeys:()=>Object.keys(u.localStorage)})}catch(t){s.Log.warn("Failed to setup localStorageProvider.")}let a=null!==o&&void 0!==o?o:n,l=a;function h(e){try{return e()}catch(t){if(t instanceof Error&&"SecurityError"===t.name)return i.Storage.ge(n),null;throw t instanceof Error&&"QuotaExceededError"===t.name&&(e=i.Storage.getAllKeys().filter(t=>t.startsWith("statsig.")),t.message=t.message+". Statsig Keys: "+e.length),t}}i.Storage={isReady:()=>l.isReady(),isReadyResolver:()=>l.isReadyResolver(),getProviderName:()=>l.getProviderName(),getItem:t=>h(()=>l.getItem(t)),setItem:(t,e)=>h(()=>l.setItem(t,e)),removeItem:t=>l.removeItem(t),getAllKeys:()=>l.getAllKeys(),ge:t=>{a=t,l=t},_e:t=>{l=t?n:a}},i.G=function(t){return t=i.Storage.getItem(t),JSON.parse(null!=t?t:"null")},i.L=function(t,e){i.Storage.setItem(t,JSON.stringify(e))}},3401:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.P=void 0;const r=i(7512);e.P=function(t,e,i){try{var s=JSON.parse(t);if(s&&"object"==typeof s&&e in s)return s}catch(t){}return r.Log.error("Failed to parse "+i),null}},6634:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Me=e.zt=void 0,e.zt=function(t){return Array.isArray(t)?"array":typeof t},e.Me=function(t,e){var i=t=>Array.isArray(t)?"array":null===t?"null":typeof t;return i(t)===i(e)}},8023:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getUUID=void 0,e.getUUID=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();let i=(new Date).getTime(),s="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(4*Math.random())]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,t=>{let e=16*Math.random();return 0<i?(e=(i+e)%16|0,i=Math.floor(i/16)):(e=(s+e)%16|0,s=Math.floor(s/16)),("x"===t?e:7&e|8).toString(16)})}},1881:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UrlConfiguration=void 0;const s=i(1406),r=i(7410),n={[r.Endpoint.qt]:"i",[r.Endpoint.jt]:"e",[r.Endpoint.Bt]:"d"};e.UrlConfiguration=class{constructor(t,e,i,s){this.customUrl=null,this.fallbackUrls=null,this.endpoint=t,this.endpointDnsKey=n[t],e&&(this.customUrl=e),!e&&i&&(this.customUrl=i.endsWith("/")?""+i+t:i+"/"+t),s&&(this.fallbackUrls=s);e=r.NetworkDefault[t];this.defaultUrl=e+"/"+t}getUrl(){var t;return null!=(t=this.customUrl)?t:this.defaultUrl}getChecksum(){var t=(null!=(t=this.fallbackUrls)?t:[]).sort().join(",");return(0,s.h)(this.customUrl+t)}}},2397:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Ae=e.It=e.Rt=e.xe=void 0;i=i(6830);const s="foreground",r="background",n=[];let o=s,a=!1;e.xe=()=>o===s,e.Rt=()=>a,e.It=t=>{n.unshift(t)};e.Ae=e=>{e!==o&&(o=e,n.forEach(t=>t(e)))},(0,i.he)("focus",()=>{(a=!1,e.Ae)(s)}),(0,i.he)("blur",()=>(0,e.Ae)(r)),(0,i.ce)("visibilitychange",()=>{(0,e.Ae)("visible"===document.visibilityState?s:r)}),(0,i.he)((0,i.Hn)(),()=>{a=!0,(0,e.Ae)(r)})},6914:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var r=Object.getOwnPropertyDescriptor(e,i);r&&("get"in r?e.__esModule:!r.writable&&!r.configurable)||(r={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,r)}:function(t,e,i,s){t[s=void 0===s?i:s]=e[i]}),r=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)},n=(Object.defineProperty(e,"__esModule",{value:!0}),e.Storage=e.Log=e.EventLogger=e.Diagnostics=void 0,i(1845),i(1845));const o=i(8962),a=(Object.defineProperty(e,"Diagnostics",{enumerable:!0,get:function(){return o.Diagnostics}}),i(7770)),l=(Object.defineProperty(e,"EventLogger",{enumerable:!0,get:function(){return a.EventLogger}}),i(7512));Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return l.Log}});var h=i(8e3);const u=i(4534);Object.defineProperty(e,"Storage",{enumerable:!0,get:function(){return u.Storage}}),r(i(1845),e),r(i(2137),e),r(i(6427),e),r(i(694),e),r(i(8962),e),r(i(3539),e),r(i(5542),e),r(i(2922),e),r(i(2417),e),r(i(1406),e),r(i(1333),e),r(i(7512),e),r(i(7787),e),r(i(7410),e),r(i(7023),e),r(i(1405),e),r(i(1361),e),r(i(6830),e),r(i(5902),e),r(i(4143),e),r(i(2176),e),r(i(9122),e),r(i(1375),e),r(i(2636),e),r(i(3206),e),r(i(1637),e),r(i(8e3),e),r(i(586),e),r(i(1098),e),r(i(2059),e),r(i(1812),e),r(i(8578),e),r(i(4534),e),r(i(3401),e),r(i(6634),e),r(i(1881),e),r(i(8023),e),r(i(2397),e),r(i(3932),e),r(i(3091),e),Object.assign((0,n.l)(),{Log:l.Log,SDK_VERSION:h.SDK_VERSION})},2016:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoInit=void 0;const b=i(6914),y=i(2018);function w(t,e){var i;return null!=(i=e.get(t))?i:e.get(t.toLowerCase())}e.AutoInit=class{static attempt(e){var t,i,s,r,n;try{var o=(0,b.te)(),a=(0,b.de)();if(o&&a&&a.currentScript){var l=a.currentScript.getAttribute("src"),h=null==(t=o.location)?void 0:t.href;if(l&&h){var u=new URL(l,h).searchParams,c=null!=(i=w("sdkKey",u))?i:w("apiKey",u);if(c){var d={},f=w("proxy",u),v=(f&&(d.networkConfig={api:f}),null==(r=null==(s=(0,b.l)())?void 0:s.instances)?void 0:r[c]);let t=null;if(t=v instanceof y.StatsigClient?v:t)e({sdkKey:c,client:t});else{var p=a.currentScript.dataset;const m=function(t,e){if(t)if(t in e&&"function"==typeof e[t])return e[t];return null}(null!=(n=p.onstatsiginit)?n:p.onStatsigInit,o),g=new y.StatsigClient(c,function(){var t=(0,b.te)();if(!t)return{};let e=t.statsigUser||{};var i=(e="object"!=typeof e?{}:e).custom||{},s=e.customIDs||{};return Object.assign(Object.assign({},e),{customIDs:Object.assign({},s),custom:Object.assign(Object.assign({},i),{useragent:t.navigator.userAgent,page_url:(0,b.Gt)()||"",language:null==(s=t.navigator)?void 0:s.language})})}(),d);g.initializeAsync().then(()=>{m&&m(g)}).catch(t=>{b.Log.error(t)}),e({sdkKey:c,client:g})}}}}}catch(t){b.Log.error("AutoInit failed",t)}}}},7262:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Ne=void 0;const s=i(6914);function r(t,e){null!=t&&t.forEach(t=>{delete e[t]})}e.Ne=function(t,e){var i;return(e=(0,s.P)(e,"checksum","DeltasEvaluationResponse"))?(t=t,i=e,t=Object.assign(Object.assign(Object.assign({},t),i),{feature_gates:Object.assign(Object.assign({},t.feature_gates),i.feature_gates),layer_configs:Object.assign(Object.assign({},t.layer_configs),i.layer_configs),dynamic_configs:Object.assign(Object.assign({},t.dynamic_configs),i.dynamic_configs)}),r((t=i=t).deleted_gates,t.feature_gates),delete t.deleted_gates,r(i.deleted_configs,t.dynamic_configs),delete t.deleted_configs,r(i.deleted_layers,t.layer_configs),delete t.deleted_layers,i=t,(t=(0,s.Kt)({feature_gates:i.feature_gates,dynamic_configs:i.dynamic_configs,layer_configs:i.layer_configs},2))===e.checksumV2?JSON.stringify(i):{hadBadDeltaChecksum:!0,badChecksum:t,badMergedConfigs:i,badFullResponse:e.deltas_full_response}):{hadBadDeltaChecksum:!0}}},4845:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=i(6914);e.default=class{constructor(t){this.O=t,this.Re=null,this.Pe=null,this.Ce="Uninitialized",this.Ue=0,this.Fe=0,this.Ge=null,this.Le=new Set}reset(){this.Pe=null,this.Re=null,this.Ce="Loading",this.Ue=0,this.Fe=0,this.Ge=null}finalize(){this.Pe||(this.Ce="NoValues")}getValues(){return this.Re?(0,r.P)(this.Re,"has_updates","EvaluationStoreValues"):null}setValues(t,e){var i;return!!t&&null!=(i=(0,r.P)(t.data,"has_updates","EvaluationResponse"))&&(this.Ce=t.source,!0===(null==i?void 0:i.has_updates)&&(this.Re=t.data,this.Ue=i.time,this.Fe=t.receivedAt,this.Pe=i,this.Ge=this.Ke(t.source,i),t.source&&i.user&&this.ze(e,i),r.SDKFlags.setFlags(this.O,null!=(t=i.sdk_flags)?t:{})),!0)}getWarnings(){if(0!==this.Le.size)return Array.from(this.Le)}getGate(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.feature_gates,t)}getConfig(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.dynamic_configs,t)}getConfigList(){var t;return null!=(t=this.Pe)&&t.dynamic_configs?Object.values(this.Pe.dynamic_configs).map(t=>t.name):[]}getLayer(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.layer_configs,t)}getParamStore(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.param_stores,t)}getSource(){return this.Ce}getExposureMapping(){var t;return null==(t=this.Pe)?void 0:t.exposures}Ke(t,e){return"Bootstrap"!==t?null:(t={},e.user&&(t.user=e.user),e.sdkInfo&&(t.generatorSDKInfo=e.sdkInfo),t.lcut=e.time,t)}qe(t,e){let i=null;return{result:i=t?t[e]||t[(0,r.h)(e)]:i,details:this.Be(null==i)}}ze(t,e){var i,s=r.StableID.get(this.O);(null==(i=t.customIDs)?void 0:i.stableID)!==s&&(null!=(i=t.customIDs)&&i.stableID||s)?this.Le.add("StableIDMismatch"):"user"in e&&(i=e.user,s=Object.assign(Object.assign({},t),{analyticsOnlyMetadata:void 0}),(0,r.v)(s)!==(0,r.v)(i))&&this.Le.add("PartialUserMatch")}getCurrentSourceDetails(){var t;return"Uninitialized"===this.Ce||"NoValues"===this.Ce?{reason:this.Ce}:(t={reason:this.Ce,lcut:this.Ue,receivedAt:this.Fe},0<this.Le.size&&(t.warnings=Array.from(this.Le)),t)}Be(t){var e=this.getCurrentSourceDetails();let i=e.reason;var s=null!=(s=e.warnings)?s:[],t=("Bootstrap"===this.Ce&&0<s.length&&(i+=s[0]),"Uninitialized"!==i&&"NoValues"!==i&&(i=i+":"+(t?"Unrecognized":"Recognized")),"Bootstrap"===this.Ce&&null!=(s=this.Ge)?s:void 0);return t&&(e.bootstrapMetadata=t),Object.assign(Object.assign({},e),{reason:i})}}},8448:function(t,e,i){"use strict";var l=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0});const h=i(6914),o=i(7262);class s extends h.NetworkCore{constructor(t,e){super(t,e);e=null==t?void 0:t.networkConfig;this.Fi=t,this.Ve=new h.UrlConfiguration(h.Endpoint.qt,null==e?void 0:e.initializeUrl,null==e?void 0:e.api,null==e?void 0:e.initializeFallbackUrls)}fetchEvaluations(s,r,n,o,a){return l(this,void 0,void 0,function*(){var t,e=r?(0,h.P)(r,"has_updates","InitializeResponse"):null;let i={user:o,hash:null!=(t=null==(t=null==(t=this.Fi)?void 0:t.networkConfig)?void 0:t.initializeHashAlgorithm)?t:"djb2",deltasResponseRequested:!1,full_checksum:null};return null!=e&&e.has_updates&&(t=(null==e?void 0:e.hash_used)!==(null!=(t=null==(t=null==(t=this.Fi)?void 0:t.networkConfig)?void 0:t.initializeHashAlgorithm)?t:"djb2"),i=Object.assign(Object.assign({},i),{sinceTime:a&&!t?e.time:0,previousDerivedFields:"derived_fields"in e&&a?e.derived_fields:{},deltasResponseRequested:!0,full_checksum:e.full_checksum,partialUserMatchSinceTime:t?0:e.time})),this.Je(s,e,i,n)})}Je(i,s,r,n){return l(this,void 0,void 0,function*(){var t,e=yield this.post({sdkKey:i,urlConfig:this.Ve,data:r,retries:2,isStatsigEncodable:!0,priority:n});return 204===(null==e?void 0:e.code)?'{"has_updates": false}':200!==(null==e?void 0:e.code)?null!=(t=null==e?void 0:e.body)?t:null:!0!==(null==s?void 0:s.has_updates)||!0!==(null==(t=e.body)?void 0:t.includes('"is_delta":true'))||!0!==r.deltasResponseRequested?e.body:"string"==typeof(t=(0,o.Ne)(s,e.body))?t:this.Je(i,s,Object.assign(Object.assign(Object.assign({},r),t),{deltasResponseRequested:!1}),n)})}}e.default=s},3583:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.$e=void 0;const d=i(6914),f={disableExposureLog:!0};function v(t){return null==t||!1===t.disableExposureLog}function p(t,e){return null!=e&&!(0,d.Me)(t,e)}e.$e=function(h,u,c){return(t,e)=>{if(null==u)return e;var i,s,r,n,o,a,l=u[t];if(null==l||null!=e&&(0,d.zt)(e)!==l.param_type)return e;switch(l.ref_type){case"static":return l.value;case"gate":return a=l,h.getFeatureGate(a.gate_name,v(c)?void 0:f).value?a.pass_value:a.fail_value;case"dynamic_config":return a=l,o=e,p(n=(n=h).getDynamicConfig(a.config_name,v(c)?void 0:f).get(a.param_name),o)?o:n;case"experiment":return o=l,n=e,p(r=(r=h).getExperiment(o.experiment_name,v(c)?void 0:f).get(o.param_name),n)?n:r;case"layer":return r=l,s=e,p(i=(i=h).getLayer(r.layer_name,v(c)?void 0:f).get(r.param_name),s)?s:i;default:return e}}}},8198:function(t,e,i){"use strict";var n=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0});const o=i(6914),a=i(4845),l=i(8448),r=i(3583),h=i(4131);class s extends o.StatsigClientBase{static instance(t){var e=(0,o.l)().instance(t);return e instanceof s?e:(o.Log.warn((0,o.kt)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new s(null!=t?t:"",{}))}constructor(t,e,i=null){o.SDKType.ue(t,"javascript-client");var s,r=new l.default(i,t=>{this.$emt(t)}),t=(super(t,null!=(s=null==i?void 0:i.dataAdapter)?s:new h.StatsigEvaluationsDataAdapter,r,i),this.ar={},this.getFeatureGate=this.wi(o.MemoPrefix.Kn,this.Ti.bind(this)),this.getDynamicConfig=this.wi(o.MemoPrefix.Ln,this.Ii.bind(this)),this.getExperiment=this.wi(o.MemoPrefix.Vn,this.ki.bind(this)),this.getConfigList=this.wi(o.MemoPrefix.xs,this.Ts.bind(this)),this.getLayer=this.wi(o.MemoPrefix.$n,this.Di.bind(this)),this.getParameterStore=this.wi(o.MemoPrefix.Bn,this.Ri.bind(this)),this.We=new a.default(t),this.ht=r,this.He=this.xi(e,i),this.js=(0,o.getUUID)(),null!=(s=null==i?void 0:i.plugins)?s:[]);for(const n of t)n.bind(this)}initializeSync(t){var e;return"Uninitialized"!==this.loadingStatus?(0,o.createUpdateDetails)(!0,this.We.getSource(),-1,null,null,["MultipleInitializations",...null!=(e=this.We.getWarnings())?e:[]]):(this.pe.start(),this.updateUserSync(this.He,t))}initializeAsync(t){return n(this,void 0,void 0,function*(){return this.ve||(this.ve=this.Ye(t)),this.ve})}updateUserSync(e,t){var i=performance.now();try{return this.zi(e,t,i)}catch(t){e=t instanceof Error?t:new Error(String(t));return this.Ki(e,i)}}zi(t,e,i){var s=[...null!=(s=this.We.getWarnings())?s:[]],t=(this.Xe(t),this.dataAdapter.getDataSync(this.He)),e=(null==t&&s.push("NoCachedValues"),this.We.setValues(t,this.He),this.Qe(t),null==e?void 0:e.disableBackgroundCacheRefresh);return!0===e||null==e&&"Bootstrap"===(null==t?void 0:t.source)||this.Ze(null!=t?t:null,this.He),(0,o.createUpdateDetails)(!0,this.We.getSource(),performance.now()-i,this.$t.getLastSeenErrorAndReset(),this.ht.getLastUsedInitUrlAndReset(),s)}updateUserAsync(t,s){return n(this,void 0,void 0,function*(){var e=performance.now();try{return yield this.qi(t,s)}catch(t){var i=t instanceof Error?t:new Error(String(t));return this.Ki(i,e)}})}qi(s,r){return n(this,void 0,void 0,function*(){this.Xe(s);var t=this.He,e=(o.Diagnostics.B(this.O),this.dataAdapter.getDataSync(t));if(this.We.setValues(e,this.He),this.me("Loading",e),e=yield this.dataAdapter.getDataAsync(e,t,r),t!==this.He)return(0,o.createUpdateDetails)(!1,this.We.getSource(),-1,new Error("User changed during update"),this.ht.getLastUsedInitUrlAndReset());let i=!1;null!=e&&(o.Diagnostics.W(this.O),i=this.We.setValues(e,this.He),o.Diagnostics.H(this.O,{success:i})),this.Qe(e),i||(this.$t.attachErrorIfNoneExists(o.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),o.Diagnostics.V(this.O,i,this.We.getCurrentSourceDetails());t=o.Diagnostics.tt(this.He,this.pe,this.O,this.m);return(0,o.createUpdateDetails)(i,this.We.getSource(),t,this.$t.getLastSeenErrorAndReset(),this.ht.getLastUsedInitUrlAndReset(),this.We.getWarnings())})}getContext(){return{sdkKey:this.O,options:this.m,values:this.We.getValues(),user:JSON.parse(JSON.stringify(this.He)),errorBoundary:this.$t,session:o.StatsigSession.get(this.O),stableID:o.StableID.get(this.O),sdkInstanceID:this.js}}checkGate(t,e){return this.getFeatureGate(t,e).value}logEvent(t,e,i){e="string"==typeof t?{eventName:t,value:e,metadata:i}:t;this.$emt({name:"log_event_called",event:e}),this.pe.enqueue(Object.assign(Object.assign({},e),{user:this.He,time:Date.now()}))}updateUserWithAnalyticsOnlyMetadata(t){this.He=this.xi(Object.assign(Object.assign({},this.He),{analyticsOnlyMetadata:t}),this.m)}be(){this.$on("error",()=>{"Loading"===this.loadingStatus&&this.Qe(null)})}Ye(t){return n(this,void 0,void 0,function*(){return o.Storage.isReady()||(yield o.Storage.isReadyResolver()),this.pe.start(),this.updateUserAsync(this.He,t)})}Ki(t,e){return(0,o.createUpdateDetails)(!1,this.We.getSource(),performance.now()-e,t,null,[...null!=(e=this.We.getWarnings())?e:[]])}Qe(t){this.We.finalize(),this.me("Ready",t)}Ze(t,e){this.dataAdapter.getDataAsync(t,e,{priority:"low"}).catch(t=>{o.Log.error("An error occurred after update.",t)})}Xe(t){this.pe.reset(),this.We.reset(),this.He=this.xi(t,this.m)}xi(t,e){t=(0,o.T)(t,e),e=null==(e=t.customIDs)?void 0:e.stableID;return e&&o.StableID.setOverride(e,this.O),t.analyticsOnlyMetadata=Object.assign(Object.assign({},t.analyticsOnlyMetadata),this.ar),t}Ti(t,e){var{result:i,details:s}=this.We.getGate(t),s=(0,o.Ee)(t,s,i),r=null==(r=null==(i=this.overrideAdapter)?void 0:i.getGateOverride)?void 0:r.call(i,s,this.He,e),i=null!=r?r:s;return this.ye(t,(0,o.Se)(this.He,i,this.We.getExposureMapping()),e),this.$emt({name:"gate_evaluation",gate:i}),i}Ii(t,e){var{result:i,details:s}=this.We.getConfig(t),s=(0,o.De)(t,s,i),r=null==(r=null==(i=this.overrideAdapter)?void 0:i.getDynamicConfigOverride)?void 0:r.call(i,s,this.He,e),i=null!=r?r:s;return this.ye(t,(0,o.je)(this.He,i,this.We.getExposureMapping()),e),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:i}),i}ki(t,e){var{result:i,details:s}=this.We.getConfig(t),s=(0,o.Ie)(t,s,i),r=(null!=s.__evaluation&&(s.__evaluation.secondary_exposures=(0,o.Ui)(null!=(i=null==(i=s.__evaluation)?void 0:i.secondary_exposures)?i:[],this.We.getExposureMapping())),null==(r=null==(i=this.overrideAdapter)?void 0:i.getExperimentOverride)?void 0:r.call(i,s,this.He,e)),i=null!=r?r:s;return this.ye(t,(0,o.je)(this.He,i,this.We.getExposureMapping()),e),this.$emt({name:"experiment_evaluation",experiment:i}),i}Ts(){return this.We.getConfigList()}Di(e,i){var{result:t,details:s}=this.We.getLayer(e),s=(0,o.ke)(e,s,t),r=null==(r=null==(t=this.overrideAdapter)?void 0:t.getLayerOverride)?void 0:r.call(t,s,this.He,i);null!=i&&i.disableExposureLog&&this.pe.incrementNonExposureCount(e);const n=(0,o.Te)(s,r,null!=(t=null==r?void 0:r.__value)?t:s.__value,t=>{null!=i&&i.disableExposureLog||this.ye(e,(0,o.Oe)(this.He,n,t,this.We.getExposureMapping()),i)});return this.$emt({name:"layer_evaluation",layer:n}),n}Ri(t,e){var{result:i,details:s}=this.We.getParamStore(t),t=(this.pe.incrementNonExposureCount(t),{name:t,details:s,__configuration:i,get:(0,r.$e)(this,i,e)}),i=null==(i=null==(s=this.overrideAdapter)?void 0:s.getParamStoreOverride)?void 0:i.call(s,t,e);return null!=i&&(t.__configuration=i.config,t.details=i.details,t.get=(0,r.$e)(this,i.config,e)),t}}e.default=s},4131:function(t,e,i){"use strict";var n=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigEvaluationsDataAdapter=void 0;const s=i(6914),r=i(8448);class o extends s.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this.ht=null,this.m=null}attach(t,e,i){super.attach(t,e,i),null!==i&&i instanceof r.default?this.ht=i:this.ht=new r.default(null!=e?e:{})}getDataAsync(t,e,i){return this.D(t,(0,s.T)(e,this.m),i)}prefetchData(t,e){return this.A(t,e)}setData(t){var e=(0,s.P)(t,"has_updates","data");e&&"user"in e?super.setData(t,e.user):s.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(t,e){super.setData(t,e)}R(e,i,s,r){return n(this,void 0,void 0,function*(){var t=yield null==(t=this.ht)?void 0:t.fetchEvaluations(this.C(),e,null==s?void 0:s.priority,i,r);return null!=t?t:null})}k(t){t=(0,s.o)(this.C(),t,null==(t=this.m)?void 0:t.customUserCacheKeyFunc);return`${s.DataAdapterCachePrefix}.${this.p}.`+t}N(t,e){return null!=t.fullUserHash&&t.fullUserHash===(0,s.v)(e)}}e.StatsigEvaluationsDataAdapter=o},2018:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var r=Object.getOwnPropertyDescriptor(e,i);r&&("get"in r?e.__esModule:!r.writable&&!r.configurable)||(r={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,r)}:function(t,e,i,s){t[s=void 0===s?i:s]=e[i]}),r=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)},n=(Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigClient=void 0,i(6914)),o=i(8198),r=(e.StatsigClient=o.default,r(i(6914),e),Object.assign((0,n.l)(),{StatsigClient:o.default}));e.default=r},8788:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SessionReplay=e.runStatsigSessionReplay=e.StatsigSessionReplayPlugin=void 0;const s=i(6914);var r=i(4069);const n=i(5967);function o(t,e){new a(t,e)}e.StatsigSessionReplayPlugin=class{constructor(t){this.options=t,this.__plugin="session-replay"}bind(t){o(t,this.options)}},e.runStatsigSessionReplay=o;class a extends r.SessionReplayBase{constructor(t,e){super(t,e),this.tn.$on("values_updated",()=>{var t;this.ts||this.li(null==(t=this.m)?void 0:t.forceRecording)}),this.li(null==(t=this.m)?void 0:t.forceRecording)}ri(t){super.es(t)}li(t=!1){var e;this.ns>=n.MAX_LOGS||(!0===(null==(e=this.tn.getContext().values)?void 0:e.recording_blocked)||!t&&!0!==(null==e?void 0:e.can_record_session)||!1===(null==e?void 0:e.passes_session_recording_targeting)?this.ri():this.si.isRecording()||(this.ts=!1,s.StatsigMetadataProvider.add({isRecordingSession:"true"}),this.si.record((t,e)=>this.ci(t,e),null!=(e=null==(t=this.m)?void 0:t.rrwebConfig)?e:{},()=>{this.ri()})))}}e.SessionReplay=a},4069:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SessionReplayBase=e.forceStartRecording=e.startRecording=e.stopRecording=void 0;const h=i(6914),s=i(759),u=i(5967);function r(t){var e=null==t?(0,h.l)().firstSRInstance:null==(e=null==(e=(0,h.l)())?void 0:e.srInstances)?void 0:e[t];return e instanceof n?e:null}e.stopRecording=function(t){null!=(t=r(t))&&t.stopRecording()},e.startRecording=function(t){null!=(t=r(t))&&t.startRecording()},e.forceStartRecording=function(t){null!=(t=r(t))&&t.forceStartRecording()};class n{constructor(t,e){this.ti={startTime:-1,endTime:0,clickCount:0},this.ei=[],this.ts=!1,this.ss=0,this.ns=0,this.tn=t,this.m=e;var{sdkKey:t,errorBoundary:e}=this.tn.getContext();this.$t=e,this.$t.wrap(this),this.si=new s.SessionReplayClient,this.tn.$on("pre_shutdown",()=>this.ri()),this.tn.on("session_expired",()=>{this.ri("session_expired")}),(0,h.kt)()||((e=(0,h.l)()).srInstances=Object.assign(Object.assign({},e.srInstances),{[t]:this}),e.firstSRInstance)||(e.firstSRInstance=this),this.ii=this.ni(),this.ui()}forceStartRecording(){this.ts=!1,this.li(!0)}stopRecording(){this.ts=!0,this.ri()}startRecording(){var t;this.ts=!1,this.li(null==(t=this.m)?void 0:t.forceRecording)}isRecording(){return this.si.isRecording()}oi(t){0!==this.ei.length&&(t=(0,h.Rt)()?"is_leaving_page":t,this.vi(this.ii,t))}ai(t){"background"===t&&(this.oi(),this.tn.flush().catch(t=>{this.$t.logError("SR::visibility",t)}))}ui(){const i=this.tn.getContext()["sdkKey"];(0,h.It)(t=>{var e=null==(e=null==(e=(0,h.l)())?void 0:e.srInstances)?void 0:e[i];e instanceof n&&e.ai(t)})}vi(e,i){var s=this.ti;if(0!==this.ei.length){var r=JSON.stringify(this.ei),n=(0,u.rs)(r),o=1<n.length?(0,h.getUUID)():null;for(let t=0;t<n.length;t++){var a=n[t],l=(0,u.ls)(a,r,e,s,this.tn.getContext().sdkInstanceID);null!=o&&(0,u.os)(l.metadata,o,t,n.length,a.length),i&&(l.metadata[i]="true"),this.ns++,this.tn.logEvent(l),null!=o&&this.tn.flush().catch(t=>{h.Log.error(t)})}this.ei=[],this.ns>u.MAX_LOGS&&this.ri()}}di(){this.ni(),this.oi()}ni(){return this.tn.getContext().session.data.sessionID}es(t){this.si.isRecording()&&(this.si.stop(),h.StatsigMetadataProvider.add({isRecordingSession:"false"})),0!==this.ei.length&&this.oi(t),"session_expired"===t&&(this.ss=0,this.ti=this.us())}us(){return{startTime:-1,endTime:0,clickCount:0}}ci(t,e){var i;this.ii!==this.ni()?this.ri("session_expired"):this.ns>=u.MAX_LOGS?this.ri():(t.eventIndex=this.ss++,this.ti.clickCount+=e.clickCount,this.ti.startTime=-1===this.ti.startTime?e.startTime:Math.min(this.ti.startTime,e.startTime),this.ti.endTime=Math.max(this.ti.endTime,e.endTime),(e=(0,h.hi)(t,u.MAX_INDIVIDUAL_EVENT_BYTES))>u.MAX_INDIVIDUAL_EVENT_BYTES?h.Log.warn(`SessionReplay event is too large (~${e} bytes) and will not be logged`,t):(i=(0,h.hi)(this.ei,u.REPLAY_ENQUEUE_TRIGGER_BYTES),this.ei.push(t),i+e<u.REPLAY_ENQUEUE_TRIGGER_BYTES||((0,h.xe)()?this.di():this.oi())))}}e.SessionReplayBase=n},759:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SessionReplayClient=void 0;const s=i(5980),o=i(6914);e.SessionReplayClient=class{constructor(){this.fi=null,this._i=null}record(r,t,e,n=!1){null==(0,o.de)()||(this.fi=null,this._i=null,this.bi=e,this.pi)||(this.pi=(e=(t,e)=>{var i;n?this.fi=!e&&null!=(i=this.fi)?i:t.timestamp:null==this.fi&&(this.fi=t.timestamp),this._i=t.timestamp;let s=0;3!==(i=t).type||2!==i.data.source||2!==i.data.type&&4!==i.data.type||s++,r(Object.assign(Object.assign({},t),{eventIndex:0}),{startTime:this.fi,endTime:this._i,clickCount:s},null!=e&&e),144e5<this._i-this.fi&&(null!=(t=this.pi)&&t.call(this),this.bi)&&this.bi()},t=t,n?(0,s.record)(Object.assign(Object.assign({},t),{emit:e,checkoutEveryNms:3e4})):(0,s.record)(Object.assign(Object.assign({},t),{emit:e}))))}stop(){this.pi&&(this.pi(),this.pi=void 0)}isRecording(){return null!=this.pi}}},5967:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.os=e.rs=e.ls=e.MAX_LOGS=e.MAX_INDIVIDUAL_EVENT_BYTES=e.REPLAY_ENQUEUE_TRIGGER_BYTES=void 0;const n=i(6914);e.REPLAY_ENQUEUE_TRIGGER_BYTES=10240,e.MAX_INDIVIDUAL_EVENT_BYTES=10485760,e.MAX_LOGS=1e4,e.ls=function(t,e,i,s,r){return{eventName:"statsig::session_recording",value:i,metadata:{session_start_ts:String(s.startTime),session_end_ts:String(s.endTime),clicks_captured_cumulative:String(s.clickCount),rrweb_events:t,rrweb_payload_size:String(e.length),session_replay_sdk_version:n.SDK_VERSION,sdk_instance_id:r}}},e.rs=function(e){var i=[];for(let t=0;t<e.length;t+=1048576)i.push(e.slice(t,t+1048576));return i},e.os=function(t,e,i,s,r){t.sliced_id=e,t.slice_index=String(i),t.slice_count=String(s),t.slice_byte_size=String(r)}},3691:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TriggeredSessionReplay=e.runStatsigTriggeredSessionReplay=e.StatsigTriggeredSessionReplayPlugin=void 0;const r=i(6914);var s=i(4069);const n=i(5967);function o(t,e){new a(t,e)}e.StatsigTriggeredSessionReplayPlugin=class{constructor(t){this.options=t,this.__plugin="triggered-session-replay"}bind(t){o(t,this.options)}},e.runStatsigTriggeredSessionReplay=o;class a extends s.SessionReplayBase{constructor(t,e){super(t,e),this.cs=[],this.hs=!1,this.ds(e),null!=e&&e.autoStartRecording?this.li(null==(t=this.m)?void 0:t.forceRecording):null!=e&&e.keepRollingWindow&&this.vs()}ds(t){this.fs(t),this.gs(),this._s(),this.ps()}fs(e){this.tn.$on("values_updated",()=>{var t;this.ts||(null!=e&&e.autoStartRecording?this.li(null==(t=this.m)?void 0:t.forceRecording):null!=e&&e.keepRollingWindow&&this.vs())})}gs(){this.tn.$on("log_event_called",t=>{var e;this.ts||!1===(null==(e=this.tn.getContext().values)?void 0:e.passes_session_recording_targeting)||null==(null==e?void 0:e.session_recording_event_triggers)||null==(e=e.session_recording_event_triggers[t.event.eventName])||!1===e.passes_sampling||null!=(e=e.values)&&!e.includes(String(null!=(e=t.event.value)?e:""))||this.li(!0)})}_s(){this.tn.$on("gate_evaluation",t=>{this.bs(t.gate.name,String(t.gate.value))})}ps(){this.tn.$on("experiment_evaluation",t=>{this.bs(t.experiment.name,null!=(t=t.experiment.groupName)?t:"")})}bs(t,e){var i,s;this.ts||!1===(null==(s=this.tn.getContext().values)?void 0:s.passes_session_recording_targeting)||null==(null==s?void 0:s.session_recording_exposure_triggers)||null==(i=null!=(i=s.session_recording_exposure_triggers[t])?i:s.session_recording_exposure_triggers[(0,r.h)(t)])||!1===i.passes_sampling||null!=(s=i.values)&&!s.includes(e)||this.li(!0)}forceStartRecording(){super.forceStartRecording()}stopRecording(){this.hs=!1,this.cs=[],super.stopRecording()}ys(){if(this.hs=!0,0!==this.cs.length){var e=this.cs.map(t=>t.events).flat();for(let t=0;t<e.length;t++)e[t].event.eventIndex=t,this.ti.clickCount+=e[t].data.clickCount,this.ti.startTime=-1===this.ti.startTime?e[t].data.startTime:Math.min(this.ti.startTime,e[t].data.startTime),this.ti.endTime=Math.max(this.ti.endTime,e[t].data.endTime);this.ei=e.map(t=>t.event),this.ss=e.length,(0,r.xe)()?this.di():this.oi(),this.si.stop()}}ri(t){this.hs=!1,this.cs=[],super.es(t)}ci(t,e,i){if(!this.hs)return this.ii!==this.ni()?void this.ri("session_expired"):void(i&&4===t.type||0===this.cs.length?(1<this.cs.length&&this.cs.shift(),this.cs.push({events:[{event:t,data:e}]})):this.cs[this.cs.length-1].events.push({event:t,data:e}));super.ci(t,e)}vs(){var t=this.tn.getContext().values;!1===(null==t?void 0:t.passes_session_recording_targeting)?this.ri():this.si.isRecording()||this.si.record((t,e,i)=>this.ci(t,e,i),null!=(t=null==(t=this.m)?void 0:t.rrwebConfig)?t:{},()=>{this.ri()},!0)}li(t=!1){var e;this.ns>=n.MAX_LOGS||(!0===(null==(e=this.tn.getContext().values)?void 0:e.recording_blocked)||!t&&!0!==(null==e?void 0:e.can_record_session)||!1===(null==e?void 0:e.passes_session_recording_targeting)?this.ri():(this.ys(),this.ts=!1,r.StatsigMetadataProvider.add({isRecordingSession:"true"}),this.si.isRecording()||this.si.record((t,e,i)=>this.ci(t,e,i),null!=(e=null==(t=this.m)?void 0:t.rrwebConfig)?e:{},()=>{this.ri()})))}}e.TriggeredSessionReplay=a},3447:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.forceStartRecording=e.stopRecording=e.startRecording=e.StatsigTriggeredSessionReplayPlugin=e.StatsigSessionReplayPlugin=e.runStatsigTriggeredSessionReplay=e.runStatsigSessionReplay=e.SessionReplay=e.SessionReplayClient=void 0;var s=i(6914);const r=i(8788),n=(Object.defineProperty(e,"SessionReplay",{enumerable:!0,get:function(){return r.SessionReplay}}),Object.defineProperty(e,"StatsigSessionReplayPlugin",{enumerable:!0,get:function(){return r.StatsigSessionReplayPlugin}}),Object.defineProperty(e,"runStatsigSessionReplay",{enumerable:!0,get:function(){return r.runStatsigSessionReplay}}),i(4069)),o=(Object.defineProperty(e,"forceStartRecording",{enumerable:!0,get:function(){return n.forceStartRecording}}),Object.defineProperty(e,"startRecording",{enumerable:!0,get:function(){return n.startRecording}}),Object.defineProperty(e,"stopRecording",{enumerable:!0,get:function(){return n.stopRecording}}),i(759)),a=(Object.defineProperty(e,"SessionReplayClient",{enumerable:!0,get:function(){return o.SessionReplayClient}}),i(3691));Object.defineProperty(e,"StatsigTriggeredSessionReplayPlugin",{enumerable:!0,get:function(){return a.StatsigTriggeredSessionReplayPlugin}}),Object.defineProperty(e,"runStatsigTriggeredSessionReplay",{enumerable:!0,get:function(){return a.runStatsigTriggeredSessionReplay}}),Object.assign((0,s.l)(),{SessionReplayClient:o.SessionReplayClient,SessionReplay:r.SessionReplay,runStatsigSessionReplay:r.runStatsigSessionReplay,runStatsigTriggeredSessionReplay:a.runStatsigTriggeredSessionReplay,StatsigSessionReplayPlugin:r.StatsigSessionReplayPlugin,StatsigTriggeredSessionReplayPlugin:a.StatsigTriggeredSessionReplayPlugin,startRecording:n.startRecording,stopRecording:n.stopRecording,forceStartRecording:n.forceStartRecording})},4535:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoCapture=e.runStatsigAutoCapture=e.StatsigAutoCapturePlugin=void 0;const u=i(6914),s=i(5423),r=i(7875),n=i(6714),o=i(4716),a=i(2678),l=i(5864),h=i(3769),c=i(9900),d={submit:s.AutoCaptureEventName.FORM_SUBMIT,click:s.AutoCaptureEventName.CLICK};function f(t,e){var i=t.getContext()["sdkKey"];if(!(0,u.kt)()){var s=null!=(s=(0,u.l)().acInstances)?s:{};if(s[i])return s[i]}return new v(t,e)}e.StatsigAutoCapturePlugin=class{constructor(t){this.m=t,this.__plugin="auto-capture"}bind(t){f(t,this.m)}},e.runStatsigAutoCapture=f;class v{constructor(t,e){this.tn=t,this.rn={},this.sn=null,this.Ei=!1,this.cr=!1;var{sdkKey:t,errorBoundary:i,values:s}=t.getContext(),s=(this.rn=null!=(s=null==(s=null==s?void 0:s.auto_capture_settings)?void 0:s.disabled_events)?s:{},this.$t=i,this.$t.wrap(this),this.tn.$on("values_updated",()=>{var t=this.tn.getContext().values;this.rn=null!=(t=null==(t=null==t?void 0:t.auto_capture_settings)?void 0:t.disabled_events)?t:this.rn}),this.Vi=new n.EngagementManager,this.Gi=new o.default,this.hr=new a.WebVitalsManager(this.bn.bind(this)),this.Ds=new r.default(this.bn.bind(this)),this.ln=null==e?void 0:e.eventFilterFunc,(0,u.de)());(0,u.kt)()||((e=null!=(i=(__STATSIG__=(0,u.l)()).acInstances)?i:{})[t]=this,__STATSIG__.acInstances=e),"loading"===(null==s?void 0:s.readyState)?s.addEventListener("DOMContentLoaded",()=>this.qt()):this.qt()}un(){var t=(0,u.te)(),e=(0,u.de)();if(t&&e){const i=(t,e=!0)=>{t=t||(null==(t=(0,u.te)())?void 0:t.event);this.an(t),e&&this.Vi.bumpInactiveTimer(),"click"===t.type&&t instanceof MouseEvent&&this.Gi.isRageClick(t.clientX,t.clientY,Date.now())&&this.Bi(t)};(0,l.cn)(e,"click",t=>i(t)),(0,l.cn)(e,"submit",t=>i(t)),(0,l.cn)(t,"error",t=>i(t,!1)),(0,l.cn)(t,"pagehide",()=>this.Mi()),(0,l.cn)(t,"beforeunload",()=>this.Mi())}}vn(){var t=(0,u.te)(),e=(0,u.de)();t&&e&&((0,l.cn)(t,"popstate",()=>this.fn()),window.history.pushState=new Proxy(window.history.pushState,{apply:(t,e,[i,s,r])=>{t.apply(e,[i,s,r]),this.fn()}}),this.fn())}an(t){var e,i,s=null==(s=t.type)?void 0:s.toLowerCase();"error"===s&&t instanceof ErrorEvent?this._n(t):(e=(0,l.gn)(t))&&(0,l.St)(t,e)&&(t=d[s])&&({value:s,metadata:e}=(0,h.pn)(e),i=(0,c.$i)((0,l.wn)()),this.bn(t,s,Object.assign(Object.assign({},i),e)))}qt(){this.hr.startTracking(),this.Ds.startTracking(),this.Vi.startInactivityTracking(()=>this.Mi(!0)),this.un(),this.vn(),this.mn(),this.yn()}_n(t){var e=(null==t?void 0:t.error)||{};let i=e;if("object"==typeof e)try{i=JSON.stringify(e)}catch(t){i="function"==typeof(null==e?void 0:e.toString)?e.toString():"Unknown Error"}this.bn(s.AutoCaptureEventName.ERROR,t.message,{message:t.message,filename:t.filename,lineno:t.lineno,colno:t.colno,error_str:i})}mn(){var t=this.On();try{this.jn(t)&&this.bn(s.AutoCaptureEventName.SESSION_START,(0,l.Sn)(),{sessionID:t.data.sessionID},{flushImmediately:!0})}catch(t){this.$t.logError("AC::logSession",t)}}fn(){var t=(0,l.wn)(),e=this.sn;e&&t.href===e.href||(this.Vi.setLastPageViewTime(Date.now()),e=(this.Ei=!1,c.$i)(t),this.sn&&(e.last_page_view_url=this.sn.href),this.cr||(this.dr(),this.cr=!0),this.bn(s.AutoCaptureEventName.PAGE_VIEW,(0,l.Sn)(),e,{flushImmediately:!0,addNewSessionMetadata:!0}),this.sn=t,this.Vi.bumpInactiveTimer())}Mi(t=!1){var e,i;this.Ei||(this.Ei=!0,e=this.Vi.getScrollMetrics(),i=this.Vi.getPageViewLength(),this.bn(s.AutoCaptureEventName.PAGE_VIEW_END,(0,l.Sn)(),Object.assign(Object.assign({},e),{pageViewLength:i,dueToInactivity:t}),{flushImmediately:!0}))}Bi(t){var{value:e,metadata:i}=(0,h.pn)(t.target);this.bn(s.AutoCaptureEventName.RAGE_CLICK,e,Object.assign(Object.assign({x:t.clientX,y:t.clientY,timestamp:Date.now()},(0,c.$i)((0,l.wn)())),i))}yn(){const i=(0,u.te)();i&&i.performance&&void 0!==(null===i||void 0===i?void 0:i.performance)&&"function"==typeof i.performance.getEntriesByType&&"function"==typeof i.performance.getEntriesByName&&setTimeout(()=>{var t={},e=i.performance.getEntriesByType("navigation"),e=(e&&0<e.length&&e[0]instanceof PerformanceNavigationTiming&&(e=e[0],t.load_time_ms=e.duration,t.dom_interactive_time_ms=e.domInteractive-e.startTime,t.redirect_count=e.redirectCount,t.transfer_bytes=e.transferSize),i.performance.getEntriesByName("first-contentful-paint"));e&&0<e.length&&e[0]instanceof PerformancePaintTiming&&(t.first_contentful_paint_time_ms=e[0].startTime),this.bn(s.AutoCaptureEventName.PERFORMANCE,(0,l.Sn)(),Object.assign(Object.assign({},t),(0,c.Ji)()))},1)}bn(t,e,i,s){var r,n,o,a=t.slice("auto_capture::".length);if(!this.rn[t]&&!this.rn[a]){a=this.On();try{var l=Object.assign({sessionID:a.data.sessionID,page_url:null!=(o=null==(n=null==(r=(0,u.te)())?void 0:r.location)?void 0:n.href)?o:""},i),h=(null!=s&&s.addNewSessionMetadata&&(l.isNewSession=String(this.jn(a))),{eventName:t,value:e,metadata:l});this.ln&&!this.ln(h)||(this.tn.logEvent(h),null!=s&&s.flushImmediately&&this.vr())}catch(t){this.$t.logError("AC::enqueue",t)}}}dr(){var t=this.tn;t.ar=(0,c.gr)((0,l.wn)()),t.He=Object.assign(Object.assign({},t.He),{analyticsOnlyMetadata:Object.assign(Object.assign({},t.ar),t.He.analyticsOnlyMetadata)})}vr(){this.tn.flush().catch(t=>{u.Log.error(t)})}jn(t){return Math.abs(t.data.startTime-Date.now())<1e3}On(){return this.tn.getContext().session}}e.AutoCapture=v},5423:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoCaptureEventName=void 0,e.AutoCaptureEventName={PAGE_VIEW:"auto_capture::page_view",PAGE_VIEW_END:"auto_capture::page_view_end",ERROR:"auto_capture::error",SESSION_START:"auto_capture::session_start",PERFORMANCE:"auto_capture::performance",FORM_SUBMIT:"auto_capture::form_submit",CLICK:"auto_capture::click",RAGE_CLICK:"auto_capture::rage_click",WEB_VITALS:"auto_capture::web_vitals",DEAD_CLICK:"auto_capture::dead_click"}},7875:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeadClickConfig=void 0;const o=i(6914),r=i(5423),s=i(5864),n=i(3769);e.DeadClickConfig={CLICK_CHECK_TIMEOUT:1e3,SCROLL_DELAY_MS:100,SELECTION_CHANGE_DELAY_MS:100,MUTATION_DELAY_MS:2500,ABSOLUTE_DEAD_CLICK_TIMEOUT:2750};e.default=class{constructor(t){this._r=t,this.Ns=0,this.Fs=0,this.er=[],this.Ls=e.DeadClickConfig,this.tr=(0,s.throttle)(()=>{const e=Date.now();this.er.forEach(t=>{t.scrollDelayMs||(t.scrollDelayMs=e-t.timestamp)})},50)}startTracking(){var t=(0,o.te)();t&&(t.addEventListener("click",t=>this.Bs(t),{capture:!0}),t.addEventListener("scroll",()=>this.tr(),{capture:!0,passive:!0}),t.addEventListener("selectionchange",()=>this.Us()),this.Ps())}Bs(t){var e,t=t.target;t&&(e={timestamp:Date.now(),eventTarget:t},s.interactiveElements.includes(null==(t=null==t?void 0:t.tagName)?void 0:t.toLowerCase())||this.er.push(e),this.er.length)&&!this.Gs&&(this.Gs=null==(t=(0,o.te)())?void 0:t.setTimeout(()=>{this.Ws()},this.Ls.CLICK_CHECK_TIMEOUT))}Us(){this.Fs=Date.now()}Ps(){var t=(0,o.de)();t&&(this.Vs=new MutationObserver(()=>{this.Ns=Date.now()}),this.Vs.observe(t.body,{childList:!0,subtree:!0,attributes:!0,characterData:!0}))}Ws(){if(this.er.length){clearTimeout(this.Gs),this.Gs=void 0;var t=this.er;this.er=[];for(const n of t){this.zs(n);var e,i=null!=n.scrollDelayMs&&n.scrollDelayMs<this.Ls.SCROLL_DELAY_MS,s=null!=n.selectionChangeDelayMs&&n.selectionChangeDelayMs<this.Ls.SELECTION_CHANGE_DELAY_MS,r=null!=n.mutationDelayMs&&n.mutationDelayMs<this.Ls.MUTATION_DELAY_MS;i||s||r||(i=null!=n.scrollDelayMs&&n.scrollDelayMs>this.Ls.SCROLL_DELAY_MS,s=null!=n.selectionChangeDelayMs&&n.selectionChangeDelayMs>this.Ls.SELECTION_CHANGE_DELAY_MS,r=null!=n.mutationDelayMs&&n.mutationDelayMs>this.Ls.MUTATION_DELAY_MS,e=null!=n.absoluteDelayMs&&n.absoluteDelayMs>this.Ls.ABSOLUTE_DEAD_CLICK_TIMEOUT,i||s||r||e?this.Ys(n,{scrollTimeout:i,selectionChangeTimeout:s,mutationTimeout:r,absoluteTimeout:e}):null!=n.absoluteDelayMs&&n.absoluteDelayMs<this.Ls.ABSOLUTE_DEAD_CLICK_TIMEOUT&&this.er.push(n))}this.er.length&&!this.Gs&&(this.Gs=null==(t=(0,o.te)())?void 0:t.setTimeout(()=>{this.Ws()},this.Ls.CLICK_CHECK_TIMEOUT))}}Ys(t,e){var{value:i,metadata:s}=(0,n.pn)(t.eventTarget);this._r(r.AutoCaptureEventName.DEAD_CLICK,i,Object.assign(Object.assign(Object.assign({},s),e),{scrollDelayMs:t.scrollDelayMs,selectionChangeDelayMs:t.selectionChangeDelayMs,mutationDelayMs:t.mutationDelayMs,absoluteDelayMs:t.absoluteDelayMs}))}zs(t){!t.mutationDelayMs&&0<this.Ns&&t.timestamp<=this.Ns&&(t.mutationDelayMs=Date.now()-this.Ns),!t.selectionChangeDelayMs&&0<this.Fs&&t.timestamp<=this.Fs&&(t.selectionChangeDelayMs=Date.now()-this.Fs),t.absoluteDelayMs=Date.now()-t.timestamp}}},6714:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EngagementManager=void 0;const s=i(6914);e.EngagementManager=class{constructor(){this.Wi=0,this.Yi=0,this.Qi=0,this.Hi=0,this.Xi=Date.now(),this.Ai=null,this.Zi=null,this.Zn()}Zn(){var t=(0,s.te)();t&&(t.addEventListener("scroll",()=>this.tr()),t.addEventListener("scrollend",()=>this.tr()),t.addEventListener("resize",()=>this.tr()))}tr(){var t,e=(0,s.te)(),i=(0,s.de)();e&&i&&(t=i.body.scrollHeight,i=e.scrollY||i.documentElement.scrollTop||0,e=e.innerHeight,this.Wi=i,this.Yi=Math.max(this.Yi,i),i=Math.min(100,Math.round((i+e)/t*100)),this.Qi=i,this.Hi=Math.max(this.Hi,i),this.bumpInactiveTimer())}getScrollMetrics(){return{lastScrollY:this.Wi,maxScrollY:this.Yi,lastScrollPercentage:this.Qi,maxScrollPercentage:this.Hi,scrollDepth:this.Hi}}getPageViewLength(){return Date.now()-this.Xi}setLastPageViewTime(t){this.Xi=t}startInactivityTracking(t){this.Zi=t}bumpInactiveTimer(){var t=(0,s.te)();t&&(this.Ai&&clearTimeout(this.Ai),this.Ai=t.setTimeout(()=>{this.Zi&&this.Zi()},6e5))}}},4716:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=class{constructor(){this.er=[]}isRageClick(t,e,i){this.er=this.er.filter(t=>i-t.timestamp<1e3);var s,r;return 0<this.er.length&&(s=this.er[this.er.length-1],r=t-s.x,s=e-s.y,!(Math.abs(r)+Math.abs(s)<=30))&&(this.er=[]),this.er.push({x:t,y:e,timestamp:i}),3<=this.er.length}}},2678:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebVitalsManager=void 0;const s=i(8572),r=i(6914),n=i(5423),o=i(5864),a=["CLS","FCP","LCP","TTFB"];e.WebVitalsManager=class{constructor(t){this._r=t,this.pr=!1}startTracking(){var t;this.pr||"https:"!==(t=null==(t=null==(t=(0,r.te)())?void 0:t.location)?void 0:t.protocol)&&"http:"!==t||((0,s.onCLS)(t=>this.mr(t)),(0,s.onFCP)(t=>this.mr(t)),(0,s.onLCP)(t=>this.mr(t)),(0,s.onTTFB)(t=>this.mr(t)),this.pr=!0)}mr(t){var e;void 0!==t&&void 0!==(null==t?void 0:t.name)&&""!==(e=(0,o.br)())&&a.includes(t.name)&&this.yr(t,e)}yr(t,e){""!==e&&this._r(n.AutoCaptureEventName.WEB_VITALS,e,{name:t.name,value:t.value,delta:t.delta,id:t.id})}}},1964:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigAutoCapturePlugin=e.runStatsigAutoCapture=e.AutoCapture=e.AutoCaptureEventName=void 0;var s=i(6914);const r=i(4535);Object.defineProperty(e,"AutoCapture",{enumerable:!0,get:function(){return r.AutoCapture}}),Object.defineProperty(e,"StatsigAutoCapturePlugin",{enumerable:!0,get:function(){return r.StatsigAutoCapturePlugin}}),Object.defineProperty(e,"runStatsigAutoCapture",{enumerable:!0,get:function(){return r.runStatsigAutoCapture}});var n=i(5423),i=(Object.defineProperty(e,"AutoCaptureEventName",{enumerable:!0,get:function(){return n.AutoCaptureEventName}}),Object.assign((0,s.l)(),{AutoCapture:r.AutoCapture,runStatsigAutoCapture:r.runStatsigAutoCapture,StatsigAutoCapturePlugin:r.StatsigAutoCapturePlugin}));e.default=i},5864:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.throttle=e.ir=e.nr=e.rr=e.kn=e.cn=e.Sn=e.br=e.wn=e.St=e.gn=e.sr=e.interactiveElements=void 0;const s=i(6914);function r(){var t=null!=(t=null==(t=null==(t=(0,s.te)())?void 0:t.location)?void 0:t.href)?t:"";let e;try{e=new URL(t)}catch(t){e=new URL("error:")}return e}function n(e){if(e){let t=e;for(;t;){var i=t.tagName.toLowerCase();if(["body","document"].includes(i))return null;if("a"===t.tagName.toLowerCase())return t;t=t.parentElement}}return null}e.interactiveElements=["button","a","input","select","textarea","form","select","label"],e.sr=function(t){return Object.fromEntries(Object.entries(t).filter(([,t])=>null!=t&&""!==t&&void 0!==t))},e.gn=function(t){if(!t)return null;let e=t.target||t.srcElement;return e&&e instanceof Element?e=3===e.nodeType?e.parentNode||null:e:null},e.St=function(t,e){if(!t||!e||1!==e.nodeType)return!1;var i=e.tagName.toLowerCase(),s=t.type.toLowerCase();if(e.classList.contains("statsig-no-capture"))return!1;switch(i){case"html":return!1;case"form":return"submit"===s;case"input":case"select":case"textarea":return["change"].includes(s);default:if("click"===s){if("button"===i)return!0;if(n(e))return!0}return!1}},e.wn=r,e.br=function(){var t=r().toString();return t.startsWith("error:")?"":t},e.Sn=function(){return(0,s.Gt)()||""},e.cn=function(t,e,i){t&&t.addEventListener&&t.addEventListener(e,i,!0)},e.kn=function(){var t=(0,s.te)();return t&&t.navigator&&t.navigator.connection||null},e.rr=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(t){return null}},e.nr=function(){try{return(new Date).getTimezoneOffset()}catch(t){return null}},e.ir=n,e.throttle=function(i,s){let r=0;return function(...t){var e=Date.now();e-r>=s&&(r=e,i(...t))}}},3769:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.lr=e.pn=void 0;const l=i(6914),h=i(5864),s=1e3,r=100,o=50;function n(t,e){return t?t.length>e?t.substring(0,e)+"...":t:null}function u(t){var e={},i=Array.from(t.classList);return e.classList=0<i.length?i.slice(0,r):null,e.class=(n(t.getAttribute("class"),s)||"").replace(/\s+/g," ").trim(),e.id=n(t.getAttribute("id"),s),e.ariaLabel=n(t.getAttribute("aria-label"),s),e.selector=function(e){if(!e)return"";if(!e.parentNode){var i=e.tagName.toLowerCase();if(e.id)return"#"+e.id;let t=i;return e.className&&"string"==typeof e.className&&0<(i=e.className.trim().split(/\s+/)).length&&""!==i[0]&&(t+="."+i.join(".")),t}var t=[];let s=e,r=0;for(;s&&s.nodeType===Node.ELEMENT_NODE&&r<o;){var n=function(s){var t=s.tagName.toLowerCase();if(s.id)return"#"+s.id;let r=t;s.className&&"string"==typeof s.className&&0<(t=s.className.trim().split(/\s+/)).length&&""!==t[0]&&(r+="."+t.join("."));t=s.parentElement;if(t&&1<t.children.length){let t=1,e=1,i=s.previousElementSibling;for(;i;)t++,i.tagName===s.tagName&&e++,i=i.previousElementSibling;r+=`:nth-child(${t})`,(1<e||function(t){let e=t.nextElementSibling;for(;e;){if(e.tagName===t.tagName)return 1;e=e.nextElementSibling}return}(s))&&(r+=`:nth-of-type(${e})`)}return r}(s);if(t.unshift(n),s.id)break;if((s=s.parentElement)&&"body"===s.tagName.toLowerCase())break;r++}return t.join(" > ")}(t),e}e.pn=function(t){var e,i,s,r=t.tagName.toLowerCase(),n={},o=(0,l.Gt)()||"",a=(n.tagName=r,u(t));return Object.assign(n,a),"form"===r&&Object.assign(n,((a={}).action=(e=t).getAttribute("action"),a.method=null!=(i=e.getAttribute("method"))?i:"GET",a.formName=e.getAttribute("name"),a.formId=e.getAttribute("id"),a)),["input","select","textarea"].includes(r)&&"password"!==t.getAttribute("type")&&Object.assign(n,((i={}).content=(e=t).value,i.inputName=e.getAttribute("name"),i)),(a=(0,h.ir)(t))&&Object.assign(n,((s={}).href=a.getAttribute("href"),s)),"button"!==r&&!a||Object.assign(n,((s={}).content=((r=a||t).textContent||"").trim(),r=function(t){var e={};if(t){var i=null==t?void 0:t.dataset;if(i)for(const s in i)e["data-"+s]=i[s]||""}return e}(r),Object.assign(s,r),s)),{value:o,metadata:n}},e.lr=u},9900:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.gr=e.Ji=e.$i=e.ur=void 0;const o=i(6914),a=i(5864);function n(t){var e=(0,o.de)(),i=(0,o.te)();return(0,a.sr)(Object.assign({title:null==e?void 0:e.title,current_url:null==(e=null==i?void 0:i.location)?void 0:e.href,user_agent:null!=(e=null==i?void 0:i.navigator)&&e.userAgent&&200<(null==(e=null==(e=null==i?void 0:i.navigator)?void 0:e.userAgent)?void 0:e.length)?i.navigator.userAgent.substring(0,200):null==(e=null==i?void 0:i.navigator)?void 0:e.userAgent,locale:null==(e=null==i?void 0:i.navigator)?void 0:e.language,hostname:t.hostname,pathname:t.pathname,screen_width:null==(e=null==i?void 0:i.screen)?void 0:e.width,screen_height:null==(t=null==i?void 0:i.screen)?void 0:t.height,viewport_width:null==i?void 0:i.innerWidth,viewport_height:null==i?void 0:i.innerHeight,timestamp:Date.now(),timezone:(0,a.rr)(),timezone_offset:(0,a.nr)()},s()))}function s(){var t=(0,a.kn)(),e={};return void 0!==(null==t?void 0:t.effectiveType)&&(e.effective_connection_type=t.effectiveType),void 0!==(null==t?void 0:t.rtt)&&(e.rtt_ms=t.rtt),void 0!==(null==t?void 0:t.downlink)&&(e.downlink_mbps=t.downlink,e.downlink_kbps=1e3*t.downlink),void 0!==(null==t?void 0:t.saveData)&&(e.save_data=t.saveData),e}function l(t){t=(null==t?void 0:t.referrer)||"";if(!t)return{referrer:null,referrer_domain:null,referrer_path:null,searchEngine:"",searchQuery:""};try{var e=new URL(t);const r=e.hostname;var i=["google","bing","yahoo","duckduckgo","baidu"].find(t=>r.includes(t+"."))||"",s=e.searchParams.get("yahoo"===i?"p":"q")||"";return{referrer:t,referrer_domain:e.hostname,referrer_path:e.pathname,searchEngine:i,searchQuery:s}}catch(t){return{referrer:null,referrer_domain:null,referrer_path:null,searchEngine:"",searchQuery:""}}}function h(t){const i=t.searchParams,s={};return["utm_source","utm_medium","utm_campaign","utm_term","utm_content","msclkid","dclid","fbclid","gad_source","gclid","gclsrc","wbraid","utm_id","irclid","igshid","_kx","li_fat_id","mc_cid","mc_eid","epik","qclid","rdt_cid","sccid","ttc","ttclid","ttc_id","twclid"].forEach(t=>{var e=i.get(t);e&&(s[t]=e)}),s}e.ur=n,e.$i=function(t){var e=(0,o.de)(),i=(0,o.te)();if(!e||!i)return{};var i=l(e),e=n(t),s=h(t);const r={};return t.searchParams.forEach((t,e)=>{r[e]=t}),Object.assign(Object.assign({},e),(0,a.sr)(Object.assign(Object.assign(Object.assign({},i),s),r)))},e.Ji=s,e.gr=function(t){var e=(0,o.de)(),i=(0,o.te)();if(!e||!i)return{};var s,r,i=l(e),e=h(t),t=(0,a.sr)(Object.assign(Object.assign({},i),e)),n={};for([s,r]of Object.entries(t))n["$s_"+s]=r;return n}},5980:(O,M)=>{"use strict";Object.defineProperty(M,Symbol.toStringTag,{value:"Module"});var A,j=Object.defineProperty,a=(t,e,i)=>{return i=i,(e="symbol"!=typeof e?e+"":e)in(t=t)?j(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},R=Object.defineProperty,x=(t,e,i)=>{return i=i,(e="symbol"!=typeof e?e+"":e)in(t=t)?R(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},X=(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))(X||{});const E={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},T={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},F={};function L(t){if(F[t])return F[t];var e=globalThis[t];const i=e.prototype;var s=t in E?E[t]:void 0,s=Boolean(s&&s.every(t=>{return Boolean(null==(t=null==(t=Object.getOwnPropertyDescriptor(i,t))?void 0:t.get)?void 0:t.toString().includes("[native code]"))})),r=t in T?T[t]:void 0,r=Boolean(r&&r.every(t=>{return"function"==typeof i[t]&&(null==(t=i[t])?void 0:t.toString().includes("[native code]"))}));if(s&&r)return F[t]=e.prototype,e.prototype;try{var n,o=document.createElement("iframe"),a=(document.body.appendChild(o),o.contentWindow);return a?(n=a[t].prototype,document.body.removeChild(o),n?F[t]=n:i):e.prototype}catch{return i}}const B={};function U(t,e,i){var s=t+"."+String(i);return B[s]?B[s].call(e):(t=L(t),(t=null==(t=Object.getOwnPropertyDescriptor(t,i))?void 0:t.get)?(B[s]=t).call(e):e[i])}const P={};function G(t,e,i){var s=t+"."+String(i);return P[s]?P[s].bind(e):"function"!=typeof(t=L(t)[i])?e[i]:(P[s]=t).bind(e)}const $={childNodes:function(t){return U("Node",t,"childNodes")},parentNode:function(t){return U("Node",t,"parentNode")},parentElement:function(t){return U("Node",t,"parentElement")},textContent:function(t){return U("Node",t,"textContent")},contains:function(t,e){return G("Node",t,"contains")(e)},getRootNode:function(t){return G("Node",t,"getRootNode")()},host:function(t){return t&&"host"in t?U("ShadowRoot",t,"host"):null},styleSheets:function(t){return t.styleSheets},shadowRoot:function(t){return t&&"shadowRoot"in t?U("Element",t,"shadowRoot"):null},querySelector:function(t,e){return U("Element",t,"querySelector")(e)},querySelectorAll:function(t,e){return U("Element",t,"querySelectorAll")(e)},mutationObserver:function(){return L("MutationObserver").constructor}};function W(t){return t.nodeType===t.ELEMENT_NODE}function V(t){var e=t&&"host"in t&&"mode"in t&&$.host(t)||null;return Boolean(e&&"shadowRoot"in e&&$.shadowRoot(e)===t)}function z(t){return"[object ShadowRoot]"===Object.prototype.toString.call(t)}function st(e){try{var t,i=e.rules||e.cssRules;return i?(t=Array.from(i,t=>Y(t,e.href)).join(""),s=(s=t).includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")?s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;"):s):null}catch(t){return null}var s}function Y(i,e){if("styleSheet"in i){let e;try{e=st(i.styleSheet)||((s=(t=i).cssText).split('"').length<3?s:(s=["@import",`url(${JSON.stringify(t.href)})`],""===t.layerName?s.push("layer"):t.layerName&&s.push(`layer(${t.layerName})`),t.supportsText&&s.push(`supports(${t.supportsText})`),t.media.length&&s.push(t.media.mediaText),s.join(" ")+";"))}catch(t){e=i.cssText}return i.styleSheet.href?ct(e,i.styleSheet.href):e}{let t=i.cssText;return"selectorText"in i&&i.selectorText.includes(":")&&(t=t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),e?ct(t,e):t}var t,s}class rt{constructor(){x(this,"idNodeMap",new Map),x(this,"nodeMetaMap",new WeakMap)}getId(t){return t?(null==(t=this.getMeta(t))?void 0:t.id)??-1:-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);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){var i=e.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,e)}replace(t,e){var i=this.getNode(t);i&&(i=this.nodeMetaMap.get(i))&&this.nodeMetaMap.set(e,i),this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function nt({element:t,maskInputOptions:e,tagName:i,type:s,value:r,maskInputFn:n}){let o=r||"";r=s&&ot(s);return o=e[i.toLowerCase()]||r&&e[r]?n?n(o,t):"*".repeat(o.length):o}function ot(t){return t.toLowerCase()}const at="__rrweb_original__";function lt(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?ot(e):null}function Z(t,e){let i;try{i=new URL(t,e??window.location.href)}catch(t){return null}t=i.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==t?void 0:t[1])??null}const K=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,J=/^(?:[a-z+]+:)?\/\//i,ht=/^www\..*/i,ut=/^(data:)([^,]*),(.*)/i;function ct(t,l){return(t||"").replace(K,(t,e,i,s,r,n)=>{i=i||r||n,r=e||s||"";if(!i)return t;if(J.test(i)||ht.test(i))return`url(${r}${i}${r})`;if(ut.test(i))return`url(${r}${i}${r})`;if("/"===i[0])return`url(${r}${function(t){let e="";return e=(e=-1<t.indexOf("//")?t.split("/").slice(0,3).join("/"):t.split("/")[0]).split("?")[0]}(l)+i}${r})`;var o=l.split("/"),n=i.split("/");o.pop();for(const a of n)"."!==a&&(".."===a?o.pop():o.push(a));return`url(${r}${o.join("/")}${r})`})}let dt=1;const ft=new RegExp("[^a-z0-9-_:]"),vt=-2;function pt(){return dt++}let mt,gt;const bt=/^[^ \t\n\r\u000c]+/,yt=/^[, \t\n\r\u000c]+/;function wt(s,r){if(""===r.trim())return r;let n=0;function t(t){var t=t.exec(r.substring(n));return t?(t=t[0],n+=t.length,t):""}for(var o=[];t(yt),!(n>=r.length);){let i=t(bt);if(","===i.slice(-1))i=It(s,i.substring(0,i.length-1)),o.push(i);else{let t="",e=(i=It(s,i),!1);for(;;){var a=r.charAt(n);if(""===a){o.push((i+t).trim());break}if(e)")"===a&&(e=!1);else{if(","===a){n+=1,o.push((i+t).trim());break}"("===a&&(e=!0)}t+=a,n+=1}}}return o.join(", ")}const St=new WeakMap;function It(t,e){return e&&""!==e.trim()?Ct(t,e):e}function Ct(t,e){let i=St.get(t);if(i||(i=t.createElement("a"),St.set(t,i)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return i.setAttribute("href",e),i.href}function kt(t,e,i,s){return s&&("src"!==i&&("href"!==i||"use"===e&&"#"===s[0])&&("xlink:href"!==i||"#"===s[0])&&("background"!==i||"table"!==e&&"td"!==e&&"th"!==e)?"srcset"===i?wt(t,s):"style"===i?ct(s,Ct(t)):"object"===e&&"data"===i?It(t,s):s:It(t,s))}function _t(t,e){return("video"===t||"audio"===t)&&"autoplay"===e}function Ot(e,i,t){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!t&&Ot($.parentNode(e),i,t);for(let t=e.classList.length;t--;){var s=e.classList[t];if(i.test(s))return!0}return!!t&&Ot($.parentNode(e),i,t)}function Mt(t,e,i,s){let r;if(W(t)){if(r=t,!$.childNodes(r).length)return!1}else{if(null===$.parentElement(t))return!1;r=$.parentElement(t)}try{if("string"==typeof e){if(s){if(r.closest("."+e))return!0}else if(r.classList.contains(e))return!0}else if(Ot(r,e,s))return!0;if(i)if(s){if(r.closest(i))return!0}else if(r.matches(i))return!0}catch(t){}return!1}function At(i,t){var e,s,r,n,{doc:o,mirror:t,blockClass:a,blockSelector:l,needsMask:F,inlineStylesheet:L,maskInputOptions:B={},maskTextFn:U,maskInputFn:P,dataURLOptions:G={},inlineImages:W,recordCanvas:V,keepIframeSrcFn:z,newlyAddedElement:Y=!1}=t,h=(e=o,!(t=t).hasNode(e)||1===(t=t.getId(e))?void 0:t);switch(i.nodeType){case i.DOCUMENT_NODE:return"CSS1Compat"!==i.compatMode?{type:X.Document,childNodes:[],compatMode:i.compatMode}:{type:X.Document,childNodes:[]};case i.DOCUMENT_TYPE_NODE:return{type:X.DocumentType,name:i.name,publicId:i.publicId,systemId:i.systemId,rootId:h};case i.ELEMENT_NODE:{var u=i;var c={doc:o,blockClass:a,blockSelector:l,inlineStylesheet:L,maskInputOptions:B,maskInputFn:P,dataURLOptions:G,inlineImages:W,recordCanvas:V,keepIframeSrcFn:z,newlyAddedElement:Y,rootId:h};const{doc:b,blockClass:y,blockSelector:w,inlineStylesheet:S,maskInputOptions:I={},maskInputFn:C,dataURLOptions:k={},inlineImages:_,recordCanvas:O,keepIframeSrcFn:M,newlyAddedElement:A=!1,rootId:j}=c,R=function(e,i,t){try{if("string"==typeof i){if(e.classList.contains(i))return!0}else for(let t=e.classList.length;t--;){var s=e.classList[t];if(i.test(s))return!0}if(t)return e.matches(t)}catch(t){}return!1}(u,y,w),x=function(t){return t instanceof HTMLFormElement?"form":(t=ot(t.tagName),ft.test(t)?"div":t)}(u);let e={};var Z=u.attributes.length;for(let t=0;t<Z;t++){var d=u.attributes[t];_t(x,d.name,d.value)||(e[d.name]=kt(b,x,ot(d.name),d.value))}if("link"===x&&S){c=Array.from(b.styleSheets).find(t=>t.href===u.href);let t=null;(t=c?st(c):t)&&(delete e.rel,delete e.href,e.ws=t)}"style"===x&&u.sheet&&!(u.innerText||$.textContent(u)||"").trim().length&&(c=st(u.sheet))&&(e.ws=c);"input"!==x&&"textarea"!==x&&"select"!==x||(c=u.value,s=u.checked,"radio"!==e.type&&"checkbox"!==e.type&&"submit"!==e.type&&"button"!==e.type&&c?e.value=nt({element:u,type:lt(u),tagName:x,value:c,maskInputOptions:I,maskInputFn:C}):s&&(e.checked=s));"option"===x&&(u.selected&&!I.select?e.selected=!0:delete e.selected);"dialog"===x&&u.open&&(e.rr_open_mode=u.matches("dialog:modal")?"modal":"non-modal");"canvas"===x&&O&&("2d"===u.__context?function(i){var s=i.getContext("2d");if(s)for(let e=0;e<i.width;e+=50)for(let t=0;t<i.height;t+=50){var r=s.getImageData,r=at in r?r[at]:r;if(new Uint32Array(r.call(s,e,t,Math.min(50,i.width-e),Math.min(50,i.height-t)).data.buffer).some(t=>0!==t))return}return 1}(u)||(e.rr_dataURL=u.toDataURL(k.type,k.quality)):"__context"in u||(c=u.toDataURL(k.type,k.quality),(s=b.createElement("canvas")).width=u.width,s.height=u.height,r=s.toDataURL(k.type,k.quality),c!==r&&(e.rr_dataURL=c)));if("img"===x&&_){mt||(mt=b.createElement("canvas"),gt=mt.getContext("2d"));const E=u,T=E.currentSrc||E.getAttribute("src")||"<unknown-src>",D=E.crossOrigin,N=()=>{E.removeEventListener("load",N);try{mt.width=E.naturalWidth,mt.height=E.naturalHeight,gt.drawImage(E,0,0),e.rr_dataURL=mt.toDataURL(k.type,k.quality)}catch(t){if("anonymous"!==E.crossOrigin)return E.crossOrigin="anonymous",void(E.complete&&0!==E.naturalWidth?N():E.addEventListener("load",N));console.warn(`Cannot inline img src=${T}! Error: `+t)}"anonymous"===E.crossOrigin&&(D?e.crossOrigin=D:E.removeAttribute("crossorigin"))};E.complete&&0!==E.naturalWidth?N():E.addEventListener("load",N)}"audio"!==x&&"video"!==x||((r=e).rr_mediaState=u.paused?"paused":"played",r.rr_mediaCurrentTime=u.currentTime,r.rr_mediaPlaybackRate=u.playbackRate,r.rr_mediaMuted=u.muted,r.rr_mediaLoop=u.loop,r.rr_mediaVolume=u.volume);A||(u.scrollLeft&&(e.rr_scrollLeft=u.scrollLeft),u.scrollTop&&(e.rr_scrollTop=u.scrollTop));R&&({width:c,height:f}=u.getBoundingClientRect(),e={class:e.class,rr_width:c+"px",rr_height:f+"px"});"iframe"!==x||M(e.src)||(u.contentDocument||(e.rr_src=e.src),delete e.src);let t;try{customElements.get(x)&&(t=!0)}catch(t){}return{type:X.Element,tagName:x,attributes:e,childNodes:[],isSVG:function(t){return Boolean("svg"===t.tagName||t.ownerSVGElement)}(u)||void 0,needBlock:R,rootId:j,isCustom:t};return}case i.TEXT_NODE:{c=i;var f={doc:o,needsMask:F,maskTextFn:U,rootId:h};var{needsMask:K,maskTextFn:v,rootId:J}=f,p=$.parentNode(c),m=p&&p.tagName;let t=$.textContent(c);var g="STYLE"===m||void 0,m="SCRIPT"===m||void 0;if(g&&t){try{c.nextSibling||c.previousSibling||null!=(n=p.sheet)&&n.cssRules&&(t=st(p.sheet))}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: "+t,c)}t=ct(t,Ct(f.doc))}m&&(t="SCRIPT_PLACEHOLDER");!g&&!m&&t&&K&&(t=v?v(t,$.parentElement(c)):t.replace(/[\S]/g,"*"));return{type:X.Text,textContent:t||"",isStyle:g,rootId:J};return}case i.CDATA_SECTION_NODE:return{type:X.CDATA,textContent:"",rootId:h};case i.COMMENT_NODE:return{type:X.Comment,textContent:$.textContent(i)||"",rootId:h};default:return!1}}function D(t){return null==t?"":t.toLowerCase()}function jt(e,t){const{doc:i,mirror:s,blockClass:r,blockSelector:n,maskTextClass:o,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:h=!0,maskInputOptions:u={},maskTextFn:c,maskInputFn:d,slimDOMOptions:f,dataURLOptions:v={},inlineImages:p=!1,recordCanvas:m=!1,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:y=5e3,onStylesheetLoad:w,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:I=()=>!1,newlyAddedElement:C=!1}=t;let k=t["needsMask"],{preserveWhiteSpace:_=!0}=t;k||(t=void 0===k,k=Mt(e,o,a,t));t=At(e,{doc:i,mirror:s,blockClass:r,blockSelector:n,needsMask:k,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,dataURLOptions:v,inlineImages:p,recordCanvas:m,keepIframeSrcFn:I,newlyAddedElement:C});if(!t)return console.warn(e,"not serialized"),null;let O;O=s.hasNode(e)?s.getId(e):!function(t,e){if(e.comment&&t.type===X.Comment)return 1;if(t.type===X.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===Z(t.attributes.href)))return 1;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(D(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===D(t.attributes.name)||"icon"===D(t.attributes.rel)||"apple-touch-icon"===D(t.attributes.rel)||"shortcut icon"===D(t.attributes.rel))))return 1;if("meta"===t.tagName){if(e.headMetaDescKeywords&&D(t.attributes.name).match(/^description|keywords$/))return 1;if(e.headMetaSocial&&(D(t.attributes.property).match(/^(og|twitter|fb):/)||D(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===D(t.attributes.name)))return 1;if(e.headMetaRobots&&("robots"===D(t.attributes.name)||"googlebot"===D(t.attributes.name)||"bingbot"===D(t.attributes.name)))return 1;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return 1;if(e.headMetaAuthorship&&("author"===D(t.attributes.name)||"generator"===D(t.attributes.name)||"framework"===D(t.attributes.name)||"publisher"===D(t.attributes.name)||"progid"===D(t.attributes.name)||D(t.attributes.property).match(/^article:/)||D(t.attributes.property).match(/^product:/)))return 1;if(e.headMetaVerification&&("google-site-verification"===D(t.attributes.name)||"yandex-verification"===D(t.attributes.name)||"csrf-token"===D(t.attributes.name)||"p:domain_verify"===D(t.attributes.name)||"verify-v1"===D(t.attributes.name)||"verification"===D(t.attributes.name)||"shopify-checkout-api-token"===D(t.attributes.name)))return 1}}}(t,f)&&(_||t.type!==X.Text||t.isStyle||t.textContent.replace(/^\s+|\s+$/gm,"").length)?dt++:vt;var M=Object.assign(t,{id:O});if(s.add(e,M),O===vt)return null;g&&g(e);let A=!l;if(M.type===X.Element&&(A=A&&!M.needBlock,delete M.needBlock,t=$.shadowRoot(e))&&z(t)&&(M.isShadowHost=!0),(M.type===X.Document||M.type===X.Element)&&A){f.headWhitespace&&M.type===X.Element&&"head"===M.tagName&&(_=!1);var j={doc:i,mirror:s,blockClass:r,blockSelector:n,needsMask:k,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,slimDOMOptions:f,dataURLOptions:v,inlineImages:p,recordCanvas:m,preserveWhiteSpace:_,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:S,keepIframeSrcFn:I};if(M.type!==X.Element||"textarea"!==M.tagName||void 0===M.attributes.value)for(const E of Array.from($.childNodes(e))){var R=jt(E,j);R&&M.childNodes.push(R)}let t=null;if(W(e)&&(t=$.shadowRoot(e)))for(const T of Array.from($.childNodes(t))){var x=jt(T,j);x&&(z(t)&&(x.isShadow=!0),M.childNodes.push(x))}}t=$.parentNode(e);return t&&V(t)&&z(t)&&(M.isShadow=!0),M.type===X.Element&&"iframe"===M.tagName&&function(i,s,r){var n=i.contentWindow;if(n){let t=!1,e;try{e=n.document.readyState}catch(t){return}if("complete"!==e){const o=setTimeout(()=>{t||(s(),t=!0)},r);void i.addEventListener("load",()=>{clearTimeout(o),t=!0,s()})}else{r="about:blank";if(n.location.href!==r||i.src===r||""===i.src)return setTimeout(s,0),i.addEventListener("load",s);i.addEventListener("load",s)}}}(e,()=>{var t=e.contentDocument;t&&b&&(t=jt(t,{doc:t,mirror:s,blockClass:r,blockSelector:n,needsMask:k,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,slimDOMOptions:f,dataURLOptions:v,inlineImages:p,recordCanvas:m,preserveWhiteSpace:_,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:S,keepIframeSrcFn:I}))&&b(e,t)},y),M.type===X.Element&&"link"===M.tagName&&"string"==typeof M.attributes.rel&&("stylesheet"===M.attributes.rel||"preload"===M.attributes.rel&&"string"==typeof M.attributes.href&&"css"===Z(M.attributes.href))&&function(t,e,i){let s=!1,r;try{r=t.sheet}catch(t){return}if(!r){const n=setTimeout(()=>{s||(e(),s=!0)},i);t.addEventListener("load",()=>{clearTimeout(n),s=!0,e()})}}(e,()=>{var t;w&&(t=jt(e,{doc:i,mirror:s,blockClass:r,blockSelector:n,needsMask:k,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,slimDOMOptions:f,dataURLOptions:v,inlineImages:p,recordCanvas:m,preserveWhiteSpace:_,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:S,keepIframeSrcFn:I}))&&w(e,t)},S),M}function Rt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function xt(i){var e,s;return i.__esModule?i:("function"==typeof(e=i.default)?(s=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)}).prototype=e.prototype:s={},Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(i).forEach(function(t){var e=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(s,t,e.get?e:{enumerable:!0,get:function(){return i[t]}})}),s)}function Et(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}}var t={exports:{}},e=String,t=(t.exports=Et(),t.exports.createColors=Et,t.exports),i=xt(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Tt=t,Dt=i;var t=class Fo extends Error{constructor(t,e,i,s,r,n){super(t),this.name="CssSyntaxError",this.reason=t,r&&(this.file=r),s&&(this.source=s),n&&(this.plugin=n),void 0!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Fo)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let e=this.source;null==t&&(t=Tt.isColorSupported);var i=(e=Dt&&t?Dt(e):e).split(/\r?\n/);let s=Math.max(this.line-3,0);var r=Math.min(this.line+2,i.length);let n=String(r).length,o,a;if(t){let{bold:e,gray:i,red:s}=Tt.createColors(!0);o=t=>e(s(t)),a=t=>i(t)}else o=a=t=>t;return i.slice(s,r).map((t,e)=>{var e=s+1+e,i=" "+(" "+e).slice(-n)+" | ";return e===this.line?(e=a(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," "),o(">")+a(i)+t+"\n "+e+o("^")):" "+a(i)+t}).join("\n")}toString(){let t=this.showSourceCode();return t=t&&"\n\n"+t+"\n",this.name+": "+this.message+t}},s=t,t=(t.default=t,{});t.isClean=Symbol("isClean"),t.my=Symbol("my");const Nt={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var r=class{constructor(t){this.builder=t}atrule(t,e){let i="@"+t.name;var s=t.params?this.rawValue(t,"params"):"";void 0!==t.raws.afterName?i+=t.raws.afterName:s&&(i+=" "),t.nodes?this.block(t,i+s):(e=(t.raws.between||"")+(e?";":""),this.builder(i+s+e,t))}beforeAfter(t,e){let i,s=(i="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose"),t.parent),r=0;for(;s&&"root"!==s.type;)r+=1,s=s.parent;if(i.includes("\n")){var n=this.raw(t,null,"indent");if(n.length)for(let t=0;t<r;t++)i+=n}return i}block(t,e){var i=this.raw(t,"between","beforeOpen");this.builder(e+i+"{",t,"start");let s;(s=t.nodes&&t.nodes.length?(this.body(t),this.raw(t,"after")):this.raw(t,"after","emptyBody"))&&this.builder(s),this.builder("}",t,"end")}body(e){let i=e.nodes.length-1;for(;0<i&&"comment"===e.nodes[i].type;)--i;var s=this.raw(e,"semicolon");for(let t=0;t<e.nodes.length;t++){var r=e.nodes[t],n=this.raw(r,"before");n&&this.builder(n),this.stringify(r,i!==t||s)}}comment(t){var e=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+i+"*/",t)}decl(t,e){var i=this.raw(t,"between","colon");let s=t.prop+i+this.rawValue(t,"value");t.important&&(s+=t.raws.important||" !important"),e&&(s+=";"),this.builder(s,t)}document(t){this.body(t)}raw(t,e,i){let s;if(i=i||e,!e||void 0===(s=t.raws[e])){var r=t.parent;if("before"===i){if(!r||"root"===r.type&&r.first===t)return"";if(r&&"document"===r.type)return""}if(!r)return Nt[i];r=t.root();if(r.rawCache||(r.rawCache={}),void 0!==r.rawCache[i])return r.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(t,i);var n="raw"+((n=i)[0].toUpperCase()+n.slice(1));this[n]?s=this[n](r,t):r.walk(t=>{if(void 0!==(s=t.raws[e]))return!1}),void 0===s&&(s=Nt[i]),r.rawCache[i]=s}return s}rawBeforeClose(t){let e;return t.walk(t=>{if(t.nodes&&0<t.nodes.length&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e=e&&e.replace(/\S/g,"")}rawBeforeComment(t,e){let i;return t.walkComments(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=void 0===i?this.raw(e,null,"beforeDecl"):i&&i.replace(/\S/g,"")}rawBeforeDecl(t,e){let i;return t.walkDecls(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=void 0===i?this.raw(e,null,"beforeRule"):i&&i.replace(/\S/g,"")}rawBeforeOpen(t){let e;return t.walk(t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1}),e}rawBeforeRule(e){let i;return e.walk(t=>{if(t.nodes&&(t.parent!==e||e.first!==t)&&void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=i&&i.replace(/\S/g,"")}rawColon(t){let e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1}),e}rawIndent(i){if(i.raws.indent)return i.raws.indent;let s;return i.walk(t=>{var e=t.parent;if(e&&e!==i&&e.parent&&e.parent===i&&void 0!==t.raws.before)return e=t.raws.before.split("\n"),s=(s=e[e.length-1]).replace(/\S/g,""),!1}),s}rawSemicolon(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1}),e}rawValue(t,e){var i=t[e],t=t.raws[e];return t&&t.value===i?t.raw:i}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},n=r;r.default=r;let Ft=n;function Lt(t,e){new Ft(e).stringify(t)}r=Lt;Lt.default=Lt;let{isClean:Bt,my:Ut}=t,Pt=s,Gt=n,Wt=r;function Vt(e,i){let s=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){let t=e[r];var n=typeof t;"parent"===r&&"object"==n?i&&(s[r]=i):"source"===r?s[r]=t:Array.isArray(t)?s[r]=t.map(t=>Vt(t,s)):("object"==n&&null!==t&&(t=Vt(t)),s[r]=t)}return s}var n=class{constructor(t={}){for(var e in this.raws={},this[Bt]=!1,this[Ut]=!0,t)if("nodes"===e){this.nodes=[];for(var i of t[e])"function"==typeof i.clone?this.append(i.clone()):this.append(i)}else this[e]=t[e]}addToError(t){var e;return t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)&&(e=this.source,t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)),t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(var e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){var e,i=Vt(this);for(e in t)i[e]=t[e];return i}cloneAfter(t={}){t=this.clone(t);return this.parent.insertAfter(this,t),t}cloneBefore(t={}){t=this.clone(t);return this.parent.insertBefore(this,t),t}error(t,e={}){var i,s;return this.source?({end:i,start:s}=this.rangeBy(e),this.source.input.error(t,{column:s.column,line:s.line},{column:i.column,line:i.line},e)):new Pt(t)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,i){return t[e]!==i&&(t[e]=i,"prop"===e||"value"===e||"name"===e||"params"===e||"important"===e||"text"===e)&&t.markDirty(),!0}}}markDirty(){if(this[Bt]){this[Bt]=!1;let t=this;for(;t=t.parent;)t[Bt]=!1}}next(){var t;if(this.parent)return t=this.parent.index(this),this.parent.nodes[t+1]}positionBy(t,e){let i=this.source.start;return t.index?i=this.positionInside(t.index,e):t.word&&-1!==(t=(e=this.toString()).indexOf(t.word))&&(i=this.positionInside(t,e)),i}positionInside(e,t){var i=t||this.toString();let s=this.source.start.column,r=this.source.start.line;for(let t=0;t<e;t++)"\n"===i[t]?(s=1,r+=1):s+=1;return{column:s,line:r}}prev(){var t;if(this.parent)return t=this.parent.index(this),this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};var s,r;return t.word?-1!==(r=(s=this.toString()).indexOf(t.word))&&(e=this.positionInside(r,s),i=this.positionInside(r+t.word.length,s)):(t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):t.index&&(i=this.positionInside(t.index+1))),{end:i=i.line<e.line||i.line===e.line&&i.column<=e.column?{column:e.column+1,line:e.line}:i,start:e}}raw(t,e){return(new Gt).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...i){if(this.parent){let t=this,e=!1;for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){let t=this;for(;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var i,s={},r=null==e;e=e||new Map;let n=0;for(i in this)if(Object.prototype.hasOwnProperty.call(this,i)&&"parent"!==i&&"proxyCache"!==i){var o=this[i];if(Array.isArray(o))s[i]=o.map(t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t);else if("object"==typeof o&&o.toJSON)s[i]=o.toJSON(null,e);else if("source"===i){let t=e.get(o.input);null==t&&(t=n,e.set(o.input,n),n++),s[i]={end:o.end,inputId:t,start:o.start}}else s[i]=o}return r&&(s.inputs=[...e.keys()].map(t=>t.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=Wt){t.stringify&&(t=t.stringify);let e="";return t(this,t=>{e+=t}),e}warn(t,e,i){var s,r={node:this};for(s in i)r[s]=i[s];return t.warn(e,r)}get proxyOf(){return this}},o=n,n=(n.default=n,o),n=class extends n{constructor(t){super(t=t&&void 0!==t.value&&"string"!=typeof t.value?{...t,value:String(t.value)}:t),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}},l=n;n.default=n;n={nanoid:(t=21)=>{let e="",i=t;for(;i--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(s,r=21)=>(t=r)=>{let e="",i=t;for(;i--;)e+=s[Math.random()*s.length|0];return e}};let{SourceMapConsumer:zt,SourceMapGenerator:Yt}=i,{existsSync:Zt,readFileSync:Kt}=i,{dirname:Jt,join:Xt}=i;var h=class{constructor(t,e){!1!==e.map&&(this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:"),t=e.map?e.map.prev:void 0,t=this.loadMap(e.from,t),!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Jt(this.mapFile)),t)&&(this.text=t)}consumer(){return this.consumerCache||(this.consumerCache=new zt(this.text)),this.consumerCache}decodeInline(t){if(/^data:application\/json;charset=utf-?8,/.test(t)||/^data:application\/json,/.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(t)||/^data:application\/json;base64,/.test(t))return e=t.substr(RegExp.lastMatch.length),Buffer?Buffer.from(e,"base64").toString():window.atob(e);var e=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+e)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e,i=t.match(/\/\*\s*# sourceMappingURL=/gm);i&&(i=t.lastIndexOf(i.pop()),e=t.indexOf("*/",i),-1<i)&&-1<e&&(this.annotation=this.getAnnotationURL(t.substring(i,e)))}loadFile(t){if(this.root=Jt(t),Zt(t))return this.mapFile=t,Kt(t,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof zt)return Yt.fromSourceMap(t).toString();if(t instanceof Yt)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}t=t(e);if(t){var i=this.loadFile(t);if(i)return i;throw new Error("Unable to load previous source map: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=Xt(Jt(e),t)),this.loadFile(t)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}},u=h,{SourceMapConsumer:h,SourceMapGenerator:c}=(h.default=h,i);let{fileURLToPath:$t,pathToFileURL:Ht}=i,{isAbsolute:qt,resolve:Qt}=i,te=n["nanoid"];n=i;let ee=s,ie=u,se=Symbol("fromOffsetCache"),re=Boolean(h&&c),ne=Boolean(Qt&&qt);h=class{constructor(t,e={}){if(null==t||"object"==typeof t&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);this.css=t.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,e.from&&(!ne||/^\w+:\/\//.test(e.from)||qt(e.from)?this.file=e.from:this.file=Qt(e.from)),ne&&re&&(t=new ie(this.css,e)).text&&(e=(this.map=t).consumer().file,!this.file)&&e&&(this.file=this.mapResolve(e)),this.file||(this.id="<input css "+te(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,i,s={}){let r,n,o;e&&"object"==typeof e?(a=i,i="number"==typeof(l=e).offset?(e=(h=this.fromOffset(l.offset)).line,h.col):(e=l.line,l.column),o="number"==typeof a.offset?(h=this.fromOffset(a.offset),n=h.line,h.col):(n=a.line,a.column)):i||(e=(l=this.fromOffset(e)).line,i=l.col);var a,l,h=this.origin(e,i,n,o);return(r=h?new ee(t,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,s.plugin):new ee(t,void 0===n?e:{column:i,line:e},void 0===n?i:{column:o,line:n},this.css,this.file,s.plugin)).input={column:i,endColumn:o,endLine:n,line:e,source:this.css},this.file&&(Ht&&(r.input.url=Ht(this.file).toString()),r.input.file=this.file),r}fromOffset(e){let s;if(this[se])s=this[se];else{var r=this.css.split("\n");s=new Array(r.length);let i=0;for(let t=0,e=r.length;t<e;t++)s[t]=i,i+=r[t].length+1;this[se]=s}let i=0;if(s[s.length-1]<=e)i=s.length-1;else{let t=s.length-2;for(var n;i<t;)if(n=i+(t-i>>1),e<s[n])t=n-1;else{if(!(e>=s[n+1])){i=n;break}i=n+1}}return{col:e-s[i]+1,line:i+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Qt(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,i,s){if(!this.map)return!1;var r=this.map.consumer(),e=r.originalPositionFor({column:e,line:t});if(!e.source)return!1;let n;"number"==typeof i&&(n=r.originalPositionFor({column:s,line:i}));let o;o=qt(e.source)?Ht(e.source):new URL(e.source,this.map.consumer().sourceRoot||Ht(this.map.mapFile));t={column:e.column,endColumn:n&&n.column,endLine:n&&n.line,line:e.line,url:o.toString()};if("file:"===o.protocol){if(!$t)throw new Error("file: protocol is not available in this PostCSS build");t.file=$t(o)}s=r.sourceContentFor(e.source);return s&&(t.source=s),t}toJSON(){var t,e={};for(t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache)&&(e.map.consumerCache=void 0),e}get from(){return this.file||this.id}},c=h;h.default=h,n&&n.registerInput&&n.registerInput(h);let{SourceMapConsumer:oe,SourceMapGenerator:ae}=i,{dirname:le,relative:he,resolve:ue,sep:ce}=i,de=i["pathToFileURL"],fe=c,ve=Boolean(oe&&ae),pe=Boolean(le&&ue&&he&&ce);n=class{constructor(t,e,i,s){this.stringify=t,this.mapOpts=i.map||{},this.root=e,this.opts=i,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t,e=(t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map","\n");this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var i=this.toUrl(this.path(e.file)),s=e.root||le(e.file);let t;!1===this.mapOpts.sourcesContent?(t=new oe(e.text)).sourcesContent&&(t.sourcesContent=null):t=e.consumer(),this.map.applySourceMap(t,i,this.toUrl(this.path(s)))}}clearAnnotation(){var e;if(!1!==this.mapOpts.annotation)if(this.root)for(let t=this.root.nodes.length-1;0<=t;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),pe&&ve&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){var t;return this.root?this.generateString():1===this.previous().length?((t=this.previous()[0].consumer()).file=this.outputFile(),this.map=ae.fromSourceMap(t,{ignoreInvalidMapping:!0})):(this.map=new ae({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"})),this.isSourcesContent()&&this.setSourcesContent(),this.root&&0<this.previous().length&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new ae({file:this.outputFile(),ignoreInvalidMapping:!0});let s=1,r=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""},a,l;this.stringify(this.root,(t,e,i)=>{this.css+=t,e&&"end"!==i&&(o.generated.line=s,o.generated.column=r-1,e.source&&e.source.start?(o.source=this.sourcePath(e),o.original.line=e.source.start.line,o.original.column=e.source.start.column-1):(o.source=n,o.original.line=1,o.original.column=0),this.map.addMapping(o)),(a=t.match(/\n/g))?(s+=a.length,l=t.lastIndexOf("\n"),r=t.length-l):r+=t.length,e&&"start"!==i&&(t=e.parent||{raws:{}},"decl"!==e.type&&("atrule"!==e.type||e.nodes)||e!==t.last||t.raws.semicolon)&&(e.source&&e.source.end?(o.source=this.sourcePath(e),o.original.line=e.source.end.line,o.original.column=e.source.end.column-1,o.generated.line=s,o.generated.column=r-2):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=s,o.generated.column=r-1),this.map.addMapping(o))})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){var t;return void 0!==this.mapOpts.inline?this.mapOpts.inline:(void 0===(t=this.mapOpts.annotation)||!0===t)&&(!this.previous().length||this.previous().some(t=>t.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:0<this.previous().length}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;var e=this.memoizedPaths.get(t);if(e)return e;let i=this.opts.to?le(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(i=le(ue(i,this.mapOpts.annotation)));e=he(i,t);return this.memoizedPaths.set(t,e),e}previous(){var t;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(t=>{t.source&&t.source.input.map&&(t=t.source.input.map,this.previousMaps.includes(t)||this.previousMaps.push(t))}):(t=new fe(this.originalCSS,this.opts)).map&&this.previousMaps.push(t.map)),this.previousMaps}setSourcesContent(){let i={};var t;this.root?this.root.walk(t=>{var e;t.source&&(e=t.source.input.from)&&!i[e]&&(i[e]=!0,e=this.usesFileUrls?this.toFileUrl(e):this.toUrl(this.path(e)),this.map.setSourceContent(e,t.source.input.css))}):this.css&&(t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(t,this.css))}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(de)return e=de(t).toString(),this.memoizedFileURLs.set(t,e),e;throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===ce&&(t=t.replace(/\\/g,"/"));e=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,e),e}},h=class extends o{constructor(t){super(t),this.type="comment"}},i=h;h.default=h;let{isClean:me,my:ge}=t,be=l,ye=i,we,Se,Ie,Ce;let ke=class Lo extends o{append(...t){for(var e of t){var i;for(i of this.normalize(e,this.last))this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.cleanRaws(t)}each(i){if(this.proxyOf.nodes){var s=this.getIterator();let t,e;for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],!1!==(e=i(this.proxyOf.nodes[t],t)));)this.indexes[s]+=1;return delete this.indexes[s],e}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(e,s){return"proxyOf"===s?e:e[s]&&("each"===s||"string"==typeof s&&s.startsWith("walk")?(...t)=>e[s](...t.map(i=>"function"==typeof i?(t,e)=>i(t.toProxy(),e):i)):"every"===s||"some"===s?i=>e[s]((t,...e)=>i(t.toProxy(),...e)):"root"===s?()=>e.root().toProxy():"nodes"===s?e.nodes.map(t=>t.toProxy()):"first"===s||"last"===s?e[s].toProxy():e[s])},set(t,e,i){return t[e]!==i&&(t[e]=i,"name"===e||"params"===e||"selector"===e)&&t.markDirty(),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var i,s,r,n=this.index(t),o=this.normalize(e,this.proxyOf.nodes[n]).reverse(),n=this.index(t);for(i of o)this.proxyOf.nodes.splice(n+1,0,i);for(r in this.indexes)n<(s=this.indexes[r])&&(this.indexes[r]=s+o.length);return this.markDirty(),this}insertBefore(t,e){var i,s,r,n=this.index(t),o=this.normalize(e,this.proxyOf.nodes[n],0===n&&"prepend").reverse(),n=this.index(t);for(i of o)this.proxyOf.nodes.splice(n,0,i);for(r in this.indexes)n<=(s=this.indexes[r])&&(this.indexes[r]=s+o.length);return this.markDirty(),this}normalize(t,e){if("string"==typeof t)t=function e(t){return t.map(t=>(t.nodes&&(t.nodes=e(t.nodes)),delete t.source,t))}(we(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t))for(var i of t=t.slice(0))i.parent&&i.parent.removeChild(i,"ignore");else if("root"===t.type&&"document"!==this.type)for(var s of t=t.nodes.slice(0))s.parent&&s.parent.removeChild(s,"ignore");else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new be(t)]}else if(t.selector)t=[new Se(t)];else if(t.name)t=[new Ie(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new ye(t)]}return t.map(t=>(t[ge]||Lo.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[me]&&function t(e){if(e[me]=!1,e.proxyOf.nodes)for(var i of e.proxyOf.nodes)t(i)}(t),void 0===t.raws.before&&e&&void 0!==e.raws.before&&(t.raws.before=e.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...t){for(var e of t=t.reverse()){var i,s,r=this.normalize(e,this.first,"prepend").reverse();for(i of r)this.proxyOf.nodes.unshift(i);for(s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(t){return(t.parent=this).proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e,i;for(i in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t<=(e=this.indexes[i])&&(this.indexes[i]=e-1);return this.markDirty(),this}replaceValues(e,i,s){return s||(s=i,i={}),this.walkDecls(t=>{i.props&&!i.props.includes(t.prop)||i.fast&&!t.value.includes(i.fast)||(t.value=t.value.replace(e,s))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(s){return this.each((e,t)=>{let i;try{i=s(e,t)}catch(t){throw e.addToError(t)}return i=!1!==i&&e.walk?e.walk(s):i})}walkAtRules(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("atrule"===t.type&&i.test(t.name))return s(t,e)}):this.walk((t,e)=>{if("atrule"===t.type&&t.name===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("atrule"===t.type)return s(t,e)}))}walkComments(i){return this.walk((t,e)=>{if("comment"===t.type)return i(t,e)})}walkDecls(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("decl"===t.type&&i.test(t.prop))return s(t,e)}):this.walk((t,e)=>{if("decl"===t.type&&t.prop===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("decl"===t.type)return s(t,e)}))}walkRules(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("rule"===t.type&&i.test(t.selector))return s(t,e)}):this.walk((t,e)=>{if("rule"===t.type&&t.selector===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("rule"===t.type)return s(t,e)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};ke.registerParse=t=>{we=t},ke.registerRule=t=>{Se=t},ke.registerAtRule=t=>{Ie=t},ke.registerRoot=t=>{Ce=t};var h=ke,d=((ke.default=ke).rebuild=t=>{"atrule"===t.type?Object.setPrototypeOf(t,Ie.prototype):"rule"===t.type?Object.setPrototypeOf(t,Se.prototype):"decl"===t.type?Object.setPrototypeOf(t,be.prototype):"comment"===t.type?Object.setPrototypeOf(t,ye.prototype):"root"===t.type&&Object.setPrototypeOf(t,Ce.prototype),t[ge]=!0,t.nodes&&t.nodes.forEach(t=>{ke.rebuild(t)})},h);let _e,Oe;var d=class extends d{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new _e(new Oe,this,t).stringify()}},f=(d.registerLazyResult=t=>{_e=t},d.registerProcessor=t=>{Oe=t},d);d.default=d;var d=class{constructor(t,e={}){for(var i in this.type="warning",this.text=t,e.node&&e.node.source&&(t=e.node.rangeBy(e),this.line=t.start.line,this.column=t.start.column,this.endLine=t.end.line,this.endColumn=t.end.column),e)this[i]=e[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},v=d;d.default=d;let Me=v;var d=class{constructor(t,e,i){this.processor=t,this.messages=[],this.root=e,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);t=new Me(t,e);return this.messages.push(t),t}warnings(){return this.messages.filter(t=>"warning"===t.type)}get content(){return this.css}},p=d;d.default=d;const Ae="'".charCodeAt(0),je='"'.charCodeAt(0),Re="\\".charCodeAt(0),xe="/".charCodeAt(0),Ee="\n".charCodeAt(0),Te=" ".charCodeAt(0),De="\f".charCodeAt(0),Ne="\t".charCodeAt(0),Fe="\r".charCodeAt(0),Le="[".charCodeAt(0),Be="]".charCodeAt(0),Ue="(".charCodeAt(0),Pe=")".charCodeAt(0),Ge="{".charCodeAt(0),We="}".charCodeAt(0),Ve=";".charCodeAt(0),ze="*".charCodeAt(0),Ye=":".charCodeAt(0),Ze="@".charCodeAt(0),Ke=/[\t\n\f\r "#'()/;[\\\]{}]/g,Je=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Xe=/.[\r\n"'(/\\]/,$e=/[\da-f]/i;var d=class extends h{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}},m=d,d=(h.registerAtRule(d.default=d),h);let He,qe;var g=class extends d{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,i){t=super.normalize(t);if(e)if("prepend"===i)1<this.nodes.length?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var s of t)s.raws.before=e.raws.before;return t}removeChild(t,e){var i=this.index(t);return!e&&0===i&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(t)}toResult(t={}){return new He(new qe,this,t).stringify()}},b=(g.registerLazyResult=t=>{He=t},g.registerProcessor=t=>{qe=t},g);d.registerRoot(g.default=g);let Qe={comma(t){return Qe.split(t,[","],!0)},space(t){return Qe.split(t,[" ","\n","\t"])},split(t,e,i){var s,r=[];let n="",o=!1,a=0,l=!1,h="",u=!1;for(s of t)u?u=!1:"\\"===s?u=!0:l?s===h&&(l=!1):'"'===s||"'"===s?(l=!0,h=s):"("===s?a+=1:")"===s?0<a&&--a:0===a&&e.includes(s)&&(o=!0),o?(""!==n&&r.push(n.trim()),n="",o=!1):n+=s;return!i&&""===n||r.push(n.trim()),r}};d=Qe;Qe.default=Qe;let ti=d;var g=class extends h{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return ti.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,e=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(e)}},y=g;h.registerRule(g.default=g);let ei=l,ii=function(e,t={}){let s=e.css.valueOf(),r=t.ignoreErrors,n,o,a,l,h,u,c,d,f,v,p=s.length,m=0,g=[],b=[];function y(t){throw e.error("Unclosed "+t,m)}return{back:function(t){b.push(t)},endOfFile:function(){return 0===b.length&&m>=p},nextToken:function(t){if(b.length)return b.pop();if(!(m>=p)){var e=!!t&&t.ignoreUnclosed;switch(n=s.charCodeAt(m)){case Ee:case Te:case Ne:case Fe:case De:for(o=m;o+=1,(n=s.charCodeAt(o))===Te||n===Ee||n===Ne||n===Fe||n===De;);v=["space",s.slice(m,o)],m=o-1;break;case Le:case Be:case Ge:case We:case Ye:case Ve:case Pe:var i=String.fromCharCode(n);v=[i,i,m];break;case Ue:if(d=g.length?g.pop()[1]:"",f=s.charCodeAt(m+1),"url"===d&&f!==Ae&&f!==je&&f!==Te&&f!==Ee&&f!==Ne&&f!==De&&f!==Fe){o=m;do{if(u=!1,-1===(o=s.indexOf(")",o+1))){if(r||e){o=m;break}y("bracket")}for(c=o;s.charCodeAt(c-1)===Re;)--c,u=!u}while(u);v=["brackets",s.slice(m,o+1),m,o],m=o}else o=s.indexOf(")",m+1),l=s.slice(m,o+1),-1===o||Xe.test(l)?v=["(","(",m]:(v=["brackets",l,m,o],m=o);break;case Ae:case je:a=n===Ae?"'":'"',o=m;do{if(u=!1,-1===(o=s.indexOf(a,o+1))){if(r||e){o=m+1;break}y("string")}for(c=o;s.charCodeAt(c-1)===Re;)--c,u=!u}while(u);v=["string",s.slice(m,o+1),m,o],m=o;break;case Ze:Ke.lastIndex=m+1,Ke.test(s),o=0===Ke.lastIndex?s.length-1:Ke.lastIndex-2,v=["at-word",s.slice(m,o+1),m,o],m=o;break;case Re:for(o=m,h=!0;s.charCodeAt(o+1)===Re;)o+=1,h=!h;if(n=s.charCodeAt(o+1),h&&n!==xe&&n!==Te&&n!==Ee&&n!==Ne&&n!==Fe&&n!==De&&(o+=1,$e.test(s.charAt(o)))){for(;$e.test(s.charAt(o+1));)o+=1;s.charCodeAt(o+1)===Te&&(o+=1)}v=["word",s.slice(m,o+1),m,o],m=o;break;default:m=(n===xe&&s.charCodeAt(m+1)===ze?(0===(o=s.indexOf("*/",m+2)+1)&&(r||e?o=s.length:y("comment")),v=["comment",s.slice(m,o+1),m,o]):(Je.lastIndex=m+1,Je.test(s),o=0===Je.lastIndex?s.length-1:Je.lastIndex-2,v=["word",s.slice(m,o+1),m,o],g.push(v)),o)}return m++,v}},position:function(){return m}}},si=i,ri=m,ni=b,oi=y;const ai={empty:!0,space:!0};let li=class{constructor(t){this.input=t,this.root=new ni,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){var e,i=new ri;i.name=t[1].slice(1),""===i.name&&this.unnamedAtrule(i,t),this.init(i,t[2]);let s,r,n=!1,o=!1;for(var a=[],l=[];!this.tokenizer.endOfFile();){if("("===(e=(t=this.tokenizer.nextToken())[0])||"["===e?l.push("("===e?")":"]"):"{"===e&&0<l.length?l.push("}"):e===l[l.length-1]&&l.pop(),0===l.length){if(";"===e){i.source.end=this.getPosition(t[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===e){o=!0;break}if("}"===e){if(0<a.length){for(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(i.source.end=this.getPosition(s[3]||s[2]),i.source.end.offset++)}this.end(t);break}}if(a.push(t),this.tokenizer.endOfFile()){n=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),n&&(t=a[a.length-1],i.source.end=this.getPosition(t[3]||t[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),o&&(i.nodes=[],this.current=i)}checkMissedSemicolon(s){var r=this.colon(s);if(!1!==r){let e=0,i;for(let t=r-1;0<=t&&("space"===(i=s[t])[0]||2!==(e+=1));t--);throw this.input.error("Missed semicolon","word"===i[0]?i[3]+1:i[2])}}colon(t){let e=0,i,s,r;for(var[n,o]of t.entries()){if("("===(s=(i=o)[0])&&(e+=1),")"===s&&--e,0===e&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return n}this.doubleColon(i)}r=i}return!1}comment(t){var e=new si,t=(this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++,t[1].slice(2,-2));/^\s*$/.test(t)?(e.text="",e.raws.left=t,e.raws.right=""):(t=t.match(/^(\s*)([^]*\S)(\s*)$/),e.text=t[2],e.raws.left=t[1],e.raws.right=t[3])}createTokenizer(){this.tokenizer=ii(this.input)}decl(t,e){var i,s=new ei,r=(this.init(s,t[0][2]),t[t.length-1]);for(";"===r[0]&&(this.semicolon=!0,t.pop()),s.source.end=this.getPosition(r[3]||r[2]||function(e){for(let t=e.length-1;0<=t;t--){var i=e[t],i=i[3]||i[2];if(i)return i}}(t)),s.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),s.raws.before+=t.shift()[1];for(s.source.start=this.getPosition(t[0][2]),s.prop="";t.length;){var n=t[0][0];if(":"===n||"space"===n||"comment"===n)break;s.prop+=t.shift()[1]}s.raws.between="";let o;for(;t.length;){if(":"===(o=t.shift())[0]){s.raws.between+=o[1];break}"word"===o[0]&&/\w/.test(o[1])&&this.unknownWord([o]),s.raws.between+=o[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let a=[];for(;t.length&&("space"===(i=t[0][0])||"comment"===i);)a.push(t.shift());this.precheckMissedSemicolon(t);for(let i=t.length-1;0<=i;i--){if("!important"===(o=t[i])[1].toLowerCase()){s.important=!0;var l=this.stringFrom(t,i);" !important"!==(l=this.spacesFromEnd(t)+l)&&(s.raws.important=l);break}if("important"===o[1].toLowerCase()){var h=t.slice(0);let e="";for(let t=i;0<t;t--){var u=h[t][0];if(0===e.trim().indexOf("!")&&"space"!==u)break;e=h.pop()[1]+e}0===e.trim().indexOf("!")&&(s.important=!0,s.raws.important=e,t=h)}if("space"!==o[0]&&"comment"!==o[0])break}t.some(t=>"space"!==t[0]&&"comment"!==t[0])&&(s.raws.between+=a.map(t=>t[1]).join(""),a=[]),this.raw(s,"value",a.concat(t),e),s.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new oi;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){this.spaces+=t[1],this.current.nodes&&(t=this.current.nodes[this.current.nodes.length-1])&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){let e=!1;var i;let s=!1,r=null;var n=[],o=t[1].startsWith("--"),a=[];let l=t;for(;l;){if(i=l[0],a.push(l),"("===i||"["===i)r=r||l,n.push("("===i?")":"]");else if(o&&s&&"{"===i)r=r||l,n.push("}");else if(0===n.length){if(";"===i){if(s)return void this.decl(a,o);break}if("{"===i)return void this.rule(a);if("}"===i){this.tokenizer.back(a.pop()),e=!0;break}":"===i&&(s=!0)}else i===n[n.length-1]&&(n.pop(),0===n.length)&&(r=null);l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),0<n.length&&this.unclosedBracket(r),e&&s){if(!o)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,i,s){var r,n,o,a,l=i.length;let h="",u=!0;for(let t=0;t<l;t+=1)"space"===(o=(r=i[t])[0])&&t===l-1&&!s||"comment"===o&&(o=i[t-1]?i[t-1][0]:"empty",n=i[t+1]?i[t+1][0]:"empty",ai[o]||ai[n]||","===h.slice(-1))?u=!1:h+=r[1];u||(a=i.reduce((t,e)=>t+e[1],""),t.raws[e]={raw:a,value:h}),t[e]=h}rule(t){t.pop();var e=new oi;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){var e;let i="";for(;t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)i=t.pop()[1]+i;return i}spacesAndCommentsFromStart(t){var e;let i="";for(;t.length&&("space"===(e=t[0][0])||"comment"===e);)i+=t.shift()[1];return i}spacesFromEnd(t){let e="";for(;t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(e,i){let s="";for(let t=i;t<e.length;t++)s+=e[t][1];return e.splice(i,e.length-i),s}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},hi=c;function ui(t,e){t=new hi(t,e),e=new li(t);try{e.parse()}catch(t){throw t}return e.root}g=ui;h.registerParse(ui.default=ui);let{isClean:ci,my:di}=t,fi=n,vi=r,pi=h;t=f;let mi=p,gi=g;var w=b;const bi={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},yi={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},wi={Once:!0,postcssPlugin:!0,prepare:!0},Si=0;function Ii(t){return"object"==typeof t&&"function"==typeof t.then}function Ci(t){let e=!1;var i=bi[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[i,i+"-"+e,Si,i+"Exit",i+"Exit-"+e]:e?[i,i+"-"+e,i+"Exit",i+"Exit-"+e]:t.append?[i,Si,i+"Exit"]:[i,i+"Exit"]}function ki(t){let e;return{eventIndex:0,events:e="document"===t.type?["Document",Si,"DocumentExit"]:"root"===t.type?["Root",Si,"RootExit"]:Ci(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function _i(t){return t[ci]=!1,t.nodes&&t.nodes.forEach(t=>_i(t)),t}let Oi={};var S=class Bo{constructor(t,e,i){this.stringified=!1,this.processed=!1;let s;if("object"!=typeof e||null===e||"root"!==e.type&&"document"!==e.type)if(e instanceof Bo||e instanceof mi)s=_i(e.root),e.map&&(void 0===i.map&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=e.map);else{let t=gi;i.syntax&&(t=i.syntax.parse),(t=i.parser?i.parser:t).parse&&(t=t.parse);try{s=t(e,i)}catch(t){this.processed=!0,this.error=t}s&&!s[di]&&pi.rebuild(s)}else s=_i(e);this.result=new mi(t,s,i),this.helpers={...Oi,postcss:Oi,result:this.result},this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?{...t,...t.prepare(this.result)}:t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var i=this.result.lastPlugin;try{e&&e.addToError(t),"CssSyntaxError"!==(this.error=t).name||t.plugin?i.postcssVersion:(t.plugin=i.postcssPlugin,t.setMessage())}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t,e=(t,e,i)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,i])};for(t of this.plugins)if("object"==typeof t)for(var i in t){if(!yi[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!wi[i])if("object"==typeof t[i])for(var s in t[i])"*"===s?e(t,i,t[i][s]):e(t,i+"-"+s.toLowerCase(),t[i][s]);else"function"==typeof t[i]&&e(t,i,t[i])}this.hasListener=0<Object.keys(this.listeners).length}async runAsync(){for(let t=this.plugin=0;t<this.plugins.length;t++){var e=this.plugins[t],e=this.runOnRoot(e);if(Ii(e))try{await e}catch(t){throw this.handleError(t)}}if(this.prepareVisitors(),this.hasListener){for(var i,s=this.result.root;!s[ci];){s[ci]=!0;for(var r=[ki(s)];0<r.length;){var n=this.visitTick(r);if(Ii(n))try{await n}catch(t){n=r[r.length-1].node;throw this.handleError(t,n)}}}if(this.listeners.OnceExit)for(let[t,e]of this.listeners.OnceExit){this.result.lastPlugin=t;try{"document"===s.type?(i=s.nodes.map(t=>e(t,this.helpers)),await Promise.all(i)):await e(s,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{var t;return"object"==typeof e&&e.Once?"document"===this.result.root.type?Ii((t=this.result.root.nodes.map(t=>e.Once(t,this.helpers)))[0])?Promise.all(t):t:e.Once(this.result.root,this.helpers):"function"==typeof e?e(this.result.root,this.result):void 0}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(!this.stringified){this.stringified=!0,this.sync();var e=this.result.opts;let t=vi;e.syntax&&(t=e.syntax.stringify),(t=e.stringifier?e.stringifier:t).stringify&&(t=t.stringify);e=new fi(t,this.result.root,this.result.opts).generate();this.result.css=e[0],this.result.map=e[1]}return this.result}sync(){if(this.error)throw this.error;if(!this.processed){if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins)if(Ii(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[ci];)e[ci]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var i of e.nodes)this.visitSync(this.listeners.OnceExit,i);else this.visitSync(this.listeners.OnceExit,e)}}return this.result}then(t,e){return this.async().then(t,e)}toString(){return this.css}visitSync(t,e){for(var[i,s]of t){this.result.lastPlugin=i;let t;try{t=s(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(Ii(t))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:i,visitors:s}=e;if("root"===i.type||"document"===i.type||i.parent){if(0<s.length&&e.visitorIndex<s.length){var[r,n]=s[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===s.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=r;try{return n(i.toProxy(),this.helpers)}catch(t){throw this.handleError(t,i)}}if(0!==e.iterator){for(var o,a=e.iterator;o=i.nodes[i.indexes[a]];)if(i.indexes[a]+=1,!o[ci])return o[ci]=!0,void t.push(ki(o));e.iterator=0,delete i.indexes[a]}for(var l=e.events;e.eventIndex<l.length;){var h=l[e.eventIndex];if(e.eventIndex+=1,h===Si)return void(i.nodes&&i.nodes.length&&(i[ci]=!0,e.iterator=i.getIterator()));if(this.listeners[h])return void(e.visitors=this.listeners[h])}}t.pop()}walkSync(t){var e;t[ci]=!0;for(e of Ci(t))if(e===Si)t.nodes&&t.each(t=>{t[ci]||this.walkSync(t)});else{var i=this.listeners[e];if(i&&this.visitSync(i,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}},Mi=(S.registerPostcss=t=>{Oi=t},S);w.registerLazyResult(S.default=S),t.registerLazyResult(S);let Ai=n,ji=r;let Ri=g;const xi=p;w=class{constructor(t,e,i){e=e.toString(),this.stringified=!1,this.Ss=t,this.Cs=e,this.Is=i,this.ks=void 0;t=ji;this.result=new xi(this.Ss,void 0,this.Is),this.result.css=e;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});i=new Ai(t,void 0,this.Is,e);i.isMap()?([t,e]=i.generate(),t&&(this.result.css=t),e&&(this.result.map=e)):(i.clearAnnotation(),this.result.css=i.css)}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return this.async().then(t,e)}toString(){return this.Cs}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this.Os)return this.Os;let t;var e=Ri;try{t=e(this.Cs,this.Is)}catch(t){this.error=t}if(this.error)throw this.error;return this.Os=t}get[Symbol.toStringTag](){return"NoWorkResult"}},t=w;w.default=w;let Ei=t,Ti=Mi;S=f,n=class{constructor(t=[]){this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){let e=[];for(var i of t)if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"==typeof i&&Array.isArray(i.plugins))e=e.concat(i.plugins);else if("object"==typeof i&&i.postcssPlugin)e.push(i);else if("function"==typeof i)e.push(i);else if("object"!=typeof i||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");return e}process(t,e={}){return new(this.plugins.length||e.parser||e.stringifier||e.syntax?Ti:Ei)(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},w=n;b.registerProcessor(n.default=n),S.registerProcessor(n);let Di=l,Ni=u,Fi=i,Li=m,Bi=c,Ui=b,Pi=y;function Gi(t,i){if(Array.isArray(t))return t.map(t=>Gi(t));let{inputs:e,...s}=t;if(e){i=[];for(var r of e){r={...r,__proto__:Bi.prototype};r.map&&(r.map={...r.map,__proto__:Ni.prototype}),i.push(r)}}if(s.nodes&&(s.nodes=t.nodes.map(t=>Gi(t,i))),s.source){let{inputId:t,...e}=s.source;s.source=e,null!=t&&(s.source.input=i[t])}if("root"===s.type)return new Ui(s);if("decl"===s.type)return new Di(s);if("rule"===s.type)return new Pi(s);if("comment"===s.type)return new Fi(s);if("atrule"===s.type)return new Li(s);throw new Error("Unknown node type: "+t.type)}t=Gi,Gi.default=Gi,S=s;let Wi=l;n=Mi,u=h;let Vi=w;s=r,l=t;let zi=f;Mi=v;let Yi=i,Zi=m;h=p,w=c,r=g,t=d;let Ki=y,Ji=b;f=o;function I(...t){return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new Vi(t)}I.plugin=function(e,i){let s=!1;function r(...t){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");t=i(...t);return t.postcssPlugin=e,t.postcssVersion=(new Vi).version,t}let t;return Object.defineProperty(r,"postcss",{get(){return t=t||r()}}),r.process=function(t,e,i){return I([r(i)]).process(t,e)},r},I.stringify=s,I.parse=r,I.fromJSON=l,I.list=t,I.comment=t=>new Yi(t),I.atRule=t=>new Zi(t),I.decl=t=>new Wi(t),I.rule=t=>new Ki(t),I.root=t=>new Ji(t),I.document=t=>new zi(t),I.CssSyntaxError=S,I.Declaration=Wi,I.Container=u,I.Processor=Vi,I.Document=zi,I.Comment=Yi,I.Warning=Mi,I.AtRule=Zi,I.Result=h,I.Input=w,I.Rule=Ki,I.Root=Ji,I.Node=f,n.registerPostcss(I);v=I,I.default=I,i=Rt(v);i.stringify,i.fromJSON,i.plugin,i.parse,i.list,i.document,i.comment,i.atRule,i.rule,i.decl,i.root,i.CssSyntaxError,i.Declaration,i.Container,i.Processor,i.Document,i.Comment,i.Warning,i.AtRule,i.Result,i.Input,i.Rule,i.Root,i.Node,Object.defineProperty;function Xi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function $i(i){var e,s;return i.__esModule?i:("function"==typeof(e=i.default)?(s=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)}).prototype=e.prototype:s={},Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(i).forEach(function(t){var e=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(s,t,e.get?e:{enumerable:!0,get:function(){return i[t]}})}),s)}function Hi(){return{isColorSupported:!1,reset:C,bold:C,dim:C,italic:C,underline:C,inverse:C,hidden:C,strikethrough:C,black:C,red:C,green:C,yellow:C,blue:C,magenta:C,cyan:C,white:C,gray:C,bgBlack:C,bgRed:C,bgGreen:C,bgYellow:C,bgBlue:C,bgMagenta:C,bgCyan:C,bgWhite:C}}var m={exports:{}},C=String,p=(m.exports=Hi(),m.exports.createColors=Hi,m.exports),c=$i(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let qi=p,Qi=c;g=class Uo extends Error{constructor(t,e,i,s,r,n){super(t),this.name="CssSyntaxError",this.reason=t,r&&(this.file=r),s&&(this.source=s),n&&(this.plugin=n),void 0!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Uo)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let e=this.source;null==t&&(t=qi.isColorSupported);var i=(e=Qi&&t?Qi(e):e).split(/\r?\n/);let s=Math.max(this.line-3,0);var r=Math.min(this.line+2,i.length);let n=String(r).length,o,a;if(t){let{bold:e,gray:i,red:s}=qi.createColors(!0);o=t=>e(s(t)),a=t=>i(t)}else o=a=t=>t;return i.slice(s,r).map((t,e)=>{var e=s+1+e,i=" "+(" "+e).slice(-n)+" | ";return e===this.line?(e=a(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," "),o(">")+a(i)+t+"\n "+e+o("^")):" "+a(i)+t}).join("\n")}toString(){let t=this.showSourceCode();return t=t&&"\n\n"+t+"\n",this.name+": "+this.message+t}},d=g,g.default=g,y={};y.isClean=Symbol("isClean"),y.my=Symbol("my");const ts={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};b=class{constructor(t){this.builder=t}atrule(t,e){let i="@"+t.name;var s=t.params?this.rawValue(t,"params"):"";void 0!==t.raws.afterName?i+=t.raws.afterName:s&&(i+=" "),t.nodes?this.block(t,i+s):(e=(t.raws.between||"")+(e?";":""),this.builder(i+s+e,t))}beforeAfter(t,e){let i,s=(i="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose"),t.parent),r=0;for(;s&&"root"!==s.type;)r+=1,s=s.parent;if(i.includes("\n")){var n=this.raw(t,null,"indent");if(n.length)for(let t=0;t<r;t++)i+=n}return i}block(t,e){var i=this.raw(t,"between","beforeOpen");this.builder(e+i+"{",t,"start");let s;(s=t.nodes&&t.nodes.length?(this.body(t),this.raw(t,"after")):this.raw(t,"after","emptyBody"))&&this.builder(s),this.builder("}",t,"end")}body(e){let i=e.nodes.length-1;for(;0<i&&"comment"===e.nodes[i].type;)--i;var s=this.raw(e,"semicolon");for(let t=0;t<e.nodes.length;t++){var r=e.nodes[t],n=this.raw(r,"before");n&&this.builder(n),this.stringify(r,i!==t||s)}}comment(t){var e=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+i+"*/",t)}decl(t,e){var i=this.raw(t,"between","colon");let s=t.prop+i+this.rawValue(t,"value");t.important&&(s+=t.raws.important||" !important"),e&&(s+=";"),this.builder(s,t)}document(t){this.body(t)}raw(t,e,i){let s;if(i=i||e,!e||void 0===(s=t.raws[e])){var r=t.parent;if("before"===i){if(!r||"root"===r.type&&r.first===t)return"";if(r&&"document"===r.type)return""}if(!r)return ts[i];r=t.root();if(r.rawCache||(r.rawCache={}),void 0!==r.rawCache[i])return r.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(t,i);var n="raw"+((n=i)[0].toUpperCase()+n.slice(1));this[n]?s=this[n](r,t):r.walk(t=>{if(void 0!==(s=t.raws[e]))return!1}),void 0===s&&(s=ts[i]),r.rawCache[i]=s}return s}rawBeforeClose(t){let e;return t.walk(t=>{if(t.nodes&&0<t.nodes.length&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e=e&&e.replace(/\S/g,"")}rawBeforeComment(t,e){let i;return t.walkComments(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=void 0===i?this.raw(e,null,"beforeDecl"):i&&i.replace(/\S/g,"")}rawBeforeDecl(t,e){let i;return t.walkDecls(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=void 0===i?this.raw(e,null,"beforeRule"):i&&i.replace(/\S/g,"")}rawBeforeOpen(t){let e;return t.walk(t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1}),e}rawBeforeRule(e){let i;return e.walk(t=>{if(t.nodes&&(t.parent!==e||e.first!==t)&&void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=i&&i.replace(/\S/g,"")}rawColon(t){let e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1}),e}rawIndent(i){if(i.raws.indent)return i.raws.indent;let s;return i.walk(t=>{var e=t.parent;if(e&&e!==i&&e.parent&&e.parent===i&&void 0!==t.raws.before)return e=t.raws.before.split("\n"),s=(s=e[e.length-1]).replace(/\S/g,""),!1}),s}rawSemicolon(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1}),e}rawValue(t,e){var i=t[e],t=t.raws[e];return t&&t.value===i?t.raw:i}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},o=b;b.default=b;let es=o;function is(t,e){new es(e).stringify(t)}s=is;is.default=is;let{isClean:ss,my:rs}=y,ns=d,os=o,as=s;function ls(e,i){let s=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){let t=e[r];var n=typeof t;"parent"===r&&"object"==n?i&&(s[r]=i):"source"===r?s[r]=t:Array.isArray(t)?s[r]=t.map(t=>ls(t,s)):("object"==n&&null!==t&&(t=ls(t)),s[r]=t)}return s}r=class{constructor(t={}){for(var e in this.raws={},this[ss]=!1,this[rs]=!0,t)if("nodes"===e){this.nodes=[];for(var i of t[e])"function"==typeof i.clone?this.append(i.clone()):this.append(i)}else this[e]=t[e]}addToError(t){var e;return t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)&&(e=this.source,t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)),t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(var e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){var e,i=ls(this);for(e in t)i[e]=t[e];return i}cloneAfter(t={}){t=this.clone(t);return this.parent.insertAfter(this,t),t}cloneBefore(t={}){t=this.clone(t);return this.parent.insertBefore(this,t),t}error(t,e={}){var i,s;return this.source?({end:i,start:s}=this.rangeBy(e),this.source.input.error(t,{column:s.column,line:s.line},{column:i.column,line:i.line},e)):new ns(t)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,i){return t[e]!==i&&(t[e]=i,"prop"===e||"value"===e||"name"===e||"params"===e||"important"===e||"text"===e)&&t.markDirty(),!0}}}markDirty(){if(this[ss]){this[ss]=!1;let t=this;for(;t=t.parent;)t[ss]=!1}}next(){var t;if(this.parent)return t=this.parent.index(this),this.parent.nodes[t+1]}positionBy(t,e){let i=this.source.start;return t.index?i=this.positionInside(t.index,e):t.word&&-1!==(t=(e=this.toString()).indexOf(t.word))&&(i=this.positionInside(t,e)),i}positionInside(e,t){var i=t||this.toString();let s=this.source.start.column,r=this.source.start.line;for(let t=0;t<e;t++)"\n"===i[t]?(s=1,r+=1):s+=1;return{column:s,line:r}}prev(){var t;if(this.parent)return t=this.parent.index(this),this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};var s,r;return t.word?-1!==(r=(s=this.toString()).indexOf(t.word))&&(e=this.positionInside(r,s),i=this.positionInside(r+t.word.length,s)):(t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):t.index&&(i=this.positionInside(t.index+1))),{end:i=i.line<e.line||i.line===e.line&&i.column<=e.column?{column:e.column+1,line:e.line}:i,start:e}}raw(t,e){return(new os).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...i){if(this.parent){let t=this,e=!1;for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){let t=this;for(;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var i,s={},r=null==e;e=e||new Map;let n=0;for(i in this)if(Object.prototype.hasOwnProperty.call(this,i)&&"parent"!==i&&"proxyCache"!==i){var o=this[i];if(Array.isArray(o))s[i]=o.map(t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t);else if("object"==typeof o&&o.toJSON)s[i]=o.toJSON(null,e);else if("source"===i){let t=e.get(o.input);null==t&&(t=n,e.set(o.input,n),n++),s[i]={end:o.end,inputId:t,start:o.start}}else s[i]=o}return r&&(s.inputs=[...e.keys()].map(t=>t.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=as){t.stringify&&(t=t.stringify);let e="";return t(this,t=>{e+=t}),e}warn(t,e,i){var s,r={node:this};for(s in i)r[s]=i[s];return t.warn(e,r)}get proxyOf(){return this}},l=r,r.default=r,t=l,S=class extends t{constructor(t){super(t=t&&void 0!==t.value&&"string"!=typeof t.value?{...t,value:String(t.value)}:t),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}},u=S;S.default=S;Mi={nanoid:(t=21)=>{let e="",i=t;for(;i--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(s,r=21)=>(t=r)=>{let e="",i=t;for(;i--;)e+=s[Math.random()*s.length|0];return e}};let{SourceMapConsumer:hs,SourceMapGenerator:us}=c,{existsSync:cs,readFileSync:ds}=c,{dirname:fs,join:vs}=c;var h=class{constructor(t,e){!1!==e.map&&(this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:"),t=e.map?e.map.prev:void 0,t=this.loadMap(e.from,t),!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=fs(this.mapFile)),t)&&(this.text=t)}consumer(){return this.consumerCache||(this.consumerCache=new hs(this.text)),this.consumerCache}decodeInline(t){if(/^data:application\/json;charset=utf-?8,/.test(t)||/^data:application\/json,/.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(t)||/^data:application\/json;base64,/.test(t))return e=t.substr(RegExp.lastMatch.length),Buffer?Buffer.from(e,"base64").toString():window.atob(e);var e=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+e)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e,i=t.match(/\/\*\s*# sourceMappingURL=/gm);i&&(i=t.lastIndexOf(i.pop()),e=t.indexOf("*/",i),-1<i)&&-1<e&&(this.annotation=this.getAnnotationURL(t.substring(i,e)))}loadFile(t){if(this.root=fs(t),cs(t))return this.mapFile=t,ds(t,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof hs)return us.fromSourceMap(t).toString();if(t instanceof us)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}t=t(e);if(t){var i=this.loadFile(t);if(i)return i;throw new Error("Unable to load previous source map: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=vs(fs(e),t)),this.loadFile(t)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}},w=h,{SourceMapConsumer:f,SourceMapGenerator:n}=(h.default=h,c);let{fileURLToPath:ps,pathToFileURL:ms}=c,{isAbsolute:gs,resolve:bs}=c,ys=Mi["nanoid"];v=c;let ws=d,Ss=w,Is=Symbol("fromOffsetCache"),Cs=Boolean(f&&n),ks=Boolean(bs&&gs);i=class{constructor(t,e={}){if(null==t||"object"==typeof t&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);this.css=t.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,e.from&&(!ks||/^\w+:\/\//.test(e.from)||gs(e.from)?this.file=e.from:this.file=bs(e.from)),ks&&Cs&&(t=new Ss(this.css,e)).text&&(e=(this.map=t).consumer().file,!this.file)&&e&&(this.file=this.mapResolve(e)),this.file||(this.id="<input css "+ys(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,i,s={}){let r,n,o;e&&"object"==typeof e?(a=i,i="number"==typeof(l=e).offset?(e=(h=this.fromOffset(l.offset)).line,h.col):(e=l.line,l.column),o="number"==typeof a.offset?(h=this.fromOffset(a.offset),n=h.line,h.col):(n=a.line,a.column)):i||(e=(l=this.fromOffset(e)).line,i=l.col);var a,l,h=this.origin(e,i,n,o);return(r=h?new ws(t,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,s.plugin):new ws(t,void 0===n?e:{column:i,line:e},void 0===n?i:{column:o,line:n},this.css,this.file,s.plugin)).input={column:i,endColumn:o,endLine:n,line:e,source:this.css},this.file&&(ms&&(r.input.url=ms(this.file).toString()),r.input.file=this.file),r}fromOffset(e){let s;if(this[Is])s=this[Is];else{var r=this.css.split("\n");s=new Array(r.length);let i=0;for(let t=0,e=r.length;t<e;t++)s[t]=i,i+=r[t].length+1;this[Is]=s}let i=0;if(s[s.length-1]<=e)i=s.length-1;else{let t=s.length-2;for(var n;i<t;)if(n=i+(t-i>>1),e<s[n])t=n-1;else{if(!(e>=s[n+1])){i=n;break}i=n+1}}return{col:e-s[i]+1,line:i+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:bs(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,i,s){if(!this.map)return!1;var r=this.map.consumer(),e=r.originalPositionFor({column:e,line:t});if(!e.source)return!1;let n;"number"==typeof i&&(n=r.originalPositionFor({column:s,line:i}));let o;o=gs(e.source)?ms(e.source):new URL(e.source,this.map.consumer().sourceRoot||ms(this.map.mapFile));t={column:e.column,endColumn:n&&n.column,endLine:n&&n.line,line:e.line,url:o.toString()};if("file:"===o.protocol){if(!ps)throw new Error("file: protocol is not available in this PostCSS build");t.file=ps(o)}s=r.sourceContentFor(e.source);return s&&(t.source=s),t}toJSON(){var t,e={};for(t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache)&&(e.map.consumerCache=void 0),e}get from(){return this.file||this.id}},m=i;i.default=i,v&&v.registerInput&&v.registerInput(i);let{SourceMapConsumer:_s,SourceMapGenerator:Os}=c,{dirname:Ms,relative:As,resolve:js,sep:Rs}=c,xs=c["pathToFileURL"],Es=m,Ts=Boolean(_s&&Os),Ds=Boolean(Ms&&js&&As&&Rs);p=class{constructor(t,e,i,s){this.stringify=t,this.mapOpts=i.map||{},this.root=e,this.opts=i,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t,e=(t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map","\n");this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var i=this.toUrl(this.path(e.file)),s=e.root||Ms(e.file);let t;!1===this.mapOpts.sourcesContent?(t=new _s(e.text)).sourcesContent&&(t.sourcesContent=null):t=e.consumer(),this.map.applySourceMap(t,i,this.toUrl(this.path(s)))}}clearAnnotation(){var e;if(!1!==this.mapOpts.annotation)if(this.root)for(let t=this.root.nodes.length-1;0<=t;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Ds&&Ts&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){var t;return this.root?this.generateString():1===this.previous().length?((t=this.previous()[0].consumer()).file=this.outputFile(),this.map=Os.fromSourceMap(t,{ignoreInvalidMapping:!0})):(this.map=new Os({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"})),this.isSourcesContent()&&this.setSourcesContent(),this.root&&0<this.previous().length&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Os({file:this.outputFile(),ignoreInvalidMapping:!0});let s=1,r=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""},a,l;this.stringify(this.root,(t,e,i)=>{this.css+=t,e&&"end"!==i&&(o.generated.line=s,o.generated.column=r-1,e.source&&e.source.start?(o.source=this.sourcePath(e),o.original.line=e.source.start.line,o.original.column=e.source.start.column-1):(o.source=n,o.original.line=1,o.original.column=0),this.map.addMapping(o)),(a=t.match(/\n/g))?(s+=a.length,l=t.lastIndexOf("\n"),r=t.length-l):r+=t.length,e&&"start"!==i&&(t=e.parent||{raws:{}},"decl"!==e.type&&("atrule"!==e.type||e.nodes)||e!==t.last||t.raws.semicolon)&&(e.source&&e.source.end?(o.source=this.sourcePath(e),o.original.line=e.source.end.line,o.original.column=e.source.end.column-1,o.generated.line=s,o.generated.column=r-2):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=s,o.generated.column=r-1),this.map.addMapping(o))})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){var t;return void 0!==this.mapOpts.inline?this.mapOpts.inline:(void 0===(t=this.mapOpts.annotation)||!0===t)&&(!this.previous().length||this.previous().some(t=>t.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:0<this.previous().length}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;var e=this.memoizedPaths.get(t);if(e)return e;let i=this.opts.to?Ms(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(i=Ms(js(i,this.mapOpts.annotation)));e=As(i,t);return this.memoizedPaths.set(t,e),e}previous(){var t;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(t=>{t.source&&t.source.input.map&&(t=t.source.input.map,this.previousMaps.includes(t)||this.previousMaps.push(t))}):(t=new Es(this.originalCSS,this.opts)).map&&this.previousMaps.push(t.map)),this.previousMaps}setSourcesContent(){let i={};var t;this.root?this.root.walk(t=>{var e;t.source&&(e=t.source.input.from)&&!i[e]&&(i[e]=!0,e=this.usesFileUrls?this.toFileUrl(e):this.toUrl(this.path(e)),this.map.setSourceContent(e,t.source.input.css))}):this.css&&(t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(t,this.css))}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(xs)return e=xs(t).toString(),this.memoizedFileURLs.set(t,e),e;throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===Rs&&(t=t.replace(/\\/g,"/"));e=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,e),e}},g=class extends l{constructor(t){super(t),this.type="comment"}},b=g;g.default=g;let{isClean:Ns,my:Fs}=y,Ls=u,Bs=b,Us,Ps,Gs,Ws;let Vs=class Po extends l{append(...t){for(var e of t){var i;for(i of this.normalize(e,this.last))this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.cleanRaws(t)}each(i){if(this.proxyOf.nodes){var s=this.getIterator();let t,e;for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],!1!==(e=i(this.proxyOf.nodes[t],t)));)this.indexes[s]+=1;return delete this.indexes[s],e}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(e,s){return"proxyOf"===s?e:e[s]&&("each"===s||"string"==typeof s&&s.startsWith("walk")?(...t)=>e[s](...t.map(i=>"function"==typeof i?(t,e)=>i(t.toProxy(),e):i)):"every"===s||"some"===s?i=>e[s]((t,...e)=>i(t.toProxy(),...e)):"root"===s?()=>e.root().toProxy():"nodes"===s?e.nodes.map(t=>t.toProxy()):"first"===s||"last"===s?e[s].toProxy():e[s])},set(t,e,i){return t[e]!==i&&(t[e]=i,"name"===e||"params"===e||"selector"===e)&&t.markDirty(),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var i,s,r,n=this.index(t),o=this.normalize(e,this.proxyOf.nodes[n]).reverse(),n=this.index(t);for(i of o)this.proxyOf.nodes.splice(n+1,0,i);for(r in this.indexes)n<(s=this.indexes[r])&&(this.indexes[r]=s+o.length);return this.markDirty(),this}insertBefore(t,e){var i,s,r,n=this.index(t),o=this.normalize(e,this.proxyOf.nodes[n],0===n&&"prepend").reverse(),n=this.index(t);for(i of o)this.proxyOf.nodes.splice(n,0,i);for(r in this.indexes)n<=(s=this.indexes[r])&&(this.indexes[r]=s+o.length);return this.markDirty(),this}normalize(t,e){if("string"==typeof t)t=function e(t){return t.map(t=>(t.nodes&&(t.nodes=e(t.nodes)),delete t.source,t))}(Us(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t))for(var i of t=t.slice(0))i.parent&&i.parent.removeChild(i,"ignore");else if("root"===t.type&&"document"!==this.type)for(var s of t=t.nodes.slice(0))s.parent&&s.parent.removeChild(s,"ignore");else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Ls(t)]}else if(t.selector)t=[new Ps(t)];else if(t.name)t=[new Gs(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Bs(t)]}return t.map(t=>(t[Fs]||Po.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Ns]&&function t(e){if(e[Ns]=!1,e.proxyOf.nodes)for(var i of e.proxyOf.nodes)t(i)}(t),void 0===t.raws.before&&e&&void 0!==e.raws.before&&(t.raws.before=e.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...t){for(var e of t=t.reverse()){var i,s,r=this.normalize(e,this.first,"prepend").reverse();for(i of r)this.proxyOf.nodes.unshift(i);for(s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(t){return(t.parent=this).proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e,i;for(i in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t<=(e=this.indexes[i])&&(this.indexes[i]=e-1);return this.markDirty(),this}replaceValues(e,i,s){return s||(s=i,i={}),this.walkDecls(t=>{i.props&&!i.props.includes(t.prop)||i.fast&&!t.value.includes(i.fast)||(t.value=t.value.replace(e,s))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(s){return this.each((e,t)=>{let i;try{i=s(e,t)}catch(t){throw e.addToError(t)}return i=!1!==i&&e.walk?e.walk(s):i})}walkAtRules(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("atrule"===t.type&&i.test(t.name))return s(t,e)}):this.walk((t,e)=>{if("atrule"===t.type&&t.name===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("atrule"===t.type)return s(t,e)}))}walkComments(i){return this.walk((t,e)=>{if("comment"===t.type)return i(t,e)})}walkDecls(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("decl"===t.type&&i.test(t.prop))return s(t,e)}):this.walk((t,e)=>{if("decl"===t.type&&t.prop===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("decl"===t.type)return s(t,e)}))}walkRules(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("rule"===t.type&&i.test(t.selector))return s(t,e)}):this.walk((t,e)=>{if("rule"===t.type&&t.selector===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("rule"===t.type)return s(t,e)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Vs.registerParse=t=>{Us=t},Vs.registerRule=t=>{Ps=t},Vs.registerAtRule=t=>{Gs=t},Vs.registerRoot=t=>{Ws=t};o=Vs,(Vs.default=Vs).rebuild=t=>{"atrule"===t.type?Object.setPrototypeOf(t,Gs.prototype):"rule"===t.type?Object.setPrototypeOf(t,Ps.prototype):"decl"===t.type?Object.setPrototypeOf(t,Ls.prototype):"comment"===t.type?Object.setPrototypeOf(t,Bs.prototype):"root"===t.type&&Object.setPrototypeOf(t,Ws.prototype),t[Fs]=!0,t.nodes&&t.nodes.forEach(t=>{Vs.rebuild(t)})},r=o;let zs,Ys;t=class extends r{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new zs(new Ys,this,t).stringify()}},t.registerLazyResult=t=>{zs=t},t.registerProcessor=t=>{Ys=t},S=t;t.default=t;h=class{constructor(t,e={}){for(var i in this.type="warning",this.text=t,e.node&&e.node.source&&(t=e.node.rangeBy(e),this.line=t.start.line,this.column=t.start.column,this.endLine=t.end.line,this.endColumn=t.end.column),e)this[i]=e[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},Mi=h;h.default=h;let Zs=Mi;f=class{constructor(t,e,i){this.processor=t,this.messages=[],this.root=e,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);t=new Zs(t,e);return this.messages.push(t),t}warnings(){return this.messages.filter(t=>"warning"===t.type)}get content(){return this.css}},n=f;f.default=f;const Ks="'".charCodeAt(0),Js='"'.charCodeAt(0),Xs="\\".charCodeAt(0),$s="/".charCodeAt(0),Hs="\n".charCodeAt(0),qs=" ".charCodeAt(0),Qs="\f".charCodeAt(0),tr="\t".charCodeAt(0),er="\r".charCodeAt(0),ir="[".charCodeAt(0),sr="]".charCodeAt(0),rr="(".charCodeAt(0),nr=")".charCodeAt(0),or="{".charCodeAt(0),ar="}".charCodeAt(0),lr=";".charCodeAt(0),hr="*".charCodeAt(0),ur=":".charCodeAt(0),cr="@".charCodeAt(0),dr=/[\t\n\f\r "#'()/;[\\\]{}]/g,fr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,vr=/.[\r\n"'(/\\]/,pr=/[\da-f]/i;v=class extends o{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}},i=v,o.registerAtRule(v.default=v),c=o;let mr,gr;g=class extends c{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,i){t=super.normalize(t);if(e)if("prepend"===i)1<this.nodes.length?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var s of t)s.raws.before=e.raws.before;return t}removeChild(t,e){var i=this.index(t);return!e&&0===i&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(t)}toResult(t={}){return new mr(new gr,this,t).stringify()}},g.registerLazyResult=t=>{mr=t},g.registerProcessor=t=>{gr=t},r=g;c.registerRoot(g.default=g);let br={comma(t){return br.split(t,[","],!0)},space(t){return br.split(t,[" ","\n","\t"])},split(t,e,i){var s,r=[];let n="",o=!1,a=0,l=!1,h="",u=!1;for(s of t)u?u=!1:"\\"===s?u=!0:l?s===h&&(l=!1):'"'===s||"'"===s?(l=!0,h=s):"("===s?a+=1:")"===s?0<a&&--a:0===a&&e.includes(s)&&(o=!0),o?(""!==n&&r.push(n.trim()),n="",o=!1):n+=s;return!i&&""===n||r.push(n.trim()),r}};t=br;br.default=br;let yr=t;h=class extends o{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return yr.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,e=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(e)}},f=h;o.registerRule(h.default=h);let wr=u,Sr=function(e,t={}){let s=e.css.valueOf(),r=t.ignoreErrors,n,o,a,l,h,u,c,d,f,v,p=s.length,m=0,g=[],b=[];function y(t){throw e.error("Unclosed "+t,m)}return{back:function(t){b.push(t)},endOfFile:function(){return 0===b.length&&m>=p},nextToken:function(t){if(b.length)return b.pop();if(!(m>=p)){var e=!!t&&t.ignoreUnclosed;switch(n=s.charCodeAt(m)){case Hs:case qs:case tr:case er:case Qs:for(o=m;o+=1,(n=s.charCodeAt(o))===qs||n===Hs||n===tr||n===er||n===Qs;);v=["space",s.slice(m,o)],m=o-1;break;case ir:case sr:case or:case ar:case ur:case lr:case nr:var i=String.fromCharCode(n);v=[i,i,m];break;case rr:if(d=g.length?g.pop()[1]:"",f=s.charCodeAt(m+1),"url"===d&&f!==Ks&&f!==Js&&f!==qs&&f!==Hs&&f!==tr&&f!==Qs&&f!==er){o=m;do{if(u=!1,-1===(o=s.indexOf(")",o+1))){if(r||e){o=m;break}y("bracket")}for(c=o;s.charCodeAt(c-1)===Xs;)--c,u=!u}while(u);v=["brackets",s.slice(m,o+1),m,o],m=o}else o=s.indexOf(")",m+1),l=s.slice(m,o+1),-1===o||vr.test(l)?v=["(","(",m]:(v=["brackets",l,m,o],m=o);break;case Ks:case Js:a=n===Ks?"'":'"',o=m;do{if(u=!1,-1===(o=s.indexOf(a,o+1))){if(r||e){o=m+1;break}y("string")}for(c=o;s.charCodeAt(c-1)===Xs;)--c,u=!u}while(u);v=["string",s.slice(m,o+1),m,o],m=o;break;case cr:dr.lastIndex=m+1,dr.test(s),o=0===dr.lastIndex?s.length-1:dr.lastIndex-2,v=["at-word",s.slice(m,o+1),m,o],m=o;break;case Xs:for(o=m,h=!0;s.charCodeAt(o+1)===Xs;)o+=1,h=!h;if(n=s.charCodeAt(o+1),h&&n!==$s&&n!==qs&&n!==Hs&&n!==tr&&n!==er&&n!==Qs&&(o+=1,pr.test(s.charAt(o)))){for(;pr.test(s.charAt(o+1));)o+=1;s.charCodeAt(o+1)===qs&&(o+=1)}v=["word",s.slice(m,o+1),m,o],m=o;break;default:m=(n===$s&&s.charCodeAt(m+1)===hr?(0===(o=s.indexOf("*/",m+2)+1)&&(r||e?o=s.length:y("comment")),v=["comment",s.slice(m,o+1),m,o]):(fr.lastIndex=m+1,fr.test(s),o=0===fr.lastIndex?s.length-1:fr.lastIndex-2,v=["word",s.slice(m,o+1),m,o],g.push(v)),o)}return m++,v}},position:function(){return m}}},Ir=b,Cr=i,kr=r,_r=f;const Or={empty:!0,space:!0};let Mr=class{constructor(t){this.input=t,this.root=new kr,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){var e,i=new Cr;i.name=t[1].slice(1),""===i.name&&this.unnamedAtrule(i,t),this.init(i,t[2]);let s,r,n=!1,o=!1;for(var a=[],l=[];!this.tokenizer.endOfFile();){if("("===(e=(t=this.tokenizer.nextToken())[0])||"["===e?l.push("("===e?")":"]"):"{"===e&&0<l.length?l.push("}"):e===l[l.length-1]&&l.pop(),0===l.length){if(";"===e){i.source.end=this.getPosition(t[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===e){o=!0;break}if("}"===e){if(0<a.length){for(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(i.source.end=this.getPosition(s[3]||s[2]),i.source.end.offset++)}this.end(t);break}}if(a.push(t),this.tokenizer.endOfFile()){n=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),n&&(t=a[a.length-1],i.source.end=this.getPosition(t[3]||t[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),o&&(i.nodes=[],this.current=i)}checkMissedSemicolon(s){var r=this.colon(s);if(!1!==r){let e=0,i;for(let t=r-1;0<=t&&("space"===(i=s[t])[0]||2!==(e+=1));t--);throw this.input.error("Missed semicolon","word"===i[0]?i[3]+1:i[2])}}colon(t){let e=0,i,s,r;for(var[n,o]of t.entries()){if("("===(s=(i=o)[0])&&(e+=1),")"===s&&--e,0===e&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return n}this.doubleColon(i)}r=i}return!1}comment(t){var e=new Ir,t=(this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++,t[1].slice(2,-2));/^\s*$/.test(t)?(e.text="",e.raws.left=t,e.raws.right=""):(t=t.match(/^(\s*)([^]*\S)(\s*)$/),e.text=t[2],e.raws.left=t[1],e.raws.right=t[3])}createTokenizer(){this.tokenizer=Sr(this.input)}decl(t,e){var i,s=new wr,r=(this.init(s,t[0][2]),t[t.length-1]);for(";"===r[0]&&(this.semicolon=!0,t.pop()),s.source.end=this.getPosition(r[3]||r[2]||function(e){for(let t=e.length-1;0<=t;t--){var i=e[t],i=i[3]||i[2];if(i)return i}}(t)),s.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),s.raws.before+=t.shift()[1];for(s.source.start=this.getPosition(t[0][2]),s.prop="";t.length;){var n=t[0][0];if(":"===n||"space"===n||"comment"===n)break;s.prop+=t.shift()[1]}s.raws.between="";let o;for(;t.length;){if(":"===(o=t.shift())[0]){s.raws.between+=o[1];break}"word"===o[0]&&/\w/.test(o[1])&&this.unknownWord([o]),s.raws.between+=o[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let a=[];for(;t.length&&("space"===(i=t[0][0])||"comment"===i);)a.push(t.shift());this.precheckMissedSemicolon(t);for(let i=t.length-1;0<=i;i--){if("!important"===(o=t[i])[1].toLowerCase()){s.important=!0;var l=this.stringFrom(t,i);" !important"!==(l=this.spacesFromEnd(t)+l)&&(s.raws.important=l);break}if("important"===o[1].toLowerCase()){var h=t.slice(0);let e="";for(let t=i;0<t;t--){var u=h[t][0];if(0===e.trim().indexOf("!")&&"space"!==u)break;e=h.pop()[1]+e}0===e.trim().indexOf("!")&&(s.important=!0,s.raws.important=e,t=h)}if("space"!==o[0]&&"comment"!==o[0])break}t.some(t=>"space"!==t[0]&&"comment"!==t[0])&&(s.raws.between+=a.map(t=>t[1]).join(""),a=[]),this.raw(s,"value",a.concat(t),e),s.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new _r;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){this.spaces+=t[1],this.current.nodes&&(t=this.current.nodes[this.current.nodes.length-1])&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){let e=!1;var i;let s=!1,r=null;var n=[],o=t[1].startsWith("--"),a=[];let l=t;for(;l;){if(i=l[0],a.push(l),"("===i||"["===i)r=r||l,n.push("("===i?")":"]");else if(o&&s&&"{"===i)r=r||l,n.push("}");else if(0===n.length){if(";"===i){if(s)return void this.decl(a,o);break}if("{"===i)return void this.rule(a);if("}"===i){this.tokenizer.back(a.pop()),e=!0;break}":"===i&&(s=!0)}else i===n[n.length-1]&&(n.pop(),0===n.length)&&(r=null);l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),0<n.length&&this.unclosedBracket(r),e&&s){if(!o)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,i,s){var r,n,o,a,l=i.length;let h="",u=!0;for(let t=0;t<l;t+=1)"space"===(o=(r=i[t])[0])&&t===l-1&&!s||"comment"===o&&(o=i[t-1]?i[t-1][0]:"empty",n=i[t+1]?i[t+1][0]:"empty",Or[o]||Or[n]||","===h.slice(-1))?u=!1:h+=r[1];u||(a=i.reduce((t,e)=>t+e[1],""),t.raws[e]={raw:a,value:h}),t[e]=h}rule(t){t.pop();var e=new _r;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){var e;let i="";for(;t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)i=t.pop()[1]+i;return i}spacesAndCommentsFromStart(t){var e;let i="";for(;t.length&&("space"===(e=t[0][0])||"comment"===e);)i+=t.shift()[1];return i}spacesFromEnd(t){let e="";for(;t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(e,i){let s="";for(let t=i;t<e.length;t++)s+=e[t][1];return e.splice(i,e.length-i),s}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},Ar=m;function jr(t,e){t=new Ar(t,e),e=new Mr(t);try{e.parse()}catch(t){throw t}return e.root}v=jr;o.registerParse(jr.default=jr);let{isClean:Rr,my:xr}=y,Er=p,Tr=s,Dr=o;c=S;let Nr=n,Fr=v;g=r;const Lr={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Br={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Ur={Once:!0,postcssPlugin:!0,prepare:!0},Pr=0;function Gr(t){return"object"==typeof t&&"function"==typeof t.then}function Wr(t){let e=!1;var i=Lr[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[i,i+"-"+e,Pr,i+"Exit",i+"Exit-"+e]:e?[i,i+"-"+e,i+"Exit",i+"Exit-"+e]:t.append?[i,Pr,i+"Exit"]:[i,i+"Exit"]}function Vr(t){let e;return{eventIndex:0,events:e="document"===t.type?["Document",Pr,"DocumentExit"]:"root"===t.type?["Root",Pr,"RootExit"]:Wr(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function zr(t){return t[Rr]=!1,t.nodes&&t.nodes.forEach(t=>zr(t)),t}let Yr={};h=class Go{constructor(t,e,i){this.stringified=!1,this.processed=!1;let s;if("object"!=typeof e||null===e||"root"!==e.type&&"document"!==e.type)if(e instanceof Go||e instanceof Nr)s=zr(e.root),e.map&&(void 0===i.map&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=e.map);else{let t=Fr;i.syntax&&(t=i.syntax.parse),(t=i.parser?i.parser:t).parse&&(t=t.parse);try{s=t(e,i)}catch(t){this.processed=!0,this.error=t}s&&!s[xr]&&Dr.rebuild(s)}else s=zr(e);this.result=new Nr(t,s,i),this.helpers={...Yr,postcss:Yr,result:this.result},this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?{...t,...t.prepare(this.result)}:t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var i=this.result.lastPlugin;try{e&&e.addToError(t),"CssSyntaxError"!==(this.error=t).name||t.plugin?i.postcssVersion:(t.plugin=i.postcssPlugin,t.setMessage())}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t,e=(t,e,i)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,i])};for(t of this.plugins)if("object"==typeof t)for(var i in t){if(!Br[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Ur[i])if("object"==typeof t[i])for(var s in t[i])"*"===s?e(t,i,t[i][s]):e(t,i+"-"+s.toLowerCase(),t[i][s]);else"function"==typeof t[i]&&e(t,i,t[i])}this.hasListener=0<Object.keys(this.listeners).length}async runAsync(){for(let t=this.plugin=0;t<this.plugins.length;t++){var e=this.plugins[t],e=this.runOnRoot(e);if(Gr(e))try{await e}catch(t){throw this.handleError(t)}}if(this.prepareVisitors(),this.hasListener){for(var i,s=this.result.root;!s[Rr];){s[Rr]=!0;for(var r=[Vr(s)];0<r.length;){var n=this.visitTick(r);if(Gr(n))try{await n}catch(t){n=r[r.length-1].node;throw this.handleError(t,n)}}}if(this.listeners.OnceExit)for(let[t,e]of this.listeners.OnceExit){this.result.lastPlugin=t;try{"document"===s.type?(i=s.nodes.map(t=>e(t,this.helpers)),await Promise.all(i)):await e(s,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{var t;return"object"==typeof e&&e.Once?"document"===this.result.root.type?Gr((t=this.result.root.nodes.map(t=>e.Once(t,this.helpers)))[0])?Promise.all(t):t:e.Once(this.result.root,this.helpers):"function"==typeof e?e(this.result.root,this.result):void 0}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(!this.stringified){this.stringified=!0,this.sync();var e=this.result.opts;let t=Tr;e.syntax&&(t=e.syntax.stringify),(t=e.stringifier?e.stringifier:t).stringify&&(t=t.stringify);e=new Er(t,this.result.root,this.result.opts).generate();this.result.css=e[0],this.result.map=e[1]}return this.result}sync(){if(this.error)throw this.error;if(!this.processed){if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins)if(Gr(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[Rr];)e[Rr]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var i of e.nodes)this.visitSync(this.listeners.OnceExit,i);else this.visitSync(this.listeners.OnceExit,e)}}return this.result}then(t,e){return this.async().then(t,e)}toString(){return this.css}visitSync(t,e){for(var[i,s]of t){this.result.lastPlugin=i;let t;try{t=s(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(Gr(t))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:i,visitors:s}=e;if("root"===i.type||"document"===i.type||i.parent){if(0<s.length&&e.visitorIndex<s.length){var[r,n]=s[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===s.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=r;try{return n(i.toProxy(),this.helpers)}catch(t){throw this.handleError(t,i)}}if(0!==e.iterator){for(var o,a=e.iterator;o=i.nodes[i.indexes[a]];)if(i.indexes[a]+=1,!o[Rr])return o[Rr]=!0,void t.push(Vr(o));e.iterator=0,delete i.indexes[a]}for(var l=e.events;e.eventIndex<l.length;){var h=l[e.eventIndex];if(e.eventIndex+=1,h===Pr)return void(i.nodes&&i.nodes.length&&(i[Rr]=!0,e.iterator=i.getIterator()));if(this.listeners[h])return void(e.visitors=this.listeners[h])}}t.pop()}walkSync(t){var e;t[Rr]=!0;for(e of Wr(t))if(e===Pr)t.nodes&&t.each(t=>{t[Rr]||this.walkSync(t)});else{var i=this.listeners[e];if(i&&this.visitSync(i,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}},h.registerPostcss=t=>{Yr=t},y=h;g.registerLazyResult(h.default=h),c.registerLazyResult(h);let Zr=p,Kr=s;let Jr=v;const Xr=n;g=class{constructor(t,e,i){e=e.toString(),this.stringified=!1,this.Ss=t,this.Cs=e,this.Is=i,this.ks=void 0;t=Kr;this.result=new Xr(this.Ss,void 0,this.Is),this.result.css=e;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});i=new Zr(t,void 0,this.Is,e);i.isMap()?([t,e]=i.generate(),t&&(this.result.css=t),e&&(this.result.map=e)):(i.clearAnnotation(),this.result.css=i.css)}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return this.async().then(t,e)}toString(){return this.Cs}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this.Os)return this.Os;let t;var e=Jr;try{t=e(this.Cs,this.Is)}catch(t){this.error=t}if(this.error)throw this.error;return this.Os=t}get[Symbol.toStringTag](){return"NoWorkResult"}},c=g;g.default=g;let $r=c,Hr=y;h=S,p=class{constructor(t=[]){this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){let e=[];for(var i of t)if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"==typeof i&&Array.isArray(i.plugins))e=e.concat(i.plugins);else if("object"==typeof i&&i.postcssPlugin)e.push(i);else if("function"==typeof i)e.push(i);else if("object"!=typeof i||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");return e}process(t,e={}){return new(this.plugins.length||e.parser||e.stringifier||e.syntax?Hr:$r)(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},g=p;r.registerProcessor(p.default=p),h.registerProcessor(p);let qr=u,Qr=w,tn=b,en=i,sn=m,rn=r,nn=f;function on(t,i){if(Array.isArray(t))return t.map(t=>on(t));let{inputs:e,...s}=t;if(e){i=[];for(var r of e){r={...r,__proto__:sn.prototype};r.map&&(r.map={...r.map,__proto__:Qr.prototype}),i.push(r)}}if(s.nodes&&(s.nodes=t.nodes.map(t=>on(t,i))),s.source){let{inputId:t,...e}=s.source;s.source=e,null!=t&&(s.source.input=i[t])}if("root"===s.type)return new rn(s);if("decl"===s.type)return new qr(s);if("rule"===s.type)return new nn(s);if("comment"===s.type)return new tn(s);if("atrule"===s.type)return new en(s);throw new Error("Unknown node type: "+t.type)}c=on,on.default=on,h=d;let an=u;p=y,w=o;let ln=g;d=s,u=c;let hn=S;y=Mi;let un=b,cn=i;o=n,g=m,s=v,c=t;let dn=f,fn=r;S=l;function k(...t){return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new ln(t)}k.plugin=function(e,i){let s=!1;function r(...t){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");t=i(...t);return t.postcssPlugin=e,t.postcssVersion=(new ln).version,t}let t;return Object.defineProperty(r,"postcss",{get(){return t=t||r()}}),r.process=function(t,e,i){return k([r(i)]).process(t,e)},r},k.stringify=d,k.parse=s,k.fromJSON=u,k.list=c,k.comment=t=>new un(t),k.atRule=t=>new cn(t),k.decl=t=>new an(t),k.rule=t=>new dn(t),k.root=t=>new fn(t),k.document=t=>new hn(t),k.CssSyntaxError=h,k.Declaration=an,k.Container=w,k.Processor=ln,k.Document=hn,k.Comment=un,k.Warning=y,k.AtRule=cn,k.Result=o,k.Input=g,k.Rule=dn,k.Root=fn,k.Node=S,p.registerPostcss(k);Mi=k,k.default=k,b=Xi(Mi);b.stringify,b.fromJSON,b.plugin,b.parse,b.list,b.document,b.comment,b.atRule,b.rule,b.decl,b.root,b.CssSyntaxError,b.Declaration,b.Container,b.Processor,b.Document,b.Comment,b.Warning,b.AtRule,b.Result,b.Input,b.Rule,b.Root,b.Node;const vn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},pn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},mn={};function gn(t){if(mn[t])return mn[t];var e=globalThis[t];const i=e.prototype;var s=t in vn?vn[t]:void 0,s=Boolean(s&&s.every(t=>{return Boolean(null==(t=null==(t=Object.getOwnPropertyDescriptor(i,t))?void 0:t.get)?void 0:t.toString().includes("[native code]"))})),r=t in pn?pn[t]:void 0,r=Boolean(r&&r.every(t=>{return"function"==typeof i[t]&&(null==(t=i[t])?void 0:t.toString().includes("[native code]"))}));if(s&&r)return mn[t]=e.prototype,e.prototype;try{var n,o=document.createElement("iframe"),a=(document.body.appendChild(o),o.contentWindow);return a?(n=a[t].prototype,document.body.removeChild(o),n?mn[t]=n:i):e.prototype}catch{return i}}const bn={};function yn(t,e,i){var s=t+"."+String(i);return bn[s]?bn[s].call(e):(t=gn(t),(t=null==(t=Object.getOwnPropertyDescriptor(t,i))?void 0:t.get)?(bn[s]=t).call(e):e[i])}const wn={};function Sn(t,e,i){var s=t+"."+String(i);return wn[s]?wn[s].bind(e):"function"!=typeof(t=gn(t)[i])?e[i]:(wn[s]=t).bind(e)}function In(){return gn("MutationObserver").constructor}const H={childNodes:function(t){return yn("Node",t,"childNodes")},parentNode:function(t){return yn("Node",t,"parentNode")},parentElement:function(t){return yn("Node",t,"parentElement")},textContent:function(t){return yn("Node",t,"textContent")},contains:function(t,e){return Sn("Node",t,"contains")(e)},getRootNode:function(t){return Sn("Node",t,"getRootNode")()},host:function(t){return t&&"host"in t?yn("ShadowRoot",t,"host"):null},styleSheets:function(t){return t.styleSheets},shadowRoot:function(t){return t&&"shadowRoot"in t?yn("Element",t,"shadowRoot"):null},querySelector:function(t,e){return yn("Element",t,"querySelector")(e)},querySelectorAll:function(t,e){return yn("Element",t,"querySelectorAll")(e)},mutationObserver:In};function q(t,e,i=document){const s={capture:!0,passive:!0};return i.addEventListener(t,e,s),()=>i.removeEventListener(t,e,s)}const Cn="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.";i={map:{},getId(){return console.error(Cn),-1},getNode(){return console.error(Cn),null},removeNodeFromMap(){console.error(Cn)},has(){return console.error(Cn),!1},reset(){console.error(Cn)}};function kn(r,n,o={}){let a=null,l=0;return function(...t){var e=Date.now(),i=(l||!1!==o.leading||(l=e),n-(e-l));const s=this;i<=0||n<i?(a&&(clearTimeout(a),a=null),l=e,r.apply(s,t)):a||!1===o.trailing||(a=setTimeout(()=>{l=!1===o.leading?0:Date.now(),a=null,r.apply(s,t)},i))}}function _n(t,e,i,s,r=window){const n=r.Object.getOwnPropertyDescriptor(t,e);return r.Object.defineProperty(t,e,s?i:{set(t){setTimeout(()=>{i.set.call(this,t)},0),n&&n.set&&n.set.call(this,t)}}),()=>_n(t,e,n||{},!0)}function On(t,e,i){try{if(!(e in t))return()=>{};const r=t[e];var s=i(r);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=s,()=>{t[e]=r}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&new Proxy(i,{get(t,e,i){return"map"===e&&console.error(Cn),Reflect.get(t,e,i)}});let Mn=Date.now;function An(t){var e,i=t.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(e=H.parentElement(i.body))?void 0:e.scrollLeft)||(null==(e=null==i?void 0:i.body)?void 0:e.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(e=H.parentElement(i.body))?void 0:e.scrollTop)||(null==(t=null==i?void 0:i.body)?void 0:t.scrollTop)||0}}function jn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Rn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function xn(t){return t?t.nodeType===t.ELEMENT_NODE?t:H.parentElement(t):null}function N(t,e,i,s){if(t){t=xn(t);if(t){try{if("string"==typeof e){if(t.classList.contains(e))return!0;if(s&&null!==t.closest("."+e))return!0}else if(Ot(t,e,s))return!0}catch(t){}if(i){if(t.matches(i))return!0;if(s&&null!==t.closest(i))return!0}}}return!1}function En(t,e,i){return"TITLE"===t.tagName&&i.headTitleMutations||e.getId(t)===vt}function Tn(t){return Boolean(t.changedTouches)}function Dn(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function Nn(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function Fn(t){return t&&(!1&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(H.shadowRoot(t)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Mn=()=>(new Date).getTime());class Ln{constructor(){a(this,"id",1),a(this,"styleIDMap",new WeakMap),a(this,"idStyleMap",new Map)}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,e){if(this.has(t))return this.getId(t);let i;return i=void 0===e?this.id++:e,this.styleIDMap.set(t,i),this.idStyleMap.set(i,t),i}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 Bn(t){var e;let i=null;return i="getRootNode"in t&&(null==(e=H.getRootNode(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&H.host(H.getRootNode(t))?H.host(H.getRootNode(t)):i}function Un(t){var e=t.ownerDocument;return!!e&&(t=function(t){let e=t;for(var i;i=Bn(e);)e=i;return e}(t),H.contains(e,t))}function Pn(t){var e=t.ownerDocument;return e&&(H.contains(e,t)||Un(t))}var Q=(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))({}),tt=(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))(tt||{}),_=(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))(_||{}),Gn=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Gn||{}),Wn=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))({}),Vn=(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))(Vn||{});function zn(t){return"__ln"in t}class Yn{constructor(){a(this,"length",0),a(this,"head",null),a(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let i=this.head;for(let t=0;t<e;t++)i=(null==i?void 0:i.next)||null;return i}addNode(t){var e,i={value:t,previous:null,next:null};t.__ln=i,t.previousSibling&&zn(t.previousSibling)?(e=t.previousSibling.__ln.next,i.next=e,i.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=i,e&&(e.previous=i)):t.nextSibling&&zn(t.nextSibling)&&t.nextSibling.__ln.previous?(e=t.nextSibling.__ln.previous,i.previous=e,i.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=i,e&&(e.next=i)):(this.head&&(this.head.previous=i),i.next=this.head,this.head=i),null===i.next&&(this.tail=i),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--)}}class Zn{constructor(){a(this,"frozen",!1),a(this,"locked",!1),a(this,"texts",[]),a(this,"attributes",[]),a(this,"attributeMap",new WeakMap),a(this,"removes",[]),a(this,"mapRemoves",[]),a(this,"movedMap",{}),a(this,"addedSet",new Set),a(this,"movedSet",new Set),a(this,"droppedSet",new Set),a(this,"mutationCb"),a(this,"blockClass"),a(this,"blockSelector"),a(this,"maskTextClass"),a(this,"maskTextSelector"),a(this,"inlineStylesheet"),a(this,"maskInputOptions"),a(this,"maskTextFn"),a(this,"maskInputFn"),a(this,"keepIframeSrcFn"),a(this,"recordCanvas"),a(this,"inlineImages"),a(this,"slimDOMOptions"),a(this,"dataURLOptions"),a(this,"doc"),a(this,"mirror"),a(this,"iframeManager"),a(this,"stylesheetManager"),a(this,"shadowDomManager"),a(this,"canvasManager"),a(this,"processedNodeManager"),a(this,"unattachedDoc"),a(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),a(this,"emit",()=>{if(!this.frozen&&!this.locked){const l=[],h=new Set,u=new Yn,c=t=>{let e=t,i=vt;for(;i===vt;)e=e&&e.nextSibling,i=e&&this.mirror.getId(e);return i};for(var i,s,r=e=>{var t,i,s=H.parentNode(e);if(s&&Pn(e)&&"TEXTAREA"!==s.tagName)return s=V(s)?this.mirror.getId(Bn(e)):this.mirror.getId(s),t=c(e),-1===s||-1===t?u.addNode(e):void((i=jt(e,{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=>{Dn(t,this.mirror)&&this.iframeManager.addIframe(t),Nn(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),Fn(e)&&this.shadowDomManager.addShadowRoot(H.shadowRoot(e),this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)}}))&&(l.push({parentId:s,nextId:t,node:i}),h.add(i.id)))};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const d of this.movedSet)Jn(this.removes,d,this.mirror)&&!this.movedSet.has(H.parentNode(d))||r(d);for(const f of this.addedSet)!Xn(this.droppedSet,f)&&!Jn(this.removes,f,this.mirror)||Xn(this.movedSet,f)?r(f):this.droppedSet.add(f);let t=null;for(;u.length;){let e=null;if(!(e=t&&(i=this.mirror.getId(H.parentNode(t.value)),s=c(t.value),-1!==i)&&-1!==s?t:e)){let t=u.tail;for(;t;){var n=t;if(t=t.previous,n){var o=this.mirror.getId(H.parentNode(n.value)),a=c(n.value);if(-1!==a){if(-1!==o){e=n;break}a=n.value,o=H.parentNode(a);if(o&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE){a=H.host(o);if(-1!==this.mirror.getId(a)){e=n;break}}}}}}if(!e){for(;u.head;)u.removeNode(u.head.value);break}t=e.previous,u.removeNode(e.value),r(e.value)}var e={texts:this.texts.map(t=>{var e=t.node,i=H.parentNode(e);return i&&"TEXTAREA"===i.tagName&&this.genTextAreaValueMutation(i),{id:this.mirror.getId(e),value:t.value}}).filter(t=>!h.has(t.id)).filter(t=>this.mirror.has(t.id)),attributes:this.attributes.map(t=>{var e,i,s=t["attributes"];return"string"==typeof s.style&&(e=JSON.stringify(t.styleDiff),i=JSON.stringify(t.Es),e.length<s.style.length)&&(e+i).split("var(").length===s.style.split("var(").length&&(s.style=t.styleDiff),{id:this.mirror.getId(t.node),attributes:s}}).filter(t=>!h.has(t.id)).filter(t=>this.mirror.has(t.id)),removes:this.removes,adds:l};(e.texts.length||e.attributes.length||e.removes.length||e.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(e))}}),a(this,"genTextAreaValueMutation",t=>{let e=this.attributeMap.get(t);e||(e={node:t,attributes:{},styleDiff:{},Es:{}},this.attributes.push(e),this.attributeMap.set(t,e)),e.attributes.value=Array.from(H.childNodes(t),t=>H.textContent(t)||"").join("")}),a(this,"processMutation",s=>{if(!En(s.target,this.mirror,this.slimDOMOptions))switch(s.type){case"characterData":var r=H.textContent(s.target);N(s.target,this.blockClass,this.blockSelector,!1)||r===s.oldValue||this.texts.push({value:Mt(s.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,xn(s.target)):r.replace(/[\S]/g,"*"):r,node:s.target});break;case"attributes":{var n=s.target;let t=s.attributeName,e=s.target.getAttribute(t);if("value"===t&&(r=lt(n),e=nt({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:r,value:e,maskInputFn:this.maskInputFn})),N(s.target,this.blockClass,this.blockSelector,!1)||e===s.oldValue)return;let i=this.attributeMap.get(s.target);if("IFRAME"===n.tagName&&"src"===t&&!this.keepIframeSrcFn(e)){if(n.contentDocument)return;t="rr_src"}if(i||(i={node:s.target,attributes:{},styleDiff:{},Es:{}},this.attributes.push(i),this.attributeMap.set(s.target,i)),"type"===t&&"INPUT"===n.tagName&&"password"===(s.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!_t(n.tagName,t))if(i.attributes[t]=kt(this.doc,ot(n.tagName),ot(t),e),"style"===t){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}var o=this.unattachedDoc.createElement("span");s.oldValue&&o.setAttribute("style",s.oldValue);for(const h of Array.from(n.style)){var a=n.style.getPropertyValue(h),l=n.style.getPropertyPriority(h);a!==o.style.getPropertyValue(h)||l!==o.style.getPropertyPriority(h)?i.styleDiff[h]=""===l?a:[a,l]:i.Es[h]=[a,l]}for(const u of Array.from(o.style))""===n.style.getPropertyValue(u)&&(i.styleDiff[u]=!1)}else"open"===t&&"DIALOG"===n.tagName&&(n.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal");break}case"childList":N(s.target,this.blockClass,this.blockSelector,!0)||("TEXTAREA"!==s.target.tagName?(s.addedNodes.forEach(t=>this.genAdds(t,s.target)),s.removedNodes.forEach(t=>{var e=this.mirror.getId(t),i=V(s.target)?this.mirror.getId(H.host(s.target)):this.mirror.getId(s.target);N(s.target,this.blockClass,this.blockSelector,!1)||En(t,this.mirror,this.slimDOMOptions)||-1===this.mirror.getId(t)||(this.addedSet.has(t)?(Kn(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(s.target)&&-1===e||function t(e,i){var s;return!V(e)&&(s=i.getId(e),!i.has(s)||(!(s=H.parentNode(e))||s.nodeType!==e.DOCUMENT_NODE)&&(!s||t(s,i)))}(s.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[e+"@"+i]?Kn(this.movedSet,t):this.removes.push({parentId:i,id:e,isShadow:!(!V(s.target)||!z(s.target))||void 0})),this.mapRemoves.push(t))})):this.genTextAreaValueMutation(s.target))}}),a(this,"genAdds",(e,i)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(En(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let t=null;(t=i&&this.mirror.hasNode(i)?this.mirror.getId(i):t)&&-1!==t&&(this.movedMap[this.mirror.getId(e)+"@"+t]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);N(e,this.blockClass,this.blockSelector,!1)||(H.childNodes(e).forEach(t=>this.genAdds(t)),Fn(e)&&H.childNodes(H.shadowRoot(e)).forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Kn(e,t){e.delete(t),H.childNodes(t).forEach(t=>Kn(e,t))}function Jn(e,i,s){if(0!==e.length){var r=e;e=i;var n=s;let t=H.parentNode(e);for(;t;){const o=n.getId(t);if(r.some(t=>t.id===o))return 1;t=H.parentNode(t)}}}function Xn(t,e){return 0!==t.size&&function t(e,i){const s=H.parentNode(i);if(!s)return!1;if(e.has(s))return!0;return t(e,s)}(t,e)}let $n;const et=e=>{return $n?(...t)=>{try{return e(...t)}catch(t){if(!$n||!0!==$n(t))throw t}}:e},Hn=[];function qn(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{}return t&&t.target}function Qn(t,e){var i=new Zn,t=(Hn.push(i),i.init(t),new(In())(et(i.processMutations.bind(i))));return t.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),t}function to({mouseInteractionCb:o,doc:s,mirror:a,blockClass:l,blockSelector:h,sampling:t}){if(!1===t.mouseInteraction)return()=>{};const e=!0===t.mouseInteraction||void 0===t.mouseInteraction?{}:t.mouseInteraction,r=[];let u=null;return Object.keys(_).filter(t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==e[t]).forEach(t=>{let e=ot(t);n=t;var n,i=i=>{var s=qn(i);if(!N(s,l,h,!0)){let t=null,e=n;if("pointerType"in i){switch(i.pointerType){case"mouse":t=Gn.Mouse;break;case"touch":t=Gn.Touch;break;case"pen":t=Gn.Pen}t===Gn.Touch?_[n]===_.MouseDown?e="TouchStart":_[n]===_.MouseUp&&(e="TouchEnd"):(t,Gn.Pen)}else Tn(i)&&(t=Gn.Touch);null!==t?(u=t,(e.startsWith("Touch")&&t===Gn.Touch||e.startsWith("Mouse")&&t===Gn.Mouse)&&(t=null)):_[n]===_.Click&&(t=u,u=null);var r,i=Tn(i)?i.changedTouches[0]:i;i&&(s=a.getId(s),{clientX:i,clientY:r}=i,et(o)({type:_[e],id:s,x:i,y:r,...null!==t&&{pointerType:t}}))}};if(window.PointerEvent)switch(_[t]){case _.MouseDown:case _.MouseUp:e=e.replace("mouse","pointer");break;case _.TouchStart:case _.TouchEnd:return}r.push(q(e,i,s))}),et(()=>{r.forEach(t=>t())})}function eo({scrollCb:s,doc:r,mirror:n,blockClass:o,blockSelector:a,sampling:t}){return q("scroll",et(kn(et(t=>{var e,i,t=qn(t);t&&!N(t,o,a,!0)&&(e=n.getId(t),t===r&&r.defaultView?(i=An(r.defaultView),s({id:e,x:i.left,y:i.top})):s({id:e,x:t.scrollLeft,y:t.scrollTop}))}),t.scroll||100)),r)}const io=["INPUT","TEXTAREA","SELECT"],so=new WeakMap;function ro(t){var e,i;return t=t,e=[],lo("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||lo("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||lo("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||lo("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule?(i=Array.from(t.parentRule.cssRules).indexOf(t),e.unshift(i)):t.parentStyleSheet&&(i=Array.from(t.parentStyleSheet.cssRules).indexOf(t),e.unshift(i)),e}function no(t,e,i){let s,r;return t?(t.ownerNode?s=e.getId(t.ownerNode):r=i.getId(t),{styleId:r,id:s}):{}}function oo({mirror:t,stylesheetManager:i},e){let s=null;s="#document"===e.nodeName?t.getId(e):t.getId(H.host(e));t="#document"===e.nodeName?null==(t=e.defaultView)?void 0:t.Document:null==(t=null==(t=e.ownerDocument)?void 0:t.defaultView)?void 0:t.ShadowRoot;const r=null!=t&&t.prototype?Object.getOwnPropertyDescriptor(null==t?void 0:t.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&t&&r?(Object.defineProperty(e,"adoptedStyleSheets",{configurable:r.configurable,enumerable:r.enumerable,get(){var t;return null==(t=r.get)?void 0:t.call(this)},set(t){var e=null==(e=r.set)?void 0:e.call(this,t);if(null!==s&&-1!==s)try{i.adoptStyleSheets(t,s)}catch(t){}return e}}),et(()=>{Object.defineProperty(e,"adoptedStyleSheets",{configurable:r.configurable,enumerable:r.enumerable,get:r.get,set:r.set})})):()=>{}}function ao(t,e={}){var r,i=t.doc.defaultView;if(!i)return()=>{};{var s=t,n=e;const{mutationCb:w,mousemoveCb:S,mouseInteractionCb:I,scrollCb:C,viewportResizeCb:k,inputCb:_,mediaInteractionCb:O,styleSheetRuleCb:M,styleDeclarationCb:A,canvasMutationCb:j,fontCb:R,selectionCb:x,customElementCb:E}=s;s.mutationCb=(...t)=>{n.mutation&&n.mutation(...t),w(...t)},s.mousemoveCb=(...t)=>{n.mousemove&&n.mousemove(...t),S(...t)},s.mouseInteractionCb=(...t)=>{n.mouseInteraction&&n.mouseInteraction(...t),I(...t)},s.scrollCb=(...t)=>{n.scroll&&n.scroll(...t),C(...t)},s.viewportResizeCb=(...t)=>{n.viewportResize&&n.viewportResize(...t),k(...t)},s.inputCb=(...t)=>{n.input&&n.input(...t),_(...t)},s.mediaInteractionCb=(...t)=>{n.mediaInteaction&&n.mediaInteaction(...t),O(...t)},s.styleSheetRuleCb=(...t)=>{n.styleSheetRule&&n.styleSheetRule(...t),M(...t)},s.styleDeclarationCb=(...t)=>{n.styleDeclaration&&n.styleDeclaration(...t),A(...t)},s.canvasMutationCb=(...t)=>{n.canvasMutation&&n.canvasMutation(...t),j(...t)},s.fontCb=(...t)=>{n.font&&n.font(...t),R(...t)},s.selectionCb=(...t)=>{n.selection&&n.selection(...t),x(...t)},s.customElementCb=(...t)=>{n.customElement&&n.customElement(...t),E(...t)}}let o;t.recordDOM&&(o=Qn(t,t.doc));const a=function({mousemoveCb:i,sampling:t,doc:e,mirror:r}){if(!1===t.mousemove)return()=>{};var s="number"==typeof t.mousemove?t.mousemove:50,t="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let n=[],o;const a=kn(et(t=>{const e=Date.now()-o;i(n.map(t=>(t.timeOffset-=e,t)),t),n=[],o=null}),t),l=[q("mousemove",t=et(kn(et(t=>{var e=qn(t),{clientX:i,clientY:s}=Tn(t)?t.changedTouches[0]:t;o=o||Mn(),n.push({x:i,y:s,id:r.getId(e),timeOffset:Mn()-o}),a("undefined"!=typeof DragEvent&&t instanceof DragEvent?tt.Drag:t instanceof MouseEvent?tt.MouseMove:tt.TouchMove)}),s,{trailing:!1})),e),q("touchmove",t,e),q("drag",t,e)];return et(()=>{l.forEach(t=>t())})}(t),l=to(t),h=eo(t),u=function({viewportResizeCb:i},{win:t}){let s=-1,r=-1;return q("resize",et(kn(et(()=>{var t=jn(),e=Rn();s===t&&r===e||(i({width:Number(e),height:Number(t)}),s=t,r=e)}),200)),t)}(t,{win:i}),c=function({inputCb:s,doc:o,mirror:r,blockClass:t,blockSelector:i,ignoreClass:a,ignoreSelector:l,maskInputOptions:h,maskInputFn:u,sampling:e,userTriggeredOnInput:c}){function n(e){let s=qn(e);var e=e.isTrusted,r=s&&s.tagName;if((s=s&&"OPTION"===r?H.parentElement(s):s)&&r&&!(io.indexOf(r)<0)&&!N(s,t,i,!0)&&!(s.classList.contains(a)||l&&s.matches(l))){let t=s.value,i=!1;var n=lt(s)||"",r=("radio"===n||"checkbox"===n?i=s.checked:(h[r.toLowerCase()]||h[n])&&(t=nt({element:s,maskInputOptions:h,tagName:r,type:n,value:t,maskInputFn:u})),d(s,c?{text:t,isChecked:i,userTriggered:e}:{text:t,isChecked:i}),s.name);"radio"===n&&r&&i&&o.querySelectorAll(`input[type="radio"][name="${r}"]`).forEach(t=>{var e;t!==s&&(e=t.value,d(t,c?{text:e,isChecked:!i,userTriggered:!1}:{text:e,isChecked:!i}))})}}function d(t,e){var i=so.get(t);i&&i.text===e.text&&i.isChecked===e.isChecked||(so.set(t,e),i=r.getId(t),et(s)({...e,id:i}))}var f;const v=("last"===e.input?["change"]:["input","change"]).map(t=>q(t,et(n),o)),p=o.defaultView;return p?(e=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),f=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]],e&&e.set&&v.push(...f.map(t=>_n(t[0],t[1],{set(){et(n)({target:this,isTrusted:!1})}},!1,p))),et(()=>{v.forEach(t=>t())})):()=>{v.forEach(t=>t())}}(t),d=function({mediaInteractionCb:a,blockClass:l,blockSelector:h,mirror:u,sampling:t,doc:e}){var i=et(o=>kn(et(t=>{var e,i,s,r,n,t=qn(t);t&&!N(t,l,h,!0)&&({currentTime:e,volume:i,muted:s,playbackRate:r,loop:n}=t,a({type:o,id:u.getId(t),currentTime:e,volume:i,muted:s,playbackRate:r,loop:n}))}),t.media||500));const s=[q("play",i(Vn.Play),e),q("pause",i(Vn.Pause),e),q("seeked",i(Vn.Seeked),e),q("volumechange",i(Vn.VolumeChange),e),q("ratechange",i(Vn.RateChange),e)];return et(()=>{s.forEach(t=>t())})}(t);let f=()=>{},v=()=>{},p=()=>{},m=()=>{};t.recordDOM&&(f=function({styleSheetRuleCb:a,mirror:l,stylesheetManager:h},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const t=s.CSSStyleSheet.prototype.insertRule,e=(s.CSSStyleSheet.prototype.insertRule=new Proxy(t,{apply:et((t,e,i)=>{var[s,r]=i,{id:n,styleId:o}=no(e,l,h.styleMirror);return(n&&-1!==n||o&&-1!==o)&&a({id:n,styleId:o,adds:[{rule:s,index:r}]}),t.apply(e,i)})}),s.CSSStyleSheet.prototype.addRule=function(t,e,i=this.cssRules.length){return s.CSSStyleSheet.prototype.insertRule.apply(this,[t+` { ${e} }`,i])},s.CSSStyleSheet.prototype.deleteRule);s.CSSStyleSheet.prototype.deleteRule=new Proxy(e,{apply:et((t,e,i)=>{var[s]=i,{id:r,styleId:n}=no(e,l,h.styleMirror);return(r&&-1!==r||n&&-1!==n)&&a({id:r,styleId:n,removes:[{index:s}]}),t.apply(e,i)})}),s.CSSStyleSheet.prototype.removeRule=function(t){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[t])};let i;s.CSSStyleSheet.prototype.replace&&(i=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:et((t,e,i)=>{var[s]=i,{id:r,styleId:n}=no(e,l,h.styleMirror);return(r&&-1!==r||n&&-1!==n)&&a({id:r,styleId:n,replace:s}),t.apply(e,i)})}));let r;s.CSSStyleSheet.prototype.replaceSync&&(r=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(r,{apply:et((t,e,i)=>{var[s]=i,{id:r,styleId:n}=no(e,l,h.styleMirror);return(r&&-1!==r||n&&-1!==n)&&a({id:r,styleId:n,replaceSync:s}),t.apply(e,i)})}));const n={},o=(ho("CSSGroupingRule")?n.CSSGroupingRule=s.CSSGroupingRule:(ho("CSSMediaRule")&&(n.CSSMediaRule=s.CSSMediaRule),ho("CSSConditionRule")&&(n.CSSConditionRule=s.CSSConditionRule),ho("CSSSupportsRule")&&(n.CSSSupportsRule=s.CSSSupportsRule)),{});return Object.entries(n).forEach(([t,e])=>{o[t]={insertRule:e.prototype.insertRule,deleteRule:e.prototype.deleteRule},e.prototype.insertRule=new Proxy(o[t].insertRule,{apply:et((t,e,i)=>{var[s,r]=i,{id:n,styleId:o}=no(e.parentStyleSheet,l,h.styleMirror);return(n&&-1!==n||o&&-1!==o)&&a({id:n,styleId:o,adds:[{rule:s,index:[...ro(e),r||0]}]}),t.apply(e,i)})}),e.prototype.deleteRule=new Proxy(o[t].deleteRule,{apply:et((t,e,i)=>{var[s]=i,{id:r,styleId:n}=no(e.parentStyleSheet,l,h.styleMirror);return(r&&-1!==r||n&&-1!==n)&&a({id:r,styleId:n,removes:[{index:[...ro(e),s]}]}),t.apply(e,i)})})}),et(()=>{s.CSSStyleSheet.prototype.insertRule=t,s.CSSStyleSheet.prototype.deleteRule=e,i&&(s.CSSStyleSheet.prototype.replace=i),r&&(s.CSSStyleSheet.prototype.replaceSync=r),Object.entries(n).forEach(([t,e])=>{e.prototype.insertRule=o[t].insertRule,e.prototype.deleteRule=o[t].deleteRule})})}(t,{win:i}),v=oo(t,t.doc),p=function({styleDeclarationCb:l,mirror:h,ignoreCSSAttributes:u,stylesheetManager:c},{win:t}){const d=t.CSSStyleDeclaration.prototype.setProperty,o=(t.CSSStyleDeclaration.prototype.setProperty=new Proxy(d,{apply:et((t,e,i)=>{var s,r,[n,o,a]=i;return u.has(n)?d.apply(e,[n,o,a]):({id:s,styleId:r}=no(null==(s=e.parentRule)?void 0:s.parentStyleSheet,h,c.styleMirror),(s&&-1!==s||r&&-1!==r)&&l({id:s,styleId:r,set:{property:n,value:o,priority:a},index:ro(e.parentRule)}),t.apply(e,i))})}),t.CSSStyleDeclaration.prototype.removeProperty);return t.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:et((t,e,i)=>{var s,r,[n]=i;return u.has(n)?o.apply(e,[n]):({id:s,styleId:r}=no(null==(s=e.parentRule)?void 0:s.parentStyleSheet,h,c.styleMirror),(s&&-1!==s||r&&-1!==r)&&l({id:s,styleId:r,remove:{property:n},index:ro(e.parentRule)}),t.apply(e,i))})}),et(()=>{t.CSSStyleDeclaration.prototype.setProperty=d,t.CSSStyleDeclaration.prototype.removeProperty=o})}(t,{win:i}),t.collectFonts)&&(m=function({fontCb:i,doc:t}){const e=t.defaultView;if(!e)return()=>{};const s=[],r=new WeakMap,n=e.FontFace;return e.FontFace=function(t,e,i){var s=new n(t,e,i);return r.set(s,{family:t,buffer:"string"!=typeof e,descriptors:i,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),s},t=On(t.fonts,"add",function(t){return function(e){return setTimeout(et(()=>{var t=r.get(e);t&&(i(t),r.delete(e))}),0),t.apply(this,[e])}}),s.push(()=>{e.FontFace=n}),s.push(t),et(()=>{s.forEach(t=>t())})}(t));const g=function(t){const{doc:l,mirror:h,blockClass:u,blockSelector:c,selectionCb:d}=t;let f=!0;return(t=et(()=>{var e=l.getSelection();if(!(!e||f&&null!=e&&e.isCollapsed)){f=e.isCollapsed||!1;var i=[],s=e.rangeCount||0;for(let t=0;t<s;t++){var{startContainer:r,startOffset:n,endContainer:o,endOffset:a}=e.getRangeAt(t);N(r,u,c,!0)||N(o,u,c,!0)||i.push({start:h.getId(r),startOffset:n,end:h.getId(o),endOffset:a})}d({ranges:i})}}))(),q("selectionchange",t)}(t),b=({doc:e,customElementCb:r}=[t][0],(e=e.defaultView)&&e.customElements?On(e.customElements,"define",function(s){return function(e,t,i){try{r({define:{name:e}})}catch(t){console.warn("Custom element callback failed for "+e)}return s.apply(this,[e,t,i])}}):()=>{}),y=[];for(const T of t.plugins)y.push(T.observer(T.callback,i,T.options));return et(()=>{Hn.forEach(t=>t.reset()),null!=o&&o.disconnect(),a(),l(),h(),u(),c(),d(),f(),v(),p(),m(),g(),b(),y.forEach(t=>t())})}function lo(t){return void 0!==window[t]}function ho(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class uo{constructor(t){a(this,"iframeIdToRemoteIdMap",new WeakMap),a(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,i,s){i=i||this.getIdToRemoteIdMap(t),s=s||this.getRemoteIdToIdMap(t);let r=i.get(e);return r||(r=this.generateIdFn(),i.set(e,r),s.set(r,e)),r}getIds(e,t){const i=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,i,s))}getRemoteId(t,e,i){i=i||this.getRemoteIdToIdMap(t);return"number"!=typeof e?e:i.get(e)||-1}getRemoteIds(e,t){const i=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,i))}reset(t){t?(this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)):(this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap)}getIdToRemoteIdMap(t){let e=this.iframeIdToRemoteIdMap.get(t);return e||(e=new Map,this.iframeIdToRemoteIdMap.set(t,e)),e}getRemoteIdToIdMap(t){let e=this.iframeRemoteIdToIdMap.get(t);return e||(e=new Map,this.iframeRemoteIdToIdMap.set(t,e)),e}}class co{constructor(t){a(this,"iframes",new WeakMap),a(this,"crossOriginIframeMap",new WeakMap),a(this,"crossOriginIframeMirror",new uo(pt)),a(this,"crossOriginIframeStyleMirror"),a(this,"crossOriginIframeRootIdMap",new WeakMap),a(this,"mirror"),a(this,"mutationCb"),a(this,"wrappedEmit"),a(this,"loadListener"),a(this,"stylesheetManager"),a(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new uo(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,e){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&null!=(e=t.contentWindow)&&e.addEventListener("message",this.handleMessage.bind(this)),null!=(e=this.loadListener)&&e.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&0<t.contentDocument.adoptedStyleSheets.length&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){var e=t;"rrweb"===e.data.type&&e.origin===e.data.origin&&t.source&&(t=(t=this.crossOriginIframeMap.get(t.source))&&this.transformCrossOriginEvent(t,e.data.event))&&this.wrappedEmit(t,e.data.isCheckout)}transformCrossOriginEvent(i,t){var e;switch(t.type){case Q.FullSnapshot:this.crossOriginIframeMirror.reset(i),this.crossOriginIframeStyleMirror.reset(i),this.replaceIdOnNode(t.data.node,i);var s=t.data.node.id;return this.crossOriginIframeRootIdMap.set(i,s),this.patchRootIdOnNode(t.data.node,s),{timestamp:t.timestamp,type:Q.IncrementalSnapshot,data:{source:tt.Mutation,adds:[{parentId:this.mirror.getId(i),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Q.Meta:case Q.Load:case Q.DomContentLoaded:return!1;case Q.Plugin:return t;case Q.Custom:return this.replaceIds(t.data.payload,i,["id","parentId","previousId","nextId"]),t;case Q.IncrementalSnapshot:switch(t.data.source){case tt.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,i,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,i);var e=this.crossOriginIframeRootIdMap.get(i);e&&this.patchRootIdOnNode(t.node,e)}),t.data.removes.forEach(t=>{this.replaceIds(t,i,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,i,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,i,["id"])}),t;case tt.Drag:case tt.TouchMove:case tt.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,i,["id"])}),t;case tt.ViewportResize:return!1;case tt.MediaInteraction:case tt.MouseInteraction:case tt.Scroll:case tt.CanvasMutation:case tt.Input:return this.replaceIds(t.data,i,["id"]),t;case tt.StyleSheetRule:case tt.StyleDeclaration:return this.replaceIds(t.data,i,["id"]),this.replaceStyleIds(t.data,i,["styleId"]),t;case tt.Font:return t;case tt.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,i,["start","end"])}),t;case tt.AdoptedStyleSheet:return this.replaceIds(t.data,i,["id"]),this.replaceStyleIds(t.data,i,["styleIds"]),null!=(e=t.data.styles)&&e.forEach(t=>{this.replaceStyleIds(t,i,["styleId"])}),t}}return!1}replace(t,e,i,s){for(const r of s)!Array.isArray(e[r])&&"number"!=typeof e[r]||(Array.isArray(e[r])?e[r]=t.getIds(i,e[r]):e[r]=t.getId(i,e[r]));return e}replaceIds(t,e,i){return this.replace(this.crossOriginIframeMirror,t,e,i)}replaceStyleIds(t,e,i){return this.replace(this.crossOriginIframeStyleMirror,t,e,i)}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===X.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach(t=>{this.patchRootIdOnNode(t,e)})}}class fo{constructor(t){a(this,"shadowDoms",new WeakSet),a(this,"mutationCb"),a(this,"scrollCb"),a(this,"bypassOptions"),a(this,"mirror"),a(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(z(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);const i=Qn({...this.bypassOptions,doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>i.disconnect()),this.restoreHandlers.push(eo({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&0<t.adoptedStyleSheets.length&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(H.host(t))),this.restoreHandlers.push(oo({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,s){const r=this;this.restoreHandlers.push(On(t.prototype,"attachShadow",function(i){return function(t){var t=i.call(this,t),e=H.shadowRoot(this);return e&&Pn(this)&&r.addShadowRoot(e,s),t}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var vo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",po="undefined"==typeof Uint8Array?[]:new Uint8Array(256),mo=0;mo<vo.length;mo++)po[vo.charCodeAt(mo)]=mo;function go(t){for(var e=new Uint8Array(t),i=e.length,s="",r=0;r<i;r+=3)s=(s=(s=(s+=vo[e[r]>>2])+vo[(3&e[r])<<4|e[r+1]>>4])+vo[(15&e[r+1])<<2|e[r+2]>>6])+vo[63&e[r+2]];return i%3==2?s=s.substring(0,s.length-1)+"=":i%3==1&&(s=s.substring(0,s.length-2)+"=="),s}const bo=new Map;const yo=(e,i,s)=>{if(e&&(So(e,i)||"object"==typeof e)){i=function(t,e){let i=bo.get(t);return i||(i=new Map,bo.set(t,i)),i.has(e)||i.set(e,[]),i.get(e)}(s,e.constructor.name);let t=i.indexOf(e);return-1===t&&(t=i.length,i.push(e)),t}};const wo=(t,e,i)=>t.map(t=>function e(t,i,s){var r;return t instanceof Array?t.map(t=>e(t,i,s)):null===t?t: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?{rr_type:t.constructor.name,args:[Object.values(t)]}:t instanceof ArrayBuffer?{rr_type:t.constructor.name,base64:go(t)}:t instanceof DataView?{rr_type:t.constructor.name,args:[e(t.buffer,i,s),t.byteOffset,t.byteLength]}:t instanceof HTMLImageElement?(r=t.src,{rr_type:t.constructor.name,src:r}):t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL()}:t instanceof ImageData?{rr_type:t.constructor.name,args:[e(t.data,i,s),t.width,t.height]}:So(t,i)||"object"==typeof t?{rr_type:t.constructor.name,index:yo(t,i,s)}:t}(t,e,i)),So=(e,i)=>{var t=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(t=>"function"==typeof i[t]);return Boolean(t.find(t=>e instanceof i[t]))};function Io(t,r,n,o){const e=[];try{var i=On(t.HTMLCanvasElement.prototype,"getContext",function(s){return function(t,...e){var i;return N(this,r,n,!0)||(i="experimental-webgl"===(i=t)?"webgl":i,"__context"in this||(this.__context=i),o&&["webgl","webgl2"].includes(i)&&(e[0]&&"object"==typeof e[0]?(i=e[0]).preserveDrawingBuffer||(i.preserveDrawingBuffer=!0):e.splice(0,1,{preserveDrawingBuffer:!0}))),s.apply(this,[t,...e])}});e.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{e.forEach(t=>t())}}function Co(t,s,r,n,o,a){var e,i=[];for(const h of Object.getOwnPropertyNames(t))if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))try{"function"==typeof t[h]&&(e=On(t,h,function(i){return function(...t){var e=i.apply(this,t);return yo(e,a,this),"tagName"in this.canvas&&!N(this.canvas,n,o,!0)&&(t=wo(t,a,this),t={type:s,property:h,args:t},r(this.canvas,t)),e}}),i.push(e))}catch{var l=_n(t,h,{set(t){r(this.canvas,{type:s,property:h,args:[t],setter:!0})}});i.push(l)}return i}const ko="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=";var _o;const Oo="undefined"!=typeof window&&window.Blob&&new Blob([(n=ko,Uint8Array.from(atob(n),t=>t.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});function Mo(e){let t;try{var i;if(t=Oo&&(window.URL||window.webkitURL).createObjectURL(Oo))return(i=new Worker(t,{name:null==e?void 0:e.name})).addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),i;throw""}catch(t){return new Worker("data:text/javascript;base64,"+ko,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class Ao{constructor(t){a(this,"pendingCanvasMutations",new Map),a(this,"rafStamps",{latestId:0,invokeId:null}),a(this,"mirror"),a(this,"mutationCb"),a(this,"resetObservers"),a(this,"frozen",!1),a(this,"locked",!1),a(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:i,blockClass:s,blockSelector:r,recordCanvas:n,dataURLOptions:o}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,n&&"all"===e&&this.initCanvasMutationObserver(i,s,r),n&&"number"==typeof e&&this.initCanvasFPSObserver(e,i,s,r,{dataURLOptions:o})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,i,s,r,n){const e=Io(i,s,r,!0),o=new Map,a=new Mo,l=(a.onmessage=t=>{var e,i,s,r=t.data["id"];o.set(r,!1),"base64"in t.data&&({base64:t,type:e,width:i,height:s}=t.data,this.mutationCb({id:r,type:Wn["2D"],commands:[{property:"clearRect",args:[0,0,i,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:t}],type:e}]},0,0]}]}))},1e3/t);let h=0,u;const c=()=>{const e=[];return i.document.querySelectorAll("canvas").forEach(t=>{N(t,s,r,!0)||e.push(t)}),e},d=t=>{u=(h&&t-h<l||(h=t,c().forEach(async t=>{var e,i,s=this.mirror.getId(t);o.get(s)||0!==t.width&&0!==t.height&&(o.set(s,!0),["webgl","webgl2"].includes(t.__context)&&!1===(null==(i=null==(e=t.getContext(t.__context))?void 0:e.getContextAttributes())?void 0:i.preserveDrawingBuffer)&&e.clear(e.COLOR_BUFFER_BIT),i=await createImageBitmap(t),a.postMessage({id:s,bitmap:i,width:t.width,height:t.height,dataURLOptions:n.dataURLOptions},[i]))})),requestAnimationFrame(d))};u=requestAnimationFrame(d),this.resetObservers=()=>{e(),cancelAnimationFrame(u)}}initCanvasMutationObserver(t,e,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=Io(t,e,i,!1),r=function(i,s,r,n){const t=[];var e;for(const a of Object.getOwnPropertyNames(s.CanvasRenderingContext2D.prototype))try{"function"==typeof s.CanvasRenderingContext2D.prototype[a]&&(e=On(s.CanvasRenderingContext2D.prototype,a,function(t){return function(...e){return N(this.canvas,r,n,!0)||setTimeout(()=>{var t=wo(e,s,this);i(this.canvas,{type:Wn["2D"],property:a,args:t})},0),t.apply(this,e)}}),t.push(e))}catch{var o=_n(s.CanvasRenderingContext2D.prototype,a,{set(t){i(this.canvas,{type:Wn["2D"],property:a,args:[t],setter:!0})}});t.push(o)}return()=>{t.forEach(t=>t())}}(this.processMutation.bind(this),t,e,i),n=function(t,e,i,s){const r=[];return r.push(...Co(e.WebGLRenderingContext.prototype,Wn.WebGL,t,i,s,e)),void 0!==e.WebGL2RenderingContext&&r.push(...Co(e.WebGL2RenderingContext.prototype,Wn.WebGL2,t,i,s,e)),()=>{r.forEach(t=>t())}}(this.processMutation.bind(this),t,e,i);this.resetObservers=()=>{s(),r(),n()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,e)=>{var i=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,i)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,e){var i,s;this.frozen||this.locked||(s=this.pendingCanvasMutations.get(t))&&-1!==e&&(i=s.map(t=>{const{type:e,...i}=t;return i}),s=s[0]["type"],this.mutationCb({id:e,type:s,commands:i}),this.pendingCanvasMutations.delete(t))}}class jo{constructor(t){a(this,"trackedLinkElements",new WeakSet),a(this,"mutationCb"),a(this,"adoptedStyleSheetCb"),a(this,"styleMirror",new Ln),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"ws"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){if(0!==t.length){var i={id:e,styleIds:[]},s=[];for(const r of t){let t;this.styleMirror.has(r)?t=this.styleMirror.getId(r):(t=this.styleMirror.add(r),s.push({styleId:t,rules:Array.from(r.rules||CSSRule,(t,e)=>({rule:Y(t,r.href),index:e}))})),i.styleIds.push(t)}0<s.length&&(i.styles=s),this.adoptedStyleSheetCb(i)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Ro{constructor(){a(this,"nodeMap",new WeakMap),a(this,"active",!1)}inOtherBuffer(t,e){t=this.nodeMap.get(t);return t&&Array.from(t).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(){}}let it,xo,Eo,To=!1;try{2!==Array.from([1],t=>2*t)[0]&&(_o=document.createElement("iframe"),document.body.appendChild(_o),Array.from=(null==(A=_o.contentWindow)?void 0:A.Array.from)||Array.from,document.body.removeChild(_o))}catch(t){console.debug("Unable to override Array.from",t)}const Do=new rt;function No(t={}){const{emit:s,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:i="rr-block",blockSelector:o=null,ignoreClass:F="rr-ignore",ignoreSelector:L=null,maskTextClass:a="rr-mask",maskTextSelector:l=null,inlineStylesheet:h=!0,maskAllInputs:B,maskInputOptions:e,slimDOMOptions:u,maskInputFn:c,maskTextFn:d,hooks:U,packFn:f,sampling:v={},dataURLOptions:p={},mousemoveWait:m,recordDOM:g=!0,recordCanvas:b=!1,recordCrossOriginIframes:P=!1,recordAfter:G="DOMContentLoaded"===t.recordAfter?t.recordAfter:"load",userTriggeredOnInput:W=!1,collectFonts:V=!1,inlineImages:y=!1,plugins:w,keepIframeSrcFn:S=()=>!1,ignoreCSSAttributes:z=new Set([]),errorHandler:Y}=t;t=Y,$n=t;const I=!P||window.parent===window;let C=!1;if(!I)try{window.parent.document&&(C=!1)}catch(t){C=!0}if(I&&!s)throw new Error("emit function is required");if(!I&&!C)return()=>{};void 0!==m&&void 0===v.mousemove&&(v.mousemove=m),Do.reset();const k=!0===B?{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!==e?e:{password:!0},_=!0===u||"all"===u?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===u,headMetaDescKeywords:"all"===u,headTitleMutations:"all"===u}:u||{};"NodeList"in(t=window)&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach);let Z,O=0;const K=t=>{for(const e of w||[])e.eventProcessor&&(t=e.eventProcessor(t));return t=f&&!C?f(t):t},M=(it=(t,e)=>{var i;t.timestamp=Mn(),null==(i=Hn[0])||!i.isFrozen()||t.type===Q.FullSnapshot||t.type===Q.IncrementalSnapshot&&t.data.source===tt.Mutation||Hn.forEach(t=>t.unfreeze()),I?null!=s&&s(K(t),e):C&&(i={type:"rrweb",event:K(t),origin:window.location.origin,isCheckout:e},window.parent.postMessage(i,"*")),t.type===Q.FullSnapshot?(Z=t,O=0):t.type!==Q.IncrementalSnapshot||t.data.source===tt.Mutation&&t.data.isAttachIframe||(O++,e=n&&O>=n,i=r&&t.timestamp-Z.timestamp>r,(e||i)&&xo(!0))},t=>{it({type:Q.IncrementalSnapshot,data:{source:tt.Mutation,...t}})}),J=t=>it({type:Q.IncrementalSnapshot,data:{source:tt.Scroll,...t}}),X=t=>it({type:Q.IncrementalSnapshot,data:{source:tt.CanvasMutation,...t}});const A=new jo({mutationCb:M,adoptedStyleSheetCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.AdoptedStyleSheet,...t}})}),j=new co({mirror:Do,mutationCb:M,stylesheetManager:A,recordCrossOriginIframes:P,wrappedEmit:it});for(const E of w||[])E.getMirror&&E.getMirror({nodeMirror:Do,crossOriginIframeMirror:j.crossOriginIframeMirror,crossOriginIframeStyleMirror:j.crossOriginIframeStyleMirror});const R=new Ro,x=(Eo=new Ao({recordCanvas:b,mutationCb:X,win:window,blockClass:i,blockSelector:o,mirror:Do,sampling:v.canvas,dataURLOptions:p}),new fo({mutationCb:M,scrollCb:J,bypassOptions:{blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:l,inlineStylesheet:h,maskInputOptions:k,dataURLOptions:p,maskTextFn:d,maskInputFn:c,recordCanvas:b,inlineImages:y,sampling:v,slimDOMOptions:_,iframeManager:j,stylesheetManager:A,canvasManager:Eo,keepIframeSrcFn:S,processedNodeManager:R},mirror:Do}));xo=(t=!1)=>{if(g){it({type:Q.Meta,data:{href:window.location.href,width:Rn(),height:jn()}},t),A.reset(),x.init(),Hn.forEach(t=>t.lock());var e=function(t,e){var{mirror:e=new rt,blockClass:i="rr-block",blockSelector:s=null,maskTextClass:r="rr-mask",maskTextSelector:n=null,inlineStylesheet:o=!0,inlineImages:a=!1,recordCanvas:l=!1,maskAllInputs:h=!1,maskTextFn:u,maskInputFn:c,slimDOM:d=!1,dataURLOptions:f,preserveWhiteSpace:v,onSerialize:p,onIframeLoad:m,iframeLoadTimeout:g,onStylesheetLoad:b,stylesheetLoadTimeout:y,keepIframeSrcFn:w=()=>!1}=e||{};return jt(t,{doc:t,mirror:e,blockClass:i,blockSelector:s,maskTextClass:r,maskTextSelector:n,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:u,maskInputFn:c,slimDOMOptions:!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===d,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===d?{}:d,dataURLOptions:f,inlineImages:a,recordCanvas:l,preserveWhiteSpace:v,onSerialize:p,onIframeLoad:m,iframeLoadTimeout:g,onStylesheetLoad:b,stylesheetLoadTimeout:y,keepIframeSrcFn:w,newlyAddedElement:!1})}(document,{mirror:Do,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:l,inlineStylesheet:h,maskAllInputs:k,maskTextFn:d,maskInputFn:c,slimDOM:_,dataURLOptions:p,recordCanvas:b,inlineImages:y,onSerialize:t=>{Dn(t,Do)&&j.addIframe(t),Nn(t,Do)&&A.trackLinkElement(t),Fn(t)&&x.addShadowRoot(H.shadowRoot(t),document)},onIframeLoad:(t,e)=>{j.attachIframe(t,e),x.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{A.attachLinkElement(t,e)},keepIframeSrcFn:S});if(!e)return console.warn("Failed to snapshot the document");it({type:Q.FullSnapshot,data:{node:e,initialOffset:An(window)}},t),Hn.forEach(t=>t.unlock()),document.adoptedStyleSheets&&0<document.adoptedStyleSheets.length&&A.adoptStyleSheets(document.adoptedStyleSheets,Do.getId(document))}};try{const T=[],D=t=>{return et(ao)({mutationCb:M,mousemoveCb:(t,e)=>it({type:Q.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.MouseInteraction,...t}}),scrollCb:J,viewportResizeCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.ViewportResize,...t}}),inputCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.Input,...t}}),mediaInteractionCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.MediaInteraction,...t}}),styleSheetRuleCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.StyleSheetRule,...t}}),styleDeclarationCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.StyleDeclaration,...t}}),canvasMutationCb:X,fontCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.Font,...t}}),selectionCb:t=>{it({type:Q.IncrementalSnapshot,data:{source:tt.Selection,...t}})},customElementCb:t=>{it({type:Q.IncrementalSnapshot,data:{source:tt.CustomElement,...t}})},blockClass:i,ignoreClass:F,ignoreSelector:L,maskTextClass:a,maskTextSelector:l,maskInputOptions:k,inlineStylesheet:h,sampling:v,recordDOM:g,recordCanvas:b,inlineImages:y,userTriggeredOnInput:W,collectFonts:V,doc:t,maskInputFn:c,maskTextFn:d,keepIframeSrcFn:S,blockSelector:o,slimDOMOptions:_,dataURLOptions:p,mirror:Do,iframeManager:j,stylesheetManager:A,shadowDomManager:x,processedNodeManager:R,canvasManager:Eo,ignoreCSSAttributes:z,plugins:(null==(t=null==w?void 0:w.filter(t=>t.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>it({type:Q.Plugin,data:{plugin:e.name,payload:t}})})))||[]},U)},N=(j.addLoadListener(t=>{try{T.push(D(t.contentDocument))}catch(t){console.warn(t)}}),()=>{xo(),T.push(D(document)),To=!0});return"interactive"===document.readyState||"complete"===document.readyState?N():(T.push(q("DOMContentLoaded",()=>{it({type:Q.DomContentLoaded,data:{}}),"DOMContentLoaded"===G&&N()})),T.push(q("load",()=>{it({type:Q.Load,data:{}}),"load"===G&&N()},window))),()=>{T.forEach(t=>t()),R.destroy(),To=!1,$n=void 0}}catch(t){console.warn(t)}}No.addCustomEvent=(t,e)=>{if(!To)throw new Error("please add custom event after start recording");it({type:Q.Custom,data:{tag:t,payload:e}})},No.freezePage=()=>{Hn.forEach(t=>t.freeze())},No.takeFullSnapshot=t=>{if(!To)throw new Error("please take full snapshot after start recording");xo(t)},No.mirror=Do,M.record=No},8572:function(t,e){!function(t){"use strict";let r=-1;const l=e=>{addEventListener("pageshow",t=>{t.persisted&&(r=t.timeStamp,e(t))},!0)},h=(e,i,s,r)=>{let n,o;return t=>{i.value>=0&&(t||r)&&(o=i.value-(n??0),(o||void 0===n)&&(n=i.value,i.delta=o,i.rating=((t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good")(i.value,s),e(i)))}},u=t=>{requestAnimationFrame(()=>requestAnimationFrame(()=>t()))},n=()=>{const t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},c=()=>{const t=n();return t?.activationStart??0},d=(t,e=-1)=>{const i=n();let s="navigate";r>=0?s="back-forward-cache":i&&(document.prerendering||c()>0?s="prerender":document.wasDiscarded?s="restore":i.type&&(s=i.type.replace(/_/g,"-")));return{name:t,value:e,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:s}},i=new WeakMap;function f(t,e){return i.get(t)||i.set(t,new e),i.get(t)}class a{t;i=0;o=[];h(t){if(t.hadRecentInput)return;const e=this.o[0],i=this.o.at(-1);this.i&&e&&i&&t.startTime-i.startTime<1e3&&t.startTime-e.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),this.t?.(t)}}const v=(t,e,i={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const s=new PerformanceObserver(t=>{Promise.resolve().then(()=>{e(t.getEntries())})});return s.observe({type:t,buffered:!0,...i}),s}}catch{}},p=t=>{let e=!1;return()=>{e||(t(),e=!0)}};let s=-1;const o=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,e=t=>{"hidden"===document.visibilityState&&s>-1&&(s="visibilitychange"===t.type?t.timeStamp:0,g())},m=()=>{addEventListener("visibilitychange",e,!0),addEventListener("prerenderingchange",e,!0)},g=()=>{removeEventListener("visibilitychange",e,!0),removeEventListener("prerenderingchange",e,!0)},b=()=>{if(s<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime;s=t??o(),m(),l(()=>{setTimeout(()=>{s=o(),m()})})}return{get firstHiddenTime(){return s}}},y=t=>{document.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()},w=[1800,3e3],S=(e,o={})=>{y(()=>{const i=b();let s,r=d("FCP");const n=v("paint",t=>{for(const e of t)"first-contentful-paint"===e.name&&(n.disconnect(),e.startTime<i.firstHiddenTime&&(r.value=Math.max(e.startTime-c(),0),r.entries.push(e),s(!0)))});n&&(s=h(e,r,w,o.reportAllChanges),l(t=>{r=d("FCP"),s=h(e,r,w,o.reportAllChanges),u(()=>{r.value=performance.now()-t.timeStamp,s(!0)})}))})},I=[.1,.25];let C=0,k=1/0,_=0;const O=t=>{for(const e of t)e.interactionId&&(k=Math.min(k,e.interactionId),_=Math.max(_,e.interactionId),C=_?(_-k)/7+1:0)};let M;const A=()=>M?C:performance.interactionCount??0,j=()=>{"interactionCount"in performance||M||(M=v("event",O,{type:"event",buffered:!0,durationThreshold:0}))};let R=0;class F{u=[];l=new Map;m;p;v(){R=A(),this.u.length=0,this.l.clear()}T(){const t=Math.min(this.u.length-1,Math.floor((A()-R)/50));return this.u[t]}h(t){if(this.m?.(t),!t.interactionId&&"first-input"!==t.entryType)return;const e=this.u.at(-1);let i=this.l.get(t.interactionId);if(i||this.u.length<10||t.duration>e.P){if(i?t.duration>i.P?(i.entries=[t],i.P=t.duration):t.duration===i.P&&t.startTime===i.entries[0].startTime&&i.entries.push(t):(i={id:t.interactionId,entries:[t],P:t.duration},this.l.set(i.id,i),this.u.push(i)),this.u.sort((t,e)=>e.P-t.P),this.u.length>10){const t=this.u.splice(10);for(const e of t)this.l.delete(e.id)}this.p?.(i)}}}const x=t=>{const e=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?t():(t=p(t),document.addEventListener("visibilitychange",t,{once:!0}),e(()=>{t(),document.removeEventListener("visibilitychange",t)}))},E=[200,500];class L{m;h(t){this.m?.(t)}}const T=[2500,4e3],D=[800,1800],N=t=>{document.prerendering?y(()=>N(t)):"complete"!==document.readyState?addEventListener("load",()=>N(t),!0):setTimeout(t)};t.CLSThresholds=I,t.FCPThresholds=w,t.INPThresholds=E,t.LCPThresholds=T,t.TTFBThresholds=D,t.onCLS=(n,o={})=>{S(p(()=>{let i,s=d("CLS",0);const r=f(o,a),t=t=>{for(const e of t)r.h(e);r.i>s.value&&(s.value=r.i,s.entries=r.o,i())},e=v("layout-shift",t);e&&(i=h(n,s,I,o.reportAllChanges),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&(t(e.takeRecords()),i(!0))}),l(()=>{r.i=0,s=d("CLS",0),i=h(n,s,I,o.reportAllChanges),u(()=>i())}),setTimeout(i))}))},t.onFCP=S,t.onINP=(n,o={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&y(()=>{j();let i,s=d("INP");const r=f(o,F),t=e=>{x(()=>{for(const t of e)r.h(t);const t=r.T();t&&t.P!==s.value&&(s.value=t.P,s.entries=t.entries,i())})},e=v("event",t,{durationThreshold:o.durationThreshold??40});i=h(n,s,E,o.reportAllChanges),e&&(e.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&(t(e.takeRecords()),i(!0))}),l(()=>{r.v(),s=d("INP"),i=h(n,s,E,o.reportAllChanges)}))})},t.onLCP=(o,a={})=>{y(()=>{const e=b();let i,s=d("LCP");const r=f(a,L),t=t=>{a.reportAllChanges||(t=t.slice(-1));for(const a of t)r.h(a),a.startTime<e.firstHiddenTime&&(s.value=Math.max(a.startTime-c(),0),s.entries=[a],i())},n=v("largest-contentful-paint",t);if(n){i=h(o,s,T,a.reportAllChanges);const e=p(()=>{t(n.takeRecords()),n.disconnect(),i(!0)});for(const o of["keydown","click","visibilitychange"])addEventListener(o,()=>x(e),{capture:!0,once:!0});l(t=>{s=d("LCP"),i=h(o,s,T,a.reportAllChanges),u(()=>{s.value=performance.now()-t.timeStamp,i(!0)})})}})},t.onTTFB=(e,i={})=>{let s=d("TTFB"),r=h(e,s,D,i.reportAllChanges);N(()=>{const t=n();t&&(s.value=Math.max(t.responseStart-c(),0),s.entries=[t],r(!0),l(()=>{s=d("TTFB",0),r=h(e,s,D,i.reportAllChanges),r(!0)}))})}}(e)}},s={},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o={},(()=>{"use strict";var t=o,e=n(6914);const i=n(3447),s=n(1964);var r=n(2016),e=(0,e.l)();t.default=e,r.AutoInit.attempt(({client:t})=>{new i.SessionReplay(t),new s.AutoCapture(t)})})(),o.default;function n(t){var e=s[t];return void 0!==e||(e=s[t]={exports:{}},i[t].call(e.exports,e,e.exports,n)),e.exports}var i,s,o});
|
|
2
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Statsig=e():t.Statsig=e()}(this,()=>{return i={1845:(t,i,e)=>{"use strict";var n;Object.defineProperty(i,"__esModule",{value:!0}),i.t=i.i=i.l=void 0;const s=e(7512);i.l=()=>{try{return"undefined"!=typeof __STATSIG__?__STATSIG__:l}catch(t){return l}},i.i=t=>(0,i.l)()[t];i.t=t=>{var e=(0,i.l)();return t?e.instances&&e.instances[t]:(e.instances&&1<Object.keys(e.instances).length&&s.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),e.firstInstance)};var r="__STATSIG__",o="undefined"!=typeof window?window:{},e=void 0!==e.g?e.g:{},a="undefined"!=typeof globalThis?globalThis:{};const l=null!=(n=null!=(n=null!=(n=o[r])?n:e[r])?n:a[r])?n:{instance:i.t};o[r]=l,e[r]=l,a[r]=l},2137:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.o=e.u=void 0;const s=i(1406);function n(t,e,i){if(i)return i(t,e);const n=e&&e.customIDs?e.customIDs:{};e=["uid:"+(null!=(i=null==e?void 0:e.userID)?i:""),"cids:"+Object.keys(n).sort((t,e)=>t.localeCompare(e)).map(t=>t+"-"+n[t]).join(","),"k:"+t];return(0,s.h)(e.join("|"))}e.u=n,e.o=function(t,e,i){return e?n(t,e,i):(0,s.h)("k:"+t)}},6427:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},694:function(t,e,i){"use strict";var s=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0}),e.Wn=e.DataAdapterCore=void 0;const l=i(7512),u=i(9122),r=i(8578),o=i(4534),c=i(3401);function h(t,e,i,n){return{source:t,data:e,receivedAt:Date.now(),stableID:i,fullUserHash:(0,r.v)(n)}}e.DataAdapterCore=class{constructor(t,e){this._=t,this.p=e,this.m=null,this.O=null,this.j="statsig.last_modified_time."+e,this.S=new n}attach(t,e,i){this.O=t,this.m=e}getDataSync(t){var t=t&&(0,r.T)(t,this.m),e=this.k(t),i=this.S.get(e,t);return i&&this.Li(i)?i:(i=this.I(e))&&this.Li(i)?(this.S.add(e,i),this.S.get(e,t)):null}setData(t,e){var e=e&&(0,r.T)(e,this.m),i=this.k(e);this.S.add(i,h("Bootstrap",t,null,e))}Li(t){return null==t.stableID||t.stableID===u.StableID.get(this.C())}D(e,i,n){return s(this,void 0,void 0,function*(){o.Storage.isReady()||(yield o.Storage.isReadyResolver());var t=null!=e?e:this.getDataSync(i),t=[this.M(t,i,n)];return null!=n&&n.timeoutMs&&t.push(new Promise(t=>setTimeout(t,n.timeoutMs)).then(()=>(l.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(t)})}A(i,n){return s(this,void 0,void 0,function*(){var t=i&&(0,r.T)(i,this.m),e=this.k(t),t=yield this.D(null,t,n);t&&this.S.add(e,Object.assign(Object.assign({},t),{source:"Prefetch"}))})}M(r,o,a){return s(this,void 0,void 0,function*(){var t=null!=(t=null==r?void 0:r.data)?t:null,e=null!=r&&this.N(r,o),e=yield this.R(t,o,a,e);if(!e)return l.Log.debug("No response returned for latest value"),null;var i=(0,c.P)(e,"has_updates","Response"),n=this.C(),n=u.StableID.get(n);let s=null;if(!0===(null==i?void 0:i.has_updates))s=h("Network",e,n,o);else{if(!t||!1!==(null==i?void 0:i.has_updates))return null;s=h("NetworkNotModified",t,n,o)}e=this.k(o);return this.S.add(e,s),this.U(e,s),s})}C(){return null!=this.O?this.O:(l.Log.error(this._+" is not attached to a Client"),"")}I(t){var e=null==(e=o.Storage.getItem)?void 0:e.call(o.Storage,t);return null!=e&&(t=(0,c.P)(e,"source","Cached Result"))?Object.assign(Object.assign({},t),{source:"Cache"}):null}U(t,e){o.Storage.setItem(t,JSON.stringify(e)),this.F(t)}F(t){var e=null!=(e=(0,o.G)(this.j))?e:{},t=(e[t]=Date.now(),a(e,10));t&&(delete e[t],o.Storage.removeItem(t)),(0,o.L)(this.j,e)}},e.Wn=h;class n{constructor(){this.K={}}get(t,e){var t=this.K[t],i=null==t?void 0:t.stableID,e=null==(e=null==e?void 0:e.customIDs)?void 0:e.stableID;return e&&i&&e!==i?(l.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):t}add(t,e){var i=a(this.K,9);i&&delete this.K[i],this.K[t]=e}merge(t){this.K=Object.assign(Object.assign({},this.K),t)}}function a(s,t){var e=Object.keys(s);return e.length<=t?null:e.reduce((t,e)=>{var i=s[t],n=s[e];return"object"==typeof i&&"object"==typeof n?n.receivedAt<i.receivedAt?e:t:n<i?e:t})}},8962:(t,o)=>{"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.Diagnostics=void 0;const n=new Map,i="start";function s(t,e,i,n){return Object.assign({key:i,action:e,step:n,timestamp:Date.now()},t)}function r(t,e){var i=null!=(i=n.get(t))?i:[];i.push(e),n.set(t,i)}function e(t,e){if(e in t)return t[e]}o.Diagnostics={q:t=>n.get(t),B:t=>{r(t,s({},i,"overall"))},V:(t,e,i)=>{r(t,s({success:e,error:e?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:i},"end","overall"))},J:(t,e)=>{r(t,s(e,i,"initialize","network_request"))},$:(t,e)=>{r(t,s(e,"end","initialize","network_request"))},W:t=>{r(t,s({},i,"initialize","process"))},H:(t,e)=>{r(t,s(e,"end","initialize","process"))},Y:t=>{n.delete(t)},X(t){if(t&&"object"==typeof t)return{code:e(t,"code"),name:e(t,"name"),message:e(t,"message")}},Z(t,e,i,n){return{success:!0===(null==t?void 0:t.ok),statusCode:null==t?void 0:t.status,sdkRegion:null==(t=null==t?void 0:t.headers)?void 0:t.get("x-statsig-region"),isDelta:!0===i.includes('"is_delta":true')||void 0,attempt:e,error:o.Diagnostics.X(n)}},tt(t,e,i,n){var s,r=o.Diagnostics.q(i);return null==r||r.length<=0?-1:(s=r[r.length-1].timestamp-r[0].timestamp,o.Diagnostics.Y(i),i=function(t,e){t={eventName:"statsig::diagnostics",user:t,value:null,metadata:e,time:Date.now()};return t}(t,{context:"initialize",markers:r.slice(),statsigOptions:n}),e.enqueue(i),s)}}},8809:function(t,e){"use strict";var i=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0}),e.et=void 0;const s=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),r="https://cloudflare-dns.com/dns-query",o=["i","e","d"],a=200;e.et=function(e){return i(this,void 0,void 0,function*(){var i=yield e(r,{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:s});if(i.ok){var t,i=yield i.arrayBuffer(),i=new Uint8Array(i);{var n=i,i=n.findIndex((t,e)=>e<a&&"="===String.fromCharCode(t)&&o.includes(String.fromCharCode(n[e-1])));if(-1===i)throw(t=new Error("Failed to parse TXT records from DNS")).name="DnsTxtParseError",t;let e="";for(let t=i-1;t<n.length;t++)e+=String.fromCharCode(n[t]);return e.split(",")}}throw(t=new Error("Failed to fetch TXT records from DNS")).name="DnsTxtFetchError",t})}},3539:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},5542:function(t,a,e){"use strict";var i=this&&this.__awaiter||$A();Object.defineProperty(a,"__esModule",{value:!0}),a.ErrorBoundary=a.EXCEPTION_ENDPOINT=void 0;const n=e(7512),l=e(5902),u=e(8e3),c=(a.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception","[Statsig] UnknownError");function h(t){return t instanceof Error?t:"string"==typeof t?new Error(t):new Error("An unknown error occurred.")}a.ErrorBoundary=class{constructor(t,e,i,n){this.O=t,this.m=e,this.nt=i,this.qn=n,this.it=new Set}wrap(n){try{const t=n;!function(t){const e=new Set;let i=Object.getPrototypeOf(t);for(;i&&i!==Object.prototype;)Object.getOwnPropertyNames(i).filter(t=>"function"==typeof(null===i||void 0===i?void 0:i[t])).forEach(t=>e.add(t)),i=Object.getPrototypeOf(i);return Array.from(e)}(t).forEach(e=>{const i=t[e];"$EB"in i||(t[e]=(...t)=>this.rt(e,()=>i.apply(n,t)),t[e].$EB=!0)})}catch(t){this.st("eb:wrap",t)}}logError(t,e){this.st(t,e)}getLastSeenErrorAndReset(){var t=this.qn;return this.qn=void 0,null!=t?t:null}attachErrorIfNoneExists(t){this.qn||(this.qn=h(t))}rt(e,t){try{var i=t();return i&&i instanceof Promise?i.catch(t=>this.st(e,t)):i}catch(t){return this.st(e,t),null}}st(r,o){try{n.Log.warn("Caught error in "+r,{error:o});i(this,void 0,void 0,function*(){var t,e=o||Error(c),i=e instanceof Error,n=i?e.name:"No Name",s=h(e);this.qn=s,this.it.has(n)||(this.it.add(n),null!=(s=null==(s=this.m)?void 0:s.networkConfig)&&s.preventAllNetworkTraffic?null!=(s=this.nt)&&s.call(this,{name:"error",error:o,tag:r}):(s=l.SDKType.lt(this.O),t=u.StatsigMetadataProvider.get(),i=i?e.stack:function(t){try{return JSON.stringify(t)}catch(t){return c}}(e),e=Object.assign({tag:r,exception:n,info:i,statsigOptions:function(t){if(!t)return{};const i={};return Object.entries(t).forEach(([t,e])=>{switch(typeof e){case"number":case"bigint":case"boolean":i[String(t)]=e;break;case"string":e.length<50?i[String(t)]=e:i[String(t)]="set";break;case"object":"environment"===t?i.environment=e:"networkConfig"===t?i.networkConfig=e:i[String(t)]=null!=e?"set":"unset"}}),i}(this.m)},Object.assign(Object.assign({},t),{sdkType:s})),yield(null!=(n=null==(i=null==(n=this.m)?void 0:n.networkConfig)?void 0:i.networkOverrideFunc)?n:fetch)(a.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this.O,"STATSIG-SDK-TYPE":String(s),"STATSIG-SDK-VERSION":String(t.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(e)}),null!=(i=this.nt)&&i.call(this,{name:"error",error:o,tag:r})))}).then(()=>{}).catch(()=>{})}catch(t){}}}},2922:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},2417:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},7770:function(t,e,i){"use strict";var n=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0}),e.EventLogger=void 0;const s=i(2137),r=i(1406),o=i(7512),a=i(7410),l=i(6830),u=i(1637),c=i(586),h=i(4534),d=i(1881),v=i(2397),f={},m={Startup:"startup",GainedFocus:"gained_focus"};class p{static ot(t){null!=(t=f[t])&&t.flush().catch(()=>{})}static ut(t){null!=(t=f[t])&&t.ct(m.GainedFocus)}constructor(t,e,i,n){this.O=t,this.nt=e,this.ht=i,this.m=n,this.dt=[],this.vt={},this.ft={},this._t=!1,this.gt=Date.now(),this.Yn=null!=(t=null==n?void 0:n.loggingEnabled)?t:!0===(null==n?void 0:n.disableLogging)?c.LoggingEnabledOption.disabled:c.LoggingEnabledOption.browserOnly,null!=n&&n.loggingEnabled&&void 0!==n.disableLogging&&o.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this.yt=null!=(e=null==n?void 0:n.loggingBufferMaxSize)?e:100;i=null==n?void 0:n.networkConfig;this.Ot=new d.UrlConfiguration(a.Endpoint.jt,null==i?void 0:i.logEventUrl,null==i?void 0:i.api,null==i?void 0:i.logEventFallbackUrls)}setLogEventCompressionMode(t){this.ht.setLogEventCompressionMode(t)}setLoggingEnabled(t){this.Yn=t}enqueue(t){this.St(t)&&(this.wt(t),this.Tt(),this.dt.length>this.yt)&&p.ot(this.O)}incrementNonExposureCount(t){var e=null!=(e=this.ft[t])?e:0;this.ft[t]=e+1}reset(){this.flush().catch(()=>{}),this.vt={}}start(){var t,e=(0,l.kt)();e&&"always"!==(null==(t=this.m)?void 0:t.loggingEnabled)||(f[this.O]=this,e||(0,v.It)(t=>{"background"===t?p.ot(this.O):"foreground"===t&&p.ut(this.O)}),this.ct(m.Startup),this.Dt())}stop(){return n(this,void 0,void 0,function*(){this.Et&&(clearInterval(this.Et),this.Et=null),delete f[this.O],yield this.flush()})}flush(){return n(this,void 0,void 0,function*(){var t;this.Mt(),0!==this.dt.length&&(t=this.dt,this.dt=[],yield this.At(t))})}Tt(){this._t||(this._t=!0,200<Date.now()-this.gt)||setTimeout(()=>p.ot(this.O),200)}St(t){if("always"!==(null==(e=this.m)?void 0:e.loggingEnabled)&&(0,l.kt)())return!1;if((0,u.xt)(t)){var e=t.user||{statsigEnvironment:void 0},e=(0,s.u)(this.O,e),i=t.metadata||{},t=[t.eventName,e,i.gate,i.config,i.ruleID,i.allocatedExperiment,i.parameterName,String(i.isExplicitParameter),i.reason].join("|"),e=this.vt[t],i=Date.now();if(e&&i-e<6e5)return!1;1e3<Object.keys(this.vt).length&&(this.vt={}),this.vt[t]=i}return!0}At(s){return n(this,void 0,void 0,function*(){var t,e;if("disabled"===this.Yn)return this.Nt(s),!1;try{var i=(0,v.Rt)()&&this.ht.isBeaconSupported()&&null==(null==(e=null==(t=this.m)?void 0:t.networkConfig)?void 0:e.networkOverrideFunc),n=(this.nt({name:"pre_logs_flushed",events:s}),i?this.Pt(s):yield this.Ct(s));return n.success?(this.nt({name:"logs_flushed",events:s}),!0):(o.Log.warn("Failed to flush events."),this.Nt(s),!1)}catch(t){return o.Log.warn("Failed to flush events."),!1}})}Ct(e){return n(this,void 0,void 0,function*(){var t=yield this.ht.post(this.Ut(e)),t=null!=(t=null==t?void 0:t.code)?t:-1;return{success:200<=t&&t<300}})}Pt(t){return{success:this.ht.beacon(this.Ut(t))}}Ut(t){return{sdkKey:this.O,data:{events:t},urlConfig:this.Ot,retries:3,isCompressable:!0,params:{[a.NetworkParam.EventCount]:String(t.length)},credentials:"same-origin"}}Nt(t){for(;500<t.length;)t.shift();var e=this.o();try{(0,h.L)(e,t)}catch(t){o.Log.warn("Unable to save failed logs to storage")}}ct(e){const i=this.o();n(this,void 0,void 0,function*(){h.Storage.isReady()||(yield h.Storage.isReadyResolver());var t=(0,h.G)(i);t&&(e===m.Startup&&h.Storage.removeItem(i),yield this.At(t))&&e===m.GainedFocus&&h.Storage.removeItem(i)}).catch(()=>{o.Log.warn("Failed to flush stored logs")})}o(){return"statsig.failed_logs."+(0,r.h)(this.O)}wt(t){t.user&&(t.user=Object.assign({},t.user),delete t.user.privateAttributes);var e={},i=this.Ft(),i=(i&&(e.statsigMetadata={currentPage:i}),Object.assign(Object.assign({},t),e));o.Log.debug("Enqueued Event:",i),this.dt.push(i)}Mt(){0!==Object.keys(this.ft).length&&(this.wt({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this.ft)}}),this.ft={})}Ft(){var t;if(!1!==(null==(t=this.m)?void 0:t.includeCurrentPageUrlWithEvents))return(0,l.Gt)()}Dt(){var t=null!=(t=null==(t=this.m)?void 0:t.loggingIntervalMs)?t:1e4;const e=setInterval(()=>{var t=f[this.O];t&&t.Et===e?p.ot(this.O):clearInterval(e)},t);this.Et=e}}e.EventLogger=p},1406:(t,r,e)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Lt=r.Kt=r.h=void 0;const o=e(6634);r.h=e=>{let i=0;for(let t=0;t<e.length;t++){var n=e.charCodeAt(t);i=(i<<5)-i+n,i&=i}return String(i>>>0)},r.Kt=(t,e)=>(0,r.h)(JSON.stringify((0,r.Lt)(t,e)));r.Lt=(i,n)=>{if(null==i)return null;var t=Object.keys(i).sort();const s={};return t.forEach(t=>{var e=i[t];0===n||"object"!==(0,o.zt)(e)?s[t]=e:s[t]=(0,r.Lt)(e,null!=n?n-1:n)}),s}},1333:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},7512:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Log=e.LogLevel=void 0;function i(t){return t.unshift("[Statsig]"),t}e.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class n{static info(...t){n.level>=e.LogLevel.Info&&console.info(" INFO ",...i(t))}static debug(...t){n.level>=e.LogLevel.Debug&&console.debug(" DEBUG ",...i(t))}static warn(...t){n.level>=e.LogLevel.Warn&&console.warn(" WARN ",...i(t))}static error(...t){n.level>=e.LogLevel.Error&&console.error(" ERROR ",...i(t))}}(e.Log=n).level=e.LogLevel.Warn},7787:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMemoKey=e.MemoPrefix=void 0,e.MemoPrefix={Kn:"g",Ln:"c",Vn:"e",Ts:"cl",$n:"l",Bn:"p"};const r=new Set([]),o=new Set(["userPersistedValues"]);e.createMemoKey=function(t,e,i){let n=t+"|"+e;if(i)for(const s of Object.keys(i)){if(o.has(s))return;r.has(s)?n+=`|${s}=true`:n+=`|${s}=`+i[s]}return n}},7410:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NetworkParam=e.NetworkDefault=e.Endpoint=void 0,e.Endpoint={qt:"initialize",jt:"rgstr",Bt:"download_config_specs"},e.NetworkDefault={[e.Endpoint.jt]:"https://prodregistryv2.org/v1",[e.Endpoint.qt]:"https://featureassets.org/v1",[e.Endpoint.Bt]:"https://api.statsigcdn.com/v1"},e.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}},7023:function(t,e,i){"use strict";var I=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0}),e.NetworkCore=void 0,i(1845);const v=i(1845),_=i(8962),C=i(7512),w=i(7410),n=i(308),f=i(3091),o=i(5902),s=i(6830),a=i(4143),l=i(9122),S=i(2636),u=i(8e3),m=i(586),k=i(2397),O=500,A=3e4;const M=new Set([408,500,502,503,504,522,524,599]);e.NetworkCore=class{constructor(t,e){this.nt=e,this.$t=null,this.Vt=1e4,this.Jt={},this.m={},this.Oi={},this.Jn=null,t&&(this.m=t),this.m.networkConfig&&(this.Jt=this.m.networkConfig),this.Jt.networkTimeoutMs&&(this.Vt=this.Jt.networkTimeoutMs),this.Wt=new n.NetworkFallbackResolver(this.m),this.setLogEventCompressionMode(this.Qn(t))}setLogEventCompressionMode(t){this.m.logEventCompressionMode=t}setErrorBoundary(t){this.$t=t,this.$t.wrap(this),this.$t.wrap(this.Wt),this.Wt.setErrorBoundary(t)}isBeaconSupported(){return"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon}getLastUsedInitUrlAndReset(){var t=this.Jn;return this.Jn=null,t}beacon(t){var e,i;return!!j(t)&&(t=this.Ht("POST",t),e=this.Xt(t),(i=navigator).sendBeacon.bind(i)(e,t.body))}post(e){return I(this,void 0,void 0,function*(){var t=this.Ht("POST",e);return this.Pi(t),yield this.Ci(t),this.Zt(t)})}get(t){t=this.Ht("GET",t);return this.Zt(t)}Zt(y){return I(this,void 0,void 0,function*(){var e;if(!j(y))return null;if(this.Jt.preventAllNetworkTraffic)return null;var{method:i,body:n,retries:s,attempt:r}=y,o=y.urlConfig.endpoint;if(this.Si(o))return C.Log.warn(`Request to ${o} was blocked because you are making requests too frequently.`),null;r=null!=r?r:1;const a="undefined"!=typeof AbortController?new AbortController:null;var t=setTimeout(()=>{null!==a&&void 0!==a&&a.abort(`Timeout of ${this.Vt}ms expired.`)},this.Vt),l=this.Xt(y);let u=null;var c,h=(0,k.Rt)();try{var d,v,f,m={method:i,body:n,headers:Object.assign({},y.headers),signal:null===a||void 0===a?void 0:a.signal,priority:y.priority,keepalive:h},p=(c=r,(b=y).urlConfig.endpoint===w.Endpoint.qt&&_.Diagnostics.J(b.sdkKey,{attempt:c}),this.Oi[o]),g=(p&&(p.lastRequestTime=Date.now(),this.Oi[o]=p),null!=(e=this.Jt.networkOverrideFunc)?e:fetch);if(u=yield g(l,m),clearTimeout(t),u.ok)return f=yield u.text(),T(y,u,r,f),this.Wt.tryBumpExpiryTime(y.sdkKey,y.urlConfig),{body:f,code:u.status};throw d=yield u.text().catch(()=>"No Text"),(v=new Error(`NetworkError: ${l} `+d)).name="NetworkError",v}catch(t){var n=function(t,e){if(null!=t&&t.signal.aborted&&"string"==typeof t.signal.reason)return t.signal.reason;if("string"==typeof e)return e;if(e instanceof Error)return e.name+": "+e.message;return"Unknown Error"}(a,t),h=function(t){t=(null==t?void 0:t.signal.aborted)&&"string"==typeof t.signal.reason&&t.signal.reason.includes("Timeout");return t||!1}(a),b=(T(y,u,r,"",t),yield this.Wt.tryFetchUpdatedFallbackInfo(y.sdkKey,y.urlConfig,n,h));return(b&&(y.fallbackUrl=this.Wt.getActiveFallbackUrl(y.sdkKey,y.urlConfig)),!s||s<r||!M.has(null!=(c=null===u||void 0===u?void 0:u.status)?c:500))?(null!=(o=this.nt)&&o.call(this,{name:"error",error:t,tag:S.ErrorTag.NetworkError,requestArgs:y}),p=`A networking error occurred during ${i} request to ${l}.`,C.Log.error(p,n,t),null!=(e=this.$t)&&e.attachErrorIfNoneExists(p),null):(yield function(e){return I(this,void 0,void 0,function*(){yield new Promise(t=>setTimeout(t,Math.min(O*(e*e),A)))})}(r),this.Zt(Object.assign(Object.assign({},y),{retries:s,attempt:r+1})))}})}Qn(t){let e=null==t?void 0:t.logEventCompressionMode;return e=(e=e||!0!==(null==t?void 0:t.disableCompression)?e:m.LogEventCompressionMode.Disabled)||m.LogEventCompressionMode.Enabled}Si(t){var e=Date.now(),i=null!=(i=this.Oi[t])?i:{count:0,lastRequestTime:e},n=e-i.lastRequestTime,n=Math.floor(.05*n);return i.count=Math.max(0,i.count-n),50<=i.count||(i.count+=1,i.lastRequestTime=e,this.Oi[t]=i,!1)}Xt(t){var e=null!=(e=t.fallbackUrl)?e:t.urlConfig.getUrl();t.urlConfig.endpoint!==w.Endpoint.qt&&t.urlConfig.endpoint!==w.Endpoint.Bt||(this.Jn=e);const i=Object.assign({[w.NetworkParam.SdkKey]:t.sdkKey,[w.NetworkParam.SdkType]:o.SDKType.lt(t.sdkKey),[w.NetworkParam.SdkVersion]:u.SDK_VERSION,[w.NetworkParam.Time]:String(Date.now()),[w.NetworkParam.SessionID]:a.SessionID.get(t.sdkKey)},t.params);t=Object.keys(i).map(t=>encodeURIComponent(t)+"="+encodeURIComponent(i[t])).join("&");return e+(t?"?"+t:"")}Pi(e){var t,i=(0,s.te)(),n=e.body;if(e.isStatsigEncodable&&!this.m.disableStatsigEncoding&&"string"==typeof n&&null==(0,v.i)("no-encode")&&null!=i&&i.btoa)try{e.body=i.btoa(n).split("").reverse().join(""),e.params=Object.assign(Object.assign({},null!=(t=e.params)?t:{}),{[w.NetworkParam.StatsigEncoded]:"1"})}catch(t){C.Log.warn("Request encoding failed for "+e.urlConfig.getUrl(),t)}}Ci(d){return I(this,void 0,void 0,function*(){var e,i=d.body;if("string"==typeof i&&function(t,e){if(!t.isCompressable)return;if(null!=(0,v.i)("no-compress")||"undefined"==typeof CompressionStream||"undefined"==typeof TextEncoder)return;var i=null!=t.urlConfig.customUrl||null!=t.urlConfig.fallbackUrls,n=!0===f.SDKFlags.get(t.sdkKey,"enable_log_event_compression");switch(e.logEventCompressionMode){case m.LogEventCompressionMode.Disabled:return;case m.LogEventCompressionMode.Enabled:return i&&!n?void 0:1;case m.LogEventCompressionMode.Forced:return 1;default:return}}(d,this.m))try{for(var n,s=(new TextEncoder).encode(i),r=new CompressionStream("gzip"),o=r.writable.getWriter(),a=(o.write(s).catch(C.Log.error),o.close().catch(C.Log.error),r.readable.getReader()),l=[];!(n=yield a.read()).done;)l.push(n.value);var u=l.reduce((t,e)=>t+e.length,0),c=new Uint8Array(u);let t=0;for(const h of l)c.set(h,t),t+=h.length;d.body=c,d.params=Object.assign(Object.assign({},null!=(e=d.params)?e:{}),{[w.NetworkParam.IsGzipped]:"1"})}catch(t){C.Log.warn("Request compression failed for "+d.urlConfig.getUrl(),t)}})}Ht(t,e){var i=this.Wt.getActiveFallbackUrl(e.sdkKey,e.urlConfig),t=Object.assign(Object.assign({},e),{method:t,fallbackUrl:i});return"data"in e&&r(t,e.data),t}};const j=t=>!!t.sdkKey||(C.Log.warn("Unable to make request without an SDK key"),!1),r=(t,e)=>{var{sdkKey:i,fallbackUrl:n}=t,s=l.StableID.get(i),r=a.SessionID.get(i),i=o.SDKType.lt(i);t.body=JSON.stringify(Object.assign(Object.assign({},e),{statsigMetadata:Object.assign(Object.assign({},u.StatsigMetadataProvider.get()),{stableID:s,sessionID:r,sdkType:i,fallbackUrl:n})}))};function T(t,e,i,n,s){t.urlConfig.endpoint===w.Endpoint.qt&&_.Diagnostics.$(t.sdkKey,_.Diagnostics.Z(e,i,n,s))}},308:function(t,e,i){"use strict";var a=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0}),e.ee=e.NetworkFallbackResolver=void 0;const o=i(8809),n=i(1406),r=i(7512),l=i(4534);function u(t,e){t=null!=(t=null==t?void 0:t.toLowerCase())?t:"";return e||t.includes("uncaught exception")||t.includes("failed to fetch")||t.includes("networkerror when attempting to fetch resource")}function c(t){return"statsig.network_fallback."+(0,n.h)(t)}function h(t,e){t=c(t);e&&0!==Object.keys(e).length?l.Storage.setItem(t,JSON.stringify(e)):l.Storage.removeItem(t)}e.NetworkFallbackResolver=class{constructor(t){this.ne=null,this.$t=null,this.ie={},this.re=null==(t=t.networkConfig)?void 0:t.networkOverrideFunc}setErrorBoundary(t){this.$t=t}tryBumpExpiryTime(t,e){var i=null==(i=this.ne)?void 0:i[e.endpoint];i&&(i.expiryTime=Date.now()+6048e5,h(t,Object.assign(Object.assign({},this.ne),{[e.endpoint]:i})))}getActiveFallbackUrl(t,e){var i;if(null!=e.customUrl&&null!=e.fallbackUrls)return null;let n=this.ne;null==n&&(n=null!=(s=function(t){t=c(t),t=l.Storage.getItem(t);if(!t)return null;try{return JSON.parse(t)}catch(t){return r.Log.error("Failed to parse FallbackInfo"),null}}(t))?s:{},this.ne=n);var s=n[e.endpoint];return!s||Date.now()>(null!=(i=s.expiryTime)?i:0)||e.getChecksum()!==s.urlConfigChecksum?(delete n[e.endpoint],this.ne=n,h(t,this.ne),null):s.url||null}tryFetchUpdatedFallbackInfo(n,s,r,o){return a(this,void 0,void 0,function*(){var e,t,i;try{return u(r,o)?(t=null==s.customUrl&&null==s.fallbackUrls?yield this.se(s):s.fallbackUrls,!!(i=this.le(null==(e=this.ne)?void 0:e[s.endpoint],t))&&(this.oe(n,s,i),!0)):!1}catch(t){return null!=(e=this.$t)&&e.logError("tryFetchUpdatedFallbackInfo",t),!1}})}oe(t,e,i){var i={urlConfigChecksum:e.getChecksum(),url:i,expiryTime:Date.now()+6048e5,previous:[]},e=e.endpoint,n=null==(n=this.ne)?void 0:n[e],n=(n&&i.previous.push(...n.previous),10<i.previous.length&&(i.previous=[]),null==(n=null==(n=this.ne)?void 0:n[e])?void 0:n.url);null!=n&&i.previous.push(n),this.ne=Object.assign(Object.assign({},this.ne),{[e]:i}),h(t,this.ne)}se(r){return a(this,void 0,void 0,function*(){var t=this.ie[r.endpoint];if(t&&Date.now()<t)return null;this.ie[r.endpoint]=Date.now()+144e5;var e=[],t=yield(0,o.et)(null!=(t=this.re)?t:fetch),i=function(t){try{return new URL(t).pathname}catch(t){return null}}(r.defaultUrl);for(const s of t)if(s.startsWith(r.endpointDnsKey+"=")){var n=s.split("=");if(1<n.length){let t=n[1];t.endsWith("/")&&(t=t.slice(0,-1)),e.push("https://"+t+i)}}return e})}le(t,e){var i;if(null==e)return null;var n=new Set(null!=(i=null==t?void 0:t.previous)?i:[]),s=null==t?void 0:t.url;let r=null;for(const a of e){var o=a.endsWith("/")?a.slice(0,-1):a;if(!n.has(a)&&o!==s){r=o;break}}return r}},e.ee=u},1405:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},1361:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},3091:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SDKFlags=void 0;const i={};e.SDKFlags={setFlags:(t,e)=>{i[t]=e},get:(t,e)=>{return null!=(t=null==(t=i[t])?void 0:t[e])&&t}}},5902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SDKType=void 0;const i={};let n;e.SDKType={lt:t=>{return(null!=(t=i[t])?t:"js-mono")+(null!==n&&void 0!==n?n:"")},ue(t,e){i[t]=e},ae(t){n&&"-react"!==n||(n="-"+t)}}},6830:(t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Hn=n.Gt=n.ce=n.he=n.kt=n.de=n.te=void 0;n.te=()=>"undefined"!=typeof window?window:null,n.de=()=>{var t=(0,n.te)();return null!=(t=null==t?void 0:t.document)?t:null},n.kt=()=>{var t;return null===(0,n.de)()&&(t="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,"string"==typeof EdgeRuntime||t)},n.he=(t,e)=>{var i=(0,n.te)();"function"==typeof(null==i?void 0:i.addEventListener)&&i.addEventListener(t,e)},n.ce=(t,e)=>{var i=(0,n.de)();"function"==typeof(null==i?void 0:i.addEventListener)&&i.addEventListener(t,e)},n.Gt=()=>{var t;try{return null==(t=(0,n.te)())?void 0:t.location.href.split(/[?#]/)[0]}catch(t){}};n.Hn=()=>{var t=(0,n.te)();return t&&"onpagehide"in t?"pagehide":"beforeunload"}},4143:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigSession=e.SessionID=void 0;const n=i(1845),s=i(2137),a=i(7512),l=i(4534),u=i(8023),c=18e5,h=144e5,d={};function v(e,t){return setTimeout(()=>{var t=null==(t=(0,n.l)())?void 0:t.instance(e);t&&t.$emt({name:"session_expired"})},t)}function f(t){return"statsig.session_id."+(0,s.o)(t)}e.SessionID={get:t=>e.StatsigSession.get(t).data.sessionID},e.StatsigSession={get:t=>{null==d[t]&&(d[t]=function(t){let e=function(t){t=f(t);return(0,l.G)(t)}(t);var i=Date.now();e=e||{sessionID:(0,u.getUUID)(),startTime:i,lastUpdate:i};return{data:e,sdkKey:t}}(t));var t=d[t],e=Date.now(),i=t.data,n=t.sdkKey,s=((function({lastUpdate:t}){return Date.now()-t>c}(i)||function({startTime:t}){return Date.now()-t>h}(i))&&(i.sessionID=(0,u.getUUID)(),i.startTime=e,o=null===__STATSIG__||void 0===__STATSIG__?void 0:__STATSIG__.instance(n))&&o.$emt({name:"session_expired"}),i.lastUpdate=e,i),r=t.sdkKey;r=f(r);try{(0,l.L)(r,s)}catch(t){a.Log.warn("Failed to save SessionID")}clearTimeout(t.idleTimeoutID),clearTimeout(t.ageTimeoutID);var o=e-i.startTime;return t.idleTimeoutID=v(n,c),t.ageTimeoutID=v(n,h-o),t},overrideInitialSessionID:(t,e)=>{var i;d[e]=(t=t,e=e,i=Date.now(),{data:{sessionID:t,startTime:i,lastUpdate:i},sdkKey:e})}}},2176:(t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.hi=void 0;a.hi=(e,i)=>{let n=0;var s=Object.keys(e);for(let t=0;t<s.length;t++){var r=s[t],o=e[r];if((n=(n+=r.length)+("object"==typeof o&&null!==o?(0,a.hi)(o,i)+2:String(o).length+1))>=i)return n}return n}},9122:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StableID=void 0;const n=i(2137),s=i(7512),r=i(6830),o=i(4534),a=i(8023),l={},u={},c={};function h(t){return"statsig.stable_id."+(0,n.o)(t)}function d(t,e){e=h(e);try{(0,o.L)(e,t)}catch(t){s.Log.warn("Failed to save StableID to storage")}}function v(t,e){var i;u[e]&&document&&((i=new Date).setFullYear(i.getFullYear()+1),document.cookie=`${f(e)}=${encodeURIComponent(t)}; expires=${i.toUTCString()}; path=/`)}function f(t){return"statsig.stable_id."+(0,n.o)(t)}e.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:t=>{if(c[t])return null;if(null!=l[t])return l[t];let e=null;return null!=(e=function(t){if(u[t]&&null!=(0,r.de)())for(const n of document.cookie.split(";")){var[e,i]=n.trim().split("=");if(e===f(t))return decodeURIComponent(i)}return null}(t))?d(l[t]=e,t):(d(e=null==(e=function(t){t=h(t);return(0,o.G)(t)}(t))?(0,a.getUUID)():e,t),v(e,t),l[t]=e),e},setOverride:(t,e)=>{d(l[e]=t,e),v(t,e)},Xn:(t,e)=>{u[t]=e},_e:(t,e)=>{c[t]=e}}},1375:function(t,e,i){"use strict";var n=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigClientBase=void 0,i(1845);const o=i(1845),a=i(5542),l=i(7770),u=i(7512),r=i(7787),c=i(6830),h=i(4143),d=i(9122),s=i(586),v=i(4534);e.StatsigClientBase=class{constructor(t,e,i,n){this.loadingStatus="Uninitialized",this.ve=null,this.fe={};var s,r=this.$emt.bind(this);null!=(null==n?void 0:n.logLevel)&&(u.Log.level=n.logLevel),null!=n&&n.disableStorage&&v.Storage._e(!0),null!=n&&n.initialSessionID&&h.StatsigSession.overrideInitialSessionID(n.initialSessionID,t),null!=n&&n.storageProvider&&v.Storage.ge(n.storageProvider),null!=n&&n.enableCookies&&d.StableID.Xn(t,n.enableCookies),null!=n&&n.disableStableID&&d.StableID._e(t,!0),this.O=t,this.m=null!=n?n:{},this.ji={},this.overrideAdapter=null!=(s=null==n?void 0:n.overrideAdapter)?s:null,this.pe=new l.EventLogger(t,r,i,n),this.$t=new a.ErrorBoundary(t,n,r),this.$t.wrap(this),this.$t.wrap(e),this.$t.wrap(this.pe),i.setErrorBoundary(this.$t),this.dataAdapter=e,this.dataAdapter.attach(t,n,i),this.storageProvider=v.Storage,null!=(e=null==(r=null==(s=this.overrideAdapter)?void 0:s.loadFromStorage)?void 0:r.call(s))&&e.catch(t=>this.$t.logError("OA::loadFromStorage",t)),this.be(),n=t,i=this,(0,c.kt)()||(r=(0,o.l)(),s=null!=(s=r.instances)?s:{},i=i,null!=s[n]&&u.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),s[n]=i,r.firstInstance||(r.firstInstance=i),r.instances=s,__STATSIG__=r)}updateRuntimeOptions(t){t.loggingEnabled?(this.m.loggingEnabled=t.loggingEnabled,this.pe.setLoggingEnabled(t.loggingEnabled)):null!=t.disableLogging&&(this.m.disableLogging=t.disableLogging,this.pe.setLoggingEnabled(t.disableLogging?"disabled":"browser-only")),null!=t.disableStorage&&(this.m.disableStorage=t.disableStorage,v.Storage._e(t.disableStorage)),null!=t.enableCookies&&(this.m.enableCookies=t.enableCookies,d.StableID.Xn(this.O,t.enableCookies)),t.logEventCompressionMode?this.pe.setLogEventCompressionMode(t.logEventCompressionMode):t.disableCompression&&this.pe.setLogEventCompressionMode(s.LogEventCompressionMode.Disabled)}flush(){return this.pe.flush()}shutdown(){return n(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this.me("Uninitialized",null),this.ve=null,yield this.pe.stop()})}on(t,e){this.fe[t]||(this.fe[t]=[]),this.fe[t].push(e)}off(t,e){this.fe[t]&&-1!==(e=this.fe[t].indexOf(e))&&this.fe[t].splice(e,1)}$on(t,e){e.__isInternal=!0,this.on(t,e)}$emt(i){var t;const e=e=>{try{e(i)}catch(t){!0===e.__isInternal?this.$t.logError("__emit:"+i.name,t):u.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",i)}};this.fe[i.name]&&this.fe[i.name].forEach(t=>e(t)),null!=(t=this.fe["*"])&&t.forEach(e)}me(t,e){this.loadingStatus=t,this.ji={},this.$emt({name:"values_updated",status:t,values:e})}ye(t,e,i){!0===(null==i?void 0:i.disableExposureLog)?this.pe.incrementNonExposureCount(t):this.pe.enqueue(e)}wi(n,s){return(t,e)=>{var i;return!this.m.disableEvaluationMemoization&&(i=(0,r.createMemoKey)(n,t,e))?(i in this.ji||(3e3<=Object.keys(this.ji).length&&(this.ji={}),this.ji[i]=s(t,e)),this.ji[i]):s(t,e)}}}},2636:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorTag=void 0,e.ErrorTag={NetworkError:"NetworkError"}},3206:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataAdapterCachePrefix=void 0,e.DataAdapterCachePrefix="statsig.cached"},1637:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Oe=e.je=e.Ui=e.Se=e.xt=void 0;const r="statsig::config_exposure",o="statsig::gate_exposure",u="statsig::layer_exposure",c=(t,e,i,n,s)=>(i.bootstrapMetadata&&(n.bootstrapMetadata=i.bootstrapMetadata),{eventName:t,user:e,value:null,metadata:a(i,n),secondaryExposures:s,time:Date.now()});e.xt=({eventName:t})=>t===o||t===r||t===u;function h(t,e){return t.map(t=>"string"==typeof t?(null!=e?e:{})[t]:t).filter(t=>null!=t)}e.Se=(t,e,i)=>{var n,s={gate:e.name,gateValue:String(e.value),ruleID:e.ruleID};return null!=(null==(n=e.__evaluation)?void 0:n.version)&&(s.configVersion=e.__evaluation.version),c(o,t,e.details,s,h(null!=(t=null==(n=e.__evaluation)?void 0:n.secondary_exposures)?t:[],i))},e.Ui=h;e.je=(t,e,i)=>{var n,s={config:e.name,ruleID:e.ruleID};return null!=(null==(n=e.__evaluation)?void 0:n.version)&&(s.configVersion=e.__evaluation.version),null!=(null==(n=e.__evaluation)?void 0:n.passed)&&(s.rulePassed=String(e.__evaluation.passed)),c(r,t,e.details,s,h(null!=(t=null==(n=e.__evaluation)?void 0:n.secondary_exposures)?t:[],i))};e.Oe=(t,e,i,n)=>{var s=e.__evaluation,r=!0===(null==(r=null==s?void 0:s.explicit_parameters)?void 0:r.includes(i));let o="",a=null!=(l=null==s?void 0:s.undelegated_secondary_exposures)?l:[];r&&(o=null!=(l=s.allocated_experiment_name)?l:"",a=null!=(l=s.secondary_exposures)?l:[]);var l=null==(s=e.__evaluation)?void 0:s.parameter_rule_ids,l={config:e.name,parameterName:i,ruleID:null!=(s=null==l?void 0:l[i])?s:e.ruleID,allocatedExperiment:o,isExplicitParameter:String(r)};return null!=(null==(i=e.__evaluation)?void 0:i.version)&&(l.configVersion=e.__evaluation.version),c(u,t,e.details,l,h(a,n))};const a=(t,e)=>(e.reason=t.reason,t.lcut&&(e.lcut=String(t.lcut)),t.receivedAt&&(e.receivedAt=String(t.receivedAt)),e)},8e3:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigMetadataProvider=e.SDK_VERSION=void 0,e.SDK_VERSION="3.21.0";let i={sdkVersion:e.SDK_VERSION,sdkType:"js-mono"};e.StatsigMetadataProvider={get:()=>i,add:t=>{i=Object.assign(Object.assign({},i),t)}}},586:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LoggingEnabledOption=e.LogEventCompressionMode=void 0,e.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},e.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}},1098:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},2059:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.we=e.Te=e.ke=e.Ie=e.De=e.Ee=void 0;const o=i(7512),a=i(6634);function s(t,e,i,n){return{name:t,details:e,ruleID:null!=(t=null==i?void 0:i.rule_id)?t:"",__evaluation:i,value:n}}function n(t,e,i){var n=null!=(n=null==i?void 0:i.value)?n:{};return Object.assign(Object.assign({},s(t,e,i,n)),{get:r(t,null==i?void 0:i.value)})}function r(n,s,r){return(t,e)=>{var i=null!=(i=null==s?void 0:s[t])?i:null;return null==i?null!=e?e:null:null==e||(0,a.Me)(i,e)?(null!=r&&r(t),i):(o.Log.warn(`Parameter type mismatch. '${n}.${t}' was found to be type '${typeof i}' but fallback/return type is '${typeof e}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),null!=e?e:null)}}e.Ee=function(t,e,i){return Object.assign(Object.assign({},s(t,e,i,!0===(null==i?void 0:i.value))),{idType:null!=(t=null==i?void 0:i.id_type)?t:null})},e.De=n,e.Ie=function(t,e,i){return t=n(t,e,i),Object.assign(Object.assign({},t),{groupName:null!=(e=null==i?void 0:i.group_name)?e:null})},e.ke=function(t,e,i,n){return Object.assign(Object.assign({},s(t,e,i,void 0)),{get:r(t,null==i?void 0:i.value,n),groupName:null!=(e=null==i?void 0:i.group_name)?e:null,__value:null!=(t=null==i?void 0:i.value)?t:{}})},e.Te=function(t,e,i,n){return Object.assign(Object.assign(Object.assign({},t),e),{get:r(t.name,i,n)})},e.we=r},1812:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},3932:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UPDATE_DETAIL_ERROR_MESSAGES=e.createUpdateDetails=void 0;e.createUpdateDetails=(t,e,i,n,s,r)=>({duration:i,source:e,success:t,error:n,sourceUrl:s,warnings:r}),e.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."}},8578:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.v=e.T=void 0;const n=i(1406),s=i(7512);e.T=function(t,e,i){try{var n=JSON.parse(JSON.stringify(t));return null!=e&&null!=e.environment?n.statsigEnvironment=e.environment:null!=i&&(n.statsigEnvironment={tier:i}),n}catch(t){return s.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}},e.v=function(t){return t?(0,n.Kt)(t):null}},4534:(t,i,e)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.L=i.G=i.Storage=void 0;var n=e(7512),e=e(6830);const s={},r={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:t=>s[t]||null,setItem:(t,e)=>{s[t]=e},removeItem:t=>{delete s[t]},getAllKeys:()=>Object.keys(s)};let o=null;try{const c=(0,e.te)();c&&c.localStorage&&"function"==typeof c.localStorage.getItem&&(o={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:t=>c.localStorage.getItem(t),setItem:(t,e)=>c.localStorage.setItem(t,e),removeItem:t=>c.localStorage.removeItem(t),getAllKeys:()=>Object.keys(c.localStorage)})}catch(t){n.Log.warn("Failed to setup localStorageProvider.")}let a=null!==o&&void 0!==o?o:r,l=a;function u(e){try{return e()}catch(t){if(t instanceof Error&&"SecurityError"===t.name)return i.Storage.ge(r),null;throw t instanceof Error&&"QuotaExceededError"===t.name&&(e=i.Storage.getAllKeys().filter(t=>t.startsWith("statsig.")),t.message=t.message+". Statsig Keys: "+e.length),t}}i.Storage={isReady:()=>l.isReady(),isReadyResolver:()=>l.isReadyResolver(),getProviderName:()=>l.getProviderName(),getItem:t=>u(()=>l.getItem(t)),setItem:(t,e)=>u(()=>l.setItem(t,e)),removeItem:t=>l.removeItem(t),getAllKeys:()=>l.getAllKeys(),ge:t=>{a=t,l=t},_e:t=>{l=t?r:a}},i.G=function(t){return t=i.Storage.getItem(t),JSON.parse(null!=t?t:"null")},i.L=function(t,e){i.Storage.setItem(t,JSON.stringify(e))}},3401:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.P=void 0;const s=i(7512);e.P=function(t,e,i){try{var n=JSON.parse(t);if(n&&"object"==typeof n&&e in n)return n}catch(t){}return s.Log.error("Failed to parse "+i),null}},6634:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Me=e.zt=void 0,e.zt=function(t){return Array.isArray(t)?"array":typeof t},e.Me=function(t,e){var i=t=>Array.isArray(t)?"array":null===t?"null":typeof t;return i(t)===i(e)}},8023:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getUUID=void 0,e.getUUID=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();let i=(new Date).getTime(),n="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(4*Math.random())]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,t=>{let e=16*Math.random();return 0<i?(e=(i+e)%16|0,i=Math.floor(i/16)):(e=(n+e)%16|0,n=Math.floor(n/16)),("x"===t?e:7&e|8).toString(16)})}},1881:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UrlConfiguration=void 0;const n=i(1406),s=i(7410),r={[s.Endpoint.qt]:"i",[s.Endpoint.jt]:"e",[s.Endpoint.Bt]:"d"};e.UrlConfiguration=class{constructor(t,e,i,n){this.customUrl=null,this.fallbackUrls=null,this.endpoint=t,this.endpointDnsKey=r[t],e&&(this.customUrl=e),!e&&i&&(this.customUrl=i.endsWith("/")?""+i+t:i+"/"+t),n&&(this.fallbackUrls=n);e=s.NetworkDefault[t];this.defaultUrl=e+"/"+t}getUrl(){var t;return null!=(t=this.customUrl)?t:this.defaultUrl}getChecksum(){var t=(null!=(t=this.fallbackUrls)?t:[]).sort().join(",");return(0,n.h)(this.customUrl+t)}}},2397:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Ae=e.It=e.Rt=e.xe=void 0;i=i(6830);const n="foreground",s="background",r=[];let o=n,a=!1;e.xe=()=>o===n,e.Rt=()=>a,e.It=t=>{r.unshift(t)};e.Ae=e=>{e!==o&&(o=e,r.forEach(t=>t(e)))},(0,i.he)("focus",()=>{(a=!1,e.Ae)(n)}),(0,i.he)("blur",()=>(0,e.Ae)(s)),(0,i.ce)("visibilitychange",()=>{(0,e.Ae)("visible"===document.visibilityState?n:s)}),(0,i.he)((0,i.Hn)(),()=>{a=!0,(0,e.Ae)(s)})},6914:function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var s=Object.getOwnPropertyDescriptor(e,i);s&&("get"in s?e.__esModule:!s.writable&&!s.configurable)||(s={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,s)}:function(t,e,i,n){t[n=void 0===n?i:n]=e[i]}),s=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)},r=(Object.defineProperty(e,"__esModule",{value:!0}),e.Storage=e.Log=e.EventLogger=e.Diagnostics=void 0,i(1845),i(1845));const o=i(8962),a=(Object.defineProperty(e,"Diagnostics",{enumerable:!0,get:function(){return o.Diagnostics}}),i(7770)),l=(Object.defineProperty(e,"EventLogger",{enumerable:!0,get:function(){return a.EventLogger}}),i(7512));Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return l.Log}});var u=i(8e3);const c=i(4534);Object.defineProperty(e,"Storage",{enumerable:!0,get:function(){return c.Storage}}),s(i(1845),e),s(i(2137),e),s(i(6427),e),s(i(694),e),s(i(8962),e),s(i(3539),e),s(i(5542),e),s(i(2922),e),s(i(2417),e),s(i(1406),e),s(i(1333),e),s(i(7512),e),s(i(7787),e),s(i(7410),e),s(i(7023),e),s(i(1405),e),s(i(1361),e),s(i(6830),e),s(i(5902),e),s(i(4143),e),s(i(2176),e),s(i(9122),e),s(i(1375),e),s(i(2636),e),s(i(3206),e),s(i(1637),e),s(i(8e3),e),s(i(586),e),s(i(1098),e),s(i(2059),e),s(i(1812),e),s(i(8578),e),s(i(4534),e),s(i(3401),e),s(i(6634),e),s(i(1881),e),s(i(8023),e),s(i(2397),e),s(i(3932),e),s(i(3091),e),Object.assign((0,r.l)(),{Log:l.Log,SDK_VERSION:u.SDK_VERSION})},2016:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoInit=void 0;const b=i(6914),y=i(2018);function I(t,e){var i;return null!=(i=e.get(t))?i:e.get(t.toLowerCase())}e.AutoInit=class{static attempt(e){var t,i,n,s,r;try{var o=(0,b.te)(),a=(0,b.de)();if(o&&a&&a.currentScript){var l=a.currentScript.getAttribute("src"),u=null==(t=o.location)?void 0:t.href;if(l&&u){var c=new URL(l,u).searchParams,h=null!=(i=I("sdkKey",c))?i:I("apiKey",c);if(h){var d={},v=I("proxy",c),f=(v&&(d.networkConfig={api:v}),null==(s=null==(n=(0,b.l)())?void 0:n.instances)?void 0:s[h]);let t=null;if(t=f instanceof y.StatsigClient?f:t)e({sdkKey:h,client:t});else{var m=a.currentScript.dataset;const p=function(t,e){if(t)if(t in e&&"function"==typeof e[t])return e[t];return null}(null!=(r=m.onstatsiginit)?r:m.onStatsigInit,o),g=new y.StatsigClient(h,function(){var t=(0,b.te)();if(!t)return{};let e=t.statsigUser||{};var i=(e="object"!=typeof e?{}:e).custom||{},n=e.customIDs||{};return Object.assign(Object.assign({},e),{customIDs:Object.assign({},n),custom:Object.assign(Object.assign({},i),{useragent:t.navigator.userAgent,page_url:(0,b.Gt)()||"",language:null==(n=t.navigator)?void 0:n.language})})}(),d);g.initializeAsync().then(()=>{p&&p(g)}).catch(t=>{b.Log.error(t)}),e({sdkKey:h,client:g})}}}}}catch(t){b.Log.error("AutoInit failed",t)}}}},7262:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Ne=void 0;const n=i(6914);function s(t,e){null!=t&&t.forEach(t=>{delete e[t]})}e.Ne=function(t,e){var i;return(e=(0,n.P)(e,"checksum","DeltasEvaluationResponse"))?(t=t,i=e,t=Object.assign(Object.assign(Object.assign({},t),i),{feature_gates:Object.assign(Object.assign({},t.feature_gates),i.feature_gates),layer_configs:Object.assign(Object.assign({},t.layer_configs),i.layer_configs),dynamic_configs:Object.assign(Object.assign({},t.dynamic_configs),i.dynamic_configs)}),s((t=i=t).deleted_gates,t.feature_gates),delete t.deleted_gates,s(i.deleted_configs,t.dynamic_configs),delete t.deleted_configs,s(i.deleted_layers,t.layer_configs),delete t.deleted_layers,i=t,(t=(0,n.Kt)({feature_gates:i.feature_gates,dynamic_configs:i.dynamic_configs,layer_configs:i.layer_configs},2))===e.checksumV2?JSON.stringify(i):{hadBadDeltaChecksum:!0,badChecksum:t,badMergedConfigs:i,badFullResponse:e.deltas_full_response}):{hadBadDeltaChecksum:!0}}},4845:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const s=i(6914);e.default=class{constructor(t){this.O=t,this.Re=null,this.Pe=null,this.Ce="Uninitialized",this.Ue=0,this.Fe=0,this.Ge=null,this.Le=new Set}reset(){this.Pe=null,this.Re=null,this.Ce="Loading",this.Ue=0,this.Fe=0,this.Ge=null,this.Le.clear()}finalize(){this.Pe||(this.Ce="NoValues")}getValues(){return this.Re?(0,s.P)(this.Re,"has_updates","EvaluationStoreValues"):null}setValues(t,e){var i;return!!t&&null!=(i=(0,s.P)(t.data,"has_updates","EvaluationResponse"))&&(this.Ce=t.source,!0===(null==i?void 0:i.has_updates)&&(this.Re=t.data,this.Ue=i.time,this.Fe=t.receivedAt,this.Pe=i,this.Ge=this.Ke(t.source,i),t.source&&i.user&&this.ze(e,i),s.SDKFlags.setFlags(this.O,null!=(t=i.sdk_flags)?t:{})),!0)}getWarnings(){if(0!==this.Le.size)return Array.from(this.Le)}getGate(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.feature_gates,t)}getConfig(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.dynamic_configs,t)}getConfigList(){var t;return null!=(t=this.Pe)&&t.dynamic_configs?Object.values(this.Pe.dynamic_configs).map(t=>t.name):[]}getLayer(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.layer_configs,t)}getParamStore(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.param_stores,t)}getSource(){return this.Ce}getExposureMapping(){var t;return null==(t=this.Pe)?void 0:t.exposures}Ke(t,e){return"Bootstrap"!==t?null:(t={},e.user&&(t.user=e.user),e.sdkInfo&&(t.generatorSDKInfo=e.sdkInfo),t.lcut=e.time,t)}qe(t,e){let i=null;return{result:i=t?t[e]||t[(0,s.h)(e)]:i,details:this.Be(null==i)}}ze(t,e){var i,n=s.StableID.get(this.O);(null==(i=t.customIDs)?void 0:i.stableID)!==n&&(null!=(i=t.customIDs)&&i.stableID||n)?this.Le.add("StableIDMismatch"):"user"in e&&(i=e.user,n=Object.assign(Object.assign({},t),{analyticsOnlyMetadata:void 0,privateAttributes:void 0}),(0,s.v)(n)!==(0,s.v)(i))&&this.Le.add("PartialUserMatch")}getCurrentSourceDetails(){var t;return"Uninitialized"===this.Ce||"NoValues"===this.Ce?{reason:this.Ce}:(t={reason:this.Ce,lcut:this.Ue,receivedAt:this.Fe},0<this.Le.size&&(t.warnings=Array.from(this.Le)),t)}Be(t){var e=this.getCurrentSourceDetails();let i=e.reason;var n=null!=(n=e.warnings)?n:[],t=("Bootstrap"===this.Ce&&0<n.length&&(i+=n[0]),"Uninitialized"!==i&&"NoValues"!==i&&(i=i+":"+(t?"Unrecognized":"Recognized")),"Bootstrap"===this.Ce&&null!=(n=this.Ge)?n:void 0);return t&&(e.bootstrapMetadata=t),Object.assign(Object.assign({},e),{reason:i})}}},8448:function(t,e,i){"use strict";var l=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0});const u=i(6914),o=i(7262);class n extends u.NetworkCore{constructor(t,e){super(t,e);e=null==t?void 0:t.networkConfig;this.Fi=t,this.Ve=new u.UrlConfiguration(u.Endpoint.qt,null==e?void 0:e.initializeUrl,null==e?void 0:e.api,null==e?void 0:e.initializeFallbackUrls)}fetchEvaluations(n,s,r,o,a){return l(this,void 0,void 0,function*(){var t,e=s?(0,u.P)(s,"has_updates","InitializeResponse"):null;let i={user:o,hash:null!=(t=null==(t=null==(t=this.Fi)?void 0:t.networkConfig)?void 0:t.initializeHashAlgorithm)?t:"djb2",deltasResponseRequested:!1,full_checksum:null};return null!=e&&e.has_updates&&(t=(null==e?void 0:e.hash_used)!==(null!=(t=null==(t=null==(t=this.Fi)?void 0:t.networkConfig)?void 0:t.initializeHashAlgorithm)?t:"djb2"),i=Object.assign(Object.assign({},i),{sinceTime:a&&!t?e.time:0,previousDerivedFields:"derived_fields"in e&&a?e.derived_fields:{},deltasResponseRequested:!0,full_checksum:e.full_checksum,partialUserMatchSinceTime:t?0:e.time})),this.Je(n,e,i,r)})}Je(i,n,s,r){return l(this,void 0,void 0,function*(){var t,e=yield this.post({sdkKey:i,urlConfig:this.Ve,data:s,retries:2,isStatsigEncodable:!0,priority:r});return 204===(null==e?void 0:e.code)?'{"has_updates": false}':200!==(null==e?void 0:e.code)?null!=(t=null==e?void 0:e.body)?t:null:!0!==(null==n?void 0:n.has_updates)||!0!==(null==(t=e.body)?void 0:t.includes('"is_delta":true'))||!0!==s.deltasResponseRequested?e.body:"string"==typeof(t=(0,o.Ne)(n,e.body))?t:this.Je(i,n,Object.assign(Object.assign(Object.assign({},s),t),{deltasResponseRequested:!1}),r)})}}e.default=n},3583:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.$e=void 0;const d=i(6914),v={disableExposureLog:!0};function f(t){return null==t||!1===t.disableExposureLog}function m(t,e){return null!=e&&!(0,d.Me)(t,e)}e.$e=function(u,c,h){return(t,e)=>{if(null==c)return e;var i,n,s,r,o,a,l=c[t];if(null==l||null!=e&&(0,d.zt)(e)!==l.param_type)return e;switch(l.ref_type){case"static":return l.value;case"gate":return a=l,u.getFeatureGate(a.gate_name,f(h)?void 0:v).value?a.pass_value:a.fail_value;case"dynamic_config":return a=l,o=e,m(r=(r=u).getDynamicConfig(a.config_name,f(h)?void 0:v).get(a.param_name),o)?o:r;case"experiment":return o=l,r=e,m(s=(s=u).getExperiment(o.experiment_name,f(h)?void 0:v).get(o.param_name),r)?r:s;case"layer":return s=l,n=e,m(i=(i=u).getLayer(s.layer_name,f(h)?void 0:v).get(s.param_name),n)?n:i;default:return e}}}},8198:function(t,e,i){"use strict";var r=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0});const o=i(6914),a=i(4845),l=i(8448),s=i(3583),u=i(4131);class n extends o.StatsigClientBase{static instance(t){var e=(0,o.l)().instance(t);return e instanceof n?e:(o.Log.warn((0,o.kt)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new n(null!=t?t:"",{}))}constructor(t,e,i=null){o.SDKType.ue(t,"javascript-client");var n,s=new l.default(i,t=>{this.$emt(t)}),t=(super(t,null!=(n=null==i?void 0:i.dataAdapter)?n:new u.StatsigEvaluationsDataAdapter,s,i),this.ar={},this.getFeatureGate=this.wi(o.MemoPrefix.Kn,this.Ti.bind(this)),this.getDynamicConfig=this.wi(o.MemoPrefix.Ln,this.Ii.bind(this)),this.getExperiment=this.wi(o.MemoPrefix.Vn,this.ki.bind(this)),this.getConfigList=this.wi(o.MemoPrefix.Ts,this.xs.bind(this)),this.getLayer=this.wi(o.MemoPrefix.$n,this.Di.bind(this)),this.getParameterStore=this.wi(o.MemoPrefix.Bn,this.Ri.bind(this)),this.We=new a.default(t),this.ht=s,this.He=this.xi(e,i),this.js=(0,o.getUUID)(),null!=(n=null==i?void 0:i.plugins)?n:[]);for(const r of t)r.bind(this)}initializeSync(t){var e;return"Uninitialized"!==this.loadingStatus?(0,o.createUpdateDetails)(!0,this.We.getSource(),-1,null,null,["MultipleInitializations",...null!=(e=this.We.getWarnings())?e:[]]):(this.pe.start(),this.updateUserSync(this.He,t))}initializeAsync(t){return r(this,void 0,void 0,function*(){return this.ve||(this.ve=this.Ye(t)),this.ve})}updateUserSync(e,t){var i=performance.now();try{return this.zi(e,t,i)}catch(t){e=t instanceof Error?t:new Error(String(t));return this.Ki(e,i)}}zi(t,e,i){var n=[...null!=(n=this.We.getWarnings())?n:[]],t=(this.Xe(t),this.dataAdapter.getDataSync(this.He)),e=(null==t&&n.push("NoCachedValues"),this.We.setValues(t,this.He),this.Qe(t),null==e?void 0:e.disableBackgroundCacheRefresh);return!0===e||null==e&&"Bootstrap"===(null==t?void 0:t.source)||this.Ze(null!=t?t:null,this.He),(0,o.createUpdateDetails)(!0,this.We.getSource(),performance.now()-i,this.$t.getLastSeenErrorAndReset(),this.ht.getLastUsedInitUrlAndReset(),n)}updateUserAsync(t,n){return r(this,void 0,void 0,function*(){var e=performance.now();try{return yield this.qi(t,n)}catch(t){var i=t instanceof Error?t:new Error(String(t));return this.Ki(i,e)}})}qi(n,s){return r(this,void 0,void 0,function*(){this.Xe(n);var t=this.He,e=(o.Diagnostics.B(this.O),this.dataAdapter.getDataSync(t));if(this.We.setValues(e,this.He),this.me("Loading",e),e=yield this.dataAdapter.getDataAsync(e,t,s),t!==this.He)return(0,o.createUpdateDetails)(!1,this.We.getSource(),-1,new Error("User changed during update"),this.ht.getLastUsedInitUrlAndReset());let i=!1;null!=e&&(o.Diagnostics.W(this.O),i=this.We.setValues(e,this.He),o.Diagnostics.H(this.O,{success:i})),this.Qe(e),i||(this.$t.attachErrorIfNoneExists(o.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),o.Diagnostics.V(this.O,i,this.We.getCurrentSourceDetails());t=o.Diagnostics.tt(this.He,this.pe,this.O,this.m);return(0,o.createUpdateDetails)(i,this.We.getSource(),t,this.$t.getLastSeenErrorAndReset(),this.ht.getLastUsedInitUrlAndReset(),this.We.getWarnings())})}getContext(){return{sdkKey:this.O,options:this.m,values:this.We.getValues(),user:JSON.parse(JSON.stringify(this.He)),errorBoundary:this.$t,session:o.StatsigSession.get(this.O),stableID:o.StableID.get(this.O),sdkInstanceID:this.js}}checkGate(t,e){return this.getFeatureGate(t,e).value}logEvent(t,e,i){e="string"==typeof t?{eventName:t,value:e,metadata:i}:t;this.$emt({name:"log_event_called",event:e}),this.pe.enqueue(Object.assign(Object.assign({},e),{user:this.He,time:Date.now()}))}updateUserWithAnalyticsOnlyMetadata(t){this.He=this.xi(Object.assign(Object.assign({},this.He),{analyticsOnlyMetadata:t}),this.m)}be(){this.$on("error",()=>{"Loading"===this.loadingStatus&&this.Qe(null)})}Ye(t){return r(this,void 0,void 0,function*(){return o.Storage.isReady()||(yield o.Storage.isReadyResolver()),this.pe.start(),this.updateUserAsync(this.He,t)})}Ki(t,e){return(0,o.createUpdateDetails)(!1,this.We.getSource(),performance.now()-e,t,null,[...null!=(e=this.We.getWarnings())?e:[]])}Qe(t){this.We.finalize(),this.me("Ready",t)}Ze(t,e){this.dataAdapter.getDataAsync(t,e,{priority:"low"}).catch(t=>{o.Log.error("An error occurred after update.",t)})}Xe(t){this.pe.reset(),this.We.reset(),this.He=this.xi(t,this.m)}xi(t,e){t=(0,o.T)(t,e),e=null==(e=t.customIDs)?void 0:e.stableID;return e&&o.StableID.setOverride(e,this.O),t.analyticsOnlyMetadata=Object.assign(Object.assign({},t.analyticsOnlyMetadata),this.ar),t}Ti(t,e){var{result:i,details:n}=this.We.getGate(t),n=(0,o.Ee)(t,n,i),s=null==(s=null==(i=this.overrideAdapter)?void 0:i.getGateOverride)?void 0:s.call(i,n,this.He,e),i=null!=s?s:n;return this.ye(t,(0,o.Se)(this.He,i,this.We.getExposureMapping()),e),this.$emt({name:"gate_evaluation",gate:i}),i}Ii(t,e){var{result:i,details:n}=this.We.getConfig(t),n=(0,o.De)(t,n,i),s=null==(s=null==(i=this.overrideAdapter)?void 0:i.getDynamicConfigOverride)?void 0:s.call(i,n,this.He,e),i=null!=s?s:n;return this.ye(t,(0,o.je)(this.He,i,this.We.getExposureMapping()),e),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:i}),i}ki(t,e){var{result:i,details:n}=this.We.getConfig(t),n=(0,o.Ie)(t,n,i),s=(null!=n.__evaluation&&(n.__evaluation.secondary_exposures=(0,o.Ui)(null!=(i=null==(i=n.__evaluation)?void 0:i.secondary_exposures)?i:[],this.We.getExposureMapping())),null==(s=null==(i=this.overrideAdapter)?void 0:i.getExperimentOverride)?void 0:s.call(i,n,this.He,e)),i=null!=s?s:n;return this.ye(t,(0,o.je)(this.He,i,this.We.getExposureMapping()),e),this.$emt({name:"experiment_evaluation",experiment:i}),i}xs(){return this.We.getConfigList()}Di(e,i){var{result:t,details:n}=this.We.getLayer(e),n=(0,o.ke)(e,n,t),s=null==(s=null==(t=this.overrideAdapter)?void 0:t.getLayerOverride)?void 0:s.call(t,n,this.He,i);null!=i&&i.disableExposureLog&&this.pe.incrementNonExposureCount(e);const r=(0,o.Te)(n,s,null!=(t=null==s?void 0:s.__value)?t:n.__value,t=>{null!=i&&i.disableExposureLog||this.ye(e,(0,o.Oe)(this.He,r,t,this.We.getExposureMapping()),i)});return this.$emt({name:"layer_evaluation",layer:r}),r}Ri(t,e){var{result:i,details:n}=this.We.getParamStore(t),t=(this.pe.incrementNonExposureCount(t),{name:t,details:n,__configuration:i,get:(0,s.$e)(this,i,e)}),i=null==(i=null==(n=this.overrideAdapter)?void 0:n.getParamStoreOverride)?void 0:i.call(n,t,e);return null!=i&&(t.__configuration=i.config,t.details=i.details,t.get=(0,s.$e)(this,i.config,e)),t}}e.default=n},4131:function(t,e,i){"use strict";var r=this&&this.__awaiter||$A();Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigEvaluationsDataAdapter=void 0;const n=i(6914),s=i(8448);class o extends n.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this.ht=null,this.m=null}attach(t,e,i){super.attach(t,e,i),null!==i&&i instanceof s.default?this.ht=i:this.ht=new s.default(null!=e?e:{})}getDataAsync(t,e,i){return this.D(t,(0,n.T)(e,this.m),i)}prefetchData(t,e){return this.A(t,e)}setData(t){var e=(0,n.P)(t,"has_updates","data");e&&"user"in e?super.setData(t,e.user):n.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(t,e){super.setData(t,e)}R(e,i,n,s){return r(this,void 0,void 0,function*(){var t=yield null==(t=this.ht)?void 0:t.fetchEvaluations(this.C(),e,null==n?void 0:n.priority,i,s);return null!=t?t:null})}k(t){t=(0,n.o)(this.C(),t,null==(t=this.m)?void 0:t.customUserCacheKeyFunc);return`${n.DataAdapterCachePrefix}.${this.p}.`+t}N(t,e){return null!=t.fullUserHash&&t.fullUserHash===(0,n.v)(e)}}e.StatsigEvaluationsDataAdapter=o},2018:function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var s=Object.getOwnPropertyDescriptor(e,i);s&&("get"in s?e.__esModule:!s.writable&&!s.configurable)||(s={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,s)}:function(t,e,i,n){t[n=void 0===n?i:n]=e[i]}),s=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)},r=(Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigClient=void 0,i(6914)),o=i(8198),s=(e.StatsigClient=o.default,s(i(6914),e),Object.assign((0,r.l)(),{StatsigClient:o.default}));e.default=s},8788:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SessionReplay=e.runStatsigSessionReplay=e.StatsigSessionReplayPlugin=void 0;const n=i(6914);var s=i(4069);const r=i(5967);function o(t,e){new a(t,e)}e.StatsigSessionReplayPlugin=class{constructor(t){this.options=t,this.__plugin="session-replay"}bind(t){o(t,this.options)}},e.runStatsigSessionReplay=o;class a extends s.SessionReplayBase{constructor(t,e){super(t,e),this.tn.$on("values_updated",()=>{var t;this.ts||this.li(null==(t=this.m)?void 0:t.forceRecording)}),this.li(null==(t=this.m)?void 0:t.forceRecording)}ri(t){super.es(t)}li(t=!1){var e;this.ns>=r.MAX_LOGS||(!0===(null==(e=this.tn.getContext().values)?void 0:e.recording_blocked)||!t&&!0!==(null==e?void 0:e.can_record_session)||!1===(null==e?void 0:e.passes_session_recording_targeting)?this.ri():this.si.isRecording()||(this.ts=!1,n.StatsigMetadataProvider.add({isRecordingSession:"true"}),this.si.record((t,e)=>this.ci(t,e),null!=(e=null==(t=this.m)?void 0:t.rrwebConfig)?e:{},()=>{this.ri()})))}}e.SessionReplay=a},4069:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SessionReplayBase=e.forceStartRecording=e.startRecording=e.stopRecording=void 0;const u=i(6914),n=i(759),c=i(5967);function s(t){var e=null==t?(0,u.l)().firstSRInstance:null==(e=null==(e=(0,u.l)())?void 0:e.srInstances)?void 0:e[t];return e instanceof r?e:null}e.stopRecording=function(t){null!=(t=s(t))&&t.stopRecording()},e.startRecording=function(t){null!=(t=s(t))&&t.startRecording()},e.forceStartRecording=function(t){null!=(t=s(t))&&t.forceStartRecording()};class r{constructor(t,e){this.ti={startTime:-1,endTime:0,clickCount:0},this.ei=[],this.ts=!1,this.ss=0,this.ns=0,this.tn=t,this.m=e;var{sdkKey:t,errorBoundary:e}=this.tn.getContext();this.$t=e,this.$t.wrap(this),this.si=new n.SessionReplayClient,this.tn.$on("pre_shutdown",()=>this.ri()),this.tn.on("session_expired",()=>{this.ri("session_expired")}),(0,u.kt)()||((e=(0,u.l)()).srInstances=Object.assign(Object.assign({},e.srInstances),{[t]:this}),e.firstSRInstance)||(e.firstSRInstance=this),this.ii=this.ni(),this.ui()}forceStartRecording(){this.ts=!1,this.li(!0)}stopRecording(){this.ts=!0,this.ri()}startRecording(){var t;this.ts=!1,this.li(null==(t=this.m)?void 0:t.forceRecording)}isRecording(){return this.si.isRecording()}oi(t){0!==this.ei.length&&(t=(0,u.Rt)()?"is_leaving_page":t,this.vi(this.ii,t))}ai(t){"background"===t&&(this.oi(),this.tn.flush().catch(t=>{this.$t.logError("SR::visibility",t)}))}ui(){const i=this.tn.getContext()["sdkKey"];(0,u.It)(t=>{var e=null==(e=null==(e=(0,u.l)())?void 0:e.srInstances)?void 0:e[i];e instanceof r&&e.ai(t)})}vi(e,i){var n=this.ti;if(0!==this.ei.length){var s=JSON.stringify(this.ei),r=(0,c.rs)(s),o=1<r.length?(0,u.getUUID)():null;for(let t=0;t<r.length;t++){var a=r[t],l=(0,c.ls)(a,s,e,n,this.tn.getContext().sdkInstanceID);null!=o&&(0,c.os)(l.metadata,o,t,r.length,a.length),i&&(l.metadata[i]="true"),this.ns++,this.tn.logEvent(l),null!=o&&this.tn.flush().catch(t=>{u.Log.error(t)})}this.ei=[],this.ns>c.MAX_LOGS&&this.ri()}}di(){this.ni(),this.oi()}ni(){return this.tn.getContext().session.data.sessionID}es(t){this.si.isRecording()&&(this.si.stop(),u.StatsigMetadataProvider.add({isRecordingSession:"false"})),0!==this.ei.length&&this.oi(t),"session_expired"===t&&(this.ss=0,this.ti=this.us())}us(){return{startTime:-1,endTime:0,clickCount:0}}ci(t,e){var i;this.ii!==this.ni()?this.ri("session_expired"):this.ns>=c.MAX_LOGS?this.ri():(t.eventIndex=this.ss++,this.ti.clickCount+=e.clickCount,this.ti.startTime=-1===this.ti.startTime?e.startTime:Math.min(this.ti.startTime,e.startTime),this.ti.endTime=Math.max(this.ti.endTime,e.endTime),(e=(0,u.hi)(t,c.MAX_INDIVIDUAL_EVENT_BYTES))>c.MAX_INDIVIDUAL_EVENT_BYTES?u.Log.warn(`SessionReplay event is too large (~${e} bytes) and will not be logged`,t):(i=(0,u.hi)(this.ei,c.REPLAY_ENQUEUE_TRIGGER_BYTES),this.ei.push(t),i+e<c.REPLAY_ENQUEUE_TRIGGER_BYTES||((0,u.xe)()?this.di():this.oi())))}}e.SessionReplayBase=r},759:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SessionReplayClient=void 0;const n=i(670),o=i(6914);e.SessionReplayClient=class{constructor(){this.fi=null,this._i=null}record(s,t,e,r=!1){null==(0,o.de)()||(this.fi=null,this._i=null,this.bi=e,this.pi)||(this.pi=(e=(t,e)=>{var i;r?this.fi=!e&&null!=(i=this.fi)?i:t.timestamp:null==this.fi&&(this.fi=t.timestamp),this._i=t.timestamp;let n=0;3!==(i=t).type||2!==i.data.source||2!==i.data.type&&4!==i.data.type||n++,s(Object.assign(Object.assign({},t),{eventIndex:0}),{startTime:this.fi,endTime:this._i,clickCount:n},null!=e&&e),144e5<this._i-this.fi&&(null!=(t=this.pi)&&t.call(this),this.bi)&&this.bi()},t=t,r?(0,n.record)(Object.assign(Object.assign({},t),{emit:e,checkoutEveryNms:3e4})):(0,n.record)(Object.assign(Object.assign({},t),{emit:e}))))}stop(){this.pi&&(this.pi(),this.pi=void 0)}isRecording(){return null!=this.pi}}},5967:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.os=e.rs=e.ls=e.MAX_LOGS=e.MAX_INDIVIDUAL_EVENT_BYTES=e.REPLAY_ENQUEUE_TRIGGER_BYTES=void 0;const r=i(6914);e.REPLAY_ENQUEUE_TRIGGER_BYTES=10240,e.MAX_INDIVIDUAL_EVENT_BYTES=10485760,e.MAX_LOGS=1e4,e.ls=function(t,e,i,n,s){return{eventName:"statsig::session_recording",value:i,metadata:{session_start_ts:String(n.startTime),session_end_ts:String(n.endTime),clicks_captured_cumulative:String(n.clickCount),rrweb_events:t,rrweb_payload_size:String(e.length),session_replay_sdk_version:r.SDK_VERSION,sdk_instance_id:s}}},e.rs=function(e){var i=[];for(let t=0;t<e.length;t+=1048576)i.push(e.slice(t,t+1048576));return i},e.os=function(t,e,i,n,s){t.sliced_id=e,t.slice_index=String(i),t.slice_count=String(n),t.slice_byte_size=String(s)}},3691:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TriggeredSessionReplay=e.runStatsigTriggeredSessionReplay=e.StatsigTriggeredSessionReplayPlugin=void 0;const s=i(6914);var n=i(4069);const r=i(5967);function o(t,e){new a(t,e)}e.StatsigTriggeredSessionReplayPlugin=class{constructor(t){this.options=t,this.__plugin="triggered-session-replay"}bind(t){o(t,this.options)}},e.runStatsigTriggeredSessionReplay=o;class a extends n.SessionReplayBase{constructor(t,e){super(t,e),this.cs=[],this.hs=!1,this.ds(e),null!=e&&e.autoStartRecording?this.li(null==(t=this.m)?void 0:t.forceRecording):null!=e&&e.keepRollingWindow&&this.vs()}ds(t){this.fs(t),this.gs(),this._s(),this.ps()}fs(e){this.tn.$on("values_updated",()=>{var t;this.ts||(null!=e&&e.autoStartRecording?this.li(null==(t=this.m)?void 0:t.forceRecording):null!=e&&e.keepRollingWindow&&this.vs())})}gs(){this.tn.$on("log_event_called",t=>{var e;this.ts||!1===(null==(e=this.tn.getContext().values)?void 0:e.passes_session_recording_targeting)||null==(null==e?void 0:e.session_recording_event_triggers)||null==(e=e.session_recording_event_triggers[t.event.eventName])||!1===e.passes_sampling||null!=(e=e.values)&&!e.includes(String(null!=(e=t.event.value)?e:""))||this.li(!0)})}_s(){this.tn.$on("gate_evaluation",t=>{this.bs(t.gate.name,String(t.gate.value))})}ps(){this.tn.$on("experiment_evaluation",t=>{this.bs(t.experiment.name,null!=(t=t.experiment.groupName)?t:"")})}bs(t,e){var i,n;this.ts||!1===(null==(n=this.tn.getContext().values)?void 0:n.passes_session_recording_targeting)||null==(null==n?void 0:n.session_recording_exposure_triggers)||null==(i=null!=(i=n.session_recording_exposure_triggers[t])?i:n.session_recording_exposure_triggers[(0,s.h)(t)])||!1===i.passes_sampling||null!=(n=i.values)&&!n.includes(e)||this.li(!0)}forceStartRecording(){super.forceStartRecording()}stopRecording(){this.hs=!1,this.cs=[],super.stopRecording()}ys(){if(this.hs=!0,0!==this.cs.length){var e=this.cs.map(t=>t.events).flat();for(let t=0;t<e.length;t++)e[t].event.eventIndex=t,this.ti.clickCount+=e[t].data.clickCount,this.ti.startTime=-1===this.ti.startTime?e[t].data.startTime:Math.min(this.ti.startTime,e[t].data.startTime),this.ti.endTime=Math.max(this.ti.endTime,e[t].data.endTime);this.ei=e.map(t=>t.event),this.ss=e.length,(0,s.xe)()?this.di():this.oi(),this.si.stop()}}ri(t){this.hs=!1,this.cs=[],super.es(t)}ci(t,e,i){if(!this.hs)return this.ii!==this.ni()?void this.ri("session_expired"):void(i&&4===t.type||0===this.cs.length?(1<this.cs.length&&this.cs.shift(),this.cs.push({events:[{event:t,data:e}]})):this.cs[this.cs.length-1].events.push({event:t,data:e}));super.ci(t,e)}vs(){var t=this.tn.getContext().values;!1===(null==t?void 0:t.passes_session_recording_targeting)?this.ri():this.si.isRecording()||this.si.record((t,e,i)=>this.ci(t,e,i),null!=(t=null==(t=this.m)?void 0:t.rrwebConfig)?t:{},()=>{this.ri()},!0)}li(t=!1){var e;this.ns>=r.MAX_LOGS||(!0===(null==(e=this.tn.getContext().values)?void 0:e.recording_blocked)||!t&&!0!==(null==e?void 0:e.can_record_session)||!1===(null==e?void 0:e.passes_session_recording_targeting)?this.ri():(this.ys(),this.ts=!1,s.StatsigMetadataProvider.add({isRecordingSession:"true"}),this.si.isRecording()||this.si.record((t,e,i)=>this.ci(t,e,i),null!=(e=null==(t=this.m)?void 0:t.rrwebConfig)?e:{},()=>{this.ri()})))}}e.TriggeredSessionReplay=a},3447:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.forceStartRecording=e.stopRecording=e.startRecording=e.StatsigTriggeredSessionReplayPlugin=e.StatsigSessionReplayPlugin=e.runStatsigTriggeredSessionReplay=e.runStatsigSessionReplay=e.SessionReplay=e.SessionReplayClient=void 0;var n=i(6914);const s=i(8788),r=(Object.defineProperty(e,"SessionReplay",{enumerable:!0,get:function(){return s.SessionReplay}}),Object.defineProperty(e,"StatsigSessionReplayPlugin",{enumerable:!0,get:function(){return s.StatsigSessionReplayPlugin}}),Object.defineProperty(e,"runStatsigSessionReplay",{enumerable:!0,get:function(){return s.runStatsigSessionReplay}}),i(4069)),o=(Object.defineProperty(e,"forceStartRecording",{enumerable:!0,get:function(){return r.forceStartRecording}}),Object.defineProperty(e,"startRecording",{enumerable:!0,get:function(){return r.startRecording}}),Object.defineProperty(e,"stopRecording",{enumerable:!0,get:function(){return r.stopRecording}}),i(759)),a=(Object.defineProperty(e,"SessionReplayClient",{enumerable:!0,get:function(){return o.SessionReplayClient}}),i(3691));Object.defineProperty(e,"StatsigTriggeredSessionReplayPlugin",{enumerable:!0,get:function(){return a.StatsigTriggeredSessionReplayPlugin}}),Object.defineProperty(e,"runStatsigTriggeredSessionReplay",{enumerable:!0,get:function(){return a.runStatsigTriggeredSessionReplay}}),Object.assign((0,n.l)(),{SessionReplayClient:o.SessionReplayClient,SessionReplay:s.SessionReplay,runStatsigSessionReplay:s.runStatsigSessionReplay,runStatsigTriggeredSessionReplay:a.runStatsigTriggeredSessionReplay,StatsigSessionReplayPlugin:s.StatsigSessionReplayPlugin,StatsigTriggeredSessionReplayPlugin:a.StatsigTriggeredSessionReplayPlugin,startRecording:r.startRecording,stopRecording:r.stopRecording,forceStartRecording:r.forceStartRecording})},4535:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoCapture=e.runStatsigAutoCapture=e.StatsigAutoCapturePlugin=void 0;const c=i(6914),r=i(5423),s=i(8872),o=i(7875),a=i(6714),l=i(4716),u=i(2678),h=i(5864),d=i(3769),v=i(9900),f={submit:r.AutoCaptureEventName.FORM_SUBMIT,click:r.AutoCaptureEventName.CLICK,copy:r.AutoCaptureEventName.COPY,cut:r.AutoCaptureEventName.COPY};function n(t,e){var i=t.getContext()["sdkKey"];if(!(0,c.kt)()){var n=null!=(n=(0,c.l)().acInstances)?n:{};if(n[i])return n[i]}return new m(t,e)}e.StatsigAutoCapturePlugin=class{constructor(t){this.m=t,this.__plugin="auto-capture"}bind(t){n(t,this.m)}},e.runStatsigAutoCapture=n;class m{constructor(t,e){this.tn=t,this.rn={},this.sn=null,this.Ei=!1,this.cr=!1;var{sdkKey:t,errorBoundary:i,values:n}=t.getContext(),i=(this.rn=null!=(n=null==(n=null==n?void 0:n.auto_capture_settings)?void 0:n.disabled_events)?n:{},this.$t=i,this.$t.wrap(this),this.tn.$on("values_updated",()=>{var t=this.tn.getContext().values;this.rn=null!=(t=null==(t=null==t?void 0:t.auto_capture_settings)?void 0:t.disabled_events)?t:this.rn}),this.Vi=new a.EngagementManager,this.Gi=new l.default,this.hr=new u.WebVitalsManager(this.bn.bind(this)),this.Ds=new o.default(this.bn.bind(this)),this.Fs=new s.ConsoleLogManager(this.bn.bind(this),null!=(n=null==e?void 0:e.consoleLogAutoCaptureSettings)?n:{enabled:!1}),this.ln=null==e?void 0:e.eventFilterFunc,(0,c.de)());(0,c.kt)()||((e=null!=(n=(__STATSIG__=(0,c.l)()).acInstances)?n:{})[t]=this,__STATSIG__.acInstances=e),"loading"===(null==i?void 0:i.readyState)?i.addEventListener("DOMContentLoaded",()=>this.qt()):this.qt()}un(){var t=(0,c.te)(),e=(0,c.de)();if(t&&e){const i=(t,e=!0)=>{t=t||(null==(t=(0,c.te)())?void 0:t.event);this.an(t),e&&this.Vi.bumpInactiveTimer(),"click"===t.type&&t instanceof MouseEvent&&this.Gi.isRageClick(t.clientX,t.clientY,Date.now())&&this.Bi(t)};(0,h.cn)(e,"click",t=>i(t)),(0,h.cn)(e,"submit",t=>i(t)),(0,h.cn)(e,"copy",t=>i(t)),(0,h.cn)(e,"cut",t=>i(t)),(0,h.cn)(t,"error",t=>i(t,!1)),(0,h.cn)(t,"pagehide",()=>this.Mi()),(0,h.cn)(t,"beforeunload",()=>this.Mi())}}vn(){var t=(0,c.te)(),e=(0,c.de)();t&&e&&((0,h.cn)(t,"popstate",()=>this.fn()),window.history.pushState=new Proxy(window.history.pushState,{apply:(t,e,[i,n,s])=>{t.apply(e,[i,n,s]),this.fn()}}),this.fn())}an(t){var e=null==(e=t.type)?void 0:e.toLowerCase();if("error"===e&&t instanceof ErrorEvent)this._n(t);else{var i=(0,h.gn)(t);if(i){e=f[e];if(e){var n=e===r.AutoCaptureEventName.COPY;if((0,h.St)(t,i,n)){var s={};if(n){n=null==(n=null==(n=(0,c.te)())?void 0:n.getSelection())?void 0:n.toString();if(!n)return;s.selectedText=(0,h.Ns)(n);n=t.type||"clipboard";s.clipType=n}var{value:t,metadata:n}=(0,d.pn)(i),i=(Object.assign(s,n),(0,v.$i)((0,h.wn)()));this.bn(e,t,Object.assign(Object.assign({},i),s))}}}}}qt(){this.hr.startTracking(),this.Ds.startTracking(),this.Fs.startTracking(),this.Vi.startInactivityTracking(()=>this.Mi(!0)),this.un(),this.vn(),this.mn(),this.yn()}_n(t){var e=(null==t?void 0:t.error)||{};let i=e;if("object"==typeof e)try{i=JSON.stringify(e)}catch(t){i="function"==typeof(null==e?void 0:e.toString)?e.toString():"Unknown Error"}this.bn(r.AutoCaptureEventName.ERROR,t.message,{message:t.message,filename:t.filename,lineno:t.lineno,colno:t.colno,error_str:i})}mn(){var t=this.On();try{this.jn(t)&&this.bn(r.AutoCaptureEventName.SESSION_START,(0,h.Sn)(),{sessionID:t.data.sessionID},{flushImmediately:!0})}catch(t){this.$t.logError("AC::logSession",t)}}fn(){var t=(0,h.wn)(),e=this.sn;e&&t.href===e.href||(this.Vi.setLastPageViewTime(Date.now()),e=(this.Ei=!1,v.$i)(t),this.sn&&(e.last_page_view_url=this.sn.href),this.cr||(this.dr(),this.cr=!0),this.bn(r.AutoCaptureEventName.PAGE_VIEW,(0,h.Sn)(),e,{flushImmediately:!0,addNewSessionMetadata:!0}),this.sn=t,this.Vi.bumpInactiveTimer())}Mi(t=!1){var e,i;this.Ei||(this.Ei=!0,e=this.Vi.getScrollMetrics(),i=this.Vi.getPageViewLength(),this.bn(r.AutoCaptureEventName.PAGE_VIEW_END,(0,h.Sn)(),Object.assign(Object.assign({},e),{pageViewLength:i,dueToInactivity:t}),{flushImmediately:!0}))}Bi(t){var{value:e,metadata:i}=(0,d.pn)(t.target);this.bn(r.AutoCaptureEventName.RAGE_CLICK,e,Object.assign(Object.assign({x:t.clientX,y:t.clientY,timestamp:Date.now()},(0,v.$i)((0,h.wn)())),i))}yn(){const i=(0,c.te)();i&&i.performance&&void 0!==(null===i||void 0===i?void 0:i.performance)&&"function"==typeof i.performance.getEntriesByType&&"function"==typeof i.performance.getEntriesByName&&setTimeout(()=>{var t={},e=i.performance.getEntriesByType("navigation"),e=(e&&0<e.length&&e[0]instanceof PerformanceNavigationTiming&&(e=e[0],t.load_time_ms=e.duration,t.dom_interactive_time_ms=e.domInteractive-e.startTime,t.redirect_count=e.redirectCount,t.transfer_bytes=e.transferSize),i.performance.getEntriesByName("first-contentful-paint"));e&&0<e.length&&e[0]instanceof PerformancePaintTiming&&(t.first_contentful_paint_time_ms=e[0].startTime),this.bn(r.AutoCaptureEventName.PERFORMANCE,(0,h.Sn)(),Object.assign(Object.assign({},t),(0,v.Ji)()))},1)}bn(t,e,i,n){var s,r,o,a=t.slice("auto_capture::".length);if(!this.rn[t]&&!this.rn[a]){a=this.On();try{var l=Object.assign({sessionID:a.data.sessionID,page_url:null!=(o=null==(r=null==(s=(0,c.te)())?void 0:s.location)?void 0:r.href)?o:""},i),u=(null!=n&&n.addNewSessionMetadata&&(l.isNewSession=String(this.jn(a))),{eventName:t,value:e,metadata:l});this.ln&&!this.ln(u)||(this.tn.logEvent(u),null!=n&&n.flushImmediately&&this.vr())}catch(t){this.$t.logError("AC::enqueue",t)}}}dr(){var t=this.tn;t.ar=(0,v.gr)((0,h.wn)()),t.He=Object.assign(Object.assign({},t.He),{analyticsOnlyMetadata:Object.assign(Object.assign({},t.ar),t.He.analyticsOnlyMetadata)})}vr(){this.tn.flush().catch(t=>{c.Log.error(t)})}jn(t){return Math.abs(t.data.startTime-Date.now())<1e3}On(){return this.tn.getContext().session}}e.AutoCapture=m},5423:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoCaptureEventName=void 0,e.AutoCaptureEventName={PAGE_VIEW:"auto_capture::page_view",PAGE_VIEW_END:"auto_capture::page_view_end",ERROR:"auto_capture::error",SESSION_START:"auto_capture::session_start",PERFORMANCE:"auto_capture::performance",FORM_SUBMIT:"auto_capture::form_submit",CLICK:"auto_capture::click",RAGE_CLICK:"auto_capture::rage_click",WEB_VITALS:"auto_capture::web_vitals",DEAD_CLICK:"auto_capture::dead_click",COPY:"auto_capture::copy",CONSOLE_LOG:"statsig::log_line"}},8872:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConsoleLogManager=void 0;const n=i(6914),s=i(5423),a=i(5864),r=i(9900);e.ConsoleLogManager=class{constructor(t,e){this._r=t,this.m=e,this.Ls=[],this.Gs=!1}startTracking(){!this.Gs&&this.m.enabled&&(0,n.te)()&&(this.Gs=!0,this.Us())}stopTracking(){this.Gs&&(this.Ls.forEach(t=>t()),this.Ls=[],this.Gs=!1)}Us(){["log","info","warn","error","debug"].forEach(r=>{if(console[r]){const o=console[r].bind(console);let s=!1;var t=(0,a.patch)(console,r,n=>(...e)=>{if(n(...e),!s){s=!0;try{var t=e.map(t=>this.Ws(t)),i=this.Ps();this.Bs(r,t,i)}catch(t){o("console observer error:",t,...e)}finally{s=!1}}});this.Ls.push(t)}})}Bs(t,e,i){this.Ys()&&(t=Object.assign(Object.assign({log_level:t,payload:e,trace:i,timestamp:Date.now(),serviceName:null!=(t=this.m.serviceName)?t:"",serviceVersion:null!=(e=this.m.serviceVersion)?e:""},null!=(i=this.m.resourceMetadata)?i:{}),(0,r.$i)((0,a.wn)())),this._r(s.AutoCaptureEventName.CONSOLE_LOG,(0,a.br)(),t))}Ys(){return!this.m.sampleRate||"number"!=typeof this.m.sampleRate||this.m.sampleRate<=0||1<=this.m.sampleRate||Math.random()<this.m.sampleRate}Ws(t){try{return"string"==typeof t?t:"object"==typeof t&&null!==t?JSON.stringify(t):String(t)}catch(t){return"[Unserializable]"}}Ps(){var t,e;try{return null!=(e=null==(t=(new Error).stack)?void 0:t.split("\n").slice(2))?e:[]}catch(t){return[]}}}},7875:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeadClickConfig=void 0;const o=i(6914),s=i(5423),n=i(5864),r=i(3769);e.DeadClickConfig={CLICK_CHECK_TIMEOUT:1e3,SCROLL_DELAY_MS:100,SELECTION_CHANGE_DELAY_MS:100,MUTATION_DELAY_MS:2500,ABSOLUTE_DEAD_CLICK_TIMEOUT:2750};e.default=class{constructor(t){this._r=t,this.zs=0,this.Vs=0,this.er=[],this.Zs=e.DeadClickConfig,this.tr=(0,n.throttle)(()=>{const e=Date.now();this.er.forEach(t=>{t.scrollDelayMs||(t.scrollDelayMs=e-t.timestamp)})},50)}startTracking(){var t=(0,o.te)();t&&(t.addEventListener("click",t=>this.Ks(t),{capture:!0}),t.addEventListener("scroll",()=>this.tr(),{capture:!0,passive:!0}),t.addEventListener("selectionchange",()=>this.Js()),this.Xs())}Ks(t){var e,t=t.target;t&&(e={timestamp:Date.now(),eventTarget:t},n.interactiveElements.includes(null==(t=null==t?void 0:t.tagName)?void 0:t.toLowerCase())||this.er.push(e),this.er.length)&&!this.Hs&&(this.Hs=null==(t=(0,o.te)())?void 0:t.setTimeout(()=>{this.$s()},this.Zs.CLICK_CHECK_TIMEOUT))}Js(){this.Vs=Date.now()}Xs(){var t=(0,o.de)();t&&(this.qs=new MutationObserver(()=>{this.zs=Date.now()}),this.qs.observe(t.body,{childList:!0,subtree:!0,attributes:!0,characterData:!0}))}$s(){if(this.er.length){clearTimeout(this.Hs),this.Hs=void 0;var t=this.er;this.er=[];for(const r of t){this.Qs(r);var e,i=null!=r.scrollDelayMs&&r.scrollDelayMs<this.Zs.SCROLL_DELAY_MS,n=null!=r.selectionChangeDelayMs&&r.selectionChangeDelayMs<this.Zs.SELECTION_CHANGE_DELAY_MS,s=null!=r.mutationDelayMs&&r.mutationDelayMs<this.Zs.MUTATION_DELAY_MS;i||n||s||(i=null!=r.scrollDelayMs&&r.scrollDelayMs>this.Zs.SCROLL_DELAY_MS,n=null!=r.selectionChangeDelayMs&&r.selectionChangeDelayMs>this.Zs.SELECTION_CHANGE_DELAY_MS,s=null!=r.mutationDelayMs&&r.mutationDelayMs>this.Zs.MUTATION_DELAY_MS,e=null!=r.absoluteDelayMs&&r.absoluteDelayMs>this.Zs.ABSOLUTE_DEAD_CLICK_TIMEOUT,i||n||s||e?this.Ir(r,{scrollTimeout:i,selectionChangeTimeout:n,mutationTimeout:s,absoluteTimeout:e}):null!=r.absoluteDelayMs&&r.absoluteDelayMs<this.Zs.ABSOLUTE_DEAD_CLICK_TIMEOUT&&this.er.push(r))}this.er.length&&!this.Hs&&(this.Hs=null==(t=(0,o.te)())?void 0:t.setTimeout(()=>{this.$s()},this.Zs.CLICK_CHECK_TIMEOUT))}}Ir(t,e){var{value:i,metadata:n}=(0,r.pn)(t.eventTarget);this._r(s.AutoCaptureEventName.DEAD_CLICK,i,Object.assign(Object.assign(Object.assign({},n),e),{scrollDelayMs:t.scrollDelayMs,selectionChangeDelayMs:t.selectionChangeDelayMs,mutationDelayMs:t.mutationDelayMs,absoluteDelayMs:t.absoluteDelayMs}))}Qs(t){!t.mutationDelayMs&&0<this.zs&&t.timestamp<=this.zs&&(t.mutationDelayMs=Date.now()-this.zs),!t.selectionChangeDelayMs&&0<this.Vs&&t.timestamp<=this.Vs&&(t.selectionChangeDelayMs=Date.now()-this.Vs),t.absoluteDelayMs=Date.now()-t.timestamp}}},6714:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EngagementManager=void 0;const n=i(6914);e.EngagementManager=class{constructor(){this.Wi=0,this.Yi=0,this.Qi=0,this.Hi=0,this.Xi=Date.now(),this.Ai=null,this.Zi=null,this.Zn()}Zn(){var t=(0,n.te)();t&&(t.addEventListener("scroll",()=>this.tr()),t.addEventListener("scrollend",()=>this.tr()),t.addEventListener("resize",()=>this.tr()))}tr(){var t,e=(0,n.te)(),i=(0,n.de)();e&&i&&(t=i.body.scrollHeight,i=e.scrollY||i.documentElement.scrollTop||0,e=e.innerHeight,this.Wi=i,this.Yi=Math.max(this.Yi,i),i=Math.min(100,Math.round((i+e)/t*100)),this.Qi=i,this.Hi=Math.max(this.Hi,i),this.bumpInactiveTimer())}getScrollMetrics(){return{lastScrollY:this.Wi,maxScrollY:this.Yi,lastScrollPercentage:this.Qi,maxScrollPercentage:this.Hi,scrollDepth:this.Hi}}getPageViewLength(){return Date.now()-this.Xi}setLastPageViewTime(t){this.Xi=t}startInactivityTracking(t){this.Zi=t}bumpInactiveTimer(){var t=(0,n.te)();t&&(this.Ai&&clearTimeout(this.Ai),this.Ai=t.setTimeout(()=>{this.Zi&&this.Zi()},6e5))}}},4716:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=class{constructor(){this.er=[]}isRageClick(t,e,i){this.er=this.er.filter(t=>i-t.timestamp<1e3);var n,s;return 0<this.er.length&&(n=this.er[this.er.length-1],s=t-n.x,n=e-n.y,!(Math.abs(s)+Math.abs(n)<=30))&&(this.er=[]),this.er.push({x:t,y:e,timestamp:i}),3<=this.er.length}}},2678:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebVitalsManager=void 0;const n=i(8572),s=i(6914),r=i(5423),o=i(5864),a=["CLS","FCP","LCP","TTFB"];e.WebVitalsManager=class{constructor(t){this._r=t,this.pr=!1}startTracking(){var t;this.pr||"https:"!==(t=null==(t=null==(t=(0,s.te)())?void 0:t.location)?void 0:t.protocol)&&"http:"!==t||((0,n.onCLS)(t=>this.mr(t)),(0,n.onFCP)(t=>this.mr(t)),(0,n.onLCP)(t=>this.mr(t)),(0,n.onTTFB)(t=>this.mr(t)),this.pr=!0)}mr(t){var e;void 0!==t&&void 0!==(null==t?void 0:t.name)&&""!==(e=(0,o.br)())&&a.includes(t.name)&&this.yr(t,e)}yr(t,e){""!==e&&this._r(r.AutoCaptureEventName.WEB_VITALS,e,{name:t.name,value:t.value,delta:t.delta,id:t.id})}}},1964:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigAutoCapturePlugin=e.runStatsigAutoCapture=e.AutoCapture=e.AutoCaptureEventName=void 0;var n=i(6914);const s=i(4535);Object.defineProperty(e,"AutoCapture",{enumerable:!0,get:function(){return s.AutoCapture}}),Object.defineProperty(e,"StatsigAutoCapturePlugin",{enumerable:!0,get:function(){return s.StatsigAutoCapturePlugin}}),Object.defineProperty(e,"runStatsigAutoCapture",{enumerable:!0,get:function(){return s.runStatsigAutoCapture}});var r=i(5423),i=(Object.defineProperty(e,"AutoCaptureEventName",{enumerable:!0,get:function(){return r.AutoCaptureEventName}}),Object.assign((0,n.l)(),{AutoCapture:s.AutoCapture,runStatsigAutoCapture:s.runStatsigAutoCapture,StatsigAutoCapturePlugin:s.StatsigAutoCapturePlugin}));e.default=i},5864:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.patch=e.throttle=e.Ns=e.ir=e.nr=e.rr=e.kn=e.cn=e.Sn=e.br=e.wn=e.St=e.gn=e.sr=e.interactiveElements=void 0;const n=i(6914);const s=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}))$");const r=new RegExp("^(\\d{3}-?\\d{2}-?\\d{4})$");function o(){var t=null!=(t=null==(t=null==(t=(0,n.te)())?void 0:t.location)?void 0:t.href)?t:"";let e;try{e=new URL(t)}catch(t){e=new URL("error:")}return e}function a(e){if(e){let t=e;for(;t;){var i=t.tagName.toLowerCase();if(["body","document"].includes(i))return null;if("a"===t.tagName.toLowerCase())return t;t=t.parentElement}}return null}e.interactiveElements=["button","a","input","select","textarea","form","select","label"],e.sr=function(t){return Object.fromEntries(Object.entries(t).filter(([,t])=>null!=t&&""!==t&&void 0!==t))},e.gn=function(t){if(!t)return null;let e=t.target||t.srcElement;return e&&e instanceof Element?e=3===e.nodeType?e.parentNode||null:e:null},e.St=function(t,e,i=!1){if(!t||!e||1!==e.nodeType)return!1;var n=e.tagName.toLowerCase(),s=t.type.toLowerCase();if(e.classList.contains("statsig-no-capture"))return!1;if(i)return!0;switch(n){case"html":return!1;case"form":return 0<=["submit"].indexOf(s);case"input":case"select":case"textarea":return 0<=["change","click"].indexOf(s);default:if("click"===s){if("button"===n)return!0;if(a(e))return!0}return!1}},e.wn=o,e.br=function(){var t=o().toString();return t.startsWith("error:")?"":t},e.Sn=function(){return(0,n.Gt)()||""},e.cn=function(t,e,i){t&&t.addEventListener&&t.addEventListener(e,i,!0)},e.kn=function(){var t=(0,n.te)();return t&&t.navigator&&t.navigator.connection||null},e.rr=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(t){return null}},e.nr=function(){try{return(new Date).getTimezoneOffset()}catch(t){return null}},e.ir=a,e.Ns=function(t){return t?t.replace(/<[^>]*>/g,"").trim().split(/(\s+)/).filter(t=>{return!s.test((t||"").replace(/[- ]/g,""))&&!r.test((t||"").replace(/[- ]/g,""))}).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255):null},e.throttle=function(i,n){let s=0;return function(...t){var e=Date.now();e-s>=n&&(s=e,i(...t))}},e.patch=function(t,e,i){try{if(!t[e])return()=>{};const s=t[e];var n=i(s);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__statsig_original__:{enumerable:!1,value:s}})),t[e]=n,()=>{t[e]=s}}catch(t){return()=>{}}}},3769:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.lr=e.Cr=e.pn=void 0;const l=i(6914),u=i(5864),n=1e3,s=100,o=50;function r(t,e){return t?t.length>e?t.substring(0,e)+"...":t:null}function c(t){var e={},i=Array.from(t.classList);return e.classList=0<i.length?i.slice(0,s):null,e.class=(r(t.getAttribute("class"),n)||"").replace(/\s+/g," ").trim(),e.id=r(t.getAttribute("id"),n),e.ariaLabel=r(t.getAttribute("aria-label"),n),e.selector=function(e){if(!e)return"";if(!e.parentNode){var i=e.tagName.toLowerCase();if(e.id)return"#"+e.id;let t=i;return e.className&&"string"==typeof e.className&&0<(i=e.className.trim().split(/\s+/)).length&&""!==i[0]&&(t+="."+i.join(".")),t}var t=[];let n=e,s=0;for(;n&&n.nodeType===Node.ELEMENT_NODE&&s<o;){var r=function(n){var t=n.tagName.toLowerCase();if(n.id)return"#"+n.id;let s=t;n.className&&"string"==typeof n.className&&0<(t=n.className.trim().split(/\s+/)).length&&""!==t[0]&&(s+="."+t.join("."));t=n.parentElement;if(t&&1<t.children.length){let t=1,e=1,i=n.previousElementSibling;for(;i;)t++,i.tagName===n.tagName&&e++,i=i.previousElementSibling;s+=`:nth-child(${t})`,(1<e||function(t){let e=t.nextElementSibling;for(;e;){if(e.tagName===t.tagName)return 1;e=e.nextElementSibling}return}(n))&&(s+=`:nth-of-type(${e})`)}return s}(n);if(t.unshift(r),n.id)break;if((n=n.parentElement)&&"body"===n.tagName.toLowerCase())break;s++}return t.join(" > ")}(t),e}e.pn=function(t){var e,i,n,s=t.tagName.toLowerCase(),r={},o=(0,l.Gt)()||"",a=(r.tagName=s,c(t));return Object.assign(r,a),"form"===s&&Object.assign(r,((a={}).action=(e=t).getAttribute("action"),a.method=null!=(i=e.getAttribute("method"))?i:"GET",a.formName=e.getAttribute("name"),a.formId=e.getAttribute("id"),a)),["input","select","textarea"].includes(s)&&"password"!==t.getAttribute("type")&&Object.assign(r,((i={}).content=(e=t).value,i.inputName=e.getAttribute("name"),i)),(a=(0,u.ir)(t))&&Object.assign(r,((n={}).href=a.getAttribute("href"),n)),"button"!==s&&!a||Object.assign(r,((n={}).content=((s=a||t).textContent||"").trim(),s=function(t){var e={};if(t){var i=null==t?void 0:t.dataset;if(i)for(const n in i)e["data-"+n]=i[n]||""}return e}(s),Object.assign(n,s),n)),{value:o,metadata:r}},e.Cr=function(t){var e=null==(e=null==(e=(0,l.te)())?void 0:e.getSelection())?void 0:e.toString(),i={},e=(i.selectedText=(0,u.Ns)(e),t.type||"clipboard");return i.clipType=e,i},e.lr=c},9900:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.gr=e.Ji=e.$i=e.ur=void 0;const o=i(6914),a=i(5864);function r(t){var e=(0,o.de)(),i=(0,o.te)();return(0,a.sr)(Object.assign({title:null==e?void 0:e.title,current_url:null==(e=null==i?void 0:i.location)?void 0:e.href,user_agent:null!=(e=null==i?void 0:i.navigator)&&e.userAgent&&200<(null==(e=null==(e=null==i?void 0:i.navigator)?void 0:e.userAgent)?void 0:e.length)?i.navigator.userAgent.substring(0,200):null==(e=null==i?void 0:i.navigator)?void 0:e.userAgent,locale:null==(e=null==i?void 0:i.navigator)?void 0:e.language,hostname:t.hostname,pathname:t.pathname,screen_width:null==(e=null==i?void 0:i.screen)?void 0:e.width,screen_height:null==(t=null==i?void 0:i.screen)?void 0:t.height,viewport_width:null==i?void 0:i.innerWidth,viewport_height:null==i?void 0:i.innerHeight,timestamp:Date.now(),timezone:(0,a.rr)(),timezone_offset:(0,a.nr)()},n()))}function n(){var t=(0,a.kn)(),e={};return void 0!==(null==t?void 0:t.effectiveType)&&(e.effective_connection_type=t.effectiveType),void 0!==(null==t?void 0:t.rtt)&&(e.rtt_ms=t.rtt),void 0!==(null==t?void 0:t.downlink)&&(e.downlink_mbps=t.downlink,e.downlink_kbps=1e3*t.downlink),void 0!==(null==t?void 0:t.saveData)&&(e.save_data=t.saveData),e}function l(t){t=(null==t?void 0:t.referrer)||"";if(!t)return{referrer:null,referrer_domain:null,referrer_path:null,searchEngine:"",searchQuery:""};try{var e=new URL(t);const s=e.hostname;var i=["google","bing","yahoo","duckduckgo","baidu"].find(t=>s.includes(t+"."))||"",n=e.searchParams.get("yahoo"===i?"p":"q")||"";return{referrer:t,referrer_domain:e.hostname,referrer_path:e.pathname,searchEngine:i,searchQuery:n}}catch(t){return{referrer:null,referrer_domain:null,referrer_path:null,searchEngine:"",searchQuery:""}}}function u(t){const i=t.searchParams,n={};return["utm_source","utm_medium","utm_campaign","utm_term","utm_content","msclkid","dclid","fbclid","gad_source","gclid","gclsrc","wbraid","utm_id","irclid","igshid","_kx","li_fat_id","mc_cid","mc_eid","epik","qclid","rdt_cid","sccid","ttc","ttclid","ttc_id","twclid"].forEach(t=>{var e=i.get(t);e&&(n[t]=e)}),n}e.ur=r,e.$i=function(t){var e=(0,o.de)(),i=(0,o.te)();if(!e||!i)return{};var i=l(e),e=r(t),n=u(t);const s={};return t.searchParams.forEach((t,e)=>{s[e]=t}),Object.assign(Object.assign({},e),(0,a.sr)(Object.assign(Object.assign(Object.assign({},i),n),s)))},e.Ji=n,e.gr=function(t){var e=(0,o.de)(),i=(0,o.te)();if(!e||!i)return{};var n,s,i=l(e),e=u(t),t=(0,a.sr)(Object.assign(Object.assign({},i),e)),r={};for([n,s]of Object.entries(t))r["$s_"+n]=s;return r}},670:(e,i)=>{"use strict";Object.defineProperty(i,Symbol.toStringTag,{value:"Module"});var s,u=Object.defineProperty,a=(t,e,i)=>{var n;return n=i,(e="symbol"!=typeof e?e+"":e)in(t=t)?u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,i},c=Object.defineProperty,f=(t,e,i)=>{var n;return n=i,(e="symbol"!=typeof e?e+"":e)in(t=t)?c(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,i},J=(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))(J||{});function D(t){var e=null==t?void 0:t.host;return Boolean((null==e?void 0:e.shadowRoot)===t)}function F(t){return"[object ShadowRoot]"===Object.prototype.toString.call(t)}function X(t){try{var e=t.rules||t.cssRules;return e?i=(i=Array.from(e,m).join("")).includes(" background-clip: text;")&&!i.includes(" -webkit-background-clip: text;")?i.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;"):i:null}catch(t){return null}var i}function m(t){let e;if("styleSheet"in t)try{e=X(t.styleSheet)||((n=(i=t).cssText).split('"').length<3?n:(n=["@import",`url(${JSON.stringify(i.href)})`],""===i.layerName?n.push("layer"):i.layerName&&n.push(`layer(${i.layerName})`),i.supportsText&&n.push(`supports(${i.supportsText})`),i.media.length&&n.push(i.media.mediaText),n.join(" ")+";"))}catch(t){}else if("selectorText"in t&&t.selectorText.includes(":"))return t.cssText.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2");var i,n;return e||t.cssText}class ct{constructor(){f(this,"idNodeMap",new Map),f(this,"nodeMetaMap",new WeakMap)}getId(t){return t?(null==(t=this.getMeta(t))?void 0:t.id)??-1:-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);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){var i=e.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,e)}replace(t,e){var i=this.getNode(t);i&&(i=this.nodeMetaMap.get(i))&&this.nodeMetaMap.set(e,i),this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function ht({element:t,maskInputOptions:e,tagName:i,type:n,value:s,maskInputFn:r}){let o=s||"";s=n&&H(n);return o=e[i.toLowerCase()]||s&&e[s]?r?r(o,t):"*".repeat(o.length):o}function H(t){return t.toLowerCase()}const dt="__rrweb_original__";function vt(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?H(e):null}function V(t,e){let i;try{i=new URL(t,e??window.location.href)}catch(t){return null}t=i.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==t?void 0:t[1])??null}let Z=1;const ft=new RegExp("[^a-z0-9-_:]"),N=-2;function p(){return Z++}let $,mt;const g=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,b=/^(?:[a-z+]+:)?\/\//i,y=/^www\..*/i,I=/^(data:)([^,]*),(.*)/i;function q(t,l){return(t||"").replace(g,(t,e,i,n,s,r)=>{i=i||s||r,s=e||n||"";if(!i)return t;if(b.test(i)||y.test(i))return`url(${s}${i}${s})`;if(I.test(i))return`url(${s}${i}${s})`;if("/"===i[0])return`url(${s}${function(t){let e="";return e=(e=-1<t.indexOf("//")?t.split("/").slice(0,3).join("/"):t.split("/")[0]).split("?")[0]}(l)+i}${s})`;var o=l.split("/"),r=i.split("/");o.pop();for(const a of r)"."!==a&&(".."===a?o.pop():o.push(a));return`url(${s}${o.join("/")}${s})`})}const _=/^[^ \t\n\r\u000c]+/,C=/^[, \t\n\r\u000c]+/;function w(n,s){if(""===s.trim())return s;let r=0;function t(t){var t=t.exec(s.substring(r));return t?(t=t[0],r+=t.length,t):""}for(var o=[];t(C),!(r>=s.length);){let i=t(_);if(","===i.slice(-1))i=l(n,i.substring(0,i.length-1)),o.push(i);else{let t="",e=(i=l(n,i),!1);for(;;){var a=s.charAt(r);if(""===a){o.push((i+t).trim());break}if(e)")"===a&&(e=!1);else{if(","===a){r+=1,o.push((i+t).trim());break}"("===a&&(e=!0)}t+=a,r+=1}}}return o.join(", ")}const S=new WeakMap;function l(t,e){return e&&""!==e.trim()?Q(t,e):e}function Q(t,e){let i=S.get(t);if(i||(i=t.createElement("a"),S.set(t,i)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return i.setAttribute("href",e),i.href}function pt(t,e,i,n){return n&&("src"!==i&&("href"!==i||"use"===e&&"#"===n[0])&&("xlink:href"!==i||"#"===n[0])&&("background"!==i||"table"!==e&&"td"!==e&&"th"!==e)?"srcset"===i?w(t,n):"style"===i?q(n,Q(t)):"object"===e&&"data"===i?l(t,n):n:l(t,n))}function gt(t,e){return("video"===t||"audio"===t)&&"autoplay"===e}function r(e,i,t){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!t&&r(e.parentNode,i,t);for(let t=e.classList.length;t--;){var n=e.classList[t];if(i.test(n))return!0}return!!t&&r(e.parentNode,i,t)}function K(t,e,i,n){try{var s=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(null===s)return!1;if("string"==typeof e){if(n){if(s.closest("."+e))return!0}else if(s.classList.contains(e))return!0}else if(r(s,e,n))return!0;if(i)if(n){if(s.closest(i))return!0}else if(s.matches(i))return!0}catch(t){}return!1}function bt(i,t){var e,n,s,r,{doc:o,mirror:t,blockClass:a,blockSelector:l,needsMask:u,inlineStylesheet:N,maskInputOptions:L={},maskTextFn:G,maskInputFn:U,dataURLOptions:W={},inlineImages:P,recordCanvas:B,keepIframeSrcFn:Y,newlyAddedElement:z=!1}=t,c=(e=o,!(t=t).hasNode(e)||1===(t=t.getId(e))?void 0:t);switch(i.nodeType){case i.DOCUMENT_NODE:return"CSS1Compat"!==i.compatMode?{type:J.Document,childNodes:[],compatMode:i.compatMode}:{type:J.Document,childNodes:[]};case i.DOCUMENT_TYPE_NODE:return{type:J.DocumentType,name:i.name,publicId:i.publicId,systemId:i.systemId,rootId:c};case i.ELEMENT_NODE:{var h=i;var d={doc:o,blockClass:a,blockSelector:l,inlineStylesheet:N,maskInputOptions:L,maskInputFn:U,dataURLOptions:W,inlineImages:P,recordCanvas:B,keepIframeSrcFn:Y,newlyAddedElement:z,rootId:c};const{doc:b,blockClass:y,blockSelector:I,inlineStylesheet:_,maskInputOptions:C={},maskInputFn:w,dataURLOptions:S={},inlineImages:k,recordCanvas:O,keepIframeSrcFn:A,newlyAddedElement:M=!1,rootId:j}=d,T=function(e,i,t){try{if("string"==typeof i){if(e.classList.contains(i))return!0}else for(let t=e.classList.length;t--;){var n=e.classList[t];if(i.test(n))return!0}if(t)return e.matches(t)}catch(t){}return!1}(h,y,I),x=function(t){return t instanceof HTMLFormElement?"form":(t=H(t.tagName),ft.test(t)?"div":t)}(h);let e={};var V=h.attributes.length;for(let t=0;t<V;t++){var v=h.attributes[t];gt(x,v.name,v.value)||(e[v.name]=pt(b,x,H(v.name),v.value))}if("link"===x&&_){d=Array.from(b.styleSheets).find(t=>t.href===h.href);let t=null;(t=d?X(d):t)&&(delete e.rel,delete e.href,e.ws=q(t,d.href))}"style"===x&&h.sheet&&!(h.innerText||h.textContent||"").trim().length&&(d=X(h.sheet))&&(e.ws=q(d,Q(b)));"input"!==x&&"textarea"!==x&&"select"!==x||(d=h.value,n=h.checked,"radio"!==e.type&&"checkbox"!==e.type&&"submit"!==e.type&&"button"!==e.type&&d?e.value=ht({element:h,type:vt(h),tagName:x,value:d,maskInputOptions:C,maskInputFn:w}):n&&(e.checked=n));"option"===x&&(h.selected&&!C.select?e.selected=!0:delete e.selected);"canvas"===x&&O&&("2d"===h.__context?function(i){var n=i.getContext("2d");if(n)for(let e=0;e<i.width;e+=50)for(let t=0;t<i.height;t+=50){var s=n.getImageData,s=dt in s?s[dt]:s;if(new Uint32Array(s.call(n,e,t,Math.min(50,i.width-e),Math.min(50,i.height-t)).data.buffer).some(t=>0!==t))return}return 1}(h)||(e.rr_dataURL=h.toDataURL(S.type,S.quality)):"__context"in h||(d=h.toDataURL(S.type,S.quality),(n=b.createElement("canvas")).width=h.width,n.height=h.height,s=n.toDataURL(S.type,S.quality),d!==s&&(e.rr_dataURL=d)));if("img"===x&&k){$||($=b.createElement("canvas"),mt=$.getContext("2d"));const E=h,R=E.currentSrc||E.getAttribute("src")||"<unknown-src>",D=E.crossOrigin,F=()=>{E.removeEventListener("load",F);try{$.width=E.naturalWidth,$.height=E.naturalHeight,mt.drawImage(E,0,0),e.rr_dataURL=$.toDataURL(S.type,S.quality)}catch(t){if("anonymous"!==E.crossOrigin)return E.crossOrigin="anonymous",void(E.complete&&0!==E.naturalWidth?F():E.addEventListener("load",F));console.warn(`Cannot inline img src=${R}! Error: `+t)}"anonymous"===E.crossOrigin&&(D?e.crossOrigin=D:E.removeAttribute("crossorigin"))};E.complete&&0!==E.naturalWidth?F():E.addEventListener("load",F)}"audio"!==x&&"video"!==x||((s=e).rr_mediaState=h.paused?"paused":"played",s.rr_mediaCurrentTime=h.currentTime,s.rr_mediaPlaybackRate=h.playbackRate,s.rr_mediaMuted=h.muted,s.rr_mediaLoop=h.loop,s.rr_mediaVolume=h.volume);M||(h.scrollLeft&&(e.rr_scrollLeft=h.scrollLeft),h.scrollTop&&(e.rr_scrollTop=h.scrollTop));T&&({width:d,height:f}=h.getBoundingClientRect(),e={class:e.class,rr_width:d+"px",rr_height:f+"px"});"iframe"!==x||A(e.src)||(h.contentDocument||(e.rr_src=e.src),delete e.src);let t;try{customElements.get(x)&&(t=!0)}catch(t){}return{type:J.Element,tagName:x,attributes:e,childNodes:[],isSVG:function(t){return Boolean("svg"===t.tagName||t.ownerSVGElement)}(h)||void 0,needBlock:T,rootId:j,isCustom:t};return}case i.TEXT_NODE:{d=i;var f={doc:o,needsMask:u,maskTextFn:G,rootId:c};var{needsMask:Z,maskTextFn:m,rootId:K}=f,p=d.parentNode&&d.parentNode.tagName;let t=d.textContent;var g="STYLE"===p||void 0,p="SCRIPT"===p||void 0;if(g&&t){try{d.nextSibling||d.previousSibling||null!=(r=d.parentNode.sheet)&&r.cssRules&&(t=X(d.parentNode.sheet))}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: "+t,d)}t=q(t,Q(f.doc))}p&&(t="SCRIPT_PLACEHOLDER");!g&&!p&&t&&Z&&(t=m?m(t,d.parentElement):t.replace(/[\S]/g,"*"));return{type:J.Text,textContent:t||"",isStyle:g,rootId:K};return}case i.CDATA_SECTION_NODE:return{type:J.CDATA,textContent:"",rootId:c};case i.COMMENT_NODE:return{type:J.Comment,textContent:i.textContent||"",rootId:c};default:return!1}}function L(t){return null==t?"":t.toLowerCase()}function tt(e,t){const{doc:i,mirror:n,blockClass:s,blockSelector:r,maskTextClass:o,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:d,slimDOMOptions:v,dataURLOptions:f={},inlineImages:m=!1,recordCanvas:p=!1,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:y=5e3,onStylesheetLoad:I,stylesheetLoadTimeout:_=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:w=!1}=t;let S=t["needsMask"],{preserveWhiteSpace:k=!0}=t;!S&&e.childNodes&&(t=void 0===S,S=K(e,o,a,t));t=bt(e,{doc:i,mirror:n,blockClass:s,blockSelector:r,needsMask:S,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:d,dataURLOptions:f,inlineImages:m,recordCanvas:p,keepIframeSrcFn:C,newlyAddedElement:w});if(!t)return console.warn(e,"not serialized"),null;let O;O=n.hasNode(e)?n.getId(e):!function(t,e){if(e.comment&&t.type===J.Comment)return 1;if(t.type===J.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===V(t.attributes.href)))return 1;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(L(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===L(t.attributes.name)||"icon"===L(t.attributes.rel)||"apple-touch-icon"===L(t.attributes.rel)||"shortcut icon"===L(t.attributes.rel))))return 1;if("meta"===t.tagName){if(e.headMetaDescKeywords&&L(t.attributes.name).match(/^description|keywords$/))return 1;if(e.headMetaSocial&&(L(t.attributes.property).match(/^(og|twitter|fb):/)||L(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===L(t.attributes.name)))return 1;if(e.headMetaRobots&&("robots"===L(t.attributes.name)||"googlebot"===L(t.attributes.name)||"bingbot"===L(t.attributes.name)))return 1;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return 1;if(e.headMetaAuthorship&&("author"===L(t.attributes.name)||"generator"===L(t.attributes.name)||"framework"===L(t.attributes.name)||"publisher"===L(t.attributes.name)||"progid"===L(t.attributes.name)||L(t.attributes.property).match(/^article:/)||L(t.attributes.property).match(/^product:/)))return 1;if(e.headMetaVerification&&("google-site-verification"===L(t.attributes.name)||"yandex-verification"===L(t.attributes.name)||"csrf-token"===L(t.attributes.name)||"p:domain_verify"===L(t.attributes.name)||"verify-v1"===L(t.attributes.name)||"verification"===L(t.attributes.name)||"shopify-checkout-api-token"===L(t.attributes.name)))return 1}}}(t,v)&&(k||t.type!==J.Text||t.isStyle||t.textContent.replace(/^\s+|\s+$/gm,"").length)?Z++:N;var A=Object.assign(t,{id:O});if(n.add(e,A),O===N)return null;g&&g(e);let M=!l;if(A.type===J.Element&&(M=M&&!A.needBlock,delete A.needBlock,t=e.shadowRoot)&&F(t)&&(A.isShadowHost=!0),(A.type===J.Document||A.type===J.Element)&&M){v.headWhitespace&&A.type===J.Element&&"head"===A.tagName&&(k=!1);var j={doc:i,mirror:n,blockClass:s,blockSelector:r,needsMask:S,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:d,slimDOMOptions:v,dataURLOptions:f,inlineImages:m,recordCanvas:p,preserveWhiteSpace:k,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:I,stylesheetLoadTimeout:_,keepIframeSrcFn:C};if(A.type!==J.Element||"textarea"!==A.tagName||void 0===A.attributes.value)for(const E of Array.from(e.childNodes)){var T=tt(E,j);T&&A.childNodes.push(T)}if(e.nodeType===e.ELEMENT_NODE&&e.shadowRoot)for(const R of Array.from(e.shadowRoot.childNodes)){var x=tt(R,j);x&&(F(e.shadowRoot)&&(x.isShadow=!0),A.childNodes.push(x))}}return e.parentNode&&D(e.parentNode)&&F(e.parentNode)&&(A.isShadow=!0),A.type===J.Element&&"iframe"===A.tagName&&function(i,n,s){var r=i.contentWindow;if(r){let t=!1,e;try{e=r.document.readyState}catch(t){return}if("complete"!==e){const o=setTimeout(()=>{t||(n(),t=!0)},s);void i.addEventListener("load",()=>{clearTimeout(o),t=!0,n()})}else{s="about:blank";if(r.location.href!==s||i.src===s||""===i.src)return setTimeout(n,0),i.addEventListener("load",n);i.addEventListener("load",n)}}}(e,()=>{var t=e.contentDocument;t&&b&&(t=tt(t,{doc:t,mirror:n,blockClass:s,blockSelector:r,needsMask:S,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:d,slimDOMOptions:v,dataURLOptions:f,inlineImages:m,recordCanvas:p,preserveWhiteSpace:k,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:I,stylesheetLoadTimeout:_,keepIframeSrcFn:C}))&&b(e,t)},y),A.type===J.Element&&"link"===A.tagName&&"string"==typeof A.attributes.rel&&("stylesheet"===A.attributes.rel||"preload"===A.attributes.rel&&"string"==typeof A.attributes.href&&"css"===V(A.attributes.href))&&function(t,e,i){let n=!1,s;try{s=t.sheet}catch(t){return}if(!s){const r=setTimeout(()=>{n||(e(),n=!0)},i);t.addEventListener("load",()=>{clearTimeout(r),n=!0,e()})}}(e,()=>{var t;I&&(t=tt(e,{doc:i,mirror:n,blockClass:s,blockSelector:r,needsMask:S,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:d,slimDOMOptions:v,dataURLOptions:f,inlineImages:m,recordCanvas:p,preserveWhiteSpace:k,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:I,stylesheetLoadTimeout:_,keepIframeSrcFn:C}))&&I(e,t)},_),A}function et(t,e,i=document){const n={capture:!0,passive:!0};return i.addEventListener(t,e,n),()=>i.removeEventListener(t,e,n)}const n="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.";var k={map:{},getId(){return console.error(n),-1},getNode(){return console.error(n),null},removeNodeFromMap(){console.error(n)},has(){return console.error(n),!1},reset(){console.error(n)}};function G(s,r,o={}){let a=null,l=0;return function(...t){var e=Date.now(),i=(l||!1!==o.leading||(l=e),r-(e-l));const n=this;i<=0||r<i?(a&&(clearTimeout(a),a=null),l=e,s.apply(n,t)):a||!1===o.trailing||(a=setTimeout(()=>{l=!1===o.leading?0:Date.now(),a=null,s.apply(n,t)},i))}}function U(t,e,i,n,s=window){const r=s.Object.getOwnPropertyDescriptor(t,e);return s.Object.defineProperty(t,e,n?i:{set(t){setTimeout(()=>{i.set.call(this,t)},0),r&&r.set&&r.set.call(this,t)}}),()=>U(t,e,r||{},!0)}function W(t,e,i){try{if(!(e in t))return()=>{};const s=t[e];var n=i(s);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:s}})),t[e]=n,()=>{t[e]=s}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&new Proxy(k,{get(t,e,i){return"map"===e&&console.error(n),Reflect.get(t,e,i)}});let it=Date.now;function yt(t){var e,i=t.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:(null==i?void 0:i.documentElement.scrollLeft)||(null==(e=null==(e=null==i?void 0:i.body)?void 0:e.parentElement)?void 0:e.scrollLeft)||(null==(e=null==i?void 0:i.body)?void 0:e.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==(t=null==(e=null==i?void 0:i.body)?void 0:e.parentElement)?void 0:t.scrollTop)||(null==(e=null==i?void 0:i.body)?void 0:e.scrollTop)||0}}function It(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function _t(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function O(t){return t?t.nodeType===t.ELEMENT_NODE?t:t.parentElement:null}function P(t,e,i,n){if(t){t=O(t);if(t){try{if("string"==typeof e){if(t.classList.contains(e))return!0;if(n&&null!==t.closest("."+e))return!0}else if(r(t,e,n))return!0}catch(t){}if(i){if(t.matches(i))return!0;if(n&&null!==t.closest(i))return!0}}}return!1}function A(t,e,i){return"TITLE"===t.tagName&&i.headTitleMutations||e.getId(t)===N}function Ct(t){return Boolean(t.changedTouches)}function wt(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function St(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function kt(t){return Boolean(null==t?void 0:t.shadowRoot)}/[1-9][0-9]{12}/.test(Date.now().toString())||(it=()=>(new Date).getTime());class M{constructor(){a(this,"id",1),a(this,"styleIDMap",new WeakMap),a(this,"idStyleMap",new Map)}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,e){if(this.has(t))return this.getId(t);let i;return i=void 0===e?this.id++:e,this.styleIDMap.set(t,i),this.idStyleMap.set(i,t),i}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 j(t){var e;let i=null;return i=(null==(e=null==(e=t.getRootNode)?void 0:e.call(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&t.getRootNode().host?t.getRootNode().host:i}function T(t){var e=t.ownerDocument;return!!e&&(t=function(t){let e=t;for(var i;i=j(e);)e=i;return e}(t),e.contains(t))}function x(t){var e=t.ownerDocument;return e&&(e.contains(t)||T(t))}var nt=(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))({}),st=(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))(st||{}),h=(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))(h||{}),d=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(d||{}),v=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))({}),B=(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))(B||{});function E(t){return"__ln"in t}class R{constructor(){a(this,"length",0),a(this,"head",null),a(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let i=this.head;for(let t=0;t<e;t++)i=(null==i?void 0:i.next)||null;return i}addNode(t){var e,i={value:t,previous:null,next:null};t.__ln=i,t.previousSibling&&E(t.previousSibling)?(e=t.previousSibling.__ln.next,i.next=e,i.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=i,e&&(e.previous=i)):t.nextSibling&&E(t.nextSibling)&&t.nextSibling.__ln.previous?(e=t.nextSibling.__ln.previous,i.previous=e,i.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=i,e&&(e.next=i)):(this.head&&(this.head.previous=i),i.next=this.head,this.head=i),null===i.next&&(this.tail=i),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--)}}class Ot{constructor(){a(this,"frozen",!1),a(this,"locked",!1),a(this,"texts",[]),a(this,"attributes",[]),a(this,"attributeMap",new WeakMap),a(this,"removes",[]),a(this,"mapRemoves",[]),a(this,"movedMap",{}),a(this,"addedSet",new Set),a(this,"movedSet",new Set),a(this,"droppedSet",new Set),a(this,"mutationCb"),a(this,"blockClass"),a(this,"blockSelector"),a(this,"maskTextClass"),a(this,"maskTextSelector"),a(this,"inlineStylesheet"),a(this,"maskInputOptions"),a(this,"maskTextFn"),a(this,"maskInputFn"),a(this,"keepIframeSrcFn"),a(this,"recordCanvas"),a(this,"inlineImages"),a(this,"slimDOMOptions"),a(this,"dataURLOptions"),a(this,"doc"),a(this,"mirror"),a(this,"iframeManager"),a(this,"stylesheetManager"),a(this,"shadowDomManager"),a(this,"canvasManager"),a(this,"processedNodeManager"),a(this,"unattachedDoc"),a(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),a(this,"emit",()=>{if(!this.frozen&&!this.locked){const l=[],u=new Set,c=new R,h=t=>{let e=t,i=N;for(;i===N;)e=e&&e.nextSibling,i=e&&this.mirror.getId(e);return i};for(var i,n,s=e=>{var t,i,n;if(e.parentNode&&x(e)&&"TEXTAREA"!==e.parentNode.tagName)return t=D(e.parentNode)?this.mirror.getId(j(e)):this.mirror.getId(e.parentNode),i=h(e),-1===t||-1===i?c.addNode(e):void((n=tt(e,{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=>{wt(t,this.mirror)&&this.iframeManager.addIframe(t),St(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),kt(e)&&this.shadowDomManager.addShadowRoot(e.shadowRoot,this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)}}))&&(l.push({parentId:t,nextId:i,node:n}),u.add(n.id)))};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const d of this.movedSet)Mt(this.removes,d,this.mirror)&&!this.movedSet.has(d.parentNode)||s(d);for(const v of this.addedSet)!jt(this.droppedSet,v)&&!Mt(this.removes,v,this.mirror)||jt(this.movedSet,v)?s(v):this.droppedSet.add(v);let t=null;for(;c.length;){let e=null;if(!(e=t&&(i=this.mirror.getId(t.value.parentNode),n=h(t.value),-1!==i)&&-1!==n?t:e)){let t=c.tail;for(;t;){var r=t;if(t=t.previous,r){var o=this.mirror.getId(r.value.parentNode),a=h(r.value);if(-1!==a){if(-1!==o){e=r;break}a=r.value;if(a.parentNode&&a.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){o=a.parentNode.host;if(-1!==this.mirror.getId(o)){e=r;break}}}}}}if(!e){for(;c.head;)c.removeNode(c.head.value);break}t=e.previous,c.removeNode(e.value),s(e.value)}var e={texts:this.texts.map(t=>{var e=t.node;return e.parentNode&&"TEXTAREA"===e.parentNode.tagName&&this.genTextAreaValueMutation(e.parentNode),{id:this.mirror.getId(e),value:t.value}}).filter(t=>!u.has(t.id)).filter(t=>this.mirror.has(t.id)),attributes:this.attributes.map(t=>{var e,i,n=t["attributes"];return"string"==typeof n.style&&(e=JSON.stringify(t.styleDiff),i=JSON.stringify(t.Es),e.length<n.style.length)&&(e+i).split("var(").length===n.style.split("var(").length&&(n.style=t.styleDiff),{id:this.mirror.getId(t.node),attributes:n}}).filter(t=>!u.has(t.id)).filter(t=>this.mirror.has(t.id)),removes:this.removes,adds:l};(e.texts.length||e.attributes.length||e.removes.length||e.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(e))}}),a(this,"genTextAreaValueMutation",t=>{let e=this.attributeMap.get(t);e||(e={node:t,attributes:{},styleDiff:{},Es:{}},this.attributes.push(e),this.attributeMap.set(t,e)),e.attributes.value=Array.from(t.childNodes,t=>t.textContent||"").join("")}),a(this,"processMutation",n=>{if(!A(n.target,this.mirror,this.slimDOMOptions))switch(n.type){case"characterData":var s=n.target.textContent;P(n.target,this.blockClass,this.blockSelector,!1)||s===n.oldValue||this.texts.push({value:K(n.target,this.maskTextClass,this.maskTextSelector,!0)&&s?this.maskTextFn?this.maskTextFn(s,O(n.target)):s.replace(/[\S]/g,"*"):s,node:n.target});break;case"attributes":{var r=n.target;let t=n.attributeName,e=n.target.getAttribute(t);if("value"===t&&(s=vt(r),e=ht({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:s,value:e,maskInputFn:this.maskInputFn})),P(n.target,this.blockClass,this.blockSelector,!1)||e===n.oldValue)return;let i=this.attributeMap.get(n.target);if("IFRAME"===r.tagName&&"src"===t&&!this.keepIframeSrcFn(e)){if(r.contentDocument)return;t="rr_src"}if(i||(i={node:n.target,attributes:{},styleDiff:{},Es:{}},this.attributes.push(i),this.attributeMap.set(n.target,i)),"type"===t&&"INPUT"===r.tagName&&"password"===(n.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!gt(r.tagName,t)&&(i.attributes[t]=pt(this.doc,H(r.tagName),H(t),e),"style"===t)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}var o=this.unattachedDoc.createElement("span");n.oldValue&&o.setAttribute("style",n.oldValue);for(const u of Array.from(r.style)){var a=r.style.getPropertyValue(u),l=r.style.getPropertyPriority(u);a!==o.style.getPropertyValue(u)||l!==o.style.getPropertyPriority(u)?i.styleDiff[u]=""===l?a:[a,l]:i.Es[u]=[a,l]}for(const c of Array.from(o.style))""===r.style.getPropertyValue(c)&&(i.styleDiff[c]=!1)}break}case"childList":P(n.target,this.blockClass,this.blockSelector,!0)||("TEXTAREA"!==n.target.tagName?(n.addedNodes.forEach(t=>this.genAdds(t,n.target)),n.removedNodes.forEach(t=>{var e=this.mirror.getId(t),i=D(n.target)?this.mirror.getId(n.target.host):this.mirror.getId(n.target);P(n.target,this.blockClass,this.blockSelector,!1)||A(t,this.mirror,this.slimDOMOptions)||-1===this.mirror.getId(t)||(this.addedSet.has(t)?(At(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(n.target)&&-1===e||function t(e,i){var n;return!D(e)&&(n=i.getId(e),!i.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||t(e.parentNode,i)))}(n.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[e+"@"+i]?At(this.movedSet,t):this.removes.push({parentId:i,id:e,isShadow:!(!D(n.target)||!F(n.target))||void 0})),this.mapRemoves.push(t))})):this.genTextAreaValueMutation(n.target))}}),a(this,"genAdds",(e,i)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(A(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let t=null;(t=i&&this.mirror.hasNode(i)?this.mirror.getId(i):t)&&-1!==t&&(this.movedMap[this.mirror.getId(e)+"@"+t]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);P(e,this.blockClass,this.blockSelector,!1)||(e.childNodes.forEach(t=>this.genAdds(t)),kt(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function At(e,t){e.delete(t),t.childNodes.forEach(t=>At(e,t))}function Mt(e,i,n){if(0!==e.length){var s=e;e=i;var r=n;let t=e.parentNode;for(;t;){const o=r.getId(t);if(s.some(t=>t.id===o))return 1;t=t.parentNode}}}function jt(t,e){return 0!==t.size&&function t(e,i){const n=i["parentNode"];if(!n)return!1;if(e.has(n))return!0;return t(e,n)}(t,e)}let rt;const ot=e=>{return rt?(...t)=>{try{return e(...t)}catch(t){if(!rt||!0!==rt(t))throw t}}:e},at=[];function Y(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{}return t&&t.target}function Tt(t,e){var i=new Ot;at.push(i),i.init(t);let n=window.MutationObserver||window.__rrMutationObserver;var s=null==(s=null==(t=null==window?void 0:window.Zone)?void 0:t.__symbol__)?void 0:s.call(t,"MutationObserver"),t=new(n=s&&window[s]?window[s]:n)(ot(i.processMutations.bind(i)));return t.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),t}function xt({mouseInteractionCb:o,doc:n,mirror:a,blockClass:l,blockSelector:u,sampling:t}){if(!1===t.mouseInteraction)return()=>{};const e=!0===t.mouseInteraction||void 0===t.mouseInteraction?{}:t.mouseInteraction,s=[];let c=null;return Object.keys(h).filter(t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==e[t]).forEach(t=>{let e=H(t);r=t;var r,i=i=>{var n=Y(i);if(!P(n,l,u,!0)){let t=null,e=r;if("pointerType"in i){switch(i.pointerType){case"mouse":t=d.Mouse;break;case"touch":t=d.Touch;break;case"pen":t=d.Pen}t===d.Touch?h[r]===h.MouseDown?e="TouchStart":h[r]===h.MouseUp&&(e="TouchEnd"):(t,d.Pen)}else Ct(i)&&(t=d.Touch);null!==t?(c=t,(e.startsWith("Touch")&&t===d.Touch||e.startsWith("Mouse")&&t===d.Mouse)&&(t=null)):h[r]===h.Click&&(t=c,c=null);var s,i=Ct(i)?i.changedTouches[0]:i;i&&(n=a.getId(n),{clientX:i,clientY:s}=i,ot(o)({type:h[e],id:n,x:i,y:s,...null!==t&&{pointerType:t}}))}};if(window.PointerEvent)switch(h[t]){case h.MouseDown:case h.MouseUp:e=e.replace("mouse","pointer");break;case h.TouchStart:case h.TouchEnd:return}s.push(et(e,i,n))}),ot(()=>{s.forEach(t=>t())})}function Et({scrollCb:n,doc:s,mirror:r,blockClass:o,blockSelector:a,sampling:t}){return et("scroll",ot(G(ot(t=>{var e,i,t=Y(t);t&&!P(t,o,a,!0)&&(e=r.getId(t),t===s&&s.defaultView?(i=yt(s.defaultView),n({id:e,x:i.left,y:i.top})):n({id:e,x:t.scrollLeft,y:t.scrollTop}))}),t.scroll||100)),s)}const Rt=["INPUT","TEXTAREA","SELECT"],Dt=new WeakMap;function Ft(t){var e,i;return t=t,e=[],Gt("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||Gt("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||Gt("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||Gt("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule?(i=Array.from(t.parentRule.cssRules).indexOf(t),e.unshift(i)):t.parentStyleSheet&&(i=Array.from(t.parentStyleSheet.cssRules).indexOf(t),e.unshift(i)),e}function z(t,e,i){let n,s;return t?(t.ownerNode?n=e.getId(t.ownerNode):s=i.getId(t),{styleId:s,id:n}):{}}function Nt({mirror:t,stylesheetManager:i},e){let n=null;n="#document"===e.nodeName?t.getId(e):t.getId(e.host);t="#document"===e.nodeName?null==(t=e.defaultView)?void 0:t.Document:null==(t=null==(t=e.ownerDocument)?void 0:t.defaultView)?void 0:t.ShadowRoot;const s=null!=t&&t.prototype?Object.getOwnPropertyDescriptor(null==t?void 0:t.prototype,"adoptedStyleSheets"):void 0;return null!==n&&-1!==n&&t&&s?(Object.defineProperty(e,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){var t;return null==(t=s.get)?void 0:t.call(this)},set(t){var e=null==(e=s.set)?void 0:e.call(this,t);if(null!==n&&-1!==n)try{i.adoptStyleSheets(t,n)}catch(t){}return e}}),ot(()=>{Object.defineProperty(e,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})})):()=>{}}function Lt(t,e={}){var s,i=t.doc.defaultView;if(!i)return()=>{};{var n=t,r=e;const{mutationCb:I,mousemoveCb:_,mouseInteractionCb:C,scrollCb:w,viewportResizeCb:S,inputCb:k,mediaInteractionCb:O,styleSheetRuleCb:A,styleDeclarationCb:M,canvasMutationCb:j,fontCb:T,selectionCb:x,customElementCb:E}=n;n.mutationCb=(...t)=>{r.mutation&&r.mutation(...t),I(...t)},n.mousemoveCb=(...t)=>{r.mousemove&&r.mousemove(...t),_(...t)},n.mouseInteractionCb=(...t)=>{r.mouseInteraction&&r.mouseInteraction(...t),C(...t)},n.scrollCb=(...t)=>{r.scroll&&r.scroll(...t),w(...t)},n.viewportResizeCb=(...t)=>{r.viewportResize&&r.viewportResize(...t),S(...t)},n.inputCb=(...t)=>{r.input&&r.input(...t),k(...t)},n.mediaInteractionCb=(...t)=>{r.mediaInteaction&&r.mediaInteaction(...t),O(...t)},n.styleSheetRuleCb=(...t)=>{r.styleSheetRule&&r.styleSheetRule(...t),A(...t)},n.styleDeclarationCb=(...t)=>{r.styleDeclaration&&r.styleDeclaration(...t),M(...t)},n.canvasMutationCb=(...t)=>{r.canvasMutation&&r.canvasMutation(...t),j(...t)},n.fontCb=(...t)=>{r.font&&r.font(...t),T(...t)},n.selectionCb=(...t)=>{r.selection&&r.selection(...t),x(...t)},n.customElementCb=(...t)=>{r.customElement&&r.customElement(...t),E(...t)}}let o;t.recordDOM&&(o=Tt(t,t.doc));const a=function({mousemoveCb:i,sampling:t,doc:e,mirror:s}){if(!1===t.mousemove)return()=>{};var n="number"==typeof t.mousemove?t.mousemove:50,t="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let r=[],o;const a=G(ot(t=>{const e=Date.now()-o;i(r.map(t=>(t.timeOffset-=e,t)),t),r=[],o=null}),t),l=[et("mousemove",t=ot(G(ot(t=>{var e=Y(t),{clientX:i,clientY:n}=Ct(t)?t.changedTouches[0]:t;o=o||it(),r.push({x:i,y:n,id:s.getId(e),timeOffset:it()-o}),a("undefined"!=typeof DragEvent&&t instanceof DragEvent?st.Drag:t instanceof MouseEvent?st.MouseMove:st.TouchMove)}),n,{trailing:!1})),e),et("touchmove",t,e),et("drag",t,e)];return ot(()=>{l.forEach(t=>t())})}(t),l=xt(t),u=Et(t),c=function({viewportResizeCb:i},{win:t}){let n=-1,s=-1;return et("resize",ot(G(ot(()=>{var t=It(),e=_t();n===t&&s===e||(i({width:Number(e),height:Number(t)}),n=t,s=e)}),200)),t)}(t,{win:i}),h=function({inputCb:n,doc:o,mirror:s,blockClass:t,blockSelector:i,ignoreClass:a,ignoreSelector:l,maskInputOptions:u,maskInputFn:c,sampling:e,userTriggeredOnInput:h}){function r(e){let n=Y(e);var e=e.isTrusted,s=n&&n.tagName;if((n=n&&"OPTION"===s?n.parentElement:n)&&s&&!(Rt.indexOf(s)<0)&&!P(n,t,i,!0)&&!(n.classList.contains(a)||l&&n.matches(l))){let t=n.value,i=!1;var r=vt(n)||"",s=("radio"===r||"checkbox"===r?i=n.checked:(u[s.toLowerCase()]||u[r])&&(t=ht({element:n,maskInputOptions:u,tagName:s,type:r,value:t,maskInputFn:c})),d(n,h?{text:t,isChecked:i,userTriggered:e}:{text:t,isChecked:i}),n.name);"radio"===r&&s&&i&&o.querySelectorAll(`input[type="radio"][name="${s}"]`).forEach(t=>{var e;t!==n&&(e=t.value,d(t,h?{text:e,isChecked:!i,userTriggered:!1}:{text:e,isChecked:!i}))})}}function d(t,e){var i=Dt.get(t);i&&i.text===e.text&&i.isChecked===e.isChecked||(Dt.set(t,e),i=s.getId(t),ot(n)({...e,id:i}))}var v;const f=("last"===e.input?["change"]:["input","change"]).map(t=>et(t,ot(r),o)),m=o.defaultView;return m?(e=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),v=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]],e&&e.set&&f.push(...v.map(t=>U(t[0],t[1],{set(){ot(r)({target:this,isTrusted:!1})}},!1,m))),ot(()=>{f.forEach(t=>t())})):()=>{f.forEach(t=>t())}}(t),d=function({mediaInteractionCb:a,blockClass:l,blockSelector:u,mirror:c,sampling:t,doc:e}){var i=ot(o=>G(ot(t=>{var e,i,n,s,r,t=Y(t);t&&!P(t,l,u,!0)&&({currentTime:e,volume:i,muted:n,playbackRate:s,loop:r}=t,a({type:o,id:c.getId(t),currentTime:e,volume:i,muted:n,playbackRate:s,loop:r}))}),t.media||500));const n=[et("play",i(B.Play),e),et("pause",i(B.Pause),e),et("seeked",i(B.Seeked),e),et("volumechange",i(B.VolumeChange),e),et("ratechange",i(B.RateChange),e)];return ot(()=>{n.forEach(t=>t())})}(t);let v=()=>{},f=()=>{},m=()=>{},p=()=>{};t.recordDOM&&(v=function({styleSheetRuleCb:a,mirror:l,stylesheetManager:u},{win:t}){if(!t.CSSStyleSheet||!t.CSSStyleSheet.prototype)return()=>{};const e=t.CSSStyleSheet.prototype.insertRule,i=(t.CSSStyleSheet.prototype.insertRule=new Proxy(e,{apply:ot((t,e,i)=>{var[n,s]=i,{id:r,styleId:o}=z(e,l,u.styleMirror);return(r&&-1!==r||o&&-1!==o)&&a({id:r,styleId:o,adds:[{rule:n,index:s}]}),t.apply(e,i)})}),t.CSSStyleSheet.prototype.deleteRule);t.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:ot((t,e,i)=>{var[n]=i,{id:s,styleId:r}=z(e,l,u.styleMirror);return(s&&-1!==s||r&&-1!==r)&&a({id:s,styleId:r,removes:[{index:n}]}),t.apply(e,i)})});let n;t.CSSStyleSheet.prototype.replace&&(n=t.CSSStyleSheet.prototype.replace,t.CSSStyleSheet.prototype.replace=new Proxy(n,{apply:ot((t,e,i)=>{var[n]=i,{id:s,styleId:r}=z(e,l,u.styleMirror);return(s&&-1!==s||r&&-1!==r)&&a({id:s,styleId:r,replace:n}),t.apply(e,i)})}));let s;t.CSSStyleSheet.prototype.replaceSync&&(s=t.CSSStyleSheet.prototype.replaceSync,t.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:ot((t,e,i)=>{var[n]=i,{id:s,styleId:r}=z(e,l,u.styleMirror);return(s&&-1!==s||r&&-1!==r)&&a({id:s,styleId:r,replaceSync:n}),t.apply(e,i)})}));const r={},o=(Ut("CSSGroupingRule")?r.CSSGroupingRule=t.CSSGroupingRule:(Ut("CSSMediaRule")&&(r.CSSMediaRule=t.CSSMediaRule),Ut("CSSConditionRule")&&(r.CSSConditionRule=t.CSSConditionRule),Ut("CSSSupportsRule")&&(r.CSSSupportsRule=t.CSSSupportsRule)),{});return Object.entries(r).forEach(([t,e])=>{o[t]={insertRule:e.prototype.insertRule,deleteRule:e.prototype.deleteRule},e.prototype.insertRule=new Proxy(o[t].insertRule,{apply:ot((t,e,i)=>{var[n,s]=i,{id:r,styleId:o}=z(e.parentStyleSheet,l,u.styleMirror);return(r&&-1!==r||o&&-1!==o)&&a({id:r,styleId:o,adds:[{rule:n,index:[...Ft(e),s||0]}]}),t.apply(e,i)})}),e.prototype.deleteRule=new Proxy(o[t].deleteRule,{apply:ot((t,e,i)=>{var[n]=i,{id:s,styleId:r}=z(e.parentStyleSheet,l,u.styleMirror);return(s&&-1!==s||r&&-1!==r)&&a({id:s,styleId:r,removes:[{index:[...Ft(e),n]}]}),t.apply(e,i)})})}),ot(()=>{t.CSSStyleSheet.prototype.insertRule=e,t.CSSStyleSheet.prototype.deleteRule=i,n&&(t.CSSStyleSheet.prototype.replace=n),s&&(t.CSSStyleSheet.prototype.replaceSync=s),Object.entries(r).forEach(([t,e])=>{e.prototype.insertRule=o[t].insertRule,e.prototype.deleteRule=o[t].deleteRule})})}(t,{win:i}),f=Nt(t,t.doc),m=function({styleDeclarationCb:l,mirror:u,ignoreCSSAttributes:c,stylesheetManager:h},{win:t}){const d=t.CSSStyleDeclaration.prototype.setProperty,o=(t.CSSStyleDeclaration.prototype.setProperty=new Proxy(d,{apply:ot((t,e,i)=>{var n,s,[r,o,a]=i;return c.has(r)?d.apply(e,[r,o,a]):({id:n,styleId:s}=z(null==(n=e.parentRule)?void 0:n.parentStyleSheet,u,h.styleMirror),(n&&-1!==n||s&&-1!==s)&&l({id:n,styleId:s,set:{property:r,value:o,priority:a},index:Ft(e.parentRule)}),t.apply(e,i))})}),t.CSSStyleDeclaration.prototype.removeProperty);return t.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:ot((t,e,i)=>{var n,s,[r]=i;return c.has(r)?o.apply(e,[r]):({id:n,styleId:s}=z(null==(n=e.parentRule)?void 0:n.parentStyleSheet,u,h.styleMirror),(n&&-1!==n||s&&-1!==s)&&l({id:n,styleId:s,remove:{property:r},index:Ft(e.parentRule)}),t.apply(e,i))})}),ot(()=>{t.CSSStyleDeclaration.prototype.setProperty=d,t.CSSStyleDeclaration.prototype.removeProperty=o})}(t,{win:i}),t.collectFonts)&&(p=function({fontCb:i,doc:t}){const e=t.defaultView;if(!e)return()=>{};const n=[],s=new WeakMap,r=e.FontFace;return e.FontFace=function(t,e,i){var n=new r(t,e,i);return s.set(n,{family:t,buffer:"string"!=typeof e,descriptors:i,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),n},t=W(t.fonts,"add",function(t){return function(e){return setTimeout(ot(()=>{var t=s.get(e);t&&(i(t),s.delete(e))}),0),t.apply(this,[e])}}),n.push(()=>{e.FontFace=r}),n.push(t),ot(()=>{n.forEach(t=>t())})}(t));const g=function(t){const{doc:l,mirror:u,blockClass:c,blockSelector:h,selectionCb:d}=t;let v=!0;return(t=ot(()=>{var e=l.getSelection();if(!(!e||v&&null!=e&&e.isCollapsed)){v=e.isCollapsed||!1;var i=[],n=e.rangeCount||0;for(let t=0;t<n;t++){var{startContainer:s,startOffset:r,endContainer:o,endOffset:a}=e.getRangeAt(t);P(s,c,h,!0)||P(o,c,h,!0)||i.push({start:u.getId(s),startOffset:r,end:u.getId(o),endOffset:a})}d({ranges:i})}}))(),et("selectionchange",t)}(t),b=({doc:e,customElementCb:s}=[t][0],(e=e.defaultView)&&e.customElements?W(e.customElements,"define",function(n){return function(e,t,i){try{s({define:{name:e}})}catch(t){console.warn("Custom element callback failed for "+e)}return n.apply(this,[e,t,i])}}):()=>{}),y=[];for(const R of t.plugins)y.push(R.observer(R.callback,i,R.options));return ot(()=>{at.forEach(t=>t.reset()),null!=o&&o.disconnect(),a(),l(),u(),c(),h(),d(),v(),f(),m(),p(),g(),b(),y.forEach(t=>t())})}function Gt(t){return void 0!==window[t]}function Ut(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Wt{constructor(t){a(this,"iframeIdToRemoteIdMap",new WeakMap),a(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,i,n){i=i||this.getIdToRemoteIdMap(t),n=n||this.getRemoteIdToIdMap(t);let s=i.get(e);return s||(s=this.generateIdFn(),i.set(e,s),n.set(s,e)),s}getIds(e,t){const i=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,i,n))}getRemoteId(t,e,i){i=i||this.getRemoteIdToIdMap(t);return"number"!=typeof e?e:i.get(e)||-1}getRemoteIds(e,t){const i=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,i))}reset(t){t?(this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)):(this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap)}getIdToRemoteIdMap(t){let e=this.iframeIdToRemoteIdMap.get(t);return e||(e=new Map,this.iframeIdToRemoteIdMap.set(t,e)),e}getRemoteIdToIdMap(t){let e=this.iframeRemoteIdToIdMap.get(t);return e||(e=new Map,this.iframeRemoteIdToIdMap.set(t,e)),e}}class Pt{constructor(t){a(this,"iframes",new WeakMap),a(this,"crossOriginIframeMap",new WeakMap),a(this,"crossOriginIframeMirror",new Wt(p)),a(this,"crossOriginIframeStyleMirror"),a(this,"crossOriginIframeRootIdMap",new WeakMap),a(this,"mirror"),a(this,"mutationCb"),a(this,"wrappedEmit"),a(this,"loadListener"),a(this,"stylesheetManager"),a(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Wt(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,e){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&null!=(e=t.contentWindow)&&e.addEventListener("message",this.handleMessage.bind(this)),null!=(e=this.loadListener)&&e.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&0<t.contentDocument.adoptedStyleSheets.length&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){var e=t;"rrweb"===e.data.type&&e.origin===e.data.origin&&t.source&&(t=(t=this.crossOriginIframeMap.get(t.source))&&this.transformCrossOriginEvent(t,e.data.event))&&this.wrappedEmit(t,e.data.isCheckout)}transformCrossOriginEvent(i,t){var e;switch(t.type){case nt.FullSnapshot:this.crossOriginIframeMirror.reset(i),this.crossOriginIframeStyleMirror.reset(i),this.replaceIdOnNode(t.data.node,i);var n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(i,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:nt.IncrementalSnapshot,data:{source:st.Mutation,adds:[{parentId:this.mirror.getId(i),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case nt.Meta:case nt.Load:case nt.DomContentLoaded:return!1;case nt.Plugin:return t;case nt.Custom:return this.replaceIds(t.data.payload,i,["id","parentId","previousId","nextId"]),t;case nt.IncrementalSnapshot:switch(t.data.source){case st.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,i,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,i);var e=this.crossOriginIframeRootIdMap.get(i);e&&this.patchRootIdOnNode(t.node,e)}),t.data.removes.forEach(t=>{this.replaceIds(t,i,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,i,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,i,["id"])}),t;case st.Drag:case st.TouchMove:case st.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,i,["id"])}),t;case st.ViewportResize:return!1;case st.MediaInteraction:case st.MouseInteraction:case st.Scroll:case st.CanvasMutation:case st.Input:return this.replaceIds(t.data,i,["id"]),t;case st.StyleSheetRule:case st.StyleDeclaration:return this.replaceIds(t.data,i,["id"]),this.replaceStyleIds(t.data,i,["styleId"]),t;case st.Font:return t;case st.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,i,["start","end"])}),t;case st.AdoptedStyleSheet:return this.replaceIds(t.data,i,["id"]),this.replaceStyleIds(t.data,i,["styleIds"]),null!=(e=t.data.styles)&&e.forEach(t=>{this.replaceStyleIds(t,i,["styleId"])}),t}}return!1}replace(t,e,i,n){for(const s of n)!Array.isArray(e[s])&&"number"!=typeof e[s]||(Array.isArray(e[s])?e[s]=t.getIds(i,e[s]):e[s]=t.getId(i,e[s]));return e}replaceIds(t,e,i){return this.replace(this.crossOriginIframeMirror,t,e,i)}replaceStyleIds(t,e,i){return this.replace(this.crossOriginIframeStyleMirror,t,e,i)}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===J.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach(t=>{this.patchRootIdOnNode(t,e)})}}class Bt{constructor(t){a(this,"shadowDoms",new WeakSet),a(this,"mutationCb"),a(this,"scrollCb"),a(this,"bypassOptions"),a(this,"mirror"),a(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(F(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);const i=Tt({...this.bypassOptions,doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>i.disconnect()),this.restoreHandlers.push(Et({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&0<t.adoptedStyleSheets.length&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(Nt({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,i){const n=this;this.restoreHandlers.push(W(t.prototype,"attachShadow",function(e){return function(t){t=e.call(this,t);return this.shadowRoot&&x(this)&&n.addShadowRoot(this.shadowRoot,i),t}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Yt="undefined"==typeof Uint8Array?[]:new Uint8Array(256),zt=0;zt<o.length;zt++)Yt[o.charCodeAt(zt)]=zt;function Vt(t){for(var e=new Uint8Array(t),i=e.length,n="",s=0;s<i;s+=3)n=(n=(n=(n+=o[e[s]>>2])+o[(3&e[s])<<4|e[s+1]>>4])+o[(15&e[s+1])<<2|e[s+2]>>6])+o[63&e[s+2]];return i%3==2?n=n.substring(0,n.length-1)+"=":i%3==1&&(n=n.substring(0,n.length-2)+"=="),n}const Zt=new Map;const Kt=(e,i,n)=>{if(e&&(Xt(e,i)||"object"==typeof e)){i=function(t,e){let i=Zt.get(t);return i||(i=new Map,Zt.set(t,i)),i.has(e)||i.set(e,[]),i.get(e)}(n,e.constructor.name);let t=i.indexOf(e);return-1===t&&(t=i.length,i.push(e)),t}};const Jt=(t,e,i)=>t.map(t=>function e(t,i,n){var s;return t instanceof Array?t.map(t=>e(t,i,n)):null===t?t: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?{rr_type:t.constructor.name,args:[Object.values(t)]}:t instanceof ArrayBuffer?{rr_type:t.constructor.name,base64:Vt(t)}:t instanceof DataView?{rr_type:t.constructor.name,args:[e(t.buffer,i,n),t.byteOffset,t.byteLength]}:t instanceof HTMLImageElement?(s=t.src,{rr_type:t.constructor.name,src:s}):t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL()}:t instanceof ImageData?{rr_type:t.constructor.name,args:[e(t.data,i,n),t.width,t.height]}:Xt(t,i)||"object"==typeof t?{rr_type:t.constructor.name,index:Kt(t,i,n)}:t}(t,e,i)),Xt=(e,i)=>{var t=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(t=>"function"==typeof i[t]);return Boolean(t.find(t=>e instanceof i[t]))};function Ht(t,s,r,o){const e=[];try{var i=W(t.HTMLCanvasElement.prototype,"getContext",function(n){return function(t,...e){var i;return P(this,s,r,!0)||(i="experimental-webgl"===(i=t)?"webgl":i,"__context"in this||(this.__context=i),o&&["webgl","webgl2"].includes(i)&&(e[0]&&"object"==typeof e[0]?(i=e[0]).preserveDrawingBuffer||(i.preserveDrawingBuffer=!0):e.splice(0,1,{preserveDrawingBuffer:!0}))),n.apply(this,[t,...e])}});e.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{e.forEach(t=>t())}}function $t(t,n,s,r,o,e,a){var i,l=[];for(const c of Object.getOwnPropertyNames(t))if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{"function"==typeof t[c]&&(i=W(t,c,function(i){return function(...t){var e=i.apply(this,t);return Kt(e,a,this),"tagName"in this.canvas&&!P(this.canvas,r,o,!0)&&(t=Jt(t,a,this),t={type:n,property:c,args:t},s(this.canvas,t)),e}}),l.push(i))}catch{var u=U(t,c,{set(t){s(this.canvas,{type:n,property:c,args:[t],setter:!0})}});l.push(u)}return l}const qt="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpCiAgICAgICAgcmV0dXJuIHRyYW5zcGFyZW50QmxvYk1hcC5nZXQoaWQpOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIHRyYW5zcGFyZW50QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICAgIHJldHVybiBiYXNlNjQ7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gIiI7CiAgICB9CiAgfQogIGNvbnN0IHdvcmtlciA9IHNlbGY7CiAgd29ya2VyLm9ubWVzc2FnZSA9IGFzeW5jIGZ1bmN0aW9uKGUpIHsKICAgIGlmICgiT2Zmc2NyZWVuQ2FudmFzIiBpbiBnbG9iYWxUaGlzKSB7CiAgICAgIGNvbnN0IHsgaWQsIGJpdG1hcCwgd2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMgfSA9IGUuZGF0YTsKICAgICAgY29uc3QgdHJhbnNwYXJlbnRCYXNlNjQgPSBnZXRUcmFuc3BhcmVudEJsb2JGb3IoCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0LAogICAgICAgIGRhdGFVUkxPcHRpb25zCiAgICAgICk7CiAgICAgIGNvbnN0IG9mZnNjcmVlbiA9IG5ldyBPZmZzY3JlZW5DYW52YXMod2lkdGgsIGhlaWdodCk7CiAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCIyZCIpOwogICAgICBjdHguZHJhd0ltYWdlKGJpdG1hcCwgMCwgMCk7CiAgICAgIGJpdG1hcC5jbG9zZSgpOwogICAgICBjb25zdCBibG9iID0gYXdhaXQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOwogICAgICBjb25zdCB0eXBlID0gYmxvYi50eXBlOwogICAgICBjb25zdCBhcnJheUJ1ZmZlciA9IGF3YWl0IGJsb2IuYXJyYXlCdWZmZXIoKTsKICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsKICAgICAgaWYgKCFsYXN0QmxvYk1hcC5oYXMoaWQpICYmIGF3YWl0IHRyYW5zcGFyZW50QmFzZTY0ID09PSBiYXNlNjQpIHsKICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOwogICAgICB9CiAgICAgIGlmIChsYXN0QmxvYk1hcC5nZXQoaWQpID09PSBiYXNlNjQpCiAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOwogICAgICB3b3JrZXIucG9zdE1lc3NhZ2UoewogICAgICAgIGlkLAogICAgICAgIHR5cGUsCiAgICAgICAgYmFzZTY0LAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodAogICAgICB9KTsKICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkOiBlLmRhdGEuaWQgfSk7CiAgICB9CiAgfTsKfSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW1hZ2UtYml0bWFwLWRhdGEtdXJsLXdvcmtlci1CWjFyN1JKRC5qcy5tYXAK";var Qt;const te="undefined"!=typeof window&&window.Blob&&new Blob([(k=qt,Uint8Array.from(atob(k),t=>t.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});function ee(e){let t;try{var i;if(t=te&&(window.URL||window.webkitURL).createObjectURL(te))return(i=new Worker(t,{name:null==e?void 0:e.name})).addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),i;throw""}catch(t){return new Worker("data:text/javascript;base64,"+qt,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class ie{constructor(t){a(this,"pendingCanvasMutations",new Map),a(this,"rafStamps",{latestId:0,invokeId:null}),a(this,"mirror"),a(this,"mutationCb"),a(this,"resetObservers"),a(this,"frozen",!1),a(this,"locked",!1),a(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:i,blockClass:n,blockSelector:s,recordCanvas:r,dataURLOptions:o}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,r&&"all"===e&&this.initCanvasMutationObserver(i,n,s),r&&"number"==typeof e&&this.initCanvasFPSObserver(e,i,n,s,{dataURLOptions:o})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,i,n,s,r){const e=Ht(i,n,s,!0),o=new Map,a=new ee,l=(a.onmessage=t=>{var e,i,n,s=t.data["id"];o.set(s,!1),"base64"in t.data&&({base64:t,type:e,width:i,height:n}=t.data,this.mutationCb({id:s,type:v["2D"],commands:[{property:"clearRect",args:[0,0,i,n]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:t}],type:e}]},0,0]}]}))},1e3/t);let u=0,c;const h=()=>{const e=[];return i.document.querySelectorAll("canvas").forEach(t=>{P(t,n,s,!0)||e.push(t)}),e},d=t=>{c=(u&&t-u<l||(u=t,h().forEach(async t=>{var e,i,n=this.mirror.getId(t);o.get(n)||0!==t.width&&0!==t.height&&(o.set(n,!0),["webgl","webgl2"].includes(t.__context)&&!1===(null==(i=null==(e=t.getContext(t.__context))?void 0:e.getContextAttributes())?void 0:i.preserveDrawingBuffer)&&e.clear(e.COLOR_BUFFER_BIT),i=await createImageBitmap(t),a.postMessage({id:n,bitmap:i,width:t.width,height:t.height,dataURLOptions:r.dataURLOptions},[i]))})),requestAnimationFrame(d))};c=requestAnimationFrame(d),this.resetObservers=()=>{e(),cancelAnimationFrame(c)}}initCanvasMutationObserver(t,e,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const n=Ht(t,e,i,!1),s=function(i,n,s,r){const t=[];var e;for(const a of Object.getOwnPropertyNames(n.CanvasRenderingContext2D.prototype))try{"function"==typeof n.CanvasRenderingContext2D.prototype[a]&&(e=W(n.CanvasRenderingContext2D.prototype,a,function(t){return function(...e){return P(this.canvas,s,r,!0)||setTimeout(()=>{var t=Jt(e,n,this);i(this.canvas,{type:v["2D"],property:a,args:t})},0),t.apply(this,e)}}),t.push(e))}catch{var o=U(n.CanvasRenderingContext2D.prototype,a,{set(t){i(this.canvas,{type:v["2D"],property:a,args:[t],setter:!0})}});t.push(o)}return()=>{t.forEach(t=>t())}}(this.processMutation.bind(this),t,e,i),r=function(t,e,i,n){const s=[];return s.push(...$t(e.WebGLRenderingContext.prototype,v.WebGL,t,i,n,0,e)),void 0!==e.WebGL2RenderingContext&&s.push(...$t(e.WebGL2RenderingContext.prototype,v.WebGL2,t,i,n,0,e)),()=>{s.forEach(t=>t())}}(this.processMutation.bind(this),t,e,i,this.mirror);this.resetObservers=()=>{n(),s(),r()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,e)=>{var i=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,i)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,e){var i,n;this.frozen||this.locked||(n=this.pendingCanvasMutations.get(t))&&-1!==e&&(i=n.map(t=>{const{type:e,...i}=t;return i}),n=n[0]["type"],this.mutationCb({id:e,type:n,commands:i}),this.pendingCanvasMutations.delete(t))}}class ne{constructor(t){a(this,"trackedLinkElements",new WeakSet),a(this,"mutationCb"),a(this,"adoptedStyleSheetCb"),a(this,"styleMirror",new M),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"ws"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){if(0!==t.length){var i={id:e,styleIds:[]},n=[];for(const s of t){let t;this.styleMirror.has(s)?t=this.styleMirror.getId(s):(t=this.styleMirror.add(s),n.push({styleId:t,rules:Array.from(s.rules||CSSRule,(t,e)=>({rule:m(t),index:e}))})),i.styleIds.push(t)}0<n.length&&(i.styles=n),this.adoptedStyleSheetCb(i)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class se{constructor(){a(this,"nodeMap",new WeakMap),a(this,"active",!1)}inOtherBuffer(t,e){t=this.nodeMap.get(t);return t&&Array.from(t).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(){}}let lt,re,oe,ae=!1;try{2!==Array.from([1],t=>2*t)[0]&&(Qt=document.createElement("iframe"),document.body.appendChild(Qt),Array.from=(null==(s=Qt.contentWindow)?void 0:s.Array.from)||Array.from,document.body.removeChild(Qt))}catch(t){console.debug("Unable to override Array.from",t)}const ut=new ct;function t(t={}){const{emit:n,checkoutEveryNms:s,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:o=null,ignoreClass:N="rr-ignore",ignoreSelector:L=null,maskTextClass:a="rr-mask",maskTextSelector:l=null,inlineStylesheet:u=!0,maskAllInputs:G,maskInputOptions:e,slimDOMOptions:c,maskInputFn:h,maskTextFn:d,hooks:U,packFn:v,sampling:f={},dataURLOptions:m={},mousemoveWait:p,recordDOM:g=!0,recordCanvas:b=!1,recordCrossOriginIframes:W=!1,recordAfter:P="DOMContentLoaded"===t.recordAfter?t.recordAfter:"load",userTriggeredOnInput:B=!1,collectFonts:Y=!1,inlineImages:y=!1,plugins:I,keepIframeSrcFn:_=()=>!1,ignoreCSSAttributes:z=new Set([]),errorHandler:V}=t;t=V,rt=t;const C=!W||window.parent===window;let w=!1;if(!C)try{window.parent.document&&(w=!1)}catch(t){w=!0}if(C&&!n)throw new Error("emit function is required");if(!C&&!w)return()=>{};void 0!==p&&void 0===f.mousemove&&(f.mousemove=p),ut.reset();const S=!0===G?{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!==e?e:{password:!0},k=!0===c||"all"===c?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===c,headMetaDescKeywords:"all"===c,headTitleMutations:"all"===c}:c||{};!function(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let e=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1})}();let Z,O=0;const K=t=>{for(const e of I||[])e.eventProcessor&&(t=e.eventProcessor(t));return t=v&&!w?v(t):t},A=(lt=(t,e)=>{var i;t.timestamp=it(),null==(i=at[0])||!i.isFrozen()||t.type===nt.FullSnapshot||t.type===nt.IncrementalSnapshot&&t.data.source===st.Mutation||at.forEach(t=>t.unfreeze()),C?null!=n&&n(K(t),e):w&&(i={type:"rrweb",event:K(t),origin:window.location.origin,isCheckout:e},window.parent.postMessage(i,"*")),t.type===nt.FullSnapshot?(Z=t,O=0):t.type!==nt.IncrementalSnapshot||t.data.source===st.Mutation&&t.data.isAttachIframe||(O++,e=r&&O>=r,i=s&&t.timestamp-Z.timestamp>s,(e||i)&&re(!0))},t=>{lt({type:nt.IncrementalSnapshot,data:{source:st.Mutation,...t}})}),J=t=>lt({type:nt.IncrementalSnapshot,data:{source:st.Scroll,...t}}),X=t=>lt({type:nt.IncrementalSnapshot,data:{source:st.CanvasMutation,...t}});const M=new ne({mutationCb:A,adoptedStyleSheetCb:t=>lt({type:nt.IncrementalSnapshot,data:{source:st.AdoptedStyleSheet,...t}})}),j=new Pt({mirror:ut,mutationCb:A,stylesheetManager:M,recordCrossOriginIframes:W,wrappedEmit:lt});for(const E of I||[])E.getMirror&&E.getMirror({nodeMirror:ut,crossOriginIframeMirror:j.crossOriginIframeMirror,crossOriginIframeStyleMirror:j.crossOriginIframeStyleMirror});const T=new se,x=(oe=new ie({recordCanvas:b,mutationCb:X,win:window,blockClass:i,blockSelector:o,mirror:ut,sampling:f.canvas,dataURLOptions:m}),new Bt({mutationCb:A,scrollCb:J,bypassOptions:{blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:l,inlineStylesheet:u,maskInputOptions:S,dataURLOptions:m,maskTextFn:d,maskInputFn:h,recordCanvas:b,inlineImages:y,sampling:f,slimDOMOptions:k,iframeManager:j,stylesheetManager:M,canvasManager:oe,keepIframeSrcFn:_,processedNodeManager:T},mirror:ut}));re=(t=!1)=>{if(g){lt({type:nt.Meta,data:{href:window.location.href,width:_t(),height:It()}},t),M.reset(),x.init(),at.forEach(t=>t.lock());var e=function(t,e){var{mirror:e=new ct,blockClass:i="rr-block",blockSelector:n=null,maskTextClass:s="rr-mask",maskTextSelector:r=null,inlineStylesheet:o=!0,inlineImages:a=!1,recordCanvas:l=!1,maskAllInputs:u=!1,maskTextFn:c,maskInputFn:h,slimDOM:d=!1,dataURLOptions:v,preserveWhiteSpace:f,onSerialize:m,onIframeLoad:p,iframeLoadTimeout:g,onStylesheetLoad:b,stylesheetLoadTimeout:y,keepIframeSrcFn:I=()=>!1}=e||{};return tt(t,{doc:t,mirror:e,blockClass:i,blockSelector:n,maskTextClass:s,maskTextSelector:r,skipChild:!1,inlineStylesheet:o,maskInputOptions:!0===u?{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===u?{password:!0}:u,maskTextFn:c,maskInputFn:h,slimDOMOptions:!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===d,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===d?{}:d,dataURLOptions:v,inlineImages:a,recordCanvas:l,preserveWhiteSpace:f,onSerialize:m,onIframeLoad:p,iframeLoadTimeout:g,onStylesheetLoad:b,stylesheetLoadTimeout:y,keepIframeSrcFn:I,newlyAddedElement:!1})}(document,{mirror:ut,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:l,inlineStylesheet:u,maskAllInputs:S,maskTextFn:d,slimDOM:k,dataURLOptions:m,recordCanvas:b,inlineImages:y,onSerialize:t=>{wt(t,ut)&&j.addIframe(t),St(t,ut)&&M.trackLinkElement(t),kt(t)&&x.addShadowRoot(t.shadowRoot,document)},onIframeLoad:(t,e)=>{j.attachIframe(t,e),x.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{M.attachLinkElement(t,e)},keepIframeSrcFn:_});if(!e)return console.warn("Failed to snapshot the document");lt({type:nt.FullSnapshot,data:{node:e,initialOffset:yt(window)}},t),at.forEach(t=>t.unlock()),document.adoptedStyleSheets&&0<document.adoptedStyleSheets.length&&M.adoptStyleSheets(document.adoptedStyleSheets,ut.getId(document))}};try{const R=[],D=t=>{return ot(Lt)({mutationCb:A,mousemoveCb:(t,e)=>lt({type:nt.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>lt({type:nt.IncrementalSnapshot,data:{source:st.MouseInteraction,...t}}),scrollCb:J,viewportResizeCb:t=>lt({type:nt.IncrementalSnapshot,data:{source:st.ViewportResize,...t}}),inputCb:t=>lt({type:nt.IncrementalSnapshot,data:{source:st.Input,...t}}),mediaInteractionCb:t=>lt({type:nt.IncrementalSnapshot,data:{source:st.MediaInteraction,...t}}),styleSheetRuleCb:t=>lt({type:nt.IncrementalSnapshot,data:{source:st.StyleSheetRule,...t}}),styleDeclarationCb:t=>lt({type:nt.IncrementalSnapshot,data:{source:st.StyleDeclaration,...t}}),canvasMutationCb:X,fontCb:t=>lt({type:nt.IncrementalSnapshot,data:{source:st.Font,...t}}),selectionCb:t=>{lt({type:nt.IncrementalSnapshot,data:{source:st.Selection,...t}})},customElementCb:t=>{lt({type:nt.IncrementalSnapshot,data:{source:st.CustomElement,...t}})},blockClass:i,ignoreClass:N,ignoreSelector:L,maskTextClass:a,maskTextSelector:l,maskInputOptions:S,inlineStylesheet:u,sampling:f,recordDOM:g,recordCanvas:b,inlineImages:y,userTriggeredOnInput:B,collectFonts:Y,doc:t,maskInputFn:h,maskTextFn:d,keepIframeSrcFn:_,blockSelector:o,slimDOMOptions:k,dataURLOptions:m,mirror:ut,iframeManager:j,stylesheetManager:M,shadowDomManager:x,processedNodeManager:T,canvasManager:oe,ignoreCSSAttributes:z,plugins:(null==(t=null==I?void 0:I.filter(t=>t.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>lt({type:nt.Plugin,data:{plugin:e.name,payload:t}})})))||[]},U)},F=(j.addLoadListener(t=>{try{R.push(D(t.contentDocument))}catch(t){console.warn(t)}}),()=>{re(),R.push(D(document)),ae=!0});return"interactive"===document.readyState||"complete"===document.readyState?F():(R.push(et("DOMContentLoaded",()=>{lt({type:nt.DomContentLoaded,data:{}}),"DOMContentLoaded"===P&&F()})),R.push(et("load",()=>{lt({type:nt.Load,data:{}}),"load"===P&&F()},window))),()=>{R.forEach(t=>t()),T.destroy(),ae=!1,rt=void 0}}catch(t){console.warn(t)}}t.addCustomEvent=(t,e)=>{if(!ae)throw new Error("please add custom event after start recording");lt({type:nt.Custom,data:{tag:t,payload:e}})},t.freezePage=()=>{at.forEach(t=>t.freeze())},t.takeFullSnapshot=t=>{if(!ae)throw new Error("please take full snapshot after start recording");re(t)},t.mirror=ut,i.record=t},8572:function(t,e){!function(t){"use strict";let s=-1;const l=e=>{addEventListener("pageshow",t=>{t.persisted&&(s=t.timeStamp,e(t))},!0)},u=(e,i,n,s)=>{let r,o;return t=>{i.value>=0&&(t||s)&&(o=i.value-(r??0),(o||void 0===r)&&(r=i.value,i.delta=o,i.rating=((t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good")(i.value,n),e(i)))}},c=t=>{requestAnimationFrame(()=>requestAnimationFrame(()=>t()))},r=()=>{const t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},h=()=>{const t=r();return t?.activationStart??0},d=(t,e=-1)=>{const i=r();let n="navigate";s>=0?n="back-forward-cache":i&&(document.prerendering||h()>0?n="prerender":document.wasDiscarded?n="restore":i.type&&(n=i.type.replace(/_/g,"-")));return{name:t,value:e,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:n}},i=new WeakMap;function v(t,e){return i.get(t)||i.set(t,new e),i.get(t)}class a{t;i=0;o=[];h(t){if(t.hadRecentInput)return;const e=this.o[0],i=this.o.at(-1);this.i&&e&&i&&t.startTime-i.startTime<1e3&&t.startTime-e.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),this.t?.(t)}}const f=(t,e,i={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const n=new PerformanceObserver(t=>{Promise.resolve().then(()=>{e(t.getEntries())})});return n.observe({type:t,buffered:!0,...i}),n}}catch{}},m=t=>{let e=!1;return()=>{e||(t(),e=!0)}};let n=-1;const o=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,e=t=>{"hidden"===document.visibilityState&&n>-1&&(n="visibilitychange"===t.type?t.timeStamp:0,g())},p=()=>{addEventListener("visibilitychange",e,!0),addEventListener("prerenderingchange",e,!0)},g=()=>{removeEventListener("visibilitychange",e,!0),removeEventListener("prerenderingchange",e,!0)},b=()=>{if(n<0){const e=h(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime;n=t??o(),p(),l(()=>{setTimeout(()=>{n=o(),p()})})}return{get firstHiddenTime(){return n}}},y=t=>{document.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()},I=[1800,3e3],_=(e,o={})=>{y(()=>{const i=b();let n,s=d("FCP");const r=f("paint",t=>{for(const e of t)"first-contentful-paint"===e.name&&(r.disconnect(),e.startTime<i.firstHiddenTime&&(s.value=Math.max(e.startTime-h(),0),s.entries.push(e),n(!0)))});r&&(n=u(e,s,I,o.reportAllChanges),l(t=>{s=d("FCP"),n=u(e,s,I,o.reportAllChanges),c(()=>{s.value=performance.now()-t.timeStamp,n(!0)})}))})},C=[.1,.25];let w=0,S=1/0,k=0;const O=t=>{for(const e of t)e.interactionId&&(S=Math.min(S,e.interactionId),k=Math.max(k,e.interactionId),w=k?(k-S)/7+1:0)};let A;const M=()=>A?w:performance.interactionCount??0,j=()=>{"interactionCount"in performance||A||(A=f("event",O,{type:"event",buffered:!0,durationThreshold:0}))};let T=0;class N{u=[];l=new Map;m;p;v(){T=M(),this.u.length=0,this.l.clear()}T(){const t=Math.min(this.u.length-1,Math.floor((M()-T)/50));return this.u[t]}h(t){if(this.m?.(t),!t.interactionId&&"first-input"!==t.entryType)return;const e=this.u.at(-1);let i=this.l.get(t.interactionId);if(i||this.u.length<10||t.duration>e.P){if(i?t.duration>i.P?(i.entries=[t],i.P=t.duration):t.duration===i.P&&t.startTime===i.entries[0].startTime&&i.entries.push(t):(i={id:t.interactionId,entries:[t],P:t.duration},this.l.set(i.id,i),this.u.push(i)),this.u.sort((t,e)=>e.P-t.P),this.u.length>10){const t=this.u.splice(10);for(const e of t)this.l.delete(e.id)}this.p?.(i)}}}const x=t=>{const e=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?t():(t=m(t),document.addEventListener("visibilitychange",t,{once:!0}),e(()=>{t(),document.removeEventListener("visibilitychange",t)}))},E=[200,500];class L{m;h(t){this.m?.(t)}}const R=[2500,4e3],D=[800,1800],F=t=>{document.prerendering?y(()=>F(t)):"complete"!==document.readyState?addEventListener("load",()=>F(t),!0):setTimeout(t)};t.CLSThresholds=C,t.FCPThresholds=I,t.INPThresholds=E,t.LCPThresholds=R,t.TTFBThresholds=D,t.onCLS=(r,o={})=>{_(m(()=>{let i,n=d("CLS",0);const s=v(o,a),t=t=>{for(const e of t)s.h(e);s.i>n.value&&(n.value=s.i,n.entries=s.o,i())},e=f("layout-shift",t);e&&(i=u(r,n,C,o.reportAllChanges),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&(t(e.takeRecords()),i(!0))}),l(()=>{s.i=0,n=d("CLS",0),i=u(r,n,C,o.reportAllChanges),c(()=>i())}),setTimeout(i))}))},t.onFCP=_,t.onINP=(r,o={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&y(()=>{j();let i,n=d("INP");const s=v(o,N),t=e=>{x(()=>{for(const t of e)s.h(t);const t=s.T();t&&t.P!==n.value&&(n.value=t.P,n.entries=t.entries,i())})},e=f("event",t,{durationThreshold:o.durationThreshold??40});i=u(r,n,E,o.reportAllChanges),e&&(e.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&(t(e.takeRecords()),i(!0))}),l(()=>{s.v(),n=d("INP"),i=u(r,n,E,o.reportAllChanges)}))})},t.onLCP=(o,a={})=>{y(()=>{const e=b();let i,n=d("LCP");const s=v(a,L),t=t=>{a.reportAllChanges||(t=t.slice(-1));for(const a of t)s.h(a),a.startTime<e.firstHiddenTime&&(n.value=Math.max(a.startTime-h(),0),n.entries=[a],i())},r=f("largest-contentful-paint",t);if(r){i=u(o,n,R,a.reportAllChanges);const e=m(()=>{t(r.takeRecords()),r.disconnect(),i(!0)});for(const o of["keydown","click","visibilitychange"])addEventListener(o,()=>x(e),{capture:!0,once:!0});l(t=>{n=d("LCP"),i=u(o,n,R,a.reportAllChanges),c(()=>{n.value=performance.now()-t.timeStamp,i(!0)})})}})},t.onTTFB=(e,i={})=>{let n=d("TTFB"),s=u(e,n,D,i.reportAllChanges);F(()=>{const t=r();t&&(n.value=Math.max(t.responseStart-h(),0),n.entries=[t],s(!0),l(()=>{n=d("TTFB",0),s=u(e,n,D,i.reportAllChanges),s(!0)}))})}}(e)}},n={},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o={},(()=>{"use strict";var t=o,e=r(6914);const i=r(3447),n=r(1964);var s=r(2016),e=(0,e.l)();t.default=e,s.AutoInit.attempt(({client:t})=>{new i.SessionReplay(t),new n.AutoCapture(t)})})(),o.default;function r(t){var e=n[t];return void 0!==e||(e=n[t]={exports:{}},i[t].call(e.exports,e,e.exports,r)),e.exports}var i,n,o});
|