"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[12],{36: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 r=a(0),n=a(1),s=i(a(60)),l=a(24),c=a(59),o=a(37),d=a(221),u=a(22),p=a(95),h=a(45),m=a(11),v=a(23),x=a(55),b=a(4),g=a(50),P=a(223),S=a(96),f=a(224);"undefined"!=typeof window&&(window.Buffer=h.Buffer);const{mainContainer:C,mainContainerVarietySet:j,categoryLabel:k,title:y,titleTwelvePack:w,starsContainer:I,starsRating:N,ratingNumber:$,varietySetContainer:T,linkVarietySet:D,buttonGiftSet:_,linkGiftSet:B,varietySetContainerHolidays:V,varietySetContainerForVarietySetPDP:F,description:A,freeFromContainer:E,freeFromContainerVarietySet:O,nutritionContainer:M,nutritionImageContainer:L,bundles:z,selected:R,price:H,regularPrice:U,regularPriceContainer:Y,regularPriceContainerTwelvePack:K,saleText:G,priceVarietySet:Z,productSubscription:q,productSubscriptionIsVariety:W,subscriptionInfo:J,showContainer:Q,backgroundPopup:X,labelShip:ee,labelShipVarietySet:te,labelShipContainer:ae,addButton:ie,varietyHoverName:re,moreFlavorsAlert:ne,disabled:se,addButtonVarietySet:le,nutritionArrowContainer:ce,badgesContainer:oe,buttonLoading:de,buttonLoader:ue,freeHatContainer:pe,plusSymbol:he,priceContainer:me,currencyCodeStyle:ve,freeBadge:xe,brandHat:be,brandHatItalic:ge,hatFlex:Pe,limitedEdition:Se,shippingDate:fe,shippingDateIcon:Ce,shippingDateText:je}=s.default;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"},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"},t.ProductDetails=function({productPage:e,variant:a,useSharedState:i,twelvePack:h,twelvePackEnabled:pe,bundleSelected:he,setBundleSelected:xe,isSubscriptionEnabled:be,featureSalePrice:ge,featureShippingDate:Pe,featureTwelvePackPrice:ke,isMobile:ye=!1,productsExpandYourPalate:we,featureGoogleBadge:Ie,subscriptionClubData:Ne,featureTwelvePackDesign:$e,featureCompareAtText:Te}){const{showNutrition:De,setShowNutrition:_e,selectedSubscription:Be,setSelectedSubscription:Ve,showSubscriptionInfo:Fe,setShowSubscriptionInfo:Ae,varietySetIsComplete:Ee,setVarietySetIsComplete:Oe,selectedFlavorSet:Me,setSelectedFlavorSet:Le,addFlavorsAlert:ze,setAddFlavorsAlert:Re,loadingAddToCart:He,setLoadingAddToCart:Ue,isOOS:Ye,setIsOOS:Ke,isUnavailable:Ge,setIsUnavailable:Ze,twelvePackVariantId:qe,setTwelvePackVariantId:We,isVarietySet:Je,isTwelvePackSelected:Qe,isTwelvePack:Xe,isUSA:et,title:tt,calculatedPrice:at,calculatedRegularPrice:it,currentPriceVariant:rt,currencySymbol:nt,currencyCode:st,bundlePriceEach:lt,hasLimitedTag:ct,limitedProductDetailData:ot,handleIsInProductsExpandYourPalate:dt,subNotEnabled:ut,isLimitedEdition:pt,isProductAvailableInCurrentCountry:ht,saleText:mt,handleNutritionClick:vt,handleOptionChange:xt,handleSubscriptionInfo:bt,addToBagHandler:gt,onClickVariant:Pt,onClickSubscription:St}=(0,f.useProductDetails)({useSharedState:i,productPage:e,twelvePack:h,bundlePackVarietySetHandle:v.bundlePackVarietySetHandle,twelvePackHandle:v.twelvePackHandle,twelvePackStoreHandle:v.twelvePackStoreHandle,productsExpandYourPalate:we,bundleSelected:he,setBundleSelected:xe,featureTwelvePackPrice:ke,featureTwelvePackDesign:$e,featureSalePrice:ge,featureCompareAtText:Te,isSubscriptionEnabled:be,subscriptionClubData:Ne,dynamicBoxId20pack:t.dynamicBoxId20pack,dynamicBoxId30pack:t.dynamicBoxId30pack,logOutcome:b.logOutcome});return(0,r.jsxs)("div",{className:`${C} ProductDetailsContainer ${(Je||Xe)&&j}`,children:[(0,r.jsx)("p",{className:`categoryLabel ${k}`,children:"Collagen Protein Bar"}),(0,r.jsx)("h1",{className:`${y} title ${w}`,dangerouslySetInnerHTML:{__html:tt}}),(0,r.jsx)("div",{className:`starsContainer ${I}`,children:Je||Xe||e.hideReviews||!e.reviews?.rating_average?e?.subheading&&(0,r.jsxs)("div",{className:`subheadingContainer ${s.default.subheadingContainer}`,children:[(0,r.jsx)("img",{src:"https://cdn.shopify.com/s/files/1/0664/6100/8105/files/isologo.svg",alt:"limited edition"}),(0,r.jsx)("p",{className:`${s.default.subheading} subheading`,children:e?.subheading})]}):(0,r.jsxs)(n.Fragment,{children:[(0,r.jsx)("a",{className:`starsRating ${N}`,href:t.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,u.truncateOneDecimal)(e?.reviews?.rating_average),")"]})]})}),(0,r.jsxs)("div",{className:`swatches varietySetContainer ${T} ${Je&&F} ${pt&&V}`,children:[we.filter((e=>!e.tags.includes("limited"))).map(((e,t)=>(0,r.jsx)("div",{className:"varietyDataSelector",children:(0,r.jsxs)("a",{href:`/products/${e.handle}`,className:"varietyDataSelectorLink",children:[(0,r.jsx)("img",{src:e.swatchImage,alt:`swatch for ${e.title}`}),(0,r.jsx)("div",{className:re,children:e.title})]})},t))),(0,r.jsx)("button",{children:(0,r.jsx)("a",{className:`linkVarietySet ${D}`,href:t.mockProductDetailData.varietyButton.href,children:t.mockProductDetailData.varietyButton.text})})]}),pt&&(ot?.length>0||pe)?(0,r.jsxs)("div",{className:`varietySetContainer ${T} ${Je&&F} ${pt&&V}`,children:[we.filter((e=>e.tags.includes("limited"))).map(((e,t)=>(0,r.jsx)("div",{className:"varietyDataSelector",children:(0,r.jsxs)("a",{href:`/products/${e.handle}`,className:"varietyDataSelectorLink",children:[(0,r.jsx)("img",{src:e.swatchImage,alt:`swatch for ${e.title}`}),(0,r.jsx)("div",{className:re,children:e.title})]})},t))),ot?.length>0&&(0,r.jsx)("p",{class:`limitedEdition ${Se}`,children:"LIMITED EDITION"})]}):null,pe&&!pt&&(0,r.jsx)("button",{className:`buttonGiftSet ${_}`,style:{marginBottom:"10px"},children:(0,r.jsx)("a",{className:`linkGiftSet ${B}`,href:t.mockProductDetailData.varsityHatButton.href,children:t.mockProductDetailData.varsityHatButton.text})}),(0,r.jsx)("p",{className:`description ${A}`,style:{fontSize:Je?"12px":"14px",lineHeight:Je?"18px":"21px",letterSpacing:Je?"normal":"-0.02em;",marginTop:pt?"8px":"0px"},children:Qe&&h?h.description:e.description}),(0,r.jsx)("div",{className:`freeFromContainer ${E} ${Je&&O}`,children:Je||Xe?t.mockProductDetailData.mockTagsForVarietySet.map(((e,t)=>(0,r.jsx)("span",{children:e.substring(1).toLowerCase().includes("sugar")?"STEVIA":e.substring(1)},t))):e.tagsBadge.map(((e,t)=>(0,r.jsx)("span",{children:e.substring(1).toLowerCase().includes("sugar")?"STEVIA":e.substring(1)},t)))}),!Je&&!Xe&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:M,onClick:vt,role:"button","aria-label":"Nutrition & Ingredients",children:[(0,r.jsx)("span",{children:"NUTRITION & INGREDIENTS"}),(0,r.jsx)("span",{className:ce,children:(0,r.jsx)(c.Arrow,{})})]}),De&&(0,r.jsxs)("div",{className:L,children:[(0,r.jsx)("img",{src:e?.nutritionalImage?.reference.image.originalSrc,alt:`nutritional info for ${tt} `,height:150,width:400}),(0,r.jsx)("p",{children:e?.nutritionalIngredients?.value}),(0,r.jsx)("p",{children:e?.allergensPanelText?.value}),(0,r.jsx)("div",{className:oe,children:e?.nutritionalBadges?.references.edges?.map(((e,t)=>(0,r.jsx)("img",{src:e.node.image.originalSrc,alt:e.node.image.altText,style:{height:"30px"}},t)))})]})]}),!Je&&!Xe&&(0,r.jsxs)("div",{className:`bundles ${z}`,children:[e.options[0].values[0]&&(0,r.jsxs)("div",{onClick:()=>Pt(v.BundleSize["20 Pack"]),role:"button","aria-label":"Select bundle",children:[(0,r.jsx)("button",{className:`${he===v.BundleSize["20 Pack"]&&R}`,children:e.options[0].values[0]}),(0,r.jsx)("span",{})]}),e.options[0].values[1]&&(0,r.jsxs)("div",{onClick:()=>Pt(v.BundleSize["30 Pack"]),role:"button","aria-label":"Select bundle 2",children:[(0,r.jsx)("button",{className:`${he===v.BundleSize["30 Pack"]&&R}`,children:e.options[0].values[1]}),(0,r.jsxs)("span",{children:[`${nt}${lt[0].toFixed(2)}`," EA."]})]}),e.options[0].values[2]&&(0,r.jsxs)("div",{onClick:()=>Pt(v.BundleSize["12 Pack"]),role:"button","aria-label":"Select bundle 3",children:[(0,r.jsx)("button",{className:`${Qe&&R}`,children:e.options[0].values[2]}),(0,r.jsxs)("span",{children:[`${nt}${lt[1].toFixed(2)}`," EA."]})]})]}),Je&&(0,r.jsx)(p.StepSelection,{productPage:e,bundleSelected:he,setBundleSelected:xe,bundlePriceEach:lt,varietySetIsComplete:Ee,setVarietySetIsComplete:Oe,selectedFlavorSet:Me,setSelectedFlavorSet:Le,currencySymbol:nt,productsExpandYourPalate:we,countryCode:i.countryCode,featureInternationalization:i.featureInternationalization,twelvePackEnabled:pe}),Xe&&(0,r.jsx)(x.TwelvePackDetails,{isMobile:ye,isVarietySet:Je,productsExpandYourPalate:we}),(0,r.jsxs)("div",{className:`priceContainer ${me}`,children:[(0,r.jsxs)("div",{className:`price ${H} ${Je&&Z}`,children:[i.featureInternationalization&&(0,r.jsx)("div",{className:`currencyCodeStyle ${ve}`,children:`${st} `}),`${nt}${at.toFixed(2)}`]}),!!it&&at!=it&&(0,r.jsxs)("div",{className:`regularPriceContainer ${Y} ${h&&Qe?K:""} ${Je&&Z}`,children:[(0,r.jsxs)("span",{className:`regularPrice ${U}`,children:["$",it.toFixed(2)]}),(0,r.jsx)("span",{className:`sale ${G}`,children:mt})]})]}),(0,r.jsxs)("div",{className:`${q} productSubscription ${Je&&W}`,children:[(0,r.jsxs)("div",{onClick:e=>xt("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"===Be,readOnly:!0}),(0,r.jsx)("span",{htmlFor:"one-time",children:"ONE-TIME PURCHASE"}),!!Ne?.one_time_pill&&(0,r.jsx)("label",{children:Ne?.one_time_pill})]}),(0,r.jsxs)("div",{onClick:St,disabled:ut,role:"button","aria-label":"Subscription club",children:[(0,r.jsx)("input",{type:"radio",id:"club",name:"subscription",checked:"club"===Be,readOnly:!0}),(0,r.jsx)("span",{htmlFor:"",children:"SUBSCRIPTION CLUB"}),(0,r.jsx)("label",{children:ut?"Not available":Ne?.badge_text||"Save 10%"}),!!Ne?.details&&(0,r.jsxs)("button",{onClick:bt,role:"button","aria-label":"Subscription details",children:["Details",(0,r.jsxs)("div",{className:`subscriptionInfo ${J} ${Fe&&Q}`,children:[(0,r.jsx)("div",{children:(0,r.jsx)(o.Cross,{})}),(0,r.jsx)("ul",{children:Ne?.details.map(((e,t)=>(0,r.jsxs)("li",{children:[(0,r.jsx)(d.ArrowRightPopup,{}),e]},t)))})]})]})]}),!!Ne?.text_below&&(0,r.jsx)("div",{className:`textBelow ${s.default.textBelow}`,children:Ne?.text_below}),(0,r.jsx)("div",{className:`backgroundPopup ${X} ${Fe&&Q}`,onClick:bt,role:"button","aria-label":"Subscription details"})]}),Qe&&$e&&et&&Je&&(0,r.jsx)(S.TwelvePackPurchaseOptions,{twelvePack:h,twelvePackEnabled:pe,isSubscriptionEnabled:be,selectedSubscription:Be,onClickSubscription:St,twelvePackVariantId:qe,setTwelvePackVariantId:We,subscriptionClubData:Ne,priceFromVariant:i.priceFromVariant,featureTwelvePackDesign:$e}),(0,r.jsxs)("div",{className:`labelShipContainer ${ae}`,style:{justifyContent:et?"space-between":"center"},children:[(0,r.jsx)("p",{className:`labelShip ${ee} ${Je&&te}`,children:et&&(0,r.jsxs)(n.Fragment,{children:[(0,r.jsx)(P.TruckIcon,{variant:"secondary"}),(0,r.jsx)("span",{children:"Always Free Shipping"})]})}),Ie&&(0,r.jsx)(g.GoogleBadge,{})]}),(0,r.jsxs)("div",{onClick:gt,role:"button","aria-label":"Add to bag",className:`addButton ${ie} \n ${(0,m.isDisabled)({isVarietySet:Je,varietySetIsComplete:Ee,isProductAvailableInCurrentCountry:ht,isTwelvePackSelected:Qe,isOOS:Ye,isUnavailable:Ge,calculatedPrice:at,handleIsInProductsExpandYourPalate:dt})&&se}\n\t\t\t\t${Je&&le}\n\t\t\t\t${He&&de}\n\t\t\t\t`,children:[(0,r.jsxs)("button",{children:[Ge?"Unavailable":Ye?"Out of Stock":"Add to bag",He&&(0,r.jsx)("span",{className:ue,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"})]})})]}),ze&&(0,r.jsx)("div",{className:ne,children:"Please add more flavors"})]}),Pe&&(Qe&&h?.shippingDate||e?.shippingDate)&&(0,r.jsxs)("div",{className:`shippingDate ${fe}`,children:[(0,r.jsx)("div",{className:`shippingDateIcon ${Ce}`,children:(0,r.jsx)(P.TruckIcon,{})}),(0,r.jsx)("div",{className:`shippingDateText ${je}`,children:Qe?h?.shippingDate:e?.shippingDate})]})]})}},95: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 r=a(0),n=a(1),s=i(a(46)),l=a(2),c=a(141),o=a(6),d=a(11),u=a(55),p=a(23),h=a(11),{selected:m,bundles:v,step2Container:x,backButton:b,varietySetContainer:g,varietyItem:P,varietyName:S,title:f,selectedOptionsContainer:C,selectedImagesContainer:j,modifyButton:k,stepIndicatorTitleContainer:y,columnDisplay:w,imageContainer:I,yourVarietySet:N,chosenFlavors:$,varietySetLimitedEdition:T,limitedEditionContainer:D,selectedOptionsLimitedEdition:_,bundleSubheading:B,desktopOnly:V,mobileOnly:F}=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/"}]),t.StepSelection=({productPage:e,bundleSelected:t,setBundleSelected:a,bundlePriceEach:i,varietySetIsComplete:s,setVarietySetIsComplete:o,selectedFlavorSet:A,setSelectedFlavorSet:E,currencySymbol:O,productsExpandYourPalate:M,countryCode:L,featureInternationalization:z,twelvePackEnabled:R})=>{const H=e=>{E((t=>[...t,e])),[...A,e].length===t+2&&o(!0)},U=(0,d.limitedProductByVariety)({productsExpandYourPalate:M,countryCode:L,featureInternationalization:z});return(0,l.useEffect)((()=>{E([]);let e=!1;t===p.BundleSize["12 Pack"]&&(e=!0),o(e)}),[t]),(0,l.useEffect)((()=>{E([]),o(!1)}),[L]),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:`title ${f}`,children:[(0,r.jsx)("span",{children:"STEP 1"}),(0,r.jsx)("span",{children:"CHOOSE YOUR PACK SIZE"})]}),(0,r.jsxs)("div",{className:`bundles ${v}`,children:[R&&(0,r.jsxs)("div",{onClick:()=>a(2),children:[(0,r.jsx)("button",{className:`${t===p.BundleSize["12 Pack"]&&m}`,children:(0,h.toPackSize)("12 Pack")}),(0,r.jsx)("span",{className:B,children:"ALL FLAVORS"})]}),(0,r.jsxs)("div",{onClick:()=>a(0),children:[(0,r.jsx)("button",{className:`${t===p.BundleSize["20 Pack"]&&m}`,children:(0,h.toPackSize)(e.options[0].values[0])}),(0,r.jsxs)("span",{children:[`${O}${i[0].toFixed(2)}`," EA."]})]}),(0,r.jsxs)("div",{onClick:()=>a(1),children:[(0,r.jsx)("button",{className:`${t===p.BundleSize["30 Pack"]&&m}`,children:(0,h.toPackSize)(e.options[0].values[1])}),(0,r.jsxs)("span",{children:[`${O}${i[1].toFixed(2)}`," EA."]})]})]}),(0,r.jsx)("div",{style:{minHeight:"200px"},children:t===p.BundleSize["12 Pack"]?(0,r.jsx)(u.TwelvePackDetails,{productsExpandYourPalate:M}):(0,r.jsxs)("div",{className:`step2Container ${x}`,children:[s?(0,r.jsxs)("div",{className:f,children:[(0,r.jsx)("span",{children:"BUNDLE SUMMARY"}),(0,r.jsx)("span",{})]}):(0,r.jsxs)("div",{className:f,children:[(0,r.jsx)("span",{children:"STEP 2"}),(0,r.jsx)("span",{children:"CHOOSE YOUR FLAVORS"})]}),(0,r.jsxs)("div",{className:y,children:[(0,r.jsx)("div",{style:{color:0===A.length?"black":"#a0a0a0"},children:"FIRST FLAVOR"}),(0,r.jsx)(c.ArrowRight,{}),(0,r.jsx)("div",{style:{color:1===A.length?"black":"#a0a0a0"},children:"SECOND FLAVOR"}),(0,r.jsx)(c.ArrowRight,{}),t===p.BundleSize["30 Pack"]&&(0,r.jsxs)(n.Fragment,{children:[(0,r.jsx)("div",{style:{color:2===A.length?"black":"#a0a0a0"},children:"THIRD FLAVOR"}),(0,r.jsx)(c.ArrowRight,{})]}),(0,r.jsx)("div",{style:{color:s?"black":"#a0a0a0"},children:"SUMMARY"})]}),A.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 ${g}`,style:{minHeight:"140px"},children:M.map(((e,t)=>!e.tags.includes("limited")&&(0,r.jsxs)("div",{className:P,onClick:()=>H(t),children:[(0,r.jsx)("img",{src:e.swatchImage,alt:e.title}),(0,r.jsx)("div",{className:`${S} ${V}`,children:e.title}),(0,r.jsx)("div",{className:`${S} ${F}`,children:e.title.split(/(?=Chip)/).map(((e,t)=>(0,r.jsxs)("div",{children:[e,0===t&&(0,r.jsx)("br",{})]},t)))})]},e.handle)))}),!s&&U.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:T,children:"LIMITED EDITION"}),(0,r.jsx)("div",{className:`varietySetContainer ${g} limitedEditionContainer ${D}`,children:M.map(((e,t)=>e.tags.includes("limited")&&(0,r.jsxs)("div",{className:P,onClick:()=>H(t),children:[(0,r.jsx)("img",{src:e.swatchImage,alt:e.title}),(0,r.jsx)("div",{className:`varietyName ${S} ${V}`,children:e.title}),(0,r.jsx)("div",{className:`varietyName ${S} ${F}`,children:e.varietyNameMobile||e.title})]},e.handle)))})]}),(0,r.jsxs)("div",{className:`${C} ${U.length>0?_:""}`,style:{alignItems:s?"flex-start":"center"},children:[(0,r.jsx)("h3",{children:s?(0,r.jsx)("div",{className:N,children:"Your Variety Set"}):A.length>0?(0,r.jsx)("div",{className:$,children:"CHOSEN FALVORS"}):""}),(0,r.jsx)("div",{className:`${j} ${s&&w}`,children:A.map(((e,t)=>(0,r.jsxs)("div",{className:P,children:[(0,r.jsx)("div",{className:I,"data-index":t+1,children:(0,r.jsx)("img",{src:M[e].swatchImage,alt:M[e].title})}),s&&(0,r.jsx)("span",{children:M[e].title})]},t)))}),s&&(0,r.jsx)("button",{className:k,onClick:()=>{E([]),o(!1)},children:"Modify"})]})]})})]})}},55: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 r=a(0),n=(a(1),a(141)),s=i(a(46)),l=a(222),c={"Cacao Salt Caramel Peanut":2,"Espresso Vanilla Cinnamon":1,"Dark Chocolate Coconut":1,"The Raspberry Donut":1,"Birthday Cake Chocolate Chip":1,"Peanut Butter Blackberry":1,"Cookies and Cream":1,"Cherry Chocolate Waffle Cone":2,"Maple Blueberry Muffin":2};t.TwelvePackDetails=({isMobile:e=!1,isVarietySet:t=!1,productsExpandYourPalate:a})=>(a.filter((e=>e.tags.includes("limited"))),(0,r.jsxs)("div",{className:`step2Container ${s.default.step2Container} `,children:[(0,r.jsxs)("div",{className:`title ${s.default.title} titleFlavors ${s.default.titleFlavors} `,children:[(0,r.jsx)("span",{children:"FLAVORS INCLUDED"}),(0,r.jsx)("span",{})]}),(0,r.jsxs)("div",{className:`stepIndicatorTitleContainer ${s.default.stepIndicatorTitleContainer} `,children:[(0,r.jsx)("div",{className:`stepperTitle ${s.default.stepperTitle}`,children:"12 PACK | ALL FLAVORS"}),(0,r.jsx)(n.ArrowRight,{})]}),a.some((e=>c[e.title]>0))?(0,r.jsx)("div",{className:s.default.varietySetContainer,children:Object.keys(c).map((t=>a.filter((e=>e.title===t)).map((t=>(0,r.jsxs)("div",{className:s.default.varietyItem,children:[(0,r.jsxs)("div",{className:`${s.default.varietyItemImage} varietyItemImage`,children:[(0,r.jsx)("img",{src:t.swatchImage,alt:t.title}),(0,r.jsx)(l.RoundedNumber,{number:c[t.title]})]}),(0,r.jsx)("div",{className:`varietyName ${s.default.varietyName}`,style:{cursor:"default"},children:e&&t.title.includes("Chip")?t.title.split(/(?=Chip)/).map(((e,a)=>(0,r.jsxs)("div",{children:[e,0===a?(0,r.jsx)("br",{}):` (${c[t.title]})`]},a))):`${t.title}`})]},t.handle)))))}):null]}))},141:(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"})})},222:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RoundedNumber=void 0;const i=a(0);t.RoundedNumber=({number:e})=>1===e?(0,i.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("path",{d:"M8 0.5C12.1421 0.5 15.5 3.85786 15.5 8C15.5 12.1421 12.1421 15.5 8 15.5C3.85786 15.5 0.5 12.1421 0.5 8C0.5 3.85786 3.85786 0.5 8 0.5Z",fill:"white"}),(0,i.jsx)("path",{d:"M8 0.5C12.1421 0.5 15.5 3.85786 15.5 8C15.5 12.1421 12.1421 15.5 8 15.5C3.85786 15.5 0.5 12.1421 0.5 8C0.5 3.85786 3.85786 0.5 8 0.5Z",stroke:"black"}),(0,i.jsx)("path",{d:"M7.87 11V6.08H6.19V5.41C7.06 5.4 7.78 4.91 7.99 4H8.79V11H7.87Z",fill:"black"})]}):(0,i.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("path",{d:"M8 0.5C12.1421 0.5 15.5 3.85786 15.5 8C15.5 12.1421 12.1421 15.5 8 15.5C3.85786 15.5 0.5 12.1421 0.5 8C0.5 3.85786 3.85786 0.5 8 0.5Z",fill:"white"}),(0,i.jsx)("path",{d:"M8 0.5C12.1421 0.5 15.5 3.85786 15.5 8C15.5 12.1421 12.1421 15.5 8 15.5C3.85786 15.5 0.5 12.1421 0.5 8C0.5 3.85786 3.85786 0.5 8 0.5Z",stroke:"black"}),(0,i.jsx)("path",{d:"M5.43 11C5.47 9.53 6.1 8.62 7.53 7.79L8 7.51C8.96 6.94 9.39 6.56 9.39 5.84C9.39 5.1 8.81 4.64 8.07 4.64C7.16 4.64 6.59 5.2 6.59 6.1H5.62C5.62 4.69 6.66 3.85 8.07 3.85C9.43 3.85 10.36 4.75 10.36 5.85C10.36 6.85 9.72 7.49 8.78 8.04L8.12 8.43C7.15 9 6.61 9.48 6.46 10.13H10.41V11H5.43Z",fill:"black"})]})},96: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.TwelvePackPurchaseOptions=void 0;const r=a(0),n=(a(1),i(a(61))),s=a(2),l=a(62),c="48635984085225",o="48816676405481",d=({option:e,banner:t,title:a,originalPrice:i,discountedPrice:s,savePercentage:l,isSelected:c,imageCount:o,onSelect:d})=>(0,r.jsxs)("div",{className:`optionCard ${n.default.optionCard} ${c?n.default.selected:""}`,onClick:()=>d(e),children:[(0,r.jsx)("div",{className:`title ${n.default.title}`,children:a}),(0,r.jsx)("div",{className:`radioButton ${n.default.radioButton}`,children:c?(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",children:[(0,r.jsx)("rect",{x:"0.54615",y:"0.530769",width:"15.9231",height:"15.9231",rx:"7.96154",fill:"white",stroke:"black","stroke-width":"1.06154"}),(0,r.jsx)("rect",{x:"3.19231",y:"3.19231",width:"10.6154",height:"10.6154",rx:"5.30769",fill:"black"})]}):(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",children:(0,r.jsx)("rect",{x:"0.54615",y:"0.530769",width:"15.9231",height:"15.9231",rx:"7.96154",fill:"white",stroke:"black","stroke-width":"1.06154"})})}),(0,r.jsxs)("div",{className:`optionContent ${n.default.optionContent}`,children:[(0,r.jsxs)("div",{className:`optionContentContainer ${n.default.optionContentContainer}`,children:[(0,r.jsx)("div",{className:`banner ${n.default.banner}`,children:(0,r.jsx)("span",{children:t})}),(0,r.jsxs)("div",{className:`pricing ${n.default.pricing}`,children:[(0,r.jsxs)("span",{className:`originalPrice ${n.default.originalPrice}`,children:["$",i.toFixed(2)]}),(0,r.jsxs)("span",{className:`discountedPrice ${n.default.discountedPrice}`,children:["$",s.toFixed(2)," per bar"]})]}),(0,r.jsxs)("div",{className:`discountBadge ${n.default.discountBadge}`,children:["SAVE ",l.toFixed(0),"%"]})]}),(0,r.jsx)("div",{className:`productImage ${n.default.productImage}`,children:(0,r.jsx)("div",{className:`imagePlaceholder ${n.default.imagePlaceholder}`,children:Array.from({length:o},((e,t)=>(0,r.jsx)("div",{className:`productPackage ${n.default.productPackage}`,children:(0,r.jsx)("div",{className:`packageBands ${n.default.packageBands}`,children:(0,r.jsx)("img",{src:"https://cdn.shopify.com/s/files/1/0664/6100/8105/files/box-12-pack.webp",alt:"12-PACK box"})})},t)))})})]})]});t.TwelvePackPurchaseOptions=({twelvePack:e,twelvePackEnabled:t,isSubscriptionEnabled:a,selectedSubscription:i,onClickSubscription:u,twelvePackVariantId:p,setTwelvePackVariantId:h,subscriptionClubData:m,priceFromVariant:v,featureTwelvePackDesign:x})=>{const[b,g]=(0,s.useState)(c),P=e=>{g(e),h(e)},S=(0,l.getTwelvePackPrice)({twelvePack:e,regularPrice:!1,selectedSubscription:i,subscriptionClubData:m,priceFromVariant:v,twelvePackVariantId:c,featureTwelvePackDesign:x}),f=(0,l.getTwelvePackPrice)({twelvePack:e,regularPrice:!0,selectedSubscription:i,subscriptionClubData:m,priceFromVariant:v,twelvePackVariantId:c,featureTwelvePackDesign:x}),C=(0,l.getTwelvePackPrice)({twelvePack:e,regularPrice:!1,selectedSubscription:i,subscriptionClubData:m,priceFromVariant:v,twelvePackVariantId:o,featureTwelvePackDesign:x}),j=f/12,k=S/12,y=(0,l.getTwelvePackPrice)({twelvePack:e,regularPrice:!0,selectedSubscription:i,subscriptionClubData:m,priceFromVariant:v,twelvePackVariantId:o,featureTwelvePackDesign:x})/24,w=C/24,I=[{option:c,banner:"Curious? 12 Bars",title:"Buy 1 Tasting Set",originalPrice:j,discountedPrice:k,savePercentage:(j-k)/j*100,isSelected:b===c,imageCount:1},{option:o,banner:"Best Deal | 24 Bars",title:"Buy 2 Tasting Sets",originalPrice:y,discountedPrice:w,savePercentage:(y-w)/y*100,isSelected:b===o,imageCount:2}];return(0,r.jsx)("div",{className:`container ${n.default.container}`,children:(0,r.jsx)("div",{className:`optionsContainer ${n.default.optionsContainer}`,children:I.map((e=>(0,r.jsx)(d,{...e,onSelect:P},e.option)))})})}},221:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowRightPopup=void 0;const i=a(0);a(1),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"})})}},223:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TruckIcon=void 0;const i=a(0);t.TruckIcon=({variant:e="primary"})=>"primary"===e?(0,i.jsxs)("svg",{fill:"none",viewBox:"0 0 17 17",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("g",{"clip-path":"url(#a)",children:(0,i.jsx)("path",{d:"m9.2708 3.5064c0.17893 0 0.35054 0.07108 0.47707 0.19761 0.12652 0.12652 0.19761 0.29813 0.19761 0.47707h2.6987c0.1016 0 0.2019 0.02293 0.2934 0.06709 0.0914 0.04416 0.1717 0.1084 0.2349 0.18794l0.0499 0.07286 2.0241 3.3734 0.0371 0.06949 0.027 0.0722 0.0195 0.07354 0.0108 0.07421 0.0021 0.05735v4.0481c0 0.1789-0.0711 0.3505-0.1976 0.4771-0.1266 0.1265-0.2982 0.1976-0.4771 0.1976h-0.7901c-0.1396 0.3946-0.3982 0.7361-0.74 0.9777s-0.7501 0.3714-1.1686 0.3714c-0.4186 0-0.8269-0.1298-1.1687-0.3714s-0.6003-0.5831-0.74-0.9777h-2.9295c-0.13967 0.3946-0.3982 0.7361-0.74001 0.9777s-0.75009 0.3714-1.1687 0.3714c-0.41858 0-0.82686-0.1298-1.1687-0.3714s-0.60033-0.5831-0.74-0.9777h-0.79005c-0.17894 0-0.35055-0.0711-0.47708-0.1976-0.12652-0.1266-0.1976-0.2982-0.1976-0.4771v-7.4215c0-0.35787 0.14216-0.70109 0.39521-0.95414 0.25306-0.25306 0.59627-0.39522 0.95415-0.39522h6.0721zm-4.0481 8.0962c-0.17894 0-0.35055 0.0711-0.47707 0.1976-0.12653 0.1265-0.19761 0.2982-0.19761 0.4771s0.07108 0.3505 0.19761 0.4771c0.12652 0.1265 0.29813 0.1976 0.47707 0.1976 0.17893 0 0.35054-0.0711 0.47707-0.1976 0.12652-0.1266 0.19761-0.2982 0.19761-0.4771s-0.07109-0.3506-0.19761-0.4771c-0.12653-0.1265-0.29814-0.1976-0.47707-0.1976zm6.7468 0c-0.179 0-0.3506 0.0711-0.4771 0.1976s-0.1976 0.2982-0.1976 0.4771 0.0711 0.3505 0.1976 0.4771c0.1265 0.1265 0.2981 0.1976 0.4771 0.1976 0.1789 0 0.3505-0.0711 0.477-0.1976 0.1266-0.1266 0.1976-0.2982 0.1976-0.4771s-0.071-0.3506-0.1976-0.4771c-0.1265-0.1265-0.2981-0.1976-0.477-0.1976zm0.2928-6.0721h-2.3169v2.024h3.5313l-1.2144-2.024z",fill:"#000"})}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"a",children:(0,i.jsx)("rect",{transform:"translate(.5 .80762)",width:"16.192",height:"16.192",fill:"#fff"})})})]}):(0,i.jsxs)("svg",{fill:"none",viewBox:"0 0 25 25",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsxs)("g",{"clip-path":"url(#a)",stroke:"#111C19","stroke-linecap":"round","stroke-linejoin":"round",children:[(0,i.jsx)("path",{d:"m5.3332 17.108c0 0.5304 0.21072 1.0391 0.58579 1.4142s0.88378 0.5858 1.4142 0.5858 1.0391-0.2107 1.4142-0.5858c0.37507-0.3751 0.58578-0.8838 0.58578-1.4142 0-0.5305-0.21071-1.0392-0.58578-1.4142-0.37508-0.3751-0.88379-0.5858-1.4142-0.5858s-1.0391 0.2107-1.4142 0.5858c-0.37507 0.375-0.58579 0.8837-0.58579 1.4142z"}),(0,i.jsx)("path",{d:"m15.333 17.108c0 0.5304 0.2107 1.0391 0.5857 1.4142 0.3751 0.3751 0.8838 0.5858 1.4143 0.5858 0.5304 0 1.0391-0.2107 1.4142-0.5858 0.375-0.3751 0.5858-0.8838 0.5858-1.4142 0-0.5305-0.2108-1.0392-0.5858-1.4142-0.3751-0.3751-0.8838-0.5858-1.4142-0.5858-0.5305 0-1.0392 0.2107-1.4143 0.5858-0.375 0.375-0.5857 0.8837-0.5857 1.4142z"}),(0,i.jsx)("path",{d:"m5.3332 17.108h-2v-11c0-0.26522 0.10536-0.51957 0.2929-0.70711 0.18753-0.18754 0.44189-0.29289 0.7071-0.29289h9v12m-4 0h6m4 0h2v-6h-8m8 0-3-5h-5"})]}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"a",children:(0,i.jsx)("rect",{transform:"translate(.33325 .10767)",width:"24",height:"24",fill:"#fff"})})})]})},224:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useProductDetails=void 0;const i=a(2),r=a(23),n=a(62),s=a(7),l=a(38),c=a(11);t.useProductDetails=({useSharedState:e,productPage:t,twelvePack:a,bundlePackVarietySetHandle:o,twelvePackHandle:d,twelvePackStoreHandle:u,productsExpandYourPalate:p,bundleSelected:h,setBundleSelected:m,featureTwelvePackPrice:v,featureTwelvePackDesign:x,featureSalePrice:b,featureCompareAtText:g,isSubscriptionEnabled:P,subscriptionClubData:S,dynamicBoxId20pack:f,dynamicBoxId30pack:C,logOutcome:j})=>{const[k,y]=(0,i.useState)(!1),[w,I]=(0,i.useState)("one-time"),[N,$]=(0,i.useState)(!1),[T,D]=(0,i.useState)(!1),[_,B]=(0,i.useState)([]),[V,F]=(0,i.useState)(!1),[A,E]=(0,i.useState)(!1),[O,M]=(0,i.useState)(!1),[L,z]=(0,i.useState)(!1),[R,H]=(0,i.useState)(v),U=t.handle===o,Y=h===r.BundleSize["12 Pack"],K=t.handle===d||t.handle===u,G=e.countryCode===s.DEFAULT_SHOPIFY_COUNTRY.countryCode,Z=Y&&a?(0,c.modifyTitle)(a.title):(0,c.modifyTitle)(t.title),q=(0,n.getCalculatedPrice)({productPage:t,selectedSubscription:w,bundleSelected:h,twelvePack:a,isVarietySet:U,priceFromVariant:e.priceFromVariant,subscriptionClubData:S,twelvePackVariantId:R,featureTwelvePackDesign:x}),W=b?(0,n.getCalculatedPrice)({productPage:t,selectedSubscription:w,bundleSelected:h,twelvePack:a,isVarietySet:U,regularPrice:!0,priceFromVariant:e.priceFromVariant,subscriptionClubData:S,twelvePackVariantId:R,featureTwelvePackDesign:x}):0,J=(0,i.useMemo)((()=>Y&&a?e.priceFromVariant(a.variants[0]):e.priceFromVariant(t.variants[h])),[t.variants,h,e.countryCode,Y,a]),Q=(0,i.useMemo)((()=>J.currencySymbol),[J]),X=(0,i.useMemo)((()=>(0,s.currencyCodeIfneeded)({currencySymbol:J.currencySymbol,featureInternationalization:e.featureInternationalization,countryCode:e.countryCode,currencyCode:J.currencyCode})),[Q,J,e]),ee=(0,i.useMemo)((()=>{const a="club"===w?(S?.discount_percentage||0)/100:0,i=e.priceFromVariant(t.variants[U?0:1]),r=e.priceFromVariant(t.variants[U?1:2]);return[i.amount*(1-a)/20,r.amount*(1-a)/30]}),[t.variants,e.priceFromVariant,w,U,S]),te=t.tags.includes("limited"),ae=(0,c.limitedProductByVariety)({productsExpandYourPalate:p,countryCode:e.countryCode,featureInternationalization:e.featureInternationalization}),ie=(0,i.useMemo)((()=>p.some((e=>e.handle===t.handle))||t.handle===o),[p,t.handle,o]),re=(0,i.useMemo)((()=>{const i=!!t.subscriptionEnabled,n=h===r.BundleSize["12 Pack"]&&(K||U),l=a?.subscriptionEnabled,c=e.countryCode!==s.DEFAULT_SHOPIFY_COUNTRY.countryCode,o=(e=>e.some((e=>{const t=p[e].handle,a=p.find((e=>e.handle===t));return!a?.subscriptionEnabled})))(_);return!P||c||!i||o||n&&!l}),[P,e.countryCode,t.subscriptionEnabled,_,K,h,U,a]),ne=(0,i.useMemo)((()=>p.some((e=>e.tags.includes("limited")))),[p]),se=(0,i.useMemo)((()=>!e.featureInternationalization||J.country===e.countryCode),[e.featureInternationalization,J.country,e.countryCode]),le=(0,i.useMemo)((()=>"fullprice"===g?"Full Price":"Sale"),[g]),ce=(e,t)=>{if(re)return t?.preventDefault(),void I("one-time");I(e)},oe=e=>{m(e);const a=new URLSearchParams(window.location.search),i=t.variants[e];let r=i?.id;i||(r=e.toString()),a.set("variant",r),window.history.replaceState({},"",`${window.location.pathname}?${a.toString()}`)};return(0,i.useEffect)((()=>{e.showCart&&E(!1)}),[e.showCart]),(0,i.useEffect)((()=>{re&&I("one-time")}),[re]),(0,i.useEffect)((()=>{if(a&&Y)return M(a?.variants[0]?.currentlyNotInStock),z(!a?.variants[0]?.availableForSale),void I("one-time");M((()=>0===t.variants[h].quantityAvailable||t.variants[h]?.currentlyNotInStock)),z(!t.variants[h]?.availableForSale),I("one-time")}),[h,a,Y,t.variants]),(0,i.useEffect)((()=>{oe(h)}),[h]),{showNutrition:k,setShowNutrition:y,selectedSubscription:w,setSelectedSubscription:I,showSubscriptionInfo:N,setShowSubscriptionInfo:$,varietySetIsComplete:T,setVarietySetIsComplete:D,selectedFlavorSet:_,setSelectedFlavorSet:B,addFlavorsAlert:V,setAddFlavorsAlert:F,loadingAddToCart:A,setLoadingAddToCart:E,isOOS:O,setIsOOS:M,isUnavailable:L,setIsUnavailable:z,twelvePackVariantId:R,setTwelvePackVariantId:H,isVarietySet:U,isTwelvePackSelected:Y,isTwelvePack:K,isUSA:G,title:Z,calculatedPrice:q,calculatedRegularPrice:W,currentPriceVariant:J,currencySymbol:Q,currencyCode:X,bundlePriceEach:ee,hasLimitedTag:te,limitedProductDetailData:ae,handleIsInProductsExpandYourPalate:ie,subNotEnabled:re,isLimitedEdition:ne,isProductAvailableInCurrentCountry:se,saleText:le,handleNutritionClick:()=>{y(!k)},handleOptionChange:ce,handleSubscriptionInfo:()=>{$(!N)},addToBagHandler:async()=>{if(A)return void console.log("loadingAddToCart");if(!ie)return void console.log("handleIsInProductsExpandYourPalate");if(0===q)return E(!1),void console.log("calculatedPrice === 0");if(!se)return E(!1),void console.log("!isProductAvailableInCurrentCountry");if(E(!0),U&&!T&&!Y)return F(!0),E(!1),setTimeout((()=>{F(!1)}),2e3),void console.log("isVarietySet && !varietySetIsComplete && !isTwelvePackSelected");if(O||L)return E(!1),void console.log("isOOS || isUnavailable");let i=t.variants[h];Y&&a&&(i=a.variants[0],R&&(i=a.variants.find((e=>e.id===R))||i));const n={sku:i.sku||"",id:i.id,quantity:1,image:i.image.src,product_title:Z?.replace(/<[^>]*>?/gm,""),variant_title:i.title,price:100*q,final_price:100*q,url:`https://starsandhoney.com/products/${t.handle}`,variant_id:Number(i.id),vendor:t.vendor,properties:{_compare_at_price:100*W,_rc_bundle_status:"club"===w?"Subscription":"One-Time"}};"club"===w&&(n.selling_plan=S?.selling_plan_id),Y&&a&&R&&(n.id=R,n.variant_id=R);let s=[n];if(U&&!Y){const t=h===r.BundleSize["20 Pack"]?f:C,a=(new Date).getTime();let o;s=_.map((e=>{o=h===r.BundleSize["20 Pack"]&&"one-time"===w?p[e].variants.find((e=>"10-PACK--"===e.title))?.id||"":h===r.BundleSize["30 Pack"]&&"one-time"===w?p[e].variants.find((e=>"10-PACK---"===e.title))?.id||"":h===r.BundleSize["20 Pack"]&&"club"===w?p[e].variants.find((e=>"10-PACK----"===e.title))?.id||"":h===r.BundleSize["30 Pack"]&&"club"===w?p[e].variants.find((e=>"10-PACK-----"===e.title))?.id||"":p[e].variants.find((e=>"10-PACK--"===e.title))?.id||"";const i={id:o,productId:p[e].id,quantity:1,properties:{_dynamicBoxId:t,_dynamicBoxIndex:a,_rc_bundle_price:q.toString(),_rc_bundle_status:"club"===w?"Subscription":"One-Time",_rc_bundle_size:h===r.BundleSize["20 Pack"]?"20-PACK":"30-PACK",_compare_at_price:100*W}};return _.forEach(((e,t)=>{i.properties[`_rc_bundle_flavor${t+1}`]=p[e].title,i.properties[`_rc_bundle_flavor${t+1}_ID`]=p[e].id,i.properties[`Flavor ${t+1}`]=p[e].title})),"club"===w&&(i.selling_plan=S?.selling_plan_id),i}));const d=(0,l.convertProductToPayload)({product:{...n,variant_title:1===h?"30-PACK":"20-PACK",title:"Signature Flavors Variety Set"},additionalProperties:{"Flavor 1":p[_[0]].title,"Flavor 2":p[_[1]].title,...1===h?{"Flavor 3":p[_[2]].title}:{},_compare_at_price:100*W,_rc_bundle_status:"club"===w?"Subscription":"One-Time"},quantity:1,variant:{...i,title:1===h?"30-PACK":"20-PACK",price:{...i.price,amount:(c=q,98===c?98.01:c).toString()}}});e.addFakeBundle({items:d?.items})}var c;try{e.addToCart({items:s}),j("AddToBagFromProductPage")}catch(e){console.error(e),E(!1)}},onClickVariant:oe,onClickSubscription:e=>{ce("club",e)}}}},62:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getCalculatedPrice=t.getTwelvePackPrice=void 0;const i=a(23);t.getTwelvePackPrice=({twelvePack:e,regularPrice:t,selectedSubscription:a,subscriptionClubData:i,priceFromVariant:r,twelvePackVariantId:n,featureTwelvePackDesign:s})=>{const l=e?.variants.find((e=>e?.id===n))??e?.variants[0];if(e){if(t)return Number(l?.compareAtPrice?.amount);if("club"===a){const e=r(l);return Number(e?.amount)*(1-(i?.discount_percentage||0)/100)}return Number(l?.price?.amount)}return Number(76)},t.getCalculatedPrice=({productPage:e,selectedSubscription:a,bundleSelected:r,twelvePack:n,isVarietySet:s,regularPrice:l,priceFromVariant:c,subscriptionClubData:o,twelvePackVariantId:d,featureTwelvePackDesign:u})=>{if(s&&r===i.BundleSize["12 Pack"])return(0,t.getTwelvePackPrice)({twelvePack:n,regularPrice:l,selectedSubscription:a,subscriptionClubData:o,priceFromVariant:c,twelvePackVariantId:d,featureTwelvePackDesign:u});if("club"===a){if(l)return Number(e.variants[r]?.compareAtPrice?.amount);const t=c(e.variants[r]);return Number(t?.amount)*(1-(o?.discount_percentage||0)/100)}{if(l)return Number(e.variants[r]?.compareAtPrice?.amount);const t=c(e.variants[r]);return Number(t?.amount)}}}}]);