1(()=>{let inFlight=!1,queued=!1,lastValue=null;async function computeHasSubscription(){return(await fetch("/cart.js",{credentials:"same-origin"}).then(r=>r.json())).items.some(i=>!!i.selling_plan_allocation)}async function writeFlag(hasSub){lastValue!==hasSub&&(lastValue=hasSub,await fetch("/cart/update.js",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({attributes:{has_subscription:hasSub?"true":"false"}})}))}async function syncFlag(){if(inFlight){queued=!0;return}inFlight=!0;try{const hasSub=await computeHasSubscription();await writeFlag(hasSub)}catch(e){console.warn("[checkout-flags] sync failed",e)}finally{inFlight=!1,queued&&(queued=!1,syncFlag())}}document.addEventListener("DOMContentLoaded",()=>syncFlag());const origFetch=window.fetch;window.fetch=async function(resource,init){const res=await origFetch.apply(this,arguments);try{const url=typeof resource=="string"?resource:resource&&resource.url||"";(url.includes("/cart/add")||url.includes("/cart/change")||url.includes("/cart/update")||url.includes("/cart/clear"))&&syncFlag()}catch{}return res}})(); 2//# sourceMappingURL=/cdn/shop/t/71/assets/checkout-flags.js.map?v=140552730716918925241777160213
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.