"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[9],{52:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.sellingPlans=a.convertProductToPayload=void 0,a.convertProductToPayload=({product:e,variant:a,quantity:t=1,additionalProperties:i})=>{let r=100*parseFloat(a.price.amount);return isNaN(r)&&(r="--"),{items:[{id:a.id,quantity:t,image:a.image?.src??"",product_title:e.title,price:r,variant_title:a.title.includes("Default")||a.title===e.title?"":a.title,properties:{...i},final_price:r,variant_id:Number(a.id),url:`/products/${e.handle}`,vendor:e.vendor,sku:a.sku}]}},a.sellingPlans={"peanut-butter-blackberry":4211671273,"the-raspberry-donut":4211671273,"cookies-and-cream":4211671273,"birthday-cake-chocolate-chip":4211671273,"dark-chocolate-coconut":4211671273,"espresso-vanilla-cinnamon":4211671273,"cacao-salt-caramel-peanut":4211671273,"signature-flavors-variety-set":4211671273,"peppermint-mocha":4211671273,"gingerbread-cookie":4211671273,"cherry-chocolate-waffle-cone":4211671273}},10:function(e,a,t){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.ProductDetails=a.mockProductDetailData=a.dynamicBoxId30pack=a.dynamicBoxId20pack=void 0;const r=t(0),n=t(2),s=i(t(107)),l=t(23),c=t(50),o=t(1),d=t(51),u=t(175),m=t(18),p=t(52),v=t(71),h=t(1),y=t(48),b=t(19),x=t(54),k=t(4),f=t(37),g=t(6);"undefined"!=typeof window&&(window.Buffer=y.Buffer);const{mainContainer:S,mainContainerVarietySet:j,categoryLabel:I,title:P,titleTwelvePack:N,starsContainer:C,starsRating:D,ratingNumber:$,varietySetContainer:T,linkVarietySet:_,buttonGiftSet:B,linkGiftSet:F,varietySetContainerHolidays:w,varietySetContainerForVarietySetPDP:O,description:E,freeFromContainer:A,freeFromContainerVarietySet:V,nutritionContainer:H,nutritionImageContainer:L,bundles:z,selected:R,price:M,regularPrice:U,regularPriceContainer:Y,regularPriceContainerTwelvePack:G,saleText:K,priceVarietySet:q,productSubscription:W,productSubscriptionIsVariety:Z,subscriptionInfo:J,showContainer:Q,backgroundPopup:X,labelShip:ee,labelShipVarietySet:ae,addButton:te,varieryHoverName:ie,moreFlavorsAlert:re,disabled:ne,addButtonVarietySet:se,nutritionArrowContainer:le,badgesContainer:ce,buttonLoading:oe,buttonLoader:de,freeHatContainer:ue,plusSymbol:me,priceContainer:pe,currencyCodeStyle:ve,freeBadge:he,brandHat:ye,brandHatItalic:be,hatFlex:xe,limitedEdition:ke}=s.default,fe=e=>98===e?98.01:e;a.dynamicBoxId20pack="640ff717-7950-4cd1-ac10-b096ebe57ac4",a.dynamicBoxId30pack="f665c7d6-7709-48ee-aa76-dff869b362e0",a.mockProductDetailData={rating:{reviewsHref:"https://starsandhoney.com/pages/reviews"},varietyData:[{handle:"cacao-salt-caramel-peanut",isLimited:!1,key:0,productId:"7979585765609",sellingPlan:"4211671273",variantId20packOneTime:"47528498233577",variantId20packSubs:"47531488510185",variantId30packOneTime:"47531487789289",variantId30packSubs:"47531491033321",varietyHref:"/products/cacao-salt-caramel-peanut",varietyImage:(0,k.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/product-ser-cscp.webp?v=1679889773"),varietyName:"Cacao Salt Caramel Peanut"},{handle:"espresso-vanilla-cinnamon",isLimited:!1,key:1,productId:"7979587338473",sellingPlan:"4211671273",variantId20packOneTime:"47531592351977",variantId20packSubs:"47531592909033",variantId30packOneTime:"47531592679657",variantId30packSubs:"47531593892073",varietyHref:"/products/espresso-vanilla-cinnamon",varietyImage:(0,k.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/product-ser-evc.webp?v=1679889773"),varietyName:"Espresso Vanilla Cinnamon"},{handle:"dark-chocolate-coconut",isLimited:!1,key:2,productId:"7974127075561",sellingPlan:"4211671273",variantId20packOneTime:"47531585470697",variantId20packSubs:"47531586715881",variantId30packOneTime:"47531585732841",variantId30packSubs:"47531586945257",varietyHref:"/products/dark-chocolate-coconut",varietyImage:(0,k.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/product-ser-dcc.webp?v=1679889773"),varietyName:"Dark Chocolate Coconut"},{handle:"the-raspberry-donut",isLimited:!1,key:3,productId:"8175526805737",sellingPlan:"4211671273",variantId20packOneTime:"47531597332713",variantId20packSubs:"47531597791465",variantId30packOneTime:"47531597529321",variantId30packSubs:"47531597889769",varietyHref:"/products/the-raspberry-donut",varietyImage:(0,k.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/Screenshot_2023-08-28_at_0.08.57.png?v=1693170564"),varietyName:"The Raspberry Donut"},{handle:"birthday-cake-chocolate-chip",isLimited:!1,key:4,productId:"8175526543593",sellingPlan:"4211671273",variantId20packOneTime:"47531549065449",variantId20packSubs:"47531552669929",variantId30packOneTime:"47531551555817",variantId30packSubs:"47531554046185",varietyHref:"/products/birthday-cake-chocolate-chip",varietyImage:(0,k.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/flavorBirthdayCake.webp?v=1737547811"),varietyName:"Birthday Cake Chocolate Chip"},{handle:"peanut-butter-blackberry",isLimited:!1,key:5,productId:"8175527264489",sellingPlan:"4211671273",variantId20packOneTime:"47531595399401",variantId20packSubs:"47531595792617",variantId30packOneTime:"47531595727081",variantId30packSubs:"47531595890921",varietyHref:"/products/peanut-butter-blackberry",varietyImage:(0,k.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/Screenshot_2023-08-28_at_0.06.22.png?v=1693170402"),varietyName:"Peanut Butter Blackberry"},{handle:"cookies-and-cream",isLimited:!1,key:6,productId:"8175526936809",sellingPlan:"4211671273",variantId20packOneTime:"47531582554345",variantId20packSubs:"47531583013097",variantId30packOneTime:"47531582750953",variantId30packSubs:"47531583209705",varietyHref:"/products/cookies-and-cream",varietyImage:(0,k.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/flavorCookies.webp?v=1737548094"),varietyName:"Cookies and Cream"},{handle:"peppermint-mocha",isLimited:!0,key:7,productId:"8215147774185",sellingPlan:"4211671273",variantId20packOneTime:"47852450709737",variantId20packSubs:"47852450775273",variantId30packOneTime:"47852450742505",variantId30packSubs:"47852450808041",varietyHref:"/products/peppermint-mocha",varietyImage:(0,k.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/product-ser-cscp_a786edca-5e00-48b8-9b27-d6a428c27aa4.webp?v=1729177302"),varietyName:"Peppermint Mocha"},{handle:"gingerbread-cookie",isLimited:!0,key:8,productId:"8778176594153",sellingPlan:"4211671273",variantId20packOneTime:"47852164317417",variantId20packSubs:"47852164382953",variantId30packOneTime:"47852164350185",variantId30packSubs:"47852164415721",varietyHref:"/products/gingerbread-cookie",varietyImage:(0,k.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/gingerbread-thumb.webp?v=1729264305"),varietyName:"Gingerbread Cookie"},{handle:"cherry-chocolate-waffle-cone",isLimited:!0,key:9,productId:"8838921027817",sellingPlan:"4219338985",variantId20packOneTime:"48059240415465",variantId20packSubs:"48059240481001",variantId30packOneTime:"48059240448233",variantId30packSubs:"48059240513769",varietyHref:"/products/cherry-chocolate-waffle-cone",varietyImage:(0,k.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/cherry-chocolate.webp?v=1737726665"),varietyName:"Cherry Chocolate Waffle Cone"}],varietyButton:{href:"/products/signature-flavors-variety-set",text:"Variety Set"},varsityHatButton:{href:"/products/signature-tasting-gift-set-12-pack",text:"GIFT SET"},clubDiscount:.1,mockTagsForVarierySet:["⃠ 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 ge=({productPage:e,selectedSubscription:t,bundleSelected:i,twelvePack:r,isVarietySet:n,regularPrice:s,priceFromVariant:l})=>{if(i===x.BundleSize["12 Pack"]&&n)return Number(r?s?r.variants[0]?.compareAtPrice?.amount:r.variants[0]?.price?.amount:76);if("club"===t){if(s)return Number(e.variants[i]?.compareAtPrice?.amount);const t=l(e.variants[i]);return Number(t?.amount)*(1-a.mockProductDetailData.clubDiscount)}{if(s)return Number(e.variants[i]?.compareAtPrice?.amount);const a=l(e.variants[i]);return Number(a?.amount)}};a.ProductDetails=function({productPage:e,useSharedState:t,limitedEditionFlags:i,twelvePack:s,twelvePackEnabled:y,bundleSelected:he,setBundleSelected:Se,isSubscriptionEnabled:je,featureSalePrice:Ie,isMobile:Pe=!1,productsExpandYourPalate:Ne}){const[Ce,De]=(0,o.useState)(!1),[$e,Te]=(0,o.useState)("one-time"),[_e,Be]=(0,o.useState)(!1),[Fe,we]=(0,o.useState)(!1),[Oe,Ee]=(0,o.useState)([]),[Ae,Ve]=(0,o.useState)(!1),[He,Le]=(0,o.useState)(!1),[ze,Re]=(0,o.useState)(!1),[Me,Ue]=(0,o.useState)(!1),[Ye,Ge]=(0,o.useState)((0,b.modifyTitle)(e.title)),Ke="signature-flavors-variety-set"===e.handle,qe="signature-tasting-gift-set-12-pack"===e.handle||"signature-tasting-gift-set-12-pack-store"===e.handle,We=ge({productPage:e,selectedSubscription:$e,bundleSelected:he,twelvePack:s,isVarietySet:Ke,priceFromVariant:t.priceFromVariant}),Ze=Ie?ge({productPage:e,selectedSubscription:$e,bundleSelected:he,twelvePack:s,isVarietySet:Ke,regularPrice:!0,priceFromVariant:t.priceFromVariant}):0,Je=(0,o.useMemo)((()=>t.priceFromVariant(e.variants[he])),[e.variants,he,t.countryCode]),Qe=(0,o.useMemo)((()=>Je.currencySymbol),[Je]),Xe=(0,o.useMemo)((()=>(0,g.currencyCodeIfneeded)({currencySymbol:Je.currencySymbol,featureInternationalization:t.featureInternationalization,countryCode:t.countryCode,currencyCode:Je.currencyCode})),[Qe,Je,t]),ea=(0,o.useMemo)((()=>{const i="club"===$e?a.mockProductDetailData.clubDiscount:0,r=t.priceFromVariant(e.variants[Ke?0:1]),n=t.priceFromVariant(e.variants[Ke?1:2]);return[r.amount*(1-i)/20,n.amount*(1-i)/30]}),[e.variants,t.priceFromVariant,t.countryCode,$e,Ke]),aa=(e,a)=>{if(la)return a?.preventDefault(),void Te("one-time");Te(e)},ta=()=>{Be(!_e)},ia=e.tags.includes("limited"),ra=(0,b.limitedProductByVariety)({varietyData:a.mockProductDetailData.varietyData,limitedEditionFlags:i,productsExpandYourPalate:Ne,countryCode:t.countryCode,featureInternationalization:t.featureInternationalization}),na=e=>"peppermint-mocha"===e||"gingerbread-cookie"===e||"cherry-chocolate-waffle-cone"===e,sa=(0,o.useMemo)((()=>na(e.handle)||(e=>{let t=!1;return e.forEach((e=>{na(a.mockProductDetailData.varietyData[e].handle)&&(t=!0)})),t})(Oe)),[e.handle,Oe]),la=(0,o.useMemo)((()=>{const e=t.countryCode!==g.DEFAULT_SHOPIFY_COUNTRY.countryCode;return!je||qe||sa||e}),[qe,sa,je,t.countryCode]),ca=(0,o.useMemo)((()=>i.peppermintMochaEnabled||i.gingerbreadCookieEnabled||i.cherryChocolateWaffleConeEnabled),[i]),oa=(0,o.useMemo)((()=>!t.featureInternationalization||Je.country===t.countryCode),[t.featureInternationalization,Je.country,t.countryCode]),da=(0,o.useMemo)((()=>a.mockProductDetailData.varietyData.filter((e=>!e.isLimited&&Ne.some((a=>a.handle===e.handle&&(0,b.isProductsAvailableInCurrentCountry)({product:a,countryCode:t.countryCode})))))),[a.mockProductDetailData.varietyData,Ne]);return(0,h.useEffect)((()=>{t.showCart&&Le(!1)}),[t.showCart]),(0,h.useEffect)((()=>{la&&Te("one-time")}),[la]),(0,h.useEffect)((()=>{if(s)return Re(s?.variants[0]?.currentlyNotInStock),Ue(!s?.variants[0]?.availableForSale),Ge("Special Edition 12 Pack | All Flavors + Varsity Hat"),void Te("one-time");Re(e.variants[he]?.currentlyNotInStock),Ue(!e.variants[he]?.availableForSale),Ge((0,b.modifyTitle)(e.title)),Te("one-time")}),[he]),(0,r.jsxs)("div",{className:`${S} ${(Ke||qe)&&j}`,children:[(0,r.jsx)("p",{className:I,children:"Collagen Protein Bar"}),(0,r.jsx)("h1",{className:`${P} title ${N}`,dangerouslySetInnerHTML:{__html:Ye}}),Ke||qe||ia||!e.reviews?.rating_average?null:(0,r.jsxs)("div",{className:`starsContainer ${C}`,children:[(0,r.jsx)("a",{className:D,href:a.mockProductDetailData.rating.reviewsHref,children:(0,r.jsx)(l.RatingStars,{rating:e.reviews?.rating_average,numberOfStars:5,starDimension:"20px",starRatedColor:"#000000",starEmptyColor:"#00000055"})}),(0,r.jsxs)("p",{className:$,children:["(",(0,m.truncateOneDecimal)(e?.reviews?.rating_average),")"]})]}),(0,r.jsxs)("div",{className:`varietySetContainer ${T} ${Ke&&O} ${ca&&w}`,children:[da.map(((e,a)=>(0,r.jsx)("div",{children:(0,r.jsxs)("a",{href:e.varietyHref,children:[(0,r.jsx)("img",{src:e.varietyImage,alt:"variety"}),(0,r.jsx)("div",{className:ie,children:e.varietyName})]})},a))),(0,r.jsx)("button",{children:(0,r.jsx)("a",{className:`linkVarietySet ${_}`,href:a.mockProductDetailData.varietyButton.href,children:a.mockProductDetailData.varietyButton.text})})]}),ca&&(ra?.length>0||y)?(0,r.jsxs)("div",{className:`varietySetContainer ${T} ${Ke&&O} ${ca&&w}`,children:[ra.map(((e,a)=>(0,r.jsx)("div",{children:(0,r.jsxs)("a",{href:e.varietyHref,children:[(0,r.jsx)("img",{src:e.varietyImage,alt:"variety"}),(0,r.jsx)("div",{className:ie,children:e.varietyName})]})},a))),y&&(0,r.jsx)("button",{className:`buttonGiftSet ${B}`,children:(0,r.jsx)("a",{className:`linkGiftSet ${F}`,href:a.mockProductDetailData.varsityHatButton.href,children:a.mockProductDetailData.varsityHatButton.text})}),ra?.length>0&&(0,r.jsx)("p",{class:`limitedEdition ${ke}`,children:"LIMITED EDITION"})]}):null,y&&!ca&&(0,r.jsx)("button",{className:`buttonGiftSet ${B}`,style:{marginBottom:"10px"},children:(0,r.jsx)("a",{className:`linkGiftSet ${F}`,href:a.mockProductDetailData.varsityHatButton.href,children:a.mockProductDetailData.varsityHatButton.text})}),(0,r.jsx)("p",{className:E,style:{fontSize:Ke?"12px":"14px",lineHeight:Ke?"18px":"21px",letterSpacing:Ke?"normal":"-0.02em;",marginTop:ca?"8px":"0px"},children:e.description}),(0,r.jsx)("div",{className:`freeFromContainer ${A} ${Ke&&V}`,children:Ke||qe?a.mockProductDetailData.mockTagsForVarierySet.map(((e,a)=>(0,r.jsx)("span",{children:e.substring(1).toLowerCase().includes("sugar")?"STEVIA":e.substring(1)},a))):e.tagsBadge.map(((e,a)=>(0,r.jsx)("span",{children:e.substring(1).toLowerCase().includes("sugar")?"STEVIA":e.substring(1)},a)))}),!Ke&&!qe&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:H,onClick:()=>{De(!Ce)},role:"button","aria-label":"Nutrition & Ingredients",children:[(0,r.jsx)("span",{children:"NUTRITION & INGREDIENTS"}),(0,r.jsx)("span",{className:le,children:(0,r.jsx)(c.Arrow,{})})]}),Ce&&(0,r.jsxs)("div",{className:L,children:[(0,r.jsx)("img",{src:e?.nutritionalImage?.reference.image.originalSrc,alt:`nutritional info for ${Ye} `,height:150,width:400}),(0,r.jsx)("p",{children:e?.nutritionalIngredients?.value}),(0,r.jsx)("div",{className:ce,children:e?.nutritionalBadges?.references.edges?.map(((e,a)=>(0,r.jsx)("img",{src:e.node.image.originalSrc,alt:e.node.image.altText,style:{height:"30px"}},a)))})]})]}),!Ke&&!qe&&(0,r.jsxs)("div",{className:`bundles ${z}`,children:[(0,r.jsxs)("div",{onClick:()=>Se(x.BundleSize["20 Pack"]),role:"button","aria-label":"Select bundle",children:[(0,r.jsx)("button",{className:`${he===x.BundleSize["20 Pack"]&&R}`,children:e.options[0].values[0]}),(0,r.jsx)("span",{})]}),(0,r.jsxs)("div",{onClick:()=>Se(x.BundleSize["30 Pack"]),role:"button","aria-label":"Select bundle 2",children:[(0,r.jsx)("button",{className:`${he===x.BundleSize["30 Pack"]&&R}`,children:e.options[0].values[1]}),(0,r.jsxs)("span",{children:[`${Qe}${ea[0].toFixed(2)}`," EA."]})]}),(0,r.jsxs)("div",{onClick:()=>Se(x.BundleSize["12 Pack"]),role:"button","aria-label":"Select bundle 3",children:[(0,r.jsx)("button",{className:`${he===x.BundleSize["12 Pack"]&&R}`,children:e.options[0].values[2]}),(0,r.jsxs)("span",{children:[`${Qe}${ea[1].toFixed(2)}`," EA."]})]})]}),Ke&&(0,r.jsx)(v.StepSelection,{productPage:e,bundleSelected:he,setBundleSelected:Se,bundlePriceEach:ea,varietySetIsComplete:Fe,setVarietySetIsComplete:we,selectedFlavorSet:Oe,setSelectedFlavorSet:Ee,limitedEditionFlags:i,currencySymbol:Qe,productsExpandYourPalate:Ne,countryCode:t.countryCode,featureInternationalization:t.featureInternationalization,productsForVarietySet:da}),qe&&(0,r.jsx)(f.TwelvePackDetails,{isMobile:Pe,mockDataStepper:a.mockProductDetailData,isVarietySet:Ke}),(0,r.jsxs)("div",{className:`priceContainer ${pe}`,children:[(0,r.jsxs)("div",{className:`price ${M} ${Ke&&q}`,children:[t.featureInternationalization&&(0,r.jsx)("div",{className:`currencyCodeStyle ${ve}`,children:`${Xe} `}),`${Qe}${We.toFixed(2)}`]}),!!Ze&&(0,r.jsxs)("div",{className:`regularPriceContainer ${Y} ${s&&he===x.BundleSize["12 Pack"]?G:""} ${Ke&&q}`,children:[(0,r.jsx)("span",{className:`sale ${K}`,children:"Sale"}),(0,r.jsxs)("span",{className:`regularPrice ${U}`,children:["$",Ze.toFixed(2)]})]}),he===x.BundleSize["12 Pack"]&&Ke&&(0,r.jsx)("div",{className:`plusSymbol ${me}`,children:"+"}),he===x.BundleSize["12 Pack"]&&Ke&&(0,r.jsxs)("div",{className:`hatFlex ${xe}`,children:[(0,r.jsx)("div",{className:`free ${ue}`,children:(0,r.jsx)("img",{src:(0,k.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,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:`brandHat ${ye}`,children:"Varsity Hat"}),(0,r.jsx)("div",{className:`brandHat ${be}`,children:"+ embroidered logo"})]})]})]}),(0,r.jsxs)("div",{className:`${W} productSubscription ${Ke&&Z}`,children:[(0,r.jsxs)("div",{onClick:e=>aa("one-time",e),role:"button","aria-label":"One-time purchase",children:[(0,r.jsx)("input",{type:"radio",id:"one-time",name:"subscription",checked:"one-time"===$e,readOnly:!0}),(0,r.jsx)("span",{htmlFor:"one-time",children:"ONE-TIME PURCHASE"})]}),(0,r.jsxs)("div",{onClick:e=>{aa("club",e)},disabled:la,role:"button","aria-label":"Subscription club",children:[(0,r.jsx)("input",{type:"radio",id:"club",name:"subscription",checked:"club"===$e,readOnly:!0}),(0,r.jsx)("span",{htmlFor:"",children:"SUBSCRIPTION CLUB"}),(0,r.jsx)("label",{children:la?"Not available":`Save ${100*a.mockProductDetailData.clubDiscount}%`}),(0,r.jsxs)("button",{onClick:ta,role:"button","aria-label":"Subscription details",children:["Details",(0,r.jsxs)("div",{className:`subscriptionInfo ${J} ${_e&&Q}`,children:[(0,r.jsx)("div",{children:(0,r.jsx)(d.Cross,{})}),(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(u.ArrowRightPopup,{}),"Delivers every 1 month"]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(u.ArrowRightPopup,{}),"Pause, change, or cancel anytime"]}),(0,r.jsxs)("li",{style:"margin-bottom:unset;",children:[(0,r.jsx)(u.ArrowRightPopup,{}),"Early access to new flavors"]})]})]})]})]}),(0,r.jsx)("div",{className:`backgroundPopup ${X} ${_e&&Q}`,onClick:ta,role:"button","aria-label":"Subscription details"})]}),(0,r.jsx)("p",{className:`labelShip ${ee} ${Ke&&ae}`,children:"US"===t.countryCode&&(0,r.jsxs)(n.Fragment,{children:[(0,r.jsx)("span",{children:"★"})," Always Free Shipping"]})}),(0,r.jsxs)("div",{onClick:async()=>{if(He)return;if(0===We)return void Le(!1);if(!oa)return void Le(!1);if(Le(!0),Ke&&!Fe)return Ve(!0),Le(!1),void setTimeout((()=>{Ve(!1)}),2e3);if(ze||Me)return void Le(!1);let i=e.variants[he];he===x.BundleSize["12 Pack"]&&s&&(i=s.variants[0]);const r={sku:i.sku||"",id:i.id,quantity:1,image:i.image.src,product_title:Ye?.replace(/<[^>]*>?/gm,""),variant_title:i.title,price:100*We,final_price:100*We,url:`https://starsandhoney.com/products/${e.handle}`,variant_id:Number(i.id),vendor:e.vendor,properties:{_compare_at_price:100*Ze}};"club"===$e&&(r.selling_plan=p.sellingPlans[e.handle]||null);let n=[r];if(Ke&&he!==x.BundleSize["12 Pack"]){const s=he===x.BundleSize["20 Pack"]?a.dynamicBoxId20pack:a.dynamicBoxId30pack,l=(new Date).getTime();let c;c=he===x.BundleSize["20 Pack"]&&"one-time"===$e?"variantId20packOneTime":he===x.BundleSize["30 Pack"]&&"one-time"===$e?"variantId30packOneTime":he===x.BundleSize["20 Pack"]&&"club"===$e?"variantId20packSubs":he===x.BundleSize["30 Pack"]&&"club"===$e?"variantId30packSubs":"variantId20packOneTime",n=Oe.map((t=>{const i={id:a.mockProductDetailData.varietyData[t][c],productId:a.mockProductDetailData.varietyData[t].productId,quantity:1,properties:{_dynamicBoxId:s,_dynamicBoxIndex:l,_rc_bundle_price:We.toString(),_rc_bundle_status:"club"===$e?"Subscription":"One-Time",_rc_bundle_size:he===x.BundleSize["20 Pack"]?"20-PACK":"30-PACK",_compare_at_price:100*Ze}};return Oe.forEach(((e,t)=>{i.properties[`_rc_bundle_flavor${t+1}`]=a.mockProductDetailData.varietyData[e].varietyName,i.properties[`_rc_bundle_flavor${t+1}_ID`]=a.mockProductDetailData.varietyData[e].productId,i.properties[`Flavor ${t+1}`]=a.mockProductDetailData.varietyData[e].varietyName})),"club"===$e&&(i.selling_plan=p.sellingPlans[e.handle]||null),i}));const o=(0,p.convertProductToPayload)({product:{...r,variant_title:1===he?"30-PACK":"20-PACK",title:"Signature Flavors Variety Set"},additionalProperties:{"Flavor 1":a.mockProductDetailData.varietyData[Oe[0]].varietyName,"Flavor 2":a.mockProductDetailData.varietyData[Oe[1]].varietyName,...1===he?{"Flavor 3":a.mockProductDetailData.varietyData[Oe[2]].varietyName}:{},_compare_at_price:100*Ze},quantity:1,variant:{...i,title:1===he?"30-PACK":"20-PACK",price:{...i.price,amount:fe(We).toString()}}});t.addFakeBundle({items:o?.items})}try{t.addToCart({items:n})}catch(e){console.error(e),Le(!1)}},role:"button","aria-label":"Add to bag",className:`addButton ${te} \n\t\t\t\t${(Ke&&!Fe||!oa)&&ne}\n\t\t\t\t${(ze||Me)&&ne}\n\t\t\t\t${0===We&&ne}\n\t\t\t\t${Ke&&se}\n\t\t\t\t${He&&oe}\n\t\t\t\t`,children:[(0,r.jsxs)("button",{children:[Me?"Unavailable":ze?"Out of Stock":"Add to bag",He&&(0,r.jsx)("span",{className:de,children:(0,r.jsxs)("svg",{height:"18",width:"18",children:[(0,r.jsx)("circle",{r:"7",cx:"9",cy:"9"}),(0,r.jsx)("circle",{"stroke-dasharray":"87.96459430051421 87.96459430051421",r:"7",cx:"9",cy:"9"})]})})]}),Ae&&(0,r.jsx)("div",{className:re,children:"Please add more flavors"})]})]})}},71:function(e,a,t){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.StepSelection=void 0;const r=t(0),n=t(2),s=i(t(53)),l=t(1),c=t(108),o=t(4),d=t(19),u=t(37),m=t(54),p=t(10),{selected:v,bundles:h,step2Container:y,backButton:b,varietySetContainer:x,varietyItem:k,varietyName:f,title:g,selectedOptionsContainer:S,selectedImagesContainer:j,modifyButton:I,stepIndicatorTitleContainer:P,columnDisplay:N,imageContainer:C,yourVarietySet:D,chosenFlavors:$,varietySetLimitedEdition:T,limitedEditionContainer:_,selectedOptionsLimitedEdition:B,bundleSubheading:F,desktopOnly:w,mobileOnly:O}=s.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/"}]),a.StepSelection=({productPage:e,bundleSelected:a,setBundleSelected:t,bundlePriceEach:i,varietySetIsComplete:s,setVarietySetIsComplete:o,selectedFlavorSet:F,setSelectedFlavorSet:E,limitedEditionFlags:A,currencySymbol:V,productsExpandYourPalate:H,countryCode:L,featureInternationalization:z,productsForVarietySet:R})=>{const M=e=>{E((a=>[...a,e])),[...F,e].length===a+2&&o(!0)},U=(0,d.limitedProductByVariety)({varietyData:p.mockProductDetailData.varietyData,limitedEditionFlags:A,productsExpandYourPalate:H,countryCode:L,featureInternationalization:z});return(0,l.useEffect)((()=>{E([]);let e=!1;a===m.BundleSize["12 Pack"]&&(e=!0),o(e)}),[a]),(0,l.useEffect)((()=>{E([]),o(!1)}),[L]),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:g,children:[(0,r.jsx)("span",{children:"STEP 1"}),(0,r.jsx)("span",{children:"CHOOSE YOUR PACK SIZE"})]}),(0,r.jsxs)("div",{className:h,children:[(0,r.jsxs)("div",{onClick:()=>t(0),children:[(0,r.jsx)("button",{className:`${a===m.BundleSize["20 Pack"]&&v}`,children:e.options[0].values[0]}),(0,r.jsxs)("span",{children:[`${V}${i[0].toFixed(2)}`," EA."]})]}),(0,r.jsxs)("div",{onClick:()=>t(1),children:[(0,r.jsx)("button",{className:`${a===m.BundleSize["30 Pack"]&&v}`,children:e.options[0].values[1]}),(0,r.jsxs)("span",{children:[`${V}${i[1].toFixed(2)}`," EA."]})]})]}),(0,r.jsx)("div",{style:{minHeight:"200px"},children:a===m.BundleSize["12 Pack"]?(0,r.jsx)(u.TwelvePackDetails,{mockDataStepper:p.mockProductDetailData}):(0,r.jsxs)("div",{className:`step2Container ${y}`,children:[s?(0,r.jsxs)("div",{className:g,children:[(0,r.jsx)("span",{children:"BUNDLE SUMMARY"}),(0,r.jsx)("span",{})]}):(0,r.jsxs)("div",{className:g,children:[(0,r.jsx)("span",{children:"STEP 2"}),(0,r.jsx)("span",{children:"CHOOSE YOUR FLAVORS"})]}),(0,r.jsxs)("div",{className:P,children:[(0,r.jsx)("div",{style:{color:0===F.length?"black":"#a0a0a0"},children:"FIRST FLAVOR"}),(0,r.jsx)(c.ArrowRight,{}),(0,r.jsx)("div",{style:{color:1===F.length?"black":"#a0a0a0"},children:"SECOND FLAVOR"}),(0,r.jsx)(c.ArrowRight,{}),a===m.BundleSize["30 Pack"]&&(0,r.jsxs)(n.Fragment,{children:[(0,r.jsx)("div",{style:{color:2===F.length?"black":"#a0a0a0"},children:"THIRD FLAVOR"}),(0,r.jsx)(c.ArrowRight,{})]}),(0,r.jsx)("div",{style:{color:s?"black":"#a0a0a0"},children:"SUMMARY"})]}),F.length>0&&(0,r.jsx)("button",{className:b,onClick:()=>{E((e=>e.slice(0,-1))),o(!1)},children:"Back"}),!s&&(0,r.jsx)("div",{className:`varietySetContainer ${x}`,style:{minHeight:"140px"},children:R.map((e=>(0,r.jsxs)("div",{className:k,onClick:()=>M(e.key),children:[(0,r.jsx)("img",{src:e.varietyImage,alt:e.varietyName}),(0,r.jsx)("div",{className:`${f} ${w}`,children:e.varietyName}),(0,r.jsx)("div",{className:`${f} ${O}`,children:e.varietyName.split(/(?=Chip)/).map(((e,a)=>(0,r.jsxs)("div",{children:[e,0===a&&(0,r.jsx)("br",{})]},a)))})]},e.key)))}),!s&&U.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:T,children:"LIMITED EDITION"}),(0,r.jsx)("div",{className:`varietySetContainer ${x} limitedEditionContainer ${_}`,children:U.map((e=>(0,r.jsxs)("div",{className:k,onClick:()=>M(e.key),children:[(0,r.jsx)("img",{src:e.varietyImage,alt:e.varietyName}),(0,r.jsx)("div",{className:`varietyName ${f} ${w}`,children:e.varietyName}),(0,r.jsx)("div",{className:`varietyName ${f} ${O}`,children:e.varietyNameMobile||e.varietyName})]},e.key)))})]}),(0,r.jsxs)("div",{className:`${S} ${U.length>0?B:""}`,style:{alignItems:s?"flex-start":"center"},children:[(0,r.jsx)("h3",{children:s?(0,r.jsx)("div",{className:D,children:"Your Variery Set"}):F.length>0?(0,r.jsx)("div",{className:$,children:"CHOSEN FALVORS"}):""}),(0,r.jsx)("div",{className:`${j} ${s&&N}`,children:F.map(((e,a)=>(0,r.jsxs)("div",{className:k,children:[(0,r.jsx)("div",{className:C,"data-index":a+1,children:(0,r.jsx)("img",{src:p.mockProductDetailData.varietyData[e].varietyImage,alt:p.mockProductDetailData.varietyData[e].varietyName})}),s&&(0,r.jsx)("span",{children:p.mockProductDetailData.varietyData[e].varietyName})]},a)))}),s&&(0,r.jsx)("button",{className:I,onClick:()=>{E([]),o(!1)},children:"Modify"})]})]})})]})}},37:function(e,a,t){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.TwelvePackDetails=void 0;const r=t(0),n=t(2),s=t(108),l=i(t(53)),c=t(10),o={"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};a.TwelvePackDetails=({mockDataStepper:e,isMobile:a=!1,isVarietySet:t=!1})=>{const i=e.varietyData.filter((e=>!e.isLimited));return(0,r.jsxs)("div",{className:`step2Container ${l.default.step2Container} `,children:[(0,r.jsxs)("div",{className:`title ${l.default.title} `,children:[(0,r.jsx)("span",{children:"LIMITED EDITION SET"}),(0,r.jsx)("span",{children:t?"12 BARS + HAT":"12 BARS"})]}),(0,r.jsxs)("div",{className:`stepIndicatorTitleContainer ${l.default.stepIndicatorTitleContainer} `,children:[(0,r.jsx)("div",{className:`flavorsIncluded ${l.default.flavorsIncluded}`,children:c.mockProductDetailData.varietyData.filter((e=>!e.isLimited)).map(((e,a)=>(0,r.jsx)("div",{className:l.default.varietyItem,children:(0,r.jsx)("img",{src:e.varietyImage,alt:"variety"})},a)))}),(0,r.jsxs)("span",{className:`bars ${l.default.bars}`,children:[(0,r.jsx)("b",{children:"12"}),(0,r.jsx)("span",{children:"Bars"})]}),t&&(0,r.jsxs)(n.Fragment,{children:[(0,r.jsx)("div",{className:`plus ${l.default.plus}`,children:"+"}),(0,r.jsxs)("div",{className:`hat ${l.default.hat}`,children:[(0,r.jsx)("img",{src:"https://cdn.shopify.com/s/files/1/0664/6100/8105/files/empty-hat.webp?v=1733423560",alt:"hat"}),(0,r.jsx)("p",{children:"Varsity Hat"})]})]})]}),(0,r.jsxs)("div",{className:`title ${l.default.title} titleFlavors ${l.default.titleFlavors} `,children:[(0,r.jsx)("span",{children:"FLAVORS INCLUDED"}),(0,r.jsx)("span",{})]}),(0,r.jsxs)("div",{className:`stepIndicatorTitleContainer ${l.default.stepIndicatorTitleContainer} `,children:[(0,r.jsx)("div",{className:`stepperTitle ${l.default.stepperTitle}`,children:"12 PACK | ALL FLAVORS"}),(0,r.jsx)(s.ArrowRight,{})]}),(0,r.jsx)("div",{className:l.default.varietySetContainer,children:i.map((e=>(0,r.jsxs)("div",{className:l.default.varietyItem,children:[(0,r.jsx)("img",{src:e.varietyImage,alt:e.varietyName}),(0,r.jsx)("div",{className:`varietyName ${l.default.varietyName}`,style:{cursor:"default"},children:a&&e.varietyName.includes("Chip")?e.varietyName.split(/(?=Chip)/).map(((a,t)=>(0,r.jsxs)("div",{children:[a,0===t?(0,r.jsx)("br",{}):` (${o[e.varietyName]})`]},t))):`${e.varietyName} (${o[e.varietyName]})`})]},e.key)))})]})}},108:(e,a,t)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ArrowRight=void 0;const i=t(0);a.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"})})},175:(e,a,t)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ArrowRightPopup=void 0;const i=t(0);t(2),a.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"})})}},54:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BundleSize=void 0,a.BundleSize={"20 Pack":0,"30 Pack":1,"12 Pack":2}}}]);