1if(!customElements.get("coco-shuffle")){class CocoShuffle extends HTMLElement{constructor(){super(),this.selectedProduct=null,this.selectedSize=null}connectedCallback(){this.copySection=document.querySelector(".shopify-section.section_copy"),this.stickyCopy=this.querySelector("[data-copy-section]"),this.copySection&&this.stickyCopy&&(this.stickyCopy.innerHTML=this.copySection.innerHTML,this.stickyCopy.classList.add("hidden","md:block",...this.copySection.classList),this.copySection.classList.add("md:hidden")),this.products=JSON.parse(this.dataset.productsJson.replaceAll("%27","'").replaceAll("%22",""")),this.baseProduct=this.products.find(product=>product.tags.find(x=>x==="base_product"));const initialSelectId=this.querySelector("[data-coco-selector][data-value]")?.dataset.value;this.selectedProduct=this.products.find(({id})=>id===initialSelectId),this.selectedProduct||(this.selectedProduct=this.products.find(({handle})=>window.location.pathname.includes(handle))),(this.selectedProduct?.id===this.baseProduct?.id||!this.selectedProduct)&&(this.selectedProduct=this.products.find(x=>x.available&&!x.tags.some(tag=>["base_product","newsite-hidden"].some(value=>value===tag)))),this.currentVariant=this.selectedProduct.variants.find(({default_selected})=>default_selected)||this.selectedProduct.variants[0],this.addDelegatedClickListeners(),this.createCustomEvents(),window.addEventListener("selling-plan-selector:plan-selected",this.populateSelectedProductPrice.bind(this)),document.addEventListener("DOMContentLoaded",()=>{this.imagesWrapper=[...this.querySelectorAll("[data-product-images]")],this.displayPrices=[...this.querySelectorAll("[data-display-price]")],this.displayOptions=this.querySelector("[data-display-options]"),this.displayTitles=[...this.querySelectorAll("[data-display-title]")],this.mainSelect=this.querySelector("[data-main-select]"),this.ageCheck(),this.populateSelectedProductPrice()})}addDelegatedClickListeners(){this.addEventListener("click",e=>{const clickedElement=e.target.closest("[data-action]");if(!clickedElement)return;const{action,productId,option}=clickedElement.dataset;switch(action){case"product-select":if(productId===this.selectedProduct?.id)return;this.selectedProduct=this.products.find(({id})=>id===productId),this.currentVariant=this.selectedProduct.variants.find(({default_selected})=>default_selected)||this.selectedProduct.variants[0],this.populateSelectedProductImages(),this.populateSelectedProductPrice(),this.populateSelectedProductOptions(),this.populateSizeDisplay(),this.swapOutATC(),this.swapOutIcons(),this.swapMetafieldContent(),this.displayTitles.forEac
1h(el=>{el.innerHTML=this.selectedProduct.title.split("|")[0].split(" x ")[0]}),[...this.querySelectorAll("[data-show]")].forEach(el=>{if(el.dataset.show===productId||el.dataset.show===this.baseProduct.id){el.style.display=null;return}el.style.display="none"}),this.mainSelect.innerHTML=`${this.selectedProduct.variants.map(variant=>` 2 <option value="${variant.id}" 3 ${variant.id===this.currentVariant?.id?'selected="selected"':""} 4 > 5 ${variant.title} - ${variant.price_money} 6 </option> 7 `).join("")}`;const lateInput=this.querySelector("input[name=late]");this.selectedProduct.tags.includes("late-notice")?lateInput.value=!0:lateInput.value=!1,history.replaceState(this.selectedProduct.title,"",this.selectedProduct.url);break;case"option-choice":if(!option){console.error('Input with [data-action="option-choice"] is missing a [data-option="value"] attr');return}const optionIndex=this.selectedProduct.options_with_values.findIndex(({values})=>values.find(x=>x===option));let thisOptionSet=[...this.currentVariant.options];thisOptionSet[optionIndex]=option,this.currentVariant=this.selectedProduct.variants.find(({options})=>options.every(x=>thisOptionSet.find(y=>y===x))),this.populateSelectedProductPrice(),this.swapOutATC(),this.swapOutIcons(),this.mainSelect.value=this.currentVariant.id,window.dispatchEvent(this.variantUpdatedEvent),this.populateSizeDisplay(),this.imagesWrapper.forEach(wrapper=>{const variantImage=[...wrapper.querySelectorAll("[data-variants]")].find(({dataset:{variants}})=>variants.includes(this.currentVariant.id));variantImage&&wrapper.insertBefore(variantImage,wrapper.firstChild)});break;default:break}})}populateSizeDisplay(){const sizeOption=this.selectedProduct.options_with_values?.find(({name})=>name.toLowerCase()==="size");if(!sizeOption)return;const sizeValue=this.currentVariant.options.find(option=>sizeOption.values.includes(option));sizeValue&&[...this.querySelectorAll("[data-size-display]")].forEach(el=>{el.innerHTML=sizeValue})}createCustomEvents(){this.addToCartEvent=new CustomEvent("coco-shuffle:add-to-cart",{}),this.productUpdatedEvent=new CustomEvent("coco-shuffle:product-updated",{}),this.variantUpdatedEvent=new CustomEvent("coco-shuffle:variant-updated",{})}enableOrDisableOptionSelects(){const optionSelects=[...this.querySelectorAll("[data-option]")],availableOptions=this.selectedProduct.variants.map(variant=>{if(variant.available)return variant.options.map(x=>x)}).filter(x=>x);optionSelects.forEach(select=>{const optionValue=select.dataset.option,optionIndex=this.selectedProduct.options_with_values.findIndex(({values})=>values.find(x=>x===optionValue));availableOptions.find(optionSet=>{let thisOptionSet=[...this.currentVariant.options];return thisOptionSet[optionIndex]=optionValue,thisOptionSet.every(x=>optionSet.find(y=>y===x))})?select.querySelector("[data-sold-out]")?.remove():select.querySelector("[data-sold-out]")||(select.innerHTML+='<div data-sold-out class="ml-auto mr-4">Sold Out</div>')}),this.currentVariant.available&&[...this.querySelectorAll("[data-fake-select-value] [data-sold-out]")].forEach(el=>el.remove())}populateSelectedProductImages(){this.imagesWrapper.forEach(wrapper=>{wrapper.style.transition="0.2s",wrapper.style.opacity=0,wrapper.style.minHeight=`${wrapper.offsetHeight}px`;const onLoad=()=>{wrapper.style.opacity=1,wrapper.style.minHeight=0,window.dispatchEvent(new CustomEvent("coco-shuffle:product-updated",{detail:this.selectedProduct.id}))},template=this.querySelector('[data-template="product-image"]')?.innerText.replaceAll("`",""),oddClasses=this.querySelector('[data-template="product-image"]')?.dataset?.applyWhenOdd,isOdd=this.selectedProduct.images.length%2===1;setTimeout(()=>{const imagesHtmlString=this.selectedProduct.images.map(({alt,src,variants})=>{let alt_downcase=alt?alt.toLowerCase():!1;if(!["info|","hide_image"].some(str=>alt_downcase.includes(str)))return template?template.replace("{src}",src).replace("{alt}",alt).replace("{variants}",variants).replace("{classes}",isOdd?oddClasses:""):` 8 <img alt="${alt||this.selectedProduct.title}" src="${src}"> 9 `}).join("");if(wrapper.innerHTML=imagesHtmlString,this.selectedProduct.product_features?.length){const featureIconsHtml=` 10 <div data-feature-icons class="swiper-no-swiping absolute top-3 right-3 flex items-center gap-2 z-10 pointer-events-none"> 11 ${this.selectedProduct.product_features.map(f=>`<img loading="lazy" data-feature-icon class="w-15 h-15 object-contain" src="${f.icon}" />`).join("")} 12 </div> 13 `,firstSlide=wrapper.querySelector("[data-variants]");firstSlide&&(firstSlide.style.position="relative",firstSlide.insertAdjacentHTML("beforeend",featureIconsHtml))}const firstSlideForBadge=wrapper.querySelector("[data-variants]");firstSlideForBadge&&(firstSlideForBadge.style.position="relative",firstSlideForBadge.insertAdjacentHTML("afterbegin",this.buildBadgeHTML()));const allImages=[...wrapper.querySelectorAll("img")];allImages[allImages.length-1].onload=onLoad},200)})}populateSelectedProductPrice(){if(!this.currentVariant||!this.displayPrices?.length)return;let sub_price="";const bmsmSelected=this.querySelector("[data-bmsm]:checked")?.dataset.bmsm,currency=window.Shopify.currency.active;if(this.currentVariant.selling_plan_allocations.length>0){const percentTag=Number(this.querySelector("selling-plan-selector")?.dataset?.percentTag??0),compareAtPrice=this.currentVariant.compare_at_price||this.currentVariant.selling_plan_allocations[0].compare_at_price,rawPrice=percentTag>0&&compareAtPrice?Math.round(compareAtPrice*(1-percentTag/100)):this.currentVariant.selling_plan_allocations[0].price;sub_price=new Intl.NumberFormat("en-US",{style:"currency",currency}).format(rawPrice/100)}const subscriptionSelected=this.querySelector('[value="subscribe"]')?.checked;let newPriceMarkup=`
14 <span class="relative"> 15 <span data-price class="after:absolute after:inset-0 after:h-0.5 after:w-full after:top-1/2 after:-translate-y-1/2 after:content-['']">${this.currentVariant.price_money}</span> 16 </span> 17 `;if(subscriptionSelected&&sub_price)newPriceMarkup=` 18 <span class="text-accent1 mr-2">${sub_price}</span> 19 <span class="line-through">${this.currentVariant.price_money}</span> 20 `;else if(bmsmSelected){const multiplier=(100-Number(bmsmSelected))/100;newPriceMarkup=` 21 <span class="text-accent1 mr-2">${new Intl.NumberFormat("en-US",{style:"currency",currency}).format(this.currentVariant.price*multiplier/100)}</span> 22 <span class="line-through">${this.currentVariant.price_money}</span> 23 `}else this.currentVariant?.compare_at_price>this.currentVariant.price&&(newPriceMarkup=` 24 <span class="line-through text-accent1 mr-2">${this.currentVariant.compare_at_price_money}</span> 25 <span>${this.currentVariant.price_money}</span> 26 `);this.displayPrices.forEach(el=>{el.innerHTML=newPriceMarkup})}populateSelectedProductOptions(){const optionsHTMLString=this.selectedProduct.options_with_values.map(({name,values},i)=>{const optionIndex=i;if(!(values.length<2))return name.toLowerCase().includes("flavor")||name.toLowerCase().includes("color")?` 27 <div class="flex items-center justify-between pb-3 pt-7.5"> 28 <span class="font-heading font-black uppercase">${name} (${values.length})</span> 29 </div> 30 <div data-fake-select-expanding-wrapper class="transition-all duration-500"> 31 <fake-select data-value="${this.currentVariant.options[optionIndex]}" class="block border-b border-secondaryLight text-left relative w-full" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="product-select"> 32 <button data-dropdown-action="toggle-dropdown" class="flex gap-4 h5 font-body items-center py-2 w-full"> 33 <div data-fake-select-value class="flex gap-4 items-center text-left"> 34 <div class="relative rounded-full bg-secondaryLight w-7.5 h-7.5"> 35 <div aria-hidden="true" style="background-image: url('{{ filename }}')" class="w-full h-full shadow rounded-full bg-cover bg-center"></div> 36 </div> 37 <span class="capitalize">${this.currentVariant.options[optionIndex]}</span> 38 </div> 39 ${this.currentVariant.available?"":'<div data-sold-out class="ml-auto mr-4">Sold Out</div>'} 40 <div data-rotate class="ml-auto w-3 h-3 transition-all duration-200" aria-hidden="true"> 41 <span class="w-full h-full transform rotate-90 block"> 42 <svg xmlns="http://www.w3.org/2000/svg" data-name="Group 490" width="100%" height="100%" viewBox="0 0 8 14"> 43 <defs> 44 <clipPath id="dpuo5a2tba"> 45 <path data-name="Rectangle 50" d="M0 0h8v14H0z"/> 46 </clipPath> 47 </defs> 48 <path fill="currentColor" data-name="Path 23" d="M1.351 14 0 12.658 5.693 7 0 1.342 1.351 0 7.72 6.329a.945.945 0 0 1 0 1.342z" style="clip-path:url(#dpuo5a2tba)"/> 49 </svg> 50 </span> 51 </div> 52 </button> 53 <div id="product-select" role="listbox" data-dropdown style="height: 0;" class="absolute w-full top-full overflow-hidden transition-all duration-200 shadow bg-primaryLight"> 54 <ul class="border border-primaryDark max-h-[440px] overflow-y-scroll py-3 px-5"> 55 ${values.map(value=>{const available=this.selectedProduct.variants.find(({available:available2,options})=>available2&&options.find(x=>x==value));return` 56 <li data-fake-option class="border-b border-secondaryLight"> 57 <button 58 ${available?"":"disabled"} 59 data-value="${value}" 60 data-dropdown-action="select" 61 class="disabled:opacity-20 flex gap-4 items-center p-2 transition duration-200 focus:bg-secondaryLight hover:bg-secondaryLight h5 font-body w-full group" 62 data-option="${value}" 63 data-action="option-choice" 64 > 65 <div class="relative rounded-full bg-secondaryLight min-w-[30px] w-7.5 h-7.5"> 66 <div aria-hidden="true" style="background-image: url('{{ filename }}')" class="w-full h-full shadow rounded-full bg-cover bg-center"></div> 67 </div> 68 <div class="flex-shrink text-left"> 69 <span class="capitalize">${value.toLowerCase()}</span> 70 </div> 71 ${available?'<div data-sold-out class="ml-auto mr-4">Sold Out</div>':""} 72 <div data-checkmark class="{% unless value == default_value %} hidden {% endunless %} w-3 h-3 ml-auto"> 73 <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewB
73ox="0 0 12 9"> 74 <defs> 75 <clipPath id="h9mzceli1a"> 76 <path data-name="Rectangle 45" d="M0 0h12v9H0z"/> 77 </clipPath> 78 </defs> 79 <path color="currentColor" data-name="Path 23" d="M3.94 9a.705.705 0 0 1-.506-.215L0 5.264l1.013-1.039 2.927 3L10.987 0 12 1.039 4.446 8.785A.705.705 0 0 1 3.94 9" style="clip-path:url(#h9mzceli1a)"/> 80 </svg> 81 </div> 82 </button> 83 </li> 84 `}).join("")} 85 </ul> 86 </div> 87 </fake-select> 88 </div> 89 `:` 90 <div class="flex items-center justify-between pb-3 pt-7.5"> 91 <span class="font-heading font-black uppercase">${name} (${values.length})</span> 92 </div> 93 <fieldset> 94 <legend class="sr-only">${name}</legend> 95 <ul class="flex flex-wrap"> 96 ${values.map(value=>{const available=this.selectedProduct.variants.find(({available:available2,options})=>available2&&options.find(x=>x==value));return` 97 <li> 98 <div class="relative"> 99 <input 100 class="absolute top-0 left-0 h-full w-full opacity-0 peer cursor-pointer z-10" 101 ${this.currentVariant?.options?.find(x=>x===value)?"checked":""} 102 data-action="option-choice" 103 data-option="${value}" 104 id="${name}__${value}" 105 aria-label="${value}" 106 type="radio" 107 name="${name.toLowerCase()}-select" 108 value="${value}" 109 /> 110 <label class="text-small after:absolute after:top-px after:z-1 after:bottom-px after:left-px after:right-px after:border after:border-transparent peer-checked:after:border-current block border border-secondary
110Dark ${available?"":"opacity-20"} peer-checked:border-current w-15 min-w-max p-4 text-center" for="${name}__${value}"> 111 ${value} 112 </label> 113 </div> 114 </li> 115 `}).join("")} 116 </ul> 117 </fieldset> 118 `}).join("");this.displayOptions.innerHTML=optionsHTMLString}swapMetafieldContent(){this.selectedProduct.metafields.forEach(x=>{let metafield=x;const el=document.querySelector(`.${metafield.name}`);if(!el)return;const fallbackMetafield=this.baseProduct?.metafields?.find(y=>y.name===metafield.name);switch(metafield.name){case"section_recommended_products":if(!Object.values(metafield.value||metafield.values).filter(x2=>x2).length)if(fallbackMetafield.values.length)metafield=fallbackMetafield;else{el.classList.add("hidden");return}el.classList.remove("hidden");const swiper=el.querySelector("swiper-carousel")?.swiper;if(!swiper)return;const swiperWrapper=el.querySelector(".swiper-wrapper");el.querySelector(".swiper-wrapper").innerHTML=` 119 ${metafield.values.map(handle=>`<div class="swiper-slide"><quick-buy data-product-handle="${handle}"></quick-buy></div>`).join("")} 120 `,new MutationObserver(()=>swiper.update()).observe(swiperWrapper,{subtree:!0,childList:!0});break;case"section_big_youtube_video":if(!metafield.value.youtube_url)if(fallbackMetafield.value.youtube_url)metafield=fallbackMetafield;else{el.classList.add("hidden");return}el.classList.remove("hidden");const imageSrc=metafield.value.poster_image_url,id=getYoutubeIdFromUrl(metafield.value.youtube_url),wrapper=el.querySelector("[data-video-wrapper]");if(!wrapper||!id||!imageSrc)return;wrapper.innerHTML=` 121 <div 122 data-youtube-sdk-overlay="${id}" 123 ${imageSrc?`style="background-image: url('${imageSrc}')" `:""} 124 class="${imageSrc?"bg-center bg-cover":"bg-transparent"} absolute cursor-pointer hover:text-accent1 transition duration-200 flex items-center justify-center top-0 left-0 h-full w-full" 125 role="button" 126 aria-label="Play video" 127 > 128 ${imageSrc?` 129 <span class="block w-16 h-16 text-primaryLight"> 130 <svg aria-hidden="true" focusable="false" role="presentation" width="100%" height="100%" class="icon icon-youtube" viewBox="0 0 100 70"> 131 <path d="M98 11c2 7.7 2 24 2 24s0 16.3-2 24a12.5 12.5 0 01-9 9c-7.7 2-39 2-39 2s-31.3 0-39-2a12.5 12.5 0 01-9-9c-2-7.7-2-24-2-24s0-16.3 2-24c1.2-4.4 4.6-7.8 9-9 7.7-2 39-2 39-2s31.3 0 39 2c4.4 1.2 7.8 4.6 9 9zM40 50l26-15-26-15v30z" fill="currentColor"> 132 </svg> 133 </span> 134 `:""} 135 </div> 136 <div data-youtube-sdk-player data-video-id="${id}"></div> 137 `,window.loadVideos();break;case"section_product_page_slider":if(!metafield.value.images.length&&!metafield.value.tagline&&!metafield.value.title)if(fallbackMetafield.value.tagline||fallbackMetafield.value.title||fallbackMetafield.value.images.length)metafield=fallbackMetafield;else{el.classList.add("hidden");return}el.classList.remove("hidden");const productSwiper=el.querySelector("swiper-carousel")?.swiper;if(!productSwiper)return;const productSwiperWrapper=el.querySelector(".swiper-wrapper");el.querySelector(".swiper-wrapper").innerHTML=` 138 ${metafield.value.images.map(src=>` 139 <div class="swiper-slide object-cover object-center aspect-[3/4] bg-primaryLight md:max-w-[40vw]"> 140 <img loading="lazy" width="1200" height="1200" class="block w-full h-full object-cover object-center" src="${src}" srcset="${src}&width=352 352w, ${src}&width=832 832w, ${src}width=1200 1200w"/> 141 </div> 142 `).join("")} 143 `,productSwiper.update(),new MutationObserver(()=>productSwiper.update()).observe(productSwiperWrapper,{subtree:!0,childList:!0}),el.querySelector("[data-tagline").innerHTML=metafield.value.tagline;break;case"section_accordion_image_columns":if(!metafield.value.accordions.length&&!metafield.value.image_url&&!metafield.value.title)if(fallbackMetafield.value.accordions.length||fallbackMetafield.value.image_url||fallbackMetafield.value.title)metafield=fallbackMetafield;else{el.classList.add("hidden");return}el.classList.remove("hidden");const img=el.querySelector("[data-main-img] img"),logobar=el.querySelector("[data-logo-bar]"),title=el.querySelector(".h1"),accordion=el.querySelector("content-accordion");
143img.src=metafield.value.image_url,img.srcset=`${img.src}&width=352 352w, ${img.src}&width=832 832w, ${img.src}width=1200 1200w`,title.innerHTML=metafield.value.title,metafield.value.logo_bar_url.length?logobar.innerHTML=` 144 <img src="${metafield.value.logo_bar_url}" width="1200" height="246" class="w-full object-center object-fit"> 145 `:logobar.innerHTML="",accordion&&metafield.value.accordions?.length&&(accordion.innerHTML=`${metafield.value.accordions.map(({title:title2,body},i)=>` 146 <button 147 data-accordion-toggle="block-${title2}-${i}" 148 class="flex items-center justify-between font-heading font-black uppercase first:border-none border-t border-secondaryLight text-xl py-3 w-full" 149 > 150 ${title2} 151 <div aria-hidden="true" class="w-3.5 h-3.5 relative"> 152 <span class="absolute top-1/2 transform translate-y-1/2 left-0 w-full block border border-current"></span> 153 <span class="absolute block w-full h-0.5 top-1/2 transform translate-y-1/2"> 154 <span data-rotate-active class="transform rotate-90 transition duration-200 left-0 w-full block border border-current"></span> 155 </span> 156 </div> 157 </button> 158 <div class="overflow-hidden transition-all duration-500" style="height: 0;" data-accordion-content="block-${title2}-${i}"> 159 <div class="font-body font-bold leading-loose py-3">${body}</div> 160 </div> 161 `).join("")}`);break;case"section_copy":if(!metafield.value.title&&!metafield.value.body)if(fallbackMetafield.value.title&&fallbackMetafield.value.body)metafield=fallbackMetafield;else{el.classList.add("hidden");return}window.matchMedia("min-width: 768px")?(this.stickyCopy.classList.add("hidden"),this.copySection.classList.remove("hidden")):(this.copySection.classList.add("hidden"),this.stickyCopy.classList.remove("hidden")),[this.copySection,this.stickyCopy].forEach(el2=>{const heading=el2.querySelector(".container > strong"),body=el2.querySelector(".container > div");heading.innerHTML=metafield.value.title,body.innerHTML=metafield.value.body});break;default:break}})}buildBadgeHTML(){const tags=this.selectedProduct.tags,available=this.selectedProduct.available,appExclusive=tags.includes("app_exclusive"),goldExclusive=tags.includes("loyalty_tier_gold_exclusive"),silverExclusive=tags.includes("loyalty_tier_silver_exclusive"),bronzeExclusive=tags.includes("loyalty_tier_bronze_exclusive");let innerHtml="";return available||(innerHtml+='<div data-out-of-stock class="px-2.5 py-1.5 bg-primaryDark text-primaryLight">Out of stock</div>
161'),tags.forEach(tag=>{const lightMatch=tag.match(/^badge-light[_:](.+)$/),darkMatch=tag.match(/^badge[_:](.+)$/);lightMatch?innerHtml+=`<div class="px-2.5 py-1.5 bg-primaryLight">${lightMatch[1]}</div>`:darkMatch&&(innerHtml+=`<div class="px-2.5 py-1.5 bg-primaryDark text-primaryLight">${darkMatch[1]}</div>`)}),appExclusive&&(innerHtml+='<div class="px-2.5 py-1.5 bg-primaryDark text-primaryLight">App Exclusive</div>'),goldExclusive&&!silverExclusive&&!bronzeExclusive?innerHtml+='<div class="px-2.5 py-1.5 bg-primaryDark text-primaryLight">Gold Exclusive</div>':(silverExclusive||bronzeExclusive)&&(innerHtml+='<div class="px-2.5 py-1.5 bg-primaryDark text-primaryLight">Loyalty Member Exclusive</div>'),`<div data-badge-wrap class="absolute top-5 text-tiny italic uppercase left-0 h-max max-w-[70%] flex flex-wrap items-center gap-1.5 z-20">${innerHtml}</div>`}swapOutATC(){if(!!this.selectedProduct.tags.find(x=>x==="hide_bis")||!this.querySelector("[data-notify-me]")?(this.querySelector("[data-out-of-stock]")?.classList.add("peer-disabled:block"),this.querySelector("[data-notify-me]")?.classList.remove("peer-disabled:block")):(this.querySelector("[data-out-of-stock]")?.classList.remove("peer-disabled:block"),this.querySelector("[data-notify-me]")?.classList.add("peer-disabled:block")),!!this.querySelector('[data-action="add-to-cart"]'))if(this.currentVariant?.available)this.querySelector('[data-action="add-to-cart"]').removeAttribute("disabled",!0);else{this.querySelector('[data-action="add-to-cart"]').setAttribute("disabled",!0);return}}swapOutIcons(){!!this.selectedProduct.tags.find(x=>x==="vegan-friendly")?[...this.querySelectorAll("[data-vegan-icon]")].forEach(icon=>{icon.classList.remove("hidden")}):[...this.querySelectorAll("[data-vegan-icon]")].forEach(icon=>{icon.classList.add("hidden")}),!!this.selectedProduct.tags.find(x=>x==="soy-free")?[...this.querySelectorAll("[data-soy-icon]")].forEach(icon=>{icon.classList.remove("hidden")}):[...this.querySelectorAll("[data-soy-icon]")].forEach(icon=>{icon.classList.add("hidden")}),!!this.selectedProduct.tags.find(x=>x==="sugar-free")?[...this.querySelectorAll("[data-sugar-icon]")].forEach(icon=>{icon.classList.remove("hidden")}):[...this.querySelectorAll("[data-sugar-icon]")].forEach(icon=>{icon.classList.add("hidden")}),!!this.selectedProduct.tags.find(x=>x==="gluten-free")?[...this.querySelectorAll("[data-gluten-icon]")].forEach(icon=>{icon.classList.remove("hidden")}):[...this.querySelectorAll("[data-gluten-icon]")].forEach(icon=>{icon.classList.add("hidden")})}ageCheck(){const visitorLocation=JSON.parse(sessionStorage.getItem("visitor_location")),ageCheck=this.querySelector("[data-age-check]");ageCheck!=null&&visitorLocation.state_prov=="New York"&&(ageCheck.classList.remove("hidden"),ageCheck.querySelector("input").setAttribute("required","required"))}}customElements.define("coco-shuffle",CocoShuffle)} 162//# sourceMappingURL=/cdn/shop/t/1423/assets/coco-shuffle.js.map?v=172949831590190266121790020572
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.