@statsig/js-client 3.20.0 → 3.20.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 +1 @@
1
- var $Q=(e)=>Object.defineProperty(e,"__esModule",{value:!0});var $Q2=(a,b,c)=>Object.defineProperty(a,b,c);var $P=(a,b)=>Object.assign(a,b);var $A=()=>((t,r,u,l)=>{return new(u=u||Promise)(function(n,e){function i(t){try{s(l.next(t))}catch(t){e(t)}}function o(t){try{s(l.throw(t))}catch(t){e(t)}}function s(t){var e;t.done?n(t.value):((e=t.value)instanceof u?e:new u(function(t){t(e)})).then(i,o)}s((l=l.apply(t,r||[])).next())})});!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Statsig=e():t.Statsig=e()}(this,()=>(()=>{"use strict";var i={1845:(t,i,e)=>{var s;$Q2(i,"__esModule",{value:!0}),i.t=i.i=i.l=void 0;const r=e(7512);i.l=()=>{try{return"undefined"!=typeof __STATSIG__?__STATSIG__:l}catch(t){return l}},i.i=t=>(0,i.l)()[t];i.t=t=>{var e=(0,i.l)();return t?e.instances&&e.instances[t]:(e.instances&&1<Object.keys(e.instances).length&&r.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),e.firstInstance)};var n="__STATSIG__",o="undefined"!=typeof window?window:{},e=void 0!==e.g?e.g:{},a="undefined"!=typeof globalThis?globalThis:{};const l=null!=(s=null!=(s=null!=(s=o[n])?s:e[n])?s:a[n])?s:{instance:i.t};o[n]=l,e[n]=l,a[n]=l},2137:(t,e,i)=>{$Q(e),e.o=e.u=void 0;const r=i(1406);function s(t,e,i){if(i)return i(t,e);const s=e&&e.customIDs?e.customIDs:{};e=["uid:"+(null!=(i=null==e?void 0:e.userID)?i:""),"cids:"+Object.keys(s).sort((t,e)=>t.localeCompare(e)).map(t=>t+"-"+s[t]).join(","),"k:"+t];return(0,r.h)(e.join("|"))}e.u=s,e.o=function(t,e,i){return e?s(t,e,i):(0,r.h)("k:"+t)}},6427:(t,e)=>{$Q(e)},694:function(t,e,i){var r=this&&this.__awaiter||$A();$Q(e),e.Wn=e.DataAdapterCore=void 0;const l=i(7512),h=i(9122),n=i(8578),o=i(4534),u=i(3401);function c(t,e,i,s){return{source:t,data:e,receivedAt:Date.now(),stableID:i,fullUserHash:(0,n.v)(s)}}e.DataAdapterCore=class{constructor(t,e){this._=t,this.p=e,this.m=null,this.O=null,this.j="statsig.last_modified_time."+e,this.S=new s}attach(t,e,i){this.O=t,this.m=e}getDataSync(t){var t=t&&(0,n.T)(t,this.m),e=this.k(t),i=this.S.get(e,t);return i&&this.Li(i)?i:(i=this.I(e))&&this.Li(i)?(this.S.add(e,i),this.S.get(e,t)):null}setData(t,e){var e=e&&(0,n.T)(e,this.m),i=this.k(e);this.S.add(i,c("Bootstrap",t,null,e))}Li(t){return null==t.stableID||t.stableID===h.StableID.get(this.C())}D(e,i,s){return r(this,void 0,void 0,function*(){o.Storage.isReady()||(yield o.Storage.isReadyResolver());var t=null!=e?e:this.getDataSync(i),t=[this.M(t,i,s)];return null!=s&&s.timeoutMs&&t.push(new Promise(t=>setTimeout(t,s.timeoutMs)).then(()=>(l.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(t)})}A(i,s){return r(this,void 0,void 0,function*(){var t=i&&(0,n.T)(i,this.m),e=this.k(t),t=yield this.D(null,t,s);t&&this.S.add(e,$P($P({},t),{source:"Prefetch"}))})}M(n,o,a){return r(this,void 0,void 0,function*(){var t=null!=(t=null==n?void 0:n.data)?t:null,e=null!=n&&this.N(n,o),e=yield this.R(t,o,a,e);if(!e)return l.Log.debug("No response returned for latest value"),null;var i=(0,u.P)(e,"has_updates","Response"),s=this.C(),s=h.StableID.get(s);let r=null;if(!0===(null==i?void 0:i.has_updates))r=c("Network",e,s,o);else{if(!t||!1!==(null==i?void 0:i.has_updates))return null;r=c("NetworkNotModified",t,s,o)}e=this.k(o);return this.S.add(e,r),this.U(e,r),r})}C(){return null!=this.O?this.O:(l.Log.error(this._+" is not attached to a Client"),"")}I(t){var e=null==(e=o.Storage.getItem)?void 0:e.call(o.Storage,t);return null!=e&&(t=(0,u.P)(e,"source","Cached Result"))?$P($P({},t),{source:"Cache"}):null}U(t,e){o.Storage.setItem(t,JSON.stringify(e)),this.F(t)}F(t){var e=null!=(e=(0,o.G)(this.j))?e:{},t=(e[t]=Date.now(),a(e,10));t&&(delete e[t],o.Storage.removeItem(t)),(0,o.L)(this.j,e)}},e.Wn=c;class s{constructor(){this.K={}}get(t,e){var t=this.K[t],i=null==t?void 0:t.stableID,e=null==(e=null==e?void 0:e.customIDs)?void 0:e.stableID;return e&&i&&e!==i?(l.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):t}add(t,e){var i=a(this.K,9);i&&delete this.K[i],this.K[t]=e}merge(t){this.K=$P($P({},this.K),t)}}function a(r,t){var e=Object.keys(r);return e.length<=t?null:e.reduce((t,e)=>{var i=r[t],s=r[e];return"object"==typeof i&&"object"==typeof s?s.receivedAt<i.receivedAt?e:t:s<i?e:t})}},8962:(t,o)=>{$Q2(o,"__esModule",{value:!0}),o.Diagnostics=void 0;const s=new Map,i="start";function r(t,e,i,s){return $P({key:i,action:e,step:s,timestamp:Date.now()},t)}function n(t,e){var i=null!=(i=s.get(t))?i:[];i.push(e),s.set(t,i)}function e(t,e){if(e in t)return t[e]}o.Diagnostics={q:t=>s.get(t),B:t=>{n(t,r({},i,"overall"))},V:(t,e,i)=>{n(t,r({success:e,error:e?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:i},"end","overall"))},J:(t,e)=>{n(t,r(e,i,"initialize","network_request"))},$:(t,e)=>{n(t,r(e,"end","initialize","network_request"))},W:t=>{n(t,r({},i,"initialize","process"))},H:(t,e)=>{n(t,r(e,"end","initialize","process"))},Y:t=>{s.delete(t)},X(t){if(t&&"object"==typeof t)return{code:e(t,"code"),name:e(t,"name"),message:e(t,"message")}},Z(t,e,i,s){return{success:!0===(null==t?void 0:t.ok),statusCode:null==t?void 0:t.status,sdkRegion:null==(t=null==t?void 0:t.headers)?void 0:t.get("x-statsig-region"),isDelta:!0===i.includes('"is_delta":true')||void 0,attempt:e,error:o.Diagnostics.X(s)}},tt(t,e,i,s){var r,n=o.Diagnostics.q(i);return null==n||n.length<=0?-1:(r=n[n.length-1].timestamp-n[0].timestamp,o.Diagnostics.Y(i),i=function(t,e){t={eventName:"statsig::diagnostics",user:t,value:null,metadata:e,time:Date.now()};return t}(t,{context:"initialize",markers:n.slice(),statsigOptions:s}),e.enqueue(i),r)}}},8809:function(t,e){var i=this&&this.__awaiter||$A();$Q(e),e.et=void 0;const r=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),n="https://cloudflare-dns.com/dns-query",o=["i","e","d"],a=200;e.et=function(e){return i(this,void 0,void 0,function*(){var i=yield e(n,{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:r});if(i.ok){var t,i=yield i.arrayBuffer(),i=new Uint8Array(i);{var s=i,i=s.findIndex((t,e)=>e<a&&"="===String.fromCharCode(t)&&o.includes(String.fromCharCode(s[e-1])));if(-1===i)throw(t=new Error("Failed to parse TXT records from DNS")).name="DnsTxtParseError",t;let e="";for(let t=i-1;t<s.length;t++)e+=String.fromCharCode(s[t]);return e.split(",")}}throw(t=new Error("Failed to fetch TXT records from DNS")).name="DnsTxtFetchError",t})}},3539:(t,e)=>{$Q(e)},5542:function(t,a,e){var i=this&&this.__awaiter||$A();$Q2(a,"__esModule",{value:!0}),a.ErrorBoundary=a.EXCEPTION_ENDPOINT=void 0;const s=e(7512),l=e(5902),h=e(8e3),u=(a.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception","[Statsig] UnknownError");function c(t){return t instanceof Error?t:"string"==typeof t?new Error(t):new Error("An unknown error occurred.")}a.ErrorBoundary=class{constructor(t,e,i,s){this.O=t,this.m=e,this.nt=i,this.qn=s,this.it=new Set}wrap(s){try{const t=s;!function(t){const e=new Set;let i=Object.getPrototypeOf(t);for(;i&&i!==Object.prototype;)Object.getOwnPropertyNames(i).filter(t=>"function"==typeof(null===i||void 0===i?void 0:i[t])).forEach(t=>e.add(t)),i=Object.getPrototypeOf(i);return Array.from(e)}(t).forEach(e=>{const i=t[e];"$EB"in i||(t[e]=(...t)=>this.rt(e,()=>i.apply(s,t)),t[e].$EB=!0)})}catch(t){this.st("eb:wrap",t)}}logError(t,e){this.st(t,e)}getLastSeenErrorAndReset(){var t=this.qn;return this.qn=void 0,null!=t?t:null}attachErrorIfNoneExists(t){this.qn||(this.qn=c(t))}rt(e,t){try{var i=t();return i&&i instanceof Promise?i.catch(t=>this.st(e,t)):i}catch(t){return this.st(e,t),null}}st(n,o){try{s.Log.warn("Caught error in "+n,{error:o});i(this,void 0,void 0,function*(){var t,e=o||Error(u),i=e instanceof Error,s=i?e.name:"No Name",r=c(e);this.qn=r,this.it.has(s)||(this.it.add(s),null!=(r=null==(r=this.m)?void 0:r.networkConfig)&&r.preventAllNetworkTraffic?null!=(r=this.nt)&&r.call(this,{name:"error",error:o,tag:n}):(r=l.SDKType.lt(this.O),t=h.StatsigMetadataProvider.get(),i=i?e.stack:function(t){try{return JSON.stringify(t)}catch(t){return u}}(e),e=$P({tag:n,exception:s,info:i,statsigOptions:function(t){if(!t)return{};const i={};return Object.entries(t).forEach(([t,e])=>{switch(typeof e){case"number":case"bigint":case"boolean":i[String(t)]=e;break;case"string":e.length<50?i[String(t)]=e:i[String(t)]="set";break;case"object":"environment"===t?i.environment=e:"networkConfig"===t?i.networkConfig=e:i[String(t)]=null!=e?"set":"unset"}}),i}(this.m)},$P($P({},t),{sdkType:r})),yield(null!=(s=null==(i=null==(s=this.m)?void 0:s.networkConfig)?void 0:i.networkOverrideFunc)?s:fetch)(a.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this.O,"STATSIG-SDK-TYPE":String(r),"STATSIG-SDK-VERSION":String(t.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(e)}),null!=(i=this.nt)&&i.call(this,{name:"error",error:o,tag:n})))}).then(()=>{}).catch(()=>{})}catch(t){}}}},2922:(t,e)=>{$Q(e)},2417:(t,e)=>{$Q(e)},7770:function(t,e,i){var s=this&&this.__awaiter||$A();$Q(e),e.EventLogger=void 0;const r=i(2137),n=i(1406),o=i(7512),a=i(7410),l=i(6830),h=i(1637),u=i(586),c=i(4534),d=i(1881),f=i(2397),v={},p={Startup:"startup",GainedFocus:"gained_focus"};class m{static ot(t){null!=(t=v[t])&&t.flush().catch(()=>{})}static ut(t){null!=(t=v[t])&&t.ct(p.GainedFocus)}constructor(t,e,i,s){this.O=t,this.nt=e,this.ht=i,this.m=s,this.dt=[],this.vt={},this.ft={},this._t=!1,this.gt=Date.now(),this.Yn=null!=(t=null==s?void 0:s.loggingEnabled)?t:!0===(null==s?void 0:s.disableLogging)?u.LoggingEnabledOption.disabled:u.LoggingEnabledOption.browserOnly,null!=s&&s.loggingEnabled&&void 0!==s.disableLogging&&o.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this.yt=null!=(e=null==s?void 0:s.loggingBufferMaxSize)?e:100;i=null==s?void 0:s.networkConfig;this.Ot=new d.UrlConfiguration(a.Endpoint.jt,null==i?void 0:i.logEventUrl,null==i?void 0:i.api,null==i?void 0:i.logEventFallbackUrls)}setLogEventCompressionMode(t){this.ht.setLogEventCompressionMode(t)}setLoggingEnabled(t){this.Yn=t}enqueue(t){this.St(t)&&(this.wt(t),this.Tt(),this.dt.length>this.yt)&&m.ot(this.O)}incrementNonExposureCount(t){var e=null!=(e=this.ft[t])?e:0;this.ft[t]=e+1}reset(){this.flush().catch(()=>{}),this.vt={}}start(){var t,e=(0,l.kt)();e&&"always"!==(null==(t=this.m)?void 0:t.loggingEnabled)||(v[this.O]=this,e||(0,f.It)(t=>{"background"===t?m.ot(this.O):"foreground"===t&&m.ut(this.O)}),this.ct(p.Startup),this.Dt())}stop(){return s(this,void 0,void 0,function*(){this.Et&&(clearInterval(this.Et),this.Et=null),delete v[this.O],yield this.flush()})}flush(){return s(this,void 0,void 0,function*(){var t;this.Mt(),0!==this.dt.length&&(t=this.dt,this.dt=[],yield this.At(t))})}Tt(){this._t||(this._t=!0,200<Date.now()-this.gt)||setTimeout(()=>m.ot(this.O),200)}St(t){if("always"!==(null==(e=this.m)?void 0:e.loggingEnabled)&&(0,l.kt)())return!1;if((0,h.xt)(t)){var e=t.user||{statsigEnvironment:void 0},e=(0,r.u)(this.O,e),i=t.metadata||{},t=[t.eventName,e,i.gate,i.config,i.ruleID,i.allocatedExperiment,i.parameterName,String(i.isExplicitParameter),i.reason].join("|"),e=this.vt[t],i=Date.now();if(e&&i-e<6e5)return!1;1e3<Object.keys(this.vt).length&&(this.vt={}),this.vt[t]=i}return!0}At(r){return s(this,void 0,void 0,function*(){var t,e;if("disabled"===this.Yn)return this.Nt(r),!1;try{var i=(0,f.Rt)()&&this.ht.isBeaconSupported()&&null==(null==(e=null==(t=this.m)?void 0:t.networkConfig)?void 0:e.networkOverrideFunc),s=(this.nt({name:"pre_logs_flushed",events:r}),i?this.Pt(r):yield this.Ct(r));return s.success?(this.nt({name:"logs_flushed",events:r}),!0):(o.Log.warn("Failed to flush events."),this.Nt(r),!1)}catch(t){return o.Log.warn("Failed to flush events."),!1}})}Ct(e){return s(this,void 0,void 0,function*(){var t=yield this.ht.post(this.Ut(e)),t=null!=(t=null==t?void 0:t.code)?t:-1;return{success:200<=t&&t<300}})}Pt(t){return{success:this.ht.beacon(this.Ut(t))}}Ut(t){return{sdkKey:this.O,data:{events:t},urlConfig:this.Ot,retries:3,isCompressable:!0,params:{[a.NetworkParam.EventCount]:String(t.length)},credentials:"same-origin"}}Nt(t){for(;500<t.length;)t.shift();var e=this.o();try{(0,c.L)(e,t)}catch(t){o.Log.warn("Unable to save failed logs to storage")}}ct(e){const i=this.o();s(this,void 0,void 0,function*(){c.Storage.isReady()||(yield c.Storage.isReadyResolver());var t=(0,c.G)(i);t&&(e===p.Startup&&c.Storage.removeItem(i),yield this.At(t))&&e===p.GainedFocus&&c.Storage.removeItem(i)}).catch(()=>{o.Log.warn("Failed to flush stored logs")})}o(){return"statsig.failed_logs."+(0,n.h)(this.O)}wt(t){t.user&&(t.user=$P({},t.user),delete t.user.privateAttributes);var e={},i=this.Ft(),i=(i&&(e.statsigMetadata={currentPage:i}),$P($P({},t),e));o.Log.debug("Enqueued Event:",i),this.dt.push(i)}Mt(){0!==Object.keys(this.ft).length&&(this.wt({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:$P({},this.ft)}}),this.ft={})}Ft(){var t;if(!1!==(null==(t=this.m)?void 0:t.includeCurrentPageUrlWithEvents))return(0,l.Gt)()}Dt(){var t=null!=(t=null==(t=this.m)?void 0:t.loggingIntervalMs)?t:1e4;const e=setInterval(()=>{var t=v[this.O];t&&t.Et===e?m.ot(this.O):clearInterval(e)},t);this.Et=e}}e.EventLogger=m},1406:(t,n,e)=>{$Q2(n,"__esModule",{value:!0}),n.Lt=n.Kt=n.h=void 0;const o=e(6634);n.h=e=>{let i=0;for(let t=0;t<e.length;t++){var s=e.charCodeAt(t);i=(i<<5)-i+s,i&=i}return String(i>>>0)},n.Kt=(t,e)=>(0,n.h)(JSON.stringify((0,n.Lt)(t,e)));n.Lt=(i,s)=>{if(null==i)return null;var t=Object.keys(i).sort();const r={};return t.forEach(t=>{var e=i[t];0===s||"object"!==(0,o.zt)(e)?r[t]=e:r[t]=(0,n.Lt)(e,null!=s?s-1:s)}),r}},1333:(t,e)=>{$Q(e)},7512:(t,e)=>{$Q(e),e.Log=e.LogLevel=void 0;function i(t){return t.unshift("[Statsig]"),t}e.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class s{static info(...t){s.level>=e.LogLevel.Info&&console.info(" INFO ",...i(t))}static debug(...t){s.level>=e.LogLevel.Debug&&console.debug(" DEBUG ",...i(t))}static warn(...t){s.level>=e.LogLevel.Warn&&console.warn(" WARN ",...i(t))}static error(...t){s.level>=e.LogLevel.Error&&console.error(" ERROR ",...i(t))}}(e.Log=s).level=e.LogLevel.Warn},7787:(t,e)=>{$Q(e),e.createMemoKey=e.MemoPrefix=void 0,e.MemoPrefix={Kn:"g",Ln:"c",Vn:"e",$n:"l",Bn:"p"};const n=new Set([]),o=new Set(["userPersistedValues"]);e.createMemoKey=function(t,e,i){let s=t+"|"+e;if(i)for(const r of Object.keys(i)){if(o.has(r))return;n.has(r)?s+=`|${r}=true`:s+=`|${r}=`+i[r]}return s}},7410:(t,e)=>{$Q(e),e.NetworkParam=e.NetworkDefault=e.Endpoint=void 0,e.Endpoint={qt:"initialize",jt:"rgstr",Bt:"download_config_specs"},e.NetworkDefault={[e.Endpoint.jt]:"https://prodregistryv2.org/v1",[e.Endpoint.qt]:"https://featureassets.org/v1",[e.Endpoint.Bt]:"https://api.statsigcdn.com/v1"},e.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}},7023:function(t,e,i){var w=this&&this.__awaiter||$A();$Q(e),e.NetworkCore=void 0,i(1845);const f=i(1845),S=i(8962),I=i(7512),C=i(7410),s=i(308),v=i(3091),o=i(5902),r=i(6830),a=i(4143),l=i(9122),k=i(2636),h=i(8e3),p=i(586),O=i(2397),_=500,A=3e4;const M=new Set([408,500,502,503,504,522,524,599]);e.NetworkCore=class{constructor(t,e){this.nt=e,this.$t=null,this.Vt=1e4,this.Jt={},this.m={},this.Oi={},this.Jn=null,t&&(this.m=t),this.m.networkConfig&&(this.Jt=this.m.networkConfig),this.Jt.networkTimeoutMs&&(this.Vt=this.Jt.networkTimeoutMs),this.Wt=new s.NetworkFallbackResolver(this.m),this.setLogEventCompressionMode(this.Qn(t))}setLogEventCompressionMode(t){this.m.logEventCompressionMode=t}setErrorBoundary(t){this.$t=t,this.$t.wrap(this),this.$t.wrap(this.Wt),this.Wt.setErrorBoundary(t)}isBeaconSupported(){return"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon}getLastUsedInitUrlAndReset(){var t=this.Jn;return this.Jn=null,t}beacon(t){var e,i;return!!j(t)&&(t=this.Ht("POST",t),e=this.Xt(t),(i=navigator).sendBeacon.bind(i)(e,t.body))}post(e){return w(this,void 0,void 0,function*(){var t=this.Ht("POST",e);return this.Pi(t),yield this.Ci(t),this.Zt(t)})}get(t){t=this.Ht("GET",t);return this.Zt(t)}Zt(b){return w(this,void 0,void 0,function*(){var e;if(!j(b))return null;if(this.Jt.preventAllNetworkTraffic)return null;var{method:i,body:s,retries:r,attempt:n}=b,o=b.urlConfig.endpoint;if(this.Si(o))return I.Log.warn(`Request to ${o} was blocked because you are making requests too frequently.`),null;n=null!=n?n:1;const a="undefined"!=typeof AbortController?new AbortController:null;var t=setTimeout(()=>{null!==a&&void 0!==a&&a.abort(`Timeout of ${this.Vt}ms expired.`)},this.Vt),l=this.Xt(b);let h=null;var u,c=(0,O.Rt)();try{var d,f,v,p={method:i,body:s,headers:$P({},b.headers),signal:null===a||void 0===a?void 0:a.signal,priority:b.priority,keepalive:c},m=(u=n,(y=b).urlConfig.endpoint===C.Endpoint.qt&&S.Diagnostics.J(y.sdkKey,{attempt:u}),this.Oi[o]),g=(m&&(m.lastRequestTime=Date.now(),this.Oi[o]=m),null!=(e=this.Jt.networkOverrideFunc)?e:fetch);if(h=yield g(l,p),clearTimeout(t),h.ok)return v=yield h.text(),R(b,h,n,v),this.Wt.tryBumpExpiryTime(b.sdkKey,b.urlConfig),{body:v,code:h.status};throw d=yield h.text().catch(()=>"No Text"),(f=new Error(`NetworkError: ${l} `+d)).name="NetworkError",f}catch(t){var s=function(t,e){if(null!=t&&t.signal.aborted&&"string"==typeof t.signal.reason)return t.signal.reason;if("string"==typeof e)return e;if(e instanceof Error)return e.name+": "+e.message;return"Unknown Error"}(a,t),c=function(t){t=(null==t?void 0:t.signal.aborted)&&"string"==typeof t.signal.reason&&t.signal.reason.includes("Timeout");return t||!1}(a),y=(R(b,h,n,"",t),yield this.Wt.tryFetchUpdatedFallbackInfo(b.sdkKey,b.urlConfig,s,c));return(y&&(b.fallbackUrl=this.Wt.getActiveFallbackUrl(b.sdkKey,b.urlConfig)),!r||r<n||!M.has(null!=(u=null===h||void 0===h?void 0:h.status)?u:500))?(null!=(o=this.nt)&&o.call(this,{name:"error",error:t,tag:k.ErrorTag.NetworkError,requestArgs:b}),m=`A networking error occurred during ${i} request to ${l}.`,I.Log.error(m,s,t),null!=(e=this.$t)&&e.attachErrorIfNoneExists(m),null):(yield function(e){return w(this,void 0,void 0,function*(){yield new Promise(t=>setTimeout(t,Math.min(_*(e*e),A)))})}(n),this.Zt($P($P({},b),{retries:r,attempt:n+1})))}})}Qn(t){let e=null==t?void 0:t.logEventCompressionMode;return e=(e=e||!0!==(null==t?void 0:t.disableCompression)?e:p.LogEventCompressionMode.Disabled)||p.LogEventCompressionMode.Enabled}Si(t){var e=Date.now(),i=null!=(i=this.Oi[t])?i:{count:0,lastRequestTime:e},s=e-i.lastRequestTime,s=Math.floor(.05*s);return i.count=Math.max(0,i.count-s),50<=i.count||(i.count+=1,i.lastRequestTime=e,this.Oi[t]=i,!1)}Xt(t){var e=null!=(e=t.fallbackUrl)?e:t.urlConfig.getUrl();t.urlConfig.endpoint!==C.Endpoint.qt&&t.urlConfig.endpoint!==C.Endpoint.Bt||(this.Jn=e);const i=$P({[C.NetworkParam.SdkKey]:t.sdkKey,[C.NetworkParam.SdkType]:o.SDKType.lt(t.sdkKey),[C.NetworkParam.SdkVersion]:h.SDK_VERSION,[C.NetworkParam.Time]:String(Date.now()),[C.NetworkParam.SessionID]:a.SessionID.get(t.sdkKey)},t.params);t=Object.keys(i).map(t=>encodeURIComponent(t)+"="+encodeURIComponent(i[t])).join("&");return e+(t?"?"+t:"")}Pi(e){var t,i=(0,r.te)(),s=e.body;if(e.isStatsigEncodable&&!this.m.disableStatsigEncoding&&"string"==typeof s&&null==(0,f.i)("no-encode")&&null!=i&&i.btoa)try{e.body=i.btoa(s).split("").reverse().join(""),e.params=$P($P({},null!=(t=e.params)?t:{}),{[C.NetworkParam.StatsigEncoded]:"1"})}catch(t){I.Log.warn("Request encoding failed for "+e.urlConfig.getUrl(),t)}}Ci(d){return w(this,void 0,void 0,function*(){var e,i=d.body;if("string"==typeof i&&function(t,e){if(!t.isCompressable)return;if(null!=(0,f.i)("no-compress")||"undefined"==typeof CompressionStream||"undefined"==typeof TextEncoder)return;var i=null!=t.urlConfig.customUrl||null!=t.urlConfig.fallbackUrls,s=!0===v.SDKFlags.get(t.sdkKey,"enable_log_event_compression");switch(e.logEventCompressionMode){case p.LogEventCompressionMode.Disabled:return;case p.LogEventCompressionMode.Enabled:return i&&!s?void 0:1;case p.LogEventCompressionMode.Forced:return 1;default:return}}(d,this.m))try{for(var s,r=(new TextEncoder).encode(i),n=new CompressionStream("gzip"),o=n.writable.getWriter(),a=(o.write(r).catch(I.Log.error),o.close().catch(I.Log.error),n.readable.getReader()),l=[];!(s=yield a.read()).done;)l.push(s.value);var h=l.reduce((t,e)=>t+e.length,0),u=new Uint8Array(h);let t=0;for(const c of l)u.set(c,t),t+=c.length;d.body=u,d.params=$P($P({},null!=(e=d.params)?e:{}),{[C.NetworkParam.IsGzipped]:"1"})}catch(t){I.Log.warn("Request compression failed for "+d.urlConfig.getUrl(),t)}})}Ht(t,e){var i=this.Wt.getActiveFallbackUrl(e.sdkKey,e.urlConfig),t=$P($P({},e),{method:t,fallbackUrl:i});return"data"in e&&n(t,e.data),t}};const j=t=>!!t.sdkKey||(I.Log.warn("Unable to make request without an SDK key"),!1),n=(t,e)=>{var{sdkKey:i,fallbackUrl:s}=t,r=l.StableID.get(i),n=a.SessionID.get(i),i=o.SDKType.lt(i);t.body=JSON.stringify($P($P({},e),{statsigMetadata:$P($P({},h.StatsigMetadataProvider.get()),{stableID:r,sessionID:n,sdkType:i,fallbackUrl:s})}))};function R(t,e,i,s,r){t.urlConfig.endpoint===C.Endpoint.qt&&S.Diagnostics.$(t.sdkKey,S.Diagnostics.Z(e,i,s,r))}},308:function(t,e,i){var a=this&&this.__awaiter||$A();$Q(e),e.ee=e.NetworkFallbackResolver=void 0;const o=i(8809),s=i(1406),n=i(7512),l=i(4534);function h(t,e){t=null!=(t=null==t?void 0:t.toLowerCase())?t:"";return e||t.includes("uncaught exception")||t.includes("failed to fetch")||t.includes("networkerror when attempting to fetch resource")}function u(t){return"statsig.network_fallback."+(0,s.h)(t)}function c(t,e){t=u(t);e&&0!==Object.keys(e).length?l.Storage.setItem(t,JSON.stringify(e)):l.Storage.removeItem(t)}e.NetworkFallbackResolver=class{constructor(t){this.ne=null,this.$t=null,this.ie={},this.re=null==(t=t.networkConfig)?void 0:t.networkOverrideFunc}setErrorBoundary(t){this.$t=t}tryBumpExpiryTime(t,e){var i=null==(i=this.ne)?void 0:i[e.endpoint];i&&(i.expiryTime=Date.now()+6048e5,c(t,$P($P({},this.ne),{[e.endpoint]:i})))}getActiveFallbackUrl(t,e){var i;if(null!=e.customUrl&&null!=e.fallbackUrls)return null;let s=this.ne;null==s&&(s=null!=(r=function(t){t=u(t),t=l.Storage.getItem(t);if(!t)return null;try{return JSON.parse(t)}catch(t){return n.Log.error("Failed to parse FallbackInfo"),null}}(t))?r:{},this.ne=s);var r=s[e.endpoint];return!r||Date.now()>(null!=(i=r.expiryTime)?i:0)||e.getChecksum()!==r.urlConfigChecksum?(delete s[e.endpoint],this.ne=s,c(t,this.ne),null):r.url||null}tryFetchUpdatedFallbackInfo(s,r,n,o){return a(this,void 0,void 0,function*(){var e,t,i;try{return h(n,o)?(t=null==r.customUrl&&null==r.fallbackUrls?yield this.se(r):r.fallbackUrls,!!(i=this.le(null==(e=this.ne)?void 0:e[r.endpoint],t))&&(this.oe(s,r,i),!0)):!1}catch(t){return null!=(e=this.$t)&&e.logError("tryFetchUpdatedFallbackInfo",t),!1}})}oe(t,e,i){var i={urlConfigChecksum:e.getChecksum(),url:i,expiryTime:Date.now()+6048e5,previous:[]},e=e.endpoint,s=null==(s=this.ne)?void 0:s[e],s=(s&&i.previous.push(...s.previous),10<i.previous.length&&(i.previous=[]),null==(s=null==(s=this.ne)?void 0:s[e])?void 0:s.url);null!=s&&i.previous.push(s),this.ne=$P($P({},this.ne),{[e]:i}),c(t,this.ne)}se(n){return a(this,void 0,void 0,function*(){var t=this.ie[n.endpoint];if(t&&Date.now()<t)return null;this.ie[n.endpoint]=Date.now()+144e5;var e=[],t=yield(0,o.et)(null!=(t=this.re)?t:fetch),i=function(t){try{return new URL(t).pathname}catch(t){return null}}(n.defaultUrl);for(const r of t)if(r.startsWith(n.endpointDnsKey+"=")){var s=r.split("=");if(1<s.length){let t=s[1];t.endsWith("/")&&(t=t.slice(0,-1)),e.push("https://"+t+i)}}return e})}le(t,e){var i;if(null==e)return null;var s=new Set(null!=(i=null==t?void 0:t.previous)?i:[]),r=null==t?void 0:t.url;let n=null;for(const a of e){var o=a.endsWith("/")?a.slice(0,-1):a;if(!s.has(a)&&o!==r){n=o;break}}return n}},e.ee=h},1405:(t,e)=>{$Q(e)},1361:(t,e)=>{$Q(e)},3091:(t,e)=>{$Q(e),e.SDKFlags=void 0;const i={};e.SDKFlags={setFlags:(t,e)=>{i[t]=e},get:(t,e)=>{return null!=(t=null==(t=i[t])?void 0:t[e])&&t}}},5902:(t,e)=>{$Q(e),e.SDKType=void 0;const i={};let s;e.SDKType={lt:t=>{return(null!=(t=i[t])?t:"js-mono")+(null!==s&&void 0!==s?s:"")},ue(t,e){i[t]=e},ae(t){s&&"-react"!==s||(s="-"+t)}}},6830:(t,s)=>{$Q2(s,"__esModule",{value:!0}),s.Hn=s.Gt=s.ce=s.he=s.kt=s.de=s.te=void 0;s.te=()=>"undefined"!=typeof window?window:null,s.de=()=>{var t=(0,s.te)();return null!=(t=null==t?void 0:t.document)?t:null},s.kt=()=>{var t;return null===(0,s.de)()&&(t="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,"string"==typeof EdgeRuntime||t)},s.he=(t,e)=>{var i=(0,s.te)();"function"==typeof(null==i?void 0:i.addEventListener)&&i.addEventListener(t,e)},s.ce=(t,e)=>{var i=(0,s.de)();"function"==typeof(null==i?void 0:i.addEventListener)&&i.addEventListener(t,e)},s.Gt=()=>{var t;try{return null==(t=(0,s.te)())?void 0:t.location.href.split(/[?#]/)[0]}catch(t){}};s.Hn=()=>{var t=(0,s.te)();return t&&"onpagehide"in t?"pagehide":"beforeunload"}},4143:(t,e,i)=>{$Q(e),e.StatsigSession=e.SessionID=void 0;const s=i(1845),r=i(2137),a=i(7512),l=i(4534),h=i(8023),u=18e5,c=144e5,d={};function f(e,t){return setTimeout(()=>{var t=null==(t=(0,s.l)())?void 0:t.instance(e);t&&t.$emt({name:"session_expired"})},t)}function v(t){return"statsig.session_id."+(0,r.o)(t)}e.SessionID={get:t=>e.StatsigSession.get(t).data.sessionID},e.StatsigSession={get:t=>{null==d[t]&&(d[t]=function(t){let e=function(t){t=v(t);return(0,l.G)(t)}(t);var i=Date.now();e=e||{sessionID:(0,h.getUUID)(),startTime:i,lastUpdate:i};return{data:e,sdkKey:t}}(t));var t=d[t],e=Date.now(),i=t.data,s=t.sdkKey,r=((function({lastUpdate:t}){return Date.now()-t>u}(i)||function({startTime:t}){return Date.now()-t>c}(i))&&(i.sessionID=(0,h.getUUID)(),i.startTime=e,o=null===__STATSIG__||void 0===__STATSIG__?void 0:__STATSIG__.instance(s))&&o.$emt({name:"session_expired"}),i.lastUpdate=e,i),n=t.sdkKey;n=v(n);try{(0,l.L)(n,r)}catch(t){a.Log.warn("Failed to save SessionID")}clearTimeout(t.idleTimeoutID),clearTimeout(t.ageTimeoutID);var o=e-i.startTime;return t.idleTimeoutID=f(s,u),t.ageTimeoutID=f(s,c-o),t},overrideInitialSessionID:(t,e)=>{var i;d[e]=(t=t,e=e,i=Date.now(),{data:{sessionID:t,startTime:i,lastUpdate:i},sdkKey:e})}}},2176:(t,a)=>{$Q2(a,"__esModule",{value:!0}),a.hi=void 0;a.hi=(e,i)=>{let s=0;var r=Object.keys(e);for(let t=0;t<r.length;t++){var n=r[t],o=e[n];if((s=(s+=n.length)+("object"==typeof o&&null!==o?(0,a.hi)(o,i)+2:String(o).length+1))>=i)return s}return s}},9122:(t,e,i)=>{$Q(e),e.StableID=void 0;const s=i(2137),r=i(7512),n=i(6830),o=i(4534),a=i(8023),l={},h={},u={};function c(t){return"statsig.stable_id."+(0,s.o)(t)}function d(t,e){e=c(e);try{(0,o.L)(e,t)}catch(t){r.Log.warn("Failed to save StableID to storage")}}function f(t,e){var i;h[e]&&document&&((i=new Date).setFullYear(i.getFullYear()+1),document.cookie=`${v(e)}=${encodeURIComponent(t)}; expires=${i.toUTCString()}; path=/`)}function v(t){return"statsig.stable_id."+(0,s.o)(t)}e.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:t=>{if(u[t])return null;if(null!=l[t])return l[t];let e=null;return null!=(e=function(t){if(h[t]&&null!=(0,n.de)())for(const s of document.cookie.split(";")){var[e,i]=s.trim().split("=");if(e===v(t))return decodeURIComponent(i)}return null}(t))?d(l[t]=e,t):(d(e=null==(e=function(t){t=c(t);return(0,o.G)(t)}(t))?(0,a.getUUID)():e,t),f(e,t),l[t]=e),e},setOverride:(t,e)=>{d(l[e]=t,e),f(t,e)},Xn:(t,e)=>{h[t]=e},_e:(t,e)=>{u[t]=e}}},1375:function(t,e,i){var s=this&&this.__awaiter||$A();$Q(e),e.StatsigClientBase=void 0,i(1845);const o=i(1845),a=i(5542),l=i(7770),h=i(7512),n=i(7787),u=i(6830),c=i(4143),d=i(9122),r=i(586),f=i(4534);e.StatsigClientBase=class{constructor(t,e,i,s){this.loadingStatus="Uninitialized",this.ve=null,this.fe={};var r,n=this.$emt.bind(this);null!=(null==s?void 0:s.logLevel)&&(h.Log.level=s.logLevel),null!=s&&s.disableStorage&&f.Storage._e(!0),null!=s&&s.initialSessionID&&c.StatsigSession.overrideInitialSessionID(s.initialSessionID,t),null!=s&&s.storageProvider&&f.Storage.ge(s.storageProvider),null!=s&&s.enableCookies&&d.StableID.Xn(t,s.enableCookies),null!=s&&s.disableStableID&&d.StableID._e(t,!0),this.O=t,this.m=null!=s?s:{},this.ji={},this.overrideAdapter=null!=(r=null==s?void 0:s.overrideAdapter)?r:null,this.pe=new l.EventLogger(t,n,i,s),this.$t=new a.ErrorBoundary(t,s,n),this.$t.wrap(this),this.$t.wrap(e),this.$t.wrap(this.pe),i.setErrorBoundary(this.$t),this.dataAdapter=e,this.dataAdapter.attach(t,s,i),this.storageProvider=f.Storage,null!=(e=null==(n=null==(r=this.overrideAdapter)?void 0:r.loadFromStorage)?void 0:n.call(r))&&e.catch(t=>this.$t.logError("OA::loadFromStorage",t)),this.be(),s=t,i=this,(0,u.kt)()||(n=(0,o.l)(),r=null!=(r=n.instances)?r:{},i=i,null!=r[s]&&h.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),r[s]=i,n.firstInstance||(n.firstInstance=i),n.instances=r,__STATSIG__=n)}updateRuntimeOptions(t){t.loggingEnabled?(this.m.loggingEnabled=t.loggingEnabled,this.pe.setLoggingEnabled(t.loggingEnabled)):null!=t.disableLogging&&(this.m.disableLogging=t.disableLogging,this.pe.setLoggingEnabled(t.disableLogging?"disabled":"browser-only")),null!=t.disableStorage&&(this.m.disableStorage=t.disableStorage,f.Storage._e(t.disableStorage)),null!=t.enableCookies&&(this.m.enableCookies=t.enableCookies,d.StableID.Xn(this.O,t.enableCookies)),t.logEventCompressionMode?this.pe.setLogEventCompressionMode(t.logEventCompressionMode):t.disableCompression&&this.pe.setLogEventCompressionMode(r.LogEventCompressionMode.Disabled)}flush(){return this.pe.flush()}shutdown(){return s(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this.me("Uninitialized",null),this.ve=null,yield this.pe.stop()})}on(t,e){this.fe[t]||(this.fe[t]=[]),this.fe[t].push(e)}off(t,e){this.fe[t]&&-1!==(e=this.fe[t].indexOf(e))&&this.fe[t].splice(e,1)}$on(t,e){e.__isInternal=!0,this.on(t,e)}$emt(i){var t;const e=e=>{try{e(i)}catch(t){!0===e.__isInternal?this.$t.logError("__emit:"+i.name,t):h.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",i)}};this.fe[i.name]&&this.fe[i.name].forEach(t=>e(t)),null!=(t=this.fe["*"])&&t.forEach(e)}me(t,e){this.loadingStatus=t,this.ji={},this.$emt({name:"values_updated",status:t,values:e})}ye(t,e,i){!0===(null==i?void 0:i.disableExposureLog)?this.pe.incrementNonExposureCount(t):this.pe.enqueue(e)}wi(s,r){return(t,e)=>{var i;return!this.m.disableEvaluationMemoization&&(i=(0,n.createMemoKey)(s,t,e))?(i in this.ji||(3e3<=Object.keys(this.ji).length&&(this.ji={}),this.ji[i]=r(t,e)),this.ji[i]):r(t,e)}}}},2636:(t,e)=>{$Q(e),e.ErrorTag=void 0,e.ErrorTag={NetworkError:"NetworkError"}},3206:(t,e)=>{$Q(e),e.DataAdapterCachePrefix=void 0,e.DataAdapterCachePrefix="statsig.cached"},1637:(t,e)=>{$Q(e),e.Oe=e.je=e.Ui=e.Se=e.xt=void 0;const n="statsig::config_exposure",o="statsig::gate_exposure",h="statsig::layer_exposure",u=(t,e,i,s,r)=>(i.bootstrapMetadata&&(s.bootstrapMetadata=i.bootstrapMetadata),{eventName:t,user:e,value:null,metadata:a(i,s),secondaryExposures:r,time:Date.now()});e.xt=({eventName:t})=>t===o||t===n||t===h;function c(t,e){return t.map(t=>"string"==typeof t?(null!=e?e:{})[t]:t).filter(t=>null!=t)}e.Se=(t,e,i)=>{var s,r={gate:e.name,gateValue:String(e.value),ruleID:e.ruleID};return null!=(null==(s=e.__evaluation)?void 0:s.version)&&(r.configVersion=e.__evaluation.version),u(o,t,e.details,r,c(null!=(t=null==(s=e.__evaluation)?void 0:s.secondary_exposures)?t:[],i))},e.Ui=c;e.je=(t,e,i)=>{var s,r={config:e.name,ruleID:e.ruleID};return null!=(null==(s=e.__evaluation)?void 0:s.version)&&(r.configVersion=e.__evaluation.version),null!=(null==(s=e.__evaluation)?void 0:s.passed)&&(r.rulePassed=String(e.__evaluation.passed)),u(n,t,e.details,r,c(null!=(t=null==(s=e.__evaluation)?void 0:s.secondary_exposures)?t:[],i))};e.Oe=(t,e,i,s)=>{var r=e.__evaluation,n=!0===(null==(n=null==r?void 0:r.explicit_parameters)?void 0:n.includes(i));let o="",a=null!=(l=null==r?void 0:r.undelegated_secondary_exposures)?l:[];n&&(o=null!=(l=r.allocated_experiment_name)?l:"",a=null!=(l=r.secondary_exposures)?l:[]);var l=null==(r=e.__evaluation)?void 0:r.parameter_rule_ids,l={config:e.name,parameterName:i,ruleID:null!=(r=null==l?void 0:l[i])?r:e.ruleID,allocatedExperiment:o,isExplicitParameter:String(n)};return null!=(null==(i=e.__evaluation)?void 0:i.version)&&(l.configVersion=e.__evaluation.version),u(h,t,e.details,l,c(a,s))};const a=(t,e)=>(e.reason=t.reason,t.lcut&&(e.lcut=String(t.lcut)),t.receivedAt&&(e.receivedAt=String(t.receivedAt)),e)},8e3:(t,e)=>{$Q(e),e.StatsigMetadataProvider=e.SDK_VERSION=void 0,e.SDK_VERSION="3.20.0";let i={sdkVersion:e.SDK_VERSION,sdkType:"js-mono"};e.StatsigMetadataProvider={get:()=>i,add:t=>{i=$P($P({},i),t)}}},586:(t,e)=>{$Q(e),e.LoggingEnabledOption=e.LogEventCompressionMode=void 0,e.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},e.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}},1098:(t,e)=>{$Q(e)},2059:(t,e,i)=>{$Q(e),e.we=e.Te=e.ke=e.Ie=e.De=e.Ee=void 0;const o=i(7512),a=i(6634);function r(t,e,i,s){return{name:t,details:e,ruleID:null!=(t=null==i?void 0:i.rule_id)?t:"",__evaluation:i,value:s}}function s(t,e,i){var s=null!=(s=null==i?void 0:i.value)?s:{};return $P($P({},r(t,e,i,s)),{get:n(t,null==i?void 0:i.value)})}function n(s,r,n){return(t,e)=>{var i=null!=(i=null==r?void 0:r[t])?i:null;return null==i?null!=e?e:null:null==e||(0,a.Me)(i,e)?(null!=n&&n(t),i):(o.Log.warn(`Parameter type mismatch. '${s}.${t}' was found to be type '${typeof i}' but fallback/return type is '${typeof e}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),null!=e?e:null)}}e.Ee=function(t,e,i){return $P($P({},r(t,e,i,!0===(null==i?void 0:i.value))),{idType:null!=(t=null==i?void 0:i.id_type)?t:null})},e.De=s,e.Ie=function(t,e,i){return t=s(t,e,i),$P($P({},t),{groupName:null!=(e=null==i?void 0:i.group_name)?e:null})},e.ke=function(t,e,i,s){return $P($P({},r(t,e,i,void 0)),{get:n(t,null==i?void 0:i.value,s),groupName:null!=(e=null==i?void 0:i.group_name)?e:null,__value:null!=(t=null==i?void 0:i.value)?t:{}})},e.Te=function(t,e,i,s){return $P($P($P({},t),e),{get:n(t.name,i,s)})},e.we=n},1812:(t,e)=>{$Q(e)},3932:(t,e)=>{$Q(e),e.UPDATE_DETAIL_ERROR_MESSAGES=e.createUpdateDetails=void 0;e.createUpdateDetails=(t,e,i,s,r,n)=>({duration:i,source:e,success:t,error:s,sourceUrl:r,warnings:n}),e.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."}},8578:(t,e,i)=>{$Q(e),e.v=e.T=void 0;const s=i(1406),r=i(7512);e.T=function(t,e,i){try{var s=JSON.parse(JSON.stringify(t));return null!=e&&null!=e.environment?s.statsigEnvironment=e.environment:null!=i&&(s.statsigEnvironment={tier:i}),s}catch(t){return r.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}},e.v=function(t){return t?(0,s.Kt)(t):null}},4534:(t,i,e)=>{$Q2(i,"__esModule",{value:!0}),i.L=i.G=i.Storage=void 0;var s=e(7512),e=e(6830);const r={},n={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:t=>r[t]||null,setItem:(t,e)=>{r[t]=e},removeItem:t=>{delete r[t]},getAllKeys:()=>Object.keys(r)};let o=null;try{const u=(0,e.te)();u&&u.localStorage&&"function"==typeof u.localStorage.getItem&&(o={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:t=>u.localStorage.getItem(t),setItem:(t,e)=>u.localStorage.setItem(t,e),removeItem:t=>u.localStorage.removeItem(t),getAllKeys:()=>Object.keys(u.localStorage)})}catch(t){s.Log.warn("Failed to setup localStorageProvider.")}let a=null!==o&&void 0!==o?o:n,l=a;function h(e){try{return e()}catch(t){if(t instanceof Error&&"SecurityError"===t.name)return i.Storage.ge(n),null;throw t instanceof Error&&"QuotaExceededError"===t.name&&(e=i.Storage.getAllKeys().filter(t=>t.startsWith("statsig.")),t.message=t.message+". Statsig Keys: "+e.length),t}}i.Storage={isReady:()=>l.isReady(),isReadyResolver:()=>l.isReadyResolver(),getProviderName:()=>l.getProviderName(),getItem:t=>h(()=>l.getItem(t)),setItem:(t,e)=>h(()=>l.setItem(t,e)),removeItem:t=>l.removeItem(t),getAllKeys:()=>l.getAllKeys(),ge:t=>{a=t,l=t},_e:t=>{l=t?n:a}},i.G=function(t){return t=i.Storage.getItem(t),JSON.parse(null!=t?t:"null")},i.L=function(t,e){i.Storage.setItem(t,JSON.stringify(e))}},3401:(t,e,i)=>{$Q(e),e.P=void 0;const r=i(7512);e.P=function(t,e,i){try{var s=JSON.parse(t);if(s&&"object"==typeof s&&e in s)return s}catch(t){}return r.Log.error("Failed to parse "+i),null}},6634:(t,e)=>{$Q(e),e.Me=e.zt=void 0,e.zt=function(t){return Array.isArray(t)?"array":typeof t},e.Me=function(t,e){var i=t=>Array.isArray(t)?"array":typeof t;return i(t)===i(e)}},8023:(t,e)=>{$Q(e),e.getUUID=void 0,e.getUUID=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();let i=(new Date).getTime(),s="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(4*Math.random())]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,t=>{let e=16*Math.random();return 0<i?(e=(i+e)%16|0,i=Math.floor(i/16)):(e=(s+e)%16|0,s=Math.floor(s/16)),("x"===t?e:7&e|8).toString(16)})}},1881:(t,e,i)=>{$Q(e),e.UrlConfiguration=void 0;const s=i(1406),r=i(7410),n={[r.Endpoint.qt]:"i",[r.Endpoint.jt]:"e",[r.Endpoint.Bt]:"d"};e.UrlConfiguration=class{constructor(t,e,i,s){this.customUrl=null,this.fallbackUrls=null,this.endpoint=t,this.endpointDnsKey=n[t],e&&(this.customUrl=e),!e&&i&&(this.customUrl=i.endsWith("/")?""+i+t:i+"/"+t),s&&(this.fallbackUrls=s);e=r.NetworkDefault[t];this.defaultUrl=e+"/"+t}getUrl(){var t;return null!=(t=this.customUrl)?t:this.defaultUrl}getChecksum(){var t=(null!=(t=this.fallbackUrls)?t:[]).sort().join(",");return(0,s.h)(this.customUrl+t)}}},2397:(t,e,i)=>{$Q(e),e.Ae=e.It=e.Rt=e.xe=void 0;i=i(6830);const s="foreground",r="background",n=[];let o=s,a=!1;e.xe=()=>o===s,e.Rt=()=>a,e.It=t=>{n.unshift(t)};e.Ae=e=>{e!==o&&(o=e,n.forEach(t=>t(e)))},(0,i.he)("focus",()=>{(a=!1,e.Ae)(s)}),(0,i.he)("blur",()=>(0,e.Ae)(r)),(0,i.ce)("visibilitychange",()=>{(0,e.Ae)("visible"===document.visibilityState?s:r)}),(0,i.he)((0,i.Hn)(),()=>{a=!0,(0,e.Ae)(r)})},6914:function(t,e,i){var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var r=Object.getOwnPropertyDescriptor(e,i);r&&("get"in r?e.__esModule:!r.writable&&!r.configurable)||(r={enumerable:!0,get:function(){return e[i]}}),$Q2(t,s,r)}:function(t,e,i,s){t[s=void 0===s?i:s]=e[i]}),r=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)},n=($Q(e),e.Storage=e.Log=e.EventLogger=e.Diagnostics=void 0,i(1845),i(1845));const o=i(8962),a=($Q2(e,"Diagnostics",{enumerable:!0,get:function(){return o.Diagnostics}}),i(7770)),l=($Q2(e,"EventLogger",{enumerable:!0,get:function(){return a.EventLogger}}),i(7512));$Q2(e,"Log",{enumerable:!0,get:function(){return l.Log}});var h=i(8e3);const u=i(4534);$Q2(e,"Storage",{enumerable:!0,get:function(){return u.Storage}}),r(i(1845),e),r(i(2137),e),r(i(6427),e),r(i(694),e),r(i(8962),e),r(i(3539),e),r(i(5542),e),r(i(2922),e),r(i(2417),e),r(i(1406),e),r(i(1333),e),r(i(7512),e),r(i(7787),e),r(i(7410),e),r(i(7023),e),r(i(1405),e),r(i(1361),e),r(i(6830),e),r(i(5902),e),r(i(4143),e),r(i(2176),e),r(i(9122),e),r(i(1375),e),r(i(2636),e),r(i(3206),e),r(i(1637),e),r(i(8e3),e),r(i(586),e),r(i(1098),e),r(i(2059),e),r(i(1812),e),r(i(8578),e),r(i(4534),e),r(i(3401),e),r(i(6634),e),r(i(1881),e),r(i(8023),e),r(i(2397),e),r(i(3932),e),r(i(3091),e),$P((0,n.l)(),{Log:l.Log,SDK_VERSION:h.SDK_VERSION})},2016:(t,e,i)=>{$Q(e),e.AutoInit=void 0;const y=i(6914),b=i(2018);function w(t,e){var i;return null!=(i=e.get(t))?i:e.get(t.toLowerCase())}e.AutoInit=class{static attempt(e){var t,i,s,r,n;try{var o=(0,y.te)(),a=(0,y.de)();if(o&&a&&a.currentScript){var l=a.currentScript.getAttribute("src"),h=null==(t=o.location)?void 0:t.href;if(l&&h){var u=new URL(l,h).searchParams,c=null!=(i=w("sdkKey",u))?i:w("apiKey",u);if(c){var d={},f=w("proxy",u),v=(f&&(d.networkConfig={api:f}),null==(r=null==(s=(0,y.l)())?void 0:s.instances)?void 0:r[c]);let t=null;if(t=v instanceof b.StatsigClient?v:t)e({sdkKey:c,client:t});else{var p=a.currentScript.dataset;const m=function(t,e){if(t)if(t in e&&"function"==typeof e[t])return e[t];return null}(null!=(n=p.onstatsiginit)?n:p.onStatsigInit,o),g=new b.StatsigClient(c,function(){var t=(0,y.te)();if(!t)return{};let e=t.statsigUser||{};var i=(e="object"!=typeof e?{}:e).custom||{},s=e.customIDs||{};return $P($P({},e),{customIDs:$P({},s),custom:$P($P({},i),{useragent:t.navigator.userAgent,page_url:(0,y.Gt)()||"",language:null==(s=t.navigator)?void 0:s.language})})}(),d);g.initializeAsync().then(()=>{m&&m(g)}).catch(t=>{y.Log.error(t)}),e({sdkKey:c,client:g})}}}}}catch(t){y.Log.error("AutoInit failed",t)}}}},2043:function(t,e,i){var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},s=($Q(e),s(i(2018)));const r=i(3447);i=i(2016);e.default=s.default,i.AutoInit.attempt(({client:t})=>{new r.SessionReplay(t)})},7262:(t,e,i)=>{$Q(e),e.Ne=void 0;const s=i(6914);function r(t,e){null!=t&&t.forEach(t=>{delete e[t]})}e.Ne=function(t,e){var i;return(e=(0,s.P)(e,"checksum","DeltasEvaluationResponse"))?(t=t,i=e,t=$P($P($P({},t),i),{feature_gates:$P($P({},t.feature_gates),i.feature_gates),layer_configs:$P($P({},t.layer_configs),i.layer_configs),dynamic_configs:$P($P({},t.dynamic_configs),i.dynamic_configs)}),r((t=i=t).deleted_gates,t.feature_gates),delete t.deleted_gates,r(i.deleted_configs,t.dynamic_configs),delete t.deleted_configs,r(i.deleted_layers,t.layer_configs),delete t.deleted_layers,i=t,(t=(0,s.Kt)({feature_gates:i.feature_gates,dynamic_configs:i.dynamic_configs,layer_configs:i.layer_configs},2))===e.checksumV2?JSON.stringify(i):{hadBadDeltaChecksum:!0,badChecksum:t,badMergedConfigs:i,badFullResponse:e.deltas_full_response}):{hadBadDeltaChecksum:!0}}},4845:(t,e,i)=>{$Q(e);const r=i(6914);e.default=class{constructor(t){this.O=t,this.Re=null,this.Pe=null,this.Ce="Uninitialized",this.Ue=0,this.Fe=0,this.Ge=null,this.Le=new Set}reset(){this.Pe=null,this.Re=null,this.Ce="Loading",this.Ue=0,this.Fe=0,this.Ge=null}finalize(){this.Pe||(this.Ce="NoValues")}getValues(){return this.Re?(0,r.P)(this.Re,"has_updates","EvaluationStoreValues"):null}setValues(t,e){var i;return!!t&&null!=(i=(0,r.P)(t.data,"has_updates","EvaluationResponse"))&&(this.Ce=t.source,!0===(null==i?void 0:i.has_updates)&&(this.Re=t.data,this.Ue=i.time,this.Fe=t.receivedAt,this.Pe=i,this.Ge=this.Ke(t.source,i),t.source&&i.user&&this.ze(e,i),r.SDKFlags.setFlags(this.O,null!=(t=i.sdk_flags)?t:{})),!0)}getWarnings(){if(0!==this.Le.size)return Array.from(this.Le)}getGate(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.feature_gates,t)}getConfig(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.dynamic_configs,t)}getLayer(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.layer_configs,t)}getParamStore(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.param_stores,t)}getSource(){return this.Ce}getExposureMapping(){var t;return null==(t=this.Pe)?void 0:t.exposures}Ke(t,e){return"Bootstrap"!==t?null:(t={},e.user&&(t.user=e.user),e.sdkInfo&&(t.generatorSDKInfo=e.sdkInfo),t.lcut=e.time,t)}qe(t,e){let i=null;return{result:i=t?t[e]||t[(0,r.h)(e)]:i,details:this.Be(null==i)}}ze(t,e){var i,s=r.StableID.get(this.O);(null==(i=t.customIDs)?void 0:i.stableID)!==s&&(null!=(i=t.customIDs)&&i.stableID||s)?this.Le.add("StableIDMismatch"):"user"in e&&(i=e.user,s=$P($P({},t),{analyticsOnlyMetadata:void 0}),(0,r.v)(s)!==(0,r.v)(i))&&this.Le.add("PartialUserMatch")}getCurrentSourceDetails(){var t;return"Uninitialized"===this.Ce||"NoValues"===this.Ce?{reason:this.Ce}:(t={reason:this.Ce,lcut:this.Ue,receivedAt:this.Fe},0<this.Le.size&&(t.warnings=Array.from(this.Le)),t)}Be(t){var e=this.getCurrentSourceDetails();let i=e.reason;var s=null!=(s=e.warnings)?s:[],t=("Bootstrap"===this.Ce&&0<s.length&&(i+=s[0]),"Uninitialized"!==i&&"NoValues"!==i&&(i=i+":"+(t?"Unrecognized":"Recognized")),"Bootstrap"===this.Ce&&null!=(s=this.Ge)?s:void 0);return t&&(e.bootstrapMetadata=t),$P($P({},e),{reason:i})}}},8448:function(t,e,i){var l=this&&this.__awaiter||$A();$Q(e);const h=i(6914),o=i(7262);class s extends h.NetworkCore{constructor(t,e){super(t,e);e=null==t?void 0:t.networkConfig;this.Fi=t,this.Ve=new h.UrlConfiguration(h.Endpoint.qt,null==e?void 0:e.initializeUrl,null==e?void 0:e.api,null==e?void 0:e.initializeFallbackUrls)}fetchEvaluations(s,r,n,o,a){return l(this,void 0,void 0,function*(){var t,e=r?(0,h.P)(r,"has_updates","InitializeResponse"):null;let i={user:o,hash:null!=(t=null==(t=null==(t=this.Fi)?void 0:t.networkConfig)?void 0:t.initializeHashAlgorithm)?t:"djb2",deltasResponseRequested:!1,full_checksum:null};return null!=e&&e.has_updates&&(t=(null==e?void 0:e.hash_used)!==(null!=(t=null==(t=null==(t=this.Fi)?void 0:t.networkConfig)?void 0:t.initializeHashAlgorithm)?t:"djb2"),i=$P($P({},i),{sinceTime:a&&!t?e.time:0,previousDerivedFields:"derived_fields"in e&&a?e.derived_fields:{},deltasResponseRequested:!0,full_checksum:e.full_checksum,partialUserMatchSinceTime:t?0:e.time})),this.Je(s,e,i,n)})}Je(i,s,r,n){return l(this,void 0,void 0,function*(){var t,e=yield this.post({sdkKey:i,urlConfig:this.Ve,data:r,retries:2,isStatsigEncodable:!0,priority:n});return 204===(null==e?void 0:e.code)?'{"has_updates": false}':200!==(null==e?void 0:e.code)?null!=(t=null==e?void 0:e.body)?t:null:!0!==(null==s?void 0:s.has_updates)||!0!==(null==(t=e.body)?void 0:t.includes('"is_delta":true'))||!0!==r.deltasResponseRequested?e.body:"string"==typeof(t=(0,o.Ne)(s,e.body))?t:this.Je(i,s,$P($P($P({},r),t),{deltasResponseRequested:!1}),n)})}}e.default=s},3583:(t,e,i)=>{$Q(e),e.$e=void 0;const d=i(6914),f={disableExposureLog:!0};function v(t){return null==t||!1===t.disableExposureLog}function p(t,e){return null!=e&&!(0,d.Me)(t,e)}e.$e=function(h,u,c){return(t,e)=>{if(null==u)return e;var i,s,r,n,o,a,l=u[t];if(null==l||null!=e&&(0,d.zt)(e)!==l.param_type)return e;switch(l.ref_type){case"static":return l.value;case"gate":return a=l,h.getFeatureGate(a.gate_name,v(c)?void 0:f).value?a.pass_value:a.fail_value;case"dynamic_config":return a=l,o=e,p(n=(n=h).getDynamicConfig(a.config_name,v(c)?void 0:f).get(a.param_name),o)?o:n;case"experiment":return o=l,n=e,p(r=(r=h).getExperiment(o.experiment_name,v(c)?void 0:f).get(o.param_name),n)?n:r;case"layer":return r=l,s=e,p(i=(i=h).getLayer(r.layer_name,v(c)?void 0:f).get(r.param_name),s)?s:i;default:return e}}}},8198:function(t,e,i){var n=this&&this.__awaiter||$A();$Q(e);const o=i(6914),a=i(4845),l=i(8448),r=i(3583),h=i(4131);class s extends o.StatsigClientBase{static instance(t){var e=(0,o.l)().instance(t);return e instanceof s?e:(o.Log.warn((0,o.kt)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new s(null!=t?t:"",{}))}constructor(t,e,i=null){o.SDKType.ue(t,"javascript-client");var s,r=new l.default(i,t=>{this.$emt(t)}),t=(super(t,null!=(s=null==i?void 0:i.dataAdapter)?s:new h.StatsigEvaluationsDataAdapter,r,i),this.ar={},this.getFeatureGate=this.wi(o.MemoPrefix.Kn,this.Ti.bind(this)),this.getDynamicConfig=this.wi(o.MemoPrefix.Ln,this.Ii.bind(this)),this.getExperiment=this.wi(o.MemoPrefix.Vn,this.ki.bind(this)),this.getLayer=this.wi(o.MemoPrefix.$n,this.Di.bind(this)),this.getParameterStore=this.wi(o.MemoPrefix.Bn,this.Ri.bind(this)),this.We=new a.default(t),this.ht=r,this.He=this.xi(e,i),this.js=(0,o.getUUID)(),null!=(s=null==i?void 0:i.plugins)?s:[]);for(const n of t)n.bind(this)}initializeSync(t){var e;return"Uninitialized"!==this.loadingStatus?(0,o.createUpdateDetails)(!0,this.We.getSource(),-1,null,null,["MultipleInitializations",...null!=(e=this.We.getWarnings())?e:[]]):(this.pe.start(),this.updateUserSync(this.He,t))}initializeAsync(t){return n(this,void 0,void 0,function*(){return this.ve||(this.ve=this.Ye(t)),this.ve})}updateUserSync(e,t){var i=performance.now();try{return this.zi(e,t,i)}catch(t){e=t instanceof Error?t:new Error(String(t));return this.Ki(e,i)}}zi(t,e,i){var s=[...null!=(s=this.We.getWarnings())?s:[]],t=(this.Xe(t),this.dataAdapter.getDataSync(this.He)),e=(null==t&&s.push("NoCachedValues"),this.We.setValues(t,this.He),this.Qe(t),null==e?void 0:e.disableBackgroundCacheRefresh);return!0===e||null==e&&"Bootstrap"===(null==t?void 0:t.source)||this.Ze(null!=t?t:null,this.He),(0,o.createUpdateDetails)(!0,this.We.getSource(),performance.now()-i,this.$t.getLastSeenErrorAndReset(),this.ht.getLastUsedInitUrlAndReset(),s)}updateUserAsync(t,s){return n(this,void 0,void 0,function*(){var e=performance.now();try{return yield this.qi(t,s)}catch(t){var i=t instanceof Error?t:new Error(String(t));return this.Ki(i,e)}})}qi(s,r){return n(this,void 0,void 0,function*(){this.Xe(s);var t=this.He,e=(o.Diagnostics.B(this.O),this.dataAdapter.getDataSync(t));if(this.We.setValues(e,this.He),this.me("Loading",e),e=yield this.dataAdapter.getDataAsync(e,t,r),t!==this.He)return(0,o.createUpdateDetails)(!1,this.We.getSource(),-1,new Error("User changed during update"),this.ht.getLastUsedInitUrlAndReset());let i=!1;null!=e&&(o.Diagnostics.W(this.O),i=this.We.setValues(e,this.He),o.Diagnostics.H(this.O,{success:i})),this.Qe(e),i||(this.$t.attachErrorIfNoneExists(o.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),o.Diagnostics.V(this.O,i,this.We.getCurrentSourceDetails());t=o.Diagnostics.tt(this.He,this.pe,this.O,this.m);return(0,o.createUpdateDetails)(i,this.We.getSource(),t,this.$t.getLastSeenErrorAndReset(),this.ht.getLastUsedInitUrlAndReset(),this.We.getWarnings())})}getContext(){return{sdkKey:this.O,options:this.m,values:this.We.getValues(),user:JSON.parse(JSON.stringify(this.He)),errorBoundary:this.$t,session:o.StatsigSession.get(this.O),stableID:o.StableID.get(this.O),sdkInstanceID:this.js}}checkGate(t,e){return this.getFeatureGate(t,e).value}logEvent(t,e,i){e="string"==typeof t?{eventName:t,value:e,metadata:i}:t;this.$emt({name:"log_event_called",event:e}),this.pe.enqueue($P($P({},e),{user:this.He,time:Date.now()}))}updateUserWithAnalyticsOnlyMetadata(t){this.He=this.xi($P($P({},this.He),{analyticsOnlyMetadata:t}),this.m)}be(){this.$on("error",()=>{"Loading"===this.loadingStatus&&this.Qe(null)})}Ye(t){return n(this,void 0,void 0,function*(){return o.Storage.isReady()||(yield o.Storage.isReadyResolver()),this.pe.start(),this.updateUserAsync(this.He,t)})}Ki(t,e){return(0,o.createUpdateDetails)(!1,this.We.getSource(),performance.now()-e,t,null,[...null!=(e=this.We.getWarnings())?e:[]])}Qe(t){this.We.finalize(),this.me("Ready",t)}Ze(t,e){this.dataAdapter.getDataAsync(t,e,{priority:"low"}).catch(t=>{o.Log.error("An error occurred after update.",t)})}Xe(t){this.pe.reset(),this.We.reset(),this.He=this.xi(t,this.m)}xi(t,e){t=(0,o.T)(t,e),e=null==(e=t.customIDs)?void 0:e.stableID;return e&&o.StableID.setOverride(e,this.O),t.analyticsOnlyMetadata=$P($P({},t.analyticsOnlyMetadata),this.ar),t}Ti(t,e){var{result:i,details:s}=this.We.getGate(t),s=(0,o.Ee)(t,s,i),r=null==(r=null==(i=this.overrideAdapter)?void 0:i.getGateOverride)?void 0:r.call(i,s,this.He,e),i=null!=r?r:s;return this.ye(t,(0,o.Se)(this.He,i,this.We.getExposureMapping()),e),this.$emt({name:"gate_evaluation",gate:i}),i}Ii(t,e){var{result:i,details:s}=this.We.getConfig(t),s=(0,o.De)(t,s,i),r=null==(r=null==(i=this.overrideAdapter)?void 0:i.getDynamicConfigOverride)?void 0:r.call(i,s,this.He,e),i=null!=r?r:s;return this.ye(t,(0,o.je)(this.He,i,this.We.getExposureMapping()),e),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:i}),i}ki(t,e){var{result:i,details:s}=this.We.getConfig(t),s=(0,o.Ie)(t,s,i),r=(null!=s.__evaluation&&(s.__evaluation.secondary_exposures=(0,o.Ui)(null!=(i=null==(i=s.__evaluation)?void 0:i.secondary_exposures)?i:[],this.We.getExposureMapping())),null==(r=null==(i=this.overrideAdapter)?void 0:i.getExperimentOverride)?void 0:r.call(i,s,this.He,e)),i=null!=r?r:s;return this.ye(t,(0,o.je)(this.He,i,this.We.getExposureMapping()),e),this.$emt({name:"experiment_evaluation",experiment:i}),i}Di(e,i){var{result:t,details:s}=this.We.getLayer(e),s=(0,o.ke)(e,s,t),r=null==(r=null==(t=this.overrideAdapter)?void 0:t.getLayerOverride)?void 0:r.call(t,s,this.He,i);null!=i&&i.disableExposureLog&&this.pe.incrementNonExposureCount(e);const n=(0,o.Te)(s,r,null!=(t=null==r?void 0:r.__value)?t:s.__value,t=>{null!=i&&i.disableExposureLog||this.ye(e,(0,o.Oe)(this.He,n,t,this.We.getExposureMapping()),i)});return this.$emt({name:"layer_evaluation",layer:n}),n}Ri(t,e){var{result:i,details:s}=this.We.getParamStore(t),t=(this.pe.incrementNonExposureCount(t),{name:t,details:s,__configuration:i,get:(0,r.$e)(this,i,e)}),i=null==(i=null==(s=this.overrideAdapter)?void 0:s.getParamStoreOverride)?void 0:i.call(s,t,e);return null!=i&&(t.__configuration=i.config,t.details=i.details,t.get=(0,r.$e)(this,i.config,e)),t}}e.default=s},4131:function(t,e,i){var n=this&&this.__awaiter||$A();$Q(e),e.StatsigEvaluationsDataAdapter=void 0;const s=i(6914),r=i(8448);class o extends s.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this.ht=null,this.m=null}attach(t,e,i){super.attach(t,e,i),null!==i&&i instanceof r.default?this.ht=i:this.ht=new r.default(null!=e?e:{})}getDataAsync(t,e,i){return this.D(t,(0,s.T)(e,this.m),i)}prefetchData(t,e){return this.A(t,e)}setData(t){var e=(0,s.P)(t,"has_updates","data");e&&"user"in e?super.setData(t,e.user):s.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(t,e){super.setData(t,e)}R(e,i,s,r){return n(this,void 0,void 0,function*(){var t=yield null==(t=this.ht)?void 0:t.fetchEvaluations(this.C(),e,null==s?void 0:s.priority,i,r);return null!=t?t:null})}k(t){t=(0,s.o)(this.C(),t,null==(t=this.m)?void 0:t.customUserCacheKeyFunc);return`${s.DataAdapterCachePrefix}.${this.p}.`+t}N(t,e){return null!=t.fullUserHash&&t.fullUserHash===(0,s.v)(e)}}e.StatsigEvaluationsDataAdapter=o},2018:function(t,e,i){var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var r=Object.getOwnPropertyDescriptor(e,i);r&&("get"in r?e.__esModule:!r.writable&&!r.configurable)||(r={enumerable:!0,get:function(){return e[i]}}),$Q2(t,s,r)}:function(t,e,i,s){t[s=void 0===s?i:s]=e[i]}),r=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)},n=($Q(e),e.StatsigClient=void 0,i(6914)),o=i(8198),r=(e.StatsigClient=o.default,r(i(6914),e),$P((0,n.l)(),{StatsigClient:o.default}));e.default=r},8788:(t,e,i)=>{$Q(e),e.SessionReplay=e.runStatsigSessionReplay=e.StatsigSessionReplayPlugin=void 0;const s=i(6914);var r=i(4069);const n=i(5967);function o(t,e){new a(t,e)}e.StatsigSessionReplayPlugin=class{constructor(t){this.options=t,this.__plugin="session-replay"}bind(t){o(t,this.options)}},e.runStatsigSessionReplay=o;class a extends r.SessionReplayBase{constructor(t,e){super(t,e),this.tn.$on("values_updated",()=>{var t;this.ts||this.li(null==(t=this.m)?void 0:t.forceRecording)}),this.li(null==(t=this.m)?void 0:t.forceRecording)}ri(t){super.es(t)}li(t=!1){var e;this.ns>=n.MAX_LOGS||(!0===(null==(e=this.tn.getContext().values)?void 0:e.recording_blocked)||!t&&!0!==(null==e?void 0:e.can_record_session)||!1===(null==e?void 0:e.passes_session_recording_targeting)?this.ri():this.si.isRecording()||(this.ts=!1,s.StatsigMetadataProvider.add({isRecordingSession:"true"}),this.si.record((t,e)=>this.ci(t,e),null!=(e=null==(t=this.m)?void 0:t.rrwebConfig)?e:{},()=>{this.ri()})))}}e.SessionReplay=a},4069:(t,e,i)=>{$Q(e),e.SessionReplayBase=e.forceStartRecording=e.startRecording=e.stopRecording=void 0;const h=i(6914),s=i(759),u=i(5967);function r(t){var e=null==t?(0,h.l)().firstSRInstance:null==(e=null==(e=(0,h.l)())?void 0:e.srInstances)?void 0:e[t];return e instanceof n?e:null}e.stopRecording=function(t){null!=(t=r(t))&&t.stopRecording()},e.startRecording=function(t){null!=(t=r(t))&&t.startRecording()},e.forceStartRecording=function(t){null!=(t=r(t))&&t.forceStartRecording()};class n{constructor(t,e){this.ti={startTime:-1,endTime:0,clickCount:0},this.ei=[],this.ts=!1,this.ss=0,this.ns=0,this.tn=t,this.m=e;var{sdkKey:t,errorBoundary:e}=this.tn.getContext();this.$t=e,this.$t.wrap(this),this.si=new s.SessionReplayClient,this.tn.$on("pre_shutdown",()=>this.ri()),this.tn.on("session_expired",()=>{this.ri("session_expired")}),(0,h.kt)()||((e=(0,h.l)()).srInstances=$P($P({},e.srInstances),{[t]:this}),e.firstSRInstance)||(e.firstSRInstance=this),this.ii=this.ni(),this.ui()}forceStartRecording(){this.ts=!1,this.li(!0)}stopRecording(){this.ts=!0,this.ri()}startRecording(){var t;this.ts=!1,this.li(null==(t=this.m)?void 0:t.forceRecording)}isRecording(){return this.si.isRecording()}oi(t){0!==this.ei.length&&(t=(0,h.Rt)()?"is_leaving_page":t,this.vi(this.ii,t))}ai(t){"background"===t&&(this.oi(),this.tn.flush().catch(t=>{this.$t.logError("SR::visibility",t)}))}ui(){const i=this.tn.getContext()["sdkKey"];(0,h.It)(t=>{var e=null==(e=null==(e=(0,h.l)())?void 0:e.srInstances)?void 0:e[i];e instanceof n&&e.ai(t)})}vi(e,i){var s=this.ti;if(0!==this.ei.length){var r=JSON.stringify(this.ei),n=(0,u.rs)(r),o=1<n.length?(0,h.getUUID)():null;for(let t=0;t<n.length;t++){var a=n[t],l=(0,u.ls)(a,r,e,s,this.tn.getContext().sdkInstanceID);null!=o&&(0,u.os)(l.metadata,o,t,n.length,a.length),i&&(l.metadata[i]="true"),this.ns++,this.tn.logEvent(l),null!=o&&this.tn.flush().catch(t=>{h.Log.error(t)})}this.ei=[],this.ns>u.MAX_LOGS&&this.ri()}}di(){this.ni(),this.oi()}ni(){return this.tn.getContext().session.data.sessionID}es(t){this.si.isRecording()&&(this.si.stop(),h.StatsigMetadataProvider.add({isRecordingSession:"false"})),0!==this.ei.length&&this.oi(t),"session_expired"===t&&(this.ss=0,this.ti=this.us())}us(){return{startTime:-1,endTime:0,clickCount:0}}ci(t,e){var i;this.ii!==this.ni()?this.ri("session_expired"):this.ns>=u.MAX_LOGS?this.ri():(t.eventIndex=this.ss++,this.ti.clickCount+=e.clickCount,this.ti.startTime=-1===this.ti.startTime?e.startTime:Math.min(this.ti.startTime,e.startTime),this.ti.endTime=Math.max(this.ti.endTime,e.endTime),(e=(0,h.hi)(t,u.MAX_INDIVIDUAL_EVENT_BYTES))>u.MAX_INDIVIDUAL_EVENT_BYTES?h.Log.warn(`SessionReplay event is too large (~${e} bytes) and will not be logged`,t):(i=(0,h.hi)(this.ei,u.REPLAY_ENQUEUE_TRIGGER_BYTES),this.ei.push(t),i+e<u.REPLAY_ENQUEUE_TRIGGER_BYTES||((0,h.xe)()?this.di():this.oi())))}}e.SessionReplayBase=n},759:(t,e,i)=>{$Q(e),e.SessionReplayClient=void 0;const s=i(3597),o=i(6914);e.SessionReplayClient=class{constructor(){this.fi=null,this._i=null}record(r,t,e,n=!1){null==(0,o.de)()||(this.fi=null,this._i=null,this.bi=e,this.pi)||(this.pi=(e=(t,e)=>{var i;n?this.fi=!e&&null!=(i=this.fi)?i:t.timestamp:null==this.fi&&(this.fi=t.timestamp),this._i=t.timestamp;let s=0;3!==(i=t).type||2!==i.data.source||2!==i.data.type&&4!==i.data.type||s++,r($P($P({},t),{eventIndex:0}),{startTime:this.fi,endTime:this._i,clickCount:s},null!=e&&e),144e5<this._i-this.fi&&(null!=(t=this.pi)&&t.call(this),this.bi)&&this.bi()},t=t,n?(0,s.record)($P($P({},t),{emit:e,checkoutEveryNms:3e4})):(0,s.record)($P($P({},t),{emit:e}))))}stop(){this.pi&&(this.pi(),this.pi=void 0)}isRecording(){return null!=this.pi}}},5967:(t,e,i)=>{$Q(e),e.os=e.rs=e.ls=e.MAX_LOGS=e.MAX_INDIVIDUAL_EVENT_BYTES=e.REPLAY_ENQUEUE_TRIGGER_BYTES=void 0;const n=i(6914);e.REPLAY_ENQUEUE_TRIGGER_BYTES=10240,e.MAX_INDIVIDUAL_EVENT_BYTES=10485760,e.MAX_LOGS=1e4,e.ls=function(t,e,i,s,r){return{eventName:"statsig::session_recording",value:i,metadata:{session_start_ts:String(s.startTime),session_end_ts:String(s.endTime),clicks_captured_cumulative:String(s.clickCount),rrweb_events:t,rrweb_payload_size:String(e.length),session_replay_sdk_version:n.SDK_VERSION,sdk_instance_id:r}}},e.rs=function(e){var i=[];for(let t=0;t<e.length;t+=1048576)i.push(e.slice(t,t+1048576));return i},e.os=function(t,e,i,s,r){t.sliced_id=e,t.slice_index=String(i),t.slice_count=String(s),t.slice_byte_size=String(r)}},3691:(t,e,i)=>{$Q(e),e.TriggeredSessionReplay=e.runStatsigTriggeredSessionReplay=e.StatsigTriggeredSessionReplayPlugin=void 0;const r=i(6914);var s=i(4069);const n=i(5967);function o(t,e){new a(t,e)}e.StatsigTriggeredSessionReplayPlugin=class{constructor(t){this.options=t,this.__plugin="triggered-session-replay"}bind(t){o(t,this.options)}},e.runStatsigTriggeredSessionReplay=o;class a extends s.SessionReplayBase{constructor(t,e){super(t,e),this.cs=[],this.hs=!1,this.ds(e),null!=e&&e.autoStartRecording?this.li(null==(t=this.m)?void 0:t.forceRecording):null!=e&&e.keepRollingWindow&&this.vs()}ds(t){this.fs(t),this.gs(),this._s(),this.ps()}fs(e){this.tn.$on("values_updated",()=>{var t;this.ts||(null!=e&&e.autoStartRecording?this.li(null==(t=this.m)?void 0:t.forceRecording):null!=e&&e.keepRollingWindow&&this.vs())})}gs(){this.tn.$on("log_event_called",t=>{var e;this.ts||!1===(null==(e=this.tn.getContext().values)?void 0:e.passes_session_recording_targeting)||null==(null==e?void 0:e.session_recording_event_triggers)||null==(e=e.session_recording_event_triggers[t.event.eventName])||!1===e.passes_sampling||null!=(e=e.values)&&!e.includes(String(null!=(e=t.event.value)?e:""))||this.li(!0)})}_s(){this.tn.$on("gate_evaluation",t=>{this.bs(t.gate.name,String(t.gate.value))})}ps(){this.tn.$on("experiment_evaluation",t=>{this.bs(t.experiment.name,null!=(t=t.experiment.groupName)?t:"")})}bs(t,e){var i,s;this.ts||!1===(null==(s=this.tn.getContext().values)?void 0:s.passes_session_recording_targeting)||null==(null==s?void 0:s.session_recording_exposure_triggers)||null==(i=null!=(i=s.session_recording_exposure_triggers[t])?i:s.session_recording_exposure_triggers[(0,r.h)(t)])||!1===i.passes_sampling||null!=(s=i.values)&&!s.includes(e)||this.li(!0)}forceStartRecording(){super.forceStartRecording()}stopRecording(){this.hs=!1,this.cs=[],super.stopRecording()}ys(){if(this.hs=!0,0!==this.cs.length){var e=this.cs.map(t=>t.events).flat();for(let t=0;t<e.length;t++)e[t].event.eventIndex=t,this.ti.clickCount+=e[t].data.clickCount,this.ti.startTime=-1===this.ti.startTime?e[t].data.startTime:Math.min(this.ti.startTime,e[t].data.startTime),this.ti.endTime=Math.max(this.ti.endTime,e[t].data.endTime);this.ei=e.map(t=>t.event),this.ss=e.length,(0,r.xe)()?this.di():this.oi(),this.si.stop()}}ri(t){this.hs=!1,this.cs=[],super.es(t)}ci(t,e,i){if(!this.hs)return this.ii!==this.ni()?void this.ri("session_expired"):void(i&&4===t.type||0===this.cs.length?(1<this.cs.length&&this.cs.shift(),this.cs.push({events:[{event:t,data:e}]})):this.cs[this.cs.length-1].events.push({event:t,data:e}));super.ci(t,e)}vs(){var t=this.tn.getContext().values;!1===(null==t?void 0:t.passes_session_recording_targeting)?this.ri():this.si.isRecording()||this.si.record((t,e,i)=>this.ci(t,e,i),null!=(t=null==(t=this.m)?void 0:t.rrwebConfig)?t:{},()=>{this.ri()},!0)}li(t=!1){var e;this.ns>=n.MAX_LOGS||(!0===(null==(e=this.tn.getContext().values)?void 0:e.recording_blocked)||!t&&!0!==(null==e?void 0:e.can_record_session)||!1===(null==e?void 0:e.passes_session_recording_targeting)?this.ri():(this.ys(),this.ts=!1,r.StatsigMetadataProvider.add({isRecordingSession:"true"}),this.si.isRecording()||this.si.record((t,e,i)=>this.ci(t,e,i),null!=(e=null==(t=this.m)?void 0:t.rrwebConfig)?e:{},()=>{this.ri()})))}}e.TriggeredSessionReplay=a},3447:(t,e,i)=>{$Q(e),e.forceStartRecording=e.stopRecording=e.startRecording=e.StatsigTriggeredSessionReplayPlugin=e.StatsigSessionReplayPlugin=e.runStatsigTriggeredSessionReplay=e.runStatsigSessionReplay=e.SessionReplay=e.SessionReplayClient=void 0;var s=i(6914);const r=i(8788),n=($Q2(e,"SessionReplay",{enumerable:!0,get:function(){return r.SessionReplay}}),$Q2(e,"StatsigSessionReplayPlugin",{enumerable:!0,get:function(){return r.StatsigSessionReplayPlugin}}),$Q2(e,"runStatsigSessionReplay",{enumerable:!0,get:function(){return r.runStatsigSessionReplay}}),i(4069)),o=($Q2(e,"forceStartRecording",{enumerable:!0,get:function(){return n.forceStartRecording}}),$Q2(e,"startRecording",{enumerable:!0,get:function(){return n.startRecording}}),$Q2(e,"stopRecording",{enumerable:!0,get:function(){return n.stopRecording}}),i(759)),a=($Q2(e,"SessionReplayClient",{enumerable:!0,get:function(){return o.SessionReplayClient}}),i(3691));$Q2(e,"StatsigTriggeredSessionReplayPlugin",{enumerable:!0,get:function(){return a.StatsigTriggeredSessionReplayPlugin}}),$Q2(e,"runStatsigTriggeredSessionReplay",{enumerable:!0,get:function(){return a.runStatsigTriggeredSessionReplay}}),$P((0,s.l)(),{SessionReplayClient:o.SessionReplayClient,SessionReplay:r.SessionReplay,runStatsigSessionReplay:r.runStatsigSessionReplay,runStatsigTriggeredSessionReplay:a.runStatsigTriggeredSessionReplay,StatsigSessionReplayPlugin:r.StatsigSessionReplayPlugin,StatsigTriggeredSessionReplayPlugin:a.StatsigTriggeredSessionReplayPlugin,startRecording:n.startRecording,stopRecording:n.stopRecording,forceStartRecording:n.forceStartRecording})},3597:(_,A)=>{$Q2(A,Symbol.toStringTag,{value:"Module"});var M,j=Object.defineProperty,a=(t,e,i)=>{return i=i,(e="symbol"!=typeof e?e+"":e)in(t=t)?j(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},R=Object.defineProperty,x=(t,e,i)=>{return i=i,(e="symbol"!=typeof e?e+"":e)in(t=t)?R(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},X=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(X||{});const E={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},T={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},F={},B=()=>!!globalThis.Zone;function L(t){if(F[t])return F[t];var e=globalThis[t];const i=e.prototype;var s=t in E?E[t]:void 0,s=Boolean(s&&s.every(t=>{return Boolean(null==(t=null==(t=Object.getOwnPropertyDescriptor(i,t))?void 0:t.get)?void 0:t.toString().includes("[native code]"))})),r=t in T?T[t]:void 0,r=Boolean(r&&r.every(t=>{return"function"==typeof i[t]&&(null==(t=i[t])?void 0:t.toString().includes("[native code]"))}));if(s&&r&&!B())return F[t]=e.prototype,e.prototype;try{var n,o=document.createElement("iframe"),a=(document.body.appendChild(o),o.contentWindow);return a?(n=a[t].prototype,document.body.removeChild(o),n?F[t]=n:i):e.prototype}catch{return i}}const U={};function P(t,e,i){var s=t+"."+String(i);return U[s]?U[s].call(e):(t=L(t),(t=null==(t=Object.getOwnPropertyDescriptor(t,i))?void 0:t.get)?(U[s]=t).call(e):e[i])}const G={};function W(t,e,i){var s=t+"."+String(i);return G[s]?G[s].bind(e):"function"!=typeof(t=L(t)[i])?e[i]:(G[s]=t).bind(e)}const $={childNodes:function(t){return P("Node",t,"childNodes")},parentNode:function(t){return P("Node",t,"parentNode")},parentElement:function(t){return P("Node",t,"parentElement")},textContent:function(t){return P("Node",t,"textContent")},contains:function(t,e){return W("Node",t,"contains")(e)},getRootNode:function(t){return W("Node",t,"getRootNode")()},host:function(t){return t&&"host"in t?P("ShadowRoot",t,"host"):null},styleSheets:function(t){return t.styleSheets},shadowRoot:function(t){return t&&"shadowRoot"in t?P("Element",t,"shadowRoot"):null},querySelector:function(t,e){return P("Element",t,"querySelector")(e)},querySelectorAll:function(t,e){return P("Element",t,"querySelectorAll")(e)},mutationObserver:function(){return L("MutationObserver").constructor}};function z(t){return t.nodeType===t.ELEMENT_NODE}function Z(t){var e=t&&"host"in t&&"mode"in t&&$.host(t)||null;return Boolean(e&&"shadowRoot"in e&&$.shadowRoot(e)===t)}function V(t){return"[object ShadowRoot]"===Object.prototype.toString.call(t)}function st(t){try{var i=t.rules||t.cssRules;if(!i)return null;let e=t.href;!e&&t.ownerNode&&t.ownerNode.ownerDocument&&(e=t.ownerNode.ownerDocument.location.href);var s=Array.from(i,t=>Y(t,e)).join("");return r=(r=s).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")?r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;"):r}catch(t){return null}var r}function Y(i,e){if("styleSheet"in i){let e;try{e=st(i.styleSheet)||((s=(t=i).cssText).split('"').length<3?s:(s=["@import",`url(${JSON.stringify(t.href)})`],""===t.layerName?s.push("layer"):t.layerName&&s.push(`layer(${t.layerName})`),t.supportsText&&s.push(`supports(${t.supportsText})`),t.media.length&&s.push(t.media.mediaText),s.join(" ")+";"))}catch(t){e=i.cssText}return i.styleSheet.href?dt(e,i.styleSheet.href):e}{let t=i.cssText;return"selectorText"in i&&i.selectorText.includes(":")&&(t=t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),e?dt(t,e):t}var t,s}class rt{constructor(){x(this,"idNodeMap",new Map),x(this,"nodeMetaMap",new WeakMap)}getId(t){return t?(null==(t=this.getMeta(t))?void 0:t.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){var i=e.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,e)}replace(t,e){var i=this.getNode(t);i&&(i=this.nodeMetaMap.get(i))&&this.nodeMetaMap.set(e,i),this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function nt({element:t,maskInputOptions:e,tagName:i,type:s,value:r,maskInputFn:n}){let o=r||"";r=s&&ot(s);return o=e[i.toLowerCase()]||r&&e[r]?n?n(o,t):"*".repeat(o.length):o}function ot(t){return t.toLowerCase()}const at="__rrweb_original__";function lt(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?ot(e):null}function K(t,e){let i;try{i=new URL(t,e??window.location.href)}catch(t){return null}t=i.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==t?void 0:t[1])??null}const J=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ht=/^(?:[a-z+]+:)?\/\//i,ut=/^www\..*/i,ct=/^(data:)([^,]*),(.*)/i;function dt(t,l){return(t||"").replace(J,(t,e,i,s,r,n)=>{i=i||r||n,r=e||s||"";if(!i)return t;if(ht.test(i)||ut.test(i))return`url(${r}${i}${r})`;if(ct.test(i))return`url(${r}${i}${r})`;if("/"===i[0])return`url(${r}${function(t){let e="";return e=(e=-1<t.indexOf("//")?t.split("/").slice(0,3).join("/"):t.split("/")[0]).split("?")[0]}(l)+i}${r})`;var o=l.split("/"),n=i.split("/");o.pop();for(const a of n)"."!==a&&(".."===a?o.pop():o.push(a));return`url(${r}${o.join("/")}${r})`})}function ft(t){return t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function vt(t,e){return function(e,t){var i=Array.from(t.childNodes),s=[];if(1<i.length&&e&&"string"==typeof e){var r=ft(e);for(let t=1;t<i.length;t++)if(i[t].textContent&&"string"==typeof i[t].textContent){var n=ft(i[t].textContent);for(let t=3;t<n.length;t++){var o=n.substring(0,t);if(2===r.split(o).length){var a=r.indexOf(o);for(let t=a;t<e.length;t++)if(ft(e.substring(0,t)).length===a){s.push(e.substring(0,t)),e=e.substring(t);break}break}}}}return s.push(e),s}(t,e).join("/* rr_split */")}let pt=1;const mt=new RegExp("[^a-z0-9-_:]"),gt=-2;function yt(){return pt++}let bt,wt;const St=/^[^ \t\n\r\u000c]+/,It=/^[, \t\n\r\u000c]+/;function Ct(s,r){if(""===r.trim())return r;let n=0;function t(t){var t=t.exec(r.substring(n));return t?(t=t[0],n+=t.length,t):""}for(var o=[];t(It),!(n>=r.length);){let i=t(St);if(","===i.slice(-1))i=Ot(s,i.substring(0,i.length-1)),o.push(i);else{let t="",e=(i=Ot(s,i),!1);for(;;){var a=r.charAt(n);if(""===a){o.push((i+t).trim());break}if(e)")"===a&&(e=!1);else{if(","===a){n+=1,o.push((i+t).trim());break}"("===a&&(e=!0)}t+=a,n+=1}}}return o.join(", ")}const kt=new WeakMap;function Ot(t,e){return e&&""!==e.trim()?_t(t,e):e}function _t(t,e){let i=kt.get(t);if(i||(i=t.createElement("a"),kt.set(t,i)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return i.setAttribute("href",e),i.href}function At(t,e,i,s){return s&&("src"!==i&&("href"!==i||"use"===e&&"#"===s[0])&&("xlink:href"!==i||"#"===s[0])&&("background"!==i||"table"!==e&&"td"!==e&&"th"!==e)?"srcset"===i?Ct(t,s):"style"===i?dt(s,_t(t)):"object"===e&&"data"===i?Ot(t,s):s:Ot(t,s))}function Mt(t,e){return("video"===t||"audio"===t)&&"autoplay"===e}function jt(e,i,t){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!t&&jt($.parentNode(e),i,t);for(let t=e.classList.length;t--;){var s=e.classList[t];if(i.test(s))return!0}return!!t&&jt($.parentNode(e),i,t)}function Rt(t,e,i,s){let r;if(z(t)){if(r=t,!$.childNodes(r).length)return!1}else{if(null===$.parentElement(t))return!1;r=$.parentElement(t)}try{if("string"==typeof e){if(s){if(r.closest("."+e))return!0}else if(r.classList.contains(e))return!0}else if(jt(r,e,s))return!0;if(i)if(s){if(r.closest(i))return!0}else if(r.matches(i))return!0}catch(t){}return!1}function xt(i,t){var e,s,r,{doc:n,mirror:t,blockClass:o,blockSelector:a,needsMask:l,inlineStylesheet:h,maskInputOptions:F={},maskTextFn:B,maskInputFn:L,dataURLOptions:U={},inlineImages:P,recordCanvas:G,keepIframeSrcFn:W,newlyAddedElement:z=!1,cssCaptured:Z=!1}=t,u=(e=n,!(t=t).hasNode(e)||1===(t=t.getId(e))?void 0:t);switch(i.nodeType){case i.DOCUMENT_NODE:return"CSS1Compat"!==i.compatMode?{type:X.Document,childNodes:[],compatMode:i.compatMode}:{type:X.Document,childNodes:[]};case i.DOCUMENT_TYPE_NODE:return{type:X.DocumentType,name:i.name,publicId:i.publicId,systemId:i.systemId,rootId:u};case i.ELEMENT_NODE:{var c=i;var d={doc:n,blockClass:o,blockSelector:a,inlineStylesheet:h,maskInputOptions:F,maskInputFn:L,dataURLOptions:U,inlineImages:P,recordCanvas:G,keepIframeSrcFn:W,newlyAddedElement:z,rootId:u};const{doc:y,blockClass:b,blockSelector:w,inlineStylesheet:S,maskInputOptions:I={},maskInputFn:C,dataURLOptions:k={},inlineImages:O,recordCanvas:_,keepIframeSrcFn:A,newlyAddedElement:M=!1,rootId:j}=d,R=function(e,i,t){try{if("string"==typeof i){if(e.classList.contains(i))return!0}else for(let t=e.classList.length;t--;){var s=e.classList[t];if(i.test(s))return!0}if(t)return e.matches(t)}catch(t){}return!1}(c,b,w),x=function(t){return t instanceof HTMLFormElement?"form":(t=ot(t.tagName),mt.test(t)?"div":t)}(c);let e={};var V=c.attributes.length;for(let t=0;t<V;t++){var f=c.attributes[t];Mt(x,f.name,f.value)||(e[f.name]=At(y,x,ot(f.name),f.value))}if("link"===x&&S){d=Array.from(y.styleSheets).find(t=>t.href===c.href);let t=null;(t=d?st(d):t)&&(delete e.rel,delete e.href,e.ws=t)}if("style"===x&&c.sheet){let t=st(c.sheet);t&&(1<c.childNodes.length&&(t=vt(t,c)),e.ws=t)}"input"!==x&&"textarea"!==x&&"select"!==x||(d=c.value,s=c.checked,"radio"!==e.type&&"checkbox"!==e.type&&"submit"!==e.type&&"button"!==e.type&&d?e.value=nt({element:c,type:lt(c),tagName:x,value:d,maskInputOptions:I,maskInputFn:C}):s&&(e.checked=s));"option"===x&&(c.selected&&!I.select?e.selected=!0:delete e.selected);"dialog"===x&&c.open&&(e.rr_open_mode=c.matches("dialog:modal")?"modal":"non-modal");"canvas"===x&&_&&("2d"===c.__context?function(i){var s=i.getContext("2d");if(s)for(let e=0;e<i.width;e+=50)for(let t=0;t<i.height;t+=50){var r=s.getImageData,r=at in r?r[at]:r;if(new Uint32Array(r.call(s,e,t,Math.min(50,i.width-e),Math.min(50,i.height-t)).data.buffer).some(t=>0!==t))return}return 1}(c)||(e.rr_dataURL=c.toDataURL(k.type,k.quality)):"__context"in c||(d=c.toDataURL(k.type,k.quality),(s=y.createElement("canvas")).width=c.width,s.height=c.height,r=s.toDataURL(k.type,k.quality),d!==r&&(e.rr_dataURL=d)));if("img"===x&&O){bt||(bt=y.createElement("canvas"),wt=bt.getContext("2d"));const E=c,T=E.currentSrc||E.getAttribute("src")||"<unknown-src>",N=E.crossOrigin,D=()=>{E.removeEventListener("load",D);try{bt.width=E.naturalWidth,bt.height=E.naturalHeight,wt.drawImage(E,0,0),e.rr_dataURL=bt.toDataURL(k.type,k.quality)}catch(t){if("anonymous"!==E.crossOrigin)return E.crossOrigin="anonymous",void(E.complete&&0!==E.naturalWidth?D():E.addEventListener("load",D));console.warn(`Cannot inline img src=${T}! Error: `+t)}"anonymous"===E.crossOrigin&&(N?e.crossOrigin=N:E.removeAttribute("crossorigin"))};E.complete&&0!==E.naturalWidth?D():E.addEventListener("load",D)}"audio"!==x&&"video"!==x||((r=e).rr_mediaState=c.paused?"paused":"played",r.rr_mediaCurrentTime=c.currentTime,r.rr_mediaPlaybackRate=c.playbackRate,r.rr_mediaMuted=c.muted,r.rr_mediaLoop=c.loop,r.rr_mediaVolume=c.volume);M||(c.scrollLeft&&(e.rr_scrollLeft=c.scrollLeft),c.scrollTop&&(e.rr_scrollTop=c.scrollTop));R&&({width:d,height:v}=c.getBoundingClientRect(),e={class:e.class,rr_width:d+"px",rr_height:v+"px"});"iframe"!==x||A(e.src)||(c.contentDocument||(e.rr_src=e.src),delete e.src);let t;try{customElements.get(x)&&(t=!0)}catch(t){}return{type:X.Element,tagName:x,attributes:e,childNodes:[],isSVG:function(t){return Boolean("svg"===t.tagName||t.ownerSVGElement)}(c)||void 0,needBlock:R,rootId:j,isCustom:t};return}case i.TEXT_NODE:{d=i;var v={doc:n,needsMask:l,maskTextFn:B,rootId:u,cssCaptured:Z};var{needsMask:Y,maskTextFn:p,rootId:K,cssCaptured:J}=v,m=$.parentNode(d),m=m&&m.tagName;let t="";var g="STYLE"===m||void 0,m="SCRIPT"===m||void 0;m?t="SCRIPT_PLACEHOLDER":J||(t=$.textContent(d),g&&(t=t&&dt(t,_t(v.doc))));!g&&!m&&t&&Y&&(t=p?p(t,$.parentElement(d)):t.replace(/[\S]/g,"*"));return{type:X.Text,textContent:t||"",rootId:K};return}case i.CDATA_SECTION_NODE:return{type:X.CDATA,textContent:"",rootId:u};case i.COMMENT_NODE:return{type:X.Comment,textContent:$.textContent(i)||"",rootId:u};default:return!1}}function D(t){return null==t?"":t.toLowerCase()}function Et(e,t){const{doc:i,mirror:s,blockClass:r,blockSelector:n,maskTextClass:o,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:h=!0,maskInputOptions:u={},maskTextFn:c,maskInputFn:d,slimDOMOptions:f,dataURLOptions:v={},inlineImages:p=!1,recordCanvas:m=!1,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:b=5e3,onStylesheetLoad:w,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:I=()=>!1,newlyAddedElement:C=!1,cssCaptured:k=!1}=t;let O=t["needsMask"],{preserveWhiteSpace:_=!0}=t;O||(t=void 0===O,O=Rt(e,o,a,t));t=xt(e,{doc:i,mirror:s,blockClass:r,blockSelector:n,needsMask:O,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,dataURLOptions:v,inlineImages:p,recordCanvas:m,keepIframeSrcFn:I,newlyAddedElement:C,cssCaptured:k});if(!t)return console.warn(e,"not serialized"),null;let A;A=s.hasNode(e)?s.getId(e):function(t,e){if(e.comment&&t.type===X.Comment)return 1;if(t.type===X.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===K(t.attributes.href)))return 1;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(D(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===D(t.attributes.name)||"icon"===D(t.attributes.rel)||"apple-touch-icon"===D(t.attributes.rel)||"shortcut icon"===D(t.attributes.rel))))return 1;if("meta"===t.tagName){if(e.headMetaDescKeywords&&D(t.attributes.name).match(/^description|keywords$/))return 1;if(e.headMetaSocial&&(D(t.attributes.property).match(/^(og|twitter|fb):/)||D(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===D(t.attributes.name)))return 1;if(e.headMetaRobots&&("robots"===D(t.attributes.name)||"googlebot"===D(t.attributes.name)||"bingbot"===D(t.attributes.name)))return 1;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return 1;if(e.headMetaAuthorship&&("author"===D(t.attributes.name)||"generator"===D(t.attributes.name)||"framework"===D(t.attributes.name)||"publisher"===D(t.attributes.name)||"progid"===D(t.attributes.name)||D(t.attributes.property).match(/^article:/)||D(t.attributes.property).match(/^product:/)))return 1;if(e.headMetaVerification&&("google-site-verification"===D(t.attributes.name)||"yandex-verification"===D(t.attributes.name)||"csrf-token"===D(t.attributes.name)||"p:domain_verify"===D(t.attributes.name)||"verify-v1"===D(t.attributes.name)||"verification"===D(t.attributes.name)||"shopify-checkout-api-token"===D(t.attributes.name)))return 1}}}(t,f)||!_&&t.type===X.Text&&!t.textContent.replace(/^\s+|\s+$/gm,"").length?gt:pt++;var M=$P(t,{id:A});if(s.add(e,M),A===gt)return null;g&&g(e);let j=!l;if(M.type===X.Element&&(j=j&&!M.needBlock,delete M.needBlock,t=$.shadowRoot(e))&&V(t)&&(M.isShadowHost=!0),(M.type===X.Document||M.type===X.Element)&&j){f.headWhitespace&&M.type===X.Element&&"head"===M.tagName&&(_=!1);var R={doc:i,mirror:s,blockClass:r,blockSelector:n,needsMask:O,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,slimDOMOptions:f,dataURLOptions:v,inlineImages:p,recordCanvas:m,preserveWhiteSpace:_,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:S,keepIframeSrcFn:I,cssCaptured:!1};if(M.type!==X.Element||"textarea"!==M.tagName||void 0===M.attributes.value){M.type===X.Element&&void 0!==M.attributes.ws&&"string"==typeof M.attributes.ws&&(R.cssCaptured=!0);for(const T of Array.from($.childNodes(e))){var x=Et(T,R);x&&M.childNodes.push(x)}}let t=null;if(z(e)&&(t=$.shadowRoot(e)))for(const N of Array.from($.childNodes(t))){var E=Et(N,R);E&&(V(t)&&(E.isShadow=!0),M.childNodes.push(E))}}t=$.parentNode(e);return t&&Z(t)&&V(t)&&(M.isShadow=!0),M.type===X.Element&&"iframe"===M.tagName&&function(i,s,r){var n=i.contentWindow;if(n){let t=!1,e;try{e=n.document.readyState}catch(t){return}if("complete"!==e){const o=setTimeout(()=>{t||(s(),t=!0)},r);void i.addEventListener("load",()=>{clearTimeout(o),t=!0,s()})}else{r="about:blank";if(n.location.href!==r||i.src===r||""===i.src)return setTimeout(s,0),i.addEventListener("load",s);i.addEventListener("load",s)}}}(e,()=>{var t=e.contentDocument;t&&y&&(t=Et(t,{doc:t,mirror:s,blockClass:r,blockSelector:n,needsMask:O,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,slimDOMOptions:f,dataURLOptions:v,inlineImages:p,recordCanvas:m,preserveWhiteSpace:_,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:S,keepIframeSrcFn:I}))&&y(e,t)},b),M.type===X.Element&&"link"===M.tagName&&"string"==typeof M.attributes.rel&&("stylesheet"===M.attributes.rel||"preload"===M.attributes.rel&&"string"==typeof M.attributes.href&&"css"===K(M.attributes.href))&&function(t,e,i){let s=!1,r;try{r=t.sheet}catch(t){return}if(!r){const n=setTimeout(()=>{s||(e(),s=!0)},i);t.addEventListener("load",()=>{clearTimeout(n),s=!0,e()})}}(e,()=>{var t;w&&(t=Et(e,{doc:i,mirror:s,blockClass:r,blockSelector:n,needsMask:O,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,slimDOMOptions:f,dataURLOptions:v,inlineImages:p,recordCanvas:m,preserveWhiteSpace:_,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:S,keepIframeSrcFn:I}))&&w(e,t)},S),M}function Tt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Nt(i){var e,s;return i.__esModule?i:("function"==typeof(e=i.default)?(s=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)}).prototype=e.prototype:s={},$Q2(s,"__esModule",{value:!0}),Object.keys(i).forEach(function(t){var e=Object.getOwnPropertyDescriptor(i,t);$Q2(s,t,e.get?e:{enumerable:!0,get:function(){return i[t]}})}),s)}function Dt(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}}var t={exports:{}},e=String,t=(t.exports=Dt(),t.exports.createColors=Dt,t.exports),i=Nt(Object.freeze($Q2({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Ft=t,Bt=i;var t=class Go extends Error{constructor(t,e,i,s,r,n){super(t),this.name="CssSyntaxError",this.reason=t,r&&(this.file=r),s&&(this.source=s),n&&(this.plugin=n),void 0!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Go)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let e=this.source;null==t&&(t=Ft.isColorSupported);var i=(e=Bt&&t?Bt(e):e).split(/\r?\n/);let s=Math.max(this.line-3,0);var r=Math.min(this.line+2,i.length);let n=String(r).length,o,a;if(t){let{bold:e,gray:i,red:s}=Ft.createColors(!0);o=t=>e(s(t)),a=t=>i(t)}else o=a=t=>t;return i.slice(s,r).map((t,e)=>{var e=s+1+e,i=" "+(" "+e).slice(-n)+" | ";return e===this.line?(e=a(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," "),o(">")+a(i)+t+"\n "+e+o("^")):" "+a(i)+t}).join("\n")}toString(){let t=this.showSourceCode();return t=t&&"\n\n"+t+"\n",this.name+": "+this.message+t}},s=t,t=(t.default=t,{});t.isClean=Symbol("isClean"),t.my=Symbol("my");const Lt={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var r=class{constructor(t){this.builder=t}atrule(t,e){let i="@"+t.name;var s=t.params?this.rawValue(t,"params"):"";void 0!==t.raws.afterName?i+=t.raws.afterName:s&&(i+=" "),t.nodes?this.block(t,i+s):(e=(t.raws.between||"")+(e?";":""),this.builder(i+s+e,t))}beforeAfter(t,e){let i,s=(i="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose"),t.parent),r=0;for(;s&&"root"!==s.type;)r+=1,s=s.parent;if(i.includes("\n")){var n=this.raw(t,null,"indent");if(n.length)for(let t=0;t<r;t++)i+=n}return i}block(t,e){var i=this.raw(t,"between","beforeOpen");this.builder(e+i+"{",t,"start");let s;(s=t.nodes&&t.nodes.length?(this.body(t),this.raw(t,"after")):this.raw(t,"after","emptyBody"))&&this.builder(s),this.builder("}",t,"end")}body(e){let i=e.nodes.length-1;for(;0<i&&"comment"===e.nodes[i].type;)--i;var s=this.raw(e,"semicolon");for(let t=0;t<e.nodes.length;t++){var r=e.nodes[t],n=this.raw(r,"before");n&&this.builder(n),this.stringify(r,i!==t||s)}}comment(t){var e=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+i+"*/",t)}decl(t,e){var i=this.raw(t,"between","colon");let s=t.prop+i+this.rawValue(t,"value");t.important&&(s+=t.raws.important||" !important"),e&&(s+=";"),this.builder(s,t)}document(t){this.body(t)}raw(t,e,i){let s;if(i=i||e,!e||void 0===(s=t.raws[e])){var r=t.parent;if("before"===i){if(!r||"root"===r.type&&r.first===t)return"";if(r&&"document"===r.type)return""}if(!r)return Lt[i];r=t.root();if(r.rawCache||(r.rawCache={}),void 0!==r.rawCache[i])return r.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(t,i);var n="raw"+((n=i)[0].toUpperCase()+n.slice(1));this[n]?s=this[n](r,t):r.walk(t=>{if(void 0!==(s=t.raws[e]))return!1}),void 0===s&&(s=Lt[i]),r.rawCache[i]=s}return s}rawBeforeClose(t){let e;return t.walk(t=>{if(t.nodes&&0<t.nodes.length&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e=e&&e.replace(/\S/g,"")}rawBeforeComment(t,e){let i;return t.walkComments(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=void 0===i?this.raw(e,null,"beforeDecl"):i&&i.replace(/\S/g,"")}rawBeforeDecl(t,e){let i;return t.walkDecls(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=void 0===i?this.raw(e,null,"beforeRule"):i&&i.replace(/\S/g,"")}rawBeforeOpen(t){let e;return t.walk(t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1}),e}rawBeforeRule(e){let i;return e.walk(t=>{if(t.nodes&&(t.parent!==e||e.first!==t)&&void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=i&&i.replace(/\S/g,"")}rawColon(t){let e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1}),e}rawIndent(i){if(i.raws.indent)return i.raws.indent;let s;return i.walk(t=>{var e=t.parent;if(e&&e!==i&&e.parent&&e.parent===i&&void 0!==t.raws.before)return e=t.raws.before.split("\n"),s=(s=e[e.length-1]).replace(/\S/g,""),!1}),s}rawSemicolon(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1}),e}rawValue(t,e){var i=t[e],t=t.raws[e];return t&&t.value===i?t.raw:i}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},n=r;r.default=r;let Ut=n;function Pt(t,e){new Ut(e).stringify(t)}r=Pt;Pt.default=Pt;let{isClean:Gt,my:Wt}=t,zt=s,Zt=n,Vt=r;function Yt(e,i){let s=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){let t=e[r];var n=typeof t;"parent"===r&&"object"==n?i&&(s[r]=i):"source"===r?s[r]=t:Array.isArray(t)?s[r]=t.map(t=>Yt(t,s)):("object"==n&&null!==t&&(t=Yt(t)),s[r]=t)}return s}var n=class{constructor(t={}){for(var e in this.raws={},this[Gt]=!1,this[Wt]=!0,t)if("nodes"===e){this.nodes=[];for(var i of t[e])"function"==typeof i.clone?this.append(i.clone()):this.append(i)}else this[e]=t[e]}addToError(t){var e;return t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)&&(e=this.source,t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)),t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(var e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){var e,i=Yt(this);for(e in t)i[e]=t[e];return i}cloneAfter(t={}){t=this.clone(t);return this.parent.insertAfter(this,t),t}cloneBefore(t={}){t=this.clone(t);return this.parent.insertBefore(this,t),t}error(t,e={}){var i,s;return this.source?({end:i,start:s}=this.rangeBy(e),this.source.input.error(t,{column:s.column,line:s.line},{column:i.column,line:i.line},e)):new zt(t)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,i){return t[e]!==i&&(t[e]=i,"prop"===e||"value"===e||"name"===e||"params"===e||"important"===e||"text"===e)&&t.markDirty(),!0}}}markDirty(){if(this[Gt]){this[Gt]=!1;let t=this;for(;t=t.parent;)t[Gt]=!1}}next(){var t;if(this.parent)return t=this.parent.index(this),this.parent.nodes[t+1]}positionBy(t,e){let i=this.source.start;return t.index?i=this.positionInside(t.index,e):t.word&&-1!==(t=(e=this.toString()).indexOf(t.word))&&(i=this.positionInside(t,e)),i}positionInside(e,t){var i=t||this.toString();let s=this.source.start.column,r=this.source.start.line;for(let t=0;t<e;t++)"\n"===i[t]?(s=1,r+=1):s+=1;return{column:s,line:r}}prev(){var t;if(this.parent)return t=this.parent.index(this),this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};var s,r;return t.word?-1!==(r=(s=this.toString()).indexOf(t.word))&&(e=this.positionInside(r,s),i=this.positionInside(r+t.word.length,s)):(t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):t.index&&(i=this.positionInside(t.index+1))),{end:i=i.line<e.line||i.line===e.line&&i.column<=e.column?{column:e.column+1,line:e.line}:i,start:e}}raw(t,e){return(new Zt).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...i){if(this.parent){let t=this,e=!1;for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){let t=this;for(;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var i,s={},r=null==e;e=e||new Map;let n=0;for(i in this)if(Object.prototype.hasOwnProperty.call(this,i)&&"parent"!==i&&"proxyCache"!==i){var o=this[i];if(Array.isArray(o))s[i]=o.map(t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t);else if("object"==typeof o&&o.toJSON)s[i]=o.toJSON(null,e);else if("source"===i){let t=e.get(o.input);null==t&&(t=n,e.set(o.input,n),n++),s[i]={end:o.end,inputId:t,start:o.start}}else s[i]=o}return r&&(s.inputs=[...e.keys()].map(t=>t.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=Vt){t.stringify&&(t=t.stringify);let e="";return t(this,t=>{e+=t}),e}warn(t,e,i){var s,r={node:this};for(s in i)r[s]=i[s];return t.warn(e,r)}get proxyOf(){return this}},o=n,n=(n.default=n,o),n=class extends n{constructor(t){super(t=t&&void 0!==t.value&&"string"!=typeof t.value?{...t,value:String(t.value)}:t),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}},l=n;n.default=n;n={nanoid:(t=21)=>{let e="",i=t;for(;i--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(s,r=21)=>(t=r)=>{let e="",i=t;for(;i--;)e+=s[Math.random()*s.length|0];return e}};let{SourceMapConsumer:Kt,SourceMapGenerator:Jt}=i,{existsSync:Xt,readFileSync:$t}=i,{dirname:Ht,join:qt}=i;var h=class{constructor(t,e){!1!==e.map&&(this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:"),t=e.map?e.map.prev:void 0,t=this.loadMap(e.from,t),!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Ht(this.mapFile)),t)&&(this.text=t)}consumer(){return this.consumerCache||(this.consumerCache=new Kt(this.text)),this.consumerCache}decodeInline(t){if(/^data:application\/json;charset=utf-?8,/.test(t)||/^data:application\/json,/.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(t)||/^data:application\/json;base64,/.test(t))return e=t.substr(RegExp.lastMatch.length),Buffer?Buffer.from(e,"base64").toString():window.atob(e);var e=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+e)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e,i=t.match(/\/\*\s*# sourceMappingURL=/gm);i&&(i=t.lastIndexOf(i.pop()),e=t.indexOf("*/",i),-1<i)&&-1<e&&(this.annotation=this.getAnnotationURL(t.substring(i,e)))}loadFile(t){if(this.root=Ht(t),Xt(t))return this.mapFile=t,$t(t,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Kt)return Jt.fromSourceMap(t).toString();if(t instanceof Jt)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}t=t(e);if(t){var i=this.loadFile(t);if(i)return i;throw new Error("Unable to load previous source map: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=qt(Ht(e),t)),this.loadFile(t)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}},u=h,{SourceMapConsumer:h,SourceMapGenerator:c}=(h.default=h,i);let{fileURLToPath:Qt,pathToFileURL:te}=i,{isAbsolute:ee,resolve:ie}=i,se=n["nanoid"];n=i;let re=s,ne=u,oe=Symbol("fromOffsetCache"),ae=Boolean(h&&c),le=Boolean(ie&&ee);h=class{constructor(t,e={}){if(null==t||"object"==typeof t&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);this.css=t.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,e.from&&(!le||/^\w+:\/\//.test(e.from)||ee(e.from)?this.file=e.from:this.file=ie(e.from)),le&&ae&&(t=new ne(this.css,e)).text&&(e=(this.map=t).consumer().file,!this.file)&&e&&(this.file=this.mapResolve(e)),this.file||(this.id="<input css "+se(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,i,s={}){let r,n,o;e&&"object"==typeof e?(a=i,i="number"==typeof(l=e).offset?(e=(h=this.fromOffset(l.offset)).line,h.col):(e=l.line,l.column),o="number"==typeof a.offset?(h=this.fromOffset(a.offset),n=h.line,h.col):(n=a.line,a.column)):i||(e=(l=this.fromOffset(e)).line,i=l.col);var a,l,h=this.origin(e,i,n,o);return(r=h?new re(t,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,s.plugin):new re(t,void 0===n?e:{column:i,line:e},void 0===n?i:{column:o,line:n},this.css,this.file,s.plugin)).input={column:i,endColumn:o,endLine:n,line:e,source:this.css},this.file&&(te&&(r.input.url=te(this.file).toString()),r.input.file=this.file),r}fromOffset(e){let s;if(this[oe])s=this[oe];else{var r=this.css.split("\n");s=new Array(r.length);let i=0;for(let t=0,e=r.length;t<e;t++)s[t]=i,i+=r[t].length+1;this[oe]=s}let i=0;if(s[s.length-1]<=e)i=s.length-1;else{let t=s.length-2;for(var n;i<t;)if(n=i+(t-i>>1),e<s[n])t=n-1;else{if(!(e>=s[n+1])){i=n;break}i=n+1}}return{col:e-s[i]+1,line:i+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:ie(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,i,s){if(!this.map)return!1;var r=this.map.consumer(),e=r.originalPositionFor({column:e,line:t});if(!e.source)return!1;let n;"number"==typeof i&&(n=r.originalPositionFor({column:s,line:i}));let o;o=ee(e.source)?te(e.source):new URL(e.source,this.map.consumer().sourceRoot||te(this.map.mapFile));t={column:e.column,endColumn:n&&n.column,endLine:n&&n.line,line:e.line,url:o.toString()};if("file:"===o.protocol){if(!Qt)throw new Error("file: protocol is not available in this PostCSS build");t.file=Qt(o)}s=r.sourceContentFor(e.source);return s&&(t.source=s),t}toJSON(){var t,e={};for(t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache)&&(e.map.consumerCache=void 0),e}get from(){return this.file||this.id}},c=h;h.default=h,n&&n.registerInput&&n.registerInput(h);let{SourceMapConsumer:he,SourceMapGenerator:ue}=i,{dirname:ce,relative:de,resolve:fe,sep:ve}=i,pe=i["pathToFileURL"],me=c,ge=Boolean(he&&ue),ye=Boolean(ce&&fe&&de&&ve);n=class{constructor(t,e,i,s){this.stringify=t,this.mapOpts=i.map||{},this.root=e,this.opts=i,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t,e=(t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map","\n");this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var i=this.toUrl(this.path(e.file)),s=e.root||ce(e.file);let t;!1===this.mapOpts.sourcesContent?(t=new he(e.text)).sourcesContent&&(t.sourcesContent=null):t=e.consumer(),this.map.applySourceMap(t,i,this.toUrl(this.path(s)))}}clearAnnotation(){var e;if(!1!==this.mapOpts.annotation)if(this.root)for(let t=this.root.nodes.length-1;0<=t;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),ye&&ge&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){var t;return this.root?this.generateString():1===this.previous().length?((t=this.previous()[0].consumer()).file=this.outputFile(),this.map=ue.fromSourceMap(t,{ignoreInvalidMapping:!0})):(this.map=new ue({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 ue({file:this.outputFile(),ignoreInvalidMapping:!0});let s=1,r=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""},a,l;this.stringify(this.root,(t,e,i)=>{this.css+=t,e&&"end"!==i&&(o.generated.line=s,o.generated.column=r-1,e.source&&e.source.start?(o.source=this.sourcePath(e),o.original.line=e.source.start.line,o.original.column=e.source.start.column-1):(o.source=n,o.original.line=1,o.original.column=0),this.map.addMapping(o)),(a=t.match(/\n/g))?(s+=a.length,l=t.lastIndexOf("\n"),r=t.length-l):r+=t.length,e&&"start"!==i&&(t=e.parent||{raws:{}},"decl"!==e.type&&("atrule"!==e.type||e.nodes)||e!==t.last||t.raws.semicolon)&&(e.source&&e.source.end?(o.source=this.sourcePath(e),o.original.line=e.source.end.line,o.original.column=e.source.end.column-1,o.generated.line=s,o.generated.column=r-2):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=s,o.generated.column=r-1),this.map.addMapping(o))})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){var t;return void 0!==this.mapOpts.inline?this.mapOpts.inline:(void 0===(t=this.mapOpts.annotation)||!0===t)&&(!this.previous().length||this.previous().some(t=>t.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:0<this.previous().length}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;var e=this.memoizedPaths.get(t);if(e)return e;let i=this.opts.to?ce(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(i=ce(fe(i,this.mapOpts.annotation)));e=de(i,t);return this.memoizedPaths.set(t,e),e}previous(){var t;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(t=>{t.source&&t.source.input.map&&(t=t.source.input.map,this.previousMaps.includes(t)||this.previousMaps.push(t))}):(t=new me(this.originalCSS,this.opts)).map&&this.previousMaps.push(t.map)),this.previousMaps}setSourcesContent(){let i={};var t;this.root?this.root.walk(t=>{var e;t.source&&(e=t.source.input.from)&&!i[e]&&(i[e]=!0,e=this.usesFileUrls?this.toFileUrl(e):this.toUrl(this.path(e)),this.map.setSourceContent(e,t.source.input.css))}):this.css&&(t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(t,this.css))}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(pe)return e=pe(t).toString(),this.memoizedFileURLs.set(t,e),e;throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===ve&&(t=t.replace(/\\/g,"/"));e=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,e),e}},h=class extends o{constructor(t){super(t),this.type="comment"}},i=h;h.default=h;let{isClean:be,my:we}=t,Se=l,Ie=i,Ce,ke,Oe,_e;let Ae=class Wo extends o{append(...t){for(var e of t){var i;for(i of this.normalize(e,this.last))this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.cleanRaws(t)}each(i){if(this.proxyOf.nodes){var s=this.getIterator();let t,e;for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],!1!==(e=i(this.proxyOf.nodes[t],t)));)this.indexes[s]+=1;return delete this.indexes[s],e}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(e,s){return"proxyOf"===s?e:e[s]&&("each"===s||"string"==typeof s&&s.startsWith("walk")?(...t)=>e[s](...t.map(i=>"function"==typeof i?(t,e)=>i(t.toProxy(),e):i)):"every"===s||"some"===s?i=>e[s]((t,...e)=>i(t.toProxy(),...e)):"root"===s?()=>e.root().toProxy():"nodes"===s?e.nodes.map(t=>t.toProxy()):"first"===s||"last"===s?e[s].toProxy():e[s])},set(t,e,i){return t[e]!==i&&(t[e]=i,"name"===e||"params"===e||"selector"===e)&&t.markDirty(),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var i,s,r,n=this.index(t),o=this.normalize(e,this.proxyOf.nodes[n]).reverse(),n=this.index(t);for(i of o)this.proxyOf.nodes.splice(n+1,0,i);for(r in this.indexes)n<(s=this.indexes[r])&&(this.indexes[r]=s+o.length);return this.markDirty(),this}insertBefore(t,e){var i,s,r,n=this.index(t),o=this.normalize(e,this.proxyOf.nodes[n],0===n&&"prepend").reverse(),n=this.index(t);for(i of o)this.proxyOf.nodes.splice(n,0,i);for(r in this.indexes)n<=(s=this.indexes[r])&&(this.indexes[r]=s+o.length);return this.markDirty(),this}normalize(t,e){if("string"==typeof t)t=function e(t){return t.map(t=>(t.nodes&&(t.nodes=e(t.nodes)),delete t.source,t))}(Ce(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t))for(var i of t=t.slice(0))i.parent&&i.parent.removeChild(i,"ignore");else if("root"===t.type&&"document"!==this.type)for(var s of t=t.nodes.slice(0))s.parent&&s.parent.removeChild(s,"ignore");else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Se(t)]}else if(t.selector)t=[new ke(t)];else if(t.name)t=[new Oe(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Ie(t)]}return t.map(t=>(t[we]||Wo.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[be]&&function t(e){if(e[be]=!1,e.proxyOf.nodes)for(var i of e.proxyOf.nodes)t(i)}(t),void 0===t.raws.before&&e&&void 0!==e.raws.before&&(t.raws.before=e.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...t){for(var e of t=t.reverse()){var i,s,r=this.normalize(e,this.first,"prepend").reverse();for(i of r)this.proxyOf.nodes.unshift(i);for(s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(t){return(t.parent=this).proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e,i;for(i in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t<=(e=this.indexes[i])&&(this.indexes[i]=e-1);return this.markDirty(),this}replaceValues(e,i,s){return s||(s=i,i={}),this.walkDecls(t=>{i.props&&!i.props.includes(t.prop)||i.fast&&!t.value.includes(i.fast)||(t.value=t.value.replace(e,s))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(s){return this.each((e,t)=>{let i;try{i=s(e,t)}catch(t){throw e.addToError(t)}return i=!1!==i&&e.walk?e.walk(s):i})}walkAtRules(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("atrule"===t.type&&i.test(t.name))return s(t,e)}):this.walk((t,e)=>{if("atrule"===t.type&&t.name===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("atrule"===t.type)return s(t,e)}))}walkComments(i){return this.walk((t,e)=>{if("comment"===t.type)return i(t,e)})}walkDecls(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("decl"===t.type&&i.test(t.prop))return s(t,e)}):this.walk((t,e)=>{if("decl"===t.type&&t.prop===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("decl"===t.type)return s(t,e)}))}walkRules(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("rule"===t.type&&i.test(t.selector))return s(t,e)}):this.walk((t,e)=>{if("rule"===t.type&&t.selector===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("rule"===t.type)return s(t,e)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Ae.registerParse=t=>{Ce=t},Ae.registerRule=t=>{ke=t},Ae.registerAtRule=t=>{Oe=t},Ae.registerRoot=t=>{_e=t};var h=Ae,d=((Ae.default=Ae).rebuild=t=>{"atrule"===t.type?Object.setPrototypeOf(t,Oe.prototype):"rule"===t.type?Object.setPrototypeOf(t,ke.prototype):"decl"===t.type?Object.setPrototypeOf(t,Se.prototype):"comment"===t.type?Object.setPrototypeOf(t,Ie.prototype):"root"===t.type&&Object.setPrototypeOf(t,_e.prototype),t[we]=!0,t.nodes&&t.nodes.forEach(t=>{Ae.rebuild(t)})},h);let Me,je;var d=class extends d{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new Me(new je,this,t).stringify()}},f=(d.registerLazyResult=t=>{Me=t},d.registerProcessor=t=>{je=t},d);d.default=d;var d=class{constructor(t,e={}){for(var i in this.type="warning",this.text=t,e.node&&e.node.source&&(t=e.node.rangeBy(e),this.line=t.start.line,this.column=t.start.column,this.endLine=t.end.line,this.endColumn=t.end.column),e)this[i]=e[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},v=d;d.default=d;let Re=v;var d=class{constructor(t,e,i){this.processor=t,this.messages=[],this.root=e,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);t=new Re(t,e);return this.messages.push(t),t}warnings(){return this.messages.filter(t=>"warning"===t.type)}get content(){return this.css}},p=d;d.default=d;const xe="'".charCodeAt(0),Ee='"'.charCodeAt(0),Te="\\".charCodeAt(0),Ne="/".charCodeAt(0),De="\n".charCodeAt(0),Fe=" ".charCodeAt(0),Be="\f".charCodeAt(0),Le="\t".charCodeAt(0),Ue="\r".charCodeAt(0),Pe="[".charCodeAt(0),Ge="]".charCodeAt(0),We="(".charCodeAt(0),ze=")".charCodeAt(0),Ze="{".charCodeAt(0),Ve="}".charCodeAt(0),Ye=";".charCodeAt(0),Ke="*".charCodeAt(0),Je=":".charCodeAt(0),Xe="@".charCodeAt(0),$e=/[\t\n\f\r "#'()/;[\\\]{}]/g,He=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,qe=/.[\r\n"'(/\\]/,Qe=/[\da-f]/i;var d=class extends h{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}},m=d,d=(h.registerAtRule(d.default=d),h);let ti,ei;var g=class extends d{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,i){t=super.normalize(t);if(e)if("prepend"===i)1<this.nodes.length?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var s of t)s.raws.before=e.raws.before;return t}removeChild(t,e){var i=this.index(t);return!e&&0===i&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(t)}toResult(t={}){return new ti(new ei,this,t).stringify()}},y=(g.registerLazyResult=t=>{ti=t},g.registerProcessor=t=>{ei=t},g);d.registerRoot(g.default=g);let ii={comma(t){return ii.split(t,[","],!0)},space(t){return ii.split(t,[" ","\n","\t"])},split(t,e,i){var s,r=[];let n="",o=!1,a=0,l=!1,h="",u=!1;for(s of t)u?u=!1:"\\"===s?u=!0:l?s===h&&(l=!1):'"'===s||"'"===s?(l=!0,h=s):"("===s?a+=1:")"===s?0<a&&--a:0===a&&e.includes(s)&&(o=!0),o?(""!==n&&r.push(n.trim()),n="",o=!1):n+=s;return!i&&""===n||r.push(n.trim()),r}};d=ii;ii.default=ii;let si=d;var g=class extends h{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return si.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,e=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(e)}},b=g;h.registerRule(g.default=g);let ri=l,ni=function(e,t={}){let s=e.css.valueOf(),r=t.ignoreErrors,n,o,a,l,h,u,c,d,f,v,p=s.length,m=0,g=[],y=[];function b(t){throw e.error("Unclosed "+t,m)}return{back:function(t){y.push(t)},endOfFile:function(){return 0===y.length&&m>=p},nextToken:function(t){if(y.length)return y.pop();if(!(m>=p)){var e=!!t&&t.ignoreUnclosed;switch(n=s.charCodeAt(m)){case De:case Fe:case Le:case Ue:case Be:for(o=m;o+=1,(n=s.charCodeAt(o))===Fe||n===De||n===Le||n===Ue||n===Be;);v=["space",s.slice(m,o)],m=o-1;break;case Pe:case Ge:case Ze:case Ve:case Je:case Ye:case ze:var i=String.fromCharCode(n);v=[i,i,m];break;case We:if(d=g.length?g.pop()[1]:"",f=s.charCodeAt(m+1),"url"===d&&f!==xe&&f!==Ee&&f!==Fe&&f!==De&&f!==Le&&f!==Be&&f!==Ue){o=m;do{if(u=!1,-1===(o=s.indexOf(")",o+1))){if(r||e){o=m;break}b("bracket")}for(c=o;s.charCodeAt(c-1)===Te;)--c,u=!u}while(u);v=["brackets",s.slice(m,o+1),m,o],m=o}else o=s.indexOf(")",m+1),l=s.slice(m,o+1),-1===o||qe.test(l)?v=["(","(",m]:(v=["brackets",l,m,o],m=o);break;case xe:case Ee:a=n===xe?"'":'"',o=m;do{if(u=!1,-1===(o=s.indexOf(a,o+1))){if(r||e){o=m+1;break}b("string")}for(c=o;s.charCodeAt(c-1)===Te;)--c,u=!u}while(u);v=["string",s.slice(m,o+1),m,o],m=o;break;case Xe:$e.lastIndex=m+1,$e.test(s),o=0===$e.lastIndex?s.length-1:$e.lastIndex-2,v=["at-word",s.slice(m,o+1),m,o],m=o;break;case Te:for(o=m,h=!0;s.charCodeAt(o+1)===Te;)o+=1,h=!h;if(n=s.charCodeAt(o+1),h&&n!==Ne&&n!==Fe&&n!==De&&n!==Le&&n!==Ue&&n!==Be&&(o+=1,Qe.test(s.charAt(o)))){for(;Qe.test(s.charAt(o+1));)o+=1;s.charCodeAt(o+1)===Fe&&(o+=1)}v=["word",s.slice(m,o+1),m,o],m=o;break;default:m=(n===Ne&&s.charCodeAt(m+1)===Ke?(0===(o=s.indexOf("*/",m+2)+1)&&(r||e?o=s.length:b("comment")),v=["comment",s.slice(m,o+1),m,o]):(He.lastIndex=m+1,He.test(s),o=0===He.lastIndex?s.length-1:He.lastIndex-2,v=["word",s.slice(m,o+1),m,o],g.push(v)),o)}return m++,v}},position:function(){return m}}},oi=i,ai=m,li=y,hi=b;const ui={empty:!0,space:!0};let ci=class{constructor(t){this.input=t,this.root=new li,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){var e,i=new ai;i.name=t[1].slice(1),""===i.name&&this.unnamedAtrule(i,t),this.init(i,t[2]);let s,r,n=!1,o=!1;for(var a=[],l=[];!this.tokenizer.endOfFile();){if("("===(e=(t=this.tokenizer.nextToken())[0])||"["===e?l.push("("===e?")":"]"):"{"===e&&0<l.length?l.push("}"):e===l[l.length-1]&&l.pop(),0===l.length){if(";"===e){i.source.end=this.getPosition(t[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===e){o=!0;break}if("}"===e){if(0<a.length){for(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(i.source.end=this.getPosition(s[3]||s[2]),i.source.end.offset++)}this.end(t);break}}if(a.push(t),this.tokenizer.endOfFile()){n=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),n&&(t=a[a.length-1],i.source.end=this.getPosition(t[3]||t[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),o&&(i.nodes=[],this.current=i)}checkMissedSemicolon(s){var r=this.colon(s);if(!1!==r){let e=0,i;for(let t=r-1;0<=t&&("space"===(i=s[t])[0]||2!==(e+=1));t--);throw this.input.error("Missed semicolon","word"===i[0]?i[3]+1:i[2])}}colon(t){let e=0,i,s,r;for(var[n,o]of t.entries()){if("("===(s=(i=o)[0])&&(e+=1),")"===s&&--e,0===e&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return n}this.doubleColon(i)}r=i}return!1}comment(t){var e=new oi,t=(this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++,t[1].slice(2,-2));/^\s*$/.test(t)?(e.text="",e.raws.left=t,e.raws.right=""):(t=t.match(/^(\s*)([^]*\S)(\s*)$/),e.text=t[2],e.raws.left=t[1],e.raws.right=t[3])}createTokenizer(){this.tokenizer=ni(this.input)}decl(t,e){var i,s=new ri,r=(this.init(s,t[0][2]),t[t.length-1]);for(";"===r[0]&&(this.semicolon=!0,t.pop()),s.source.end=this.getPosition(r[3]||r[2]||function(e){for(let t=e.length-1;0<=t;t--){var i=e[t],i=i[3]||i[2];if(i)return i}}(t)),s.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),s.raws.before+=t.shift()[1];for(s.source.start=this.getPosition(t[0][2]),s.prop="";t.length;){var n=t[0][0];if(":"===n||"space"===n||"comment"===n)break;s.prop+=t.shift()[1]}s.raws.between="";let o;for(;t.length;){if(":"===(o=t.shift())[0]){s.raws.between+=o[1];break}"word"===o[0]&&/\w/.test(o[1])&&this.unknownWord([o]),s.raws.between+=o[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let a=[];for(;t.length&&("space"===(i=t[0][0])||"comment"===i);)a.push(t.shift());this.precheckMissedSemicolon(t);for(let i=t.length-1;0<=i;i--){if("!important"===(o=t[i])[1].toLowerCase()){s.important=!0;var l=this.stringFrom(t,i);" !important"!==(l=this.spacesFromEnd(t)+l)&&(s.raws.important=l);break}if("important"===o[1].toLowerCase()){var h=t.slice(0);let e="";for(let t=i;0<t;t--){var u=h[t][0];if(0===e.trim().indexOf("!")&&"space"!==u)break;e=h.pop()[1]+e}0===e.trim().indexOf("!")&&(s.important=!0,s.raws.important=e,t=h)}if("space"!==o[0]&&"comment"!==o[0])break}t.some(t=>"space"!==t[0]&&"comment"!==t[0])&&(s.raws.between+=a.map(t=>t[1]).join(""),a=[]),this.raw(s,"value",a.concat(t),e),s.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new hi;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){this.spaces+=t[1],this.current.nodes&&(t=this.current.nodes[this.current.nodes.length-1])&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){let e=!1;var i;let s=!1,r=null;var n=[],o=t[1].startsWith("--"),a=[];let l=t;for(;l;){if(i=l[0],a.push(l),"("===i||"["===i)r=r||l,n.push("("===i?")":"]");else if(o&&s&&"{"===i)r=r||l,n.push("}");else if(0===n.length){if(";"===i){if(s)return void this.decl(a,o);break}if("{"===i)return void this.rule(a);if("}"===i){this.tokenizer.back(a.pop()),e=!0;break}":"===i&&(s=!0)}else i===n[n.length-1]&&(n.pop(),0===n.length)&&(r=null);l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),0<n.length&&this.unclosedBracket(r),e&&s){if(!o)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,i,s){var r,n,o,a,l=i.length;let h="",u=!0;for(let t=0;t<l;t+=1)"space"===(o=(r=i[t])[0])&&t===l-1&&!s||"comment"===o&&(o=i[t-1]?i[t-1][0]:"empty",n=i[t+1]?i[t+1][0]:"empty",ui[o]||ui[n]||","===h.slice(-1))?u=!1:h+=r[1];u||(a=i.reduce((t,e)=>t+e[1],""),t.raws[e]={raw:a,value:h}),t[e]=h}rule(t){t.pop();var e=new hi;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){var e;let i="";for(;t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)i=t.pop()[1]+i;return i}spacesAndCommentsFromStart(t){var e;let i="";for(;t.length&&("space"===(e=t[0][0])||"comment"===e);)i+=t.shift()[1];return i}spacesFromEnd(t){let e="";for(;t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(e,i){let s="";for(let t=i;t<e.length;t++)s+=e[t][1];return e.splice(i,e.length-i),s}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},di=c;function fi(t,e){t=new di(t,e),e=new ci(t);try{e.parse()}catch(t){throw t}return e.root}g=fi;h.registerParse(fi.default=fi);let{isClean:vi,my:pi}=t,mi=n,gi=r,yi=h;t=f;let bi=p,wi=g;var w=y;const Si={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ii={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},Ci={Once:!0,postcssPlugin:!0,prepare:!0},ki=0;function Oi(t){return"object"==typeof t&&"function"==typeof t.then}function _i(t){let e=!1;var i=Si[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[i,i+"-"+e,ki,i+"Exit",i+"Exit-"+e]:e?[i,i+"-"+e,i+"Exit",i+"Exit-"+e]:t.append?[i,ki,i+"Exit"]:[i,i+"Exit"]}function Ai(t){let e;return{eventIndex:0,events:e="document"===t.type?["Document",ki,"DocumentExit"]:"root"===t.type?["Root",ki,"RootExit"]:_i(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function Mi(t){return t[vi]=!1,t.nodes&&t.nodes.forEach(t=>Mi(t)),t}let ji={};var S=class zo{constructor(t,e,i){this.stringified=!1,this.processed=!1;let s;if("object"!=typeof e||null===e||"root"!==e.type&&"document"!==e.type)if(e instanceof zo||e instanceof bi)s=Mi(e.root),e.map&&(void 0===i.map&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=e.map);else{let t=wi;i.syntax&&(t=i.syntax.parse),(t=i.parser?i.parser:t).parse&&(t=t.parse);try{s=t(e,i)}catch(t){this.processed=!0,this.error=t}s&&!s[pi]&&yi.rebuild(s)}else s=Mi(e);this.result=new bi(t,s,i),this.helpers={...ji,postcss:ji,result:this.result},this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?{...t,...t.prepare(this.result)}:t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var i=this.result.lastPlugin;try{e&&e.addToError(t),"CssSyntaxError"!==(this.error=t).name||t.plugin?i.postcssVersion:(t.plugin=i.postcssPlugin,t.setMessage())}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t,e=(t,e,i)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,i])};for(t of this.plugins)if("object"==typeof t)for(var i in t){if(!Ii[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Ci[i])if("object"==typeof t[i])for(var s in t[i])"*"===s?e(t,i,t[i][s]):e(t,i+"-"+s.toLowerCase(),t[i][s]);else"function"==typeof t[i]&&e(t,i,t[i])}this.hasListener=0<Object.keys(this.listeners).length}async runAsync(){for(let t=this.plugin=0;t<this.plugins.length;t++){var e=this.plugins[t],e=this.runOnRoot(e);if(Oi(e))try{await e}catch(t){throw this.handleError(t)}}if(this.prepareVisitors(),this.hasListener){for(var i,s=this.result.root;!s[vi];){s[vi]=!0;for(var r=[Ai(s)];0<r.length;){var n=this.visitTick(r);if(Oi(n))try{await n}catch(t){n=r[r.length-1].node;throw this.handleError(t,n)}}}if(this.listeners.OnceExit)for(let[t,e]of this.listeners.OnceExit){this.result.lastPlugin=t;try{"document"===s.type?(i=s.nodes.map(t=>e(t,this.helpers)),await Promise.all(i)):await e(s,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{var t;return"object"==typeof e&&e.Once?"document"===this.result.root.type?Oi((t=this.result.root.nodes.map(t=>e.Once(t,this.helpers)))[0])?Promise.all(t):t:e.Once(this.result.root,this.helpers):"function"==typeof e?e(this.result.root,this.result):void 0}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(!this.stringified){this.stringified=!0,this.sync();var e=this.result.opts;let t=gi;e.syntax&&(t=e.syntax.stringify),(t=e.stringifier?e.stringifier:t).stringify&&(t=t.stringify);e=new mi(t,this.result.root,this.result.opts).generate();this.result.css=e[0],this.result.map=e[1]}return this.result}sync(){if(this.error)throw this.error;if(!this.processed){if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins)if(Oi(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[vi];)e[vi]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var i of e.nodes)this.visitSync(this.listeners.OnceExit,i);else this.visitSync(this.listeners.OnceExit,e)}}return this.result}then(t,e){return this.async().then(t,e)}toString(){return this.css}visitSync(t,e){for(var[i,s]of t){this.result.lastPlugin=i;let t;try{t=s(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(Oi(t))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:i,visitors:s}=e;if("root"===i.type||"document"===i.type||i.parent){if(0<s.length&&e.visitorIndex<s.length){var[r,n]=s[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===s.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=r;try{return n(i.toProxy(),this.helpers)}catch(t){throw this.handleError(t,i)}}if(0!==e.iterator){for(var o,a=e.iterator;o=i.nodes[i.indexes[a]];)if(i.indexes[a]+=1,!o[vi])return o[vi]=!0,void t.push(Ai(o));e.iterator=0,delete i.indexes[a]}for(var l=e.events;e.eventIndex<l.length;){var h=l[e.eventIndex];if(e.eventIndex+=1,h===ki)return void(i.nodes&&i.nodes.length&&(i[vi]=!0,e.iterator=i.getIterator()));if(this.listeners[h])return void(e.visitors=this.listeners[h])}}t.pop()}walkSync(t){var e;t[vi]=!0;for(e of _i(t))if(e===ki)t.nodes&&t.each(t=>{t[vi]||this.walkSync(t)});else{var i=this.listeners[e];if(i&&this.visitSync(i,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}},Ri=(S.registerPostcss=t=>{ji=t},S);w.registerLazyResult(S.default=S),t.registerLazyResult(S);let xi=n,Ei=r;let Ti=g;const Ni=p;w=class{constructor(t,e,i){e=e.toString(),this.stringified=!1,this.Ss=t,this.Cs=e,this.Is=i,this.ks=void 0;t=Ei;this.result=new Ni(this.Ss,void 0,this.Is),this.result.css=e;let s=this;$Q2(this.result,"root",{get(){return s.root}});i=new xi(t,void 0,this.Is,e);i.isMap()?([t,e]=i.generate(),t&&(this.result.css=t),e&&(this.result.map=e)):(i.clearAnnotation(),this.result.css=i.css)}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return this.async().then(t,e)}toString(){return this.Cs}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this.Os)return this.Os;let t;var e=Ti;try{t=e(this.Cs,this.Is)}catch(t){this.error=t}if(this.error)throw this.error;return this.Os=t}get[Symbol.toStringTag](){return"NoWorkResult"}},t=w;w.default=w;let Di=t,Fi=Ri;S=f,n=class{constructor(t=[]){this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){let e=[];for(var i of t)if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"==typeof i&&Array.isArray(i.plugins))e=e.concat(i.plugins);else if("object"==typeof i&&i.postcssPlugin)e.push(i);else if("function"==typeof i)e.push(i);else if("object"!=typeof i||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");return e}process(t,e={}){return new(this.plugins.length||e.parser||e.stringifier||e.syntax?Fi:Di)(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},w=n;y.registerProcessor(n.default=n),S.registerProcessor(n);let Bi=l,Li=u,Ui=i,Pi=m,Gi=c,Wi=y,zi=b;function Zi(t,i){if(Array.isArray(t))return t.map(t=>Zi(t));let{inputs:e,...s}=t;if(e){i=[];for(var r of e){r={...r,__proto__:Gi.prototype};r.map&&(r.map={...r.map,__proto__:Li.prototype}),i.push(r)}}if(s.nodes&&(s.nodes=t.nodes.map(t=>Zi(t,i))),s.source){let{inputId:t,...e}=s.source;s.source=e,null!=t&&(s.source.input=i[t])}if("root"===s.type)return new Wi(s);if("decl"===s.type)return new Bi(s);if("rule"===s.type)return new zi(s);if("comment"===s.type)return new Ui(s);if("atrule"===s.type)return new Pi(s);throw new Error("Unknown node type: "+t.type)}t=Zi,Zi.default=Zi,S=s;let Vi=l;n=Ri,u=h;let Yi=w;s=r,l=t;let Ki=f;Ri=v;let Ji=i,Xi=m;h=p,w=c,r=g,t=d;let $i=b,Hi=y;f=o;function I(...t){return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new Yi(t)}I.plugin=function(e,i){let s=!1;function r(...t){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");t=i(...t);return t.postcssPlugin=e,t.postcssVersion=(new Yi).version,t}let t;return $Q2(r,"postcss",{get(){return t=t||r()}}),r.process=function(t,e,i){return I([r(i)]).process(t,e)},r},I.stringify=s,I.parse=r,I.fromJSON=l,I.list=t,I.comment=t=>new Ji(t),I.atRule=t=>new Xi(t),I.decl=t=>new Vi(t),I.rule=t=>new $i(t),I.root=t=>new Hi(t),I.document=t=>new Ki(t),I.CssSyntaxError=S,I.Declaration=Vi,I.Container=u,I.Processor=Yi,I.Document=Ki,I.Comment=Ji,I.Warning=Ri,I.AtRule=Xi,I.Result=h,I.Input=w,I.Rule=$i,I.Root=Hi,I.Node=f,n.registerPostcss(I);v=I,I.default=I,i=Tt(v);i.stringify,i.fromJSON,i.plugin,i.parse,i.list,i.document,i.comment,i.atRule,i.rule,i.decl,i.root,i.CssSyntaxError,i.Declaration,i.Container,i.Processor,i.Document,i.Comment,i.Warning,i.AtRule,i.Result,i.Input,i.Rule,i.Root,i.Node,Object.defineProperty;function qi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Qi(i){var e,s;return i.__esModule?i:("function"==typeof(e=i.default)?(s=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)}).prototype=e.prototype:s={},$Q2(s,"__esModule",{value:!0}),Object.keys(i).forEach(function(t){var e=Object.getOwnPropertyDescriptor(i,t);$Q2(s,t,e.get?e:{enumerable:!0,get:function(){return i[t]}})}),s)}function ts(){return{isColorSupported:!1,reset:C,bold:C,dim:C,italic:C,underline:C,inverse:C,hidden:C,strikethrough:C,black:C,red:C,green:C,yellow:C,blue:C,magenta:C,cyan:C,white:C,gray:C,bgBlack:C,bgRed:C,bgGreen:C,bgYellow:C,bgBlue:C,bgMagenta:C,bgCyan:C,bgWhite:C}}var m={exports:{}},C=String,p=(m.exports=ts(),m.exports.createColors=ts,m.exports),c=Qi(Object.freeze($Q2({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let es=p,is=c;g=class Zo extends Error{constructor(t,e,i,s,r,n){super(t),this.name="CssSyntaxError",this.reason=t,r&&(this.file=r),s&&(this.source=s),n&&(this.plugin=n),void 0!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Zo)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let e=this.source;null==t&&(t=es.isColorSupported);var i=(e=is&&t?is(e):e).split(/\r?\n/);let s=Math.max(this.line-3,0);var r=Math.min(this.line+2,i.length);let n=String(r).length,o,a;if(t){let{bold:e,gray:i,red:s}=es.createColors(!0);o=t=>e(s(t)),a=t=>i(t)}else o=a=t=>t;return i.slice(s,r).map((t,e)=>{var e=s+1+e,i=" "+(" "+e).slice(-n)+" | ";return e===this.line?(e=a(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," "),o(">")+a(i)+t+"\n "+e+o("^")):" "+a(i)+t}).join("\n")}toString(){let t=this.showSourceCode();return t=t&&"\n\n"+t+"\n",this.name+": "+this.message+t}},d=g,g.default=g,b={};b.isClean=Symbol("isClean"),b.my=Symbol("my");const ss={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};y=class{constructor(t){this.builder=t}atrule(t,e){let i="@"+t.name;var s=t.params?this.rawValue(t,"params"):"";void 0!==t.raws.afterName?i+=t.raws.afterName:s&&(i+=" "),t.nodes?this.block(t,i+s):(e=(t.raws.between||"")+(e?";":""),this.builder(i+s+e,t))}beforeAfter(t,e){let i,s=(i="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose"),t.parent),r=0;for(;s&&"root"!==s.type;)r+=1,s=s.parent;if(i.includes("\n")){var n=this.raw(t,null,"indent");if(n.length)for(let t=0;t<r;t++)i+=n}return i}block(t,e){var i=this.raw(t,"between","beforeOpen");this.builder(e+i+"{",t,"start");let s;(s=t.nodes&&t.nodes.length?(this.body(t),this.raw(t,"after")):this.raw(t,"after","emptyBody"))&&this.builder(s),this.builder("}",t,"end")}body(e){let i=e.nodes.length-1;for(;0<i&&"comment"===e.nodes[i].type;)--i;var s=this.raw(e,"semicolon");for(let t=0;t<e.nodes.length;t++){var r=e.nodes[t],n=this.raw(r,"before");n&&this.builder(n),this.stringify(r,i!==t||s)}}comment(t){var e=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+i+"*/",t)}decl(t,e){var i=this.raw(t,"between","colon");let s=t.prop+i+this.rawValue(t,"value");t.important&&(s+=t.raws.important||" !important"),e&&(s+=";"),this.builder(s,t)}document(t){this.body(t)}raw(t,e,i){let s;if(i=i||e,!e||void 0===(s=t.raws[e])){var r=t.parent;if("before"===i){if(!r||"root"===r.type&&r.first===t)return"";if(r&&"document"===r.type)return""}if(!r)return ss[i];r=t.root();if(r.rawCache||(r.rawCache={}),void 0!==r.rawCache[i])return r.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(t,i);var n="raw"+((n=i)[0].toUpperCase()+n.slice(1));this[n]?s=this[n](r,t):r.walk(t=>{if(void 0!==(s=t.raws[e]))return!1}),void 0===s&&(s=ss[i]),r.rawCache[i]=s}return s}rawBeforeClose(t){let e;return t.walk(t=>{if(t.nodes&&0<t.nodes.length&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e=e&&e.replace(/\S/g,"")}rawBeforeComment(t,e){let i;return t.walkComments(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=void 0===i?this.raw(e,null,"beforeDecl"):i&&i.replace(/\S/g,"")}rawBeforeDecl(t,e){let i;return t.walkDecls(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=void 0===i?this.raw(e,null,"beforeRule"):i&&i.replace(/\S/g,"")}rawBeforeOpen(t){let e;return t.walk(t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1}),e}rawBeforeRule(e){let i;return e.walk(t=>{if(t.nodes&&(t.parent!==e||e.first!==t)&&void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=i&&i.replace(/\S/g,"")}rawColon(t){let e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1}),e}rawIndent(i){if(i.raws.indent)return i.raws.indent;let s;return i.walk(t=>{var e=t.parent;if(e&&e!==i&&e.parent&&e.parent===i&&void 0!==t.raws.before)return e=t.raws.before.split("\n"),s=(s=e[e.length-1]).replace(/\S/g,""),!1}),s}rawSemicolon(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1}),e}rawValue(t,e){var i=t[e],t=t.raws[e];return t&&t.value===i?t.raw:i}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},o=y;y.default=y;let rs=o;function ns(t,e){new rs(e).stringify(t)}s=ns;ns.default=ns;let{isClean:os,my:as}=b,ls=d,hs=o,us=s;function cs(e,i){let s=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){let t=e[r];var n=typeof t;"parent"===r&&"object"==n?i&&(s[r]=i):"source"===r?s[r]=t:Array.isArray(t)?s[r]=t.map(t=>cs(t,s)):("object"==n&&null!==t&&(t=cs(t)),s[r]=t)}return s}r=class{constructor(t={}){for(var e in this.raws={},this[os]=!1,this[as]=!0,t)if("nodes"===e){this.nodes=[];for(var i of t[e])"function"==typeof i.clone?this.append(i.clone()):this.append(i)}else this[e]=t[e]}addToError(t){var e;return t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)&&(e=this.source,t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)),t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(var e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){var e,i=cs(this);for(e in t)i[e]=t[e];return i}cloneAfter(t={}){t=this.clone(t);return this.parent.insertAfter(this,t),t}cloneBefore(t={}){t=this.clone(t);return this.parent.insertBefore(this,t),t}error(t,e={}){var i,s;return this.source?({end:i,start:s}=this.rangeBy(e),this.source.input.error(t,{column:s.column,line:s.line},{column:i.column,line:i.line},e)):new ls(t)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,i){return t[e]!==i&&(t[e]=i,"prop"===e||"value"===e||"name"===e||"params"===e||"important"===e||"text"===e)&&t.markDirty(),!0}}}markDirty(){if(this[os]){this[os]=!1;let t=this;for(;t=t.parent;)t[os]=!1}}next(){var t;if(this.parent)return t=this.parent.index(this),this.parent.nodes[t+1]}positionBy(t,e){let i=this.source.start;return t.index?i=this.positionInside(t.index,e):t.word&&-1!==(t=(e=this.toString()).indexOf(t.word))&&(i=this.positionInside(t,e)),i}positionInside(e,t){var i=t||this.toString();let s=this.source.start.column,r=this.source.start.line;for(let t=0;t<e;t++)"\n"===i[t]?(s=1,r+=1):s+=1;return{column:s,line:r}}prev(){var t;if(this.parent)return t=this.parent.index(this),this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};var s,r;return t.word?-1!==(r=(s=this.toString()).indexOf(t.word))&&(e=this.positionInside(r,s),i=this.positionInside(r+t.word.length,s)):(t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):t.index&&(i=this.positionInside(t.index+1))),{end:i=i.line<e.line||i.line===e.line&&i.column<=e.column?{column:e.column+1,line:e.line}:i,start:e}}raw(t,e){return(new hs).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...i){if(this.parent){let t=this,e=!1;for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){let t=this;for(;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var i,s={},r=null==e;e=e||new Map;let n=0;for(i in this)if(Object.prototype.hasOwnProperty.call(this,i)&&"parent"!==i&&"proxyCache"!==i){var o=this[i];if(Array.isArray(o))s[i]=o.map(t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t);else if("object"==typeof o&&o.toJSON)s[i]=o.toJSON(null,e);else if("source"===i){let t=e.get(o.input);null==t&&(t=n,e.set(o.input,n),n++),s[i]={end:o.end,inputId:t,start:o.start}}else s[i]=o}return r&&(s.inputs=[...e.keys()].map(t=>t.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=us){t.stringify&&(t=t.stringify);let e="";return t(this,t=>{e+=t}),e}warn(t,e,i){var s,r={node:this};for(s in i)r[s]=i[s];return t.warn(e,r)}get proxyOf(){return this}},l=r,r.default=r,t=l,S=class extends t{constructor(t){super(t=t&&void 0!==t.value&&"string"!=typeof t.value?{...t,value:String(t.value)}:t),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}},u=S;S.default=S;Ri={nanoid:(t=21)=>{let e="",i=t;for(;i--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(s,r=21)=>(t=r)=>{let e="",i=t;for(;i--;)e+=s[Math.random()*s.length|0];return e}};let{SourceMapConsumer:ds,SourceMapGenerator:fs}=c,{existsSync:vs,readFileSync:ps}=c,{dirname:ms,join:gs}=c;var h=class{constructor(t,e){!1!==e.map&&(this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:"),t=e.map?e.map.prev:void 0,t=this.loadMap(e.from,t),!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=ms(this.mapFile)),t)&&(this.text=t)}consumer(){return this.consumerCache||(this.consumerCache=new ds(this.text)),this.consumerCache}decodeInline(t){if(/^data:application\/json;charset=utf-?8,/.test(t)||/^data:application\/json,/.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(t)||/^data:application\/json;base64,/.test(t))return e=t.substr(RegExp.lastMatch.length),Buffer?Buffer.from(e,"base64").toString():window.atob(e);var e=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+e)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e,i=t.match(/\/\*\s*# sourceMappingURL=/gm);i&&(i=t.lastIndexOf(i.pop()),e=t.indexOf("*/",i),-1<i)&&-1<e&&(this.annotation=this.getAnnotationURL(t.substring(i,e)))}loadFile(t){if(this.root=ms(t),vs(t))return this.mapFile=t,ps(t,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof ds)return fs.fromSourceMap(t).toString();if(t instanceof fs)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}t=t(e);if(t){var i=this.loadFile(t);if(i)return i;throw new Error("Unable to load previous source map: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=gs(ms(e),t)),this.loadFile(t)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}},w=h,{SourceMapConsumer:f,SourceMapGenerator:n}=(h.default=h,c);let{fileURLToPath:ys,pathToFileURL:bs}=c,{isAbsolute:ws,resolve:Ss}=c,Is=Ri["nanoid"];v=c;let Cs=d,ks=w,Os=Symbol("fromOffsetCache"),_s=Boolean(f&&n),As=Boolean(Ss&&ws);i=class{constructor(t,e={}){if(null==t||"object"==typeof t&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);this.css=t.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,e.from&&(!As||/^\w+:\/\//.test(e.from)||ws(e.from)?this.file=e.from:this.file=Ss(e.from)),As&&_s&&(t=new ks(this.css,e)).text&&(e=(this.map=t).consumer().file,!this.file)&&e&&(this.file=this.mapResolve(e)),this.file||(this.id="<input css "+Is(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,i,s={}){let r,n,o;e&&"object"==typeof e?(a=i,i="number"==typeof(l=e).offset?(e=(h=this.fromOffset(l.offset)).line,h.col):(e=l.line,l.column),o="number"==typeof a.offset?(h=this.fromOffset(a.offset),n=h.line,h.col):(n=a.line,a.column)):i||(e=(l=this.fromOffset(e)).line,i=l.col);var a,l,h=this.origin(e,i,n,o);return(r=h?new Cs(t,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,s.plugin):new Cs(t,void 0===n?e:{column:i,line:e},void 0===n?i:{column:o,line:n},this.css,this.file,s.plugin)).input={column:i,endColumn:o,endLine:n,line:e,source:this.css},this.file&&(bs&&(r.input.url=bs(this.file).toString()),r.input.file=this.file),r}fromOffset(e){let s;if(this[Os])s=this[Os];else{var r=this.css.split("\n");s=new Array(r.length);let i=0;for(let t=0,e=r.length;t<e;t++)s[t]=i,i+=r[t].length+1;this[Os]=s}let i=0;if(s[s.length-1]<=e)i=s.length-1;else{let t=s.length-2;for(var n;i<t;)if(n=i+(t-i>>1),e<s[n])t=n-1;else{if(!(e>=s[n+1])){i=n;break}i=n+1}}return{col:e-s[i]+1,line:i+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Ss(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,i,s){if(!this.map)return!1;var r=this.map.consumer(),e=r.originalPositionFor({column:e,line:t});if(!e.source)return!1;let n;"number"==typeof i&&(n=r.originalPositionFor({column:s,line:i}));let o;o=ws(e.source)?bs(e.source):new URL(e.source,this.map.consumer().sourceRoot||bs(this.map.mapFile));t={column:e.column,endColumn:n&&n.column,endLine:n&&n.line,line:e.line,url:o.toString()};if("file:"===o.protocol){if(!ys)throw new Error("file: protocol is not available in this PostCSS build");t.file=ys(o)}s=r.sourceContentFor(e.source);return s&&(t.source=s),t}toJSON(){var t,e={};for(t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache)&&(e.map.consumerCache=void 0),e}get from(){return this.file||this.id}},m=i;i.default=i,v&&v.registerInput&&v.registerInput(i);let{SourceMapConsumer:Ms,SourceMapGenerator:js}=c,{dirname:Rs,relative:xs,resolve:Es,sep:Ts}=c,Ns=c["pathToFileURL"],Ds=m,Fs=Boolean(Ms&&js),Bs=Boolean(Rs&&Es&&xs&&Ts);p=class{constructor(t,e,i,s){this.stringify=t,this.mapOpts=i.map||{},this.root=e,this.opts=i,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t,e=(t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map","\n");this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var i=this.toUrl(this.path(e.file)),s=e.root||Rs(e.file);let t;!1===this.mapOpts.sourcesContent?(t=new Ms(e.text)).sourcesContent&&(t.sourcesContent=null):t=e.consumer(),this.map.applySourceMap(t,i,this.toUrl(this.path(s)))}}clearAnnotation(){var e;if(!1!==this.mapOpts.annotation)if(this.root)for(let t=this.root.nodes.length-1;0<=t;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Bs&&Fs&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){var t;return this.root?this.generateString():1===this.previous().length?((t=this.previous()[0].consumer()).file=this.outputFile(),this.map=js.fromSourceMap(t,{ignoreInvalidMapping:!0})):(this.map=new js({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 js({file:this.outputFile(),ignoreInvalidMapping:!0});let s=1,r=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""},a,l;this.stringify(this.root,(t,e,i)=>{this.css+=t,e&&"end"!==i&&(o.generated.line=s,o.generated.column=r-1,e.source&&e.source.start?(o.source=this.sourcePath(e),o.original.line=e.source.start.line,o.original.column=e.source.start.column-1):(o.source=n,o.original.line=1,o.original.column=0),this.map.addMapping(o)),(a=t.match(/\n/g))?(s+=a.length,l=t.lastIndexOf("\n"),r=t.length-l):r+=t.length,e&&"start"!==i&&(t=e.parent||{raws:{}},"decl"!==e.type&&("atrule"!==e.type||e.nodes)||e!==t.last||t.raws.semicolon)&&(e.source&&e.source.end?(o.source=this.sourcePath(e),o.original.line=e.source.end.line,o.original.column=e.source.end.column-1,o.generated.line=s,o.generated.column=r-2):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=s,o.generated.column=r-1),this.map.addMapping(o))})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){var t;return void 0!==this.mapOpts.inline?this.mapOpts.inline:(void 0===(t=this.mapOpts.annotation)||!0===t)&&(!this.previous().length||this.previous().some(t=>t.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:0<this.previous().length}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;var e=this.memoizedPaths.get(t);if(e)return e;let i=this.opts.to?Rs(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(i=Rs(Es(i,this.mapOpts.annotation)));e=xs(i,t);return this.memoizedPaths.set(t,e),e}previous(){var t;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(t=>{t.source&&t.source.input.map&&(t=t.source.input.map,this.previousMaps.includes(t)||this.previousMaps.push(t))}):(t=new Ds(this.originalCSS,this.opts)).map&&this.previousMaps.push(t.map)),this.previousMaps}setSourcesContent(){let i={};var t;this.root?this.root.walk(t=>{var e;t.source&&(e=t.source.input.from)&&!i[e]&&(i[e]=!0,e=this.usesFileUrls?this.toFileUrl(e):this.toUrl(this.path(e)),this.map.setSourceContent(e,t.source.input.css))}):this.css&&(t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(t,this.css))}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(Ns)return e=Ns(t).toString(),this.memoizedFileURLs.set(t,e),e;throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===Ts&&(t=t.replace(/\\/g,"/"));e=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,e),e}},g=class extends l{constructor(t){super(t),this.type="comment"}},y=g;g.default=g;let{isClean:Ls,my:Us}=b,Ps=u,Gs=y,Ws,zs,Zs,Vs;let Ys=class Vo extends l{append(...t){for(var e of t){var i;for(i of this.normalize(e,this.last))this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.cleanRaws(t)}each(i){if(this.proxyOf.nodes){var s=this.getIterator();let t,e;for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],!1!==(e=i(this.proxyOf.nodes[t],t)));)this.indexes[s]+=1;return delete this.indexes[s],e}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(e,s){return"proxyOf"===s?e:e[s]&&("each"===s||"string"==typeof s&&s.startsWith("walk")?(...t)=>e[s](...t.map(i=>"function"==typeof i?(t,e)=>i(t.toProxy(),e):i)):"every"===s||"some"===s?i=>e[s]((t,...e)=>i(t.toProxy(),...e)):"root"===s?()=>e.root().toProxy():"nodes"===s?e.nodes.map(t=>t.toProxy()):"first"===s||"last"===s?e[s].toProxy():e[s])},set(t,e,i){return t[e]!==i&&(t[e]=i,"name"===e||"params"===e||"selector"===e)&&t.markDirty(),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var i,s,r,n=this.index(t),o=this.normalize(e,this.proxyOf.nodes[n]).reverse(),n=this.index(t);for(i of o)this.proxyOf.nodes.splice(n+1,0,i);for(r in this.indexes)n<(s=this.indexes[r])&&(this.indexes[r]=s+o.length);return this.markDirty(),this}insertBefore(t,e){var i,s,r,n=this.index(t),o=this.normalize(e,this.proxyOf.nodes[n],0===n&&"prepend").reverse(),n=this.index(t);for(i of o)this.proxyOf.nodes.splice(n,0,i);for(r in this.indexes)n<=(s=this.indexes[r])&&(this.indexes[r]=s+o.length);return this.markDirty(),this}normalize(t,e){if("string"==typeof t)t=function e(t){return t.map(t=>(t.nodes&&(t.nodes=e(t.nodes)),delete t.source,t))}(Ws(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t))for(var i of t=t.slice(0))i.parent&&i.parent.removeChild(i,"ignore");else if("root"===t.type&&"document"!==this.type)for(var s of t=t.nodes.slice(0))s.parent&&s.parent.removeChild(s,"ignore");else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Ps(t)]}else if(t.selector)t=[new zs(t)];else if(t.name)t=[new Zs(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Gs(t)]}return t.map(t=>(t[Us]||Vo.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Ls]&&function t(e){if(e[Ls]=!1,e.proxyOf.nodes)for(var i of e.proxyOf.nodes)t(i)}(t),void 0===t.raws.before&&e&&void 0!==e.raws.before&&(t.raws.before=e.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...t){for(var e of t=t.reverse()){var i,s,r=this.normalize(e,this.first,"prepend").reverse();for(i of r)this.proxyOf.nodes.unshift(i);for(s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(t){return(t.parent=this).proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e,i;for(i in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t<=(e=this.indexes[i])&&(this.indexes[i]=e-1);return this.markDirty(),this}replaceValues(e,i,s){return s||(s=i,i={}),this.walkDecls(t=>{i.props&&!i.props.includes(t.prop)||i.fast&&!t.value.includes(i.fast)||(t.value=t.value.replace(e,s))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(s){return this.each((e,t)=>{let i;try{i=s(e,t)}catch(t){throw e.addToError(t)}return i=!1!==i&&e.walk?e.walk(s):i})}walkAtRules(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("atrule"===t.type&&i.test(t.name))return s(t,e)}):this.walk((t,e)=>{if("atrule"===t.type&&t.name===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("atrule"===t.type)return s(t,e)}))}walkComments(i){return this.walk((t,e)=>{if("comment"===t.type)return i(t,e)})}walkDecls(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("decl"===t.type&&i.test(t.prop))return s(t,e)}):this.walk((t,e)=>{if("decl"===t.type&&t.prop===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("decl"===t.type)return s(t,e)}))}walkRules(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("rule"===t.type&&i.test(t.selector))return s(t,e)}):this.walk((t,e)=>{if("rule"===t.type&&t.selector===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("rule"===t.type)return s(t,e)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Ys.registerParse=t=>{Ws=t},Ys.registerRule=t=>{zs=t},Ys.registerAtRule=t=>{Zs=t},Ys.registerRoot=t=>{Vs=t};o=Ys,(Ys.default=Ys).rebuild=t=>{"atrule"===t.type?Object.setPrototypeOf(t,Zs.prototype):"rule"===t.type?Object.setPrototypeOf(t,zs.prototype):"decl"===t.type?Object.setPrototypeOf(t,Ps.prototype):"comment"===t.type?Object.setPrototypeOf(t,Gs.prototype):"root"===t.type&&Object.setPrototypeOf(t,Vs.prototype),t[Us]=!0,t.nodes&&t.nodes.forEach(t=>{Ys.rebuild(t)})},r=o;let Ks,Js;t=class extends r{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new Ks(new Js,this,t).stringify()}},t.registerLazyResult=t=>{Ks=t},t.registerProcessor=t=>{Js=t},S=t;t.default=t;h=class{constructor(t,e={}){for(var i in this.type="warning",this.text=t,e.node&&e.node.source&&(t=e.node.rangeBy(e),this.line=t.start.line,this.column=t.start.column,this.endLine=t.end.line,this.endColumn=t.end.column),e)this[i]=e[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},Ri=h;h.default=h;let Xs=Ri;f=class{constructor(t,e,i){this.processor=t,this.messages=[],this.root=e,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);t=new Xs(t,e);return this.messages.push(t),t}warnings(){return this.messages.filter(t=>"warning"===t.type)}get content(){return this.css}},n=f;f.default=f;const $s="'".charCodeAt(0),Hs='"'.charCodeAt(0),qs="\\".charCodeAt(0),Qs="/".charCodeAt(0),tr="\n".charCodeAt(0),er=" ".charCodeAt(0),ir="\f".charCodeAt(0),sr="\t".charCodeAt(0),rr="\r".charCodeAt(0),nr="[".charCodeAt(0),or="]".charCodeAt(0),ar="(".charCodeAt(0),lr=")".charCodeAt(0),hr="{".charCodeAt(0),ur="}".charCodeAt(0),cr=";".charCodeAt(0),dr="*".charCodeAt(0),fr=":".charCodeAt(0),vr="@".charCodeAt(0),pr=/[\t\n\f\r "#'()/;[\\\]{}]/g,mr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,gr=/.[\r\n"'(/\\]/,yr=/[\da-f]/i;v=class extends o{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}},i=v,o.registerAtRule(v.default=v),c=o;let br,wr;g=class extends c{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,i){t=super.normalize(t);if(e)if("prepend"===i)1<this.nodes.length?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var s of t)s.raws.before=e.raws.before;return t}removeChild(t,e){var i=this.index(t);return!e&&0===i&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(t)}toResult(t={}){return new br(new wr,this,t).stringify()}},g.registerLazyResult=t=>{br=t},g.registerProcessor=t=>{wr=t},r=g;c.registerRoot(g.default=g);let Sr={comma(t){return Sr.split(t,[","],!0)},space(t){return Sr.split(t,[" ","\n","\t"])},split(t,e,i){var s,r=[];let n="",o=!1,a=0,l=!1,h="",u=!1;for(s of t)u?u=!1:"\\"===s?u=!0:l?s===h&&(l=!1):'"'===s||"'"===s?(l=!0,h=s):"("===s?a+=1:")"===s?0<a&&--a:0===a&&e.includes(s)&&(o=!0),o?(""!==n&&r.push(n.trim()),n="",o=!1):n+=s;return!i&&""===n||r.push(n.trim()),r}};t=Sr;Sr.default=Sr;let Ir=t;h=class extends o{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Ir.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,e=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(e)}},f=h;o.registerRule(h.default=h);let Cr=u,kr=function(e,t={}){let s=e.css.valueOf(),r=t.ignoreErrors,n,o,a,l,h,u,c,d,f,v,p=s.length,m=0,g=[],y=[];function b(t){throw e.error("Unclosed "+t,m)}return{back:function(t){y.push(t)},endOfFile:function(){return 0===y.length&&m>=p},nextToken:function(t){if(y.length)return y.pop();if(!(m>=p)){var e=!!t&&t.ignoreUnclosed;switch(n=s.charCodeAt(m)){case tr:case er:case sr:case rr:case ir:for(o=m;o+=1,(n=s.charCodeAt(o))===er||n===tr||n===sr||n===rr||n===ir;);v=["space",s.slice(m,o)],m=o-1;break;case nr:case or:case hr:case ur:case fr:case cr:case lr:var i=String.fromCharCode(n);v=[i,i,m];break;case ar:if(d=g.length?g.pop()[1]:"",f=s.charCodeAt(m+1),"url"===d&&f!==$s&&f!==Hs&&f!==er&&f!==tr&&f!==sr&&f!==ir&&f!==rr){o=m;do{if(u=!1,-1===(o=s.indexOf(")",o+1))){if(r||e){o=m;break}b("bracket")}for(c=o;s.charCodeAt(c-1)===qs;)--c,u=!u}while(u);v=["brackets",s.slice(m,o+1),m,o],m=o}else o=s.indexOf(")",m+1),l=s.slice(m,o+1),-1===o||gr.test(l)?v=["(","(",m]:(v=["brackets",l,m,o],m=o);break;case $s:case Hs:a=n===$s?"'":'"',o=m;do{if(u=!1,-1===(o=s.indexOf(a,o+1))){if(r||e){o=m+1;break}b("string")}for(c=o;s.charCodeAt(c-1)===qs;)--c,u=!u}while(u);v=["string",s.slice(m,o+1),m,o],m=o;break;case vr:pr.lastIndex=m+1,pr.test(s),o=0===pr.lastIndex?s.length-1:pr.lastIndex-2,v=["at-word",s.slice(m,o+1),m,o],m=o;break;case qs:for(o=m,h=!0;s.charCodeAt(o+1)===qs;)o+=1,h=!h;if(n=s.charCodeAt(o+1),h&&n!==Qs&&n!==er&&n!==tr&&n!==sr&&n!==rr&&n!==ir&&(o+=1,yr.test(s.charAt(o)))){for(;yr.test(s.charAt(o+1));)o+=1;s.charCodeAt(o+1)===er&&(o+=1)}v=["word",s.slice(m,o+1),m,o],m=o;break;default:m=(n===Qs&&s.charCodeAt(m+1)===dr?(0===(o=s.indexOf("*/",m+2)+1)&&(r||e?o=s.length:b("comment")),v=["comment",s.slice(m,o+1),m,o]):(mr.lastIndex=m+1,mr.test(s),o=0===mr.lastIndex?s.length-1:mr.lastIndex-2,v=["word",s.slice(m,o+1),m,o],g.push(v)),o)}return m++,v}},position:function(){return m}}},Or=y,_r=i,Ar=r,Mr=f;const jr={empty:!0,space:!0};let Rr=class{constructor(t){this.input=t,this.root=new Ar,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){var e,i=new _r;i.name=t[1].slice(1),""===i.name&&this.unnamedAtrule(i,t),this.init(i,t[2]);let s,r,n=!1,o=!1;for(var a=[],l=[];!this.tokenizer.endOfFile();){if("("===(e=(t=this.tokenizer.nextToken())[0])||"["===e?l.push("("===e?")":"]"):"{"===e&&0<l.length?l.push("}"):e===l[l.length-1]&&l.pop(),0===l.length){if(";"===e){i.source.end=this.getPosition(t[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===e){o=!0;break}if("}"===e){if(0<a.length){for(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(i.source.end=this.getPosition(s[3]||s[2]),i.source.end.offset++)}this.end(t);break}}if(a.push(t),this.tokenizer.endOfFile()){n=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),n&&(t=a[a.length-1],i.source.end=this.getPosition(t[3]||t[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),o&&(i.nodes=[],this.current=i)}checkMissedSemicolon(s){var r=this.colon(s);if(!1!==r){let e=0,i;for(let t=r-1;0<=t&&("space"===(i=s[t])[0]||2!==(e+=1));t--);throw this.input.error("Missed semicolon","word"===i[0]?i[3]+1:i[2])}}colon(t){let e=0,i,s,r;for(var[n,o]of t.entries()){if("("===(s=(i=o)[0])&&(e+=1),")"===s&&--e,0===e&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return n}this.doubleColon(i)}r=i}return!1}comment(t){var e=new Or,t=(this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++,t[1].slice(2,-2));/^\s*$/.test(t)?(e.text="",e.raws.left=t,e.raws.right=""):(t=t.match(/^(\s*)([^]*\S)(\s*)$/),e.text=t[2],e.raws.left=t[1],e.raws.right=t[3])}createTokenizer(){this.tokenizer=kr(this.input)}decl(t,e){var i,s=new Cr,r=(this.init(s,t[0][2]),t[t.length-1]);for(";"===r[0]&&(this.semicolon=!0,t.pop()),s.source.end=this.getPosition(r[3]||r[2]||function(e){for(let t=e.length-1;0<=t;t--){var i=e[t],i=i[3]||i[2];if(i)return i}}(t)),s.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),s.raws.before+=t.shift()[1];for(s.source.start=this.getPosition(t[0][2]),s.prop="";t.length;){var n=t[0][0];if(":"===n||"space"===n||"comment"===n)break;s.prop+=t.shift()[1]}s.raws.between="";let o;for(;t.length;){if(":"===(o=t.shift())[0]){s.raws.between+=o[1];break}"word"===o[0]&&/\w/.test(o[1])&&this.unknownWord([o]),s.raws.between+=o[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let a=[];for(;t.length&&("space"===(i=t[0][0])||"comment"===i);)a.push(t.shift());this.precheckMissedSemicolon(t);for(let i=t.length-1;0<=i;i--){if("!important"===(o=t[i])[1].toLowerCase()){s.important=!0;var l=this.stringFrom(t,i);" !important"!==(l=this.spacesFromEnd(t)+l)&&(s.raws.important=l);break}if("important"===o[1].toLowerCase()){var h=t.slice(0);let e="";for(let t=i;0<t;t--){var u=h[t][0];if(0===e.trim().indexOf("!")&&"space"!==u)break;e=h.pop()[1]+e}0===e.trim().indexOf("!")&&(s.important=!0,s.raws.important=e,t=h)}if("space"!==o[0]&&"comment"!==o[0])break}t.some(t=>"space"!==t[0]&&"comment"!==t[0])&&(s.raws.between+=a.map(t=>t[1]).join(""),a=[]),this.raw(s,"value",a.concat(t),e),s.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new Mr;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){this.spaces+=t[1],this.current.nodes&&(t=this.current.nodes[this.current.nodes.length-1])&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){let e=!1;var i;let s=!1,r=null;var n=[],o=t[1].startsWith("--"),a=[];let l=t;for(;l;){if(i=l[0],a.push(l),"("===i||"["===i)r=r||l,n.push("("===i?")":"]");else if(o&&s&&"{"===i)r=r||l,n.push("}");else if(0===n.length){if(";"===i){if(s)return void this.decl(a,o);break}if("{"===i)return void this.rule(a);if("}"===i){this.tokenizer.back(a.pop()),e=!0;break}":"===i&&(s=!0)}else i===n[n.length-1]&&(n.pop(),0===n.length)&&(r=null);l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),0<n.length&&this.unclosedBracket(r),e&&s){if(!o)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,i,s){var r,n,o,a,l=i.length;let h="",u=!0;for(let t=0;t<l;t+=1)"space"===(o=(r=i[t])[0])&&t===l-1&&!s||"comment"===o&&(o=i[t-1]?i[t-1][0]:"empty",n=i[t+1]?i[t+1][0]:"empty",jr[o]||jr[n]||","===h.slice(-1))?u=!1:h+=r[1];u||(a=i.reduce((t,e)=>t+e[1],""),t.raws[e]={raw:a,value:h}),t[e]=h}rule(t){t.pop();var e=new Mr;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){var e;let i="";for(;t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)i=t.pop()[1]+i;return i}spacesAndCommentsFromStart(t){var e;let i="";for(;t.length&&("space"===(e=t[0][0])||"comment"===e);)i+=t.shift()[1];return i}spacesFromEnd(t){let e="";for(;t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(e,i){let s="";for(let t=i;t<e.length;t++)s+=e[t][1];return e.splice(i,e.length-i),s}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},xr=m;function Er(t,e){t=new xr(t,e),e=new Rr(t);try{e.parse()}catch(t){throw t}return e.root}v=Er;o.registerParse(Er.default=Er);let{isClean:Tr,my:Nr}=b,Dr=p,Fr=s,Br=o;c=S;let Lr=n,Ur=v;g=r;const Pr={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Gr={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},Wr={Once:!0,postcssPlugin:!0,prepare:!0},zr=0;function Zr(t){return"object"==typeof t&&"function"==typeof t.then}function Vr(t){let e=!1;var i=Pr[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[i,i+"-"+e,zr,i+"Exit",i+"Exit-"+e]:e?[i,i+"-"+e,i+"Exit",i+"Exit-"+e]:t.append?[i,zr,i+"Exit"]:[i,i+"Exit"]}function Yr(t){let e;return{eventIndex:0,events:e="document"===t.type?["Document",zr,"DocumentExit"]:"root"===t.type?["Root",zr,"RootExit"]:Vr(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function Kr(t){return t[Tr]=!1,t.nodes&&t.nodes.forEach(t=>Kr(t)),t}let Jr={};h=class Yo{constructor(t,e,i){this.stringified=!1,this.processed=!1;let s;if("object"!=typeof e||null===e||"root"!==e.type&&"document"!==e.type)if(e instanceof Yo||e instanceof Lr)s=Kr(e.root),e.map&&(void 0===i.map&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=e.map);else{let t=Ur;i.syntax&&(t=i.syntax.parse),(t=i.parser?i.parser:t).parse&&(t=t.parse);try{s=t(e,i)}catch(t){this.processed=!0,this.error=t}s&&!s[Nr]&&Br.rebuild(s)}else s=Kr(e);this.result=new Lr(t,s,i),this.helpers={...Jr,postcss:Jr,result:this.result},this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?{...t,...t.prepare(this.result)}:t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var i=this.result.lastPlugin;try{e&&e.addToError(t),"CssSyntaxError"!==(this.error=t).name||t.plugin?i.postcssVersion:(t.plugin=i.postcssPlugin,t.setMessage())}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t,e=(t,e,i)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,i])};for(t of this.plugins)if("object"==typeof t)for(var i in t){if(!Gr[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Wr[i])if("object"==typeof t[i])for(var s in t[i])"*"===s?e(t,i,t[i][s]):e(t,i+"-"+s.toLowerCase(),t[i][s]);else"function"==typeof t[i]&&e(t,i,t[i])}this.hasListener=0<Object.keys(this.listeners).length}async runAsync(){for(let t=this.plugin=0;t<this.plugins.length;t++){var e=this.plugins[t],e=this.runOnRoot(e);if(Zr(e))try{await e}catch(t){throw this.handleError(t)}}if(this.prepareVisitors(),this.hasListener){for(var i,s=this.result.root;!s[Tr];){s[Tr]=!0;for(var r=[Yr(s)];0<r.length;){var n=this.visitTick(r);if(Zr(n))try{await n}catch(t){n=r[r.length-1].node;throw this.handleError(t,n)}}}if(this.listeners.OnceExit)for(let[t,e]of this.listeners.OnceExit){this.result.lastPlugin=t;try{"document"===s.type?(i=s.nodes.map(t=>e(t,this.helpers)),await Promise.all(i)):await e(s,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{var t;return"object"==typeof e&&e.Once?"document"===this.result.root.type?Zr((t=this.result.root.nodes.map(t=>e.Once(t,this.helpers)))[0])?Promise.all(t):t:e.Once(this.result.root,this.helpers):"function"==typeof e?e(this.result.root,this.result):void 0}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(!this.stringified){this.stringified=!0,this.sync();var e=this.result.opts;let t=Fr;e.syntax&&(t=e.syntax.stringify),(t=e.stringifier?e.stringifier:t).stringify&&(t=t.stringify);e=new Dr(t,this.result.root,this.result.opts).generate();this.result.css=e[0],this.result.map=e[1]}return this.result}sync(){if(this.error)throw this.error;if(!this.processed){if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins)if(Zr(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[Tr];)e[Tr]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var i of e.nodes)this.visitSync(this.listeners.OnceExit,i);else this.visitSync(this.listeners.OnceExit,e)}}return this.result}then(t,e){return this.async().then(t,e)}toString(){return this.css}visitSync(t,e){for(var[i,s]of t){this.result.lastPlugin=i;let t;try{t=s(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(Zr(t))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:i,visitors:s}=e;if("root"===i.type||"document"===i.type||i.parent){if(0<s.length&&e.visitorIndex<s.length){var[r,n]=s[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===s.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=r;try{return n(i.toProxy(),this.helpers)}catch(t){throw this.handleError(t,i)}}if(0!==e.iterator){for(var o,a=e.iterator;o=i.nodes[i.indexes[a]];)if(i.indexes[a]+=1,!o[Tr])return o[Tr]=!0,void t.push(Yr(o));e.iterator=0,delete i.indexes[a]}for(var l=e.events;e.eventIndex<l.length;){var h=l[e.eventIndex];if(e.eventIndex+=1,h===zr)return void(i.nodes&&i.nodes.length&&(i[Tr]=!0,e.iterator=i.getIterator()));if(this.listeners[h])return void(e.visitors=this.listeners[h])}}t.pop()}walkSync(t){var e;t[Tr]=!0;for(e of Vr(t))if(e===zr)t.nodes&&t.each(t=>{t[Tr]||this.walkSync(t)});else{var i=this.listeners[e];if(i&&this.visitSync(i,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}},h.registerPostcss=t=>{Jr=t},b=h;g.registerLazyResult(h.default=h),c.registerLazyResult(h);let Xr=p,$r=s;let Hr=v;const qr=n;g=class{constructor(t,e,i){e=e.toString(),this.stringified=!1,this.Ss=t,this.Cs=e,this.Is=i,this.ks=void 0;t=$r;this.result=new qr(this.Ss,void 0,this.Is),this.result.css=e;let s=this;$Q2(this.result,"root",{get(){return s.root}});i=new Xr(t,void 0,this.Is,e);i.isMap()?([t,e]=i.generate(),t&&(this.result.css=t),e&&(this.result.map=e)):(i.clearAnnotation(),this.result.css=i.css)}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return this.async().then(t,e)}toString(){return this.Cs}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this.Os)return this.Os;let t;var e=Hr;try{t=e(this.Cs,this.Is)}catch(t){this.error=t}if(this.error)throw this.error;return this.Os=t}get[Symbol.toStringTag](){return"NoWorkResult"}},c=g;g.default=g;let Qr=c,tn=b;h=S,p=class{constructor(t=[]){this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){let e=[];for(var i of t)if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"==typeof i&&Array.isArray(i.plugins))e=e.concat(i.plugins);else if("object"==typeof i&&i.postcssPlugin)e.push(i);else if("function"==typeof i)e.push(i);else if("object"!=typeof i||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");return e}process(t,e={}){return new(this.plugins.length||e.parser||e.stringifier||e.syntax?tn:Qr)(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},g=p;r.registerProcessor(p.default=p),h.registerProcessor(p);let en=u,sn=w,rn=y,nn=i,on=m,an=r,ln=f;function hn(t,i){if(Array.isArray(t))return t.map(t=>hn(t));let{inputs:e,...s}=t;if(e){i=[];for(var r of e){r={...r,__proto__:on.prototype};r.map&&(r.map={...r.map,__proto__:sn.prototype}),i.push(r)}}if(s.nodes&&(s.nodes=t.nodes.map(t=>hn(t,i))),s.source){let{inputId:t,...e}=s.source;s.source=e,null!=t&&(s.source.input=i[t])}if("root"===s.type)return new an(s);if("decl"===s.type)return new en(s);if("rule"===s.type)return new ln(s);if("comment"===s.type)return new rn(s);if("atrule"===s.type)return new nn(s);throw new Error("Unknown node type: "+t.type)}c=hn,hn.default=hn,h=d;let un=u;p=b,w=o;let cn=g;d=s,u=c;let dn=S;b=Ri;let fn=y,vn=i;o=n,g=m,s=v,c=t;let pn=f,mn=r;S=l;function k(...t){return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new cn(t)}k.plugin=function(e,i){let s=!1;function r(...t){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");t=i(...t);return t.postcssPlugin=e,t.postcssVersion=(new cn).version,t}let t;return $Q2(r,"postcss",{get(){return t=t||r()}}),r.process=function(t,e,i){return k([r(i)]).process(t,e)},r},k.stringify=d,k.parse=s,k.fromJSON=u,k.list=c,k.comment=t=>new fn(t),k.atRule=t=>new vn(t),k.decl=t=>new un(t),k.rule=t=>new pn(t),k.root=t=>new mn(t),k.document=t=>new dn(t),k.CssSyntaxError=h,k.Declaration=un,k.Container=w,k.Processor=cn,k.Document=dn,k.Comment=fn,k.Warning=b,k.AtRule=vn,k.Result=o,k.Input=g,k.Rule=pn,k.Root=mn,k.Node=S,p.registerPostcss(k);Ri=k,k.default=k,y=qi(Ri);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 gn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},yn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},bn={},wn=()=>!!globalThis.Zone;function Sn(t){if(bn[t])return bn[t];var e=globalThis[t];const i=e.prototype;var s=t in gn?gn[t]:void 0,s=Boolean(s&&s.every(t=>{return Boolean(null==(t=null==(t=Object.getOwnPropertyDescriptor(i,t))?void 0:t.get)?void 0:t.toString().includes("[native code]"))})),r=t in yn?yn[t]:void 0,r=Boolean(r&&r.every(t=>{return"function"==typeof i[t]&&(null==(t=i[t])?void 0:t.toString().includes("[native code]"))}));if(s&&r&&!wn())return bn[t]=e.prototype,e.prototype;try{var n,o=document.createElement("iframe"),a=(document.body.appendChild(o),o.contentWindow);return a?(n=a[t].prototype,document.body.removeChild(o),n?bn[t]=n:i):e.prototype}catch{return i}}const In={};function Cn(t,e,i){var s=t+"."+String(i);return In[s]?In[s].call(e):(t=Sn(t),(t=null==(t=Object.getOwnPropertyDescriptor(t,i))?void 0:t.get)?(In[s]=t).call(e):e[i])}const kn={};function On(t,e,i){var s=t+"."+String(i);return kn[s]?kn[s].bind(e):"function"!=typeof(t=Sn(t)[i])?e[i]:(kn[s]=t).bind(e)}function _n(){return Sn("MutationObserver").constructor}const H={childNodes:function(t){return Cn("Node",t,"childNodes")},parentNode:function(t){return Cn("Node",t,"parentNode")},parentElement:function(t){return Cn("Node",t,"parentElement")},textContent:function(t){return Cn("Node",t,"textContent")},contains:function(t,e){return On("Node",t,"contains")(e)},getRootNode:function(t){return On("Node",t,"getRootNode")()},host:function(t){return t&&"host"in t?Cn("ShadowRoot",t,"host"):null},styleSheets:function(t){return t.styleSheets},shadowRoot:function(t){return t&&"shadowRoot"in t?Cn("Element",t,"shadowRoot"):null},querySelector:function(t,e){return Cn("Element",t,"querySelector")(e)},querySelectorAll:function(t,e){return Cn("Element",t,"querySelectorAll")(e)},mutationObserver:_n};function q(t,e,i=document){const s={capture:!0,passive:!0};return i.addEventListener(t,e,s),()=>i.removeEventListener(t,e,s)}const An="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";i={map:{},getId(){return console.error(An),-1},getNode(){return console.error(An),null},removeNodeFromMap(){console.error(An)},has(){return console.error(An),!1},reset(){console.error(An)}};function Mn(r,n,o={}){let a=null,l=0;return function(...t){var e=Date.now(),i=(l||!1!==o.leading||(l=e),n-(e-l));const s=this;i<=0||n<i?(a&&(clearTimeout(a),a=null),l=e,r.apply(s,t)):a||!1===o.trailing||(a=setTimeout(()=>{l=!1===o.leading?0:Date.now(),a=null,r.apply(s,t)},i))}}function jn(t,e,i,s,r=window){const n=r.Object.getOwnPropertyDescriptor(t,e);return r.$Q2(t,e,s?i:{set(t){setTimeout(()=>{i.set.call(this,t)},0),n&&n.set&&n.set.call(this,t)}}),()=>jn(t,e,n||{},!0)}function Rn(t,e,i){try{if(!(e in t))return()=>{};const r=t[e];var s=i(r);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=s,()=>{t[e]=r}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&new Proxy(i,{get(t,e,i){return"map"===e&&console.error(An),Reflect.get(t,e,i)}});let xn=Date.now;function En(t){var e,i=t.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(e=H.parentElement(i.body))?void 0:e.scrollLeft)||(null==(e=null==i?void 0:i.body)?void 0:e.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(e=H.parentElement(i.body))?void 0:e.scrollTop)||(null==(t=null==i?void 0:i.body)?void 0:t.scrollTop)||0}}function Tn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Nn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Dn(t){return t?t.nodeType===t.ELEMENT_NODE?t:H.parentElement(t):null}function N(t,e,i,s){if(t){t=Dn(t);if(t){try{if("string"==typeof e){if(t.classList.contains(e))return!0;if(s&&null!==t.closest("."+e))return!0}else if(jt(t,e,s))return!0}catch(t){}if(i){if(t.matches(i))return!0;if(s&&null!==t.closest(i))return!0}}}return!1}function Fn(t,e,i){return"TITLE"===t.tagName&&i.headTitleMutations||e.getId(t)===gt}function Bn(t){return Boolean(t.changedTouches)}function Ln(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function Un(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function Pn(t){return t&&(!1&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(H.shadowRoot(t)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(xn=()=>(new Date).getTime());class Gn{constructor(){a(this,"id",1),a(this,"styleIDMap",new WeakMap),a(this,"idStyleMap",new Map)}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,e){if(this.has(t))return this.getId(t);let i;return i=void 0===e?this.id++:e,this.styleIDMap.set(t,i),this.idStyleMap.set(i,t),i}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Wn(t){var e;let i=null;return i="getRootNode"in t&&(null==(e=H.getRootNode(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&H.host(H.getRootNode(t))?H.host(H.getRootNode(t)):i}function zn(t){var e=t.ownerDocument;return!!e&&(t=function(t){let e=t;for(var i;i=Wn(e);)e=i;return e}(t),H.contains(e,t))}function Zn(t){var e=t.ownerDocument;return e&&(H.contains(e,t)||zn(t))}var Q=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))({}),tt=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(tt||{}),O=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(O||{}),Vn=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Vn||{}),Yn=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))({}),Kn=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(Kn||{}),Jn=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))({});function Xn(t){return"__ln"in t}class $n{constructor(){a(this,"length",0),a(this,"head",null),a(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let i=this.head;for(let t=0;t<e;t++)i=(null==i?void 0:i.next)||null;return i}addNode(t){var e,i={value:t,previous:null,next:null};t.__ln=i,t.previousSibling&&Xn(t.previousSibling)?(e=t.previousSibling.__ln.next,i.next=e,i.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=i,e&&(e.previous=i)):t.nextSibling&&Xn(t.nextSibling)&&t.nextSibling.__ln.previous?(e=t.nextSibling.__ln.previous,i.previous=e,i.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=i,e&&(e.next=i)):(this.head&&(this.head.previous=i),i.next=this.head,this.head=i),null===i.next&&(this.tail=i),this.length++}removeNode(t){var e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}class Hn{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,"removesSubTreeCache",new Set),a(this,"mutationCb"),a(this,"blockClass"),a(this,"blockSelector"),a(this,"maskTextClass"),a(this,"maskTextSelector"),a(this,"inlineStylesheet"),a(this,"maskInputOptions"),a(this,"maskTextFn"),a(this,"maskInputFn"),a(this,"keepIframeSrcFn"),a(this,"recordCanvas"),a(this,"inlineImages"),a(this,"slimDOMOptions"),a(this,"dataURLOptions"),a(this,"doc"),a(this,"mirror"),a(this,"iframeManager"),a(this,"stylesheetManager"),a(this,"shadowDomManager"),a(this,"canvasManager"),a(this,"processedNodeManager"),a(this,"unattachedDoc"),a(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),a(this,"emit",()=>{if(!this.frozen&&!this.locked){const l=[],h=new Set,u=new $n,c=t=>{let e=t,i=gt;for(;i===gt;)e=e&&e.nextSibling,i=e&&this.mirror.getId(e);return i};for(var i,s,r=e=>{var i=H.parentNode(e);if(i&&Zn(e)){let t=!1;if(e.nodeType===Node.TEXT_NODE){var s=i.tagName;if("TEXTAREA"===s)return;"STYLE"===s&&this.addedSet.has(i)&&(t=!0)}s=Z(i)?this.mirror.getId(Wn(e)):this.mirror.getId(i),i=c(e);if(-1===s||-1===i)return u.addNode(e);var r=Et(e,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:t=>{Ln(t,this.mirror)&&this.iframeManager.addIframe(t),Un(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),Pn(e)&&this.shadowDomManager.addShadowRoot(H.shadowRoot(e),this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)},cssCaptured:t});r&&(l.push({parentId:s,nextId:i,node:r}),h.add(r.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const d of this.movedSet)Qn(this.removesSubTreeCache,d,this.mirror)&&!this.movedSet.has(H.parentNode(d))||r(d);for(const f of this.addedSet)!to(this.droppedSet,f)&&!Qn(this.removesSubTreeCache,f,this.mirror)||to(this.movedSet,f)?r(f):this.droppedSet.add(f);let t=null;for(;u.length;){let e=null;if(!(e=t&&(i=this.mirror.getId(H.parentNode(t.value)),s=c(t.value),-1!==i)&&-1!==s?t:e)){let t=u.tail;for(;t;){var n=t;if(t=t.previous,n){var o=this.mirror.getId(H.parentNode(n.value)),a=c(n.value);if(-1!==a){if(-1!==o){e=n;break}a=n.value,o=H.parentNode(a);if(o&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE){a=H.host(o);if(-1!==this.mirror.getId(a)){e=n;break}}}}}}if(!e){for(;u.head;)u.removeNode(u.head.value);break}t=e.previous,u.removeNode(e.value),r(e.value)}var e={texts:this.texts.map(t=>{var e=t.node,i=H.parentNode(e);return i&&"TEXTAREA"===i.tagName&&this.genTextAreaValueMutation(i),{id:this.mirror.getId(e),value:t.value}}).filter(t=>!h.has(t.id)).filter(t=>this.mirror.has(t.id)),attributes:this.attributes.map(t=>{var e,i,s=t["attributes"];return"string"==typeof s.style&&(e=JSON.stringify(t.styleDiff),i=JSON.stringify(t.Es),e.length<s.style.length)&&(e+i).split("var(").length===s.style.split("var(").length&&(s.style=t.styleDiff),{id:this.mirror.getId(t.node),attributes:s}}).filter(t=>!h.has(t.id)).filter(t=>this.mirror.has(t.id)),removes:this.removes,adds:l};(e.texts.length||e.attributes.length||e.removes.length||e.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(e))}}),a(this,"genTextAreaValueMutation",t=>{let e=this.attributeMap.get(t);e||(e={node:t,attributes:{},styleDiff:{},Es:{}},this.attributes.push(e),this.attributeMap.set(t,e)),e.attributes.value=Array.from(H.childNodes(t),t=>H.textContent(t)||"").join("")}),a(this,"processMutation",o=>{if(!Fn(o.target,this.mirror,this.slimDOMOptions))switch(o.type){case"characterData":var s=H.textContent(o.target);N(o.target,this.blockClass,this.blockSelector,!1)||s===o.oldValue||this.texts.push({value:Rt(o.target,this.maskTextClass,this.maskTextSelector,!0)&&s?this.maskTextFn?this.maskTextFn(s,Dn(o.target)):s.replace(/[\S]/g,"*"):s,node:o.target});break;case"attributes":{var r=o.target;let t=o.attributeName,e=o.target.getAttribute(t);if("value"===t&&(s=lt(r),e=nt({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:s,value:e,maskInputFn:this.maskInputFn})),N(o.target,this.blockClass,this.blockSelector,!1)||e===o.oldValue)return;let i=this.attributeMap.get(o.target);if("IFRAME"===r.tagName&&"src"===t&&!this.keepIframeSrcFn(e)){if(r.contentDocument)return;t="rr_src"}if(i||(i={node:o.target,attributes:{},styleDiff:{},Es:{}},this.attributes.push(i),this.attributeMap.set(o.target,i)),"type"===t&&"INPUT"===r.tagName&&"password"===(o.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!Mt(r.tagName,t))if(i.attributes[t]=At(this.doc,ot(r.tagName),ot(t),e),"style"===t){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}var n=this.unattachedDoc.createElement("span");o.oldValue&&n.setAttribute("style",o.oldValue);for(const h of Array.from(r.style)){var a=r.style.getPropertyValue(h),l=r.style.getPropertyPriority(h);a!==n.style.getPropertyValue(h)||l!==n.style.getPropertyPriority(h)?i.styleDiff[h]=""===l?a:[a,l]:i.Es[h]=[a,l]}for(const u of Array.from(n.style))""===r.style.getPropertyValue(u)&&(i.styleDiff[u]=!1)}else"open"===t&&"DIALOG"===r.tagName&&(r.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal");break}case"childList":N(o.target,this.blockClass,this.blockSelector,!0)||("TEXTAREA"!==o.target.tagName?(o.addedNodes.forEach(t=>this.genAdds(t,o.target)),o.removedNodes.forEach(t=>{var e=this.mirror.getId(t),i=Z(o.target)?this.mirror.getId(H.host(o.target)):this.mirror.getId(o.target);if(!N(o.target,this.blockClass,this.blockSelector,!1)&&!Fn(t,this.mirror,this.slimDOMOptions)&&-1!==this.mirror.getId(t)){if(this.addedSet.has(t))qn(this.addedSet,t),this.droppedSet.add(t);else if(!(this.addedSet.has(o.target)&&-1===e||function t(e,i){var s;return!Z(e)&&(s=i.getId(e),!i.has(s)||(!(s=H.parentNode(e))||s.nodeType!==e.DOCUMENT_NODE)&&(!s||t(s,i)))}(o.target,this.mirror)))if(this.movedSet.has(t)&&this.movedMap[e+"@"+i])qn(this.movedSet,t);else{this.removes.push({parentId:i,id:e,isShadow:!(!Z(o.target)||!V(o.target))||void 0});{i=t;var s=this.removesSubTreeCache;const n=[i];for(;n.length;){var r=n.pop();s.has(r)||(s.add(r),H.childNodes(r).forEach(t=>n.push(t)))}}}this.mapRemoves.push(t)}})):this.genTextAreaValueMutation(o.target))}}),a(this,"genAdds",(e,i)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Fn(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let t=null;(t=i&&this.mirror.hasNode(i)?this.mirror.getId(i):t)&&-1!==t&&(this.movedMap[this.mirror.getId(e)+"@"+t]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);N(e,this.blockClass,this.blockSelector,!1)||(H.childNodes(e).forEach(t=>this.genAdds(t)),Pn(e)&&H.childNodes(H.shadowRoot(e)).forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function qn(e,t){e.delete(t),H.childNodes(t).forEach(t=>qn(e,t))}function Qn(t,e){if(0!==t.size)return t=t,e=e,(e=H.parentNode(e))&&t.has(e)}function to(t,e){return 0!==t.size&&function t(e,i){const s=H.parentNode(i);if(!s)return!1;if(e.has(s))return!0;return t(e,s)}(t,e)}let eo;const et=e=>{return eo?(...t)=>{try{return e(...t)}catch(t){if(!eo||!0!==eo(t))throw t}}:e},io=[];function so(t){try{if("composedPath"in t){var e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function ro(t,e){var i=new Hn,t=(io.push(i),i.init(t),new(_n())(et(i.processMutations.bind(i))));return t.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),t}function no({mouseInteractionCb:o,doc:s,mirror:a,blockClass:l,blockSelector:h,sampling:t}){if(!1===t.mouseInteraction)return()=>{};const e=!0===t.mouseInteraction||void 0===t.mouseInteraction?{}:t.mouseInteraction,r=[];let u=null;return Object.keys(O).filter(t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==e[t]).forEach(t=>{let e=ot(t);n=t;var n,i=i=>{var s=so(i);if(!N(s,l,h,!0)){let t=null,e=n;if("pointerType"in i){switch(i.pointerType){case"mouse":t=Vn.Mouse;break;case"touch":t=Vn.Touch;break;case"pen":t=Vn.Pen}t===Vn.Touch?O[n]===O.MouseDown?e="TouchStart":O[n]===O.MouseUp&&(e="TouchEnd"):(t,Vn.Pen)}else Bn(i)&&(t=Vn.Touch);null!==t?(u=t,(e.startsWith("Touch")&&t===Vn.Touch||e.startsWith("Mouse")&&t===Vn.Mouse)&&(t=null)):O[n]===O.Click&&(t=u,u=null);var r,i=Bn(i)?i.changedTouches[0]:i;i&&(s=a.getId(s),{clientX:i,clientY:r}=i,et(o)({type:O[e],id:s,x:i,y:r,...null!==t&&{pointerType:t}}))}};if(window.PointerEvent)switch(O[t]){case O.MouseDown:case O.MouseUp:e=e.replace("mouse","pointer");break;case O.TouchStart:case O.TouchEnd:return}r.push(q(e,i,s))}),et(()=>{r.forEach(t=>t())})}function oo({scrollCb:s,doc:r,mirror:n,blockClass:o,blockSelector:a,sampling:t}){return q("scroll",et(Mn(et(t=>{var e,i,t=so(t);t&&!N(t,o,a,!0)&&(e=n.getId(t),t===r&&r.defaultView?(i=En(r.defaultView),s({id:e,x:i.left,y:i.top})):s({id:e,x:t.scrollLeft,y:t.scrollTop}))}),t.scroll||100)),r)}const ao=["INPUT","TEXTAREA","SELECT"],lo=new WeakMap;function ho(t){var e,i;return t=t,e=[],vo("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||vo("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||vo("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||vo("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule?(i=Array.from(t.parentRule.cssRules).indexOf(t),e.unshift(i)):t.parentStyleSheet&&(i=Array.from(t.parentStyleSheet.cssRules).indexOf(t),e.unshift(i)),e}function uo(t,e,i){let s,r;return t?(t.ownerNode?s=e.getId(t.ownerNode):r=i.getId(t),{styleId:r,id:s}):{}}function co({mirror:t,stylesheetManager:i},e){let s=null;s="#document"===e.nodeName?t.getId(e):t.getId(H.host(e));t="#document"===e.nodeName?null==(t=e.defaultView)?void 0:t.Document:null==(t=null==(t=e.ownerDocument)?void 0:t.defaultView)?void 0:t.ShadowRoot;const r=null!=t&&t.prototype?Object.getOwnPropertyDescriptor(null==t?void 0:t.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&t&&r?($Q2(e,"adoptedStyleSheets",{configurable:r.configurable,enumerable:r.enumerable,get(){var t;return null==(t=r.get)?void 0:t.call(this)},set(t){var e=null==(e=r.set)?void 0:e.call(this,t);if(null!==s&&-1!==s)try{i.adoptStyleSheets(t,s)}catch(t){}return e}}),et(()=>{$Q2(e,"adoptedStyleSheets",{configurable:r.configurable,enumerable:r.enumerable,get:r.get,set:r.set})})):()=>{}}function fo(t,e={}){var r,i=t.doc.defaultView;if(!i)return()=>{};{var s=t,n=e;const{mutationCb:w,mousemoveCb:S,mouseInteractionCb:I,scrollCb:C,viewportResizeCb:k,inputCb:O,mediaInteractionCb:_,styleSheetRuleCb:A,styleDeclarationCb:M,canvasMutationCb:j,fontCb:R,selectionCb:x,customElementCb:E}=s;s.mutationCb=(...t)=>{n.mutation&&n.mutation(...t),w(...t)},s.mousemoveCb=(...t)=>{n.mousemove&&n.mousemove(...t),S(...t)},s.mouseInteractionCb=(...t)=>{n.mouseInteraction&&n.mouseInteraction(...t),I(...t)},s.scrollCb=(...t)=>{n.scroll&&n.scroll(...t),C(...t)},s.viewportResizeCb=(...t)=>{n.viewportResize&&n.viewportResize(...t),k(...t)},s.inputCb=(...t)=>{n.input&&n.input(...t),O(...t)},s.mediaInteractionCb=(...t)=>{n.mediaInteaction&&n.mediaInteaction(...t),_(...t)},s.styleSheetRuleCb=(...t)=>{n.styleSheetRule&&n.styleSheetRule(...t),A(...t)},s.styleDeclarationCb=(...t)=>{n.styleDeclaration&&n.styleDeclaration(...t),M(...t)},s.canvasMutationCb=(...t)=>{n.canvasMutation&&n.canvasMutation(...t),j(...t)},s.fontCb=(...t)=>{n.font&&n.font(...t),R(...t)},s.selectionCb=(...t)=>{n.selection&&n.selection(...t),x(...t)},s.customElementCb=(...t)=>{n.customElement&&n.customElement(...t),E(...t)}}let o;t.recordDOM&&(o=ro(t,t.doc));const a=function({mousemoveCb:i,sampling:t,doc:e,mirror:r}){if(!1===t.mousemove)return()=>{};var s="number"==typeof t.mousemove?t.mousemove:50,t="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let n=[],o;const a=Mn(et(t=>{const e=Date.now()-o;i(n.map(t=>(t.timeOffset-=e,t)),t),n=[],o=null}),t),l=[q("mousemove",t=et(Mn(et(t=>{var e=so(t),{clientX:i,clientY:s}=Bn(t)?t.changedTouches[0]:t;o=o||xn(),n.push({x:i,y:s,id:r.getId(e),timeOffset:xn()-o}),a("undefined"!=typeof DragEvent&&t instanceof DragEvent?tt.Drag:t instanceof MouseEvent?tt.MouseMove:tt.TouchMove)}),s,{trailing:!1})),e),q("touchmove",t,e),q("drag",t,e)];return et(()=>{l.forEach(t=>t())})}(t),l=no(t),h=oo(t),u=function({viewportResizeCb:i},{win:t}){let s=-1,r=-1;return q("resize",et(Mn(et(()=>{var t=Tn(),e=Nn();s===t&&r===e||(i({width:Number(e),height:Number(t)}),s=t,r=e)}),200)),t)}(t,{win:i}),c=function({inputCb:s,doc:o,mirror:r,blockClass:t,blockSelector:i,ignoreClass:a,ignoreSelector:l,maskInputOptions:h,maskInputFn:u,sampling:e,userTriggeredOnInput:c}){function n(e){let s=so(e);var e=e.isTrusted,r=s&&s.tagName;if((s=s&&"OPTION"===r?H.parentElement(s):s)&&r&&!(ao.indexOf(r)<0)&&!N(s,t,i,!0)&&!(s.classList.contains(a)||l&&s.matches(l))){let t=s.value,i=!1;var n=lt(s)||"",r=("radio"===n||"checkbox"===n?i=s.checked:(h[r.toLowerCase()]||h[n])&&(t=nt({element:s,maskInputOptions:h,tagName:r,type:n,value:t,maskInputFn:u})),d(s,c?{text:t,isChecked:i,userTriggered:e}:{text:t,isChecked:i}),s.name);"radio"===n&&r&&i&&o.querySelectorAll(`input[type="radio"][name="${r}"]`).forEach(t=>{var e;t!==s&&(e=t.value,d(t,c?{text:e,isChecked:!i,userTriggered:!1}:{text:e,isChecked:!i}))})}}function d(t,e){var i=lo.get(t);i&&i.text===e.text&&i.isChecked===e.isChecked||(lo.set(t,e),i=r.getId(t),et(s)({...e,id:i}))}var f;const v=("last"===e.input?["change"]:["input","change"]).map(t=>q(t,et(n),o)),p=o.defaultView;return p?(e=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),f=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]],e&&e.set&&v.push(...f.map(t=>jn(t[0],t[1],{set(){et(n)({target:this,isTrusted:!1})}},!1,p))),et(()=>{v.forEach(t=>t())})):()=>{v.forEach(t=>t())}}(t),d=function({mediaInteractionCb:a,blockClass:l,blockSelector:h,mirror:u,sampling:t,doc:e}){var i=et(o=>Mn(et(t=>{var e,i,s,r,n,t=so(t);t&&!N(t,l,h,!0)&&({currentTime:e,volume:i,muted:s,playbackRate:r,loop:n}=t,a({type:o,id:u.getId(t),currentTime:e,volume:i,muted:s,playbackRate:r,loop:n}))}),t.media||500));const s=[q("play",i(Kn.Play),e),q("pause",i(Kn.Pause),e),q("seeked",i(Kn.Seeked),e),q("volumechange",i(Kn.VolumeChange),e),q("ratechange",i(Kn.RateChange),e)];return et(()=>{s.forEach(t=>t())})}(t);let f=()=>{},v=()=>{},p=()=>{},m=()=>{};t.recordDOM&&(f=function({styleSheetRuleCb:a,mirror:l,stylesheetManager:h},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const t=s.CSSStyleSheet.prototype.insertRule,e=(s.CSSStyleSheet.prototype.insertRule=new Proxy(t,{apply:et((t,e,i)=>{var[s,r]=i,{id:n,styleId:o}=uo(e,l,h.styleMirror);return(n&&-1!==n||o&&-1!==o)&&a({id:n,styleId:o,adds:[{rule:s,index:r}]}),t.apply(e,i)})}),s.CSSStyleSheet.prototype.addRule=function(t,e,i=this.cssRules.length){return s.CSSStyleSheet.prototype.insertRule.apply(this,[t+` { ${e} }`,i])},s.CSSStyleSheet.prototype.deleteRule);s.CSSStyleSheet.prototype.deleteRule=new Proxy(e,{apply:et((t,e,i)=>{var[s]=i,{id:r,styleId:n}=uo(e,l,h.styleMirror);return(r&&-1!==r||n&&-1!==n)&&a({id:r,styleId:n,removes:[{index:s}]}),t.apply(e,i)})}),s.CSSStyleSheet.prototype.removeRule=function(t){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[t])};let i;s.CSSStyleSheet.prototype.replace&&(i=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:et((t,e,i)=>{var[s]=i,{id:r,styleId:n}=uo(e,l,h.styleMirror);return(r&&-1!==r||n&&-1!==n)&&a({id:r,styleId:n,replace:s}),t.apply(e,i)})}));let r;s.CSSStyleSheet.prototype.replaceSync&&(r=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(r,{apply:et((t,e,i)=>{var[s]=i,{id:r,styleId:n}=uo(e,l,h.styleMirror);return(r&&-1!==r||n&&-1!==n)&&a({id:r,styleId:n,replaceSync:s}),t.apply(e,i)})}));const n={},o=(po("CSSGroupingRule")?n.CSSGroupingRule=s.CSSGroupingRule:(po("CSSMediaRule")&&(n.CSSMediaRule=s.CSSMediaRule),po("CSSConditionRule")&&(n.CSSConditionRule=s.CSSConditionRule),po("CSSSupportsRule")&&(n.CSSSupportsRule=s.CSSSupportsRule)),{});return Object.entries(n).forEach(([t,e])=>{o[t]={insertRule:e.prototype.insertRule,deleteRule:e.prototype.deleteRule},e.prototype.insertRule=new Proxy(o[t].insertRule,{apply:et((t,e,i)=>{var[s,r]=i,{id:n,styleId:o}=uo(e.parentStyleSheet,l,h.styleMirror);return(n&&-1!==n||o&&-1!==o)&&a({id:n,styleId:o,adds:[{rule:s,index:[...ho(e),r||0]}]}),t.apply(e,i)})}),e.prototype.deleteRule=new Proxy(o[t].deleteRule,{apply:et((t,e,i)=>{var[s]=i,{id:r,styleId:n}=uo(e.parentStyleSheet,l,h.styleMirror);return(r&&-1!==r||n&&-1!==n)&&a({id:r,styleId:n,removes:[{index:[...ho(e),s]}]}),t.apply(e,i)})})}),et(()=>{s.CSSStyleSheet.prototype.insertRule=t,s.CSSStyleSheet.prototype.deleteRule=e,i&&(s.CSSStyleSheet.prototype.replace=i),r&&(s.CSSStyleSheet.prototype.replaceSync=r),Object.entries(n).forEach(([t,e])=>{e.prototype.insertRule=o[t].insertRule,e.prototype.deleteRule=o[t].deleteRule})})}(t,{win:i}),v=co(t,t.doc),p=function({styleDeclarationCb:l,mirror:h,ignoreCSSAttributes:u,stylesheetManager:c},{win:t}){const d=t.CSSStyleDeclaration.prototype.setProperty,o=(t.CSSStyleDeclaration.prototype.setProperty=new Proxy(d,{apply:et((t,e,i)=>{var s,r,[n,o,a]=i;return u.has(n)?d.apply(e,[n,o,a]):({id:s,styleId:r}=uo(null==(s=e.parentRule)?void 0:s.parentStyleSheet,h,c.styleMirror),(s&&-1!==s||r&&-1!==r)&&l({id:s,styleId:r,set:{property:n,value:o,priority:a},index:ho(e.parentRule)}),t.apply(e,i))})}),t.CSSStyleDeclaration.prototype.removeProperty);return t.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:et((t,e,i)=>{var s,r,[n]=i;return u.has(n)?o.apply(e,[n]):({id:s,styleId:r}=uo(null==(s=e.parentRule)?void 0:s.parentStyleSheet,h,c.styleMirror),(s&&-1!==s||r&&-1!==r)&&l({id:s,styleId:r,remove:{property:n},index:ho(e.parentRule)}),t.apply(e,i))})}),et(()=>{t.CSSStyleDeclaration.prototype.setProperty=d,t.CSSStyleDeclaration.prototype.removeProperty=o})}(t,{win:i}),t.collectFonts)&&(m=function({fontCb:i,doc:t}){const e=t.defaultView;if(!e)return()=>{};const s=[],r=new WeakMap,n=e.FontFace;return e.FontFace=function(t,e,i){var s=new n(t,e,i);return r.set(s,{family:t,buffer:"string"!=typeof e,descriptors:i,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),s},t=Rn(t.fonts,"add",function(t){return function(e){return setTimeout(et(()=>{var t=r.get(e);t&&(i(t),r.delete(e))}),0),t.apply(this,[e])}}),s.push(()=>{e.FontFace=n}),s.push(t),et(()=>{s.forEach(t=>t())})}(t));const g=function(t){const{doc:l,mirror:h,blockClass:u,blockSelector:c,selectionCb:d}=t;let f=!0;return(t=et(()=>{var e=l.getSelection();if(!(!e||f&&null!=e&&e.isCollapsed)){f=e.isCollapsed||!1;var i=[],s=e.rangeCount||0;for(let t=0;t<s;t++){var{startContainer:r,startOffset:n,endContainer:o,endOffset:a}=e.getRangeAt(t);N(r,u,c,!0)||N(o,u,c,!0)||i.push({start:h.getId(r),startOffset:n,end:h.getId(o),endOffset:a})}d({ranges:i})}}))(),q("selectionchange",t)}(t),y=({doc:e,customElementCb:r}=[t][0],(e=e.defaultView)&&e.customElements?Rn(e.customElements,"define",function(s){return function(e,t,i){try{r({define:{name:e}})}catch(t){console.warn("Custom element callback failed for "+e)}return s.apply(this,[e,t,i])}}):()=>{}),b=[];for(const T of t.plugins)b.push(T.observer(T.callback,i,T.options));return et(()=>{io.forEach(t=>t.reset()),null!=o&&o.disconnect(),a(),l(),h(),u(),c(),d(),f(),v(),p(),m(),g(),y(),b.forEach(t=>t())})}function vo(t){return void 0!==window[t]}function po(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class mo{constructor(t){a(this,"iframeIdToRemoteIdMap",new WeakMap),a(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,i,s){i=i||this.getIdToRemoteIdMap(t),s=s||this.getRemoteIdToIdMap(t);let r=i.get(e);return r||(r=this.generateIdFn(),i.set(e,r),s.set(r,e)),r}getIds(e,t){const i=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,i,s))}getRemoteId(t,e,i){i=i||this.getRemoteIdToIdMap(t);return"number"!=typeof e?e:i.get(e)||-1}getRemoteIds(e,t){const i=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,i))}reset(t){t?(this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)):(this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap)}getIdToRemoteIdMap(t){let e=this.iframeIdToRemoteIdMap.get(t);return e||(e=new Map,this.iframeIdToRemoteIdMap.set(t,e)),e}getRemoteIdToIdMap(t){let e=this.iframeRemoteIdToIdMap.get(t);return e||(e=new Map,this.iframeRemoteIdToIdMap.set(t,e)),e}}class go{constructor(t){a(this,"iframes",new WeakMap),a(this,"crossOriginIframeMap",new WeakMap),a(this,"crossOriginIframeMirror",new mo(yt)),a(this,"crossOriginIframeStyleMirror"),a(this,"crossOriginIframeRootIdMap",new WeakMap),a(this,"mirror"),a(this,"mutationCb"),a(this,"wrappedEmit"),a(this,"loadListener"),a(this,"stylesheetManager"),a(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new mo(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,e){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&null!=(e=t.contentWindow)&&e.addEventListener("message",this.handleMessage.bind(this)),null!=(e=this.loadListener)&&e.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&0<t.contentDocument.adoptedStyleSheets.length&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){var e=t;"rrweb"===e.data.type&&e.origin===e.data.origin&&t.source&&(t=(t=this.crossOriginIframeMap.get(t.source))&&this.transformCrossOriginEvent(t,e.data.event))&&this.wrappedEmit(t,e.data.isCheckout)}transformCrossOriginEvent(i,t){var e;switch(t.type){case Q.FullSnapshot:this.crossOriginIframeMirror.reset(i),this.crossOriginIframeStyleMirror.reset(i),this.replaceIdOnNode(t.data.node,i);var s=t.data.node.id;return this.crossOriginIframeRootIdMap.set(i,s),this.patchRootIdOnNode(t.data.node,s),{timestamp:t.timestamp,type:Q.IncrementalSnapshot,data:{source:tt.Mutation,adds:[{parentId:this.mirror.getId(i),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Q.Meta:case Q.Load:case Q.DomContentLoaded:return!1;case Q.Plugin:return t;case Q.Custom:return this.replaceIds(t.data.payload,i,["id","parentId","previousId","nextId"]),t;case Q.IncrementalSnapshot:switch(t.data.source){case tt.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,i,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,i);var e=this.crossOriginIframeRootIdMap.get(i);e&&this.patchRootIdOnNode(t.node,e)}),t.data.removes.forEach(t=>{this.replaceIds(t,i,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,i,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,i,["id"])}),t;case tt.Drag:case tt.TouchMove:case tt.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,i,["id"])}),t;case tt.ViewportResize:return!1;case tt.MediaInteraction:case tt.MouseInteraction:case tt.Scroll:case tt.CanvasMutation:case tt.Input:return this.replaceIds(t.data,i,["id"]),t;case tt.StyleSheetRule:case tt.StyleDeclaration:return this.replaceIds(t.data,i,["id"]),this.replaceStyleIds(t.data,i,["styleId"]),t;case tt.Font:return t;case tt.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,i,["start","end"])}),t;case tt.AdoptedStyleSheet:return this.replaceIds(t.data,i,["id"]),this.replaceStyleIds(t.data,i,["styleIds"]),null!=(e=t.data.styles)&&e.forEach(t=>{this.replaceStyleIds(t,i,["styleId"])}),t}}return!1}replace(t,e,i,s){for(const r of s)!Array.isArray(e[r])&&"number"!=typeof e[r]||(Array.isArray(e[r])?e[r]=t.getIds(i,e[r]):e[r]=t.getId(i,e[r]));return e}replaceIds(t,e,i){return this.replace(this.crossOriginIframeMirror,t,e,i)}replaceStyleIds(t,e,i){return this.replace(this.crossOriginIframeStyleMirror,t,e,i)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(t=>{this.replaceIdOnNode(t,e)})}patchRootIdOnNode(t,e){t.type===Jn.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach(t=>{this.patchRootIdOnNode(t,e)})}}class yo{constructor(t){a(this,"shadowDoms",new WeakSet),a(this,"mutationCb"),a(this,"scrollCb"),a(this,"bypassOptions"),a(this,"mirror"),a(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,e){if(V(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);const i=ro({...this.bypassOptions,doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>i.disconnect()),this.restoreHandlers.push(oo({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&0<t.adoptedStyleSheets.length&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(H.host(t))),this.restoreHandlers.push(co({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,s){const r=this;this.restoreHandlers.push(Rn(t.prototype,"attachShadow",function(i){return function(t){var t=i.call(this,t),e=H.shadowRoot(this);return e&&Zn(this)&&r.addShadowRoot(e,s),t}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var bo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wo="undefined"==typeof Uint8Array?[]:new Uint8Array(256),So=0;So<bo.length;So++)wo[bo.charCodeAt(So)]=So;function Io(t){for(var e=new Uint8Array(t),i=e.length,s="",r=0;r<i;r+=3)s=(s=(s=(s+=bo[e[r]>>2])+bo[(3&e[r])<<4|e[r+1]>>4])+bo[(15&e[r+1])<<2|e[r+2]>>6])+bo[63&e[r+2]];return i%3==2?s=s.substring(0,s.length-1)+"=":i%3==1&&(s=s.substring(0,s.length-2)+"=="),s}const Co=new Map;const ko=(e,i,s)=>{if(e&&(_o(e,i)||"object"==typeof e)){i=function(t,e){let i=Co.get(t);return i||(i=new Map,Co.set(t,i)),i.has(e)||i.set(e,[]),i.get(e)}(s,e.constructor.name);let t=i.indexOf(e);return-1===t&&(t=i.length,i.push(e)),t}};const Oo=(t,e,i)=>t.map(t=>function e(t,i,s){var r;return t instanceof Array?t.map(t=>e(t,i,s)):null===t?t:t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray?{rr_type:t.constructor.name,args:[Object.values(t)]}:t instanceof ArrayBuffer?{rr_type:t.constructor.name,base64:Io(t)}:t instanceof DataView?{rr_type:t.constructor.name,args:[e(t.buffer,i,s),t.byteOffset,t.byteLength]}:t instanceof HTMLImageElement?(r=t.src,{rr_type:t.constructor.name,src:r}):t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL()}:t instanceof ImageData?{rr_type:t.constructor.name,args:[e(t.data,i,s),t.width,t.height]}:_o(t,i)||"object"==typeof t?{rr_type:t.constructor.name,index:ko(t,i,s)}:t}(t,e,i)),_o=(e,i)=>{var t=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(t=>"function"==typeof i[t]);return Boolean(t.find(t=>e instanceof i[t]))};function Ao(t,r,n,o){const e=[];try{var i=Rn(t.HTMLCanvasElement.prototype,"getContext",function(s){return function(t,...e){var i;return N(this,r,n,!0)||(i="experimental-webgl"===(i=t)?"webgl":i,"__context"in this||(this.__context=i),o&&["webgl","webgl2"].includes(i)&&(e[0]&&"object"==typeof e[0]?(i=e[0]).preserveDrawingBuffer||(i.preserveDrawingBuffer=!0):e.splice(0,1,{preserveDrawingBuffer:!0}))),s.apply(this,[t,...e])}});e.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{e.forEach(t=>t())}}function Mo(t,s,r,n,o,a){var e,i=[];for(const h of Object.getOwnPropertyNames(t))if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))try{"function"==typeof t[h]&&(e=Rn(t,h,function(i){return function(...t){var e=i.apply(this,t);return ko(e,a,this),"tagName"in this.canvas&&!N(this.canvas,n,o,!0)&&(t=Oo(t,a,this),t={type:s,property:h,args:t},r(this.canvas,t)),e}}),i.push(e))}catch{var l=jn(t,h,{set(t){r(this.canvas,{type:s,property:h,args:[t],setter:!0})}});i.push(l)}return i}const jo="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=";var Ro;const xo="undefined"!=typeof window&&window.Blob&&new Blob([(n=jo,Uint8Array.from(atob(n),t=>t.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});function Eo(e){let t;try{var i;if(t=xo&&(window.URL||window.webkitURL).createObjectURL(xo))return(i=new Worker(t,{name:null==e?void 0:e.name})).addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),i;throw""}catch(t){return new Worker("data:text/javascript;base64,"+jo,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class To{constructor(t){a(this,"pendingCanvasMutations",new Map),a(this,"rafStamps",{latestId:0,invokeId:null}),a(this,"mirror"),a(this,"mutationCb"),a(this,"resetObservers"),a(this,"frozen",!1),a(this,"locked",!1),a(this,"processMutation",(t,e)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)});var{sampling:e="all",win:i,blockClass:s,blockSelector:r,recordCanvas:n,dataURLOptions:o}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,n&&"all"===e&&this.initCanvasMutationObserver(i,s,r),n&&"number"==typeof e&&this.initCanvasFPSObserver(e,i,s,r,{dataURLOptions:o})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,i,s,r,n){const e=Ao(i,s,r,!0),o=new Map,a=new Eo,l=(a.onmessage=t=>{var e,i,s,r=t.data["id"];o.set(r,!1),"base64"in t.data&&({base64:t,type:e,width:i,height:s}=t.data,this.mutationCb({id:r,type:Yn["2D"],commands:[{property:"clearRect",args:[0,0,i,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:t}],type:e}]},0,0]}]}))},1e3/t);let h=0,u;const c=()=>{const e=[];return i.document.querySelectorAll("canvas").forEach(t=>{N(t,s,r,!0)||e.push(t)}),e},d=t=>{u=(h&&t-h<l||(h=t,c().forEach(async t=>{var e,i,s=this.mirror.getId(t);o.get(s)||0!==t.width&&0!==t.height&&(o.set(s,!0),["webgl","webgl2"].includes(t.__context)&&!1===(null==(i=null==(e=t.getContext(t.__context))?void 0:e.getContextAttributes())?void 0:i.preserveDrawingBuffer)&&e.clear(e.COLOR_BUFFER_BIT),i=await createImageBitmap(t),a.postMessage({id:s,bitmap:i,width:t.width,height:t.height,dataURLOptions:n.dataURLOptions},[i]))})),requestAnimationFrame(d))};u=requestAnimationFrame(d),this.resetObservers=()=>{e(),cancelAnimationFrame(u)}}initCanvasMutationObserver(t,e,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=Ao(t,e,i,!1),r=function(i,s,r,n){const t=[];var e;for(const a of Object.getOwnPropertyNames(s.CanvasRenderingContext2D.prototype))try{"function"==typeof s.CanvasRenderingContext2D.prototype[a]&&(e=Rn(s.CanvasRenderingContext2D.prototype,a,function(t){return function(...e){return N(this.canvas,r,n,!0)||setTimeout(()=>{var t=Oo(e,s,this);i(this.canvas,{type:Yn["2D"],property:a,args:t})},0),t.apply(this,e)}}),t.push(e))}catch{var o=jn(s.CanvasRenderingContext2D.prototype,a,{set(t){i(this.canvas,{type:Yn["2D"],property:a,args:[t],setter:!0})}});t.push(o)}return()=>{t.forEach(t=>t())}}(this.processMutation.bind(this),t,e,i),n=function(t,e,i,s){const r=[];return r.push(...Mo(e.WebGLRenderingContext.prototype,Yn.WebGL,t,i,s,e)),void 0!==e.WebGL2RenderingContext&&r.push(...Mo(e.WebGL2RenderingContext.prototype,Yn.WebGL2,t,i,s,e)),()=>{r.forEach(t=>t())}}(this.processMutation.bind(this),t,e,i);this.resetObservers=()=>{s(),r(),n()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,e)=>{var i=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,i)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,e){var i,s;this.frozen||this.locked||(s=this.pendingCanvasMutations.get(t))&&-1!==e&&(i=s.map(t=>{const{type:e,...i}=t;return i}),s=s[0]["type"],this.mutationCb({id:e,type:s,commands:i}),this.pendingCanvasMutations.delete(t))}}class No{constructor(t){a(this,"trackedLinkElements",new WeakSet),a(this,"mutationCb"),a(this,"adoptedStyleSheetCb"),a(this,"styleMirror",new Gn),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"ws"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){if(0!==t.length){var i={id:e,styleIds:[]},s=[];for(const r of t){let t;this.styleMirror.has(r)?t=this.styleMirror.getId(r):(t=this.styleMirror.add(r),s.push({styleId:t,rules:Array.from(r.rules||CSSRule,(t,e)=>({rule:Y(t,r.href),index:e}))})),i.styleIds.push(t)}0<s.length&&(i.styles=s),this.adoptedStyleSheetCb(i)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Do{constructor(){a(this,"nodeMap",new WeakMap),a(this,"active",!1)}inOtherBuffer(t,e){t=this.nodeMap.get(t);return t&&Array.from(t).some(t=>t!==e)}add(t,e){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}destroy(){}}let it,Fo,Bo,Lo=!1;try{2!==Array.from([1],t=>2*t)[0]&&(Ro=document.createElement("iframe"),document.body.appendChild(Ro),Array.from=(null==(M=Ro.contentWindow)?void 0:M.Array.from)||Array.from,document.body.removeChild(Ro))}catch(t){console.debug("Unable to override Array.from",t)}const Uo=new rt;function Po(t={}){const{emit:s,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:i="rr-block",blockSelector:o=null,ignoreClass:F="rr-ignore",ignoreSelector:B=null,maskTextClass:a="rr-mask",maskTextSelector:l=null,inlineStylesheet:h=!0,maskAllInputs:L,maskInputOptions:e,slimDOMOptions:u,maskInputFn:c,maskTextFn:d,hooks:U,packFn:f,sampling:v={},dataURLOptions:p={},mousemoveWait:m,recordDOM:g=!0,recordCanvas:y=!1,recordCrossOriginIframes:P=!1,recordAfter:G="DOMContentLoaded"===t.recordAfter?t.recordAfter:"load",userTriggeredOnInput:W=!1,collectFonts:z=!1,inlineImages:b=!1,plugins:w,keepIframeSrcFn:S=()=>!1,ignoreCSSAttributes:Z=new Set([]),errorHandler:V}=t;t=V,eo=t;const I=!P||window.parent===window;let C=!1;if(!I)try{window.parent.document&&(C=!1)}catch(t){C=!0}if(I&&!s)throw new Error("emit function is required");if(!I&&!C)return()=>{};void 0!==m&&void 0===v.mousemove&&(v.mousemove=m),Uo.reset();const k=!0===L?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==e?e:{password:!0},O=!0===u||"all"===u?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===u,headMetaDescKeywords:"all"===u,headTitleMutations:"all"===u}:u||{};"NodeList"in(t=window)&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach);let Y,_=0;const K=t=>{for(const e of w||[])e.eventProcessor&&(t=e.eventProcessor(t));return t=f&&!C?f(t):t},A=(it=(t,e)=>{var i;t.timestamp=xn(),null==(i=io[0])||!i.isFrozen()||t.type===Q.FullSnapshot||t.type===Q.IncrementalSnapshot&&t.data.source===tt.Mutation||io.forEach(t=>t.unfreeze()),I?null!=s&&s(K(t),e):C&&(i={type:"rrweb",event:K(t),origin:window.location.origin,isCheckout:e},window.parent.postMessage(i,"*")),t.type===Q.FullSnapshot?(Y=t,_=0):t.type!==Q.IncrementalSnapshot||t.data.source===tt.Mutation&&t.data.isAttachIframe||(_++,e=n&&_>=n,i=r&&t.timestamp-Y.timestamp>r,(e||i)&&Fo(!0))},t=>{it({type:Q.IncrementalSnapshot,data:{source:tt.Mutation,...t}})}),J=t=>it({type:Q.IncrementalSnapshot,data:{source:tt.Scroll,...t}}),X=t=>it({type:Q.IncrementalSnapshot,data:{source:tt.CanvasMutation,...t}});const M=new No({mutationCb:A,adoptedStyleSheetCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.AdoptedStyleSheet,...t}})}),j=new go({mirror:Uo,mutationCb:A,stylesheetManager:M,recordCrossOriginIframes:P,wrappedEmit:it});for(const E of w||[])E.getMirror&&E.getMirror({nodeMirror:Uo,crossOriginIframeMirror:j.crossOriginIframeMirror,crossOriginIframeStyleMirror:j.crossOriginIframeStyleMirror});const R=new Do,x=(Bo=new To({recordCanvas:y,mutationCb:X,win:window,blockClass:i,blockSelector:o,mirror:Uo,sampling:v.canvas,dataURLOptions:p}),new yo({mutationCb:A,scrollCb:J,bypassOptions:{blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:l,inlineStylesheet:h,maskInputOptions:k,dataURLOptions:p,maskTextFn:d,maskInputFn:c,recordCanvas:y,inlineImages:b,sampling:v,slimDOMOptions:O,iframeManager:j,stylesheetManager:M,canvasManager:Bo,keepIframeSrcFn:S,processedNodeManager:R},mirror:Uo}));Fo=(t=!1)=>{if(g){it({type:Q.Meta,data:{href:window.location.href,width:Nn(),height:Tn()}},t),M.reset(),x.init(),io.forEach(t=>t.lock());var e=function(t,e){var{mirror:e=new rt,blockClass:i="rr-block",blockSelector:s=null,maskTextClass:r="rr-mask",maskTextSelector:n=null,inlineStylesheet:o=!0,inlineImages:a=!1,recordCanvas:l=!1,maskAllInputs:h=!1,maskTextFn:u,maskInputFn:c,slimDOM:d=!1,dataURLOptions:f,preserveWhiteSpace:v,onSerialize:p,onIframeLoad:m,iframeLoadTimeout:g,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:w=()=>!1}=e||{};return Et(t,{doc:t,mirror:e,blockClass:i,blockSelector:s,maskTextClass:r,maskTextSelector:n,skipChild:!1,inlineStylesheet:o,maskInputOptions:!0===h?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===h?{password:!0}:h,maskTextFn:u,maskInputFn:c,slimDOMOptions:!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===d,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===d?{}:d,dataURLOptions:f,inlineImages:a,recordCanvas:l,preserveWhiteSpace:v,onSerialize:p,onIframeLoad:m,iframeLoadTimeout:g,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:w,newlyAddedElement:!1})}(document,{mirror:Uo,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:l,inlineStylesheet:h,maskAllInputs:k,maskTextFn:d,maskInputFn:c,slimDOM:O,dataURLOptions:p,recordCanvas:y,inlineImages:b,onSerialize:t=>{Ln(t,Uo)&&j.addIframe(t),Un(t,Uo)&&M.trackLinkElement(t),Pn(t)&&x.addShadowRoot(H.shadowRoot(t),document)},onIframeLoad:(t,e)=>{j.attachIframe(t,e),x.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{M.attachLinkElement(t,e)},keepIframeSrcFn:S});if(!e)return console.warn("Failed to snapshot the document");it({type:Q.FullSnapshot,data:{node:e,initialOffset:En(window)}},t),io.forEach(t=>t.unlock()),document.adoptedStyleSheets&&0<document.adoptedStyleSheets.length&&M.adoptStyleSheets(document.adoptedStyleSheets,Uo.getId(document))}};try{const T=[],N=t=>{return et(fo)({mutationCb:A,mousemoveCb:(t,e)=>it({type:Q.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.MouseInteraction,...t}}),scrollCb:J,viewportResizeCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.ViewportResize,...t}}),inputCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.Input,...t}}),mediaInteractionCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.MediaInteraction,...t}}),styleSheetRuleCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.StyleSheetRule,...t}}),styleDeclarationCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.StyleDeclaration,...t}}),canvasMutationCb:X,fontCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.Font,...t}}),selectionCb:t=>{it({type:Q.IncrementalSnapshot,data:{source:tt.Selection,...t}})},customElementCb:t=>{it({type:Q.IncrementalSnapshot,data:{source:tt.CustomElement,...t}})},blockClass:i,ignoreClass:F,ignoreSelector:B,maskTextClass:a,maskTextSelector:l,maskInputOptions:k,inlineStylesheet:h,sampling:v,recordDOM:g,recordCanvas:y,inlineImages:b,userTriggeredOnInput:W,collectFonts:z,doc:t,maskInputFn:c,maskTextFn:d,keepIframeSrcFn:S,blockSelector:o,slimDOMOptions:O,dataURLOptions:p,mirror:Uo,iframeManager:j,stylesheetManager:M,shadowDomManager:x,processedNodeManager:R,canvasManager:Bo,ignoreCSSAttributes:Z,plugins:(null==(t=null==w?void 0:w.filter(t=>t.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>it({type:Q.Plugin,data:{plugin:e.name,payload:t}})})))||[]},U)},D=(j.addLoadListener(t=>{try{T.push(N(t.contentDocument))}catch(t){console.warn(t)}}),()=>{Fo(),T.push(N(document)),Lo=!0});return"interactive"===document.readyState||"complete"===document.readyState?D():(T.push(q("DOMContentLoaded",()=>{it({type:Q.DomContentLoaded,data:{}}),"DOMContentLoaded"===G&&D()})),T.push(q("load",()=>{it({type:Q.Load,data:{}}),"load"===G&&D()},window))),()=>{T.forEach(t=>t()),R.destroy(),Lo=!1,eo=void 0}}catch(t){console.warn(t)}}Po.addCustomEvent=(t,e)=>{if(!Lo)throw new Error("please add custom event after start recording");it({type:Q.Custom,data:{tag:t,payload:e}})},Po.freezePage=()=>{io.forEach(t=>t.freeze())},Po.takeFullSnapshot=t=>{if(!Lo)throw new Error("please take full snapshot after start recording");Fo(t)},Po.mirror=Uo,A.record=Po}},s={};function r(t){var e=s[t];return void 0!==e||(e=s[t]={exports:{}},i[t].call(e.exports,e,e.exports,r)),e.exports}return r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r(2043).default})());
1
+ var $Q=(e)=>Object.defineProperty(e,"__esModule",{value:!0});var $Q2=(a,b,c)=>Object.defineProperty(a,b,c);var $P=(a,b)=>Object.assign(a,b);var $A=()=>((t,r,u,l)=>{return new(u=u||Promise)(function(n,e){function i(t){try{s(l.next(t))}catch(t){e(t)}}function o(t){try{s(l.throw(t))}catch(t){e(t)}}function s(t){var e;t.done?n(t.value):((e=t.value)instanceof u?e:new u(function(t){t(e)})).then(i,o)}s((l=l.apply(t,r||[])).next())})});!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Statsig=e():t.Statsig=e()}(this,()=>(()=>{"use strict";var i={1845:(t,i,e)=>{var s;$Q2(i,"__esModule",{value:!0}),i.t=i.i=i.l=void 0;const r=e(7512);i.l=()=>{try{return"undefined"!=typeof __STATSIG__?__STATSIG__:l}catch(t){return l}},i.i=t=>(0,i.l)()[t];i.t=t=>{var e=(0,i.l)();return t?e.instances&&e.instances[t]:(e.instances&&1<Object.keys(e.instances).length&&r.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),e.firstInstance)};var n="__STATSIG__",o="undefined"!=typeof window?window:{},e=void 0!==e.g?e.g:{},a="undefined"!=typeof globalThis?globalThis:{};const l=null!=(s=null!=(s=null!=(s=o[n])?s:e[n])?s:a[n])?s:{instance:i.t};o[n]=l,e[n]=l,a[n]=l},2137:(t,e,i)=>{$Q(e),e.o=e.u=void 0;const r=i(1406);function s(t,e,i){if(i)return i(t,e);const s=e&&e.customIDs?e.customIDs:{};e=["uid:"+(null!=(i=null==e?void 0:e.userID)?i:""),"cids:"+Object.keys(s).sort((t,e)=>t.localeCompare(e)).map(t=>t+"-"+s[t]).join(","),"k:"+t];return(0,r.h)(e.join("|"))}e.u=s,e.o=function(t,e,i){return e?s(t,e,i):(0,r.h)("k:"+t)}},6427:(t,e)=>{$Q(e)},694:function(t,e,i){var r=this&&this.__awaiter||$A();$Q(e),e.Wn=e.DataAdapterCore=void 0;const l=i(7512),h=i(9122),n=i(8578),o=i(4534),u=i(3401);function c(t,e,i,s){return{source:t,data:e,receivedAt:Date.now(),stableID:i,fullUserHash:(0,n.v)(s)}}e.DataAdapterCore=class{constructor(t,e){this._=t,this.p=e,this.m=null,this.O=null,this.j="statsig.last_modified_time."+e,this.S=new s}attach(t,e,i){this.O=t,this.m=e}getDataSync(t){var t=t&&(0,n.T)(t,this.m),e=this.k(t),i=this.S.get(e,t);return i&&this.Li(i)?i:(i=this.I(e))&&this.Li(i)?(this.S.add(e,i),this.S.get(e,t)):null}setData(t,e){var e=e&&(0,n.T)(e,this.m),i=this.k(e);this.S.add(i,c("Bootstrap",t,null,e))}Li(t){return null==t.stableID||t.stableID===h.StableID.get(this.C())}D(e,i,s){return r(this,void 0,void 0,function*(){o.Storage.isReady()||(yield o.Storage.isReadyResolver());var t=null!=e?e:this.getDataSync(i),t=[this.M(t,i,s)];return null!=s&&s.timeoutMs&&t.push(new Promise(t=>setTimeout(t,s.timeoutMs)).then(()=>(l.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(t)})}A(i,s){return r(this,void 0,void 0,function*(){var t=i&&(0,n.T)(i,this.m),e=this.k(t),t=yield this.D(null,t,s);t&&this.S.add(e,$P($P({},t),{source:"Prefetch"}))})}M(n,o,a){return r(this,void 0,void 0,function*(){var t=null!=(t=null==n?void 0:n.data)?t:null,e=null!=n&&this.N(n,o),e=yield this.R(t,o,a,e);if(!e)return l.Log.debug("No response returned for latest value"),null;var i=(0,u.P)(e,"has_updates","Response"),s=this.C(),s=h.StableID.get(s);let r=null;if(!0===(null==i?void 0:i.has_updates))r=c("Network",e,s,o);else{if(!t||!1!==(null==i?void 0:i.has_updates))return null;r=c("NetworkNotModified",t,s,o)}e=this.k(o);return this.S.add(e,r),this.U(e,r),r})}C(){return null!=this.O?this.O:(l.Log.error(this._+" is not attached to a Client"),"")}I(t){var e=null==(e=o.Storage.getItem)?void 0:e.call(o.Storage,t);return null!=e&&(t=(0,u.P)(e,"source","Cached Result"))?$P($P({},t),{source:"Cache"}):null}U(t,e){o.Storage.setItem(t,JSON.stringify(e)),this.F(t)}F(t){var e=null!=(e=(0,o.G)(this.j))?e:{},t=(e[t]=Date.now(),a(e,10));t&&(delete e[t],o.Storage.removeItem(t)),(0,o.L)(this.j,e)}},e.Wn=c;class s{constructor(){this.K={}}get(t,e){var t=this.K[t],i=null==t?void 0:t.stableID,e=null==(e=null==e?void 0:e.customIDs)?void 0:e.stableID;return e&&i&&e!==i?(l.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):t}add(t,e){var i=a(this.K,9);i&&delete this.K[i],this.K[t]=e}merge(t){this.K=$P($P({},this.K),t)}}function a(r,t){var e=Object.keys(r);return e.length<=t?null:e.reduce((t,e)=>{var i=r[t],s=r[e];return"object"==typeof i&&"object"==typeof s?s.receivedAt<i.receivedAt?e:t:s<i?e:t})}},8962:(t,o)=>{$Q2(o,"__esModule",{value:!0}),o.Diagnostics=void 0;const s=new Map,i="start";function r(t,e,i,s){return $P({key:i,action:e,step:s,timestamp:Date.now()},t)}function n(t,e){var i=null!=(i=s.get(t))?i:[];i.push(e),s.set(t,i)}function e(t,e){if(e in t)return t[e]}o.Diagnostics={q:t=>s.get(t),B:t=>{n(t,r({},i,"overall"))},V:(t,e,i)=>{n(t,r({success:e,error:e?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:i},"end","overall"))},J:(t,e)=>{n(t,r(e,i,"initialize","network_request"))},$:(t,e)=>{n(t,r(e,"end","initialize","network_request"))},W:t=>{n(t,r({},i,"initialize","process"))},H:(t,e)=>{n(t,r(e,"end","initialize","process"))},Y:t=>{s.delete(t)},X(t){if(t&&"object"==typeof t)return{code:e(t,"code"),name:e(t,"name"),message:e(t,"message")}},Z(t,e,i,s){return{success:!0===(null==t?void 0:t.ok),statusCode:null==t?void 0:t.status,sdkRegion:null==(t=null==t?void 0:t.headers)?void 0:t.get("x-statsig-region"),isDelta:!0===i.includes('"is_delta":true')||void 0,attempt:e,error:o.Diagnostics.X(s)}},tt(t,e,i,s){var r,n=o.Diagnostics.q(i);return null==n||n.length<=0?-1:(r=n[n.length-1].timestamp-n[0].timestamp,o.Diagnostics.Y(i),i=function(t,e){t={eventName:"statsig::diagnostics",user:t,value:null,metadata:e,time:Date.now()};return t}(t,{context:"initialize",markers:n.slice(),statsigOptions:s}),e.enqueue(i),r)}}},8809:function(t,e){var i=this&&this.__awaiter||$A();$Q(e),e.et=void 0;const r=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),n="https://cloudflare-dns.com/dns-query",o=["i","e","d"],a=200;e.et=function(e){return i(this,void 0,void 0,function*(){var i=yield e(n,{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:r});if(i.ok){var t,i=yield i.arrayBuffer(),i=new Uint8Array(i);{var s=i,i=s.findIndex((t,e)=>e<a&&"="===String.fromCharCode(t)&&o.includes(String.fromCharCode(s[e-1])));if(-1===i)throw(t=new Error("Failed to parse TXT records from DNS")).name="DnsTxtParseError",t;let e="";for(let t=i-1;t<s.length;t++)e+=String.fromCharCode(s[t]);return e.split(",")}}throw(t=new Error("Failed to fetch TXT records from DNS")).name="DnsTxtFetchError",t})}},3539:(t,e)=>{$Q(e)},5542:function(t,a,e){var i=this&&this.__awaiter||$A();$Q2(a,"__esModule",{value:!0}),a.ErrorBoundary=a.EXCEPTION_ENDPOINT=void 0;const s=e(7512),l=e(5902),h=e(8e3),u=(a.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception","[Statsig] UnknownError");function c(t){return t instanceof Error?t:"string"==typeof t?new Error(t):new Error("An unknown error occurred.")}a.ErrorBoundary=class{constructor(t,e,i,s){this.O=t,this.m=e,this.nt=i,this.qn=s,this.it=new Set}wrap(s){try{const t=s;!function(t){const e=new Set;let i=Object.getPrototypeOf(t);for(;i&&i!==Object.prototype;)Object.getOwnPropertyNames(i).filter(t=>"function"==typeof(null===i||void 0===i?void 0:i[t])).forEach(t=>e.add(t)),i=Object.getPrototypeOf(i);return Array.from(e)}(t).forEach(e=>{const i=t[e];"$EB"in i||(t[e]=(...t)=>this.rt(e,()=>i.apply(s,t)),t[e].$EB=!0)})}catch(t){this.st("eb:wrap",t)}}logError(t,e){this.st(t,e)}getLastSeenErrorAndReset(){var t=this.qn;return this.qn=void 0,null!=t?t:null}attachErrorIfNoneExists(t){this.qn||(this.qn=c(t))}rt(e,t){try{var i=t();return i&&i instanceof Promise?i.catch(t=>this.st(e,t)):i}catch(t){return this.st(e,t),null}}st(n,o){try{s.Log.warn("Caught error in "+n,{error:o});i(this,void 0,void 0,function*(){var t,e=o||Error(u),i=e instanceof Error,s=i?e.name:"No Name",r=c(e);this.qn=r,this.it.has(s)||(this.it.add(s),null!=(r=null==(r=this.m)?void 0:r.networkConfig)&&r.preventAllNetworkTraffic?null!=(r=this.nt)&&r.call(this,{name:"error",error:o,tag:n}):(r=l.SDKType.lt(this.O),t=h.StatsigMetadataProvider.get(),i=i?e.stack:function(t){try{return JSON.stringify(t)}catch(t){return u}}(e),e=$P({tag:n,exception:s,info:i,statsigOptions:function(t){if(!t)return{};const i={};return Object.entries(t).forEach(([t,e])=>{switch(typeof e){case"number":case"bigint":case"boolean":i[String(t)]=e;break;case"string":e.length<50?i[String(t)]=e:i[String(t)]="set";break;case"object":"environment"===t?i.environment=e:"networkConfig"===t?i.networkConfig=e:i[String(t)]=null!=e?"set":"unset"}}),i}(this.m)},$P($P({},t),{sdkType:r})),yield(null!=(s=null==(i=null==(s=this.m)?void 0:s.networkConfig)?void 0:i.networkOverrideFunc)?s:fetch)(a.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this.O,"STATSIG-SDK-TYPE":String(r),"STATSIG-SDK-VERSION":String(t.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(e)}),null!=(i=this.nt)&&i.call(this,{name:"error",error:o,tag:n})))}).then(()=>{}).catch(()=>{})}catch(t){}}}},2922:(t,e)=>{$Q(e)},2417:(t,e)=>{$Q(e)},7770:function(t,e,i){var s=this&&this.__awaiter||$A();$Q(e),e.EventLogger=void 0;const r=i(2137),n=i(1406),o=i(7512),a=i(7410),l=i(6830),h=i(1637),u=i(586),c=i(4534),d=i(1881),f=i(2397),v={},p={Startup:"startup",GainedFocus:"gained_focus"};class m{static ot(t){null!=(t=v[t])&&t.flush().catch(()=>{})}static ut(t){null!=(t=v[t])&&t.ct(p.GainedFocus)}constructor(t,e,i,s){this.O=t,this.nt=e,this.ht=i,this.m=s,this.dt=[],this.vt={},this.ft={},this._t=!1,this.gt=Date.now(),this.Yn=null!=(t=null==s?void 0:s.loggingEnabled)?t:!0===(null==s?void 0:s.disableLogging)?u.LoggingEnabledOption.disabled:u.LoggingEnabledOption.browserOnly,null!=s&&s.loggingEnabled&&void 0!==s.disableLogging&&o.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this.yt=null!=(e=null==s?void 0:s.loggingBufferMaxSize)?e:100;i=null==s?void 0:s.networkConfig;this.Ot=new d.UrlConfiguration(a.Endpoint.jt,null==i?void 0:i.logEventUrl,null==i?void 0:i.api,null==i?void 0:i.logEventFallbackUrls)}setLogEventCompressionMode(t){this.ht.setLogEventCompressionMode(t)}setLoggingEnabled(t){this.Yn=t}enqueue(t){this.St(t)&&(this.wt(t),this.Tt(),this.dt.length>this.yt)&&m.ot(this.O)}incrementNonExposureCount(t){var e=null!=(e=this.ft[t])?e:0;this.ft[t]=e+1}reset(){this.flush().catch(()=>{}),this.vt={}}start(){var t,e=(0,l.kt)();e&&"always"!==(null==(t=this.m)?void 0:t.loggingEnabled)||(v[this.O]=this,e||(0,f.It)(t=>{"background"===t?m.ot(this.O):"foreground"===t&&m.ut(this.O)}),this.ct(p.Startup),this.Dt())}stop(){return s(this,void 0,void 0,function*(){this.Et&&(clearInterval(this.Et),this.Et=null),delete v[this.O],yield this.flush()})}flush(){return s(this,void 0,void 0,function*(){var t;this.Mt(),0!==this.dt.length&&(t=this.dt,this.dt=[],yield this.At(t))})}Tt(){this._t||(this._t=!0,200<Date.now()-this.gt)||setTimeout(()=>m.ot(this.O),200)}St(t){if("always"!==(null==(e=this.m)?void 0:e.loggingEnabled)&&(0,l.kt)())return!1;if((0,h.xt)(t)){var e=t.user||{statsigEnvironment:void 0},e=(0,r.u)(this.O,e),i=t.metadata||{},t=[t.eventName,e,i.gate,i.config,i.ruleID,i.allocatedExperiment,i.parameterName,String(i.isExplicitParameter),i.reason].join("|"),e=this.vt[t],i=Date.now();if(e&&i-e<6e5)return!1;1e3<Object.keys(this.vt).length&&(this.vt={}),this.vt[t]=i}return!0}At(r){return s(this,void 0,void 0,function*(){var t,e;if("disabled"===this.Yn)return this.Nt(r),!1;try{var i=(0,f.Rt)()&&this.ht.isBeaconSupported()&&null==(null==(e=null==(t=this.m)?void 0:t.networkConfig)?void 0:e.networkOverrideFunc),s=(this.nt({name:"pre_logs_flushed",events:r}),i?this.Pt(r):yield this.Ct(r));return s.success?(this.nt({name:"logs_flushed",events:r}),!0):(o.Log.warn("Failed to flush events."),this.Nt(r),!1)}catch(t){return o.Log.warn("Failed to flush events."),!1}})}Ct(e){return s(this,void 0,void 0,function*(){var t=yield this.ht.post(this.Ut(e)),t=null!=(t=null==t?void 0:t.code)?t:-1;return{success:200<=t&&t<300}})}Pt(t){return{success:this.ht.beacon(this.Ut(t))}}Ut(t){return{sdkKey:this.O,data:{events:t},urlConfig:this.Ot,retries:3,isCompressable:!0,params:{[a.NetworkParam.EventCount]:String(t.length)},credentials:"same-origin"}}Nt(t){for(;500<t.length;)t.shift();var e=this.o();try{(0,c.L)(e,t)}catch(t){o.Log.warn("Unable to save failed logs to storage")}}ct(e){const i=this.o();s(this,void 0,void 0,function*(){c.Storage.isReady()||(yield c.Storage.isReadyResolver());var t=(0,c.G)(i);t&&(e===p.Startup&&c.Storage.removeItem(i),yield this.At(t))&&e===p.GainedFocus&&c.Storage.removeItem(i)}).catch(()=>{o.Log.warn("Failed to flush stored logs")})}o(){return"statsig.failed_logs."+(0,n.h)(this.O)}wt(t){t.user&&(t.user=$P({},t.user),delete t.user.privateAttributes);var e={},i=this.Ft(),i=(i&&(e.statsigMetadata={currentPage:i}),$P($P({},t),e));o.Log.debug("Enqueued Event:",i),this.dt.push(i)}Mt(){0!==Object.keys(this.ft).length&&(this.wt({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:$P({},this.ft)}}),this.ft={})}Ft(){var t;if(!1!==(null==(t=this.m)?void 0:t.includeCurrentPageUrlWithEvents))return(0,l.Gt)()}Dt(){var t=null!=(t=null==(t=this.m)?void 0:t.loggingIntervalMs)?t:1e4;const e=setInterval(()=>{var t=v[this.O];t&&t.Et===e?m.ot(this.O):clearInterval(e)},t);this.Et=e}}e.EventLogger=m},1406:(t,n,e)=>{$Q2(n,"__esModule",{value:!0}),n.Lt=n.Kt=n.h=void 0;const o=e(6634);n.h=e=>{let i=0;for(let t=0;t<e.length;t++){var s=e.charCodeAt(t);i=(i<<5)-i+s,i&=i}return String(i>>>0)},n.Kt=(t,e)=>(0,n.h)(JSON.stringify((0,n.Lt)(t,e)));n.Lt=(i,s)=>{if(null==i)return null;var t=Object.keys(i).sort();const r={};return t.forEach(t=>{var e=i[t];0===s||"object"!==(0,o.zt)(e)?r[t]=e:r[t]=(0,n.Lt)(e,null!=s?s-1:s)}),r}},1333:(t,e)=>{$Q(e)},7512:(t,e)=>{$Q(e),e.Log=e.LogLevel=void 0;function i(t){return t.unshift("[Statsig]"),t}e.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class s{static info(...t){s.level>=e.LogLevel.Info&&console.info(" INFO ",...i(t))}static debug(...t){s.level>=e.LogLevel.Debug&&console.debug(" DEBUG ",...i(t))}static warn(...t){s.level>=e.LogLevel.Warn&&console.warn(" WARN ",...i(t))}static error(...t){s.level>=e.LogLevel.Error&&console.error(" ERROR ",...i(t))}}(e.Log=s).level=e.LogLevel.Warn},7787:(t,e)=>{$Q(e),e.createMemoKey=e.MemoPrefix=void 0,e.MemoPrefix={Kn:"g",Ln:"c",Vn:"e",$n:"l",Bn:"p"};const n=new Set([]),o=new Set(["userPersistedValues"]);e.createMemoKey=function(t,e,i){let s=t+"|"+e;if(i)for(const r of Object.keys(i)){if(o.has(r))return;n.has(r)?s+=`|${r}=true`:s+=`|${r}=`+i[r]}return s}},7410:(t,e)=>{$Q(e),e.NetworkParam=e.NetworkDefault=e.Endpoint=void 0,e.Endpoint={qt:"initialize",jt:"rgstr",Bt:"download_config_specs"},e.NetworkDefault={[e.Endpoint.jt]:"https://prodregistryv2.org/v1",[e.Endpoint.qt]:"https://featureassets.org/v1",[e.Endpoint.Bt]:"https://api.statsigcdn.com/v1"},e.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}},7023:function(t,e,i){var w=this&&this.__awaiter||$A();$Q(e),e.NetworkCore=void 0,i(1845);const f=i(1845),S=i(8962),I=i(7512),C=i(7410),s=i(308),v=i(3091),o=i(5902),r=i(6830),a=i(4143),l=i(9122),k=i(2636),h=i(8e3),p=i(586),O=i(2397),_=500,A=3e4;const M=new Set([408,500,502,503,504,522,524,599]);e.NetworkCore=class{constructor(t,e){this.nt=e,this.$t=null,this.Vt=1e4,this.Jt={},this.m={},this.Oi={},this.Jn=null,t&&(this.m=t),this.m.networkConfig&&(this.Jt=this.m.networkConfig),this.Jt.networkTimeoutMs&&(this.Vt=this.Jt.networkTimeoutMs),this.Wt=new s.NetworkFallbackResolver(this.m),this.setLogEventCompressionMode(this.Qn(t))}setLogEventCompressionMode(t){this.m.logEventCompressionMode=t}setErrorBoundary(t){this.$t=t,this.$t.wrap(this),this.$t.wrap(this.Wt),this.Wt.setErrorBoundary(t)}isBeaconSupported(){return"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon}getLastUsedInitUrlAndReset(){var t=this.Jn;return this.Jn=null,t}beacon(t){var e,i;return!!j(t)&&(t=this.Ht("POST",t),e=this.Xt(t),(i=navigator).sendBeacon.bind(i)(e,t.body))}post(e){return w(this,void 0,void 0,function*(){var t=this.Ht("POST",e);return this.Pi(t),yield this.Ci(t),this.Zt(t)})}get(t){t=this.Ht("GET",t);return this.Zt(t)}Zt(b){return w(this,void 0,void 0,function*(){var e;if(!j(b))return null;if(this.Jt.preventAllNetworkTraffic)return null;var{method:i,body:s,retries:r,attempt:n}=b,o=b.urlConfig.endpoint;if(this.Si(o))return I.Log.warn(`Request to ${o} was blocked because you are making requests too frequently.`),null;n=null!=n?n:1;const a="undefined"!=typeof AbortController?new AbortController:null;var t=setTimeout(()=>{null!==a&&void 0!==a&&a.abort(`Timeout of ${this.Vt}ms expired.`)},this.Vt),l=this.Xt(b);let h=null;var u,c=(0,O.Rt)();try{var d,f,v,p={method:i,body:s,headers:$P({},b.headers),signal:null===a||void 0===a?void 0:a.signal,priority:b.priority,keepalive:c},m=(u=n,(y=b).urlConfig.endpoint===C.Endpoint.qt&&S.Diagnostics.J(y.sdkKey,{attempt:u}),this.Oi[o]),g=(m&&(m.lastRequestTime=Date.now(),this.Oi[o]=m),null!=(e=this.Jt.networkOverrideFunc)?e:fetch);if(h=yield g(l,p),clearTimeout(t),h.ok)return v=yield h.text(),R(b,h,n,v),this.Wt.tryBumpExpiryTime(b.sdkKey,b.urlConfig),{body:v,code:h.status};throw d=yield h.text().catch(()=>"No Text"),(f=new Error(`NetworkError: ${l} `+d)).name="NetworkError",f}catch(t){var s=function(t,e){if(null!=t&&t.signal.aborted&&"string"==typeof t.signal.reason)return t.signal.reason;if("string"==typeof e)return e;if(e instanceof Error)return e.name+": "+e.message;return"Unknown Error"}(a,t),c=function(t){t=(null==t?void 0:t.signal.aborted)&&"string"==typeof t.signal.reason&&t.signal.reason.includes("Timeout");return t||!1}(a),y=(R(b,h,n,"",t),yield this.Wt.tryFetchUpdatedFallbackInfo(b.sdkKey,b.urlConfig,s,c));return(y&&(b.fallbackUrl=this.Wt.getActiveFallbackUrl(b.sdkKey,b.urlConfig)),!r||r<n||!M.has(null!=(u=null===h||void 0===h?void 0:h.status)?u:500))?(null!=(o=this.nt)&&o.call(this,{name:"error",error:t,tag:k.ErrorTag.NetworkError,requestArgs:b}),m=`A networking error occurred during ${i} request to ${l}.`,I.Log.error(m,s,t),null!=(e=this.$t)&&e.attachErrorIfNoneExists(m),null):(yield function(e){return w(this,void 0,void 0,function*(){yield new Promise(t=>setTimeout(t,Math.min(_*(e*e),A)))})}(n),this.Zt($P($P({},b),{retries:r,attempt:n+1})))}})}Qn(t){let e=null==t?void 0:t.logEventCompressionMode;return e=(e=e||!0!==(null==t?void 0:t.disableCompression)?e:p.LogEventCompressionMode.Disabled)||p.LogEventCompressionMode.Enabled}Si(t){var e=Date.now(),i=null!=(i=this.Oi[t])?i:{count:0,lastRequestTime:e},s=e-i.lastRequestTime,s=Math.floor(.05*s);return i.count=Math.max(0,i.count-s),50<=i.count||(i.count+=1,i.lastRequestTime=e,this.Oi[t]=i,!1)}Xt(t){var e=null!=(e=t.fallbackUrl)?e:t.urlConfig.getUrl();t.urlConfig.endpoint!==C.Endpoint.qt&&t.urlConfig.endpoint!==C.Endpoint.Bt||(this.Jn=e);const i=$P({[C.NetworkParam.SdkKey]:t.sdkKey,[C.NetworkParam.SdkType]:o.SDKType.lt(t.sdkKey),[C.NetworkParam.SdkVersion]:h.SDK_VERSION,[C.NetworkParam.Time]:String(Date.now()),[C.NetworkParam.SessionID]:a.SessionID.get(t.sdkKey)},t.params);t=Object.keys(i).map(t=>encodeURIComponent(t)+"="+encodeURIComponent(i[t])).join("&");return e+(t?"?"+t:"")}Pi(e){var t,i=(0,r.te)(),s=e.body;if(e.isStatsigEncodable&&!this.m.disableStatsigEncoding&&"string"==typeof s&&null==(0,f.i)("no-encode")&&null!=i&&i.btoa)try{e.body=i.btoa(s).split("").reverse().join(""),e.params=$P($P({},null!=(t=e.params)?t:{}),{[C.NetworkParam.StatsigEncoded]:"1"})}catch(t){I.Log.warn("Request encoding failed for "+e.urlConfig.getUrl(),t)}}Ci(d){return w(this,void 0,void 0,function*(){var e,i=d.body;if("string"==typeof i&&function(t,e){if(!t.isCompressable)return;if(null!=(0,f.i)("no-compress")||"undefined"==typeof CompressionStream||"undefined"==typeof TextEncoder)return;var i=null!=t.urlConfig.customUrl||null!=t.urlConfig.fallbackUrls,s=!0===v.SDKFlags.get(t.sdkKey,"enable_log_event_compression");switch(e.logEventCompressionMode){case p.LogEventCompressionMode.Disabled:return;case p.LogEventCompressionMode.Enabled:return i&&!s?void 0:1;case p.LogEventCompressionMode.Forced:return 1;default:return}}(d,this.m))try{for(var s,r=(new TextEncoder).encode(i),n=new CompressionStream("gzip"),o=n.writable.getWriter(),a=(o.write(r).catch(I.Log.error),o.close().catch(I.Log.error),n.readable.getReader()),l=[];!(s=yield a.read()).done;)l.push(s.value);var h=l.reduce((t,e)=>t+e.length,0),u=new Uint8Array(h);let t=0;for(const c of l)u.set(c,t),t+=c.length;d.body=u,d.params=$P($P({},null!=(e=d.params)?e:{}),{[C.NetworkParam.IsGzipped]:"1"})}catch(t){I.Log.warn("Request compression failed for "+d.urlConfig.getUrl(),t)}})}Ht(t,e){var i=this.Wt.getActiveFallbackUrl(e.sdkKey,e.urlConfig),t=$P($P({},e),{method:t,fallbackUrl:i});return"data"in e&&n(t,e.data),t}};const j=t=>!!t.sdkKey||(I.Log.warn("Unable to make request without an SDK key"),!1),n=(t,e)=>{var{sdkKey:i,fallbackUrl:s}=t,r=l.StableID.get(i),n=a.SessionID.get(i),i=o.SDKType.lt(i);t.body=JSON.stringify($P($P({},e),{statsigMetadata:$P($P({},h.StatsigMetadataProvider.get()),{stableID:r,sessionID:n,sdkType:i,fallbackUrl:s})}))};function R(t,e,i,s,r){t.urlConfig.endpoint===C.Endpoint.qt&&S.Diagnostics.$(t.sdkKey,S.Diagnostics.Z(e,i,s,r))}},308:function(t,e,i){var a=this&&this.__awaiter||$A();$Q(e),e.ee=e.NetworkFallbackResolver=void 0;const o=i(8809),s=i(1406),n=i(7512),l=i(4534);function h(t,e){t=null!=(t=null==t?void 0:t.toLowerCase())?t:"";return e||t.includes("uncaught exception")||t.includes("failed to fetch")||t.includes("networkerror when attempting to fetch resource")}function u(t){return"statsig.network_fallback."+(0,s.h)(t)}function c(t,e){t=u(t);e&&0!==Object.keys(e).length?l.Storage.setItem(t,JSON.stringify(e)):l.Storage.removeItem(t)}e.NetworkFallbackResolver=class{constructor(t){this.ne=null,this.$t=null,this.ie={},this.re=null==(t=t.networkConfig)?void 0:t.networkOverrideFunc}setErrorBoundary(t){this.$t=t}tryBumpExpiryTime(t,e){var i=null==(i=this.ne)?void 0:i[e.endpoint];i&&(i.expiryTime=Date.now()+6048e5,c(t,$P($P({},this.ne),{[e.endpoint]:i})))}getActiveFallbackUrl(t,e){var i;if(null!=e.customUrl&&null!=e.fallbackUrls)return null;let s=this.ne;null==s&&(s=null!=(r=function(t){t=u(t),t=l.Storage.getItem(t);if(!t)return null;try{return JSON.parse(t)}catch(t){return n.Log.error("Failed to parse FallbackInfo"),null}}(t))?r:{},this.ne=s);var r=s[e.endpoint];return!r||Date.now()>(null!=(i=r.expiryTime)?i:0)||e.getChecksum()!==r.urlConfigChecksum?(delete s[e.endpoint],this.ne=s,c(t,this.ne),null):r.url||null}tryFetchUpdatedFallbackInfo(s,r,n,o){return a(this,void 0,void 0,function*(){var e,t,i;try{return h(n,o)?(t=null==r.customUrl&&null==r.fallbackUrls?yield this.se(r):r.fallbackUrls,!!(i=this.le(null==(e=this.ne)?void 0:e[r.endpoint],t))&&(this.oe(s,r,i),!0)):!1}catch(t){return null!=(e=this.$t)&&e.logError("tryFetchUpdatedFallbackInfo",t),!1}})}oe(t,e,i){var i={urlConfigChecksum:e.getChecksum(),url:i,expiryTime:Date.now()+6048e5,previous:[]},e=e.endpoint,s=null==(s=this.ne)?void 0:s[e],s=(s&&i.previous.push(...s.previous),10<i.previous.length&&(i.previous=[]),null==(s=null==(s=this.ne)?void 0:s[e])?void 0:s.url);null!=s&&i.previous.push(s),this.ne=$P($P({},this.ne),{[e]:i}),c(t,this.ne)}se(n){return a(this,void 0,void 0,function*(){var t=this.ie[n.endpoint];if(t&&Date.now()<t)return null;this.ie[n.endpoint]=Date.now()+144e5;var e=[],t=yield(0,o.et)(null!=(t=this.re)?t:fetch),i=function(t){try{return new URL(t).pathname}catch(t){return null}}(n.defaultUrl);for(const r of t)if(r.startsWith(n.endpointDnsKey+"=")){var s=r.split("=");if(1<s.length){let t=s[1];t.endsWith("/")&&(t=t.slice(0,-1)),e.push("https://"+t+i)}}return e})}le(t,e){var i;if(null==e)return null;var s=new Set(null!=(i=null==t?void 0:t.previous)?i:[]),r=null==t?void 0:t.url;let n=null;for(const a of e){var o=a.endsWith("/")?a.slice(0,-1):a;if(!s.has(a)&&o!==r){n=o;break}}return n}},e.ee=h},1405:(t,e)=>{$Q(e)},1361:(t,e)=>{$Q(e)},3091:(t,e)=>{$Q(e),e.SDKFlags=void 0;const i={};e.SDKFlags={setFlags:(t,e)=>{i[t]=e},get:(t,e)=>{return null!=(t=null==(t=i[t])?void 0:t[e])&&t}}},5902:(t,e)=>{$Q(e),e.SDKType=void 0;const i={};let s;e.SDKType={lt:t=>{return(null!=(t=i[t])?t:"js-mono")+(null!==s&&void 0!==s?s:"")},ue(t,e){i[t]=e},ae(t){s&&"-react"!==s||(s="-"+t)}}},6830:(t,s)=>{$Q2(s,"__esModule",{value:!0}),s.Hn=s.Gt=s.ce=s.he=s.kt=s.de=s.te=void 0;s.te=()=>"undefined"!=typeof window?window:null,s.de=()=>{var t=(0,s.te)();return null!=(t=null==t?void 0:t.document)?t:null},s.kt=()=>{var t;return null===(0,s.de)()&&(t="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,"string"==typeof EdgeRuntime||t)},s.he=(t,e)=>{var i=(0,s.te)();"function"==typeof(null==i?void 0:i.addEventListener)&&i.addEventListener(t,e)},s.ce=(t,e)=>{var i=(0,s.de)();"function"==typeof(null==i?void 0:i.addEventListener)&&i.addEventListener(t,e)},s.Gt=()=>{var t;try{return null==(t=(0,s.te)())?void 0:t.location.href.split(/[?#]/)[0]}catch(t){}};s.Hn=()=>{var t=(0,s.te)();return t&&"onpagehide"in t?"pagehide":"beforeunload"}},4143:(t,e,i)=>{$Q(e),e.StatsigSession=e.SessionID=void 0;const s=i(1845),r=i(2137),a=i(7512),l=i(4534),h=i(8023),u=18e5,c=144e5,d={};function f(e,t){return setTimeout(()=>{var t=null==(t=(0,s.l)())?void 0:t.instance(e);t&&t.$emt({name:"session_expired"})},t)}function v(t){return"statsig.session_id."+(0,r.o)(t)}e.SessionID={get:t=>e.StatsigSession.get(t).data.sessionID},e.StatsigSession={get:t=>{null==d[t]&&(d[t]=function(t){let e=function(t){t=v(t);return(0,l.G)(t)}(t);var i=Date.now();e=e||{sessionID:(0,h.getUUID)(),startTime:i,lastUpdate:i};return{data:e,sdkKey:t}}(t));var t=d[t],e=Date.now(),i=t.data,s=t.sdkKey,r=((function({lastUpdate:t}){return Date.now()-t>u}(i)||function({startTime:t}){return Date.now()-t>c}(i))&&(i.sessionID=(0,h.getUUID)(),i.startTime=e,o=null===__STATSIG__||void 0===__STATSIG__?void 0:__STATSIG__.instance(s))&&o.$emt({name:"session_expired"}),i.lastUpdate=e,i),n=t.sdkKey;n=v(n);try{(0,l.L)(n,r)}catch(t){a.Log.warn("Failed to save SessionID")}clearTimeout(t.idleTimeoutID),clearTimeout(t.ageTimeoutID);var o=e-i.startTime;return t.idleTimeoutID=f(s,u),t.ageTimeoutID=f(s,c-o),t},overrideInitialSessionID:(t,e)=>{var i;d[e]=(t=t,e=e,i=Date.now(),{data:{sessionID:t,startTime:i,lastUpdate:i},sdkKey:e})}}},2176:(t,a)=>{$Q2(a,"__esModule",{value:!0}),a.hi=void 0;a.hi=(e,i)=>{let s=0;var r=Object.keys(e);for(let t=0;t<r.length;t++){var n=r[t],o=e[n];if((s=(s+=n.length)+("object"==typeof o&&null!==o?(0,a.hi)(o,i)+2:String(o).length+1))>=i)return s}return s}},9122:(t,e,i)=>{$Q(e),e.StableID=void 0;const s=i(2137),r=i(7512),n=i(6830),o=i(4534),a=i(8023),l={},h={},u={};function c(t){return"statsig.stable_id."+(0,s.o)(t)}function d(t,e){e=c(e);try{(0,o.L)(e,t)}catch(t){r.Log.warn("Failed to save StableID to storage")}}function f(t,e){var i;h[e]&&document&&((i=new Date).setFullYear(i.getFullYear()+1),document.cookie=`${v(e)}=${encodeURIComponent(t)}; expires=${i.toUTCString()}; path=/`)}function v(t){return"statsig.stable_id."+(0,s.o)(t)}e.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:t=>{if(u[t])return null;if(null!=l[t])return l[t];let e=null;return null!=(e=function(t){if(h[t]&&null!=(0,n.de)())for(const s of document.cookie.split(";")){var[e,i]=s.trim().split("=");if(e===v(t))return decodeURIComponent(i)}return null}(t))?d(l[t]=e,t):(d(e=null==(e=function(t){t=c(t);return(0,o.G)(t)}(t))?(0,a.getUUID)():e,t),f(e,t),l[t]=e),e},setOverride:(t,e)=>{d(l[e]=t,e),f(t,e)},Xn:(t,e)=>{h[t]=e},_e:(t,e)=>{u[t]=e}}},1375:function(t,e,i){var s=this&&this.__awaiter||$A();$Q(e),e.StatsigClientBase=void 0,i(1845);const o=i(1845),a=i(5542),l=i(7770),h=i(7512),n=i(7787),u=i(6830),c=i(4143),d=i(9122),r=i(586),f=i(4534);e.StatsigClientBase=class{constructor(t,e,i,s){this.loadingStatus="Uninitialized",this.ve=null,this.fe={};var r,n=this.$emt.bind(this);null!=(null==s?void 0:s.logLevel)&&(h.Log.level=s.logLevel),null!=s&&s.disableStorage&&f.Storage._e(!0),null!=s&&s.initialSessionID&&c.StatsigSession.overrideInitialSessionID(s.initialSessionID,t),null!=s&&s.storageProvider&&f.Storage.ge(s.storageProvider),null!=s&&s.enableCookies&&d.StableID.Xn(t,s.enableCookies),null!=s&&s.disableStableID&&d.StableID._e(t,!0),this.O=t,this.m=null!=s?s:{},this.ji={},this.overrideAdapter=null!=(r=null==s?void 0:s.overrideAdapter)?r:null,this.pe=new l.EventLogger(t,n,i,s),this.$t=new a.ErrorBoundary(t,s,n),this.$t.wrap(this),this.$t.wrap(e),this.$t.wrap(this.pe),i.setErrorBoundary(this.$t),this.dataAdapter=e,this.dataAdapter.attach(t,s,i),this.storageProvider=f.Storage,null!=(e=null==(n=null==(r=this.overrideAdapter)?void 0:r.loadFromStorage)?void 0:n.call(r))&&e.catch(t=>this.$t.logError("OA::loadFromStorage",t)),this.be(),s=t,i=this,(0,u.kt)()||(n=(0,o.l)(),r=null!=(r=n.instances)?r:{},i=i,null!=r[s]&&h.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),r[s]=i,n.firstInstance||(n.firstInstance=i),n.instances=r,__STATSIG__=n)}updateRuntimeOptions(t){t.loggingEnabled?(this.m.loggingEnabled=t.loggingEnabled,this.pe.setLoggingEnabled(t.loggingEnabled)):null!=t.disableLogging&&(this.m.disableLogging=t.disableLogging,this.pe.setLoggingEnabled(t.disableLogging?"disabled":"browser-only")),null!=t.disableStorage&&(this.m.disableStorage=t.disableStorage,f.Storage._e(t.disableStorage)),null!=t.enableCookies&&(this.m.enableCookies=t.enableCookies,d.StableID.Xn(this.O,t.enableCookies)),t.logEventCompressionMode?this.pe.setLogEventCompressionMode(t.logEventCompressionMode):t.disableCompression&&this.pe.setLogEventCompressionMode(r.LogEventCompressionMode.Disabled)}flush(){return this.pe.flush()}shutdown(){return s(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this.me("Uninitialized",null),this.ve=null,yield this.pe.stop()})}on(t,e){this.fe[t]||(this.fe[t]=[]),this.fe[t].push(e)}off(t,e){this.fe[t]&&-1!==(e=this.fe[t].indexOf(e))&&this.fe[t].splice(e,1)}$on(t,e){e.__isInternal=!0,this.on(t,e)}$emt(i){var t;const e=e=>{try{e(i)}catch(t){!0===e.__isInternal?this.$t.logError("__emit:"+i.name,t):h.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",i)}};this.fe[i.name]&&this.fe[i.name].forEach(t=>e(t)),null!=(t=this.fe["*"])&&t.forEach(e)}me(t,e){this.loadingStatus=t,this.ji={},this.$emt({name:"values_updated",status:t,values:e})}ye(t,e,i){!0===(null==i?void 0:i.disableExposureLog)?this.pe.incrementNonExposureCount(t):this.pe.enqueue(e)}wi(s,r){return(t,e)=>{var i;return!this.m.disableEvaluationMemoization&&(i=(0,n.createMemoKey)(s,t,e))?(i in this.ji||(3e3<=Object.keys(this.ji).length&&(this.ji={}),this.ji[i]=r(t,e)),this.ji[i]):r(t,e)}}}},2636:(t,e)=>{$Q(e),e.ErrorTag=void 0,e.ErrorTag={NetworkError:"NetworkError"}},3206:(t,e)=>{$Q(e),e.DataAdapterCachePrefix=void 0,e.DataAdapterCachePrefix="statsig.cached"},1637:(t,e)=>{$Q(e),e.Oe=e.je=e.Ui=e.Se=e.xt=void 0;const n="statsig::config_exposure",o="statsig::gate_exposure",h="statsig::layer_exposure",u=(t,e,i,s,r)=>(i.bootstrapMetadata&&(s.bootstrapMetadata=i.bootstrapMetadata),{eventName:t,user:e,value:null,metadata:a(i,s),secondaryExposures:r,time:Date.now()});e.xt=({eventName:t})=>t===o||t===n||t===h;function c(t,e){return t.map(t=>"string"==typeof t?(null!=e?e:{})[t]:t).filter(t=>null!=t)}e.Se=(t,e,i)=>{var s,r={gate:e.name,gateValue:String(e.value),ruleID:e.ruleID};return null!=(null==(s=e.__evaluation)?void 0:s.version)&&(r.configVersion=e.__evaluation.version),u(o,t,e.details,r,c(null!=(t=null==(s=e.__evaluation)?void 0:s.secondary_exposures)?t:[],i))},e.Ui=c;e.je=(t,e,i)=>{var s,r={config:e.name,ruleID:e.ruleID};return null!=(null==(s=e.__evaluation)?void 0:s.version)&&(r.configVersion=e.__evaluation.version),null!=(null==(s=e.__evaluation)?void 0:s.passed)&&(r.rulePassed=String(e.__evaluation.passed)),u(n,t,e.details,r,c(null!=(t=null==(s=e.__evaluation)?void 0:s.secondary_exposures)?t:[],i))};e.Oe=(t,e,i,s)=>{var r=e.__evaluation,n=!0===(null==(n=null==r?void 0:r.explicit_parameters)?void 0:n.includes(i));let o="",a=null!=(l=null==r?void 0:r.undelegated_secondary_exposures)?l:[];n&&(o=null!=(l=r.allocated_experiment_name)?l:"",a=null!=(l=r.secondary_exposures)?l:[]);var l=null==(r=e.__evaluation)?void 0:r.parameter_rule_ids,l={config:e.name,parameterName:i,ruleID:null!=(r=null==l?void 0:l[i])?r:e.ruleID,allocatedExperiment:o,isExplicitParameter:String(n)};return null!=(null==(i=e.__evaluation)?void 0:i.version)&&(l.configVersion=e.__evaluation.version),u(h,t,e.details,l,c(a,s))};const a=(t,e)=>(e.reason=t.reason,t.lcut&&(e.lcut=String(t.lcut)),t.receivedAt&&(e.receivedAt=String(t.receivedAt)),e)},8e3:(t,e)=>{$Q(e),e.StatsigMetadataProvider=e.SDK_VERSION=void 0,e.SDK_VERSION="3.20.1";let i={sdkVersion:e.SDK_VERSION,sdkType:"js-mono"};e.StatsigMetadataProvider={get:()=>i,add:t=>{i=$P($P({},i),t)}}},586:(t,e)=>{$Q(e),e.LoggingEnabledOption=e.LogEventCompressionMode=void 0,e.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},e.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}},1098:(t,e)=>{$Q(e)},2059:(t,e,i)=>{$Q(e),e.we=e.Te=e.ke=e.Ie=e.De=e.Ee=void 0;const o=i(7512),a=i(6634);function r(t,e,i,s){return{name:t,details:e,ruleID:null!=(t=null==i?void 0:i.rule_id)?t:"",__evaluation:i,value:s}}function s(t,e,i){var s=null!=(s=null==i?void 0:i.value)?s:{};return $P($P({},r(t,e,i,s)),{get:n(t,null==i?void 0:i.value)})}function n(s,r,n){return(t,e)=>{var i=null!=(i=null==r?void 0:r[t])?i:null;return null==i?null!=e?e:null:null==e||(0,a.Me)(i,e)?(null!=n&&n(t),i):(o.Log.warn(`Parameter type mismatch. '${s}.${t}' was found to be type '${typeof i}' but fallback/return type is '${typeof e}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),null!=e?e:null)}}e.Ee=function(t,e,i){return $P($P({},r(t,e,i,!0===(null==i?void 0:i.value))),{idType:null!=(t=null==i?void 0:i.id_type)?t:null})},e.De=s,e.Ie=function(t,e,i){return t=s(t,e,i),$P($P({},t),{groupName:null!=(e=null==i?void 0:i.group_name)?e:null})},e.ke=function(t,e,i,s){return $P($P({},r(t,e,i,void 0)),{get:n(t,null==i?void 0:i.value,s),groupName:null!=(e=null==i?void 0:i.group_name)?e:null,__value:null!=(t=null==i?void 0:i.value)?t:{}})},e.Te=function(t,e,i,s){return $P($P($P({},t),e),{get:n(t.name,i,s)})},e.we=n},1812:(t,e)=>{$Q(e)},3932:(t,e)=>{$Q(e),e.UPDATE_DETAIL_ERROR_MESSAGES=e.createUpdateDetails=void 0;e.createUpdateDetails=(t,e,i,s,r,n)=>({duration:i,source:e,success:t,error:s,sourceUrl:r,warnings:n}),e.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."}},8578:(t,e,i)=>{$Q(e),e.v=e.T=void 0;const s=i(1406),r=i(7512);e.T=function(t,e,i){try{var s=JSON.parse(JSON.stringify(t));return null!=e&&null!=e.environment?s.statsigEnvironment=e.environment:null!=i&&(s.statsigEnvironment={tier:i}),s}catch(t){return r.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}},e.v=function(t){return t?(0,s.Kt)(t):null}},4534:(t,i,e)=>{$Q2(i,"__esModule",{value:!0}),i.L=i.G=i.Storage=void 0;var s=e(7512),e=e(6830);const r={},n={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:t=>r[t]||null,setItem:(t,e)=>{r[t]=e},removeItem:t=>{delete r[t]},getAllKeys:()=>Object.keys(r)};let o=null;try{const u=(0,e.te)();u&&u.localStorage&&"function"==typeof u.localStorage.getItem&&(o={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:t=>u.localStorage.getItem(t),setItem:(t,e)=>u.localStorage.setItem(t,e),removeItem:t=>u.localStorage.removeItem(t),getAllKeys:()=>Object.keys(u.localStorage)})}catch(t){s.Log.warn("Failed to setup localStorageProvider.")}let a=null!==o&&void 0!==o?o:n,l=a;function h(e){try{return e()}catch(t){if(t instanceof Error&&"SecurityError"===t.name)return i.Storage.ge(n),null;throw t instanceof Error&&"QuotaExceededError"===t.name&&(e=i.Storage.getAllKeys().filter(t=>t.startsWith("statsig.")),t.message=t.message+". Statsig Keys: "+e.length),t}}i.Storage={isReady:()=>l.isReady(),isReadyResolver:()=>l.isReadyResolver(),getProviderName:()=>l.getProviderName(),getItem:t=>h(()=>l.getItem(t)),setItem:(t,e)=>h(()=>l.setItem(t,e)),removeItem:t=>l.removeItem(t),getAllKeys:()=>l.getAllKeys(),ge:t=>{a=t,l=t},_e:t=>{l=t?n:a}},i.G=function(t){return t=i.Storage.getItem(t),JSON.parse(null!=t?t:"null")},i.L=function(t,e){i.Storage.setItem(t,JSON.stringify(e))}},3401:(t,e,i)=>{$Q(e),e.P=void 0;const r=i(7512);e.P=function(t,e,i){try{var s=JSON.parse(t);if(s&&"object"==typeof s&&e in s)return s}catch(t){}return r.Log.error("Failed to parse "+i),null}},6634:(t,e)=>{$Q(e),e.Me=e.zt=void 0,e.zt=function(t){return Array.isArray(t)?"array":typeof t},e.Me=function(t,e){var i=t=>Array.isArray(t)?"array":null===t?"null":typeof t;return i(t)===i(e)}},8023:(t,e)=>{$Q(e),e.getUUID=void 0,e.getUUID=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();let i=(new Date).getTime(),s="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(4*Math.random())]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,t=>{let e=16*Math.random();return 0<i?(e=(i+e)%16|0,i=Math.floor(i/16)):(e=(s+e)%16|0,s=Math.floor(s/16)),("x"===t?e:7&e|8).toString(16)})}},1881:(t,e,i)=>{$Q(e),e.UrlConfiguration=void 0;const s=i(1406),r=i(7410),n={[r.Endpoint.qt]:"i",[r.Endpoint.jt]:"e",[r.Endpoint.Bt]:"d"};e.UrlConfiguration=class{constructor(t,e,i,s){this.customUrl=null,this.fallbackUrls=null,this.endpoint=t,this.endpointDnsKey=n[t],e&&(this.customUrl=e),!e&&i&&(this.customUrl=i.endsWith("/")?""+i+t:i+"/"+t),s&&(this.fallbackUrls=s);e=r.NetworkDefault[t];this.defaultUrl=e+"/"+t}getUrl(){var t;return null!=(t=this.customUrl)?t:this.defaultUrl}getChecksum(){var t=(null!=(t=this.fallbackUrls)?t:[]).sort().join(",");return(0,s.h)(this.customUrl+t)}}},2397:(t,e,i)=>{$Q(e),e.Ae=e.It=e.Rt=e.xe=void 0;i=i(6830);const s="foreground",r="background",n=[];let o=s,a=!1;e.xe=()=>o===s,e.Rt=()=>a,e.It=t=>{n.unshift(t)};e.Ae=e=>{e!==o&&(o=e,n.forEach(t=>t(e)))},(0,i.he)("focus",()=>{(a=!1,e.Ae)(s)}),(0,i.he)("blur",()=>(0,e.Ae)(r)),(0,i.ce)("visibilitychange",()=>{(0,e.Ae)("visible"===document.visibilityState?s:r)}),(0,i.he)((0,i.Hn)(),()=>{a=!0,(0,e.Ae)(r)})},6914:function(t,e,i){var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var r=Object.getOwnPropertyDescriptor(e,i);r&&("get"in r?e.__esModule:!r.writable&&!r.configurable)||(r={enumerable:!0,get:function(){return e[i]}}),$Q2(t,s,r)}:function(t,e,i,s){t[s=void 0===s?i:s]=e[i]}),r=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)},n=($Q(e),e.Storage=e.Log=e.EventLogger=e.Diagnostics=void 0,i(1845),i(1845));const o=i(8962),a=($Q2(e,"Diagnostics",{enumerable:!0,get:function(){return o.Diagnostics}}),i(7770)),l=($Q2(e,"EventLogger",{enumerable:!0,get:function(){return a.EventLogger}}),i(7512));$Q2(e,"Log",{enumerable:!0,get:function(){return l.Log}});var h=i(8e3);const u=i(4534);$Q2(e,"Storage",{enumerable:!0,get:function(){return u.Storage}}),r(i(1845),e),r(i(2137),e),r(i(6427),e),r(i(694),e),r(i(8962),e),r(i(3539),e),r(i(5542),e),r(i(2922),e),r(i(2417),e),r(i(1406),e),r(i(1333),e),r(i(7512),e),r(i(7787),e),r(i(7410),e),r(i(7023),e),r(i(1405),e),r(i(1361),e),r(i(6830),e),r(i(5902),e),r(i(4143),e),r(i(2176),e),r(i(9122),e),r(i(1375),e),r(i(2636),e),r(i(3206),e),r(i(1637),e),r(i(8e3),e),r(i(586),e),r(i(1098),e),r(i(2059),e),r(i(1812),e),r(i(8578),e),r(i(4534),e),r(i(3401),e),r(i(6634),e),r(i(1881),e),r(i(8023),e),r(i(2397),e),r(i(3932),e),r(i(3091),e),$P((0,n.l)(),{Log:l.Log,SDK_VERSION:h.SDK_VERSION})},2016:(t,e,i)=>{$Q(e),e.AutoInit=void 0;const y=i(6914),b=i(2018);function w(t,e){var i;return null!=(i=e.get(t))?i:e.get(t.toLowerCase())}e.AutoInit=class{static attempt(e){var t,i,s,r,n;try{var o=(0,y.te)(),a=(0,y.de)();if(o&&a&&a.currentScript){var l=a.currentScript.getAttribute("src"),h=null==(t=o.location)?void 0:t.href;if(l&&h){var u=new URL(l,h).searchParams,c=null!=(i=w("sdkKey",u))?i:w("apiKey",u);if(c){var d={},f=w("proxy",u),v=(f&&(d.networkConfig={api:f}),null==(r=null==(s=(0,y.l)())?void 0:s.instances)?void 0:r[c]);let t=null;if(t=v instanceof b.StatsigClient?v:t)e({sdkKey:c,client:t});else{var p=a.currentScript.dataset;const m=function(t,e){if(t)if(t in e&&"function"==typeof e[t])return e[t];return null}(null!=(n=p.onstatsiginit)?n:p.onStatsigInit,o),g=new b.StatsigClient(c,function(){var t=(0,y.te)();if(!t)return{};let e=t.statsigUser||{};var i=(e="object"!=typeof e?{}:e).custom||{},s=e.customIDs||{};return $P($P({},e),{customIDs:$P({},s),custom:$P($P({},i),{useragent:t.navigator.userAgent,page_url:(0,y.Gt)()||"",language:null==(s=t.navigator)?void 0:s.language})})}(),d);g.initializeAsync().then(()=>{m&&m(g)}).catch(t=>{y.Log.error(t)}),e({sdkKey:c,client:g})}}}}}catch(t){y.Log.error("AutoInit failed",t)}}}},2043:function(t,e,i){var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},s=($Q(e),s(i(2018)));const r=i(3447);i=i(2016);e.default=s.default,i.AutoInit.attempt(({client:t})=>{new r.SessionReplay(t)})},7262:(t,e,i)=>{$Q(e),e.Ne=void 0;const s=i(6914);function r(t,e){null!=t&&t.forEach(t=>{delete e[t]})}e.Ne=function(t,e){var i;return(e=(0,s.P)(e,"checksum","DeltasEvaluationResponse"))?(t=t,i=e,t=$P($P($P({},t),i),{feature_gates:$P($P({},t.feature_gates),i.feature_gates),layer_configs:$P($P({},t.layer_configs),i.layer_configs),dynamic_configs:$P($P({},t.dynamic_configs),i.dynamic_configs)}),r((t=i=t).deleted_gates,t.feature_gates),delete t.deleted_gates,r(i.deleted_configs,t.dynamic_configs),delete t.deleted_configs,r(i.deleted_layers,t.layer_configs),delete t.deleted_layers,i=t,(t=(0,s.Kt)({feature_gates:i.feature_gates,dynamic_configs:i.dynamic_configs,layer_configs:i.layer_configs},2))===e.checksumV2?JSON.stringify(i):{hadBadDeltaChecksum:!0,badChecksum:t,badMergedConfigs:i,badFullResponse:e.deltas_full_response}):{hadBadDeltaChecksum:!0}}},4845:(t,e,i)=>{$Q(e);const r=i(6914);e.default=class{constructor(t){this.O=t,this.Re=null,this.Pe=null,this.Ce="Uninitialized",this.Ue=0,this.Fe=0,this.Ge=null,this.Le=new Set}reset(){this.Pe=null,this.Re=null,this.Ce="Loading",this.Ue=0,this.Fe=0,this.Ge=null}finalize(){this.Pe||(this.Ce="NoValues")}getValues(){return this.Re?(0,r.P)(this.Re,"has_updates","EvaluationStoreValues"):null}setValues(t,e){var i;return!!t&&null!=(i=(0,r.P)(t.data,"has_updates","EvaluationResponse"))&&(this.Ce=t.source,!0===(null==i?void 0:i.has_updates)&&(this.Re=t.data,this.Ue=i.time,this.Fe=t.receivedAt,this.Pe=i,this.Ge=this.Ke(t.source,i),t.source&&i.user&&this.ze(e,i),r.SDKFlags.setFlags(this.O,null!=(t=i.sdk_flags)?t:{})),!0)}getWarnings(){if(0!==this.Le.size)return Array.from(this.Le)}getGate(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.feature_gates,t)}getConfig(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.dynamic_configs,t)}getLayer(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.layer_configs,t)}getParamStore(t){var e;return this.qe(null==(e=this.Pe)?void 0:e.param_stores,t)}getSource(){return this.Ce}getExposureMapping(){var t;return null==(t=this.Pe)?void 0:t.exposures}Ke(t,e){return"Bootstrap"!==t?null:(t={},e.user&&(t.user=e.user),e.sdkInfo&&(t.generatorSDKInfo=e.sdkInfo),t.lcut=e.time,t)}qe(t,e){let i=null;return{result:i=t?t[e]||t[(0,r.h)(e)]:i,details:this.Be(null==i)}}ze(t,e){var i,s=r.StableID.get(this.O);(null==(i=t.customIDs)?void 0:i.stableID)!==s&&(null!=(i=t.customIDs)&&i.stableID||s)?this.Le.add("StableIDMismatch"):"user"in e&&(i=e.user,s=$P($P({},t),{analyticsOnlyMetadata:void 0}),(0,r.v)(s)!==(0,r.v)(i))&&this.Le.add("PartialUserMatch")}getCurrentSourceDetails(){var t;return"Uninitialized"===this.Ce||"NoValues"===this.Ce?{reason:this.Ce}:(t={reason:this.Ce,lcut:this.Ue,receivedAt:this.Fe},0<this.Le.size&&(t.warnings=Array.from(this.Le)),t)}Be(t){var e=this.getCurrentSourceDetails();let i=e.reason;var s=null!=(s=e.warnings)?s:[],t=("Bootstrap"===this.Ce&&0<s.length&&(i+=s[0]),"Uninitialized"!==i&&"NoValues"!==i&&(i=i+":"+(t?"Unrecognized":"Recognized")),"Bootstrap"===this.Ce&&null!=(s=this.Ge)?s:void 0);return t&&(e.bootstrapMetadata=t),$P($P({},e),{reason:i})}}},8448:function(t,e,i){var l=this&&this.__awaiter||$A();$Q(e);const h=i(6914),o=i(7262);class s extends h.NetworkCore{constructor(t,e){super(t,e);e=null==t?void 0:t.networkConfig;this.Fi=t,this.Ve=new h.UrlConfiguration(h.Endpoint.qt,null==e?void 0:e.initializeUrl,null==e?void 0:e.api,null==e?void 0:e.initializeFallbackUrls)}fetchEvaluations(s,r,n,o,a){return l(this,void 0,void 0,function*(){var t,e=r?(0,h.P)(r,"has_updates","InitializeResponse"):null;let i={user:o,hash:null!=(t=null==(t=null==(t=this.Fi)?void 0:t.networkConfig)?void 0:t.initializeHashAlgorithm)?t:"djb2",deltasResponseRequested:!1,full_checksum:null};return null!=e&&e.has_updates&&(t=(null==e?void 0:e.hash_used)!==(null!=(t=null==(t=null==(t=this.Fi)?void 0:t.networkConfig)?void 0:t.initializeHashAlgorithm)?t:"djb2"),i=$P($P({},i),{sinceTime:a&&!t?e.time:0,previousDerivedFields:"derived_fields"in e&&a?e.derived_fields:{},deltasResponseRequested:!0,full_checksum:e.full_checksum,partialUserMatchSinceTime:t?0:e.time})),this.Je(s,e,i,n)})}Je(i,s,r,n){return l(this,void 0,void 0,function*(){var t,e=yield this.post({sdkKey:i,urlConfig:this.Ve,data:r,retries:2,isStatsigEncodable:!0,priority:n});return 204===(null==e?void 0:e.code)?'{"has_updates": false}':200!==(null==e?void 0:e.code)?null!=(t=null==e?void 0:e.body)?t:null:!0!==(null==s?void 0:s.has_updates)||!0!==(null==(t=e.body)?void 0:t.includes('"is_delta":true'))||!0!==r.deltasResponseRequested?e.body:"string"==typeof(t=(0,o.Ne)(s,e.body))?t:this.Je(i,s,$P($P($P({},r),t),{deltasResponseRequested:!1}),n)})}}e.default=s},3583:(t,e,i)=>{$Q(e),e.$e=void 0;const d=i(6914),f={disableExposureLog:!0};function v(t){return null==t||!1===t.disableExposureLog}function p(t,e){return null!=e&&!(0,d.Me)(t,e)}e.$e=function(h,u,c){return(t,e)=>{if(null==u)return e;var i,s,r,n,o,a,l=u[t];if(null==l||null!=e&&(0,d.zt)(e)!==l.param_type)return e;switch(l.ref_type){case"static":return l.value;case"gate":return a=l,h.getFeatureGate(a.gate_name,v(c)?void 0:f).value?a.pass_value:a.fail_value;case"dynamic_config":return a=l,o=e,p(n=(n=h).getDynamicConfig(a.config_name,v(c)?void 0:f).get(a.param_name),o)?o:n;case"experiment":return o=l,n=e,p(r=(r=h).getExperiment(o.experiment_name,v(c)?void 0:f).get(o.param_name),n)?n:r;case"layer":return r=l,s=e,p(i=(i=h).getLayer(r.layer_name,v(c)?void 0:f).get(r.param_name),s)?s:i;default:return e}}}},8198:function(t,e,i){var n=this&&this.__awaiter||$A();$Q(e);const o=i(6914),a=i(4845),l=i(8448),r=i(3583),h=i(4131);class s extends o.StatsigClientBase{static instance(t){var e=(0,o.l)().instance(t);return e instanceof s?e:(o.Log.warn((0,o.kt)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new s(null!=t?t:"",{}))}constructor(t,e,i=null){o.SDKType.ue(t,"javascript-client");var s,r=new l.default(i,t=>{this.$emt(t)}),t=(super(t,null!=(s=null==i?void 0:i.dataAdapter)?s:new h.StatsigEvaluationsDataAdapter,r,i),this.ar={},this.getFeatureGate=this.wi(o.MemoPrefix.Kn,this.Ti.bind(this)),this.getDynamicConfig=this.wi(o.MemoPrefix.Ln,this.Ii.bind(this)),this.getExperiment=this.wi(o.MemoPrefix.Vn,this.ki.bind(this)),this.getLayer=this.wi(o.MemoPrefix.$n,this.Di.bind(this)),this.getParameterStore=this.wi(o.MemoPrefix.Bn,this.Ri.bind(this)),this.We=new a.default(t),this.ht=r,this.He=this.xi(e,i),this.js=(0,o.getUUID)(),null!=(s=null==i?void 0:i.plugins)?s:[]);for(const n of t)n.bind(this)}initializeSync(t){var e;return"Uninitialized"!==this.loadingStatus?(0,o.createUpdateDetails)(!0,this.We.getSource(),-1,null,null,["MultipleInitializations",...null!=(e=this.We.getWarnings())?e:[]]):(this.pe.start(),this.updateUserSync(this.He,t))}initializeAsync(t){return n(this,void 0,void 0,function*(){return this.ve||(this.ve=this.Ye(t)),this.ve})}updateUserSync(e,t){var i=performance.now();try{return this.zi(e,t,i)}catch(t){e=t instanceof Error?t:new Error(String(t));return this.Ki(e,i)}}zi(t,e,i){var s=[...null!=(s=this.We.getWarnings())?s:[]],t=(this.Xe(t),this.dataAdapter.getDataSync(this.He)),e=(null==t&&s.push("NoCachedValues"),this.We.setValues(t,this.He),this.Qe(t),null==e?void 0:e.disableBackgroundCacheRefresh);return!0===e||null==e&&"Bootstrap"===(null==t?void 0:t.source)||this.Ze(null!=t?t:null,this.He),(0,o.createUpdateDetails)(!0,this.We.getSource(),performance.now()-i,this.$t.getLastSeenErrorAndReset(),this.ht.getLastUsedInitUrlAndReset(),s)}updateUserAsync(t,s){return n(this,void 0,void 0,function*(){var e=performance.now();try{return yield this.qi(t,s)}catch(t){var i=t instanceof Error?t:new Error(String(t));return this.Ki(i,e)}})}qi(s,r){return n(this,void 0,void 0,function*(){this.Xe(s);var t=this.He,e=(o.Diagnostics.B(this.O),this.dataAdapter.getDataSync(t));if(this.We.setValues(e,this.He),this.me("Loading",e),e=yield this.dataAdapter.getDataAsync(e,t,r),t!==this.He)return(0,o.createUpdateDetails)(!1,this.We.getSource(),-1,new Error("User changed during update"),this.ht.getLastUsedInitUrlAndReset());let i=!1;null!=e&&(o.Diagnostics.W(this.O),i=this.We.setValues(e,this.He),o.Diagnostics.H(this.O,{success:i})),this.Qe(e),i||(this.$t.attachErrorIfNoneExists(o.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),o.Diagnostics.V(this.O,i,this.We.getCurrentSourceDetails());t=o.Diagnostics.tt(this.He,this.pe,this.O,this.m);return(0,o.createUpdateDetails)(i,this.We.getSource(),t,this.$t.getLastSeenErrorAndReset(),this.ht.getLastUsedInitUrlAndReset(),this.We.getWarnings())})}getContext(){return{sdkKey:this.O,options:this.m,values:this.We.getValues(),user:JSON.parse(JSON.stringify(this.He)),errorBoundary:this.$t,session:o.StatsigSession.get(this.O),stableID:o.StableID.get(this.O),sdkInstanceID:this.js}}checkGate(t,e){return this.getFeatureGate(t,e).value}logEvent(t,e,i){e="string"==typeof t?{eventName:t,value:e,metadata:i}:t;this.$emt({name:"log_event_called",event:e}),this.pe.enqueue($P($P({},e),{user:this.He,time:Date.now()}))}updateUserWithAnalyticsOnlyMetadata(t){this.He=this.xi($P($P({},this.He),{analyticsOnlyMetadata:t}),this.m)}be(){this.$on("error",()=>{"Loading"===this.loadingStatus&&this.Qe(null)})}Ye(t){return n(this,void 0,void 0,function*(){return o.Storage.isReady()||(yield o.Storage.isReadyResolver()),this.pe.start(),this.updateUserAsync(this.He,t)})}Ki(t,e){return(0,o.createUpdateDetails)(!1,this.We.getSource(),performance.now()-e,t,null,[...null!=(e=this.We.getWarnings())?e:[]])}Qe(t){this.We.finalize(),this.me("Ready",t)}Ze(t,e){this.dataAdapter.getDataAsync(t,e,{priority:"low"}).catch(t=>{o.Log.error("An error occurred after update.",t)})}Xe(t){this.pe.reset(),this.We.reset(),this.He=this.xi(t,this.m)}xi(t,e){t=(0,o.T)(t,e),e=null==(e=t.customIDs)?void 0:e.stableID;return e&&o.StableID.setOverride(e,this.O),t.analyticsOnlyMetadata=$P($P({},t.analyticsOnlyMetadata),this.ar),t}Ti(t,e){var{result:i,details:s}=this.We.getGate(t),s=(0,o.Ee)(t,s,i),r=null==(r=null==(i=this.overrideAdapter)?void 0:i.getGateOverride)?void 0:r.call(i,s,this.He,e),i=null!=r?r:s;return this.ye(t,(0,o.Se)(this.He,i,this.We.getExposureMapping()),e),this.$emt({name:"gate_evaluation",gate:i}),i}Ii(t,e){var{result:i,details:s}=this.We.getConfig(t),s=(0,o.De)(t,s,i),r=null==(r=null==(i=this.overrideAdapter)?void 0:i.getDynamicConfigOverride)?void 0:r.call(i,s,this.He,e),i=null!=r?r:s;return this.ye(t,(0,o.je)(this.He,i,this.We.getExposureMapping()),e),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:i}),i}ki(t,e){var{result:i,details:s}=this.We.getConfig(t),s=(0,o.Ie)(t,s,i),r=(null!=s.__evaluation&&(s.__evaluation.secondary_exposures=(0,o.Ui)(null!=(i=null==(i=s.__evaluation)?void 0:i.secondary_exposures)?i:[],this.We.getExposureMapping())),null==(r=null==(i=this.overrideAdapter)?void 0:i.getExperimentOverride)?void 0:r.call(i,s,this.He,e)),i=null!=r?r:s;return this.ye(t,(0,o.je)(this.He,i,this.We.getExposureMapping()),e),this.$emt({name:"experiment_evaluation",experiment:i}),i}Di(e,i){var{result:t,details:s}=this.We.getLayer(e),s=(0,o.ke)(e,s,t),r=null==(r=null==(t=this.overrideAdapter)?void 0:t.getLayerOverride)?void 0:r.call(t,s,this.He,i);null!=i&&i.disableExposureLog&&this.pe.incrementNonExposureCount(e);const n=(0,o.Te)(s,r,null!=(t=null==r?void 0:r.__value)?t:s.__value,t=>{null!=i&&i.disableExposureLog||this.ye(e,(0,o.Oe)(this.He,n,t,this.We.getExposureMapping()),i)});return this.$emt({name:"layer_evaluation",layer:n}),n}Ri(t,e){var{result:i,details:s}=this.We.getParamStore(t),t=(this.pe.incrementNonExposureCount(t),{name:t,details:s,__configuration:i,get:(0,r.$e)(this,i,e)}),i=null==(i=null==(s=this.overrideAdapter)?void 0:s.getParamStoreOverride)?void 0:i.call(s,t,e);return null!=i&&(t.__configuration=i.config,t.details=i.details,t.get=(0,r.$e)(this,i.config,e)),t}}e.default=s},4131:function(t,e,i){var n=this&&this.__awaiter||$A();$Q(e),e.StatsigEvaluationsDataAdapter=void 0;const s=i(6914),r=i(8448);class o extends s.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this.ht=null,this.m=null}attach(t,e,i){super.attach(t,e,i),null!==i&&i instanceof r.default?this.ht=i:this.ht=new r.default(null!=e?e:{})}getDataAsync(t,e,i){return this.D(t,(0,s.T)(e,this.m),i)}prefetchData(t,e){return this.A(t,e)}setData(t){var e=(0,s.P)(t,"has_updates","data");e&&"user"in e?super.setData(t,e.user):s.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(t,e){super.setData(t,e)}R(e,i,s,r){return n(this,void 0,void 0,function*(){var t=yield null==(t=this.ht)?void 0:t.fetchEvaluations(this.C(),e,null==s?void 0:s.priority,i,r);return null!=t?t:null})}k(t){t=(0,s.o)(this.C(),t,null==(t=this.m)?void 0:t.customUserCacheKeyFunc);return`${s.DataAdapterCachePrefix}.${this.p}.`+t}N(t,e){return null!=t.fullUserHash&&t.fullUserHash===(0,s.v)(e)}}e.StatsigEvaluationsDataAdapter=o},2018:function(t,e,i){var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var r=Object.getOwnPropertyDescriptor(e,i);r&&("get"in r?e.__esModule:!r.writable&&!r.configurable)||(r={enumerable:!0,get:function(){return e[i]}}),$Q2(t,s,r)}:function(t,e,i,s){t[s=void 0===s?i:s]=e[i]}),r=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)},n=($Q(e),e.StatsigClient=void 0,i(6914)),o=i(8198),r=(e.StatsigClient=o.default,r(i(6914),e),$P((0,n.l)(),{StatsigClient:o.default}));e.default=r},8788:(t,e,i)=>{$Q(e),e.SessionReplay=e.runStatsigSessionReplay=e.StatsigSessionReplayPlugin=void 0;const s=i(6914);var r=i(4069);const n=i(5967);function o(t,e){new a(t,e)}e.StatsigSessionReplayPlugin=class{constructor(t){this.options=t,this.__plugin="session-replay"}bind(t){o(t,this.options)}},e.runStatsigSessionReplay=o;class a extends r.SessionReplayBase{constructor(t,e){super(t,e),this.tn.$on("values_updated",()=>{var t;this.ts||this.li(null==(t=this.m)?void 0:t.forceRecording)}),this.li(null==(t=this.m)?void 0:t.forceRecording)}ri(t){super.es(t)}li(t=!1){var e;this.ns>=n.MAX_LOGS||(!0===(null==(e=this.tn.getContext().values)?void 0:e.recording_blocked)||!t&&!0!==(null==e?void 0:e.can_record_session)||!1===(null==e?void 0:e.passes_session_recording_targeting)?this.ri():this.si.isRecording()||(this.ts=!1,s.StatsigMetadataProvider.add({isRecordingSession:"true"}),this.si.record((t,e)=>this.ci(t,e),null!=(e=null==(t=this.m)?void 0:t.rrwebConfig)?e:{},()=>{this.ri()})))}}e.SessionReplay=a},4069:(t,e,i)=>{$Q(e),e.SessionReplayBase=e.forceStartRecording=e.startRecording=e.stopRecording=void 0;const h=i(6914),s=i(759),u=i(5967);function r(t){var e=null==t?(0,h.l)().firstSRInstance:null==(e=null==(e=(0,h.l)())?void 0:e.srInstances)?void 0:e[t];return e instanceof n?e:null}e.stopRecording=function(t){null!=(t=r(t))&&t.stopRecording()},e.startRecording=function(t){null!=(t=r(t))&&t.startRecording()},e.forceStartRecording=function(t){null!=(t=r(t))&&t.forceStartRecording()};class n{constructor(t,e){this.ti={startTime:-1,endTime:0,clickCount:0},this.ei=[],this.ts=!1,this.ss=0,this.ns=0,this.tn=t,this.m=e;var{sdkKey:t,errorBoundary:e}=this.tn.getContext();this.$t=e,this.$t.wrap(this),this.si=new s.SessionReplayClient,this.tn.$on("pre_shutdown",()=>this.ri()),this.tn.on("session_expired",()=>{this.ri("session_expired")}),(0,h.kt)()||((e=(0,h.l)()).srInstances=$P($P({},e.srInstances),{[t]:this}),e.firstSRInstance)||(e.firstSRInstance=this),this.ii=this.ni(),this.ui()}forceStartRecording(){this.ts=!1,this.li(!0)}stopRecording(){this.ts=!0,this.ri()}startRecording(){var t;this.ts=!1,this.li(null==(t=this.m)?void 0:t.forceRecording)}isRecording(){return this.si.isRecording()}oi(t){0!==this.ei.length&&(t=(0,h.Rt)()?"is_leaving_page":t,this.vi(this.ii,t))}ai(t){"background"===t&&(this.oi(),this.tn.flush().catch(t=>{this.$t.logError("SR::visibility",t)}))}ui(){const i=this.tn.getContext()["sdkKey"];(0,h.It)(t=>{var e=null==(e=null==(e=(0,h.l)())?void 0:e.srInstances)?void 0:e[i];e instanceof n&&e.ai(t)})}vi(e,i){var s=this.ti;if(0!==this.ei.length){var r=JSON.stringify(this.ei),n=(0,u.rs)(r),o=1<n.length?(0,h.getUUID)():null;for(let t=0;t<n.length;t++){var a=n[t],l=(0,u.ls)(a,r,e,s,this.tn.getContext().sdkInstanceID);null!=o&&(0,u.os)(l.metadata,o,t,n.length,a.length),i&&(l.metadata[i]="true"),this.ns++,this.tn.logEvent(l),null!=o&&this.tn.flush().catch(t=>{h.Log.error(t)})}this.ei=[],this.ns>u.MAX_LOGS&&this.ri()}}di(){this.ni(),this.oi()}ni(){return this.tn.getContext().session.data.sessionID}es(t){this.si.isRecording()&&(this.si.stop(),h.StatsigMetadataProvider.add({isRecordingSession:"false"})),0!==this.ei.length&&this.oi(t),"session_expired"===t&&(this.ss=0,this.ti=this.us())}us(){return{startTime:-1,endTime:0,clickCount:0}}ci(t,e){var i;this.ii!==this.ni()?this.ri("session_expired"):this.ns>=u.MAX_LOGS?this.ri():(t.eventIndex=this.ss++,this.ti.clickCount+=e.clickCount,this.ti.startTime=-1===this.ti.startTime?e.startTime:Math.min(this.ti.startTime,e.startTime),this.ti.endTime=Math.max(this.ti.endTime,e.endTime),(e=(0,h.hi)(t,u.MAX_INDIVIDUAL_EVENT_BYTES))>u.MAX_INDIVIDUAL_EVENT_BYTES?h.Log.warn(`SessionReplay event is too large (~${e} bytes) and will not be logged`,t):(i=(0,h.hi)(this.ei,u.REPLAY_ENQUEUE_TRIGGER_BYTES),this.ei.push(t),i+e<u.REPLAY_ENQUEUE_TRIGGER_BYTES||((0,h.xe)()?this.di():this.oi())))}}e.SessionReplayBase=n},759:(t,e,i)=>{$Q(e),e.SessionReplayClient=void 0;const s=i(3597),o=i(6914);e.SessionReplayClient=class{constructor(){this.fi=null,this._i=null}record(r,t,e,n=!1){null==(0,o.de)()||(this.fi=null,this._i=null,this.bi=e,this.pi)||(this.pi=(e=(t,e)=>{var i;n?this.fi=!e&&null!=(i=this.fi)?i:t.timestamp:null==this.fi&&(this.fi=t.timestamp),this._i=t.timestamp;let s=0;3!==(i=t).type||2!==i.data.source||2!==i.data.type&&4!==i.data.type||s++,r($P($P({},t),{eventIndex:0}),{startTime:this.fi,endTime:this._i,clickCount:s},null!=e&&e),144e5<this._i-this.fi&&(null!=(t=this.pi)&&t.call(this),this.bi)&&this.bi()},t=t,n?(0,s.record)($P($P({},t),{emit:e,checkoutEveryNms:3e4})):(0,s.record)($P($P({},t),{emit:e}))))}stop(){this.pi&&(this.pi(),this.pi=void 0)}isRecording(){return null!=this.pi}}},5967:(t,e,i)=>{$Q(e),e.os=e.rs=e.ls=e.MAX_LOGS=e.MAX_INDIVIDUAL_EVENT_BYTES=e.REPLAY_ENQUEUE_TRIGGER_BYTES=void 0;const n=i(6914);e.REPLAY_ENQUEUE_TRIGGER_BYTES=10240,e.MAX_INDIVIDUAL_EVENT_BYTES=10485760,e.MAX_LOGS=1e4,e.ls=function(t,e,i,s,r){return{eventName:"statsig::session_recording",value:i,metadata:{session_start_ts:String(s.startTime),session_end_ts:String(s.endTime),clicks_captured_cumulative:String(s.clickCount),rrweb_events:t,rrweb_payload_size:String(e.length),session_replay_sdk_version:n.SDK_VERSION,sdk_instance_id:r}}},e.rs=function(e){var i=[];for(let t=0;t<e.length;t+=1048576)i.push(e.slice(t,t+1048576));return i},e.os=function(t,e,i,s,r){t.sliced_id=e,t.slice_index=String(i),t.slice_count=String(s),t.slice_byte_size=String(r)}},3691:(t,e,i)=>{$Q(e),e.TriggeredSessionReplay=e.runStatsigTriggeredSessionReplay=e.StatsigTriggeredSessionReplayPlugin=void 0;const r=i(6914);var s=i(4069);const n=i(5967);function o(t,e){new a(t,e)}e.StatsigTriggeredSessionReplayPlugin=class{constructor(t){this.options=t,this.__plugin="triggered-session-replay"}bind(t){o(t,this.options)}},e.runStatsigTriggeredSessionReplay=o;class a extends s.SessionReplayBase{constructor(t,e){super(t,e),this.cs=[],this.hs=!1,this.ds(e),null!=e&&e.autoStartRecording?this.li(null==(t=this.m)?void 0:t.forceRecording):null!=e&&e.keepRollingWindow&&this.vs()}ds(t){this.fs(t),this.gs(),this._s(),this.ps()}fs(e){this.tn.$on("values_updated",()=>{var t;this.ts||(null!=e&&e.autoStartRecording?this.li(null==(t=this.m)?void 0:t.forceRecording):null!=e&&e.keepRollingWindow&&this.vs())})}gs(){this.tn.$on("log_event_called",t=>{var e;this.ts||!1===(null==(e=this.tn.getContext().values)?void 0:e.passes_session_recording_targeting)||null==(null==e?void 0:e.session_recording_event_triggers)||null==(e=e.session_recording_event_triggers[t.event.eventName])||!1===e.passes_sampling||null!=(e=e.values)&&!e.includes(String(null!=(e=t.event.value)?e:""))||this.li(!0)})}_s(){this.tn.$on("gate_evaluation",t=>{this.bs(t.gate.name,String(t.gate.value))})}ps(){this.tn.$on("experiment_evaluation",t=>{this.bs(t.experiment.name,null!=(t=t.experiment.groupName)?t:"")})}bs(t,e){var i,s;this.ts||!1===(null==(s=this.tn.getContext().values)?void 0:s.passes_session_recording_targeting)||null==(null==s?void 0:s.session_recording_exposure_triggers)||null==(i=null!=(i=s.session_recording_exposure_triggers[t])?i:s.session_recording_exposure_triggers[(0,r.h)(t)])||!1===i.passes_sampling||null!=(s=i.values)&&!s.includes(e)||this.li(!0)}forceStartRecording(){super.forceStartRecording()}stopRecording(){this.hs=!1,this.cs=[],super.stopRecording()}ys(){if(this.hs=!0,0!==this.cs.length){var e=this.cs.map(t=>t.events).flat();for(let t=0;t<e.length;t++)e[t].event.eventIndex=t,this.ti.clickCount+=e[t].data.clickCount,this.ti.startTime=-1===this.ti.startTime?e[t].data.startTime:Math.min(this.ti.startTime,e[t].data.startTime),this.ti.endTime=Math.max(this.ti.endTime,e[t].data.endTime);this.ei=e.map(t=>t.event),this.ss=e.length,(0,r.xe)()?this.di():this.oi(),this.si.stop()}}ri(t){this.hs=!1,this.cs=[],super.es(t)}ci(t,e,i){if(!this.hs)return this.ii!==this.ni()?void this.ri("session_expired"):void(i&&4===t.type||0===this.cs.length?(1<this.cs.length&&this.cs.shift(),this.cs.push({events:[{event:t,data:e}]})):this.cs[this.cs.length-1].events.push({event:t,data:e}));super.ci(t,e)}vs(){var t=this.tn.getContext().values;!1===(null==t?void 0:t.passes_session_recording_targeting)?this.ri():this.si.isRecording()||this.si.record((t,e,i)=>this.ci(t,e,i),null!=(t=null==(t=this.m)?void 0:t.rrwebConfig)?t:{},()=>{this.ri()},!0)}li(t=!1){var e;this.ns>=n.MAX_LOGS||(!0===(null==(e=this.tn.getContext().values)?void 0:e.recording_blocked)||!t&&!0!==(null==e?void 0:e.can_record_session)||!1===(null==e?void 0:e.passes_session_recording_targeting)?this.ri():(this.ys(),this.ts=!1,r.StatsigMetadataProvider.add({isRecordingSession:"true"}),this.si.isRecording()||this.si.record((t,e,i)=>this.ci(t,e,i),null!=(e=null==(t=this.m)?void 0:t.rrwebConfig)?e:{},()=>{this.ri()})))}}e.TriggeredSessionReplay=a},3447:(t,e,i)=>{$Q(e),e.forceStartRecording=e.stopRecording=e.startRecording=e.StatsigTriggeredSessionReplayPlugin=e.StatsigSessionReplayPlugin=e.runStatsigTriggeredSessionReplay=e.runStatsigSessionReplay=e.SessionReplay=e.SessionReplayClient=void 0;var s=i(6914);const r=i(8788),n=($Q2(e,"SessionReplay",{enumerable:!0,get:function(){return r.SessionReplay}}),$Q2(e,"StatsigSessionReplayPlugin",{enumerable:!0,get:function(){return r.StatsigSessionReplayPlugin}}),$Q2(e,"runStatsigSessionReplay",{enumerable:!0,get:function(){return r.runStatsigSessionReplay}}),i(4069)),o=($Q2(e,"forceStartRecording",{enumerable:!0,get:function(){return n.forceStartRecording}}),$Q2(e,"startRecording",{enumerable:!0,get:function(){return n.startRecording}}),$Q2(e,"stopRecording",{enumerable:!0,get:function(){return n.stopRecording}}),i(759)),a=($Q2(e,"SessionReplayClient",{enumerable:!0,get:function(){return o.SessionReplayClient}}),i(3691));$Q2(e,"StatsigTriggeredSessionReplayPlugin",{enumerable:!0,get:function(){return a.StatsigTriggeredSessionReplayPlugin}}),$Q2(e,"runStatsigTriggeredSessionReplay",{enumerable:!0,get:function(){return a.runStatsigTriggeredSessionReplay}}),$P((0,s.l)(),{SessionReplayClient:o.SessionReplayClient,SessionReplay:r.SessionReplay,runStatsigSessionReplay:r.runStatsigSessionReplay,runStatsigTriggeredSessionReplay:a.runStatsigTriggeredSessionReplay,StatsigSessionReplayPlugin:r.StatsigSessionReplayPlugin,StatsigTriggeredSessionReplayPlugin:a.StatsigTriggeredSessionReplayPlugin,startRecording:n.startRecording,stopRecording:n.stopRecording,forceStartRecording:n.forceStartRecording})},3597:(_,A)=>{$Q2(A,Symbol.toStringTag,{value:"Module"});var M,j=Object.defineProperty,a=(t,e,i)=>{return i=i,(e="symbol"!=typeof e?e+"":e)in(t=t)?j(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},R=Object.defineProperty,x=(t,e,i)=>{return i=i,(e="symbol"!=typeof e?e+"":e)in(t=t)?R(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},X=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(X||{});const E={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},T={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},F={},B=()=>!!globalThis.Zone;function L(t){if(F[t])return F[t];var e=globalThis[t];const i=e.prototype;var s=t in E?E[t]:void 0,s=Boolean(s&&s.every(t=>{return Boolean(null==(t=null==(t=Object.getOwnPropertyDescriptor(i,t))?void 0:t.get)?void 0:t.toString().includes("[native code]"))})),r=t in T?T[t]:void 0,r=Boolean(r&&r.every(t=>{return"function"==typeof i[t]&&(null==(t=i[t])?void 0:t.toString().includes("[native code]"))}));if(s&&r&&!B())return F[t]=e.prototype,e.prototype;try{var n,o=document.createElement("iframe"),a=(document.body.appendChild(o),o.contentWindow);return a?(n=a[t].prototype,document.body.removeChild(o),n?F[t]=n:i):e.prototype}catch{return i}}const U={};function P(t,e,i){var s=t+"."+String(i);return U[s]?U[s].call(e):(t=L(t),(t=null==(t=Object.getOwnPropertyDescriptor(t,i))?void 0:t.get)?(U[s]=t).call(e):e[i])}const G={};function W(t,e,i){var s=t+"."+String(i);return G[s]?G[s].bind(e):"function"!=typeof(t=L(t)[i])?e[i]:(G[s]=t).bind(e)}const $={childNodes:function(t){return P("Node",t,"childNodes")},parentNode:function(t){return P("Node",t,"parentNode")},parentElement:function(t){return P("Node",t,"parentElement")},textContent:function(t){return P("Node",t,"textContent")},contains:function(t,e){return W("Node",t,"contains")(e)},getRootNode:function(t){return W("Node",t,"getRootNode")()},host:function(t){return t&&"host"in t?P("ShadowRoot",t,"host"):null},styleSheets:function(t){return t.styleSheets},shadowRoot:function(t){return t&&"shadowRoot"in t?P("Element",t,"shadowRoot"):null},querySelector:function(t,e){return P("Element",t,"querySelector")(e)},querySelectorAll:function(t,e){return P("Element",t,"querySelectorAll")(e)},mutationObserver:function(){return L("MutationObserver").constructor}};function z(t){return t.nodeType===t.ELEMENT_NODE}function Z(t){var e=t&&"host"in t&&"mode"in t&&$.host(t)||null;return Boolean(e&&"shadowRoot"in e&&$.shadowRoot(e)===t)}function V(t){return"[object ShadowRoot]"===Object.prototype.toString.call(t)}function st(t){try{var i=t.rules||t.cssRules;if(!i)return null;let e=t.href;!e&&t.ownerNode&&t.ownerNode.ownerDocument&&(e=t.ownerNode.ownerDocument.location.href);var s=Array.from(i,t=>Y(t,e)).join("");return r=(r=s).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")?r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;"):r}catch(t){return null}var r}function Y(i,e){if("styleSheet"in i){let e;try{e=st(i.styleSheet)||((s=(t=i).cssText).split('"').length<3?s:(s=["@import",`url(${JSON.stringify(t.href)})`],""===t.layerName?s.push("layer"):t.layerName&&s.push(`layer(${t.layerName})`),t.supportsText&&s.push(`supports(${t.supportsText})`),t.media.length&&s.push(t.media.mediaText),s.join(" ")+";"))}catch(t){e=i.cssText}return i.styleSheet.href?dt(e,i.styleSheet.href):e}{let t=i.cssText;return"selectorText"in i&&i.selectorText.includes(":")&&(t=t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),e?dt(t,e):t}var t,s}class rt{constructor(){x(this,"idNodeMap",new Map),x(this,"nodeMetaMap",new WeakMap)}getId(t){return t?(null==(t=this.getMeta(t))?void 0:t.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){var i=e.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,e)}replace(t,e){var i=this.getNode(t);i&&(i=this.nodeMetaMap.get(i))&&this.nodeMetaMap.set(e,i),this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function nt({element:t,maskInputOptions:e,tagName:i,type:s,value:r,maskInputFn:n}){let o=r||"";r=s&&ot(s);return o=e[i.toLowerCase()]||r&&e[r]?n?n(o,t):"*".repeat(o.length):o}function ot(t){return t.toLowerCase()}const at="__rrweb_original__";function lt(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?ot(e):null}function K(t,e){let i;try{i=new URL(t,e??window.location.href)}catch(t){return null}t=i.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==t?void 0:t[1])??null}const J=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ht=/^(?:[a-z+]+:)?\/\//i,ut=/^www\..*/i,ct=/^(data:)([^,]*),(.*)/i;function dt(t,l){return(t||"").replace(J,(t,e,i,s,r,n)=>{i=i||r||n,r=e||s||"";if(!i)return t;if(ht.test(i)||ut.test(i))return`url(${r}${i}${r})`;if(ct.test(i))return`url(${r}${i}${r})`;if("/"===i[0])return`url(${r}${function(t){let e="";return e=(e=-1<t.indexOf("//")?t.split("/").slice(0,3).join("/"):t.split("/")[0]).split("?")[0]}(l)+i}${r})`;var o=l.split("/"),n=i.split("/");o.pop();for(const a of n)"."!==a&&(".."===a?o.pop():o.push(a));return`url(${r}${o.join("/")}${r})`})}function ft(t){return t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function vt(t,e){return function(e,t){var i=Array.from(t.childNodes),s=[];if(1<i.length&&e&&"string"==typeof e){var r=ft(e);for(let t=1;t<i.length;t++)if(i[t].textContent&&"string"==typeof i[t].textContent){var n=ft(i[t].textContent);for(let t=3;t<n.length;t++){var o=n.substring(0,t);if(2===r.split(o).length){var a=r.indexOf(o);for(let t=a;t<e.length;t++)if(ft(e.substring(0,t)).length===a){s.push(e.substring(0,t)),e=e.substring(t);break}break}}}}return s.push(e),s}(t,e).join("/* rr_split */")}let pt=1;const mt=new RegExp("[^a-z0-9-_:]"),gt=-2;function yt(){return pt++}let bt,wt;const St=/^[^ \t\n\r\u000c]+/,It=/^[, \t\n\r\u000c]+/;function Ct(s,r){if(""===r.trim())return r;let n=0;function t(t){var t=t.exec(r.substring(n));return t?(t=t[0],n+=t.length,t):""}for(var o=[];t(It),!(n>=r.length);){let i=t(St);if(","===i.slice(-1))i=Ot(s,i.substring(0,i.length-1)),o.push(i);else{let t="",e=(i=Ot(s,i),!1);for(;;){var a=r.charAt(n);if(""===a){o.push((i+t).trim());break}if(e)")"===a&&(e=!1);else{if(","===a){n+=1,o.push((i+t).trim());break}"("===a&&(e=!0)}t+=a,n+=1}}}return o.join(", ")}const kt=new WeakMap;function Ot(t,e){return e&&""!==e.trim()?_t(t,e):e}function _t(t,e){let i=kt.get(t);if(i||(i=t.createElement("a"),kt.set(t,i)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return i.setAttribute("href",e),i.href}function At(t,e,i,s){return s&&("src"!==i&&("href"!==i||"use"===e&&"#"===s[0])&&("xlink:href"!==i||"#"===s[0])&&("background"!==i||"table"!==e&&"td"!==e&&"th"!==e)?"srcset"===i?Ct(t,s):"style"===i?dt(s,_t(t)):"object"===e&&"data"===i?Ot(t,s):s:Ot(t,s))}function Mt(t,e){return("video"===t||"audio"===t)&&"autoplay"===e}function jt(e,i,t){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!t&&jt($.parentNode(e),i,t);for(let t=e.classList.length;t--;){var s=e.classList[t];if(i.test(s))return!0}return!!t&&jt($.parentNode(e),i,t)}function Rt(t,e,i,s){let r;if(z(t)){if(r=t,!$.childNodes(r).length)return!1}else{if(null===$.parentElement(t))return!1;r=$.parentElement(t)}try{if("string"==typeof e){if(s){if(r.closest("."+e))return!0}else if(r.classList.contains(e))return!0}else if(jt(r,e,s))return!0;if(i)if(s){if(r.closest(i))return!0}else if(r.matches(i))return!0}catch(t){}return!1}function xt(i,t){var e,s,r,{doc:n,mirror:t,blockClass:o,blockSelector:a,needsMask:l,inlineStylesheet:h,maskInputOptions:F={},maskTextFn:B,maskInputFn:L,dataURLOptions:U={},inlineImages:P,recordCanvas:G,keepIframeSrcFn:W,newlyAddedElement:z=!1,cssCaptured:Z=!1}=t,u=(e=n,!(t=t).hasNode(e)||1===(t=t.getId(e))?void 0:t);switch(i.nodeType){case i.DOCUMENT_NODE:return"CSS1Compat"!==i.compatMode?{type:X.Document,childNodes:[],compatMode:i.compatMode}:{type:X.Document,childNodes:[]};case i.DOCUMENT_TYPE_NODE:return{type:X.DocumentType,name:i.name,publicId:i.publicId,systemId:i.systemId,rootId:u};case i.ELEMENT_NODE:{var c=i;var d={doc:n,blockClass:o,blockSelector:a,inlineStylesheet:h,maskInputOptions:F,maskInputFn:L,dataURLOptions:U,inlineImages:P,recordCanvas:G,keepIframeSrcFn:W,newlyAddedElement:z,rootId:u};const{doc:y,blockClass:b,blockSelector:w,inlineStylesheet:S,maskInputOptions:I={},maskInputFn:C,dataURLOptions:k={},inlineImages:O,recordCanvas:_,keepIframeSrcFn:A,newlyAddedElement:M=!1,rootId:j}=d,R=function(e,i,t){try{if("string"==typeof i){if(e.classList.contains(i))return!0}else for(let t=e.classList.length;t--;){var s=e.classList[t];if(i.test(s))return!0}if(t)return e.matches(t)}catch(t){}return!1}(c,b,w),x=function(t){return t instanceof HTMLFormElement?"form":(t=ot(t.tagName),mt.test(t)?"div":t)}(c);let e={};var V=c.attributes.length;for(let t=0;t<V;t++){var f=c.attributes[t];Mt(x,f.name,f.value)||(e[f.name]=At(y,x,ot(f.name),f.value))}if("link"===x&&S){d=Array.from(y.styleSheets).find(t=>t.href===c.href);let t=null;(t=d?st(d):t)&&(delete e.rel,delete e.href,e.ws=t)}if("style"===x&&c.sheet){let t=st(c.sheet);t&&(1<c.childNodes.length&&(t=vt(t,c)),e.ws=t)}"input"!==x&&"textarea"!==x&&"select"!==x||(d=c.value,s=c.checked,"radio"!==e.type&&"checkbox"!==e.type&&"submit"!==e.type&&"button"!==e.type&&d?e.value=nt({element:c,type:lt(c),tagName:x,value:d,maskInputOptions:I,maskInputFn:C}):s&&(e.checked=s));"option"===x&&(c.selected&&!I.select?e.selected=!0:delete e.selected);"dialog"===x&&c.open&&(e.rr_open_mode=c.matches("dialog:modal")?"modal":"non-modal");"canvas"===x&&_&&("2d"===c.__context?function(i){var s=i.getContext("2d");if(s)for(let e=0;e<i.width;e+=50)for(let t=0;t<i.height;t+=50){var r=s.getImageData,r=at in r?r[at]:r;if(new Uint32Array(r.call(s,e,t,Math.min(50,i.width-e),Math.min(50,i.height-t)).data.buffer).some(t=>0!==t))return}return 1}(c)||(e.rr_dataURL=c.toDataURL(k.type,k.quality)):"__context"in c||(d=c.toDataURL(k.type,k.quality),(s=y.createElement("canvas")).width=c.width,s.height=c.height,r=s.toDataURL(k.type,k.quality),d!==r&&(e.rr_dataURL=d)));if("img"===x&&O){bt||(bt=y.createElement("canvas"),wt=bt.getContext("2d"));const E=c,T=E.currentSrc||E.getAttribute("src")||"<unknown-src>",N=E.crossOrigin,D=()=>{E.removeEventListener("load",D);try{bt.width=E.naturalWidth,bt.height=E.naturalHeight,wt.drawImage(E,0,0),e.rr_dataURL=bt.toDataURL(k.type,k.quality)}catch(t){if("anonymous"!==E.crossOrigin)return E.crossOrigin="anonymous",void(E.complete&&0!==E.naturalWidth?D():E.addEventListener("load",D));console.warn(`Cannot inline img src=${T}! Error: `+t)}"anonymous"===E.crossOrigin&&(N?e.crossOrigin=N:E.removeAttribute("crossorigin"))};E.complete&&0!==E.naturalWidth?D():E.addEventListener("load",D)}"audio"!==x&&"video"!==x||((r=e).rr_mediaState=c.paused?"paused":"played",r.rr_mediaCurrentTime=c.currentTime,r.rr_mediaPlaybackRate=c.playbackRate,r.rr_mediaMuted=c.muted,r.rr_mediaLoop=c.loop,r.rr_mediaVolume=c.volume);M||(c.scrollLeft&&(e.rr_scrollLeft=c.scrollLeft),c.scrollTop&&(e.rr_scrollTop=c.scrollTop));R&&({width:d,height:v}=c.getBoundingClientRect(),e={class:e.class,rr_width:d+"px",rr_height:v+"px"});"iframe"!==x||A(e.src)||(c.contentDocument||(e.rr_src=e.src),delete e.src);let t;try{customElements.get(x)&&(t=!0)}catch(t){}return{type:X.Element,tagName:x,attributes:e,childNodes:[],isSVG:function(t){return Boolean("svg"===t.tagName||t.ownerSVGElement)}(c)||void 0,needBlock:R,rootId:j,isCustom:t};return}case i.TEXT_NODE:{d=i;var v={doc:n,needsMask:l,maskTextFn:B,rootId:u,cssCaptured:Z};var{needsMask:Y,maskTextFn:p,rootId:K,cssCaptured:J}=v,m=$.parentNode(d),m=m&&m.tagName;let t="";var g="STYLE"===m||void 0,m="SCRIPT"===m||void 0;m?t="SCRIPT_PLACEHOLDER":J||(t=$.textContent(d),g&&(t=t&&dt(t,_t(v.doc))));!g&&!m&&t&&Y&&(t=p?p(t,$.parentElement(d)):t.replace(/[\S]/g,"*"));return{type:X.Text,textContent:t||"",rootId:K};return}case i.CDATA_SECTION_NODE:return{type:X.CDATA,textContent:"",rootId:u};case i.COMMENT_NODE:return{type:X.Comment,textContent:$.textContent(i)||"",rootId:u};default:return!1}}function D(t){return null==t?"":t.toLowerCase()}function Et(e,t){const{doc:i,mirror:s,blockClass:r,blockSelector:n,maskTextClass:o,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:h=!0,maskInputOptions:u={},maskTextFn:c,maskInputFn:d,slimDOMOptions:f,dataURLOptions:v={},inlineImages:p=!1,recordCanvas:m=!1,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:b=5e3,onStylesheetLoad:w,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:I=()=>!1,newlyAddedElement:C=!1,cssCaptured:k=!1}=t;let O=t["needsMask"],{preserveWhiteSpace:_=!0}=t;O||(t=void 0===O,O=Rt(e,o,a,t));t=xt(e,{doc:i,mirror:s,blockClass:r,blockSelector:n,needsMask:O,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,dataURLOptions:v,inlineImages:p,recordCanvas:m,keepIframeSrcFn:I,newlyAddedElement:C,cssCaptured:k});if(!t)return console.warn(e,"not serialized"),null;let A;A=s.hasNode(e)?s.getId(e):function(t,e){if(e.comment&&t.type===X.Comment)return 1;if(t.type===X.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===K(t.attributes.href)))return 1;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(D(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===D(t.attributes.name)||"icon"===D(t.attributes.rel)||"apple-touch-icon"===D(t.attributes.rel)||"shortcut icon"===D(t.attributes.rel))))return 1;if("meta"===t.tagName){if(e.headMetaDescKeywords&&D(t.attributes.name).match(/^description|keywords$/))return 1;if(e.headMetaSocial&&(D(t.attributes.property).match(/^(og|twitter|fb):/)||D(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===D(t.attributes.name)))return 1;if(e.headMetaRobots&&("robots"===D(t.attributes.name)||"googlebot"===D(t.attributes.name)||"bingbot"===D(t.attributes.name)))return 1;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return 1;if(e.headMetaAuthorship&&("author"===D(t.attributes.name)||"generator"===D(t.attributes.name)||"framework"===D(t.attributes.name)||"publisher"===D(t.attributes.name)||"progid"===D(t.attributes.name)||D(t.attributes.property).match(/^article:/)||D(t.attributes.property).match(/^product:/)))return 1;if(e.headMetaVerification&&("google-site-verification"===D(t.attributes.name)||"yandex-verification"===D(t.attributes.name)||"csrf-token"===D(t.attributes.name)||"p:domain_verify"===D(t.attributes.name)||"verify-v1"===D(t.attributes.name)||"verification"===D(t.attributes.name)||"shopify-checkout-api-token"===D(t.attributes.name)))return 1}}}(t,f)||!_&&t.type===X.Text&&!t.textContent.replace(/^\s+|\s+$/gm,"").length?gt:pt++;var M=$P(t,{id:A});if(s.add(e,M),A===gt)return null;g&&g(e);let j=!l;if(M.type===X.Element&&(j=j&&!M.needBlock,delete M.needBlock,t=$.shadowRoot(e))&&V(t)&&(M.isShadowHost=!0),(M.type===X.Document||M.type===X.Element)&&j){f.headWhitespace&&M.type===X.Element&&"head"===M.tagName&&(_=!1);var R={doc:i,mirror:s,blockClass:r,blockSelector:n,needsMask:O,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,slimDOMOptions:f,dataURLOptions:v,inlineImages:p,recordCanvas:m,preserveWhiteSpace:_,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:S,keepIframeSrcFn:I,cssCaptured:!1};if(M.type!==X.Element||"textarea"!==M.tagName||void 0===M.attributes.value){M.type===X.Element&&void 0!==M.attributes.ws&&"string"==typeof M.attributes.ws&&(R.cssCaptured=!0);for(const T of Array.from($.childNodes(e))){var x=Et(T,R);x&&M.childNodes.push(x)}}let t=null;if(z(e)&&(t=$.shadowRoot(e)))for(const N of Array.from($.childNodes(t))){var E=Et(N,R);E&&(V(t)&&(E.isShadow=!0),M.childNodes.push(E))}}t=$.parentNode(e);return t&&Z(t)&&V(t)&&(M.isShadow=!0),M.type===X.Element&&"iframe"===M.tagName&&function(i,s,r){var n=i.contentWindow;if(n){let t=!1,e;try{e=n.document.readyState}catch(t){return}if("complete"!==e){const o=setTimeout(()=>{t||(s(),t=!0)},r);void i.addEventListener("load",()=>{clearTimeout(o),t=!0,s()})}else{r="about:blank";if(n.location.href!==r||i.src===r||""===i.src)return setTimeout(s,0),i.addEventListener("load",s);i.addEventListener("load",s)}}}(e,()=>{var t=e.contentDocument;t&&y&&(t=Et(t,{doc:t,mirror:s,blockClass:r,blockSelector:n,needsMask:O,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,slimDOMOptions:f,dataURLOptions:v,inlineImages:p,recordCanvas:m,preserveWhiteSpace:_,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:S,keepIframeSrcFn:I}))&&y(e,t)},b),M.type===X.Element&&"link"===M.tagName&&"string"==typeof M.attributes.rel&&("stylesheet"===M.attributes.rel||"preload"===M.attributes.rel&&"string"==typeof M.attributes.href&&"css"===K(M.attributes.href))&&function(t,e,i){let s=!1,r;try{r=t.sheet}catch(t){return}if(!r){const n=setTimeout(()=>{s||(e(),s=!0)},i);t.addEventListener("load",()=>{clearTimeout(n),s=!0,e()})}}(e,()=>{var t;w&&(t=Et(e,{doc:i,mirror:s,blockClass:r,blockSelector:n,needsMask:O,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,slimDOMOptions:f,dataURLOptions:v,inlineImages:p,recordCanvas:m,preserveWhiteSpace:_,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:S,keepIframeSrcFn:I}))&&w(e,t)},S),M}function Tt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Nt(i){var e,s;return i.__esModule?i:("function"==typeof(e=i.default)?(s=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)}).prototype=e.prototype:s={},$Q2(s,"__esModule",{value:!0}),Object.keys(i).forEach(function(t){var e=Object.getOwnPropertyDescriptor(i,t);$Q2(s,t,e.get?e:{enumerable:!0,get:function(){return i[t]}})}),s)}function Dt(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}}var t={exports:{}},e=String,t=(t.exports=Dt(),t.exports.createColors=Dt,t.exports),i=Nt(Object.freeze($Q2({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Ft=t,Bt=i;var t=class Go extends Error{constructor(t,e,i,s,r,n){super(t),this.name="CssSyntaxError",this.reason=t,r&&(this.file=r),s&&(this.source=s),n&&(this.plugin=n),void 0!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Go)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let e=this.source;null==t&&(t=Ft.isColorSupported);var i=(e=Bt&&t?Bt(e):e).split(/\r?\n/);let s=Math.max(this.line-3,0);var r=Math.min(this.line+2,i.length);let n=String(r).length,o,a;if(t){let{bold:e,gray:i,red:s}=Ft.createColors(!0);o=t=>e(s(t)),a=t=>i(t)}else o=a=t=>t;return i.slice(s,r).map((t,e)=>{var e=s+1+e,i=" "+(" "+e).slice(-n)+" | ";return e===this.line?(e=a(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," "),o(">")+a(i)+t+"\n "+e+o("^")):" "+a(i)+t}).join("\n")}toString(){let t=this.showSourceCode();return t=t&&"\n\n"+t+"\n",this.name+": "+this.message+t}},s=t,t=(t.default=t,{});t.isClean=Symbol("isClean"),t.my=Symbol("my");const Lt={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var r=class{constructor(t){this.builder=t}atrule(t,e){let i="@"+t.name;var s=t.params?this.rawValue(t,"params"):"";void 0!==t.raws.afterName?i+=t.raws.afterName:s&&(i+=" "),t.nodes?this.block(t,i+s):(e=(t.raws.between||"")+(e?";":""),this.builder(i+s+e,t))}beforeAfter(t,e){let i,s=(i="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose"),t.parent),r=0;for(;s&&"root"!==s.type;)r+=1,s=s.parent;if(i.includes("\n")){var n=this.raw(t,null,"indent");if(n.length)for(let t=0;t<r;t++)i+=n}return i}block(t,e){var i=this.raw(t,"between","beforeOpen");this.builder(e+i+"{",t,"start");let s;(s=t.nodes&&t.nodes.length?(this.body(t),this.raw(t,"after")):this.raw(t,"after","emptyBody"))&&this.builder(s),this.builder("}",t,"end")}body(e){let i=e.nodes.length-1;for(;0<i&&"comment"===e.nodes[i].type;)--i;var s=this.raw(e,"semicolon");for(let t=0;t<e.nodes.length;t++){var r=e.nodes[t],n=this.raw(r,"before");n&&this.builder(n),this.stringify(r,i!==t||s)}}comment(t){var e=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+i+"*/",t)}decl(t,e){var i=this.raw(t,"between","colon");let s=t.prop+i+this.rawValue(t,"value");t.important&&(s+=t.raws.important||" !important"),e&&(s+=";"),this.builder(s,t)}document(t){this.body(t)}raw(t,e,i){let s;if(i=i||e,!e||void 0===(s=t.raws[e])){var r=t.parent;if("before"===i){if(!r||"root"===r.type&&r.first===t)return"";if(r&&"document"===r.type)return""}if(!r)return Lt[i];r=t.root();if(r.rawCache||(r.rawCache={}),void 0!==r.rawCache[i])return r.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(t,i);var n="raw"+((n=i)[0].toUpperCase()+n.slice(1));this[n]?s=this[n](r,t):r.walk(t=>{if(void 0!==(s=t.raws[e]))return!1}),void 0===s&&(s=Lt[i]),r.rawCache[i]=s}return s}rawBeforeClose(t){let e;return t.walk(t=>{if(t.nodes&&0<t.nodes.length&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e=e&&e.replace(/\S/g,"")}rawBeforeComment(t,e){let i;return t.walkComments(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=void 0===i?this.raw(e,null,"beforeDecl"):i&&i.replace(/\S/g,"")}rawBeforeDecl(t,e){let i;return t.walkDecls(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=void 0===i?this.raw(e,null,"beforeRule"):i&&i.replace(/\S/g,"")}rawBeforeOpen(t){let e;return t.walk(t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1}),e}rawBeforeRule(e){let i;return e.walk(t=>{if(t.nodes&&(t.parent!==e||e.first!==t)&&void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=i&&i.replace(/\S/g,"")}rawColon(t){let e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1}),e}rawIndent(i){if(i.raws.indent)return i.raws.indent;let s;return i.walk(t=>{var e=t.parent;if(e&&e!==i&&e.parent&&e.parent===i&&void 0!==t.raws.before)return e=t.raws.before.split("\n"),s=(s=e[e.length-1]).replace(/\S/g,""),!1}),s}rawSemicolon(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1}),e}rawValue(t,e){var i=t[e],t=t.raws[e];return t&&t.value===i?t.raw:i}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},n=r;r.default=r;let Ut=n;function Pt(t,e){new Ut(e).stringify(t)}r=Pt;Pt.default=Pt;let{isClean:Gt,my:Wt}=t,zt=s,Zt=n,Vt=r;function Yt(e,i){let s=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){let t=e[r];var n=typeof t;"parent"===r&&"object"==n?i&&(s[r]=i):"source"===r?s[r]=t:Array.isArray(t)?s[r]=t.map(t=>Yt(t,s)):("object"==n&&null!==t&&(t=Yt(t)),s[r]=t)}return s}var n=class{constructor(t={}){for(var e in this.raws={},this[Gt]=!1,this[Wt]=!0,t)if("nodes"===e){this.nodes=[];for(var i of t[e])"function"==typeof i.clone?this.append(i.clone()):this.append(i)}else this[e]=t[e]}addToError(t){var e;return t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)&&(e=this.source,t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)),t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(var e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){var e,i=Yt(this);for(e in t)i[e]=t[e];return i}cloneAfter(t={}){t=this.clone(t);return this.parent.insertAfter(this,t),t}cloneBefore(t={}){t=this.clone(t);return this.parent.insertBefore(this,t),t}error(t,e={}){var i,s;return this.source?({end:i,start:s}=this.rangeBy(e),this.source.input.error(t,{column:s.column,line:s.line},{column:i.column,line:i.line},e)):new zt(t)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,i){return t[e]!==i&&(t[e]=i,"prop"===e||"value"===e||"name"===e||"params"===e||"important"===e||"text"===e)&&t.markDirty(),!0}}}markDirty(){if(this[Gt]){this[Gt]=!1;let t=this;for(;t=t.parent;)t[Gt]=!1}}next(){var t;if(this.parent)return t=this.parent.index(this),this.parent.nodes[t+1]}positionBy(t,e){let i=this.source.start;return t.index?i=this.positionInside(t.index,e):t.word&&-1!==(t=(e=this.toString()).indexOf(t.word))&&(i=this.positionInside(t,e)),i}positionInside(e,t){var i=t||this.toString();let s=this.source.start.column,r=this.source.start.line;for(let t=0;t<e;t++)"\n"===i[t]?(s=1,r+=1):s+=1;return{column:s,line:r}}prev(){var t;if(this.parent)return t=this.parent.index(this),this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};var s,r;return t.word?-1!==(r=(s=this.toString()).indexOf(t.word))&&(e=this.positionInside(r,s),i=this.positionInside(r+t.word.length,s)):(t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):t.index&&(i=this.positionInside(t.index+1))),{end:i=i.line<e.line||i.line===e.line&&i.column<=e.column?{column:e.column+1,line:e.line}:i,start:e}}raw(t,e){return(new Zt).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...i){if(this.parent){let t=this,e=!1;for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){let t=this;for(;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var i,s={},r=null==e;e=e||new Map;let n=0;for(i in this)if(Object.prototype.hasOwnProperty.call(this,i)&&"parent"!==i&&"proxyCache"!==i){var o=this[i];if(Array.isArray(o))s[i]=o.map(t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t);else if("object"==typeof o&&o.toJSON)s[i]=o.toJSON(null,e);else if("source"===i){let t=e.get(o.input);null==t&&(t=n,e.set(o.input,n),n++),s[i]={end:o.end,inputId:t,start:o.start}}else s[i]=o}return r&&(s.inputs=[...e.keys()].map(t=>t.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=Vt){t.stringify&&(t=t.stringify);let e="";return t(this,t=>{e+=t}),e}warn(t,e,i){var s,r={node:this};for(s in i)r[s]=i[s];return t.warn(e,r)}get proxyOf(){return this}},o=n,n=(n.default=n,o),n=class extends n{constructor(t){super(t=t&&void 0!==t.value&&"string"!=typeof t.value?{...t,value:String(t.value)}:t),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}},l=n;n.default=n;n={nanoid:(t=21)=>{let e="",i=t;for(;i--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(s,r=21)=>(t=r)=>{let e="",i=t;for(;i--;)e+=s[Math.random()*s.length|0];return e}};let{SourceMapConsumer:Kt,SourceMapGenerator:Jt}=i,{existsSync:Xt,readFileSync:$t}=i,{dirname:Ht,join:qt}=i;var h=class{constructor(t,e){!1!==e.map&&(this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:"),t=e.map?e.map.prev:void 0,t=this.loadMap(e.from,t),!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Ht(this.mapFile)),t)&&(this.text=t)}consumer(){return this.consumerCache||(this.consumerCache=new Kt(this.text)),this.consumerCache}decodeInline(t){if(/^data:application\/json;charset=utf-?8,/.test(t)||/^data:application\/json,/.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(t)||/^data:application\/json;base64,/.test(t))return e=t.substr(RegExp.lastMatch.length),Buffer?Buffer.from(e,"base64").toString():window.atob(e);var e=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+e)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e,i=t.match(/\/\*\s*# sourceMappingURL=/gm);i&&(i=t.lastIndexOf(i.pop()),e=t.indexOf("*/",i),-1<i)&&-1<e&&(this.annotation=this.getAnnotationURL(t.substring(i,e)))}loadFile(t){if(this.root=Ht(t),Xt(t))return this.mapFile=t,$t(t,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Kt)return Jt.fromSourceMap(t).toString();if(t instanceof Jt)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}t=t(e);if(t){var i=this.loadFile(t);if(i)return i;throw new Error("Unable to load previous source map: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=qt(Ht(e),t)),this.loadFile(t)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}},u=h,{SourceMapConsumer:h,SourceMapGenerator:c}=(h.default=h,i);let{fileURLToPath:Qt,pathToFileURL:te}=i,{isAbsolute:ee,resolve:ie}=i,se=n["nanoid"];n=i;let re=s,ne=u,oe=Symbol("fromOffsetCache"),ae=Boolean(h&&c),le=Boolean(ie&&ee);h=class{constructor(t,e={}){if(null==t||"object"==typeof t&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);this.css=t.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,e.from&&(!le||/^\w+:\/\//.test(e.from)||ee(e.from)?this.file=e.from:this.file=ie(e.from)),le&&ae&&(t=new ne(this.css,e)).text&&(e=(this.map=t).consumer().file,!this.file)&&e&&(this.file=this.mapResolve(e)),this.file||(this.id="<input css "+se(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,i,s={}){let r,n,o;e&&"object"==typeof e?(a=i,i="number"==typeof(l=e).offset?(e=(h=this.fromOffset(l.offset)).line,h.col):(e=l.line,l.column),o="number"==typeof a.offset?(h=this.fromOffset(a.offset),n=h.line,h.col):(n=a.line,a.column)):i||(e=(l=this.fromOffset(e)).line,i=l.col);var a,l,h=this.origin(e,i,n,o);return(r=h?new re(t,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,s.plugin):new re(t,void 0===n?e:{column:i,line:e},void 0===n?i:{column:o,line:n},this.css,this.file,s.plugin)).input={column:i,endColumn:o,endLine:n,line:e,source:this.css},this.file&&(te&&(r.input.url=te(this.file).toString()),r.input.file=this.file),r}fromOffset(e){let s;if(this[oe])s=this[oe];else{var r=this.css.split("\n");s=new Array(r.length);let i=0;for(let t=0,e=r.length;t<e;t++)s[t]=i,i+=r[t].length+1;this[oe]=s}let i=0;if(s[s.length-1]<=e)i=s.length-1;else{let t=s.length-2;for(var n;i<t;)if(n=i+(t-i>>1),e<s[n])t=n-1;else{if(!(e>=s[n+1])){i=n;break}i=n+1}}return{col:e-s[i]+1,line:i+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:ie(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,i,s){if(!this.map)return!1;var r=this.map.consumer(),e=r.originalPositionFor({column:e,line:t});if(!e.source)return!1;let n;"number"==typeof i&&(n=r.originalPositionFor({column:s,line:i}));let o;o=ee(e.source)?te(e.source):new URL(e.source,this.map.consumer().sourceRoot||te(this.map.mapFile));t={column:e.column,endColumn:n&&n.column,endLine:n&&n.line,line:e.line,url:o.toString()};if("file:"===o.protocol){if(!Qt)throw new Error("file: protocol is not available in this PostCSS build");t.file=Qt(o)}s=r.sourceContentFor(e.source);return s&&(t.source=s),t}toJSON(){var t,e={};for(t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache)&&(e.map.consumerCache=void 0),e}get from(){return this.file||this.id}},c=h;h.default=h,n&&n.registerInput&&n.registerInput(h);let{SourceMapConsumer:he,SourceMapGenerator:ue}=i,{dirname:ce,relative:de,resolve:fe,sep:ve}=i,pe=i["pathToFileURL"],me=c,ge=Boolean(he&&ue),ye=Boolean(ce&&fe&&de&&ve);n=class{constructor(t,e,i,s){this.stringify=t,this.mapOpts=i.map||{},this.root=e,this.opts=i,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t,e=(t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map","\n");this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var i=this.toUrl(this.path(e.file)),s=e.root||ce(e.file);let t;!1===this.mapOpts.sourcesContent?(t=new he(e.text)).sourcesContent&&(t.sourcesContent=null):t=e.consumer(),this.map.applySourceMap(t,i,this.toUrl(this.path(s)))}}clearAnnotation(){var e;if(!1!==this.mapOpts.annotation)if(this.root)for(let t=this.root.nodes.length-1;0<=t;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),ye&&ge&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){var t;return this.root?this.generateString():1===this.previous().length?((t=this.previous()[0].consumer()).file=this.outputFile(),this.map=ue.fromSourceMap(t,{ignoreInvalidMapping:!0})):(this.map=new ue({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 ue({file:this.outputFile(),ignoreInvalidMapping:!0});let s=1,r=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""},a,l;this.stringify(this.root,(t,e,i)=>{this.css+=t,e&&"end"!==i&&(o.generated.line=s,o.generated.column=r-1,e.source&&e.source.start?(o.source=this.sourcePath(e),o.original.line=e.source.start.line,o.original.column=e.source.start.column-1):(o.source=n,o.original.line=1,o.original.column=0),this.map.addMapping(o)),(a=t.match(/\n/g))?(s+=a.length,l=t.lastIndexOf("\n"),r=t.length-l):r+=t.length,e&&"start"!==i&&(t=e.parent||{raws:{}},"decl"!==e.type&&("atrule"!==e.type||e.nodes)||e!==t.last||t.raws.semicolon)&&(e.source&&e.source.end?(o.source=this.sourcePath(e),o.original.line=e.source.end.line,o.original.column=e.source.end.column-1,o.generated.line=s,o.generated.column=r-2):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=s,o.generated.column=r-1),this.map.addMapping(o))})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){var t;return void 0!==this.mapOpts.inline?this.mapOpts.inline:(void 0===(t=this.mapOpts.annotation)||!0===t)&&(!this.previous().length||this.previous().some(t=>t.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:0<this.previous().length}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;var e=this.memoizedPaths.get(t);if(e)return e;let i=this.opts.to?ce(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(i=ce(fe(i,this.mapOpts.annotation)));e=de(i,t);return this.memoizedPaths.set(t,e),e}previous(){var t;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(t=>{t.source&&t.source.input.map&&(t=t.source.input.map,this.previousMaps.includes(t)||this.previousMaps.push(t))}):(t=new me(this.originalCSS,this.opts)).map&&this.previousMaps.push(t.map)),this.previousMaps}setSourcesContent(){let i={};var t;this.root?this.root.walk(t=>{var e;t.source&&(e=t.source.input.from)&&!i[e]&&(i[e]=!0,e=this.usesFileUrls?this.toFileUrl(e):this.toUrl(this.path(e)),this.map.setSourceContent(e,t.source.input.css))}):this.css&&(t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(t,this.css))}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(pe)return e=pe(t).toString(),this.memoizedFileURLs.set(t,e),e;throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===ve&&(t=t.replace(/\\/g,"/"));e=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,e),e}},h=class extends o{constructor(t){super(t),this.type="comment"}},i=h;h.default=h;let{isClean:be,my:we}=t,Se=l,Ie=i,Ce,ke,Oe,_e;let Ae=class Wo extends o{append(...t){for(var e of t){var i;for(i of this.normalize(e,this.last))this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.cleanRaws(t)}each(i){if(this.proxyOf.nodes){var s=this.getIterator();let t,e;for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],!1!==(e=i(this.proxyOf.nodes[t],t)));)this.indexes[s]+=1;return delete this.indexes[s],e}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(e,s){return"proxyOf"===s?e:e[s]&&("each"===s||"string"==typeof s&&s.startsWith("walk")?(...t)=>e[s](...t.map(i=>"function"==typeof i?(t,e)=>i(t.toProxy(),e):i)):"every"===s||"some"===s?i=>e[s]((t,...e)=>i(t.toProxy(),...e)):"root"===s?()=>e.root().toProxy():"nodes"===s?e.nodes.map(t=>t.toProxy()):"first"===s||"last"===s?e[s].toProxy():e[s])},set(t,e,i){return t[e]!==i&&(t[e]=i,"name"===e||"params"===e||"selector"===e)&&t.markDirty(),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var i,s,r,n=this.index(t),o=this.normalize(e,this.proxyOf.nodes[n]).reverse(),n=this.index(t);for(i of o)this.proxyOf.nodes.splice(n+1,0,i);for(r in this.indexes)n<(s=this.indexes[r])&&(this.indexes[r]=s+o.length);return this.markDirty(),this}insertBefore(t,e){var i,s,r,n=this.index(t),o=this.normalize(e,this.proxyOf.nodes[n],0===n&&"prepend").reverse(),n=this.index(t);for(i of o)this.proxyOf.nodes.splice(n,0,i);for(r in this.indexes)n<=(s=this.indexes[r])&&(this.indexes[r]=s+o.length);return this.markDirty(),this}normalize(t,e){if("string"==typeof t)t=function e(t){return t.map(t=>(t.nodes&&(t.nodes=e(t.nodes)),delete t.source,t))}(Ce(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t))for(var i of t=t.slice(0))i.parent&&i.parent.removeChild(i,"ignore");else if("root"===t.type&&"document"!==this.type)for(var s of t=t.nodes.slice(0))s.parent&&s.parent.removeChild(s,"ignore");else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Se(t)]}else if(t.selector)t=[new ke(t)];else if(t.name)t=[new Oe(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Ie(t)]}return t.map(t=>(t[we]||Wo.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[be]&&function t(e){if(e[be]=!1,e.proxyOf.nodes)for(var i of e.proxyOf.nodes)t(i)}(t),void 0===t.raws.before&&e&&void 0!==e.raws.before&&(t.raws.before=e.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...t){for(var e of t=t.reverse()){var i,s,r=this.normalize(e,this.first,"prepend").reverse();for(i of r)this.proxyOf.nodes.unshift(i);for(s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(t){return(t.parent=this).proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e,i;for(i in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t<=(e=this.indexes[i])&&(this.indexes[i]=e-1);return this.markDirty(),this}replaceValues(e,i,s){return s||(s=i,i={}),this.walkDecls(t=>{i.props&&!i.props.includes(t.prop)||i.fast&&!t.value.includes(i.fast)||(t.value=t.value.replace(e,s))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(s){return this.each((e,t)=>{let i;try{i=s(e,t)}catch(t){throw e.addToError(t)}return i=!1!==i&&e.walk?e.walk(s):i})}walkAtRules(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("atrule"===t.type&&i.test(t.name))return s(t,e)}):this.walk((t,e)=>{if("atrule"===t.type&&t.name===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("atrule"===t.type)return s(t,e)}))}walkComments(i){return this.walk((t,e)=>{if("comment"===t.type)return i(t,e)})}walkDecls(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("decl"===t.type&&i.test(t.prop))return s(t,e)}):this.walk((t,e)=>{if("decl"===t.type&&t.prop===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("decl"===t.type)return s(t,e)}))}walkRules(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("rule"===t.type&&i.test(t.selector))return s(t,e)}):this.walk((t,e)=>{if("rule"===t.type&&t.selector===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("rule"===t.type)return s(t,e)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Ae.registerParse=t=>{Ce=t},Ae.registerRule=t=>{ke=t},Ae.registerAtRule=t=>{Oe=t},Ae.registerRoot=t=>{_e=t};var h=Ae,d=((Ae.default=Ae).rebuild=t=>{"atrule"===t.type?Object.setPrototypeOf(t,Oe.prototype):"rule"===t.type?Object.setPrototypeOf(t,ke.prototype):"decl"===t.type?Object.setPrototypeOf(t,Se.prototype):"comment"===t.type?Object.setPrototypeOf(t,Ie.prototype):"root"===t.type&&Object.setPrototypeOf(t,_e.prototype),t[we]=!0,t.nodes&&t.nodes.forEach(t=>{Ae.rebuild(t)})},h);let Me,je;var d=class extends d{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new Me(new je,this,t).stringify()}},f=(d.registerLazyResult=t=>{Me=t},d.registerProcessor=t=>{je=t},d);d.default=d;var d=class{constructor(t,e={}){for(var i in this.type="warning",this.text=t,e.node&&e.node.source&&(t=e.node.rangeBy(e),this.line=t.start.line,this.column=t.start.column,this.endLine=t.end.line,this.endColumn=t.end.column),e)this[i]=e[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},v=d;d.default=d;let Re=v;var d=class{constructor(t,e,i){this.processor=t,this.messages=[],this.root=e,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);t=new Re(t,e);return this.messages.push(t),t}warnings(){return this.messages.filter(t=>"warning"===t.type)}get content(){return this.css}},p=d;d.default=d;const xe="'".charCodeAt(0),Ee='"'.charCodeAt(0),Te="\\".charCodeAt(0),Ne="/".charCodeAt(0),De="\n".charCodeAt(0),Fe=" ".charCodeAt(0),Be="\f".charCodeAt(0),Le="\t".charCodeAt(0),Ue="\r".charCodeAt(0),Pe="[".charCodeAt(0),Ge="]".charCodeAt(0),We="(".charCodeAt(0),ze=")".charCodeAt(0),Ze="{".charCodeAt(0),Ve="}".charCodeAt(0),Ye=";".charCodeAt(0),Ke="*".charCodeAt(0),Je=":".charCodeAt(0),Xe="@".charCodeAt(0),$e=/[\t\n\f\r "#'()/;[\\\]{}]/g,He=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,qe=/.[\r\n"'(/\\]/,Qe=/[\da-f]/i;var d=class extends h{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}},m=d,d=(h.registerAtRule(d.default=d),h);let ti,ei;var g=class extends d{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,i){t=super.normalize(t);if(e)if("prepend"===i)1<this.nodes.length?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var s of t)s.raws.before=e.raws.before;return t}removeChild(t,e){var i=this.index(t);return!e&&0===i&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(t)}toResult(t={}){return new ti(new ei,this,t).stringify()}},y=(g.registerLazyResult=t=>{ti=t},g.registerProcessor=t=>{ei=t},g);d.registerRoot(g.default=g);let ii={comma(t){return ii.split(t,[","],!0)},space(t){return ii.split(t,[" ","\n","\t"])},split(t,e,i){var s,r=[];let n="",o=!1,a=0,l=!1,h="",u=!1;for(s of t)u?u=!1:"\\"===s?u=!0:l?s===h&&(l=!1):'"'===s||"'"===s?(l=!0,h=s):"("===s?a+=1:")"===s?0<a&&--a:0===a&&e.includes(s)&&(o=!0),o?(""!==n&&r.push(n.trim()),n="",o=!1):n+=s;return!i&&""===n||r.push(n.trim()),r}};d=ii;ii.default=ii;let si=d;var g=class extends h{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return si.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,e=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(e)}},b=g;h.registerRule(g.default=g);let ri=l,ni=function(e,t={}){let s=e.css.valueOf(),r=t.ignoreErrors,n,o,a,l,h,u,c,d,f,v,p=s.length,m=0,g=[],y=[];function b(t){throw e.error("Unclosed "+t,m)}return{back:function(t){y.push(t)},endOfFile:function(){return 0===y.length&&m>=p},nextToken:function(t){if(y.length)return y.pop();if(!(m>=p)){var e=!!t&&t.ignoreUnclosed;switch(n=s.charCodeAt(m)){case De:case Fe:case Le:case Ue:case Be:for(o=m;o+=1,(n=s.charCodeAt(o))===Fe||n===De||n===Le||n===Ue||n===Be;);v=["space",s.slice(m,o)],m=o-1;break;case Pe:case Ge:case Ze:case Ve:case Je:case Ye:case ze:var i=String.fromCharCode(n);v=[i,i,m];break;case We:if(d=g.length?g.pop()[1]:"",f=s.charCodeAt(m+1),"url"===d&&f!==xe&&f!==Ee&&f!==Fe&&f!==De&&f!==Le&&f!==Be&&f!==Ue){o=m;do{if(u=!1,-1===(o=s.indexOf(")",o+1))){if(r||e){o=m;break}b("bracket")}for(c=o;s.charCodeAt(c-1)===Te;)--c,u=!u}while(u);v=["brackets",s.slice(m,o+1),m,o],m=o}else o=s.indexOf(")",m+1),l=s.slice(m,o+1),-1===o||qe.test(l)?v=["(","(",m]:(v=["brackets",l,m,o],m=o);break;case xe:case Ee:a=n===xe?"'":'"',o=m;do{if(u=!1,-1===(o=s.indexOf(a,o+1))){if(r||e){o=m+1;break}b("string")}for(c=o;s.charCodeAt(c-1)===Te;)--c,u=!u}while(u);v=["string",s.slice(m,o+1),m,o],m=o;break;case Xe:$e.lastIndex=m+1,$e.test(s),o=0===$e.lastIndex?s.length-1:$e.lastIndex-2,v=["at-word",s.slice(m,o+1),m,o],m=o;break;case Te:for(o=m,h=!0;s.charCodeAt(o+1)===Te;)o+=1,h=!h;if(n=s.charCodeAt(o+1),h&&n!==Ne&&n!==Fe&&n!==De&&n!==Le&&n!==Ue&&n!==Be&&(o+=1,Qe.test(s.charAt(o)))){for(;Qe.test(s.charAt(o+1));)o+=1;s.charCodeAt(o+1)===Fe&&(o+=1)}v=["word",s.slice(m,o+1),m,o],m=o;break;default:m=(n===Ne&&s.charCodeAt(m+1)===Ke?(0===(o=s.indexOf("*/",m+2)+1)&&(r||e?o=s.length:b("comment")),v=["comment",s.slice(m,o+1),m,o]):(He.lastIndex=m+1,He.test(s),o=0===He.lastIndex?s.length-1:He.lastIndex-2,v=["word",s.slice(m,o+1),m,o],g.push(v)),o)}return m++,v}},position:function(){return m}}},oi=i,ai=m,li=y,hi=b;const ui={empty:!0,space:!0};let ci=class{constructor(t){this.input=t,this.root=new li,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){var e,i=new ai;i.name=t[1].slice(1),""===i.name&&this.unnamedAtrule(i,t),this.init(i,t[2]);let s,r,n=!1,o=!1;for(var a=[],l=[];!this.tokenizer.endOfFile();){if("("===(e=(t=this.tokenizer.nextToken())[0])||"["===e?l.push("("===e?")":"]"):"{"===e&&0<l.length?l.push("}"):e===l[l.length-1]&&l.pop(),0===l.length){if(";"===e){i.source.end=this.getPosition(t[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===e){o=!0;break}if("}"===e){if(0<a.length){for(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(i.source.end=this.getPosition(s[3]||s[2]),i.source.end.offset++)}this.end(t);break}}if(a.push(t),this.tokenizer.endOfFile()){n=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),n&&(t=a[a.length-1],i.source.end=this.getPosition(t[3]||t[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),o&&(i.nodes=[],this.current=i)}checkMissedSemicolon(s){var r=this.colon(s);if(!1!==r){let e=0,i;for(let t=r-1;0<=t&&("space"===(i=s[t])[0]||2!==(e+=1));t--);throw this.input.error("Missed semicolon","word"===i[0]?i[3]+1:i[2])}}colon(t){let e=0,i,s,r;for(var[n,o]of t.entries()){if("("===(s=(i=o)[0])&&(e+=1),")"===s&&--e,0===e&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return n}this.doubleColon(i)}r=i}return!1}comment(t){var e=new oi,t=(this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++,t[1].slice(2,-2));/^\s*$/.test(t)?(e.text="",e.raws.left=t,e.raws.right=""):(t=t.match(/^(\s*)([^]*\S)(\s*)$/),e.text=t[2],e.raws.left=t[1],e.raws.right=t[3])}createTokenizer(){this.tokenizer=ni(this.input)}decl(t,e){var i,s=new ri,r=(this.init(s,t[0][2]),t[t.length-1]);for(";"===r[0]&&(this.semicolon=!0,t.pop()),s.source.end=this.getPosition(r[3]||r[2]||function(e){for(let t=e.length-1;0<=t;t--){var i=e[t],i=i[3]||i[2];if(i)return i}}(t)),s.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),s.raws.before+=t.shift()[1];for(s.source.start=this.getPosition(t[0][2]),s.prop="";t.length;){var n=t[0][0];if(":"===n||"space"===n||"comment"===n)break;s.prop+=t.shift()[1]}s.raws.between="";let o;for(;t.length;){if(":"===(o=t.shift())[0]){s.raws.between+=o[1];break}"word"===o[0]&&/\w/.test(o[1])&&this.unknownWord([o]),s.raws.between+=o[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let a=[];for(;t.length&&("space"===(i=t[0][0])||"comment"===i);)a.push(t.shift());this.precheckMissedSemicolon(t);for(let i=t.length-1;0<=i;i--){if("!important"===(o=t[i])[1].toLowerCase()){s.important=!0;var l=this.stringFrom(t,i);" !important"!==(l=this.spacesFromEnd(t)+l)&&(s.raws.important=l);break}if("important"===o[1].toLowerCase()){var h=t.slice(0);let e="";for(let t=i;0<t;t--){var u=h[t][0];if(0===e.trim().indexOf("!")&&"space"!==u)break;e=h.pop()[1]+e}0===e.trim().indexOf("!")&&(s.important=!0,s.raws.important=e,t=h)}if("space"!==o[0]&&"comment"!==o[0])break}t.some(t=>"space"!==t[0]&&"comment"!==t[0])&&(s.raws.between+=a.map(t=>t[1]).join(""),a=[]),this.raw(s,"value",a.concat(t),e),s.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new hi;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){this.spaces+=t[1],this.current.nodes&&(t=this.current.nodes[this.current.nodes.length-1])&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){let e=!1;var i;let s=!1,r=null;var n=[],o=t[1].startsWith("--"),a=[];let l=t;for(;l;){if(i=l[0],a.push(l),"("===i||"["===i)r=r||l,n.push("("===i?")":"]");else if(o&&s&&"{"===i)r=r||l,n.push("}");else if(0===n.length){if(";"===i){if(s)return void this.decl(a,o);break}if("{"===i)return void this.rule(a);if("}"===i){this.tokenizer.back(a.pop()),e=!0;break}":"===i&&(s=!0)}else i===n[n.length-1]&&(n.pop(),0===n.length)&&(r=null);l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),0<n.length&&this.unclosedBracket(r),e&&s){if(!o)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,i,s){var r,n,o,a,l=i.length;let h="",u=!0;for(let t=0;t<l;t+=1)"space"===(o=(r=i[t])[0])&&t===l-1&&!s||"comment"===o&&(o=i[t-1]?i[t-1][0]:"empty",n=i[t+1]?i[t+1][0]:"empty",ui[o]||ui[n]||","===h.slice(-1))?u=!1:h+=r[1];u||(a=i.reduce((t,e)=>t+e[1],""),t.raws[e]={raw:a,value:h}),t[e]=h}rule(t){t.pop();var e=new hi;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){var e;let i="";for(;t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)i=t.pop()[1]+i;return i}spacesAndCommentsFromStart(t){var e;let i="";for(;t.length&&("space"===(e=t[0][0])||"comment"===e);)i+=t.shift()[1];return i}spacesFromEnd(t){let e="";for(;t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(e,i){let s="";for(let t=i;t<e.length;t++)s+=e[t][1];return e.splice(i,e.length-i),s}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},di=c;function fi(t,e){t=new di(t,e),e=new ci(t);try{e.parse()}catch(t){throw t}return e.root}g=fi;h.registerParse(fi.default=fi);let{isClean:vi,my:pi}=t,mi=n,gi=r,yi=h;t=f;let bi=p,wi=g;var w=y;const Si={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ii={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},Ci={Once:!0,postcssPlugin:!0,prepare:!0},ki=0;function Oi(t){return"object"==typeof t&&"function"==typeof t.then}function _i(t){let e=!1;var i=Si[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[i,i+"-"+e,ki,i+"Exit",i+"Exit-"+e]:e?[i,i+"-"+e,i+"Exit",i+"Exit-"+e]:t.append?[i,ki,i+"Exit"]:[i,i+"Exit"]}function Ai(t){let e;return{eventIndex:0,events:e="document"===t.type?["Document",ki,"DocumentExit"]:"root"===t.type?["Root",ki,"RootExit"]:_i(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function Mi(t){return t[vi]=!1,t.nodes&&t.nodes.forEach(t=>Mi(t)),t}let ji={};var S=class zo{constructor(t,e,i){this.stringified=!1,this.processed=!1;let s;if("object"!=typeof e||null===e||"root"!==e.type&&"document"!==e.type)if(e instanceof zo||e instanceof bi)s=Mi(e.root),e.map&&(void 0===i.map&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=e.map);else{let t=wi;i.syntax&&(t=i.syntax.parse),(t=i.parser?i.parser:t).parse&&(t=t.parse);try{s=t(e,i)}catch(t){this.processed=!0,this.error=t}s&&!s[pi]&&yi.rebuild(s)}else s=Mi(e);this.result=new bi(t,s,i),this.helpers={...ji,postcss:ji,result:this.result},this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?{...t,...t.prepare(this.result)}:t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var i=this.result.lastPlugin;try{e&&e.addToError(t),"CssSyntaxError"!==(this.error=t).name||t.plugin?i.postcssVersion:(t.plugin=i.postcssPlugin,t.setMessage())}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t,e=(t,e,i)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,i])};for(t of this.plugins)if("object"==typeof t)for(var i in t){if(!Ii[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Ci[i])if("object"==typeof t[i])for(var s in t[i])"*"===s?e(t,i,t[i][s]):e(t,i+"-"+s.toLowerCase(),t[i][s]);else"function"==typeof t[i]&&e(t,i,t[i])}this.hasListener=0<Object.keys(this.listeners).length}async runAsync(){for(let t=this.plugin=0;t<this.plugins.length;t++){var e=this.plugins[t],e=this.runOnRoot(e);if(Oi(e))try{await e}catch(t){throw this.handleError(t)}}if(this.prepareVisitors(),this.hasListener){for(var i,s=this.result.root;!s[vi];){s[vi]=!0;for(var r=[Ai(s)];0<r.length;){var n=this.visitTick(r);if(Oi(n))try{await n}catch(t){n=r[r.length-1].node;throw this.handleError(t,n)}}}if(this.listeners.OnceExit)for(let[t,e]of this.listeners.OnceExit){this.result.lastPlugin=t;try{"document"===s.type?(i=s.nodes.map(t=>e(t,this.helpers)),await Promise.all(i)):await e(s,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{var t;return"object"==typeof e&&e.Once?"document"===this.result.root.type?Oi((t=this.result.root.nodes.map(t=>e.Once(t,this.helpers)))[0])?Promise.all(t):t:e.Once(this.result.root,this.helpers):"function"==typeof e?e(this.result.root,this.result):void 0}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(!this.stringified){this.stringified=!0,this.sync();var e=this.result.opts;let t=gi;e.syntax&&(t=e.syntax.stringify),(t=e.stringifier?e.stringifier:t).stringify&&(t=t.stringify);e=new mi(t,this.result.root,this.result.opts).generate();this.result.css=e[0],this.result.map=e[1]}return this.result}sync(){if(this.error)throw this.error;if(!this.processed){if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins)if(Oi(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[vi];)e[vi]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var i of e.nodes)this.visitSync(this.listeners.OnceExit,i);else this.visitSync(this.listeners.OnceExit,e)}}return this.result}then(t,e){return this.async().then(t,e)}toString(){return this.css}visitSync(t,e){for(var[i,s]of t){this.result.lastPlugin=i;let t;try{t=s(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(Oi(t))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:i,visitors:s}=e;if("root"===i.type||"document"===i.type||i.parent){if(0<s.length&&e.visitorIndex<s.length){var[r,n]=s[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===s.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=r;try{return n(i.toProxy(),this.helpers)}catch(t){throw this.handleError(t,i)}}if(0!==e.iterator){for(var o,a=e.iterator;o=i.nodes[i.indexes[a]];)if(i.indexes[a]+=1,!o[vi])return o[vi]=!0,void t.push(Ai(o));e.iterator=0,delete i.indexes[a]}for(var l=e.events;e.eventIndex<l.length;){var h=l[e.eventIndex];if(e.eventIndex+=1,h===ki)return void(i.nodes&&i.nodes.length&&(i[vi]=!0,e.iterator=i.getIterator()));if(this.listeners[h])return void(e.visitors=this.listeners[h])}}t.pop()}walkSync(t){var e;t[vi]=!0;for(e of _i(t))if(e===ki)t.nodes&&t.each(t=>{t[vi]||this.walkSync(t)});else{var i=this.listeners[e];if(i&&this.visitSync(i,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}},Ri=(S.registerPostcss=t=>{ji=t},S);w.registerLazyResult(S.default=S),t.registerLazyResult(S);let xi=n,Ei=r;let Ti=g;const Ni=p;w=class{constructor(t,e,i){e=e.toString(),this.stringified=!1,this.Ss=t,this.Cs=e,this.Is=i,this.ks=void 0;t=Ei;this.result=new Ni(this.Ss,void 0,this.Is),this.result.css=e;let s=this;$Q2(this.result,"root",{get(){return s.root}});i=new xi(t,void 0,this.Is,e);i.isMap()?([t,e]=i.generate(),t&&(this.result.css=t),e&&(this.result.map=e)):(i.clearAnnotation(),this.result.css=i.css)}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return this.async().then(t,e)}toString(){return this.Cs}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this.Os)return this.Os;let t;var e=Ti;try{t=e(this.Cs,this.Is)}catch(t){this.error=t}if(this.error)throw this.error;return this.Os=t}get[Symbol.toStringTag](){return"NoWorkResult"}},t=w;w.default=w;let Di=t,Fi=Ri;S=f,n=class{constructor(t=[]){this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){let e=[];for(var i of t)if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"==typeof i&&Array.isArray(i.plugins))e=e.concat(i.plugins);else if("object"==typeof i&&i.postcssPlugin)e.push(i);else if("function"==typeof i)e.push(i);else if("object"!=typeof i||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");return e}process(t,e={}){return new(this.plugins.length||e.parser||e.stringifier||e.syntax?Fi:Di)(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},w=n;y.registerProcessor(n.default=n),S.registerProcessor(n);let Bi=l,Li=u,Ui=i,Pi=m,Gi=c,Wi=y,zi=b;function Zi(t,i){if(Array.isArray(t))return t.map(t=>Zi(t));let{inputs:e,...s}=t;if(e){i=[];for(var r of e){r={...r,__proto__:Gi.prototype};r.map&&(r.map={...r.map,__proto__:Li.prototype}),i.push(r)}}if(s.nodes&&(s.nodes=t.nodes.map(t=>Zi(t,i))),s.source){let{inputId:t,...e}=s.source;s.source=e,null!=t&&(s.source.input=i[t])}if("root"===s.type)return new Wi(s);if("decl"===s.type)return new Bi(s);if("rule"===s.type)return new zi(s);if("comment"===s.type)return new Ui(s);if("atrule"===s.type)return new Pi(s);throw new Error("Unknown node type: "+t.type)}t=Zi,Zi.default=Zi,S=s;let Vi=l;n=Ri,u=h;let Yi=w;s=r,l=t;let Ki=f;Ri=v;let Ji=i,Xi=m;h=p,w=c,r=g,t=d;let $i=b,Hi=y;f=o;function I(...t){return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new Yi(t)}I.plugin=function(e,i){let s=!1;function r(...t){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");t=i(...t);return t.postcssPlugin=e,t.postcssVersion=(new Yi).version,t}let t;return $Q2(r,"postcss",{get(){return t=t||r()}}),r.process=function(t,e,i){return I([r(i)]).process(t,e)},r},I.stringify=s,I.parse=r,I.fromJSON=l,I.list=t,I.comment=t=>new Ji(t),I.atRule=t=>new Xi(t),I.decl=t=>new Vi(t),I.rule=t=>new $i(t),I.root=t=>new Hi(t),I.document=t=>new Ki(t),I.CssSyntaxError=S,I.Declaration=Vi,I.Container=u,I.Processor=Yi,I.Document=Ki,I.Comment=Ji,I.Warning=Ri,I.AtRule=Xi,I.Result=h,I.Input=w,I.Rule=$i,I.Root=Hi,I.Node=f,n.registerPostcss(I);v=I,I.default=I,i=Tt(v);i.stringify,i.fromJSON,i.plugin,i.parse,i.list,i.document,i.comment,i.atRule,i.rule,i.decl,i.root,i.CssSyntaxError,i.Declaration,i.Container,i.Processor,i.Document,i.Comment,i.Warning,i.AtRule,i.Result,i.Input,i.Rule,i.Root,i.Node,Object.defineProperty;function qi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Qi(i){var e,s;return i.__esModule?i:("function"==typeof(e=i.default)?(s=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)}).prototype=e.prototype:s={},$Q2(s,"__esModule",{value:!0}),Object.keys(i).forEach(function(t){var e=Object.getOwnPropertyDescriptor(i,t);$Q2(s,t,e.get?e:{enumerable:!0,get:function(){return i[t]}})}),s)}function ts(){return{isColorSupported:!1,reset:C,bold:C,dim:C,italic:C,underline:C,inverse:C,hidden:C,strikethrough:C,black:C,red:C,green:C,yellow:C,blue:C,magenta:C,cyan:C,white:C,gray:C,bgBlack:C,bgRed:C,bgGreen:C,bgYellow:C,bgBlue:C,bgMagenta:C,bgCyan:C,bgWhite:C}}var m={exports:{}},C=String,p=(m.exports=ts(),m.exports.createColors=ts,m.exports),c=Qi(Object.freeze($Q2({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let es=p,is=c;g=class Zo extends Error{constructor(t,e,i,s,r,n){super(t),this.name="CssSyntaxError",this.reason=t,r&&(this.file=r),s&&(this.source=s),n&&(this.plugin=n),void 0!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Zo)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let e=this.source;null==t&&(t=es.isColorSupported);var i=(e=is&&t?is(e):e).split(/\r?\n/);let s=Math.max(this.line-3,0);var r=Math.min(this.line+2,i.length);let n=String(r).length,o,a;if(t){let{bold:e,gray:i,red:s}=es.createColors(!0);o=t=>e(s(t)),a=t=>i(t)}else o=a=t=>t;return i.slice(s,r).map((t,e)=>{var e=s+1+e,i=" "+(" "+e).slice(-n)+" | ";return e===this.line?(e=a(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," "),o(">")+a(i)+t+"\n "+e+o("^")):" "+a(i)+t}).join("\n")}toString(){let t=this.showSourceCode();return t=t&&"\n\n"+t+"\n",this.name+": "+this.message+t}},d=g,g.default=g,b={};b.isClean=Symbol("isClean"),b.my=Symbol("my");const ss={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};y=class{constructor(t){this.builder=t}atrule(t,e){let i="@"+t.name;var s=t.params?this.rawValue(t,"params"):"";void 0!==t.raws.afterName?i+=t.raws.afterName:s&&(i+=" "),t.nodes?this.block(t,i+s):(e=(t.raws.between||"")+(e?";":""),this.builder(i+s+e,t))}beforeAfter(t,e){let i,s=(i="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose"),t.parent),r=0;for(;s&&"root"!==s.type;)r+=1,s=s.parent;if(i.includes("\n")){var n=this.raw(t,null,"indent");if(n.length)for(let t=0;t<r;t++)i+=n}return i}block(t,e){var i=this.raw(t,"between","beforeOpen");this.builder(e+i+"{",t,"start");let s;(s=t.nodes&&t.nodes.length?(this.body(t),this.raw(t,"after")):this.raw(t,"after","emptyBody"))&&this.builder(s),this.builder("}",t,"end")}body(e){let i=e.nodes.length-1;for(;0<i&&"comment"===e.nodes[i].type;)--i;var s=this.raw(e,"semicolon");for(let t=0;t<e.nodes.length;t++){var r=e.nodes[t],n=this.raw(r,"before");n&&this.builder(n),this.stringify(r,i!==t||s)}}comment(t){var e=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+i+"*/",t)}decl(t,e){var i=this.raw(t,"between","colon");let s=t.prop+i+this.rawValue(t,"value");t.important&&(s+=t.raws.important||" !important"),e&&(s+=";"),this.builder(s,t)}document(t){this.body(t)}raw(t,e,i){let s;if(i=i||e,!e||void 0===(s=t.raws[e])){var r=t.parent;if("before"===i){if(!r||"root"===r.type&&r.first===t)return"";if(r&&"document"===r.type)return""}if(!r)return ss[i];r=t.root();if(r.rawCache||(r.rawCache={}),void 0!==r.rawCache[i])return r.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(t,i);var n="raw"+((n=i)[0].toUpperCase()+n.slice(1));this[n]?s=this[n](r,t):r.walk(t=>{if(void 0!==(s=t.raws[e]))return!1}),void 0===s&&(s=ss[i]),r.rawCache[i]=s}return s}rawBeforeClose(t){let e;return t.walk(t=>{if(t.nodes&&0<t.nodes.length&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e=e&&e.replace(/\S/g,"")}rawBeforeComment(t,e){let i;return t.walkComments(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=void 0===i?this.raw(e,null,"beforeDecl"):i&&i.replace(/\S/g,"")}rawBeforeDecl(t,e){let i;return t.walkDecls(t=>{if(void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=void 0===i?this.raw(e,null,"beforeRule"):i&&i.replace(/\S/g,"")}rawBeforeOpen(t){let e;return t.walk(t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1}),e}rawBeforeRule(e){let i;return e.walk(t=>{if(t.nodes&&(t.parent!==e||e.first!==t)&&void 0!==t.raws.before)return(i=t.raws.before).includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),i=i&&i.replace(/\S/g,"")}rawColon(t){let e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1}),e}rawIndent(i){if(i.raws.indent)return i.raws.indent;let s;return i.walk(t=>{var e=t.parent;if(e&&e!==i&&e.parent&&e.parent===i&&void 0!==t.raws.before)return e=t.raws.before.split("\n"),s=(s=e[e.length-1]).replace(/\S/g,""),!1}),s}rawSemicolon(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1}),e}rawValue(t,e){var i=t[e],t=t.raws[e];return t&&t.value===i?t.raw:i}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}},o=y;y.default=y;let rs=o;function ns(t,e){new rs(e).stringify(t)}s=ns;ns.default=ns;let{isClean:os,my:as}=b,ls=d,hs=o,us=s;function cs(e,i){let s=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){let t=e[r];var n=typeof t;"parent"===r&&"object"==n?i&&(s[r]=i):"source"===r?s[r]=t:Array.isArray(t)?s[r]=t.map(t=>cs(t,s)):("object"==n&&null!==t&&(t=cs(t)),s[r]=t)}return s}r=class{constructor(t={}){for(var e in this.raws={},this[os]=!1,this[as]=!0,t)if("nodes"===e){this.nodes=[];for(var i of t[e])"function"==typeof i.clone?this.append(i.clone()):this.append(i)}else this[e]=t[e]}addToError(t){var e;return t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)&&(e=this.source,t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)),t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(var e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){var e,i=cs(this);for(e in t)i[e]=t[e];return i}cloneAfter(t={}){t=this.clone(t);return this.parent.insertAfter(this,t),t}cloneBefore(t={}){t=this.clone(t);return this.parent.insertBefore(this,t),t}error(t,e={}){var i,s;return this.source?({end:i,start:s}=this.rangeBy(e),this.source.input.error(t,{column:s.column,line:s.line},{column:i.column,line:i.line},e)):new ls(t)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,i){return t[e]!==i&&(t[e]=i,"prop"===e||"value"===e||"name"===e||"params"===e||"important"===e||"text"===e)&&t.markDirty(),!0}}}markDirty(){if(this[os]){this[os]=!1;let t=this;for(;t=t.parent;)t[os]=!1}}next(){var t;if(this.parent)return t=this.parent.index(this),this.parent.nodes[t+1]}positionBy(t,e){let i=this.source.start;return t.index?i=this.positionInside(t.index,e):t.word&&-1!==(t=(e=this.toString()).indexOf(t.word))&&(i=this.positionInside(t,e)),i}positionInside(e,t){var i=t||this.toString();let s=this.source.start.column,r=this.source.start.line;for(let t=0;t<e;t++)"\n"===i[t]?(s=1,r+=1):s+=1;return{column:s,line:r}}prev(){var t;if(this.parent)return t=this.parent.index(this),this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};var s,r;return t.word?-1!==(r=(s=this.toString()).indexOf(t.word))&&(e=this.positionInside(r,s),i=this.positionInside(r+t.word.length,s)):(t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):t.index&&(i=this.positionInside(t.index+1))),{end:i=i.line<e.line||i.line===e.line&&i.column<=e.column?{column:e.column+1,line:e.line}:i,start:e}}raw(t,e){return(new hs).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...i){if(this.parent){let t=this,e=!1;for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){let t=this;for(;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var i,s={},r=null==e;e=e||new Map;let n=0;for(i in this)if(Object.prototype.hasOwnProperty.call(this,i)&&"parent"!==i&&"proxyCache"!==i){var o=this[i];if(Array.isArray(o))s[i]=o.map(t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t);else if("object"==typeof o&&o.toJSON)s[i]=o.toJSON(null,e);else if("source"===i){let t=e.get(o.input);null==t&&(t=n,e.set(o.input,n),n++),s[i]={end:o.end,inputId:t,start:o.start}}else s[i]=o}return r&&(s.inputs=[...e.keys()].map(t=>t.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=us){t.stringify&&(t=t.stringify);let e="";return t(this,t=>{e+=t}),e}warn(t,e,i){var s,r={node:this};for(s in i)r[s]=i[s];return t.warn(e,r)}get proxyOf(){return this}},l=r,r.default=r,t=l,S=class extends t{constructor(t){super(t=t&&void 0!==t.value&&"string"!=typeof t.value?{...t,value:String(t.value)}:t),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}},u=S;S.default=S;Ri={nanoid:(t=21)=>{let e="",i=t;for(;i--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(s,r=21)=>(t=r)=>{let e="",i=t;for(;i--;)e+=s[Math.random()*s.length|0];return e}};let{SourceMapConsumer:ds,SourceMapGenerator:fs}=c,{existsSync:vs,readFileSync:ps}=c,{dirname:ms,join:gs}=c;var h=class{constructor(t,e){!1!==e.map&&(this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:"),t=e.map?e.map.prev:void 0,t=this.loadMap(e.from,t),!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=ms(this.mapFile)),t)&&(this.text=t)}consumer(){return this.consumerCache||(this.consumerCache=new ds(this.text)),this.consumerCache}decodeInline(t){if(/^data:application\/json;charset=utf-?8,/.test(t)||/^data:application\/json,/.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(t)||/^data:application\/json;base64,/.test(t))return e=t.substr(RegExp.lastMatch.length),Buffer?Buffer.from(e,"base64").toString():window.atob(e);var e=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+e)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e,i=t.match(/\/\*\s*# sourceMappingURL=/gm);i&&(i=t.lastIndexOf(i.pop()),e=t.indexOf("*/",i),-1<i)&&-1<e&&(this.annotation=this.getAnnotationURL(t.substring(i,e)))}loadFile(t){if(this.root=ms(t),vs(t))return this.mapFile=t,ps(t,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof ds)return fs.fromSourceMap(t).toString();if(t instanceof fs)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}t=t(e);if(t){var i=this.loadFile(t);if(i)return i;throw new Error("Unable to load previous source map: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=gs(ms(e),t)),this.loadFile(t)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}},w=h,{SourceMapConsumer:f,SourceMapGenerator:n}=(h.default=h,c);let{fileURLToPath:ys,pathToFileURL:bs}=c,{isAbsolute:ws,resolve:Ss}=c,Is=Ri["nanoid"];v=c;let Cs=d,ks=w,Os=Symbol("fromOffsetCache"),_s=Boolean(f&&n),As=Boolean(Ss&&ws);i=class{constructor(t,e={}){if(null==t||"object"==typeof t&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);this.css=t.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,e.from&&(!As||/^\w+:\/\//.test(e.from)||ws(e.from)?this.file=e.from:this.file=Ss(e.from)),As&&_s&&(t=new ks(this.css,e)).text&&(e=(this.map=t).consumer().file,!this.file)&&e&&(this.file=this.mapResolve(e)),this.file||(this.id="<input css "+Is(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,i,s={}){let r,n,o;e&&"object"==typeof e?(a=i,i="number"==typeof(l=e).offset?(e=(h=this.fromOffset(l.offset)).line,h.col):(e=l.line,l.column),o="number"==typeof a.offset?(h=this.fromOffset(a.offset),n=h.line,h.col):(n=a.line,a.column)):i||(e=(l=this.fromOffset(e)).line,i=l.col);var a,l,h=this.origin(e,i,n,o);return(r=h?new Cs(t,void 0===h.endLine?h.line:{column:h.column,line:h.line},void 0===h.endLine?h.column:{column:h.endColumn,line:h.endLine},h.source,h.file,s.plugin):new Cs(t,void 0===n?e:{column:i,line:e},void 0===n?i:{column:o,line:n},this.css,this.file,s.plugin)).input={column:i,endColumn:o,endLine:n,line:e,source:this.css},this.file&&(bs&&(r.input.url=bs(this.file).toString()),r.input.file=this.file),r}fromOffset(e){let s;if(this[Os])s=this[Os];else{var r=this.css.split("\n");s=new Array(r.length);let i=0;for(let t=0,e=r.length;t<e;t++)s[t]=i,i+=r[t].length+1;this[Os]=s}let i=0;if(s[s.length-1]<=e)i=s.length-1;else{let t=s.length-2;for(var n;i<t;)if(n=i+(t-i>>1),e<s[n])t=n-1;else{if(!(e>=s[n+1])){i=n;break}i=n+1}}return{col:e-s[i]+1,line:i+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Ss(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,i,s){if(!this.map)return!1;var r=this.map.consumer(),e=r.originalPositionFor({column:e,line:t});if(!e.source)return!1;let n;"number"==typeof i&&(n=r.originalPositionFor({column:s,line:i}));let o;o=ws(e.source)?bs(e.source):new URL(e.source,this.map.consumer().sourceRoot||bs(this.map.mapFile));t={column:e.column,endColumn:n&&n.column,endLine:n&&n.line,line:e.line,url:o.toString()};if("file:"===o.protocol){if(!ys)throw new Error("file: protocol is not available in this PostCSS build");t.file=ys(o)}s=r.sourceContentFor(e.source);return s&&(t.source=s),t}toJSON(){var t,e={};for(t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache)&&(e.map.consumerCache=void 0),e}get from(){return this.file||this.id}},m=i;i.default=i,v&&v.registerInput&&v.registerInput(i);let{SourceMapConsumer:Ms,SourceMapGenerator:js}=c,{dirname:Rs,relative:xs,resolve:Es,sep:Ts}=c,Ns=c["pathToFileURL"],Ds=m,Fs=Boolean(Ms&&js),Bs=Boolean(Rs&&Es&&xs&&Ts);p=class{constructor(t,e,i,s){this.stringify=t,this.mapOpts=i.map||{},this.root=e,this.opts=i,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t,e=(t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map","\n");this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var i=this.toUrl(this.path(e.file)),s=e.root||Rs(e.file);let t;!1===this.mapOpts.sourcesContent?(t=new Ms(e.text)).sourcesContent&&(t.sourcesContent=null):t=e.consumer(),this.map.applySourceMap(t,i,this.toUrl(this.path(s)))}}clearAnnotation(){var e;if(!1!==this.mapOpts.annotation)if(this.root)for(let t=this.root.nodes.length-1;0<=t;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Bs&&Fs&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){var t;return this.root?this.generateString():1===this.previous().length?((t=this.previous()[0].consumer()).file=this.outputFile(),this.map=js.fromSourceMap(t,{ignoreInvalidMapping:!0})):(this.map=new js({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 js({file:this.outputFile(),ignoreInvalidMapping:!0});let s=1,r=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""},a,l;this.stringify(this.root,(t,e,i)=>{this.css+=t,e&&"end"!==i&&(o.generated.line=s,o.generated.column=r-1,e.source&&e.source.start?(o.source=this.sourcePath(e),o.original.line=e.source.start.line,o.original.column=e.source.start.column-1):(o.source=n,o.original.line=1,o.original.column=0),this.map.addMapping(o)),(a=t.match(/\n/g))?(s+=a.length,l=t.lastIndexOf("\n"),r=t.length-l):r+=t.length,e&&"start"!==i&&(t=e.parent||{raws:{}},"decl"!==e.type&&("atrule"!==e.type||e.nodes)||e!==t.last||t.raws.semicolon)&&(e.source&&e.source.end?(o.source=this.sourcePath(e),o.original.line=e.source.end.line,o.original.column=e.source.end.column-1,o.generated.line=s,o.generated.column=r-2):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=s,o.generated.column=r-1),this.map.addMapping(o))})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){var t;return void 0!==this.mapOpts.inline?this.mapOpts.inline:(void 0===(t=this.mapOpts.annotation)||!0===t)&&(!this.previous().length||this.previous().some(t=>t.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:0<this.previous().length}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;var e=this.memoizedPaths.get(t);if(e)return e;let i=this.opts.to?Rs(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(i=Rs(Es(i,this.mapOpts.annotation)));e=xs(i,t);return this.memoizedPaths.set(t,e),e}previous(){var t;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(t=>{t.source&&t.source.input.map&&(t=t.source.input.map,this.previousMaps.includes(t)||this.previousMaps.push(t))}):(t=new Ds(this.originalCSS,this.opts)).map&&this.previousMaps.push(t.map)),this.previousMaps}setSourcesContent(){let i={};var t;this.root?this.root.walk(t=>{var e;t.source&&(e=t.source.input.from)&&!i[e]&&(i[e]=!0,e=this.usesFileUrls?this.toFileUrl(e):this.toUrl(this.path(e)),this.map.setSourceContent(e,t.source.input.css))}):this.css&&(t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(t,this.css))}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(Ns)return e=Ns(t).toString(),this.memoizedFileURLs.set(t,e),e;throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===Ts&&(t=t.replace(/\\/g,"/"));e=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,e),e}},g=class extends l{constructor(t){super(t),this.type="comment"}},y=g;g.default=g;let{isClean:Ls,my:Us}=b,Ps=u,Gs=y,Ws,zs,Zs,Vs;let Ys=class Vo extends l{append(...t){for(var e of t){var i;for(i of this.normalize(e,this.last))this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.cleanRaws(t)}each(i){if(this.proxyOf.nodes){var s=this.getIterator();let t,e;for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],!1!==(e=i(this.proxyOf.nodes[t],t)));)this.indexes[s]+=1;return delete this.indexes[s],e}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(e,s){return"proxyOf"===s?e:e[s]&&("each"===s||"string"==typeof s&&s.startsWith("walk")?(...t)=>e[s](...t.map(i=>"function"==typeof i?(t,e)=>i(t.toProxy(),e):i)):"every"===s||"some"===s?i=>e[s]((t,...e)=>i(t.toProxy(),...e)):"root"===s?()=>e.root().toProxy():"nodes"===s?e.nodes.map(t=>t.toProxy()):"first"===s||"last"===s?e[s].toProxy():e[s])},set(t,e,i){return t[e]!==i&&(t[e]=i,"name"===e||"params"===e||"selector"===e)&&t.markDirty(),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var i,s,r,n=this.index(t),o=this.normalize(e,this.proxyOf.nodes[n]).reverse(),n=this.index(t);for(i of o)this.proxyOf.nodes.splice(n+1,0,i);for(r in this.indexes)n<(s=this.indexes[r])&&(this.indexes[r]=s+o.length);return this.markDirty(),this}insertBefore(t,e){var i,s,r,n=this.index(t),o=this.normalize(e,this.proxyOf.nodes[n],0===n&&"prepend").reverse(),n=this.index(t);for(i of o)this.proxyOf.nodes.splice(n,0,i);for(r in this.indexes)n<=(s=this.indexes[r])&&(this.indexes[r]=s+o.length);return this.markDirty(),this}normalize(t,e){if("string"==typeof t)t=function e(t){return t.map(t=>(t.nodes&&(t.nodes=e(t.nodes)),delete t.source,t))}(Ws(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t))for(var i of t=t.slice(0))i.parent&&i.parent.removeChild(i,"ignore");else if("root"===t.type&&"document"!==this.type)for(var s of t=t.nodes.slice(0))s.parent&&s.parent.removeChild(s,"ignore");else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Ps(t)]}else if(t.selector)t=[new zs(t)];else if(t.name)t=[new Zs(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Gs(t)]}return t.map(t=>(t[Us]||Vo.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Ls]&&function t(e){if(e[Ls]=!1,e.proxyOf.nodes)for(var i of e.proxyOf.nodes)t(i)}(t),void 0===t.raws.before&&e&&void 0!==e.raws.before&&(t.raws.before=e.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...t){for(var e of t=t.reverse()){var i,s,r=this.normalize(e,this.first,"prepend").reverse();for(i of r)this.proxyOf.nodes.unshift(i);for(s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(t){return(t.parent=this).proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e,i;for(i in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t<=(e=this.indexes[i])&&(this.indexes[i]=e-1);return this.markDirty(),this}replaceValues(e,i,s){return s||(s=i,i={}),this.walkDecls(t=>{i.props&&!i.props.includes(t.prop)||i.fast&&!t.value.includes(i.fast)||(t.value=t.value.replace(e,s))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(s){return this.each((e,t)=>{let i;try{i=s(e,t)}catch(t){throw e.addToError(t)}return i=!1!==i&&e.walk?e.walk(s):i})}walkAtRules(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("atrule"===t.type&&i.test(t.name))return s(t,e)}):this.walk((t,e)=>{if("atrule"===t.type&&t.name===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("atrule"===t.type)return s(t,e)}))}walkComments(i){return this.walk((t,e)=>{if("comment"===t.type)return i(t,e)})}walkDecls(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("decl"===t.type&&i.test(t.prop))return s(t,e)}):this.walk((t,e)=>{if("decl"===t.type&&t.prop===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("decl"===t.type)return s(t,e)}))}walkRules(i,s){return s?i instanceof RegExp?this.walk((t,e)=>{if("rule"===t.type&&i.test(t.selector))return s(t,e)}):this.walk((t,e)=>{if("rule"===t.type&&t.selector===i)return s(t,e)}):(s=i,this.walk((t,e)=>{if("rule"===t.type)return s(t,e)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Ys.registerParse=t=>{Ws=t},Ys.registerRule=t=>{zs=t},Ys.registerAtRule=t=>{Zs=t},Ys.registerRoot=t=>{Vs=t};o=Ys,(Ys.default=Ys).rebuild=t=>{"atrule"===t.type?Object.setPrototypeOf(t,Zs.prototype):"rule"===t.type?Object.setPrototypeOf(t,zs.prototype):"decl"===t.type?Object.setPrototypeOf(t,Ps.prototype):"comment"===t.type?Object.setPrototypeOf(t,Gs.prototype):"root"===t.type&&Object.setPrototypeOf(t,Vs.prototype),t[Us]=!0,t.nodes&&t.nodes.forEach(t=>{Ys.rebuild(t)})},r=o;let Ks,Js;t=class extends r{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new Ks(new Js,this,t).stringify()}},t.registerLazyResult=t=>{Ks=t},t.registerProcessor=t=>{Js=t},S=t;t.default=t;h=class{constructor(t,e={}){for(var i in this.type="warning",this.text=t,e.node&&e.node.source&&(t=e.node.rangeBy(e),this.line=t.start.line,this.column=t.start.column,this.endLine=t.end.line,this.endColumn=t.end.column),e)this[i]=e[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},Ri=h;h.default=h;let Xs=Ri;f=class{constructor(t,e,i){this.processor=t,this.messages=[],this.root=e,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);t=new Xs(t,e);return this.messages.push(t),t}warnings(){return this.messages.filter(t=>"warning"===t.type)}get content(){return this.css}},n=f;f.default=f;const $s="'".charCodeAt(0),Hs='"'.charCodeAt(0),qs="\\".charCodeAt(0),Qs="/".charCodeAt(0),tr="\n".charCodeAt(0),er=" ".charCodeAt(0),ir="\f".charCodeAt(0),sr="\t".charCodeAt(0),rr="\r".charCodeAt(0),nr="[".charCodeAt(0),or="]".charCodeAt(0),ar="(".charCodeAt(0),lr=")".charCodeAt(0),hr="{".charCodeAt(0),ur="}".charCodeAt(0),cr=";".charCodeAt(0),dr="*".charCodeAt(0),fr=":".charCodeAt(0),vr="@".charCodeAt(0),pr=/[\t\n\f\r "#'()/;[\\\]{}]/g,mr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,gr=/.[\r\n"'(/\\]/,yr=/[\da-f]/i;v=class extends o{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}},i=v,o.registerAtRule(v.default=v),c=o;let br,wr;g=class extends c{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,i){t=super.normalize(t);if(e)if("prepend"===i)1<this.nodes.length?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var s of t)s.raws.before=e.raws.before;return t}removeChild(t,e){var i=this.index(t);return!e&&0===i&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(t)}toResult(t={}){return new br(new wr,this,t).stringify()}},g.registerLazyResult=t=>{br=t},g.registerProcessor=t=>{wr=t},r=g;c.registerRoot(g.default=g);let Sr={comma(t){return Sr.split(t,[","],!0)},space(t){return Sr.split(t,[" ","\n","\t"])},split(t,e,i){var s,r=[];let n="",o=!1,a=0,l=!1,h="",u=!1;for(s of t)u?u=!1:"\\"===s?u=!0:l?s===h&&(l=!1):'"'===s||"'"===s?(l=!0,h=s):"("===s?a+=1:")"===s?0<a&&--a:0===a&&e.includes(s)&&(o=!0),o?(""!==n&&r.push(n.trim()),n="",o=!1):n+=s;return!i&&""===n||r.push(n.trim()),r}};t=Sr;Sr.default=Sr;let Ir=t;h=class extends o{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Ir.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,e=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(e)}},f=h;o.registerRule(h.default=h);let Cr=u,kr=function(e,t={}){let s=e.css.valueOf(),r=t.ignoreErrors,n,o,a,l,h,u,c,d,f,v,p=s.length,m=0,g=[],y=[];function b(t){throw e.error("Unclosed "+t,m)}return{back:function(t){y.push(t)},endOfFile:function(){return 0===y.length&&m>=p},nextToken:function(t){if(y.length)return y.pop();if(!(m>=p)){var e=!!t&&t.ignoreUnclosed;switch(n=s.charCodeAt(m)){case tr:case er:case sr:case rr:case ir:for(o=m;o+=1,(n=s.charCodeAt(o))===er||n===tr||n===sr||n===rr||n===ir;);v=["space",s.slice(m,o)],m=o-1;break;case nr:case or:case hr:case ur:case fr:case cr:case lr:var i=String.fromCharCode(n);v=[i,i,m];break;case ar:if(d=g.length?g.pop()[1]:"",f=s.charCodeAt(m+1),"url"===d&&f!==$s&&f!==Hs&&f!==er&&f!==tr&&f!==sr&&f!==ir&&f!==rr){o=m;do{if(u=!1,-1===(o=s.indexOf(")",o+1))){if(r||e){o=m;break}b("bracket")}for(c=o;s.charCodeAt(c-1)===qs;)--c,u=!u}while(u);v=["brackets",s.slice(m,o+1),m,o],m=o}else o=s.indexOf(")",m+1),l=s.slice(m,o+1),-1===o||gr.test(l)?v=["(","(",m]:(v=["brackets",l,m,o],m=o);break;case $s:case Hs:a=n===$s?"'":'"',o=m;do{if(u=!1,-1===(o=s.indexOf(a,o+1))){if(r||e){o=m+1;break}b("string")}for(c=o;s.charCodeAt(c-1)===qs;)--c,u=!u}while(u);v=["string",s.slice(m,o+1),m,o],m=o;break;case vr:pr.lastIndex=m+1,pr.test(s),o=0===pr.lastIndex?s.length-1:pr.lastIndex-2,v=["at-word",s.slice(m,o+1),m,o],m=o;break;case qs:for(o=m,h=!0;s.charCodeAt(o+1)===qs;)o+=1,h=!h;if(n=s.charCodeAt(o+1),h&&n!==Qs&&n!==er&&n!==tr&&n!==sr&&n!==rr&&n!==ir&&(o+=1,yr.test(s.charAt(o)))){for(;yr.test(s.charAt(o+1));)o+=1;s.charCodeAt(o+1)===er&&(o+=1)}v=["word",s.slice(m,o+1),m,o],m=o;break;default:m=(n===Qs&&s.charCodeAt(m+1)===dr?(0===(o=s.indexOf("*/",m+2)+1)&&(r||e?o=s.length:b("comment")),v=["comment",s.slice(m,o+1),m,o]):(mr.lastIndex=m+1,mr.test(s),o=0===mr.lastIndex?s.length-1:mr.lastIndex-2,v=["word",s.slice(m,o+1),m,o],g.push(v)),o)}return m++,v}},position:function(){return m}}},Or=y,_r=i,Ar=r,Mr=f;const jr={empty:!0,space:!0};let Rr=class{constructor(t){this.input=t,this.root=new Ar,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){var e,i=new _r;i.name=t[1].slice(1),""===i.name&&this.unnamedAtrule(i,t),this.init(i,t[2]);let s,r,n=!1,o=!1;for(var a=[],l=[];!this.tokenizer.endOfFile();){if("("===(e=(t=this.tokenizer.nextToken())[0])||"["===e?l.push("("===e?")":"]"):"{"===e&&0<l.length?l.push("}"):e===l[l.length-1]&&l.pop(),0===l.length){if(";"===e){i.source.end=this.getPosition(t[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===e){o=!0;break}if("}"===e){if(0<a.length){for(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(i.source.end=this.getPosition(s[3]||s[2]),i.source.end.offset++)}this.end(t);break}}if(a.push(t),this.tokenizer.endOfFile()){n=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),n&&(t=a[a.length-1],i.source.end=this.getPosition(t[3]||t[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),o&&(i.nodes=[],this.current=i)}checkMissedSemicolon(s){var r=this.colon(s);if(!1!==r){let e=0,i;for(let t=r-1;0<=t&&("space"===(i=s[t])[0]||2!==(e+=1));t--);throw this.input.error("Missed semicolon","word"===i[0]?i[3]+1:i[2])}}colon(t){let e=0,i,s,r;for(var[n,o]of t.entries()){if("("===(s=(i=o)[0])&&(e+=1),")"===s&&--e,0===e&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return n}this.doubleColon(i)}r=i}return!1}comment(t){var e=new Or,t=(this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++,t[1].slice(2,-2));/^\s*$/.test(t)?(e.text="",e.raws.left=t,e.raws.right=""):(t=t.match(/^(\s*)([^]*\S)(\s*)$/),e.text=t[2],e.raws.left=t[1],e.raws.right=t[3])}createTokenizer(){this.tokenizer=kr(this.input)}decl(t,e){var i,s=new Cr,r=(this.init(s,t[0][2]),t[t.length-1]);for(";"===r[0]&&(this.semicolon=!0,t.pop()),s.source.end=this.getPosition(r[3]||r[2]||function(e){for(let t=e.length-1;0<=t;t--){var i=e[t],i=i[3]||i[2];if(i)return i}}(t)),s.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),s.raws.before+=t.shift()[1];for(s.source.start=this.getPosition(t[0][2]),s.prop="";t.length;){var n=t[0][0];if(":"===n||"space"===n||"comment"===n)break;s.prop+=t.shift()[1]}s.raws.between="";let o;for(;t.length;){if(":"===(o=t.shift())[0]){s.raws.between+=o[1];break}"word"===o[0]&&/\w/.test(o[1])&&this.unknownWord([o]),s.raws.between+=o[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let a=[];for(;t.length&&("space"===(i=t[0][0])||"comment"===i);)a.push(t.shift());this.precheckMissedSemicolon(t);for(let i=t.length-1;0<=i;i--){if("!important"===(o=t[i])[1].toLowerCase()){s.important=!0;var l=this.stringFrom(t,i);" !important"!==(l=this.spacesFromEnd(t)+l)&&(s.raws.important=l);break}if("important"===o[1].toLowerCase()){var h=t.slice(0);let e="";for(let t=i;0<t;t--){var u=h[t][0];if(0===e.trim().indexOf("!")&&"space"!==u)break;e=h.pop()[1]+e}0===e.trim().indexOf("!")&&(s.important=!0,s.raws.important=e,t=h)}if("space"!==o[0]&&"comment"!==o[0])break}t.some(t=>"space"!==t[0]&&"comment"!==t[0])&&(s.raws.between+=a.map(t=>t[1]).join(""),a=[]),this.raw(s,"value",a.concat(t),e),s.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new Mr;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){this.spaces+=t[1],this.current.nodes&&(t=this.current.nodes[this.current.nodes.length-1])&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){let e=!1;var i;let s=!1,r=null;var n=[],o=t[1].startsWith("--"),a=[];let l=t;for(;l;){if(i=l[0],a.push(l),"("===i||"["===i)r=r||l,n.push("("===i?")":"]");else if(o&&s&&"{"===i)r=r||l,n.push("}");else if(0===n.length){if(";"===i){if(s)return void this.decl(a,o);break}if("{"===i)return void this.rule(a);if("}"===i){this.tokenizer.back(a.pop()),e=!0;break}":"===i&&(s=!0)}else i===n[n.length-1]&&(n.pop(),0===n.length)&&(r=null);l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),0<n.length&&this.unclosedBracket(r),e&&s){if(!o)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,i,s){var r,n,o,a,l=i.length;let h="",u=!0;for(let t=0;t<l;t+=1)"space"===(o=(r=i[t])[0])&&t===l-1&&!s||"comment"===o&&(o=i[t-1]?i[t-1][0]:"empty",n=i[t+1]?i[t+1][0]:"empty",jr[o]||jr[n]||","===h.slice(-1))?u=!1:h+=r[1];u||(a=i.reduce((t,e)=>t+e[1],""),t.raws[e]={raw:a,value:h}),t[e]=h}rule(t){t.pop();var e=new Mr;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){var e;let i="";for(;t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)i=t.pop()[1]+i;return i}spacesAndCommentsFromStart(t){var e;let i="";for(;t.length&&("space"===(e=t[0][0])||"comment"===e);)i+=t.shift()[1];return i}spacesFromEnd(t){let e="";for(;t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(e,i){let s="";for(let t=i;t<e.length;t++)s+=e[t][1];return e.splice(i,e.length-i),s}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},xr=m;function Er(t,e){t=new xr(t,e),e=new Rr(t);try{e.parse()}catch(t){throw t}return e.root}v=Er;o.registerParse(Er.default=Er);let{isClean:Tr,my:Nr}=b,Dr=p,Fr=s,Br=o;c=S;let Lr=n,Ur=v;g=r;const Pr={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Gr={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},Wr={Once:!0,postcssPlugin:!0,prepare:!0},zr=0;function Zr(t){return"object"==typeof t&&"function"==typeof t.then}function Vr(t){let e=!1;var i=Pr[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[i,i+"-"+e,zr,i+"Exit",i+"Exit-"+e]:e?[i,i+"-"+e,i+"Exit",i+"Exit-"+e]:t.append?[i,zr,i+"Exit"]:[i,i+"Exit"]}function Yr(t){let e;return{eventIndex:0,events:e="document"===t.type?["Document",zr,"DocumentExit"]:"root"===t.type?["Root",zr,"RootExit"]:Vr(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function Kr(t){return t[Tr]=!1,t.nodes&&t.nodes.forEach(t=>Kr(t)),t}let Jr={};h=class Yo{constructor(t,e,i){this.stringified=!1,this.processed=!1;let s;if("object"!=typeof e||null===e||"root"!==e.type&&"document"!==e.type)if(e instanceof Yo||e instanceof Lr)s=Kr(e.root),e.map&&(void 0===i.map&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=e.map);else{let t=Ur;i.syntax&&(t=i.syntax.parse),(t=i.parser?i.parser:t).parse&&(t=t.parse);try{s=t(e,i)}catch(t){this.processed=!0,this.error=t}s&&!s[Nr]&&Br.rebuild(s)}else s=Kr(e);this.result=new Lr(t,s,i),this.helpers={...Jr,postcss:Jr,result:this.result},this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?{...t,...t.prepare(this.result)}:t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var i=this.result.lastPlugin;try{e&&e.addToError(t),"CssSyntaxError"!==(this.error=t).name||t.plugin?i.postcssVersion:(t.plugin=i.postcssPlugin,t.setMessage())}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t,e=(t,e,i)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,i])};for(t of this.plugins)if("object"==typeof t)for(var i in t){if(!Gr[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Wr[i])if("object"==typeof t[i])for(var s in t[i])"*"===s?e(t,i,t[i][s]):e(t,i+"-"+s.toLowerCase(),t[i][s]);else"function"==typeof t[i]&&e(t,i,t[i])}this.hasListener=0<Object.keys(this.listeners).length}async runAsync(){for(let t=this.plugin=0;t<this.plugins.length;t++){var e=this.plugins[t],e=this.runOnRoot(e);if(Zr(e))try{await e}catch(t){throw this.handleError(t)}}if(this.prepareVisitors(),this.hasListener){for(var i,s=this.result.root;!s[Tr];){s[Tr]=!0;for(var r=[Yr(s)];0<r.length;){var n=this.visitTick(r);if(Zr(n))try{await n}catch(t){n=r[r.length-1].node;throw this.handleError(t,n)}}}if(this.listeners.OnceExit)for(let[t,e]of this.listeners.OnceExit){this.result.lastPlugin=t;try{"document"===s.type?(i=s.nodes.map(t=>e(t,this.helpers)),await Promise.all(i)):await e(s,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{var t;return"object"==typeof e&&e.Once?"document"===this.result.root.type?Zr((t=this.result.root.nodes.map(t=>e.Once(t,this.helpers)))[0])?Promise.all(t):t:e.Once(this.result.root,this.helpers):"function"==typeof e?e(this.result.root,this.result):void 0}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(!this.stringified){this.stringified=!0,this.sync();var e=this.result.opts;let t=Fr;e.syntax&&(t=e.syntax.stringify),(t=e.stringifier?e.stringifier:t).stringify&&(t=t.stringify);e=new Dr(t,this.result.root,this.result.opts).generate();this.result.css=e[0],this.result.map=e[1]}return this.result}sync(){if(this.error)throw this.error;if(!this.processed){if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins)if(Zr(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[Tr];)e[Tr]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var i of e.nodes)this.visitSync(this.listeners.OnceExit,i);else this.visitSync(this.listeners.OnceExit,e)}}return this.result}then(t,e){return this.async().then(t,e)}toString(){return this.css}visitSync(t,e){for(var[i,s]of t){this.result.lastPlugin=i;let t;try{t=s(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(Zr(t))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:i,visitors:s}=e;if("root"===i.type||"document"===i.type||i.parent){if(0<s.length&&e.visitorIndex<s.length){var[r,n]=s[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===s.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=r;try{return n(i.toProxy(),this.helpers)}catch(t){throw this.handleError(t,i)}}if(0!==e.iterator){for(var o,a=e.iterator;o=i.nodes[i.indexes[a]];)if(i.indexes[a]+=1,!o[Tr])return o[Tr]=!0,void t.push(Yr(o));e.iterator=0,delete i.indexes[a]}for(var l=e.events;e.eventIndex<l.length;){var h=l[e.eventIndex];if(e.eventIndex+=1,h===zr)return void(i.nodes&&i.nodes.length&&(i[Tr]=!0,e.iterator=i.getIterator()));if(this.listeners[h])return void(e.visitors=this.listeners[h])}}t.pop()}walkSync(t){var e;t[Tr]=!0;for(e of Vr(t))if(e===zr)t.nodes&&t.each(t=>{t[Tr]||this.walkSync(t)});else{var i=this.listeners[e];if(i&&this.visitSync(i,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}},h.registerPostcss=t=>{Jr=t},b=h;g.registerLazyResult(h.default=h),c.registerLazyResult(h);let Xr=p,$r=s;let Hr=v;const qr=n;g=class{constructor(t,e,i){e=e.toString(),this.stringified=!1,this.Ss=t,this.Cs=e,this.Is=i,this.ks=void 0;t=$r;this.result=new qr(this.Ss,void 0,this.Is),this.result.css=e;let s=this;$Q2(this.result,"root",{get(){return s.root}});i=new Xr(t,void 0,this.Is,e);i.isMap()?([t,e]=i.generate(),t&&(this.result.css=t),e&&(this.result.map=e)):(i.clearAnnotation(),this.result.css=i.css)}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return this.async().then(t,e)}toString(){return this.Cs}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this.Os)return this.Os;let t;var e=Hr;try{t=e(this.Cs,this.Is)}catch(t){this.error=t}if(this.error)throw this.error;return this.Os=t}get[Symbol.toStringTag](){return"NoWorkResult"}},c=g;g.default=g;let Qr=c,tn=b;h=S,p=class{constructor(t=[]){this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){let e=[];for(var i of t)if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"==typeof i&&Array.isArray(i.plugins))e=e.concat(i.plugins);else if("object"==typeof i&&i.postcssPlugin)e.push(i);else if("function"==typeof i)e.push(i);else if("object"!=typeof i||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");return e}process(t,e={}){return new(this.plugins.length||e.parser||e.stringifier||e.syntax?tn:Qr)(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}},g=p;r.registerProcessor(p.default=p),h.registerProcessor(p);let en=u,sn=w,rn=y,nn=i,on=m,an=r,ln=f;function hn(t,i){if(Array.isArray(t))return t.map(t=>hn(t));let{inputs:e,...s}=t;if(e){i=[];for(var r of e){r={...r,__proto__:on.prototype};r.map&&(r.map={...r.map,__proto__:sn.prototype}),i.push(r)}}if(s.nodes&&(s.nodes=t.nodes.map(t=>hn(t,i))),s.source){let{inputId:t,...e}=s.source;s.source=e,null!=t&&(s.source.input=i[t])}if("root"===s.type)return new an(s);if("decl"===s.type)return new en(s);if("rule"===s.type)return new ln(s);if("comment"===s.type)return new rn(s);if("atrule"===s.type)return new nn(s);throw new Error("Unknown node type: "+t.type)}c=hn,hn.default=hn,h=d;let un=u;p=b,w=o;let cn=g;d=s,u=c;let dn=S;b=Ri;let fn=y,vn=i;o=n,g=m,s=v,c=t;let pn=f,mn=r;S=l;function k(...t){return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new cn(t)}k.plugin=function(e,i){let s=!1;function r(...t){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");t=i(...t);return t.postcssPlugin=e,t.postcssVersion=(new cn).version,t}let t;return $Q2(r,"postcss",{get(){return t=t||r()}}),r.process=function(t,e,i){return k([r(i)]).process(t,e)},r},k.stringify=d,k.parse=s,k.fromJSON=u,k.list=c,k.comment=t=>new fn(t),k.atRule=t=>new vn(t),k.decl=t=>new un(t),k.rule=t=>new pn(t),k.root=t=>new mn(t),k.document=t=>new dn(t),k.CssSyntaxError=h,k.Declaration=un,k.Container=w,k.Processor=cn,k.Document=dn,k.Comment=fn,k.Warning=b,k.AtRule=vn,k.Result=o,k.Input=g,k.Rule=pn,k.Root=mn,k.Node=S,p.registerPostcss(k);Ri=k,k.default=k,y=qi(Ri);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 gn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},yn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},bn={},wn=()=>!!globalThis.Zone;function Sn(t){if(bn[t])return bn[t];var e=globalThis[t];const i=e.prototype;var s=t in gn?gn[t]:void 0,s=Boolean(s&&s.every(t=>{return Boolean(null==(t=null==(t=Object.getOwnPropertyDescriptor(i,t))?void 0:t.get)?void 0:t.toString().includes("[native code]"))})),r=t in yn?yn[t]:void 0,r=Boolean(r&&r.every(t=>{return"function"==typeof i[t]&&(null==(t=i[t])?void 0:t.toString().includes("[native code]"))}));if(s&&r&&!wn())return bn[t]=e.prototype,e.prototype;try{var n,o=document.createElement("iframe"),a=(document.body.appendChild(o),o.contentWindow);return a?(n=a[t].prototype,document.body.removeChild(o),n?bn[t]=n:i):e.prototype}catch{return i}}const In={};function Cn(t,e,i){var s=t+"."+String(i);return In[s]?In[s].call(e):(t=Sn(t),(t=null==(t=Object.getOwnPropertyDescriptor(t,i))?void 0:t.get)?(In[s]=t).call(e):e[i])}const kn={};function On(t,e,i){var s=t+"."+String(i);return kn[s]?kn[s].bind(e):"function"!=typeof(t=Sn(t)[i])?e[i]:(kn[s]=t).bind(e)}function _n(){return Sn("MutationObserver").constructor}const H={childNodes:function(t){return Cn("Node",t,"childNodes")},parentNode:function(t){return Cn("Node",t,"parentNode")},parentElement:function(t){return Cn("Node",t,"parentElement")},textContent:function(t){return Cn("Node",t,"textContent")},contains:function(t,e){return On("Node",t,"contains")(e)},getRootNode:function(t){return On("Node",t,"getRootNode")()},host:function(t){return t&&"host"in t?Cn("ShadowRoot",t,"host"):null},styleSheets:function(t){return t.styleSheets},shadowRoot:function(t){return t&&"shadowRoot"in t?Cn("Element",t,"shadowRoot"):null},querySelector:function(t,e){return Cn("Element",t,"querySelector")(e)},querySelectorAll:function(t,e){return Cn("Element",t,"querySelectorAll")(e)},mutationObserver:_n};function q(t,e,i=document){const s={capture:!0,passive:!0};return i.addEventListener(t,e,s),()=>i.removeEventListener(t,e,s)}const An="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";i={map:{},getId(){return console.error(An),-1},getNode(){return console.error(An),null},removeNodeFromMap(){console.error(An)},has(){return console.error(An),!1},reset(){console.error(An)}};function Mn(r,n,o={}){let a=null,l=0;return function(...t){var e=Date.now(),i=(l||!1!==o.leading||(l=e),n-(e-l));const s=this;i<=0||n<i?(a&&(clearTimeout(a),a=null),l=e,r.apply(s,t)):a||!1===o.trailing||(a=setTimeout(()=>{l=!1===o.leading?0:Date.now(),a=null,r.apply(s,t)},i))}}function jn(t,e,i,s,r=window){const n=r.Object.getOwnPropertyDescriptor(t,e);return r.$Q2(t,e,s?i:{set(t){setTimeout(()=>{i.set.call(this,t)},0),n&&n.set&&n.set.call(this,t)}}),()=>jn(t,e,n||{},!0)}function Rn(t,e,i){try{if(!(e in t))return()=>{};const r=t[e];var s=i(r);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=s,()=>{t[e]=r}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&new Proxy(i,{get(t,e,i){return"map"===e&&console.error(An),Reflect.get(t,e,i)}});let xn=Date.now;function En(t){var e,i=t.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(e=H.parentElement(i.body))?void 0:e.scrollLeft)||(null==(e=null==i?void 0:i.body)?void 0:e.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(e=H.parentElement(i.body))?void 0:e.scrollTop)||(null==(t=null==i?void 0:i.body)?void 0:t.scrollTop)||0}}function Tn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Nn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Dn(t){return t?t.nodeType===t.ELEMENT_NODE?t:H.parentElement(t):null}function N(t,e,i,s){if(t){t=Dn(t);if(t){try{if("string"==typeof e){if(t.classList.contains(e))return!0;if(s&&null!==t.closest("."+e))return!0}else if(jt(t,e,s))return!0}catch(t){}if(i){if(t.matches(i))return!0;if(s&&null!==t.closest(i))return!0}}}return!1}function Fn(t,e,i){return"TITLE"===t.tagName&&i.headTitleMutations||e.getId(t)===gt}function Bn(t){return Boolean(t.changedTouches)}function Ln(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function Un(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function Pn(t){return t&&(!1&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(H.shadowRoot(t)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(xn=()=>(new Date).getTime());class Gn{constructor(){a(this,"id",1),a(this,"styleIDMap",new WeakMap),a(this,"idStyleMap",new Map)}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,e){if(this.has(t))return this.getId(t);let i;return i=void 0===e?this.id++:e,this.styleIDMap.set(t,i),this.idStyleMap.set(i,t),i}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Wn(t){var e;let i=null;return i="getRootNode"in t&&(null==(e=H.getRootNode(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&H.host(H.getRootNode(t))?H.host(H.getRootNode(t)):i}function zn(t){var e=t.ownerDocument;return!!e&&(t=function(t){let e=t;for(var i;i=Wn(e);)e=i;return e}(t),H.contains(e,t))}function Zn(t){var e=t.ownerDocument;return e&&(H.contains(e,t)||zn(t))}var Q=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))({}),tt=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(tt||{}),O=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(O||{}),Vn=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Vn||{}),Yn=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))({}),Kn=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(Kn||{}),Jn=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))({});function Xn(t){return"__ln"in t}class $n{constructor(){a(this,"length",0),a(this,"head",null),a(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let i=this.head;for(let t=0;t<e;t++)i=(null==i?void 0:i.next)||null;return i}addNode(t){var e,i={value:t,previous:null,next:null};t.__ln=i,t.previousSibling&&Xn(t.previousSibling)?(e=t.previousSibling.__ln.next,i.next=e,i.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=i,e&&(e.previous=i)):t.nextSibling&&Xn(t.nextSibling)&&t.nextSibling.__ln.previous?(e=t.nextSibling.__ln.previous,i.previous=e,i.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=i,e&&(e.next=i)):(this.head&&(this.head.previous=i),i.next=this.head,this.head=i),null===i.next&&(this.tail=i),this.length++}removeNode(t){var e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}class Hn{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,"removesSubTreeCache",new Set),a(this,"mutationCb"),a(this,"blockClass"),a(this,"blockSelector"),a(this,"maskTextClass"),a(this,"maskTextSelector"),a(this,"inlineStylesheet"),a(this,"maskInputOptions"),a(this,"maskTextFn"),a(this,"maskInputFn"),a(this,"keepIframeSrcFn"),a(this,"recordCanvas"),a(this,"inlineImages"),a(this,"slimDOMOptions"),a(this,"dataURLOptions"),a(this,"doc"),a(this,"mirror"),a(this,"iframeManager"),a(this,"stylesheetManager"),a(this,"shadowDomManager"),a(this,"canvasManager"),a(this,"processedNodeManager"),a(this,"unattachedDoc"),a(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),a(this,"emit",()=>{if(!this.frozen&&!this.locked){const l=[],h=new Set,u=new $n,c=t=>{let e=t,i=gt;for(;i===gt;)e=e&&e.nextSibling,i=e&&this.mirror.getId(e);return i};for(var i,s,r=e=>{var i=H.parentNode(e);if(i&&Zn(e)){let t=!1;if(e.nodeType===Node.TEXT_NODE){var s=i.tagName;if("TEXTAREA"===s)return;"STYLE"===s&&this.addedSet.has(i)&&(t=!0)}s=Z(i)?this.mirror.getId(Wn(e)):this.mirror.getId(i),i=c(e);if(-1===s||-1===i)return u.addNode(e);var r=Et(e,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:t=>{Ln(t,this.mirror)&&this.iframeManager.addIframe(t),Un(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),Pn(e)&&this.shadowDomManager.addShadowRoot(H.shadowRoot(e),this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)},cssCaptured:t});r&&(l.push({parentId:s,nextId:i,node:r}),h.add(r.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const d of this.movedSet)Qn(this.removesSubTreeCache,d,this.mirror)&&!this.movedSet.has(H.parentNode(d))||r(d);for(const f of this.addedSet)!to(this.droppedSet,f)&&!Qn(this.removesSubTreeCache,f,this.mirror)||to(this.movedSet,f)?r(f):this.droppedSet.add(f);let t=null;for(;u.length;){let e=null;if(!(e=t&&(i=this.mirror.getId(H.parentNode(t.value)),s=c(t.value),-1!==i)&&-1!==s?t:e)){let t=u.tail;for(;t;){var n=t;if(t=t.previous,n){var o=this.mirror.getId(H.parentNode(n.value)),a=c(n.value);if(-1!==a){if(-1!==o){e=n;break}a=n.value,o=H.parentNode(a);if(o&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE){a=H.host(o);if(-1!==this.mirror.getId(a)){e=n;break}}}}}}if(!e){for(;u.head;)u.removeNode(u.head.value);break}t=e.previous,u.removeNode(e.value),r(e.value)}var e={texts:this.texts.map(t=>{var e=t.node,i=H.parentNode(e);return i&&"TEXTAREA"===i.tagName&&this.genTextAreaValueMutation(i),{id:this.mirror.getId(e),value:t.value}}).filter(t=>!h.has(t.id)).filter(t=>this.mirror.has(t.id)),attributes:this.attributes.map(t=>{var e,i,s=t["attributes"];return"string"==typeof s.style&&(e=JSON.stringify(t.styleDiff),i=JSON.stringify(t.Es),e.length<s.style.length)&&(e+i).split("var(").length===s.style.split("var(").length&&(s.style=t.styleDiff),{id:this.mirror.getId(t.node),attributes:s}}).filter(t=>!h.has(t.id)).filter(t=>this.mirror.has(t.id)),removes:this.removes,adds:l};(e.texts.length||e.attributes.length||e.removes.length||e.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(e))}}),a(this,"genTextAreaValueMutation",t=>{let e=this.attributeMap.get(t);e||(e={node:t,attributes:{},styleDiff:{},Es:{}},this.attributes.push(e),this.attributeMap.set(t,e)),e.attributes.value=Array.from(H.childNodes(t),t=>H.textContent(t)||"").join("")}),a(this,"processMutation",o=>{if(!Fn(o.target,this.mirror,this.slimDOMOptions))switch(o.type){case"characterData":var s=H.textContent(o.target);N(o.target,this.blockClass,this.blockSelector,!1)||s===o.oldValue||this.texts.push({value:Rt(o.target,this.maskTextClass,this.maskTextSelector,!0)&&s?this.maskTextFn?this.maskTextFn(s,Dn(o.target)):s.replace(/[\S]/g,"*"):s,node:o.target});break;case"attributes":{var r=o.target;let t=o.attributeName,e=o.target.getAttribute(t);if("value"===t&&(s=lt(r),e=nt({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:s,value:e,maskInputFn:this.maskInputFn})),N(o.target,this.blockClass,this.blockSelector,!1)||e===o.oldValue)return;let i=this.attributeMap.get(o.target);if("IFRAME"===r.tagName&&"src"===t&&!this.keepIframeSrcFn(e)){if(r.contentDocument)return;t="rr_src"}if(i||(i={node:o.target,attributes:{},styleDiff:{},Es:{}},this.attributes.push(i),this.attributeMap.set(o.target,i)),"type"===t&&"INPUT"===r.tagName&&"password"===(o.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!Mt(r.tagName,t))if(i.attributes[t]=At(this.doc,ot(r.tagName),ot(t),e),"style"===t){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}var n=this.unattachedDoc.createElement("span");o.oldValue&&n.setAttribute("style",o.oldValue);for(const h of Array.from(r.style)){var a=r.style.getPropertyValue(h),l=r.style.getPropertyPriority(h);a!==n.style.getPropertyValue(h)||l!==n.style.getPropertyPriority(h)?i.styleDiff[h]=""===l?a:[a,l]:i.Es[h]=[a,l]}for(const u of Array.from(n.style))""===r.style.getPropertyValue(u)&&(i.styleDiff[u]=!1)}else"open"===t&&"DIALOG"===r.tagName&&(r.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal");break}case"childList":N(o.target,this.blockClass,this.blockSelector,!0)||("TEXTAREA"!==o.target.tagName?(o.addedNodes.forEach(t=>this.genAdds(t,o.target)),o.removedNodes.forEach(t=>{var e=this.mirror.getId(t),i=Z(o.target)?this.mirror.getId(H.host(o.target)):this.mirror.getId(o.target);if(!N(o.target,this.blockClass,this.blockSelector,!1)&&!Fn(t,this.mirror,this.slimDOMOptions)&&-1!==this.mirror.getId(t)){if(this.addedSet.has(t))qn(this.addedSet,t),this.droppedSet.add(t);else if(!(this.addedSet.has(o.target)&&-1===e||function t(e,i){var s;return!Z(e)&&(s=i.getId(e),!i.has(s)||(!(s=H.parentNode(e))||s.nodeType!==e.DOCUMENT_NODE)&&(!s||t(s,i)))}(o.target,this.mirror)))if(this.movedSet.has(t)&&this.movedMap[e+"@"+i])qn(this.movedSet,t);else{this.removes.push({parentId:i,id:e,isShadow:!(!Z(o.target)||!V(o.target))||void 0});{i=t;var s=this.removesSubTreeCache;const n=[i];for(;n.length;){var r=n.pop();s.has(r)||(s.add(r),H.childNodes(r).forEach(t=>n.push(t)))}}}this.mapRemoves.push(t)}})):this.genTextAreaValueMutation(o.target))}}),a(this,"genAdds",(e,i)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Fn(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let t=null;(t=i&&this.mirror.hasNode(i)?this.mirror.getId(i):t)&&-1!==t&&(this.movedMap[this.mirror.getId(e)+"@"+t]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);N(e,this.blockClass,this.blockSelector,!1)||(H.childNodes(e).forEach(t=>this.genAdds(t)),Pn(e)&&H.childNodes(H.shadowRoot(e)).forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function qn(e,t){e.delete(t),H.childNodes(t).forEach(t=>qn(e,t))}function Qn(t,e){if(0!==t.size)return t=t,e=e,(e=H.parentNode(e))&&t.has(e)}function to(t,e){return 0!==t.size&&function t(e,i){const s=H.parentNode(i);if(!s)return!1;if(e.has(s))return!0;return t(e,s)}(t,e)}let eo;const et=e=>{return eo?(...t)=>{try{return e(...t)}catch(t){if(!eo||!0!==eo(t))throw t}}:e},io=[];function so(t){try{if("composedPath"in t){var e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function ro(t,e){var i=new Hn,t=(io.push(i),i.init(t),new(_n())(et(i.processMutations.bind(i))));return t.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),t}function no({mouseInteractionCb:o,doc:s,mirror:a,blockClass:l,blockSelector:h,sampling:t}){if(!1===t.mouseInteraction)return()=>{};const e=!0===t.mouseInteraction||void 0===t.mouseInteraction?{}:t.mouseInteraction,r=[];let u=null;return Object.keys(O).filter(t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==e[t]).forEach(t=>{let e=ot(t);n=t;var n,i=i=>{var s=so(i);if(!N(s,l,h,!0)){let t=null,e=n;if("pointerType"in i){switch(i.pointerType){case"mouse":t=Vn.Mouse;break;case"touch":t=Vn.Touch;break;case"pen":t=Vn.Pen}t===Vn.Touch?O[n]===O.MouseDown?e="TouchStart":O[n]===O.MouseUp&&(e="TouchEnd"):(t,Vn.Pen)}else Bn(i)&&(t=Vn.Touch);null!==t?(u=t,(e.startsWith("Touch")&&t===Vn.Touch||e.startsWith("Mouse")&&t===Vn.Mouse)&&(t=null)):O[n]===O.Click&&(t=u,u=null);var r,i=Bn(i)?i.changedTouches[0]:i;i&&(s=a.getId(s),{clientX:i,clientY:r}=i,et(o)({type:O[e],id:s,x:i,y:r,...null!==t&&{pointerType:t}}))}};if(window.PointerEvent)switch(O[t]){case O.MouseDown:case O.MouseUp:e=e.replace("mouse","pointer");break;case O.TouchStart:case O.TouchEnd:return}r.push(q(e,i,s))}),et(()=>{r.forEach(t=>t())})}function oo({scrollCb:s,doc:r,mirror:n,blockClass:o,blockSelector:a,sampling:t}){return q("scroll",et(Mn(et(t=>{var e,i,t=so(t);t&&!N(t,o,a,!0)&&(e=n.getId(t),t===r&&r.defaultView?(i=En(r.defaultView),s({id:e,x:i.left,y:i.top})):s({id:e,x:t.scrollLeft,y:t.scrollTop}))}),t.scroll||100)),r)}const ao=["INPUT","TEXTAREA","SELECT"],lo=new WeakMap;function ho(t){var e,i;return t=t,e=[],vo("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||vo("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||vo("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||vo("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule?(i=Array.from(t.parentRule.cssRules).indexOf(t),e.unshift(i)):t.parentStyleSheet&&(i=Array.from(t.parentStyleSheet.cssRules).indexOf(t),e.unshift(i)),e}function uo(t,e,i){let s,r;return t?(t.ownerNode?s=e.getId(t.ownerNode):r=i.getId(t),{styleId:r,id:s}):{}}function co({mirror:t,stylesheetManager:i},e){let s=null;s="#document"===e.nodeName?t.getId(e):t.getId(H.host(e));t="#document"===e.nodeName?null==(t=e.defaultView)?void 0:t.Document:null==(t=null==(t=e.ownerDocument)?void 0:t.defaultView)?void 0:t.ShadowRoot;const r=null!=t&&t.prototype?Object.getOwnPropertyDescriptor(null==t?void 0:t.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&t&&r?($Q2(e,"adoptedStyleSheets",{configurable:r.configurable,enumerable:r.enumerable,get(){var t;return null==(t=r.get)?void 0:t.call(this)},set(t){var e=null==(e=r.set)?void 0:e.call(this,t);if(null!==s&&-1!==s)try{i.adoptStyleSheets(t,s)}catch(t){}return e}}),et(()=>{$Q2(e,"adoptedStyleSheets",{configurable:r.configurable,enumerable:r.enumerable,get:r.get,set:r.set})})):()=>{}}function fo(t,e={}){var r,i=t.doc.defaultView;if(!i)return()=>{};{var s=t,n=e;const{mutationCb:w,mousemoveCb:S,mouseInteractionCb:I,scrollCb:C,viewportResizeCb:k,inputCb:O,mediaInteractionCb:_,styleSheetRuleCb:A,styleDeclarationCb:M,canvasMutationCb:j,fontCb:R,selectionCb:x,customElementCb:E}=s;s.mutationCb=(...t)=>{n.mutation&&n.mutation(...t),w(...t)},s.mousemoveCb=(...t)=>{n.mousemove&&n.mousemove(...t),S(...t)},s.mouseInteractionCb=(...t)=>{n.mouseInteraction&&n.mouseInteraction(...t),I(...t)},s.scrollCb=(...t)=>{n.scroll&&n.scroll(...t),C(...t)},s.viewportResizeCb=(...t)=>{n.viewportResize&&n.viewportResize(...t),k(...t)},s.inputCb=(...t)=>{n.input&&n.input(...t),O(...t)},s.mediaInteractionCb=(...t)=>{n.mediaInteaction&&n.mediaInteaction(...t),_(...t)},s.styleSheetRuleCb=(...t)=>{n.styleSheetRule&&n.styleSheetRule(...t),A(...t)},s.styleDeclarationCb=(...t)=>{n.styleDeclaration&&n.styleDeclaration(...t),M(...t)},s.canvasMutationCb=(...t)=>{n.canvasMutation&&n.canvasMutation(...t),j(...t)},s.fontCb=(...t)=>{n.font&&n.font(...t),R(...t)},s.selectionCb=(...t)=>{n.selection&&n.selection(...t),x(...t)},s.customElementCb=(...t)=>{n.customElement&&n.customElement(...t),E(...t)}}let o;t.recordDOM&&(o=ro(t,t.doc));const a=function({mousemoveCb:i,sampling:t,doc:e,mirror:r}){if(!1===t.mousemove)return()=>{};var s="number"==typeof t.mousemove?t.mousemove:50,t="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let n=[],o;const a=Mn(et(t=>{const e=Date.now()-o;i(n.map(t=>(t.timeOffset-=e,t)),t),n=[],o=null}),t),l=[q("mousemove",t=et(Mn(et(t=>{var e=so(t),{clientX:i,clientY:s}=Bn(t)?t.changedTouches[0]:t;o=o||xn(),n.push({x:i,y:s,id:r.getId(e),timeOffset:xn()-o}),a("undefined"!=typeof DragEvent&&t instanceof DragEvent?tt.Drag:t instanceof MouseEvent?tt.MouseMove:tt.TouchMove)}),s,{trailing:!1})),e),q("touchmove",t,e),q("drag",t,e)];return et(()=>{l.forEach(t=>t())})}(t),l=no(t),h=oo(t),u=function({viewportResizeCb:i},{win:t}){let s=-1,r=-1;return q("resize",et(Mn(et(()=>{var t=Tn(),e=Nn();s===t&&r===e||(i({width:Number(e),height:Number(t)}),s=t,r=e)}),200)),t)}(t,{win:i}),c=function({inputCb:s,doc:o,mirror:r,blockClass:t,blockSelector:i,ignoreClass:a,ignoreSelector:l,maskInputOptions:h,maskInputFn:u,sampling:e,userTriggeredOnInput:c}){function n(e){let s=so(e);var e=e.isTrusted,r=s&&s.tagName;if((s=s&&"OPTION"===r?H.parentElement(s):s)&&r&&!(ao.indexOf(r)<0)&&!N(s,t,i,!0)&&!(s.classList.contains(a)||l&&s.matches(l))){let t=s.value,i=!1;var n=lt(s)||"",r=("radio"===n||"checkbox"===n?i=s.checked:(h[r.toLowerCase()]||h[n])&&(t=nt({element:s,maskInputOptions:h,tagName:r,type:n,value:t,maskInputFn:u})),d(s,c?{text:t,isChecked:i,userTriggered:e}:{text:t,isChecked:i}),s.name);"radio"===n&&r&&i&&o.querySelectorAll(`input[type="radio"][name="${r}"]`).forEach(t=>{var e;t!==s&&(e=t.value,d(t,c?{text:e,isChecked:!i,userTriggered:!1}:{text:e,isChecked:!i}))})}}function d(t,e){var i=lo.get(t);i&&i.text===e.text&&i.isChecked===e.isChecked||(lo.set(t,e),i=r.getId(t),et(s)({...e,id:i}))}var f;const v=("last"===e.input?["change"]:["input","change"]).map(t=>q(t,et(n),o)),p=o.defaultView;return p?(e=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),f=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]],e&&e.set&&v.push(...f.map(t=>jn(t[0],t[1],{set(){et(n)({target:this,isTrusted:!1})}},!1,p))),et(()=>{v.forEach(t=>t())})):()=>{v.forEach(t=>t())}}(t),d=function({mediaInteractionCb:a,blockClass:l,blockSelector:h,mirror:u,sampling:t,doc:e}){var i=et(o=>Mn(et(t=>{var e,i,s,r,n,t=so(t);t&&!N(t,l,h,!0)&&({currentTime:e,volume:i,muted:s,playbackRate:r,loop:n}=t,a({type:o,id:u.getId(t),currentTime:e,volume:i,muted:s,playbackRate:r,loop:n}))}),t.media||500));const s=[q("play",i(Kn.Play),e),q("pause",i(Kn.Pause),e),q("seeked",i(Kn.Seeked),e),q("volumechange",i(Kn.VolumeChange),e),q("ratechange",i(Kn.RateChange),e)];return et(()=>{s.forEach(t=>t())})}(t);let f=()=>{},v=()=>{},p=()=>{},m=()=>{};t.recordDOM&&(f=function({styleSheetRuleCb:a,mirror:l,stylesheetManager:h},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const t=s.CSSStyleSheet.prototype.insertRule,e=(s.CSSStyleSheet.prototype.insertRule=new Proxy(t,{apply:et((t,e,i)=>{var[s,r]=i,{id:n,styleId:o}=uo(e,l,h.styleMirror);return(n&&-1!==n||o&&-1!==o)&&a({id:n,styleId:o,adds:[{rule:s,index:r}]}),t.apply(e,i)})}),s.CSSStyleSheet.prototype.addRule=function(t,e,i=this.cssRules.length){return s.CSSStyleSheet.prototype.insertRule.apply(this,[t+` { ${e} }`,i])},s.CSSStyleSheet.prototype.deleteRule);s.CSSStyleSheet.prototype.deleteRule=new Proxy(e,{apply:et((t,e,i)=>{var[s]=i,{id:r,styleId:n}=uo(e,l,h.styleMirror);return(r&&-1!==r||n&&-1!==n)&&a({id:r,styleId:n,removes:[{index:s}]}),t.apply(e,i)})}),s.CSSStyleSheet.prototype.removeRule=function(t){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[t])};let i;s.CSSStyleSheet.prototype.replace&&(i=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:et((t,e,i)=>{var[s]=i,{id:r,styleId:n}=uo(e,l,h.styleMirror);return(r&&-1!==r||n&&-1!==n)&&a({id:r,styleId:n,replace:s}),t.apply(e,i)})}));let r;s.CSSStyleSheet.prototype.replaceSync&&(r=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(r,{apply:et((t,e,i)=>{var[s]=i,{id:r,styleId:n}=uo(e,l,h.styleMirror);return(r&&-1!==r||n&&-1!==n)&&a({id:r,styleId:n,replaceSync:s}),t.apply(e,i)})}));const n={},o=(po("CSSGroupingRule")?n.CSSGroupingRule=s.CSSGroupingRule:(po("CSSMediaRule")&&(n.CSSMediaRule=s.CSSMediaRule),po("CSSConditionRule")&&(n.CSSConditionRule=s.CSSConditionRule),po("CSSSupportsRule")&&(n.CSSSupportsRule=s.CSSSupportsRule)),{});return Object.entries(n).forEach(([t,e])=>{o[t]={insertRule:e.prototype.insertRule,deleteRule:e.prototype.deleteRule},e.prototype.insertRule=new Proxy(o[t].insertRule,{apply:et((t,e,i)=>{var[s,r]=i,{id:n,styleId:o}=uo(e.parentStyleSheet,l,h.styleMirror);return(n&&-1!==n||o&&-1!==o)&&a({id:n,styleId:o,adds:[{rule:s,index:[...ho(e),r||0]}]}),t.apply(e,i)})}),e.prototype.deleteRule=new Proxy(o[t].deleteRule,{apply:et((t,e,i)=>{var[s]=i,{id:r,styleId:n}=uo(e.parentStyleSheet,l,h.styleMirror);return(r&&-1!==r||n&&-1!==n)&&a({id:r,styleId:n,removes:[{index:[...ho(e),s]}]}),t.apply(e,i)})})}),et(()=>{s.CSSStyleSheet.prototype.insertRule=t,s.CSSStyleSheet.prototype.deleteRule=e,i&&(s.CSSStyleSheet.prototype.replace=i),r&&(s.CSSStyleSheet.prototype.replaceSync=r),Object.entries(n).forEach(([t,e])=>{e.prototype.insertRule=o[t].insertRule,e.prototype.deleteRule=o[t].deleteRule})})}(t,{win:i}),v=co(t,t.doc),p=function({styleDeclarationCb:l,mirror:h,ignoreCSSAttributes:u,stylesheetManager:c},{win:t}){const d=t.CSSStyleDeclaration.prototype.setProperty,o=(t.CSSStyleDeclaration.prototype.setProperty=new Proxy(d,{apply:et((t,e,i)=>{var s,r,[n,o,a]=i;return u.has(n)?d.apply(e,[n,o,a]):({id:s,styleId:r}=uo(null==(s=e.parentRule)?void 0:s.parentStyleSheet,h,c.styleMirror),(s&&-1!==s||r&&-1!==r)&&l({id:s,styleId:r,set:{property:n,value:o,priority:a},index:ho(e.parentRule)}),t.apply(e,i))})}),t.CSSStyleDeclaration.prototype.removeProperty);return t.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:et((t,e,i)=>{var s,r,[n]=i;return u.has(n)?o.apply(e,[n]):({id:s,styleId:r}=uo(null==(s=e.parentRule)?void 0:s.parentStyleSheet,h,c.styleMirror),(s&&-1!==s||r&&-1!==r)&&l({id:s,styleId:r,remove:{property:n},index:ho(e.parentRule)}),t.apply(e,i))})}),et(()=>{t.CSSStyleDeclaration.prototype.setProperty=d,t.CSSStyleDeclaration.prototype.removeProperty=o})}(t,{win:i}),t.collectFonts)&&(m=function({fontCb:i,doc:t}){const e=t.defaultView;if(!e)return()=>{};const s=[],r=new WeakMap,n=e.FontFace;return e.FontFace=function(t,e,i){var s=new n(t,e,i);return r.set(s,{family:t,buffer:"string"!=typeof e,descriptors:i,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),s},t=Rn(t.fonts,"add",function(t){return function(e){return setTimeout(et(()=>{var t=r.get(e);t&&(i(t),r.delete(e))}),0),t.apply(this,[e])}}),s.push(()=>{e.FontFace=n}),s.push(t),et(()=>{s.forEach(t=>t())})}(t));const g=function(t){const{doc:l,mirror:h,blockClass:u,blockSelector:c,selectionCb:d}=t;let f=!0;return(t=et(()=>{var e=l.getSelection();if(!(!e||f&&null!=e&&e.isCollapsed)){f=e.isCollapsed||!1;var i=[],s=e.rangeCount||0;for(let t=0;t<s;t++){var{startContainer:r,startOffset:n,endContainer:o,endOffset:a}=e.getRangeAt(t);N(r,u,c,!0)||N(o,u,c,!0)||i.push({start:h.getId(r),startOffset:n,end:h.getId(o),endOffset:a})}d({ranges:i})}}))(),q("selectionchange",t)}(t),y=({doc:e,customElementCb:r}=[t][0],(e=e.defaultView)&&e.customElements?Rn(e.customElements,"define",function(s){return function(e,t,i){try{r({define:{name:e}})}catch(t){console.warn("Custom element callback failed for "+e)}return s.apply(this,[e,t,i])}}):()=>{}),b=[];for(const T of t.plugins)b.push(T.observer(T.callback,i,T.options));return et(()=>{io.forEach(t=>t.reset()),null!=o&&o.disconnect(),a(),l(),h(),u(),c(),d(),f(),v(),p(),m(),g(),y(),b.forEach(t=>t())})}function vo(t){return void 0!==window[t]}function po(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class mo{constructor(t){a(this,"iframeIdToRemoteIdMap",new WeakMap),a(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,i,s){i=i||this.getIdToRemoteIdMap(t),s=s||this.getRemoteIdToIdMap(t);let r=i.get(e);return r||(r=this.generateIdFn(),i.set(e,r),s.set(r,e)),r}getIds(e,t){const i=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,i,s))}getRemoteId(t,e,i){i=i||this.getRemoteIdToIdMap(t);return"number"!=typeof e?e:i.get(e)||-1}getRemoteIds(e,t){const i=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,i))}reset(t){t?(this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)):(this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap)}getIdToRemoteIdMap(t){let e=this.iframeIdToRemoteIdMap.get(t);return e||(e=new Map,this.iframeIdToRemoteIdMap.set(t,e)),e}getRemoteIdToIdMap(t){let e=this.iframeRemoteIdToIdMap.get(t);return e||(e=new Map,this.iframeRemoteIdToIdMap.set(t,e)),e}}class go{constructor(t){a(this,"iframes",new WeakMap),a(this,"crossOriginIframeMap",new WeakMap),a(this,"crossOriginIframeMirror",new mo(yt)),a(this,"crossOriginIframeStyleMirror"),a(this,"crossOriginIframeRootIdMap",new WeakMap),a(this,"mirror"),a(this,"mutationCb"),a(this,"wrappedEmit"),a(this,"loadListener"),a(this,"stylesheetManager"),a(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new mo(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,e){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&null!=(e=t.contentWindow)&&e.addEventListener("message",this.handleMessage.bind(this)),null!=(e=this.loadListener)&&e.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&0<t.contentDocument.adoptedStyleSheets.length&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){var e=t;"rrweb"===e.data.type&&e.origin===e.data.origin&&t.source&&(t=(t=this.crossOriginIframeMap.get(t.source))&&this.transformCrossOriginEvent(t,e.data.event))&&this.wrappedEmit(t,e.data.isCheckout)}transformCrossOriginEvent(i,t){var e;switch(t.type){case Q.FullSnapshot:this.crossOriginIframeMirror.reset(i),this.crossOriginIframeStyleMirror.reset(i),this.replaceIdOnNode(t.data.node,i);var s=t.data.node.id;return this.crossOriginIframeRootIdMap.set(i,s),this.patchRootIdOnNode(t.data.node,s),{timestamp:t.timestamp,type:Q.IncrementalSnapshot,data:{source:tt.Mutation,adds:[{parentId:this.mirror.getId(i),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Q.Meta:case Q.Load:case Q.DomContentLoaded:return!1;case Q.Plugin:return t;case Q.Custom:return this.replaceIds(t.data.payload,i,["id","parentId","previousId","nextId"]),t;case Q.IncrementalSnapshot:switch(t.data.source){case tt.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,i,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,i);var e=this.crossOriginIframeRootIdMap.get(i);e&&this.patchRootIdOnNode(t.node,e)}),t.data.removes.forEach(t=>{this.replaceIds(t,i,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,i,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,i,["id"])}),t;case tt.Drag:case tt.TouchMove:case tt.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,i,["id"])}),t;case tt.ViewportResize:return!1;case tt.MediaInteraction:case tt.MouseInteraction:case tt.Scroll:case tt.CanvasMutation:case tt.Input:return this.replaceIds(t.data,i,["id"]),t;case tt.StyleSheetRule:case tt.StyleDeclaration:return this.replaceIds(t.data,i,["id"]),this.replaceStyleIds(t.data,i,["styleId"]),t;case tt.Font:return t;case tt.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,i,["start","end"])}),t;case tt.AdoptedStyleSheet:return this.replaceIds(t.data,i,["id"]),this.replaceStyleIds(t.data,i,["styleIds"]),null!=(e=t.data.styles)&&e.forEach(t=>{this.replaceStyleIds(t,i,["styleId"])}),t}}return!1}replace(t,e,i,s){for(const r of s)!Array.isArray(e[r])&&"number"!=typeof e[r]||(Array.isArray(e[r])?e[r]=t.getIds(i,e[r]):e[r]=t.getId(i,e[r]));return e}replaceIds(t,e,i){return this.replace(this.crossOriginIframeMirror,t,e,i)}replaceStyleIds(t,e,i){return this.replace(this.crossOriginIframeStyleMirror,t,e,i)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(t=>{this.replaceIdOnNode(t,e)})}patchRootIdOnNode(t,e){t.type===Jn.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach(t=>{this.patchRootIdOnNode(t,e)})}}class yo{constructor(t){a(this,"shadowDoms",new WeakSet),a(this,"mutationCb"),a(this,"scrollCb"),a(this,"bypassOptions"),a(this,"mirror"),a(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,e){if(V(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);const i=ro({...this.bypassOptions,doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>i.disconnect()),this.restoreHandlers.push(oo({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&0<t.adoptedStyleSheets.length&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(H.host(t))),this.restoreHandlers.push(co({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,s){const r=this;this.restoreHandlers.push(Rn(t.prototype,"attachShadow",function(i){return function(t){var t=i.call(this,t),e=H.shadowRoot(this);return e&&Zn(this)&&r.addShadowRoot(e,s),t}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var bo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wo="undefined"==typeof Uint8Array?[]:new Uint8Array(256),So=0;So<bo.length;So++)wo[bo.charCodeAt(So)]=So;function Io(t){for(var e=new Uint8Array(t),i=e.length,s="",r=0;r<i;r+=3)s=(s=(s=(s+=bo[e[r]>>2])+bo[(3&e[r])<<4|e[r+1]>>4])+bo[(15&e[r+1])<<2|e[r+2]>>6])+bo[63&e[r+2]];return i%3==2?s=s.substring(0,s.length-1)+"=":i%3==1&&(s=s.substring(0,s.length-2)+"=="),s}const Co=new Map;const ko=(e,i,s)=>{if(e&&(_o(e,i)||"object"==typeof e)){i=function(t,e){let i=Co.get(t);return i||(i=new Map,Co.set(t,i)),i.has(e)||i.set(e,[]),i.get(e)}(s,e.constructor.name);let t=i.indexOf(e);return-1===t&&(t=i.length,i.push(e)),t}};const Oo=(t,e,i)=>t.map(t=>function e(t,i,s){var r;return t instanceof Array?t.map(t=>e(t,i,s)):null===t?t:t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray?{rr_type:t.constructor.name,args:[Object.values(t)]}:t instanceof ArrayBuffer?{rr_type:t.constructor.name,base64:Io(t)}:t instanceof DataView?{rr_type:t.constructor.name,args:[e(t.buffer,i,s),t.byteOffset,t.byteLength]}:t instanceof HTMLImageElement?(r=t.src,{rr_type:t.constructor.name,src:r}):t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL()}:t instanceof ImageData?{rr_type:t.constructor.name,args:[e(t.data,i,s),t.width,t.height]}:_o(t,i)||"object"==typeof t?{rr_type:t.constructor.name,index:ko(t,i,s)}:t}(t,e,i)),_o=(e,i)=>{var t=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(t=>"function"==typeof i[t]);return Boolean(t.find(t=>e instanceof i[t]))};function Ao(t,r,n,o){const e=[];try{var i=Rn(t.HTMLCanvasElement.prototype,"getContext",function(s){return function(t,...e){var i;return N(this,r,n,!0)||(i="experimental-webgl"===(i=t)?"webgl":i,"__context"in this||(this.__context=i),o&&["webgl","webgl2"].includes(i)&&(e[0]&&"object"==typeof e[0]?(i=e[0]).preserveDrawingBuffer||(i.preserveDrawingBuffer=!0):e.splice(0,1,{preserveDrawingBuffer:!0}))),s.apply(this,[t,...e])}});e.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{e.forEach(t=>t())}}function Mo(t,s,r,n,o,a){var e,i=[];for(const h of Object.getOwnPropertyNames(t))if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))try{"function"==typeof t[h]&&(e=Rn(t,h,function(i){return function(...t){var e=i.apply(this,t);return ko(e,a,this),"tagName"in this.canvas&&!N(this.canvas,n,o,!0)&&(t=Oo(t,a,this),t={type:s,property:h,args:t},r(this.canvas,t)),e}}),i.push(e))}catch{var l=jn(t,h,{set(t){r(this.canvas,{type:s,property:h,args:[t],setter:!0})}});i.push(l)}return i}const jo="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=";var Ro;const xo="undefined"!=typeof window&&window.Blob&&new Blob([(n=jo,Uint8Array.from(atob(n),t=>t.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});function Eo(e){let t;try{var i;if(t=xo&&(window.URL||window.webkitURL).createObjectURL(xo))return(i=new Worker(t,{name:null==e?void 0:e.name})).addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),i;throw""}catch(t){return new Worker("data:text/javascript;base64,"+jo,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class To{constructor(t){a(this,"pendingCanvasMutations",new Map),a(this,"rafStamps",{latestId:0,invokeId:null}),a(this,"mirror"),a(this,"mutationCb"),a(this,"resetObservers"),a(this,"frozen",!1),a(this,"locked",!1),a(this,"processMutation",(t,e)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)});var{sampling:e="all",win:i,blockClass:s,blockSelector:r,recordCanvas:n,dataURLOptions:o}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,n&&"all"===e&&this.initCanvasMutationObserver(i,s,r),n&&"number"==typeof e&&this.initCanvasFPSObserver(e,i,s,r,{dataURLOptions:o})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,i,s,r,n){const e=Ao(i,s,r,!0),o=new Map,a=new Eo,l=(a.onmessage=t=>{var e,i,s,r=t.data["id"];o.set(r,!1),"base64"in t.data&&({base64:t,type:e,width:i,height:s}=t.data,this.mutationCb({id:r,type:Yn["2D"],commands:[{property:"clearRect",args:[0,0,i,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:t}],type:e}]},0,0]}]}))},1e3/t);let h=0,u;const c=()=>{const e=[];return i.document.querySelectorAll("canvas").forEach(t=>{N(t,s,r,!0)||e.push(t)}),e},d=t=>{u=(h&&t-h<l||(h=t,c().forEach(async t=>{var e,i,s=this.mirror.getId(t);o.get(s)||0!==t.width&&0!==t.height&&(o.set(s,!0),["webgl","webgl2"].includes(t.__context)&&!1===(null==(i=null==(e=t.getContext(t.__context))?void 0:e.getContextAttributes())?void 0:i.preserveDrawingBuffer)&&e.clear(e.COLOR_BUFFER_BIT),i=await createImageBitmap(t),a.postMessage({id:s,bitmap:i,width:t.width,height:t.height,dataURLOptions:n.dataURLOptions},[i]))})),requestAnimationFrame(d))};u=requestAnimationFrame(d),this.resetObservers=()=>{e(),cancelAnimationFrame(u)}}initCanvasMutationObserver(t,e,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=Ao(t,e,i,!1),r=function(i,s,r,n){const t=[];var e;for(const a of Object.getOwnPropertyNames(s.CanvasRenderingContext2D.prototype))try{"function"==typeof s.CanvasRenderingContext2D.prototype[a]&&(e=Rn(s.CanvasRenderingContext2D.prototype,a,function(t){return function(...e){return N(this.canvas,r,n,!0)||setTimeout(()=>{var t=Oo(e,s,this);i(this.canvas,{type:Yn["2D"],property:a,args:t})},0),t.apply(this,e)}}),t.push(e))}catch{var o=jn(s.CanvasRenderingContext2D.prototype,a,{set(t){i(this.canvas,{type:Yn["2D"],property:a,args:[t],setter:!0})}});t.push(o)}return()=>{t.forEach(t=>t())}}(this.processMutation.bind(this),t,e,i),n=function(t,e,i,s){const r=[];return r.push(...Mo(e.WebGLRenderingContext.prototype,Yn.WebGL,t,i,s,e)),void 0!==e.WebGL2RenderingContext&&r.push(...Mo(e.WebGL2RenderingContext.prototype,Yn.WebGL2,t,i,s,e)),()=>{r.forEach(t=>t())}}(this.processMutation.bind(this),t,e,i);this.resetObservers=()=>{s(),r(),n()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,e)=>{var i=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,i)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,e){var i,s;this.frozen||this.locked||(s=this.pendingCanvasMutations.get(t))&&-1!==e&&(i=s.map(t=>{const{type:e,...i}=t;return i}),s=s[0]["type"],this.mutationCb({id:e,type:s,commands:i}),this.pendingCanvasMutations.delete(t))}}class No{constructor(t){a(this,"trackedLinkElements",new WeakSet),a(this,"mutationCb"),a(this,"adoptedStyleSheetCb"),a(this,"styleMirror",new Gn),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"ws"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){if(0!==t.length){var i={id:e,styleIds:[]},s=[];for(const r of t){let t;this.styleMirror.has(r)?t=this.styleMirror.getId(r):(t=this.styleMirror.add(r),s.push({styleId:t,rules:Array.from(r.rules||CSSRule,(t,e)=>({rule:Y(t,r.href),index:e}))})),i.styleIds.push(t)}0<s.length&&(i.styles=s),this.adoptedStyleSheetCb(i)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Do{constructor(){a(this,"nodeMap",new WeakMap),a(this,"active",!1)}inOtherBuffer(t,e){t=this.nodeMap.get(t);return t&&Array.from(t).some(t=>t!==e)}add(t,e){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}destroy(){}}let it,Fo,Bo,Lo=!1;try{2!==Array.from([1],t=>2*t)[0]&&(Ro=document.createElement("iframe"),document.body.appendChild(Ro),Array.from=(null==(M=Ro.contentWindow)?void 0:M.Array.from)||Array.from,document.body.removeChild(Ro))}catch(t){console.debug("Unable to override Array.from",t)}const Uo=new rt;function Po(t={}){const{emit:s,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:i="rr-block",blockSelector:o=null,ignoreClass:F="rr-ignore",ignoreSelector:B=null,maskTextClass:a="rr-mask",maskTextSelector:l=null,inlineStylesheet:h=!0,maskAllInputs:L,maskInputOptions:e,slimDOMOptions:u,maskInputFn:c,maskTextFn:d,hooks:U,packFn:f,sampling:v={},dataURLOptions:p={},mousemoveWait:m,recordDOM:g=!0,recordCanvas:y=!1,recordCrossOriginIframes:P=!1,recordAfter:G="DOMContentLoaded"===t.recordAfter?t.recordAfter:"load",userTriggeredOnInput:W=!1,collectFonts:z=!1,inlineImages:b=!1,plugins:w,keepIframeSrcFn:S=()=>!1,ignoreCSSAttributes:Z=new Set([]),errorHandler:V}=t;t=V,eo=t;const I=!P||window.parent===window;let C=!1;if(!I)try{window.parent.document&&(C=!1)}catch(t){C=!0}if(I&&!s)throw new Error("emit function is required");if(!I&&!C)return()=>{};void 0!==m&&void 0===v.mousemove&&(v.mousemove=m),Uo.reset();const k=!0===L?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==e?e:{password:!0},O=!0===u||"all"===u?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===u,headMetaDescKeywords:"all"===u,headTitleMutations:"all"===u}:u||{};"NodeList"in(t=window)&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach);let Y,_=0;const K=t=>{for(const e of w||[])e.eventProcessor&&(t=e.eventProcessor(t));return t=f&&!C?f(t):t},A=(it=(t,e)=>{var i;t.timestamp=xn(),null==(i=io[0])||!i.isFrozen()||t.type===Q.FullSnapshot||t.type===Q.IncrementalSnapshot&&t.data.source===tt.Mutation||io.forEach(t=>t.unfreeze()),I?null!=s&&s(K(t),e):C&&(i={type:"rrweb",event:K(t),origin:window.location.origin,isCheckout:e},window.parent.postMessage(i,"*")),t.type===Q.FullSnapshot?(Y=t,_=0):t.type!==Q.IncrementalSnapshot||t.data.source===tt.Mutation&&t.data.isAttachIframe||(_++,e=n&&_>=n,i=r&&t.timestamp-Y.timestamp>r,(e||i)&&Fo(!0))},t=>{it({type:Q.IncrementalSnapshot,data:{source:tt.Mutation,...t}})}),J=t=>it({type:Q.IncrementalSnapshot,data:{source:tt.Scroll,...t}}),X=t=>it({type:Q.IncrementalSnapshot,data:{source:tt.CanvasMutation,...t}});const M=new No({mutationCb:A,adoptedStyleSheetCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.AdoptedStyleSheet,...t}})}),j=new go({mirror:Uo,mutationCb:A,stylesheetManager:M,recordCrossOriginIframes:P,wrappedEmit:it});for(const E of w||[])E.getMirror&&E.getMirror({nodeMirror:Uo,crossOriginIframeMirror:j.crossOriginIframeMirror,crossOriginIframeStyleMirror:j.crossOriginIframeStyleMirror});const R=new Do,x=(Bo=new To({recordCanvas:y,mutationCb:X,win:window,blockClass:i,blockSelector:o,mirror:Uo,sampling:v.canvas,dataURLOptions:p}),new yo({mutationCb:A,scrollCb:J,bypassOptions:{blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:l,inlineStylesheet:h,maskInputOptions:k,dataURLOptions:p,maskTextFn:d,maskInputFn:c,recordCanvas:y,inlineImages:b,sampling:v,slimDOMOptions:O,iframeManager:j,stylesheetManager:M,canvasManager:Bo,keepIframeSrcFn:S,processedNodeManager:R},mirror:Uo}));Fo=(t=!1)=>{if(g){it({type:Q.Meta,data:{href:window.location.href,width:Nn(),height:Tn()}},t),M.reset(),x.init(),io.forEach(t=>t.lock());var e=function(t,e){var{mirror:e=new rt,blockClass:i="rr-block",blockSelector:s=null,maskTextClass:r="rr-mask",maskTextSelector:n=null,inlineStylesheet:o=!0,inlineImages:a=!1,recordCanvas:l=!1,maskAllInputs:h=!1,maskTextFn:u,maskInputFn:c,slimDOM:d=!1,dataURLOptions:f,preserveWhiteSpace:v,onSerialize:p,onIframeLoad:m,iframeLoadTimeout:g,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:w=()=>!1}=e||{};return Et(t,{doc:t,mirror:e,blockClass:i,blockSelector:s,maskTextClass:r,maskTextSelector:n,skipChild:!1,inlineStylesheet:o,maskInputOptions:!0===h?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===h?{password:!0}:h,maskTextFn:u,maskInputFn:c,slimDOMOptions:!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===d,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===d?{}:d,dataURLOptions:f,inlineImages:a,recordCanvas:l,preserveWhiteSpace:v,onSerialize:p,onIframeLoad:m,iframeLoadTimeout:g,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:w,newlyAddedElement:!1})}(document,{mirror:Uo,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:l,inlineStylesheet:h,maskAllInputs:k,maskTextFn:d,maskInputFn:c,slimDOM:O,dataURLOptions:p,recordCanvas:y,inlineImages:b,onSerialize:t=>{Ln(t,Uo)&&j.addIframe(t),Un(t,Uo)&&M.trackLinkElement(t),Pn(t)&&x.addShadowRoot(H.shadowRoot(t),document)},onIframeLoad:(t,e)=>{j.attachIframe(t,e),x.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{M.attachLinkElement(t,e)},keepIframeSrcFn:S});if(!e)return console.warn("Failed to snapshot the document");it({type:Q.FullSnapshot,data:{node:e,initialOffset:En(window)}},t),io.forEach(t=>t.unlock()),document.adoptedStyleSheets&&0<document.adoptedStyleSheets.length&&M.adoptStyleSheets(document.adoptedStyleSheets,Uo.getId(document))}};try{const T=[],N=t=>{return et(fo)({mutationCb:A,mousemoveCb:(t,e)=>it({type:Q.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.MouseInteraction,...t}}),scrollCb:J,viewportResizeCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.ViewportResize,...t}}),inputCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.Input,...t}}),mediaInteractionCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.MediaInteraction,...t}}),styleSheetRuleCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.StyleSheetRule,...t}}),styleDeclarationCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.StyleDeclaration,...t}}),canvasMutationCb:X,fontCb:t=>it({type:Q.IncrementalSnapshot,data:{source:tt.Font,...t}}),selectionCb:t=>{it({type:Q.IncrementalSnapshot,data:{source:tt.Selection,...t}})},customElementCb:t=>{it({type:Q.IncrementalSnapshot,data:{source:tt.CustomElement,...t}})},blockClass:i,ignoreClass:F,ignoreSelector:B,maskTextClass:a,maskTextSelector:l,maskInputOptions:k,inlineStylesheet:h,sampling:v,recordDOM:g,recordCanvas:y,inlineImages:b,userTriggeredOnInput:W,collectFonts:z,doc:t,maskInputFn:c,maskTextFn:d,keepIframeSrcFn:S,blockSelector:o,slimDOMOptions:O,dataURLOptions:p,mirror:Uo,iframeManager:j,stylesheetManager:M,shadowDomManager:x,processedNodeManager:R,canvasManager:Bo,ignoreCSSAttributes:Z,plugins:(null==(t=null==w?void 0:w.filter(t=>t.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>it({type:Q.Plugin,data:{plugin:e.name,payload:t}})})))||[]},U)},D=(j.addLoadListener(t=>{try{T.push(N(t.contentDocument))}catch(t){console.warn(t)}}),()=>{Fo(),T.push(N(document)),Lo=!0});return"interactive"===document.readyState||"complete"===document.readyState?D():(T.push(q("DOMContentLoaded",()=>{it({type:Q.DomContentLoaded,data:{}}),"DOMContentLoaded"===G&&D()})),T.push(q("load",()=>{it({type:Q.Load,data:{}}),"load"===G&&D()},window))),()=>{T.forEach(t=>t()),R.destroy(),Lo=!1,eo=void 0}}catch(t){console.warn(t)}}Po.addCustomEvent=(t,e)=>{if(!Lo)throw new Error("please add custom event after start recording");it({type:Q.Custom,data:{tag:t,payload:e}})},Po.freezePage=()=>{io.forEach(t=>t.freeze())},Po.takeFullSnapshot=t=>{if(!Lo)throw new Error("please take full snapshot after start recording");Fo(t)},Po.mirror=Uo,A.record=Po}},s={};function r(t){var e=s[t];return void 0!==e||(e=s[t]={exports:{}},i[t].call(e.exports,e,e.exports,r)),e.exports}return r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r(2043).default})());