import{g as h,bI as N,aN as B,b7 as j,aP as S,h as l,E,c9 as H,n as O,j as t,o,c as s,t as a,a as r,x as f,d as $,_ as p,bG as Y,am as v,aC as k,bH as q,b as T,aT as A,H as X,aj as G,p as U,f as W}from"./D-NqFN1U.js";const J={key:0,class:"tw-bg-nl-green-100 tw-h-[45px] tw-text-nl-yellow-100 tw-font-agenda tw-flex tw-items-center tw-justify-center tw-uppercase tw-font-semibold tw-tracking-wide tw-text-center tw-leading-[1.04] tw-px-5"},K={key:1,class:"tw-bg-nl-green-100 tw-h-[45px] tw-text-nl-yellow-100 tw-font-agenda tw-flex tw-flex-col tw-items-center tw-justify-center tw-uppercase tw-font-semibold tw-tracking-wide tw-text-center tw-leading-[1.04] tw-px-5 max-md:tw-text-[13px]"},Q=["innerHTML"],Z=["innerHTML"],ee={key:2,class:"tw-bg-nl-green-100 tw-h-[45px] tw-text-nl-yellow-100 tw-font-agenda tw-flex tw-flex-col tw-items-center tw-justify-center tw-uppercase tw-font-semibold tw-tracking-wide tw-text-center tw-leading-[1.04] tw-px-5 max-md:tw-text-[13px]"},te={class:"sm:tw-inline md:tw-block tw-max-h-38 tw-overflow-hidden"},ne={key:0},re=["innerHTML"],oe=h({__name:"ReferralBanner",setup(i){const e=N(),w=B(),m=j(),{bannerTypeToShow:d,referralCodeStatus:u,referee:_,referrer:c,referralCode:V}=S(w),x=l(()=>["checkout-processing","success","success-partner"].includes(m.name)?!1:u.value==="EXPIRED"?d.value!=="discount":!!V.value&&d.value==="raf");E(x,n=>{window.referralBannerIsVisible=n});const L=l(()=>{var n;return H((n=e.referralSystemDiscounts)==null?void 0:n.referral)}),g=l(()=>{var n;return H((n=e.referralSystemDiscounts)==null?void 0:n.max_amount_per_order)}),D=l(()=>{var n;return(n=e.referralSystemDiscounts)==null?void 0:n.total_weeks_for_referral_full_amount}),F=l(()=>L!=g),C=l(()=>{var y,I,M,R,P;const n=(y=_.value)!=null&&y.firstName?(I=e.referralSystemDiscounts)==null?void 0:I.raf_float_banner_text_with_name:(M=e.referralSystemDiscounts)==null?void 0:M.raf_float_banner_text;return n?n.replaceAll("[referee_first_name]",((R=_.value)==null?void 0:R.firstName)??"").replaceAll("[referrer_first_name]",(P=c.value)==null?void 0:P.firstName):null}),z=l(()=>{var n;return(n=e.referralSystemDiscounts)==null?void 0:n.raf_float_banner_expired_text}),b=l(()=>{var n;return(n=e.referralSystemDiscounts)==null?void 0:n.raf_float_banner_fineprint});return O(()=>{window.referralBannerIsVisible=x.value}),(n,y)=>t(x)&&t(u)==="EXPIRED"?(o(),s("div",J,a(t(z)),1)):t(x)&&t(C)?(o(),s("div",K,[r("span",{class:"sm:tw-inline md:tw-block tw-max-h-38 tw-overflow-hidden",innerHTML:t(C)},null,8,Q),t(b)?(o(),s("span",{key:0,class:"sm:tw-inline md:tw-block tw-max-h-38 tw-overflow-hidden tw-text-[87.5%] md:tw-pl-2 tw-font-normal",innerHTML:t(b)},null,8,Z)):f("",!0)])):t(x)&&t(c)&&t(g)?(o(),s("div",ee,[r("span",te,[$(" Your friend "+a(t(c).firstName)+" gave you "+a(t(g))+" off your "+a(t(D)),1),t(F)?(o(),s("span",ne," ("+a(t(L))+" total)",1)):f("",!0),$("! Applies at checkout. ")]),t(b)?(o(),s("span",{key:0,class:"sm:tw-inline md:tw-block tw-max-h-38 tw-overflow-hidden tw-text-[87.5%] md:tw-pl-2 tw-font-normal",innerHTML:t(b)},null,8,re)):f("",!0)])):f("",!0)}}),Ie=p(oe,[["__scopeId","data-v-1ffab6cc"]]),se={class:"tw-font-agenda tw-text-[12px] tw-font-semibold tw-text-nl-yellow-100 sm:tw-whitespace-nowrap sm:tw-text-base"},ae={class:"tw-hidden sm:tw-inline"},ie=h({__name:"PromoCodeTierValue",props:{tier:{required:!0}},setup(i){const e=i;return(w,m)=>(o(),s("span",se,[r("span",ae,a(`${e.tier.weekly_ordinal_number}${t(Y)(e.tier.weekly_ordinal_number)}`)+" week: ",1),v(r("span",{class:"tw-font-bold"}," $"+a(e.tier.amount)+" OFF ",513),[[k,e.tier.type==="dollars_off"]]),v(r("span",{class:"tw-font-bold"},a(e.tier.amount)+"% OFF ",513),[[k,e.tier.type==="percent_off"]]),v(r("span",{class:"tw-font-bold"},a(e.tier.amount)+" "+a(t(q)(e.tier.amount,"item"))+" OFF ",513),[[k,e.tier.type==="products_off"]])]))}}),le=p(ie,[["__scopeId","data-v-62cf1be9"]]),ce={},we={width:"39.5",height:"27",viewBox:"0 0 39.5 27",fill:"none",xmlns:"http://www.w3.org/2000/svg"},de=r("path",{d:"M39.5,13.5l-5.9-8.9L19.9,0l0,0L19.7,0l-0.1,0.1l0,0L5.9,4.6L0,13.5l5.7-2V13v5.4V22l14,5l14-5v-4.1V13v-1.5L39.5,13.5z M25.6,7.6L22,1.8l10.9,3.6l4.1,6.1L25.6,7.6z M20.2,14h12.5v3.1l-12.5,2.3V14z M19.2,19.4L6.7,17.6V14h12.5V19.4z M6.6,5.4l10.9-3.6l-3.6,5.8l-11.4,4L6.6,5.4z M6.7,11.1l7.8-2.7l4-6.6l0.6-0.4V13H6.7V11.1z M6.7,18.6l12.5,1.9v5.3L6.7,21.3V18.6z M32.7,21.3l-12.5,4.5v-5.3l12.5-2.3V21.3z M32.7,13H20.2V1.4l0.6,0.4l4,6.6l7.8,2.7V13z",fill:"#ffffff"},null,-1),me=[de];function _e(i,e){return o(),s("svg",we,me)}const fe=p(ce,[["render",_e]]),pe={class:"tw-flex tw-flex-col tw-items-center sm:tw-flex-row sm:tw-space-x-1 tw-font-agenda"},ue={class:"tw-relative"},xe=h({__name:"PromoCodeTierItem",props:{tier:{required:!0}},setup(i){const e=i;return(w,m)=>(o(),s("div",pe,[r("div",ue,[T(fe)]),T(le,{tier:e.tier},null,8,["tier"])]))}}),he=p(xe,[["__scopeId","data-v-360190d8"]]),be={key:0,class:"tw-sticky tw-top-0 tw-right-0 tw-left-0 tw-z-50 floating-bar-promo promo-banner tw-bg-nl-green-100 tw-pt-[6px] tw-pb-1 md:tw-py-4 tw-normal-case"},ge={class:"md:tw-mx-auto md:tw-flex md:tw-w-[95%] md:tw-items-center md:tw-justify-around md:tw-space-x-[30px]"},ye={class:"tw-text-center tw-font-agenda tw-text-[12px] tw-font-semibold tw-text-nl-yellow-100 sm:tw-text-base md:tw-hidden"},ve={class:"tw-mt-2 tw-flex tw-items-center tw-justify-center tw-gap-x-[10px] md:tw-mt-0 tw-font-agenda"},ke={class:"tw-hidden md:tw-block"},Se={class:"tw-font-agenda tw-text-[12px] tw-font-bold tw-text-nl-yellow-100 sm:tw-text-base tw-normal-case"},$e=h({__name:"PromoCodeTiers",setup(i){const e=B(),w=A(),m=l(()=>w.hasPromoCode&&w.hasPromoCodeTiersBanner&&e.bannerTypeToShow==="discount");return l(()=>{var d;return(d=e.promoCodeBanner)==null?void 0:d.description}),(d,u)=>{var _;return t(m)?(o(),s("div",be,[r("div",ge,[r("h4",ye,a(t(e).promoCodeBanner.description),1),r("ul",ve,[r("li",ke,[r("h4",Se,a(t(e).promoCodeBanner.description),1)]),(o(!0),s(X,null,G((_=t(e).promoCodeBanner)==null?void 0:_.tiers,c=>(o(),s("li",{key:c.id},[T(he,{tier:c},null,8,["tier"])]))),128))])])])):f("",!0)}}}),Me=p($e,[["__scopeId","data-v-969c5eea"]]),Te=i=>(U("data-v-1c51ba20"),i=i(),W(),i),Be={key:0,class:"tw-bg-nl-green-100 tw-h-[45px] tw-text-nl-yellow-100 tw-font-agenda tw-flex tw-items-center tw-justify-center tw-uppercase tw-font-semibold tw-tracking-wide tw-text-center tw-leading-[1.04] tw-px-5"},Ve=Te(()=>r("span",{class:"tw-font-bold"},"Click to apply.",-1)),Le=h({__name:"ReferralRedemptionLimitBanner",setup(i){const e=A(),w=B(),{promoCode:m}=S(w),{onReferralRedemptionLimit:d}=S(e),u=()=>{window.location.href=`${window.location.origin}${window.location.pathname}?pc=HEALTHYBABY`},_=l(()=>{var c;return!((c=m.value)!=null&&c.code)&&d.value});return(c,V)=>t(_)?(o(),s("div",Be,[r("button",{onClick:u},[$(" This referral code has reached its redemption limit. Use code HEALTHYBABY instead to get 50% OFF your first week! "),Ve])])):f("",!0)}}),Re=p(Le,[["__scopeId","data-v-1c51ba20"]]);export{Me as P,Ie as R,Re as a}; //# sourceMappingURL=BBF1GmD0.js.map