1(function(){const SUPABASE_URL="https://pzrnopycnrebsayjjllk.supabase.co",SUPABASE_KEY="sb_publishable_eXjpOQEb7O3mRo-ohUKUZg_1s10Sywh";function getSessionId(){let id=sessionStorage.getItem("exp_session_id");return id||(id=crypto.randomUUID(),sessionStorage.setItem("exp_session_id",id)),id}async function getVariantMap(){const map={};if(!window.shoplift||typeof window.shoplift.getVisitorData!="function")return map;try{((await window.shoplift.getVisitorData()).visitorTests||[]).forEach(t=>{map[t.testId]=t.assignedTo==="control"?"control":"variant_a"})}catch{}return map}function matchesPath(pattern,path){return pattern===path?!0:pattern.endsWith("*")?path.startsWith(pattern.slice(0,-1)):!1}function getDeviceType(){return window.shopliftInstance&&window.shopliftInstance.device?window.shopliftInstance.device:window.innerWidth<768?"mobile":"desktop"}function sendEvent(eventName,eventType,variant,extra){fetch(SUPABASE_URL+"/rest/v1/experiment_events",{method:"POST",headers:{"Content-Type":"application/json",apikey:SUPABASE_KEY,Authorization:"Bearer "+SUPABASE_KEY},body:JSON.stringify({session_id:getSessionId(),variant,event_name:eventName,event_type:eventType,page_path:window.location.pathname,device_type:getDeviceType(),element_id:extra&&extra.element_id||null,metadata:extra&&extra.metadata||{}}),keepalive:!0}).catch(function(){})}async function init(){const variantMap=await getVariantMap(),events=await(await fetch(SUPABASE_URL+"/rest/v1/tracked_events?active=eq.true&select=*,experiments(shoplift_key)",{headers:{apikey:SUPABASE_KEY,Authorization:"Bearer "+SUPABASE_KEY}})).json(),path=window.location.pathname;function variantFor(evt){const testId=evt.experiments&&evt.experiments.shoplift_key;return testId&&variantMap[testId]||null}events.forEach(function(evt){evt.event_type==="pageview"&&matchesPath(evt.match_value,path)&&sendEvent(evt.name,"pageview",variantFor(evt))});const clickEvents=events.filter(function(e){return e.event_type==="click"});clickEvents.length&&document.addEventListener("click",function(e){clickEvents.forEach(function(evt){const el=e.target.closest(evt.match_value);el&&sendEvent(evt.name,"click",variantFor(evt),{element_id:el.id||null,metadata:{text:(el.textContent||"").trim().slice(0,80)}})})})}init().catch(function(){})})(); 2//# sourceMappingURL=/cdn/shop/t/63/assets/experiment-tracker.js.map?v=33434961044018785891787159009
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.