"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[9],{30:function(e,t,a){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProductDetails=t.mockProductDetailData=t.dynamicBoxId30pack=t.dynamicBoxId20pack=void 0;const s=a(0),r=a(2),n=i(a(58)),l=a(19),c=a(57),o=a(1),d=a(31),u=a(179),m=a(13),h=a(32),p=a(70),v=a(1),x=a(38),S=a(29),j=a(60),b=a(4),y=a(49),f=a(7),g=a(6),C=a(50);"undefined"!=typeof window&&(window.Buffer=x.Buffer);const{mainContainer:P,mainContainerVarietySet:N,categoryLabel:k,title:$,titleTwelvePack:I,starsContainer:w,starsRating:B,ratingNumber:_,varietySetContainer:D,linkVarietySet:E,buttonGiftSet:F,linkGiftSet:A,varietySetContainerHolidays:T,varietySetContainerForVarietySetPDP:O,description:V,freeFromContainer:R,freeFromContainerVarietySet:z,nutritionContainer:L,nutritionImageContainer:M,bundles:H,selected:U,price:Y,regularPrice:K,regularPriceContainer:G,regularPriceContainerTwelvePack:q,saleText:Z,priceVarietySet:J,productSubscription:Q,productSubscriptionIsVariety:W,subscriptionInfo:X,showContainer:ee,backgroundPopup:te,labelShip:ae,labelShipVarietySet:ie,labelShipContainer:se,addButton:re,varietyHoverName:ne,moreFlavorsAlert:le,disabled:ce,addButtonVarietySet:oe,nutritionArrowContainer:de,badgesContainer:ue,buttonLoading:me,buttonLoader:he,freeHatContainer:pe,plusSymbol:ve,priceContainer:xe,currencyCodeStyle:Se,freeBadge:je,brandHat:be,brandHatItalic:ye,hatFlex:fe,limitedEdition:ge}=n.default,Ce=e=>98===e?98.01:e;t.dynamicBoxId20pack="640ff717-7950-4cd1-ac10-b096ebe57ac4",t.dynamicBoxId30pack="f665c7d6-7709-48ee-aa76-dff869b362e0",t.mockProductDetailData={rating:{reviewsHref:"https://starsandhoney.com/pages/reviews"},varietyButton:{href:"/products/signature-flavors-variety-set",text:"Variety Set"},varsityHatButton:{href:"/products/signature-tasting-gift-set-12-pack",text:"GIFT SET"},clubDiscount:.1,mockTagsForVarietySet:["⃠ GLUTEN","⃠ DAIRY","⃠ SOY","⃠ SUGAR ALCOHOLS"],bundlesIds:{variantId20packOneTime:{variantId:"47421908353257",productId:"8657724834025"},variantId30packOneTime:{variantId:"47460318839017",productId:"8671253332201"},variantId20packSubs:{variantId:"47421908353257",productId:"8657724834025"},variantId30packSubs:{variantId:"47460318839017",productId:"8671253332201"},variantId12PackOneTime:{variantId:"47723161420009",productId:"8747006623977"}},dynamicBundleCollectionId:"427067900137"};const Pe=({productPage:e,selectedSubscription:a,bundleSelected:i,twelvePack:s,isVarietySet:r,regularPrice:n,priceFromVariant:l})=>{if(i===j.BundleSize["12 Pack"]&&r)return Number(s?n?s.variants[0]?.compareAtPrice?.amount:s.variants[0]?.price?.amount:76);if("club"===a){if(n)return Number(e.variants[i]?.compareAtPrice?.amount);const a=l(e.variants[i]);return Number(a?.amount)*(1-t.mockProductDetailData.clubDiscount)}{if(n)return Number(e.variants[i]?.compareAtPrice?.amount);const t=l(e.variants[i]);return Number(t?.amount)}};t.ProductDetails=function({productPage:e,variant:a,useSharedState:i,twelvePack:n,twelvePackEnabled:x,bundleSelected:je,setBundleSelected:Ne,isSubscriptionEnabled:ke,featureSalePrice:$e,isMobile:Ie=!1,productsExpandYourPalate:we,featureGoogleBadge:Be,featureAddToBagFreeShipping:_e}){const[De,Ee]=(0,o.useState)(!1),[Fe,Ae]=(0,o.useState)("one-time"),[Te,Oe]=(0,o.useState)(!1),[Ve,Re]=(0,o.useState)(!1),[ze,Le]=(0,o.useState)([]),[Me,He]=(0,o.useState)(!1),[Ue,Ye]=(0,o.useState)(!1),[Ke,Ge]=(0,o.useState)(!1),[qe,Ze]=(0,o.useState)(!1),[Je,Qe]=(0,o.useState)((0,S.modifyTitle)(e.title)),We="signature-flavors-variety-set"===e.handle,Xe="signature-tasting-gift-set-12-pack"===e.handle||"signature-tasting-gift-set-12-pack-store"===e.handle,et=Pe({productPage:e,selectedSubscription:Fe,bundleSelected:je,twelvePack:n,isVarietySet:We,priceFromVariant:i.priceFromVariant}),tt=$e?Pe({productPage:e,selectedSubscription:Fe,bundleSelected:je,twelvePack:n,isVarietySet:We,regularPrice:!0,priceFromVariant:i.priceFromVariant}):0,at=(0,o.useMemo)((()=>i.priceFromVariant(e.variants[je])),[e.variants,je,i.countryCode]),it=(0,o.useMemo)((()=>at.currencySymbol),[at]),st=(0,o.useMemo)((()=>(0,f.currencyCodeIfneeded)({currencySymbol:at.currencySymbol,featureInternationalization:i.featureInternationalization,countryCode:i.countryCode,currencyCode:at.currencyCode})),[it,at,i]),rt=(0,o.useMemo)((()=>{const a="club"===Fe?t.mockProductDetailData.clubDiscount:0,s=i.priceFromVariant(e.variants[We?0:1]),r=i.priceFromVariant(e.variants[We?1:2]);return[s.amount*(1-a)/20,r.amount*(1-a)/30]}),[e.variants,i.priceFromVariant,i.countryCode,Fe,We]),nt=(e,t)=>{if(mt)return t?.preventDefault(),void Ae("one-time");Ae(e)},lt=()=>{Oe(!Te)},ct=e.tags.includes("limited"),ot=(0,S.limitedProductByVariety)({productsExpandYourPalate:we,countryCode:i.countryCode,featureInternationalization:i.featureInternationalization}),dt=(0,o.useMemo)((()=>we.some((t=>t.handle===e.handle))||"signature-flavors-variety-set"===e.handle),[we,e.handle]),ut=t=>{Ne(t);const a=new URLSearchParams(window.location.search),i=e.variants[t];let s=i?.id;i||(s=t.toString()),a.set("variant",s),window.history.replaceState({},"",`${window.location.pathname}?${a.toString()}`)},mt=(0,o.useMemo)((()=>{const t=!!e.subscriptionEnabled,a=i.countryCode!==f.DEFAULT_SHOPIFY_COUNTRY.countryCode,s=(e=>e.some((e=>{const t=we[e].handle,a=we.find((e=>e.handle===t));return!a?.subscriptionEnabled})))(ze);return!ke||a||!t||s}),[ke,i.countryCode,e.subscriptionEnabled,ze]),ht=(0,o.useMemo)((()=>we.some((e=>e.tags.includes("limited")))),[we]),pt=(0,o.useMemo)((()=>!i.featureInternationalization||at.country===i.countryCode),[i.featureInternationalization,at.country,i.countryCode]);return(0,v.useEffect)((()=>{i.showCart&&Ye(!1)}),[i.showCart]),(0,v.useEffect)((()=>{mt&&Ae("one-time")}),[mt]),(0,v.useEffect)((()=>{if(n)return Ge(n?.variants[0]?.currentlyNotInStock),Ze(!n?.variants[0]?.availableForSale),Qe("Special Edition 12 Pack | All Flavors + Varsity Hat"),void Ae("one-time");Ge((()=>0===e.variants[je].quantityAvailable||e.variants[je]?.currentlyNotInStock)),Ze(!e.variants[je]?.availableForSale),Qe((0,S.modifyTitle)(e.title)),Ae("one-time")}),[je]),(0,v.useEffect)((()=>{ut(je)}),[je]),(0,s.jsxs)("div",{className:`${P} ProductDetailsContainer ${(We||Xe)&&N}`,children:[(0,s.jsx)("p",{className:`categoryLabel ${k}`,children:"Collagen Protein Bar"}),(0,s.jsx)("h1",{className:`${$} title ${I}`,dangerouslySetInnerHTML:{__html:Je}}),(0,s.jsx)("div",{className:`starsContainer ${w}`,children:We||Xe||ct||!e.reviews?.rating_average?null:(0,s.jsxs)(r.Fragment,{children:[(0,s.jsx)("a",{className:`starsRating ${B}`,href:t.mockProductDetailData.rating.reviewsHref,children:(0,s.jsx)(l.RatingStars,{rating:e.reviews?.rating_average,numberOfStars:5,starDimension:"20px",starRatedColor:"#000000",starEmptyColor:"#00000055"})}),(0,s.jsxs)("p",{className:_,children:["(",(0,m.truncateOneDecimal)(e?.reviews?.rating_average),")"]})]})}),(0,s.jsxs)("div",{className:`swatches varietySetContainer ${D} ${We&&O} ${ht&&T}`,children:[we.filter((e=>!e.tags.includes("limited"))).map(((e,t)=>(0,s.jsx)("div",{className:"varietyDataSelector",children:(0,s.jsxs)("a",{href:`/products/${e.handle}`,className:"varietyDataSelectorLink",children:[(0,s.jsx)("img",{src:e.swatchImage,alt:`swatch for ${e.title}`}),(0,s.jsx)("div",{className:ne,children:e.title})]})},t))),(0,s.jsx)("button",{children:(0,s.jsx)("a",{className:`linkVarietySet ${E}`,href:t.mockProductDetailData.varietyButton.href,children:t.mockProductDetailData.varietyButton.text})})]}),ht&&(ot?.length>0||x)?(0,s.jsxs)("div",{className:`varietySetContainer ${D} ${We&&O} ${ht&&T}`,children:[we.filter((e=>e.tags.includes("limited"))).map(((e,t)=>(0,s.jsx)("div",{className:"varietyDataSelector",children:(0,s.jsxs)("a",{href:`/products/${e.handle}`,className:"varietyDataSelectorLink",children:[(0,s.jsx)("img",{src:e.swatchImage,alt:`swatch for ${e.title}`}),(0,s.jsx)("div",{className:ne,children:e.title})]})},t))),x&&(0,s.jsx)("button",{className:`buttonGiftSet ${F}`,children:(0,s.jsx)("a",{className:`linkGiftSet ${A}`,href:t.mockProductDetailData.varsityHatButton.href,children:t.mockProductDetailData.varsityHatButton.text})}),ot?.length>0&&(0,s.jsx)("p",{class:`limitedEdition ${ge}`,children:"LIMITED EDITION"})]}):null,x&&!ht&&(0,s.jsx)("button",{className:`buttonGiftSet ${F}`,style:{marginBottom:"10px"},children:(0,s.jsx)("a",{className:`linkGiftSet ${A}`,href:t.mockProductDetailData.varsityHatButton.href,children:t.mockProductDetailData.varsityHatButton.text})}),(0,s.jsx)("p",{className:`description ${V}`,style:{fontSize:We?"12px":"14px",lineHeight:We?"18px":"21px",letterSpacing:We?"normal":"-0.02em;",marginTop:ht?"8px":"0px"},children:e.description}),(0,s.jsx)("div",{className:`freeFromContainer ${R} ${We&&z}`,children:We||Xe?t.mockProductDetailData.mockTagsForVarietySet.map(((e,t)=>(0,s.jsx)("span",{children:e.substring(1).toLowerCase().includes("sugar")?"STEVIA":e.substring(1)},t))):e.tagsBadge.map(((e,t)=>(0,s.jsx)("span",{children:e.substring(1).toLowerCase().includes("sugar")?"STEVIA":e.substring(1)},t)))}),!We&&!Xe&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:L,onClick:()=>{Ee(!De)},role:"button","aria-label":"Nutrition & Ingredients",children:[(0,s.jsx)("span",{children:"NUTRITION & INGREDIENTS"}),(0,s.jsx)("span",{className:de,children:(0,s.jsx)(c.Arrow,{})})]}),De&&(0,s.jsxs)("div",{className:M,children:[(0,s.jsx)("img",{src:e?.nutritionalImage?.reference.image.originalSrc,alt:`nutritional info for ${Je} `,height:150,width:400}),(0,s.jsx)("p",{children:e?.nutritionalIngredients?.value}),(0,s.jsx)("div",{className:ue,children:e?.nutritionalBadges?.references.edges?.map(((e,t)=>(0,s.jsx)("img",{src:e.node.image.originalSrc,alt:e.node.image.altText,style:{height:"30px"}},t)))})]})]}),!We&&!Xe&&(0,s.jsxs)("div",{className:`bundles ${H}`,children:[e.options[0].values[0]&&(0,s.jsxs)("div",{onClick:()=>ut(j.BundleSize["20 Pack"]),role:"button","aria-label":"Select bundle",children:[(0,s.jsx)("button",{className:`${je===j.BundleSize["20 Pack"]&&U}`,children:e.options[0].values[0]}),(0,s.jsx)("span",{})]}),e.options[0].values[1]&&(0,s.jsxs)("div",{onClick:()=>ut(j.BundleSize["30 Pack"]),role:"button","aria-label":"Select bundle 2",children:[(0,s.jsx)("button",{className:`${je===j.BundleSize["30 Pack"]&&U}`,children:e.options[0].values[1]}),(0,s.jsxs)("span",{children:[`${it}${rt[0].toFixed(2)}`," EA."]})]}),e.options[0].values[2]&&(0,s.jsxs)("div",{onClick:()=>ut(j.BundleSize["12 Pack"]),role:"button","aria-label":"Select bundle 3",children:[(0,s.jsx)("button",{className:`${je===j.BundleSize["12 Pack"]&&U}`,children:e.options[0].values[2]}),(0,s.jsxs)("span",{children:[`${it}${rt[1].toFixed(2)}`," EA."]})]})]}),We&&(0,s.jsx)(p.StepSelection,{productPage:e,bundleSelected:je,setBundleSelected:Ne,bundlePriceEach:rt,varietySetIsComplete:Ve,setVarietySetIsComplete:Re,selectedFlavorSet:ze,setSelectedFlavorSet:Le,currencySymbol:it,productsExpandYourPalate:we,countryCode:i.countryCode,featureInternationalization:i.featureInternationalization}),Xe&&(0,s.jsx)(y.TwelvePackDetails,{isMobile:Ie,isVarietySet:We,productsExpandYourPalate:we}),(0,s.jsxs)("div",{className:`priceContainer ${xe}`,children:[(0,s.jsxs)("div",{className:`price ${Y} ${We&&J}`,children:[i.featureInternationalization&&(0,s.jsx)("div",{className:`currencyCodeStyle ${Se}`,children:`${st} `}),`${it}${et.toFixed(2)}`]}),!!tt&&(0,s.jsxs)("div",{className:`regularPriceContainer ${G} ${n&&je===j.BundleSize["12 Pack"]?q:""} ${We&&J}`,children:[(0,s.jsx)("span",{className:`sale ${Z}`,children:"Sale"}),(0,s.jsxs)("span",{className:`regularPrice ${K}`,children:["$",tt.toFixed(2)]})]}),je===j.BundleSize["12 Pack"]&&We&&(0,s.jsx)("div",{className:`plusSymbol ${ve}`,children:"+"}),je===j.BundleSize["12 Pack"]&&We&&(0,s.jsxs)("div",{className:`hatFlex ${fe}`,children:[(0,s.jsx)("div",{className:`free ${pe}`,children:(0,s.jsx)("img",{src:(0,b.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/hat.webp?v=1729711429",150),alt:"brand hat",height:46,width:46})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:`brandHat ${be}`,children:"Varsity Hat"}),(0,s.jsx)("div",{className:`brandHat ${ye}`,children:"+ embroidered logo"})]})]})]}),(0,s.jsxs)("div",{className:`${Q} productSubscription ${We&&W}`,children:[(0,s.jsxs)("div",{onClick:e=>nt("one-time",e),role:"button","aria-label":"One-time purchase",children:[(0,s.jsx)("input",{type:"radio",id:"one-time",name:"subscription",checked:"one-time"===Fe,readOnly:!0}),(0,s.jsx)("span",{htmlFor:"one-time",children:"ONE-TIME PURCHASE"})]}),(0,s.jsxs)("div",{onClick:e=>{nt("club",e)},disabled:mt,role:"button","aria-label":"Subscription club",children:[(0,s.jsx)("input",{type:"radio",id:"club",name:"subscription",checked:"club"===Fe,readOnly:!0}),(0,s.jsx)("span",{htmlFor:"",children:"SUBSCRIPTION CLUB"}),(0,s.jsx)("label",{children:mt?"Not available":`Save ${100*t.mockProductDetailData.clubDiscount}%`}),(0,s.jsxs)("button",{onClick:lt,role:"button","aria-label":"Subscription details",children:["Details",(0,s.jsxs)("div",{className:`subscriptionInfo ${X} ${Te&&ee}`,children:[(0,s.jsx)("div",{children:(0,s.jsx)(d.Cross,{})}),(0,s.jsxs)("ul",{children:[(0,s.jsxs)("li",{children:[(0,s.jsx)(u.ArrowRightPopup,{}),"Delivers every 1 month"]}),(0,s.jsxs)("li",{children:[(0,s.jsx)(u.ArrowRightPopup,{}),"Pause, change, or cancel anytime"]}),(0,s.jsxs)("li",{style:"margin-bottom:unset;",children:[(0,s.jsx)(u.ArrowRightPopup,{}),"Early access to new flavors"]})]})]})]})]}),(0,s.jsx)("div",{className:`backgroundPopup ${te} ${Te&&ee}`,onClick:lt,role:"button","aria-label":"Subscription details"})]}),(0,s.jsxs)("div",{className:`labelShipContainer ${se}`,style:{justifyContent:"US"===i.countryCode?"space-between":"center"},children:[(0,s.jsx)("p",{className:`labelShip ${ae} ${We&&ie}`,children:"US"===i.countryCode&&(0,s.jsxs)(r.Fragment,{children:[(0,s.jsx)("span",{children:"★"})," Always Free Shipping"]})}),Be&&(0,s.jsx)(C.GoogleBadge,{})]}),(0,s.jsxs)("div",{onClick:async()=>{if(Ue)return;if(!dt)return;if(0===et)return void Ye(!1);if(!pt)return void Ye(!1);if(Ye(!0),We&&!Ve)return He(!0),Ye(!1),void setTimeout((()=>{He(!1)}),2e3);if(Ke||qe)return void Ye(!1);let a=e.variants[je];je===j.BundleSize["12 Pack"]&&n&&(a=n.variants[0]);const s={sku:a.sku||"",id:a.id,quantity:1,image:a.image.src,product_title:Je?.replace(/<[^>]*>?/gm,""),variant_title:a.title,price:100*et,final_price:100*et,url:`https://starsandhoney.com/products/${e.handle}`,variant_id:Number(a.id),vendor:e.vendor,properties:{_compare_at_price:100*tt,_rc_bundle_status:"club"===Fe?"Subscription":"One-Time"}};"club"===Fe&&(s.selling_plan=4211671273);let r=[s];if(We&&je!==j.BundleSize["12 Pack"]){const e=je===j.BundleSize["20 Pack"]?t.dynamicBoxId20pack:t.dynamicBoxId30pack,n=(new Date).getTime();let l;r=ze.map((t=>{l=je===j.BundleSize["20 Pack"]&&"one-time"===Fe?we[t].variants.find((e=>"10-PACK--"===e.title))?.id||"":je===j.BundleSize["30 Pack"]&&"one-time"===Fe?we[t].variants.find((e=>"10-PACK---"===e.title))?.id||"":je===j.BundleSize["20 Pack"]&&"club"===Fe?we[t].variants.find((e=>"10-PACK----"===e.title))?.id||"":je===j.BundleSize["30 Pack"]&&"club"===Fe?we[t].variants.find((e=>"10-PACK-----"===e.title))?.id||"":we[t].variants.find((e=>"10-PACK--"===e.title))?.id||"";const a={id:l,productId:we[t].id,quantity:1,properties:{_dynamicBoxId:e,_dynamicBoxIndex:n,_rc_bundle_price:et.toString(),_rc_bundle_status:"club"===Fe?"Subscription":"One-Time",_rc_bundle_size:je===j.BundleSize["20 Pack"]?"20-PACK":"30-PACK",_compare_at_price:100*tt}};return ze.forEach(((e,t)=>{a.properties[`_rc_bundle_flavor${t+1}`]=we[e].title,a.properties[`_rc_bundle_flavor${t+1}_ID`]=we[e].id,a.properties[`Flavor ${t+1}`]=we[e].title})),"club"===Fe&&(a.selling_plan=4211671273),a}));const c=(0,h.convertProductToPayload)({product:{...s,variant_title:1===je?"30-PACK":"20-PACK",title:"Signature Flavors Variety Set"},additionalProperties:{"Flavor 1":we[ze[0]].title,"Flavor 2":we[ze[1]].title,...1===je?{"Flavor 3":we[ze[2]].title}:{},_compare_at_price:100*tt,_rc_bundle_status:"club"===Fe?"Subscription":"One-Time"},quantity:1,variant:{...a,title:1===je?"30-PACK":"20-PACK",price:{...a.price,amount:Ce(et).toString()}}});i.addFakeBundle({items:c?.items})}try{i.addToCart({items:r}),(0,g.logOutcome)("AddToBagFromProductPage")}catch(e){console.error(e),Ye(!1)}},role:"button","aria-label":"Add to bag",className:`addButton ${re} \n\t\t\t\t${(We&&!Ve||!pt)&&ce}\n\t\t\t\t${(Ke||qe)&&ce}\n\t\t\t\t${0===et&&ce}\n ${!dt&&ce}\n\t\t\t\t${We&&oe}\n\t\t\t\t${Ue&&me}\n\t\t\t\t`,children:[(0,s.jsxs)("button",{children:[qe?"Unavailable":Ke?"Out of Stock":"Add to bag","US"===i.countryCode&&_e&&(0,s.jsx)("span",{children:" & SHIP FREE"}),Ue&&(0,s.jsx)("span",{className:he,children:(0,s.jsxs)("svg",{height:"18",width:"18",children:[(0,s.jsx)("circle",{r:"7",cx:"9",cy:"9"}),(0,s.jsx)("circle",{"stroke-dasharray":"87.96459430051421 87.96459430051421",r:"7",cx:"9",cy:"9"})]})})]}),Me&&(0,s.jsx)("div",{className:le,children:"Please add more flavors"})]})]})}},70:function(e,t,a){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StepSelection=void 0;const s=a(0),r=a(2),n=i(a(37)),l=a(1),c=a(120),o=a(4),d=a(29),u=a(49),m=a(60),{selected:h,bundles:p,step2Container:v,backButton:x,varietySetContainer:S,varietyItem:j,varietyName:b,title:y,selectedOptionsContainer:f,selectedImagesContainer:g,modifyButton:C,stepIndicatorTitleContainer:P,columnDisplay:N,imageContainer:k,yourVarietySet:$,chosenFlavors:I,varietySetLimitedEdition:w,limitedEditionContainer:B,selectedOptionsLimitedEdition:_,bundleSubheading:D,desktopOnly:E,mobileOnly:F}=n.default;(0,o.setConfig)([{folder:"stars-honey",template:"https://cdn.shopify.com/s/files/1/0664/6100/8105/"},{folder:"stars-honey",template:"https://starsandhoney.com/cdn/shop/files/"}]),t.StepSelection=({productPage:e,bundleSelected:t,setBundleSelected:a,bundlePriceEach:i,varietySetIsComplete:n,setVarietySetIsComplete:o,selectedFlavorSet:D,setSelectedFlavorSet:A,currencySymbol:T,productsExpandYourPalate:O,countryCode:V,featureInternationalization:R})=>{const z=e=>{A((t=>[...t,e])),[...D,e].length===t+2&&o(!0)},L=(0,d.limitedProductByVariety)({productsExpandYourPalate:O,countryCode:V,featureInternationalization:R});return(0,l.useEffect)((()=>{A([]);let e=!1;t===m.BundleSize["12 Pack"]&&(e=!0),o(e)}),[t]),(0,l.useEffect)((()=>{A([]),o(!1)}),[V]),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:`title ${y}`,children:[(0,s.jsx)("span",{children:"STEP 1"}),(0,s.jsx)("span",{children:"CHOOSE YOUR PACK SIZE"})]}),(0,s.jsxs)("div",{className:`bundles ${p}`,children:[(0,s.jsxs)("div",{onClick:()=>a(0),children:[(0,s.jsx)("button",{className:`${t===m.BundleSize["20 Pack"]&&h}`,children:e.options[0].values[0]}),(0,s.jsxs)("span",{children:[`${T}${i[0].toFixed(2)}`," EA."]})]}),(0,s.jsxs)("div",{onClick:()=>a(1),children:[(0,s.jsx)("button",{className:`${t===m.BundleSize["30 Pack"]&&h}`,children:e.options[0].values[1]}),(0,s.jsxs)("span",{children:[`${T}${i[1].toFixed(2)}`," EA."]})]})]}),(0,s.jsx)("div",{style:{minHeight:"200px"},children:t===m.BundleSize["12 Pack"]?(0,s.jsx)(u.TwelvePackDetails,{productsExpandYourPalate:O}):(0,s.jsxs)("div",{className:`step2Container ${v}`,children:[n?(0,s.jsxs)("div",{className:y,children:[(0,s.jsx)("span",{children:"BUNDLE SUMMARY"}),(0,s.jsx)("span",{})]}):(0,s.jsxs)("div",{className:y,children:[(0,s.jsx)("span",{children:"STEP 2"}),(0,s.jsx)("span",{children:"CHOOSE YOUR FLAVORS"})]}),(0,s.jsxs)("div",{className:P,children:[(0,s.jsx)("div",{style:{color:0===D.length?"black":"#a0a0a0"},children:"FIRST FLAVOR"}),(0,s.jsx)(c.ArrowRight,{}),(0,s.jsx)("div",{style:{color:1===D.length?"black":"#a0a0a0"},children:"SECOND FLAVOR"}),(0,s.jsx)(c.ArrowRight,{}),t===m.BundleSize["30 Pack"]&&(0,s.jsxs)(r.Fragment,{children:[(0,s.jsx)("div",{style:{color:2===D.length?"black":"#a0a0a0"},children:"THIRD FLAVOR"}),(0,s.jsx)(c.ArrowRight,{})]}),(0,s.jsx)("div",{style:{color:n?"black":"#a0a0a0"},children:"SUMMARY"})]}),D.length>0&&(0,s.jsx)("button",{className:x,onClick:()=>{A((e=>e.slice(0,-1))),o(!1)},children:"Back"}),!n&&(0,s.jsx)("div",{className:`varietySetContainer ${S}`,style:{minHeight:"140px"},children:O.map(((e,t)=>!e.tags.includes("limited")&&(0,s.jsxs)("div",{className:j,onClick:()=>z(t),children:[(0,s.jsx)("img",{src:e.swatchImage,alt:e.title}),(0,s.jsx)("div",{className:`${b} ${E}`,children:e.title}),(0,s.jsx)("div",{className:`${b} ${F}`,children:e.title.split(/(?=Chip)/).map(((e,t)=>(0,s.jsxs)("div",{children:[e,0===t&&(0,s.jsx)("br",{})]},t)))})]},e.handle)))}),!n&&L.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:w,children:"LIMITED EDITION"}),(0,s.jsx)("div",{className:`varietySetContainer ${S} limitedEditionContainer ${B}`,children:O.map(((e,t)=>e.tags.includes("limited")&&(0,s.jsxs)("div",{className:j,onClick:()=>z(t),children:[(0,s.jsx)("img",{src:e.swatchImage,alt:e.title}),(0,s.jsx)("div",{className:`varietyName ${b} ${E}`,children:e.title}),(0,s.jsx)("div",{className:`varietyName ${b} ${F}`,children:e.varietyNameMobile||e.title})]},e.handle)))})]}),(0,s.jsxs)("div",{className:`${f} ${L.length>0?_:""}`,style:{alignItems:n?"flex-start":"center"},children:[(0,s.jsx)("h3",{children:n?(0,s.jsx)("div",{className:$,children:"Your Variety Set"}):D.length>0?(0,s.jsx)("div",{className:I,children:"CHOSEN FALVORS"}):""}),(0,s.jsx)("div",{className:`${g} ${n&&N}`,children:D.map(((e,t)=>(0,s.jsxs)("div",{className:j,children:[(0,s.jsx)("div",{className:k,"data-index":t+1,children:(0,s.jsx)("img",{src:O[e].swatchImage,alt:O[e].title})}),n&&(0,s.jsx)("span",{children:O[e].title})]},t)))}),n&&(0,s.jsx)("button",{className:C,onClick:()=>{A([]),o(!1)},children:"Modify"})]})]})})]})}},49:function(e,t,a){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TwelvePackDetails=void 0;const s=a(0),r=a(2),n=a(120),l=i(a(37)),c={"Cacao Salt Caramel Peanut":2,"Espresso Vanilla Cinnamon":1,"Dark Chocolate Coconut":2,"The Raspberry Donut":2,"Birthday Cake Chocolate Chip":1,"Peanut Butter Blackberry":2,"Cookies and Cream":2};t.TwelvePackDetails=({isMobile:e=!1,isVarietySet:t=!1,productsExpandYourPalate:a})=>{const i=a.filter((e=>e.tags.includes("limited")));return(0,s.jsxs)("div",{className:`step2Container ${l.default.step2Container} `,children:[(0,s.jsxs)("div",{className:`title ${l.default.title} `,children:[(0,s.jsx)("span",{children:"LIMITED EDITION SET"}),(0,s.jsx)("span",{children:t?"12 BARS + HAT":"12 BARS"})]}),(0,s.jsxs)("div",{className:`stepIndicatorTitleContainer ${l.default.stepIndicatorTitleContainer} `,children:[(0,s.jsx)("div",{className:`flavorsIncluded ${l.default.flavorsIncluded}`,children:a.filter((e=>!e.tags.includes("limited"))).map(((e,t)=>(0,s.jsx)("div",{className:l.default.varietyItem,children:(0,s.jsx)("img",{src:e.swatchImage,alt:"variety"})},t)))}),(0,s.jsxs)("span",{className:`bars ${l.default.bars}`,children:[(0,s.jsx)("b",{children:"12"}),(0,s.jsx)("span",{children:"Bars"})]}),t&&(0,s.jsxs)(r.Fragment,{children:[(0,s.jsx)("div",{className:`plus ${l.default.plus}`,children:"+"}),(0,s.jsxs)("div",{className:`hat ${l.default.hat}`,children:[(0,s.jsx)("img",{src:"https://cdn.shopify.com/s/files/1/0664/6100/8105/files/empty-hat.webp?v=1733423560",alt:"hat"}),(0,s.jsx)("p",{children:"Varsity Hat"})]})]})]}),(0,s.jsxs)("div",{className:`title ${l.default.title} titleFlavors ${l.default.titleFlavors} `,children:[(0,s.jsx)("span",{children:"FLAVORS INCLUDED"}),(0,s.jsx)("span",{})]}),(0,s.jsxs)("div",{className:`stepIndicatorTitleContainer ${l.default.stepIndicatorTitleContainer} `,children:[(0,s.jsx)("div",{className:`stepperTitle ${l.default.stepperTitle}`,children:"12 PACK | ALL FLAVORS"}),(0,s.jsx)(n.ArrowRight,{})]}),i.some((e=>c[e.title]>0))?(0,s.jsx)("div",{className:l.default.varietySetContainer,children:i.filter((e=>c[e.title]>0)).map((t=>(0,s.jsxs)("div",{className:l.default.varietyItem,children:[(0,s.jsx)("img",{src:t.swatchImage,alt:t.title}),(0,s.jsx)("div",{className:`varietyName ${l.default.varietyName}`,style:{cursor:"default"},children:e&&t.title.includes("Chip")?t.title.split(/(?=Chip)/).map(((e,a)=>(0,s.jsxs)("div",{children:[e,0===a?(0,s.jsx)("br",{}):` (${c[t.title]})`]},a))):`${t.title} (${c[t.title]})`})]},t.handle)))}):null]})}},120:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowRight=void 0;const i=a(0);t.ArrowRight=()=>(0,i.jsx)("svg",{width:"7",height:"11",viewBox:"0 0 7 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M1 10.2002L5 5.6002L1 1.0002",stroke:"black","stroke-width":"2"})})},179:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowRightPopup=void 0;const i=a(0);a(2),t.ArrowRightPopup=function({}){return(0,i.jsx)("svg",{"aria-hidden":"true",focusable:"false",role:"presentation",class:"icon icon--wide icon-arrow-right-long",viewBox:"0 0 21 10",children:(0,i.jsx)("path",{d:"M14.982 1.01l.696-.717 3.803 3.691.011-.01.338.348.359.348-.012.01.012.011-.354.343-.343.353-.011-.011-3.803 3.692-.696-.718 3.266-3.17H.5v-1h17.748z"})})}},60:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BundleSize=void 0,t.BundleSize={"20 Pack":0,"30 Pack":1,"12 Pack":2}}}]);