1import{i as e}from"./dist-V0wV9pPA.js";import{Ht as t,g as n}from"./runtime-core.esm-bundler-DPmoNEl9.js";import{t as r}from"./ssr-F9GWYbf6.js";import{t as i}from"./useCookies-CkTz8rSI.js";import{o as a}from"./useUsercentric-RtawsFnt.js";import"./usercentricHelper-B3DdalKO.js";var o=`experiments`,s=`Server Side Testing`,c=1209600,l=[],u,d,f=e=>{if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.experimentId==`string`&&typeof t.variantId==`string`},p=e=>{if(!e)return[];try{let t=JSON.parse(e);return(Array.isArray(t)?t:[t]).filter(f)}catch{return[]}},m=e=>{try{return p(atob(e??``))}catch{return[]}},h=(e,t)=>{let n=[...e];for(let e of t)n.some(t=>t.experimentId===e.experimentId)||n.push(e);return n};function g(){let f=e(),g=i(),_=n(()=>p(f.props.experiments)),v=()=>{if(f.props.testingMode)return;let e=m(g.get(o)),t=h(e,[..._.value,...l]);if(t.length===e.length)return;let n={maxAge:c,path:`/`,sameSite:`lax`,secure:globalThis.location?.protocol===`https:`,encode:e=>e};g.set(o,btoa(JSON.stringify(t)),n)},y=e=>{if(e){v();return}g.remove(o,{path:`/`})};return r&&!d&&!f.props.testingMode&&(u=a(s),d=t(u,e=>{y(e)})),{experiments:_,persistExperiment:e=>{!r||f.props.testingMode||(l.some(t=>t.experimentId===e.experimentId)||l.push(e),u?.value&&v())}}}export{g as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.