@statsig/js-client 3.28.1 → 3.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
!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(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Statsig=t():e.Statsig=t()}(this,()=>{return r={1845:(e,r,t)=>{"use strict";var s;Object.defineProperty(r,"__esModule",{value:!0}),r._getInstance=r._getStatsigGlobalFlag=r._getStatsigGlobal=void 0;const n=t(7512);r._getStatsigGlobal=()=>{try{return"undefined"!=typeof __STATSIG__?__STATSIG__:l}catch(e){return l}},r._getStatsigGlobalFlag=e=>(0,r._getStatsigGlobal)()[e];r._getInstance=e=>{var t=(0,r._getStatsigGlobal)();return e?t.instances&&t.instances[e]:(t.instances&&1<Object.keys(t.instances).length&&n.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."),t.firstInstance)};var i="__STATSIG__",o="undefined"!=typeof window?window:{},t=void 0!==t.g?t.g:{},a="undefined"!=typeof globalThis?globalThis:{};const l=null!=(s=null!=(s=null!=(s=o[i])?s:t[i])?s:a[i])?s:{instance:r._getInstance};o[i]=l,t[i]=l,a[i]=l},2137:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getStorageKey=t._getUserStorageKey=void 0;const n=r(1406);function s(e,t,r){if(r)return r(e,t);const s=t&&t.customIDs?t.customIDs:{};t=["uid:"+(null!=(r=null==t?void 0:t.userID)?r:""),"cids:"+Object.keys(s).sort((e,t)=>e.localeCompare(t)).map(e=>e+"-"+s[e]).join(","),"k:"+e];return(0,n._DJB2)(t.join("|"))}t._getUserStorageKey=s,t._getStorageKey=function(e,t,r){return t?s(e,t,r):(0,n._DJB2)("k:"+e)}},6427:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},694:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,o,a,l){return new(a=a||Promise)(function(r,t){function s(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(s,n)}i((l=l.apply(e,o||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._makeDataAdapterResult=t.DataAdapterCore=void 0;const l=r(7512),u=r(9122),i=r(8578),o=r(4534),c=r(3401);function h(e,t,r,s){return{source:e,data:t,receivedAt:Date.now(),stableID:r,fullUserHash:(0,i._getFullUserHash)(s)}}t.DataAdapterCore=class{constructor(e,t){this._adapterName=e,this._cacheSuffix=t,this._options=null,this._sdkKey=null,this._cacheLimit=10,this._lastModifiedStoreKey="statsig.last_modified_time."+t,this._inMemoryCache=new s}attach(e,t,r){this._sdkKey=e,this._options=t}getDataSync(e){var e=e&&(0,i._normalizeUser)(e,this._options),t=this._getCacheKey(e),r=this._inMemoryCache.get(t,e);return r&&this._getIsCacheValueValid(r)?r:(r=this._loadFromCache(t))&&this._getIsCacheValueValid(r)?(this._inMemoryCache.add(t,r,this._cacheLimit),this._inMemoryCache.get(t,e)):null}setData(e,t){var t=t&&(0,i._normalizeUser)(t,this._options),r=this._getCacheKey(t);this._inMemoryCache.add(r,h("Bootstrap",e,null,t),this._cacheLimit)}_getIsCacheValueValid(e){return null==e.stableID||e.stableID===u.StableID.get(this._getSdkKey())}_getDataAsyncImpl(t,r,s){return n(this,void 0,void 0,function*(){o.Storage.isReady()||(yield o.Storage.isReadyResolver());var e=null!=t?t:this.getDataSync(r),e=[this._fetchAndPrepFromNetwork(e,r,s)];return null!=s&&s.timeoutMs&&e.push(new Promise(e=>setTimeout(e,s.timeoutMs)).then(()=>(l.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(e)})}_prefetchDataImpl(r,s){return n(this,void 0,void 0,function*(){var e=r&&(0,i._normalizeUser)(r,this._options),t=this._getCacheKey(e),e=yield this._getDataAsyncImpl(null,e,s);e&&this._inMemoryCache.add(t,Object.assign(Object.assign({},e),{source:"Prefetch"}),this._cacheLimit)})}_fetchAndPrepFromNetwork(i,o,a){return n(this,void 0,void 0,function*(){var e=null!=(e=null==i?void 0:i.data)?e:null,t=null!=i&&this._isCachedResultValidFor204(i,o),t=yield this._fetchFromNetwork(e,o,a,t);if(!t)return l.Log.debug("No response returned for latest value"),null;var r=(0,c._typedJsonParse)(t,"has_updates","Response"),s=this._getSdkKey(),s=u.StableID.get(s);let n=null;if(!0===(null==r?void 0:r.has_updates))n=h("Network",t,s,o);else{if(!e||!1!==(null==r?void 0:r.has_updates))return null;n=h("NetworkNotModified",e,s,o)}t=this._getCacheKey(o);return this._inMemoryCache.add(t,n,this._cacheLimit),this._writeToCache(t,n),n})}_getSdkKey(){return null!=this._sdkKey?this._sdkKey:(l.Log.error(this._adapterName+" is not attached to a Client"),"")}_loadFromCache(e){var t=null==(t=o.Storage.getItem)?void 0:t.call(o.Storage,e);return null!=t&&(e=(0,c._typedJsonParse)(t,"source","Cached Result"))?Object.assign(Object.assign({},e),{source:"Cache"}):null}_writeToCache(t,e){var r=JSON.stringify(e);for(let e=0;e<8;e++)try{o.Storage.setItem(t,r);break}catch(e){if(!(e instanceof Error)||!e.toString().includes("QuotaExceededError")&&!e.toString().includes("QUOTA_EXCEEDED_ERR")||this._cacheLimit<=1)throw e;this._cacheLimit=Math.ceil(this._cacheLimit/2),this._runLocalStorageCacheEviction(t,this._cacheLimit-1)}this._runLocalStorageCacheEviction(t)}_runLocalStorageCacheEviction(e,t=this._cacheLimit){var r=null!=(s=(0,o._getObjectFromStorage)(this._lastModifiedStoreKey))?s:{},s=(r[e]=Date.now(),a(r,t));for(const n of s)delete r[n],o.Storage.removeItem(n);(0,o._setObjectInStorage)(this._lastModifiedStoreKey,r)}},t._makeDataAdapterResult=h;class s{constructor(){this._data={}}get(e,t){var e=this._data[e],r=null==e?void 0:e.stableID,t=null==(t=null==t?void 0:t.customIDs)?void 0:t.stableID;return t&&r&&t!==r?(l.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):e}add(e,t,r){for(const s of a(this._data,r-1))delete this._data[s];this._data[e]=t}merge(e){this._data=Object.assign(Object.assign({},this._data),e)}}function a(r,e){var t=Object.keys(r);return t.length<=e?[]:0===e?t:t.sort((e,t)=>{e=r[e],t=r[t];return"object"==typeof e&&"object"==typeof t?e.receivedAt-t.receivedAt:e-t}).slice(0,t.length-e)}},8962:(e,o)=>{"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.Diagnostics=void 0;const s=new Map,r="start";function n(e,t,r,s){return Object.assign({key:r,action:t,step:s,timestamp:Date.now()},e)}function i(e,t){var r=null!=(r=s.get(e))?r:[];r.push(t),s.set(e,r)}function t(e,t){if(t in e)return e[t]}o.Diagnostics={_getMarkers:e=>s.get(e),_markInitOverallStart:e=>{i(e,n({},r,"overall"))},_markInitOverallEnd:(e,t,r)=>{i(e,n({success:t,error:t?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:r},"end","overall"))},_markInitNetworkReqStart:(e,t)=>{i(e,n(t,r,"initialize","network_request"))},_markInitNetworkReqEnd:(e,t)=>{i(e,n(t,"end","initialize","network_request"))},_markInitProcessStart:e=>{i(e,n({},r,"initialize","process"))},_markInitProcessEnd:(e,t)=>{i(e,n(t,"end","initialize","process"))},_clearMarkers:e=>{s.delete(e)},_formatError(e){if(e&&"object"==typeof e)return{code:t(e,"code"),name:t(e,"name"),message:t(e,"message")}},_getDiagnosticsData(e,t,r,s){return{success:!0===(null==e?void 0:e.ok),statusCode:null==e?void 0:e.status,sdkRegion:null==(e=null==e?void 0:e.headers)?void 0:e.get("x-statsig-region"),isDelta:!0===r.includes('"is_delta":true')||void 0,attempt:t,error:o.Diagnostics._formatError(s)}},_enqueueDiagnosticsEvent(e,t,r,s){var n,i=o.Diagnostics._getMarkers(r);return null==i||i.length<=0?-1:(n=i[i.length-1].timestamp-i[0].timestamp,o.Diagnostics._clearMarkers(r),r=function(e,t){e={eventName:"statsig::diagnostics",user:e,value:null,metadata:t,time:Date.now()};return e}(e,{context:"initialize",markers:i.slice(),statsigOptions:s}),t.enqueue(r),n)}}},8809:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,o,a,l){return new(a=a||Promise)(function(r,t){function s(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(s,n)}i((l=l.apply(e,o||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._fetchTxtRecords=void 0;const n=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]),i="https://cloudflare-dns.com/dns-query",o=["i","e","d"],a=200;t._fetchTxtRecords=function(t){return r(this,void 0,void 0,function*(){var r=yield t(i,{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:n});if(r.ok){var e,r=yield r.arrayBuffer(),r=new Uint8Array(r);{var s=r,r=s.findIndex((e,t)=>t<a&&"="===String.fromCharCode(e)&&o.includes(String.fromCharCode(s[t-1])));if(-1===r)throw(e=new Error("Failed to parse TXT records from DNS")).name="DnsTxtParseError",e;let t="";for(let e=r-1;e<s.length;e++)t+=String.fromCharCode(s[e]);return t.split(",")}}throw(e=new Error("Failed to fetch TXT records from DNS")).name="DnsTxtFetchError",e})}},3539:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5542:function(e,a,t){"use strict";var r=this&&this.__awaiter||function(e,o,a,l){return new(a=a||Promise)(function(r,t){function s(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(s,n)}i((l=l.apply(e,o||[])).next())})};Object.defineProperty(a,"__esModule",{value:!0}),a.ErrorBoundary=a.EXCEPTION_ENDPOINT=void 0;const s=t(7512),l=t(5902),u=t(8e3),c=(a.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception","[Statsig] UnknownError");function h(e){return e instanceof Error?e:"string"==typeof e?new Error(e):new Error("An unknown error occurred.")}a.ErrorBoundary=class{constructor(e,t,r,s){this._sdkKey=e,this._options=t,this._emitter=r,this._lastSeenError=s,this._seen=new Set}wrap(s,n){try{const e=s;!function(e){const t=new Set;let r=Object.getPrototypeOf(e);for(;r&&r!==Object.prototype;)Object.getOwnPropertyNames(r).filter(e=>"function"==typeof(null===r||void 0===r?void 0:r[e])).forEach(e=>t.add(e)),r=Object.getPrototypeOf(r);return Array.from(t)}(e).forEach(t=>{const r=e[t];"$EB"in r||(e[t]=(...e)=>this._capture(n?n+":"+t:t,()=>r.apply(s,e)),e[t].$EB=!0)})}catch(e){this._onError("eb:wrap",e)}}logError(e,t){this._onError(e,t)}getLastSeenErrorAndReset(){var e=this._lastSeenError;return this._lastSeenError=void 0,null!=e?e:null}attachErrorIfNoneExists(e){this._lastSeenError||(this._lastSeenError=h(e))}_capture(t,e){try{var r=e();return r&&r instanceof Promise?r.catch(e=>this._onError(t,e)):r}catch(e){return this._onError(t,e),null}}_onError(i,o){try{s.Log.warn("Caught error in "+i,{error:o});r(this,void 0,void 0,function*(){var e,t=o||Error(c),r=t instanceof Error,s=r?t.name:"No Name",n=h(t);this._lastSeenError=n,this._seen.has(s)||(this._seen.add(s),null!=(n=null==(n=this._options)?void 0:n.networkConfig)&&n.preventAllNetworkTraffic?null!=(n=this._emitter)&&n.call(this,{name:"error",error:o,tag:i}):(n=l.SDKType._get(this._sdkKey),e=u.StatsigMetadataProvider.get(),r=r?t.stack:function(e){try{return JSON.stringify(e)}catch(e){return c}}(t),t=Object.assign({tag:i,exception:s,info:r,statsigOptions:function(s){if(!s)return{};const n={};return Object.keys(s).forEach(e=>{var t=e,r=s[t];switch(typeof r){case"number":case"bigint":case"boolean":n[String(t)]=r;break;case"string":r.length<50?n[String(t)]=r:n[String(t)]="set";break;case"object":"environment"===t?n.environment=r:"networkConfig"===t?n.networkConfig=r:n[String(t)]=null!=r?"set":"unset"}}),n}(this._options)},Object.assign(Object.assign({},e),{sdkType:n})),yield(null!=(s=null==(r=null==(s=this._options)?void 0:s.networkConfig)?void 0:r.networkOverrideFunc)?s:fetch)(a.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String(n),"STATSIG-SDK-VERSION":String(e.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(t)}),null!=(r=this._emitter)&&r.call(this,{name:"error",error:o,tag:i})))}).then(()=>{}).catch(()=>{})}catch(e){}}}},2922:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2417:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7770:function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,o,a,l){return new(a=a||Promise)(function(r,t){function s(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(s,n)}i((l=l.apply(e,o||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.EventLogger=void 0;const n=r(2137),i=r(1406),o=r(7512),a=r(7410),l=r(6830),u=r(1637),c=r(586),h=r(4534),d=r(1881),p=r(2397),g={},f={Startup:"startup",GainedFocus:"gained_focus"};class m{static _safeFlushAndForget(e){null!=(e=g[e])&&e.flush().catch(()=>{})}static _safeRetryFailedLogs(e){null!=(e=g[e])&&e._retryFailedLogs(f.GainedFocus)}constructor(e,t,r,s){this._sdkKey=e,this._emitter=t,this._network=r,this._options=s,this._queue=[],this._lastExposureTimeMap={},this._nonExposedChecks={},this._hasRunQuickFlush=!1,this._creationTime=Date.now(),this._loggingEnabled=null!=(e=null==s?void 0:s.loggingEnabled)?e:!0===(null==s?void 0:s.disableLogging)?c.LoggingEnabledOption.disabled:c.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._maxQueueSize=null!=(t=null==s?void 0:s.loggingBufferMaxSize)?t:100;r=null==s?void 0:s.networkConfig;this._logEventUrlConfig=new d.UrlConfiguration(a.Endpoint._rgstr,null==r?void 0:r.logEventUrl,null==r?void 0:r.api,null==r?void 0:r.logEventFallbackUrls)}setLogEventCompressionMode(e){this._network.setLogEventCompressionMode(e)}setLoggingEnabled(e){var t,r;"disabled"===this._loggingEnabled&&"disabled"!==e&&(t=this._getStorageKey(),(r=(0,h._getObjectFromStorage)(t))&&this._queue.push(...r),h.Storage.removeItem(t)),this._loggingEnabled=e}enqueue(e){this._shouldLogEvent(e)&&(this._normalizeAndAppendEvent(e),this._quickFlushIfNeeded(),this._queue.length>this._maxQueueSize)&&m._safeFlushAndForget(this._sdkKey)}incrementNonExposureCount(e){var t=null!=(t=this._nonExposedChecks[e])?t:0;this._nonExposedChecks[e]=t+1}reset(){this.flush().catch(()=>{}),this._lastExposureTimeMap={}}start(){var e,t=(0,l._isServerEnv)();t&&"always"!==(null==(e=this._options)?void 0:e.loggingEnabled)||(g[this._sdkKey]=this,t||(0,p._subscribeToVisiblityChanged)(e=>{"background"===e?m._safeFlushAndForget(this._sdkKey):"foreground"===e&&m._safeRetryFailedLogs(this._sdkKey)}),this._retryFailedLogs(f.Startup),this._startBackgroundFlushInterval())}stop(){return s(this,void 0,void 0,function*(){this._flushIntervalId&&(clearInterval(this._flushIntervalId),this._flushIntervalId=null),delete g[this._sdkKey],yield this.flush()})}flush(){return s(this,void 0,void 0,function*(){var e;this._appendAndResetNonExposedChecks(),0!==this._queue.length&&(e=this._queue,this._queue=[],yield this._sendEvents(e))})}_quickFlushIfNeeded(){this._hasRunQuickFlush||(this._hasRunQuickFlush=!0,200<Date.now()-this._creationTime)||setTimeout(()=>m._safeFlushAndForget(this._sdkKey),200)}_shouldLogEvent(e){if("always"!==(null==(t=this._options)?void 0:t.loggingEnabled)&&(0,l._isServerEnv)())return!1;if((0,u._isExposureEvent)(e)){var t=e.user||{statsigEnvironment:void 0},t=(0,n._getUserStorageKey)(this._sdkKey,t),r=e.metadata||{},e=[e.eventName,t,r.gate,r.config,r.ruleID,r.allocatedExperiment,r.parameterName,String(r.isExplicitParameter),r.reason].join("|"),t=this._lastExposureTimeMap[e],r=Date.now();if(t&&r-t<6e5)return!1;1e3<Object.keys(this._lastExposureTimeMap).length&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[e]=r}return!0}_sendEvents(n){return s(this,void 0,void 0,function*(){var e,t;if("disabled"===this._loggingEnabled)return this._saveFailedLogsToStorage(n),!1;try{var r=(0,p._isUnloading)()&&this._network.isBeaconSupported()&&null==(null==(t=null==(e=this._options)?void 0:e.networkConfig)?void 0:t.networkOverrideFunc),s=(this._emitter({name:"pre_logs_flushed",events:n}),r?this._sendEventsViaBeacon(n):yield this._sendEventsViaPost(n));return s.success?(this._emitter({name:"logs_flushed",events:n}),!0):(o.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(n),!1)}catch(e){return o.Log.warn("Failed to flush events."),!1}})}_sendEventsViaPost(t){return s(this,void 0,void 0,function*(){var e=yield this._network.post(this._getRequestData(t)),e=null!=(e=null==e?void 0:e.code)?e:-1;return{success:200<=e&&e<300}})}_sendEventsViaBeacon(e){return{success:this._network.beacon(this._getRequestData(e))}}_getRequestData(e){return{sdkKey:this._sdkKey,data:{events:e},urlConfig:this._logEventUrlConfig,retries:3,isCompressable:!0,params:{[a.NetworkParam.EventCount]:String(e.length)},credentials:"same-origin"}}_saveFailedLogsToStorage(e){for(;500<e.length;)e.shift();var t=this._getStorageKey();try{var r=this._getFailedLogsFromStorage(t);(0,h._setObjectInStorage)(t,[...r,...e])}catch(e){o.Log.warn("Unable to save failed logs to storage")}}_getFailedLogsFromStorage(e){let t=[];try{var r=(0,h._getObjectFromStorage)(e);return t=Array.isArray(r)?r:t}catch(e){return[]}}_retryFailedLogs(t){const r=this._getStorageKey();s(this,void 0,void 0,function*(){h.Storage.isReady()||(yield h.Storage.isReadyResolver());var e=(0,h._getObjectFromStorage)(r);e&&(t===f.Startup&&h.Storage.removeItem(r),yield this._sendEvents(e))&&t===f.GainedFocus&&h.Storage.removeItem(r)}).catch(()=>{o.Log.warn("Failed to flush stored logs")})}_getStorageKey(){return"statsig.failed_logs."+(0,i._DJB2)(this._sdkKey)}_normalizeAndAppendEvent(e){e.user&&(e.user=Object.assign({},e.user),delete e.user.privateAttributes);var t={},r=this._getCurrentPageUrl(),r=(r&&(t.statsigMetadata={currentPage:r}),Object.assign(Object.assign({},e),t));o.Log.debug("Enqueued Event:",r),this._queue.push(r)}_appendAndResetNonExposedChecks(){0!==Object.keys(this._nonExposedChecks).length&&(this._normalizeAndAppendEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this._nonExposedChecks)}}),this._nonExposedChecks={})}_getCurrentPageUrl(){var e;if(!1!==(null==(e=this._options)?void 0:e.includeCurrentPageUrlWithEvents))return(0,l._getCurrentPageUrlSafe)()}_startBackgroundFlushInterval(){var e=null!=(e=null==(e=this._options)?void 0:e.loggingIntervalMs)?e:1e4;const t=setInterval(()=>{var e=g[this._sdkKey];e&&e._flushIntervalId===t?m._safeFlushAndForget(this._sdkKey):clearInterval(t)},e);this._flushIntervalId=t}}t.EventLogger=m},1406:(e,i,t)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i._getSortedObject=i._DJB2Object=i._DJB2=void 0;const o=t(6634);i._DJB2=t=>{let r=0;for(let e=0;e<t.length;e++){var s=t.charCodeAt(e);r=(r<<5)-r+s,r&=r}return String(r>>>0)},i._DJB2Object=(e,t)=>(0,i._DJB2)(JSON.stringify((0,i._getSortedObject)(e,t)));i._getSortedObject=(r,s)=>{if(null==r)return null;var e=Object.keys(r).sort();const n={};return e.forEach(e=>{var t=r[e];0===s||"object"!==(0,o._typeOf)(t)?n[e]=t:n[e]=(0,i._getSortedObject)(t,null!=s?s-1:s)}),n}},1333:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7512:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Log=t.LogLevel=void 0;function r(e){return e.unshift("[Statsig]"),e}t.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class s{static info(...e){s.level>=t.LogLevel.Info&&console.info(" INFO ",...r(e))}static debug(...e){s.level>=t.LogLevel.Debug&&console.debug(" DEBUG ",...r(e))}static warn(...e){s.level>=t.LogLevel.Warn&&console.warn(" WARN ",...r(e))}static error(...e){s.level>=t.LogLevel.Error&&console.error(" ERROR ",...r(e))}}(t.Log=s).level=t.LogLevel.Warn},7787:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMemoKey=t.MemoPrefix=void 0,t.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};const i=new Set([]),o=new Set(["userPersistedValues"]);t.createMemoKey=function(e,t,r){let s=e+"|"+t;if(r)for(const n of Object.keys(r)){if(o.has(n))return;i.has(n)?s+=`|${n}=true`:s+=`|${n}=`+r[n]}return s}},7410:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkParam=t.NetworkDefault=t.Endpoint=void 0,t.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},t.NetworkDefault={[t.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[t.Endpoint._initialize]:"https://featureassets.org/v1",[t.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},t.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}},7023:function(e,t,r){"use strict";var _=this&&this.__awaiter||function(e,o,a,l){return new(a=a||Promise)(function(r,t){function s(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(s,n)}i((l=l.apply(e,o||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkCore=void 0,r(1845);const p=r(1845),b=r(8962),S=r(7512),w=r(7410),s=r(308),g=r(3091),o=r(5902),n=r(6830),a=r(4143),l=r(9122),C=r(2636),u=r(8e3),f=r(586),k=r(2397),I=500,E=3e4;const O=new Set([408,500,502,503,504,522,524,599]);t.NetworkCore=class{constructor(e,t){this._emitter=t,this._errorBoundary=null,this._timeout=1e4,this._netConfig={},this._options={},this._leakyBucket={},this._lastUsedInitUrl=null,e&&(this._options=e),this._options.networkConfig&&(this._netConfig=this._options.networkConfig),this._netConfig.networkTimeoutMs&&(this._timeout=this._netConfig.networkTimeoutMs),this._fallbackResolver=new s.NetworkFallbackResolver(this._options),this.setLogEventCompressionMode(this._getLogEventCompressionMode(e))}setLogEventCompressionMode(e){this._options.logEventCompressionMode=e}setErrorBoundary(e){this._errorBoundary=e,this._errorBoundary.wrap(this),this._errorBoundary.wrap(this._fallbackResolver),this._fallbackResolver.setErrorBoundary(e)}isBeaconSupported(){return"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon}getLastUsedInitUrlAndReset(){var e=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,e}beacon(e){var t,r;return!!x(e)&&(e=this._getInternalRequestArgs("POST",e),t=this._getPopulatedURL(e),(r=navigator).sendBeacon.bind(r)(t,e.body))}post(t){return _(this,void 0,void 0,function*(){var e=this._getInternalRequestArgs("POST",t);return this._tryEncodeBody(e),yield this._tryToCompressBody(e),this._sendRequest(e)})}get(e){e=this._getInternalRequestArgs("GET",e);return this._sendRequest(e)}_sendRequest(y){return _(this,void 0,void 0,function*(){var t;if(!x(y))return null;if(this._netConfig.preventAllNetworkTraffic)return null;var{method:s,body:n,retries:r,attempt:i}=y,o=y.urlConfig.endpoint;if(this._isRateLimited(o))return S.Log.warn(`Request to ${o} was blocked because you are making requests too frequently.`),null;i=null!=i?i:1;let a=!1;var l=this._getPopulatedURL(y);let u=null;var c,h=(0,k._isUnloading)();try{var e,d,p,g={method:s,body:n,headers:Object.assign({},y.headers),priority:y.priority,keepalive:h},f=(c=i,(v=y).urlConfig.endpoint===w.Endpoint._initialize&&b.Diagnostics._markInitNetworkReqStart(v.sdkKey,{attempt:c}),this._leakyBucket[o]),m=(f&&(f.lastRequestTime=Date.now(),this._leakyBucket[o]=f),null!=(t=this._netConfig.networkOverrideFunc)?t:fetch);let r;if((u=yield Promise.race([m(l,g).finally(()=>clearTimeout(r)),new Promise((e,t)=>{r=setTimeout(()=>{a=!0,t(new Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})])).ok)return p=yield u.text(),M(y,u,i,p),this._fallbackResolver.tryBumpExpiryTime(y.sdkKey,y.urlConfig),{body:p,code:u.status};throw e=yield u.text().catch(()=>"No Text"),(d=new Error(`NetworkError: ${l} `+e)).name="NetworkError",d}catch(e){var n=function(e){if("string"==typeof e)return e;if(e instanceof Error)return e.name+": "+e.message;return"Unknown Error"}(e),h=function(e,t){e=e.includes("Timeout");return e||t}(null!=n?n:"",a),v=(M(y,u,i,"",e),yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(y.sdkKey,y.urlConfig,n,h));return(v&&(y.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(y.sdkKey,y.urlConfig)),!r||r<i||!O.has(null!=(c=null===u||void 0===u?void 0:u.status)?c:500))?(null!=(o=this._emitter)&&o.call(this,{name:"error",error:e,tag:C.ErrorTag.NetworkError,requestArgs:y}),f=`A networking error occurred during ${s} request to ${l}.`,S.Log.error(f,n,e),null!=(t=this._errorBoundary)&&t.attachErrorIfNoneExists(f),null):(yield function(t){return _(this,void 0,void 0,function*(){yield new Promise(e=>setTimeout(e,Math.min(I*(t*t),E)))})}(i),this._sendRequest(Object.assign(Object.assign({},y),{retries:r,attempt:i+1})))}})}_getLogEventCompressionMode(e){let t=null==e?void 0:e.logEventCompressionMode;return t=(t=t||!0!==(null==e?void 0:e.disableCompression)?t:f.LogEventCompressionMode.Disabled)||f.LogEventCompressionMode.Enabled}_isRateLimited(e){var t=Date.now(),r=null!=(r=this._leakyBucket[e])?r:{count:0,lastRequestTime:t},s=t-r.lastRequestTime,s=Math.floor(.05*s);return r.count=Math.max(0,r.count-s),50<=r.count||(r.count+=1,r.lastRequestTime=t,this._leakyBucket[e]=r,!1)}_getPopulatedURL(e){var t=null!=(t=e.fallbackUrl)?t:e.urlConfig.getUrl();e.urlConfig.endpoint!==w.Endpoint._initialize&&e.urlConfig.endpoint!==w.Endpoint._download_config_specs||(this._lastUsedInitUrl=t);const r=Object.assign({[w.NetworkParam.SdkKey]:e.sdkKey,[w.NetworkParam.SdkType]:o.SDKType._get(e.sdkKey),[w.NetworkParam.SdkVersion]:u.SDK_VERSION,[w.NetworkParam.Time]:String(Date.now()),[w.NetworkParam.SessionID]:a.SessionID.get(e.sdkKey)},e.params);e=Object.keys(r).map(e=>encodeURIComponent(e)+"="+encodeURIComponent(r[e])).join("&");return t+(e?"?"+e:"")}_tryEncodeBody(t){var e,r=(0,n._getWindowSafe)(),s=t.body;if(t.isStatsigEncodable&&!this._options.disableStatsigEncoding&&"string"==typeof s&&null==(0,p._getStatsigGlobalFlag)("no-encode")&&null!=r&&r.btoa)try{t.body=r.btoa(s).split("").reverse().join(""),t.params=Object.assign(Object.assign({},null!=(e=t.params)?e:{}),{[w.NetworkParam.StatsigEncoded]:"1"})}catch(e){S.Log.warn("Request encoding failed for "+t.urlConfig.getUrl(),e)}}_tryToCompressBody(d){return _(this,void 0,void 0,function*(){var t,r=d.body;if("string"==typeof r&&function(e,t){if(!e.isCompressable)return;if(null!=(0,p._getStatsigGlobalFlag)("no-compress")||"undefined"==typeof CompressionStream||"undefined"==typeof TextEncoder)return;var r=null!=e.urlConfig.customUrl||null!=e.urlConfig.fallbackUrls,s=!0===g.SDKFlags.get(e.sdkKey,"enable_log_event_compression");switch(t.logEventCompressionMode){case f.LogEventCompressionMode.Disabled:return;case f.LogEventCompressionMode.Enabled:return r&&!s?void 0:1;case f.LogEventCompressionMode.Forced:return 1;default:return}}(d,this._options))try{for(var s,n=(new TextEncoder).encode(r),i=new CompressionStream("gzip"),o=i.writable.getWriter(),a=(o.write(n).catch(S.Log.error),o.close().catch(S.Log.error),i.readable.getReader()),l=[];!(s=yield a.read()).done;)l.push(s.value);var u=l.reduce((e,t)=>e+t.length,0),c=new Uint8Array(u);let e=0;for(const h of l)c.set(h,e),e+=h.length;d.body=c,d.params=Object.assign(Object.assign({},null!=(t=d.params)?t:{}),{[w.NetworkParam.IsGzipped]:"1"})}catch(e){S.Log.warn("Request compression failed for "+d.urlConfig.getUrl(),e)}})}_getInternalRequestArgs(e,t){var r=this._fallbackResolver.getActiveFallbackUrl(t.sdkKey,t.urlConfig),e=Object.assign(Object.assign({},t),{method:e,fallbackUrl:r});return"data"in t&&i(e,t.data),e}};const x=e=>!!e.sdkKey||(S.Log.warn("Unable to make request without an SDK key"),!1),i=(e,t)=>{var{sdkKey:r,fallbackUrl:s}=e,n=l.StableID.get(r),i=a.SessionID.get(r),r=o.SDKType._get(r);e.body=JSON.stringify(Object.assign(Object.assign({},t),{statsigMetadata:Object.assign(Object.assign({},u.StatsigMetadataProvider.get()),{stableID:n,sessionID:i,sdkType:r,fallbackUrl:s})}))};function M(e,t,r,s,n){e.urlConfig.endpoint===w.Endpoint._initialize&&b.Diagnostics._markInitNetworkReqEnd(e.sdkKey,b.Diagnostics._getDiagnosticsData(t,r,s,n))}},308:function(e,t,r){"use strict";var a=this&&this.__awaiter||function(e,o,a,l){return new(a=a||Promise)(function(r,t){function s(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(s,n)}i((l=l.apply(e,o||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._isDomainFailure=t.NetworkFallbackResolver=void 0;const o=r(8809),s=r(1406),i=r(7512),l=r(4534);function u(e,t){e=null!=(e=null==e?void 0:e.toLowerCase())?e:"";return t||e.includes("uncaught exception")||e.includes("failed to fetch")||e.includes("networkerror when attempting to fetch resource")}function c(e){return"statsig.network_fallback."+(0,s._DJB2)(e)}function h(e,t){e=c(e);t&&0!==Object.keys(t).length?l.Storage.setItem(e,JSON.stringify(t)):l.Storage.removeItem(e)}t.NetworkFallbackResolver=class{constructor(e){this._fallbackInfo=null,this._errorBoundary=null,this._dnsQueryCooldowns={},this._networkOverrideFunc=null==(e=e.networkConfig)?void 0:e.networkOverrideFunc}setErrorBoundary(e){this._errorBoundary=e}tryBumpExpiryTime(e,t){var r=null==(r=this._fallbackInfo)?void 0:r[t.endpoint];r&&(r.expiryTime=Date.now()+6048e5,h(e,Object.assign(Object.assign({},this._fallbackInfo),{[t.endpoint]:r})))}getActiveFallbackUrl(e,t){var r;if(null!=t.customUrl&&null!=t.fallbackUrls)return null;let s=this._fallbackInfo;null==s&&(s=null!=(n=function(e){e=c(e),e=l.Storage.getItem(e);if(!e)return null;try{return JSON.parse(e)}catch(e){return i.Log.error("Failed to parse FallbackInfo"),null}}(e))?n:{},this._fallbackInfo=s);var n=s[t.endpoint];return!n||Date.now()>(null!=(r=n.expiryTime)?r:0)||t.getChecksum()!==n.urlConfigChecksum?(delete s[t.endpoint],this._fallbackInfo=s,h(e,this._fallbackInfo),null):n.url||null}tryFetchUpdatedFallbackInfo(s,n,i,o){return a(this,void 0,void 0,function*(){var t,e,r;try{return u(i,o)?(e=null==n.customUrl&&null==n.fallbackUrls?yield this._tryFetchFallbackUrlsFromNetwork(n):n.fallbackUrls,!!(r=this._pickNewFallbackUrl(null==(t=this._fallbackInfo)?void 0:t[n.endpoint],e))&&(this._updateFallbackInfoWithNewUrl(s,n,r),!0)):!1}catch(e){return null!=(t=this._errorBoundary)&&t.logError("tryFetchUpdatedFallbackInfo",e),!1}})}_updateFallbackInfoWithNewUrl(e,t,r){var r={urlConfigChecksum:t.getChecksum(),url:r,expiryTime:Date.now()+6048e5,previous:[]},t=t.endpoint,s=null==(s=this._fallbackInfo)?void 0:s[t],s=(s&&r.previous.push(...s.previous),10<r.previous.length&&(r.previous=[]),null==(s=null==(s=this._fallbackInfo)?void 0:s[t])?void 0:s.url);null!=s&&r.previous.push(s),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[t]:r}),h(e,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(i){return a(this,void 0,void 0,function*(){var e=this._dnsQueryCooldowns[i.endpoint];if(e&&Date.now()<e)return null;this._dnsQueryCooldowns[i.endpoint]=Date.now()+144e5;var t=[],e=yield(0,o._fetchTxtRecords)(null!=(e=this._networkOverrideFunc)?e:fetch),r=function(e){try{return new URL(e).pathname}catch(e){return null}}(i.defaultUrl);for(const n of e)if(n.startsWith(i.endpointDnsKey+"=")){var s=n.split("=");if(1<s.length){let e=s[1];e.endsWith("/")&&(e=e.slice(0,-1)),t.push("https://"+e+r)}}return t})}_pickNewFallbackUrl(e,t){var r;if(null==t)return null;var s=new Set(null!=(r=null==e?void 0:e.previous)?r:[]),n=null==e?void 0:e.url;let i=null;for(const a of t){var o=a.endsWith("/")?a.slice(0,-1):a;if(!s.has(a)&&o!==n){i=o;break}}return i}},t._isDomainFailure=u},1405:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1361:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3091:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SDKFlags=void 0;const r={};t.SDKFlags={setFlags:(e,t)=>{r[e]=t},get:(e,t)=>{return null!=(e=null==(e=r[e])?void 0:e[t])&&e}}},5902:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SDKType=void 0;const r={};let s;t.SDKType={_get:e=>{return(null!=(e=r[e])?e:"js-mono")+(null!==s&&void 0!==s?s:"")},_setClientType(e,t){r[e]=t},_setBindingType(e){s&&"-react"!==s||(s="-"+e)}}},6830:(e,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s._getUnloadEvent=s._getCurrentPageUrlSafe=s._addDocumentEventListenerSafe=s._addWindowEventListenerSafe=s._isServerEnv=s._getDocumentSafe=s._getWindowSafe=void 0;s._getWindowSafe=()=>"undefined"!=typeof window?window:null,s._getDocumentSafe=()=>{var e=(0,s._getWindowSafe)();return null!=(e=null==e?void 0:e.document)?e:null},s._isServerEnv=()=>{var e;return null===(0,s._getDocumentSafe)()&&(e="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,"string"==typeof EdgeRuntime||e)},s._addWindowEventListenerSafe=(e,t)=>{var r=(0,s._getWindowSafe)();"function"==typeof(null==r?void 0:r.addEventListener)&&r.addEventListener(e,t)},s._addDocumentEventListenerSafe=(e,t)=>{var r=(0,s._getDocumentSafe)();"function"==typeof(null==r?void 0:r.addEventListener)&&r.addEventListener(e,t)},s._getCurrentPageUrlSafe=()=>{var e;try{return null==(e=(0,s._getWindowSafe)())?void 0:e.location.href.split(/[?#]/)[0]}catch(e){}};s._getUnloadEvent=()=>{var e=(0,s._getWindowSafe)();return e&&"onpagehide"in e?"pagehide":"beforeunload"}},4143:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigSession=t.SessionID=void 0;const s=r(1845),n=r(2137),a=r(7512),l=r(4534),u=r(8023),c=18e5,h=144e5,d={};function p(t,e){return setTimeout(()=>{var e=null==(e=(0,s._getStatsigGlobal)())?void 0:e.instance(t);e&&e.$emt({name:"session_expired"})},e)}function g(e){return"statsig.session_id."+(0,n._getStorageKey)(e)}t.SessionID={get:e=>t.StatsigSession.get(e).data.sessionID},t.StatsigSession={get:e=>{null==d[e]&&(d[e]=function(e){let t=function(e){e=g(e);return(0,l._getObjectFromStorage)(e)}(e);var r=Date.now();t=t||{sessionID:(0,u.getUUID)(),startTime:r,lastUpdate:r};return{data:t,sdkKey:e}}(e));var e=d[e],t=Date.now(),r=e.data,s=e.sdkKey,n=((function({lastUpdate:e}){return Date.now()-e>c}(r)||function({startTime:e}){return Date.now()-e>h}(r))&&(r.sessionID=(0,u.getUUID)(),r.startTime=t,o=null===__STATSIG__||void 0===__STATSIG__?void 0:__STATSIG__.instance(s))&&o.$emt({name:"session_expired"}),r.lastUpdate=t,r),i=e.sdkKey;i=g(i);try{(0,l._setObjectInStorage)(i,n)}catch(e){a.Log.warn("Failed to save SessionID")}clearTimeout(e.idleTimeoutID),clearTimeout(e.ageTimeoutID);var o=t-r.startTime;return e.idleTimeoutID=p(s,c),e.ageTimeoutID=p(s,h-o),e},overrideInitialSessionID:(e,t)=>{var r;d[t]=(e=e,t=t,r=Date.now(),{data:{sessionID:e,startTime:r,lastUpdate:r},sdkKey:t})}}},2176:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a._fastApproxSizeOf=void 0;a._fastApproxSizeOf=(t,r)=>{let s=0;var n=Object.keys(t);for(let e=0;e<n.length;e++){var i=n[e],o=t[i];if((s=(s+=i.length)+("object"==typeof o&&null!==o?(0,a._fastApproxSizeOf)(o,r)+2:String(o).length+1))>=r)return s}return s}},9122:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCookieName=t.StableID=void 0;const s=r(2137),n=r(7512),i=r(6830),o=r(4534),a=r(8023),l={},u={},c={};function h(e){return"statsig.stable_id."+(0,s._getStorageKey)(e)}function d(e,t){t=h(t);try{(0,o._setObjectInStorage)(t,e)}catch(e){n.Log.warn("Failed to save StableID to storage")}}function p(e,t){var r;u[t]&&null!=(0,i._getDocumentSafe)()&&((r=new Date).setFullYear(r.getFullYear()+1),document.cookie=`${g(t)}=${encodeURIComponent(e)}; expires=${r.toUTCString()}; path=/`)}function g(e){return"statsig.stable_id."+(0,s._getStorageKey)(e)}t.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:e=>{if(c[e])return null;if(null!=l[e])return l[e];let t=null;return null!=(t=function(e){if(u[e]&&null!=(0,i._getDocumentSafe)())for(const s of document.cookie.split(";")){var[t,r]=s.trim().split("=");if(t===g(e))return decodeURIComponent(r)}return null}(e))?d(l[e]=t,e):(d(t=null==(t=function(e){e=h(e);return(0,o._getObjectFromStorage)(e)}(e))?(0,a.getUUID)():t,e),p(t,e),l[e]=t),t},setOverride:(e,t)=>{d(l[t]=e,t),p(e,t)},_setCookiesEnabled:(e,t)=>{u[e]=t},_setDisabled:(e,t)=>{c[e]=t}},t.getCookieName=g},1375:function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,o,a,l){return new(a=a||Promise)(function(r,t){function s(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(s,n)}i((l=l.apply(e,o||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigClientBase=void 0,r(1845);const o=r(1845),a=r(5542),l=r(7770),u=r(7512),i=r(7787),c=r(6830),h=r(4143),d=r(9122),n=r(586),p=r(4534);t.StatsigClientBase=class{constructor(e,t,r,s){this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};var n,i=this.$emt.bind(this);null!=(null==s?void 0:s.logLevel)&&(u.Log.level=s.logLevel),null!=s&&s.disableStorage&&p.Storage._setDisabled(!0),null!=s&&s.initialSessionID&&h.StatsigSession.overrideInitialSessionID(s.initialSessionID,e),null!=s&&s.storageProvider&&p.Storage._setProvider(s.storageProvider),null!=s&&s.enableCookies&&d.StableID._setCookiesEnabled(e,s.enableCookies),null!=s&&s.disableStableID&&d.StableID._setDisabled(e,!0),this._sdkKey=e,this._options=null!=s?s:{},this._memoCache={},this.overrideAdapter=null!=(n=null==s?void 0:s.overrideAdapter)?n:null,this._logger=new l.EventLogger(e,i,r,s),this._errorBoundary=new a.ErrorBoundary(e,s,i),this._errorBoundary.wrap(this),this._errorBoundary.wrap(t),this._errorBoundary.wrap(this._logger),r.setErrorBoundary(this._errorBoundary),this.dataAdapter=t,this.dataAdapter.attach(e,s,r),this.storageProvider=p.Storage,null!=(t=null==(i=null==(n=this.overrideAdapter)?void 0:n.loadFromStorage)?void 0:i.call(n))&&t.catch(e=>this._errorBoundary.logError("OA::loadFromStorage",e)),this._primeReadyRipcord(),s=e,r=this,(0,c._isServerEnv)()||(i=(0,o._getStatsigGlobal)(),n=null!=(n=i.instances)?n:{},r=r,null!=n[s]&&u.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),n[s]=r,i.firstInstance||(i.firstInstance=r),i.instances=n,__STATSIG__=i)}updateRuntimeOptions(e){e.loggingEnabled?(this._options.loggingEnabled=e.loggingEnabled,this._logger.setLoggingEnabled(e.loggingEnabled)):null!=e.disableLogging&&(this._options.disableLogging=e.disableLogging,this._logger.setLoggingEnabled(e.disableLogging?"disabled":"browser-only")),null!=e.disableStorage&&(this._options.disableStorage=e.disableStorage,p.Storage._setDisabled(e.disableStorage)),null!=e.enableCookies&&(this._options.enableCookies=e.enableCookies,d.StableID._setCookiesEnabled(this._sdkKey,e.enableCookies)),e.logEventCompressionMode?this._logger.setLogEventCompressionMode(e.logEventCompressionMode):e.disableCompression&&this._logger.setLogEventCompressionMode(n.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return s(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this._setStatus("Uninitialized",null),this._initializePromise=null,yield this._logger.stop()})}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){this._listeners[e]&&-1!==(t=this._listeners[e].indexOf(t))&&this._listeners[e].splice(t,1)}$on(e,t){t.__isInternal=!0,this.on(e,t)}$emt(r){var e;const t=t=>{try{t(r)}catch(e){!0===t.__isInternal?this._errorBoundary.logError("__emit:"+r.name,e):u.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",r)}};this._listeners[r.name]&&this._listeners[r.name].forEach(e=>t(e)),null!=(e=this._listeners["*"])&&e.forEach(t)}_setStatus(e,t){this.loadingStatus=e,this._memoCache={},this.$emt({name:"values_updated",status:e,values:t})}_enqueueExposure(e,t,r){!0===(null==r?void 0:r.disableExposureLog)?this._logger.incrementNonExposureCount(e):this._logger.enqueue(t)}_memoize(s,n){return(e,t)=>{var r;return!this._options.disableEvaluationMemoization&&(r=(0,i.createMemoKey)(s,e,t))?(r in this._memoCache||(3e3<=Object.keys(this._memoCache).length&&(this._memoCache={}),this._memoCache[r]=n(e,t)),this._memoCache[r]):n(e,t)}}}},2636:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorTag=void 0,t.ErrorTag={NetworkError:"NetworkError"}},3206:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataAdapterCachePrefix=void 0,t.DataAdapterCachePrefix="statsig.cached"},1637:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._createLayerParameterExposure=t._createConfigExposure=t._mapExposures=t._createGateExposure=t._isExposureEvent=void 0;const i="statsig::config_exposure",o="statsig::gate_exposure",u="statsig::layer_exposure",c=(e,t,r,s,n)=>(r.bootstrapMetadata&&(s.bootstrapMetadata=r.bootstrapMetadata),{eventName:e,user:t,value:null,metadata:a(r,s),secondaryExposures:n,time:Date.now()});t._isExposureEvent=({eventName:e})=>e===o||e===i||e===u;function h(e,t){return e.map(e=>"string"==typeof e?(null!=t?t:{})[e]:e).filter(e=>null!=e)}t._createGateExposure=(e,t,r)=>{var s,n={gate:t.name,gateValue:String(t.value),ruleID:t.ruleID};return null!=(null==(s=t.__evaluation)?void 0:s.version)&&(n.configVersion=t.__evaluation.version),c(o,e,t.details,n,h(null!=(e=null==(s=t.__evaluation)?void 0:s.secondary_exposures)?e:[],r))},t._mapExposures=h;t._createConfigExposure=(e,t,r)=>{var s,n={config:t.name,ruleID:t.ruleID};return null!=(null==(s=t.__evaluation)?void 0:s.version)&&(n.configVersion=t.__evaluation.version),null!=(null==(s=t.__evaluation)?void 0:s.passed)&&(n.rulePassed=String(t.__evaluation.passed)),c(i,e,t.details,n,h(null!=(e=null==(s=t.__evaluation)?void 0:s.secondary_exposures)?e:[],r))};t._createLayerParameterExposure=(e,t,r,s)=>{var n=t.__evaluation,i=!0===(null==(i=null==n?void 0:n.explicit_parameters)?void 0:i.includes(r));let o="",a=null!=(l=null==n?void 0:n.undelegated_secondary_exposures)?l:[];i&&(o=null!=(l=n.allocated_experiment_name)?l:"",a=null!=(l=n.secondary_exposures)?l:[]);var l=null==(n=t.__evaluation)?void 0:n.parameter_rule_ids,l={config:t.name,parameterName:r,ruleID:null!=(n=null==l?void 0:l[r])?n:t.ruleID,allocatedExperiment:o,isExplicitParameter:String(i)};return null!=(null==(r=t.__evaluation)?void 0:r.version)&&(l.configVersion=t.__evaluation.version),c(u,e,t.details,l,h(a,s))};const a=(e,t)=>(t.reason=e.reason,e.lcut&&(t.lcut=String(e.lcut)),e.receivedAt&&(t.receivedAt=String(e.receivedAt)),t)},8e3:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigMetadataProvider=t.SDK_VERSION=void 0,t.SDK_VERSION="3.28.1";let r={sdkVersion:t.SDK_VERSION,sdkType:"js-mono"};t.StatsigMetadataProvider={get:()=>r,add:e=>{r=Object.assign(Object.assign({},r),e)}}},586:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoggingEnabledOption=t.LogEventCompressionMode=void 0,t.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},t.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}},1098:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2059:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._makeTypedGet=t._mergeOverride=t._makeLayer=t._makeExperiment=t._makeDynamicConfig=t._makeFeatureGate=void 0;const o=r(7512),a=r(6634);function n(e,t,r,s){return{name:e,details:t,ruleID:null!=(e=null==r?void 0:r.rule_id)?e:"",__evaluation:r,value:s}}function s(e,t,r){var s=null!=(s=null==r?void 0:r.value)?s:{};return Object.assign(Object.assign({},n(e,t,r,s)),{idType:null!=(t=null==r?void 0:r.id_type)?t:null,get:i(e,null==r?void 0:r.value)})}function i(s,n,i){return(e,t)=>{var r=null!=(r=null==n?void 0:n[e])?r:null;return null==r?null!=t?t:null:null==t||(0,a._isTypeMatch)(r,t)?(null!=i&&i(e),r):(o.Log.warn(`Parameter type mismatch. '${s}.${e}' was found to be type '${typeof r}' but fallback/return type is '${typeof t}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),null!=t?t:null)}}t._makeFeatureGate=function(e,t,r){return Object.assign(Object.assign({},n(e,t,r,!0===(null==r?void 0:r.value))),{idType:null!=(e=null==r?void 0:r.id_type)?e:null})},t._makeDynamicConfig=s,t._makeExperiment=function(e,t,r){return e=s(e,t,r),Object.assign(Object.assign({},e),{groupName:null!=(t=null==r?void 0:r.group_name)?t:null})},t._makeLayer=function(e,t,r,s){return Object.assign(Object.assign({},n(e,t,r,void 0)),{get:i(e,null==r?void 0:r.value,s),groupName:null!=(t=null==r?void 0:r.group_name)?t:null,__value:null!=(e=null==r?void 0:r.value)?e:{}})},t._mergeOverride=function(e,t,r,s){return Object.assign(Object.assign(Object.assign({},e),t),{get:i(e.name,r,s)})},t._makeTypedGet=i},1812:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3932:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_DETAIL_ERROR_MESSAGES=t.createUpdateDetails=void 0;t.createUpdateDetails=(e,t,r,s,n,i)=>({duration:r,source:t,success:e,error:s,sourceUrl:n,warnings:i}),t.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:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getFullUserHash=t._normalizeUser=void 0;const s=r(1406),n=r(7512);t._normalizeUser=function(e,t,r){try{var s=JSON.parse(JSON.stringify(e));return null!=t&&null!=t.environment?s.statsigEnvironment=t.environment:null!=r&&(s.statsigEnvironment={tier:r}),s}catch(e){return n.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}},t._getFullUserHash=function(e){return e?(0,s._DJB2Object)(e):null}},4534:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._setObjectInStorage=r._getObjectFromStorage=r.Storage=void 0;var s=t(7512),t=t(6830);const n={},i={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:e=>n[e]||null,setItem:(e,t)=>{n[e]=t},removeItem:e=>{delete n[e]},getAllKeys:()=>Object.keys(n)};let o=null;try{const c=(0,t._getWindowSafe)();c&&c.localStorage&&"function"==typeof c.localStorage.getItem&&(o={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:e=>c.localStorage.getItem(e),setItem:(e,t)=>c.localStorage.setItem(e,t),removeItem:e=>c.localStorage.removeItem(e),getAllKeys:()=>Object.keys(c.localStorage)})}catch(e){s.Log.warn("Failed to setup localStorageProvider.")}let a=null!==o&&void 0!==o?o:i,l=a;function u(e){try{return e()}catch(e){if(e instanceof Error&&"SecurityError"===e.name)return r.Storage._setProvider(i),null;throw e}}r.Storage={isReady:()=>l.isReady(),isReadyResolver:()=>l.isReadyResolver(),getProviderName:()=>l.getProviderName(),getItem:e=>u(()=>l.getItem(e)),setItem:(e,t)=>u(()=>l.setItem(e,t)),removeItem:e=>l.removeItem(e),getAllKeys:()=>l.getAllKeys(),_setProvider:e=>{a=e,l=e},_setDisabled:e=>{l=e?i:a}},r._getObjectFromStorage=function(e){return e=r.Storage.getItem(e),JSON.parse(null!=e?e:"null")},r._setObjectInStorage=function(e,t){r.Storage.setItem(e,JSON.stringify(t))}},3401:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._typedJsonParse=void 0;const n=r(7512);t._typedJsonParse=function(e,t,r){try{var s=JSON.parse(e);if(s&&"object"==typeof s&&t in s)return s}catch(e){}return n.Log.error("Failed to parse "+r),null}},6634:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._isTypeMatch=t._typeOf=void 0,t._typeOf=function(e){return Array.isArray(e)?"array":typeof e},t._isTypeMatch=function(e,t){var r=e=>Array.isArray(e)?"array":null===e?"null":typeof e;return r(e)===r(t)}},8023:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUUID=void 0,t.getUUID=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();let r=(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,e=>{let t=16*Math.random();return 0<r?(t=(r+t)%16|0,r=Math.floor(r/16)):(t=(s+t)%16|0,s=Math.floor(s/16)),("x"===e?t:7&t|8).toString(16)})}},1881:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UrlConfiguration=void 0;const s=r(1406),n=r(7410),i={[n.Endpoint._initialize]:"i",[n.Endpoint._rgstr]:"e",[n.Endpoint._download_config_specs]:"d"};t.UrlConfiguration=class{constructor(e,t,r,s){this.customUrl=null,this.fallbackUrls=null,this.endpoint=e,this.endpointDnsKey=i[e],t&&(this.customUrl=t),!t&&r&&(this.customUrl=r.endsWith("/")?""+r+e:r+"/"+e),s&&(this.fallbackUrls=s);t=n.NetworkDefault[e];this.defaultUrl=t+"/"+e}getUrl(){var e;return null!=(e=this.customUrl)?e:this.defaultUrl}getChecksum(){var e=(null!=(e=this.fallbackUrls)?e:[]).sort().join(",");return(0,s._DJB2)(this.customUrl+e)}}},2397:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._notifyVisibilityChanged=t._subscribeToVisiblityChanged=t._isUnloading=t._isCurrentlyVisible=void 0;r=r(6830);const s="foreground",n="background",i=[];let o=s,a=!1;t._isCurrentlyVisible=()=>o===s,t._isUnloading=()=>a,t._subscribeToVisiblityChanged=e=>{i.unshift(e)};t._notifyVisibilityChanged=t=>{t!==o&&(o=t,i.forEach(e=>e(t)))},(0,r._addWindowEventListenerSafe)("focus",()=>{(a=!1,t._notifyVisibilityChanged)(s)}),(0,r._addWindowEventListenerSafe)("blur",()=>(0,t._notifyVisibilityChanged)(n)),(0,r._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,t._notifyVisibilityChanged)("visible"===document.visibilityState?s:n)}),(0,r._addWindowEventListenerSafe)((0,r._getUnloadEvent)(),()=>{a=!0,(0,t._notifyVisibilityChanged)(n)})},6914:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){void 0===s&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&("get"in n?t.__esModule:!n.writable&&!n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){e[s=void 0===s?r:s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)},i=(Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=t.Log=t.EventLogger=t.Diagnostics=void 0,r(1845),r(1845));const o=r(8962),a=(Object.defineProperty(t,"Diagnostics",{enumerable:!0,get:function(){return o.Diagnostics}}),r(7770)),l=(Object.defineProperty(t,"EventLogger",{enumerable:!0,get:function(){return a.EventLogger}}),r(7512));Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return l.Log}});var u=r(8e3);const c=r(4534);Object.defineProperty(t,"Storage",{enumerable:!0,get:function(){return c.Storage}}),n(r(1845),t),n(r(2137),t),n(r(6427),t),n(r(694),t),n(r(8962),t),n(r(3539),t),n(r(5542),t),n(r(2922),t),n(r(2417),t),n(r(1406),t),n(r(1333),t),n(r(7512),t),n(r(7787),t),n(r(7410),t),n(r(7023),t),n(r(1405),t),n(r(1361),t),n(r(6830),t),n(r(5902),t),n(r(4143),t),n(r(2176),t),n(r(9122),t),n(r(1375),t),n(r(2636),t),n(r(3206),t),n(r(1637),t),n(r(8e3),t),n(r(586),t),n(r(1098),t),n(r(2059),t),n(r(1812),t),n(r(8578),t),n(r(4534),t),n(r(3401),t),n(r(6634),t),n(r(1881),t),n(r(8023),t),n(r(2397),t),n(r(3932),t),n(r(3091),t),Object.assign((0,i._getStatsigGlobal)(),{Log:l.Log,SDK_VERSION:u.SDK_VERSION})},2016:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoInit=void 0;const y=r(6914),_=r(2018);function b(e,t){var r;return null!=(r=t.get(e))?r:t.get(e.toLowerCase())}t.AutoInit=class{static attempt(t){var e,r,s,n,i;try{var o=(0,y._getWindowSafe)(),a=(0,y._getDocumentSafe)();if(o&&a&&a.currentScript){var l=a.currentScript.getAttribute("src"),u=null==(e=o.location)?void 0:e.href;if(l&&u){var c=new URL(l,u).searchParams,h=null!=(r=b("sdkKey",c))?r:b("apiKey",c);if(h){var d={},p=b("proxy",c),g=(p&&(d.networkConfig={api:p}),null==(n=null==(s=(0,y._getStatsigGlobal)())?void 0:s.instances)?void 0:n[h]);let e=null;if(e=g instanceof _.StatsigClient?g:e)t({sdkKey:h,client:e});else{var f=a.currentScript.dataset;const m=function(e,t){if(e)if(e in t&&"function"==typeof t[e])return t[e];return null}(null!=(i=f.onstatsiginit)?i:f.onStatsigInit,o),v=new _.StatsigClient(h,function(){var e=(0,y._getWindowSafe)();if(!e)return{};let t=e.statsigUser||{};var r=(t="object"!=typeof t?{}:t).custom||{},s=t.customIDs||{};return Object.assign(Object.assign({},t),{customIDs:Object.assign({},s),custom:Object.assign(Object.assign({},r),{useragent:e.navigator.userAgent,page_url:(0,y._getCurrentPageUrlSafe)()||"",language:null==(s=e.navigator)?void 0:s.language})})}(),d);v.initializeAsync().then(()=>{m&&m(v)}).catch(e=>{y.Log.error(e)}),t({sdkKey:h,client:v})}}}}}catch(e){y.Log.error("AutoInit failed",e)}}}},7262:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._resolveDeltasResponse=void 0;const s=r(6914);function n(e,t){null!=e&&e.forEach(e=>{delete t[e]})}t._resolveDeltasResponse=function(e,t){var r;return(t=(0,s._typedJsonParse)(t,"checksum","DeltasEvaluationResponse"))?(e=e,r=t,e=Object.assign(Object.assign(Object.assign({},e),r),{feature_gates:Object.assign(Object.assign({},e.feature_gates),r.feature_gates),layer_configs:Object.assign(Object.assign({},e.layer_configs),r.layer_configs),dynamic_configs:Object.assign(Object.assign({},e.dynamic_configs),r.dynamic_configs)}),n((e=r=e).deleted_gates,e.feature_gates),delete e.deleted_gates,n(r.deleted_configs,e.dynamic_configs),delete e.deleted_configs,n(r.deleted_layers,e.layer_configs),delete e.deleted_layers,r=e,(e=(0,s._DJB2Object)({feature_gates:r.feature_gates,dynamic_configs:r.dynamic_configs,layer_configs:r.layer_configs},2))===t.checksumV2?JSON.stringify(r):{hadBadDeltaChecksum:!0,badChecksum:e,badMergedConfigs:r,badFullResponse:t.deltas_full_response}):{hadBadDeltaChecksum:!0}}},4845:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6914),i=r(140),o=r(7095);t.default=class{constructor(e){this._sdkKey=e,this._rawValues=null,this._values=null,this._source="Uninitialized",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings=new Set}reset(){this._values=null,this._rawValues=null,this._source="Loading",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings.clear()}finalize(){this._values||(this._source="NoValues")}getValues(){return this._rawValues?(0,n._typedJsonParse)(this._rawValues,"has_updates","EvaluationStoreValues"):null}setValues(e,t){var r,s;return!!e&&null!=(s=(0,n._typedJsonParse)(e.data,"has_updates","EvaluationResponse"))&&(this._source=e.source,!0!==(null==s?void 0:s.has_updates)||(null!=(r=s.time)?r:0)<this._lcut||(this._rawValues=e.data,this._lcut=s.time,this._receivedAt=e.receivedAt,"init-v2"===s.response_format?this._values=new o.V2InitializeContainer(s):this._values=new i.V1InitializeContainer(s),this._bootstrapMetadata=this._extractBootstrapMetadata(e.source,s),e.source&&s.user&&this._setWarningState(t,s),n.SDKFlags.setFlags(this._sdkKey,null!=(r=s.sdk_flags)?r:{})),!0)}getWarnings(){if(0!==this._warnings.size)return Array.from(this._warnings)}getGate(e){e=this._values?this._values.getGate(e):null;return this._getDetailedStoreResult(e)}getConfig(e){e=this._values?this._values.getConfig(e):null;return this._getDetailedStoreResult(e)}getConfigList(){return this._values?this._values.getConfigList():[]}getLayer(e){e=this._values?this._values.getLayer(e):null;return this._getDetailedStoreResult(e)}getParamStore(e){e=this._values?this._values.getParamStore(e):null;return this._getDetailedStoreResult(e)}getSource(){return this._source}getExposureMapping(){var e;return null==(e=this._values)?void 0:e.getExposureMapping()}_extractBootstrapMetadata(e,t){return"Bootstrap"!==e?null:(e={},t.user&&(e.user=t.user),t.sdkInfo&&(e.generatorSDKInfo=t.sdkInfo),e.lcut=t.time,e)}_getDetailedStoreResult(e){return{result:e,details:this._getDetails(null==e)}}_setWarningState(e,t){var r,s=n.StableID.get(this._sdkKey);(null==(r=e.customIDs)?void 0:r.stableID)!==s&&(null!=(r=e.customIDs)&&r.stableID||s)?this._warnings.add("StableIDMismatch"):"user"in t&&(r=t.user,s=Object.assign(Object.assign({},e),{analyticsOnlyMetadata:void 0,privateAttributes:void 0}),(0,n._getFullUserHash)(s)!==(0,n._getFullUserHash)(r))&&this._warnings.add("PartialUserMatch")}getCurrentSourceDetails(){var e;return"Uninitialized"===this._source||"NoValues"===this._source?{reason:this._source}:(e={reason:this._source,lcut:this._lcut,receivedAt:this._receivedAt},0<this._warnings.size&&(e.warnings=Array.from(this._warnings)),e)}_getDetails(e){var t=this.getCurrentSourceDetails();let r=t.reason;var s=null!=(s=t.warnings)?s:[],e=("Bootstrap"===this._source&&0<s.length&&(r+=s[0]),"Uninitialized"!==r&&"NoValues"!==r&&(r=r+":"+(e?"Unrecognized":"Recognized")),"Bootstrap"===this._source&&null!=(s=this._bootstrapMetadata)?s:void 0);return e&&(t.bootstrapMetadata=e),Object.assign(Object.assign({},t),{reason:r})}}},8448:function(e,t,r){"use strict";var l=this&&this.__awaiter||function(e,o,a,l){return new(a=a||Promise)(function(r,t){function s(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(s,n)}i((l=l.apply(e,o||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});const u=r(6914),o=r(7262);class s extends u.NetworkCore{constructor(e,t){super(e,t);t=null==e?void 0:e.networkConfig;this._option=e,this._initializeUrlConfig=new u.UrlConfiguration(u.Endpoint._initialize,null==t?void 0:t.initializeUrl,null==t?void 0:t.api,null==t?void 0:t.initializeFallbackUrls)}fetchEvaluations(s,n,i,o,a){return l(this,void 0,void 0,function*(){var e,t=n?(0,u._typedJsonParse)(n,"has_updates","InitializeResponse"):null;let r={user:o,hash:null!=(e=null==(e=null==(e=this._option)?void 0:e.networkConfig)?void 0:e.initializeHashAlgorithm)?e:"djb2",deltasResponseRequested:!1,full_checksum:null};return null!=t&&t.has_updates&&(e=(null==t?void 0:t.hash_used)!==(null!=(e=null==(e=null==(e=this._option)?void 0:e.networkConfig)?void 0:e.initializeHashAlgorithm)?e:"djb2"),r=Object.assign(Object.assign({},r),{sinceTime:a&&!e?t.time:0,previousDerivedFields:"derived_fields"in t&&a?t.derived_fields:{},deltasResponseRequested:!0,full_checksum:t.full_checksum,partialUserMatchSinceTime:e?0:t.time})),this._fetchEvaluations(s,t,r,i)})}_fetchEvaluations(r,s,n,i){return l(this,void 0,void 0,function*(){var e,t=yield this.post({sdkKey:r,urlConfig:this._initializeUrlConfig,data:n,retries:2,isStatsigEncodable:!0,priority:i});return 204===(null==t?void 0:t.code)?'{"has_updates": false}':200!==(null==t?void 0:t.code)?null!=(e=null==t?void 0:t.body)?e:null:!0!==(null==s?void 0:s.has_updates)||!0!==(null==(e=t.body)?void 0:e.includes('"is_delta":true'))||!0!==n.deltasResponseRequested?t.body:"string"==typeof(e=(0,o._resolveDeltasResponse)(s,t.body))?e:this._fetchEvaluations(r,s,Object.assign(Object.assign(Object.assign({},n),e),{deltasResponseRequested:!1}),i)})}}t.default=s},3583:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._makeParamStoreGetter=void 0;const d=r(6914),p={disableExposureLog:!0};function g(e){return null==e||!1===e.disableExposureLog}function f(e,t){return null!=t&&!(0,d._isTypeMatch)(e,t)}t._makeParamStoreGetter=function(u,c,h){return(e,t)=>{if(null==c)return t;var r,s,n,i,o,a,l=c[e];if(null==l||null!=t&&(0,d._typeOf)(t)!==l.param_type)return t;switch(l.ref_type){case"static":return l.value;case"gate":return a=l,u.getFeatureGate(a.gate_name,g(h)?void 0:p).value?a.pass_value:a.fail_value;case"dynamic_config":return a=l,o=t,f(i=(i=u).getDynamicConfig(a.config_name,g(h)?void 0:p).get(a.param_name),o)?o:i;case"experiment":return o=l,i=t,f(n=(n=u).getExperiment(o.experiment_name,g(h)?void 0:p).get(o.param_name),i)?i:n;case"layer":return n=l,s=t,f(r=(r=u).getLayer(n.layer_name,g(h)?void 0:p).get(n.param_name),s)?s:r;default:return t}}}},8198:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,o,a,l){return new(a=a||Promise)(function(r,t){function s(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(s,n)}i((l=l.apply(e,o||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});const o=r(6914),a=r(4845),l=r(8448),n=r(3583),u=r(4131);class s extends o.StatsigClientBase{static instance(e){var t=(0,o._getStatsigGlobal)().instance(e);return t instanceof s?t:(o.Log.warn((0,o._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new s(null!=e?e:"",{}))}constructor(e,t,r=null){o.SDKType._setClientType(e,"javascript-client");var s,n=new l.default(r,e=>{this.$emt(e)}),e=(super(e,null!=(s=null==r?void 0:r.dataAdapter)?s:new u.StatsigEvaluationsDataAdapter,n,r),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(o.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(o.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(o.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(o.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(o.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(o.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new a.default(e),this._network=n,this._user=this._configureUser(t,r),this._sdkInstanceID=(0,o.getUUID)(),null!=(s=null==r?void 0:r.plugins)?s:[]);for(const i of e)i.bind(this)}initializeSync(e){var t;return"Uninitialized"!==this.loadingStatus?(0,o.createUpdateDetails)(!0,this._store.getSource(),-1,null,null,["MultipleInitializations",...null!=(t=this._store.getWarnings())?t:[]]):(this._logger.start(),this.updateUserSync(this._user,e))}initializeAsync(e){return i(this,void 0,void 0,function*(){return this._initializePromise||(this._initializePromise=this._initializeAsyncImpl(e)),this._initializePromise})}updateUserSync(t,e){var r=performance.now();try{return this._updateUserSyncImpl(t,e,r)}catch(e){t=e instanceof Error?e:new Error(String(e));return this._createErrorUpdateDetails(t,r)}}_updateUserSyncImpl(e,t,r){var s=[...null!=(s=this._store.getWarnings())?s:[]],e=(this._resetForUser(e),this.dataAdapter.getDataSync(this._user)),t=(null==e&&s.push("NoCachedValues"),this._store.setValues(e,this._user),this._finalizeUpdate(e),null==t?void 0:t.disableBackgroundCacheRefresh);return!0===t||null==t&&"Bootstrap"===(null==e?void 0:e.source)||this._runPostUpdate(null!=e?e:null,this._user),(0,o.createUpdateDetails)(!0,this._store.getSource(),performance.now()-r,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),s)}updateUserAsync(e,s){return i(this,void 0,void 0,function*(){var t=performance.now();try{return yield this._updateUserAsyncImpl(e,s)}catch(e){var r=e instanceof Error?e:new Error(String(e));return this._createErrorUpdateDetails(r,t)}})}_updateUserAsyncImpl(s,n){return i(this,void 0,void 0,function*(){this._resetForUser(s);var e=this._user,t=(o.Diagnostics._markInitOverallStart(this._sdkKey),this.dataAdapter.getDataSync(e));if(this._store.setValues(t,this._user),this._setStatus("Loading",t),t=yield this.dataAdapter.getDataAsync(t,e,n),e!==this._user)return(0,o.createUpdateDetails)(!1,this._store.getSource(),-1,new Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let r=!1;null!=t&&(o.Diagnostics._markInitProcessStart(this._sdkKey),r=this._store.setValues(t,this._user),o.Diagnostics._markInitProcessEnd(this._sdkKey,{success:r})),this._finalizeUpdate(t),r||(this._errorBoundary.attachErrorIfNoneExists(o.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),o.Diagnostics._markInitOverallEnd(this._sdkKey,r,this._store.getCurrentSourceDetails());e=o.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,o.createUpdateDetails)(r,this._store.getSource(),e,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){return{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:JSON.parse(JSON.stringify(this._user)),errorBoundary:this._errorBoundary,session:o.StatsigSession.get(this._sdkKey),stableID:o.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}checkGate(e,t){return this.getFeatureGate(e,t).value}logEvent(e,t,r){t="string"==typeof e?{eventName:e,value:t,metadata:r}:e;this.$emt({name:"log_event_called",event:t}),this._logger.enqueue(Object.assign(Object.assign({},t),{user:this._user,time:Date.now()}))}updateUserWithAnalyticsOnlyMetadata(e){this._user=this._configureUser(Object.assign(Object.assign({},this._user),{analyticsOnlyMetadata:e}),this._options)}_primeReadyRipcord(){this.$on("error",()=>{"Loading"===this.loadingStatus&&this._finalizeUpdate(null)})}_initializeAsyncImpl(e){return i(this,void 0,void 0,function*(){return o.Storage.isReady()||(yield o.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,e)})}_createErrorUpdateDetails(e,t){return(0,o.createUpdateDetails)(!1,this._store.getSource(),performance.now()-t,e,null,[...null!=(t=this._store.getWarnings())?t:[]])}_finalizeUpdate(e){this._store.finalize(),this._setStatus("Ready",e)}_runPostUpdate(e,t){this.dataAdapter.getDataAsync(e,t,{priority:"low"}).catch(e=>{o.Log.error("An error occurred after update.",e)})}_resetForUser(e){this._logger.reset(),this._store.reset(),this._user=this._configureUser(e,this._options)}_configureUser(e,t){var r,e=(0,o._normalizeUser)(e,t);const s=null==(t=e.customIDs)?void 0:t.stableID;return s&&((r=null==(r=(t=this.storageProvider).isReadyResolver)?void 0:r.call(t))?r.then(()=>o.StableID.setOverride(s,this._sdkKey),()=>o.StableID.setOverride(s,this._sdkKey)):o.StableID.setOverride(s,this._sdkKey)),0<Object.keys(this._possibleFirstTouchMetadata).length&&(e.analyticsOnlyMetadata=Object.assign(Object.assign({},e.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),e}_getFeatureGateImpl(e,t){var{result:r,details:s}=this._store.getGate(e),s=(0,o._makeFeatureGate)(e,s,r),n=null==(n=null==(r=this.overrideAdapter)?void 0:r.getGateOverride)?void 0:n.call(r,s,this._user,t),r=null!=n?n:s;return this._enqueueExposure(e,(0,o._createGateExposure)(this._user,r,this._store.getExposureMapping()),t),this.$emt({name:"gate_evaluation",gate:r}),r}_getDynamicConfigImpl(e,t){var{result:r,details:s}=this._store.getConfig(e),s=(0,o._makeDynamicConfig)(e,s,r),n=null==(n=null==(r=this.overrideAdapter)?void 0:r.getDynamicConfigOverride)?void 0:n.call(r,s,this._user,t),r=null!=n?n:s;return this._enqueueExposure(e,(0,o._createConfigExposure)(this._user,r,this._store.getExposureMapping()),t),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:r}),r}_getExperimentImpl(e,t){var{result:r,details:s}=this._store.getConfig(e),s=(0,o._makeExperiment)(e,s,r),n=(null!=s.__evaluation&&(s.__evaluation.secondary_exposures=(0,o._mapExposures)(null!=(r=null==(r=s.__evaluation)?void 0:r.secondary_exposures)?r:[],this._store.getExposureMapping())),null==(n=null==(r=this.overrideAdapter)?void 0:r.getExperimentOverride)?void 0:n.call(r,s,this._user,t)),r=null!=n?n:s;return this._enqueueExposure(e,(0,o._createConfigExposure)(this._user,r,this._store.getExposureMapping()),t),this.$emt({name:"experiment_evaluation",experiment:r}),r}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(t,r){var{result:e,details:s}=this._store.getLayer(t),s=(0,o._makeLayer)(t,s,e),n=null==(n=null==(e=this.overrideAdapter)?void 0:e.getLayerOverride)?void 0:n.call(e,s,this._user,r);null!=r&&r.disableExposureLog&&this._logger.incrementNonExposureCount(t);const i=(0,o._mergeOverride)(s,n,null!=(e=null==n?void 0:n.__value)?e:s.__value,e=>{null!=r&&r.disableExposureLog||this._enqueueExposure(t,(0,o._createLayerParameterExposure)(this._user,i,e,this._store.getExposureMapping()),r)});return this.$emt({name:"layer_evaluation",layer:i}),i}_getParameterStoreImpl(e,t){var{result:r,details:s}=this._store.getParamStore(e),e=(this._logger.incrementNonExposureCount(e),{name:e,details:s,__configuration:r,get:(0,n._makeParamStoreGetter)(this,r,t)}),r=null==(r=null==(s=this.overrideAdapter)?void 0:s.getParamStoreOverride)?void 0:r.call(s,e,t);return null!=r&&(e.__configuration=r.config,e.details=r.details,e.get=(0,n._makeParamStoreGetter)(this,r.config,t)),e}}t.default=s},4131:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,o,a,l){return new(a=a||Promise)(function(r,t){function s(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(s,n)}i((l=l.apply(e,o||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigEvaluationsDataAdapter=void 0;const s=r(6914),n=r(8448);class o extends s.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(e,t,r){super.attach(e,t,r),null!==r&&r instanceof n.default?this._network=r:this._network=new n.default(null!=t?t:{})}getDataAsync(e,t,r){return this._getDataAsyncImpl(e,(0,s._normalizeUser)(t,this._options),r)}prefetchData(e,t){return this._prefetchDataImpl(e,t)}setData(e){var t=(0,s._typedJsonParse)(e,"has_updates","data");t&&"user"in t?super.setData(e,t.user):s.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(e,t){super.setData(e,t)}_fetchFromNetwork(t,r,s,n){return i(this,void 0,void 0,function*(){var e=yield null==(e=this._network)?void 0:e.fetchEvaluations(this._getSdkKey(),t,null==s?void 0:s.priority,r,n);return null!=e?e:null})}_getCacheKey(e){e=(0,s._getStorageKey)(this._getSdkKey(),e,null==(e=this._options)?void 0:e.customUserCacheKeyFunc);return`${s.DataAdapterCachePrefix}.${this._cacheSuffix}.`+e}_isCachedResultValidFor204(e,t){return null!=e.fullUserHash&&e.fullUserHash===(0,s._getFullUserHash)(t)}}t.StatsigEvaluationsDataAdapter=o},140:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.V1InitializeContainer=void 0;const s=r(6914);t.V1InitializeContainer=class{constructor(e){this._values=e}getGate(e){return this._getResultFromLookup(this._values.feature_gates,e)}getConfig(e){return this._getResultFromLookup(this._values.dynamic_configs,e)}getLayer(e){return this._getResultFromLookup(this._values.layer_configs,e)}getParamStore(e){return this._getResultFromLookup(this._values.param_stores,e)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(e,t){var r;return e&&null!=(r=null!=(r=e[t])?r:e[(0,s._DJB2)(t)])?r:null}}},7095:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.V2InitializeContainer=void 0;const s=r(6914);t.V2InitializeContainer=class{constructor(e){this._values=e}getGate(e){var t=this._getResultFromLookup(this._values.feature_gates,e);return t?{name:e,value:!0===t.v,rule_id:null!=(e=t.r)?e:"default",secondary_exposures:null!=(e=t.s)?e:[],id_type:null!=(e=t.i)?e:""}:null}getConfig(e){var t=this._getResultFromLookup(this._values.dynamic_configs,e);return t?{name:e,value:null!=(e=this._values.values[t.v])?e:{},rule_id:t.r,secondary_exposures:null!=(e=t.s)?e:[],id_type:null!=(e=t.i)?e:"",is_user_in_experiment:!0===t.ue,passed:!0===t.p,group_name:null!=(e=t.gn)?e:void 0,is_experiment_active:!0===t.ea,group:t.r,is_device_based:"stableID"===t.i}:null}getLayer(e){var t=this._getResultFromLookup(this._values.layer_configs,e);return t?{name:e,value:null!=(e=this._values.values[t.v])?e:{},rule_id:t.r,secondary_exposures:null!=(e=t.s)?e:[],is_user_in_experiment:!0===t.ue,group_name:null!=(e=t.gn)?e:void 0,is_experiment_active:!0===t.ea,group:t.r,is_device_based:"stableID"===t.i,allocated_experiment_name:null!=(e=t.ae)?e:"",explicit_parameters:null!=(e=t.ep)?e:[],undelegated_secondary_exposures:null!=(e=t.us)?e:[],parameter_rule_ids:t.pr}:null}getParamStore(e){return this._getResultFromLookup(this._values.param_stores,e)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(e,t){var r;return e&&null!=(r=null!=(r=e[t])?r:e[(0,s._DJB2)(t)])?r:null}}},2018:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){void 0===s&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&("get"in n?t.__esModule:!n.writable&&!n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){e[s=void 0===s?r:s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)},i=(Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigClient=void 0,r(6914)),o=r(8198),n=(t.StatsigClient=o.default,n(r(6914),t),Object.assign((0,i._getStatsigGlobal)(),{StatsigClient:o.default}));t.default=n},8788:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SessionReplay=t.runStatsigSessionReplay=t.StatsigSessionReplayPlugin=void 0;const s=r(6914);var n=r(4069);const i=r(5967);function o(e,t){new a(e,t)}t.StatsigSessionReplayPlugin=class{constructor(e){this.options=e,this.__plugin="session-replay"}bind(e){o(e,this.options)}},t.runStatsigSessionReplay=o;class a extends n.SessionReplayBase{constructor(e,t){super(e,t),this._client.$on("values_updated",()=>{var e;this._wasStopped||this._attemptToStartRecording(null==(e=this._options)?void 0:e.forceRecording)}),this._attemptToStartRecording(null==(e=this._options)?void 0:e.forceRecording)}_shutdown(e){super._shutdownImpl(e)}_attemptToStartRecording(e=!1){var t;this._totalLogs>=i.MAX_LOGS||(!0===(null==(t=this._client.getContext().values)?void 0:t.recording_blocked)||!e&&!0!==(null==t?void 0:t.can_record_session)||!1===(null==t?void 0:t.passes_session_recording_targeting)?this._shutdown():this._replayer.isRecording()||(this._wasStopped=!1,s.StatsigMetadataProvider.add({isRecordingSession:"true"}),this._replayer.record((e,t)=>this._onRecordingEvent(e,t),null!=(t=null==(e=this._options)?void 0:e.rrwebConfig)?t:{},()=>{this._shutdown()})))}}t.SessionReplay=a},4069:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SessionReplayBase=t.forceStartRecording=t.startRecording=t.stopRecording=void 0;const u=r(6914),s=r(759),c=r(5967);function n(e){var t=null==e?(0,u._getStatsigGlobal)().firstSRInstance:null==(t=null==(t=(0,u._getStatsigGlobal)())?void 0:t.srInstances)?void 0:t[e];return t instanceof i?t:null}t.stopRecording=function(e){null!=(e=n(e))&&e.stopRecording()},t.startRecording=function(e){null!=(e=n(e))&&e.startRecording()},t.forceStartRecording=function(e){null!=(e=n(e))&&e.forceStartRecording()};class i{constructor(e,t){this._sessionData={startTime:-1,endTime:0,clickCount:0},this._events=[],this._wasStopped=!1,this._currentEventIndex=0,this._totalLogs=0,this._client=e,this._options=t;var{sdkKey:e,errorBoundary:t}=this._client.getContext();this._errorBoundary=t,this._errorBoundary.wrap(this),this._replayer=new s.SessionReplayClient,this._client.$on("pre_shutdown",()=>this._shutdown()),this._client.on("session_expired",()=>{this._shutdown("session_expired")}),(0,u._isServerEnv)()||((t=(0,u._getStatsigGlobal)()).srInstances=Object.assign(Object.assign({},t.srInstances),{[e]:this}),t.firstSRInstance)||(t.firstSRInstance=this),this._currentSessionID=this._getSessionIdFromClient(),this._subscribeToVisibilityChanged()}forceStartRecording(){this._wasStopped=!1,this._attemptToStartRecording(!0)}stopRecording(){this._wasStopped=!0,this._shutdown()}startRecording(){var e;this._wasStopped=!1,this._attemptToStartRecording(null==(e=this._options)?void 0:e.forceRecording)}isRecording(){return this._replayer.isRecording()}_logRecording(e){0!==this._events.length&&(e=(0,u._isUnloading)()?"is_leaving_page":e,this._logRecordingWithSessionID(this._currentSessionID,e))}_onVisibilityChanged(e){"background"===e&&(this._logRecording(),this._client.flush().catch(e=>{this._errorBoundary.logError("SR::visibility",e)}))}_subscribeToVisibilityChanged(){const r=this._client.getContext()["sdkKey"];(0,u._subscribeToVisiblityChanged)(e=>{var t=null==(t=null==(t=(0,u._getStatsigGlobal)())?void 0:t.srInstances)?void 0:t[r];t instanceof i&&t._onVisibilityChanged(e)})}_logRecordingWithSessionID(t,r){var s=this._sessionData;if(0!==this._events.length){var n=JSON.stringify(this._events),i=(0,c._slicePayload)(n),o=1<i.length?(0,u.getUUID)():null;for(let e=0;e<i.length;e++){var a=i[e],l=(0,c._makeLoggableRrwebEvent)(a,n,t,s,this._client.getContext().sdkInstanceID);null!=o&&(0,c._appendSlicedMetadata)(l.metadata,o,e,i.length,a.length),r&&(l.metadata[r]="true"),this._totalLogs++,this._client.logEvent(l),null!=o&&this._client.flush().catch(e=>{u.Log.error(e)})}this._events=[],this._totalLogs>c.MAX_LOGS&&this._shutdown()}}_bumpSessionIdleTimerAndLogRecording(){this._getSessionIdFromClient(),this._logRecording()}_getSessionIdFromClient(){return this._client.getContext().session.data.sessionID}_shutdownImpl(e){if(this._replayer.isRecording()){this._replayer.stop();const t=()=>{u.StatsigMetadataProvider.add({isRecordingSession:"false"}),this._client.off("logs_flushed",t)};this._client.$on("logs_flushed",t)}0!==this._events.length&&this._logRecording(e),"session_expired"===e&&(this._currentEventIndex=0,this._sessionData=this._makeEmptySessionData())}_makeEmptySessionData(){return{startTime:-1,endTime:0,clickCount:0}}_onRecordingEvent(e,t){var r;this._currentSessionID!==this._getSessionIdFromClient()?this._shutdown("session_expired"):this._totalLogs>=c.MAX_LOGS?this._shutdown():(e.eventIndex=this._currentEventIndex++,this._sessionData.clickCount+=t.clickCount,this._sessionData.startTime=-1===this._sessionData.startTime?t.startTime:Math.min(this._sessionData.startTime,t.startTime),this._sessionData.endTime=Math.max(this._sessionData.endTime,t.endTime),(t=(0,u._fastApproxSizeOf)(e,c.MAX_INDIVIDUAL_EVENT_BYTES))>c.MAX_INDIVIDUAL_EVENT_BYTES?u.Log.warn(`SessionReplay event is too large (~${t} bytes) and will not be logged`,e):(r=(0,u._fastApproxSizeOf)(this._events,c.REPLAY_ENQUEUE_TRIGGER_BYTES),this._events.push(e),r+t<c.REPLAY_ENQUEUE_TRIGGER_BYTES||((0,u._isCurrentlyVisible)()?this._bumpSessionIdleTimerAndLogRecording():this._logRecording())))}}t.SessionReplayBase=i},759:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SessionReplayClient=void 0;const s=r(5980),o=r(6914);t.SessionReplayClient=class{constructor(){this._startTimestamp=null,this._endTimestamp=null}record(n,e,t,i=!1){null==(0,o._getDocumentSafe)()||(this._startTimestamp=null,this._endTimestamp=null,this._stopCallback=t,this._stopFn)||(this._stopFn=(t=(e,t)=>{var r;i?this._startTimestamp=!t&&null!=(r=this._startTimestamp)?r:e.timestamp:null==this._startTimestamp&&(this._startTimestamp=e.timestamp),this._endTimestamp=e.timestamp;let s=0;3!==(r=e).type||2!==r.data.source||2!==r.data.type&&4!==r.data.type||s++,n(Object.assign(Object.assign({},e),{eventIndex:0}),{startTime:this._startTimestamp,endTime:this._endTimestamp,clickCount:s},null!=t&&t),144e5<this._endTimestamp-this._startTimestamp&&(null!=(e=this._stopFn)&&e.call(this),this._stopCallback)&&this._stopCallback()},e=e,i?(0,s.record)(Object.assign(Object.assign({},e),{emit:t,checkoutEveryNms:3e4})):(0,s.record)(Object.assign(Object.assign({},e),{emit:t}))))}stop(){this._stopFn&&(this._stopFn(),this._stopFn=void 0)}isRecording(){return null!=this._stopFn}}},5967:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._appendSlicedMetadata=t._slicePayload=t._makeLoggableRrwebEvent=t.MAX_LOGS=t.MAX_INDIVIDUAL_EVENT_BYTES=t.REPLAY_ENQUEUE_TRIGGER_BYTES=void 0;const i=r(6914);t.REPLAY_ENQUEUE_TRIGGER_BYTES=10240,t.MAX_INDIVIDUAL_EVENT_BYTES=10485760,t.MAX_LOGS=1e4,t._makeLoggableRrwebEvent=function(e,t,r,s,n){return{eventName:"statsig::session_recording",value:r,metadata:{session_start_ts:String(s.startTime),session_end_ts:String(s.endTime),clicks_captured_cumulative:String(s.clickCount),rrweb_events:e,rrweb_payload_size:String(t.length),session_replay_sdk_version:i.SDK_VERSION,sdk_instance_id:n}}},t._slicePayload=function(t){var r=[];for(let e=0;e<t.length;e+=1048576)r.push(t.slice(e,e+1048576));return r},t._appendSlicedMetadata=function(e,t,r,s,n){e.sliced_id=t,e.slice_index=String(r),e.slice_count=String(s),e.slice_byte_size=String(n)}},3691:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TriggeredSessionReplay=t.runStatsigTriggeredSessionReplay=t.StatsigTriggeredSessionReplayPlugin=void 0;const n=r(6914);var s=r(4069);const i=r(5967);function o(e,t){new a(e,t)}t.StatsigTriggeredSessionReplayPlugin=class{constructor(e){this.options=e,this.__plugin="triggered-session-replay"}bind(e){o(e,this.options)}},t.runStatsigTriggeredSessionReplay=o;class a extends s.SessionReplayBase{constructor(e,t){super(e,t),this._runningEventData=[],this._isActiveRecording=!1,this._subscribeToClientEvents(t),null!=t&&t.autoStartRecording?this._attemptToStartRecording(null==(e=this._options)?void 0:e.forceRecording):null!=t&&t.keepRollingWindow&&this._attemptToStartRollingWindow()}_subscribeToClientEvents(e){this._subscribeToValuesUpdated(e),this._subscribeToLogEventCalled(),this._subscribeToGateEvaluation(),this._subscribeToExperimentEvaluation()}_subscribeToValuesUpdated(t){this._client.$on("values_updated",()=>{var e;this._wasStopped||(null!=t&&t.autoStartRecording?this._attemptToStartRecording(null==(e=this._options)?void 0:e.forceRecording):null!=t&&t.keepRollingWindow&&this._attemptToStartRollingWindow())})}_subscribeToLogEventCalled(){this._client.$on("log_event_called",e=>{var t;this._wasStopped||!1===(null==(t=this._client.getContext().values)?void 0:t.passes_session_recording_targeting)||null==(null==t?void 0:t.session_recording_event_triggers)||null==(t=t.session_recording_event_triggers[e.event.eventName])||!1===t.passes_sampling||null!=(t=t.values)&&!t.includes(String(null!=(t=e.event.value)?t:""))||this._attemptToStartRecording(!0)})}_subscribeToGateEvaluation(){this._client.$on("gate_evaluation",e=>{this._tryStartExposureRecording(e.gate.name,String(e.gate.value))})}_subscribeToExperimentEvaluation(){this._client.$on("experiment_evaluation",e=>{this._tryStartExposureRecording(e.experiment.name,null!=(e=e.experiment.groupName)?e:"")})}_tryStartExposureRecording(e,t){var r,s;this._wasStopped||!1===(null==(s=this._client.getContext().values)?void 0:s.passes_session_recording_targeting)||null==(null==s?void 0:s.session_recording_exposure_triggers)||null==(r=null!=(r=s.session_recording_exposure_triggers[e])?r:s.session_recording_exposure_triggers[(0,n._DJB2)(e)])||!1===r.passes_sampling||null!=(s=r.values)&&!s.includes(t)||this._attemptToStartRecording(!0)}forceStartRecording(){super.forceStartRecording()}stopRecording(){this._isActiveRecording=!1,this._runningEventData=[],super.stopRecording()}_handleStartActiveRecording(){if(this._isActiveRecording=!0,0!==this._runningEventData.length){var t=this._runningEventData.map(e=>e.events).flat();for(let e=0;e<t.length;e++)t[e].event.eventIndex=e,this._sessionData.clickCount+=t[e].data.clickCount,this._sessionData.startTime=-1===this._sessionData.startTime?t[e].data.startTime:Math.min(this._sessionData.startTime,t[e].data.startTime),this._sessionData.endTime=Math.max(this._sessionData.endTime,t[e].data.endTime);this._events=t.map(e=>e.event),this._currentEventIndex=t.length,(0,n._isCurrentlyVisible)()?this._bumpSessionIdleTimerAndLogRecording():this._logRecording(),this._replayer.stop()}}_shutdown(e){this._isActiveRecording=!1,this._runningEventData=[],super._shutdownImpl(e)}_onRecordingEvent(e,t,r){if(!this._isActiveRecording)return this._currentSessionID!==this._getSessionIdFromClient()?void this._shutdown("session_expired"):void(r&&4===e.type||0===this._runningEventData.length?(1<this._runningEventData.length&&this._runningEventData.shift(),this._runningEventData.push({events:[{event:e,data:t}]})):this._runningEventData[this._runningEventData.length-1].events.push({event:e,data:t}));super._onRecordingEvent(e,t)}_attemptToStartRollingWindow(){var e=this._client.getContext().values;!1===(null==e?void 0:e.passes_session_recording_targeting)?this._shutdown():this._replayer.isRecording()||this._replayer.record((e,t,r)=>this._onRecordingEvent(e,t,r),null!=(e=null==(e=this._options)?void 0:e.rrwebConfig)?e:{},()=>{this._shutdown()},!0)}_attemptToStartRecording(e=!1){var t;this._totalLogs>=i.MAX_LOGS||(!0===(null==(t=this._client.getContext().values)?void 0:t.recording_blocked)||!e&&!0!==(null==t?void 0:t.can_record_session)||!1===(null==t?void 0:t.passes_session_recording_targeting)?this._shutdown():(this._handleStartActiveRecording(),this._wasStopped=!1,n.StatsigMetadataProvider.add({isRecordingSession:"true"}),this._replayer.isRecording()||this._replayer.record((e,t,r)=>this._onRecordingEvent(e,t,r),null!=(t=null==(e=this._options)?void 0:e.rrwebConfig)?t:{},()=>{this._shutdown()})))}}t.TriggeredSessionReplay=a},3447:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forceStartRecording=t.stopRecording=t.startRecording=t.StatsigTriggeredSessionReplayPlugin=t.StatsigSessionReplayPlugin=t.runStatsigTriggeredSessionReplay=t.runStatsigSessionReplay=t.SessionReplay=t.SessionReplayClient=void 0;var s=r(6914);const n=r(8788),i=(Object.defineProperty(t,"SessionReplay",{enumerable:!0,get:function(){return n.SessionReplay}}),Object.defineProperty(t,"StatsigSessionReplayPlugin",{enumerable:!0,get:function(){return n.StatsigSessionReplayPlugin}}),Object.defineProperty(t,"runStatsigSessionReplay",{enumerable:!0,get:function(){return n.runStatsigSessionReplay}}),r(4069)),o=(Object.defineProperty(t,"forceStartRecording",{enumerable:!0,get:function(){return i.forceStartRecording}}),Object.defineProperty(t,"startRecording",{enumerable:!0,get:function(){return i.startRecording}}),Object.defineProperty(t,"stopRecording",{enumerable:!0,get:function(){return i.stopRecording}}),r(759)),a=(Object.defineProperty(t,"SessionReplayClient",{enumerable:!0,get:function(){return o.SessionReplayClient}}),r(3691));Object.defineProperty(t,"StatsigTriggeredSessionReplayPlugin",{enumerable:!0,get:function(){return a.StatsigTriggeredSessionReplayPlugin}}),Object.defineProperty(t,"runStatsigTriggeredSessionReplay",{enumerable:!0,get:function(){return a.runStatsigTriggeredSessionReplay}}),Object.assign((0,s._getStatsigGlobal)(),{SessionReplayClient:o.SessionReplayClient,SessionReplay:n.SessionReplay,runStatsigSessionReplay:n.runStatsigSessionReplay,runStatsigTriggeredSessionReplay:a.runStatsigTriggeredSessionReplay,StatsigSessionReplayPlugin:n.StatsigSessionReplayPlugin,StatsigTriggeredSessionReplayPlugin:a.StatsigTriggeredSessionReplayPlugin,startRecording:i.startRecording,stopRecording:i.stopRecording,forceStartRecording:i.forceStartRecording})},4535:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoCapture=t.runStatsigAutoCapture=t.StatsigAutoCapturePlugin=void 0;const c=r(6914),o=r(5423),n=r(8872),i=r(7875),a=r(6714),l=r(4716),u=r(2678),h=r(5864),d=r(3769),p=r(9900),g={submit:o.AutoCaptureEventName.FORM_SUBMIT,click:o.AutoCaptureEventName.CLICK,copy:o.AutoCaptureEventName.COPY,cut:o.AutoCaptureEventName.COPY};function s(e,t){var r=e.getContext()["sdkKey"];if(!(0,c._isServerEnv)()){var s=null!=(s=(0,c._getStatsigGlobal)().acInstances)?s:{};if(s[r])return s[r]}return new f(e,t)}t.StatsigAutoCapturePlugin=class{constructor(e){this._options=e,this.__plugin="auto-capture"}bind(e){s(e,this._options)}},t.runStatsigAutoCapture=s;class f{constructor(e,t){this._client=e,this._disabledEvents={},this._previousLoggedPageViewUrl=null,this._hasLoggedPageViewEnd=!1,this._pageViewLogged=!1;var{sdkKey:e,errorBoundary:r,values:s}=e.getContext(),r=(this._options=t,this._disabledEvents=null!=(s=null==(s=null==s?void 0:s.auto_capture_settings)?void 0:s.disabled_events)?s:{},this._errorBoundary=r,this._errorBoundary.wrap(this,"autoCapture:"),this._client.$on("values_updated",()=>{var e=this._client.getContext().values;this._disabledEvents=null!=(e=null==(e=null==e?void 0:e.auto_capture_settings)?void 0:e.disabled_events)?e:this._disabledEvents}),this._engagementManager=new a.EngagementManager,this._rageClickManager=new l.default,this._webVitalsManager=new u.WebVitalsManager(this._enqueueAutoCapture.bind(this),r),this._deadClickManager=new i.default(this._enqueueAutoCapture.bind(this),r),this._consoleLogManager=new n.ConsoleLogManager(this._enqueueAutoCapture.bind(this),r,null!=(s=null==t?void 0:t.consoleLogAutoCaptureSettings)?s:{enabled:!1}),this._eventFilterFunc=null==t?void 0:t.eventFilterFunc,(0,c._getDocumentSafe)());(0,c._isServerEnv)()||((t=null!=(s=(__STATSIG__=(0,c._getStatsigGlobal)()).acInstances)?s:{})[e]=this,__STATSIG__.acInstances=t),"loading"===(null==r?void 0:r.readyState)?r.addEventListener("DOMContentLoaded",()=>this._initialize()):this._initialize()}_addEventHandlers(){var e=(0,c._getWindowSafe)(),t=(0,c._getDocumentSafe)();if(e&&t){const r=(e,t=!0)=>{e=e||(null==(e=(0,c._getWindowSafe)())?void 0:e.event);this._autoLogEvent(e),t&&this._engagementManager.bumpInactiveTimer(),"click"===e.type&&e instanceof MouseEvent&&this._rageClickManager.isRageClick(e.clientX,e.clientY,Date.now())&&this._logRageClick(e)};(0,h._registerEventHandler)(t,"click",e=>r(e)),(0,h._registerEventHandler)(t,"submit",e=>r(e)),(0,h._registerEventHandler)(t,"copy",e=>r(e)),(0,h._registerEventHandler)(t,"cut",e=>r(e)),(0,h._registerEventHandler)(e,"error",e=>r(e,!1)),(0,h._registerEventHandler)(e,"pagehide",()=>this._tryLogPageViewEnd()),(0,h._registerEventHandler)(e,"beforeunload",()=>this._tryLogPageViewEnd())}}_addPageViewTracking(){var e=(0,c._getWindowSafe)(),t=(0,c._getDocumentSafe)();e&&t&&((0,h._registerEventHandler)(e,"popstate",()=>this._tryLogPageView("popstate")),window.history.pushState=new Proxy(window.history.pushState,{apply:(e,t,[r,s,n])=>{e.apply(t,[r,s,n]),this._tryLogPageView("pushstate")}}),window.history.replaceState=new Proxy(window.history.replaceState,{apply:(e,t,[r,s,n])=>{e.apply(t,[r,s,n]),this._tryLogPageView("replacestate")}}),this._tryLogPageView())}_autoLogEvent(e){var t=null==(t=e.type)?void 0:t.toLowerCase();if("error"===t&&e instanceof ErrorEvent)this._logError(e);else{var r=(0,h._getTargetNode)(e);if(r){t=g[t];if(t){var s=t===o.AutoCaptureEventName.COPY;if((0,h._shouldLogEvent)(e,r,s)){var n={};if(s){s=null==(s=null==(s=(0,c._getWindowSafe)())?void 0:s.getSelection())?void 0:s.toString();if(!s)return;null!=(i=this._options)&&i.captureCopyText&&(n.selectedText=(0,h._sanitizeString)(s));var i=e.type||"clipboard";n.clipType=i}var{value:s,metadata:e}=(0,d._gatherEventData)(r),i=(e.isOutbound&&this._engagementManager.setMeaningfulEngagementOccurred(!0),Object.assign(n,e),(0,p._gatherAllMetadata)((0,h._getSafeUrl)()));this._enqueueAutoCapture(t,s,Object.assign(Object.assign({},i),n))}}}}}_initialize(){this._webVitalsManager.startTracking(),this._deadClickManager.startTracking(),this._consoleLogManager.startTracking(),this._engagementManager.startInactivityTracking(()=>this._tryLogPageViewEnd(!0)),this._addEventHandlers(),this._addPageViewTracking(),this._logSessionStart(),this._logPerformance()}_logError(e){var t=(null==e?void 0:e.error)||{};let r=t;if("object"==typeof t)try{r=JSON.stringify(t)}catch(e){r="function"==typeof(null==t?void 0:t.toString)?t.toString():"Unknown Error"}this._enqueueAutoCapture(o.AutoCaptureEventName.ERROR,e.message,{message:e.message,filename:e.filename,lineno:e.lineno,colno:e.colno,error_str:r})}_logSessionStart(){var e=this._getSessionFromClient();try{this._isNewSession(e)&&this._enqueueAutoCapture(o.AutoCaptureEventName.SESSION_START,(0,h._getSanitizedPageUrl)(),Object.assign({sessionID:e.data.sessionID},(0,p._gatherAllMetadata)((0,h._getSafeUrl)())),{flushImmediately:!0})}catch(e){this._errorBoundary.logError("AC::logSession",e)}}_tryLogPageView(e){var t=(0,h._getSafeUrl)(),r=this._previousLoggedPageViewUrl;r&&t.pathname===r.pathname||(this._engagementManager.setLastPageViewTime(Date.now()),r=(this._hasLoggedPageViewEnd=!1,p._gatherAllMetadata)(t),e&&(r.navigation_type=e),this._previousLoggedPageViewUrl&&(r.last_page_view_url=this._previousLoggedPageViewUrl.href),this._pageViewLogged||(this._updateClientWithPossibleFirstTouchMetadata(),this._pageViewLogged=!0),this._enqueueAutoCapture(o.AutoCaptureEventName.PAGE_VIEW,(0,h._getSanitizedPageUrl)(),r,{flushImmediately:!0,addNewSessionMetadata:!0}),this._previousLoggedPageViewUrl=t,this._engagementManager.bumpInactiveTimer())}_tryLogPageViewEnd(e=!1){this._hasLoggedPageViewEnd||(this._hasLoggedPageViewEnd=!0,this._enqueueAutoCapture(o.AutoCaptureEventName.PAGE_VIEW_END,(0,h._getSanitizedPageUrl)(),Object.assign(Object.assign({},this._engagementManager.getPageViewEndMetadata()),{dueToInactivity:e}),{flushImmediately:!0}))}_logRageClick(e){var t,r;(0,h._shouldLogEvent)(e,e.target)&&({value:t,metadata:r}=(0,d._gatherEventData)(e.target),this._enqueueAutoCapture(o.AutoCaptureEventName.RAGE_CLICK,t,Object.assign(Object.assign({x:e.clientX,y:e.clientY,timestamp:Date.now()},(0,p._gatherAllMetadata)((0,h._getSafeUrl)())),r)))}_logPerformance(){const r=(0,c._getWindowSafe)();r&&r.performance&&void 0!==(null===r||void 0===r?void 0:r.performance)&&"function"==typeof r.performance.getEntriesByType&&"function"==typeof r.performance.getEntriesByName&&setTimeout(()=>{var e={},t=r.performance.getEntriesByType("navigation"),t=(t&&0<t.length&&t[0]instanceof PerformanceNavigationTiming&&(t=t[0],e.load_time_ms=t.duration,e.dom_interactive_time_ms=t.domInteractive-t.startTime,e.redirect_count=t.redirectCount,e.transfer_bytes=t.transferSize),r.performance.getEntriesByName("first-contentful-paint"));t&&0<t.length&&t[0]instanceof PerformancePaintTiming&&(e.first_contentful_paint_time_ms=t[0].startTime),this._enqueueAutoCapture(o.AutoCaptureEventName.PERFORMANCE,(0,h._getSanitizedPageUrl)(),Object.assign(Object.assign({},e),(0,p._getNetworkInfo)()))},1)}_enqueueAutoCapture(e,t,r,s){var n,i,o;if(t){var a=e.slice("auto_capture::".length);if(!this._disabledEvents[e]&&!this._disabledEvents[a]){a=this._getSessionFromClient();try{var l=Object.assign({sessionID:a.data.sessionID,page_url:null!=(o=null==(i=null==(n=(0,c._getWindowSafe)())?void 0:n.location)?void 0:i.href)?o:""},r),u=(null!=s&&s.addNewSessionMetadata&&(l.isNewSession=String(this._isNewSession(a))),{eventName:e,value:t,metadata:l});this._eventFilterFunc&&!this._eventFilterFunc(u)||(this._client.logEvent(u),null!=s&&s.flushImmediately&&this._flushImmediately())}catch(e){this._errorBoundary.logError("AC::enqueue",e)}}}}_updateClientWithPossibleFirstTouchMetadata(){var e=this._client;e._possibleFirstTouchMetadata=(0,p._getPossibleFirstTouchMetadata)((0,h._getSafeUrl)()),0<Object.keys(e._possibleFirstTouchMetadata).length&&(e._user=Object.assign(Object.assign({},e._user),{analyticsOnlyMetadata:Object.assign(Object.assign({},e._possibleFirstTouchMetadata),e._user.analyticsOnlyMetadata)}))}_flushImmediately(){this._client.flush().catch(e=>{c.Log.error(e)})}_isNewSession(e){return Math.abs(e.data.startTime-Date.now())<1e3}_getSessionFromClient(){return this._client.getContext().session}static getAllMetadata(){return(0,p._gatherAllMetadata)((0,h._getSafeUrl)())}}t.AutoCapture=f},5423:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoCaptureEventName=void 0,t.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:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleLogManager=void 0;const s=r(6914),n=r(5423),a=r(5864),l=r(8135),i=r(9900),u={trace:10,debug:20,log:30,info:30,warn:40,error:50};t.ConsoleLogManager=class{constructor(e,t,r){this._enqueueFn=e,this._errorBoundary=t,this._options=r,this._restoreFns=[],this._isTracking=!1,this._logLevel="info",this.__source="js-auto-capture",this._logLevel=null!=(e=this._options.logLevel)?e:"info",this._maxKeys=null!=(t=this._options.maxKeys)?t:10,this._maxDepth=null!=(r=this._options.maxDepth)?r:10,this._maxStringLength=null!=(e=this._options.maxStringLength)?e:500}startTracking(){try{!this._isTracking&&this._options.enabled&&(0,s._getWindowSafe)()&&(this._patchConsole(),this._isTracking=!0)}catch(e){s.Log.error("Error starting console log tracking",e),this._errorBoundary.logError("autoCapture:ConsoleLogManager",e)}}stopTracking(){this._isTracking&&(this._restoreFns.forEach(e=>e()),this._restoreFns=[],this._isTracking=!1)}_patchConsole(){Object.entries(u).forEach(([i,e])=>{if(!(e<u[this._logLevel])&&console[i]){const o=console[i].bind(console);let n=!1;e=(0,a.wrapFunctionWithRestore)(console,i,s=>(...t)=>{if(s(...t),!n){n=!0;try{var e=t.map(e=>(0,l._safeStringify)(e,this._maxKeys,this._maxDepth,this._maxStringLength)),r=(0,l._getStackTrace)();this._enqueueConsoleLog(i,e,r)}catch(e){o("console observer error:",e,...t),this._errorBoundary.logError("autoCapture:ConsoleLogManager",e)}finally{n=!1}}});this._restoreFns.push(e)}})}_enqueueConsoleLog(e,t,r){this._shouldLog()&&(e=Object.assign({status:"log"===e?"info":e,log_level:e,payload:t,trace:r,timestamp:Date.now(),source:this.__source},(0,i._gatherAllMetadata)((0,a._getSafeUrl)())),this._enqueueFn(n.AutoCaptureEventName.CONSOLE_LOG,t.join(" "),e))}_shouldLog(){return!this._options.sampleRate||"number"!=typeof this._options.sampleRate||this._options.sampleRate<=0||1<=this._options.sampleRate||Math.random()<this._options.sampleRate}}},7875:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.DeadClickConfig=void 0;const o=t(6914),n=t(5423),i=t(5864),a=t(3769),l=t(9900);r.DeadClickConfig={CLICK_CHECK_TIMEOUT:1e3,SCROLL_DELAY_MS:100,SELECTION_CHANGE_DELAY_MS:100,MUTATION_DELAY_MS:2500,ABSOLUTE_DEAD_CLICK_TIMEOUT:2750};r.default=class{constructor(e,t){this._enqueueFn=e,this._errorBoundary=t,this._lastMutationTime=0,this._lastSelectionChangeTime=0,this._clicks=[],this._deadClickConfig=r.DeadClickConfig,this._handleScroll=(0,i.throttle)(()=>{const t=Date.now();this._clicks.forEach(e=>{e.scrollDelayMs||(e.scrollDelayMs=t-e.timestamp)})},50)}startTracking(){try{var e=(0,o._getWindowSafe)();e&&(e.addEventListener("click",e=>this._handleClick(e),{capture:!0}),e.addEventListener("scroll",()=>this._handleScroll(),{capture:!0,passive:!0}),e.addEventListener("selectionchange",()=>this._handleSelectionChange()),this._setupMutationObserver())}catch(e){o.Log.error("Error starting dead click tracking",e),this._errorBoundary.logError("autoCapture:DeadClickManager",e)}}_handleClick(e){var t,e=e.target;e&&(t={timestamp:Date.now(),eventTarget:e},i.interactiveElements.includes(null==(e=null==e?void 0:e.tagName)?void 0:e.toLowerCase())||this._clicks.push(t),this._clicks.length)&&!this._clickCheckTimer&&(this._clickCheckTimer=null==(e=(0,o._getWindowSafe)())?void 0:e.setTimeout(()=>{this._checkForDeadClick()},this._deadClickConfig.CLICK_CHECK_TIMEOUT))}_handleSelectionChange(){this._lastSelectionChangeTime=Date.now()}_setupMutationObserver(){var e=(0,o._getDocumentSafe)();e&&(this._observer=new MutationObserver(()=>{this._lastMutationTime=Date.now()}),this._observer.observe(e.body,{childList:!0,subtree:!0,attributes:!0,characterData:!0}))}_checkForDeadClick(){if(this._clicks.length){clearTimeout(this._clickCheckTimer),this._clickCheckTimer=void 0;var e=this._clicks;this._clicks=[];for(const i of e){this._updateClickDelayMs(i);var t,r=null!=i.scrollDelayMs&&i.scrollDelayMs<this._deadClickConfig.SCROLL_DELAY_MS,s=null!=i.selectionChangeDelayMs&&i.selectionChangeDelayMs<this._deadClickConfig.SELECTION_CHANGE_DELAY_MS,n=null!=i.mutationDelayMs&&i.mutationDelayMs<this._deadClickConfig.MUTATION_DELAY_MS;r||s||n||(r=null!=i.scrollDelayMs&&i.scrollDelayMs>this._deadClickConfig.SCROLL_DELAY_MS,s=null!=i.selectionChangeDelayMs&&i.selectionChangeDelayMs>this._deadClickConfig.SELECTION_CHANGE_DELAY_MS,n=null!=i.mutationDelayMs&&i.mutationDelayMs>this._deadClickConfig.MUTATION_DELAY_MS,t=null!=i.absoluteDelayMs&&i.absoluteDelayMs>this._deadClickConfig.ABSOLUTE_DEAD_CLICK_TIMEOUT,r||s||n||t?this._logDeadClick(i,{scrollTimeout:r,selectionChangeTimeout:s,mutationTimeout:n,absoluteTimeout:t}):null!=i.absoluteDelayMs&&i.absoluteDelayMs<this._deadClickConfig.ABSOLUTE_DEAD_CLICK_TIMEOUT&&this._clicks.push(i))}this._clicks.length&&!this._clickCheckTimer&&(this._clickCheckTimer=null==(e=(0,o._getWindowSafe)())?void 0:e.setTimeout(()=>{this._checkForDeadClick()},this._deadClickConfig.CLICK_CHECK_TIMEOUT))}}_logDeadClick(e,t){var{value:r,metadata:s}=(0,a._gatherEventData)(e.eventTarget);r&&this._enqueueFn(n.AutoCaptureEventName.DEAD_CLICK,r,Object.assign(Object.assign(Object.assign(Object.assign({},s),t),(0,l._gatherCommonMetadata)((0,i._getSafeUrl)())),{scrollDelayMs:e.scrollDelayMs,selectionChangeDelayMs:e.selectionChangeDelayMs,mutationDelayMs:e.mutationDelayMs,absoluteDelayMs:e.absoluteDelayMs}))}_updateClickDelayMs(e){!e.mutationDelayMs&&0<this._lastMutationTime&&e.timestamp<=this._lastMutationTime&&(e.mutationDelayMs=Date.now()-this._lastMutationTime),!e.selectionChangeDelayMs&&0<this._lastSelectionChangeTime&&e.timestamp<=this._lastSelectionChangeTime&&(e.selectionChangeDelayMs=Date.now()-this._lastSelectionChangeTime),e.absoluteDelayMs=Date.now()-e.timestamp}}},6714:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EngagementManager=void 0;const s=r(6914);t.EngagementManager=class{constructor(){this._lastScrollY=0,this._maxScrollY=0,this._lastScrollPercentage=0,this._maxScrollPercentage=0,this._lastPageViewTime=Date.now(),this._inactiveTimer=null,this._onInactivityCallback=null,this._meaningfulEngagementOccurred=!1,this._initializeScrollTracking()}_initializeScrollTracking(){var e=(0,s._getWindowSafe)();e&&(e.addEventListener("scroll",()=>this._handleScroll()),e.addEventListener("scrollend",()=>this._handleScroll()),e.addEventListener("resize",()=>this._handleScroll()))}_handleScroll(){var e,t=(0,s._getWindowSafe)(),r=(0,s._getDocumentSafe)();t&&r&&(e=r.body.scrollHeight,r=t.scrollY||r.documentElement.scrollTop||0,t=t.innerHeight,this._lastScrollY=r,this._maxScrollY=Math.max(this._maxScrollY,r),r=Math.min(100,Math.round((r+t)/e*100)),this._lastScrollPercentage=r,this._maxScrollPercentage=Math.max(this._maxScrollPercentage,r),this.bumpInactiveTimer())}getScrollMetrics(){return{lastScrollY:this._lastScrollY,maxScrollY:this._maxScrollY,lastScrollPercentage:this._lastScrollPercentage,maxScrollPercentage:this._maxScrollPercentage,scrollDepth:this._maxScrollPercentage}}getPageViewLength(){return Date.now()-this._lastPageViewTime}setLastPageViewTime(e){this._lastPageViewTime=e}startInactivityTracking(e){this._onInactivityCallback=e}bumpInactiveTimer(){var e=(0,s._getWindowSafe)();e&&(this._inactiveTimer&&clearTimeout(this._inactiveTimer),this._inactiveTimer=e.setTimeout(()=>{this._onInactivityCallback&&this._onInactivityCallback()},6e5))}setMeaningfulEngagementOccurred(e){this._meaningfulEngagementOccurred=e}getPageViewEndMetadata(){var e=Object.assign(Object.assign({},this.getScrollMetrics()),{pageViewLength:this.getPageViewLength(),meaningfulEngagementOccurred:this._meaningfulEngagementOccurred});return this.setMeaningfulEngagementOccurred(!1),e}}},4716:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){this._clicks=[]}isRageClick(e,t,r){this._clicks=this._clicks.filter(e=>r-e.timestamp<1e3);var s,n;return 0<this._clicks.length&&(s=this._clicks[this._clicks.length-1],n=e-s.x,s=t-s.y,!(Math.abs(n)+Math.abs(s)<=30))&&(this._clicks=[]),this._clicks.push({x:e,y:t,timestamp:r}),3<=this._clicks.length}}},2678:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebVitalsManager=void 0;const s=r(8572),n=r(6914),i=r(5423),o=r(5864),a=["CLS","FCP","INP","LCP","TTFB"];t.WebVitalsManager=class{constructor(e,t){this._enqueueFn=e,this._errorBoundary=t,this._isInitialized=!1,this._metricEvent={url:(0,o._getSafeUrlString)(),sanitizedUrl:(0,o._getSanitizedPageUrl)(),metrics:[],firstMetricTimestamp:void 0}}startTracking(){var e,t,r;try{this._isInitialized||"https:"!==(r=null==(t=null==(e=(0,n._getWindowSafe)())?void 0:e.location)?void 0:t.protocol)&&"http:"!==r||((0,s.onCLS)(e=>this._handleMetric(e)),(0,s.onFCP)(e=>this._handleMetric(e)),(0,s.onINP)(e=>this._handleMetric(e)),(0,s.onLCP)(e=>this._handleMetric(e)),(0,s.onTTFB)(e=>this._handleMetric(e)),this._isInitialized=!0)}catch(e){n.Log.error("Error starting web vitals tracking",e),this._errorBoundary.logError("autoCapture:WebVitalsManager",e)}}_handleMetric(e){var t;void 0===this._metricEvent.firstMetricTimestamp&&(this._metricEvent.firstMetricTimestamp=Date.now()),void 0!==e&&void 0!==(null==e?void 0:e.name)&&""!==(t=(0,o._getSafeUrlString)())&&a.includes(e.name)&&(t!==this._metricEvent.url&&(this._enqueueWebVitalsAutoCaptureEvent(),this._metricEvent.url=t),this._metricEvent.metrics.push({name:e.name,value:e.value,delta:e.delta,id:e.id}),this._metricEvent.metrics.length===a.length)&&this._enqueueWebVitalsAutoCaptureEvent()}_enqueueWebVitalsAutoCaptureEvent(){if(""!==this._metricEvent.url&&0!==this._metricEvent.metrics.length){const r={};this._metricEvent.metrics.forEach(e=>{var t=e.name.toLowerCase();r[t+"_value"]=e.value,r[t+"_delta"]=e.delta,r[t+"_id"]=e.id}),this._enqueueFn(i.AutoCaptureEventName.WEB_VITALS,this._metricEvent.sanitizedUrl,Object.assign(Object.assign({},r),{first_metric_timestamp:this._metricEvent.firstMetricTimestamp})),this._metricEvent={url:(0,o._getSafeUrlString)(),sanitizedUrl:(0,o._getSanitizedPageUrl)(),metrics:[],firstMetricTimestamp:void 0}}}}},1964:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigAutoCapturePlugin=t.runStatsigAutoCapture=t.AutoCapture=t.AutoCaptureEventName=void 0;var s=r(6914);const n=r(4535);Object.defineProperty(t,"AutoCapture",{enumerable:!0,get:function(){return n.AutoCapture}}),Object.defineProperty(t,"StatsigAutoCapturePlugin",{enumerable:!0,get:function(){return n.StatsigAutoCapturePlugin}}),Object.defineProperty(t,"runStatsigAutoCapture",{enumerable:!0,get:function(){return n.runStatsigAutoCapture}});var i=r(5423),r=(Object.defineProperty(t,"AutoCaptureEventName",{enumerable:!0,get:function(){return i.AutoCaptureEventName}}),Object.assign((0,s._getStatsigGlobal)(),{AutoCapture:n.AutoCapture,runStatsigAutoCapture:n.runStatsigAutoCapture,StatsigAutoCapturePlugin:n.StatsigAutoCapturePlugin}));t.default=r},5864:(e,o,t)=>{"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.wrapFunctionWithRestore=o.throttle=o._sanitizeString=o._getAnchorNodeInHierarchy=o._getSafeTimezoneOffset=o._getSafeTimezone=o._getSafeNetworkInformation=o._registerEventHandler=o._getSanitizedPageUrl=o._getSafeUrlString=o._getSafeUrl=o._shouldLogEvent=o._getTargetNode=o._stripEmptyValues=o.interactiveElements=void 0;const r=t(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 n=new RegExp("^(\\d{3}-?\\d{2}-?\\d{4})$");function i(){var e=null!=(e=null==(e=null==(e=(0,r._getWindowSafe)())?void 0:e.location)?void 0:e.href)?e:"";let t;try{t=new URL(e)}catch(e){t=new URL("error:")}return t}function a(t){if(t){let e=t;for(;e;){var r=e.tagName.toLowerCase();if(["body","document"].includes(r))return null;if("a"===e.tagName.toLowerCase())return e;e=e.parentElement}}return null}o.interactiveElements=["button","a","input","select","textarea","form","select","label"],o._stripEmptyValues=function(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>null!=e&&""!==e&&void 0!==e))},o._getTargetNode=function(e){if(!e)return null;let t=e.target||e.srcElement;return t&&t instanceof Element?t=3===t.nodeType?t.parentNode||null:t:null},o._shouldLogEvent=function(e,t,r=!1){if(!e||!t||1!==t.nodeType)return!1;var s=t.tagName.toLowerCase(),n=e.type.toLowerCase();if(t.classList.contains("statsig-no-capture"))return!1;if(r)return!0;switch(s){case"html":return!1;case"form":return 0<=["submit"].indexOf(n);case"input":case"select":case"textarea":return 0<=["change","click"].indexOf(n);default:if("click"===n){var i=window.getComputedStyle(t);if(i&&"pointer"===i.getPropertyValue("cursor"))return!0;if(o.interactiveElements.includes(s))return!0;if("true"===t.getAttribute("contenteditable"))return!0;if(a(t))return!0}return!1}},o._getSafeUrl=i,o._getSafeUrlString=function(){var e=i().toString();return e.startsWith("error:")?"":e},o._getSanitizedPageUrl=function(){return(0,r._getCurrentPageUrlSafe)()||""},o._registerEventHandler=function(e,t,r){e&&e.addEventListener&&e.addEventListener(t,r,!0)},o._getSafeNetworkInformation=function(){var e=(0,r._getWindowSafe)();return e&&e.navigator&&e.navigator.connection||null},o._getSafeTimezone=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return null}},o._getSafeTimezoneOffset=function(){try{return(new Date).getTimezoneOffset()}catch(e){return null}},o._getAnchorNodeInHierarchy=a,o._sanitizeString=function(e){return e?e.replace(/<[^>]*>/g,"").trim().split(/(\s+)/).filter(e=>{return!s.test((e||"").replace(/[- ]/g,""))&&!n.test((e||"").replace(/[- ]/g,""))}).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255):null},o.throttle=function(r,s){let n=0;return function(...e){var t=Date.now();t-n>=s&&(n=t,r(...e))}},o.wrapFunctionWithRestore=function(e,t,r){const s=e[t];if("function"!=typeof s)return()=>{};try{var n=r(s);return Object.defineProperty(n,"__statsig_original__",{enumerable:!1,value:s}),e[t]=n,()=>{e[t]=s}}catch(e){return()=>{}}}},8135:(e,t)=>{"use strict";function i(e,t){return e.length<=t?e:e.slice(0,t)+"..."}Object.defineProperty(t,"__esModule",{value:!0}),t._getStackTrace=t._safeStringify=void 0,t._safeStringify=function(e,t,r,s){try{return function(e,t,r){if(function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e)){if(Object.keys(e).length>t)return 1;if(function t(r,s){if(s<=0)return!0;if("object"!=typeof r||null===r)return!1;return Object.keys(r).some(e=>t(r[e],s-1))}(e,r))return 1}return"function"==typeof e}(e,t,r)?(n=s,i(e.toString(),n)):i("string"==typeof e?e:"object"==typeof e&&null!==e?JSON.stringify(e):String(e),s)}catch(e){return i("[Unserializable]",s)}var n},t._getStackTrace=function(){var e,t;try{return null!=(t=null==(e=(new Error).stack)?void 0:e.split("\n").slice(2))?t:[]}catch(e){return[]}}},3769:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getMetadataFromElement=t._gatherCopyEventData=t._gatherEventData=void 0;const s=r(6914),l=r(5864),n=1e3,i=100,o=50;function a(e,t){return e?e.length>t?e.substring(0,t)+"...":e:null}function u(e){var t={};return t.class=(a(e.getAttribute("class"),n)||"").replace(/\s+/g," ").trim(),t.id=a(e.getAttribute("id"),n),t.ariaLabel=a(e.getAttribute("aria-label"),n),t.name=a(e.getAttribute("name"),n),t}function c(e){var t={},r=u(e),r=(Object.assign(t,r),Array.from(e.classList));return t.classList=0<r.length?r.slice(0,i):null,t.selector=function(t){if(!t)return"";if(!t.parentNode){var r=t.tagName.toLowerCase();if(t.id)return"#"+t.id;let e=r;return t.className&&"string"==typeof t.className&&0<(r=t.className.trim().split(/\s+/)).length&&""!==r[0]&&(e+="."+r.join(".")),e}var e=[];let s=t,n=0;for(;s&&s.nodeType===Node.ELEMENT_NODE&&n<o;){var i=function(s){var e=s.tagName.toLowerCase();if(s.id)return"#"+s.id;let n=e;s.className&&"string"==typeof s.className&&0<(e=s.className.trim().split(/\s+/)).length&&""!==e[0]&&(n+="."+e.join("."));e=s.parentElement;if(e&&1<e.children.length){let e=1,t=1,r=s.previousElementSibling;for(;r;)e++,r.tagName===s.tagName&&t++,r=r.previousElementSibling;n+=`:nth-child(${e})`,(1<t||function(e){let t=e.nextElementSibling;for(;t;){if(t.tagName===e.tagName)return 1;t=t.nextElementSibling}return}(s))&&(n+=`:nth-of-type(${t})`)}return n}(s);if(e.unshift(i),s.id)break;if((s=s.parentElement)&&"body"===s.tagName.toLowerCase())break;n++}return e.join(" > ")}(e),t}t._gatherEventData=function(e){var t,r,s,n,i,o=(0,l._getSanitizedPageUrl)()||"",a=e.tagName.toLowerCase();return"input"===(t=e).tagName.toLowerCase()&&["button","checkbox","submit","reset"].includes(t.getAttribute("type")||"")||"textarea"===t.tagName.toLowerCase()||"select"===t.tagName.toLowerCase()||"true"===t.getAttribute("contenteditable")?{value:o,metadata:u(e)}:((t={}).tagName=a,n=c(e),Object.assign(t,n),"form"===a&&Object.assign(t,((n={}).action=(r=e).getAttribute("action"),n.method=null!=(s=r.getAttribute("method"))?s:"GET",n.formName=r.getAttribute("name"),n.formId=r.getAttribute("id"),n)),"input"===a&&Object.assign(t,((s={}).content=(r=e).value,s.inputName=r.getAttribute("name"),s)),(n=(0,l._getAnchorNodeInHierarchy)(e))&&Object.assign(t,((i={}).href=n.getAttribute("href"),i)),"button"!==a&&!n||Object.assign(t,((i={}).content=((a=n||e).textContent||"").trim(),a=function(e){var t={};if(e){var r=null==e?void 0:e.dataset;if(r)for(const s in r)t["data-"+s]=r[s]||""}return t}(a),Object.assign(i,a),i)),function(e){if(Array.isArray(e.classList)&&null!=(t=e.classList)&&t.includes("statsig-ctr-capture"))return 1;var t=e.href;if(t)try{var r=(0,l._getSafeUrl)(),s=new URL(t);return r.host!==s.host}catch(e){}return}(t)&&(t.isOutbound="true"),{value:o,metadata:t})},t._gatherCopyEventData=function(e){var t=null==(t=null==(t=(0,s._getWindowSafe)())?void 0:t.getSelection())?void 0:t.toString(),r={},t=(r.selectedText=(0,l._sanitizeString)(t),e.type||"clipboard");return r.clipType=t,r},t._getMetadataFromElement=c},9900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getPossibleFirstTouchMetadata=t._getNetworkInfo=t._gatherAllMetadata=t._gatherCommonMetadata=void 0;const o=r(6914),a=r(5864);function i(e){var t=(0,o._getDocumentSafe)(),r=(0,o._getWindowSafe)();return(0,a._stripEmptyValues)(Object.assign({title:null==t?void 0:t.title,current_url:null==(t=null==r?void 0:r.location)?void 0:t.href,user_agent:null!=(t=null==r?void 0:r.navigator)&&t.userAgent&&200<(null==(t=null==(t=null==r?void 0:r.navigator)?void 0:t.userAgent)?void 0:t.length)?r.navigator.userAgent.substring(0,200):null==(t=null==r?void 0:r.navigator)?void 0:t.userAgent,locale:null==(t=null==r?void 0:r.navigator)?void 0:t.language,hostname:e.hostname,pathname:e.pathname,screen_width:null==(t=null==r?void 0:r.screen)?void 0:t.width,screen_height:null==(e=null==r?void 0:r.screen)?void 0:e.height,viewport_width:null==r?void 0:r.innerWidth,viewport_height:null==r?void 0:r.innerHeight,viewport:`${null==r?void 0:r.innerWidth}x`+(null==r?void 0:r.innerHeight),timestamp:Date.now(),timezone:(0,a._getSafeTimezone)(),timezone_offset:(0,a._getSafeTimezoneOffset)()},s()))}function s(){var e=(0,a._getSafeNetworkInformation)(),t={};return void 0!==(null==e?void 0:e.effectiveType)&&(t.effective_connection_type=e.effectiveType),void 0!==(null==e?void 0:e.rtt)&&(t.rtt_ms=e.rtt),void 0!==(null==e?void 0:e.downlink)&&(t.downlink_mbps=e.downlink,t.downlink_kbps=1e3*e.downlink),void 0!==(null==e?void 0:e.saveData)&&(t.save_data=e.saveData),t}function l(e){e=(null==e?void 0:e.referrer)||"";if(!e)return{referrer:null,referrer_domain:null,referrer_path:null,searchEngine:"",searchQuery:""};try{var t=new URL(e);const n=t.hostname;var r=["google","bing","yahoo","duckduckgo","baidu"].find(e=>n.includes(e+"."))||"",s=t.searchParams.get("yahoo"===r?"p":"q")||"";return{referrer:e,referrer_domain:t.hostname,referrer_path:t.pathname,searchEngine:r,searchQuery:s}}catch(e){return{referrer:null,referrer_domain:null,referrer_path:null,searchEngine:"",searchQuery:""}}}function u(e){const r=e.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(e=>{var t=r.get(e);t&&(s[e]=t)}),s}t._gatherCommonMetadata=i,t._gatherAllMetadata=function(e){var t=(0,o._getDocumentSafe)(),r=(0,o._getWindowSafe)();if(!t||!r)return{};var r=l(t),t=i(e),s=u(e);const n={};return e.searchParams.forEach((e,t)=>{n[t]=e}),Object.assign(Object.assign({},t),(0,a._stripEmptyValues)(Object.assign(Object.assign(Object.assign({},r),s),n)))},t._getNetworkInfo=s,t._getPossibleFirstTouchMetadata=function(e){var t=(0,o._getDocumentSafe)(),r=(0,o._getWindowSafe)();if(!t||!r)return{};var s,n,r=l(t),t=u(e),e=(0,a._stripEmptyValues)(Object.assign(Object.assign({},r),t)),i={};for([s,n]of Object.entries(e))i["$s_"+s]=n;return i}},5980:(E,O)=>{"use strict";Object.defineProperty(O,Symbol.toStringTag,{value:"Module"});var x,M=Object.defineProperty,a=(e,t,r)=>{return r=r,(t="symbol"!=typeof t?t+"":t)in(e=e)?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},R=Object.defineProperty,A=(e,t,r)=>{return r=r,(t="symbol"!=typeof t?t+"":t)in(e=e)?R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},q=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(q||{});const T={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},D={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},N={};function F(e){if(N[e])return N[e];var t=globalThis[e];const r=t.prototype;var s=e in T?T[e]:void 0,s=Boolean(s&&s.every(e=>{return Boolean(null==(e=null==(e=Object.getOwnPropertyDescriptor(r,e))?void 0:e.get)?void 0:e.toString().includes("[native code]"))})),n=e in D?D[e]:void 0,n=Boolean(n&&n.every(e=>{return"function"==typeof r[e]&&(null==(e=r[e])?void 0:e.toString().includes("[native code]"))}));if(s&&n)return N[e]=t.prototype,t.prototype;try{var i,o=document.createElement("iframe"),a=(document.body.appendChild(o),o.contentWindow);return a?(i=a[e].prototype,document.body.removeChild(o),i?N[e]=i:r):t.prototype}catch{return r}}const j={};function U(e,t,r){var s=e+"."+String(r);return j[s]?j[s].call(t):(e=F(e),(e=null==(e=Object.getOwnPropertyDescriptor(e,r))?void 0:e.get)?(j[s]=e).call(t):t[r])}const B={};function z(e,t,r){var s=e+"."+String(r);return B[s]?B[s].bind(t):"function"!=typeof(e=F(e)[r])?t[r]:(B[s]=e).bind(t)}const Z={childNodes:function(e){return U("Node",e,"childNodes")},parentNode:function(e){return U("Node",e,"parentNode")},parentElement:function(e){return U("Node",e,"parentElement")},textContent:function(e){return U("Node",e,"textContent")},contains:function(e,t){return z("Node",e,"contains")(t)},getRootNode:function(e){return z("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?U("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?U("Element",e,"shadowRoot"):null},querySelector:function(e,t){return U("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return U("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return F("MutationObserver").constructor}};function V(e){return e.nodeType===e.ELEMENT_NODE}function W(e){var t=e&&"host"in e&&"mode"in e&&Z.host(e)||null;return Boolean(t&&"shadowRoot"in t&&Z.shadowRoot(t)===e)}function G(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function se(t){try{var e,r=t.rules||t.cssRules;return r?(e=Array.from(r,e=>K(e,t.href)).join(""),s=(s=e).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(e){return null}var s}function K(r,t){if("styleSheet"in r){let t;try{t=se(r.styleSheet)||((s=(e=r).cssText).split('"').length<3?s:(s=["@import",`url(${JSON.stringify(e.href)})`],""===e.layerName?s.push("layer"):e.layerName&&s.push(`layer(${e.layerName})`),e.supportsText&&s.push(`supports(${e.supportsText})`),e.media.length&&s.push(e.media.mediaText),s.join(" ")+";"))}catch(e){t=r.cssText}return r.styleSheet.href?he(t,r.styleSheet.href):t}{let e=r.cssText;return"selectorText"in r&&r.selectorText.includes(":")&&(e=e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),t?he(e,t):e}var e,s}class ne{constructor(){A(this,"idNodeMap",new Map),A(this,"nodeMetaMap",new WeakMap)}getId(e){return e?(null==(e=this.getMeta(e))?void 0:e.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){var t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){var r=this.getNode(e);r&&(r=this.nodeMetaMap.get(r))&&this.nodeMetaMap.set(t,r),this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function ie({element:e,maskInputOptions:t,tagName:r,type:s,value:n,maskInputFn:i}){let o=n||"";n=s&&oe(s);return o=t[r.toLowerCase()]||n&&t[n]?i?i(o,e):"*".repeat(o.length):o}function oe(e){return e.toLowerCase()}const ae="__rrweb_original__";function le(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?oe(t):null}function Y(e,t){let r;try{r=new URL(e,t??window.location.href)}catch(e){return null}e=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==e?void 0:e[1])??null}const J=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,H=/^(?:[a-z+]+:)?\/\//i,ue=/^www\..*/i,ce=/^(data:)([^,]*),(.*)/i;function he(e,l){return(e||"").replace(J,(e,t,r,s,n,i)=>{r=r||n||i,n=t||s||"";if(!r)return e;if(H.test(r)||ue.test(r))return`url(${n}${r}${n})`;if(ce.test(r))return`url(${n}${r}${n})`;if("/"===r[0])return`url(${n}${function(e){let t="";return t=(t=-1<e.indexOf("//")?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}(l)+r}${n})`;var o=l.split("/"),i=r.split("/");o.pop();for(const a of i)"."!==a&&(".."===a?o.pop():o.push(a));return`url(${n}${o.join("/")}${n})`})}let de=1;const pe=new RegExp("[^a-z0-9-_:]"),ge=-2;function fe(){return de++}let me,ve;const ye=/^[^ \t\n\r\u000c]+/,_e=/^[, \t\n\r\u000c]+/;function be(s,n){if(""===n.trim())return n;let i=0;function e(e){var e=e.exec(n.substring(i));return e?(e=e[0],i+=e.length,e):""}for(var o=[];e(_e),!(i>=n.length);){let r=e(ye);if(","===r.slice(-1))r=we(s,r.substring(0,r.length-1)),o.push(r);else{let e="",t=(r=we(s,r),!1);for(;;){var a=n.charAt(i);if(""===a){o.push((r+e).trim());break}if(t)")"===a&&(t=!1);else{if(","===a){i+=1,o.push((r+e).trim());break}"("===a&&(t=!0)}e+=a,i+=1}}}return o.join(", ")}const Se=new WeakMap;function we(e,t){return t&&""!==t.trim()?Ce(e,t):t}function Ce(e,t){let r=Se.get(e);if(r||(r=e.createElement("a"),Se.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function ke(e,t,r,s){return s&&("src"!==r&&("href"!==r||"use"===t&&"#"===s[0])&&("xlink:href"!==r||"#"===s[0])&&("background"!==r||"table"!==t&&"td"!==t&&"th"!==t)?"srcset"===r?be(e,s):"style"===r?he(s,Ce(e)):"object"===t&&"data"===r?we(e,s):s:we(e,s))}function Ie(e,t){return("video"===e||"audio"===e)&&"autoplay"===t}function Ee(t,r,e){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!e&&Ee(Z.parentNode(t),r,e);for(let e=t.classList.length;e--;){var s=t.classList[e];if(r.test(s))return!0}return!!e&&Ee(Z.parentNode(t),r,e)}function Oe(e,t,r,s){let n;if(V(e)){if(n=e,!Z.childNodes(n).length)return!1}else{if(null===Z.parentElement(e))return!1;n=Z.parentElement(e)}try{if("string"==typeof t){if(s){if(n.closest("."+t))return!0}else if(n.classList.contains(t))return!0}else if(Ee(n,t,s))return!0;if(r)if(s){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(e){}return!1}function xe(r,e){var t,s,n,i,{doc:o,mirror:e,blockClass:a,blockSelector:l,needsMask:N,inlineStylesheet:F,maskInputOptions:j={},maskTextFn:U,maskInputFn:B,dataURLOptions:z={},inlineImages:V,recordCanvas:W,keepIframeSrcFn:G,newlyAddedElement:K=!1}=e,u=(t=o,!(e=e).hasNode(t)||1===(e=e.getId(t))?void 0:e);switch(r.nodeType){case r.DOCUMENT_NODE:return"CSS1Compat"!==r.compatMode?{type:q.Document,childNodes:[],compatMode:r.compatMode}:{type:q.Document,childNodes:[]};case r.DOCUMENT_TYPE_NODE:return{type:q.DocumentType,name:r.name,publicId:r.publicId,systemId:r.systemId,rootId:u};case r.ELEMENT_NODE:{var c=r;var h={doc:o,blockClass:a,blockSelector:l,inlineStylesheet:F,maskInputOptions:j,maskInputFn:B,dataURLOptions:z,inlineImages:V,recordCanvas:W,keepIframeSrcFn:G,newlyAddedElement:K,rootId:u};const{doc:y,blockClass:_,blockSelector:b,inlineStylesheet:S,maskInputOptions:w={},maskInputFn:C,dataURLOptions:k={},inlineImages:I,recordCanvas:E,keepIframeSrcFn:O,newlyAddedElement:x=!1,rootId:M}=h,R=function(t,r,e){try{if("string"==typeof r){if(t.classList.contains(r))return!0}else for(let e=t.classList.length;e--;){var s=t.classList[e];if(r.test(s))return!0}if(e)return t.matches(e)}catch(e){}return!1}(c,_,b),A=function(e){return e instanceof HTMLFormElement?"form":(e=oe(e.tagName),pe.test(e)?"div":e)}(c);let t={};var Y=c.attributes.length;for(let e=0;e<Y;e++){var d=c.attributes[e];Ie(A,d.name,d.value)||(t[d.name]=ke(y,A,oe(d.name),d.value))}if("link"===A&&S){h=Array.from(y.styleSheets).find(e=>e.href===c.href);let e=null;(e=h?se(h):e)&&(delete t.rel,delete t.href,t._cssText=e)}"style"===A&&c.sheet&&!(c.innerText||Z.textContent(c)||"").trim().length&&(h=se(c.sheet))&&(t._cssText=h);"input"!==A&&"textarea"!==A&&"select"!==A||(h=c.value,s=c.checked,"radio"!==t.type&&"checkbox"!==t.type&&"submit"!==t.type&&"button"!==t.type&&h?t.value=ie({element:c,type:le(c),tagName:A,value:h,maskInputOptions:w,maskInputFn:C}):s&&(t.checked=s));"option"===A&&(c.selected&&!w.select?t.selected=!0:delete t.selected);"dialog"===A&&c.open&&(t.rr_open_mode=c.matches("dialog:modal")?"modal":"non-modal");"canvas"===A&&E&&("2d"===c.__context?function(r){var s=r.getContext("2d");if(s)for(let t=0;t<r.width;t+=50)for(let e=0;e<r.height;e+=50){var n=s.getImageData,n=ae in n?n[ae]:n;if(new Uint32Array(n.call(s,t,e,Math.min(50,r.width-t),Math.min(50,r.height-e)).data.buffer).some(e=>0!==e))return}return 1}(c)||(t.rr_dataURL=c.toDataURL(k.type,k.quality)):"__context"in c||(h=c.toDataURL(k.type,k.quality),(s=y.createElement("canvas")).width=c.width,s.height=c.height,n=s.toDataURL(k.type,k.quality),h!==n&&(t.rr_dataURL=h)));if("img"===A&&I){me||(me=y.createElement("canvas"),ve=me.getContext("2d"));const T=c,D=T.currentSrc||T.getAttribute("src")||"<unknown-src>",L=T.crossOrigin,P=()=>{T.removeEventListener("load",P);try{me.width=T.naturalWidth,me.height=T.naturalHeight,ve.drawImage(T,0,0),t.rr_dataURL=me.toDataURL(k.type,k.quality)}catch(e){if("anonymous"!==T.crossOrigin)return T.crossOrigin="anonymous",void(T.complete&&0!==T.naturalWidth?P():T.addEventListener("load",P));console.warn(`Cannot inline img src=${D}! Error: `+e)}"anonymous"===T.crossOrigin&&(L?t.crossOrigin=L:T.removeAttribute("crossorigin"))};T.complete&&0!==T.naturalWidth?P():T.addEventListener("load",P)}"audio"!==A&&"video"!==A||((n=t).rr_mediaState=c.paused?"paused":"played",n.rr_mediaCurrentTime=c.currentTime,n.rr_mediaPlaybackRate=c.playbackRate,n.rr_mediaMuted=c.muted,n.rr_mediaLoop=c.loop,n.rr_mediaVolume=c.volume);x||(c.scrollLeft&&(t.rr_scrollLeft=c.scrollLeft),c.scrollTop&&(t.rr_scrollTop=c.scrollTop));R&&({width:h,height:p}=c.getBoundingClientRect(),t={class:t.class,rr_width:h+"px",rr_height:p+"px"});"iframe"!==A||O(t.src)||(c.contentDocument||(t.rr_src=t.src),delete t.src);let e;try{customElements.get(A)&&(e=!0)}catch(e){}return{type:q.Element,tagName:A,attributes:t,childNodes:[],isSVG:function(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}(c)||void 0,needBlock:R,rootId:M,isCustom:e};return}case r.TEXT_NODE:{h=r;var p={doc:o,needsMask:N,maskTextFn:U,rootId:u};var{needsMask:J,maskTextFn:g,rootId:H}=p,f=Z.parentNode(h),m=f&&f.tagName;let e=Z.textContent(h);var v="STYLE"===m||void 0,m="SCRIPT"===m||void 0;if(v&&e){try{h.nextSibling||h.previousSibling||null!=(i=f.sheet)&&i.cssRules&&(e=se(f.sheet))}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: "+e,h)}e=he(e,Ce(p.doc))}m&&(e="SCRIPT_PLACEHOLDER");!v&&!m&&e&&J&&(e=g?g(e,Z.parentElement(h)):e.replace(/[\S]/g,"*"));return{type:q.Text,textContent:e||"",isStyle:v,rootId:H};return}case r.CDATA_SECTION_NODE:return{type:q.CDATA,textContent:"",rootId:u};case r.COMMENT_NODE:return{type:q.Comment,textContent:Z.textContent(r)||"",rootId:u};default:return!1}}function L(e){return null==e?"":e.toLowerCase()}function Me(t,e){const{doc:r,mirror:s,blockClass:n,blockSelector:i,maskTextClass:o,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:d,slimDOMOptions:p,dataURLOptions:g={},inlineImages:f=!1,recordCanvas:m=!1,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:_=5e3,onStylesheetLoad:b,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:w=()=>!1,newlyAddedElement:C=!1}=e;let k=e["needsMask"],{preserveWhiteSpace:I=!0}=e;k||(e=void 0===k,k=Oe(t,o,a,e));e=xe(t,{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:k,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:d,dataURLOptions:g,inlineImages:f,recordCanvas:m,keepIframeSrcFn:w,newlyAddedElement:C});if(!e)return console.warn(t,"not serialized"),null;let E;E=s.hasNode(t)?s.getId(t):!function(e,t){if(t.comment&&e.type===q.Comment)return 1;if(e.type===q.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===Y(e.attributes.href)))return 1;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(L(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===L(e.attributes.name)||"icon"===L(e.attributes.rel)||"apple-touch-icon"===L(e.attributes.rel)||"shortcut icon"===L(e.attributes.rel))))return 1;if("meta"===e.tagName){if(t.headMetaDescKeywords&&L(e.attributes.name).match(/^description|keywords$/))return 1;if(t.headMetaSocial&&(L(e.attributes.property).match(/^(og|twitter|fb):/)||L(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===L(e.attributes.name)))return 1;if(t.headMetaRobots&&("robots"===L(e.attributes.name)||"googlebot"===L(e.attributes.name)||"bingbot"===L(e.attributes.name)))return 1;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return 1;if(t.headMetaAuthorship&&("author"===L(e.attributes.name)||"generator"===L(e.attributes.name)||"framework"===L(e.attributes.name)||"publisher"===L(e.attributes.name)||"progid"===L(e.attributes.name)||L(e.attributes.property).match(/^article:/)||L(e.attributes.property).match(/^product:/)))return 1;if(t.headMetaVerification&&("google-site-verification"===L(e.attributes.name)||"yandex-verification"===L(e.attributes.name)||"csrf-token"===L(e.attributes.name)||"p:domain_verify"===L(e.attributes.name)||"verify-v1"===L(e.attributes.name)||"verification"===L(e.attributes.name)||"shopify-checkout-api-token"===L(e.attributes.name)))return 1}}}(e,p)&&(I||e.type!==q.Text||e.isStyle||e.textContent.replace(/^\s+|\s+$/gm,"").length)?de++:ge;var O=Object.assign(e,{id:E});if(s.add(t,O),E===ge)return null;v&&v(t);let x=!l;if(O.type===q.Element&&(x=x&&!O.needBlock,delete O.needBlock,e=Z.shadowRoot(t))&&G(e)&&(O.isShadowHost=!0),(O.type===q.Document||O.type===q.Element)&&x){p.headWhitespace&&O.type===q.Element&&"head"===O.tagName&&(I=!1);var M={doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:k,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:d,slimDOMOptions:p,dataURLOptions:g,inlineImages:f,recordCanvas:m,preserveWhiteSpace:I,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:_,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:w};if(O.type!==q.Element||"textarea"!==O.tagName||void 0===O.attributes.value)for(const T of Array.from(Z.childNodes(t))){var R=Me(T,M);R&&O.childNodes.push(R)}let e=null;if(V(t)&&(e=Z.shadowRoot(t)))for(const D of Array.from(Z.childNodes(e))){var A=Me(D,M);A&&(G(e)&&(A.isShadow=!0),O.childNodes.push(A))}}e=Z.parentNode(t);return e&&W(e)&&G(e)&&(O.isShadow=!0),O.type===q.Element&&"iframe"===O.tagName&&function(r,s,n){var i=r.contentWindow;if(i){let e=!1,t;try{t=i.document.readyState}catch(e){return}if("complete"!==t){const o=setTimeout(()=>{e||(s(),e=!0)},n);void r.addEventListener("load",()=>{clearTimeout(o),e=!0,s()})}else{n="about:blank";if(i.location.href!==n||r.src===n||""===r.src)return setTimeout(s,0),r.addEventListener("load",s);r.addEventListener("load",s)}}}(t,()=>{var e=t.contentDocument;e&&y&&(e=Me(e,{doc:e,mirror:s,blockClass:n,blockSelector:i,needsMask:k,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:d,slimDOMOptions:p,dataURLOptions:g,inlineImages:f,recordCanvas:m,preserveWhiteSpace:I,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:_,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:w}))&&y(t,e)},_),O.type===q.Element&&"link"===O.tagName&&"string"==typeof O.attributes.rel&&("stylesheet"===O.attributes.rel||"preload"===O.attributes.rel&&"string"==typeof O.attributes.href&&"css"===Y(O.attributes.href))&&function(e,t,r){let s=!1,n;try{n=e.sheet}catch(e){return}if(!n){const i=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(i),s=!0,t()})}}(t,()=>{var e;b&&(e=Me(t,{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:k,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:d,slimDOMOptions:p,dataURLOptions:g,inlineImages:f,recordCanvas:m,preserveWhiteSpace:I,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:_,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:w}))&&b(t,e)},S),O}function Re(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ae(r){var t,s;return r.__esModule?r:("function"==typeof(t=r.default)?(s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)}).prototype=t.prototype:s={},Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(r).forEach(function(e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(s,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}),s)}function Te(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}}var e={exports:{}},t=String,e=(e.exports=Te(),e.exports.createColors=Te,e.exports),r=Ae(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let De=e,Le=r;var e=class No extends Error{constructor(e,t,r,s,n,i){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),s&&(this.source=s),i&&(this.plugin=i),void 0!==t&&void 0!==r&&("number"==typeof t?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,No)}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(e){if(!this.source)return"";let t=this.source;null==e&&(e=De.isColorSupported);var r=(t=Le&&e?Le(t):t).split(/\r?\n/);let s=Math.max(this.line-3,0);var n=Math.min(this.line+2,r.length);let i=String(n).length,o,a;if(e){let{bold:t,gray:r,red:s}=De.createColors(!0);o=e=>t(s(e)),a=e=>r(e)}else o=a=e=>e;return r.slice(s,n).map((e,t)=>{var t=s+1+t,r=" "+(" "+t).slice(-i)+" | ";return t===this.line?(t=a(r.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," "),o(">")+a(r)+e+"\n "+t+o("^")):" "+a(r)+e}).join("\n")}toString(){let e=this.showSourceCode();return e=e&&"\n\n"+e+"\n",this.name+": "+this.message+e}},s=e,e=(e.default=e,{});e.isClean=Symbol("isClean"),e.my=Symbol("my");const Pe={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var n=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name;var s=e.params?this.rawValue(e,"params"):"";void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes?this.block(e,r+s):(t=(e.raws.between||"")+(t?";":""),this.builder(r+s+t,e))}beforeAfter(e,t){let r,s=(r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose"),e.parent),n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){var i=this.raw(e,null,"indent");if(i.length)for(let e=0;e<n;e++)r+=i}return r}block(e,t){var r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let s;(s=e.nodes&&e.nodes.length?(this.body(e),this.raw(e,"after")):this.raw(e,"after","emptyBody"))&&this.builder(s),this.builder("}",e,"end")}body(t){let r=t.nodes.length-1;for(;0<r&&"comment"===t.nodes[r].type;)--r;var s=this.raw(t,"semicolon");for(let e=0;e<t.nodes.length;e++){var n=t.nodes[e],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,r!==e||s)}}comment(e){var t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){var r=this.raw(e,"between","colon");let s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r=r||t,!t||void 0===(s=e.raws[t])){var n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Pe[r];n=e.root();if(n.rawCache||(n.rawCache={}),void 0!==n.rawCache[r])return n.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);var i="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[i]?s=this[i](n,e):n.walk(e=>{if(void 0!==(s=e.raws[t]))return!1}),void 0===s&&(s=Pe[r]),n.rawCache[r]=s}return s}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&0<e.nodes.length&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t=t&&t.replace(/\S/g,"")}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),r=void 0===r?this.raw(t,null,"beforeDecl"):r&&r.replace(/\S/g,"")}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),r=void 0===r?this.raw(t,null,"beforeRule"):r&&r.replace(/\S/g,"")}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}rawBeforeRule(t){let r;return t.walk(e=>{if(e.nodes&&(e.parent!==t||t.first!==e)&&void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),r=r&&r.replace(/\S/g,"")}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}rawIndent(r){if(r.raws.indent)return r.raws.indent;let s;return r.walk(e=>{var t=e.parent;if(t&&t!==r&&t.parent&&t.parent===r&&void 0!==e.raws.before)return t=e.raws.before.split("\n"),s=(s=t[t.length-1]).replace(/\S/g,""),!1}),s}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}rawValue(e,t){var r=e[t],e=e.raws[t];return e&&e.value===r?e.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},i=n;n.default=n;let Ne=i;function Fe(e,t){new Ne(t).stringify(e)}n=Fe;Fe.default=Fe;let{isClean:je,my:Ue}=e,Be=s,ze=i,Ve=n;function We(t,r){let s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&"proxyCache"!==n){let e=t[n];var i=typeof e;"parent"===n&&"object"==i?r&&(s[n]=r):"source"===n?s[n]=e:Array.isArray(e)?s[n]=e.map(e=>We(e,s)):("object"==i&&null!==e&&(e=We(e)),s[n]=e)}return s}var i=class{constructor(e={}){for(var t in this.raws={},this[je]=!1,this[Ue]=!0,e)if("nodes"===t){this.nodes=[];for(var r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){var t;return e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)&&(t=this.source,e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)),e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(var t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){var t,r=We(this);for(t in e)r[t]=e[t];return r}cloneAfter(e={}){e=this.clone(e);return this.parent.insertAfter(this,e),e}cloneBefore(e={}){e=this.clone(e);return this.parent.insertBefore(this,e),e}error(e,t={}){var r,s;return this.source?({end:r,start:s}=this.rangeBy(t),this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)):new Be(e)}getProxyProcessor(){return{get(e,t){return"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]!==r&&(e[t]=r,"prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0}}}markDirty(){if(this[je]){this[je]=!1;let e=this;for(;e=e.parent;)e[je]=!1}}next(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;return e.index?r=this.positionInside(e.index,t):e.word&&-1!==(e=(t=this.toString()).indexOf(e.word))&&(r=this.positionInside(e,t)),r}positionInside(t,e){var r=e||this.toString();let s=this.source.start.column,n=this.source.start.line;for(let e=0;e<t;e++)"\n"===r[e]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};var s,n;return e.word?-1!==(n=(s=this.toString()).indexOf(e.word))&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s)):(e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1))),{end:r=r.line<t.line||r.line===t.line&&r.column<=t.column?{column:t.column+1,line:t.line}:r,start:t}}raw(e,t){return(new ze).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...r){if(this.parent){let e=this,t=!1;for(var s of r)s===this?t=!0:t?(this.parent.insertAfter(e,s),e=s):this.parent.insertBefore(e,s);t||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){var r,s={},n=null==t;t=t||new Map;let i=0;for(r in this)if(Object.prototype.hasOwnProperty.call(this,r)&&"parent"!==r&&"proxyCache"!==r){var o=this[r];if(Array.isArray(o))s[r]=o.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof o&&o.toJSON)s[r]=o.toJSON(null,t);else if("source"===r){let e=t.get(o.input);null==e&&(e=i,t.set(o.input,i),i++),s[r]={end:o.end,inputId:e,start:o.start}}else s[r]=o}return n&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Ve){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){var s,n={node:this};for(s in r)n[s]=r[s];return e.warn(t,n)}get proxyOf(){return this}},o=i,i=(i.default=i,o),i=class extends i{constructor(e){super(e=e&&void 0!==e.value&&"string"!=typeof e.value?{...e,value:String(e.value)}:e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}},l=i;i.default=i;i={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(s,n=21)=>(e=n)=>{let t="",r=e;for(;r--;)t+=s[Math.random()*s.length|0];return t}};let{SourceMapConsumer:Ge,SourceMapGenerator:Ke}=r,{existsSync:Ye,readFileSync:Je}=r,{dirname:He,join:qe}=r;var u=class{constructor(e,t){!1!==t.map&&(this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:"),e=t.map?t.map.prev:void 0,e=this.loadMap(t.from,e),!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=He(this.mapFile)),e)&&(this.text=e)}consumer(){return this.consumerCache||(this.consumerCache=new Ge(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+t)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){var t,r=e.match(/\/\*\s*# sourceMappingURL=/gm);r&&(r=e.lastIndexOf(r.pop()),t=e.indexOf("*/",r),-1<r)&&-1<t&&(this.annotation=this.getAnnotationURL(e.substring(r,t)))}loadFile(e){if(this.root=He(e),Ye(e))return this.mapFile=e,Je(e,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof Ge)return Ke.fromSourceMap(e).toString();if(e instanceof Ke)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}e=e(t);if(e){var r=this.loadFile(e);if(r)return r;throw new Error("Unable to load previous source map: "+e.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;return t&&(e=qe(He(t),e)),this.loadFile(e)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}},c=u,{SourceMapConsumer:u,SourceMapGenerator:h}=(u.default=u,r);let{fileURLToPath:Ze,pathToFileURL:$e}=r,{isAbsolute:Xe,resolve:Qe}=r,et=i["nanoid"];i=r;let tt=s,rt=c,st=Symbol("fromOffsetCache"),nt=Boolean(u&&h),it=Boolean(Qe&&Xe);u=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!it||/^\w+:\/\//.test(t.from)||Xe(t.from)?this.file=t.from:this.file=Qe(t.from)),it&&nt&&(e=new rt(this.css,t)).text&&(t=(this.map=e).consumer().file,!this.file)&&t&&(this.file=this.mapResolve(t)),this.file||(this.id="<input css "+et(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,i,o;t&&"object"==typeof t?(a=r,r="number"==typeof(l=t).offset?(t=(u=this.fromOffset(l.offset)).line,u.col):(t=l.line,l.column),o="number"==typeof a.offset?(u=this.fromOffset(a.offset),i=u.line,u.col):(i=a.line,a.column)):r||(t=(l=this.fromOffset(t)).line,r=l.col);var a,l,u=this.origin(t,r,i,o);return(n=u?new tt(e,void 0===u.endLine?u.line:{column:u.column,line:u.line},void 0===u.endLine?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,s.plugin):new tt(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:o,line:i},this.css,this.file,s.plugin)).input={column:r,endColumn:o,endLine:i,line:t,source:this.css},this.file&&($e&&(n.input.url=$e(this.file).toString()),n.input.file=this.file),n}fromOffset(t){let s;if(this[st])s=this[st];else{var n=this.css.split("\n");s=new Array(n.length);let r=0;for(let e=0,t=n.length;e<t;e++)s[e]=r,r+=n[e].length+1;this[st]=s}let r=0;if(s[s.length-1]<=t)r=s.length-1;else{let e=s.length-2;for(var i;r<e;)if(i=r+(e-r>>1),t<s[i])e=i-1;else{if(!(t>=s[i+1])){r=i;break}r=i+1}}return{col:t-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Qe(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;var n=this.map.consumer(),t=n.originalPositionFor({column:t,line:e});if(!t.source)return!1;let i;"number"==typeof r&&(i=n.originalPositionFor({column:s,line:r}));let o;o=Xe(t.source)?$e(t.source):new URL(t.source,this.map.consumer().sourceRoot||$e(this.map.mapFile));e={column:t.column,endColumn:i&&i.column,endLine:i&&i.line,line:t.line,url:o.toString()};if("file:"===o.protocol){if(!Ze)throw new Error("file: protocol is not available in this PostCSS build");e.file=Ze(o)}s=n.sourceContentFor(t.source);return s&&(e.source=s),e}toJSON(){var e,t={};for(e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map={...this.map},t.map.consumerCache)&&(t.map.consumerCache=void 0),t}get from(){return this.file||this.id}},h=u;u.default=u,i&&i.registerInput&&i.registerInput(u);let{SourceMapConsumer:ot,SourceMapGenerator:at}=r,{dirname:lt,relative:ut,resolve:ct,sep:ht}=r,dt=r["pathToFileURL"],pt=h,gt=Boolean(ot&&at),ft=Boolean(lt&&ct&&ut&&ht);i=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,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 e,t=(e=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")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(var t of this.previous()){var r=this.toUrl(this.path(t.file)),s=t.root||lt(t.file);let e;!1===this.mapOpts.sourcesContent?(e=new ot(t.text)).sourcesContent&&(e.sourcesContent=null):e=t.consumer(),this.map.applySourceMap(e,r,this.toUrl(this.path(s)))}}clearAnnotation(){var t;if(!1!==this.mapOpts.annotation)if(this.root)for(let e=this.root.nodes.length-1;0<=e;e--)"comment"===(t=this.root.nodes[e]).type&&0===t.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(e);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),ft&>&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){var e;return this.root?this.generateString():1===this.previous().length?((e=this.previous()[0].consumer()).file=this.outputFile(),this.map=at.fromSourceMap(e,{ignoreInvalidMapping:!0})):(this.map=new at({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 at({file:this.outputFile(),ignoreInvalidMapping:!0});let s=1,n=1,i="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""},a,l;this.stringify(this.root,(e,t,r)=>{this.css+=e,t&&"end"!==r&&(o.generated.line=s,o.generated.column=n-1,t.source&&t.source.start?(o.source=this.sourcePath(t),o.original.line=t.source.start.line,o.original.column=t.source.start.column-1):(o.source=i,o.original.line=1,o.original.column=0),this.map.addMapping(o)),(a=e.match(/\n/g))?(s+=a.length,l=e.lastIndexOf("\n"),n=e.length-l):n+=e.length,t&&"start"!==r&&(e=t.parent||{raws:{}},"decl"!==t.type&&("atrule"!==t.type||t.nodes)||t!==e.last||e.raws.semicolon)&&(t.source&&t.source.end?(o.source=this.sourcePath(t),o.original.line=t.source.end.line,o.original.column=t.source.end.column-1,o.generated.line=s,o.generated.column=n-2):(o.source=i,o.original.line=1,o.original.column=0,o.generated.line=s,o.generated.column=n-1),this.map.addMapping(o))})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){var e;return void 0!==this.mapOpts.inline?this.mapOpts.inline:(void 0===(e=this.mapOpts.annotation)||!0===e)&&(!this.previous().length||this.previous().some(e=>e.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(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?lt(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=lt(ct(r,this.mapOpts.annotation)));t=ut(r,e);return this.memoizedPaths.set(e,t),t}previous(){var e;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(e=>{e.source&&e.source.input.map&&(e=e.source.input.map,this.previousMaps.includes(e)||this.previousMaps.push(e))}):(e=new pt(this.originalCSS,this.opts)).map&&this.previousMaps.push(e.map)),this.previousMaps}setSourcesContent(){let r={};var e;this.root?this.root.walk(e=>{var t;e.source&&(t=e.source.input.from)&&!r[t]&&(r[t]=!0,t=this.usesFileUrls?this.toFileUrl(t):this.toUrl(this.path(t)),this.map.setSourceContent(t,e.source.input.css))}):this.css&&(e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(e,this.css))}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(dt)return t=dt(e).toString(),this.memoizedFileURLs.set(e,t),t;throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===ht&&(e=e.replace(/\\/g,"/"));t=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,t),t}},u=class extends o{constructor(e){super(e),this.type="comment"}},r=u;u.default=u;let{isClean:mt,my:vt}=e,yt=l,_t=r,bt,St,wt,Ct;let kt=class Fo extends o{append(...e){for(var t of e){var r;for(r of this.normalize(t,this.last))this.proxyOf.nodes.push(r)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(var t of this.nodes)t.cleanRaws(e)}each(r){if(this.proxyOf.nodes){var s=this.getIterator();let e,t;for(;this.indexes[s]<this.proxyOf.nodes.length&&(e=this.indexes[s],!1!==(t=r(this.proxyOf.nodes[e],e)));)this.indexes[s]+=1;return delete this.indexes[s],t}}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(t,s){return"proxyOf"===s?t:t[s]&&("each"===s||"string"==typeof s&&s.startsWith("walk")?(...e)=>t[s](...e.map(r=>"function"==typeof r?(e,t)=>r(e.toProxy(),t):r)):"every"===s||"some"===s?r=>t[s]((e,...t)=>r(e.toProxy(),...t)):"root"===s?()=>t.root().toProxy():"nodes"===s?t.nodes.map(e=>e.toProxy()):"first"===s||"last"===s?t[s].toProxy():t[s])},set(e,t,r){return e[t]!==r&&(e[t]=r,"name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0}}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){var r,s,n,i=this.index(e),o=this.normalize(t,this.proxyOf.nodes[i]).reverse(),i=this.index(e);for(r of o)this.proxyOf.nodes.splice(i+1,0,r);for(n in this.indexes)i<(s=this.indexes[n])&&(this.indexes[n]=s+o.length);return this.markDirty(),this}insertBefore(e,t){var r,s,n,i=this.index(e),o=this.normalize(t,this.proxyOf.nodes[i],0===i&&"prepend").reverse(),i=this.index(e);for(r of o)this.proxyOf.nodes.splice(i,0,r);for(n in this.indexes)i<=(s=this.indexes[n])&&(this.indexes[n]=s+o.length);return this.markDirty(),this}normalize(e,t){if("string"==typeof e)e=function t(e){return e.map(e=>(e.nodes&&(e.nodes=t(e.nodes)),delete e.source,e))}(bt(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e))for(var r of e=e.slice(0))r.parent&&r.parent.removeChild(r,"ignore");else if("root"===e.type&&"document"!==this.type)for(var s of e=e.nodes.slice(0))s.parent&&s.parent.removeChild(s,"ignore");else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new yt(e)]}else if(e.selector)e=[new St(e)];else if(e.name)e=[new wt(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new _t(e)]}return e.map(e=>(e[vt]||Fo.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[mt]&&function e(t){if(t[mt]=!1,t.proxyOf.nodes)for(var r of t.proxyOf.nodes)e(r)}(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){for(var t of e=e.reverse()){var r,s,n=this.normalize(t,this.first,"prepend").reverse();for(r of n)this.proxyOf.nodes.unshift(r);for(s in this.indexes)this.indexes[s]=this.indexes[s]+n.length}return this.markDirty(),this}push(e){return(e.parent=this).proxyOf.nodes.push(e),this}removeAll(){for(var e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){var t,r;for(r in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)e<=(t=this.indexes[r])&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(t,r,s){return s||(s=r,r={}),this.walkDecls(e=>{r.props&&!r.props.includes(e.prop)||r.fast&&!e.value.includes(r.fast)||(e.value=e.value.replace(t,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(s){return this.each((t,e)=>{let r;try{r=s(t,e)}catch(e){throw t.addToError(e)}return r=!1!==r&&t.walk?t.walk(s):r})}walkAtRules(r,s){return s?r instanceof RegExp?this.walk((e,t)=>{if("atrule"===e.type&&r.test(e.name))return s(e,t)}):this.walk((e,t)=>{if("atrule"===e.type&&e.name===r)return s(e,t)}):(s=r,this.walk((e,t)=>{if("atrule"===e.type)return s(e,t)}))}walkComments(r){return this.walk((e,t)=>{if("comment"===e.type)return r(e,t)})}walkDecls(r,s){return s?r instanceof RegExp?this.walk((e,t)=>{if("decl"===e.type&&r.test(e.prop))return s(e,t)}):this.walk((e,t)=>{if("decl"===e.type&&e.prop===r)return s(e,t)}):(s=r,this.walk((e,t)=>{if("decl"===e.type)return s(e,t)}))}walkRules(r,s){return s?r instanceof RegExp?this.walk((e,t)=>{if("rule"===e.type&&r.test(e.selector))return s(e,t)}):this.walk((e,t)=>{if("rule"===e.type&&e.selector===r)return s(e,t)}):(s=r,this.walk((e,t)=>{if("rule"===e.type)return s(e,t)}))}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]}};kt.registerParse=e=>{bt=e},kt.registerRule=e=>{St=e},kt.registerAtRule=e=>{wt=e},kt.registerRoot=e=>{Ct=e};var u=kt,d=((kt.default=kt).rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,wt.prototype):"rule"===e.type?Object.setPrototypeOf(e,St.prototype):"decl"===e.type?Object.setPrototypeOf(e,yt.prototype):"comment"===e.type?Object.setPrototypeOf(e,_t.prototype):"root"===e.type&&Object.setPrototypeOf(e,Ct.prototype),e[vt]=!0,e.nodes&&e.nodes.forEach(e=>{kt.rebuild(e)})},u);let It,Et;var d=class extends d{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new It(new Et,this,e).stringify()}},p=(d.registerLazyResult=e=>{It=e},d.registerProcessor=e=>{Et=e},d);d.default=d;var d=class{constructor(e,t={}){for(var r in this.type="warning",this.text=e,t.node&&t.node.source&&(e=t.node.rangeBy(t),this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column),t)this[r]=t[r]}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}},g=d;d.default=d;let Ot=g;var d=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);e=new Ot(e,t);return this.messages.push(e),e}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}},f=d;d.default=d;const xt="'".charCodeAt(0),Mt='"'.charCodeAt(0),Rt="\\".charCodeAt(0),At="/".charCodeAt(0),Tt="\n".charCodeAt(0),Dt=" ".charCodeAt(0),Lt="\f".charCodeAt(0),Pt="\t".charCodeAt(0),Nt="\r".charCodeAt(0),Ft="[".charCodeAt(0),jt="]".charCodeAt(0),Ut="(".charCodeAt(0),Bt=")".charCodeAt(0),zt="{".charCodeAt(0),Vt="}".charCodeAt(0),Wt=";".charCodeAt(0),Gt="*".charCodeAt(0),Kt=":".charCodeAt(0),Yt="@".charCodeAt(0),Jt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ht=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,qt=/.[\r\n"'(/\\]/,Zt=/[\da-f]/i;var d=class extends u{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},m=d,d=(u.registerAtRule(d.default=d),u);let $t,Xt;var v=class extends d{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){e=super.normalize(e);if(t)if("prepend"===r)1<this.nodes.length?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(var s of e)s.raws.before=t.raws.before;return e}removeChild(e,t){var r=this.index(e);return!t&&0===r&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new $t(new Xt,this,e).stringify()}},y=(v.registerLazyResult=e=>{$t=e},v.registerProcessor=e=>{Xt=e},v);d.registerRoot(v.default=v);let Qt={comma(e){return Qt.split(e,[","],!0)},space(e){return Qt.split(e,[" ","\n","\t"])},split(e,t,r){var s,n=[];let i="",o=!1,a=0,l=!1,u="",c=!1;for(s of e)c?c=!1:"\\"===s?c=!0:l?s===u&&(l=!1):'"'===s||"'"===s?(l=!0,u=s):"("===s?a+=1:")"===s?0<a&&--a:0===a&&t.includes(s)&&(o=!0),o?(""!==i&&n.push(i.trim()),i="",o=!1):i+=s;return!r&&""===i||n.push(i.trim()),n}};d=Qt;Qt.default=Qt;let er=d;var v=class extends u{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return er.comma(this.selector)}set selectors(e){var t=this.selector?this.selector.match(/,\s*/):null,t=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(t)}},_=v;u.registerRule(v.default=v);let tr=l,rr=function(t,e={}){let s=t.css.valueOf(),n=e.ignoreErrors,i,o,a,l,u,c,h,d,p,g,f=s.length,m=0,v=[],y=[];function _(e){throw t.error("Unclosed "+e,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(!(m>=f)){var t=!!e&&e.ignoreUnclosed;switch(i=s.charCodeAt(m)){case Tt:case Dt:case Pt:case Nt:case Lt:for(o=m;o+=1,(i=s.charCodeAt(o))===Dt||i===Tt||i===Pt||i===Nt||i===Lt;);g=["space",s.slice(m,o)],m=o-1;break;case Ft:case jt:case zt:case Vt:case Kt:case Wt:case Bt:var r=String.fromCharCode(i);g=[r,r,m];break;case Ut:if(d=v.length?v.pop()[1]:"",p=s.charCodeAt(m+1),"url"===d&&p!==xt&&p!==Mt&&p!==Dt&&p!==Tt&&p!==Pt&&p!==Lt&&p!==Nt){o=m;do{if(c=!1,-1===(o=s.indexOf(")",o+1))){if(n||t){o=m;break}_("bracket")}for(h=o;s.charCodeAt(h-1)===Rt;)--h,c=!c}while(c);g=["brackets",s.slice(m,o+1),m,o],m=o}else o=s.indexOf(")",m+1),l=s.slice(m,o+1),-1===o||qt.test(l)?g=["(","(",m]:(g=["brackets",l,m,o],m=o);break;case xt:case Mt:a=i===xt?"'":'"',o=m;do{if(c=!1,-1===(o=s.indexOf(a,o+1))){if(n||t){o=m+1;break}_("string")}for(h=o;s.charCodeAt(h-1)===Rt;)--h,c=!c}while(c);g=["string",s.slice(m,o+1),m,o],m=o;break;case Yt:Jt.lastIndex=m+1,Jt.test(s),o=0===Jt.lastIndex?s.length-1:Jt.lastIndex-2,g=["at-word",s.slice(m,o+1),m,o],m=o;break;case Rt:for(o=m,u=!0;s.charCodeAt(o+1)===Rt;)o+=1,u=!u;if(i=s.charCodeAt(o+1),u&&i!==At&&i!==Dt&&i!==Tt&&i!==Pt&&i!==Nt&&i!==Lt&&(o+=1,Zt.test(s.charAt(o)))){for(;Zt.test(s.charAt(o+1));)o+=1;s.charCodeAt(o+1)===Dt&&(o+=1)}g=["word",s.slice(m,o+1),m,o],m=o;break;default:m=(i===At&&s.charCodeAt(m+1)===Gt?(0===(o=s.indexOf("*/",m+2)+1)&&(n||t?o=s.length:_("comment")),g=["comment",s.slice(m,o+1),m,o]):(Ht.lastIndex=m+1,Ht.test(s),o=0===Ht.lastIndex?s.length-1:Ht.lastIndex-2,g=["word",s.slice(m,o+1),m,o],v.push(g)),o)}return m++,g}},position:function(){return m}}},sr=r,nr=m,ir=y,or=_;const ar={empty:!0,space:!0};let lr=class{constructor(e){this.input=e,this.root=new ir,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){var t,r=new nr;r.name=e[1].slice(1),""===r.name&&this.unnamedAtrule(r,e),this.init(r,e[2]);let s,n,i=!1,o=!1;for(var a=[],l=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&0<l.length?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){r.source.end=this.getPosition(e[2]),r.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(0<a.length){for(n=a.length-1,s=a[n];s&&"space"===s[0];)s=a[--n];s&&(r.source.end=this.getPosition(s[3]||s[2]),r.source.end.offset++)}this.end(e);break}}if(a.push(e),this.tokenizer.endOfFile()){i=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(r.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(r,"params",a),i&&(e=a[a.length-1],r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),o&&(r.nodes=[],this.current=r)}checkMissedSemicolon(s){var n=this.colon(s);if(!1!==n){let t=0,r;for(let e=n-1;0<=e&&("space"===(r=s[e])[0]||2!==(t+=1));e--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(e){let t=0,r,s,n;for(var[i,o]of e.entries()){if("("===(s=(r=o)[0])&&(t+=1),")"===s&&--t,0===t&&":"===s){if(n){if("word"===n[0]&&"progid"===n[1])continue;return i}this.doubleColon(r)}n=r}return!1}comment(e){var t=new sr,e=(this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,e[1].slice(2,-2));/^\s*$/.test(e)?(t.text="",t.raws.left=e,t.raws.right=""):(e=e.match(/^(\s*)([^]*\S)(\s*)$/),t.text=e[2],t.raws.left=e[1],t.raws.right=e[3])}createTokenizer(){this.tokenizer=rr(this.input)}decl(e,t){var r,s=new tr,n=(this.init(s,e[0][2]),e[e.length-1]);for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(t){for(let e=t.length-1;0<=e;e--){var r=t[e],r=r[3]||r[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){var i=e[0][0];if(":"===i||"space"===i||"comment"===i)break;s.prop+=e.shift()[1]}s.raws.between="";let o;for(;e.length;){if(":"===(o=e.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(;e.length&&("space"===(r=e[0][0])||"comment"===r);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let r=e.length-1;0<=r;r--){if("!important"===(o=e[r])[1].toLowerCase()){s.important=!0;var l=this.stringFrom(e,r);" !important"!==(l=this.spacesFromEnd(e)+l)&&(s.raws.important=l);break}if("important"===o[1].toLowerCase()){var u=e.slice(0);let t="";for(let e=r;0<e;e--){var c=u[e][0];if(0===t.trim().indexOf("!")&&"space"!==c)break;t=u.pop()[1]+t}0===t.trim().indexOf("!")&&(s.important=!0,s.raws.important=t,e=u)}if("space"!==o[0]&&"comment"!==o[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(s,"value",a.concat(e),t),s.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){var t=new or;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){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(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}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(e){this.spaces+=e[1],this.current.nodes&&(e=this.current.nodes[this.current.nodes.length-1])&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}getPosition(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1;var r;let s=!1,n=null;var i=[],o=e[1].startsWith("--"),a=[];let l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n=n||l,i.push("("===r?")":"]");else if(o&&s&&"{"===r)n=n||l,i.push("}");else if(0===i.length){if(";"===r){if(s)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length)&&(n=null);l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),0<i.length&&this.unclosedBracket(n),t&&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 e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){var n,i,o,a,l=r.length;let u="",c=!0;for(let e=0;e<l;e+=1)"space"===(o=(n=r[e])[0])&&e===l-1&&!s||"comment"===o&&(o=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",ar[o]||ar[i]||","===u.slice(-1))?c=!1:u+=n[1];c||(a=r.reduce((e,t)=>e+t[1],""),e.raws[t]={raw:a,value:u}),e[t]=u}rule(e){e.pop();var t=new or;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){var t;let r="";for(;e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){var t;let r="";for(;e.length&&("space"===(t=e[0][0])||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t="";for(;e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}stringFrom(t,r){let s="";for(let e=r;e<t.length;e++)s+=t[e][1];return t.splice(r,t.length-r),s}unclosedBlock(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},ur=h;function cr(e,t){e=new ur(e,t),t=new lr(e);try{t.parse()}catch(e){throw e}return t.root}v=cr;u.registerParse(cr.default=cr);let{isClean:hr,my:dr}=e,pr=i,gr=n,fr=u;e=p;let mr=f,vr=v;var b=y;const yr={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},_r={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},br={Once:!0,postcssPlugin:!0,prepare:!0},Sr=0;function wr(e){return"object"==typeof e&&"function"==typeof e.then}function Cr(e){let t=!1;var r=yr[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,Sr,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,Sr,r+"Exit"]:[r,r+"Exit"]}function kr(e){let t;return{eventIndex:0,events:t="document"===e.type?["Document",Sr,"DocumentExit"]:"root"===e.type?["Root",Sr,"RootExit"]:Cr(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function Ir(e){return e[hr]=!1,e.nodes&&e.nodes.forEach(e=>Ir(e)),e}let Er={};var S=class jo{constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if("object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof jo||t instanceof mr)s=Ir(t.root),t.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let e=vr;r.syntax&&(e=r.syntax.parse),(e=r.parser?r.parser:e).parse&&(e=e.parse);try{s=e(t,r)}catch(e){this.processed=!0,this.error=e}s&&!s[dr]&&fr.rebuild(s)}else s=Ir(t);this.result=new mr(e,s,r),this.helpers={...Er,postcss:Er,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){var r=this.result.lastPlugin;try{t&&t.addToError(e),"CssSyntaxError"!==(this.error=e).name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};var e,t=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(e of this.plugins)if("object"==typeof e)for(var r in e){if(!_r[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!br[r])if("object"==typeof e[r])for(var s in e[r])"*"===s?t(e,r,e[r][s]):t(e,r+"-"+s.toLowerCase(),e[r][s]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=0<Object.keys(this.listeners).length}async runAsync(){for(let e=this.plugin=0;e<this.plugins.length;e++){var t=this.plugins[e],t=this.runOnRoot(t);if(wr(t))try{await t}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){for(var r,s=this.result.root;!s[hr];){s[hr]=!0;for(var n=[kr(s)];0<n.length;){var i=this.visitTick(n);if(wr(i))try{await i}catch(e){i=n[n.length-1].node;throw this.handleError(e,i)}}}if(this.listeners.OnceExit)for(let[e,t]of this.listeners.OnceExit){this.result.lastPlugin=e;try{"document"===s.type?(r=s.nodes.map(e=>t(e,this.helpers)),await Promise.all(r)):await t(s,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{var e;return"object"==typeof t&&t.Once?"document"===this.result.root.type?wr((e=this.result.root.nodes.map(e=>t.Once(e,this.helpers)))[0])?Promise.all(e):e:t.Once(this.result.root,this.helpers):"function"==typeof t?t(this.result.root,this.result):void 0}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(!this.stringified){this.stringified=!0,this.sync();var t=this.result.opts;let e=gr;t.syntax&&(e=t.syntax.stringify),(e=t.stringifier?t.stringifier:e).stringify&&(e=e.stringify);t=new pr(e,this.result.root,this.result.opts).generate();this.result.css=t[0],this.result.map=t[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 e of this.plugins)if(wr(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var t=this.result.root;!t[hr];)t[hr]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(var r of t.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,t)}}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(var[r,s]of e){this.result.lastPlugin=r;let e;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(wr(e))throw this.getAsyncError()}}visitTick(e){var t=e[e.length-1],{node:r,visitors:s}=t;if("root"===r.type||"document"===r.type||r.parent){if(0<s.length&&t.visitorIndex<s.length){var[n,i]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return i(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){for(var o,a=t.iterator;o=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!o[hr])return o[hr]=!0,void e.push(kr(o));t.iterator=0,delete r.indexes[a]}for(var l=t.events;t.eventIndex<l.length;){var u=l[t.eventIndex];if(t.eventIndex+=1,u===Sr)return void(r.nodes&&r.nodes.length&&(r[hr]=!0,t.iterator=r.getIterator()));if(this.listeners[u])return void(t.visitors=this.listeners[u])}}e.pop()}walkSync(e){var t;e[hr]=!0;for(t of Cr(e))if(t===Sr)e.nodes&&e.each(e=>{e[hr]||this.walkSync(e)});else{var r=this.listeners[t];if(r&&this.visitSync(r,e.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"}},Or=(S.registerPostcss=e=>{Er=e},S);b.registerLazyResult(S.default=S),e.registerLazyResult(S);let xr=i,Mr=n;let Rr=v;const Ar=f;b=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;e=Mr;this.result=new Ar(this._processor,void 0,this._opts),this.result.css=t;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});r=new xr(e,void 0,this._opts,t);r.isMap()?([e,t]=r.generate(),e&&(this.result.css=e),t&&(this.result.map=t)):(r.clearAnnotation(),this.result.css=r.css)}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}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._root)return this._root;let e;var t=Rr;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e}get[Symbol.toStringTag](){return"NoWorkResult"}},e=b;b.default=b;let Tr=e,Dr=Or;S=p,i=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(var r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return new(this.plugins.length||t.parser||t.stringifier||t.syntax?Dr:Tr)(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},b=i;y.registerProcessor(i.default=i),S.registerProcessor(i);let Lr=l,Pr=c,Nr=r,Fr=m,jr=h,Ur=y,Br=_;function zr(e,r){if(Array.isArray(e))return e.map(e=>zr(e));let{inputs:t,...s}=e;if(t){r=[];for(var n of t){n={...n,__proto__:jr.prototype};n.map&&(n.map={...n.map,__proto__:Pr.prototype}),r.push(n)}}if(s.nodes&&(s.nodes=e.nodes.map(e=>zr(e,r))),s.source){let{inputId:e,...t}=s.source;s.source=t,null!=e&&(s.source.input=r[e])}if("root"===s.type)return new Ur(s);if("decl"===s.type)return new Lr(s);if("rule"===s.type)return new Br(s);if("comment"===s.type)return new Nr(s);if("atrule"===s.type)return new Fr(s);throw new Error("Unknown node type: "+e.type)}e=zr,zr.default=zr,S=s;let Vr=l;i=Or,c=u;let Wr=b;s=n,l=e;let Gr=p;Or=g;let Kr=r,Yr=m;u=f,b=h,n=v,e=d;let Jr=_,Hr=y;p=o;function w(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Wr(e)}w.plugin=function(t,r){let s=!1;function n(...e){console&&console.warn&&!s&&(s=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");e=r(...e);return e.postcssPlugin=t,e.postcssVersion=(new Wr).version,e}let e;return Object.defineProperty(n,"postcss",{get(){return e=e||n()}}),n.process=function(e,t,r){return w([n(r)]).process(e,t)},n},w.stringify=s,w.parse=n,w.fromJSON=l,w.list=e,w.comment=e=>new Kr(e),w.atRule=e=>new Yr(e),w.decl=e=>new Vr(e),w.rule=e=>new Jr(e),w.root=e=>new Hr(e),w.document=e=>new Gr(e),w.CssSyntaxError=S,w.Declaration=Vr,w.Container=c,w.Processor=Wr,w.Document=Gr,w.Comment=Kr,w.Warning=Or,w.AtRule=Yr,w.Result=u,w.Input=b,w.Rule=Jr,w.Root=Hr,w.Node=p,i.registerPostcss(w);g=w,w.default=w,r=Re(g);r.stringify,r.fromJSON,r.plugin,r.parse,r.list,r.document,r.comment,r.atRule,r.rule,r.decl,r.root,r.CssSyntaxError,r.Declaration,r.Container,r.Processor,r.Document,r.Comment,r.Warning,r.AtRule,r.Result,r.Input,r.Rule,r.Root,r.Node,Object.defineProperty;function qr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Zr(r){var t,s;return r.__esModule?r:("function"==typeof(t=r.default)?(s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)}).prototype=t.prototype:s={},Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(r).forEach(function(e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(s,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}),s)}function $r(){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,f=(m.exports=$r(),m.exports.createColors=$r,m.exports),h=Zr(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Xr=f,Qr=h;v=class Uo extends Error{constructor(e,t,r,s,n,i){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),s&&(this.source=s),i&&(this.plugin=i),void 0!==t&&void 0!==r&&("number"==typeof t?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.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(e){if(!this.source)return"";let t=this.source;null==e&&(e=Xr.isColorSupported);var r=(t=Qr&&e?Qr(t):t).split(/\r?\n/);let s=Math.max(this.line-3,0);var n=Math.min(this.line+2,r.length);let i=String(n).length,o,a;if(e){let{bold:t,gray:r,red:s}=Xr.createColors(!0);o=e=>t(s(e)),a=e=>r(e)}else o=a=e=>e;return r.slice(s,n).map((e,t)=>{var t=s+1+t,r=" "+(" "+t).slice(-i)+" | ";return t===this.line?(t=a(r.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," "),o(">")+a(r)+e+"\n "+t+o("^")):" "+a(r)+e}).join("\n")}toString(){let e=this.showSourceCode();return e=e&&"\n\n"+e+"\n",this.name+": "+this.message+e}},d=v,v.default=v,_={};_.isClean=Symbol("isClean"),_.my=Symbol("my");const es={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};y=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name;var s=e.params?this.rawValue(e,"params"):"";void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes?this.block(e,r+s):(t=(e.raws.between||"")+(t?";":""),this.builder(r+s+t,e))}beforeAfter(e,t){let r,s=(r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose"),e.parent),n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){var i=this.raw(e,null,"indent");if(i.length)for(let e=0;e<n;e++)r+=i}return r}block(e,t){var r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let s;(s=e.nodes&&e.nodes.length?(this.body(e),this.raw(e,"after")):this.raw(e,"after","emptyBody"))&&this.builder(s),this.builder("}",e,"end")}body(t){let r=t.nodes.length-1;for(;0<r&&"comment"===t.nodes[r].type;)--r;var s=this.raw(t,"semicolon");for(let e=0;e<t.nodes.length;e++){var n=t.nodes[e],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,r!==e||s)}}comment(e){var t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){var r=this.raw(e,"between","colon");let s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r=r||t,!t||void 0===(s=e.raws[t])){var n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return es[r];n=e.root();if(n.rawCache||(n.rawCache={}),void 0!==n.rawCache[r])return n.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);var i="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[i]?s=this[i](n,e):n.walk(e=>{if(void 0!==(s=e.raws[t]))return!1}),void 0===s&&(s=es[r]),n.rawCache[r]=s}return s}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&0<e.nodes.length&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t=t&&t.replace(/\S/g,"")}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),r=void 0===r?this.raw(t,null,"beforeDecl"):r&&r.replace(/\S/g,"")}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),r=void 0===r?this.raw(t,null,"beforeRule"):r&&r.replace(/\S/g,"")}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}rawBeforeRule(t){let r;return t.walk(e=>{if(e.nodes&&(e.parent!==t||t.first!==e)&&void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),r=r&&r.replace(/\S/g,"")}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}rawIndent(r){if(r.raws.indent)return r.raws.indent;let s;return r.walk(e=>{var t=e.parent;if(t&&t!==r&&t.parent&&t.parent===r&&void 0!==e.raws.before)return t=e.raws.before.split("\n"),s=(s=t[t.length-1]).replace(/\S/g,""),!1}),s}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}rawValue(e,t){var r=e[t],e=e.raws[t];return e&&e.value===r?e.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},o=y;y.default=y;let ts=o;function rs(e,t){new ts(t).stringify(e)}s=rs;rs.default=rs;let{isClean:ss,my:ns}=_,is=d,os=o,as=s;function ls(t,r){let s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&"proxyCache"!==n){let e=t[n];var i=typeof e;"parent"===n&&"object"==i?r&&(s[n]=r):"source"===n?s[n]=e:Array.isArray(e)?s[n]=e.map(e=>ls(e,s)):("object"==i&&null!==e&&(e=ls(e)),s[n]=e)}return s}n=class{constructor(e={}){for(var t in this.raws={},this[ss]=!1,this[ns]=!0,e)if("nodes"===t){this.nodes=[];for(var r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){var t;return e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)&&(t=this.source,e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)),e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(var t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){var t,r=ls(this);for(t in e)r[t]=e[t];return r}cloneAfter(e={}){e=this.clone(e);return this.parent.insertAfter(this,e),e}cloneBefore(e={}){e=this.clone(e);return this.parent.insertBefore(this,e),e}error(e,t={}){var r,s;return this.source?({end:r,start:s}=this.rangeBy(t),this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)):new is(e)}getProxyProcessor(){return{get(e,t){return"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]!==r&&(e[t]=r,"prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0}}}markDirty(){if(this[ss]){this[ss]=!1;let e=this;for(;e=e.parent;)e[ss]=!1}}next(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;return e.index?r=this.positionInside(e.index,t):e.word&&-1!==(e=(t=this.toString()).indexOf(e.word))&&(r=this.positionInside(e,t)),r}positionInside(t,e){var r=e||this.toString();let s=this.source.start.column,n=this.source.start.line;for(let e=0;e<t;e++)"\n"===r[e]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};var s,n;return e.word?-1!==(n=(s=this.toString()).indexOf(e.word))&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s)):(e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1))),{end:r=r.line<t.line||r.line===t.line&&r.column<=t.column?{column:t.column+1,line:t.line}:r,start:t}}raw(e,t){return(new os).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...r){if(this.parent){let e=this,t=!1;for(var s of r)s===this?t=!0:t?(this.parent.insertAfter(e,s),e=s):this.parent.insertBefore(e,s);t||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){var r,s={},n=null==t;t=t||new Map;let i=0;for(r in this)if(Object.prototype.hasOwnProperty.call(this,r)&&"parent"!==r&&"proxyCache"!==r){var o=this[r];if(Array.isArray(o))s[r]=o.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof o&&o.toJSON)s[r]=o.toJSON(null,t);else if("source"===r){let e=t.get(o.input);null==e&&(e=i,t.set(o.input,i),i++),s[r]={end:o.end,inputId:e,start:o.start}}else s[r]=o}return n&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=as){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){var s,n={node:this};for(s in r)n[s]=r[s];return e.warn(t,n)}get proxyOf(){return this}},l=n,n.default=n,e=l,S=class extends e{constructor(e){super(e=e&&void 0!==e.value&&"string"!=typeof e.value?{...e,value:String(e.value)}:e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}},c=S;S.default=S;Or={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(s,n=21)=>(e=n)=>{let t="",r=e;for(;r--;)t+=s[Math.random()*s.length|0];return t}};let{SourceMapConsumer:us,SourceMapGenerator:cs}=h,{existsSync:hs,readFileSync:ds}=h,{dirname:ps,join:gs}=h;var u=class{constructor(e,t){!1!==t.map&&(this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:"),e=t.map?t.map.prev:void 0,e=this.loadMap(t.from,e),!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=ps(this.mapFile)),e)&&(this.text=e)}consumer(){return this.consumerCache||(this.consumerCache=new us(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+t)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){var t,r=e.match(/\/\*\s*# sourceMappingURL=/gm);r&&(r=e.lastIndexOf(r.pop()),t=e.indexOf("*/",r),-1<r)&&-1<t&&(this.annotation=this.getAnnotationURL(e.substring(r,t)))}loadFile(e){if(this.root=ps(e),hs(e))return this.mapFile=e,ds(e,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof us)return cs.fromSourceMap(e).toString();if(e instanceof cs)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}e=e(t);if(e){var r=this.loadFile(e);if(r)return r;throw new Error("Unable to load previous source map: "+e.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;return t&&(e=gs(ps(t),e)),this.loadFile(e)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}},b=u,{SourceMapConsumer:p,SourceMapGenerator:i}=(u.default=u,h);let{fileURLToPath:fs,pathToFileURL:ms}=h,{isAbsolute:vs,resolve:ys}=h,_s=Or["nanoid"];g=h;let bs=d,Ss=b,ws=Symbol("fromOffsetCache"),Cs=Boolean(p&&i),ks=Boolean(ys&&vs);r=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!ks||/^\w+:\/\//.test(t.from)||vs(t.from)?this.file=t.from:this.file=ys(t.from)),ks&&Cs&&(e=new Ss(this.css,t)).text&&(t=(this.map=e).consumer().file,!this.file)&&t&&(this.file=this.mapResolve(t)),this.file||(this.id="<input css "+_s(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,i,o;t&&"object"==typeof t?(a=r,r="number"==typeof(l=t).offset?(t=(u=this.fromOffset(l.offset)).line,u.col):(t=l.line,l.column),o="number"==typeof a.offset?(u=this.fromOffset(a.offset),i=u.line,u.col):(i=a.line,a.column)):r||(t=(l=this.fromOffset(t)).line,r=l.col);var a,l,u=this.origin(t,r,i,o);return(n=u?new bs(e,void 0===u.endLine?u.line:{column:u.column,line:u.line},void 0===u.endLine?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,s.plugin):new bs(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:o,line:i},this.css,this.file,s.plugin)).input={column:r,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(ms&&(n.input.url=ms(this.file).toString()),n.input.file=this.file),n}fromOffset(t){let s;if(this[ws])s=this[ws];else{var n=this.css.split("\n");s=new Array(n.length);let r=0;for(let e=0,t=n.length;e<t;e++)s[e]=r,r+=n[e].length+1;this[ws]=s}let r=0;if(s[s.length-1]<=t)r=s.length-1;else{let e=s.length-2;for(var i;r<e;)if(i=r+(e-r>>1),t<s[i])e=i-1;else{if(!(t>=s[i+1])){r=i;break}r=i+1}}return{col:t-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ys(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;var n=this.map.consumer(),t=n.originalPositionFor({column:t,line:e});if(!t.source)return!1;let i;"number"==typeof r&&(i=n.originalPositionFor({column:s,line:r}));let o;o=vs(t.source)?ms(t.source):new URL(t.source,this.map.consumer().sourceRoot||ms(this.map.mapFile));e={column:t.column,endColumn:i&&i.column,endLine:i&&i.line,line:t.line,url:o.toString()};if("file:"===o.protocol){if(!fs)throw new Error("file: protocol is not available in this PostCSS build");e.file=fs(o)}s=n.sourceContentFor(t.source);return s&&(e.source=s),e}toJSON(){var e,t={};for(e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map={...this.map},t.map.consumerCache)&&(t.map.consumerCache=void 0),t}get from(){return this.file||this.id}},m=r;r.default=r,g&&g.registerInput&&g.registerInput(r);let{SourceMapConsumer:Is,SourceMapGenerator:Es}=h,{dirname:Os,relative:xs,resolve:Ms,sep:Rs}=h,As=h["pathToFileURL"],Ts=m,Ds=Boolean(Is&&Es),Ls=Boolean(Os&&Ms&&xs&&Rs);f=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,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 e,t=(e=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")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(var t of this.previous()){var r=this.toUrl(this.path(t.file)),s=t.root||Os(t.file);let e;!1===this.mapOpts.sourcesContent?(e=new Is(t.text)).sourcesContent&&(e.sourcesContent=null):e=t.consumer(),this.map.applySourceMap(e,r,this.toUrl(this.path(s)))}}clearAnnotation(){var t;if(!1!==this.mapOpts.annotation)if(this.root)for(let e=this.root.nodes.length-1;0<=e;e--)"comment"===(t=this.root.nodes[e]).type&&0===t.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(e);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Ls&&Ds&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){var e;return this.root?this.generateString():1===this.previous().length?((e=this.previous()[0].consumer()).file=this.outputFile(),this.map=Es.fromSourceMap(e,{ignoreInvalidMapping:!0})):(this.map=new Es({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 Es({file:this.outputFile(),ignoreInvalidMapping:!0});let s=1,n=1,i="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""},a,l;this.stringify(this.root,(e,t,r)=>{this.css+=e,t&&"end"!==r&&(o.generated.line=s,o.generated.column=n-1,t.source&&t.source.start?(o.source=this.sourcePath(t),o.original.line=t.source.start.line,o.original.column=t.source.start.column-1):(o.source=i,o.original.line=1,o.original.column=0),this.map.addMapping(o)),(a=e.match(/\n/g))?(s+=a.length,l=e.lastIndexOf("\n"),n=e.length-l):n+=e.length,t&&"start"!==r&&(e=t.parent||{raws:{}},"decl"!==t.type&&("atrule"!==t.type||t.nodes)||t!==e.last||e.raws.semicolon)&&(t.source&&t.source.end?(o.source=this.sourcePath(t),o.original.line=t.source.end.line,o.original.column=t.source.end.column-1,o.generated.line=s,o.generated.column=n-2):(o.source=i,o.original.line=1,o.original.column=0,o.generated.line=s,o.generated.column=n-1),this.map.addMapping(o))})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){var e;return void 0!==this.mapOpts.inline?this.mapOpts.inline:(void 0===(e=this.mapOpts.annotation)||!0===e)&&(!this.previous().length||this.previous().some(e=>e.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(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Os(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Os(Ms(r,this.mapOpts.annotation)));t=xs(r,e);return this.memoizedPaths.set(e,t),t}previous(){var e;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(e=>{e.source&&e.source.input.map&&(e=e.source.input.map,this.previousMaps.includes(e)||this.previousMaps.push(e))}):(e=new Ts(this.originalCSS,this.opts)).map&&this.previousMaps.push(e.map)),this.previousMaps}setSourcesContent(){let r={};var e;this.root?this.root.walk(e=>{var t;e.source&&(t=e.source.input.from)&&!r[t]&&(r[t]=!0,t=this.usesFileUrls?this.toFileUrl(t):this.toUrl(this.path(t)),this.map.setSourceContent(t,e.source.input.css))}):this.css&&(e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(e,this.css))}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(As)return t=As(e).toString(),this.memoizedFileURLs.set(e,t),t;throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===Rs&&(e=e.replace(/\\/g,"/"));t=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,t),t}},v=class extends l{constructor(e){super(e),this.type="comment"}},y=v;v.default=v;let{isClean:Ps,my:Ns}=_,Fs=c,js=y,Us,Bs,zs,Vs;let Ws=class Bo extends l{append(...e){for(var t of e){var r;for(r of this.normalize(t,this.last))this.proxyOf.nodes.push(r)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(var t of this.nodes)t.cleanRaws(e)}each(r){if(this.proxyOf.nodes){var s=this.getIterator();let e,t;for(;this.indexes[s]<this.proxyOf.nodes.length&&(e=this.indexes[s],!1!==(t=r(this.proxyOf.nodes[e],e)));)this.indexes[s]+=1;return delete this.indexes[s],t}}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(t,s){return"proxyOf"===s?t:t[s]&&("each"===s||"string"==typeof s&&s.startsWith("walk")?(...e)=>t[s](...e.map(r=>"function"==typeof r?(e,t)=>r(e.toProxy(),t):r)):"every"===s||"some"===s?r=>t[s]((e,...t)=>r(e.toProxy(),...t)):"root"===s?()=>t.root().toProxy():"nodes"===s?t.nodes.map(e=>e.toProxy()):"first"===s||"last"===s?t[s].toProxy():t[s])},set(e,t,r){return e[t]!==r&&(e[t]=r,"name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0}}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){var r,s,n,i=this.index(e),o=this.normalize(t,this.proxyOf.nodes[i]).reverse(),i=this.index(e);for(r of o)this.proxyOf.nodes.splice(i+1,0,r);for(n in this.indexes)i<(s=this.indexes[n])&&(this.indexes[n]=s+o.length);return this.markDirty(),this}insertBefore(e,t){var r,s,n,i=this.index(e),o=this.normalize(t,this.proxyOf.nodes[i],0===i&&"prepend").reverse(),i=this.index(e);for(r of o)this.proxyOf.nodes.splice(i,0,r);for(n in this.indexes)i<=(s=this.indexes[n])&&(this.indexes[n]=s+o.length);return this.markDirty(),this}normalize(e,t){if("string"==typeof e)e=function t(e){return e.map(e=>(e.nodes&&(e.nodes=t(e.nodes)),delete e.source,e))}(Us(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e))for(var r of e=e.slice(0))r.parent&&r.parent.removeChild(r,"ignore");else if("root"===e.type&&"document"!==this.type)for(var s of e=e.nodes.slice(0))s.parent&&s.parent.removeChild(s,"ignore");else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new Fs(e)]}else if(e.selector)e=[new Bs(e)];else if(e.name)e=[new zs(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new js(e)]}return e.map(e=>(e[Ns]||Bo.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[Ps]&&function e(t){if(t[Ps]=!1,t.proxyOf.nodes)for(var r of t.proxyOf.nodes)e(r)}(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){for(var t of e=e.reverse()){var r,s,n=this.normalize(t,this.first,"prepend").reverse();for(r of n)this.proxyOf.nodes.unshift(r);for(s in this.indexes)this.indexes[s]=this.indexes[s]+n.length}return this.markDirty(),this}push(e){return(e.parent=this).proxyOf.nodes.push(e),this}removeAll(){for(var e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){var t,r;for(r in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)e<=(t=this.indexes[r])&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(t,r,s){return s||(s=r,r={}),this.walkDecls(e=>{r.props&&!r.props.includes(e.prop)||r.fast&&!e.value.includes(r.fast)||(e.value=e.value.replace(t,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(s){return this.each((t,e)=>{let r;try{r=s(t,e)}catch(e){throw t.addToError(e)}return r=!1!==r&&t.walk?t.walk(s):r})}walkAtRules(r,s){return s?r instanceof RegExp?this.walk((e,t)=>{if("atrule"===e.type&&r.test(e.name))return s(e,t)}):this.walk((e,t)=>{if("atrule"===e.type&&e.name===r)return s(e,t)}):(s=r,this.walk((e,t)=>{if("atrule"===e.type)return s(e,t)}))}walkComments(r){return this.walk((e,t)=>{if("comment"===e.type)return r(e,t)})}walkDecls(r,s){return s?r instanceof RegExp?this.walk((e,t)=>{if("decl"===e.type&&r.test(e.prop))return s(e,t)}):this.walk((e,t)=>{if("decl"===e.type&&e.prop===r)return s(e,t)}):(s=r,this.walk((e,t)=>{if("decl"===e.type)return s(e,t)}))}walkRules(r,s){return s?r instanceof RegExp?this.walk((e,t)=>{if("rule"===e.type&&r.test(e.selector))return s(e,t)}):this.walk((e,t)=>{if("rule"===e.type&&e.selector===r)return s(e,t)}):(s=r,this.walk((e,t)=>{if("rule"===e.type)return s(e,t)}))}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]}};Ws.registerParse=e=>{Us=e},Ws.registerRule=e=>{Bs=e},Ws.registerAtRule=e=>{zs=e},Ws.registerRoot=e=>{Vs=e};o=Ws,(Ws.default=Ws).rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,zs.prototype):"rule"===e.type?Object.setPrototypeOf(e,Bs.prototype):"decl"===e.type?Object.setPrototypeOf(e,Fs.prototype):"comment"===e.type?Object.setPrototypeOf(e,js.prototype):"root"===e.type&&Object.setPrototypeOf(e,Vs.prototype),e[Ns]=!0,e.nodes&&e.nodes.forEach(e=>{Ws.rebuild(e)})},n=o;let Gs,Ks;e=class extends n{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Gs(new Ks,this,e).stringify()}},e.registerLazyResult=e=>{Gs=e},e.registerProcessor=e=>{Ks=e},S=e;e.default=e;u=class{constructor(e,t={}){for(var r in this.type="warning",this.text=e,t.node&&t.node.source&&(e=t.node.rangeBy(t),this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column),t)this[r]=t[r]}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}},Or=u;u.default=u;let Ys=Or;p=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);e=new Ys(e,t);return this.messages.push(e),e}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}},i=p;p.default=p;const Js="'".charCodeAt(0),Hs='"'.charCodeAt(0),qs="\\".charCodeAt(0),Zs="/".charCodeAt(0),$s="\n".charCodeAt(0),Xs=" ".charCodeAt(0),Qs="\f".charCodeAt(0),en="\t".charCodeAt(0),tn="\r".charCodeAt(0),rn="[".charCodeAt(0),sn="]".charCodeAt(0),nn="(".charCodeAt(0),on=")".charCodeAt(0),an="{".charCodeAt(0),ln="}".charCodeAt(0),un=";".charCodeAt(0),cn="*".charCodeAt(0),hn=":".charCodeAt(0),dn="@".charCodeAt(0),pn=/[\t\n\f\r "#'()/;[\\\]{}]/g,gn=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,fn=/.[\r\n"'(/\\]/,mn=/[\da-f]/i;g=class extends o{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},r=g,o.registerAtRule(g.default=g),h=o;let vn,yn;v=class extends h{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){e=super.normalize(e);if(t)if("prepend"===r)1<this.nodes.length?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(var s of e)s.raws.before=t.raws.before;return e}removeChild(e,t){var r=this.index(e);return!t&&0===r&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new vn(new yn,this,e).stringify()}},v.registerLazyResult=e=>{vn=e},v.registerProcessor=e=>{yn=e},n=v;h.registerRoot(v.default=v);let _n={comma(e){return _n.split(e,[","],!0)},space(e){return _n.split(e,[" ","\n","\t"])},split(e,t,r){var s,n=[];let i="",o=!1,a=0,l=!1,u="",c=!1;for(s of e)c?c=!1:"\\"===s?c=!0:l?s===u&&(l=!1):'"'===s||"'"===s?(l=!0,u=s):"("===s?a+=1:")"===s?0<a&&--a:0===a&&t.includes(s)&&(o=!0),o?(""!==i&&n.push(i.trim()),i="",o=!1):i+=s;return!r&&""===i||n.push(i.trim()),n}};e=_n;_n.default=_n;let bn=e;u=class extends o{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return bn.comma(this.selector)}set selectors(e){var t=this.selector?this.selector.match(/,\s*/):null,t=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(t)}},p=u;o.registerRule(u.default=u);let Sn=c,wn=function(t,e={}){let s=t.css.valueOf(),n=e.ignoreErrors,i,o,a,l,u,c,h,d,p,g,f=s.length,m=0,v=[],y=[];function _(e){throw t.error("Unclosed "+e,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(!(m>=f)){var t=!!e&&e.ignoreUnclosed;switch(i=s.charCodeAt(m)){case $s:case Xs:case en:case tn:case Qs:for(o=m;o+=1,(i=s.charCodeAt(o))===Xs||i===$s||i===en||i===tn||i===Qs;);g=["space",s.slice(m,o)],m=o-1;break;case rn:case sn:case an:case ln:case hn:case un:case on:var r=String.fromCharCode(i);g=[r,r,m];break;case nn:if(d=v.length?v.pop()[1]:"",p=s.charCodeAt(m+1),"url"===d&&p!==Js&&p!==Hs&&p!==Xs&&p!==$s&&p!==en&&p!==Qs&&p!==tn){o=m;do{if(c=!1,-1===(o=s.indexOf(")",o+1))){if(n||t){o=m;break}_("bracket")}for(h=o;s.charCodeAt(h-1)===qs;)--h,c=!c}while(c);g=["brackets",s.slice(m,o+1),m,o],m=o}else o=s.indexOf(")",m+1),l=s.slice(m,o+1),-1===o||fn.test(l)?g=["(","(",m]:(g=["brackets",l,m,o],m=o);break;case Js:case Hs:a=i===Js?"'":'"',o=m;do{if(c=!1,-1===(o=s.indexOf(a,o+1))){if(n||t){o=m+1;break}_("string")}for(h=o;s.charCodeAt(h-1)===qs;)--h,c=!c}while(c);g=["string",s.slice(m,o+1),m,o],m=o;break;case dn:pn.lastIndex=m+1,pn.test(s),o=0===pn.lastIndex?s.length-1:pn.lastIndex-2,g=["at-word",s.slice(m,o+1),m,o],m=o;break;case qs:for(o=m,u=!0;s.charCodeAt(o+1)===qs;)o+=1,u=!u;if(i=s.charCodeAt(o+1),u&&i!==Zs&&i!==Xs&&i!==$s&&i!==en&&i!==tn&&i!==Qs&&(o+=1,mn.test(s.charAt(o)))){for(;mn.test(s.charAt(o+1));)o+=1;s.charCodeAt(o+1)===Xs&&(o+=1)}g=["word",s.slice(m,o+1),m,o],m=o;break;default:m=(i===Zs&&s.charCodeAt(m+1)===cn?(0===(o=s.indexOf("*/",m+2)+1)&&(n||t?o=s.length:_("comment")),g=["comment",s.slice(m,o+1),m,o]):(gn.lastIndex=m+1,gn.test(s),o=0===gn.lastIndex?s.length-1:gn.lastIndex-2,g=["word",s.slice(m,o+1),m,o],v.push(g)),o)}return m++,g}},position:function(){return m}}},Cn=y,kn=r,In=n,En=p;const On={empty:!0,space:!0};let xn=class{constructor(e){this.input=e,this.root=new In,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){var t,r=new kn;r.name=e[1].slice(1),""===r.name&&this.unnamedAtrule(r,e),this.init(r,e[2]);let s,n,i=!1,o=!1;for(var a=[],l=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&0<l.length?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){r.source.end=this.getPosition(e[2]),r.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(0<a.length){for(n=a.length-1,s=a[n];s&&"space"===s[0];)s=a[--n];s&&(r.source.end=this.getPosition(s[3]||s[2]),r.source.end.offset++)}this.end(e);break}}if(a.push(e),this.tokenizer.endOfFile()){i=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(r.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(r,"params",a),i&&(e=a[a.length-1],r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),o&&(r.nodes=[],this.current=r)}checkMissedSemicolon(s){var n=this.colon(s);if(!1!==n){let t=0,r;for(let e=n-1;0<=e&&("space"===(r=s[e])[0]||2!==(t+=1));e--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(e){let t=0,r,s,n;for(var[i,o]of e.entries()){if("("===(s=(r=o)[0])&&(t+=1),")"===s&&--t,0===t&&":"===s){if(n){if("word"===n[0]&&"progid"===n[1])continue;return i}this.doubleColon(r)}n=r}return!1}comment(e){var t=new Cn,e=(this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,e[1].slice(2,-2));/^\s*$/.test(e)?(t.text="",t.raws.left=e,t.raws.right=""):(e=e.match(/^(\s*)([^]*\S)(\s*)$/),t.text=e[2],t.raws.left=e[1],t.raws.right=e[3])}createTokenizer(){this.tokenizer=wn(this.input)}decl(e,t){var r,s=new Sn,n=(this.init(s,e[0][2]),e[e.length-1]);for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(t){for(let e=t.length-1;0<=e;e--){var r=t[e],r=r[3]||r[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){var i=e[0][0];if(":"===i||"space"===i||"comment"===i)break;s.prop+=e.shift()[1]}s.raws.between="";let o;for(;e.length;){if(":"===(o=e.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(;e.length&&("space"===(r=e[0][0])||"comment"===r);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let r=e.length-1;0<=r;r--){if("!important"===(o=e[r])[1].toLowerCase()){s.important=!0;var l=this.stringFrom(e,r);" !important"!==(l=this.spacesFromEnd(e)+l)&&(s.raws.important=l);break}if("important"===o[1].toLowerCase()){var u=e.slice(0);let t="";for(let e=r;0<e;e--){var c=u[e][0];if(0===t.trim().indexOf("!")&&"space"!==c)break;t=u.pop()[1]+t}0===t.trim().indexOf("!")&&(s.important=!0,s.raws.important=t,e=u)}if("space"!==o[0]&&"comment"!==o[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(s,"value",a.concat(e),t),s.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){var t=new En;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){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(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}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(e){this.spaces+=e[1],this.current.nodes&&(e=this.current.nodes[this.current.nodes.length-1])&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}getPosition(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1;var r;let s=!1,n=null;var i=[],o=e[1].startsWith("--"),a=[];let l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n=n||l,i.push("("===r?")":"]");else if(o&&s&&"{"===r)n=n||l,i.push("}");else if(0===i.length){if(";"===r){if(s)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length)&&(n=null);l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),0<i.length&&this.unclosedBracket(n),t&&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 e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){var n,i,o,a,l=r.length;let u="",c=!0;for(let e=0;e<l;e+=1)"space"===(o=(n=r[e])[0])&&e===l-1&&!s||"comment"===o&&(o=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",On[o]||On[i]||","===u.slice(-1))?c=!1:u+=n[1];c||(a=r.reduce((e,t)=>e+t[1],""),e.raws[t]={raw:a,value:u}),e[t]=u}rule(e){e.pop();var t=new En;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){var t;let r="";for(;e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){var t;let r="";for(;e.length&&("space"===(t=e[0][0])||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t="";for(;e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}stringFrom(t,r){let s="";for(let e=r;e<t.length;e++)s+=t[e][1];return t.splice(r,t.length-r),s}unclosedBlock(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Mn=m;function Rn(e,t){e=new Mn(e,t),t=new xn(e);try{t.parse()}catch(e){throw e}return t.root}g=Rn;o.registerParse(Rn.default=Rn);let{isClean:An,my:Tn}=_,Dn=f,Ln=s,Pn=o;h=S;let Nn=i,Fn=g;v=n;const jn={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Un={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},Bn={Once:!0,postcssPlugin:!0,prepare:!0},zn=0;function Vn(e){return"object"==typeof e&&"function"==typeof e.then}function Wn(e){let t=!1;var r=jn[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,zn,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,zn,r+"Exit"]:[r,r+"Exit"]}function Gn(e){let t;return{eventIndex:0,events:t="document"===e.type?["Document",zn,"DocumentExit"]:"root"===e.type?["Root",zn,"RootExit"]:Wn(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function Kn(e){return e[An]=!1,e.nodes&&e.nodes.forEach(e=>Kn(e)),e}let Yn={};u=class zo{constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if("object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof zo||t instanceof Nn)s=Kn(t.root),t.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let e=Fn;r.syntax&&(e=r.syntax.parse),(e=r.parser?r.parser:e).parse&&(e=e.parse);try{s=e(t,r)}catch(e){this.processed=!0,this.error=e}s&&!s[Tn]&&Pn.rebuild(s)}else s=Kn(t);this.result=new Nn(e,s,r),this.helpers={...Yn,postcss:Yn,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){var r=this.result.lastPlugin;try{t&&t.addToError(e),"CssSyntaxError"!==(this.error=e).name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};var e,t=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(e of this.plugins)if("object"==typeof e)for(var r in e){if(!Un[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Bn[r])if("object"==typeof e[r])for(var s in e[r])"*"===s?t(e,r,e[r][s]):t(e,r+"-"+s.toLowerCase(),e[r][s]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=0<Object.keys(this.listeners).length}async runAsync(){for(let e=this.plugin=0;e<this.plugins.length;e++){var t=this.plugins[e],t=this.runOnRoot(t);if(Vn(t))try{await t}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){for(var r,s=this.result.root;!s[An];){s[An]=!0;for(var n=[Gn(s)];0<n.length;){var i=this.visitTick(n);if(Vn(i))try{await i}catch(e){i=n[n.length-1].node;throw this.handleError(e,i)}}}if(this.listeners.OnceExit)for(let[e,t]of this.listeners.OnceExit){this.result.lastPlugin=e;try{"document"===s.type?(r=s.nodes.map(e=>t(e,this.helpers)),await Promise.all(r)):await t(s,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{var e;return"object"==typeof t&&t.Once?"document"===this.result.root.type?Vn((e=this.result.root.nodes.map(e=>t.Once(e,this.helpers)))[0])?Promise.all(e):e:t.Once(this.result.root,this.helpers):"function"==typeof t?t(this.result.root,this.result):void 0}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(!this.stringified){this.stringified=!0,this.sync();var t=this.result.opts;let e=Ln;t.syntax&&(e=t.syntax.stringify),(e=t.stringifier?t.stringifier:e).stringify&&(e=e.stringify);t=new Dn(e,this.result.root,this.result.opts).generate();this.result.css=t[0],this.result.map=t[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 e of this.plugins)if(Vn(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var t=this.result.root;!t[An];)t[An]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(var r of t.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,t)}}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(var[r,s]of e){this.result.lastPlugin=r;let e;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(Vn(e))throw this.getAsyncError()}}visitTick(e){var t=e[e.length-1],{node:r,visitors:s}=t;if("root"===r.type||"document"===r.type||r.parent){if(0<s.length&&t.visitorIndex<s.length){var[n,i]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return i(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){for(var o,a=t.iterator;o=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!o[An])return o[An]=!0,void e.push(Gn(o));t.iterator=0,delete r.indexes[a]}for(var l=t.events;t.eventIndex<l.length;){var u=l[t.eventIndex];if(t.eventIndex+=1,u===zn)return void(r.nodes&&r.nodes.length&&(r[An]=!0,t.iterator=r.getIterator()));if(this.listeners[u])return void(t.visitors=this.listeners[u])}}e.pop()}walkSync(e){var t;e[An]=!0;for(t of Wn(e))if(t===zn)e.nodes&&e.each(e=>{e[An]||this.walkSync(e)});else{var r=this.listeners[t];if(r&&this.visitSync(r,e.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"}},u.registerPostcss=e=>{Yn=e},_=u;v.registerLazyResult(u.default=u),h.registerLazyResult(u);let Jn=f,Hn=s;let qn=g;const Zn=i;v=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;e=Hn;this.result=new Zn(this._processor,void 0,this._opts),this.result.css=t;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});r=new Jn(e,void 0,this._opts,t);r.isMap()?([e,t]=r.generate(),e&&(this.result.css=e),t&&(this.result.map=t)):(r.clearAnnotation(),this.result.css=r.css)}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}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._root)return this._root;let e;var t=qn;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e}get[Symbol.toStringTag](){return"NoWorkResult"}},h=v;v.default=v;let $n=h,Xn=_;u=S,f=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(var r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return new(this.plugins.length||t.parser||t.stringifier||t.syntax?Xn:$n)(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},v=f;n.registerProcessor(f.default=f),u.registerProcessor(f);let Qn=c,ei=b,ti=y,ri=r,si=m,ni=n,ii=p;function oi(e,r){if(Array.isArray(e))return e.map(e=>oi(e));let{inputs:t,...s}=e;if(t){r=[];for(var n of t){n={...n,__proto__:si.prototype};n.map&&(n.map={...n.map,__proto__:ei.prototype}),r.push(n)}}if(s.nodes&&(s.nodes=e.nodes.map(e=>oi(e,r))),s.source){let{inputId:e,...t}=s.source;s.source=t,null!=e&&(s.source.input=r[e])}if("root"===s.type)return new ni(s);if("decl"===s.type)return new Qn(s);if("rule"===s.type)return new ii(s);if("comment"===s.type)return new ti(s);if("atrule"===s.type)return new ri(s);throw new Error("Unknown node type: "+e.type)}h=oi,oi.default=oi,u=d;let ai=c;f=_,b=o;let li=v;d=s,c=h;let ui=S;_=Or;let ci=y,hi=r;o=i,v=m,s=g,h=e;let di=p,pi=n;S=l;function k(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new li(e)}k.plugin=function(t,r){let s=!1;function n(...e){console&&console.warn&&!s&&(s=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");e=r(...e);return e.postcssPlugin=t,e.postcssVersion=(new li).version,e}let e;return Object.defineProperty(n,"postcss",{get(){return e=e||n()}}),n.process=function(e,t,r){return k([n(r)]).process(e,t)},n},k.stringify=d,k.parse=s,k.fromJSON=c,k.list=h,k.comment=e=>new ci(e),k.atRule=e=>new hi(e),k.decl=e=>new ai(e),k.rule=e=>new di(e),k.root=e=>new pi(e),k.document=e=>new ui(e),k.CssSyntaxError=u,k.Declaration=ai,k.Container=b,k.Processor=li,k.Document=ui,k.Comment=ci,k.Warning=_,k.AtRule=hi,k.Result=o,k.Input=v,k.Rule=di,k.Root=pi,k.Node=S,f.registerPostcss(k);Or=k,k.default=k,y=qr(Or);y.stringify,y.fromJSON,y.plugin,y.parse,y.list,y.document,y.comment,y.atRule,y.rule,y.decl,y.root,y.CssSyntaxError,y.Declaration,y.Container,y.Processor,y.Document,y.Comment,y.Warning,y.AtRule,y.Result,y.Input,y.Rule,y.Root,y.Node;const gi={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},fi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},mi={};function vi(e){if(mi[e])return mi[e];var t=globalThis[e];const r=t.prototype;var s=e in gi?gi[e]:void 0,s=Boolean(s&&s.every(e=>{return Boolean(null==(e=null==(e=Object.getOwnPropertyDescriptor(r,e))?void 0:e.get)?void 0:e.toString().includes("[native code]"))})),n=e in fi?fi[e]:void 0,n=Boolean(n&&n.every(e=>{return"function"==typeof r[e]&&(null==(e=r[e])?void 0:e.toString().includes("[native code]"))}));if(s&&n)return mi[e]=t.prototype,t.prototype;try{var i,o=document.createElement("iframe"),a=(document.body.appendChild(o),o.contentWindow);return a?(i=a[e].prototype,document.body.removeChild(o),i?mi[e]=i:r):t.prototype}catch{return r}}const yi={};function _i(e,t,r){var s=e+"."+String(r);return yi[s]?yi[s].call(t):(e=vi(e),(e=null==(e=Object.getOwnPropertyDescriptor(e,r))?void 0:e.get)?(yi[s]=e).call(t):t[r])}const bi={};function Si(e,t,r){var s=e+"."+String(r);return bi[s]?bi[s].bind(t):"function"!=typeof(e=vi(e)[r])?t[r]:(bi[s]=e).bind(t)}function wi(){return vi("MutationObserver").constructor}const $={childNodes:function(e){return _i("Node",e,"childNodes")},parentNode:function(e){return _i("Node",e,"parentNode")},parentElement:function(e){return _i("Node",e,"parentElement")},textContent:function(e){return _i("Node",e,"textContent")},contains:function(e,t){return Si("Node",e,"contains")(t)},getRootNode:function(e){return Si("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?_i("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?_i("Element",e,"shadowRoot"):null},querySelector:function(e,t){return _i("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return _i("Element",e,"querySelectorAll")(t)},mutationObserver:wi};function X(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const Ci="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.";r={map:{},getId(){return console.error(Ci),-1},getNode(){return console.error(Ci),null},removeNodeFromMap(){console.error(Ci)},has(){return console.error(Ci),!1},reset(){console.error(Ci)}};function ki(n,i,o={}){let a=null,l=0;return function(...e){var t=Date.now(),r=(l||!1!==o.leading||(l=t),i-(t-l));const s=this;r<=0||i<r?(a&&(clearTimeout(a),a=null),l=t,n.apply(s,e)):a||!1===o.trailing||(a=setTimeout(()=>{l=!1===o.leading?0:Date.now(),a=null,n.apply(s,e)},r))}}function Ii(e,t,r,s,n=window){const i=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,s?r:{set(e){setTimeout(()=>{r.set.call(this,e)},0),i&&i.set&&i.set.call(this,e)}}),()=>Ii(e,t,i||{},!0)}function Ei(e,t,r){try{if(!(t in e))return()=>{};const n=e[t];var s=r(n);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=s,()=>{e[t]=n}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&new Proxy(r,{get(e,t,r){return"map"===t&&console.error(Ci),Reflect.get(e,t,r)}});let Oi=Date.now;function xi(e){var t,r=e.document;return{left:r.scrollingElement?r.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:r.documentElement.scrollLeft||(null==r?void 0:r.body)&&(null==(t=$.parentElement(r.body))?void 0:t.scrollLeft)||(null==(t=null==r?void 0:r.body)?void 0:t.scrollLeft)||0,top:r.scrollingElement?r.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==r?void 0:r.documentElement.scrollTop)||(null==r?void 0:r.body)&&(null==(t=$.parentElement(r.body))?void 0:t.scrollTop)||(null==(e=null==r?void 0:r.body)?void 0:e.scrollTop)||0}}function Mi(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ri(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ai(e){return e?e.nodeType===e.ELEMENT_NODE?e:$.parentElement(e):null}function P(e,t,r,s){if(e){e=Ai(e);if(e){try{if("string"==typeof t){if(e.classList.contains(t))return!0;if(s&&null!==e.closest("."+t))return!0}else if(Ee(e,t,s))return!0}catch(e){}if(r){if(e.matches(r))return!0;if(s&&null!==e.closest(r))return!0}}}return!1}function Ti(e,t,r){return"TITLE"===e.tagName&&r.headTitleMutations||t.getId(e)===ge}function Di(e){return Boolean(e.changedTouches)}function Li(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Pi(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Ni(e){return e&&(!1&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean($.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Oi=()=>(new Date).getTime());class Fi{constructor(){a(this,"id",1),a(this,"styleIDMap",new WeakMap),a(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function ji(e){var t;let r=null;return r="getRootNode"in e&&(null==(t=$.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&$.host($.getRootNode(e))?$.host($.getRootNode(e)):r}function Ui(e){var t=e.ownerDocument;return!!t&&(e=function(e){let t=e;for(var r;r=ji(t);)t=r;return t}(e),$.contains(t,e))}function Bi(e){var t=e.ownerDocument;return t&&($.contains(t,e)||Ui(e))}var Q=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))({}),ee=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(ee||{}),I=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(I||{}),zi=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(zi||{}),Vi=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))({}),Wi=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Wi||{});function Gi(e){return"__ln"in e}class Ki{constructor(){a(this,"length",0),a(this,"head",null),a(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let e=0;e<t;e++)r=(null==r?void 0:r.next)||null;return r}addNode(e){var t,r={value:e,previous:null,next:null};e.__ln=r,e.previousSibling&&Gi(e.previousSibling)?(t=e.previousSibling.__ln.next,r.next=t,r.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=r,t&&(t.previous=r)):e.nextSibling&&Gi(e.nextSibling)&&e.nextSibling.__ln.previous?(t=e.nextSibling.__ln.previous,r.previous=t,r.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=r,t&&(t.next=r)):(this.head&&(this.head.previous=r),r.next=this.head,this.head=r),null===r.next&&(this.tail=r),this.length++}removeNode(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}class Yi{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",e=>{e.forEach(this.processMutation),this.emit()}),a(this,"emit",()=>{if(!this.frozen&&!this.locked){const l=[],u=new Set,c=new Ki,h=e=>{let t=e,r=ge;for(;r===ge;)t=t&&t.nextSibling,r=t&&this.mirror.getId(t);return r};for(var r,s,n=t=>{var e,r,s=$.parentNode(t);if(s&&Bi(t)&&"TEXTAREA"!==s.tagName)return s=W(s)?this.mirror.getId(ji(t)):this.mirror.getId(s),e=h(t),-1===s||-1===e?c.addNode(t):void((r=Me(t,{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:e=>{Li(e,this.mirror)&&this.iframeManager.addIframe(e),Pi(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Ni(t)&&this.shadowDomManager.addShadowRoot($.shadowRoot(t),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}}))&&(l.push({parentId:s,nextId:e,node:r}),u.add(r.id)))};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const d of this.movedSet)Hi(this.removes,d,this.mirror)&&!this.movedSet.has($.parentNode(d))||n(d);for(const p of this.addedSet)!qi(this.droppedSet,p)&&!Hi(this.removes,p,this.mirror)||qi(this.movedSet,p)?n(p):this.droppedSet.add(p);let e=null;for(;c.length;){let t=null;if(!(t=e&&(r=this.mirror.getId($.parentNode(e.value)),s=h(e.value),-1!==r)&&-1!==s?e:t)){let e=c.tail;for(;e;){var i=e;if(e=e.previous,i){var o=this.mirror.getId($.parentNode(i.value)),a=h(i.value);if(-1!==a){if(-1!==o){t=i;break}a=i.value,o=$.parentNode(a);if(o&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE){a=$.host(o);if(-1!==this.mirror.getId(a)){t=i;break}}}}}}if(!t){for(;c.head;)c.removeNode(c.head.value);break}e=t.previous,c.removeNode(t.value),n(t.value)}var t={texts:this.texts.map(e=>{var t=e.node,r=$.parentNode(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}}).filter(e=>!u.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{var t,r,s=e["attributes"];return"string"==typeof s.style&&(t=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles),t.length<s.style.length)&&(t+r).split("var(").length===s.style.split("var(").length&&(s.style=e.styleDiff),{id:this.mirror.getId(e.node),attributes:s}}).filter(e=>!u.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:l};(t.texts.length||t.attributes.length||t.removes.length||t.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(t))}}),a(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from($.childNodes(e),e=>$.textContent(e)||"").join("")}),a(this,"processMutation",s=>{if(!Ti(s.target,this.mirror,this.slimDOMOptions))switch(s.type){case"characterData":var n=$.textContent(s.target);P(s.target,this.blockClass,this.blockSelector,!1)||n===s.oldValue||this.texts.push({value:Oe(s.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,Ai(s.target)):n.replace(/[\S]/g,"*"):n,node:s.target});break;case"attributes":{var i=s.target;let e=s.attributeName,t=s.target.getAttribute(e);if("value"===e&&(n=le(i),t=ie({element:i,maskInputOptions:this.maskInputOptions,tagName:i.tagName,type:n,value:t,maskInputFn:this.maskInputFn})),P(s.target,this.blockClass,this.blockSelector,!1)||t===s.oldValue)return;let r=this.attributeMap.get(s.target);if("IFRAME"===i.tagName&&"src"===e&&!this.keepIframeSrcFn(t)){if(i.contentDocument)return;e="rr_src"}if(r||(r={node:s.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(s.target,r)),"type"===e&&"INPUT"===i.tagName&&"password"===(s.oldValue||"").toLowerCase()&&i.setAttribute("data-rr-is-password","true"),!Ie(i.tagName,e))if(r.attributes[e]=ke(this.doc,oe(i.tagName),oe(e),t),"style"===e){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}var o=this.unattachedDoc.createElement("span");s.oldValue&&o.setAttribute("style",s.oldValue);for(const u of Array.from(i.style)){var a=i.style.getPropertyValue(u),l=i.style.getPropertyPriority(u);a!==o.style.getPropertyValue(u)||l!==o.style.getPropertyPriority(u)?r.styleDiff[u]=""===l?a:[a,l]:r._unchangedStyles[u]=[a,l]}for(const c of Array.from(o.style))""===i.style.getPropertyValue(c)&&(r.styleDiff[c]=!1)}else"open"===e&&"DIALOG"===i.tagName&&(i.matches("dialog:modal")?r.attributes.rr_open_mode="modal":r.attributes.rr_open_mode="non-modal");break}case"childList":P(s.target,this.blockClass,this.blockSelector,!0)||("TEXTAREA"!==s.target.tagName?(s.addedNodes.forEach(e=>this.genAdds(e,s.target)),s.removedNodes.forEach(e=>{var t=this.mirror.getId(e),r=W(s.target)?this.mirror.getId($.host(s.target)):this.mirror.getId(s.target);P(s.target,this.blockClass,this.blockSelector,!1)||Ti(e,this.mirror,this.slimDOMOptions)||-1===this.mirror.getId(e)||(this.addedSet.has(e)?(Ji(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(s.target)&&-1===t||function e(t,r){var s;return!W(t)&&(s=r.getId(t),!r.has(s)||(!(s=$.parentNode(t))||s.nodeType!==t.DOCUMENT_NODE)&&(!s||e(s,r)))}(s.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[t+"@"+r]?Ji(this.movedSet,e):this.removes.push({parentId:r,id:t,isShadow:!(!W(s.target)||!G(s.target))||void 0})),this.mapRemoves.push(e))})):this.genTextAreaValueMutation(s.target))}}),a(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(Ti(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let e=null;(e=r&&this.mirror.hasNode(r)?this.mirror.getId(r):e)&&-1!==e&&(this.movedMap[this.mirror.getId(t)+"@"+e]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);P(t,this.blockClass,this.blockSelector,!1)||($.childNodes(t).forEach(e=>this.genAdds(e)),Ni(t)&&$.childNodes($.shadowRoot(t)).forEach(e=>{this.processedNodeManager.add(e,this),this.genAdds(e,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(e=>{this[e]=t[e]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Ji(t,e){t.delete(e),$.childNodes(e).forEach(e=>Ji(t,e))}function Hi(t,r,s){if(0!==t.length){var n=t;t=r;var i=s;let e=$.parentNode(t);for(;e;){const o=i.getId(e);if(n.some(e=>e.id===o))return 1;e=$.parentNode(e)}}}function qi(e,t){return 0!==e.size&&function e(t,r){const s=$.parentNode(r);if(!s)return!1;if(t.has(s))return!0;return e(t,s)}(e,t)}let Zi;const te=t=>{return Zi?(...e)=>{try{return t(...e)}catch(e){if(!Zi||!0!==Zi(e))throw e}}:t},$i=[];function Xi(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Qi(e,t){var r=new Yi,e=($i.push(r),r.init(e),new(wi())(te(r.processMutations.bind(r))));return e.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),e}function eo({mouseInteractionCb:o,doc:s,mirror:a,blockClass:l,blockSelector:u,sampling:e}){if(!1===e.mouseInteraction)return()=>{};const t=!0===e.mouseInteraction||void 0===e.mouseInteraction?{}:e.mouseInteraction,n=[];let c=null;return Object.keys(I).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==t[e]).forEach(e=>{let t=oe(e);i=e;var i,r=r=>{var s=Xi(r);if(!P(s,l,u,!0)){let e=null,t=i;if("pointerType"in r){switch(r.pointerType){case"mouse":e=zi.Mouse;break;case"touch":e=zi.Touch;break;case"pen":e=zi.Pen}e===zi.Touch?I[i]===I.MouseDown?t="TouchStart":I[i]===I.MouseUp&&(t="TouchEnd"):(e,zi.Pen)}else Di(r)&&(e=zi.Touch);null!==e?(c=e,(t.startsWith("Touch")&&e===zi.Touch||t.startsWith("Mouse")&&e===zi.Mouse)&&(e=null)):I[i]===I.Click&&(e=c,c=null);var n,r=Di(r)?r.changedTouches[0]:r;r&&(s=a.getId(s),{clientX:r,clientY:n}=r,te(o)({type:I[t],id:s,x:r,y:n,...null!==e&&{pointerType:e}}))}};if(window.PointerEvent)switch(I[e]){case I.MouseDown:case I.MouseUp:t=t.replace("mouse","pointer");break;case I.TouchStart:case I.TouchEnd:return}n.push(X(t,r,s))}),te(()=>{n.forEach(e=>e())})}function to({scrollCb:s,doc:n,mirror:i,blockClass:o,blockSelector:a,sampling:e}){return X("scroll",te(ki(te(e=>{var t,r,e=Xi(e);e&&!P(e,o,a,!0)&&(t=i.getId(e),e===n&&n.defaultView?(r=xi(n.defaultView),s({id:t,x:r.left,y:r.top})):s({id:t,x:e.scrollLeft,y:e.scrollTop}))}),e.scroll||100)),n)}const ro=["INPUT","TEXTAREA","SELECT"],so=new WeakMap;function no(e){var t,r;return e=e,t=[],lo("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||lo("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||lo("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||lo("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule?(r=Array.from(e.parentRule.cssRules).indexOf(e),t.unshift(r)):e.parentStyleSheet&&(r=Array.from(e.parentStyleSheet.cssRules).indexOf(e),t.unshift(r)),t}function io(e,t,r){let s,n;return e?(e.ownerNode?s=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:s}):{}}function oo({mirror:e,stylesheetManager:r},t){let s=null;s="#document"===t.nodeName?e.getId(t):e.getId($.host(t));e="#document"===t.nodeName?null==(e=t.defaultView)?void 0:e.Document:null==(e=null==(e=t.ownerDocument)?void 0:e.defaultView)?void 0:e.ShadowRoot;const n=null!=e&&e.prototype?Object.getOwnPropertyDescriptor(null==e?void 0:e.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&e&&n?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:n.configurable,enumerable:n.enumerable,get(){var e;return null==(e=n.get)?void 0:e.call(this)},set(e){var t=null==(t=n.set)?void 0:t.call(this,e);if(null!==s&&-1!==s)try{r.adoptStyleSheets(e,s)}catch(e){}return t}}),te(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:n.configurable,enumerable:n.enumerable,get:n.get,set:n.set})})):()=>{}}function ao(e,t={}){var n,r=e.doc.defaultView;if(!r)return()=>{};{var s=e,i=t;const{mutationCb:b,mousemoveCb:S,mouseInteractionCb:w,scrollCb:C,viewportResizeCb:k,inputCb:I,mediaInteractionCb:E,styleSheetRuleCb:O,styleDeclarationCb:x,canvasMutationCb:M,fontCb:R,selectionCb:A,customElementCb:T}=s;s.mutationCb=(...e)=>{i.mutation&&i.mutation(...e),b(...e)},s.mousemoveCb=(...e)=>{i.mousemove&&i.mousemove(...e),S(...e)},s.mouseInteractionCb=(...e)=>{i.mouseInteraction&&i.mouseInteraction(...e),w(...e)},s.scrollCb=(...e)=>{i.scroll&&i.scroll(...e),C(...e)},s.viewportResizeCb=(...e)=>{i.viewportResize&&i.viewportResize(...e),k(...e)},s.inputCb=(...e)=>{i.input&&i.input(...e),I(...e)},s.mediaInteractionCb=(...e)=>{i.mediaInteaction&&i.mediaInteaction(...e),E(...e)},s.styleSheetRuleCb=(...e)=>{i.styleSheetRule&&i.styleSheetRule(...e),O(...e)},s.styleDeclarationCb=(...e)=>{i.styleDeclaration&&i.styleDeclaration(...e),x(...e)},s.canvasMutationCb=(...e)=>{i.canvasMutation&&i.canvasMutation(...e),M(...e)},s.fontCb=(...e)=>{i.font&&i.font(...e),R(...e)},s.selectionCb=(...e)=>{i.selection&&i.selection(...e),A(...e)},s.customElementCb=(...e)=>{i.customElement&&i.customElement(...e),T(...e)}}let o;e.recordDOM&&(o=Qi(e,e.doc));const a=function({mousemoveCb:r,sampling:e,doc:t,mirror:n}){if(!1===e.mousemove)return()=>{};var s="number"==typeof e.mousemove?e.mousemove:50,e="number"==typeof e.mousemoveCallback?e.mousemoveCallback:500;let i=[],o;const a=ki(te(e=>{const t=Date.now()-o;r(i.map(e=>(e.timeOffset-=t,e)),e),i=[],o=null}),e),l=[X("mousemove",e=te(ki(te(e=>{var t=Xi(e),{clientX:r,clientY:s}=Di(e)?e.changedTouches[0]:e;o=o||Oi(),i.push({x:r,y:s,id:n.getId(t),timeOffset:Oi()-o}),a("undefined"!=typeof DragEvent&&e instanceof DragEvent?ee.Drag:e instanceof MouseEvent?ee.MouseMove:ee.TouchMove)}),s,{trailing:!1})),t),X("touchmove",e,t),X("drag",e,t)];return te(()=>{l.forEach(e=>e())})}(e),l=eo(e),u=to(e),c=function({viewportResizeCb:r},{win:e}){let s=-1,n=-1;return X("resize",te(ki(te(()=>{var e=Mi(),t=Ri();s===e&&n===t||(r({width:Number(t),height:Number(e)}),s=e,n=t)}),200)),e)}(e,{win:r}),h=function({inputCb:s,doc:o,mirror:n,blockClass:e,blockSelector:r,ignoreClass:a,ignoreSelector:l,maskInputOptions:u,maskInputFn:c,sampling:t,userTriggeredOnInput:h}){function i(t){let s=Xi(t);var t=t.isTrusted,n=s&&s.tagName;if((s=s&&"OPTION"===n?$.parentElement(s):s)&&n&&!(ro.indexOf(n)<0)&&!P(s,e,r,!0)&&!(s.classList.contains(a)||l&&s.matches(l))){let e=s.value,r=!1;var i=le(s)||"",n=("radio"===i||"checkbox"===i?r=s.checked:(u[n.toLowerCase()]||u[i])&&(e=ie({element:s,maskInputOptions:u,tagName:n,type:i,value:e,maskInputFn:c})),d(s,h?{text:e,isChecked:r,userTriggered:t}:{text:e,isChecked:r}),s.name);"radio"===i&&n&&r&&o.querySelectorAll(`input[type="radio"][name="${n}"]`).forEach(e=>{var t;e!==s&&(t=e.value,d(e,h?{text:t,isChecked:!r,userTriggered:!1}:{text:t,isChecked:!r}))})}}function d(e,t){var r=so.get(e);r&&r.text===t.text&&r.isChecked===t.isChecked||(so.set(e,t),r=n.getId(e),te(s)({...t,id:r}))}var p;const g=("last"===t.input?["change"]:["input","change"]).map(e=>X(e,te(i),o)),f=o.defaultView;return f?(t=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),p=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]],t&&t.set&&g.push(...p.map(e=>Ii(e[0],e[1],{set(){te(i)({target:this,isTrusted:!1})}},!1,f))),te(()=>{g.forEach(e=>e())})):()=>{g.forEach(e=>e())}}(e),d=function({mediaInteractionCb:a,blockClass:l,blockSelector:u,mirror:c,sampling:e,doc:t}){var r=te(o=>ki(te(e=>{var t,r,s,n,i,e=Xi(e);e&&!P(e,l,u,!0)&&({currentTime:t,volume:r,muted:s,playbackRate:n,loop:i}=e,a({type:o,id:c.getId(e),currentTime:t,volume:r,muted:s,playbackRate:n,loop:i}))}),e.media||500));const s=[X("play",r(Wi.Play),t),X("pause",r(Wi.Pause),t),X("seeked",r(Wi.Seeked),t),X("volumechange",r(Wi.VolumeChange),t),X("ratechange",r(Wi.RateChange),t)];return te(()=>{s.forEach(e=>e())})}(e);let p=()=>{},g=()=>{},f=()=>{},m=()=>{};e.recordDOM&&(p=function({styleSheetRuleCb:a,mirror:l,stylesheetManager:u},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const e=s.CSSStyleSheet.prototype.insertRule,t=(s.CSSStyleSheet.prototype.insertRule=new Proxy(e,{apply:te((e,t,r)=>{var[s,n]=r,{id:i,styleId:o}=io(t,l,u.styleMirror);return(i&&-1!==i||o&&-1!==o)&&a({id:i,styleId:o,adds:[{rule:s,index:n}]}),e.apply(t,r)})}),s.CSSStyleSheet.prototype.addRule=function(e,t,r=this.cssRules.length){return s.CSSStyleSheet.prototype.insertRule.apply(this,[e+` { ${t} }`,r])},s.CSSStyleSheet.prototype.deleteRule);s.CSSStyleSheet.prototype.deleteRule=new Proxy(t,{apply:te((e,t,r)=>{var[s]=r,{id:n,styleId:i}=io(t,l,u.styleMirror);return(n&&-1!==n||i&&-1!==i)&&a({id:n,styleId:i,removes:[{index:s}]}),e.apply(t,r)})}),s.CSSStyleSheet.prototype.removeRule=function(e){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[e])};let r;s.CSSStyleSheet.prototype.replace&&(r=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(r,{apply:te((e,t,r)=>{var[s]=r,{id:n,styleId:i}=io(t,l,u.styleMirror);return(n&&-1!==n||i&&-1!==i)&&a({id:n,styleId:i,replace:s}),e.apply(t,r)})}));let n;s.CSSStyleSheet.prototype.replaceSync&&(n=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(n,{apply:te((e,t,r)=>{var[s]=r,{id:n,styleId:i}=io(t,l,u.styleMirror);return(n&&-1!==n||i&&-1!==i)&&a({id:n,styleId:i,replaceSync:s}),e.apply(t,r)})}));const i={},o=(uo("CSSGroupingRule")?i.CSSGroupingRule=s.CSSGroupingRule:(uo("CSSMediaRule")&&(i.CSSMediaRule=s.CSSMediaRule),uo("CSSConditionRule")&&(i.CSSConditionRule=s.CSSConditionRule),uo("CSSSupportsRule")&&(i.CSSSupportsRule=s.CSSSupportsRule)),{});return Object.entries(i).forEach(([e,t])=>{o[e]={insertRule:t.prototype.insertRule,deleteRule:t.prototype.deleteRule},t.prototype.insertRule=new Proxy(o[e].insertRule,{apply:te((e,t,r)=>{var[s,n]=r,{id:i,styleId:o}=io(t.parentStyleSheet,l,u.styleMirror);return(i&&-1!==i||o&&-1!==o)&&a({id:i,styleId:o,adds:[{rule:s,index:[...no(t),n||0]}]}),e.apply(t,r)})}),t.prototype.deleteRule=new Proxy(o[e].deleteRule,{apply:te((e,t,r)=>{var[s]=r,{id:n,styleId:i}=io(t.parentStyleSheet,l,u.styleMirror);return(n&&-1!==n||i&&-1!==i)&&a({id:n,styleId:i,removes:[{index:[...no(t),s]}]}),e.apply(t,r)})})}),te(()=>{s.CSSStyleSheet.prototype.insertRule=e,s.CSSStyleSheet.prototype.deleteRule=t,r&&(s.CSSStyleSheet.prototype.replace=r),n&&(s.CSSStyleSheet.prototype.replaceSync=n),Object.entries(i).forEach(([e,t])=>{t.prototype.insertRule=o[e].insertRule,t.prototype.deleteRule=o[e].deleteRule})})}(e,{win:r}),g=oo(e,e.doc),f=function({styleDeclarationCb:l,mirror:u,ignoreCSSAttributes:c,stylesheetManager:h},{win:e}){const d=e.CSSStyleDeclaration.prototype.setProperty,o=(e.CSSStyleDeclaration.prototype.setProperty=new Proxy(d,{apply:te((e,t,r)=>{var s,n,[i,o,a]=r;return c.has(i)?d.apply(t,[i,o,a]):({id:s,styleId:n}=io(null==(s=t.parentRule)?void 0:s.parentStyleSheet,u,h.styleMirror),(s&&-1!==s||n&&-1!==n)&&l({id:s,styleId:n,set:{property:i,value:o,priority:a},index:no(t.parentRule)}),e.apply(t,r))})}),e.CSSStyleDeclaration.prototype.removeProperty);return e.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:te((e,t,r)=>{var s,n,[i]=r;return c.has(i)?o.apply(t,[i]):({id:s,styleId:n}=io(null==(s=t.parentRule)?void 0:s.parentStyleSheet,u,h.styleMirror),(s&&-1!==s||n&&-1!==n)&&l({id:s,styleId:n,remove:{property:i},index:no(t.parentRule)}),e.apply(t,r))})}),te(()=>{e.CSSStyleDeclaration.prototype.setProperty=d,e.CSSStyleDeclaration.prototype.removeProperty=o})}(e,{win:r}),e.collectFonts)&&(m=function({fontCb:r,doc:e}){const t=e.defaultView;if(!t)return()=>{};const s=[],n=new WeakMap,i=t.FontFace;return t.FontFace=function(e,t,r){var s=new i(e,t,r);return n.set(s,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),s},e=Ei(e.fonts,"add",function(e){return function(t){return setTimeout(te(()=>{var e=n.get(t);e&&(r(e),n.delete(t))}),0),e.apply(this,[t])}}),s.push(()=>{t.FontFace=i}),s.push(e),te(()=>{s.forEach(e=>e())})}(e));const v=function(e){const{doc:l,mirror:u,blockClass:c,blockSelector:h,selectionCb:d}=e;let p=!0;return(e=te(()=>{var t=l.getSelection();if(!(!t||p&&null!=t&&t.isCollapsed)){p=t.isCollapsed||!1;var r=[],s=t.rangeCount||0;for(let e=0;e<s;e++){var{startContainer:n,startOffset:i,endContainer:o,endOffset:a}=t.getRangeAt(e);P(n,c,h,!0)||P(o,c,h,!0)||r.push({start:u.getId(n),startOffset:i,end:u.getId(o),endOffset:a})}d({ranges:r})}}))(),X("selectionchange",e)}(e),y=({doc:t,customElementCb:n}=[e][0],(t=t.defaultView)&&t.customElements?Ei(t.customElements,"define",function(s){return function(t,e,r){try{n({define:{name:t}})}catch(e){console.warn("Custom element callback failed for "+t)}return s.apply(this,[t,e,r])}}):()=>{}),_=[];for(const D of e.plugins)_.push(D.observer(D.callback,r,D.options));return te(()=>{$i.forEach(e=>e.reset()),null!=o&&o.disconnect(),a(),l(),u(),c(),h(),d(),p(),g(),f(),m(),v(),y(),_.forEach(e=>e())})}function lo(e){return void 0!==window[e]}function uo(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class co{constructor(e){a(this,"iframeIdToRemoteIdMap",new WeakMap),a(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,s){r=r||this.getIdToRemoteIdMap(e),s=s||this.getRemoteIdToIdMap(e);let n=r.get(t);return n||(n=this.generateIdFn(),r.set(t,n),s.set(n,t)),n}getIds(t,e){const r=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return e.map(e=>this.getId(t,e,r,s))}getRemoteId(e,t,r){r=r||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:r.get(t)||-1}getRemoteIds(t,e){const r=this.getRemoteIdToIdMap(t);return e.map(e=>this.getRemoteId(t,e,r))}reset(e){e?(this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)):(this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class ho{constructor(e){a(this,"iframes",new WeakMap),a(this,"crossOriginIframeMap",new WeakMap),a(this,"crossOriginIframeMirror",new co(fe)),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=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new co(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&null!=(t=e.contentWindow)&&t.addEventListener("message",this.handleMessage.bind(this)),null!=(t=this.loadListener)&&t.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&0<e.contentDocument.adoptedStyleSheets.length&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){var t=e;"rrweb"===t.data.type&&t.origin===t.data.origin&&e.source&&(e=(e=this.crossOriginIframeMap.get(e.source))&&this.transformCrossOriginEvent(e,t.data.event))&&this.wrappedEmit(e,t.data.isCheckout)}transformCrossOriginEvent(r,e){var t;switch(e.type){case Q.FullSnapshot:this.crossOriginIframeMirror.reset(r),this.crossOriginIframeStyleMirror.reset(r),this.replaceIdOnNode(e.data.node,r);var s=e.data.node.id;return this.crossOriginIframeRootIdMap.set(r,s),this.patchRootIdOnNode(e.data.node,s),{timestamp:e.timestamp,type:Q.IncrementalSnapshot,data:{source:ee.Mutation,adds:[{parentId:this.mirror.getId(r),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Q.Meta:case Q.Load:case Q.DomContentLoaded:return!1;case Q.Plugin:return e;case Q.Custom:return this.replaceIds(e.data.payload,r,["id","parentId","previousId","nextId"]),e;case Q.IncrementalSnapshot:switch(e.data.source){case ee.Mutation:return e.data.adds.forEach(e=>{this.replaceIds(e,r,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,r);var t=this.crossOriginIframeRootIdMap.get(r);t&&this.patchRootIdOnNode(e.node,t)}),e.data.removes.forEach(e=>{this.replaceIds(e,r,["parentId","id"])}),e.data.attributes.forEach(e=>{this.replaceIds(e,r,["id"])}),e.data.texts.forEach(e=>{this.replaceIds(e,r,["id"])}),e;case ee.Drag:case ee.TouchMove:case ee.MouseMove:return e.data.positions.forEach(e=>{this.replaceIds(e,r,["id"])}),e;case ee.ViewportResize:return!1;case ee.MediaInteraction:case ee.MouseInteraction:case ee.Scroll:case ee.CanvasMutation:case ee.Input:return this.replaceIds(e.data,r,["id"]),e;case ee.StyleSheetRule:case ee.StyleDeclaration:return this.replaceIds(e.data,r,["id"]),this.replaceStyleIds(e.data,r,["styleId"]),e;case ee.Font:return e;case ee.Selection:return e.data.ranges.forEach(e=>{this.replaceIds(e,r,["start","end"])}),e;case ee.AdoptedStyleSheet:return this.replaceIds(e.data,r,["id"]),this.replaceStyleIds(e.data,r,["styleIds"]),null!=(t=e.data.styles)&&t.forEach(e=>{this.replaceStyleIds(e,r,["styleId"])}),e}}return!1}replace(e,t,r,s){for(const n of s)!Array.isArray(t[n])&&"number"!=typeof t[n]||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===q.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class po{constructor(e){a(this,"shadowDoms",new WeakSet),a(this,"mutationCb"),a(this,"scrollCb"),a(this,"bypassOptions"),a(this,"mirror"),a(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(G(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);const r=Qi({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(to({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&0<e.adoptedStyleSheets.length&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId($.host(e))),this.restoreHandlers.push(oo({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,s){const n=this;this.restoreHandlers.push(Ei(e.prototype,"attachShadow",function(r){return function(e){var e=r.call(this,e),t=$.shadowRoot(this);return t&&Bi(this)&&n.addShadowRoot(t,s),e}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var go="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fo="undefined"==typeof Uint8Array?[]:new Uint8Array(256),mo=0;mo<go.length;mo++)fo[go.charCodeAt(mo)]=mo;function vo(e){for(var t=new Uint8Array(e),r=t.length,s="",n=0;n<r;n+=3)s=(s=(s=(s+=go[t[n]>>2])+go[(3&t[n])<<4|t[n+1]>>4])+go[(15&t[n+1])<<2|t[n+2]>>6])+go[63&t[n+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s}const yo=new Map;const _o=(t,r,s)=>{if(t&&(So(t,r)||"object"==typeof t)){r=function(e,t){let r=yo.get(e);return r||(r=new Map,yo.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(s,t.constructor.name);let e=r.indexOf(t);return-1===e&&(e=r.length,r.push(t)),e}};const bo=(e,t,r)=>e.map(e=>function t(e,r,s){var n;return e instanceof Array?e.map(e=>t(e,r,s)):null===e?e:e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray?{rr_type:e.constructor.name,args:[Object.values(e)]}:e instanceof ArrayBuffer?{rr_type:e.constructor.name,base64:vo(e)}:e instanceof DataView?{rr_type:e.constructor.name,args:[t(e.buffer,r,s),e.byteOffset,e.byteLength]}:e instanceof HTMLImageElement?(n=e.src,{rr_type:e.constructor.name,src:n}):e instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:e.toDataURL()}:e instanceof ImageData?{rr_type:e.constructor.name,args:[t(e.data,r,s),e.width,e.height]}:So(e,r)||"object"==typeof e?{rr_type:e.constructor.name,index:_o(e,r,s)}:e}(e,t,r)),So=(t,r)=>{var e=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof r[e]);return Boolean(e.find(e=>t instanceof r[e]))};function wo(e,n,i,o){const t=[];try{var r=Ei(e.HTMLCanvasElement.prototype,"getContext",function(s){return function(e,...t){var r;return P(this,n,i,!0)||(r="experimental-webgl"===(r=e)?"webgl":r,"__context"in this||(this.__context=r),o&&["webgl","webgl2"].includes(r)&&(t[0]&&"object"==typeof t[0]?(r=t[0]).preserveDrawingBuffer||(r.preserveDrawingBuffer=!0):t.splice(0,1,{preserveDrawingBuffer:!0}))),s.apply(this,[e,...t])}});t.push(r)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{t.forEach(e=>e())}}function Co(e,s,n,i,o,a){var t,r=[];for(const u of Object.getOwnPropertyNames(e))if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))try{"function"==typeof e[u]&&(t=Ei(e,u,function(r){return function(...e){var t=r.apply(this,e);return _o(t,a,this),"tagName"in this.canvas&&!P(this.canvas,i,o,!0)&&(e=bo(e,a,this),e={type:s,property:u,args:e},n(this.canvas,e)),t}}),r.push(t))}catch{var l=Ii(e,u,{set(e){n(this.canvas,{type:s,property:u,args:[e],setter:!0})}});r.push(l)}return r}const ko="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=";var Io;const Eo="undefined"!=typeof window&&window.Blob&&new Blob([(i=ko,Uint8Array.from(atob(i),e=>e.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});function Oo(t){let e;try{var r;if(e=Eo&&(window.URL||window.webkitURL).createObjectURL(Eo))return(r=new Worker(e,{name:null==t?void 0:t.name})).addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),r;throw""}catch(e){return new Worker("data:text/javascript;base64,"+ko,{name:null==t?void 0:t.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class xo{constructor(e){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",(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)});var{sampling:t="all",win:r,blockClass:s,blockSelector:n,recordCanvas:i,dataURLOptions:o}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(r,s,n),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,s,n,{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(e,r,s,n,i){const t=wo(r,s,n,!0),o=new Map,a=new Oo,l=(a.onmessage=e=>{var t,r,s,n=e.data["id"];o.set(n,!1),"base64"in e.data&&({base64:e,type:t,width:r,height:s}=e.data,this.mutationCb({id:n,type:Vi["2D"],commands:[{property:"clearRect",args:[0,0,r,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:e}],type:t}]},0,0]}]}))},1e3/e);let u=0,c;const h=()=>{const t=[];return r.document.querySelectorAll("canvas").forEach(e=>{P(e,s,n,!0)||t.push(e)}),t},d=e=>{c=(u&&e-u<l||(u=e,h().forEach(async e=>{var t,r,s=this.mirror.getId(e);o.get(s)||0!==e.width&&0!==e.height&&(o.set(s,!0),["webgl","webgl2"].includes(e.__context)&&!1===(null==(r=null==(t=e.getContext(e.__context))?void 0:t.getContextAttributes())?void 0:r.preserveDrawingBuffer)&&t.clear(t.COLOR_BUFFER_BIT),r=await createImageBitmap(e),a.postMessage({id:s,bitmap:r,width:e.width,height:e.height,dataURLOptions:i.dataURLOptions},[r]))})),requestAnimationFrame(d))};c=requestAnimationFrame(d),this.resetObservers=()=>{t(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=wo(e,t,r,!1),n=function(r,s,n,i){const e=[];var t;for(const a of Object.getOwnPropertyNames(s.CanvasRenderingContext2D.prototype))try{"function"==typeof s.CanvasRenderingContext2D.prototype[a]&&(t=Ei(s.CanvasRenderingContext2D.prototype,a,function(e){return function(...t){return P(this.canvas,n,i,!0)||setTimeout(()=>{var e=bo(t,s,this);r(this.canvas,{type:Vi["2D"],property:a,args:e})},0),e.apply(this,t)}}),e.push(t))}catch{var o=Ii(s.CanvasRenderingContext2D.prototype,a,{set(e){r(this.canvas,{type:Vi["2D"],property:a,args:[e],setter:!0})}});e.push(o)}return()=>{e.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r),i=function(e,t,r,s){const n=[];return n.push(...Co(t.WebGLRenderingContext.prototype,Vi.WebGL,e,r,s,t)),void 0!==t.WebGL2RenderingContext&&n.push(...Co(t.WebGL2RenderingContext.prototype,Vi.WebGL2,e,r,s,t)),()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{s(),n(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=e=>{this.rafStamps.latestId=e,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{var r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){var r,s;this.frozen||this.locked||(s=this.pendingCanvasMutations.get(e))&&-1!==t&&(r=s.map(e=>{const{type:t,...r}=e;return r}),s=s[0]["type"],this.mutationCb({id:t,type:s,commands:r}),this.pendingCanvasMutations.delete(e))}}class Mo{constructor(e){a(this,"trackedLinkElements",new WeakSet),a(this,"mutationCb"),a(this,"adoptedStyleSheetCb"),a(this,"styleMirror",new Fi),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0!==e.length){var r={id:t,styleIds:[]},s=[];for(const n of e){let e;this.styleMirror.has(n)?e=this.styleMirror.getId(n):(e=this.styleMirror.add(n),s.push({styleId:e,rules:Array.from(n.rules||CSSRule,(e,t)=>({rule:K(e,n.href),index:t}))})),r.styleIds.push(e)}0<s.length&&(r.styles=s),this.adoptedStyleSheetCb(r)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Ro{constructor(){a(this,"nodeMap",new WeakMap),a(this,"active",!1)}inOtherBuffer(e,t){e=this.nodeMap.get(e);return e&&Array.from(e).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let re,Ao,To,Do=!1;try{2!==Array.from([1],e=>2*e)[0]&&(Io=document.createElement("iframe"),document.body.appendChild(Io),Array.from=(null==(x=Io.contentWindow)?void 0:x.Array.from)||Array.from,document.body.removeChild(Io))}catch(e){console.debug("Unable to override Array.from",e)}const Lo=new ne;function Po(e={}){const{emit:s,checkoutEveryNms:n,checkoutEveryNth:i,blockClass:r="rr-block",blockSelector:o=null,ignoreClass:N="rr-ignore",ignoreSelector:F=null,maskTextClass:a="rr-mask",maskTextSelector:l=null,inlineStylesheet:u=!0,maskAllInputs:j,maskInputOptions:t,slimDOMOptions:c,maskInputFn:h,maskTextFn:d,hooks:U,packFn:p,sampling:g={},dataURLOptions:f={},mousemoveWait:m,recordDOM:v=!0,recordCanvas:y=!1,recordCrossOriginIframes:B=!1,recordAfter:z="DOMContentLoaded"===e.recordAfter?e.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:W=!1,inlineImages:_=!1,plugins:b,keepIframeSrcFn:S=()=>!1,ignoreCSSAttributes:G=new Set([]),errorHandler:K}=e;e=K,Zi=e;const w=!B||window.parent===window;let C=!1;if(!w)try{window.parent.document&&(C=!1)}catch(e){C=!0}if(w&&!s)throw new Error("emit function is required");if(!w&&!C)return()=>{};void 0!==m&&void 0===g.mousemove&&(g.mousemove=m),Lo.reset();const k=!0===j?{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!==t?t:{password:!0},I=!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||{};"NodeList"in(e=window)&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach);let Y,E=0;const J=e=>{for(const t of b||[])t.eventProcessor&&(e=t.eventProcessor(e));return e=p&&!C?p(e):e},O=(re=(e,t)=>{var r;e.timestamp=Oi(),null==(r=$i[0])||!r.isFrozen()||e.type===Q.FullSnapshot||e.type===Q.IncrementalSnapshot&&e.data.source===ee.Mutation||$i.forEach(e=>e.unfreeze()),w?null!=s&&s(J(e),t):C&&(r={type:"rrweb",event:J(e),origin:window.location.origin,isCheckout:t},window.parent.postMessage(r,"*")),e.type===Q.FullSnapshot?(Y=e,E=0):e.type!==Q.IncrementalSnapshot||e.data.source===ee.Mutation&&e.data.isAttachIframe||(E++,t=i&&E>=i,r=n&&e.timestamp-Y.timestamp>n,(t||r)&&Ao(!0))},e=>{re({type:Q.IncrementalSnapshot,data:{source:ee.Mutation,...e}})}),H=e=>re({type:Q.IncrementalSnapshot,data:{source:ee.Scroll,...e}}),q=e=>re({type:Q.IncrementalSnapshot,data:{source:ee.CanvasMutation,...e}});const x=new Mo({mutationCb:O,adoptedStyleSheetCb:e=>re({type:Q.IncrementalSnapshot,data:{source:ee.AdoptedStyleSheet,...e}})}),M=new ho({mirror:Lo,mutationCb:O,stylesheetManager:x,recordCrossOriginIframes:B,wrappedEmit:re});for(const T of b||[])T.getMirror&&T.getMirror({nodeMirror:Lo,crossOriginIframeMirror:M.crossOriginIframeMirror,crossOriginIframeStyleMirror:M.crossOriginIframeStyleMirror});const R=new Ro,A=(To=new xo({recordCanvas:y,mutationCb:q,win:window,blockClass:r,blockSelector:o,mirror:Lo,sampling:g.canvas,dataURLOptions:f}),new po({mutationCb:O,scrollCb:H,bypassOptions:{blockClass:r,blockSelector:o,maskTextClass:a,maskTextSelector:l,inlineStylesheet:u,maskInputOptions:k,dataURLOptions:f,maskTextFn:d,maskInputFn:h,recordCanvas:y,inlineImages:_,sampling:g,slimDOMOptions:I,iframeManager:M,stylesheetManager:x,canvasManager:To,keepIframeSrcFn:S,processedNodeManager:R},mirror:Lo}));Ao=(e=!1)=>{if(v){re({type:Q.Meta,data:{href:window.location.href,width:Ri(),height:Mi()}},e),x.reset(),A.init(),$i.forEach(e=>e.lock());var t=function(e,t){var{mirror:t=new ne,blockClass:r="rr-block",blockSelector:s=null,maskTextClass:n="rr-mask",maskTextSelector:i=null,inlineStylesheet:o=!0,inlineImages:a=!1,recordCanvas:l=!1,maskAllInputs:u=!1,maskTextFn:c,maskInputFn:h,slimDOM:d=!1,dataURLOptions:p,preserveWhiteSpace:g,onSerialize:f,onIframeLoad:m,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:_,keepIframeSrcFn:b=()=>!1}=t||{};return Me(e,{doc:e,mirror:t,blockClass:r,blockSelector:s,maskTextClass:n,maskTextSelector:i,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:p,inlineImages:a,recordCanvas:l,preserveWhiteSpace:g,onSerialize:f,onIframeLoad:m,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:_,keepIframeSrcFn:b,newlyAddedElement:!1})}(document,{mirror:Lo,blockClass:r,blockSelector:o,maskTextClass:a,maskTextSelector:l,inlineStylesheet:u,maskAllInputs:k,maskTextFn:d,maskInputFn:h,slimDOM:I,dataURLOptions:f,recordCanvas:y,inlineImages:_,onSerialize:e=>{Li(e,Lo)&&M.addIframe(e),Pi(e,Lo)&&x.trackLinkElement(e),Ni(e)&&A.addShadowRoot($.shadowRoot(e),document)},onIframeLoad:(e,t)=>{M.attachIframe(e,t),A.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{x.attachLinkElement(e,t)},keepIframeSrcFn:S});if(!t)return console.warn("Failed to snapshot the document");re({type:Q.FullSnapshot,data:{node:t,initialOffset:xi(window)}},e),$i.forEach(e=>e.unlock()),document.adoptedStyleSheets&&0<document.adoptedStyleSheets.length&&x.adoptStyleSheets(document.adoptedStyleSheets,Lo.getId(document))}};try{const D=[],L=e=>{return te(ao)({mutationCb:O,mousemoveCb:(e,t)=>re({type:Q.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>re({type:Q.IncrementalSnapshot,data:{source:ee.MouseInteraction,...e}}),scrollCb:H,viewportResizeCb:e=>re({type:Q.IncrementalSnapshot,data:{source:ee.ViewportResize,...e}}),inputCb:e=>re({type:Q.IncrementalSnapshot,data:{source:ee.Input,...e}}),mediaInteractionCb:e=>re({type:Q.IncrementalSnapshot,data:{source:ee.MediaInteraction,...e}}),styleSheetRuleCb:e=>re({type:Q.IncrementalSnapshot,data:{source:ee.StyleSheetRule,...e}}),styleDeclarationCb:e=>re({type:Q.IncrementalSnapshot,data:{source:ee.StyleDeclaration,...e}}),canvasMutationCb:q,fontCb:e=>re({type:Q.IncrementalSnapshot,data:{source:ee.Font,...e}}),selectionCb:e=>{re({type:Q.IncrementalSnapshot,data:{source:ee.Selection,...e}})},customElementCb:e=>{re({type:Q.IncrementalSnapshot,data:{source:ee.CustomElement,...e}})},blockClass:r,ignoreClass:N,ignoreSelector:F,maskTextClass:a,maskTextSelector:l,maskInputOptions:k,inlineStylesheet:u,sampling:g,recordDOM:v,recordCanvas:y,inlineImages:_,userTriggeredOnInput:V,collectFonts:W,doc:e,maskInputFn:h,maskTextFn:d,keepIframeSrcFn:S,blockSelector:o,slimDOMOptions:I,dataURLOptions:f,mirror:Lo,iframeManager:M,stylesheetManager:x,shadowDomManager:A,processedNodeManager:R,canvasManager:To,ignoreCSSAttributes:G,plugins:(null==(e=null==b?void 0:b.filter(e=>e.observer))?void 0:e.map(t=>({observer:t.observer,options:t.options,callback:e=>re({type:Q.Plugin,data:{plugin:t.name,payload:e}})})))||[]},U)},P=(M.addLoadListener(e=>{try{D.push(L(e.contentDocument))}catch(e){console.warn(e)}}),()=>{Ao(),D.push(L(document)),Do=!0});return"interactive"===document.readyState||"complete"===document.readyState?P():(D.push(X("DOMContentLoaded",()=>{re({type:Q.DomContentLoaded,data:{}}),"DOMContentLoaded"===z&&P()})),D.push(X("load",()=>{re({type:Q.Load,data:{}}),"load"===z&&P()},window))),()=>{D.forEach(e=>e()),R.destroy(),Do=!1,Zi=void 0}}catch(e){console.warn(e)}}Po.addCustomEvent=(e,t)=>{if(!Do)throw new Error("please add custom event after start recording");re({type:Q.Custom,data:{tag:e,payload:t}})},Po.freezePage=()=>{$i.forEach(e=>e.freeze())},Po.takeFullSnapshot=e=>{if(!Do)throw new Error("please take full snapshot after start recording");Ao(e)},Po.mirror=Lo,O.record=Po},8572:function(e,t){!function(e){"use strict";let n=-1;const l=t=>{addEventListener("pageshow",e=>{e.persisted&&(n=e.timeStamp,t(e))},!0)},u=(t,r,s,n)=>{let i,o;return e=>{r.value>=0&&(e||n)&&(o=r.value-(i??0),(o||void 0===i)&&(i=r.value,r.delta=o,r.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(r.value,s),t(r)))}},c=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},i=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},h=()=>{const e=i();return e?.activationStart??0},d=(e,t=-1)=>{const r=i();let s="navigate";n>=0?s="back-forward-cache":r&&(document.prerendering||h()>0?s="prerender":document.wasDiscarded?s="restore":r.type&&(s=r.type.replace(/_/g,"-")));return{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:s}},r=new WeakMap;function p(e,t){return r.get(e)||r.set(e,new t),r.get(e)}class a{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],r=this.o.at(-1);this.i&&t&&r&&e.startTime-r.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 g=(e,t,r={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const s=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return s.observe({type:e,buffered:!0,...r}),s}}catch{}},f=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let s=-1;const o=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,t=e=>{"hidden"===document.visibilityState&&s>-1&&(s="visibilitychange"===e.type?e.timeStamp:0,v())},m=()=>{addEventListener("visibilitychange",t,!0),addEventListener("prerenderingchange",t,!0)},v=()=>{removeEventListener("visibilitychange",t,!0),removeEventListener("prerenderingchange",t,!0)},y=()=>{if(s<0){const t=h(),e=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(e=>"hidden"===e.name&&e.startTime>t)[0]?.startTime;s=e??o(),m(),l(()=>{setTimeout(()=>{s=o(),m()})})}return{get firstHiddenTime(){return s}}},_=e=>{document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},b=[1800,3e3],S=(t,o={})=>{_(()=>{const r=y();let s,n=d("FCP");const i=g("paint",e=>{for(const t of e)"first-contentful-paint"===t.name&&(i.disconnect(),t.startTime<r.firstHiddenTime&&(n.value=Math.max(t.startTime-h(),0),n.entries.push(t),s(!0)))});i&&(s=u(t,n,b,o.reportAllChanges),l(e=>{n=d("FCP"),s=u(t,n,b,o.reportAllChanges),c(()=>{n.value=performance.now()-e.timeStamp,s(!0)})}))})},w=[.1,.25];let C=0,k=1/0,I=0;const E=e=>{for(const t of e)t.interactionId&&(k=Math.min(k,t.interactionId),I=Math.max(I,t.interactionId),C=I?(I-k)/7+1:0)};let O;const x=()=>O?C:performance.interactionCount??0,M=()=>{"interactionCount"in performance||O||(O=g("event",E,{type:"event",buffered:!0,durationThreshold:0}))};let R=0;class N{u=[];l=new Map;m;p;v(){R=x(),this.u.length=0,this.l.clear()}T(){const e=Math.min(this.u.length-1,Math.floor((x()-R)/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 r=this.l.get(e.interactionId);if(r||this.u.length<10||e.duration>t.P){if(r?e.duration>r.P?(r.entries=[e],r.P=e.duration):e.duration===r.P&&e.startTime===r.entries[0].startTime&&r.entries.push(e):(r={id:e.interactionId,entries:[e],P:e.duration},this.l.set(r.id,r),this.u.push(r)),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?.(r)}}}const A=e=>{const t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(e=f(e),document.addEventListener("visibilitychange",e,{once:!0}),t(()=>{e(),document.removeEventListener("visibilitychange",e)}))},T=[200,500];class F{m;h(e){this.m?.(e)}}const D=[2500,4e3],L=[800,1800],P=e=>{document.prerendering?_(()=>P(e)):"complete"!==document.readyState?addEventListener("load",()=>P(e),!0):setTimeout(e)};e.CLSThresholds=w,e.FCPThresholds=b,e.INPThresholds=T,e.LCPThresholds=D,e.TTFBThresholds=L,e.onCLS=(i,o={})=>{S(f(()=>{let r,s=d("CLS",0);const n=p(o,a),e=e=>{for(const t of e)n.h(t);n.i>s.value&&(s.value=n.i,s.entries=n.o,r())},t=g("layout-shift",e);t&&(r=u(i,s,w,o.reportAllChanges),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&(e(t.takeRecords()),r(!0))}),l(()=>{n.i=0,s=d("CLS",0),r=u(i,s,w,o.reportAllChanges),c(()=>r())}),setTimeout(r))}))},e.onFCP=S,e.onINP=(i,o={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&_(()=>{M();let r,s=d("INP");const n=p(o,N),e=t=>{A(()=>{for(const e of t)n.h(e);const e=n.T();e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,r())})},t=g("event",e,{durationThreshold:o.durationThreshold??40});r=u(i,s,T,o.reportAllChanges),t&&(t.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&(e(t.takeRecords()),r(!0))}),l(()=>{n.v(),s=d("INP"),r=u(i,s,T,o.reportAllChanges)}))})},e.onLCP=(o,a={})=>{_(()=>{const t=y();let r,s=d("LCP");const n=p(a,F),e=e=>{a.reportAllChanges||(e=e.slice(-1));for(const a of e)n.h(a),a.startTime<t.firstHiddenTime&&(s.value=Math.max(a.startTime-h(),0),s.entries=[a],r())},i=g("largest-contentful-paint",e);if(i){r=u(o,s,D,a.reportAllChanges);const t=f(()=>{e(i.takeRecords()),i.disconnect(),r(!0)});for(const o of["keydown","click","visibilitychange"])addEventListener(o,()=>A(t),{capture:!0,once:!0});l(e=>{s=d("LCP"),r=u(o,s,D,a.reportAllChanges),c(()=>{s.value=performance.now()-e.timeStamp,r(!0)})})}})},e.onTTFB=(t,r={})=>{let s=d("TTFB"),n=u(t,s,L,r.reportAllChanges);P(()=>{const e=i();e&&(s.value=Math.max(e.responseStart-h(),0),s.entries=[e],n(!0),l(()=>{s=d("TTFB",0),n=u(t,s,L,r.reportAllChanges),n(!0)}))})}}(t)}},s={},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o={},(()=>{"use strict";var e=o,t=i(6914);const r=i(3447),s=i(1964);var n=i(2016),t=(0,t._getStatsigGlobal)();e.default=t,n.AutoInit.attempt(({client:e})=>{new r.SessionReplay(e),new s.AutoCapture(e)})})(),o.default;function i(e){var t=s[e];return void 0!==t||(t=s[e]={exports:{}},r[e].call(t.exports,t,t.exports,i)),t.exports}var r,s,o});
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Statsig=t():e.Statsig=t()}(this,()=>{return r={1845:(e,r,t)=>{"use strict";var s;Object.defineProperty(r,"__esModule",{value:!0}),r._getInstance=r._getStatsigGlobalFlag=r._getStatsigGlobal=void 0;const n=t(7512);r._getStatsigGlobal=()=>{try{return"undefined"!=typeof __STATSIG__?__STATSIG__:l}catch(e){return l}},r._getStatsigGlobalFlag=e=>(0,r._getStatsigGlobal)()[e];r._getInstance=e=>{var t=(0,r._getStatsigGlobal)();return e?t.instances&&t.instances[e]:(t.instances&&1<Object.keys(t.instances).length&&n.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."),t.firstInstance)};var i="__STATSIG__",o="undefined"!=typeof window?window:{},t=void 0!==t.g?t.g:{},a="undefined"!=typeof globalThis?globalThis:{};const l=null!=(s=null!=(s=null!=(s=o[i])?s:t[i])?s:a[i])?s:{instance:r._getInstance};o[i]=l,t[i]=l,a[i]=l},2137:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getStorageKey=t._getUserStorageKey=void 0;const n=r(1406);function s(e,t,r){if(r)return r(e,t);const s=t&&t.customIDs?t.customIDs:{};t=["uid:"+(null!=(r=null==t?void 0:t.userID)?r:""),"cids:"+Object.keys(s).sort((e,t)=>e.localeCompare(t)).map(e=>e+"-"+s[e]).join(","),"k:"+e];return(0,n._DJB2)(t.join("|"))}t._getUserStorageKey=s,t._getStorageKey=function(e,t,r){return t?s(e,t,r):(0,n._DJB2)("k:"+e)}},6427:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},694:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,o,a,l){return new(a=a||Promise)(function(r,t){function s(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(s,n)}i((l=l.apply(e,o||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._makeDataAdapterResult=t.DataAdapterCore=void 0;const l=r(7512),u=r(9122),i=r(8578),o=r(4534),c=r(3401);function h(e,t,r,s){return{source:e,data:t,receivedAt:Date.now(),stableID:r,fullUserHash:(0,i._getFullUserHash)(s)}}t.DataAdapterCore=class{constructor(e,t){this._adapterName=e,this._cacheSuffix=t,this._options=null,this._sdkKey=null,this._cacheLimit=10,this._lastModifiedStoreKey="statsig.last_modified_time."+t,this._inMemoryCache=new s}attach(e,t,r){this._sdkKey=e,this._options=t}getDataSync(e){var e=e&&(0,i._normalizeUser)(e,this._options),t=this._getCacheKey(e),r=this._inMemoryCache.get(t,e);return r&&this._getIsCacheValueValid(r)?r:(r=this._loadFromCache(t))&&this._getIsCacheValueValid(r)?(this._inMemoryCache.add(t,r,this._cacheLimit),this._inMemoryCache.get(t,e)):null}setData(e,t){var t=t&&(0,i._normalizeUser)(t,this._options),r=this._getCacheKey(t);this._inMemoryCache.add(r,h("Bootstrap",e,null,t),this._cacheLimit)}_getIsCacheValueValid(e){return null==e.stableID||e.stableID===u.StableID.get(this._getSdkKey())}_getDataAsyncImpl(t,r,s){return n(this,void 0,void 0,function*(){o.Storage.isReady()||(yield o.Storage.isReadyResolver());var e=null!=t?t:this.getDataSync(r),e=[this._fetchAndPrepFromNetwork(e,r,s)];return null!=s&&s.timeoutMs&&e.push(new Promise(e=>setTimeout(e,s.timeoutMs)).then(()=>(l.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(e)})}_prefetchDataImpl(r,s){return n(this,void 0,void 0,function*(){var e=r&&(0,i._normalizeUser)(r,this._options),t=this._getCacheKey(e),e=yield this._getDataAsyncImpl(null,e,s);e&&this._inMemoryCache.add(t,Object.assign(Object.assign({},e),{source:"Prefetch"}),this._cacheLimit)})}_fetchAndPrepFromNetwork(i,o,a){return n(this,void 0,void 0,function*(){var e=null!=(e=null==i?void 0:i.data)?e:null,t=null!=i&&this._isCachedResultValidFor204(i,o),t=yield this._fetchFromNetwork(e,o,a,t);if(!t)return l.Log.debug("No response returned for latest value"),null;var r=(0,c._typedJsonParse)(t,"has_updates","Response"),s=this._getSdkKey(),s=u.StableID.get(s);let n=null;if(!0===(null==r?void 0:r.has_updates))n=h("Network",t,s,o);else{if(!e||!1!==(null==r?void 0:r.has_updates))return null;n=h("NetworkNotModified",e,s,o)}t=this._getCacheKey(o);return this._inMemoryCache.add(t,n,this._cacheLimit),this._writeToCache(t,n),n})}_getSdkKey(){return null!=this._sdkKey?this._sdkKey:(l.Log.error(this._adapterName+" is not attached to a Client"),"")}_loadFromCache(e){var t=null==(t=o.Storage.getItem)?void 0:t.call(o.Storage,e);return null!=t&&(e=(0,c._typedJsonParse)(t,"source","Cached Result"))?Object.assign(Object.assign({},e),{source:"Cache"}):null}_writeToCache(t,e){var r=JSON.stringify(e);for(let e=0;e<8;e++)try{o.Storage.setItem(t,r);break}catch(e){if(!(e instanceof Error)||!e.toString().includes("QuotaExceededError")&&!e.toString().includes("QUOTA_EXCEEDED_ERR")||this._cacheLimit<=1)throw e;this._cacheLimit=Math.ceil(this._cacheLimit/2),this._runLocalStorageCacheEviction(t,this._cacheLimit-1)}this._runLocalStorageCacheEviction(t)}_runLocalStorageCacheEviction(e,t=this._cacheLimit){var r=null!=(s=(0,o._getObjectFromStorage)(this._lastModifiedStoreKey))?s:{},s=(r[e]=Date.now(),a(r,t));for(const n of s)delete r[n],o.Storage.removeItem(n);(0,o._setObjectInStorage)(this._lastModifiedStoreKey,r)}},t._makeDataAdapterResult=h;class s{constructor(){this._data={}}get(e,t){var e=this._data[e],r=null==e?void 0:e.stableID,t=null==(t=null==t?void 0:t.customIDs)?void 0:t.stableID;return t&&r&&t!==r?(l.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):e}add(e,t,r){for(const s of a(this._data,r-1))delete this._data[s];this._data[e]=t}merge(e){this._data=Object.assign(Object.assign({},this._data),e)}}function a(r,e){var t=Object.keys(r);return t.length<=e?[]:0===e?t:t.sort((e,t)=>{e=r[e],t=r[t];return"object"==typeof e&&"object"==typeof t?e.receivedAt-t.receivedAt:e-t}).slice(0,t.length-e)}},8962:(e,o)=>{"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.Diagnostics=void 0;const s=new Map,r="start";function n(e,t,r,s){return Object.assign({key:r,action:t,step:s,timestamp:Date.now()},e)}function i(e,t){var r=null!=(r=s.get(e))?r:[];r.push(t),s.set(e,r)}function t(e,t){if(t in e)return e[t]}o.Diagnostics={_getMarkers:e=>s.get(e),_markInitOverallStart:e=>{i(e,n({},r,"overall"))},_markInitOverallEnd:(e,t,r)=>{i(e,n({success:t,error:t?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:r},"end","overall"))},_markInitNetworkReqStart:(e,t)=>{i(e,n(t,r,"initialize","network_request"))},_markInitNetworkReqEnd:(e,t)=>{i(e,n(t,"end","initialize","network_request"))},_markInitProcessStart:e=>{i(e,n({},r,"initialize","process"))},_markInitProcessEnd:(e,t)=>{i(e,n(t,"end","initialize","process"))},_clearMarkers:e=>{s.delete(e)},_formatError(e){if(e&&"object"==typeof e)return{code:t(e,"code"),name:t(e,"name"),message:t(e,"message")}},_getDiagnosticsData(e,t,r,s){return{success:!0===(null==e?void 0:e.ok),statusCode:null==e?void 0:e.status,sdkRegion:null==(e=null==e?void 0:e.headers)?void 0:e.get("x-statsig-region"),isDelta:!0===r.includes('"is_delta":true')||void 0,attempt:t,error:o.Diagnostics._formatError(s)}},_enqueueDiagnosticsEvent(e,t,r,s){var n,i=o.Diagnostics._getMarkers(r);return null==i||i.length<=0?-1:(n=i[i.length-1].timestamp-i[0].timestamp,o.Diagnostics._clearMarkers(r),r=function(e,t){e={eventName:"statsig::diagnostics",user:e,value:null,metadata:t,time:Date.now()};return e}(e,{context:"initialize",markers:i.slice(),statsigOptions:s}),t.enqueue(r),n)}}},8809:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,o,a,l){return new(a=a||Promise)(function(r,t){function s(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(s,n)}i((l=l.apply(e,o||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._fetchTxtRecords=void 0;const n=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]),i="https://cloudflare-dns.com/dns-query",o=["i","e","d"],a=200;t._fetchTxtRecords=function(t){return r(this,void 0,void 0,function*(){var r=yield t(i,{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:n});if(r.ok){var e,r=yield r.arrayBuffer(),r=new Uint8Array(r);{var s=r,r=s.findIndex((e,t)=>t<a&&"="===String.fromCharCode(e)&&o.includes(String.fromCharCode(s[t-1])));if(-1===r)throw(e=new Error("Failed to parse TXT records from DNS")).name="DnsTxtParseError",e;let t="";for(let e=r-1;e<s.length;e++)t+=String.fromCharCode(s[e]);return t.split(",")}}throw(e=new Error("Failed to fetch TXT records from DNS")).name="DnsTxtFetchError",e})}},3539:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5542:function(e,a,t){"use strict";var r=this&&this.__awaiter||function(e,o,a,l){return new(a=a||Promise)(function(r,t){function s(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(s,n)}i((l=l.apply(e,o||[])).next())})};Object.defineProperty(a,"__esModule",{value:!0}),a.ErrorBoundary=a.EXCEPTION_ENDPOINT=void 0;const s=t(7512),l=t(5902),u=t(8e3),c=(a.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception","[Statsig] UnknownError");function h(e){return e instanceof Error?e:"string"==typeof e?new Error(e):new Error("An unknown error occurred.")}a.ErrorBoundary=class{constructor(e,t,r,s){this._sdkKey=e,this._options=t,this._emitter=r,this._lastSeenError=s,this._seen=new Set}wrap(s,n){try{const e=s;!function(e){const t=new Set;let r=Object.getPrototypeOf(e);for(;r&&r!==Object.prototype;)Object.getOwnPropertyNames(r).filter(e=>"function"==typeof(null===r||void 0===r?void 0:r[e])).forEach(e=>t.add(e)),r=Object.getPrototypeOf(r);return Array.from(t)}(e).forEach(t=>{const r=e[t];"$EB"in r||(e[t]=(...e)=>this._capture(n?n+":"+t:t,()=>r.apply(s,e)),e[t].$EB=!0)})}catch(e){this._onError("eb:wrap",e)}}logError(e,t){this._onError(e,t)}getLastSeenErrorAndReset(){var e=this._lastSeenError;return this._lastSeenError=void 0,null!=e?e:null}attachErrorIfNoneExists(e){this._lastSeenError||(this._lastSeenError=h(e))}_capture(t,e){try{var r=e();return r&&r instanceof Promise?r.catch(e=>this._onError(t,e)):r}catch(e){return this._onError(t,e),null}}_onError(i,o){try{s.Log.warn("Caught error in "+i,{error:o});r(this,void 0,void 0,function*(){var e,t=o||Error(c),r=t instanceof Error,s=r?t.name:"No Name",n=h(t);this._lastSeenError=n,this._seen.has(s)||(this._seen.add(s),null!=(n=null==(n=this._options)?void 0:n.networkConfig)&&n.preventAllNetworkTraffic?null!=(n=this._emitter)&&n.call(this,{name:"error",error:o,tag:i}):(n=l.SDKType._get(this._sdkKey),e=u.StatsigMetadataProvider.get(),r=r?t.stack:function(e){try{return JSON.stringify(e)}catch(e){return c}}(t),t=Object.assign({tag:i,exception:s,info:r,statsigOptions:function(s){if(!s)return{};const n={};return Object.keys(s).forEach(e=>{var t=e,r=s[t];switch(typeof r){case"number":case"bigint":case"boolean":n[String(t)]=r;break;case"string":r.length<50?n[String(t)]=r:n[String(t)]="set";break;case"object":"environment"===t?n.environment=r:"networkConfig"===t?n.networkConfig=r:n[String(t)]=null!=r?"set":"unset"}}),n}(this._options)},Object.assign(Object.assign({},e),{sdkType:n})),yield(null!=(s=null==(r=null==(s=this._options)?void 0:s.networkConfig)?void 0:r.networkOverrideFunc)?s:fetch)(a.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String(n),"STATSIG-SDK-VERSION":String(e.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(t)}),null!=(r=this._emitter)&&r.call(this,{name:"error",error:o,tag:i})))}).then(()=>{}).catch(()=>{})}catch(e){}}}},2922:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2417:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7770:function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,o,a,l){return new(a=a||Promise)(function(r,t){function s(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(s,n)}i((l=l.apply(e,o||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.EventLogger=void 0;const n=r(2137),i=r(1406),o=r(7512),a=r(7410),l=r(6830),u=r(1637),c=r(586),h=r(4534),d=r(1881),p=r(2397),g={},f={Startup:"startup",GainedFocus:"gained_focus"};class m{static _safeFlushAndForget(e){null!=(e=g[e])&&e.flush().catch(()=>{})}static _safeRetryFailedLogs(e){null!=(e=g[e])&&e._retryFailedLogs(f.GainedFocus)}constructor(e,t,r,s){this._sdkKey=e,this._emitter=t,this._network=r,this._options=s,this._queue=[],this._lastExposureTimeMap={},this._nonExposedChecks={},this._hasRunQuickFlush=!1,this._creationTime=Date.now(),this._loggingEnabled=null!=(e=null==s?void 0:s.loggingEnabled)?e:!0===(null==s?void 0:s.disableLogging)?c.LoggingEnabledOption.disabled:c.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._maxQueueSize=null!=(t=null==s?void 0:s.loggingBufferMaxSize)?t:100;r=null==s?void 0:s.networkConfig;this._logEventUrlConfig=new d.UrlConfiguration(a.Endpoint._rgstr,null==r?void 0:r.logEventUrl,null==r?void 0:r.api,null==r?void 0:r.logEventFallbackUrls)}setLogEventCompressionMode(e){this._network.setLogEventCompressionMode(e)}setLoggingEnabled(e){var t,r;"disabled"===this._loggingEnabled&&"disabled"!==e&&(t=this._getStorageKey(),(r=(0,h._getObjectFromStorage)(t))&&this._queue.push(...r),h.Storage.removeItem(t)),this._loggingEnabled=e}enqueue(e){this._shouldLogEvent(e)&&(this._normalizeAndAppendEvent(e),this._quickFlushIfNeeded(),this._queue.length>this._maxQueueSize)&&m._safeFlushAndForget(this._sdkKey)}incrementNonExposureCount(e){var t=null!=(t=this._nonExposedChecks[e])?t:0;this._nonExposedChecks[e]=t+1}reset(){this.flush().catch(()=>{}),this._lastExposureTimeMap={}}start(){var e,t=(0,l._isServerEnv)();t&&"always"!==(null==(e=this._options)?void 0:e.loggingEnabled)||(g[this._sdkKey]=this,t||(0,p._subscribeToVisiblityChanged)(e=>{"background"===e?m._safeFlushAndForget(this._sdkKey):"foreground"===e&&m._safeRetryFailedLogs(this._sdkKey)}),this._retryFailedLogs(f.Startup),this._startBackgroundFlushInterval())}stop(){return s(this,void 0,void 0,function*(){this._flushIntervalId&&(clearInterval(this._flushIntervalId),this._flushIntervalId=null),delete g[this._sdkKey],yield this.flush()})}flush(){return s(this,void 0,void 0,function*(){var e;this._appendAndResetNonExposedChecks(),0!==this._queue.length&&(e=this._queue,this._queue=[],yield this._sendEvents(e))})}_quickFlushIfNeeded(){this._hasRunQuickFlush||(this._hasRunQuickFlush=!0,200<Date.now()-this._creationTime)||setTimeout(()=>m._safeFlushAndForget(this._sdkKey),200)}_shouldLogEvent(e){if("always"!==(null==(t=this._options)?void 0:t.loggingEnabled)&&(0,l._isServerEnv)())return!1;if((0,u._isExposureEvent)(e)){var t=e.user||{statsigEnvironment:void 0},t=(0,n._getUserStorageKey)(this._sdkKey,t),r=e.metadata||{},e=[e.eventName,t,r.gate,r.config,r.ruleID,r.allocatedExperiment,r.parameterName,String(r.isExplicitParameter),r.reason].join("|"),t=this._lastExposureTimeMap[e],r=Date.now();if(t&&r-t<6e5)return!1;1e3<Object.keys(this._lastExposureTimeMap).length&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[e]=r}return!0}_sendEvents(n){return s(this,void 0,void 0,function*(){var e,t;if("disabled"===this._loggingEnabled)return this._saveFailedLogsToStorage(n),!1;try{var r=(0,p._isUnloading)()&&this._network.isBeaconSupported()&&null==(null==(t=null==(e=this._options)?void 0:e.networkConfig)?void 0:t.networkOverrideFunc),s=(this._emitter({name:"pre_logs_flushed",events:n}),r?this._sendEventsViaBeacon(n):yield this._sendEventsViaPost(n));return s.success?(this._emitter({name:"logs_flushed",events:n}),!0):(o.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(n),!1)}catch(e){return o.Log.warn("Failed to flush events."),!1}})}_sendEventsViaPost(t){return s(this,void 0,void 0,function*(){var e=yield this._network.post(this._getRequestData(t)),e=null!=(e=null==e?void 0:e.code)?e:-1;return{success:200<=e&&e<300}})}_sendEventsViaBeacon(e){return{success:this._network.beacon(this._getRequestData(e))}}_getRequestData(e){return{sdkKey:this._sdkKey,data:{events:e},urlConfig:this._logEventUrlConfig,retries:3,isCompressable:!0,params:{[a.NetworkParam.EventCount]:String(e.length)},credentials:"same-origin"}}_saveFailedLogsToStorage(e){for(;500<e.length;)e.shift();var t=this._getStorageKey();try{var r=this._getFailedLogsFromStorage(t);(0,h._setObjectInStorage)(t,[...r,...e])}catch(e){o.Log.warn("Unable to save failed logs to storage")}}_getFailedLogsFromStorage(e){let t=[];try{var r=(0,h._getObjectFromStorage)(e);return t=Array.isArray(r)?r:t}catch(e){return[]}}_retryFailedLogs(t){const r=this._getStorageKey();s(this,void 0,void 0,function*(){h.Storage.isReady()||(yield h.Storage.isReadyResolver());var e=(0,h._getObjectFromStorage)(r);e&&(t===f.Startup&&h.Storage.removeItem(r),yield this._sendEvents(e))&&t===f.GainedFocus&&h.Storage.removeItem(r)}).catch(()=>{o.Log.warn("Failed to flush stored logs")})}_getStorageKey(){return"statsig.failed_logs."+(0,i._DJB2)(this._sdkKey)}_normalizeAndAppendEvent(e){e.user&&(e.user=Object.assign({},e.user),delete e.user.privateAttributes);var t={},r=this._getCurrentPageUrl(),r=(r&&(t.statsigMetadata={currentPage:r}),Object.assign(Object.assign({},e),t));o.Log.debug("Enqueued Event:",r),this._queue.push(r)}_appendAndResetNonExposedChecks(){0!==Object.keys(this._nonExposedChecks).length&&(this._normalizeAndAppendEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this._nonExposedChecks)}}),this._nonExposedChecks={})}_getCurrentPageUrl(){var e;if(!1!==(null==(e=this._options)?void 0:e.includeCurrentPageUrlWithEvents))return(0,l._getCurrentPageUrlSafe)()}_startBackgroundFlushInterval(){var e=null!=(e=null==(e=this._options)?void 0:e.loggingIntervalMs)?e:1e4;const t=setInterval(()=>{var e=g[this._sdkKey];e&&e._flushIntervalId===t?m._safeFlushAndForget(this._sdkKey):clearInterval(t)},e);this._flushIntervalId=t}}t.EventLogger=m},1406:(e,i,t)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i._getSortedObject=i._DJB2Object=i._DJB2=void 0;const o=t(6634);i._DJB2=t=>{let r=0;for(let e=0;e<t.length;e++){var s=t.charCodeAt(e);r=(r<<5)-r+s,r&=r}return String(r>>>0)},i._DJB2Object=(e,t)=>(0,i._DJB2)(JSON.stringify((0,i._getSortedObject)(e,t)));i._getSortedObject=(r,s)=>{if(null==r)return null;var e=Object.keys(r).sort();const n={};return e.forEach(e=>{var t=r[e];0===s||"object"!==(0,o._typeOf)(t)?n[e]=t:n[e]=(0,i._getSortedObject)(t,null!=s?s-1:s)}),n}},1333:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7512:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Log=t.LogLevel=void 0;function r(e){return e.unshift("[Statsig]"),e}t.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class s{static info(...e){s.level>=t.LogLevel.Info&&console.info(" INFO ",...r(e))}static debug(...e){s.level>=t.LogLevel.Debug&&console.debug(" DEBUG ",...r(e))}static warn(...e){s.level>=t.LogLevel.Warn&&console.warn(" WARN ",...r(e))}static error(...e){s.level>=t.LogLevel.Error&&console.error(" ERROR ",...r(e))}}(t.Log=s).level=t.LogLevel.Warn},7787:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMemoKey=t.MemoPrefix=void 0,t.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};const i=new Set([]),o=new Set(["userPersistedValues"]);t.createMemoKey=function(e,t,r){let s=e+"|"+t;if(r)for(const n of Object.keys(r)){if(o.has(n))return;i.has(n)?s+=`|${n}=true`:s+=`|${n}=`+r[n]}return s}},7410:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkParam=t.NetworkDefault=t.Endpoint=void 0,t.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},t.NetworkDefault={[t.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[t.Endpoint._initialize]:"https://featureassets.org/v1",[t.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},t.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}},7023:function(e,t,r){"use strict";var _=this&&this.__awaiter||function(e,o,a,l){return new(a=a||Promise)(function(r,t){function s(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(s,n)}i((l=l.apply(e,o||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkCore=void 0,r(1845);const p=r(1845),b=r(8962),S=r(7512),w=r(7410),s=r(308),g=r(3091),o=r(5902),n=r(6830),a=r(4143),l=r(9122),C=r(2636),u=r(8e3),f=r(586),k=r(2397),I=500,E=3e4;const O=new Set([408,500,502,503,504,522,524,599]);t.NetworkCore=class{constructor(e,t){this._emitter=t,this._errorBoundary=null,this._timeout=1e4,this._netConfig={},this._options={},this._leakyBucket={},this._lastUsedInitUrl=null,e&&(this._options=e),this._options.networkConfig&&(this._netConfig=this._options.networkConfig),this._netConfig.networkTimeoutMs&&(this._timeout=this._netConfig.networkTimeoutMs),this._fallbackResolver=new s.NetworkFallbackResolver(this._options),this.setLogEventCompressionMode(this._getLogEventCompressionMode(e))}setLogEventCompressionMode(e){this._options.logEventCompressionMode=e}setErrorBoundary(e){this._errorBoundary=e,this._errorBoundary.wrap(this),this._errorBoundary.wrap(this._fallbackResolver),this._fallbackResolver.setErrorBoundary(e)}isBeaconSupported(){return"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon}getLastUsedInitUrlAndReset(){var e=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,e}beacon(e){var t,r;return!!x(e)&&(e=this._getInternalRequestArgs("POST",e),t=this._getPopulatedURL(e),(r=navigator).sendBeacon.bind(r)(t,e.body))}post(t){return _(this,void 0,void 0,function*(){var e=this._getInternalRequestArgs("POST",t);return this._tryEncodeBody(e),yield this._tryToCompressBody(e),this._sendRequest(e)})}get(e){e=this._getInternalRequestArgs("GET",e);return this._sendRequest(e)}_sendRequest(y){return _(this,void 0,void 0,function*(){var t;if(!x(y))return null;if(this._netConfig.preventAllNetworkTraffic)return null;var{method:s,body:n,retries:r,attempt:i}=y,o=y.urlConfig.endpoint;if(this._isRateLimited(o))return S.Log.warn(`Request to ${o} was blocked because you are making requests too frequently.`),null;i=null!=i?i:1;let a=!1;var l=this._getPopulatedURL(y);let u=null;var c,h=(0,k._isUnloading)();try{var e,d,p,g={method:s,body:n,headers:Object.assign({},y.headers),priority:y.priority,keepalive:h},f=(c=i,(v=y).urlConfig.endpoint===w.Endpoint._initialize&&b.Diagnostics._markInitNetworkReqStart(v.sdkKey,{attempt:c}),this._leakyBucket[o]),m=(f&&(f.lastRequestTime=Date.now(),this._leakyBucket[o]=f),null!=(t=this._netConfig.networkOverrideFunc)?t:fetch);let r;if((u=yield Promise.race([m(l,g).finally(()=>clearTimeout(r)),new Promise((e,t)=>{r=setTimeout(()=>{a=!0,t(new Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})])).ok)return p=yield u.text(),M(y,u,i,p),this._fallbackResolver.tryBumpExpiryTime(y.sdkKey,y.urlConfig),{body:p,code:u.status};throw e=yield u.text().catch(()=>"No Text"),(d=new Error(`NetworkError: ${l} `+e)).name="NetworkError",d}catch(e){var n=function(e){if("string"==typeof e)return e;if(e instanceof Error)return e.name+": "+e.message;return"Unknown Error"}(e),h=function(e,t){e=e.includes("Timeout");return e||t}(null!=n?n:"",a),v=(M(y,u,i,"",e),yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(y.sdkKey,y.urlConfig,n,h));return(v&&(y.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(y.sdkKey,y.urlConfig)),!r||r<i||!O.has(null!=(c=null===u||void 0===u?void 0:u.status)?c:500))?(null!=(o=this._emitter)&&o.call(this,{name:"error",error:e,tag:C.ErrorTag.NetworkError,requestArgs:y}),f=`A networking error occurred during ${s} request to ${l}.`,S.Log.error(f,n,e),null!=(t=this._errorBoundary)&&t.attachErrorIfNoneExists(f),null):(yield function(t){return _(this,void 0,void 0,function*(){yield new Promise(e=>setTimeout(e,Math.min(I*(t*t),E)))})}(i),this._sendRequest(Object.assign(Object.assign({},y),{retries:r,attempt:i+1})))}})}_getLogEventCompressionMode(e){let t=null==e?void 0:e.logEventCompressionMode;return t=(t=t||!0!==(null==e?void 0:e.disableCompression)?t:f.LogEventCompressionMode.Disabled)||f.LogEventCompressionMode.Enabled}_isRateLimited(e){var t=Date.now(),r=null!=(r=this._leakyBucket[e])?r:{count:0,lastRequestTime:t},s=t-r.lastRequestTime,s=Math.floor(.05*s);return r.count=Math.max(0,r.count-s),50<=r.count||(r.count+=1,r.lastRequestTime=t,this._leakyBucket[e]=r,!1)}_getPopulatedURL(e){var t=null!=(t=e.fallbackUrl)?t:e.urlConfig.getUrl();e.urlConfig.endpoint!==w.Endpoint._initialize&&e.urlConfig.endpoint!==w.Endpoint._download_config_specs||(this._lastUsedInitUrl=t);const r=Object.assign({[w.NetworkParam.SdkKey]:e.sdkKey,[w.NetworkParam.SdkType]:o.SDKType._get(e.sdkKey),[w.NetworkParam.SdkVersion]:u.SDK_VERSION,[w.NetworkParam.Time]:String(Date.now()),[w.NetworkParam.SessionID]:a.SessionID.get(e.sdkKey)},e.params);e=Object.keys(r).map(e=>encodeURIComponent(e)+"="+encodeURIComponent(r[e])).join("&");return t+(e?"?"+e:"")}_tryEncodeBody(t){var e,r=(0,n._getWindowSafe)(),s=t.body;if(t.isStatsigEncodable&&!this._options.disableStatsigEncoding&&"string"==typeof s&&null==(0,p._getStatsigGlobalFlag)("no-encode")&&null!=r&&r.btoa)try{t.body=r.btoa(s).split("").reverse().join(""),t.params=Object.assign(Object.assign({},null!=(e=t.params)?e:{}),{[w.NetworkParam.StatsigEncoded]:"1"})}catch(e){S.Log.warn("Request encoding failed for "+t.urlConfig.getUrl(),e)}}_tryToCompressBody(d){return _(this,void 0,void 0,function*(){var t,r=d.body;if("string"==typeof r&&function(e,t){if(!e.isCompressable)return;if(null!=(0,p._getStatsigGlobalFlag)("no-compress")||"undefined"==typeof CompressionStream||"undefined"==typeof TextEncoder)return;var r=null!=e.urlConfig.customUrl||null!=e.urlConfig.fallbackUrls,s=!0===g.SDKFlags.get(e.sdkKey,"enable_log_event_compression");switch(t.logEventCompressionMode){case f.LogEventCompressionMode.Disabled:return;case f.LogEventCompressionMode.Enabled:return r&&!s?void 0:1;case f.LogEventCompressionMode.Forced:return 1;default:return}}(d,this._options))try{for(var s,n=(new TextEncoder).encode(r),i=new CompressionStream("gzip"),o=i.writable.getWriter(),a=(o.write(n).catch(S.Log.error),o.close().catch(S.Log.error),i.readable.getReader()),l=[];!(s=yield a.read()).done;)l.push(s.value);var u=l.reduce((e,t)=>e+t.length,0),c=new Uint8Array(u);let e=0;for(const h of l)c.set(h,e),e+=h.length;d.body=c,d.params=Object.assign(Object.assign({},null!=(t=d.params)?t:{}),{[w.NetworkParam.IsGzipped]:"1"})}catch(e){S.Log.warn("Request compression failed for "+d.urlConfig.getUrl(),e)}})}_getInternalRequestArgs(e,t){var r=this._fallbackResolver.getActiveFallbackUrl(t.sdkKey,t.urlConfig),e=Object.assign(Object.assign({},t),{method:e,fallbackUrl:r});return"data"in t&&i(e,t.data),e}};const x=e=>!!e.sdkKey||(S.Log.warn("Unable to make request without an SDK key"),!1),i=(e,t)=>{var{sdkKey:r,fallbackUrl:s}=e,n=l.StableID.get(r),i=a.SessionID.get(r),r=o.SDKType._get(r);e.body=JSON.stringify(Object.assign(Object.assign({},t),{statsigMetadata:Object.assign(Object.assign({},u.StatsigMetadataProvider.get()),{stableID:n,sessionID:i,sdkType:r,fallbackUrl:s})}))};function M(e,t,r,s,n){e.urlConfig.endpoint===w.Endpoint._initialize&&b.Diagnostics._markInitNetworkReqEnd(e.sdkKey,b.Diagnostics._getDiagnosticsData(t,r,s,n))}},308:function(e,t,r){"use strict";var a=this&&this.__awaiter||function(e,o,a,l){return new(a=a||Promise)(function(r,t){function s(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(s,n)}i((l=l.apply(e,o||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._isDomainFailure=t.NetworkFallbackResolver=void 0;const o=r(8809),s=r(1406),i=r(7512),l=r(4534);function u(e,t){e=null!=(e=null==e?void 0:e.toLowerCase())?e:"";return t||e.includes("uncaught exception")||e.includes("failed to fetch")||e.includes("networkerror when attempting to fetch resource")}function c(e){return"statsig.network_fallback."+(0,s._DJB2)(e)}function h(e,t){e=c(e);t&&0!==Object.keys(t).length?l.Storage.setItem(e,JSON.stringify(t)):l.Storage.removeItem(e)}t.NetworkFallbackResolver=class{constructor(e){this._fallbackInfo=null,this._errorBoundary=null,this._dnsQueryCooldowns={},this._networkOverrideFunc=null==(e=e.networkConfig)?void 0:e.networkOverrideFunc}setErrorBoundary(e){this._errorBoundary=e}tryBumpExpiryTime(e,t){var r=null==(r=this._fallbackInfo)?void 0:r[t.endpoint];r&&(r.expiryTime=Date.now()+6048e5,h(e,Object.assign(Object.assign({},this._fallbackInfo),{[t.endpoint]:r})))}getActiveFallbackUrl(e,t){var r;if(null!=t.customUrl&&null!=t.fallbackUrls)return null;let s=this._fallbackInfo;null==s&&(s=null!=(n=function(e){e=c(e),e=l.Storage.getItem(e);if(!e)return null;try{return JSON.parse(e)}catch(e){return i.Log.error("Failed to parse FallbackInfo"),null}}(e))?n:{},this._fallbackInfo=s);var n=s[t.endpoint];return!n||Date.now()>(null!=(r=n.expiryTime)?r:0)||t.getChecksum()!==n.urlConfigChecksum?(delete s[t.endpoint],this._fallbackInfo=s,h(e,this._fallbackInfo),null):n.url||null}tryFetchUpdatedFallbackInfo(s,n,i,o){return a(this,void 0,void 0,function*(){var t,e,r;try{return u(i,o)?(e=null==n.customUrl&&null==n.fallbackUrls?yield this._tryFetchFallbackUrlsFromNetwork(n):n.fallbackUrls,!!(r=this._pickNewFallbackUrl(null==(t=this._fallbackInfo)?void 0:t[n.endpoint],e))&&(this._updateFallbackInfoWithNewUrl(s,n,r),!0)):!1}catch(e){return null!=(t=this._errorBoundary)&&t.logError("tryFetchUpdatedFallbackInfo",e),!1}})}_updateFallbackInfoWithNewUrl(e,t,r){var r={urlConfigChecksum:t.getChecksum(),url:r,expiryTime:Date.now()+6048e5,previous:[]},t=t.endpoint,s=null==(s=this._fallbackInfo)?void 0:s[t],s=(s&&r.previous.push(...s.previous),10<r.previous.length&&(r.previous=[]),null==(s=null==(s=this._fallbackInfo)?void 0:s[t])?void 0:s.url);null!=s&&r.previous.push(s),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[t]:r}),h(e,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(i){return a(this,void 0,void 0,function*(){var e=this._dnsQueryCooldowns[i.endpoint];if(e&&Date.now()<e)return null;this._dnsQueryCooldowns[i.endpoint]=Date.now()+144e5;var t=[],e=yield(0,o._fetchTxtRecords)(null!=(e=this._networkOverrideFunc)?e:fetch),r=function(e){try{return new URL(e).pathname}catch(e){return null}}(i.defaultUrl);for(const n of e)if(n.startsWith(i.endpointDnsKey+"=")){var s=n.split("=");if(1<s.length){let e=s[1];e.endsWith("/")&&(e=e.slice(0,-1)),t.push("https://"+e+r)}}return t})}_pickNewFallbackUrl(e,t){var r;if(null==t)return null;var s=new Set(null!=(r=null==e?void 0:e.previous)?r:[]),n=null==e?void 0:e.url;let i=null;for(const a of t){var o=a.endsWith("/")?a.slice(0,-1):a;if(!s.has(a)&&o!==n){i=o;break}}return i}},t._isDomainFailure=u},1405:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1361:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3091:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SDKFlags=void 0;const r={};t.SDKFlags={setFlags:(e,t)=>{r[e]=t},get:(e,t)=>{return null!=(e=null==(e=r[e])?void 0:e[t])&&e}}},5902:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SDKType=void 0;const r={};let s;t.SDKType={_get:e=>{return(null!=(e=r[e])?e:"js-mono")+(null!==s&&void 0!==s?s:"")},_setClientType(e,t){r[e]=t},_setBindingType(e){s&&"-react"!==s||(s="-"+e)}}},6830:(e,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s._getUnloadEvent=s._getCurrentPageUrlSafe=s._addDocumentEventListenerSafe=s._addWindowEventListenerSafe=s._isServerEnv=s._getDocumentSafe=s._getWindowSafe=void 0;s._getWindowSafe=()=>"undefined"!=typeof window?window:null,s._getDocumentSafe=()=>{var e=(0,s._getWindowSafe)();return null!=(e=null==e?void 0:e.document)?e:null},s._isServerEnv=()=>{var e;return null===(0,s._getDocumentSafe)()&&(e="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,"string"==typeof EdgeRuntime||e)},s._addWindowEventListenerSafe=(e,t)=>{var r=(0,s._getWindowSafe)();"function"==typeof(null==r?void 0:r.addEventListener)&&r.addEventListener(e,t)},s._addDocumentEventListenerSafe=(e,t)=>{var r=(0,s._getDocumentSafe)();"function"==typeof(null==r?void 0:r.addEventListener)&&r.addEventListener(e,t)},s._getCurrentPageUrlSafe=()=>{var e;try{return null==(e=(0,s._getWindowSafe)())?void 0:e.location.href.split(/[?#]/)[0]}catch(e){}};s._getUnloadEvent=()=>{var e=(0,s._getWindowSafe)();return e&&"onpagehide"in e?"pagehide":"beforeunload"}},4143:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigSession=t.SessionID=void 0;const s=r(1845),n=r(2137),a=r(7512),l=r(4534),u=r(8023),c=18e5,h=144e5,d={};function p(t,e){return setTimeout(()=>{var e=null==(e=(0,s._getStatsigGlobal)())?void 0:e.instance(t);e&&e.$emt({name:"session_expired"})},e)}function g(e){return"statsig.session_id."+(0,n._getStorageKey)(e)}t.SessionID={get:e=>t.StatsigSession.get(e).data.sessionID},t.StatsigSession={get:e=>{null==d[e]&&(d[e]=function(e){let t=function(e){e=g(e);return(0,l._getObjectFromStorage)(e)}(e);var r=Date.now();t=t||{sessionID:(0,u.getUUID)(),startTime:r,lastUpdate:r};return{data:t,sdkKey:e}}(e));var e=d[e],t=Date.now(),r=e.data,s=e.sdkKey,n=((function({lastUpdate:e}){return Date.now()-e>c}(r)||function({startTime:e}){return Date.now()-e>h}(r))&&(r.sessionID=(0,u.getUUID)(),r.startTime=t,o=null===__STATSIG__||void 0===__STATSIG__?void 0:__STATSIG__.instance(s))&&o.$emt({name:"session_expired"}),r.lastUpdate=t,r),i=e.sdkKey;i=g(i);try{(0,l._setObjectInStorage)(i,n)}catch(e){a.Log.warn("Failed to save SessionID")}clearTimeout(e.idleTimeoutID),clearTimeout(e.ageTimeoutID);var o=t-r.startTime;return e.idleTimeoutID=p(s,c),e.ageTimeoutID=p(s,h-o),e},overrideInitialSessionID:(e,t)=>{var r;d[t]=(e=e,t=t,r=Date.now(),{data:{sessionID:e,startTime:r,lastUpdate:r},sdkKey:t})}}},2176:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a._fastApproxSizeOf=void 0;a._fastApproxSizeOf=(t,r)=>{let s=0;var n=Object.keys(t);for(let e=0;e<n.length;e++){var i=n[e],o=t[i];if((s=(s+=i.length)+("object"==typeof o&&null!==o?(0,a._fastApproxSizeOf)(o,r)+2:String(o).length+1))>=r)return s}return s}},9122:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCookieName=t.StableID=void 0;const s=r(2137),n=r(7512),i=r(6830),o=r(4534),a=r(8023),l={},u={},c={};function h(e){return"statsig.stable_id."+(0,s._getStorageKey)(e)}function d(e,t){t=h(t);try{(0,o._setObjectInStorage)(t,e)}catch(e){n.Log.warn("Failed to save StableID to storage")}}function p(e,t){var r;u[t]&&null!=(0,i._getDocumentSafe)()&&((r=new Date).setFullYear(r.getFullYear()+1),document.cookie=`${g(t)}=${encodeURIComponent(e)}; expires=${r.toUTCString()}; path=/`)}function g(e){return"statsig.stable_id."+(0,s._getStorageKey)(e)}t.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:e=>{if(c[e])return null;if(null!=l[e])return l[e];let t=null;return null!=(t=function(e){if(u[e]&&null!=(0,i._getDocumentSafe)())for(const s of document.cookie.split(";")){var[t,r]=s.trim().split("=");if(t===g(e))return decodeURIComponent(r)}return null}(e))?d(l[e]=t,e):(d(t=null==(t=function(e){e=h(e);return(0,o._getObjectFromStorage)(e)}(e))?(0,a.getUUID)():t,e),p(t,e),l[e]=t),t},setOverride:(e,t)=>{d(l[t]=e,t),p(e,t)},_setCookiesEnabled:(e,t)=>{u[e]=t},_setDisabled:(e,t)=>{c[e]=t}},t.getCookieName=g},1375:function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,o,a,l){return new(a=a||Promise)(function(r,t){function s(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(s,n)}i((l=l.apply(e,o||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigClientBase=void 0,r(1845);const o=r(1845),a=r(5542),l=r(7770),u=r(7512),i=r(7787),c=r(6830),h=r(4143),d=r(9122),n=r(586),p=r(4534);t.StatsigClientBase=class{constructor(e,t,r,s){this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};var n,i=this.$emt.bind(this);null!=(null==s?void 0:s.logLevel)&&(u.Log.level=s.logLevel),null!=s&&s.disableStorage&&p.Storage._setDisabled(!0),null!=s&&s.initialSessionID&&h.StatsigSession.overrideInitialSessionID(s.initialSessionID,e),null!=s&&s.storageProvider&&p.Storage._setProvider(s.storageProvider),null!=s&&s.enableCookies&&d.StableID._setCookiesEnabled(e,s.enableCookies),null!=s&&s.disableStableID&&d.StableID._setDisabled(e,!0),this._sdkKey=e,this._options=null!=s?s:{},this._memoCache={},this.overrideAdapter=null!=(n=null==s?void 0:s.overrideAdapter)?n:null,this._logger=new l.EventLogger(e,i,r,s),this._errorBoundary=new a.ErrorBoundary(e,s,i),this._errorBoundary.wrap(this),this._errorBoundary.wrap(t),this._errorBoundary.wrap(this._logger),r.setErrorBoundary(this._errorBoundary),this.dataAdapter=t,this.dataAdapter.attach(e,s,r),this.storageProvider=p.Storage,null!=(t=null==(i=null==(n=this.overrideAdapter)?void 0:n.loadFromStorage)?void 0:i.call(n))&&t.catch(e=>this._errorBoundary.logError("OA::loadFromStorage",e)),this._primeReadyRipcord(),s=e,r=this,(0,c._isServerEnv)()||(i=(0,o._getStatsigGlobal)(),n=null!=(n=i.instances)?n:{},r=r,null!=n[s]&&u.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),n[s]=r,i.firstInstance||(i.firstInstance=r),i.instances=n,__STATSIG__=i)}updateRuntimeOptions(e){e.loggingEnabled?(this._options.loggingEnabled=e.loggingEnabled,this._logger.setLoggingEnabled(e.loggingEnabled)):null!=e.disableLogging&&(this._options.disableLogging=e.disableLogging,this._logger.setLoggingEnabled(e.disableLogging?"disabled":"browser-only")),null!=e.disableStorage&&(this._options.disableStorage=e.disableStorage,p.Storage._setDisabled(e.disableStorage)),null!=e.enableCookies&&(this._options.enableCookies=e.enableCookies,d.StableID._setCookiesEnabled(this._sdkKey,e.enableCookies)),e.logEventCompressionMode?this._logger.setLogEventCompressionMode(e.logEventCompressionMode):e.disableCompression&&this._logger.setLogEventCompressionMode(n.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return s(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this._setStatus("Uninitialized",null),this._initializePromise=null,yield this._logger.stop()})}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){this._listeners[e]&&-1!==(t=this._listeners[e].indexOf(t))&&this._listeners[e].splice(t,1)}$on(e,t){t.__isInternal=!0,this.on(e,t)}$emt(r){var e;const t=t=>{try{t(r)}catch(e){!0===t.__isInternal?this._errorBoundary.logError("__emit:"+r.name,e):u.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",r)}};this._listeners[r.name]&&this._listeners[r.name].forEach(e=>t(e)),null!=(e=this._listeners["*"])&&e.forEach(t)}_setStatus(e,t){this.loadingStatus=e,this._memoCache={},this.$emt({name:"values_updated",status:e,values:t})}_enqueueExposure(e,t,r){!0===(null==r?void 0:r.disableExposureLog)?this._logger.incrementNonExposureCount(e):this._logger.enqueue(t)}_memoize(s,n){return(e,t)=>{var r;return!this._options.disableEvaluationMemoization&&(r=(0,i.createMemoKey)(s,e,t))?(r in this._memoCache||(3e3<=Object.keys(this._memoCache).length&&(this._memoCache={}),this._memoCache[r]=n(e,t)),this._memoCache[r]):n(e,t)}}}},2636:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorTag=void 0,t.ErrorTag={NetworkError:"NetworkError"}},3206:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataAdapterCachePrefix=void 0,t.DataAdapterCachePrefix="statsig.cached"},1637:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._createLayerParameterExposure=t._createConfigExposure=t._mapExposures=t._createGateExposure=t._isExposureEvent=void 0;const i="statsig::config_exposure",o="statsig::gate_exposure",u="statsig::layer_exposure",c=(e,t,r,s,n)=>(r.bootstrapMetadata&&(s.bootstrapMetadata=r.bootstrapMetadata),{eventName:e,user:t,value:null,metadata:a(r,s),secondaryExposures:n,time:Date.now()});t._isExposureEvent=({eventName:e})=>e===o||e===i||e===u;function h(e,t){return e.map(e=>"string"==typeof e?(null!=t?t:{})[e]:e).filter(e=>null!=e)}t._createGateExposure=(e,t,r)=>{var s,n={gate:t.name,gateValue:String(t.value),ruleID:t.ruleID};return null!=(null==(s=t.__evaluation)?void 0:s.version)&&(n.configVersion=t.__evaluation.version),c(o,e,t.details,n,h(null!=(e=null==(s=t.__evaluation)?void 0:s.secondary_exposures)?e:[],r))},t._mapExposures=h;t._createConfigExposure=(e,t,r)=>{var s,n={config:t.name,ruleID:t.ruleID};return null!=(null==(s=t.__evaluation)?void 0:s.version)&&(n.configVersion=t.__evaluation.version),null!=(null==(s=t.__evaluation)?void 0:s.passed)&&(n.rulePassed=String(t.__evaluation.passed)),c(i,e,t.details,n,h(null!=(e=null==(s=t.__evaluation)?void 0:s.secondary_exposures)?e:[],r))};t._createLayerParameterExposure=(e,t,r,s)=>{var n=t.__evaluation,i=!0===(null==(i=null==n?void 0:n.explicit_parameters)?void 0:i.includes(r));let o="",a=null!=(l=null==n?void 0:n.undelegated_secondary_exposures)?l:[];i&&(o=null!=(l=n.allocated_experiment_name)?l:"",a=null!=(l=n.secondary_exposures)?l:[]);var l=null==(n=t.__evaluation)?void 0:n.parameter_rule_ids,l={config:t.name,parameterName:r,ruleID:null!=(n=null==l?void 0:l[r])?n:t.ruleID,allocatedExperiment:o,isExplicitParameter:String(i)};return null!=(null==(r=t.__evaluation)?void 0:r.version)&&(l.configVersion=t.__evaluation.version),c(u,e,t.details,l,h(a,s))};const a=(e,t)=>(t.reason=e.reason,e.lcut&&(t.lcut=String(e.lcut)),e.receivedAt&&(t.receivedAt=String(e.receivedAt)),t)},8e3:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigMetadataProvider=t.SDK_VERSION=void 0,t.SDK_VERSION="3.29.1";let r={sdkVersion:t.SDK_VERSION,sdkType:"js-mono"};t.StatsigMetadataProvider={get:()=>r,add:e=>{r=Object.assign(Object.assign({},r),e)}}},586:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoggingEnabledOption=t.LogEventCompressionMode=void 0,t.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},t.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}},1098:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2059:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._makeTypedGet=t._mergeOverride=t._makeLayer=t._makeExperiment=t._makeDynamicConfig=t._makeFeatureGate=void 0;const o=r(7512),a=r(6634);function n(e,t,r,s){return{name:e,details:t,ruleID:null!=(e=null==r?void 0:r.rule_id)?e:"",__evaluation:r,value:s}}function s(e,t,r){var s=null!=(s=null==r?void 0:r.value)?s:{};return Object.assign(Object.assign({},n(e,t,r,s)),{idType:null!=(t=null==r?void 0:r.id_type)?t:null,get:i(e,null==r?void 0:r.value)})}function i(s,n,i){return(e,t)=>{var r=null!=(r=null==n?void 0:n[e])?r:null;return null==r?null!=t?t:null:null==t||(0,a._isTypeMatch)(r,t)?(null!=i&&i(e),r):(o.Log.warn(`Parameter type mismatch. '${s}.${e}' was found to be type '${typeof r}' but fallback/return type is '${typeof t}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),null!=t?t:null)}}t._makeFeatureGate=function(e,t,r){return Object.assign(Object.assign({},n(e,t,r,!0===(null==r?void 0:r.value))),{idType:null!=(e=null==r?void 0:r.id_type)?e:null})},t._makeDynamicConfig=s,t._makeExperiment=function(e,t,r){return e=s(e,t,r),Object.assign(Object.assign({},e),{groupName:null!=(t=null==r?void 0:r.group_name)?t:null})},t._makeLayer=function(e,t,r,s){return Object.assign(Object.assign({},n(e,t,r,void 0)),{get:i(e,null==r?void 0:r.value,s),groupName:null!=(t=null==r?void 0:r.group_name)?t:null,__value:null!=(e=null==r?void 0:r.value)?e:{}})},t._mergeOverride=function(e,t,r,s){return Object.assign(Object.assign(Object.assign({},e),t),{get:i(e.name,r,s)})},t._makeTypedGet=i},1812:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3932:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_DETAIL_ERROR_MESSAGES=t.createUpdateDetails=void 0;t.createUpdateDetails=(e,t,r,s,n,i)=>({duration:r,source:t,success:e,error:s,sourceUrl:n,warnings:i}),t.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:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getFullUserHash=t._normalizeUser=void 0;const s=r(1406),n=r(7512);t._normalizeUser=function(e,t,r){try{var s=JSON.parse(JSON.stringify(e));return null!=t&&null!=t.environment?s.statsigEnvironment=t.environment:null!=r&&(s.statsigEnvironment={tier:r}),s}catch(e){return n.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}},t._getFullUserHash=function(e){return e?(0,s._DJB2Object)(e):null}},4534:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._setObjectInStorage=r._getObjectFromStorage=r.Storage=void 0;var s=t(7512),t=t(6830);const n={},i={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:e=>n[e]||null,setItem:(e,t)=>{n[e]=t},removeItem:e=>{delete n[e]},getAllKeys:()=>Object.keys(n)};let o=null;try{const c=(0,t._getWindowSafe)();c&&c.localStorage&&"function"==typeof c.localStorage.getItem&&(o={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:e=>c.localStorage.getItem(e),setItem:(e,t)=>c.localStorage.setItem(e,t),removeItem:e=>c.localStorage.removeItem(e),getAllKeys:()=>Object.keys(c.localStorage)})}catch(e){s.Log.warn("Failed to setup localStorageProvider.")}let a=null!==o&&void 0!==o?o:i,l=a;function u(e){try{return e()}catch(e){if(e instanceof Error&&"SecurityError"===e.name)return r.Storage._setProvider(i),null;throw e}}r.Storage={isReady:()=>l.isReady(),isReadyResolver:()=>l.isReadyResolver(),getProviderName:()=>l.getProviderName(),getItem:e=>u(()=>l.getItem(e)),setItem:(e,t)=>u(()=>l.setItem(e,t)),removeItem:e=>l.removeItem(e),getAllKeys:()=>l.getAllKeys(),_setProvider:e=>{a=e,l=e},_setDisabled:e=>{l=e?i:a}},r._getObjectFromStorage=function(e){return e=r.Storage.getItem(e),JSON.parse(null!=e?e:"null")},r._setObjectInStorage=function(e,t){r.Storage.setItem(e,JSON.stringify(t))}},3401:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._typedJsonParse=void 0;const n=r(7512);t._typedJsonParse=function(e,t,r){try{var s=JSON.parse(e);if(s&&"object"==typeof s&&t in s)return s}catch(e){}return n.Log.error("Failed to parse "+r),null}},6634:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._isTypeMatch=t._typeOf=void 0,t._typeOf=function(e){return Array.isArray(e)?"array":typeof e},t._isTypeMatch=function(e,t){var r=e=>Array.isArray(e)?"array":null===e?"null":typeof e;return r(e)===r(t)}},8023:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUUID=void 0,t.getUUID=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();let r=(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,e=>{let t=16*Math.random();return 0<r?(t=(r+t)%16|0,r=Math.floor(r/16)):(t=(s+t)%16|0,s=Math.floor(s/16)),("x"===e?t:7&t|8).toString(16)})}},1881:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UrlConfiguration=void 0;const s=r(1406),n=r(7410),i={[n.Endpoint._initialize]:"i",[n.Endpoint._rgstr]:"e",[n.Endpoint._download_config_specs]:"d"};t.UrlConfiguration=class{constructor(e,t,r,s){this.customUrl=null,this.fallbackUrls=null,this.endpoint=e,this.endpointDnsKey=i[e],t&&(this.customUrl=t),!t&&r&&(this.customUrl=r.endsWith("/")?""+r+e:r+"/"+e),s&&(this.fallbackUrls=s);t=n.NetworkDefault[e];this.defaultUrl=t+"/"+e}getUrl(){var e;return null!=(e=this.customUrl)?e:this.defaultUrl}getChecksum(){var e=(null!=(e=this.fallbackUrls)?e:[]).sort().join(",");return(0,s._DJB2)(this.customUrl+e)}}},2397:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._notifyVisibilityChanged=t._subscribeToVisiblityChanged=t._isUnloading=t._isCurrentlyVisible=void 0;r=r(6830);const s="foreground",n="background",i=[];let o=s,a=!1;t._isCurrentlyVisible=()=>o===s,t._isUnloading=()=>a,t._subscribeToVisiblityChanged=e=>{i.unshift(e)};t._notifyVisibilityChanged=t=>{t!==o&&(o=t,i.forEach(e=>e(t)))},(0,r._addWindowEventListenerSafe)("focus",()=>{(a=!1,t._notifyVisibilityChanged)(s)}),(0,r._addWindowEventListenerSafe)("blur",()=>(0,t._notifyVisibilityChanged)(n)),(0,r._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,t._notifyVisibilityChanged)("visible"===document.visibilityState?s:n)}),(0,r._addWindowEventListenerSafe)((0,r._getUnloadEvent)(),()=>{a=!0,(0,t._notifyVisibilityChanged)(n)})},6914:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){void 0===s&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&("get"in n?t.__esModule:!n.writable&&!n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){e[s=void 0===s?r:s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)},i=(Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=t.Log=t.EventLogger=t.Diagnostics=void 0,r(1845),r(1845));const o=r(8962),a=(Object.defineProperty(t,"Diagnostics",{enumerable:!0,get:function(){return o.Diagnostics}}),r(7770)),l=(Object.defineProperty(t,"EventLogger",{enumerable:!0,get:function(){return a.EventLogger}}),r(7512));Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return l.Log}});var u=r(8e3);const c=r(4534);Object.defineProperty(t,"Storage",{enumerable:!0,get:function(){return c.Storage}}),n(r(1845),t),n(r(2137),t),n(r(6427),t),n(r(694),t),n(r(8962),t),n(r(3539),t),n(r(5542),t),n(r(2922),t),n(r(2417),t),n(r(1406),t),n(r(1333),t),n(r(7512),t),n(r(7787),t),n(r(7410),t),n(r(7023),t),n(r(1405),t),n(r(1361),t),n(r(6830),t),n(r(5902),t),n(r(4143),t),n(r(2176),t),n(r(9122),t),n(r(1375),t),n(r(2636),t),n(r(3206),t),n(r(1637),t),n(r(8e3),t),n(r(586),t),n(r(1098),t),n(r(2059),t),n(r(1812),t),n(r(8578),t),n(r(4534),t),n(r(3401),t),n(r(6634),t),n(r(1881),t),n(r(8023),t),n(r(2397),t),n(r(3932),t),n(r(3091),t),Object.assign((0,i._getStatsigGlobal)(),{Log:l.Log,SDK_VERSION:u.SDK_VERSION})},2016:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoInit=void 0;const y=r(6914),_=r(2018);function b(e,t){var r;return null!=(r=t.get(e))?r:t.get(e.toLowerCase())}t.AutoInit=class{static attempt(t){var e,r,s,n,i;try{var o=(0,y._getWindowSafe)(),a=(0,y._getDocumentSafe)();if(o&&a&&a.currentScript){var l=a.currentScript.getAttribute("src"),u=null==(e=o.location)?void 0:e.href;if(l&&u){var c=new URL(l,u).searchParams,h=null!=(r=b("sdkKey",c))?r:b("apiKey",c);if(h){var d={},p=b("proxy",c),g=(p&&(d.networkConfig={api:p}),null==(n=null==(s=(0,y._getStatsigGlobal)())?void 0:s.instances)?void 0:n[h]);let e=null;if(e=g instanceof _.StatsigClient?g:e)t({sdkKey:h,client:e});else{var f=a.currentScript.dataset;const m=function(e,t){if(e)if(e in t&&"function"==typeof t[e])return t[e];return null}(null!=(i=f.onstatsiginit)?i:f.onStatsigInit,o),v=new _.StatsigClient(h,function(){var e=(0,y._getWindowSafe)();if(!e)return{};let t=e.statsigUser||{};var r=(t="object"!=typeof t?{}:t).custom||{},s=t.customIDs||{};return Object.assign(Object.assign({},t),{customIDs:Object.assign({},s),custom:Object.assign(Object.assign({},r),{useragent:e.navigator.userAgent,page_url:(0,y._getCurrentPageUrlSafe)()||"",language:null==(s=e.navigator)?void 0:s.language})})}(),d);v.initializeAsync().then(()=>{m&&m(v)}).catch(e=>{y.Log.error(e)}),t({sdkKey:h,client:v})}}}}}catch(e){y.Log.error("AutoInit failed",e)}}}},7262:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._resolveDeltasResponse=void 0;const s=r(6914);function n(e,t){null!=e&&e.forEach(e=>{delete t[e]})}t._resolveDeltasResponse=function(e,t){var r;return(t=(0,s._typedJsonParse)(t,"checksum","DeltasEvaluationResponse"))?(e=e,r=t,e=Object.assign(Object.assign(Object.assign({},e),r),{feature_gates:Object.assign(Object.assign({},e.feature_gates),r.feature_gates),layer_configs:Object.assign(Object.assign({},e.layer_configs),r.layer_configs),dynamic_configs:Object.assign(Object.assign({},e.dynamic_configs),r.dynamic_configs)}),n((e=r=e).deleted_gates,e.feature_gates),delete e.deleted_gates,n(r.deleted_configs,e.dynamic_configs),delete e.deleted_configs,n(r.deleted_layers,e.layer_configs),delete e.deleted_layers,r=e,(e=(0,s._DJB2Object)({feature_gates:r.feature_gates,dynamic_configs:r.dynamic_configs,layer_configs:r.layer_configs},2))===t.checksumV2?JSON.stringify(r):{hadBadDeltaChecksum:!0,badChecksum:e,badMergedConfigs:r,badFullResponse:t.deltas_full_response}):{hadBadDeltaChecksum:!0}}},4845:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6914),i=r(140),o=r(7095);t.default=class{constructor(e){this._sdkKey=e,this._rawValues=null,this._values=null,this._source="Uninitialized",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings=new Set}reset(){this._values=null,this._rawValues=null,this._source="Loading",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings.clear()}finalize(){this._values||(this._source="NoValues")}getValues(){return this._rawValues?(0,n._typedJsonParse)(this._rawValues,"has_updates","EvaluationStoreValues"):null}setValues(e,t){var r,s;return!!e&&null!=(s=(0,n._typedJsonParse)(e.data,"has_updates","EvaluationResponse"))&&(this._source=e.source,!0!==(null==s?void 0:s.has_updates)||(null!=(r=s.time)?r:0)<this._lcut||(this._rawValues=e.data,this._lcut=s.time,this._receivedAt=e.receivedAt,"init-v2"===s.response_format?this._values=new o.V2InitializeContainer(s):this._values=new i.V1InitializeContainer(s),this._bootstrapMetadata=this._extractBootstrapMetadata(e.source,s),e.source&&s.user&&this._setWarningState(t,s),n.SDKFlags.setFlags(this._sdkKey,null!=(r=s.sdk_flags)?r:{})),!0)}getWarnings(){if(0!==this._warnings.size)return Array.from(this._warnings)}getGate(e){e=this._values?this._values.getGate(e):null;return this._getDetailedStoreResult(e)}getConfig(e){e=this._values?this._values.getConfig(e):null;return this._getDetailedStoreResult(e)}getConfigList(){return this._values?this._values.getConfigList():[]}getLayer(e){e=this._values?this._values.getLayer(e):null;return this._getDetailedStoreResult(e)}getParamStore(e){e=this._values?this._values.getParamStore(e):null;return this._getDetailedStoreResult(e)}getSource(){return this._source}getExposureMapping(){var e;return null==(e=this._values)?void 0:e.getExposureMapping()}_extractBootstrapMetadata(e,t){return"Bootstrap"!==e?null:(e={},t.user&&(e.user=t.user),t.sdkInfo&&(e.generatorSDKInfo=t.sdkInfo),e.lcut=t.time,e)}_getDetailedStoreResult(e){return{result:e,details:this._getDetails(null==e)}}_setWarningState(e,t){var r,s=n.StableID.get(this._sdkKey);(null==(r=e.customIDs)?void 0:r.stableID)!==s&&(null!=(r=e.customIDs)&&r.stableID||s)?this._warnings.add("StableIDMismatch"):"user"in t&&(r=t.user,s=Object.assign(Object.assign({},e),{analyticsOnlyMetadata:void 0,privateAttributes:void 0}),(0,n._getFullUserHash)(s)!==(0,n._getFullUserHash)(r))&&this._warnings.add("PartialUserMatch")}getCurrentSourceDetails(){var e;return"Uninitialized"===this._source||"NoValues"===this._source?{reason:this._source}:(e={reason:this._source,lcut:this._lcut,receivedAt:this._receivedAt},0<this._warnings.size&&(e.warnings=Array.from(this._warnings)),e)}_getDetails(e){var t=this.getCurrentSourceDetails();let r=t.reason;var s=null!=(s=t.warnings)?s:[],e=("Bootstrap"===this._source&&0<s.length&&(r+=s[0]),"Uninitialized"!==r&&"NoValues"!==r&&(r=r+":"+(e?"Unrecognized":"Recognized")),"Bootstrap"===this._source&&null!=(s=this._bootstrapMetadata)?s:void 0);return e&&(t.bootstrapMetadata=e),Object.assign(Object.assign({},t),{reason:r})}}},8448:function(e,t,r){"use strict";var l=this&&this.__awaiter||function(e,o,a,l){return new(a=a||Promise)(function(r,t){function s(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(s,n)}i((l=l.apply(e,o||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});const u=r(6914),o=r(7262);class s extends u.NetworkCore{constructor(e,t){super(e,t);t=null==e?void 0:e.networkConfig;this._option=e,this._initializeUrlConfig=new u.UrlConfiguration(u.Endpoint._initialize,null==t?void 0:t.initializeUrl,null==t?void 0:t.api,null==t?void 0:t.initializeFallbackUrls)}fetchEvaluations(s,n,i,o,a){return l(this,void 0,void 0,function*(){var e,t=n?(0,u._typedJsonParse)(n,"has_updates","InitializeResponse"):null;let r={user:o,hash:null!=(e=null==(e=null==(e=this._option)?void 0:e.networkConfig)?void 0:e.initializeHashAlgorithm)?e:"djb2",deltasResponseRequested:!1,full_checksum:null};return null!=t&&t.has_updates&&(e=(null==t?void 0:t.hash_used)!==(null!=(e=null==(e=null==(e=this._option)?void 0:e.networkConfig)?void 0:e.initializeHashAlgorithm)?e:"djb2"),r=Object.assign(Object.assign({},r),{sinceTime:a&&!e?t.time:0,previousDerivedFields:"derived_fields"in t&&a?t.derived_fields:{},deltasResponseRequested:!0,full_checksum:t.full_checksum,partialUserMatchSinceTime:e?0:t.time})),this._fetchEvaluations(s,t,r,i)})}_fetchEvaluations(r,s,n,i){return l(this,void 0,void 0,function*(){var e,t=yield this.post({sdkKey:r,urlConfig:this._initializeUrlConfig,data:n,retries:2,isStatsigEncodable:!0,priority:i});return 204===(null==t?void 0:t.code)?'{"has_updates": false}':200!==(null==t?void 0:t.code)?null!=(e=null==t?void 0:t.body)?e:null:!0!==(null==s?void 0:s.has_updates)||!0!==(null==(e=t.body)?void 0:e.includes('"is_delta":true'))||!0!==n.deltasResponseRequested?t.body:"string"==typeof(e=(0,o._resolveDeltasResponse)(s,t.body))?e:this._fetchEvaluations(r,s,Object.assign(Object.assign(Object.assign({},n),e),{deltasResponseRequested:!1}),i)})}}t.default=s},3583:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._makeParamStoreGetter=void 0;const d=r(6914),p={disableExposureLog:!0};function g(e){return null==e||!1===e.disableExposureLog}function f(e,t){return null!=t&&!(0,d._isTypeMatch)(e,t)}t._makeParamStoreGetter=function(u,c,h){return(e,t)=>{if(null==c)return t;var r,s,n,i,o,a,l=c[e];if(null==l||null!=t&&(0,d._typeOf)(t)!==l.param_type)return t;switch(l.ref_type){case"static":return l.value;case"gate":return a=l,u.getFeatureGate(a.gate_name,g(h)?void 0:p).value?a.pass_value:a.fail_value;case"dynamic_config":return a=l,o=t,f(i=(i=u).getDynamicConfig(a.config_name,g(h)?void 0:p).get(a.param_name),o)?o:i;case"experiment":return o=l,i=t,f(n=(n=u).getExperiment(o.experiment_name,g(h)?void 0:p).get(o.param_name),i)?i:n;case"layer":return n=l,s=t,f(r=(r=u).getLayer(n.layer_name,g(h)?void 0:p).get(n.param_name),s)?s:r;default:return t}}}},8198:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,o,a,l){return new(a=a||Promise)(function(r,t){function s(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(s,n)}i((l=l.apply(e,o||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});const o=r(6914),a=r(4845),l=r(8448),n=r(3583),u=r(4131);class s extends o.StatsigClientBase{static instance(e){var t=(0,o._getStatsigGlobal)().instance(e);return t instanceof s?t:(o.Log.warn((0,o._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new s(null!=e?e:"",{}))}constructor(e,t,r=null){o.SDKType._setClientType(e,"javascript-client");var s,n=new l.default(r,e=>{this.$emt(e)}),e=(super(e,null!=(s=null==r?void 0:r.dataAdapter)?s:new u.StatsigEvaluationsDataAdapter,n,r),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(o.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(o.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(o.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(o.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(o.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(o.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new a.default(e),this._network=n,this._user=this._configureUser(t,r),this._sdkInstanceID=(0,o.getUUID)(),null!=(s=null==r?void 0:r.plugins)?s:[]);for(const i of e)i.bind(this)}initializeSync(e){var t;return"Uninitialized"!==this.loadingStatus?(0,o.createUpdateDetails)(!0,this._store.getSource(),-1,null,null,["MultipleInitializations",...null!=(t=this._store.getWarnings())?t:[]]):(this._logger.start(),this.updateUserSync(this._user,e))}initializeAsync(e){return i(this,void 0,void 0,function*(){return this._initializePromise||(this._initializePromise=this._initializeAsyncImpl(e)),this._initializePromise})}updateUserSync(t,e){var r=performance.now();try{return this._updateUserSyncImpl(t,e,r)}catch(e){t=e instanceof Error?e:new Error(String(e));return this._createErrorUpdateDetails(t,r)}}_updateUserSyncImpl(e,t,r){var s=[...null!=(s=this._store.getWarnings())?s:[]],e=(this._resetForUser(e),this.dataAdapter.getDataSync(this._user)),t=(null==e&&s.push("NoCachedValues"),this._store.setValues(e,this._user),this._finalizeUpdate(e),null==t?void 0:t.disableBackgroundCacheRefresh);return!0===t||null==t&&"Bootstrap"===(null==e?void 0:e.source)||this._runPostUpdate(null!=e?e:null,this._user),(0,o.createUpdateDetails)(!0,this._store.getSource(),performance.now()-r,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),s)}updateUserAsync(e,s){return i(this,void 0,void 0,function*(){var t=performance.now();try{return yield this._updateUserAsyncImpl(e,s)}catch(e){var r=e instanceof Error?e:new Error(String(e));return this._createErrorUpdateDetails(r,t)}})}_updateUserAsyncImpl(s,n){return i(this,void 0,void 0,function*(){this._resetForUser(s);var e=this._user,t=(o.Diagnostics._markInitOverallStart(this._sdkKey),this.dataAdapter.getDataSync(e));if(this._store.setValues(t,this._user),this._setStatus("Loading",t),t=yield this.dataAdapter.getDataAsync(t,e,n),e!==this._user)return(0,o.createUpdateDetails)(!1,this._store.getSource(),-1,new Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let r=!1;null!=t&&(o.Diagnostics._markInitProcessStart(this._sdkKey),r=this._store.setValues(t,this._user),o.Diagnostics._markInitProcessEnd(this._sdkKey,{success:r})),this._finalizeUpdate(t),r||(this._errorBoundary.attachErrorIfNoneExists(o.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),o.Diagnostics._markInitOverallEnd(this._sdkKey,r,this._store.getCurrentSourceDetails());e=o.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,o.createUpdateDetails)(r,this._store.getSource(),e,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){return{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:JSON.parse(JSON.stringify(this._user)),errorBoundary:this._errorBoundary,session:o.StatsigSession.get(this._sdkKey),stableID:o.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}checkGate(e,t){return this.getFeatureGate(e,t).value}logEvent(e,t,r){t="string"==typeof e?{eventName:e,value:t,metadata:r}:e;this.$emt({name:"log_event_called",event:t}),this._logger.enqueue(Object.assign(Object.assign({},t),{user:this._user,time:Date.now()}))}updateUserWithAnalyticsOnlyMetadata(e){this._user=this._configureUser(Object.assign(Object.assign({},this._user),{analyticsOnlyMetadata:e}),this._options)}_primeReadyRipcord(){this.$on("error",()=>{"Loading"===this.loadingStatus&&this._finalizeUpdate(null)})}_initializeAsyncImpl(e){return i(this,void 0,void 0,function*(){return o.Storage.isReady()||(yield o.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,e)})}_createErrorUpdateDetails(e,t){return(0,o.createUpdateDetails)(!1,this._store.getSource(),performance.now()-t,e,null,[...null!=(t=this._store.getWarnings())?t:[]])}_finalizeUpdate(e){this._store.finalize(),this._setStatus("Ready",e)}_runPostUpdate(e,t){this.dataAdapter.getDataAsync(e,t,{priority:"low"}).catch(e=>{o.Log.error("An error occurred after update.",e)})}_resetForUser(e){this._logger.reset(),this._store.reset(),this._user=this._configureUser(e,this._options)}_configureUser(e,t){var r,e=(0,o._normalizeUser)(e,t);const s=null==(t=e.customIDs)?void 0:t.stableID;return s&&((r=null==(r=(t=this.storageProvider).isReadyResolver)?void 0:r.call(t))?r.then(()=>o.StableID.setOverride(s,this._sdkKey),()=>o.StableID.setOverride(s,this._sdkKey)):o.StableID.setOverride(s,this._sdkKey)),0<Object.keys(this._possibleFirstTouchMetadata).length&&(e.analyticsOnlyMetadata=Object.assign(Object.assign({},e.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),e}_getFeatureGateImpl(e,t){var{result:r,details:s}=this._store.getGate(e),s=(0,o._makeFeatureGate)(e,s,r),n=null==(n=null==(r=this.overrideAdapter)?void 0:r.getGateOverride)?void 0:n.call(r,s,this._user,t),r=null!=n?n:s;return this._enqueueExposure(e,(0,o._createGateExposure)(this._user,r,this._store.getExposureMapping()),t),this.$emt({name:"gate_evaluation",gate:r}),r}_getDynamicConfigImpl(e,t){var{result:r,details:s}=this._store.getConfig(e),s=(0,o._makeDynamicConfig)(e,s,r),n=null==(n=null==(r=this.overrideAdapter)?void 0:r.getDynamicConfigOverride)?void 0:n.call(r,s,this._user,t),r=null!=n?n:s;return this._enqueueExposure(e,(0,o._createConfigExposure)(this._user,r,this._store.getExposureMapping()),t),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:r}),r}_getExperimentImpl(e,t){var{result:r,details:s}=this._store.getConfig(e),s=(0,o._makeExperiment)(e,s,r),n=(null!=s.__evaluation&&(s.__evaluation.secondary_exposures=(0,o._mapExposures)(null!=(r=null==(r=s.__evaluation)?void 0:r.secondary_exposures)?r:[],this._store.getExposureMapping())),null==(n=null==(r=this.overrideAdapter)?void 0:r.getExperimentOverride)?void 0:n.call(r,s,this._user,t)),r=null!=n?n:s;return this._enqueueExposure(e,(0,o._createConfigExposure)(this._user,r,this._store.getExposureMapping()),t),this.$emt({name:"experiment_evaluation",experiment:r}),r}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(t,r){var{result:e,details:s}=this._store.getLayer(t),s=(0,o._makeLayer)(t,s,e),n=null==(n=null==(e=this.overrideAdapter)?void 0:e.getLayerOverride)?void 0:n.call(e,s,this._user,r);null!=r&&r.disableExposureLog&&this._logger.incrementNonExposureCount(t);const i=(0,o._mergeOverride)(s,n,null!=(e=null==n?void 0:n.__value)?e:s.__value,e=>{null!=r&&r.disableExposureLog||this._enqueueExposure(t,(0,o._createLayerParameterExposure)(this._user,i,e,this._store.getExposureMapping()),r)});return this.$emt({name:"layer_evaluation",layer:i}),i}_getParameterStoreImpl(e,t){var{result:r,details:s}=this._store.getParamStore(e),e=(this._logger.incrementNonExposureCount(e),{name:e,details:s,__configuration:r,get:(0,n._makeParamStoreGetter)(this,r,t)}),r=null==(r=null==(s=this.overrideAdapter)?void 0:s.getParamStoreOverride)?void 0:r.call(s,e,t);return null!=r&&(e.__configuration=r.config,e.details=r.details,e.get=(0,n._makeParamStoreGetter)(this,r.config,t)),e}}t.default=s},4131:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,o,a,l){return new(a=a||Promise)(function(r,t){function s(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(s,n)}i((l=l.apply(e,o||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigEvaluationsDataAdapter=void 0;const s=r(6914),n=r(8448);class o extends s.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(e,t,r){super.attach(e,t,r),null!==r&&r instanceof n.default?this._network=r:this._network=new n.default(null!=t?t:{})}getDataAsync(e,t,r){return this._getDataAsyncImpl(e,(0,s._normalizeUser)(t,this._options),r)}prefetchData(e,t){return this._prefetchDataImpl(e,t)}setData(e){var t=(0,s._typedJsonParse)(e,"has_updates","data");t&&"user"in t?super.setData(e,t.user):s.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(e,t){super.setData(e,t)}_fetchFromNetwork(t,r,s,n){return i(this,void 0,void 0,function*(){var e=yield null==(e=this._network)?void 0:e.fetchEvaluations(this._getSdkKey(),t,null==s?void 0:s.priority,r,n);return null!=e?e:null})}_getCacheKey(e){e=(0,s._getStorageKey)(this._getSdkKey(),e,null==(e=this._options)?void 0:e.customUserCacheKeyFunc);return`${s.DataAdapterCachePrefix}.${this._cacheSuffix}.`+e}_isCachedResultValidFor204(e,t){return null!=e.fullUserHash&&e.fullUserHash===(0,s._getFullUserHash)(t)}}t.StatsigEvaluationsDataAdapter=o},140:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.V1InitializeContainer=void 0;const s=r(6914);t.V1InitializeContainer=class{constructor(e){this._values=e}getGate(e){return this._getResultFromLookup(this._values.feature_gates,e)}getConfig(e){return this._getResultFromLookup(this._values.dynamic_configs,e)}getLayer(e){return this._getResultFromLookup(this._values.layer_configs,e)}getParamStore(e){return this._getResultFromLookup(this._values.param_stores,e)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(e,t){var r;return e&&null!=(r=null!=(r=e[t])?r:e[(0,s._DJB2)(t)])?r:null}}},7095:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.V2InitializeContainer=void 0;const s=r(6914);t.V2InitializeContainer=class{constructor(e){this._values=e}getGate(e){var t=this._getResultFromLookup(this._values.feature_gates,e);return t?{name:e,value:!0===t.v,rule_id:null!=(e=t.r)?e:"default",secondary_exposures:null!=(e=t.s)?e:[],id_type:null!=(e=t.i)?e:""}:null}getConfig(e){var t=this._getResultFromLookup(this._values.dynamic_configs,e);return t?{name:e,value:null!=(e=this._values.values[t.v])?e:{},rule_id:t.r,secondary_exposures:null!=(e=t.s)?e:[],id_type:null!=(e=t.i)?e:"",is_user_in_experiment:!0===t.ue,passed:!0===t.p,group_name:null!=(e=t.gn)?e:void 0,is_experiment_active:!0===t.ea,group:t.r,is_device_based:"stableID"===t.i}:null}getLayer(e){var t=this._getResultFromLookup(this._values.layer_configs,e);return t?{name:e,value:null!=(e=this._values.values[t.v])?e:{},rule_id:t.r,secondary_exposures:null!=(e=t.s)?e:[],is_user_in_experiment:!0===t.ue,group_name:null!=(e=t.gn)?e:void 0,is_experiment_active:!0===t.ea,group:t.r,is_device_based:"stableID"===t.i,allocated_experiment_name:null!=(e=t.ae)?e:"",explicit_parameters:null!=(e=t.ep)?e:[],undelegated_secondary_exposures:null!=(e=t.us)?e:[],parameter_rule_ids:t.pr}:null}getParamStore(e){return this._getResultFromLookup(this._values.param_stores,e)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(e,t){var r;return e&&null!=(r=null!=(r=e[t])?r:e[(0,s._DJB2)(t)])?r:null}}},2018:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){void 0===s&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&("get"in n?t.__esModule:!n.writable&&!n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){e[s=void 0===s?r:s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)},i=(Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigClient=void 0,r(6914)),o=r(8198),n=(t.StatsigClient=o.default,n(r(6914),t),Object.assign((0,i._getStatsigGlobal)(),{StatsigClient:o.default}));t.default=n},8788:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SessionReplay=t.runStatsigSessionReplay=t.StatsigSessionReplayPlugin=void 0;const s=r(6914);var n=r(4069);const i=r(5967);function o(e,t){new a(e,t)}t.StatsigSessionReplayPlugin=class{constructor(e){this.options=e,this.__plugin="session-replay"}bind(e){o(e,this.options)}},t.runStatsigSessionReplay=o;class a extends n.SessionReplayBase{constructor(e,t){super(e,t),this._client.$on("values_updated",()=>{var e;this._wasStopped||this._attemptToStartRecording(null==(e=this._options)?void 0:e.forceRecording)}),this._attemptToStartRecording(null==(e=this._options)?void 0:e.forceRecording)}_shutdown(e){super._shutdownImpl(e)}_attemptToStartRecording(e=!1){var t;this._totalLogs>=i.MAX_LOGS||(!0===(null==(t=this._client.getContext().values)?void 0:t.recording_blocked)||!e&&!0!==(null==t?void 0:t.can_record_session)||!1===(null==t?void 0:t.passes_session_recording_targeting)?this._shutdown():this._replayer.isRecording()||(this._wasStopped=!1,s.StatsigMetadataProvider.add({isRecordingSession:"true"}),this._replayer.record((e,t)=>this._onRecordingEvent(e,t),null!=(t=null==(e=this._options)?void 0:e.rrwebConfig)?t:{},()=>{this._shutdown()})))}}t.SessionReplay=a},4069:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SessionReplayBase=t.forceStartRecording=t.startRecording=t.stopRecording=void 0;const u=r(6914),s=r(759),c=r(5967);function n(e){var t=null==e?(0,u._getStatsigGlobal)().firstSRInstance:null==(t=null==(t=(0,u._getStatsigGlobal)())?void 0:t.srInstances)?void 0:t[e];return t instanceof i?t:null}t.stopRecording=function(e){null!=(e=n(e))&&e.stopRecording()},t.startRecording=function(e){null!=(e=n(e))&&e.startRecording()},t.forceStartRecording=function(e){null!=(e=n(e))&&e.forceStartRecording()};class i{constructor(e,t){this._sessionData={startTime:-1,endTime:0,clickCount:0},this._events=[],this._wasStopped=!1,this._currentEventIndex=0,this._totalLogs=0,this._client=e,this._options=t;var{sdkKey:e,errorBoundary:t}=this._client.getContext();this._errorBoundary=t,this._errorBoundary.wrap(this),this._replayer=new s.SessionReplayClient,this._client.$on("pre_shutdown",()=>this._shutdown()),this._client.on("session_expired",()=>{this._shutdown("session_expired")}),(0,u._isServerEnv)()||((t=(0,u._getStatsigGlobal)()).srInstances=Object.assign(Object.assign({},t.srInstances),{[e]:this}),t.firstSRInstance)||(t.firstSRInstance=this),this._currentSessionID=this._getSessionIdFromClient(),this._subscribeToVisibilityChanged()}forceStartRecording(){this._wasStopped=!1,this._attemptToStartRecording(!0)}stopRecording(){this._wasStopped=!0,this._shutdown()}startRecording(){var e;this._wasStopped=!1,this._attemptToStartRecording(null==(e=this._options)?void 0:e.forceRecording)}isRecording(){return this._replayer.isRecording()}_logRecording(e){0!==this._events.length&&(e=(0,u._isUnloading)()?"is_leaving_page":e,this._logRecordingWithSessionID(this._currentSessionID,e))}_onVisibilityChanged(e){"background"===e&&(this._logRecording(),this._client.flush().catch(e=>{this._errorBoundary.logError("SR::visibility",e)}))}_subscribeToVisibilityChanged(){const r=this._client.getContext()["sdkKey"];(0,u._subscribeToVisiblityChanged)(e=>{var t=null==(t=null==(t=(0,u._getStatsigGlobal)())?void 0:t.srInstances)?void 0:t[r];t instanceof i&&t._onVisibilityChanged(e)})}_logRecordingWithSessionID(t,r){var s=this._sessionData;if(0!==this._events.length){var n=JSON.stringify(this._events),i=(0,c._slicePayload)(n),o=1<i.length?(0,u.getUUID)():null;for(let e=0;e<i.length;e++){var a=i[e],l=(0,c._makeLoggableRrwebEvent)(a,n,t,s,this._client.getContext().sdkInstanceID);null!=o&&(0,c._appendSlicedMetadata)(l.metadata,o,e,i.length,a.length),r&&(l.metadata[r]="true"),this._totalLogs++,this._client.logEvent(l),null!=o&&this._client.flush().catch(e=>{u.Log.error(e)})}this._events=[],this._totalLogs>c.MAX_LOGS&&this._shutdown()}}_bumpSessionIdleTimerAndLogRecording(){this._getSessionIdFromClient(),this._logRecording()}_getSessionIdFromClient(){return this._client.getContext().session.data.sessionID}_shutdownImpl(e){if(this._replayer.isRecording()){this._replayer.stop();const t=()=>{u.StatsigMetadataProvider.add({isRecordingSession:"false"}),this._client.off("logs_flushed",t)};this._client.$on("logs_flushed",t)}0!==this._events.length&&this._logRecording(e),"session_expired"===e&&(this._currentEventIndex=0,this._sessionData=this._makeEmptySessionData())}_makeEmptySessionData(){return{startTime:-1,endTime:0,clickCount:0}}_onRecordingEvent(e,t){var r;this._currentSessionID!==this._getSessionIdFromClient()?this._shutdown("session_expired"):this._totalLogs>=c.MAX_LOGS?this._shutdown():(e.eventIndex=this._currentEventIndex++,this._sessionData.clickCount+=t.clickCount,this._sessionData.startTime=-1===this._sessionData.startTime?t.startTime:Math.min(this._sessionData.startTime,t.startTime),this._sessionData.endTime=Math.max(this._sessionData.endTime,t.endTime),(t=(0,u._fastApproxSizeOf)(e,c.MAX_INDIVIDUAL_EVENT_BYTES))>c.MAX_INDIVIDUAL_EVENT_BYTES?u.Log.warn(`SessionReplay event is too large (~${t} bytes) and will not be logged`,e):(r=(0,u._fastApproxSizeOf)(this._events,c.REPLAY_ENQUEUE_TRIGGER_BYTES),this._events.push(e),r+t<c.REPLAY_ENQUEUE_TRIGGER_BYTES||((0,u._isCurrentlyVisible)()?this._bumpSessionIdleTimerAndLogRecording():this._logRecording())))}}t.SessionReplayBase=i},759:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SessionReplayClient=void 0;const s=r(5980),o=r(6914);t.SessionReplayClient=class{constructor(){this._startTimestamp=null,this._endTimestamp=null}record(n,e,t,i=!1){null==(0,o._getDocumentSafe)()||(this._startTimestamp=null,this._endTimestamp=null,this._stopCallback=t,this._stopFn)||(this._stopFn=(t=(e,t)=>{var r;i?this._startTimestamp=!t&&null!=(r=this._startTimestamp)?r:e.timestamp:null==this._startTimestamp&&(this._startTimestamp=e.timestamp),this._endTimestamp=e.timestamp;let s=0;3!==(r=e).type||2!==r.data.source||2!==r.data.type&&4!==r.data.type||s++,n(Object.assign(Object.assign({},e),{eventIndex:0}),{startTime:this._startTimestamp,endTime:this._endTimestamp,clickCount:s},null!=t&&t),144e5<this._endTimestamp-this._startTimestamp&&(null!=(e=this._stopFn)&&e.call(this),this._stopCallback)&&this._stopCallback()},e=e,i?(0,s.record)(Object.assign(Object.assign({},e),{emit:t,checkoutEveryNms:3e4})):(0,s.record)(Object.assign(Object.assign({},e),{emit:t}))))}stop(){this._stopFn&&(this._stopFn(),this._stopFn=void 0)}isRecording(){return null!=this._stopFn}}},5967:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._appendSlicedMetadata=t._slicePayload=t._makeLoggableRrwebEvent=t.MAX_LOGS=t.MAX_INDIVIDUAL_EVENT_BYTES=t.REPLAY_ENQUEUE_TRIGGER_BYTES=void 0;const i=r(6914);t.REPLAY_ENQUEUE_TRIGGER_BYTES=10240,t.MAX_INDIVIDUAL_EVENT_BYTES=10485760,t.MAX_LOGS=1e4,t._makeLoggableRrwebEvent=function(e,t,r,s,n){return{eventName:"statsig::session_recording",value:r,metadata:{session_start_ts:String(s.startTime),session_end_ts:String(s.endTime),clicks_captured_cumulative:String(s.clickCount),rrweb_events:e,rrweb_payload_size:String(t.length),session_replay_sdk_version:i.SDK_VERSION,sdk_instance_id:n}}},t._slicePayload=function(t){var r=[];for(let e=0;e<t.length;e+=1048576)r.push(t.slice(e,e+1048576));return r},t._appendSlicedMetadata=function(e,t,r,s,n){e.sliced_id=t,e.slice_index=String(r),e.slice_count=String(s),e.slice_byte_size=String(n)}},3691:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TriggeredSessionReplay=t.runStatsigTriggeredSessionReplay=t.StatsigTriggeredSessionReplayPlugin=void 0;const n=r(6914);var s=r(4069);const i=r(5967);function o(e,t){new a(e,t)}t.StatsigTriggeredSessionReplayPlugin=class{constructor(e){this.options=e,this.__plugin="triggered-session-replay"}bind(e){o(e,this.options)}},t.runStatsigTriggeredSessionReplay=o;class a extends s.SessionReplayBase{constructor(e,t){super(e,t),this._runningEventData=[],this._isActiveRecording=!1,this._subscribeToClientEvents(t),null!=t&&t.autoStartRecording?this._attemptToStartRecording(null==(e=this._options)?void 0:e.forceRecording):null!=t&&t.keepRollingWindow&&this._attemptToStartRollingWindow()}_subscribeToClientEvents(e){this._subscribeToValuesUpdated(e),this._subscribeToLogEventCalled(),this._subscribeToGateEvaluation(),this._subscribeToExperimentEvaluation()}_subscribeToValuesUpdated(t){this._client.$on("values_updated",()=>{var e;this._wasStopped||(null!=t&&t.autoStartRecording?this._attemptToStartRecording(null==(e=this._options)?void 0:e.forceRecording):null!=t&&t.keepRollingWindow&&this._attemptToStartRollingWindow())})}_subscribeToLogEventCalled(){this._client.$on("log_event_called",e=>{var t;this._wasStopped||!1===(null==(t=this._client.getContext().values)?void 0:t.passes_session_recording_targeting)||null==(null==t?void 0:t.session_recording_event_triggers)||null==(t=t.session_recording_event_triggers[e.event.eventName])||!1===t.passes_sampling||null!=(t=t.values)&&!t.includes(String(null!=(t=e.event.value)?t:""))||this._attemptToStartRecording(!0)})}_subscribeToGateEvaluation(){this._client.$on("gate_evaluation",e=>{this._tryStartExposureRecording(e.gate.name,String(e.gate.value))})}_subscribeToExperimentEvaluation(){this._client.$on("experiment_evaluation",e=>{this._tryStartExposureRecording(e.experiment.name,null!=(e=e.experiment.groupName)?e:"")})}_tryStartExposureRecording(e,t){var r,s;this._wasStopped||!1===(null==(s=this._client.getContext().values)?void 0:s.passes_session_recording_targeting)||null==(null==s?void 0:s.session_recording_exposure_triggers)||null==(r=null!=(r=s.session_recording_exposure_triggers[e])?r:s.session_recording_exposure_triggers[(0,n._DJB2)(e)])||!1===r.passes_sampling||null!=(s=r.values)&&!s.includes(t)||this._attemptToStartRecording(!0)}forceStartRecording(){super.forceStartRecording()}stopRecording(){this._isActiveRecording=!1,this._runningEventData=[],super.stopRecording()}_handleStartActiveRecording(){if(this._isActiveRecording=!0,0!==this._runningEventData.length){var t=this._runningEventData.map(e=>e.events).flat();for(let e=0;e<t.length;e++)t[e].event.eventIndex=e,this._sessionData.clickCount+=t[e].data.clickCount,this._sessionData.startTime=-1===this._sessionData.startTime?t[e].data.startTime:Math.min(this._sessionData.startTime,t[e].data.startTime),this._sessionData.endTime=Math.max(this._sessionData.endTime,t[e].data.endTime);this._events=t.map(e=>e.event),this._currentEventIndex=t.length,(0,n._isCurrentlyVisible)()?this._bumpSessionIdleTimerAndLogRecording():this._logRecording(),this._replayer.stop()}}_shutdown(e){this._isActiveRecording=!1,this._runningEventData=[],super._shutdownImpl(e)}_onRecordingEvent(e,t,r){if(!this._isActiveRecording)return this._currentSessionID!==this._getSessionIdFromClient()?void this._shutdown("session_expired"):void(r&&4===e.type||0===this._runningEventData.length?(1<this._runningEventData.length&&this._runningEventData.shift(),this._runningEventData.push({events:[{event:e,data:t}]})):this._runningEventData[this._runningEventData.length-1].events.push({event:e,data:t}));super._onRecordingEvent(e,t)}_attemptToStartRollingWindow(){var e=this._client.getContext().values;!1===(null==e?void 0:e.passes_session_recording_targeting)?this._shutdown():this._replayer.isRecording()||this._replayer.record((e,t,r)=>this._onRecordingEvent(e,t,r),null!=(e=null==(e=this._options)?void 0:e.rrwebConfig)?e:{},()=>{this._shutdown()},!0)}_attemptToStartRecording(e=!1){var t;this._totalLogs>=i.MAX_LOGS||(!0===(null==(t=this._client.getContext().values)?void 0:t.recording_blocked)||!e&&!0!==(null==t?void 0:t.can_record_session)||!1===(null==t?void 0:t.passes_session_recording_targeting)?this._shutdown():(this._handleStartActiveRecording(),this._wasStopped=!1,n.StatsigMetadataProvider.add({isRecordingSession:"true"}),this._replayer.isRecording()||this._replayer.record((e,t,r)=>this._onRecordingEvent(e,t,r),null!=(t=null==(e=this._options)?void 0:e.rrwebConfig)?t:{},()=>{this._shutdown()})))}}t.TriggeredSessionReplay=a},3447:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forceStartRecording=t.stopRecording=t.startRecording=t.StatsigTriggeredSessionReplayPlugin=t.StatsigSessionReplayPlugin=t.runStatsigTriggeredSessionReplay=t.runStatsigSessionReplay=t.SessionReplay=t.SessionReplayClient=void 0;var s=r(6914);const n=r(8788),i=(Object.defineProperty(t,"SessionReplay",{enumerable:!0,get:function(){return n.SessionReplay}}),Object.defineProperty(t,"StatsigSessionReplayPlugin",{enumerable:!0,get:function(){return n.StatsigSessionReplayPlugin}}),Object.defineProperty(t,"runStatsigSessionReplay",{enumerable:!0,get:function(){return n.runStatsigSessionReplay}}),r(4069)),o=(Object.defineProperty(t,"forceStartRecording",{enumerable:!0,get:function(){return i.forceStartRecording}}),Object.defineProperty(t,"startRecording",{enumerable:!0,get:function(){return i.startRecording}}),Object.defineProperty(t,"stopRecording",{enumerable:!0,get:function(){return i.stopRecording}}),r(759)),a=(Object.defineProperty(t,"SessionReplayClient",{enumerable:!0,get:function(){return o.SessionReplayClient}}),r(3691));Object.defineProperty(t,"StatsigTriggeredSessionReplayPlugin",{enumerable:!0,get:function(){return a.StatsigTriggeredSessionReplayPlugin}}),Object.defineProperty(t,"runStatsigTriggeredSessionReplay",{enumerable:!0,get:function(){return a.runStatsigTriggeredSessionReplay}}),Object.assign((0,s._getStatsigGlobal)(),{SessionReplayClient:o.SessionReplayClient,SessionReplay:n.SessionReplay,runStatsigSessionReplay:n.runStatsigSessionReplay,runStatsigTriggeredSessionReplay:a.runStatsigTriggeredSessionReplay,StatsigSessionReplayPlugin:n.StatsigSessionReplayPlugin,StatsigTriggeredSessionReplayPlugin:a.StatsigTriggeredSessionReplayPlugin,startRecording:i.startRecording,stopRecording:i.stopRecording,forceStartRecording:i.forceStartRecording})},4535:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoCapture=t.runStatsigAutoCapture=t.StatsigAutoCapturePlugin=void 0;const c=r(6914),o=r(5423),n=r(8872),i=r(7875),a=r(6714),l=r(4716),u=r(2678),h=r(5864),d=r(3769),p=r(9900),g={submit:o.AutoCaptureEventName.FORM_SUBMIT,click:o.AutoCaptureEventName.CLICK,copy:o.AutoCaptureEventName.COPY,cut:o.AutoCaptureEventName.COPY};function s(e,t){var r=e.getContext()["sdkKey"];if(!(0,c._isServerEnv)()){var s=null!=(s=(0,c._getStatsigGlobal)().acInstances)?s:{};if(s[r])return s[r]}return new f(e,t)}t.StatsigAutoCapturePlugin=class{constructor(e){this._options=e,this.__plugin="auto-capture"}bind(e){s(e,this._options)}},t.runStatsigAutoCapture=s;class f{constructor(e,t){this._client=e,this._disabledEvents={},this._previousLoggedPageViewUrl=null,this._hasLoggedPageViewEnd=!1,this._pageViewLogged=!1;var{sdkKey:e,errorBoundary:r,values:s}=e.getContext(),r=(this._options=t,this._disabledEvents=null!=(s=null==(s=null==s?void 0:s.auto_capture_settings)?void 0:s.disabled_events)?s:{},this._errorBoundary=r,this._errorBoundary.wrap(this,"autoCapture:"),this._client.$on("values_updated",()=>{var e=this._client.getContext().values;this._disabledEvents=null!=(e=null==(e=null==e?void 0:e.auto_capture_settings)?void 0:e.disabled_events)?e:this._disabledEvents}),this._engagementManager=new a.EngagementManager,this._rageClickManager=new l.default,this._webVitalsManager=new u.WebVitalsManager(this._enqueueAutoCapture.bind(this),r),this._deadClickManager=new i.default(this._enqueueAutoCapture.bind(this),r),this._consoleLogManager=new n.ConsoleLogManager(this._enqueueAutoCapture.bind(this),r,null!=(s=null==t?void 0:t.consoleLogAutoCaptureSettings)?s:{enabled:!1}),this._eventFilterFunc=null==t?void 0:t.eventFilterFunc,(0,c._getDocumentSafe)());(0,c._isServerEnv)()||((t=null!=(s=(__STATSIG__=(0,c._getStatsigGlobal)()).acInstances)?s:{})[e]=this,__STATSIG__.acInstances=t),"loading"===(null==r?void 0:r.readyState)?r.addEventListener("DOMContentLoaded",()=>this._initialize()):this._initialize()}_addEventHandlers(){var e=(0,c._getWindowSafe)(),t=(0,c._getDocumentSafe)();if(e&&t){const r=(e,t=!0)=>{e=e||(null==(e=(0,c._getWindowSafe)())?void 0:e.event);this._autoLogEvent(e),t&&this._engagementManager.bumpInactiveTimer(),"click"===e.type&&e instanceof MouseEvent&&this._rageClickManager.isRageClick(e.clientX,e.clientY,Date.now())&&this._logRageClick(e)};(0,h._registerEventHandler)(t,"click",e=>r(e)),(0,h._registerEventHandler)(t,"submit",e=>r(e)),(0,h._registerEventHandler)(t,"copy",e=>r(e)),(0,h._registerEventHandler)(t,"cut",e=>r(e)),(0,h._registerEventHandler)(e,"error",e=>r(e,!1)),(0,h._registerEventHandler)(e,"pagehide",()=>this._tryLogPageViewEnd()),(0,h._registerEventHandler)(e,"beforeunload",()=>this._tryLogPageViewEnd())}}_addPageViewTracking(){var e=(0,c._getWindowSafe)(),t=(0,c._getDocumentSafe)();e&&t&&((0,h._registerEventHandler)(e,"popstate",()=>this._tryLogPageView("popstate")),window.history.pushState=new Proxy(window.history.pushState,{apply:(e,t,[r,s,n])=>{e.apply(t,[r,s,n]),this._tryLogPageView("pushstate")}}),window.history.replaceState=new Proxy(window.history.replaceState,{apply:(e,t,[r,s,n])=>{e.apply(t,[r,s,n]),this._tryLogPageView("replacestate")}}),this._tryLogPageView())}_autoLogEvent(e){var t=null==(t=e.type)?void 0:t.toLowerCase();if("error"===t&&e instanceof ErrorEvent)this._logError(e);else{var r=(0,h._getTargetNode)(e);if(r){t=g[t];if(t){var s=t===o.AutoCaptureEventName.COPY;if((0,h._shouldLogEvent)(e,r,s)){var n={};if(s){s=null==(s=null==(s=(0,c._getWindowSafe)())?void 0:s.getSelection())?void 0:s.toString();if(!s)return;null!=(i=this._options)&&i.captureCopyText&&(n.selectedText=(0,h._sanitizeString)(s));var i=e.type||"clipboard";n.clipType=i}var{value:s,metadata:e}=(0,d._gatherEventData)(r),i=(e.isOutbound&&this._engagementManager.setMeaningfulEngagementOccurred(!0),Object.assign(n,e),(0,p._gatherAllMetadata)((0,h._getSafeUrl)()));this._enqueueAutoCapture(t,s,Object.assign(Object.assign({},i),n))}}}}}_initialize(){this._webVitalsManager.startTracking(),this._deadClickManager.startTracking(),this._consoleLogManager.startTracking(),this._engagementManager.startInactivityTracking(()=>this._tryLogPageViewEnd(!0)),this._addEventHandlers(),this._addPageViewTracking(),this._logSessionStart(),this._logPerformance()}_logError(e){var t=(null==e?void 0:e.error)||{};let r=t;if("object"==typeof t)try{r=JSON.stringify(t)}catch(e){r="function"==typeof(null==t?void 0:t.toString)?t.toString():"Unknown Error"}this._enqueueAutoCapture(o.AutoCaptureEventName.ERROR,e.message,{message:e.message,filename:e.filename,lineno:e.lineno,colno:e.colno,error_str:r})}_logSessionStart(){var e=this._getSessionFromClient();try{this._isNewSession(e)&&this._enqueueAutoCapture(o.AutoCaptureEventName.SESSION_START,(0,h._getSanitizedPageUrl)(),Object.assign({sessionID:e.data.sessionID},(0,p._gatherAllMetadata)((0,h._getSafeUrl)())),{flushImmediately:!0})}catch(e){this._errorBoundary.logError("AC::logSession",e)}}_tryLogPageView(e){var t=(0,h._getSafeUrl)(),r=this._previousLoggedPageViewUrl;r&&t.pathname===r.pathname||(this._engagementManager.setLastPageViewTime(Date.now()),r=(this._hasLoggedPageViewEnd=!1,p._gatherAllMetadata)(t),e&&(r.navigation_type=e),this._previousLoggedPageViewUrl&&(r.last_page_view_url=this._previousLoggedPageViewUrl.href),this._pageViewLogged||(this._updateClientWithPossibleFirstTouchMetadata(),this._pageViewLogged=!0),this._enqueueAutoCapture(o.AutoCaptureEventName.PAGE_VIEW,(0,h._getSanitizedPageUrl)(),r,{flushImmediately:!0,addNewSessionMetadata:!0}),this._previousLoggedPageViewUrl=t,this._engagementManager.bumpInactiveTimer())}_tryLogPageViewEnd(e=!1){this._hasLoggedPageViewEnd||(this._hasLoggedPageViewEnd=!0,this._enqueueAutoCapture(o.AutoCaptureEventName.PAGE_VIEW_END,(0,h._getSanitizedPageUrl)(),Object.assign(Object.assign({},this._engagementManager.getPageViewEndMetadata()),{dueToInactivity:e}),{flushImmediately:!0}))}_logRageClick(e){var t,r;(0,h._shouldLogEvent)(e,e.target)&&({value:t,metadata:r}=(0,d._gatherEventData)(e.target),this._enqueueAutoCapture(o.AutoCaptureEventName.RAGE_CLICK,t,Object.assign(Object.assign({x:e.clientX,y:e.clientY,timestamp:Date.now()},(0,p._gatherAllMetadata)((0,h._getSafeUrl)())),r)))}_logPerformance(){const r=(0,c._getWindowSafe)();r&&r.performance&&void 0!==(null===r||void 0===r?void 0:r.performance)&&"function"==typeof r.performance.getEntriesByType&&"function"==typeof r.performance.getEntriesByName&&setTimeout(()=>{var e={},t=r.performance.getEntriesByType("navigation"),t=(t&&0<t.length&&t[0]instanceof PerformanceNavigationTiming&&(t=t[0],e.load_time_ms=t.duration,e.dom_interactive_time_ms=t.domInteractive-t.startTime,e.redirect_count=t.redirectCount,e.transfer_bytes=t.transferSize),r.performance.getEntriesByName("first-contentful-paint"));t&&0<t.length&&t[0]instanceof PerformancePaintTiming&&(e.first_contentful_paint_time_ms=t[0].startTime),this._enqueueAutoCapture(o.AutoCaptureEventName.PERFORMANCE,(0,h._getSanitizedPageUrl)(),Object.assign(Object.assign({},e),(0,p._getNetworkInfo)()))},1)}_enqueueAutoCapture(e,t,r,s){var n,i,o;if(t){var a=e.slice("auto_capture::".length);if(!this._disabledEvents[e]&&!this._disabledEvents[a]){a=this._getSessionFromClient();try{var l=Object.assign({sessionID:a.data.sessionID,page_url:null!=(o=null==(i=null==(n=(0,c._getWindowSafe)())?void 0:n.location)?void 0:i.href)?o:""},r),u=(null!=s&&s.addNewSessionMetadata&&(l.isNewSession=String(this._isNewSession(a))),{eventName:e,value:t,metadata:l});this._eventFilterFunc&&!this._eventFilterFunc(u)||(this._client.logEvent(u),null!=s&&s.flushImmediately&&this._flushImmediately())}catch(e){this._errorBoundary.logError("AC::enqueue",e)}}}}_updateClientWithPossibleFirstTouchMetadata(){var e=this._client;e._possibleFirstTouchMetadata=(0,p._getPossibleFirstTouchMetadata)((0,h._getSafeUrl)()),0<Object.keys(e._possibleFirstTouchMetadata).length&&(e._user=Object.assign(Object.assign({},e._user),{analyticsOnlyMetadata:Object.assign(Object.assign({},e._possibleFirstTouchMetadata),e._user.analyticsOnlyMetadata)}))}_flushImmediately(){this._client.flush().catch(e=>{c.Log.error(e)})}_isNewSession(e){return Math.abs(e.data.startTime-Date.now())<1e3}_getSessionFromClient(){return this._client.getContext().session}static getAllMetadata(){return(0,p._gatherAllMetadata)((0,h._getSafeUrl)())}}t.AutoCapture=f},5423:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoCaptureEventName=void 0,t.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:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleLogManager=void 0;const s=r(6914),n=r(5423),a=r(5864),l=r(8135),i=r(9900),u={trace:10,debug:20,log:30,info:30,warn:40,error:50};t.ConsoleLogManager=class{constructor(e,t,r){this._enqueueFn=e,this._errorBoundary=t,this._options=r,this._restoreFns=[],this._isTracking=!1,this._logLevel="info",this.__source="js-auto-capture",this._logLevel=null!=(e=this._options.logLevel)?e:"info",this._maxKeys=null!=(t=this._options.maxKeys)?t:10,this._maxDepth=null!=(r=this._options.maxDepth)?r:10,this._maxStringLength=null!=(e=this._options.maxStringLength)?e:500}startTracking(){try{!this._isTracking&&this._options.enabled&&(0,s._getWindowSafe)()&&(this._patchConsole(),this._isTracking=!0)}catch(e){s.Log.error("Error starting console log tracking",e),this._errorBoundary.logError("autoCapture:ConsoleLogManager",e)}}stopTracking(){this._isTracking&&(this._restoreFns.forEach(e=>e()),this._restoreFns=[],this._isTracking=!1)}_patchConsole(){Object.entries(u).forEach(([i,e])=>{if(!(e<u[this._logLevel])&&console[i]){const o=console[i].bind(console);let n=!1;e=(0,a.wrapFunctionWithRestore)(console,i,s=>(...t)=>{if(s(...t),!n){n=!0;try{var e=t.map(e=>(0,l._safeStringify)(e,this._maxKeys,this._maxDepth,this._maxStringLength)),r=(0,l._getStackTrace)();this._enqueueConsoleLog(i,e,r)}catch(e){o("console observer error:",e,...t),this._errorBoundary.logError("autoCapture:ConsoleLogManager",e)}finally{n=!1}}});this._restoreFns.push(e)}})}_enqueueConsoleLog(e,t,r){this._shouldLog()&&(e=Object.assign({status:"log"===e?"info":e,log_level:e,payload:t,trace:r,timestamp:Date.now(),source:this.__source},(0,i._gatherAllMetadata)((0,a._getSafeUrl)())),this._enqueueFn(n.AutoCaptureEventName.CONSOLE_LOG,t.join(" "),e))}_shouldLog(){return!this._options.sampleRate||"number"!=typeof this._options.sampleRate||this._options.sampleRate<=0||1<=this._options.sampleRate||Math.random()<this._options.sampleRate}}},7875:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.DeadClickConfig=void 0;const o=t(6914),n=t(5423),i=t(5864),a=t(3769),l=t(9900);r.DeadClickConfig={CLICK_CHECK_TIMEOUT:1e3,SCROLL_DELAY_MS:100,SELECTION_CHANGE_DELAY_MS:100,MUTATION_DELAY_MS:2500,ABSOLUTE_DEAD_CLICK_TIMEOUT:2750};r.default=class{constructor(e,t){this._enqueueFn=e,this._errorBoundary=t,this._lastMutationTime=0,this._lastSelectionChangeTime=0,this._clicks=[],this._deadClickConfig=r.DeadClickConfig,this._handleScroll=(0,i.throttle)(()=>{const t=Date.now();this._clicks.forEach(e=>{e.scrollDelayMs||(e.scrollDelayMs=t-e.timestamp)})},50)}startTracking(){try{var e=(0,o._getWindowSafe)();e&&(e.addEventListener("click",e=>this._handleClick(e),{capture:!0}),e.addEventListener("scroll",()=>this._handleScroll(),{capture:!0,passive:!0}),e.addEventListener("selectionchange",()=>this._handleSelectionChange()),this._setupMutationObserver())}catch(e){o.Log.error("Error starting dead click tracking",e),this._errorBoundary.logError("autoCapture:DeadClickManager",e)}}_handleClick(e){var t,e=e.target;e&&(t={timestamp:Date.now(),eventTarget:e},i.interactiveElements.includes(null==(e=null==e?void 0:e.tagName)?void 0:e.toLowerCase())||this._clicks.push(t),this._clicks.length)&&!this._clickCheckTimer&&(this._clickCheckTimer=null==(e=(0,o._getWindowSafe)())?void 0:e.setTimeout(()=>{this._checkForDeadClick()},this._deadClickConfig.CLICK_CHECK_TIMEOUT))}_handleSelectionChange(){this._lastSelectionChangeTime=Date.now()}_setupMutationObserver(){var e=(0,o._getDocumentSafe)();e&&(this._observer=new MutationObserver(()=>{this._lastMutationTime=Date.now()}),this._observer.observe(e.body,{childList:!0,subtree:!0,attributes:!0,characterData:!0}))}_checkForDeadClick(){if(this._clicks.length){clearTimeout(this._clickCheckTimer),this._clickCheckTimer=void 0;var e=this._clicks;this._clicks=[];for(const i of e){this._updateClickDelayMs(i);var t,r=null!=i.scrollDelayMs&&i.scrollDelayMs<this._deadClickConfig.SCROLL_DELAY_MS,s=null!=i.selectionChangeDelayMs&&i.selectionChangeDelayMs<this._deadClickConfig.SELECTION_CHANGE_DELAY_MS,n=null!=i.mutationDelayMs&&i.mutationDelayMs<this._deadClickConfig.MUTATION_DELAY_MS;r||s||n||(r=null!=i.scrollDelayMs&&i.scrollDelayMs>this._deadClickConfig.SCROLL_DELAY_MS,s=null!=i.selectionChangeDelayMs&&i.selectionChangeDelayMs>this._deadClickConfig.SELECTION_CHANGE_DELAY_MS,n=null!=i.mutationDelayMs&&i.mutationDelayMs>this._deadClickConfig.MUTATION_DELAY_MS,t=null!=i.absoluteDelayMs&&i.absoluteDelayMs>this._deadClickConfig.ABSOLUTE_DEAD_CLICK_TIMEOUT,r||s||n||t?this._logDeadClick(i,{scrollTimeout:r,selectionChangeTimeout:s,mutationTimeout:n,absoluteTimeout:t}):null!=i.absoluteDelayMs&&i.absoluteDelayMs<this._deadClickConfig.ABSOLUTE_DEAD_CLICK_TIMEOUT&&this._clicks.push(i))}this._clicks.length&&!this._clickCheckTimer&&(this._clickCheckTimer=null==(e=(0,o._getWindowSafe)())?void 0:e.setTimeout(()=>{this._checkForDeadClick()},this._deadClickConfig.CLICK_CHECK_TIMEOUT))}}_logDeadClick(e,t){var{value:r,metadata:s}=(0,a._gatherEventData)(e.eventTarget);r&&this._enqueueFn(n.AutoCaptureEventName.DEAD_CLICK,r,Object.assign(Object.assign(Object.assign(Object.assign({},s),t),(0,l._gatherCommonMetadata)((0,i._getSafeUrl)())),{scrollDelayMs:e.scrollDelayMs,selectionChangeDelayMs:e.selectionChangeDelayMs,mutationDelayMs:e.mutationDelayMs,absoluteDelayMs:e.absoluteDelayMs}))}_updateClickDelayMs(e){!e.mutationDelayMs&&0<this._lastMutationTime&&e.timestamp<=this._lastMutationTime&&(e.mutationDelayMs=Date.now()-this._lastMutationTime),!e.selectionChangeDelayMs&&0<this._lastSelectionChangeTime&&e.timestamp<=this._lastSelectionChangeTime&&(e.selectionChangeDelayMs=Date.now()-this._lastSelectionChangeTime),e.absoluteDelayMs=Date.now()-e.timestamp}}},6714:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EngagementManager=void 0;const s=r(6914);t.EngagementManager=class{constructor(){this._lastScrollY=0,this._maxScrollY=0,this._lastScrollPercentage=0,this._maxScrollPercentage=0,this._lastPageViewTime=Date.now(),this._inactiveTimer=null,this._onInactivityCallback=null,this._meaningfulEngagementOccurred=!1,this._initializeScrollTracking()}_initializeScrollTracking(){var e=(0,s._getWindowSafe)();e&&(e.addEventListener("scroll",()=>this._handleScroll()),e.addEventListener("scrollend",()=>this._handleScroll()),e.addEventListener("resize",()=>this._handleScroll()))}_handleScroll(){var e,t=(0,s._getWindowSafe)(),r=(0,s._getDocumentSafe)();t&&r&&(e=r.body.scrollHeight,r=t.scrollY||r.documentElement.scrollTop||0,t=t.innerHeight,this._lastScrollY=r,this._maxScrollY=Math.max(this._maxScrollY,r),r=Math.min(100,Math.round((r+t)/e*100)),this._lastScrollPercentage=r,this._maxScrollPercentage=Math.max(this._maxScrollPercentage,r),this.bumpInactiveTimer())}getScrollMetrics(){return{lastScrollY:this._lastScrollY,maxScrollY:this._maxScrollY,lastScrollPercentage:this._lastScrollPercentage,maxScrollPercentage:this._maxScrollPercentage,scrollDepth:this._maxScrollPercentage}}getPageViewLength(){return Date.now()-this._lastPageViewTime}setLastPageViewTime(e){this._lastPageViewTime=e}startInactivityTracking(e){this._onInactivityCallback=e}bumpInactiveTimer(){var e=(0,s._getWindowSafe)();e&&(this._inactiveTimer&&clearTimeout(this._inactiveTimer),this._inactiveTimer=e.setTimeout(()=>{this._onInactivityCallback&&this._onInactivityCallback()},6e5))}setMeaningfulEngagementOccurred(e){this._meaningfulEngagementOccurred=e}getPageViewEndMetadata(){var e=Object.assign(Object.assign({},this.getScrollMetrics()),{pageViewLength:this.getPageViewLength(),meaningfulEngagementOccurred:this._meaningfulEngagementOccurred});return this.setMeaningfulEngagementOccurred(!1),e}}},4716:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){this._clicks=[]}isRageClick(e,t,r){this._clicks=this._clicks.filter(e=>r-e.timestamp<1e3);var s,n;return 0<this._clicks.length&&(s=this._clicks[this._clicks.length-1],n=e-s.x,s=t-s.y,!(Math.abs(n)+Math.abs(s)<=30))&&(this._clicks=[]),this._clicks.push({x:e,y:t,timestamp:r}),3<=this._clicks.length}}},2678:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebVitalsManager=void 0;const s=r(8572),n=r(6914),i=r(5423),o=r(5864),a=["CLS","FCP","INP","LCP","TTFB"];t.WebVitalsManager=class{constructor(e,t){this._enqueueFn=e,this._errorBoundary=t,this._isInitialized=!1,this._metricEvent={url:(0,o._getSafeUrlString)(),sanitizedUrl:(0,o._getSanitizedPageUrl)(),metrics:[],firstMetricTimestamp:void 0}}startTracking(){var e,t,r;try{this._isInitialized||"https:"!==(r=null==(t=null==(e=(0,n._getWindowSafe)())?void 0:e.location)?void 0:t.protocol)&&"http:"!==r||((0,s.onCLS)(e=>this._handleMetric(e)),(0,s.onFCP)(e=>this._handleMetric(e)),(0,s.onINP)(e=>this._handleMetric(e)),(0,s.onLCP)(e=>this._handleMetric(e)),(0,s.onTTFB)(e=>this._handleMetric(e)),this._isInitialized=!0)}catch(e){n.Log.error("Error starting web vitals tracking",e),this._errorBoundary.logError("autoCapture:WebVitalsManager",e)}}_handleMetric(e){var t;void 0===this._metricEvent.firstMetricTimestamp&&(this._metricEvent.firstMetricTimestamp=Date.now()),void 0!==e&&void 0!==(null==e?void 0:e.name)&&""!==(t=(0,o._getSafeUrlString)())&&a.includes(e.name)&&(t!==this._metricEvent.url&&(this._enqueueWebVitalsAutoCaptureEvent(),this._metricEvent.url=t),this._metricEvent.metrics.push({name:e.name,value:e.value,delta:e.delta,id:e.id}),this._metricEvent.metrics.length===a.length)&&this._enqueueWebVitalsAutoCaptureEvent()}_enqueueWebVitalsAutoCaptureEvent(){if(""!==this._metricEvent.url&&0!==this._metricEvent.metrics.length){const r={};this._metricEvent.metrics.forEach(e=>{var t=e.name.toLowerCase();r[t+"_value"]=e.value,r[t+"_delta"]=e.delta,r[t+"_id"]=e.id}),this._enqueueFn(i.AutoCaptureEventName.WEB_VITALS,this._metricEvent.sanitizedUrl,Object.assign(Object.assign({},r),{first_metric_timestamp:this._metricEvent.firstMetricTimestamp})),this._metricEvent={url:(0,o._getSafeUrlString)(),sanitizedUrl:(0,o._getSanitizedPageUrl)(),metrics:[],firstMetricTimestamp:void 0}}}}},1964:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigAutoCapturePlugin=t.runStatsigAutoCapture=t.AutoCapture=t.AutoCaptureEventName=void 0;var s=r(6914);const n=r(4535);Object.defineProperty(t,"AutoCapture",{enumerable:!0,get:function(){return n.AutoCapture}}),Object.defineProperty(t,"StatsigAutoCapturePlugin",{enumerable:!0,get:function(){return n.StatsigAutoCapturePlugin}}),Object.defineProperty(t,"runStatsigAutoCapture",{enumerable:!0,get:function(){return n.runStatsigAutoCapture}});var i=r(5423),r=(Object.defineProperty(t,"AutoCaptureEventName",{enumerable:!0,get:function(){return i.AutoCaptureEventName}}),Object.assign((0,s._getStatsigGlobal)(),{AutoCapture:n.AutoCapture,runStatsigAutoCapture:n.runStatsigAutoCapture,StatsigAutoCapturePlugin:n.StatsigAutoCapturePlugin}));t.default=r},5864:(e,o,t)=>{"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.wrapFunctionWithRestore=o.throttle=o._sanitizeString=o._getAnchorNodeInHierarchy=o._getSafeTimezoneOffset=o._getSafeTimezone=o._getSafeNetworkInformation=o._registerEventHandler=o._getSanitizedPageUrl=o._getSafeUrlString=o._getSafeUrl=o._shouldLogEvent=o._getTargetNode=o._stripEmptyValues=o.interactiveElements=void 0;const r=t(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 n=new RegExp("^(\\d{3}-?\\d{2}-?\\d{4})$");function i(){var e=null!=(e=null==(e=null==(e=(0,r._getWindowSafe)())?void 0:e.location)?void 0:e.href)?e:"";let t;try{t=new URL(e)}catch(e){t=new URL("error:")}return t}function a(t){if(t){let e=t;for(;e;){var r=e.tagName.toLowerCase();if(["body","document"].includes(r))return null;if("a"===e.tagName.toLowerCase())return e;e=e.parentElement}}return null}o.interactiveElements=["button","a","input","select","textarea","form","select","label"],o._stripEmptyValues=function(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>null!=e&&""!==e&&void 0!==e))},o._getTargetNode=function(e){if(!e)return null;let t=e.target||e.srcElement;return t&&t instanceof Element?t=3===t.nodeType?t.parentNode||null:t:null},o._shouldLogEvent=function(e,t,r=!1){if(!e||!t||1!==t.nodeType)return!1;var s=t.tagName.toLowerCase(),n=e.type.toLowerCase();if(t.classList.contains("statsig-no-capture"))return!1;if(r)return!0;switch(s){case"html":return!1;case"form":return 0<=["submit"].indexOf(n);case"input":case"select":case"textarea":return 0<=["change","click"].indexOf(n);default:if("click"===n){var i=window.getComputedStyle(t);if(i&&"pointer"===i.getPropertyValue("cursor"))return!0;if(o.interactiveElements.includes(s))return!0;if("true"===t.getAttribute("contenteditable"))return!0;if(a(t))return!0}return!1}},o._getSafeUrl=i,o._getSafeUrlString=function(){var e=i().toString();return e.startsWith("error:")?"":e},o._getSanitizedPageUrl=function(){return(0,r._getCurrentPageUrlSafe)()||""},o._registerEventHandler=function(e,t,r){e&&e.addEventListener&&e.addEventListener(t,r,!0)},o._getSafeNetworkInformation=function(){var e=(0,r._getWindowSafe)();return e&&e.navigator&&e.navigator.connection||null},o._getSafeTimezone=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return null}},o._getSafeTimezoneOffset=function(){try{return(new Date).getTimezoneOffset()}catch(e){return null}},o._getAnchorNodeInHierarchy=a,o._sanitizeString=function(e){return e?e.replace(/<[^>]*>/g,"").trim().split(/(\s+)/).filter(e=>{return!s.test((e||"").replace(/[- ]/g,""))&&!n.test((e||"").replace(/[- ]/g,""))}).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255):null},o.throttle=function(r,s){let n=0;return function(...e){var t=Date.now();t-n>=s&&(n=t,r(...e))}},o.wrapFunctionWithRestore=function(e,t,r){const s=e[t];if("function"!=typeof s)return()=>{};try{var n=r(s);return Object.defineProperty(n,"__statsig_original__",{enumerable:!1,value:s}),e[t]=n,()=>{e[t]=s}}catch(e){return()=>{}}}},8135:(e,t)=>{"use strict";function i(e,t){return e.length<=t?e:e.slice(0,t)+"..."}Object.defineProperty(t,"__esModule",{value:!0}),t._getStackTrace=t._safeStringify=void 0,t._safeStringify=function(e,t,r,s){try{return function(e,t,r){if(function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e)){if(Object.keys(e).length>t)return 1;if(function t(r,s){if(s<=0)return!0;if("object"!=typeof r||null===r)return!1;return Object.keys(r).some(e=>t(r[e],s-1))}(e,r))return 1}return"function"==typeof e}(e,t,r)?(n=s,i(e.toString(),n)):i("string"==typeof e?e:"object"==typeof e&&null!==e?JSON.stringify(e):String(e),s)}catch(e){return i("[Unserializable]",s)}var n},t._getStackTrace=function(){var e,t;try{return null!=(t=null==(e=(new Error).stack)?void 0:e.split("\n").slice(2))?t:[]}catch(e){return[]}}},3769:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getMetadataFromElement=t._gatherCopyEventData=t._gatherEventData=void 0;const s=r(6914),l=r(5864),n=1e3,i=100,o=50;function a(e,t){return e?e.length>t?e.substring(0,t)+"...":e:null}function u(e){var t={};return t.class=(a(e.getAttribute("class"),n)||"").replace(/\s+/g," ").trim(),t.id=a(e.getAttribute("id"),n),t.ariaLabel=a(e.getAttribute("aria-label"),n),t.name=a(e.getAttribute("name"),n),t}function c(e){var t={},r=u(e),r=(Object.assign(t,r),Array.from(e.classList));return t.classList=0<r.length?r.slice(0,i):null,t.selector=function(t){if(!t)return"";if(!t.parentNode){var r=t.tagName.toLowerCase();if(t.id)return"#"+t.id;let e=r;return t.className&&"string"==typeof t.className&&0<(r=t.className.trim().split(/\s+/)).length&&""!==r[0]&&(e+="."+r.join(".")),e}var e=[];let s=t,n=0;for(;s&&s.nodeType===Node.ELEMENT_NODE&&n<o;){var i=function(s){var e=s.tagName.toLowerCase();if(s.id)return"#"+s.id;let n=e;s.className&&"string"==typeof s.className&&0<(e=s.className.trim().split(/\s+/)).length&&""!==e[0]&&(n+="."+e.join("."));e=s.parentElement;if(e&&1<e.children.length){let e=1,t=1,r=s.previousElementSibling;for(;r;)e++,r.tagName===s.tagName&&t++,r=r.previousElementSibling;n+=`:nth-child(${e})`,(1<t||function(e){let t=e.nextElementSibling;for(;t;){if(t.tagName===e.tagName)return 1;t=t.nextElementSibling}return}(s))&&(n+=`:nth-of-type(${t})`)}return n}(s);if(e.unshift(i),s.id)break;if((s=s.parentElement)&&"body"===s.tagName.toLowerCase())break;n++}return e.join(" > ")}(e),t}t._gatherEventData=function(e){var t,r,s,n,i,o=(0,l._getSanitizedPageUrl)()||"",a=e.tagName.toLowerCase();return"input"===(t=e).tagName.toLowerCase()&&["button","checkbox","submit","reset"].includes(t.getAttribute("type")||"")||"textarea"===t.tagName.toLowerCase()||"select"===t.tagName.toLowerCase()||"true"===t.getAttribute("contenteditable")?{value:o,metadata:u(e)}:((t={}).tagName=a,n=c(e),Object.assign(t,n),"form"===a&&Object.assign(t,((n={}).action=(r=e).getAttribute("action"),n.method=null!=(s=r.getAttribute("method"))?s:"GET",n.formName=r.getAttribute("name"),n.formId=r.getAttribute("id"),n)),"input"===a&&Object.assign(t,((s={}).content=(r=e).value,s.inputName=r.getAttribute("name"),s)),(n=(0,l._getAnchorNodeInHierarchy)(e))&&Object.assign(t,((i={}).href=n.getAttribute("href"),i)),"button"!==a&&!n||Object.assign(t,((i={}).content=((a=n||e).textContent||"").trim(),a=function(e){var t={};if(e){var r=null==e?void 0:e.dataset;if(r)for(const s in r)t["data-"+s]=r[s]||""}return t}(a),Object.assign(i,a),i)),function(e){if(Array.isArray(e.classList)&&null!=(t=e.classList)&&t.includes("statsig-ctr-capture"))return 1;var t=e.href;if(t)try{var r=(0,l._getSafeUrl)(),s=new URL(t);return r.host!==s.host}catch(e){}return}(t)&&(t.isOutbound="true"),{value:o,metadata:t})},t._gatherCopyEventData=function(e){var t=null==(t=null==(t=(0,s._getWindowSafe)())?void 0:t.getSelection())?void 0:t.toString(),r={},t=(r.selectedText=(0,l._sanitizeString)(t),e.type||"clipboard");return r.clipType=t,r},t._getMetadataFromElement=c},9900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getPossibleFirstTouchMetadata=t._getNetworkInfo=t._gatherAllMetadata=t._gatherCommonMetadata=void 0;const o=r(6914),a=r(5864);function i(e){var t=(0,o._getDocumentSafe)(),r=(0,o._getWindowSafe)();return(0,a._stripEmptyValues)(Object.assign({title:null==t?void 0:t.title,current_url:null==(t=null==r?void 0:r.location)?void 0:t.href,user_agent:null!=(t=null==r?void 0:r.navigator)&&t.userAgent&&200<(null==(t=null==(t=null==r?void 0:r.navigator)?void 0:t.userAgent)?void 0:t.length)?r.navigator.userAgent.substring(0,200):null==(t=null==r?void 0:r.navigator)?void 0:t.userAgent,locale:null==(t=null==r?void 0:r.navigator)?void 0:t.language,hostname:e.hostname,pathname:e.pathname,screen_width:null==(t=null==r?void 0:r.screen)?void 0:t.width,screen_height:null==(e=null==r?void 0:r.screen)?void 0:e.height,viewport_width:null==r?void 0:r.innerWidth,viewport_height:null==r?void 0:r.innerHeight,viewport:`${null==r?void 0:r.innerWidth}x`+(null==r?void 0:r.innerHeight),timestamp:Date.now(),timezone:(0,a._getSafeTimezone)(),timezone_offset:(0,a._getSafeTimezoneOffset)()},s()))}function s(){var e=(0,a._getSafeNetworkInformation)(),t={};return void 0!==(null==e?void 0:e.effectiveType)&&(t.effective_connection_type=e.effectiveType),void 0!==(null==e?void 0:e.rtt)&&(t.rtt_ms=e.rtt),void 0!==(null==e?void 0:e.downlink)&&(t.downlink_mbps=e.downlink,t.downlink_kbps=1e3*e.downlink),void 0!==(null==e?void 0:e.saveData)&&(t.save_data=e.saveData),t}function l(e){e=(null==e?void 0:e.referrer)||"";if(!e)return{referrer:null,referrer_domain:null,referrer_path:null,searchEngine:"",searchQuery:""};try{var t=new URL(e);const n=t.hostname;var r=["google","bing","yahoo","duckduckgo","baidu"].find(e=>n.includes(e+"."))||"",s=t.searchParams.get("yahoo"===r?"p":"q")||"";return{referrer:e,referrer_domain:t.hostname,referrer_path:t.pathname,searchEngine:r,searchQuery:s}}catch(e){return{referrer:null,referrer_domain:null,referrer_path:null,searchEngine:"",searchQuery:""}}}function u(e){const r=e.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(e=>{var t=r.get(e);t&&(s[e]=t)}),s}t._gatherCommonMetadata=i,t._gatherAllMetadata=function(e){var t=(0,o._getDocumentSafe)(),r=(0,o._getWindowSafe)();if(!t||!r)return{};var r=l(t),t=i(e),s=u(e);const n={};return e.searchParams.forEach((e,t)=>{n[t]=e}),Object.assign(Object.assign({},t),(0,a._stripEmptyValues)(Object.assign(Object.assign(Object.assign({},r),s),n)))},t._getNetworkInfo=s,t._getPossibleFirstTouchMetadata=function(e){var t=(0,o._getDocumentSafe)(),r=(0,o._getWindowSafe)();if(!t||!r)return{};var s,n,r=l(t),t=u(e),e=(0,a._stripEmptyValues)(Object.assign(Object.assign({},r),t)),i={};for([s,n]of Object.entries(e))i["$s_"+s]=n;return i}},5980:(E,O)=>{"use strict";Object.defineProperty(O,Symbol.toStringTag,{value:"Module"});var x,M=Object.defineProperty,a=(e,t,r)=>{return r=r,(t="symbol"!=typeof t?t+"":t)in(e=e)?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},R=Object.defineProperty,A=(e,t,r)=>{return r=r,(t="symbol"!=typeof t?t+"":t)in(e=e)?R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},q=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(q||{});const T={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},D={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},N={};function F(e){if(N[e])return N[e];var t=globalThis[e];const r=t.prototype;var s=e in T?T[e]:void 0,s=Boolean(s&&s.every(e=>{return Boolean(null==(e=null==(e=Object.getOwnPropertyDescriptor(r,e))?void 0:e.get)?void 0:e.toString().includes("[native code]"))})),n=e in D?D[e]:void 0,n=Boolean(n&&n.every(e=>{return"function"==typeof r[e]&&(null==(e=r[e])?void 0:e.toString().includes("[native code]"))}));if(s&&n)return N[e]=t.prototype,t.prototype;try{var i,o=document.createElement("iframe"),a=(document.body.appendChild(o),o.contentWindow);return a?(i=a[e].prototype,document.body.removeChild(o),i?N[e]=i:r):t.prototype}catch{return r}}const j={};function U(e,t,r){var s=e+"."+String(r);return j[s]?j[s].call(t):(e=F(e),(e=null==(e=Object.getOwnPropertyDescriptor(e,r))?void 0:e.get)?(j[s]=e).call(t):t[r])}const B={};function z(e,t,r){var s=e+"."+String(r);return B[s]?B[s].bind(t):"function"!=typeof(e=F(e)[r])?t[r]:(B[s]=e).bind(t)}const Z={childNodes:function(e){return U("Node",e,"childNodes")},parentNode:function(e){return U("Node",e,"parentNode")},parentElement:function(e){return U("Node",e,"parentElement")},textContent:function(e){return U("Node",e,"textContent")},contains:function(e,t){return z("Node",e,"contains")(t)},getRootNode:function(e){return z("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?U("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?U("Element",e,"shadowRoot"):null},querySelector:function(e,t){return U("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return U("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return F("MutationObserver").constructor}};function V(e){return e.nodeType===e.ELEMENT_NODE}function W(e){var t=e&&"host"in e&&"mode"in e&&Z.host(e)||null;return Boolean(t&&"shadowRoot"in t&&Z.shadowRoot(t)===e)}function G(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function se(t){try{var e,r=t.rules||t.cssRules;return r?(e=Array.from(r,e=>K(e,t.href)).join(""),s=(s=e).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(e){return null}var s}function K(r,t){if("styleSheet"in r){let t;try{t=se(r.styleSheet)||((s=(e=r).cssText).split('"').length<3?s:(s=["@import",`url(${JSON.stringify(e.href)})`],""===e.layerName?s.push("layer"):e.layerName&&s.push(`layer(${e.layerName})`),e.supportsText&&s.push(`supports(${e.supportsText})`),e.media.length&&s.push(e.media.mediaText),s.join(" ")+";"))}catch(e){t=r.cssText}return r.styleSheet.href?he(t,r.styleSheet.href):t}{let e=r.cssText;return"selectorText"in r&&r.selectorText.includes(":")&&(e=e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),t?he(e,t):e}var e,s}class ne{constructor(){A(this,"idNodeMap",new Map),A(this,"nodeMetaMap",new WeakMap)}getId(e){return e?(null==(e=this.getMeta(e))?void 0:e.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){var t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){var r=this.getNode(e);r&&(r=this.nodeMetaMap.get(r))&&this.nodeMetaMap.set(t,r),this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function ie({element:e,maskInputOptions:t,tagName:r,type:s,value:n,maskInputFn:i}){let o=n||"";n=s&&oe(s);return o=t[r.toLowerCase()]||n&&t[n]?i?i(o,e):"*".repeat(o.length):o}function oe(e){return e.toLowerCase()}const ae="__rrweb_original__";function le(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?oe(t):null}function Y(e,t){let r;try{r=new URL(e,t??window.location.href)}catch(e){return null}e=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==e?void 0:e[1])??null}const J=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,H=/^(?:[a-z+]+:)?\/\//i,ue=/^www\..*/i,ce=/^(data:)([^,]*),(.*)/i;function he(e,l){return(e||"").replace(J,(e,t,r,s,n,i)=>{r=r||n||i,n=t||s||"";if(!r)return e;if(H.test(r)||ue.test(r))return`url(${n}${r}${n})`;if(ce.test(r))return`url(${n}${r}${n})`;if("/"===r[0])return`url(${n}${function(e){let t="";return t=(t=-1<e.indexOf("//")?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}(l)+r}${n})`;var o=l.split("/"),i=r.split("/");o.pop();for(const a of i)"."!==a&&(".."===a?o.pop():o.push(a));return`url(${n}${o.join("/")}${n})`})}let de=1;const pe=new RegExp("[^a-z0-9-_:]"),ge=-2;function fe(){return de++}let me,ve;const ye=/^[^ \t\n\r\u000c]+/,_e=/^[, \t\n\r\u000c]+/;function be(s,n){if(""===n.trim())return n;let i=0;function e(e){var e=e.exec(n.substring(i));return e?(e=e[0],i+=e.length,e):""}for(var o=[];e(_e),!(i>=n.length);){let r=e(ye);if(","===r.slice(-1))r=we(s,r.substring(0,r.length-1)),o.push(r);else{let e="",t=(r=we(s,r),!1);for(;;){var a=n.charAt(i);if(""===a){o.push((r+e).trim());break}if(t)")"===a&&(t=!1);else{if(","===a){i+=1,o.push((r+e).trim());break}"("===a&&(t=!0)}e+=a,i+=1}}}return o.join(", ")}const Se=new WeakMap;function we(e,t){return t&&""!==t.trim()?Ce(e,t):t}function Ce(e,t){let r=Se.get(e);if(r||(r=e.createElement("a"),Se.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function ke(e,t,r,s){return s&&("src"!==r&&("href"!==r||"use"===t&&"#"===s[0])&&("xlink:href"!==r||"#"===s[0])&&("background"!==r||"table"!==t&&"td"!==t&&"th"!==t)?"srcset"===r?be(e,s):"style"===r?he(s,Ce(e)):"object"===t&&"data"===r?we(e,s):s:we(e,s))}function Ie(e,t){return("video"===e||"audio"===e)&&"autoplay"===t}function Ee(t,r,e){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!e&&Ee(Z.parentNode(t),r,e);for(let e=t.classList.length;e--;){var s=t.classList[e];if(r.test(s))return!0}return!!e&&Ee(Z.parentNode(t),r,e)}function Oe(e,t,r,s){let n;if(V(e)){if(n=e,!Z.childNodes(n).length)return!1}else{if(null===Z.parentElement(e))return!1;n=Z.parentElement(e)}try{if("string"==typeof t){if(s){if(n.closest("."+t))return!0}else if(n.classList.contains(t))return!0}else if(Ee(n,t,s))return!0;if(r)if(s){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(e){}return!1}function xe(r,e){var t,s,n,i,{doc:o,mirror:e,blockClass:a,blockSelector:l,needsMask:N,inlineStylesheet:F,maskInputOptions:j={},maskTextFn:U,maskInputFn:B,dataURLOptions:z={},inlineImages:V,recordCanvas:W,keepIframeSrcFn:G,newlyAddedElement:K=!1}=e,u=(t=o,!(e=e).hasNode(t)||1===(e=e.getId(t))?void 0:e);switch(r.nodeType){case r.DOCUMENT_NODE:return"CSS1Compat"!==r.compatMode?{type:q.Document,childNodes:[],compatMode:r.compatMode}:{type:q.Document,childNodes:[]};case r.DOCUMENT_TYPE_NODE:return{type:q.DocumentType,name:r.name,publicId:r.publicId,systemId:r.systemId,rootId:u};case r.ELEMENT_NODE:{var c=r;var h={doc:o,blockClass:a,blockSelector:l,inlineStylesheet:F,maskInputOptions:j,maskInputFn:B,dataURLOptions:z,inlineImages:V,recordCanvas:W,keepIframeSrcFn:G,newlyAddedElement:K,rootId:u};const{doc:y,blockClass:_,blockSelector:b,inlineStylesheet:S,maskInputOptions:w={},maskInputFn:C,dataURLOptions:k={},inlineImages:I,recordCanvas:E,keepIframeSrcFn:O,newlyAddedElement:x=!1,rootId:M}=h,R=function(t,r,e){try{if("string"==typeof r){if(t.classList.contains(r))return!0}else for(let e=t.classList.length;e--;){var s=t.classList[e];if(r.test(s))return!0}if(e)return t.matches(e)}catch(e){}return!1}(c,_,b),A=function(e){return e instanceof HTMLFormElement?"form":(e=oe(e.tagName),pe.test(e)?"div":e)}(c);let t={};var Y=c.attributes.length;for(let e=0;e<Y;e++){var d=c.attributes[e];Ie(A,d.name,d.value)||(t[d.name]=ke(y,A,oe(d.name),d.value))}if("link"===A&&S){h=Array.from(y.styleSheets).find(e=>e.href===c.href);let e=null;(e=h?se(h):e)&&(delete t.rel,delete t.href,t._cssText=e)}"style"===A&&c.sheet&&!(c.innerText||Z.textContent(c)||"").trim().length&&(h=se(c.sheet))&&(t._cssText=h);"input"!==A&&"textarea"!==A&&"select"!==A||(h=c.value,s=c.checked,"radio"!==t.type&&"checkbox"!==t.type&&"submit"!==t.type&&"button"!==t.type&&h?t.value=ie({element:c,type:le(c),tagName:A,value:h,maskInputOptions:w,maskInputFn:C}):s&&(t.checked=s));"option"===A&&(c.selected&&!w.select?t.selected=!0:delete t.selected);"dialog"===A&&c.open&&(t.rr_open_mode=c.matches("dialog:modal")?"modal":"non-modal");"canvas"===A&&E&&("2d"===c.__context?function(r){var s=r.getContext("2d");if(s)for(let t=0;t<r.width;t+=50)for(let e=0;e<r.height;e+=50){var n=s.getImageData,n=ae in n?n[ae]:n;if(new Uint32Array(n.call(s,t,e,Math.min(50,r.width-t),Math.min(50,r.height-e)).data.buffer).some(e=>0!==e))return}return 1}(c)||(t.rr_dataURL=c.toDataURL(k.type,k.quality)):"__context"in c||(h=c.toDataURL(k.type,k.quality),(s=y.createElement("canvas")).width=c.width,s.height=c.height,n=s.toDataURL(k.type,k.quality),h!==n&&(t.rr_dataURL=h)));if("img"===A&&I){me||(me=y.createElement("canvas"),ve=me.getContext("2d"));const T=c,D=T.currentSrc||T.getAttribute("src")||"<unknown-src>",L=T.crossOrigin,P=()=>{T.removeEventListener("load",P);try{me.width=T.naturalWidth,me.height=T.naturalHeight,ve.drawImage(T,0,0),t.rr_dataURL=me.toDataURL(k.type,k.quality)}catch(e){if("anonymous"!==T.crossOrigin)return T.crossOrigin="anonymous",void(T.complete&&0!==T.naturalWidth?P():T.addEventListener("load",P));console.warn(`Cannot inline img src=${D}! Error: `+e)}"anonymous"===T.crossOrigin&&(L?t.crossOrigin=L:T.removeAttribute("crossorigin"))};T.complete&&0!==T.naturalWidth?P():T.addEventListener("load",P)}"audio"!==A&&"video"!==A||((n=t).rr_mediaState=c.paused?"paused":"played",n.rr_mediaCurrentTime=c.currentTime,n.rr_mediaPlaybackRate=c.playbackRate,n.rr_mediaMuted=c.muted,n.rr_mediaLoop=c.loop,n.rr_mediaVolume=c.volume);x||(c.scrollLeft&&(t.rr_scrollLeft=c.scrollLeft),c.scrollTop&&(t.rr_scrollTop=c.scrollTop));R&&({width:h,height:p}=c.getBoundingClientRect(),t={class:t.class,rr_width:h+"px",rr_height:p+"px"});"iframe"!==A||O(t.src)||(c.contentDocument||(t.rr_src=t.src),delete t.src);let e;try{customElements.get(A)&&(e=!0)}catch(e){}return{type:q.Element,tagName:A,attributes:t,childNodes:[],isSVG:function(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}(c)||void 0,needBlock:R,rootId:M,isCustom:e};return}case r.TEXT_NODE:{h=r;var p={doc:o,needsMask:N,maskTextFn:U,rootId:u};var{needsMask:J,maskTextFn:g,rootId:H}=p,f=Z.parentNode(h),m=f&&f.tagName;let e=Z.textContent(h);var v="STYLE"===m||void 0,m="SCRIPT"===m||void 0;if(v&&e){try{h.nextSibling||h.previousSibling||null!=(i=f.sheet)&&i.cssRules&&(e=se(f.sheet))}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: "+e,h)}e=he(e,Ce(p.doc))}m&&(e="SCRIPT_PLACEHOLDER");!v&&!m&&e&&J&&(e=g?g(e,Z.parentElement(h)):e.replace(/[\S]/g,"*"));return{type:q.Text,textContent:e||"",isStyle:v,rootId:H};return}case r.CDATA_SECTION_NODE:return{type:q.CDATA,textContent:"",rootId:u};case r.COMMENT_NODE:return{type:q.Comment,textContent:Z.textContent(r)||"",rootId:u};default:return!1}}function L(e){return null==e?"":e.toLowerCase()}function Me(t,e){const{doc:r,mirror:s,blockClass:n,blockSelector:i,maskTextClass:o,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:d,slimDOMOptions:p,dataURLOptions:g={},inlineImages:f=!1,recordCanvas:m=!1,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:_=5e3,onStylesheetLoad:b,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:w=()=>!1,newlyAddedElement:C=!1}=e;let k=e["needsMask"],{preserveWhiteSpace:I=!0}=e;k||(e=void 0===k,k=Oe(t,o,a,e));e=xe(t,{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:k,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:d,dataURLOptions:g,inlineImages:f,recordCanvas:m,keepIframeSrcFn:w,newlyAddedElement:C});if(!e)return console.warn(t,"not serialized"),null;let E;E=s.hasNode(t)?s.getId(t):!function(e,t){if(t.comment&&e.type===q.Comment)return 1;if(e.type===q.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===Y(e.attributes.href)))return 1;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(L(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===L(e.attributes.name)||"icon"===L(e.attributes.rel)||"apple-touch-icon"===L(e.attributes.rel)||"shortcut icon"===L(e.attributes.rel))))return 1;if("meta"===e.tagName){if(t.headMetaDescKeywords&&L(e.attributes.name).match(/^description|keywords$/))return 1;if(t.headMetaSocial&&(L(e.attributes.property).match(/^(og|twitter|fb):/)||L(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===L(e.attributes.name)))return 1;if(t.headMetaRobots&&("robots"===L(e.attributes.name)||"googlebot"===L(e.attributes.name)||"bingbot"===L(e.attributes.name)))return 1;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return 1;if(t.headMetaAuthorship&&("author"===L(e.attributes.name)||"generator"===L(e.attributes.name)||"framework"===L(e.attributes.name)||"publisher"===L(e.attributes.name)||"progid"===L(e.attributes.name)||L(e.attributes.property).match(/^article:/)||L(e.attributes.property).match(/^product:/)))return 1;if(t.headMetaVerification&&("google-site-verification"===L(e.attributes.name)||"yandex-verification"===L(e.attributes.name)||"csrf-token"===L(e.attributes.name)||"p:domain_verify"===L(e.attributes.name)||"verify-v1"===L(e.attributes.name)||"verification"===L(e.attributes.name)||"shopify-checkout-api-token"===L(e.attributes.name)))return 1}}}(e,p)&&(I||e.type!==q.Text||e.isStyle||e.textContent.replace(/^\s+|\s+$/gm,"").length)?de++:ge;var O=Object.assign(e,{id:E});if(s.add(t,O),E===ge)return null;v&&v(t);let x=!l;if(O.type===q.Element&&(x=x&&!O.needBlock,delete O.needBlock,e=Z.shadowRoot(t))&&G(e)&&(O.isShadowHost=!0),(O.type===q.Document||O.type===q.Element)&&x){p.headWhitespace&&O.type===q.Element&&"head"===O.tagName&&(I=!1);var M={doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:k,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:d,slimDOMOptions:p,dataURLOptions:g,inlineImages:f,recordCanvas:m,preserveWhiteSpace:I,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:_,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:w};if(O.type!==q.Element||"textarea"!==O.tagName||void 0===O.attributes.value)for(const T of Array.from(Z.childNodes(t))){var R=Me(T,M);R&&O.childNodes.push(R)}let e=null;if(V(t)&&(e=Z.shadowRoot(t)))for(const D of Array.from(Z.childNodes(e))){var A=Me(D,M);A&&(G(e)&&(A.isShadow=!0),O.childNodes.push(A))}}e=Z.parentNode(t);return e&&W(e)&&G(e)&&(O.isShadow=!0),O.type===q.Element&&"iframe"===O.tagName&&function(r,s,n){var i=r.contentWindow;if(i){let e=!1,t;try{t=i.document.readyState}catch(e){return}if("complete"!==t){const o=setTimeout(()=>{e||(s(),e=!0)},n);void r.addEventListener("load",()=>{clearTimeout(o),e=!0,s()})}else{n="about:blank";if(i.location.href!==n||r.src===n||""===r.src)return setTimeout(s,0),r.addEventListener("load",s);r.addEventListener("load",s)}}}(t,()=>{var e=t.contentDocument;e&&y&&(e=Me(e,{doc:e,mirror:s,blockClass:n,blockSelector:i,needsMask:k,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:d,slimDOMOptions:p,dataURLOptions:g,inlineImages:f,recordCanvas:m,preserveWhiteSpace:I,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:_,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:w}))&&y(t,e)},_),O.type===q.Element&&"link"===O.tagName&&"string"==typeof O.attributes.rel&&("stylesheet"===O.attributes.rel||"preload"===O.attributes.rel&&"string"==typeof O.attributes.href&&"css"===Y(O.attributes.href))&&function(e,t,r){let s=!1,n;try{n=e.sheet}catch(e){return}if(!n){const i=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(i),s=!0,t()})}}(t,()=>{var e;b&&(e=Me(t,{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:k,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:d,slimDOMOptions:p,dataURLOptions:g,inlineImages:f,recordCanvas:m,preserveWhiteSpace:I,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:_,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:w}))&&b(t,e)},S),O}function Re(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ae(r){var t,s;return r.__esModule?r:("function"==typeof(t=r.default)?(s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)}).prototype=t.prototype:s={},Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(r).forEach(function(e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(s,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}),s)}function Te(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}}var e={exports:{}},t=String,e=(e.exports=Te(),e.exports.createColors=Te,e.exports),r=Ae(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let De=e,Le=r;var e=class No extends Error{constructor(e,t,r,s,n,i){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),s&&(this.source=s),i&&(this.plugin=i),void 0!==t&&void 0!==r&&("number"==typeof t?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,No)}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(e){if(!this.source)return"";let t=this.source;null==e&&(e=De.isColorSupported);var r=(t=Le&&e?Le(t):t).split(/\r?\n/);let s=Math.max(this.line-3,0);var n=Math.min(this.line+2,r.length);let i=String(n).length,o,a;if(e){let{bold:t,gray:r,red:s}=De.createColors(!0);o=e=>t(s(e)),a=e=>r(e)}else o=a=e=>e;return r.slice(s,n).map((e,t)=>{var t=s+1+t,r=" "+(" "+t).slice(-i)+" | ";return t===this.line?(t=a(r.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," "),o(">")+a(r)+e+"\n "+t+o("^")):" "+a(r)+e}).join("\n")}toString(){let e=this.showSourceCode();return e=e&&"\n\n"+e+"\n",this.name+": "+this.message+e}},s=e,e=(e.default=e,{});e.isClean=Symbol("isClean"),e.my=Symbol("my");const Pe={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var n=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name;var s=e.params?this.rawValue(e,"params"):"";void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes?this.block(e,r+s):(t=(e.raws.between||"")+(t?";":""),this.builder(r+s+t,e))}beforeAfter(e,t){let r,s=(r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose"),e.parent),n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){var i=this.raw(e,null,"indent");if(i.length)for(let e=0;e<n;e++)r+=i}return r}block(e,t){var r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let s;(s=e.nodes&&e.nodes.length?(this.body(e),this.raw(e,"after")):this.raw(e,"after","emptyBody"))&&this.builder(s),this.builder("}",e,"end")}body(t){let r=t.nodes.length-1;for(;0<r&&"comment"===t.nodes[r].type;)--r;var s=this.raw(t,"semicolon");for(let e=0;e<t.nodes.length;e++){var n=t.nodes[e],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,r!==e||s)}}comment(e){var t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){var r=this.raw(e,"between","colon");let s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r=r||t,!t||void 0===(s=e.raws[t])){var n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Pe[r];n=e.root();if(n.rawCache||(n.rawCache={}),void 0!==n.rawCache[r])return n.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);var i="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[i]?s=this[i](n,e):n.walk(e=>{if(void 0!==(s=e.raws[t]))return!1}),void 0===s&&(s=Pe[r]),n.rawCache[r]=s}return s}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&0<e.nodes.length&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t=t&&t.replace(/\S/g,"")}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),r=void 0===r?this.raw(t,null,"beforeDecl"):r&&r.replace(/\S/g,"")}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),r=void 0===r?this.raw(t,null,"beforeRule"):r&&r.replace(/\S/g,"")}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}rawBeforeRule(t){let r;return t.walk(e=>{if(e.nodes&&(e.parent!==t||t.first!==e)&&void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),r=r&&r.replace(/\S/g,"")}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}rawIndent(r){if(r.raws.indent)return r.raws.indent;let s;return r.walk(e=>{var t=e.parent;if(t&&t!==r&&t.parent&&t.parent===r&&void 0!==e.raws.before)return t=e.raws.before.split("\n"),s=(s=t[t.length-1]).replace(/\S/g,""),!1}),s}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}rawValue(e,t){var r=e[t],e=e.raws[t];return e&&e.value===r?e.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},i=n;n.default=n;let Ne=i;function Fe(e,t){new Ne(t).stringify(e)}n=Fe;Fe.default=Fe;let{isClean:je,my:Ue}=e,Be=s,ze=i,Ve=n;function We(t,r){let s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&"proxyCache"!==n){let e=t[n];var i=typeof e;"parent"===n&&"object"==i?r&&(s[n]=r):"source"===n?s[n]=e:Array.isArray(e)?s[n]=e.map(e=>We(e,s)):("object"==i&&null!==e&&(e=We(e)),s[n]=e)}return s}var i=class{constructor(e={}){for(var t in this.raws={},this[je]=!1,this[Ue]=!0,e)if("nodes"===t){this.nodes=[];for(var r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){var t;return e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)&&(t=this.source,e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)),e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(var t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){var t,r=We(this);for(t in e)r[t]=e[t];return r}cloneAfter(e={}){e=this.clone(e);return this.parent.insertAfter(this,e),e}cloneBefore(e={}){e=this.clone(e);return this.parent.insertBefore(this,e),e}error(e,t={}){var r,s;return this.source?({end:r,start:s}=this.rangeBy(t),this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)):new Be(e)}getProxyProcessor(){return{get(e,t){return"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]!==r&&(e[t]=r,"prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0}}}markDirty(){if(this[je]){this[je]=!1;let e=this;for(;e=e.parent;)e[je]=!1}}next(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;return e.index?r=this.positionInside(e.index,t):e.word&&-1!==(e=(t=this.toString()).indexOf(e.word))&&(r=this.positionInside(e,t)),r}positionInside(t,e){var r=e||this.toString();let s=this.source.start.column,n=this.source.start.line;for(let e=0;e<t;e++)"\n"===r[e]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};var s,n;return e.word?-1!==(n=(s=this.toString()).indexOf(e.word))&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s)):(e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1))),{end:r=r.line<t.line||r.line===t.line&&r.column<=t.column?{column:t.column+1,line:t.line}:r,start:t}}raw(e,t){return(new ze).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...r){if(this.parent){let e=this,t=!1;for(var s of r)s===this?t=!0:t?(this.parent.insertAfter(e,s),e=s):this.parent.insertBefore(e,s);t||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){var r,s={},n=null==t;t=t||new Map;let i=0;for(r in this)if(Object.prototype.hasOwnProperty.call(this,r)&&"parent"!==r&&"proxyCache"!==r){var o=this[r];if(Array.isArray(o))s[r]=o.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof o&&o.toJSON)s[r]=o.toJSON(null,t);else if("source"===r){let e=t.get(o.input);null==e&&(e=i,t.set(o.input,i),i++),s[r]={end:o.end,inputId:e,start:o.start}}else s[r]=o}return n&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Ve){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){var s,n={node:this};for(s in r)n[s]=r[s];return e.warn(t,n)}get proxyOf(){return this}},o=i,i=(i.default=i,o),i=class extends i{constructor(e){super(e=e&&void 0!==e.value&&"string"!=typeof e.value?{...e,value:String(e.value)}:e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}},l=i;i.default=i;i={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(s,n=21)=>(e=n)=>{let t="",r=e;for(;r--;)t+=s[Math.random()*s.length|0];return t}};let{SourceMapConsumer:Ge,SourceMapGenerator:Ke}=r,{existsSync:Ye,readFileSync:Je}=r,{dirname:He,join:qe}=r;var u=class{constructor(e,t){!1!==t.map&&(this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:"),e=t.map?t.map.prev:void 0,e=this.loadMap(t.from,e),!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=He(this.mapFile)),e)&&(this.text=e)}consumer(){return this.consumerCache||(this.consumerCache=new Ge(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+t)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){var t,r=e.match(/\/\*\s*# sourceMappingURL=/gm);r&&(r=e.lastIndexOf(r.pop()),t=e.indexOf("*/",r),-1<r)&&-1<t&&(this.annotation=this.getAnnotationURL(e.substring(r,t)))}loadFile(e){if(this.root=He(e),Ye(e))return this.mapFile=e,Je(e,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof Ge)return Ke.fromSourceMap(e).toString();if(e instanceof Ke)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}e=e(t);if(e){var r=this.loadFile(e);if(r)return r;throw new Error("Unable to load previous source map: "+e.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;return t&&(e=qe(He(t),e)),this.loadFile(e)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}},c=u,{SourceMapConsumer:u,SourceMapGenerator:h}=(u.default=u,r);let{fileURLToPath:Ze,pathToFileURL:$e}=r,{isAbsolute:Xe,resolve:Qe}=r,et=i["nanoid"];i=r;let tt=s,rt=c,st=Symbol("fromOffsetCache"),nt=Boolean(u&&h),it=Boolean(Qe&&Xe);u=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!it||/^\w+:\/\//.test(t.from)||Xe(t.from)?this.file=t.from:this.file=Qe(t.from)),it&&nt&&(e=new rt(this.css,t)).text&&(t=(this.map=e).consumer().file,!this.file)&&t&&(this.file=this.mapResolve(t)),this.file||(this.id="<input css "+et(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,i,o;t&&"object"==typeof t?(a=r,r="number"==typeof(l=t).offset?(t=(u=this.fromOffset(l.offset)).line,u.col):(t=l.line,l.column),o="number"==typeof a.offset?(u=this.fromOffset(a.offset),i=u.line,u.col):(i=a.line,a.column)):r||(t=(l=this.fromOffset(t)).line,r=l.col);var a,l,u=this.origin(t,r,i,o);return(n=u?new tt(e,void 0===u.endLine?u.line:{column:u.column,line:u.line},void 0===u.endLine?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,s.plugin):new tt(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:o,line:i},this.css,this.file,s.plugin)).input={column:r,endColumn:o,endLine:i,line:t,source:this.css},this.file&&($e&&(n.input.url=$e(this.file).toString()),n.input.file=this.file),n}fromOffset(t){let s;if(this[st])s=this[st];else{var n=this.css.split("\n");s=new Array(n.length);let r=0;for(let e=0,t=n.length;e<t;e++)s[e]=r,r+=n[e].length+1;this[st]=s}let r=0;if(s[s.length-1]<=t)r=s.length-1;else{let e=s.length-2;for(var i;r<e;)if(i=r+(e-r>>1),t<s[i])e=i-1;else{if(!(t>=s[i+1])){r=i;break}r=i+1}}return{col:t-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Qe(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;var n=this.map.consumer(),t=n.originalPositionFor({column:t,line:e});if(!t.source)return!1;let i;"number"==typeof r&&(i=n.originalPositionFor({column:s,line:r}));let o;o=Xe(t.source)?$e(t.source):new URL(t.source,this.map.consumer().sourceRoot||$e(this.map.mapFile));e={column:t.column,endColumn:i&&i.column,endLine:i&&i.line,line:t.line,url:o.toString()};if("file:"===o.protocol){if(!Ze)throw new Error("file: protocol is not available in this PostCSS build");e.file=Ze(o)}s=n.sourceContentFor(t.source);return s&&(e.source=s),e}toJSON(){var e,t={};for(e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map={...this.map},t.map.consumerCache)&&(t.map.consumerCache=void 0),t}get from(){return this.file||this.id}},h=u;u.default=u,i&&i.registerInput&&i.registerInput(u);let{SourceMapConsumer:ot,SourceMapGenerator:at}=r,{dirname:lt,relative:ut,resolve:ct,sep:ht}=r,dt=r["pathToFileURL"],pt=h,gt=Boolean(ot&&at),ft=Boolean(lt&&ct&&ut&&ht);i=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,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 e,t=(e=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")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(var t of this.previous()){var r=this.toUrl(this.path(t.file)),s=t.root||lt(t.file);let e;!1===this.mapOpts.sourcesContent?(e=new ot(t.text)).sourcesContent&&(e.sourcesContent=null):e=t.consumer(),this.map.applySourceMap(e,r,this.toUrl(this.path(s)))}}clearAnnotation(){var t;if(!1!==this.mapOpts.annotation)if(this.root)for(let e=this.root.nodes.length-1;0<=e;e--)"comment"===(t=this.root.nodes[e]).type&&0===t.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(e);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),ft&>&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){var e;return this.root?this.generateString():1===this.previous().length?((e=this.previous()[0].consumer()).file=this.outputFile(),this.map=at.fromSourceMap(e,{ignoreInvalidMapping:!0})):(this.map=new at({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 at({file:this.outputFile(),ignoreInvalidMapping:!0});let s=1,n=1,i="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""},a,l;this.stringify(this.root,(e,t,r)=>{this.css+=e,t&&"end"!==r&&(o.generated.line=s,o.generated.column=n-1,t.source&&t.source.start?(o.source=this.sourcePath(t),o.original.line=t.source.start.line,o.original.column=t.source.start.column-1):(o.source=i,o.original.line=1,o.original.column=0),this.map.addMapping(o)),(a=e.match(/\n/g))?(s+=a.length,l=e.lastIndexOf("\n"),n=e.length-l):n+=e.length,t&&"start"!==r&&(e=t.parent||{raws:{}},"decl"!==t.type&&("atrule"!==t.type||t.nodes)||t!==e.last||e.raws.semicolon)&&(t.source&&t.source.end?(o.source=this.sourcePath(t),o.original.line=t.source.end.line,o.original.column=t.source.end.column-1,o.generated.line=s,o.generated.column=n-2):(o.source=i,o.original.line=1,o.original.column=0,o.generated.line=s,o.generated.column=n-1),this.map.addMapping(o))})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){var e;return void 0!==this.mapOpts.inline?this.mapOpts.inline:(void 0===(e=this.mapOpts.annotation)||!0===e)&&(!this.previous().length||this.previous().some(e=>e.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(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?lt(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=lt(ct(r,this.mapOpts.annotation)));t=ut(r,e);return this.memoizedPaths.set(e,t),t}previous(){var e;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(e=>{e.source&&e.source.input.map&&(e=e.source.input.map,this.previousMaps.includes(e)||this.previousMaps.push(e))}):(e=new pt(this.originalCSS,this.opts)).map&&this.previousMaps.push(e.map)),this.previousMaps}setSourcesContent(){let r={};var e;this.root?this.root.walk(e=>{var t;e.source&&(t=e.source.input.from)&&!r[t]&&(r[t]=!0,t=this.usesFileUrls?this.toFileUrl(t):this.toUrl(this.path(t)),this.map.setSourceContent(t,e.source.input.css))}):this.css&&(e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(e,this.css))}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(dt)return t=dt(e).toString(),this.memoizedFileURLs.set(e,t),t;throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===ht&&(e=e.replace(/\\/g,"/"));t=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,t),t}},u=class extends o{constructor(e){super(e),this.type="comment"}},r=u;u.default=u;let{isClean:mt,my:vt}=e,yt=l,_t=r,bt,St,wt,Ct;let kt=class Fo extends o{append(...e){for(var t of e){var r;for(r of this.normalize(t,this.last))this.proxyOf.nodes.push(r)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(var t of this.nodes)t.cleanRaws(e)}each(r){if(this.proxyOf.nodes){var s=this.getIterator();let e,t;for(;this.indexes[s]<this.proxyOf.nodes.length&&(e=this.indexes[s],!1!==(t=r(this.proxyOf.nodes[e],e)));)this.indexes[s]+=1;return delete this.indexes[s],t}}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(t,s){return"proxyOf"===s?t:t[s]&&("each"===s||"string"==typeof s&&s.startsWith("walk")?(...e)=>t[s](...e.map(r=>"function"==typeof r?(e,t)=>r(e.toProxy(),t):r)):"every"===s||"some"===s?r=>t[s]((e,...t)=>r(e.toProxy(),...t)):"root"===s?()=>t.root().toProxy():"nodes"===s?t.nodes.map(e=>e.toProxy()):"first"===s||"last"===s?t[s].toProxy():t[s])},set(e,t,r){return e[t]!==r&&(e[t]=r,"name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0}}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){var r,s,n,i=this.index(e),o=this.normalize(t,this.proxyOf.nodes[i]).reverse(),i=this.index(e);for(r of o)this.proxyOf.nodes.splice(i+1,0,r);for(n in this.indexes)i<(s=this.indexes[n])&&(this.indexes[n]=s+o.length);return this.markDirty(),this}insertBefore(e,t){var r,s,n,i=this.index(e),o=this.normalize(t,this.proxyOf.nodes[i],0===i&&"prepend").reverse(),i=this.index(e);for(r of o)this.proxyOf.nodes.splice(i,0,r);for(n in this.indexes)i<=(s=this.indexes[n])&&(this.indexes[n]=s+o.length);return this.markDirty(),this}normalize(e,t){if("string"==typeof e)e=function t(e){return e.map(e=>(e.nodes&&(e.nodes=t(e.nodes)),delete e.source,e))}(bt(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e))for(var r of e=e.slice(0))r.parent&&r.parent.removeChild(r,"ignore");else if("root"===e.type&&"document"!==this.type)for(var s of e=e.nodes.slice(0))s.parent&&s.parent.removeChild(s,"ignore");else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new yt(e)]}else if(e.selector)e=[new St(e)];else if(e.name)e=[new wt(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new _t(e)]}return e.map(e=>(e[vt]||Fo.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[mt]&&function e(t){if(t[mt]=!1,t.proxyOf.nodes)for(var r of t.proxyOf.nodes)e(r)}(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){for(var t of e=e.reverse()){var r,s,n=this.normalize(t,this.first,"prepend").reverse();for(r of n)this.proxyOf.nodes.unshift(r);for(s in this.indexes)this.indexes[s]=this.indexes[s]+n.length}return this.markDirty(),this}push(e){return(e.parent=this).proxyOf.nodes.push(e),this}removeAll(){for(var e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){var t,r;for(r in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)e<=(t=this.indexes[r])&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(t,r,s){return s||(s=r,r={}),this.walkDecls(e=>{r.props&&!r.props.includes(e.prop)||r.fast&&!e.value.includes(r.fast)||(e.value=e.value.replace(t,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(s){return this.each((t,e)=>{let r;try{r=s(t,e)}catch(e){throw t.addToError(e)}return r=!1!==r&&t.walk?t.walk(s):r})}walkAtRules(r,s){return s?r instanceof RegExp?this.walk((e,t)=>{if("atrule"===e.type&&r.test(e.name))return s(e,t)}):this.walk((e,t)=>{if("atrule"===e.type&&e.name===r)return s(e,t)}):(s=r,this.walk((e,t)=>{if("atrule"===e.type)return s(e,t)}))}walkComments(r){return this.walk((e,t)=>{if("comment"===e.type)return r(e,t)})}walkDecls(r,s){return s?r instanceof RegExp?this.walk((e,t)=>{if("decl"===e.type&&r.test(e.prop))return s(e,t)}):this.walk((e,t)=>{if("decl"===e.type&&e.prop===r)return s(e,t)}):(s=r,this.walk((e,t)=>{if("decl"===e.type)return s(e,t)}))}walkRules(r,s){return s?r instanceof RegExp?this.walk((e,t)=>{if("rule"===e.type&&r.test(e.selector))return s(e,t)}):this.walk((e,t)=>{if("rule"===e.type&&e.selector===r)return s(e,t)}):(s=r,this.walk((e,t)=>{if("rule"===e.type)return s(e,t)}))}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]}};kt.registerParse=e=>{bt=e},kt.registerRule=e=>{St=e},kt.registerAtRule=e=>{wt=e},kt.registerRoot=e=>{Ct=e};var u=kt,d=((kt.default=kt).rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,wt.prototype):"rule"===e.type?Object.setPrototypeOf(e,St.prototype):"decl"===e.type?Object.setPrototypeOf(e,yt.prototype):"comment"===e.type?Object.setPrototypeOf(e,_t.prototype):"root"===e.type&&Object.setPrototypeOf(e,Ct.prototype),e[vt]=!0,e.nodes&&e.nodes.forEach(e=>{kt.rebuild(e)})},u);let It,Et;var d=class extends d{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new It(new Et,this,e).stringify()}},p=(d.registerLazyResult=e=>{It=e},d.registerProcessor=e=>{Et=e},d);d.default=d;var d=class{constructor(e,t={}){for(var r in this.type="warning",this.text=e,t.node&&t.node.source&&(e=t.node.rangeBy(t),this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column),t)this[r]=t[r]}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}},g=d;d.default=d;let Ot=g;var d=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);e=new Ot(e,t);return this.messages.push(e),e}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}},f=d;d.default=d;const xt="'".charCodeAt(0),Mt='"'.charCodeAt(0),Rt="\\".charCodeAt(0),At="/".charCodeAt(0),Tt="\n".charCodeAt(0),Dt=" ".charCodeAt(0),Lt="\f".charCodeAt(0),Pt="\t".charCodeAt(0),Nt="\r".charCodeAt(0),Ft="[".charCodeAt(0),jt="]".charCodeAt(0),Ut="(".charCodeAt(0),Bt=")".charCodeAt(0),zt="{".charCodeAt(0),Vt="}".charCodeAt(0),Wt=";".charCodeAt(0),Gt="*".charCodeAt(0),Kt=":".charCodeAt(0),Yt="@".charCodeAt(0),Jt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ht=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,qt=/.[\r\n"'(/\\]/,Zt=/[\da-f]/i;var d=class extends u{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},m=d,d=(u.registerAtRule(d.default=d),u);let $t,Xt;var v=class extends d{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){e=super.normalize(e);if(t)if("prepend"===r)1<this.nodes.length?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(var s of e)s.raws.before=t.raws.before;return e}removeChild(e,t){var r=this.index(e);return!t&&0===r&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new $t(new Xt,this,e).stringify()}},y=(v.registerLazyResult=e=>{$t=e},v.registerProcessor=e=>{Xt=e},v);d.registerRoot(v.default=v);let Qt={comma(e){return Qt.split(e,[","],!0)},space(e){return Qt.split(e,[" ","\n","\t"])},split(e,t,r){var s,n=[];let i="",o=!1,a=0,l=!1,u="",c=!1;for(s of e)c?c=!1:"\\"===s?c=!0:l?s===u&&(l=!1):'"'===s||"'"===s?(l=!0,u=s):"("===s?a+=1:")"===s?0<a&&--a:0===a&&t.includes(s)&&(o=!0),o?(""!==i&&n.push(i.trim()),i="",o=!1):i+=s;return!r&&""===i||n.push(i.trim()),n}};d=Qt;Qt.default=Qt;let er=d;var v=class extends u{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return er.comma(this.selector)}set selectors(e){var t=this.selector?this.selector.match(/,\s*/):null,t=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(t)}},_=v;u.registerRule(v.default=v);let tr=l,rr=function(t,e={}){let s=t.css.valueOf(),n=e.ignoreErrors,i,o,a,l,u,c,h,d,p,g,f=s.length,m=0,v=[],y=[];function _(e){throw t.error("Unclosed "+e,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(!(m>=f)){var t=!!e&&e.ignoreUnclosed;switch(i=s.charCodeAt(m)){case Tt:case Dt:case Pt:case Nt:case Lt:for(o=m;o+=1,(i=s.charCodeAt(o))===Dt||i===Tt||i===Pt||i===Nt||i===Lt;);g=["space",s.slice(m,o)],m=o-1;break;case Ft:case jt:case zt:case Vt:case Kt:case Wt:case Bt:var r=String.fromCharCode(i);g=[r,r,m];break;case Ut:if(d=v.length?v.pop()[1]:"",p=s.charCodeAt(m+1),"url"===d&&p!==xt&&p!==Mt&&p!==Dt&&p!==Tt&&p!==Pt&&p!==Lt&&p!==Nt){o=m;do{if(c=!1,-1===(o=s.indexOf(")",o+1))){if(n||t){o=m;break}_("bracket")}for(h=o;s.charCodeAt(h-1)===Rt;)--h,c=!c}while(c);g=["brackets",s.slice(m,o+1),m,o],m=o}else o=s.indexOf(")",m+1),l=s.slice(m,o+1),-1===o||qt.test(l)?g=["(","(",m]:(g=["brackets",l,m,o],m=o);break;case xt:case Mt:a=i===xt?"'":'"',o=m;do{if(c=!1,-1===(o=s.indexOf(a,o+1))){if(n||t){o=m+1;break}_("string")}for(h=o;s.charCodeAt(h-1)===Rt;)--h,c=!c}while(c);g=["string",s.slice(m,o+1),m,o],m=o;break;case Yt:Jt.lastIndex=m+1,Jt.test(s),o=0===Jt.lastIndex?s.length-1:Jt.lastIndex-2,g=["at-word",s.slice(m,o+1),m,o],m=o;break;case Rt:for(o=m,u=!0;s.charCodeAt(o+1)===Rt;)o+=1,u=!u;if(i=s.charCodeAt(o+1),u&&i!==At&&i!==Dt&&i!==Tt&&i!==Pt&&i!==Nt&&i!==Lt&&(o+=1,Zt.test(s.charAt(o)))){for(;Zt.test(s.charAt(o+1));)o+=1;s.charCodeAt(o+1)===Dt&&(o+=1)}g=["word",s.slice(m,o+1),m,o],m=o;break;default:m=(i===At&&s.charCodeAt(m+1)===Gt?(0===(o=s.indexOf("*/",m+2)+1)&&(n||t?o=s.length:_("comment")),g=["comment",s.slice(m,o+1),m,o]):(Ht.lastIndex=m+1,Ht.test(s),o=0===Ht.lastIndex?s.length-1:Ht.lastIndex-2,g=["word",s.slice(m,o+1),m,o],v.push(g)),o)}return m++,g}},position:function(){return m}}},sr=r,nr=m,ir=y,or=_;const ar={empty:!0,space:!0};let lr=class{constructor(e){this.input=e,this.root=new ir,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){var t,r=new nr;r.name=e[1].slice(1),""===r.name&&this.unnamedAtrule(r,e),this.init(r,e[2]);let s,n,i=!1,o=!1;for(var a=[],l=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&0<l.length?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){r.source.end=this.getPosition(e[2]),r.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(0<a.length){for(n=a.length-1,s=a[n];s&&"space"===s[0];)s=a[--n];s&&(r.source.end=this.getPosition(s[3]||s[2]),r.source.end.offset++)}this.end(e);break}}if(a.push(e),this.tokenizer.endOfFile()){i=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(r.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(r,"params",a),i&&(e=a[a.length-1],r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),o&&(r.nodes=[],this.current=r)}checkMissedSemicolon(s){var n=this.colon(s);if(!1!==n){let t=0,r;for(let e=n-1;0<=e&&("space"===(r=s[e])[0]||2!==(t+=1));e--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(e){let t=0,r,s,n;for(var[i,o]of e.entries()){if("("===(s=(r=o)[0])&&(t+=1),")"===s&&--t,0===t&&":"===s){if(n){if("word"===n[0]&&"progid"===n[1])continue;return i}this.doubleColon(r)}n=r}return!1}comment(e){var t=new sr,e=(this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,e[1].slice(2,-2));/^\s*$/.test(e)?(t.text="",t.raws.left=e,t.raws.right=""):(e=e.match(/^(\s*)([^]*\S)(\s*)$/),t.text=e[2],t.raws.left=e[1],t.raws.right=e[3])}createTokenizer(){this.tokenizer=rr(this.input)}decl(e,t){var r,s=new tr,n=(this.init(s,e[0][2]),e[e.length-1]);for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(t){for(let e=t.length-1;0<=e;e--){var r=t[e],r=r[3]||r[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){var i=e[0][0];if(":"===i||"space"===i||"comment"===i)break;s.prop+=e.shift()[1]}s.raws.between="";let o;for(;e.length;){if(":"===(o=e.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(;e.length&&("space"===(r=e[0][0])||"comment"===r);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let r=e.length-1;0<=r;r--){if("!important"===(o=e[r])[1].toLowerCase()){s.important=!0;var l=this.stringFrom(e,r);" !important"!==(l=this.spacesFromEnd(e)+l)&&(s.raws.important=l);break}if("important"===o[1].toLowerCase()){var u=e.slice(0);let t="";for(let e=r;0<e;e--){var c=u[e][0];if(0===t.trim().indexOf("!")&&"space"!==c)break;t=u.pop()[1]+t}0===t.trim().indexOf("!")&&(s.important=!0,s.raws.important=t,e=u)}if("space"!==o[0]&&"comment"!==o[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(s,"value",a.concat(e),t),s.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){var t=new or;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){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(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}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(e){this.spaces+=e[1],this.current.nodes&&(e=this.current.nodes[this.current.nodes.length-1])&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}getPosition(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1;var r;let s=!1,n=null;var i=[],o=e[1].startsWith("--"),a=[];let l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n=n||l,i.push("("===r?")":"]");else if(o&&s&&"{"===r)n=n||l,i.push("}");else if(0===i.length){if(";"===r){if(s)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length)&&(n=null);l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),0<i.length&&this.unclosedBracket(n),t&&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 e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){var n,i,o,a,l=r.length;let u="",c=!0;for(let e=0;e<l;e+=1)"space"===(o=(n=r[e])[0])&&e===l-1&&!s||"comment"===o&&(o=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",ar[o]||ar[i]||","===u.slice(-1))?c=!1:u+=n[1];c||(a=r.reduce((e,t)=>e+t[1],""),e.raws[t]={raw:a,value:u}),e[t]=u}rule(e){e.pop();var t=new or;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){var t;let r="";for(;e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){var t;let r="";for(;e.length&&("space"===(t=e[0][0])||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t="";for(;e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}stringFrom(t,r){let s="";for(let e=r;e<t.length;e++)s+=t[e][1];return t.splice(r,t.length-r),s}unclosedBlock(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},ur=h;function cr(e,t){e=new ur(e,t),t=new lr(e);try{t.parse()}catch(e){throw e}return t.root}v=cr;u.registerParse(cr.default=cr);let{isClean:hr,my:dr}=e,pr=i,gr=n,fr=u;e=p;let mr=f,vr=v;var b=y;const yr={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},_r={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},br={Once:!0,postcssPlugin:!0,prepare:!0},Sr=0;function wr(e){return"object"==typeof e&&"function"==typeof e.then}function Cr(e){let t=!1;var r=yr[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,Sr,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,Sr,r+"Exit"]:[r,r+"Exit"]}function kr(e){let t;return{eventIndex:0,events:t="document"===e.type?["Document",Sr,"DocumentExit"]:"root"===e.type?["Root",Sr,"RootExit"]:Cr(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function Ir(e){return e[hr]=!1,e.nodes&&e.nodes.forEach(e=>Ir(e)),e}let Er={};var S=class jo{constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if("object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof jo||t instanceof mr)s=Ir(t.root),t.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let e=vr;r.syntax&&(e=r.syntax.parse),(e=r.parser?r.parser:e).parse&&(e=e.parse);try{s=e(t,r)}catch(e){this.processed=!0,this.error=e}s&&!s[dr]&&fr.rebuild(s)}else s=Ir(t);this.result=new mr(e,s,r),this.helpers={...Er,postcss:Er,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){var r=this.result.lastPlugin;try{t&&t.addToError(e),"CssSyntaxError"!==(this.error=e).name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};var e,t=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(e of this.plugins)if("object"==typeof e)for(var r in e){if(!_r[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!br[r])if("object"==typeof e[r])for(var s in e[r])"*"===s?t(e,r,e[r][s]):t(e,r+"-"+s.toLowerCase(),e[r][s]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=0<Object.keys(this.listeners).length}async runAsync(){for(let e=this.plugin=0;e<this.plugins.length;e++){var t=this.plugins[e],t=this.runOnRoot(t);if(wr(t))try{await t}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){for(var r,s=this.result.root;!s[hr];){s[hr]=!0;for(var n=[kr(s)];0<n.length;){var i=this.visitTick(n);if(wr(i))try{await i}catch(e){i=n[n.length-1].node;throw this.handleError(e,i)}}}if(this.listeners.OnceExit)for(let[e,t]of this.listeners.OnceExit){this.result.lastPlugin=e;try{"document"===s.type?(r=s.nodes.map(e=>t(e,this.helpers)),await Promise.all(r)):await t(s,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{var e;return"object"==typeof t&&t.Once?"document"===this.result.root.type?wr((e=this.result.root.nodes.map(e=>t.Once(e,this.helpers)))[0])?Promise.all(e):e:t.Once(this.result.root,this.helpers):"function"==typeof t?t(this.result.root,this.result):void 0}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(!this.stringified){this.stringified=!0,this.sync();var t=this.result.opts;let e=gr;t.syntax&&(e=t.syntax.stringify),(e=t.stringifier?t.stringifier:e).stringify&&(e=e.stringify);t=new pr(e,this.result.root,this.result.opts).generate();this.result.css=t[0],this.result.map=t[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 e of this.plugins)if(wr(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var t=this.result.root;!t[hr];)t[hr]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(var r of t.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,t)}}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(var[r,s]of e){this.result.lastPlugin=r;let e;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(wr(e))throw this.getAsyncError()}}visitTick(e){var t=e[e.length-1],{node:r,visitors:s}=t;if("root"===r.type||"document"===r.type||r.parent){if(0<s.length&&t.visitorIndex<s.length){var[n,i]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return i(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){for(var o,a=t.iterator;o=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!o[hr])return o[hr]=!0,void e.push(kr(o));t.iterator=0,delete r.indexes[a]}for(var l=t.events;t.eventIndex<l.length;){var u=l[t.eventIndex];if(t.eventIndex+=1,u===Sr)return void(r.nodes&&r.nodes.length&&(r[hr]=!0,t.iterator=r.getIterator()));if(this.listeners[u])return void(t.visitors=this.listeners[u])}}e.pop()}walkSync(e){var t;e[hr]=!0;for(t of Cr(e))if(t===Sr)e.nodes&&e.each(e=>{e[hr]||this.walkSync(e)});else{var r=this.listeners[t];if(r&&this.visitSync(r,e.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"}},Or=(S.registerPostcss=e=>{Er=e},S);b.registerLazyResult(S.default=S),e.registerLazyResult(S);let xr=i,Mr=n;let Rr=v;const Ar=f;b=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;e=Mr;this.result=new Ar(this._processor,void 0,this._opts),this.result.css=t;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});r=new xr(e,void 0,this._opts,t);r.isMap()?([e,t]=r.generate(),e&&(this.result.css=e),t&&(this.result.map=t)):(r.clearAnnotation(),this.result.css=r.css)}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}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._root)return this._root;let e;var t=Rr;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e}get[Symbol.toStringTag](){return"NoWorkResult"}},e=b;b.default=b;let Tr=e,Dr=Or;S=p,i=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(var r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return new(this.plugins.length||t.parser||t.stringifier||t.syntax?Dr:Tr)(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},b=i;y.registerProcessor(i.default=i),S.registerProcessor(i);let Lr=l,Pr=c,Nr=r,Fr=m,jr=h,Ur=y,Br=_;function zr(e,r){if(Array.isArray(e))return e.map(e=>zr(e));let{inputs:t,...s}=e;if(t){r=[];for(var n of t){n={...n,__proto__:jr.prototype};n.map&&(n.map={...n.map,__proto__:Pr.prototype}),r.push(n)}}if(s.nodes&&(s.nodes=e.nodes.map(e=>zr(e,r))),s.source){let{inputId:e,...t}=s.source;s.source=t,null!=e&&(s.source.input=r[e])}if("root"===s.type)return new Ur(s);if("decl"===s.type)return new Lr(s);if("rule"===s.type)return new Br(s);if("comment"===s.type)return new Nr(s);if("atrule"===s.type)return new Fr(s);throw new Error("Unknown node type: "+e.type)}e=zr,zr.default=zr,S=s;let Vr=l;i=Or,c=u;let Wr=b;s=n,l=e;let Gr=p;Or=g;let Kr=r,Yr=m;u=f,b=h,n=v,e=d;let Jr=_,Hr=y;p=o;function w(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Wr(e)}w.plugin=function(t,r){let s=!1;function n(...e){console&&console.warn&&!s&&(s=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");e=r(...e);return e.postcssPlugin=t,e.postcssVersion=(new Wr).version,e}let e;return Object.defineProperty(n,"postcss",{get(){return e=e||n()}}),n.process=function(e,t,r){return w([n(r)]).process(e,t)},n},w.stringify=s,w.parse=n,w.fromJSON=l,w.list=e,w.comment=e=>new Kr(e),w.atRule=e=>new Yr(e),w.decl=e=>new Vr(e),w.rule=e=>new Jr(e),w.root=e=>new Hr(e),w.document=e=>new Gr(e),w.CssSyntaxError=S,w.Declaration=Vr,w.Container=c,w.Processor=Wr,w.Document=Gr,w.Comment=Kr,w.Warning=Or,w.AtRule=Yr,w.Result=u,w.Input=b,w.Rule=Jr,w.Root=Hr,w.Node=p,i.registerPostcss(w);g=w,w.default=w,r=Re(g);r.stringify,r.fromJSON,r.plugin,r.parse,r.list,r.document,r.comment,r.atRule,r.rule,r.decl,r.root,r.CssSyntaxError,r.Declaration,r.Container,r.Processor,r.Document,r.Comment,r.Warning,r.AtRule,r.Result,r.Input,r.Rule,r.Root,r.Node,Object.defineProperty;function qr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Zr(r){var t,s;return r.__esModule?r:("function"==typeof(t=r.default)?(s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)}).prototype=t.prototype:s={},Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(r).forEach(function(e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(s,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}),s)}function $r(){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,f=(m.exports=$r(),m.exports.createColors=$r,m.exports),h=Zr(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Xr=f,Qr=h;v=class Uo extends Error{constructor(e,t,r,s,n,i){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),s&&(this.source=s),i&&(this.plugin=i),void 0!==t&&void 0!==r&&("number"==typeof t?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.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(e){if(!this.source)return"";let t=this.source;null==e&&(e=Xr.isColorSupported);var r=(t=Qr&&e?Qr(t):t).split(/\r?\n/);let s=Math.max(this.line-3,0);var n=Math.min(this.line+2,r.length);let i=String(n).length,o,a;if(e){let{bold:t,gray:r,red:s}=Xr.createColors(!0);o=e=>t(s(e)),a=e=>r(e)}else o=a=e=>e;return r.slice(s,n).map((e,t)=>{var t=s+1+t,r=" "+(" "+t).slice(-i)+" | ";return t===this.line?(t=a(r.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," "),o(">")+a(r)+e+"\n "+t+o("^")):" "+a(r)+e}).join("\n")}toString(){let e=this.showSourceCode();return e=e&&"\n\n"+e+"\n",this.name+": "+this.message+e}},d=v,v.default=v,_={};_.isClean=Symbol("isClean"),_.my=Symbol("my");const es={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};y=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name;var s=e.params?this.rawValue(e,"params"):"";void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes?this.block(e,r+s):(t=(e.raws.between||"")+(t?";":""),this.builder(r+s+t,e))}beforeAfter(e,t){let r,s=(r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose"),e.parent),n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){var i=this.raw(e,null,"indent");if(i.length)for(let e=0;e<n;e++)r+=i}return r}block(e,t){var r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let s;(s=e.nodes&&e.nodes.length?(this.body(e),this.raw(e,"after")):this.raw(e,"after","emptyBody"))&&this.builder(s),this.builder("}",e,"end")}body(t){let r=t.nodes.length-1;for(;0<r&&"comment"===t.nodes[r].type;)--r;var s=this.raw(t,"semicolon");for(let e=0;e<t.nodes.length;e++){var n=t.nodes[e],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,r!==e||s)}}comment(e){var t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){var r=this.raw(e,"between","colon");let s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r=r||t,!t||void 0===(s=e.raws[t])){var n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return es[r];n=e.root();if(n.rawCache||(n.rawCache={}),void 0!==n.rawCache[r])return n.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);var i="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[i]?s=this[i](n,e):n.walk(e=>{if(void 0!==(s=e.raws[t]))return!1}),void 0===s&&(s=es[r]),n.rawCache[r]=s}return s}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&0<e.nodes.length&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t=t&&t.replace(/\S/g,"")}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),r=void 0===r?this.raw(t,null,"beforeDecl"):r&&r.replace(/\S/g,"")}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),r=void 0===r?this.raw(t,null,"beforeRule"):r&&r.replace(/\S/g,"")}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}rawBeforeRule(t){let r;return t.walk(e=>{if(e.nodes&&(e.parent!==t||t.first!==e)&&void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),r=r&&r.replace(/\S/g,"")}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}rawIndent(r){if(r.raws.indent)return r.raws.indent;let s;return r.walk(e=>{var t=e.parent;if(t&&t!==r&&t.parent&&t.parent===r&&void 0!==e.raws.before)return t=e.raws.before.split("\n"),s=(s=t[t.length-1]).replace(/\S/g,""),!1}),s}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}rawValue(e,t){var r=e[t],e=e.raws[t];return e&&e.value===r?e.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},o=y;y.default=y;let ts=o;function rs(e,t){new ts(t).stringify(e)}s=rs;rs.default=rs;let{isClean:ss,my:ns}=_,is=d,os=o,as=s;function ls(t,r){let s=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&"proxyCache"!==n){let e=t[n];var i=typeof e;"parent"===n&&"object"==i?r&&(s[n]=r):"source"===n?s[n]=e:Array.isArray(e)?s[n]=e.map(e=>ls(e,s)):("object"==i&&null!==e&&(e=ls(e)),s[n]=e)}return s}n=class{constructor(e={}){for(var t in this.raws={},this[ss]=!1,this[ns]=!0,e)if("nodes"===t){this.nodes=[];for(var r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){var t;return e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)&&(t=this.source,e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)),e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(var t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){var t,r=ls(this);for(t in e)r[t]=e[t];return r}cloneAfter(e={}){e=this.clone(e);return this.parent.insertAfter(this,e),e}cloneBefore(e={}){e=this.clone(e);return this.parent.insertBefore(this,e),e}error(e,t={}){var r,s;return this.source?({end:r,start:s}=this.rangeBy(t),this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)):new is(e)}getProxyProcessor(){return{get(e,t){return"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]!==r&&(e[t]=r,"prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0}}}markDirty(){if(this[ss]){this[ss]=!1;let e=this;for(;e=e.parent;)e[ss]=!1}}next(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;return e.index?r=this.positionInside(e.index,t):e.word&&-1!==(e=(t=this.toString()).indexOf(e.word))&&(r=this.positionInside(e,t)),r}positionInside(t,e){var r=e||this.toString();let s=this.source.start.column,n=this.source.start.line;for(let e=0;e<t;e++)"\n"===r[e]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};var s,n;return e.word?-1!==(n=(s=this.toString()).indexOf(e.word))&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s)):(e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1))),{end:r=r.line<t.line||r.line===t.line&&r.column<=t.column?{column:t.column+1,line:t.line}:r,start:t}}raw(e,t){return(new os).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...r){if(this.parent){let e=this,t=!1;for(var s of r)s===this?t=!0:t?(this.parent.insertAfter(e,s),e=s):this.parent.insertBefore(e,s);t||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){var r,s={},n=null==t;t=t||new Map;let i=0;for(r in this)if(Object.prototype.hasOwnProperty.call(this,r)&&"parent"!==r&&"proxyCache"!==r){var o=this[r];if(Array.isArray(o))s[r]=o.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof o&&o.toJSON)s[r]=o.toJSON(null,t);else if("source"===r){let e=t.get(o.input);null==e&&(e=i,t.set(o.input,i),i++),s[r]={end:o.end,inputId:e,start:o.start}}else s[r]=o}return n&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=as){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){var s,n={node:this};for(s in r)n[s]=r[s];return e.warn(t,n)}get proxyOf(){return this}},l=n,n.default=n,e=l,S=class extends e{constructor(e){super(e=e&&void 0!==e.value&&"string"!=typeof e.value?{...e,value:String(e.value)}:e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}},c=S;S.default=S;Or={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(s,n=21)=>(e=n)=>{let t="",r=e;for(;r--;)t+=s[Math.random()*s.length|0];return t}};let{SourceMapConsumer:us,SourceMapGenerator:cs}=h,{existsSync:hs,readFileSync:ds}=h,{dirname:ps,join:gs}=h;var u=class{constructor(e,t){!1!==t.map&&(this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:"),e=t.map?t.map.prev:void 0,e=this.loadMap(t.from,e),!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=ps(this.mapFile)),e)&&(this.text=e)}consumer(){return this.consumerCache||(this.consumerCache=new us(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+t)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){var t,r=e.match(/\/\*\s*# sourceMappingURL=/gm);r&&(r=e.lastIndexOf(r.pop()),t=e.indexOf("*/",r),-1<r)&&-1<t&&(this.annotation=this.getAnnotationURL(e.substring(r,t)))}loadFile(e){if(this.root=ps(e),hs(e))return this.mapFile=e,ds(e,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof us)return cs.fromSourceMap(e).toString();if(e instanceof cs)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}e=e(t);if(e){var r=this.loadFile(e);if(r)return r;throw new Error("Unable to load previous source map: "+e.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;return t&&(e=gs(ps(t),e)),this.loadFile(e)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}},b=u,{SourceMapConsumer:p,SourceMapGenerator:i}=(u.default=u,h);let{fileURLToPath:fs,pathToFileURL:ms}=h,{isAbsolute:vs,resolve:ys}=h,_s=Or["nanoid"];g=h;let bs=d,Ss=b,ws=Symbol("fromOffsetCache"),Cs=Boolean(p&&i),ks=Boolean(ys&&vs);r=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!ks||/^\w+:\/\//.test(t.from)||vs(t.from)?this.file=t.from:this.file=ys(t.from)),ks&&Cs&&(e=new Ss(this.css,t)).text&&(t=(this.map=e).consumer().file,!this.file)&&t&&(this.file=this.mapResolve(t)),this.file||(this.id="<input css "+_s(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,i,o;t&&"object"==typeof t?(a=r,r="number"==typeof(l=t).offset?(t=(u=this.fromOffset(l.offset)).line,u.col):(t=l.line,l.column),o="number"==typeof a.offset?(u=this.fromOffset(a.offset),i=u.line,u.col):(i=a.line,a.column)):r||(t=(l=this.fromOffset(t)).line,r=l.col);var a,l,u=this.origin(t,r,i,o);return(n=u?new bs(e,void 0===u.endLine?u.line:{column:u.column,line:u.line},void 0===u.endLine?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,s.plugin):new bs(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:o,line:i},this.css,this.file,s.plugin)).input={column:r,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(ms&&(n.input.url=ms(this.file).toString()),n.input.file=this.file),n}fromOffset(t){let s;if(this[ws])s=this[ws];else{var n=this.css.split("\n");s=new Array(n.length);let r=0;for(let e=0,t=n.length;e<t;e++)s[e]=r,r+=n[e].length+1;this[ws]=s}let r=0;if(s[s.length-1]<=t)r=s.length-1;else{let e=s.length-2;for(var i;r<e;)if(i=r+(e-r>>1),t<s[i])e=i-1;else{if(!(t>=s[i+1])){r=i;break}r=i+1}}return{col:t-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ys(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;var n=this.map.consumer(),t=n.originalPositionFor({column:t,line:e});if(!t.source)return!1;let i;"number"==typeof r&&(i=n.originalPositionFor({column:s,line:r}));let o;o=vs(t.source)?ms(t.source):new URL(t.source,this.map.consumer().sourceRoot||ms(this.map.mapFile));e={column:t.column,endColumn:i&&i.column,endLine:i&&i.line,line:t.line,url:o.toString()};if("file:"===o.protocol){if(!fs)throw new Error("file: protocol is not available in this PostCSS build");e.file=fs(o)}s=n.sourceContentFor(t.source);return s&&(e.source=s),e}toJSON(){var e,t={};for(e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map={...this.map},t.map.consumerCache)&&(t.map.consumerCache=void 0),t}get from(){return this.file||this.id}},m=r;r.default=r,g&&g.registerInput&&g.registerInput(r);let{SourceMapConsumer:Is,SourceMapGenerator:Es}=h,{dirname:Os,relative:xs,resolve:Ms,sep:Rs}=h,As=h["pathToFileURL"],Ts=m,Ds=Boolean(Is&&Es),Ls=Boolean(Os&&Ms&&xs&&Rs);f=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,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 e,t=(e=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")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(var t of this.previous()){var r=this.toUrl(this.path(t.file)),s=t.root||Os(t.file);let e;!1===this.mapOpts.sourcesContent?(e=new Is(t.text)).sourcesContent&&(e.sourcesContent=null):e=t.consumer(),this.map.applySourceMap(e,r,this.toUrl(this.path(s)))}}clearAnnotation(){var t;if(!1!==this.mapOpts.annotation)if(this.root)for(let e=this.root.nodes.length-1;0<=e;e--)"comment"===(t=this.root.nodes[e]).type&&0===t.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(e);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Ls&&Ds&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){var e;return this.root?this.generateString():1===this.previous().length?((e=this.previous()[0].consumer()).file=this.outputFile(),this.map=Es.fromSourceMap(e,{ignoreInvalidMapping:!0})):(this.map=new Es({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 Es({file:this.outputFile(),ignoreInvalidMapping:!0});let s=1,n=1,i="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""},a,l;this.stringify(this.root,(e,t,r)=>{this.css+=e,t&&"end"!==r&&(o.generated.line=s,o.generated.column=n-1,t.source&&t.source.start?(o.source=this.sourcePath(t),o.original.line=t.source.start.line,o.original.column=t.source.start.column-1):(o.source=i,o.original.line=1,o.original.column=0),this.map.addMapping(o)),(a=e.match(/\n/g))?(s+=a.length,l=e.lastIndexOf("\n"),n=e.length-l):n+=e.length,t&&"start"!==r&&(e=t.parent||{raws:{}},"decl"!==t.type&&("atrule"!==t.type||t.nodes)||t!==e.last||e.raws.semicolon)&&(t.source&&t.source.end?(o.source=this.sourcePath(t),o.original.line=t.source.end.line,o.original.column=t.source.end.column-1,o.generated.line=s,o.generated.column=n-2):(o.source=i,o.original.line=1,o.original.column=0,o.generated.line=s,o.generated.column=n-1),this.map.addMapping(o))})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){var e;return void 0!==this.mapOpts.inline?this.mapOpts.inline:(void 0===(e=this.mapOpts.annotation)||!0===e)&&(!this.previous().length||this.previous().some(e=>e.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(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Os(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Os(Ms(r,this.mapOpts.annotation)));t=xs(r,e);return this.memoizedPaths.set(e,t),t}previous(){var e;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(e=>{e.source&&e.source.input.map&&(e=e.source.input.map,this.previousMaps.includes(e)||this.previousMaps.push(e))}):(e=new Ts(this.originalCSS,this.opts)).map&&this.previousMaps.push(e.map)),this.previousMaps}setSourcesContent(){let r={};var e;this.root?this.root.walk(e=>{var t;e.source&&(t=e.source.input.from)&&!r[t]&&(r[t]=!0,t=this.usesFileUrls?this.toFileUrl(t):this.toUrl(this.path(t)),this.map.setSourceContent(t,e.source.input.css))}):this.css&&(e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(e,this.css))}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(As)return t=As(e).toString(),this.memoizedFileURLs.set(e,t),t;throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===Rs&&(e=e.replace(/\\/g,"/"));t=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,t),t}},v=class extends l{constructor(e){super(e),this.type="comment"}},y=v;v.default=v;let{isClean:Ps,my:Ns}=_,Fs=c,js=y,Us,Bs,zs,Vs;let Ws=class Bo extends l{append(...e){for(var t of e){var r;for(r of this.normalize(t,this.last))this.proxyOf.nodes.push(r)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(var t of this.nodes)t.cleanRaws(e)}each(r){if(this.proxyOf.nodes){var s=this.getIterator();let e,t;for(;this.indexes[s]<this.proxyOf.nodes.length&&(e=this.indexes[s],!1!==(t=r(this.proxyOf.nodes[e],e)));)this.indexes[s]+=1;return delete this.indexes[s],t}}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(t,s){return"proxyOf"===s?t:t[s]&&("each"===s||"string"==typeof s&&s.startsWith("walk")?(...e)=>t[s](...e.map(r=>"function"==typeof r?(e,t)=>r(e.toProxy(),t):r)):"every"===s||"some"===s?r=>t[s]((e,...t)=>r(e.toProxy(),...t)):"root"===s?()=>t.root().toProxy():"nodes"===s?t.nodes.map(e=>e.toProxy()):"first"===s||"last"===s?t[s].toProxy():t[s])},set(e,t,r){return e[t]!==r&&(e[t]=r,"name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0}}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){var r,s,n,i=this.index(e),o=this.normalize(t,this.proxyOf.nodes[i]).reverse(),i=this.index(e);for(r of o)this.proxyOf.nodes.splice(i+1,0,r);for(n in this.indexes)i<(s=this.indexes[n])&&(this.indexes[n]=s+o.length);return this.markDirty(),this}insertBefore(e,t){var r,s,n,i=this.index(e),o=this.normalize(t,this.proxyOf.nodes[i],0===i&&"prepend").reverse(),i=this.index(e);for(r of o)this.proxyOf.nodes.splice(i,0,r);for(n in this.indexes)i<=(s=this.indexes[n])&&(this.indexes[n]=s+o.length);return this.markDirty(),this}normalize(e,t){if("string"==typeof e)e=function t(e){return e.map(e=>(e.nodes&&(e.nodes=t(e.nodes)),delete e.source,e))}(Us(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e))for(var r of e=e.slice(0))r.parent&&r.parent.removeChild(r,"ignore");else if("root"===e.type&&"document"!==this.type)for(var s of e=e.nodes.slice(0))s.parent&&s.parent.removeChild(s,"ignore");else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new Fs(e)]}else if(e.selector)e=[new Bs(e)];else if(e.name)e=[new zs(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new js(e)]}return e.map(e=>(e[Ns]||Bo.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[Ps]&&function e(t){if(t[Ps]=!1,t.proxyOf.nodes)for(var r of t.proxyOf.nodes)e(r)}(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){for(var t of e=e.reverse()){var r,s,n=this.normalize(t,this.first,"prepend").reverse();for(r of n)this.proxyOf.nodes.unshift(r);for(s in this.indexes)this.indexes[s]=this.indexes[s]+n.length}return this.markDirty(),this}push(e){return(e.parent=this).proxyOf.nodes.push(e),this}removeAll(){for(var e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){var t,r;for(r in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)e<=(t=this.indexes[r])&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(t,r,s){return s||(s=r,r={}),this.walkDecls(e=>{r.props&&!r.props.includes(e.prop)||r.fast&&!e.value.includes(r.fast)||(e.value=e.value.replace(t,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(s){return this.each((t,e)=>{let r;try{r=s(t,e)}catch(e){throw t.addToError(e)}return r=!1!==r&&t.walk?t.walk(s):r})}walkAtRules(r,s){return s?r instanceof RegExp?this.walk((e,t)=>{if("atrule"===e.type&&r.test(e.name))return s(e,t)}):this.walk((e,t)=>{if("atrule"===e.type&&e.name===r)return s(e,t)}):(s=r,this.walk((e,t)=>{if("atrule"===e.type)return s(e,t)}))}walkComments(r){return this.walk((e,t)=>{if("comment"===e.type)return r(e,t)})}walkDecls(r,s){return s?r instanceof RegExp?this.walk((e,t)=>{if("decl"===e.type&&r.test(e.prop))return s(e,t)}):this.walk((e,t)=>{if("decl"===e.type&&e.prop===r)return s(e,t)}):(s=r,this.walk((e,t)=>{if("decl"===e.type)return s(e,t)}))}walkRules(r,s){return s?r instanceof RegExp?this.walk((e,t)=>{if("rule"===e.type&&r.test(e.selector))return s(e,t)}):this.walk((e,t)=>{if("rule"===e.type&&e.selector===r)return s(e,t)}):(s=r,this.walk((e,t)=>{if("rule"===e.type)return s(e,t)}))}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]}};Ws.registerParse=e=>{Us=e},Ws.registerRule=e=>{Bs=e},Ws.registerAtRule=e=>{zs=e},Ws.registerRoot=e=>{Vs=e};o=Ws,(Ws.default=Ws).rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,zs.prototype):"rule"===e.type?Object.setPrototypeOf(e,Bs.prototype):"decl"===e.type?Object.setPrototypeOf(e,Fs.prototype):"comment"===e.type?Object.setPrototypeOf(e,js.prototype):"root"===e.type&&Object.setPrototypeOf(e,Vs.prototype),e[Ns]=!0,e.nodes&&e.nodes.forEach(e=>{Ws.rebuild(e)})},n=o;let Gs,Ks;e=class extends n{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Gs(new Ks,this,e).stringify()}},e.registerLazyResult=e=>{Gs=e},e.registerProcessor=e=>{Ks=e},S=e;e.default=e;u=class{constructor(e,t={}){for(var r in this.type="warning",this.text=e,t.node&&t.node.source&&(e=t.node.rangeBy(t),this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column),t)this[r]=t[r]}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}},Or=u;u.default=u;let Ys=Or;p=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);e=new Ys(e,t);return this.messages.push(e),e}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}},i=p;p.default=p;const Js="'".charCodeAt(0),Hs='"'.charCodeAt(0),qs="\\".charCodeAt(0),Zs="/".charCodeAt(0),$s="\n".charCodeAt(0),Xs=" ".charCodeAt(0),Qs="\f".charCodeAt(0),en="\t".charCodeAt(0),tn="\r".charCodeAt(0),rn="[".charCodeAt(0),sn="]".charCodeAt(0),nn="(".charCodeAt(0),on=")".charCodeAt(0),an="{".charCodeAt(0),ln="}".charCodeAt(0),un=";".charCodeAt(0),cn="*".charCodeAt(0),hn=":".charCodeAt(0),dn="@".charCodeAt(0),pn=/[\t\n\f\r "#'()/;[\\\]{}]/g,gn=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,fn=/.[\r\n"'(/\\]/,mn=/[\da-f]/i;g=class extends o{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},r=g,o.registerAtRule(g.default=g),h=o;let vn,yn;v=class extends h{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){e=super.normalize(e);if(t)if("prepend"===r)1<this.nodes.length?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(var s of e)s.raws.before=t.raws.before;return e}removeChild(e,t){var r=this.index(e);return!t&&0===r&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new vn(new yn,this,e).stringify()}},v.registerLazyResult=e=>{vn=e},v.registerProcessor=e=>{yn=e},n=v;h.registerRoot(v.default=v);let _n={comma(e){return _n.split(e,[","],!0)},space(e){return _n.split(e,[" ","\n","\t"])},split(e,t,r){var s,n=[];let i="",o=!1,a=0,l=!1,u="",c=!1;for(s of e)c?c=!1:"\\"===s?c=!0:l?s===u&&(l=!1):'"'===s||"'"===s?(l=!0,u=s):"("===s?a+=1:")"===s?0<a&&--a:0===a&&t.includes(s)&&(o=!0),o?(""!==i&&n.push(i.trim()),i="",o=!1):i+=s;return!r&&""===i||n.push(i.trim()),n}};e=_n;_n.default=_n;let bn=e;u=class extends o{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return bn.comma(this.selector)}set selectors(e){var t=this.selector?this.selector.match(/,\s*/):null,t=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(t)}},p=u;o.registerRule(u.default=u);let Sn=c,wn=function(t,e={}){let s=t.css.valueOf(),n=e.ignoreErrors,i,o,a,l,u,c,h,d,p,g,f=s.length,m=0,v=[],y=[];function _(e){throw t.error("Unclosed "+e,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(!(m>=f)){var t=!!e&&e.ignoreUnclosed;switch(i=s.charCodeAt(m)){case $s:case Xs:case en:case tn:case Qs:for(o=m;o+=1,(i=s.charCodeAt(o))===Xs||i===$s||i===en||i===tn||i===Qs;);g=["space",s.slice(m,o)],m=o-1;break;case rn:case sn:case an:case ln:case hn:case un:case on:var r=String.fromCharCode(i);g=[r,r,m];break;case nn:if(d=v.length?v.pop()[1]:"",p=s.charCodeAt(m+1),"url"===d&&p!==Js&&p!==Hs&&p!==Xs&&p!==$s&&p!==en&&p!==Qs&&p!==tn){o=m;do{if(c=!1,-1===(o=s.indexOf(")",o+1))){if(n||t){o=m;break}_("bracket")}for(h=o;s.charCodeAt(h-1)===qs;)--h,c=!c}while(c);g=["brackets",s.slice(m,o+1),m,o],m=o}else o=s.indexOf(")",m+1),l=s.slice(m,o+1),-1===o||fn.test(l)?g=["(","(",m]:(g=["brackets",l,m,o],m=o);break;case Js:case Hs:a=i===Js?"'":'"',o=m;do{if(c=!1,-1===(o=s.indexOf(a,o+1))){if(n||t){o=m+1;break}_("string")}for(h=o;s.charCodeAt(h-1)===qs;)--h,c=!c}while(c);g=["string",s.slice(m,o+1),m,o],m=o;break;case dn:pn.lastIndex=m+1,pn.test(s),o=0===pn.lastIndex?s.length-1:pn.lastIndex-2,g=["at-word",s.slice(m,o+1),m,o],m=o;break;case qs:for(o=m,u=!0;s.charCodeAt(o+1)===qs;)o+=1,u=!u;if(i=s.charCodeAt(o+1),u&&i!==Zs&&i!==Xs&&i!==$s&&i!==en&&i!==tn&&i!==Qs&&(o+=1,mn.test(s.charAt(o)))){for(;mn.test(s.charAt(o+1));)o+=1;s.charCodeAt(o+1)===Xs&&(o+=1)}g=["word",s.slice(m,o+1),m,o],m=o;break;default:m=(i===Zs&&s.charCodeAt(m+1)===cn?(0===(o=s.indexOf("*/",m+2)+1)&&(n||t?o=s.length:_("comment")),g=["comment",s.slice(m,o+1),m,o]):(gn.lastIndex=m+1,gn.test(s),o=0===gn.lastIndex?s.length-1:gn.lastIndex-2,g=["word",s.slice(m,o+1),m,o],v.push(g)),o)}return m++,g}},position:function(){return m}}},Cn=y,kn=r,In=n,En=p;const On={empty:!0,space:!0};let xn=class{constructor(e){this.input=e,this.root=new In,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){var t,r=new kn;r.name=e[1].slice(1),""===r.name&&this.unnamedAtrule(r,e),this.init(r,e[2]);let s,n,i=!1,o=!1;for(var a=[],l=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&0<l.length?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){r.source.end=this.getPosition(e[2]),r.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(0<a.length){for(n=a.length-1,s=a[n];s&&"space"===s[0];)s=a[--n];s&&(r.source.end=this.getPosition(s[3]||s[2]),r.source.end.offset++)}this.end(e);break}}if(a.push(e),this.tokenizer.endOfFile()){i=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(r.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(r,"params",a),i&&(e=a[a.length-1],r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),o&&(r.nodes=[],this.current=r)}checkMissedSemicolon(s){var n=this.colon(s);if(!1!==n){let t=0,r;for(let e=n-1;0<=e&&("space"===(r=s[e])[0]||2!==(t+=1));e--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(e){let t=0,r,s,n;for(var[i,o]of e.entries()){if("("===(s=(r=o)[0])&&(t+=1),")"===s&&--t,0===t&&":"===s){if(n){if("word"===n[0]&&"progid"===n[1])continue;return i}this.doubleColon(r)}n=r}return!1}comment(e){var t=new Cn,e=(this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,e[1].slice(2,-2));/^\s*$/.test(e)?(t.text="",t.raws.left=e,t.raws.right=""):(e=e.match(/^(\s*)([^]*\S)(\s*)$/),t.text=e[2],t.raws.left=e[1],t.raws.right=e[3])}createTokenizer(){this.tokenizer=wn(this.input)}decl(e,t){var r,s=new Sn,n=(this.init(s,e[0][2]),e[e.length-1]);for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(t){for(let e=t.length-1;0<=e;e--){var r=t[e],r=r[3]||r[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){var i=e[0][0];if(":"===i||"space"===i||"comment"===i)break;s.prop+=e.shift()[1]}s.raws.between="";let o;for(;e.length;){if(":"===(o=e.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(;e.length&&("space"===(r=e[0][0])||"comment"===r);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let r=e.length-1;0<=r;r--){if("!important"===(o=e[r])[1].toLowerCase()){s.important=!0;var l=this.stringFrom(e,r);" !important"!==(l=this.spacesFromEnd(e)+l)&&(s.raws.important=l);break}if("important"===o[1].toLowerCase()){var u=e.slice(0);let t="";for(let e=r;0<e;e--){var c=u[e][0];if(0===t.trim().indexOf("!")&&"space"!==c)break;t=u.pop()[1]+t}0===t.trim().indexOf("!")&&(s.important=!0,s.raws.important=t,e=u)}if("space"!==o[0]&&"comment"!==o[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(s,"value",a.concat(e),t),s.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){var t=new En;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){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(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}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(e){this.spaces+=e[1],this.current.nodes&&(e=this.current.nodes[this.current.nodes.length-1])&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}getPosition(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1;var r;let s=!1,n=null;var i=[],o=e[1].startsWith("--"),a=[];let l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n=n||l,i.push("("===r?")":"]");else if(o&&s&&"{"===r)n=n||l,i.push("}");else if(0===i.length){if(";"===r){if(s)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length)&&(n=null);l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),0<i.length&&this.unclosedBracket(n),t&&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 e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){var n,i,o,a,l=r.length;let u="",c=!0;for(let e=0;e<l;e+=1)"space"===(o=(n=r[e])[0])&&e===l-1&&!s||"comment"===o&&(o=r[e-1]?r[e-1][0]:"empty",i=r[e+1]?r[e+1][0]:"empty",On[o]||On[i]||","===u.slice(-1))?c=!1:u+=n[1];c||(a=r.reduce((e,t)=>e+t[1],""),e.raws[t]={raw:a,value:u}),e[t]=u}rule(e){e.pop();var t=new En;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){var t;let r="";for(;e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){var t;let r="";for(;e.length&&("space"===(t=e[0][0])||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t="";for(;e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}stringFrom(t,r){let s="";for(let e=r;e<t.length;e++)s+=t[e][1];return t.splice(r,t.length-r),s}unclosedBlock(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Mn=m;function Rn(e,t){e=new Mn(e,t),t=new xn(e);try{t.parse()}catch(e){throw e}return t.root}g=Rn;o.registerParse(Rn.default=Rn);let{isClean:An,my:Tn}=_,Dn=f,Ln=s,Pn=o;h=S;let Nn=i,Fn=g;v=n;const jn={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Un={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},Bn={Once:!0,postcssPlugin:!0,prepare:!0},zn=0;function Vn(e){return"object"==typeof e&&"function"==typeof e.then}function Wn(e){let t=!1;var r=jn[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,zn,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,zn,r+"Exit"]:[r,r+"Exit"]}function Gn(e){let t;return{eventIndex:0,events:t="document"===e.type?["Document",zn,"DocumentExit"]:"root"===e.type?["Root",zn,"RootExit"]:Wn(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function Kn(e){return e[An]=!1,e.nodes&&e.nodes.forEach(e=>Kn(e)),e}let Yn={};u=class zo{constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if("object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof zo||t instanceof Nn)s=Kn(t.root),t.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let e=Fn;r.syntax&&(e=r.syntax.parse),(e=r.parser?r.parser:e).parse&&(e=e.parse);try{s=e(t,r)}catch(e){this.processed=!0,this.error=e}s&&!s[Tn]&&Pn.rebuild(s)}else s=Kn(t);this.result=new Nn(e,s,r),this.helpers={...Yn,postcss:Yn,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){var r=this.result.lastPlugin;try{t&&t.addToError(e),"CssSyntaxError"!==(this.error=e).name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};var e,t=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(e of this.plugins)if("object"==typeof e)for(var r in e){if(!Un[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Bn[r])if("object"==typeof e[r])for(var s in e[r])"*"===s?t(e,r,e[r][s]):t(e,r+"-"+s.toLowerCase(),e[r][s]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=0<Object.keys(this.listeners).length}async runAsync(){for(let e=this.plugin=0;e<this.plugins.length;e++){var t=this.plugins[e],t=this.runOnRoot(t);if(Vn(t))try{await t}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){for(var r,s=this.result.root;!s[An];){s[An]=!0;for(var n=[Gn(s)];0<n.length;){var i=this.visitTick(n);if(Vn(i))try{await i}catch(e){i=n[n.length-1].node;throw this.handleError(e,i)}}}if(this.listeners.OnceExit)for(let[e,t]of this.listeners.OnceExit){this.result.lastPlugin=e;try{"document"===s.type?(r=s.nodes.map(e=>t(e,this.helpers)),await Promise.all(r)):await t(s,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{var e;return"object"==typeof t&&t.Once?"document"===this.result.root.type?Vn((e=this.result.root.nodes.map(e=>t.Once(e,this.helpers)))[0])?Promise.all(e):e:t.Once(this.result.root,this.helpers):"function"==typeof t?t(this.result.root,this.result):void 0}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(!this.stringified){this.stringified=!0,this.sync();var t=this.result.opts;let e=Ln;t.syntax&&(e=t.syntax.stringify),(e=t.stringifier?t.stringifier:e).stringify&&(e=e.stringify);t=new Dn(e,this.result.root,this.result.opts).generate();this.result.css=t[0],this.result.map=t[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 e of this.plugins)if(Vn(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var t=this.result.root;!t[An];)t[An]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(var r of t.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,t)}}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(var[r,s]of e){this.result.lastPlugin=r;let e;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(Vn(e))throw this.getAsyncError()}}visitTick(e){var t=e[e.length-1],{node:r,visitors:s}=t;if("root"===r.type||"document"===r.type||r.parent){if(0<s.length&&t.visitorIndex<s.length){var[n,i]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return i(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){for(var o,a=t.iterator;o=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!o[An])return o[An]=!0,void e.push(Gn(o));t.iterator=0,delete r.indexes[a]}for(var l=t.events;t.eventIndex<l.length;){var u=l[t.eventIndex];if(t.eventIndex+=1,u===zn)return void(r.nodes&&r.nodes.length&&(r[An]=!0,t.iterator=r.getIterator()));if(this.listeners[u])return void(t.visitors=this.listeners[u])}}e.pop()}walkSync(e){var t;e[An]=!0;for(t of Wn(e))if(t===zn)e.nodes&&e.each(e=>{e[An]||this.walkSync(e)});else{var r=this.listeners[t];if(r&&this.visitSync(r,e.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"}},u.registerPostcss=e=>{Yn=e},_=u;v.registerLazyResult(u.default=u),h.registerLazyResult(u);let Jn=f,Hn=s;let qn=g;const Zn=i;v=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;e=Hn;this.result=new Zn(this._processor,void 0,this._opts),this.result.css=t;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});r=new Jn(e,void 0,this._opts,t);r.isMap()?([e,t]=r.generate(),e&&(this.result.css=e),t&&(this.result.map=t)):(r.clearAnnotation(),this.result.css=r.css)}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}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._root)return this._root;let e;var t=qn;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e}get[Symbol.toStringTag](){return"NoWorkResult"}},h=v;v.default=v;let $n=h,Xn=_;u=S,f=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(var r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return new(this.plugins.length||t.parser||t.stringifier||t.syntax?Xn:$n)(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},v=f;n.registerProcessor(f.default=f),u.registerProcessor(f);let Qn=c,ei=b,ti=y,ri=r,si=m,ni=n,ii=p;function oi(e,r){if(Array.isArray(e))return e.map(e=>oi(e));let{inputs:t,...s}=e;if(t){r=[];for(var n of t){n={...n,__proto__:si.prototype};n.map&&(n.map={...n.map,__proto__:ei.prototype}),r.push(n)}}if(s.nodes&&(s.nodes=e.nodes.map(e=>oi(e,r))),s.source){let{inputId:e,...t}=s.source;s.source=t,null!=e&&(s.source.input=r[e])}if("root"===s.type)return new ni(s);if("decl"===s.type)return new Qn(s);if("rule"===s.type)return new ii(s);if("comment"===s.type)return new ti(s);if("atrule"===s.type)return new ri(s);throw new Error("Unknown node type: "+e.type)}h=oi,oi.default=oi,u=d;let ai=c;f=_,b=o;let li=v;d=s,c=h;let ui=S;_=Or;let ci=y,hi=r;o=i,v=m,s=g,h=e;let di=p,pi=n;S=l;function k(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new li(e)}k.plugin=function(t,r){let s=!1;function n(...e){console&&console.warn&&!s&&(s=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");e=r(...e);return e.postcssPlugin=t,e.postcssVersion=(new li).version,e}let e;return Object.defineProperty(n,"postcss",{get(){return e=e||n()}}),n.process=function(e,t,r){return k([n(r)]).process(e,t)},n},k.stringify=d,k.parse=s,k.fromJSON=c,k.list=h,k.comment=e=>new ci(e),k.atRule=e=>new hi(e),k.decl=e=>new ai(e),k.rule=e=>new di(e),k.root=e=>new pi(e),k.document=e=>new ui(e),k.CssSyntaxError=u,k.Declaration=ai,k.Container=b,k.Processor=li,k.Document=ui,k.Comment=ci,k.Warning=_,k.AtRule=hi,k.Result=o,k.Input=v,k.Rule=di,k.Root=pi,k.Node=S,f.registerPostcss(k);Or=k,k.default=k,y=qr(Or);y.stringify,y.fromJSON,y.plugin,y.parse,y.list,y.document,y.comment,y.atRule,y.rule,y.decl,y.root,y.CssSyntaxError,y.Declaration,y.Container,y.Processor,y.Document,y.Comment,y.Warning,y.AtRule,y.Result,y.Input,y.Rule,y.Root,y.Node;const gi={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},fi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},mi={};function vi(e){if(mi[e])return mi[e];var t=globalThis[e];const r=t.prototype;var s=e in gi?gi[e]:void 0,s=Boolean(s&&s.every(e=>{return Boolean(null==(e=null==(e=Object.getOwnPropertyDescriptor(r,e))?void 0:e.get)?void 0:e.toString().includes("[native code]"))})),n=e in fi?fi[e]:void 0,n=Boolean(n&&n.every(e=>{return"function"==typeof r[e]&&(null==(e=r[e])?void 0:e.toString().includes("[native code]"))}));if(s&&n)return mi[e]=t.prototype,t.prototype;try{var i,o=document.createElement("iframe"),a=(document.body.appendChild(o),o.contentWindow);return a?(i=a[e].prototype,document.body.removeChild(o),i?mi[e]=i:r):t.prototype}catch{return r}}const yi={};function _i(e,t,r){var s=e+"."+String(r);return yi[s]?yi[s].call(t):(e=vi(e),(e=null==(e=Object.getOwnPropertyDescriptor(e,r))?void 0:e.get)?(yi[s]=e).call(t):t[r])}const bi={};function Si(e,t,r){var s=e+"."+String(r);return bi[s]?bi[s].bind(t):"function"!=typeof(e=vi(e)[r])?t[r]:(bi[s]=e).bind(t)}function wi(){return vi("MutationObserver").constructor}const $={childNodes:function(e){return _i("Node",e,"childNodes")},parentNode:function(e){return _i("Node",e,"parentNode")},parentElement:function(e){return _i("Node",e,"parentElement")},textContent:function(e){return _i("Node",e,"textContent")},contains:function(e,t){return Si("Node",e,"contains")(t)},getRootNode:function(e){return Si("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?_i("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?_i("Element",e,"shadowRoot"):null},querySelector:function(e,t){return _i("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return _i("Element",e,"querySelectorAll")(t)},mutationObserver:wi};function X(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const Ci="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.";r={map:{},getId(){return console.error(Ci),-1},getNode(){return console.error(Ci),null},removeNodeFromMap(){console.error(Ci)},has(){return console.error(Ci),!1},reset(){console.error(Ci)}};function ki(n,i,o={}){let a=null,l=0;return function(...e){var t=Date.now(),r=(l||!1!==o.leading||(l=t),i-(t-l));const s=this;r<=0||i<r?(a&&(clearTimeout(a),a=null),l=t,n.apply(s,e)):a||!1===o.trailing||(a=setTimeout(()=>{l=!1===o.leading?0:Date.now(),a=null,n.apply(s,e)},r))}}function Ii(e,t,r,s,n=window){const i=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,s?r:{set(e){setTimeout(()=>{r.set.call(this,e)},0),i&&i.set&&i.set.call(this,e)}}),()=>Ii(e,t,i||{},!0)}function Ei(e,t,r){try{if(!(t in e))return()=>{};const n=e[t];var s=r(n);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=s,()=>{e[t]=n}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&new Proxy(r,{get(e,t,r){return"map"===t&&console.error(Ci),Reflect.get(e,t,r)}});let Oi=Date.now;function xi(e){var t,r=e.document;return{left:r.scrollingElement?r.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:r.documentElement.scrollLeft||(null==r?void 0:r.body)&&(null==(t=$.parentElement(r.body))?void 0:t.scrollLeft)||(null==(t=null==r?void 0:r.body)?void 0:t.scrollLeft)||0,top:r.scrollingElement?r.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==r?void 0:r.documentElement.scrollTop)||(null==r?void 0:r.body)&&(null==(t=$.parentElement(r.body))?void 0:t.scrollTop)||(null==(e=null==r?void 0:r.body)?void 0:e.scrollTop)||0}}function Mi(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ri(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ai(e){return e?e.nodeType===e.ELEMENT_NODE?e:$.parentElement(e):null}function P(e,t,r,s){if(e){e=Ai(e);if(e){try{if("string"==typeof t){if(e.classList.contains(t))return!0;if(s&&null!==e.closest("."+t))return!0}else if(Ee(e,t,s))return!0}catch(e){}if(r){if(e.matches(r))return!0;if(s&&null!==e.closest(r))return!0}}}return!1}function Ti(e,t,r){return"TITLE"===e.tagName&&r.headTitleMutations||t.getId(e)===ge}function Di(e){return Boolean(e.changedTouches)}function Li(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Pi(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Ni(e){return e&&(!1&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean($.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Oi=()=>(new Date).getTime());class Fi{constructor(){a(this,"id",1),a(this,"styleIDMap",new WeakMap),a(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function ji(e){var t;let r=null;return r="getRootNode"in e&&(null==(t=$.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&$.host($.getRootNode(e))?$.host($.getRootNode(e)):r}function Ui(e){var t=e.ownerDocument;return!!t&&(e=function(e){let t=e;for(var r;r=ji(t);)t=r;return t}(e),$.contains(t,e))}function Bi(e){var t=e.ownerDocument;return t&&($.contains(t,e)||Ui(e))}var Q=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))({}),ee=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(ee||{}),I=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(I||{}),zi=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(zi||{}),Vi=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))({}),Wi=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Wi||{});function Gi(e){return"__ln"in e}class Ki{constructor(){a(this,"length",0),a(this,"head",null),a(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let e=0;e<t;e++)r=(null==r?void 0:r.next)||null;return r}addNode(e){var t,r={value:e,previous:null,next:null};e.__ln=r,e.previousSibling&&Gi(e.previousSibling)?(t=e.previousSibling.__ln.next,r.next=t,r.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=r,t&&(t.previous=r)):e.nextSibling&&Gi(e.nextSibling)&&e.nextSibling.__ln.previous?(t=e.nextSibling.__ln.previous,r.previous=t,r.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=r,t&&(t.next=r)):(this.head&&(this.head.previous=r),r.next=this.head,this.head=r),null===r.next&&(this.tail=r),this.length++}removeNode(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}class Yi{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",e=>{e.forEach(this.processMutation),this.emit()}),a(this,"emit",()=>{if(!this.frozen&&!this.locked){const l=[],u=new Set,c=new Ki,h=e=>{let t=e,r=ge;for(;r===ge;)t=t&&t.nextSibling,r=t&&this.mirror.getId(t);return r};for(var r,s,n=t=>{var e,r,s=$.parentNode(t);if(s&&Bi(t)&&"TEXTAREA"!==s.tagName)return s=W(s)?this.mirror.getId(ji(t)):this.mirror.getId(s),e=h(t),-1===s||-1===e?c.addNode(t):void((r=Me(t,{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:e=>{Li(e,this.mirror)&&this.iframeManager.addIframe(e),Pi(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Ni(t)&&this.shadowDomManager.addShadowRoot($.shadowRoot(t),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}}))&&(l.push({parentId:s,nextId:e,node:r}),u.add(r.id)))};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const d of this.movedSet)Hi(this.removes,d,this.mirror)&&!this.movedSet.has($.parentNode(d))||n(d);for(const p of this.addedSet)!qi(this.droppedSet,p)&&!Hi(this.removes,p,this.mirror)||qi(this.movedSet,p)?n(p):this.droppedSet.add(p);let e=null;for(;c.length;){let t=null;if(!(t=e&&(r=this.mirror.getId($.parentNode(e.value)),s=h(e.value),-1!==r)&&-1!==s?e:t)){let e=c.tail;for(;e;){var i=e;if(e=e.previous,i){var o=this.mirror.getId($.parentNode(i.value)),a=h(i.value);if(-1!==a){if(-1!==o){t=i;break}a=i.value,o=$.parentNode(a);if(o&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE){a=$.host(o);if(-1!==this.mirror.getId(a)){t=i;break}}}}}}if(!t){for(;c.head;)c.removeNode(c.head.value);break}e=t.previous,c.removeNode(t.value),n(t.value)}var t={texts:this.texts.map(e=>{var t=e.node,r=$.parentNode(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}}).filter(e=>!u.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{var t,r,s=e["attributes"];return"string"==typeof s.style&&(t=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles),t.length<s.style.length)&&(t+r).split("var(").length===s.style.split("var(").length&&(s.style=e.styleDiff),{id:this.mirror.getId(e.node),attributes:s}}).filter(e=>!u.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:l};(t.texts.length||t.attributes.length||t.removes.length||t.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(t))}}),a(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from($.childNodes(e),e=>$.textContent(e)||"").join("")}),a(this,"processMutation",s=>{if(!Ti(s.target,this.mirror,this.slimDOMOptions))switch(s.type){case"characterData":var n=$.textContent(s.target);P(s.target,this.blockClass,this.blockSelector,!1)||n===s.oldValue||this.texts.push({value:Oe(s.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,Ai(s.target)):n.replace(/[\S]/g,"*"):n,node:s.target});break;case"attributes":{var i=s.target;let e=s.attributeName,t=s.target.getAttribute(e);if("value"===e&&(n=le(i),t=ie({element:i,maskInputOptions:this.maskInputOptions,tagName:i.tagName,type:n,value:t,maskInputFn:this.maskInputFn})),P(s.target,this.blockClass,this.blockSelector,!1)||t===s.oldValue)return;let r=this.attributeMap.get(s.target);if("IFRAME"===i.tagName&&"src"===e&&!this.keepIframeSrcFn(t)){if(i.contentDocument)return;e="rr_src"}if(r||(r={node:s.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(s.target,r)),"type"===e&&"INPUT"===i.tagName&&"password"===(s.oldValue||"").toLowerCase()&&i.setAttribute("data-rr-is-password","true"),!Ie(i.tagName,e))if(r.attributes[e]=ke(this.doc,oe(i.tagName),oe(e),t),"style"===e){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}var o=this.unattachedDoc.createElement("span");s.oldValue&&o.setAttribute("style",s.oldValue);for(const u of Array.from(i.style)){var a=i.style.getPropertyValue(u),l=i.style.getPropertyPriority(u);a!==o.style.getPropertyValue(u)||l!==o.style.getPropertyPriority(u)?r.styleDiff[u]=""===l?a:[a,l]:r._unchangedStyles[u]=[a,l]}for(const c of Array.from(o.style))""===i.style.getPropertyValue(c)&&(r.styleDiff[c]=!1)}else"open"===e&&"DIALOG"===i.tagName&&(i.matches("dialog:modal")?r.attributes.rr_open_mode="modal":r.attributes.rr_open_mode="non-modal");break}case"childList":P(s.target,this.blockClass,this.blockSelector,!0)||("TEXTAREA"!==s.target.tagName?(s.addedNodes.forEach(e=>this.genAdds(e,s.target)),s.removedNodes.forEach(e=>{var t=this.mirror.getId(e),r=W(s.target)?this.mirror.getId($.host(s.target)):this.mirror.getId(s.target);P(s.target,this.blockClass,this.blockSelector,!1)||Ti(e,this.mirror,this.slimDOMOptions)||-1===this.mirror.getId(e)||(this.addedSet.has(e)?(Ji(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(s.target)&&-1===t||function e(t,r){var s;return!W(t)&&(s=r.getId(t),!r.has(s)||(!(s=$.parentNode(t))||s.nodeType!==t.DOCUMENT_NODE)&&(!s||e(s,r)))}(s.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[t+"@"+r]?Ji(this.movedSet,e):this.removes.push({parentId:r,id:t,isShadow:!(!W(s.target)||!G(s.target))||void 0})),this.mapRemoves.push(e))})):this.genTextAreaValueMutation(s.target))}}),a(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(Ti(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let e=null;(e=r&&this.mirror.hasNode(r)?this.mirror.getId(r):e)&&-1!==e&&(this.movedMap[this.mirror.getId(t)+"@"+e]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);P(t,this.blockClass,this.blockSelector,!1)||($.childNodes(t).forEach(e=>this.genAdds(e)),Ni(t)&&$.childNodes($.shadowRoot(t)).forEach(e=>{this.processedNodeManager.add(e,this),this.genAdds(e,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(e=>{this[e]=t[e]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Ji(t,e){t.delete(e),$.childNodes(e).forEach(e=>Ji(t,e))}function Hi(t,r,s){if(0!==t.length){var n=t;t=r;var i=s;let e=$.parentNode(t);for(;e;){const o=i.getId(e);if(n.some(e=>e.id===o))return 1;e=$.parentNode(e)}}}function qi(e,t){return 0!==e.size&&function e(t,r){const s=$.parentNode(r);if(!s)return!1;if(t.has(s))return!0;return e(t,s)}(e,t)}let Zi;const te=t=>{return Zi?(...e)=>{try{return t(...e)}catch(e){if(!Zi||!0!==Zi(e))throw e}}:t},$i=[];function Xi(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Qi(e,t){var r=new Yi,e=($i.push(r),r.init(e),new(wi())(te(r.processMutations.bind(r))));return e.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),e}function eo({mouseInteractionCb:o,doc:s,mirror:a,blockClass:l,blockSelector:u,sampling:e}){if(!1===e.mouseInteraction)return()=>{};const t=!0===e.mouseInteraction||void 0===e.mouseInteraction?{}:e.mouseInteraction,n=[];let c=null;return Object.keys(I).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==t[e]).forEach(e=>{let t=oe(e);i=e;var i,r=r=>{var s=Xi(r);if(!P(s,l,u,!0)){let e=null,t=i;if("pointerType"in r){switch(r.pointerType){case"mouse":e=zi.Mouse;break;case"touch":e=zi.Touch;break;case"pen":e=zi.Pen}e===zi.Touch?I[i]===I.MouseDown?t="TouchStart":I[i]===I.MouseUp&&(t="TouchEnd"):(e,zi.Pen)}else Di(r)&&(e=zi.Touch);null!==e?(c=e,(t.startsWith("Touch")&&e===zi.Touch||t.startsWith("Mouse")&&e===zi.Mouse)&&(e=null)):I[i]===I.Click&&(e=c,c=null);var n,r=Di(r)?r.changedTouches[0]:r;r&&(s=a.getId(s),{clientX:r,clientY:n}=r,te(o)({type:I[t],id:s,x:r,y:n,...null!==e&&{pointerType:e}}))}};if(window.PointerEvent)switch(I[e]){case I.MouseDown:case I.MouseUp:t=t.replace("mouse","pointer");break;case I.TouchStart:case I.TouchEnd:return}n.push(X(t,r,s))}),te(()=>{n.forEach(e=>e())})}function to({scrollCb:s,doc:n,mirror:i,blockClass:o,blockSelector:a,sampling:e}){return X("scroll",te(ki(te(e=>{var t,r,e=Xi(e);e&&!P(e,o,a,!0)&&(t=i.getId(e),e===n&&n.defaultView?(r=xi(n.defaultView),s({id:t,x:r.left,y:r.top})):s({id:t,x:e.scrollLeft,y:e.scrollTop}))}),e.scroll||100)),n)}const ro=["INPUT","TEXTAREA","SELECT"],so=new WeakMap;function no(e){var t,r;return e=e,t=[],lo("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||lo("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||lo("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||lo("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule?(r=Array.from(e.parentRule.cssRules).indexOf(e),t.unshift(r)):e.parentStyleSheet&&(r=Array.from(e.parentStyleSheet.cssRules).indexOf(e),t.unshift(r)),t}function io(e,t,r){let s,n;return e?(e.ownerNode?s=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:s}):{}}function oo({mirror:e,stylesheetManager:r},t){let s=null;s="#document"===t.nodeName?e.getId(t):e.getId($.host(t));e="#document"===t.nodeName?null==(e=t.defaultView)?void 0:e.Document:null==(e=null==(e=t.ownerDocument)?void 0:e.defaultView)?void 0:e.ShadowRoot;const n=null!=e&&e.prototype?Object.getOwnPropertyDescriptor(null==e?void 0:e.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&e&&n?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:n.configurable,enumerable:n.enumerable,get(){var e;return null==(e=n.get)?void 0:e.call(this)},set(e){var t=null==(t=n.set)?void 0:t.call(this,e);if(null!==s&&-1!==s)try{r.adoptStyleSheets(e,s)}catch(e){}return t}}),te(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:n.configurable,enumerable:n.enumerable,get:n.get,set:n.set})})):()=>{}}function ao(e,t={}){var n,r=e.doc.defaultView;if(!r)return()=>{};{var s=e,i=t;const{mutationCb:b,mousemoveCb:S,mouseInteractionCb:w,scrollCb:C,viewportResizeCb:k,inputCb:I,mediaInteractionCb:E,styleSheetRuleCb:O,styleDeclarationCb:x,canvasMutationCb:M,fontCb:R,selectionCb:A,customElementCb:T}=s;s.mutationCb=(...e)=>{i.mutation&&i.mutation(...e),b(...e)},s.mousemoveCb=(...e)=>{i.mousemove&&i.mousemove(...e),S(...e)},s.mouseInteractionCb=(...e)=>{i.mouseInteraction&&i.mouseInteraction(...e),w(...e)},s.scrollCb=(...e)=>{i.scroll&&i.scroll(...e),C(...e)},s.viewportResizeCb=(...e)=>{i.viewportResize&&i.viewportResize(...e),k(...e)},s.inputCb=(...e)=>{i.input&&i.input(...e),I(...e)},s.mediaInteractionCb=(...e)=>{i.mediaInteaction&&i.mediaInteaction(...e),E(...e)},s.styleSheetRuleCb=(...e)=>{i.styleSheetRule&&i.styleSheetRule(...e),O(...e)},s.styleDeclarationCb=(...e)=>{i.styleDeclaration&&i.styleDeclaration(...e),x(...e)},s.canvasMutationCb=(...e)=>{i.canvasMutation&&i.canvasMutation(...e),M(...e)},s.fontCb=(...e)=>{i.font&&i.font(...e),R(...e)},s.selectionCb=(...e)=>{i.selection&&i.selection(...e),A(...e)},s.customElementCb=(...e)=>{i.customElement&&i.customElement(...e),T(...e)}}let o;e.recordDOM&&(o=Qi(e,e.doc));const a=function({mousemoveCb:r,sampling:e,doc:t,mirror:n}){if(!1===e.mousemove)return()=>{};var s="number"==typeof e.mousemove?e.mousemove:50,e="number"==typeof e.mousemoveCallback?e.mousemoveCallback:500;let i=[],o;const a=ki(te(e=>{const t=Date.now()-o;r(i.map(e=>(e.timeOffset-=t,e)),e),i=[],o=null}),e),l=[X("mousemove",e=te(ki(te(e=>{var t=Xi(e),{clientX:r,clientY:s}=Di(e)?e.changedTouches[0]:e;o=o||Oi(),i.push({x:r,y:s,id:n.getId(t),timeOffset:Oi()-o}),a("undefined"!=typeof DragEvent&&e instanceof DragEvent?ee.Drag:e instanceof MouseEvent?ee.MouseMove:ee.TouchMove)}),s,{trailing:!1})),t),X("touchmove",e,t),X("drag",e,t)];return te(()=>{l.forEach(e=>e())})}(e),l=eo(e),u=to(e),c=function({viewportResizeCb:r},{win:e}){let s=-1,n=-1;return X("resize",te(ki(te(()=>{var e=Mi(),t=Ri();s===e&&n===t||(r({width:Number(t),height:Number(e)}),s=e,n=t)}),200)),e)}(e,{win:r}),h=function({inputCb:s,doc:o,mirror:n,blockClass:e,blockSelector:r,ignoreClass:a,ignoreSelector:l,maskInputOptions:u,maskInputFn:c,sampling:t,userTriggeredOnInput:h}){function i(t){let s=Xi(t);var t=t.isTrusted,n=s&&s.tagName;if((s=s&&"OPTION"===n?$.parentElement(s):s)&&n&&!(ro.indexOf(n)<0)&&!P(s,e,r,!0)&&!(s.classList.contains(a)||l&&s.matches(l))){let e=s.value,r=!1;var i=le(s)||"",n=("radio"===i||"checkbox"===i?r=s.checked:(u[n.toLowerCase()]||u[i])&&(e=ie({element:s,maskInputOptions:u,tagName:n,type:i,value:e,maskInputFn:c})),d(s,h?{text:e,isChecked:r,userTriggered:t}:{text:e,isChecked:r}),s.name);"radio"===i&&n&&r&&o.querySelectorAll(`input[type="radio"][name="${n}"]`).forEach(e=>{var t;e!==s&&(t=e.value,d(e,h?{text:t,isChecked:!r,userTriggered:!1}:{text:t,isChecked:!r}))})}}function d(e,t){var r=so.get(e);r&&r.text===t.text&&r.isChecked===t.isChecked||(so.set(e,t),r=n.getId(e),te(s)({...t,id:r}))}var p;const g=("last"===t.input?["change"]:["input","change"]).map(e=>X(e,te(i),o)),f=o.defaultView;return f?(t=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),p=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]],t&&t.set&&g.push(...p.map(e=>Ii(e[0],e[1],{set(){te(i)({target:this,isTrusted:!1})}},!1,f))),te(()=>{g.forEach(e=>e())})):()=>{g.forEach(e=>e())}}(e),d=function({mediaInteractionCb:a,blockClass:l,blockSelector:u,mirror:c,sampling:e,doc:t}){var r=te(o=>ki(te(e=>{var t,r,s,n,i,e=Xi(e);e&&!P(e,l,u,!0)&&({currentTime:t,volume:r,muted:s,playbackRate:n,loop:i}=e,a({type:o,id:c.getId(e),currentTime:t,volume:r,muted:s,playbackRate:n,loop:i}))}),e.media||500));const s=[X("play",r(Wi.Play),t),X("pause",r(Wi.Pause),t),X("seeked",r(Wi.Seeked),t),X("volumechange",r(Wi.VolumeChange),t),X("ratechange",r(Wi.RateChange),t)];return te(()=>{s.forEach(e=>e())})}(e);let p=()=>{},g=()=>{},f=()=>{},m=()=>{};e.recordDOM&&(p=function({styleSheetRuleCb:a,mirror:l,stylesheetManager:u},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const e=s.CSSStyleSheet.prototype.insertRule,t=(s.CSSStyleSheet.prototype.insertRule=new Proxy(e,{apply:te((e,t,r)=>{var[s,n]=r,{id:i,styleId:o}=io(t,l,u.styleMirror);return(i&&-1!==i||o&&-1!==o)&&a({id:i,styleId:o,adds:[{rule:s,index:n}]}),e.apply(t,r)})}),s.CSSStyleSheet.prototype.addRule=function(e,t,r=this.cssRules.length){return s.CSSStyleSheet.prototype.insertRule.apply(this,[e+` { ${t} }`,r])},s.CSSStyleSheet.prototype.deleteRule);s.CSSStyleSheet.prototype.deleteRule=new Proxy(t,{apply:te((e,t,r)=>{var[s]=r,{id:n,styleId:i}=io(t,l,u.styleMirror);return(n&&-1!==n||i&&-1!==i)&&a({id:n,styleId:i,removes:[{index:s}]}),e.apply(t,r)})}),s.CSSStyleSheet.prototype.removeRule=function(e){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[e])};let r;s.CSSStyleSheet.prototype.replace&&(r=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(r,{apply:te((e,t,r)=>{var[s]=r,{id:n,styleId:i}=io(t,l,u.styleMirror);return(n&&-1!==n||i&&-1!==i)&&a({id:n,styleId:i,replace:s}),e.apply(t,r)})}));let n;s.CSSStyleSheet.prototype.replaceSync&&(n=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(n,{apply:te((e,t,r)=>{var[s]=r,{id:n,styleId:i}=io(t,l,u.styleMirror);return(n&&-1!==n||i&&-1!==i)&&a({id:n,styleId:i,replaceSync:s}),e.apply(t,r)})}));const i={},o=(uo("CSSGroupingRule")?i.CSSGroupingRule=s.CSSGroupingRule:(uo("CSSMediaRule")&&(i.CSSMediaRule=s.CSSMediaRule),uo("CSSConditionRule")&&(i.CSSConditionRule=s.CSSConditionRule),uo("CSSSupportsRule")&&(i.CSSSupportsRule=s.CSSSupportsRule)),{});return Object.entries(i).forEach(([e,t])=>{o[e]={insertRule:t.prototype.insertRule,deleteRule:t.prototype.deleteRule},t.prototype.insertRule=new Proxy(o[e].insertRule,{apply:te((e,t,r)=>{var[s,n]=r,{id:i,styleId:o}=io(t.parentStyleSheet,l,u.styleMirror);return(i&&-1!==i||o&&-1!==o)&&a({id:i,styleId:o,adds:[{rule:s,index:[...no(t),n||0]}]}),e.apply(t,r)})}),t.prototype.deleteRule=new Proxy(o[e].deleteRule,{apply:te((e,t,r)=>{var[s]=r,{id:n,styleId:i}=io(t.parentStyleSheet,l,u.styleMirror);return(n&&-1!==n||i&&-1!==i)&&a({id:n,styleId:i,removes:[{index:[...no(t),s]}]}),e.apply(t,r)})})}),te(()=>{s.CSSStyleSheet.prototype.insertRule=e,s.CSSStyleSheet.prototype.deleteRule=t,r&&(s.CSSStyleSheet.prototype.replace=r),n&&(s.CSSStyleSheet.prototype.replaceSync=n),Object.entries(i).forEach(([e,t])=>{t.prototype.insertRule=o[e].insertRule,t.prototype.deleteRule=o[e].deleteRule})})}(e,{win:r}),g=oo(e,e.doc),f=function({styleDeclarationCb:l,mirror:u,ignoreCSSAttributes:c,stylesheetManager:h},{win:e}){const d=e.CSSStyleDeclaration.prototype.setProperty,o=(e.CSSStyleDeclaration.prototype.setProperty=new Proxy(d,{apply:te((e,t,r)=>{var s,n,[i,o,a]=r;return c.has(i)?d.apply(t,[i,o,a]):({id:s,styleId:n}=io(null==(s=t.parentRule)?void 0:s.parentStyleSheet,u,h.styleMirror),(s&&-1!==s||n&&-1!==n)&&l({id:s,styleId:n,set:{property:i,value:o,priority:a},index:no(t.parentRule)}),e.apply(t,r))})}),e.CSSStyleDeclaration.prototype.removeProperty);return e.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:te((e,t,r)=>{var s,n,[i]=r;return c.has(i)?o.apply(t,[i]):({id:s,styleId:n}=io(null==(s=t.parentRule)?void 0:s.parentStyleSheet,u,h.styleMirror),(s&&-1!==s||n&&-1!==n)&&l({id:s,styleId:n,remove:{property:i},index:no(t.parentRule)}),e.apply(t,r))})}),te(()=>{e.CSSStyleDeclaration.prototype.setProperty=d,e.CSSStyleDeclaration.prototype.removeProperty=o})}(e,{win:r}),e.collectFonts)&&(m=function({fontCb:r,doc:e}){const t=e.defaultView;if(!t)return()=>{};const s=[],n=new WeakMap,i=t.FontFace;return t.FontFace=function(e,t,r){var s=new i(e,t,r);return n.set(s,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),s},e=Ei(e.fonts,"add",function(e){return function(t){return setTimeout(te(()=>{var e=n.get(t);e&&(r(e),n.delete(t))}),0),e.apply(this,[t])}}),s.push(()=>{t.FontFace=i}),s.push(e),te(()=>{s.forEach(e=>e())})}(e));const v=function(e){const{doc:l,mirror:u,blockClass:c,blockSelector:h,selectionCb:d}=e;let p=!0;return(e=te(()=>{var t=l.getSelection();if(!(!t||p&&null!=t&&t.isCollapsed)){p=t.isCollapsed||!1;var r=[],s=t.rangeCount||0;for(let e=0;e<s;e++){var{startContainer:n,startOffset:i,endContainer:o,endOffset:a}=t.getRangeAt(e);P(n,c,h,!0)||P(o,c,h,!0)||r.push({start:u.getId(n),startOffset:i,end:u.getId(o),endOffset:a})}d({ranges:r})}}))(),X("selectionchange",e)}(e),y=({doc:t,customElementCb:n}=[e][0],(t=t.defaultView)&&t.customElements?Ei(t.customElements,"define",function(s){return function(t,e,r){try{n({define:{name:t}})}catch(e){console.warn("Custom element callback failed for "+t)}return s.apply(this,[t,e,r])}}):()=>{}),_=[];for(const D of e.plugins)_.push(D.observer(D.callback,r,D.options));return te(()=>{$i.forEach(e=>e.reset()),null!=o&&o.disconnect(),a(),l(),u(),c(),h(),d(),p(),g(),f(),m(),v(),y(),_.forEach(e=>e())})}function lo(e){return void 0!==window[e]}function uo(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class co{constructor(e){a(this,"iframeIdToRemoteIdMap",new WeakMap),a(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,s){r=r||this.getIdToRemoteIdMap(e),s=s||this.getRemoteIdToIdMap(e);let n=r.get(t);return n||(n=this.generateIdFn(),r.set(t,n),s.set(n,t)),n}getIds(t,e){const r=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return e.map(e=>this.getId(t,e,r,s))}getRemoteId(e,t,r){r=r||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:r.get(t)||-1}getRemoteIds(t,e){const r=this.getRemoteIdToIdMap(t);return e.map(e=>this.getRemoteId(t,e,r))}reset(e){e?(this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)):(this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class ho{constructor(e){a(this,"iframes",new WeakMap),a(this,"crossOriginIframeMap",new WeakMap),a(this,"crossOriginIframeMirror",new co(fe)),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=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new co(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&null!=(t=e.contentWindow)&&t.addEventListener("message",this.handleMessage.bind(this)),null!=(t=this.loadListener)&&t.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&0<e.contentDocument.adoptedStyleSheets.length&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){var t=e;"rrweb"===t.data.type&&t.origin===t.data.origin&&e.source&&(e=(e=this.crossOriginIframeMap.get(e.source))&&this.transformCrossOriginEvent(e,t.data.event))&&this.wrappedEmit(e,t.data.isCheckout)}transformCrossOriginEvent(r,e){var t;switch(e.type){case Q.FullSnapshot:this.crossOriginIframeMirror.reset(r),this.crossOriginIframeStyleMirror.reset(r),this.replaceIdOnNode(e.data.node,r);var s=e.data.node.id;return this.crossOriginIframeRootIdMap.set(r,s),this.patchRootIdOnNode(e.data.node,s),{timestamp:e.timestamp,type:Q.IncrementalSnapshot,data:{source:ee.Mutation,adds:[{parentId:this.mirror.getId(r),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Q.Meta:case Q.Load:case Q.DomContentLoaded:return!1;case Q.Plugin:return e;case Q.Custom:return this.replaceIds(e.data.payload,r,["id","parentId","previousId","nextId"]),e;case Q.IncrementalSnapshot:switch(e.data.source){case ee.Mutation:return e.data.adds.forEach(e=>{this.replaceIds(e,r,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,r);var t=this.crossOriginIframeRootIdMap.get(r);t&&this.patchRootIdOnNode(e.node,t)}),e.data.removes.forEach(e=>{this.replaceIds(e,r,["parentId","id"])}),e.data.attributes.forEach(e=>{this.replaceIds(e,r,["id"])}),e.data.texts.forEach(e=>{this.replaceIds(e,r,["id"])}),e;case ee.Drag:case ee.TouchMove:case ee.MouseMove:return e.data.positions.forEach(e=>{this.replaceIds(e,r,["id"])}),e;case ee.ViewportResize:return!1;case ee.MediaInteraction:case ee.MouseInteraction:case ee.Scroll:case ee.CanvasMutation:case ee.Input:return this.replaceIds(e.data,r,["id"]),e;case ee.StyleSheetRule:case ee.StyleDeclaration:return this.replaceIds(e.data,r,["id"]),this.replaceStyleIds(e.data,r,["styleId"]),e;case ee.Font:return e;case ee.Selection:return e.data.ranges.forEach(e=>{this.replaceIds(e,r,["start","end"])}),e;case ee.AdoptedStyleSheet:return this.replaceIds(e.data,r,["id"]),this.replaceStyleIds(e.data,r,["styleIds"]),null!=(t=e.data.styles)&&t.forEach(e=>{this.replaceStyleIds(e,r,["styleId"])}),e}}return!1}replace(e,t,r,s){for(const n of s)!Array.isArray(t[n])&&"number"!=typeof t[n]||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===q.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class po{constructor(e){a(this,"shadowDoms",new WeakSet),a(this,"mutationCb"),a(this,"scrollCb"),a(this,"bypassOptions"),a(this,"mirror"),a(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(G(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);const r=Qi({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(to({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&0<e.adoptedStyleSheets.length&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId($.host(e))),this.restoreHandlers.push(oo({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,s){const n=this;this.restoreHandlers.push(Ei(e.prototype,"attachShadow",function(r){return function(e){var e=r.call(this,e),t=$.shadowRoot(this);return t&&Bi(this)&&n.addShadowRoot(t,s),e}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var go="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fo="undefined"==typeof Uint8Array?[]:new Uint8Array(256),mo=0;mo<go.length;mo++)fo[go.charCodeAt(mo)]=mo;function vo(e){for(var t=new Uint8Array(e),r=t.length,s="",n=0;n<r;n+=3)s=(s=(s=(s+=go[t[n]>>2])+go[(3&t[n])<<4|t[n+1]>>4])+go[(15&t[n+1])<<2|t[n+2]>>6])+go[63&t[n+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s}const yo=new Map;const _o=(t,r,s)=>{if(t&&(So(t,r)||"object"==typeof t)){r=function(e,t){let r=yo.get(e);return r||(r=new Map,yo.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(s,t.constructor.name);let e=r.indexOf(t);return-1===e&&(e=r.length,r.push(t)),e}};const bo=(e,t,r)=>e.map(e=>function t(e,r,s){var n;return e instanceof Array?e.map(e=>t(e,r,s)):null===e?e:e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray?{rr_type:e.constructor.name,args:[Object.values(e)]}:e instanceof ArrayBuffer?{rr_type:e.constructor.name,base64:vo(e)}:e instanceof DataView?{rr_type:e.constructor.name,args:[t(e.buffer,r,s),e.byteOffset,e.byteLength]}:e instanceof HTMLImageElement?(n=e.src,{rr_type:e.constructor.name,src:n}):e instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:e.toDataURL()}:e instanceof ImageData?{rr_type:e.constructor.name,args:[t(e.data,r,s),e.width,e.height]}:So(e,r)||"object"==typeof e?{rr_type:e.constructor.name,index:_o(e,r,s)}:e}(e,t,r)),So=(t,r)=>{var e=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof r[e]);return Boolean(e.find(e=>t instanceof r[e]))};function wo(e,n,i,o){const t=[];try{var r=Ei(e.HTMLCanvasElement.prototype,"getContext",function(s){return function(e,...t){var r;return P(this,n,i,!0)||(r="experimental-webgl"===(r=e)?"webgl":r,"__context"in this||(this.__context=r),o&&["webgl","webgl2"].includes(r)&&(t[0]&&"object"==typeof t[0]?(r=t[0]).preserveDrawingBuffer||(r.preserveDrawingBuffer=!0):t.splice(0,1,{preserveDrawingBuffer:!0}))),s.apply(this,[e,...t])}});t.push(r)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{t.forEach(e=>e())}}function Co(e,s,n,i,o,a){var t,r=[];for(const u of Object.getOwnPropertyNames(e))if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))try{"function"==typeof e[u]&&(t=Ei(e,u,function(r){return function(...e){var t=r.apply(this,e);return _o(t,a,this),"tagName"in this.canvas&&!P(this.canvas,i,o,!0)&&(e=bo(e,a,this),e={type:s,property:u,args:e},n(this.canvas,e)),t}}),r.push(t))}catch{var l=Ii(e,u,{set(e){n(this.canvas,{type:s,property:u,args:[e],setter:!0})}});r.push(l)}return r}const ko="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=";var Io;const Eo="undefined"!=typeof window&&window.Blob&&new Blob([(i=ko,Uint8Array.from(atob(i),e=>e.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});function Oo(t){let e;try{var r;if(e=Eo&&(window.URL||window.webkitURL).createObjectURL(Eo))return(r=new Worker(e,{name:null==t?void 0:t.name})).addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),r;throw""}catch(e){return new Worker("data:text/javascript;base64,"+ko,{name:null==t?void 0:t.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class xo{constructor(e){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",(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)});var{sampling:t="all",win:r,blockClass:s,blockSelector:n,recordCanvas:i,dataURLOptions:o}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(r,s,n),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,s,n,{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(e,r,s,n,i){const t=wo(r,s,n,!0),o=new Map,a=new Oo,l=(a.onmessage=e=>{var t,r,s,n=e.data["id"];o.set(n,!1),"base64"in e.data&&({base64:e,type:t,width:r,height:s}=e.data,this.mutationCb({id:n,type:Vi["2D"],commands:[{property:"clearRect",args:[0,0,r,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:e}],type:t}]},0,0]}]}))},1e3/e);let u=0,c;const h=()=>{const t=[];return r.document.querySelectorAll("canvas").forEach(e=>{P(e,s,n,!0)||t.push(e)}),t},d=e=>{c=(u&&e-u<l||(u=e,h().forEach(async e=>{var t,r,s=this.mirror.getId(e);o.get(s)||0!==e.width&&0!==e.height&&(o.set(s,!0),["webgl","webgl2"].includes(e.__context)&&!1===(null==(r=null==(t=e.getContext(e.__context))?void 0:t.getContextAttributes())?void 0:r.preserveDrawingBuffer)&&t.clear(t.COLOR_BUFFER_BIT),r=await createImageBitmap(e),a.postMessage({id:s,bitmap:r,width:e.width,height:e.height,dataURLOptions:i.dataURLOptions},[r]))})),requestAnimationFrame(d))};c=requestAnimationFrame(d),this.resetObservers=()=>{t(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=wo(e,t,r,!1),n=function(r,s,n,i){const e=[];var t;for(const a of Object.getOwnPropertyNames(s.CanvasRenderingContext2D.prototype))try{"function"==typeof s.CanvasRenderingContext2D.prototype[a]&&(t=Ei(s.CanvasRenderingContext2D.prototype,a,function(e){return function(...t){return P(this.canvas,n,i,!0)||setTimeout(()=>{var e=bo(t,s,this);r(this.canvas,{type:Vi["2D"],property:a,args:e})},0),e.apply(this,t)}}),e.push(t))}catch{var o=Ii(s.CanvasRenderingContext2D.prototype,a,{set(e){r(this.canvas,{type:Vi["2D"],property:a,args:[e],setter:!0})}});e.push(o)}return()=>{e.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r),i=function(e,t,r,s){const n=[];return n.push(...Co(t.WebGLRenderingContext.prototype,Vi.WebGL,e,r,s,t)),void 0!==t.WebGL2RenderingContext&&n.push(...Co(t.WebGL2RenderingContext.prototype,Vi.WebGL2,e,r,s,t)),()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{s(),n(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=e=>{this.rafStamps.latestId=e,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{var r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){var r,s;this.frozen||this.locked||(s=this.pendingCanvasMutations.get(e))&&-1!==t&&(r=s.map(e=>{const{type:t,...r}=e;return r}),s=s[0]["type"],this.mutationCb({id:t,type:s,commands:r}),this.pendingCanvasMutations.delete(e))}}class Mo{constructor(e){a(this,"trackedLinkElements",new WeakSet),a(this,"mutationCb"),a(this,"adoptedStyleSheetCb"),a(this,"styleMirror",new Fi),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0!==e.length){var r={id:t,styleIds:[]},s=[];for(const n of e){let e;this.styleMirror.has(n)?e=this.styleMirror.getId(n):(e=this.styleMirror.add(n),s.push({styleId:e,rules:Array.from(n.rules||CSSRule,(e,t)=>({rule:K(e,n.href),index:t}))})),r.styleIds.push(e)}0<s.length&&(r.styles=s),this.adoptedStyleSheetCb(r)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Ro{constructor(){a(this,"nodeMap",new WeakMap),a(this,"active",!1)}inOtherBuffer(e,t){e=this.nodeMap.get(e);return e&&Array.from(e).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let re,Ao,To,Do=!1;try{2!==Array.from([1],e=>2*e)[0]&&(Io=document.createElement("iframe"),document.body.appendChild(Io),Array.from=(null==(x=Io.contentWindow)?void 0:x.Array.from)||Array.from,document.body.removeChild(Io))}catch(e){console.debug("Unable to override Array.from",e)}const Lo=new ne;function Po(e={}){const{emit:s,checkoutEveryNms:n,checkoutEveryNth:i,blockClass:r="rr-block",blockSelector:o=null,ignoreClass:N="rr-ignore",ignoreSelector:F=null,maskTextClass:a="rr-mask",maskTextSelector:l=null,inlineStylesheet:u=!0,maskAllInputs:j,maskInputOptions:t,slimDOMOptions:c,maskInputFn:h,maskTextFn:d,hooks:U,packFn:p,sampling:g={},dataURLOptions:f={},mousemoveWait:m,recordDOM:v=!0,recordCanvas:y=!1,recordCrossOriginIframes:B=!1,recordAfter:z="DOMContentLoaded"===e.recordAfter?e.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:W=!1,inlineImages:_=!1,plugins:b,keepIframeSrcFn:S=()=>!1,ignoreCSSAttributes:G=new Set([]),errorHandler:K}=e;e=K,Zi=e;const w=!B||window.parent===window;let C=!1;if(!w)try{window.parent.document&&(C=!1)}catch(e){C=!0}if(w&&!s)throw new Error("emit function is required");if(!w&&!C)return()=>{};void 0!==m&&void 0===g.mousemove&&(g.mousemove=m),Lo.reset();const k=!0===j?{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!==t?t:{password:!0},I=!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||{};"NodeList"in(e=window)&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach);let Y,E=0;const J=e=>{for(const t of b||[])t.eventProcessor&&(e=t.eventProcessor(e));return e=p&&!C?p(e):e},O=(re=(e,t)=>{var r;e.timestamp=Oi(),null==(r=$i[0])||!r.isFrozen()||e.type===Q.FullSnapshot||e.type===Q.IncrementalSnapshot&&e.data.source===ee.Mutation||$i.forEach(e=>e.unfreeze()),w?null!=s&&s(J(e),t):C&&(r={type:"rrweb",event:J(e),origin:window.location.origin,isCheckout:t},window.parent.postMessage(r,"*")),e.type===Q.FullSnapshot?(Y=e,E=0):e.type!==Q.IncrementalSnapshot||e.data.source===ee.Mutation&&e.data.isAttachIframe||(E++,t=i&&E>=i,r=n&&e.timestamp-Y.timestamp>n,(t||r)&&Ao(!0))},e=>{re({type:Q.IncrementalSnapshot,data:{source:ee.Mutation,...e}})}),H=e=>re({type:Q.IncrementalSnapshot,data:{source:ee.Scroll,...e}}),q=e=>re({type:Q.IncrementalSnapshot,data:{source:ee.CanvasMutation,...e}});const x=new Mo({mutationCb:O,adoptedStyleSheetCb:e=>re({type:Q.IncrementalSnapshot,data:{source:ee.AdoptedStyleSheet,...e}})}),M=new ho({mirror:Lo,mutationCb:O,stylesheetManager:x,recordCrossOriginIframes:B,wrappedEmit:re});for(const T of b||[])T.getMirror&&T.getMirror({nodeMirror:Lo,crossOriginIframeMirror:M.crossOriginIframeMirror,crossOriginIframeStyleMirror:M.crossOriginIframeStyleMirror});const R=new Ro,A=(To=new xo({recordCanvas:y,mutationCb:q,win:window,blockClass:r,blockSelector:o,mirror:Lo,sampling:g.canvas,dataURLOptions:f}),new po({mutationCb:O,scrollCb:H,bypassOptions:{blockClass:r,blockSelector:o,maskTextClass:a,maskTextSelector:l,inlineStylesheet:u,maskInputOptions:k,dataURLOptions:f,maskTextFn:d,maskInputFn:h,recordCanvas:y,inlineImages:_,sampling:g,slimDOMOptions:I,iframeManager:M,stylesheetManager:x,canvasManager:To,keepIframeSrcFn:S,processedNodeManager:R},mirror:Lo}));Ao=(e=!1)=>{if(v){re({type:Q.Meta,data:{href:window.location.href,width:Ri(),height:Mi()}},e),x.reset(),A.init(),$i.forEach(e=>e.lock());var t=function(e,t){var{mirror:t=new ne,blockClass:r="rr-block",blockSelector:s=null,maskTextClass:n="rr-mask",maskTextSelector:i=null,inlineStylesheet:o=!0,inlineImages:a=!1,recordCanvas:l=!1,maskAllInputs:u=!1,maskTextFn:c,maskInputFn:h,slimDOM:d=!1,dataURLOptions:p,preserveWhiteSpace:g,onSerialize:f,onIframeLoad:m,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:_,keepIframeSrcFn:b=()=>!1}=t||{};return Me(e,{doc:e,mirror:t,blockClass:r,blockSelector:s,maskTextClass:n,maskTextSelector:i,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:p,inlineImages:a,recordCanvas:l,preserveWhiteSpace:g,onSerialize:f,onIframeLoad:m,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:_,keepIframeSrcFn:b,newlyAddedElement:!1})}(document,{mirror:Lo,blockClass:r,blockSelector:o,maskTextClass:a,maskTextSelector:l,inlineStylesheet:u,maskAllInputs:k,maskTextFn:d,maskInputFn:h,slimDOM:I,dataURLOptions:f,recordCanvas:y,inlineImages:_,onSerialize:e=>{Li(e,Lo)&&M.addIframe(e),Pi(e,Lo)&&x.trackLinkElement(e),Ni(e)&&A.addShadowRoot($.shadowRoot(e),document)},onIframeLoad:(e,t)=>{M.attachIframe(e,t),A.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{x.attachLinkElement(e,t)},keepIframeSrcFn:S});if(!t)return console.warn("Failed to snapshot the document");re({type:Q.FullSnapshot,data:{node:t,initialOffset:xi(window)}},e),$i.forEach(e=>e.unlock()),document.adoptedStyleSheets&&0<document.adoptedStyleSheets.length&&x.adoptStyleSheets(document.adoptedStyleSheets,Lo.getId(document))}};try{const D=[],L=e=>{return te(ao)({mutationCb:O,mousemoveCb:(e,t)=>re({type:Q.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>re({type:Q.IncrementalSnapshot,data:{source:ee.MouseInteraction,...e}}),scrollCb:H,viewportResizeCb:e=>re({type:Q.IncrementalSnapshot,data:{source:ee.ViewportResize,...e}}),inputCb:e=>re({type:Q.IncrementalSnapshot,data:{source:ee.Input,...e}}),mediaInteractionCb:e=>re({type:Q.IncrementalSnapshot,data:{source:ee.MediaInteraction,...e}}),styleSheetRuleCb:e=>re({type:Q.IncrementalSnapshot,data:{source:ee.StyleSheetRule,...e}}),styleDeclarationCb:e=>re({type:Q.IncrementalSnapshot,data:{source:ee.StyleDeclaration,...e}}),canvasMutationCb:q,fontCb:e=>re({type:Q.IncrementalSnapshot,data:{source:ee.Font,...e}}),selectionCb:e=>{re({type:Q.IncrementalSnapshot,data:{source:ee.Selection,...e}})},customElementCb:e=>{re({type:Q.IncrementalSnapshot,data:{source:ee.CustomElement,...e}})},blockClass:r,ignoreClass:N,ignoreSelector:F,maskTextClass:a,maskTextSelector:l,maskInputOptions:k,inlineStylesheet:u,sampling:g,recordDOM:v,recordCanvas:y,inlineImages:_,userTriggeredOnInput:V,collectFonts:W,doc:e,maskInputFn:h,maskTextFn:d,keepIframeSrcFn:S,blockSelector:o,slimDOMOptions:I,dataURLOptions:f,mirror:Lo,iframeManager:M,stylesheetManager:x,shadowDomManager:A,processedNodeManager:R,canvasManager:To,ignoreCSSAttributes:G,plugins:(null==(e=null==b?void 0:b.filter(e=>e.observer))?void 0:e.map(t=>({observer:t.observer,options:t.options,callback:e=>re({type:Q.Plugin,data:{plugin:t.name,payload:e}})})))||[]},U)},P=(M.addLoadListener(e=>{try{D.push(L(e.contentDocument))}catch(e){console.warn(e)}}),()=>{Ao(),D.push(L(document)),Do=!0});return"interactive"===document.readyState||"complete"===document.readyState?P():(D.push(X("DOMContentLoaded",()=>{re({type:Q.DomContentLoaded,data:{}}),"DOMContentLoaded"===z&&P()})),D.push(X("load",()=>{re({type:Q.Load,data:{}}),"load"===z&&P()},window))),()=>{D.forEach(e=>e()),R.destroy(),Do=!1,Zi=void 0}}catch(e){console.warn(e)}}Po.addCustomEvent=(e,t)=>{if(!Do)throw new Error("please add custom event after start recording");re({type:Q.Custom,data:{tag:e,payload:t}})},Po.freezePage=()=>{$i.forEach(e=>e.freeze())},Po.takeFullSnapshot=e=>{if(!Do)throw new Error("please take full snapshot after start recording");Ao(e)},Po.mirror=Lo,O.record=Po},8572:function(e,t){!function(e){"use strict";let n=-1;const l=t=>{addEventListener("pageshow",e=>{e.persisted&&(n=e.timeStamp,t(e))},!0)},u=(t,r,s,n)=>{let i,o;return e=>{r.value>=0&&(e||n)&&(o=r.value-(i??0),(o||void 0===i)&&(i=r.value,r.delta=o,r.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(r.value,s),t(r)))}},c=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},i=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},h=()=>{const e=i();return e?.activationStart??0},d=(e,t=-1)=>{const r=i();let s="navigate";n>=0?s="back-forward-cache":r&&(document.prerendering||h()>0?s="prerender":document.wasDiscarded?s="restore":r.type&&(s=r.type.replace(/_/g,"-")));return{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:s}},r=new WeakMap;function p(e,t){return r.get(e)||r.set(e,new t),r.get(e)}class a{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],r=this.o.at(-1);this.i&&t&&r&&e.startTime-r.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 g=(e,t,r={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const s=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return s.observe({type:e,buffered:!0,...r}),s}}catch{}},f=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let s=-1;const o=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,t=e=>{"hidden"===document.visibilityState&&s>-1&&(s="visibilitychange"===e.type?e.timeStamp:0,v())},m=()=>{addEventListener("visibilitychange",t,!0),addEventListener("prerenderingchange",t,!0)},v=()=>{removeEventListener("visibilitychange",t,!0),removeEventListener("prerenderingchange",t,!0)},y=()=>{if(s<0){const t=h(),e=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(e=>"hidden"===e.name&&e.startTime>t)[0]?.startTime;s=e??o(),m(),l(()=>{setTimeout(()=>{s=o(),m()})})}return{get firstHiddenTime(){return s}}},_=e=>{document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},b=[1800,3e3],S=(t,o={})=>{_(()=>{const r=y();let s,n=d("FCP");const i=g("paint",e=>{for(const t of e)"first-contentful-paint"===t.name&&(i.disconnect(),t.startTime<r.firstHiddenTime&&(n.value=Math.max(t.startTime-h(),0),n.entries.push(t),s(!0)))});i&&(s=u(t,n,b,o.reportAllChanges),l(e=>{n=d("FCP"),s=u(t,n,b,o.reportAllChanges),c(()=>{n.value=performance.now()-e.timeStamp,s(!0)})}))})},w=[.1,.25];let C=0,k=1/0,I=0;const E=e=>{for(const t of e)t.interactionId&&(k=Math.min(k,t.interactionId),I=Math.max(I,t.interactionId),C=I?(I-k)/7+1:0)};let O;const x=()=>O?C:performance.interactionCount??0,M=()=>{"interactionCount"in performance||O||(O=g("event",E,{type:"event",buffered:!0,durationThreshold:0}))};let R=0;class N{u=[];l=new Map;m;p;v(){R=x(),this.u.length=0,this.l.clear()}T(){const e=Math.min(this.u.length-1,Math.floor((x()-R)/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 r=this.l.get(e.interactionId);if(r||this.u.length<10||e.duration>t.P){if(r?e.duration>r.P?(r.entries=[e],r.P=e.duration):e.duration===r.P&&e.startTime===r.entries[0].startTime&&r.entries.push(e):(r={id:e.interactionId,entries:[e],P:e.duration},this.l.set(r.id,r),this.u.push(r)),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?.(r)}}}const A=e=>{const t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(e=f(e),document.addEventListener("visibilitychange",e,{once:!0}),t(()=>{e(),document.removeEventListener("visibilitychange",e)}))},T=[200,500];class F{m;h(e){this.m?.(e)}}const D=[2500,4e3],L=[800,1800],P=e=>{document.prerendering?_(()=>P(e)):"complete"!==document.readyState?addEventListener("load",()=>P(e),!0):setTimeout(e)};e.CLSThresholds=w,e.FCPThresholds=b,e.INPThresholds=T,e.LCPThresholds=D,e.TTFBThresholds=L,e.onCLS=(i,o={})=>{S(f(()=>{let r,s=d("CLS",0);const n=p(o,a),e=e=>{for(const t of e)n.h(t);n.i>s.value&&(s.value=n.i,s.entries=n.o,r())},t=g("layout-shift",e);t&&(r=u(i,s,w,o.reportAllChanges),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&(e(t.takeRecords()),r(!0))}),l(()=>{n.i=0,s=d("CLS",0),r=u(i,s,w,o.reportAllChanges),c(()=>r())}),setTimeout(r))}))},e.onFCP=S,e.onINP=(i,o={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&_(()=>{M();let r,s=d("INP");const n=p(o,N),e=t=>{A(()=>{for(const e of t)n.h(e);const e=n.T();e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,r())})},t=g("event",e,{durationThreshold:o.durationThreshold??40});r=u(i,s,T,o.reportAllChanges),t&&(t.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&(e(t.takeRecords()),r(!0))}),l(()=>{n.v(),s=d("INP"),r=u(i,s,T,o.reportAllChanges)}))})},e.onLCP=(o,a={})=>{_(()=>{const t=y();let r,s=d("LCP");const n=p(a,F),e=e=>{a.reportAllChanges||(e=e.slice(-1));for(const a of e)n.h(a),a.startTime<t.firstHiddenTime&&(s.value=Math.max(a.startTime-h(),0),s.entries=[a],r())},i=g("largest-contentful-paint",e);if(i){r=u(o,s,D,a.reportAllChanges);const t=f(()=>{e(i.takeRecords()),i.disconnect(),r(!0)});for(const o of["keydown","click","visibilitychange"])addEventListener(o,()=>A(t),{capture:!0,once:!0});l(e=>{s=d("LCP"),r=u(o,s,D,a.reportAllChanges),c(()=>{s.value=performance.now()-e.timeStamp,r(!0)})})}})},e.onTTFB=(t,r={})=>{let s=d("TTFB"),n=u(t,s,L,r.reportAllChanges);P(()=>{const e=i();e&&(s.value=Math.max(e.responseStart-h(),0),s.entries=[e],n(!0),l(()=>{s=d("TTFB",0),n=u(t,s,L,r.reportAllChanges),n(!0)}))})}}(t)}},s={},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o={},(()=>{"use strict";var e=o,t=i(6914);const r=i(3447),s=i(1964);var n=i(2016),t=(0,t._getStatsigGlobal)();e.default=t,n.AutoInit.attempt(({client:e})=>{new r.SessionReplay(e),new s.AutoCapture(e)})})(),o.default;function i(e){var t=s[e];return void 0!==t||(t=s[e]={exports:{}},r[e].call(t.exports,t,t.exports,i)),t.exports}var r,s,o});
|