yt-uikit 0.8.72-optimistic-line.0 → 0.8.72-optimistic-line.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -1398,7 +1398,7 @@ import e,{useState as t,useEffect as n,useMemo as o,useRef as r,useCallback as i
1398
1398
  border-bottom: 0.8px solid rgb(135 135 135 / 50%);
1399
1399
  width: calc(100% + 2rem);
1400
1400
  }
1401
- `,Dr=({addCartItem:t,handleDecrement:n,handleIncrement:o,removeCartItem:r,isDev:i,themeColor:a,primaryTextColor:l,secondaryTextColor:c,freeProduct:d,themeTextColor:s,showEditOptionOnProducts:p,productPercentageOffMapping:u,removeFreebieFromCart:m,showDeleteOnFreebies:g,freeProductAdjustedCartTotal:x,freebieCouponTemplates:f,cartCheckpoints:y,freebieFlowCheckpoints:b,imageAspectSelector:h,cartComponentsCornerType:v,cartComponentsCornerRadius:w,giftWrapProductId:C,giftWrapVariantId:E,showGiftWrapAsLineItem:k=!1,backgroundSubdued:T,tertiaryColor:S,tertiaryTextColor:$,backgroundColor:B,showDiscountOnMRP:I,checkoutSectionMessage:z,checkoutSectionMessageRedirectLink:F,showFreebieMilestone:N,freebieMilestoneData:P,freeLabelText:D})=>{const A=ae(Ut),{cartLoading:_}=Kt(),R=!_.cartLoading&&A?.items,O=(x??Number(A?.items_subtotal_price))/100;let L=!0,M=0;if(A?.items?.length>0)for(const e of A.items)e?.properties?._isYtFreebie&&(M+=e?.quantity);if(M===A?.item_count&&(L=!1),!R&&0===A?.item_count)return e.createElement(Nr,null);if(!(R&&0!==A?.item_count||A?.items))return null;const j=P?.campaignFilter??"all_campaigns";let V=[];"all_campaigns"===j?V=f??[]:"progress_bar_tiers"===j?V=y??[]:"freebie_campaigns"===j&&(V=b??[]);const W=Array.isArray(V)?V.filter(e=>"free_product"===e?.couponType).slice().sort((e,t)=>e.minimumOrderValue-t.minimumOrderValue).find(e=>e.minimumOrderValue>O):void 0,H=on(A,A?.currency);return e.createElement(e.Fragment,null,A.items.filter(e=>!!k||!(String(e?.id)===sn(String(C))||String(e?.id)===sn(String(E)))).map(d=>{const x=u?.[d?.key],y=f?.find(e=>e?._allVariantIds?.includes(String(d.id)));let b=!1;if(y&&O>=y.minimumOrderValue&&0===d?.line_price&&(b=!0),!k&&(String(d?.id)===sn(String(C))||sn(String(E))===String(d?.id)))return null;const z=d.discounts&&d.discounts.length>0;return d.properties?._isYtFreebie&&(x||b)&&z&&L?e.createElement(e.Fragment,null,e.createElement(Pr,{key:d?.key??d?.id},e.createElement(Ir,{product:d,themeColor:a,isDev:i,primaryTextColor:l,secondaryTextColor:c,themeTextColor:s,showQtySelector:!1,showEditOptionOnProducts:p,percentageOff:x,imageAspectSelector:h,showDeleteOnFreebies:g,removeFreebieFromCart:m,backgroundSubdued:T,tertiaryColor:S,tertiaryTextColor:$,backgroundColor:B,showDiscountOnMRP:!0,freeLabelText:D}))):e.createElement(Pr,{key:d?.key??d?.id},e.createElement(Ir,{themeColor:a,handleDecrement:n,handleIncrement:o,removeCartItem:r,addCartItem:t,product:d,isDev:i,primaryTextColor:l,secondaryTextColor:c,showQtySelector:!d.properties?._isYtFreebie,showEditOptionOnProducts:p,removeFreebieFromCart:m,showDeleteOnFreebies:g,imageAspectSelector:h,cartComponentsCornerRadius:w,cartComponentsCornerType:v,backgroundSubdued:T,tertiaryColor:S,tertiaryTextColor:$,backgroundColor:B,showDiscountOnMRP:I,freeLabelText:D}))}),N&&L&&W&&e.createElement(Fr,{name:W.name,minimumOrderValue:W.minimumOrderValue,currency:H,themeColor:a,tertiaryColor:S,imageUrl:P?.milestoneImage?.path}),mn()&&z&&z.length>0?e.createElement("div",{className:"yt-cart-bottom-bar",style:{fontSize:"10px",textAlign:"center",backgroundColor:S,padding:"3px",boxShadow:"1px 2px 4px 0px #00000061",color:$,marginBottom:"4px",cursor:F?"pointer":"default"},onClick:()=>{F&&(window.location.href=F)}},z):e.createElement("div",{style:{display:"list-item",height:"12px",background:"#87878717"}}))};const Ar=({bundleProducts:t})=>{const n=ae(Ut);return e.createElement("div",{className:"flex flex-col gap-y-2"},e.createElement("div",{className:"flex items-center justify-center"},e.createElement("span",{className:"font-semibold"},"Save more with Bundle!")),e.createElement("div",{className:"flex items-center justify-center gap-2 relative"},e.createElement("div",{className:"w-48 h-48 flex flex-col justify-center border-[1px] p-2 border-[#B0B0B0]"},e.createElement("img",{style:{alignSelf:"center"},width:100,height:100,src:t[0].image}),e.createElement("span",{className:"text-[12.5px] text-[#667085] font-semibold"},rn(t[0].title)),e.createElement("div",null,e.createElement("span",{className:"text-[#344054] text-[14px] font-bold"},on(n,n?.currency),t[0].original_price)," ",e.createElement("span",{className:"line-through text-[#667085] text-[12px]"},on(n,n?.currency),t[0].price)),t[0]?.options_with_values?.length>0&&e.createElement("div",{className:"flex flex-col"},t[0]?.options_with_values?.map(t=>{if("Title"!==t.name)return e.createElement("span",{className:"text-[10px] text-[#868E96]"},t.name,": ",t.value)}))),e.createElement("div",{className:"w-48 h-48 flex flex-col justify-center border-[1px] p-2 border-[#B0B0B0]"},e.createElement("img",{style:{alignSelf:"center"},width:100,height:100,src:t[1].image}),e.createElement("span",{className:"text-[12.5px] text-[#667085] font-semibold"},rn(t[0].title)),e.createElement("div",null,e.createElement("span",{className:"text-[#344054] text-[14px] font-bold"},on(n,n?.currency),t[1].original_price)," ",e.createElement("span",{className:"line-through text-[#667085] text-[12px]"},on(n,n?.currency),t[1].price)),t[1]?.options_with_values?.length>0&&e.createElement("div",{className:"flex flex-col"},t[0]?.options_with_values?.map(t=>{if("Title"!==t.name)return e.createElement("span",{className:"text-[10px] text-[#868E96]"},t.name,": ",t.value)}))),e.createElement("div",{className:"absolute",style:{left:"50%",transform:"translateX(-50%)"}},e.createElement("img",{src:'<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">\r\n<circle cx="17.2797" cy="18.7208" r="15.5219" fill="#3A3A3A" stroke="#767676" stroke-width="1.51433"/>\r\n<path d="M15.5903 25.9172V12.1037H19.0827V25.9172H15.5903ZM10.4297 20.7566V17.2642H24.2433V20.7566H10.4297Z" fill="white"/>\r\n</svg>',alt:"Delivery Truck",height:"25px",width:"42px"}))),e.createElement("div",{className:"flex flex-row justify-between items-center"},e.createElement("div",{className:"flex flex-row gap-x-4 items-center"},e.createElement("span",{className:"text-[#667085] text-[13px]"},"Total Price"),e.createElement("span",null,e.createElement("span",{className:"font-bold text-black"},on(n,n?.currency),t[0].price+t[1].price)," ",e.createElement("span",{className:"text-[#868E96] text-[12px] line-through"},on(n,n?.currency),t[0].original_price+t[1].original_price))),e.createElement("span",{className:"text-[#1ADF5D] text-[10px]"},"save extra"," ",e.createElement("span",{className:"font-semibold"},on(n,n?.currency),t[0].original_price-t[0].price+(t[1].original_price-t[1].price)))),e.createElement("button",{className:"flex flex-row items-center bg-[#333333] gap-x-3 justify-center w-full py-1.5"},e.createElement(ct,{color:"white"}),e.createElement("span",{className:"text-white uppercase text-[14px]"},"Buy Bundle at"," ",e.createElement("span",{className:"font-semibold"},on(n,n?.currency),t[0].price+t[1].price))))},_r=({backgroundSubdued:o,themeColor:i,themeTextColor:a,primaryTextColor:l,cartComponentsCornerRadius:c,applyCouponCode:d,removeDiscount:s,enableConfetti:p,hideAppliedCodes:u})=>{const m=ae(Ut),[g,x]=t(""),[f,y]=t(null),[b,h]=t(!1),[v,w]=t(!1),[C,E]=t(!1),{setLoading:k}=Kt(),[T,S]=t(null),[$,B]=t(!1),[I,z]=t(!1),F=r(null);n(()=>{if(T){B(!0);const e=setTimeout(()=>{B(!1)},4e3),t=setTimeout(()=>{S(null)},4500);return()=>{clearTimeout(e),clearTimeout(t)}}B(!1)},[T]),n(()=>{if(m&&m.discount_codes&&f){const e=m.discount_codes.find(e=>e.code===f);e&&(e.applicable?(S({message:"Coupon applied successfully!",type:"success"}),p&&(z(!0),setTimeout(()=>z(!1),5e3))):S({message:"Coupon not applicable",type:"error"}),y(null))}},[m,f]);const N=async()=>{if(d&&g&&!b){S(null),h(!0),y(g);try{await d(g),x("")}catch(e){S({message:"Failed to apply coupon.",type:"error"}),y(null)}finally{h(!1)}}},P=async()=>{if(s&&!C){S(null),E(!0),k&&k(!0,!1,!1,!0);try{await s()}catch(e){S({message:"Failed to remove coupon.",type:"error"})}finally{k&&k(!1,!1,!1,!1),E(!1)}}},D="error"===T?.type,A=m?.discount_codes?.filter(e=>!1!==e?.applicable);return e.createElement("div",{ref:F,style:{marginTop:"10px",padding:"0 16px",marginBottom:"10px"}},I&&p&&e.createElement(vo,{particleCount:100,spread:160,origin:{y:.6},checkpointPosition:.5}),e.createElement("div",{style:{display:"flex",alignItems:"stretch",border:D?"0.5px solid #FF4E4E":v?`1px solid ${i||"#007bff"}`:"1px solid #e0e0e0",borderRadius:c??4,transition:"border-color 0.5s ease-in-out",overflow:"hidden"}},e.createElement("input",{type:"text",placeholder:"Have a Coupon Code?",value:g,disabled:b,onFocus:()=>{w(!0),setTimeout(()=>{F.current&&window.innerWidth<=768&&F.current.scrollIntoView({behavior:"smooth",block:"nearest"})},300)},onBlur:()=>w(!1),onChange:e=>{x(e.target.value),T&&S(null)},onKeyDown:e=>{"Enter"===e.key&&N()},style:{flexGrow:1,border:"none",padding:"10px",outline:"none",fontSize:"14px",fontWeight:"bold",borderTopLeftRadius:c??4,borderBottomLeftRadius:c??4,backgroundColor:o,color:l,boxShadow:"none",cursor:b?"not-allowed":"auto",margin:"0"}}),e.createElement("button",{onClick:N,disabled:!g||b,style:{padding:"10px 15px",border:"none",backgroundColor:D?"#D98181":g?i||"#007bff":"#cccccc",color:g||D?a||"#ffffff":"#666666",cursor:!g||b?"not-allowed":"pointer",fontSize:"14px",fontWeight:"bold",borderTopRightRadius:c??4,borderBottomRightRadius:c??4,transition:"background-color 0.5s ease-in-out, opacity 0.2s ease-in-out",minWidth:"80px",display:"flex",justifyContent:"center",alignItems:"center",opacity:b?.7:1}},b?e.createElement(rt,{color:a||"#ffffff",size:18}):"Apply")),T&&e.createElement("div",{style:{color:"success"===T.type?"#28a745":"#dc3545",fontSize:"12px",marginTop:"4px",fontStyle:"italic",transition:"opacity 0.5s ease-in-out, transform 0.5s ease-in-out, max-height 0.5s ease-in-out",opacity:$?1:0,transform:$?"translateY(0)":"translateY(-10px)",maxHeight:$?"50px":"0",overflow:"hidden"}},T.message),!u&&A&&A.length>0&&e.createElement("div",{style:{marginTop:"12px",display:"flex",flexDirection:"column",gap:"8px"}},A.map(t=>e.createElement("div",{key:t.code,style:{display:"flex",alignItems:"center",fontSize:"12px",fontStyle:"italic"}},e.createElement("div",{style:{display:"flex",alignItems:"center",color:"#333333",backgroundColor:o,paddingInlineStart:"6px",gap:"4px"}},e.createElement(Je,{size:12,color:"#4D4D4D"}),e.createElement("span",{style:{fontWeight:"bold",fontStyle:"normal"}},t.code)," applied!",e.createElement("button",{onClick:P,disabled:C,style:{background:"#E2E2E2",border:"0.5px solid #B5B5B5",cursor:"pointer",marginLeft:"4px",padding:"0",display:"flex",alignItems:"center"}},C?e.createElement(rt,{color:i||"#007bff",size:14}):e.createElement(be,{size:16})))))))},Rr="yt-coupon-selection-animations",Or=({rewardCoupons:o,applyCouponCode:r,removeDiscount:i,enableConfetti:a,backgroundSubdued:l,themeColor:c,themeTextColor:d,primaryTextColor:s,cartComponentsCornerRadius:p})=>{const u=ae(Ut),[m,g]=t(!1),[x,f]=t(!1),[y,b]=t(null),[h,v]=t(null),[w,C]=t(!1),[E,k]=t(null);n(()=>{(()=>{if(document.getElementById(Rr))return;const e=document.createElement("style");e.id=Rr,e.textContent="\n @keyframes ytSlideUp {\n from { transform: translateY(100%); }\n to { transform: translateY(0); }\n }\n @keyframes ytSlideDown {\n from { transform: translateY(0); }\n to { transform: translateY(100%); }\n }\n @keyframes ytSuccessPulse {\n 0% { box-shadow: 0 0 0 0 rgba(46,125,50,0.4); }\n 50% { box-shadow: 0 0 0 8px rgba(46,125,50,0); }\n 100% { box-shadow: 0 0 0 0 rgba(46,125,50,0); }\n }\n @keyframes ytCheckFade {\n 0% { opacity: 0; transform: scale(0.5); }\n 50% { opacity: 1; transform: scale(1.2); }\n 100% { opacity: 1; transform: scale(1); }\n }\n ",document.head.appendChild(e)})()},[]);const T=u?.discount_codes?.filter(e=>!1!==e?.applicable),S=T?.[0],$=h?o.find(e=>e.couponTemplateId===h):null,B=o;n(()=>{const e=u?.discount_codes?.filter(e=>!1!==e?.applicable)??[];if(null!==h){const t=o.find(e=>e.couponTemplateId===h);return void(t&&e.some(e=>e.code?.toLowerCase()===t.name?.toLowerCase())||v(null))}if(e.length>0){const t=o.find(t=>e.some(e=>e.code?.toLowerCase()===t.name?.toLowerCase()));t&&v(t.couponTemplateId)}},[u?.discount_codes,o,h]),n(()=>{if(m){window.history.pushState({couponSelectionOpen:!0},"");const e=()=>z();return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)}},[m]);const I=()=>{f(!1),g(!0)},z=()=>{f(!0),setTimeout(()=>{g(!1),f(!1)},280)},F=async()=>{if(i&&!w){C(!0);try{await i(),v(null)}catch(e){console.error("Failed to remove coupon:",e)}finally{C(!1)}}},N=()=>{if($){if("percentage_discount_coupon"===$.couponType&&$.discountPercentage)return`saved extra ${$.discountPercentage}% off`;if("fixed_amount_coupon"===$.couponType&&$.discountValue)return`saved extra ₹${$.discountValue} off`}return""},P=(t,n=!1)=>{const o=y===t.couponTemplateId,i=E===t.couponTemplateId,a=!n&&!1===t.isEligible;return e.createElement("div",{key:t.couponTemplateId,style:{border:n?`1.5px solid ${c||"#4A7C59"}`:"1px solid #E8E8E8",borderRadius:p??8,overflow:"hidden",marginBottom:"12px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 3px rgba(0,0,0,0.06)",animation:i?"ytSuccessPulse 0.6s ease-out":void 0,transition:"border-color 0.3s ease, box-shadow 0.3s ease"}},e.createElement("div",{style:{padding:"14px 16px",background:"linear-gradient(135deg, #FFFFFF 60%, #FFF5F5 100%)",position:"relative"}},i&&e.createElement("div",{style:{position:"absolute",top:"10px",right:"10px",width:24,height:24,borderRadius:"50%",backgroundColor:"#2E7D32",display:"flex",alignItems:"center",justifyContent:"center",animation:"ytCheckFade 0.4s ease-out forwards"}},e.createElement("span",{style:{color:"#fff",fontSize:"14px",fontWeight:700}},"✓")),e.createElement("div",{style:{display:"flex",alignItems:"flex-start",gap:"10px"}},e.createElement("div",{style:{width:32,height:32,borderRadius:4,backgroundColor:"#FDE8E8",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},e.createElement(ne,{size:18,color:a?"#6b7280":"#8B0000"})),e.createElement("div",{style:{flex:1}},e.createElement("div",{style:{fontSize:"14px",fontWeight:600,color:s||"#1A1A1A",marginBottom:"2px"}},(e=>"percentage_discount_coupon"===e.couponType&&e.discountPercentage?`Get an additional ${e.discountPercentage}% off`:"fixed_amount_coupon"===e.couponType&&e.discountValue?`Get an additional ₹${e.discountValue} off`:e.name)(t)),e.createElement("div",{style:{fontSize:"12px",color:a?"#6b7280":"#2E7D32",fontWeight:500}},(e=>{if("minimum_quantity"===e.customCartProgressBarCriteria){if(e.quantityThreshold)return`On orders with ${e.quantityThreshold}+ items.`}else if(e.minimumOrderValue)return`On purchases above ₹${e.minimumOrderValue.toLocaleString("en-IN")}.`;return""})(t)))),e.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:"12px",border:"1px solid #E0E0E0",borderRadius:p??6,padding:"8px 12px",backgroundColor:"#FAFAFA"}},e.createElement("span",{style:{fontSize:"14px",fontWeight:700,color:s||"#1A1A1A",letterSpacing:"0.5px"}},t.name),e.createElement("button",{onClick:e=>{e.stopPropagation(),n?F():(async e=>{if(null===y){b(e.couponTemplateId);try{r&&e.name&&await r(e.name),v(e.couponTemplateId),k(e.couponTemplateId),setTimeout(()=>k(null),1200)}catch(e){console.error("Failed to collect coupon:",e)}finally{b(null)}}})(t)},disabled:o||w||a,style:{background:"none",border:"none",color:a?"#6b7280":"#8B0000",fontSize:"14px",fontWeight:600,cursor:o||w||a?"not-allowed":"pointer",padding:0,display:"flex",alignItems:"center",gap:"4px"}},o||n&&w?e.createElement(rt,{color:"#8B0000",size:14}):n?"Remove":"Collect"))),e.createElement("div",{style:{padding:"6px 16px",fontSize:"11px",fontWeight:500,textAlign:"center",backgroundColor:"#FFF0F0",color:a?"#6b7280":"#8B0000",borderTop:"1px solid '#FECACA'"}},(e=>{const t=e.resolvedCollectionNames;return t&&t.length>0?1===t.length?`Applicable on '${t[0]}' collection only.`:`Applicable on '${t.join("', '")}' collections.`:e.allowedCollections?.ids&&e.allowedCollections.ids.length>0?"Applicable on select collections.":"Applicable storewide"})(t)))};return e.createElement(e.Fragment,null,(()=>{const t=!!$||!!S,n=$?.name??S?.code??"",r=$?"#F0FFF4":S?"#F3E8FF":"#FDE8E8",i=$?"#2E7D32":"#C53030",a=$?"#2E7D32":"#666666";return e.createElement("div",{style:{padding:"0 16px",marginTop:"10px",marginBottom:"10px"}},e.createElement("div",{onClick:I,style:{display:"flex",alignItems:"center",padding:"12px 14px",border:"1px solid #E8E8E8",borderRadius:p??8,cursor:"pointer",backgroundColor:"#FFFFFF",transition:"box-shadow 0.2s ease"}},e.createElement("div",{style:{width:36,height:36,borderRadius:6,backgroundColor:r,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginRight:"12px",transition:"background-color 0.3s ease"}},$?e.createElement(Je,{size:20,color:i}):e.createElement(ne,{size:20,color:i})),e.createElement("div",{style:{flex:1}},t?e.createElement(e.Fragment,null,e.createElement("div",{style:{fontSize:"14px",color:s||"#1A1A1A"}},e.createElement("span",{style:{fontWeight:600}},n),e.createElement("span",{style:{fontStyle:"italic"}}," applied!")),e.createElement("div",{style:{fontSize:"12px",color:a,marginTop:"1px",fontStyle:$?"italic":"normal"}},(()=>{if($){if("percentage_discount_coupon"===$.couponType&&$.discountPercentage)return`saved additional ${$.discountPercentage}% on your purchase`;if("fixed_amount_coupon"===$.couponType&&$.discountValue)return`saved additional ₹${$.discountValue} on your purchase`}return"coupon applied on your purchase"})())):e.createElement(e.Fragment,null,e.createElement("div",{style:{fontSize:"14px",fontWeight:700,color:s||"#1A1A1A"}},"Coupons and Offers"),e.createElement("div",{style:{fontSize:"12px",color:"#888888",marginTop:"1px"}},"collect and save more"))),e.createElement(L,{size:14,color:"#888888"})),!t&&o.length>0&&e.createElement("div",{style:{textAlign:"center",fontSize:"12px",fontWeight:600,color:"#2E7D32",backgroundColor:"#F0FFF4",padding:"6px 0",borderRadius:`0 0 ${p??8}px ${p??8}px`,marginTop:"-1px",border:"1px solid #C6F6D5",borderTop:"none"}},o.length,"+ coupons eligible for your order"))})(),m&&e.createElement("div",{style:{position:"fixed",top:0,right:0,bottom:0,width:"457px",maxWidth:"100vw",backgroundColor:"#FFFFFF",zIndex:2147483645,display:"flex",flexDirection:"column",animation:x?"ytSlideDown 0.28s cubic-bezier(0.4, 0, 1, 1) forwards":"ytSlideUp 0.32s cubic-bezier(0, 0, 0.2, 1) forwards"}},e.createElement("div",{style:{display:"flex",alignItems:"center",padding:"16px",flexShrink:0}},e.createElement("button",{onClick:z,style:{background:"none",border:"none",cursor:"pointer",padding:"4px",display:"flex",alignItems:"center",marginRight:"12px"}},e.createElement(M,{size:18,color:s||"#1A1A1A"})),e.createElement("span",{style:{fontSize:"18px",fontWeight:700,color:s||"#1A1A1A"}},"Coupons and Offers")),e.createElement("div",{style:{display:"flex",height:"12px",background:"#87878717"}}),e.createElement("div",{style:{flex:1,overflowY:"auto"}},S&&e.createElement("div",{style:{display:"flex",alignItems:"center",padding:"12px 16px",gap:"8px",flexWrap:"wrap"}},e.createElement(Je,{size:16,color:"#333333"}),e.createElement("span",{style:{fontWeight:700,fontSize:"14px",color:s||"#1A1A1A"}},S.code),e.createElement("span",{style:{fontStyle:"italic",fontSize:"14px",color:s||"#1A1A1A"}},"applied!"),e.createElement("button",{onClick:F,disabled:w,style:{background:"none",border:"none",cursor:w?"not-allowed":"pointer",padding:"2px",display:"flex",alignItems:"center"}},w?e.createElement(rt,{color:"#666",size:14}):e.createElement(be,{size:18,color:"#666666"})),N()&&e.createElement("span",{style:{fontSize:"14px",color:"#2E7D32",fontStyle:"italic"}},N())),e.createElement(_r,{backgroundSubdued:l,themeColor:c,themeTextColor:d,primaryTextColor:s,cartComponentsCornerRadius:p,applyCouponCode:r,removeDiscount:i,enableConfetti:a,hideAppliedCodes:!0}),e.createElement("div",{style:{display:"flex",height:"12px",background:"#87878717"}}),e.createElement("div",{style:{padding:"16px"}},e.createElement("div",{style:{fontSize:"16px",fontWeight:700,color:s||"#1A1A1A",marginBottom:"4px"}},"Collect Coupon"),e.createElement("div",{style:{fontSize:"13px",color:"#888888",marginBottom:"16px"}},"Pick any one coupon deal"),B.map(e=>P(e,e.couponTemplateId===h))))))},Lr=ce("showGSTInput",!1),Mr=c.div`
1401
+ `,Dr=({addCartItem:t,handleDecrement:n,handleIncrement:o,removeCartItem:r,isDev:i,themeColor:a,primaryTextColor:l,secondaryTextColor:c,freeProduct:d,themeTextColor:s,showEditOptionOnProducts:p,productPercentageOffMapping:u,removeFreebieFromCart:m,showDeleteOnFreebies:g,freeProductAdjustedCartTotal:x,freebieCouponTemplates:f,cartCheckpoints:y,freebieFlowCheckpoints:b,imageAspectSelector:h,cartComponentsCornerType:v,cartComponentsCornerRadius:w,giftWrapProductId:C,giftWrapVariantId:E,showGiftWrapAsLineItem:k=!1,backgroundSubdued:T,tertiaryColor:S,tertiaryTextColor:$,backgroundColor:B,showDiscountOnMRP:I,checkoutSectionMessage:z,checkoutSectionMessageRedirectLink:F,showFreebieMilestone:N,freebieMilestoneData:P,freeLabelText:D})=>{const A=ae(Ut),{cartLoading:_}=Kt(),R=!_.cartLoading&&A?.items,O=(x??Number(A?.items_subtotal_price))/100;let L=!0,M=0;if(A?.items?.length>0)for(const e of A.items)e?.properties?._isYtFreebie&&(M+=e?.quantity);if(M===A?.item_count&&(L=!1),!R&&0===A?.item_count)return e.createElement(Nr,null);if(!(R&&0!==A?.item_count||A?.items))return null;const j=P?.campaignFilter??"all_campaigns";let V=[];"all_campaigns"===j?V=f??[]:"progress_bar_tiers"===j?V=y??[]:"freebie_campaigns"===j&&(V=b??[]);const W=Array.isArray(V)?V.filter(e=>"free_product"===e?.couponType).slice().sort((e,t)=>e.minimumOrderValue-t.minimumOrderValue).find(e=>e.minimumOrderValue>O):void 0,H=on(A,A?.currency);return e.createElement(e.Fragment,null,A.items.filter(e=>!!k||!(String(e?.id)===sn(String(C))||String(e?.id)===sn(String(E)))).map(d=>{const x=u?.[d?.key],y=f?.find(e=>e?._allVariantIds?.includes(String(d.id)));let b=!1;if(y&&O>=y.minimumOrderValue&&0===d?.line_price&&(b=!0),!k&&(String(d?.id)===sn(String(C))||sn(String(E))===String(d?.id)))return null;const z=d.discounts&&d.discounts.length>0;return d.properties?._isYtFreebie&&(x||b)&&z&&L?e.createElement(e.Fragment,null,e.createElement(Pr,{key:d?.key??d?.id},e.createElement(Ir,{product:d,themeColor:a,isDev:i,primaryTextColor:l,secondaryTextColor:c,themeTextColor:s,showQtySelector:!1,showEditOptionOnProducts:p,percentageOff:x,imageAspectSelector:h,showDeleteOnFreebies:g,removeFreebieFromCart:m,backgroundSubdued:T,tertiaryColor:S,tertiaryTextColor:$,backgroundColor:B,showDiscountOnMRP:!0,freeLabelText:D}))):e.createElement(Pr,{key:d?.key??d?.id},e.createElement(Ir,{themeColor:a,handleDecrement:n,handleIncrement:o,removeCartItem:r,addCartItem:t,product:d,isDev:i,primaryTextColor:l,secondaryTextColor:c,showQtySelector:!d.properties?._isYtFreebie,showEditOptionOnProducts:p,removeFreebieFromCart:m,showDeleteOnFreebies:g,imageAspectSelector:h,cartComponentsCornerRadius:w,cartComponentsCornerType:v,backgroundSubdued:T,tertiaryColor:S,tertiaryTextColor:$,backgroundColor:B,showDiscountOnMRP:I,freeLabelText:D}))}),N&&L&&W&&e.createElement(Fr,{name:W.name,minimumOrderValue:W.minimumOrderValue,currency:H,themeColor:a,tertiaryColor:S,imageUrl:P?.milestoneImage?.path}),mn()&&z&&z.length>0?e.createElement("div",{className:"yt-cart-bottom-bar",style:{fontSize:"10px",textAlign:"center",backgroundColor:S,padding:"3px",boxShadow:"1px 2px 4px 0px #00000061",color:$,marginBottom:"4px",cursor:F?"pointer":"default"},onClick:()=>{F&&(window.location.href=F)}},z):e.createElement("div",{style:{display:"list-item",height:"12px",background:"#87878717"}}))};const Ar=({bundleProducts:t})=>{const n=ae(Ut);return e.createElement("div",{className:"flex flex-col gap-y-2"},e.createElement("div",{className:"flex items-center justify-center"},e.createElement("span",{className:"font-semibold"},"Save more with Bundle!")),e.createElement("div",{className:"flex items-center justify-center gap-2 relative"},e.createElement("div",{className:"w-48 h-48 flex flex-col justify-center border-[1px] p-2 border-[#B0B0B0]"},e.createElement("img",{style:{alignSelf:"center"},width:100,height:100,src:t[0].image}),e.createElement("span",{className:"text-[12.5px] text-[#667085] font-semibold"},rn(t[0].title)),e.createElement("div",null,e.createElement("span",{className:"text-[#344054] text-[14px] font-bold"},on(n,n?.currency),t[0].original_price)," ",e.createElement("span",{className:"line-through text-[#667085] text-[12px]"},on(n,n?.currency),t[0].price)),t[0]?.options_with_values?.length>0&&e.createElement("div",{className:"flex flex-col"},t[0]?.options_with_values?.map(t=>{if("Title"!==t.name)return e.createElement("span",{className:"text-[10px] text-[#868E96]"},t.name,": ",t.value)}))),e.createElement("div",{className:"w-48 h-48 flex flex-col justify-center border-[1px] p-2 border-[#B0B0B0]"},e.createElement("img",{style:{alignSelf:"center"},width:100,height:100,src:t[1].image}),e.createElement("span",{className:"text-[12.5px] text-[#667085] font-semibold"},rn(t[0].title)),e.createElement("div",null,e.createElement("span",{className:"text-[#344054] text-[14px] font-bold"},on(n,n?.currency),t[1].original_price)," ",e.createElement("span",{className:"line-through text-[#667085] text-[12px]"},on(n,n?.currency),t[1].price)),t[1]?.options_with_values?.length>0&&e.createElement("div",{className:"flex flex-col"},t[0]?.options_with_values?.map(t=>{if("Title"!==t.name)return e.createElement("span",{className:"text-[10px] text-[#868E96]"},t.name,": ",t.value)}))),e.createElement("div",{className:"absolute",style:{left:"50%",transform:"translateX(-50%)"}},e.createElement("img",{src:'<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">\r\n<circle cx="17.2797" cy="18.7208" r="15.5219" fill="#3A3A3A" stroke="#767676" stroke-width="1.51433"/>\r\n<path d="M15.5903 25.9172V12.1037H19.0827V25.9172H15.5903ZM10.4297 20.7566V17.2642H24.2433V20.7566H10.4297Z" fill="white"/>\r\n</svg>',alt:"Delivery Truck",height:"25px",width:"42px"}))),e.createElement("div",{className:"flex flex-row justify-between items-center"},e.createElement("div",{className:"flex flex-row gap-x-4 items-center"},e.createElement("span",{className:"text-[#667085] text-[13px]"},"Total Price"),e.createElement("span",null,e.createElement("span",{className:"font-bold text-black"},on(n,n?.currency),t[0].price+t[1].price)," ",e.createElement("span",{className:"text-[#868E96] text-[12px] line-through"},on(n,n?.currency),t[0].original_price+t[1].original_price))),e.createElement("span",{className:"text-[#1ADF5D] text-[10px]"},"save extra"," ",e.createElement("span",{className:"font-semibold"},on(n,n?.currency),t[0].original_price-t[0].price+(t[1].original_price-t[1].price)))),e.createElement("button",{className:"flex flex-row items-center bg-[#333333] gap-x-3 justify-center w-full py-1.5"},e.createElement(ct,{color:"white"}),e.createElement("span",{className:"text-white uppercase text-[14px]"},"Buy Bundle at"," ",e.createElement("span",{className:"font-semibold"},on(n,n?.currency),t[0].price+t[1].price))))},_r=({backgroundSubdued:o,themeColor:i,themeTextColor:a,primaryTextColor:l,cartComponentsCornerRadius:c,applyCouponCode:d,removeDiscount:s,enableConfetti:p,hideAppliedCodes:u})=>{const m=ae(Ut),[g,x]=t(""),[f,y]=t(null),[b,h]=t(!1),[v,w]=t(!1),[C,E]=t(!1),{setLoading:k}=Kt(),[T,S]=t(null),[$,B]=t(!1),[I,z]=t(!1),F=r(null);n(()=>{if(T){B(!0);const e=setTimeout(()=>{B(!1)},4e3),t=setTimeout(()=>{S(null)},4500);return()=>{clearTimeout(e),clearTimeout(t)}}B(!1)},[T]),n(()=>{if(m&&m.discount_codes&&f){const e=m.discount_codes.find(e=>e.code===f);e&&(e.applicable?(S({message:"Coupon applied successfully!",type:"success"}),p&&(z(!0),setTimeout(()=>z(!1),5e3))):S({message:"Coupon not applicable",type:"error"}),y(null))}},[m,f]);const N=async()=>{if(d&&g&&!b){S(null),h(!0),y(g);try{await d(g),x("")}catch(e){S({message:"Failed to apply coupon.",type:"error"}),y(null)}finally{h(!1)}}},P=async()=>{if(s&&!C){S(null),E(!0),k&&k(!0,!1,!1,!0);try{await s()}catch(e){S({message:"Failed to remove coupon.",type:"error"})}finally{k&&k(!1,!1,!1,!1),E(!1)}}},D="error"===T?.type,A=m?.discount_codes?.filter(e=>!1!==e?.applicable);return e.createElement("div",{ref:F,style:{marginTop:"10px",padding:"0 16px",marginBottom:"10px"}},I&&p&&e.createElement(vo,{particleCount:100,spread:160,origin:{y:.6},checkpointPosition:.5}),e.createElement("div",{style:{display:"flex",alignItems:"stretch",border:D?"0.5px solid #FF4E4E":v?`1px solid ${i||"#007bff"}`:"1px solid #e0e0e0",borderRadius:c??4,transition:"border-color 0.5s ease-in-out",overflow:"hidden"}},e.createElement("input",{type:"text",placeholder:"Have a Coupon Code?",value:g,disabled:b,onFocus:()=>{w(!0),setTimeout(()=>{F.current&&window.innerWidth<=768&&F.current.scrollIntoView({behavior:"smooth",block:"nearest"})},300)},onBlur:()=>w(!1),onChange:e=>{x(e.target.value),T&&S(null)},onKeyDown:e=>{"Enter"===e.key&&N()},style:{flexGrow:1,border:"none",padding:"10px",outline:"none",fontSize:"14px",fontWeight:"bold",borderTopLeftRadius:c??4,borderBottomLeftRadius:c??4,backgroundColor:o,color:l,boxShadow:"none",cursor:b?"not-allowed":"auto",margin:"0"}}),e.createElement("button",{onClick:N,disabled:!g||b,style:{padding:"10px 15px",border:"none",backgroundColor:D?"#D98181":g?i||"#007bff":"#cccccc",color:g||D?a||"#ffffff":"#666666",cursor:!g||b?"not-allowed":"pointer",fontSize:"14px",fontWeight:"bold",borderTopRightRadius:c??4,borderBottomRightRadius:c??4,transition:"background-color 0.5s ease-in-out, opacity 0.2s ease-in-out",minWidth:"80px",display:"flex",justifyContent:"center",alignItems:"center",opacity:b?.7:1}},b?e.createElement(rt,{color:a||"#ffffff",size:18}):"Apply")),T&&e.createElement("div",{style:{color:"success"===T.type?"#28a745":"#dc3545",fontSize:"12px",marginTop:"4px",fontStyle:"italic",transition:"opacity 0.5s ease-in-out, transform 0.5s ease-in-out, max-height 0.5s ease-in-out",opacity:$?1:0,transform:$?"translateY(0)":"translateY(-10px)",maxHeight:$?"50px":"0",overflow:"hidden"}},T.message),!u&&A&&A.length>0&&e.createElement("div",{style:{marginTop:"12px",display:"flex",flexDirection:"column",gap:"8px"}},A.map(t=>e.createElement("div",{key:t.code,style:{display:"flex",alignItems:"center",fontSize:"12px",fontStyle:"italic"}},e.createElement("div",{style:{display:"flex",alignItems:"center",color:"#333333",backgroundColor:o,paddingInlineStart:"6px",gap:"4px"}},e.createElement(Je,{size:12,color:"#4D4D4D"}),e.createElement("span",{style:{fontWeight:"bold",fontStyle:"normal"}},t.code)," applied!",e.createElement("button",{onClick:P,disabled:C,style:{background:"#E2E2E2",border:"0.5px solid #B5B5B5",cursor:"pointer",marginLeft:"4px",padding:"0",display:"flex",alignItems:"center"}},C?e.createElement(rt,{color:i||"#007bff",size:14}):e.createElement(be,{size:16})))))))},Rr="yt-coupon-selection-animations",Or=({rewardCoupons:o,applyCouponCode:r,removeDiscount:i,enableConfetti:a,backgroundSubdued:l,themeColor:c,themeTextColor:d,primaryTextColor:s,cartComponentsCornerRadius:p})=>{const u=ae(Ut),[m,g]=t(!1),[x,f]=t(!1),[y,b]=t(null),[h,v]=t(null),[w,C]=t(!1),[E,k]=t(null);n(()=>{(()=>{if(document.getElementById(Rr))return;const e=document.createElement("style");e.id=Rr,e.textContent="\n @keyframes ytSlideUp {\n from { transform: translateY(100%); }\n to { transform: translateY(0); }\n }\n @keyframes ytSlideDown {\n from { transform: translateY(0); }\n to { transform: translateY(100%); }\n }\n @keyframes ytSuccessPulse {\n 0% { box-shadow: 0 0 0 0 rgba(46,125,50,0.4); }\n 50% { box-shadow: 0 0 0 8px rgba(46,125,50,0); }\n 100% { box-shadow: 0 0 0 0 rgba(46,125,50,0); }\n }\n @keyframes ytCheckFade {\n 0% { opacity: 0; transform: scale(0.5); }\n 50% { opacity: 1; transform: scale(1.2); }\n 100% { opacity: 1; transform: scale(1); }\n }\n ",document.head.appendChild(e)})()},[]);const T=u?.discount_codes?.filter(e=>!1!==e?.applicable),S=T?.[0],$=h?o.find(e=>e.couponTemplateId===h):null,B=o;n(()=>{const e=u?.discount_codes?.filter(e=>!1!==e?.applicable)??[];if(null!==h){const t=o.find(e=>e.couponTemplateId===h);return void(t&&e.some(e=>e.code?.toLowerCase()===t.name?.toLowerCase())||v(null))}if(e.length>0){const t=o.find(t=>e.some(e=>e.code?.toLowerCase()===t.name?.toLowerCase()));t&&v(t.couponTemplateId)}},[u?.discount_codes,o,h]),n(()=>{if(m){window.history.pushState({couponSelectionOpen:!0},"");const e=()=>z();return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)}},[m]);const I=()=>{f(!1),g(!0)},z=()=>{f(!0),setTimeout(()=>{g(!1),f(!1)},280)},F=async()=>{if(i&&!w){C(!0);try{await i(),v(null)}catch(e){console.error("Failed to remove coupon:",e)}finally{C(!1)}}},N=()=>{if($){if("percentage_discount_coupon"===$.couponType&&$.discountPercentage)return`saved extra ${$.discountPercentage}% off`;if("fixed_amount_coupon"===$.couponType&&$.discountValue)return`saved extra ₹${$.discountValue} off`}return""},P=(t,n=!1)=>{const o=y===t.couponTemplateId,i=E===t.couponTemplateId,a=!n&&!1===t.isEligible;return e.createElement("div",{key:t.couponTemplateId,style:{border:n?`1.5px solid ${c||"#4A7C59"}`:"1px solid #E8E8E8",borderRadius:p??8,overflow:"hidden",marginBottom:"12px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 3px rgba(0,0,0,0.06)",animation:i?"ytSuccessPulse 0.6s ease-out":void 0,transition:"border-color 0.3s ease, box-shadow 0.3s ease"}},e.createElement("div",{style:{padding:"14px 16px",background:"linear-gradient(135deg, #FFFFFF 60%, #FFF5F5 100%)",position:"relative"}},i&&e.createElement("div",{style:{position:"absolute",top:"10px",right:"10px",width:24,height:24,borderRadius:"50%",backgroundColor:"#2E7D32",display:"flex",alignItems:"center",justifyContent:"center",animation:"ytCheckFade 0.4s ease-out forwards"}},e.createElement("span",{style:{color:"#fff",fontSize:"14px",fontWeight:700}},"✓")),e.createElement("div",{style:{display:"flex",alignItems:"flex-start",gap:"10px"}},e.createElement("div",{style:{width:32,height:32,borderRadius:4,backgroundColor:"#FDE8E8",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},e.createElement(ne,{size:18,color:a?"#6b7280":"#8B0000"})),e.createElement("div",{style:{flex:1}},e.createElement("div",{style:{fontSize:"14px",fontWeight:600,color:s||"#1A1A1A",marginBottom:"2px"}},(e=>"percentage_discount_coupon"===e.couponType&&e.discountPercentage?`Get an additional ${e.discountPercentage}% off`:"fixed_amount_coupon"===e.couponType&&e.discountValue?`Get an additional ₹${e.discountValue} off`:e.name)(t)),e.createElement("div",{style:{fontSize:"12px",color:a?"#6b7280":"#2E7D32",fontWeight:500}},(e=>{if("minimum_quantity"===e.customCartProgressBarCriteria){if(e.quantityThreshold)return`On orders with ${e.quantityThreshold}+ items.`}else if(e.minimumOrderValue)return`On purchases above ₹${e.minimumOrderValue.toLocaleString("en-IN")}.`;return""})(t)))),e.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:"12px",border:"1px solid #E0E0E0",borderRadius:p??6,padding:"8px 12px",backgroundColor:"#FAFAFA"}},e.createElement("span",{style:{fontSize:"14px",fontWeight:700,color:s||"#1A1A1A",letterSpacing:"0.5px"}},t.name),e.createElement("button",{onClick:e=>{e.stopPropagation(),n?F():(async e=>{if(null===y){b(e.couponTemplateId);try{r&&e.name&&await r(e.name),v(e.couponTemplateId),k(e.couponTemplateId),setTimeout(()=>{k(null),z()},1200)}catch(e){console.error("Failed to collect coupon:",e)}finally{b(null)}}})(t)},disabled:o||w||a,style:{background:"none",border:"none",color:a?"#6b7280":"#8B0000",fontSize:"14px",fontWeight:600,cursor:o||w||a?"not-allowed":"pointer",padding:0,display:"flex",alignItems:"center",gap:"4px"}},o||n&&w?e.createElement(rt,{color:"#8B0000",size:14}):n?"Remove":"Collect"))),e.createElement("div",{style:{padding:"6px 16px",fontSize:"11px",fontWeight:500,textAlign:"center",backgroundColor:"#FFF0F0",color:a?"#6b7280":"#8B0000",borderTop:"1px solid '#FECACA'"}},(e=>{const t=e.resolvedCollectionNames;return t&&t.length>0?1===t.length?`Applicable on '${t[0]}' collection only.`:`Applicable on '${t.join("', '")}' collections.`:e.allowedCollections?.ids&&e.allowedCollections.ids.length>0?"Applicable on select collections.":"Applicable storewide"})(t)))};return e.createElement(e.Fragment,null,(()=>{const t=!!$||!!S,n=$?.name??S?.code??"",r=$?"#F0FFF4":S?"#F3E8FF":"#FDE8E8",i=$?"#2E7D32":"#C53030",a=$?"#2E7D32":"#666666";return e.createElement("div",{style:{padding:"0 16px",marginTop:"10px",marginBottom:"10px"}},e.createElement("div",{onClick:I,style:{display:"flex",alignItems:"center",padding:"12px 14px",border:"1px solid #E8E8E8",borderRadius:p??8,cursor:"pointer",backgroundColor:"#FFFFFF",transition:"box-shadow 0.2s ease"}},e.createElement("div",{style:{width:36,height:36,borderRadius:6,backgroundColor:r,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginRight:"12px",transition:"background-color 0.3s ease"}},$?e.createElement(Je,{size:20,color:i}):e.createElement(ne,{size:20,color:i})),e.createElement("div",{style:{flex:1}},t?e.createElement(e.Fragment,null,e.createElement("div",{style:{fontSize:"14px",color:s||"#1A1A1A"}},e.createElement("span",{style:{fontWeight:600}},n),e.createElement("span",{style:{fontStyle:"italic"}}," applied!")),e.createElement("div",{style:{fontSize:"12px",color:a,marginTop:"1px",fontStyle:$?"italic":"normal"}},(()=>{if($){if("percentage_discount_coupon"===$.couponType&&$.discountPercentage)return`saved additional ${$.discountPercentage}% on your purchase`;if("fixed_amount_coupon"===$.couponType&&$.discountValue)return`saved additional ₹${$.discountValue} on your purchase`}return"coupon applied on your purchase"})())):e.createElement(e.Fragment,null,e.createElement("div",{style:{fontSize:"14px",fontWeight:700,color:s||"#1A1A1A"}},"Coupons and Offers"),e.createElement("div",{style:{fontSize:"12px",color:"#888888",marginTop:"1px"}},"collect and save more"))),e.createElement(L,{size:14,color:"#888888"})),!t&&o.length>0&&e.createElement("div",{style:{textAlign:"center",fontSize:"12px",fontWeight:600,color:"#2E7D32",backgroundColor:"#F0FFF4",padding:"6px 0",borderRadius:`0 0 ${p??8}px ${p??8}px`,marginTop:"-1px",border:"1px solid #C6F6D5",borderTop:"none"}},o.length,"+ coupons eligible for your order"))})(),m&&e.createElement("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:0,width:"100%",backgroundColor:"#FFFFFF",zIndex:2147483645,display:"flex",flexDirection:"column",animation:x?"ytSlideDown 0.28s cubic-bezier(0.4, 0, 1, 1) forwards":"ytSlideUp 0.32s cubic-bezier(0, 0, 0.2, 1) forwards"}},e.createElement("div",{style:{display:"flex",alignItems:"center",padding:"16px",flexShrink:0}},e.createElement("button",{onClick:z,style:{background:"none",border:"none",cursor:"pointer",padding:"4px",display:"flex",alignItems:"center",marginRight:"12px"}},e.createElement(M,{size:18,color:s||"#1A1A1A"})),e.createElement("span",{style:{fontSize:"18px",fontWeight:700,color:s||"#1A1A1A"}},"Coupons and Offers")),e.createElement("div",{style:{display:"flex",height:"12px",background:"#87878717"}}),e.createElement("div",{style:{flex:1,overflowY:"auto"}},S&&e.createElement("div",{style:{display:"flex",alignItems:"center",padding:"12px 16px",gap:"8px",flexWrap:"wrap"}},e.createElement(Je,{size:16,color:"#333333"}),e.createElement("span",{style:{fontWeight:700,fontSize:"14px",color:s||"#1A1A1A"}},S.code),e.createElement("span",{style:{fontStyle:"italic",fontSize:"14px",color:s||"#1A1A1A"}},"applied!"),e.createElement("button",{onClick:F,disabled:w,style:{background:"none",border:"none",cursor:w?"not-allowed":"pointer",padding:"2px",display:"flex",alignItems:"center"}},w?e.createElement(rt,{color:"#666",size:14}):e.createElement(be,{size:18,color:"#666666"})),N()&&e.createElement("span",{style:{fontSize:"14px",color:"#2E7D32",fontStyle:"italic"}},N())),e.createElement(_r,{backgroundSubdued:l,themeColor:c,themeTextColor:d,primaryTextColor:s,cartComponentsCornerRadius:p,applyCouponCode:r,removeDiscount:i,enableConfetti:a,hideAppliedCodes:!0}),e.createElement("div",{style:{display:"flex",height:"12px",background:"#87878717"}}),e.createElement("div",{style:{padding:"16px"}},e.createElement("div",{style:{fontSize:"16px",fontWeight:700,color:s||"#1A1A1A",marginBottom:"4px"}},"Collect Coupon"),e.createElement("div",{style:{fontSize:"13px",color:"#888888",marginBottom:"16px"}},"Pick any one coupon deal"),B.map(e=>P(e,e.couponTemplateId===h))))))},Lr=ce("showGSTInput",!1),Mr=c.div`
1402
1402
  width: 95%;
1403
1403
  background: white;
1404
1404
  border-radius: 2px;
@@ -2433,7 +2433,7 @@ import e,{useState as t,useEffect as n,useMemo as o,useRef as r,useCallback as i
2433
2433
  &:hover {
2434
2434
  opacity: ${e=>e.$locked?.5:.85};
2435
2435
  }
2436
- `,kl=(e,t)=>e.find(e=>(e?.variants?.edges??e?.variants?.nodes??[]).some(e=>{const n=e?.node??e,o=String(n?.id??"");return o.includes(t)||o.split("/").pop()===t})),Tl=(e,t)=>{const n=(e?.variants?.edges??e?.variants?.nodes??[]).find(e=>{const n=e?.node??e,o=String(n?.id??"");return o.includes(t)||o.split("/").pop()===t});return n?.node??n},Sl=({stealDealCheckpoints:i,stealDealProducts:a,freeProductAdjustedCartTotal:l,effectiveQuantityForProgressBar:c,addFreebieToCart:d,freebiesInCart:s,primaryTextColor:p})=>{const u=ae(Ut);Kt();const m=le(en),f=i?.[0],[y,b]=t(0),[h,v]=t(0),w=r(null),C=r(null),E=r(null),k=o(()=>(l||Number(u?.items_subtotal_price))/100,[l,u?.items_subtotal_price]),T=on(u,u?.currency),S=o(()=>{if(!f)return!1;return"minimum_order_value"===(f.customCartProgressBarCriteria??"minimum_order_value")?k>=f.minimumOrderValue:(u?.item_count??0)>=f.quantityThreshold},[f,k,u?.item_count]),$=f?.maxFreebiesInTier??1,B=o(()=>{if(!f)return 0;return(f.customerGetsProductIds?.ids??[]).filter(e=>s.includes(e)).length},[f,s])>=$,I=o(()=>{if(!f||!a?.length)return[];const e=f.customerGetsProductIds?.ids??[],t=[];for(const n of e){const e=kl(a,n);if(!e)continue;const o=Tl(e,n),r=Number(o?.price?.amount?o.price.amount:o?.price??0);let i,l;"no_discount"===f.freebieType?(i=r,l=0):"percentage_off"===f.freebieType&&f.discountPercentage?(l=f.discountPercentage,i=r*(1-l/100)):(i=f.discountValue??r,l=r>0?Math.round((r-i)/r*100):0);const c=s.includes(n),d=e?._claim_allowed_variants??[n];t.push({product:e,variantId:n,isUnlocked:S,isClaimed:c,discountPercent:l,dealPrice:i,originalPrice:r,allowedVariantIds:d})}return t},[f,a,s,S]);n(()=>{if(w.current){const e=w.current.offsetWidth,t=window.innerWidth<=768;v(t?Math.min(.95*e,280):Math.min(.8*e,320))}},[I.length]);const z=Math.max(0,I.length-1);n(()=>{y>z&&b(z)},[z,y]);const F=()=>{b(e=>0===e?z:e-1)},N=()=>{b(e=>e===z?0:e+1)};if(!f||!I.length)return null;return e.createElement(Za,null,e.createElement(Ja,null,e.createElement(Ka,{style:{color:p}},e.createElement(el,null,"STEAL"),e.createElement(tl,null,"DEALS")),B?e.createElement(il,null,"Max ",$," claims reached"):S?e.createElement(rl,null,e.createElement(Q,{size:10}),"UNLOCKED"):e.createElement(nl,null,e.createElement(ol,null),"minimum_order_value"===(f.customCartProgressBarCriteria??"minimum_order_value")?e.createElement(e.Fragment,null,"UNLOCK AT ",T,f.minimumOrderValue):e.createElement(e.Fragment,null,"UNLOCK AT ",f.quantityThreshold," ITEMS"))),e.createElement(al,{ref:w,onTouchStart:e=>{C.current=e.touches[0].clientX,E.current=e.touches[0].clientY},onTouchMove:e=>{if(null===C.current||null===E.current)return;const t=e.touches[0].clientX-C.current,n=e.touches[0].clientY-E.current;Math.abs(t)>10&&Math.abs(t)>Math.abs(n)&&e.preventDefault()},onTouchEnd:e=>{if(null===C.current)return;const t=e.changedTouches[0].clientX-C.current;Math.abs(t)>50&&(t<0?N():F()),C.current=null,E.current=null}},I.length>1&&e.createElement(pl,{onClick:F},e.createElement(g,{size:30,color:"#4D4D4D"})),e.createElement(dl,{position:"left",style:{display:"flex"}}),e.createElement(dl,{position:"right",style:{display:"flex"}}),e.createElement(ll,{$cardWidth:h},e.createElement(cl,{$translate:y*(h+10)},I.map(t=>{return e.createElement("div",{key:t.variantId,style:{width:`${h}px`,flexShrink:0}},e.createElement(ml,null,e.createElement(gl,null,e.createElement(xl,{src:(n=t.product,n?.featuredMedia?.preview?.image?.url??n?.featuredImage?.url??n?.images?.edges?.[0]?.node?.url??n?.image?.src??""),alt:t.product?.title??""}),t.discountPercent>0&&e.createElement(fl,null,"-",t.discountPercent,"% OFF")),e.createElement(yl,null,e.createElement(bl,null,t.product?.title??""),e.createElement(Cl,null,e.createElement(hl,null,e.createElement(vl,null,T,t.dealPrice.toLocaleString()),t.originalPrice>t.dealPrice&&e.createElement(wl,null,T,t.originalPrice.toLocaleString())),e.createElement(El,{$locked:!t.isUnlocked||t.isClaimed||B,onClick:()=>(async e=>{if(e.isUnlocked&&!e.isClaimed&&!B&&d){if(e.allowedVariantIds.length>1){const t=e.product?.variants?.edges??e.product?.variants?.nodes??[];if(e.allowedVariantIds.some(n=>t.some(t=>{const o=t?.node??t;return(String(o?.id??"").split("/").pop()===n||String(o?.id??"").includes(n))&&Kr(e.product,o)}))){const t=e.product?.id?.split("/").pop();return void m({open:!0,variantId:e.variantId,handle:e.product?.handle,freebieSelection:!0,stealDealSelection:!0,productId:t,allowedVariantIds:e.allowedVariantIds})}}try{await d(e.variantId,e.allowedVariantIds),window.dispatchEvent(new CustomEvent("yt:autoFreebieAdded"))}catch(e){}}})(t),disabled:!t.isUnlocked||t.isClaimed||B},t.isUnlocked?e.createElement(U,{size:12}):e.createElement(Y,{size:12}))))));var n}))),I.length>1&&e.createElement(ul,{onClick:N},e.createElement(x,{size:30,color:"#4D4D4D"}))))},$l=c.div`
2436
+ `,kl=(e,t)=>e.find(e=>(e?.variants?.edges??e?.variants?.nodes??[]).some(e=>{const n=e?.node??e,o=String(n?.id??"");return o.includes(t)||o.split("/").pop()===t})),Tl=(e,t)=>{const n=(e?.variants?.edges??e?.variants?.nodes??[]).find(e=>{const n=e?.node??e,o=String(n?.id??"");return o.includes(t)||o.split("/").pop()===t});return n?.node??n},Sl=({stealDealCheckpoints:i,stealDealProducts:a,freeProductAdjustedCartTotal:l,effectiveQuantityForProgressBar:c,addFreebieToCart:d,freebiesInCart:s,primaryTextColor:p})=>{const u=ae(Ut);Kt();const m=le(en),f=i?.[0],[y,b]=t(0),[h,v]=t(0),w=r(null),C=r(null),E=r(null),k=o(()=>(l||Number(u?.items_subtotal_price))/100,[l,u?.items_subtotal_price]),T=on(u,u?.currency),S=o(()=>{if(!f)return!1;return"minimum_order_value"===(f.customCartProgressBarCriteria??"minimum_order_value")?k>=f.minimumOrderValue:(u?.item_count??0)>=f.quantityThreshold},[f,k,u?.item_count]),$=f?.maxFreebiesInTier??1,B=o(()=>{if(!f)return 0;return(f.customerGetsProductIds?.ids??[]).filter(e=>s.includes(e)).length},[f,s])>=$,I=o(()=>{if(!f||!a?.length)return[];const e=f.customerGetsProductIds?.ids??[],t=[];for(const n of e){const e=kl(a,n);if(!e)continue;const o=Tl(e,n),r=Number(o?.price?.amount?o.price.amount:o?.price??0);let i,l;"no_discount"===f.freebieType?(i=r,l=0):"percentage_off"===f.freebieType&&f.discountPercentage?(l=f.discountPercentage,i=r*(1-l/100)):(i=f.discountValue??r,l=r>0?Math.round((r-i)/r*100):0);const c=s.includes(n),d=e?._claim_allowed_variants??[n];t.push({product:e,variantId:n,isUnlocked:S,isClaimed:c,discountPercent:l,dealPrice:i,originalPrice:r,allowedVariantIds:d})}return t},[f,a,s,S]);n(()=>{if(w.current){const e=w.current.offsetWidth,t=window.innerWidth<=768;v(t?Math.min(.95*e,280):Math.min(.8*e,320))}},[I.length]);const z=Math.max(0,I.length-1);n(()=>{y>z&&b(z)},[z,y]);const F=()=>{b(e=>0===e?z:e-1)},N=()=>{b(e=>e===z?0:e+1)};if(!f||!I.length)return null;return e.createElement(Za,null,e.createElement(Ja,null,e.createElement(Ka,{style:{color:p}},e.createElement(el,null,"STEAL"),e.createElement(tl,null,"DEALS")),B?e.createElement(il,null,"Max ",$," claims reached"):S?e.createElement(rl,null,e.createElement(Q,{size:10}),"UNLOCKED"):e.createElement(nl,null,e.createElement(ol,null),"minimum_order_value"===(f.customCartProgressBarCriteria??"minimum_order_value")?e.createElement(e.Fragment,null,"UNLOCK AT ",T,f.minimumOrderValue):e.createElement(e.Fragment,null,"UNLOCK AT ",f.quantityThreshold," ITEMS"))),e.createElement(al,{ref:w,onTouchStart:e=>{C.current=e.touches[0].clientX,E.current=e.touches[0].clientY},onTouchMove:e=>{if(null===C.current||null===E.current)return;const t=e.touches[0].clientX-C.current,n=e.touches[0].clientY-E.current;Math.abs(t)>10&&Math.abs(t)>Math.abs(n)&&e.preventDefault()},onTouchEnd:e=>{if(null===C.current)return;const t=e.changedTouches[0].clientX-C.current;Math.abs(t)>50&&(t<0?N():F()),C.current=null,E.current=null}},I.length>1&&e.createElement(pl,{onClick:F},e.createElement(g,{size:30,color:"#4D4D4D"})),e.createElement(dl,{position:"left",style:{display:"flex"}}),e.createElement(dl,{position:"right",style:{display:"flex"}}),e.createElement(ll,{$cardWidth:h},e.createElement(cl,{$translate:y*(h+10)},I.map(t=>{return e.createElement("div",{key:t.variantId,style:{width:`${h}px`,flexShrink:0},className:"yt-steal-deal-card"},e.createElement(ml,null,e.createElement(gl,null,e.createElement(xl,{src:(n=t.product,n?.featuredMedia?.preview?.image?.url??n?.featuredImage?.url??n?.images?.edges?.[0]?.node?.url??n?.image?.src??""),alt:t.product?.title??""}),t.discountPercent>0&&e.createElement(fl,null,"-",t.discountPercent,"% OFF")),e.createElement(yl,null,e.createElement(bl,null,t.product?.title??""),e.createElement(Cl,null,e.createElement(hl,null,e.createElement(vl,null,T,t.dealPrice.toLocaleString()),t.originalPrice>t.dealPrice&&e.createElement(wl,null,T,t.originalPrice.toLocaleString())),e.createElement(El,{$locked:!t.isUnlocked||t.isClaimed||B,onClick:()=>(async e=>{if(e.isUnlocked&&!e.isClaimed&&!B&&d){if(e.allowedVariantIds.length>1){const t=e.product?.variants?.edges??e.product?.variants?.nodes??[];if(e.allowedVariantIds.some(n=>t.some(t=>{const o=t?.node??t;return(String(o?.id??"").split("/").pop()===n||String(o?.id??"").includes(n))&&Kr(e.product,o)}))){const t=e.product?.id?.split("/").pop();return void m({open:!0,variantId:e.variantId,handle:e.product?.handle,freebieSelection:!0,stealDealSelection:!0,productId:t,allowedVariantIds:e.allowedVariantIds})}}try{await d(e.variantId,e.allowedVariantIds),window.dispatchEvent(new CustomEvent("yt:autoFreebieAdded"))}catch(e){}}})(t),disabled:!t.isUnlocked||t.isClaimed||B},t.isUnlocked?e.createElement(U,{size:12}):e.createElement(Y,{size:12}))))));var n}))),I.length>1&&e.createElement(ul,{onClick:N},e.createElement(x,{size:30,color:"#4D4D4D"}))))},$l=c.div`
2437
2437
  line-height: normal;
2438
2438
  position: ${e=>e.$enableCustomCartOnCartPage&&e.$isCartPage?"relative":"fixed"};
2439
2439
  top: ${e=>e.$enableCustomCartOnCartPage&&e.$isCartPage?"auto":"0"};
@@ -4889,7 +4889,7 @@ import e,{useState as t,useEffect as n,useMemo as o,useRef as r,useCallback as i
4889
4889
  transform: scale(1.01);
4890
4890
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
4891
4891
  }
4892
- `,Yp={showPrice:!0,productImage:{id:"",path:""},buyNowCtaTitle:"BUY NOW",desktopBarType:"stretch",showProductName:!0,showBuyNowButton:!1,showProductImage:!0,addToCartCtaTitle:"ADD TO CART",showAddToCartButton:!0,showVariantSelector:!1,productInfoVisibility:!0,excludeProducts:[],showBarOnDesktop:!0,ctaButtonFontSize:18,startsAppearingAtHeight:200,fullyAppearsAtHeight:400,alwaysPersistent:!1},Gp=({showStickyCart:o,product:a,addCartItem:l,onSetLoading:c,themeColor:d,cartData:s,isCartOpen:p,setIsCartOpen:u,ctaButtonBackgroundColor:m,ctaButtonTextColor:g,addToStickyCart:x,cartComponentsCornerType:f,cartComponentsCornerRadius:y,themeTextColor:b,stickyCartCustomizationData:h,checkoutFunction:v,backgroundColor:w,primaryTextColor:C,comboBundleData:E,comboBundleAddToCartFunction:k,volumeBundleCurrentTier:T,volumeBundleData:S,volumeBundleAddToCartFunction:$})=>{const[B,I]=t(""),[z,F]=t(null),[N,P]=t({}),D=ir(),[A,_]=t(null),R=r(null);n(()=>{const e=e=>{R.current&&!R.current.contains(e.target)&&_(null)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]);const O=i((e,t)=>{const n=e?.variants?.edges?.find(e=>e.node.id===t),o=n?.node;return o?e.tracksInventory&&o.inventoryItem?.tracked?o.inventoryQuantity>0?o.inventoryQuantity:o.inventoryQuantity<=0&&"continue"===o.inventoryPolicy?.toLowerCase()?1/0:0:1/0:0},[]),L=i(()=>E&&"combo"===E.type?E?.products?.[0]?.productDetails?.variants?.edges?.find(e=>O(E.products[0].productDetails,e?.node?.id)>0)?.node:a?.variants?.find(e=>e?.available),[E,a,O]),[M,j]=t(()=>{if(!E||"combo"!==E.type)return{};const e={};return E?.products?.forEach((t,n)=>{const o=t?.productDetails?.variants?.edges?.find(e=>O(t.productDetails,e?.node?.id)>0)?.node;o?e[n]=o.id:t?.productDetails?.variants?.edges?.length>0&&(e[n]=t.productDetails.variants.edges[0].node.id)}),e}),V=i(e=>{if(!E||"combo"!==E.type)return;const t={};E?.products?.forEach((n,o)=>{const r=n?.productDetails?.variants?.edges?.find(t=>{const o=t?.node;return n?.productDetails?.options?.every((t,n)=>{const r=e?.[t?.name],i=o?.title?.split(" / ")?.at(n);return!(!r||!i)&&r.trim().toLowerCase()===i.trim().toLowerCase()})});r?.node?.id&&(t[o]=r.node.id)}),Object.keys(t).length>0&&j(e=>({...e,...t}))},[E]);n(()=>{const e=L();if(e){I(String(e.id)),F(e);const t={};a?.options&&Array.isArray(a.options)&&a.options.forEach((n,o)=>{const r=`option${o+1}`;e?.[r]&&(t[n?.name]=e[r])}),P(t)}else if(a?.variants?.length>0){const e=a.variants[0];I(String(e.id)),F(e);const t={};a?.options&&Array.isArray(a.options)&&a.options.forEach((n,o)=>{const r=`option${o+1}`;e?.[r]&&(t[n?.name]=e[r])}),P(t)}},[a,L]);const W=i(()=>new URLSearchParams(window.location.search).get("variant")||"",[]),H=()=>{const e=W();if(e){const t=a?.variants?.find(t=>String(t?.id)===String(e));if(t&&t?.available){I(String(t.id)),F(t);const e={};a?.options?.forEach((n,o)=>{const r=`option${o+1}`;t?.[r]&&(e[n?.name]=t[r])}),P(e)}else{const e=L();e?(I(String(e.id)),F(e)):a?.variants?.length>0&&(I(String(a.variants[0].id)),F(a.variants[0]))}}};n(()=>{H();const e=new Event("urlChange");let t=!0;const n=window.history.pushState,o=window.history.replaceState;return window.history.pushState=function(){t&&(n.apply(this,arguments),window.dispatchEvent(e))},window.history.replaceState=function(){t&&(o.apply(this,arguments),window.dispatchEvent(e))},window.addEventListener("urlChange",H),()=>{t=!1,window.removeEventListener("urlChange",H),window.history.pushState=n,window.history.replaceState=o}},[W,a,L,z,B]);const q=r(null),[Q,U]=t(1),Y=on(s,s?.currency),G=e.useMemo(()=>{if(!E||"combo"!==E.type)return null;const{price:e,compareAtPrice:t}=Object.entries(M).reduce((e,[t,n])=>{const o=E.products?.[Number(t)],r=o?.productDetails?.variants?.edges?.find(e=>e?.node?.id===n)?.node,i=parseFloat(r?.price??"0"),a=parseFloat(r?.compareAtPrice||i.toString());return e.price+=i,e.compareAtPrice+=a,e},{price:0,compareAtPrice:0}),n=Math.max(e,t);let o=Math.min(e,t);return E?.percentageOff?o=e*(1-E.percentageOff/100):E?.dealAmount?o=E.dealAmount:E?.amountOff&&(o=e-E.amountOff),{originalPrice:n.toFixed(2),dealPrice:o.toFixed(2),savings:(n-o).toFixed(2),hasSavings:n>o}},[E,M]),X=e.useMemo(()=>{if(!T||!z)return null;const e=parseFloat(z.price??"0"),t=parseFloat(z.compare_at_price||e.toString()),n=tn(e,s?.currency),o=tn(t,s?.currency),r=T.minimumQuantity,i=Math.max(n,o)*r;let a=n*r;const l=S?.discountType||T.discountType;"percentOff"===l?a*=1-T.discountValue/100:"amountOff"===l&&(a-=T.discountValue);const c=Math.max(0,a);return{originalPrice:i.toFixed(2),dealPrice:c.toFixed(2),savings:(i-c).toFixed(2),hasSavings:i>c&&void 0!==l}},[T,S,z,s]);n(()=>{(async()=>{try{if(E&&"combo"===E.type)return;a&&B&&F(a?.variants?.filter(e=>String(e?.id)===String(B))[0])}catch(e){console.error("Error getting selected product variant id")}})()},[a,B,E]),n(()=>{const e=e=>{const t=e;t.detail?.selectedVariants&&j(t.detail.selectedVariants)};return window.addEventListener("yt-combo-bundle-updated",e),()=>{window.removeEventListener("yt-combo-bundle-updated",e)}},[]);const{cartLoading:Z}=Kt(),J=r(null),[K,ee]=t(0);n(()=>{J.current&&ee(J.current.offsetWidth)},[]);const te=a?.options?.find(e=>e?.name?.toLowerCase()?.includes("color"))?.name,ne=te?N?.[te]:null,oe=h&&(re=h,0!==Object.keys(re).length||re.constructor!==Object)?h:Yp;var re;const{showProductName:ie,showPrice:ae,showVariantSelector:le,showBuyNowButton:ce,showAddToCartButton:de,desktopBarType:se,showProductImage:pe,buyNowCtaTitle:ue,addToCartCtaTitle:me,productInfoVisibility:ge,showBarOnDesktop:xe,ctaButtonFontSize:fe,startsAppearingAtHeight:ye,fullyAppearsAtHeight:be,topRibbonText:he,alwaysPersistent:ve}=oe,[we,Ce]=t(ve?1:0),[Ee,ke]=t(ve?0:100),[Te,Se]=t(!1);if(n(()=>{if(ve)return Ce(1),void ke(0);const e=()=>{const e=window.scrollY;document.documentElement.scrollHeight;const t=ye||200,n=be||400;if(e>t){const o=Math.min((e-t)/(n-t),1);Ce(o),ke(100-100*o)}else Ce(0),ke(100)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[ve,ye,be]),n(()=>{const e=()=>{const e=window.innerWidth<768;Se(e||!1!==xe)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[xe]),a?.variants?.length<1)return null;const $e=a?.available??!0,Be=L(),Ie=E&&"combo"===E.type?E?.products?.[0]?.productDetails?.variants?.edges?.find(e=>e?.node?.id===M?.[0])?.node?.price:z?.price??Be?.price??a?.variants?.[0]?.price;if(0===Number(Ie)&&(!E||"combo"!==E.type))return null;if(!o||!Te)return null;if(h?.excludeProducts?.includes(a?.handle))return null;const ze=E&&"combo"===E.type?E.products?.every((e,t)=>{const n=M[t];return!!n&&O(e.productDetails,n)>0})??!1:z?.available??!0;return e.createElement(Mp,{className:"yt-sticky-bar-container",$opacity:we,$translateY:Ee,$desktopBarType:se||"stretch"},e.createElement(jp,{className:"yt-sticky-bar-inner-container",$desktopBarType:se||"stretch",$themeColor:d,$cornerType:f??"sharp",$cornerRadius:y??20,$themeTextColor:b,$productInfoVisibility:ge,$topRibbonText:he,$backgroundColor:w},ge&&e.createElement(Vp,null,pe&&e.createElement(Wp,{className:"yt-sticky-bar-product-image",src:((e,t)=>"string"==typeof e?.featured_image?e.featured_image:e?.featured_image?.src?e.featured_image.src:t?.featured_image)(z,a),alt:z?.name}),e.createElement(Hp,{ref:J,className:"yt-sticky-bar-product-details"},ie&&e.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px"}},e.createElement("span",{style:{fontSize:"20px",fontWeight:"500",color:C,display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",lineHeight:"normal"}},`${a?.title}`),ne&&e.createElement("span",{style:{fontSize:"11px",color:"#666",backgroundColor:"#f1f1f1",padding:"2px 6px",borderRadius:"10px",border:"1px solid #ddd"}},ne)),a?.variants?.length>1&&le&&e.createElement(Op,{className:"yt-sticky-bar-option-container",ref:R},a?.options?.map(t=>{const n=D?.options?.find(e=>e.name.trim().toLowerCase()===t.name.trim().toLowerCase()),o=N[t.name],r=A===t.name,i=e=>{((e,t)=>{const n={...N,[e]:t};P(n);const o=a?.variants?.find(e=>a?.options?.every((t,o)=>{const r=n?.[t?.name],i=e?.[`option${o+1}`];return"string"==typeof r&&"string"==typeof i?r.trim().toLowerCase()===i.trim().toLowerCase():r===i}));o&&(I(String(o.id)),F(o)),E&&"combo"===E?.type&&V(n)})(t.name,e),_(null)},l=rr(n,o);return e.createElement("div",{key:t.name,style:{display:"flex",alignItems:"center",gap:"8px"}},e.createElement(Lp,null,t.name),e.createElement(Fp,null,e.createElement(Np,{onClick:()=>{_(r?null:t.name)},className:"yt-sticky-bar-dropdown-button"},"color"===n?.type&&l?.value?e.createElement(Ap,{$colorValue:l.value}):"image"===n?.type&&l?.value?e.createElement(_p,{src:l.value}):null,o,e.createElement(Rp,{size:8,$isOpen:r})),r&&e.createElement(Pp,{$backgroundColor:w,className:"yt-sticky-bar-dropdown-panel"},t.values.map(t=>{const o=rr(n,t);return e.createElement(Dp,{className:"yt-sticky-bar-dropdown-item",key:t,onClick:()=>i(t)},"color"===n?.type&&o?.value?e.createElement(Ap,{$colorValue:o.value}):"image"===n?.type&&o?.value?e.createElement(_p,{src:o.value}):null,t)}))))})),ae&&e.createElement(e.Fragment,null,G?G.hasSavings?e.createElement("div",{style:{display:"flex",flexDirection:"row",gap:5,alignItems:"center"}},e.createElement("span",{style:{fontWeight:"500",fontSize:18,color:C},className:"yt-sticky-bar-product-price"},`${Y}`,Sp(G.dealPrice)),e.createElement("span",{style:{textDecoration:"line-through",color:"#6b7280",fontSize:14},className:"yt-sticky-bar-product-compare-price"},`${Y}`,Sp(G.originalPrice)),e.createElement("span",{style:{backgroundColor:d??"black",color:b??"white",padding:"3px 9px",fontSize:"12px",borderRadius:"rounded"===f?`${y}px`:"0"},className:"yt-sticky-bar-product-discount"},"Save ",`${Y}`,Sp(G.savings))):e.createElement("span",{style:{fontWeight:"500",fontSize:18,color:C},className:"yt-sticky-bar-product-price"},`${Y}`,Sp(G.dealPrice)):X?X.hasSavings?e.createElement("div",{style:{display:"flex",flexDirection:"row",gap:5,alignItems:"center"}},e.createElement("span",{style:{fontWeight:"500",fontSize:18,color:C},className:"yt-sticky-bar-product-price"},`${Y}`,Sp(X.dealPrice)),e.createElement("span",{style:{textDecoration:"line-through",color:"#6b7280",fontSize:14},className:"yt-sticky-bar-product-compare-price"},`${Y}`,Sp(X.originalPrice)),e.createElement("span",{style:{backgroundColor:d??"black",color:b??"white",padding:"3px 9px",fontSize:"12px",borderRadius:"rounded"===f?`${y}px`:"0"},className:"yt-sticky-bar-product-discount"},"Save ",`${Y}`,Sp(X.savings))):e.createElement("span",{style:{fontWeight:"500",fontSize:18,color:C},className:"yt-sticky-bar-product-price"},`${Y}`,Sp(X.dealPrice)):z?.compare_at_price&&z?.compare_at_price>z?.price?e.createElement("div",{style:{display:"flex",flexDirection:"row",gap:5,alignItems:"center"}},e.createElement("span",{style:{fontWeight:"500",fontSize:18,color:C},className:"yt-sticky-bar-product-price"},`${Y}`,tn(z?.price,s?.currency)),e.createElement("span",{style:{textDecoration:"line-through",color:"#6b7280",fontSize:14},className:"yt-sticky-bar-product-compare-price"},`${Y}`,tn(z?.compare_at_price,s?.currency)),e.createElement("span",{style:{backgroundColor:d??"black",color:b??"white",padding:"3px 9px",fontSize:"12px",borderRadius:"rounded"===f?`${y}px`:"0"},className:"yt-sticky-bar-product-discount"},"Save ",`${Y}`,tn(z?.compare_at_price-z?.price,s?.currency))):e.createElement(e.Fragment,null,e.createElement("span",{style:{fontWeight:"500",fontSize:18,color:C},className:"yt-sticky-bar-product-price"},`${Y}`,tn(z?.price,s?.currency)))),e.createElement("span",{style:{color:"#6E747B",fontSize:10},className:"yt-sticky-bar-product-tax-inclusion"},"Inclusive of all taxes"))),$e&&e.createElement(qp,{className:"yt-sticky-bar-product-line-item-control",$flexDirection:ge?"row":"column"},de&&e.createElement(Up,{ref:q,onClick:async()=>{if(E&&"combo"===E.type){if(!k)return void console.error("[StickyCart.tsx] comboBundleAddToCartFunction is undefined");const e=Object.entries(M);if(0===e.length)return;const t=e.map(([,e])=>e),n=e.map(([e,t])=>{const n=E?.products?.[Number(e)],o=n?.productDetails?.variants?.edges?.find(e=>e?.node?.id===t)?.node;return o?{variantId:t,price:Number(o?.price),compareAtPrice:Number(o?.compareAtPrice||o?.price)}:null}).filter(e=>null!==e),o=n.reduce((e,t)=>e+Math.max(t.compareAtPrice,t.price),0),r=n.reduce((e,t)=>e+t.price,0);let i=Math.min(o,r);E?.percentageOff?i=r*(1-E.percentageOff/100):E?.dealAmount?i=E.dealAmount:E?.amountOff&&(i=r-E.amountOff);const a=n.map(({variantId:e,price:t})=>({variantId:e,price:t}));try{await k(Number(o.toFixed(2)),t,Number(i.toFixed(2)),a)}catch(e){console.error("[StickyCart.tsx] Error adding combo bundle to cart:",e)}return}if(T&&T.minimumQuantity>1){if(!$)return void console.error("[StickyCart.tsx] volumeBundleAddToCartFunction is undefined");const e=String(B)??String(a?.variants[0]?.id),t=Array(T.minimumQuantity).fill(e),n=X?Number(X.originalPrice):0;try{await $(n,t)}catch(e){console.error("[StickyCart.tsx] Error adding volume bundle to cart:",e)}return}x&&await x(String(B)??String(a?.variants[0]?.id),Q)},disabled:Z.cartLoading||!ze,$bgColor:ze?m:"#d1d5db",$textColor:ze?g:"#6b7280",className:"yt-sticky-add-to-cart-button",$cornerType:f??"sharp",$cornerRadius:y??20,$fontSize:fe,style:{cursor:ze?"pointer":"not-allowed",opacity:ze?1:.6}},Z.cartLoading?e.createElement(rt,{color:"white",loading:Z.cartLoading,size:15}):e.createElement(e.Fragment,null,ze?me??"Add to Cart":"Out of Stock")),ce&&e.createElement(Qp,{onClick:async()=>{try{v&&await v(String(B)??String(a?.variants[0]?.id),Q)}catch(e){console.error("Error checking out from sticky bar")}},id:"yt-checkout-button",className:"yt-checkout-button",disabled:Z.cartLoading||!ze,$bgColor:ze?d:"#d1d5db",$textColor:ze?b:"#6b7280",$cornerType:f??"sharp",$cornerRadius:y??20,$fontSize:fe,style:{cursor:ze?"pointer":"not-allowed",opacity:ze?1:.6}},Z.cartLoading?e.createElement(rt,{color:"white",loading:Z.cartLoading,size:15}):e.createElement(e.Fragment,null,ze?ue??"Buy Now":"Out of Stock")))))},Xp=c.div`
4892
+ `,Yp={showPrice:!0,productImage:{id:"",path:""},buyNowCtaTitle:"BUY NOW",desktopBarType:"stretch",showProductName:!0,showBuyNowButton:!1,showProductImage:!0,addToCartCtaTitle:"ADD TO CART",showAddToCartButton:!0,showVariantSelector:!1,productInfoVisibility:!0,excludeProducts:[],showBarOnDesktop:!0,ctaButtonFontSize:18,startsAppearingAtHeight:200,fullyAppearsAtHeight:400,alwaysPersistent:!1},Gp=({showStickyCart:o,product:a,addCartItem:l,onSetLoading:c,themeColor:d,cartData:s,isCartOpen:p,setIsCartOpen:u,ctaButtonBackgroundColor:m,ctaButtonTextColor:g,addToStickyCart:x,cartComponentsCornerType:f,cartComponentsCornerRadius:y,themeTextColor:b,stickyCartCustomizationData:h,checkoutFunction:v,backgroundColor:w,primaryTextColor:C,comboBundleData:E,comboBundleAddToCartFunction:k,volumeBundleCurrentTier:T,volumeBundleData:S,volumeBundleAddToCartFunction:$})=>{const[B,I]=t(""),[z,F]=t(null),[N,P]=t({}),D=ir(),[A,_]=t(null),R=r(null);n(()=>{const e=e=>{R.current&&!R.current.contains(e.target)&&_(null)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]);const O=i((e,t)=>{const n=e?.variants?.edges?.find(e=>e.node.id===t),o=n?.node;return o?e.tracksInventory&&o.inventoryItem?.tracked?o.inventoryQuantity>0?o.inventoryQuantity:o.inventoryQuantity<=0&&"continue"===o.inventoryPolicy?.toLowerCase()?1/0:0:1/0:0},[]),L=i(()=>E&&"combo"===E.type?E?.products?.[0]?.productDetails?.variants?.edges?.find(e=>O(E.products[0].productDetails,e?.node?.id)>0)?.node:a?.variants?.find(e=>e?.available),[E,a,O]),[M,j]=t(()=>{if(!E||"combo"!==E.type)return{};const e={};return E?.products?.forEach((t,n)=>{const o=t?.productDetails?.variants?.edges?.find(e=>O(t.productDetails,e?.node?.id)>0)?.node;o?e[n]=o.id:t?.productDetails?.variants?.edges?.length>0&&(e[n]=t.productDetails.variants.edges[0].node.id)}),e}),V=i(e=>{if(!E||"combo"!==E.type)return;const t={};E?.products?.forEach((n,o)=>{const r=n?.productDetails?.variants?.edges?.find(t=>{const o=t?.node;return n?.productDetails?.options?.every((t,n)=>{const r=e?.[t?.name],i=o?.title?.split(" / ")?.at(n);return!(!r||!i)&&r.trim().toLowerCase()===i.trim().toLowerCase()})});r?.node?.id&&(t[o]=r.node.id)}),Object.keys(t).length>0&&j(e=>({...e,...t}))},[E]);n(()=>{const e=L();if(e){I(String(e.id)),F(e);const t={};a?.options&&Array.isArray(a.options)&&a.options.forEach((n,o)=>{const r=`option${o+1}`;e?.[r]&&(t[n?.name]=e[r])}),P(t)}else if(a?.variants?.length>0){const e=a.variants[0];I(String(e.id)),F(e);const t={};a?.options&&Array.isArray(a.options)&&a.options.forEach((n,o)=>{const r=`option${o+1}`;e?.[r]&&(t[n?.name]=e[r])}),P(t)}},[a,L]);const W=i(()=>new URLSearchParams(window.location.search).get("variant")||"",[]),H=()=>{const e=W();if(e){const t=a?.variants?.find(t=>String(t?.id)===String(e));if(t&&t?.available){I(String(t.id)),F(t);const e={};a?.options?.forEach((n,o)=>{const r=`option${o+1}`;t?.[r]&&(e[n?.name]=t[r])}),P(e)}else{const e=L();e?(I(String(e.id)),F(e)):a?.variants?.length>0&&(I(String(a.variants[0].id)),F(a.variants[0]))}}};n(()=>{H();const e=new Event("urlChange");let t=!0;const n=window.history.pushState,o=window.history.replaceState;return window.history.pushState=function(){t&&(n.apply(this,arguments),window.dispatchEvent(e))},window.history.replaceState=function(){t&&(o.apply(this,arguments),window.dispatchEvent(e))},window.addEventListener("urlChange",H),()=>{t=!1,window.removeEventListener("urlChange",H),window.history.pushState=n,window.history.replaceState=o}},[W,a,L]);const q=r(null),[Q,U]=t(1),Y=on(s,s?.currency),G=e.useMemo(()=>{if(!E||"combo"!==E.type)return null;const{price:e,compareAtPrice:t}=Object.entries(M).reduce((e,[t,n])=>{const o=E.products?.[Number(t)],r=o?.productDetails?.variants?.edges?.find(e=>e?.node?.id===n)?.node,i=parseFloat(r?.price??"0"),a=parseFloat(r?.compareAtPrice||i.toString());return e.price+=i,e.compareAtPrice+=a,e},{price:0,compareAtPrice:0}),n=Math.max(e,t);let o=Math.min(e,t);return E?.percentageOff?o=e*(1-E.percentageOff/100):E?.dealAmount?o=E.dealAmount:E?.amountOff&&(o=e-E.amountOff),{originalPrice:n.toFixed(2),dealPrice:o.toFixed(2),savings:(n-o).toFixed(2),hasSavings:n>o}},[E,M]),X=e.useMemo(()=>{if(!T||!z)return null;const e=parseFloat(z.price??"0"),t=parseFloat(z.compare_at_price||e.toString()),n=tn(e,s?.currency),o=tn(t,s?.currency),r=T.minimumQuantity,i=Math.max(n,o)*r;let a=n*r;const l=S?.discountType||T.discountType;"percentOff"===l?a*=1-T.discountValue/100:"amountOff"===l&&(a-=T.discountValue);const c=Math.max(0,a);return{originalPrice:i.toFixed(2),dealPrice:c.toFixed(2),savings:(i-c).toFixed(2),hasSavings:i>c&&void 0!==l}},[T,S,z,s]);n(()=>{(async()=>{try{if(E&&"combo"===E.type)return;a&&B&&F(a?.variants?.filter(e=>String(e?.id)===String(B))[0])}catch(e){console.error("Error getting selected product variant id")}})()},[a,B,E]),n(()=>{const e=e=>{const t=e;t.detail?.selectedVariants&&j(t.detail.selectedVariants)};return window.addEventListener("yt-combo-bundle-updated",e),()=>{window.removeEventListener("yt-combo-bundle-updated",e)}},[]);const{cartLoading:Z}=Kt(),J=r(null),[K,ee]=t(0);n(()=>{J.current&&ee(J.current.offsetWidth)},[]);const te=a?.options?.find(e=>e?.name?.toLowerCase()?.includes("color"))?.name,ne=te?N?.[te]:null,oe=h&&(re=h,0!==Object.keys(re).length||re.constructor!==Object)?h:Yp;var re;const{showProductName:ie,showPrice:ae,showVariantSelector:le,showBuyNowButton:ce,showAddToCartButton:de,desktopBarType:se,showProductImage:pe,buyNowCtaTitle:ue,addToCartCtaTitle:me,productInfoVisibility:ge,showBarOnDesktop:xe,ctaButtonFontSize:fe,startsAppearingAtHeight:ye,fullyAppearsAtHeight:be,topRibbonText:he,alwaysPersistent:ve}=oe,[we,Ce]=t(ve?1:0),[Ee,ke]=t(ve?0:100),[Te,Se]=t(!1);if(n(()=>{if(ve)return Ce(1),void ke(0);const e=()=>{const e=window.scrollY;document.documentElement.scrollHeight;const t=ye||200,n=be||400;if(e>t){const o=Math.min((e-t)/(n-t),1);Ce(o),ke(100-100*o)}else Ce(0),ke(100)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[ve,ye,be]),n(()=>{const e=()=>{const e=window.innerWidth<768;Se(e||!1!==xe)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[xe]),a?.variants?.length<1)return null;const $e=a?.available??!0,Be=L(),Ie=E&&"combo"===E.type?E?.products?.[0]?.productDetails?.variants?.edges?.find(e=>e?.node?.id===M?.[0])?.node?.price:z?.price??Be?.price??a?.variants?.[0]?.price;if(0===Number(Ie)&&(!E||"combo"!==E.type))return null;if(!o||!Te)return null;if(h?.excludeProducts?.includes(a?.handle))return null;const ze=E&&"combo"===E.type?E.products?.every((e,t)=>{const n=M[t];return!!n&&O(e.productDetails,n)>0})??!1:z?.available??!0;return e.createElement(Mp,{className:"yt-sticky-bar-container",$opacity:we,$translateY:Ee,$desktopBarType:se||"stretch"},e.createElement(jp,{className:"yt-sticky-bar-inner-container",$desktopBarType:se||"stretch",$themeColor:d,$cornerType:f??"sharp",$cornerRadius:y??20,$themeTextColor:b,$productInfoVisibility:ge,$topRibbonText:he,$backgroundColor:w},ge&&e.createElement(Vp,null,pe&&e.createElement(Wp,{className:"yt-sticky-bar-product-image",src:((e,t)=>"string"==typeof e?.featured_image?e.featured_image:e?.featured_image?.src?e.featured_image.src:t?.featured_image)(z,a),alt:z?.name}),e.createElement(Hp,{ref:J,className:"yt-sticky-bar-product-details"},ie&&e.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px"}},e.createElement("span",{style:{fontSize:"20px",fontWeight:"500",color:C,display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",lineHeight:"normal"}},`${a?.title}`),ne&&e.createElement("span",{style:{fontSize:"11px",color:"#666",backgroundColor:"#f1f1f1",padding:"2px 6px",borderRadius:"10px",border:"1px solid #ddd"}},ne)),a?.variants?.length>1&&le&&e.createElement(Op,{className:"yt-sticky-bar-option-container",ref:R},a?.options?.map(t=>{const n=D?.options?.find(e=>e.name.trim().toLowerCase()===t.name.trim().toLowerCase()),o=N[t.name],r=A===t.name,i=e=>{((e,t)=>{const n={...N,[e]:t};P(n);const o=a?.variants?.find(e=>a?.options?.every((t,o)=>{const r=n?.[t?.name],i=e?.[`option${o+1}`];return"string"==typeof r&&"string"==typeof i?r.trim().toLowerCase()===i.trim().toLowerCase():r===i}));o&&(I(String(o.id)),F(o)),E&&"combo"===E?.type&&V(n)})(t.name,e),_(null)},l=rr(n,o);return e.createElement("div",{key:t.name,style:{display:"flex",alignItems:"center",gap:"8px"}},e.createElement(Lp,null,t.name),e.createElement(Fp,null,e.createElement(Np,{onClick:()=>{_(r?null:t.name)},className:"yt-sticky-bar-dropdown-button"},"color"===n?.type&&l?.value?e.createElement(Ap,{$colorValue:l.value}):"image"===n?.type&&l?.value?e.createElement(_p,{src:l.value}):null,o,e.createElement(Rp,{size:8,$isOpen:r})),r&&e.createElement(Pp,{$backgroundColor:w,className:"yt-sticky-bar-dropdown-panel"},t.values.map(t=>{const o=rr(n,t);return e.createElement(Dp,{className:"yt-sticky-bar-dropdown-item",key:t,onClick:()=>i(t)},"color"===n?.type&&o?.value?e.createElement(Ap,{$colorValue:o.value}):"image"===n?.type&&o?.value?e.createElement(_p,{src:o.value}):null,t)}))))})),ae&&e.createElement(e.Fragment,null,G?G.hasSavings?e.createElement("div",{style:{display:"flex",flexDirection:"row",gap:5,alignItems:"center"}},e.createElement("span",{style:{fontWeight:"500",fontSize:18,color:C},className:"yt-sticky-bar-product-price"},`${Y}`,Sp(G.dealPrice)),e.createElement("span",{style:{textDecoration:"line-through",color:"#6b7280",fontSize:14},className:"yt-sticky-bar-product-compare-price"},`${Y}`,Sp(G.originalPrice)),e.createElement("span",{style:{backgroundColor:d??"black",color:b??"white",padding:"3px 9px",fontSize:"12px",borderRadius:"rounded"===f?`${y}px`:"0"},className:"yt-sticky-bar-product-discount"},"Save ",`${Y}`,Sp(G.savings))):e.createElement("span",{style:{fontWeight:"500",fontSize:18,color:C},className:"yt-sticky-bar-product-price"},`${Y}`,Sp(G.dealPrice)):X?X.hasSavings?e.createElement("div",{style:{display:"flex",flexDirection:"row",gap:5,alignItems:"center"}},e.createElement("span",{style:{fontWeight:"500",fontSize:18,color:C},className:"yt-sticky-bar-product-price"},`${Y}`,Sp(X.dealPrice)),e.createElement("span",{style:{textDecoration:"line-through",color:"#6b7280",fontSize:14},className:"yt-sticky-bar-product-compare-price"},`${Y}`,Sp(X.originalPrice)),e.createElement("span",{style:{backgroundColor:d??"black",color:b??"white",padding:"3px 9px",fontSize:"12px",borderRadius:"rounded"===f?`${y}px`:"0"},className:"yt-sticky-bar-product-discount"},"Save ",`${Y}`,Sp(X.savings))):e.createElement("span",{style:{fontWeight:"500",fontSize:18,color:C},className:"yt-sticky-bar-product-price"},`${Y}`,Sp(X.dealPrice)):z?.compare_at_price&&z?.compare_at_price>z?.price?e.createElement("div",{style:{display:"flex",flexDirection:"row",gap:5,alignItems:"center"}},e.createElement("span",{style:{fontWeight:"500",fontSize:18,color:C},className:"yt-sticky-bar-product-price"},`${Y}`,tn(z?.price,s?.currency)),e.createElement("span",{style:{textDecoration:"line-through",color:"#6b7280",fontSize:14},className:"yt-sticky-bar-product-compare-price"},`${Y}`,tn(z?.compare_at_price,s?.currency)),e.createElement("span",{style:{backgroundColor:d??"black",color:b??"white",padding:"3px 9px",fontSize:"12px",borderRadius:"rounded"===f?`${y}px`:"0"},className:"yt-sticky-bar-product-discount"},"Save ",`${Y}`,tn(z?.compare_at_price-z?.price,s?.currency))):e.createElement(e.Fragment,null,e.createElement("span",{style:{fontWeight:"500",fontSize:18,color:C},className:"yt-sticky-bar-product-price"},`${Y}`,tn(z?.price,s?.currency)))),e.createElement("span",{style:{color:"#6E747B",fontSize:10},className:"yt-sticky-bar-product-tax-inclusion"},"Inclusive of all taxes"))),$e&&e.createElement(qp,{className:"yt-sticky-bar-product-line-item-control",$flexDirection:ge?"row":"column"},de&&e.createElement(Up,{ref:q,onClick:async()=>{if(E&&"combo"===E.type){if(!k)return void console.error("[StickyCart.tsx] comboBundleAddToCartFunction is undefined");const e=Object.entries(M);if(0===e.length)return;const t=e.map(([,e])=>e),n=e.map(([e,t])=>{const n=E?.products?.[Number(e)],o=n?.productDetails?.variants?.edges?.find(e=>e?.node?.id===t)?.node;return o?{variantId:t,price:Number(o?.price),compareAtPrice:Number(o?.compareAtPrice||o?.price)}:null}).filter(e=>null!==e),o=n.reduce((e,t)=>e+Math.max(t.compareAtPrice,t.price),0),r=n.reduce((e,t)=>e+t.price,0);let i=Math.min(o,r);E?.percentageOff?i=r*(1-E.percentageOff/100):E?.dealAmount?i=E.dealAmount:E?.amountOff&&(i=r-E.amountOff);const a=n.map(({variantId:e,price:t})=>({variantId:e,price:t}));try{await k(Number(o.toFixed(2)),t,Number(i.toFixed(2)),a)}catch(e){console.error("[StickyCart.tsx] Error adding combo bundle to cart:",e)}return}if(T&&T.minimumQuantity>1){if(!$)return void console.error("[StickyCart.tsx] volumeBundleAddToCartFunction is undefined");const e=String(B)??String(a?.variants[0]?.id),t=Array(T.minimumQuantity).fill(e),n=X?Number(X.originalPrice):0;try{await $(n,t)}catch(e){console.error("[StickyCart.tsx] Error adding volume bundle to cart:",e)}return}x&&await x(String(B)??String(a?.variants[0]?.id),Q)},disabled:Z.cartLoading||!ze,$bgColor:ze?m:"#d1d5db",$textColor:ze?g:"#6b7280",className:"yt-sticky-add-to-cart-button",$cornerType:f??"sharp",$cornerRadius:y??20,$fontSize:fe,style:{cursor:ze?"pointer":"not-allowed",opacity:ze?1:.6}},Z.cartLoading?e.createElement(rt,{color:"white",loading:Z.cartLoading,size:15}):e.createElement(e.Fragment,null,ze?me??"Add to Cart":"Out of Stock")),ce&&e.createElement(Qp,{onClick:async()=>{try{v&&await v(String(B)??String(a?.variants[0]?.id),Q)}catch(e){console.error("Error checking out from sticky bar")}},id:"yt-checkout-button",className:"yt-checkout-button",disabled:Z.cartLoading||!ze,$bgColor:ze?d:"#d1d5db",$textColor:ze?b:"#6b7280",$cornerType:f??"sharp",$cornerRadius:y??20,$fontSize:fe,style:{cursor:ze?"pointer":"not-allowed",opacity:ze?1:.6}},Z.cartLoading?e.createElement(rt,{color:"white",loading:Z.cartLoading,size:15}):e.createElement(e.Fragment,null,ze?ue??"Buy Now":"Out of Stock")))))},Xp=c.div`
4893
4893
  width: 100%;
4894
4894
  height: 100%;
4895
4895
  display: flex;
@@ -5320,4 +5320,4 @@ import e,{useState as t,useEffect as n,useMemo as o,useRef as r,useCallback as i
5320
5320
  &:hover {
5321
5321
  border-color: ${({$themeColor:e})=>e||"#000"};
5322
5322
  }
5323
- `,bu=l(({removeCartItem:i,addCartItem:a,getProductDetailsByVariantId:l,themeColor:c,cartComponentsCornerRadius:d,cartComponentsCornerType:s,backgroundColor:p,removeFreebieFromCart:u,freebieClaimAddToCart:m,stealDealAddToCart:g,productClaimCtaButtonText:x,backgroundSubdued:f,primaryTextColor:y},b)=>{const[h,v]=ie(en),w=ae(Ut),C=r(null),[E,k]=t(null),[T,S]=t({}),[$,B]=t(h?.variantId),[I,z]=t(h?.quantity||1),[F,N]=t(!1),P=ir();n(()=>{h?.open?setTimeout(()=>{N(!0)},10):N(!1)},[h?.open]);const D=()=>{N(!1),setTimeout(()=>{v({open:!1,variantId:void 0,handle:void 0,quantity:void 0})},300)};n(()=>{(async()=>{if(!E&&l&&h?.variantId&&h?.handle){const e=await l(h.handle,h.variantId);if(e&&e.variants&&e.options){let t;const n=h.allowedVariantIds,o=Array.isArray(n)&&n.length>0;if(t=o?e.variants.find(e=>e.available&&n.includes(String(e.id))&&String(e.id)===String(h.variantId))||e.variants.find(e=>e.available&&n.includes(String(e.id))):e.variants.find(e=>e.available&&String(e.id)===String(h.variantId)),t){B(String(t.id));const n={};e.options.forEach((e,o)=>{n[e.name]=t[`option${o+1}`]}),S(n)}else B(void 0),S({})}k(e)}})()},[E,l,h]);const A=(e,t)=>{const n={...T,[e]:t};S(n);const o=E?.variants?.find(e=>E.options.every((t,o)=>e[`option${o+1}`]===n[t.name]));if(o){const e=h?.allowedVariantIds;if(Array.isArray(e)&&e.length>0&&!e.includes(String(o.id)))return;o.available&&B(String(o.id))}},_=E?.variants?.find(e=>String(e.id)===String($)),R=on(w,w?.currency),O=o(()=>{const e={};if(!E)return e;const t=Array.isArray(h?.allowedVariantIds)&&h.allowedVariantIds.length>0;return E.options.forEach(n=>{e[n.name]=n.values.filter(e=>E.variants.filter(o=>{const r=E.options.indexOf(n);if(o[`option${r+1}`]!==e)return!1;return!!E.options.every((e,t)=>{if(e.name===n.name)return!0;const r=T[e.name];return!r||o[`option${t+1}`]===r})&&(!!(!t||Array.isArray(h.allowedVariantIds)&&h.allowedVariantIds.includes(String(o.id)))&&!!o.available)}).some(e=>!!(!t||Array.isArray(h.allowedVariantIds)&&h.allowedVariantIds.includes(String(e.id)))&&e.available))}),e},[E,T,h]);return E?e.createElement(e.Fragment,null,e.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",zIndex:2147483643,display:h?.open?"flex":"none",justifyContent:"center",alignItems:"center",opacity:F?1:0,transition:"opacity 0.3s ease"},onClick:D}),e.createElement(Xp,{ref:b,className:"yt-variant-selection-popup"},e.createElement(Jp,{ref:C,style:{backgroundColor:p||"white",opacity:F?1:0,transform:F?"translateY(0)":"translateY(20px)"},$themeColor:c,onClick:e=>e.stopPropagation()},h?.freebieSelection&&e.createElement(Zp,null,h?.stealDealSelection?"Unlocked Steal Deal":"Unlocked Freebie"),e.createElement(eu,null,e.createElement(tu,null,e.createElement(nu,null,e.createElement(ou,{src:_?.featured_image?.src??E?.featured_image,alt:_?.featured_image?.alt??E?.title})),e.createElement(ru,null,e.createElement(iu,{$themeColor:c,$primaryTextColor:y,href:`${E?.url}?variant=${_?.id}`},E?.title),e.createElement(xu,null,e.createElement(au,null,e.createElement(lu,{$primaryTextColor:y},R,tn(_?.price,w?.currency??"INR")),null!=_?.compare_at_price&&null!=_?.price&&_.compare_at_price>_.price&&e.createElement(cu,null,R,tn(_?.compare_at_price,w?.currency??"INR"))),!h?.freebieSelection&&e.createElement(Jo,{value:I,handleItemQuantityIncrement:async()=>{z(e=>e+1)},handleItemQuantityDecrement:async()=>{I>1&&z(e=>e-1)},cartComponentsCornerRadius:d,cartComponentsCornerType:s,backgroundSubdued:f})))),E?.options?.map(t=>{const n=P?.options?.find(e=>e.name.trim().toLowerCase()===t.name.trim().toLowerCase());return e.createElement(su,{key:t.name},e.createElement(uu,null,e.createElement("span",null,"Select ",t.name),T[t.name]&&e.createElement(mu,null,T[t.name])),e.createElement(gu,null,O[t.name]?.map(o=>{const r=T[t.name]===o,i=rr(n,o);return"color"===n?.type&&i?.value?e.createElement(fu,{key:o,$isSelected:r,$themeColor:c,onClick:()=>A(t.name,o),$colorValue:i.value}):"image"===n?.type&&i?.value?e.createElement(yu,{key:o,$isSelected:r,$themeColor:c,onClick:()=>A(t.name,o),$imageUrl:i.value}):e.createElement(pu,{$themeColor:c,key:o,$isSelected:r,backgroundColor:r?c:void 0,onClick:()=>A(t.name,o)},o)})))})),e.createElement(du,{className:"yt-cart-variant-popup-ATC-button",$themeColor:c??"#C33",onClick:h?.productRec?async()=>{if($&&a){D();try{await a($,I,"product-recommendation-variant-selector",!1,h.handle)}catch(e){console.error("Error adding item from product recommendation:",e)}}}:async()=>{if(!$)return;const e=!!h?.lineItemKey,t=String($)!==String(h?.variantId);if(D(),!e||t)try{const e=h?.freebieSelection;e&&!h?.lineItemKey||(e&&u&&h?.lineItemKey?await u(h.lineItemKey):await i(h?.lineItemKey||h?.variantId,"variant-selector",!0)),e&&h?.stealDealSelection&&g?await g($,h.allowedVariantIds):e&&m?await m($,h.allowedVariantIds):a&&$&&await a($,I,"variant-selector",!1,h.handle)}catch(e){}},disabled:!$},h?.productRec?"ADD TO BAG":h?.stealDealSelection?"CLAIM DEAL":h?.freebieSelection?x||"CLAIM FREEBIE":"GET IN BAG")))):e.createElement(Xp,{ref:b},e.createElement(Jp,{style:{backgroundColor:p||"white"}},e.createElement(Kp,null,e.createElement(it,{color:c||"#868E96"}))))});bu.displayName="DesktopVariantPopup";const hu=l(({removeCartItem:i,addCartItem:a,getProductDetailsByVariantId:l,themeColor:c,cartComponentsCornerRadius:d,cartComponentsCornerType:s,backgroundColor:p,removeFreebieFromCart:u,freebieClaimAddToCart:m,stealDealAddToCart:g,productClaimCtaButtonText:x,backgroundSubdued:f,primaryTextColor:y},b)=>{const[h,v]=ie(en),w=ae(Ut),[C,E]=t(null),[k,T]=t({}),[S,$]=t(h?.variantId),[B,I]=t(h?.quantity||1),z=r(null),F=ir(),[N,P]=t(!1);n(()=>{h?.open?setTimeout(()=>{P(!0)},10):P(!1)},[h?.open]);const D=()=>{P(!1),setTimeout(()=>{v({open:!1,variantId:void 0,handle:void 0,quantity:void 0})},300)};n(()=>{(async()=>{if(!C&&l&&h?.variantId&&h?.handle)try{const e=await l(h.handle,h.variantId);if(!e)return;if(!e.variants||!Array.isArray(e.variants))return;if(e&&e.variants&&e.options){let t;const n=h.allowedVariantIds,o=Array.isArray(n)&&n.length>0;if(t=o?e.variants.find(e=>e.available&&n.includes(String(e.id))&&String(e.id)===String(h.variantId))||e.variants.find(e=>e.available&&n.includes(String(e.id))):e.variants.find(e=>e.available&&String(e.id)===String(h.variantId)),t){$(String(t.id));const n={};e.options.forEach((e,o)=>{n[e.name]=t[`option${o+1}`]}),T(n)}else $(void 0),T({})}E(e)}catch(e){}})()},[C,l,h]),n(()=>{},[p,i,a,l]);const A=(e,t)=>{const n={...k,[e]:t};T(n);const o=C?.variants?.find(e=>C.options.every((t,o)=>e[`option${o+1}`]===n[t.name]));if(o){const e=h?.allowedVariantIds;if(Array.isArray(e)&&e.length>0&&!e.includes(String(o.id)))return;o.available&&$(String(o.id))}},_=C?.variants?.find(e=>String(e.id)===String(S)),R=on(w,w?.currency),O=o(()=>{const e={};if(!C)return e;const t=Array.isArray(h?.allowedVariantIds)&&h.allowedVariantIds.length>0;return C.options.forEach(n=>{e[n.name]=n.values.filter(e=>C.variants.filter(o=>{const r=C.options.indexOf(n);if(o[`option${r+1}`]!==e)return!1;return!!C.options.every((e,t)=>{if(e.name===n.name)return!0;const r=k[e.name];return!r||o[`option${t+1}`]===r})&&(!!(!t||Array.isArray(h.allowedVariantIds)&&h.allowedVariantIds.includes(String(o.id)))&&!!o.available)}).some(e=>!!(!t||Array.isArray(h.allowedVariantIds)&&h.allowedVariantIds.includes(String(e.id)))&&e.available))}),e},[C,k,h]);return C?e.createElement(e.Fragment,null,e.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",zIndex:2147483643,display:h?.open?"flex":"none",justifyContent:"center",alignItems:"center",opacity:N?1:0,transition:"opacity 0.3s ease"},onClick:D}),e.createElement(Xp,{ref:b,className:"yt-variant-selection-popup"},e.createElement(Jp,{ref:z,style:{backgroundColor:p||"white",opacity:N?1:0,transform:N?"translateY(0)":"translateY(20px)"},$themeColor:c,onClick:e=>e.stopPropagation()},h?.freebieSelection&&e.createElement(Zp,null,h?.stealDealSelection?"Unlocked Steal Deal":"Unlocked Freebie"),e.createElement(eu,null,e.createElement(tu,null,e.createElement(nu,null,e.createElement(ou,{src:_?.featured_image?.src??C?.featured_image,alt:_?.featured_image?.alt??C?.title})),e.createElement(ru,null,e.createElement(iu,{$themeColor:c,$primaryTextColor:y,href:`${C?.url}?variant=${_?.id}`},C?.title),e.createElement(xu,null,e.createElement(au,null,e.createElement(lu,{$primaryTextColor:y},R,tn(_?.price,w?.currency??"INR")),null!=_?.compare_at_price&&null!=_?.price&&_.compare_at_price>_.price&&e.createElement(cu,null,R,tn(_?.compare_at_price,w?.currency??"INR"))),!h?.freebieSelection&&e.createElement(Jo,{value:B,handleItemQuantityIncrement:async()=>{I(e=>e+1)},handleItemQuantityDecrement:async()=>{B>1&&I(e=>e-1)},cartComponentsCornerRadius:d,cartComponentsCornerType:s,backgroundSubdued:f})))),C?.options?.map(t=>{const n=F?.options?.find(e=>e.name.trim().toLowerCase()===t.name.trim().toLowerCase());return e.createElement(su,{key:t.name},e.createElement(uu,null,e.createElement("span",null,"Select ",t.name,":"),k[t.name]&&e.createElement(mu,null,k[t.name])),e.createElement(gu,null,O[t.name]?.map(o=>{const r=k[t.name]===o,i=rr(n,o);return"color"===n?.type&&i?.value?e.createElement(fu,{key:o,$isSelected:r,$themeColor:c,onClick:()=>A(t.name,o),$colorValue:i.value}):"image"===n?.type&&i?.value?e.createElement(yu,{key:o,$isSelected:r,$themeColor:c,onClick:()=>A(t.name,o),$imageUrl:i.value}):e.createElement(pu,{$themeColor:c,key:o,$isSelected:r,backgroundColor:r?c:void 0,onClick:()=>A(t.name,o)},o)})))})),e.createElement(du,{className:"yt-cart-variant-popup-ATC-button",$themeColor:c??"#C33",onClick:h?.productRec?async()=>{if(S&&a){D();try{await a(S,B,"product-recommendation-variant-selector",!1,h.handle)}catch(e){console.error("Error adding item from product recommendation:",e)}}}:async()=>{if(!S)return;const e=!!h?.lineItemKey,t=String(S)!==String(h?.variantId);if(D(),!e||t)try{const e=h?.freebieSelection;e&&!h?.lineItemKey||(e&&u&&h?.lineItemKey?await u(h.lineItemKey):await i(h?.lineItemKey||h?.variantId,"variant-selector",!0)),e&&h?.stealDealSelection&&g?await g(S,h.allowedVariantIds):e&&m?await m(S,h.allowedVariantIds):a&&S&&await a(S,B,"variant-selector",!1,h.handle)}catch(e){}},disabled:!S},h?.productRec?"ADD TO BAG":h?.stealDealSelection?"CLAIM DEAL":h?.freebieSelection?x||"CLAIM FREEBIE":"GET IN BAG")))):e.createElement(Xp,{ref:b},e.createElement(Jp,{style:{backgroundColor:p||"white"}},e.createElement(Kp,null,e.createElement(it,{color:c||"#868E96"}))))});const vu=({setIsCartOpen:t,isCartOpen:n,cartCheckpoints:o,customCartProgressBarCriteria:r,floatingCartData:i,effectiveQuantityForProgressBar:a,cartComponentsCornerType:l,cartComponentsCornerRadius:c})=>{const d=ae(Ut),s=i?.bannerFooterText,p="string"==typeof s&&s.trim().length>0,u=!n&&(e=>{try{if("undefined"==typeof window)return!1;const t=window.location.pathname||"/";if("/"===t||""===t)return!0;const n=e?.showOnPages;if(!Array.isArray(n)||0===n.length)return!1;const o=t.toLowerCase(),r=o.endsWith("/")?o:`${o}/`;return n.some(e=>{if(!e||"string"!=typeof e)return!1;const t=e.trim().toLowerCase().replace(/^\/|\/$/g,"");if(!t)return!1;const n=`/${t}/`;return r.includes(n)})}catch{return!1}})(i),m=d?.item_count??0,g=tn(d?.items_subtotal_price??0,d?.currency??"INR"),x=on(d),f=function(e,t,n,o,r){if(!e||0===e.length)return{deltaValue:0,show:!1};const i=(t??"minimum_order_value").toLowerCase(),a="quantity_threshold"===i?"number"==typeof r?r:o:n,l=[...e].sort((e,t)=>("quantity_threshold"===i?e.quantityThreshold:e.minimumOrderValue)-("quantity_threshold"===i?t.quantityThreshold:t.minimumOrderValue)).find(e=>("quantity_threshold"===i?e.quantityThreshold:e.minimumOrderValue)>a);if(!l)return{deltaValue:0,show:!1};const c="quantity_threshold"===i?l.quantityThreshold:l.minimumOrderValue,d=Math.max(0,c-a);return{deltaValue:d,show:d>0,isQuantity:"quantity_threshold"===i}}(o,r,g,m,a),y="sharp"===l?0:c??12,h=i?.textColor??"#111",v=i?.backgroundColor??"#FF7E6E",w=i?.bannerBackgroundColor??"#FFE0DC",C=i?.buttonColor??"#E8513F",E=e.useRef(null);e.useEffect(()=>{pn(E.current)},[C]);const k={position:"fixed",width:"100%",bottom:0,zIndex:2147483642,paddingBottom:"env(safe-area-inset-bottom)"},T={background:"#FFFFFF",color:"#111",padding:"5px",fontSize:12,fontFamily:"Poppins",fontWeight:600,textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",gap:8},S={background:"#fff",color:h,borderRadius:y,boxShadow:"0 10px 24px rgba(0,0,0,0.15)",overflow:"hidden",fontFamily:"Poppins"},$={position:"absolute",top:0,left:"50%",transform:"translate(-50%, -70%)",backgroundColor:w,color:h,padding:8,fontSize:12,lineHeight:"normal",borderTopLeftRadius:13,borderTopRightRadius:13,width:"97%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,zIndex:-1},B={display:"flex",alignItems:"center",gap:12,padding:"10px 12px",backgroundColor:v,cursor:"pointer"},I={display:"flex",alignItems:"center",gap:8,fontWeight:700,fontSize:16,color:h},z={fontSize:12,color:h,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},F={padding:"5px 10px",background:C,color:"#fff",borderRadius:8,fontSize:15,fontWeight:700,border:"none",outline:"none",flexShrink:0};if(!u)return null;if(0===m){if(!f.show)return null;const t=f.isQuantity?`${f.deltaValue} more items to get freebie`:`Add items worth ${x}${un(f.deltaValue.toFixed(0))} to get freebie`;return e.createElement("div",{style:k},e.createElement("div",{style:T},e.createElement(b,{"aria-hidden":!0}),e.createElement("span",null,t)))}const N=1===m?"1 item":`${m} items`,P=i?.lastTierUnlockedText||"Best tier unlocked",D=f.show?f.isQuantity?`${f.deltaValue} more items to get freebie`:`Add items worth ${x}${un(f.deltaValue.toFixed(0))} more to get freebie`:P;return e.createElement("div",{style:{position:"fixed",left:12,right:12,bottom:12,zIndex:2147483642,paddingBottom:"env(safe-area-inset-bottom)"}},e.createElement("div",{style:{position:"relative"}},(f.show||o&&o.length>0)&&e.createElement("div",{style:$},e.createElement(b,{"aria-hidden":!0,style:{marginBottom:7}}),e.createElement("span",{style:{display:"inline-block",marginBottom:7}},D)),e.createElement("div",{style:S},e.createElement("div",{style:B,onClick:()=>t(!0)},e.createElement(_,{width:24,height:24,color:h}),e.createElement("div",{style:{display:"flex",flexDirection:"column",minWidth:0,flex:1,lineHeight:"normal"}},e.createElement("div",{style:I},e.createElement("span",null,x,un(g.toFixed(0))),e.createElement("span",{style:{fontSize:9,fontWeight:600,color:"#fff",backgroundColor:"#828282",marginBottom:5,paddingInline:5}},N)),p?e.createElement("span",{style:z,title:s},s):null),e.createElement("button",{ref:E,style:F,onClick:()=>t(!0),"aria-label":"View Cart"},"View Cart")))))},wu=({exploreCTAColor:o,checkoutFontSize:i,handleDecrement:l,handleIncrement:c,removeCartItem:d,addCartItem:s,cartTitle:p,emptyCartTitle:u,emptyCartDescription:m,emptyCartButtons:g,backgroundColor:x,backgroundSubdued:f,tertiaryColor:y,tertiaryTextColor:b,backdrop:h=!0,cartData:v,isUserSignedIn:w,showBundle:C,bundleProducts:E,discountAmountOff:k,loyaltyIcon:T,pointsToBeUsed:S,rewardMultiplier:$,redemptionMultiplier:B,removeDiscount:I,applyDiscount:z,discountApplied:F,checkoutFunction:N,joinNowFunction:P,guestLoyaltyPercentage:D,showToggleButton:A,isOpen:_,setIsOpen:R,isDev:O,switchWidthVariant:L,recProductsList:M,showMultiStepProgressBar:j,cartCheckpoints:V,redemptionRate:W,pointsRewardRate:H,showCartLevelAltPay:q,exploreCtaRedirectLink:Q,discountAmountApplied:U,minimumCartValue:Y,discountInCheckoutButton:G,isStickyCheckout:X,handleCheckpointCrossed:Z,customCartProgressBarCriteria:J,checkoutButtonColor:K,ctaButtonBackgroundColor:ee,ctaButtonTextColor:te,primaryTextColor:ne,productRecsCtaButtonText:oe,productRecsTitleText:re,secondaryTextColor:ae,showProductRecsOnDesktop:ce,showProductRecsOnMobile:de,themeColor:se,themeTextColor:pe,companyName:ue,gstNumber:me,showGSTOption:ge,applyGSTToCart:xe,showMOVForProgressTiers:fe,freeProduct:ye,showLoyaltyCta:be,freeProductAdjustedCartTotal:he,minimumOrderValueToAvailDiscount:ve,signinCTAButtonVisible:we,cartSigninCTAMainText:Ce,showNoteOption:Ee,applyNoteToCart:ke,note:Te,inlineCartOfferInfoText:Se,inlineCartOfferInfoRedirectLink:$e,cartOfferTermsAndConditionsText:Be,showEditOptionOnProducts:Ie,getProductDetailsByVariantId:ze,onSetLoading:Fe,showVariantSelectionDropdownInProductRecs:Ne,originalCartSubtotal:Pe,currentTier:De,freebieProductsInCart:Ae,showFreebieClaim:_e,addFreebieToCart:Re,freebiesInCart:Oe,effectiveQuantityForProgressBar:Le,productPercentageOffMapping:Me,removeFreebieFromCart:je,postalCodeList:Ve,enableGeoLocationDeliveryRestriction:We,applyPostalCodeAndDeliverySlotToCart:He,showDeleteOnFreebies:qe,freebieCouponTemplates:Qe,freebieFlowCheckpoints:Ue,freebieClaimData:Ye,showStickyAddToCart:Ge,stickyCartLineItem:Xe,postalCodeBasedItemTrackingParameter:Ze,enableSlotPicker:Je,deliveryHeaderTitle:Ke,deliveryAvailableText:et,deliveryNotAvailableText:tt,giftWrapSetupData:nt,giftWrapProductDetail:ot,enableCustomCartOnCartPage:rt,isCartPage:it,progressBarFreeProductIconType:at,addToStickyCart:lt,productRecsCardLayout:ct,productRecsCardListVariant:dt,showCartTimer:st,showFreebieMilestone:pt,showFloatingCart:ut,floatingCartData:mt,freebieMilestoneData:gt,cartTimerInMinutes:xt,cartTimerCustomText:ft,imageAspectSelector:yt,cartComponentsCornerType:bt,cartComponentsCornerRadius:ht,stickyCartCustomizationData:vt,cartOffersCarousalData:wt,stickyBarBuyNowFunction:Ct,gstSectionCustomizationData:Et,noteSectionTitle:kt,checkoutSectionMessage:Tt,checkoutSectionMessageRedirectLink:St,checkoutSectionMessageDisplay:$t,showVariantSelectionDropdownInProductClaim:Bt,loyaltyDiscount:It,brandTokenName:zt,showDiscountOnMRP:Ft,prefixMessageText:Nt,suffixMessageText:Pt,successMessageText:Dt,toggleDecimal:At,cartOffersCarouselHeight:_t,disableCheckoutButton:Rt,showEmptyCartRecommendations:Ot,emptyProductRecsTitleText:Lt,checkoutButtonBottomSpacing:Mt,showPoweredByBadge:jt=!0,applyCouponCode:Vt,showApplyCoupon:Wt,enableConfetti:Ht,showCheckoutButtonPaymentIcons:qt=!0,showCouponOptions:Qt,rewardCoupons:Yt,comboBundleData:Gt,comboBundleAddToCartFunction:Xt,stealDealCheckpoints:Zt,stealDealProducts:Jt,stealDealAddToCart:Kt,useCartShell:tn})=>{const nn=le(Ut),[on,rn]=ie(en),[an,ln]=ie(ji),cn=()=>R(!_),[dn,sn]=t(()=>{const e=window.ytComboBundle;return{comboBundleData:e?.bundle??null,comboBundleAddToCartFunction:e?.addToCart??null}});n(()=>{const e=e=>{const t=e.detail;sn({comboBundleData:t?.bundle??null,comboBundleAddToCartFunction:t?.addToCart??null})};return window.addEventListener("yt-combo-bundle-updated",e),()=>window.removeEventListener("yt-combo-bundle-updated",e)},[]);const pn=dn.comboBundleData??Gt,un=dn.comboBundleAddToCartFunction??Xt,[mn,gn]=t(()=>{const e=window.ytVolumeBundle;return{bundle:e?.bundle??void 0,currentTier:e?.currentTier??void 0,volumeBundleAddToCartFunction:e?.addToCart??void 0}});n(()=>{const e=e=>{const t=e.detail;gn({bundle:t?.bundle??void 0,currentTier:t?.tierData??void 0,volumeBundleAddToCartFunction:t?.addToCart??void 0})};return window.addEventListener("yt-volume-bundle-updated",e),()=>window.removeEventListener("yt-volume-bundle-updated",e)},[]);const xn=r(null),fn=r(0);a(()=>{if(v){const e=v?.token??null,t="number"==typeof v?.cartUpdatedAtMs?v.cartUpdatedAtMs:void 0;e!==xn.current&&(xn.current=e,fn.current=t??0);const n=fn.current;if(!(void 0===t||t>=n))return;void 0!==t&&(fn.current=t),nn(v)}},[v]);const yn=r(null);n(()=>{function e(e){yn.current&&!yn.current.contains(e.target)&&(rn({open:!1,variantId:void 0,quantity:void 0,handle:void 0}),ln({isOpen:!1}))}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]);const[bn,hn]=t(!1);return n(()=>{const e=()=>{hn(window.innerWidth>=768)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),n(()=>{if(!tn)return;const e=window.ytCartShell;if(!e)return;const t=e.getDrawerElement?.(),n=e.getOverlayElement?.();t&&(!_||rt&&it?(t.style.setProperty("transform","translateX(100%)","important"),t.style.boxShadow="none",n&&(n.style.display="none"),document.body.classList.remove("drawer-open")):(t.style.setProperty("transform","translateX(0)","important"),t.style.boxShadow="-14px 8px 14.4px 0px rgba(0, 0, 0, 0.35)",h&&n&&(n.style.display="block"),document.body.classList.add("drawer-open")))},[_,tn,rt,it,h]),n(()=>{if(!tn)return;const e=window.ytCartShell,t=e?.getOverlayElement?.();if(!t)return;const n=()=>R(!1);return t.addEventListener("click",n),()=>t.removeEventListener("click",n)},[tn,R]),e.createElement(e.Fragment,null,e.createElement("div",{style:{position:rt&&it?"relative":"absolute",width:"100%",display:rt&&it?"flex":"block",alignItems:"center",justifyContent:"center"}},A&&!(rt&&it)&&e.createElement("button",{style:{margin:"16px"},onClick:cn},_?"Close Drawer":"Open Drawer"),!tn&&_&&h&&!(rt&&it)&&e.createElement("div",{onClick:cn,id:"custom-cart-yt-overlay",style:{position:"fixed",top:0,right:0,zIndex:1e4,transform:"translateX(0)",backgroundColor:"rgba(0,0,0,0.5)",inset:0,height:"100%",width:"100%"}},"‎"),e.createElement(Il,{useCartShell:tn,isCartPage:it,enableCustomCartOnCartPage:rt,isOpen:_,setIsOpen:R,backgroundColor:x,backgroundSubdued:f??"#F5F5F5",tertiaryColor:y,tertiaryTextColor:b,exploreCTAColor:o,checkoutFontSize:i,cartTitle:p,handleDecrement:l,handleIncrement:c,removeCartItem:d,addCartItem:s,emptyCartTitle:u,emptyCartButtons:g,emptyCartDescription:m,showBundle:C,isUserSignedIn:w,bundleProducts:E,discountAmountOff:k,loyaltyIcon:T,pointsToBeUsed:S,rewardMultiplier:$,redemptionMultiplier:B,removeDiscount:I,applyDiscount:z,discountApplied:F,checkoutFunction:N,joinNowFunction:P,guestLoyaltyPercentage:D,isDev:O,switchWidthVariant:L,recProductsList:M,showMultiStepProgressBar:j,cartCheckpoints:V,redemptionRate:W,pointsRewardRate:H,showCartLevelAltPay:q,exploreCtaRedirectLink:Q,discountAmountApplied:U,minimumCartValue:Y,discountInCheckoutButton:G,isStickyCheckout:X,handleCheckpointCrossed:Z,customCartProgressBarCriteria:J??"minimum_order_value",checkoutButtonColor:K,ctaButtonBackgroundColor:ee,ctaButtonTextColor:te,primaryTextColor:ne,productRecsCtaButtonText:oe,productRecsTitleText:re,secondaryTextColor:ae,showProductRecsOnDesktop:ce,showProductRecsOnMobile:de,themeColor:se,themeTextColor:pe,companyName:ue,gstNumber:me,showGSTOption:ge,applyGSTToCart:xe,showMOVForProgressTiers:fe,freeProduct:ye,showLoyaltyCta:be,freeProductAdjustedCartTotal:he,minimumOrderValueToAvailDiscount:ve,signinCTAButtonVisible:we,cartSigninCTAMainText:Ce,applyNoteToCart:ke,note:Te,showNoteOption:Ee,inlineCartOfferInfoText:Se,inlineCartOfferInfoRedirectLink:$e,cartOfferTermsAndConditionsText:Be,showEditOptionOnProducts:Ie,onSetLoading:Fe,showVariantSelectionDropdownInProductRecs:Ne,originalCartSubtotal:Pe,currentTier:De,freebieProductsInCart:Ae,cartOffersCarousalData:wt,showFreebieClaim:_e,addFreebieToCart:Re,freebiesInCart:Oe,effectiveQuantityForProgressBar:Le,productPercentageOffMapping:Me,removeFreebieFromCart:je,postalCodeList:Ve,enableGeoLocationDeliveryRestriction:We,applyPostalCodeAndDeliverySlotToCart:He,showDeleteOnFreebies:qe,freebieCouponTemplates:Qe,freebieFlowCheckpoints:Ue,freebieClaimData:Ye,postalCodeBasedItemTrackingParameter:Ze,enableSlotPicker:Je,deliveryHeaderTitle:Ke,deliveryAvailableText:et,deliveryNotAvailableText:tt,giftWrapSetupData:nt,giftWrapProductDetail:ot,progressBarFreeProductIconType:at,productRecsCardLayout:ct,productRecsCardListVariant:dt,showCartTimer:st,showFreebieMilestone:pt,freebieMilestoneData:gt,cartTimerCustomText:ft,cartTimerInMinutes:xt,imageAspectSelector:yt,cartComponentsCornerType:bt,cartComponentsCornerRadius:ht,gstSectionCustomizationData:Et,noteSectionTitle:kt,checkoutSectionMessage:Tt,checkoutSectionMessageRedirectLink:St,checkoutSectionMessageDisplay:$t,showVariantSelectionDropdownInProductClaim:Bt,loyaltyDiscount:It,getProductDetailsByVariantId:ze,brandTokenName:zt,showDiscountOnMRP:Ft??!0,prefixMessageText:Nt,suffixMessageText:Pt,successMessageText:Dt,toggleDecimal:At,cartOffersCarouselHeight:_t,disableCheckoutButton:Rt,showEmptyCartRecommendations:Ot,emptyProductRecsTitleText:Lt,checkoutButtonBottomSpacing:Mt,showPoweredByBadge:jt,applyCouponCode:Vt,showApplyCoupon:Wt,enableConfetti:Ht,showCheckoutButtonPaymentIcons:qt,stealDealCheckpoints:Zt,stealDealProducts:Jt,stealDealAddToCart:Kt,showCouponOptions:Qt,rewardCoupons:Yt}),Ge&&Xe&&s&&e.createElement(Gp,{showStickyCart:Ge,stickyCartCustomizationData:vt,product:Xe,addCartItem:s,onSetLoading:Fe,themeColor:se,themeTextColor:pe,cartData:v,isCartOpen:_,setIsCartOpen:R,ctaButtonBackgroundColor:ee,ctaButtonTextColor:te,addToStickyCart:lt,cartComponentsCornerRadius:ht,cartComponentsCornerType:bt,checkoutFunction:Ct,backgroundColor:x,primaryTextColor:ne,comboBundleData:pn,comboBundleAddToCartFunction:un,volumeBundleCurrentTier:mn.currentTier,volumeBundleData:mn.bundle,volumeBundleAddToCartFunction:mn.volumeBundleAddToCartFunction}),bn&&on.open&&e.createElement(bu,{backgroundColor:x,ref:yn,isDev:O,removeCartItem:d,addCartItem:s,getProductDetailsByVariantId:ze,themeColor:se,cartComponentsCornerRadius:ht,cartComponentsCornerType:bt,removeFreebieFromCart:je,freebieClaimAddToCart:Re,stealDealAddToCart:Kt,productClaimCtaButtonText:Ye?.productClaimCtaButtonText,backgroundSubdued:f??"#F5F5F5",primaryTextColor:ne}),!bn&&on.open&&e.createElement(hu,{ref:yn,isDev:O,removeCartItem:d,addCartItem:s,getProductDetailsByVariantId:ze,themeColor:se,cartComponentsCornerRadius:ht,cartComponentsCornerType:bt,backgroundColor:x,removeFreebieFromCart:je,freebieClaimAddToCart:Re,stealDealAddToCart:Kt,productClaimCtaButtonText:Ye?.productClaimCtaButtonText,backgroundSubdued:f??"#F5F5F5",primaryTextColor:ne})),!bn&&ut&&e.createElement(vu,{isCartOpen:_,setIsCartOpen:R,cartCheckpoints:V,customCartProgressBarCriteria:J,floatingCartData:mt,effectiveQuantityForProgressBar:Le,cartComponentsCornerRadius:ht,cartComponentsCornerType:bt}))};gt(".scene {\n width: 100%;\n height: 60vh;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.floating {\n animation: float 3s ease-in-out infinite;\n}\n\n@keyframes float {\n 0%, 100% {\n transform: translateY(0);\n }\n 50% {\n transform: translateY(-10px);\n }\n}\n.cube {\n position: relative;\n width: 50px;\n height: 50px;\n transform-style: preserve-3d;\n transform: rotateX(-45deg) rotateY(50deg) rotateZ(0deg);\n}\n\n.side,\n.lid,\n.flap {\n position: absolute;\n width: 100px;\n height: 100px;\n border: 4px solid #333366;\n background: transparent;\n box-sizing: border-box;\n}\n\n.side {\n background: #fff;\n backface-visibility: hidden;\n}\n\n.side.front {\n transform: translateZ(50px);\n}\n\n.side.back {\n transform: rotateY(180deg) translateZ(50px);\n}\n\n.side.left {\n transform: rotateY(-90deg) translateZ(50px);\n}\n\n.side.right {\n transform: rotateY(90deg) translateZ(50px);\n}\n\n.side.bottom {\n transform: rotateX(-90deg) translateZ(50px);\n}\n\n.lid {\n transform: rotateX(90deg) translateZ(50px);\n transform-style: preserve-3d;\n}\n\n.flap.north {\n top: 0;\n left: 0;\n width: 100%;\n height: 50%;\n transform-origin: top center;\n animation: openNorth 3s ease-in-out infinite;\n}\n\n.flap.south {\n bottom: 0;\n left: 0;\n width: 100%;\n height: 50%;\n transform-origin: bottom center;\n animation: openSouth 3s ease-in-out infinite;\n}\n\n.flap.east {\n top: 0;\n right: 0;\n width: 50%;\n height: 100%;\n transform-origin: right center;\n animation: openEast 3s ease-in-out infinite;\n}\n\n.flap.west {\n top: 0;\n left: 0;\n width: 50%;\n height: 100%;\n transform-origin: left center;\n animation: openWest 3s ease-in-out infinite;\n}\n\n@keyframes openNorth {\n 0%, 100% {\n transform: rotateX(0deg);\n }\n 50% {\n transform: rotateX(180deg);\n }\n}\n@keyframes openSouth {\n 0%, 100% {\n transform: rotateX(0deg);\n }\n 50% {\n transform: rotateX(-180deg);\n }\n}\n@keyframes openEast {\n 0%, 100% {\n transform: rotateY(0deg);\n }\n 50% {\n transform: rotateY(180deg);\n }\n}\n@keyframes openWest {\n 0%, 100% {\n transform: rotateY(0deg);\n }\n 50% {\n transform: rotateY(-180deg);\n }\n}");const Cu=()=>e.createElement("div",{className:"scene"},e.createElement("div",{className:"floating"},e.createElement("div",{className:"cube"},e.createElement("div",{className:"side front"},"‎"),e.createElement("div",{className:"side back"},"‎"),e.createElement("div",{className:"side left"},"‎"),e.createElement("div",{className:"side right"},"‎"),e.createElement("div",{className:"side bottom"},"‎"),e.createElement("div",{className:"lid"},e.createElement("div",{className:"flap north"},"‎"),e.createElement("div",{className:"flap south"},"‎"),e.createElement("div",{className:"flap east"},"‎"),e.createElement("div",{className:"flap west"},"‎"))))),Eu=({config:t,brandConfig:n})=>{const{heroDesktopImage:o,heroMobileImage:r,heroTitle:i="ZERO WASTE PREMIUM PET CARE",heroSubtitle:a="Earn Doglycoins for exclusive rewards every time you shop.",heroTextAlignment:l="left",heroSubtitleFontSize:c="18px",heroSubtitleColor:d="#000000",heroSubtitleFontWeight:s="400",heroTitleFontSize:p="48px",heroTitleColor:u="#000000",heroRegistrationCTAVisibility:m=!0,primaryColor:g="#1C1C1D",primaryContrastColor:x="#FFFFFF",secondaryColor:f="#FFFFFF",secondaryContrastColor:y="#000000",accentColor:b="#FFFFFF",borderColor:I="#E5E5E5",themeRoundness:z="0px",heroBannerVisibility:F="show",stepsVisibility:N="show",waysToEarnVisibility:P="show",waysToEarnCustomText:D="Individual rewards of 750 points or more ship FREE. No merchandise purchase required.",customSectionVisibility:A="show",footerSignupVisibility:_="show",customSectionImagePosition:R="left",customSectionTitle:O="Earn Doglycoins every time you shop",customSectionSubtitle:L="Collect more Doglycoins by entering your birthday, following us on social or referring a friend (details below)\n\nRedeem your Doglycoins for cash off at checkout by signing in or creating an account. Did you shop without registering? No worries, your Credits have been saved for you",customSectionTitleFontSize:M="36px",customSectionSubtitleFontSize:j="18px",customSectionImage:V,customSectionTextAlignment:W="left",customSectionTitleColor:H="#000000",customSectionSubtitleColor:q="#000000",stepsTitle:Q="Getting started is easy",stepsSubtitle:U="Earn Stars and get rewarded in a few easy steps.",step1Title:Y="CREATE AN ACCOUNT",step1Description:G="To get started, Join Now. You can also register on the mobile app to get access to the full range of reward benefits",step2Title:X="ORDER AND EARN REWARDS POINTS",step2Description:Z="Use cash, credit/debit card or save some time and pay right through the app. You'll collect Stars all ways.",step3Title:J="UNLOCK REWARDS AND OFFERS",step3Description:K="As you earn Stars, you can redeem them for Rewards—like free food, drinks, and more. Start redeeming with as little as 25 Stars!",footerCustomText:ee="Individual rewards of 750 points or more ship FREE. No merchandise purchase required.",footerSignupSubtext:te="Use your points to redeem samples and more."}=t||{},ne="undefined"!=typeof window&&window.innerWidth<=768,oe=e=>e&&e.startsWith("//")?`https:${e}`:e,re={padding:"12px 32px",borderRadius:"30px",fontSize:"14px",fontWeight:600,cursor:"pointer",textTransform:"uppercase",border:`1px solid ${g}`,transition:"all 0.3s ease"},ie={...re,backgroundColor:g,color:x,borderColor:g},ae={...re,backgroundColor:f,color:y,borderColor:I},{newSignupTokens:le,firstOrderTokens:ce,instagramFollowPoints:de,twitterFollowPoints:se,facebookFollowPoints:pe,youtubeSubscriptionPoints:ue,rewardToLeaveReview:me,birthdayPoints:ge,referralPointsForReferrer:xe,tokenCreditPercentage:fe,brandTokenName:ye}=n||{},be=[...le?[{icon:e.createElement(h,null),title:`${le} ${ye}`,subtitle:"Create an account"}]:[],...ce?[{icon:e.createElement(v,null),title:`${ce} ${ye}`,subtitle:"Place your first order"}]:[],...fe?[{icon:e.createElement(v,null),title:`${fe}% ${ye}`,subtitle:`Earn ${fe}% back on every order`}]:[],...xe?[{icon:e.createElement(w,null),title:`${xe} ${ye}`,subtitle:"Refer a friend and get"}]:[],...ge?[{icon:e.createElement(C,null),title:`${ge} ${ye}`,subtitle:"Get on your birthday to spend"}]:[],...me?[{icon:e.createElement(E,null),title:`${me} ${ye}`,subtitle:"Write a Review"}]:[],...pe?[{icon:e.createElement(k,null),title:`${pe} ${ye}`,subtitle:"Like on Facebook"}]:[],...de?[{icon:e.createElement(T,null),title:`${de} ${ye}`,subtitle:"Follow on Instagram"}]:[],...se?[{icon:e.createElement(S,null),title:`${se} ${ye}`,subtitle:"Follow on Twitter"}]:[],...ue?[{icon:e.createElement($,null),title:`${ue} ${ye}`,subtitle:"Subscribe on YouTube"}]:[]];return e.createElement("div",{className:"yt-loyalty-page-container",style:{fontFamily:"'Poppins', sans-serif",width:"100%",overflow:"hidden"}},"show"===F&&e.createElement("div",{className:"yt-loyalty-page-hero",style:{position:"relative",minHeight:"500px",display:"flex",alignItems:"center",justifyContent:"center"===l?"center":"right"===l?"flex-end":"flex-start",backgroundImage:`url(${oe(ne&&r?r:o)})`,backgroundSize:"cover",backgroundPosition:"center",padding:ne?"40px 20px":"60px 80px"}},e.createElement("div",{className:"yt-loyalty-page-hero-content",style:{maxWidth:"600px",zIndex:2,textAlign:l}},e.createElement("h1",{className:"yt-loyalty-page-hero-title",style:{fontSize:ne?"32px":p,color:u,marginBottom:"16px",lineHeight:1.1,fontWeight:800,textTransform:"uppercase"}},i),e.createElement("p",{className:"yt-loyalty-page-hero-subtitle",style:{fontSize:c,color:d,fontWeight:Number(s)||400,marginBottom:"32px"}},a),m&&e.createElement("div",{className:"yt-loyalty-page-hero-button-wrapper",style:{display:"flex",gap:"16px",justifyContent:"center"===l?"center":"right"===l?"flex-end":"flex-start"}},e.createElement("button",{className:"yt-loyalty-page-hero-button",style:ie,onClick:()=>{"undefined"!=typeof window&&window.ytapp&&(window.ytapp.loyaltyWidgetOpen=!0,window.dispatchEvent(new Event("loyaltyWidgetOpenChanged")))}},"Join Now")))),"show"===N&&e.createElement("div",{className:"yt-loyalty-page-steps",style:{padding:"40px 20px",position:"relative",textAlign:"center"}},e.createElement("div",{className:"yt-loyalty-page-steps-background-text",style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",fontSize:"12vw",fontWeight:900,color:"#F5F5F5",zIndex:0,whiteSpace:"nowrap",pointerEvents:"none",opacity:.5}},"GETTING STARTED"),e.createElement("div",{className:"yt-loyalty-page-steps-content",style:{position:"relative",zIndex:1}},e.createElement("h2",{className:"yt-loyalty-page-steps-title",style:{fontSize:"32px",fontWeight:700,marginBottom:"8px",color:"#000"}},Q),e.createElement("p",{className:"yt-loyalty-page-steps-subtitle",style:{color:g,marginBottom:"24px"}},U),e.createElement("div",{className:"yt-loyalty-page-steps-grid",style:{display:"flex",flexDirection:ne?"column":"row",justifyContent:"center",gap:"40px",maxWidth:"1200px",margin:"0 auto"}},[{icon:e.createElement(v,null),title:Y,desc:G},{icon:e.createElement(B,null),title:X,desc:Z},{icon:e.createElement(C,null),title:J,desc:K}].map((t,n)=>e.createElement("div",{key:n,className:"yt-loyalty-page-step-item",style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center"}},e.createElement("div",{className:"yt-loyalty-page-step-icon",style:{width:"80px",height:"80px",borderRadius:"50%",border:"4px solid #ccc",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"32px",color:"#666",marginBottom:"12px"}},t.icon),e.createElement("div",{className:"yt-loyalty-page-step-title",style:{fontSize:"16px",fontWeight:700,color:g,textTransform:"uppercase",lineHeight:"normal"}},t.title),e.createElement("p",{className:"yt-loyalty-page-step-description",style:{fontSize:"13px",color:g,lineHeight:1.2,maxWidth:"300px"}},t.desc)))))),"show"===P&&e.createElement("div",{className:"yt-loyalty-page-ways-to-earn",style:{padding:"40px 20px",position:"relative",borderTop:"1px solid #eee"}},e.createElement("div",{className:"yt-loyalty-page-ways-to-earn-background-text",style:{position:"absolute",top:ne?"10%":"50%",left:"50%",transform:"translate(-50%, -50%)",fontSize:"12vw",fontWeight:900,color:"#F5F5F5",zIndex:0,whiteSpace:"nowrap",pointerEvents:"none",opacity:.5}},"WAYS TO EARN"),e.createElement("div",{className:"yt-loyalty-page-ways-to-earn-grid",style:{position:"relative",zIndex:1,maxWidth:"1000px",margin:"0 auto",display:"flex",flexWrap:"wrap",justifyContent:"center",gap:"12px"}},be.map((t,n)=>e.createElement("div",{key:n,className:"yt-loyalty-page-ways-to-earn-item",style:{width:ne?"100%":"220px",border:"2px solid #ddd",padding:"12px 8px",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",borderRadius:z,boxShadow:"-1px 2px 3px rgba(0,0,0,0.1)"}},e.createElement("div",{className:"yt-loyalty-page-ways-to-earn-icon",style:{fontSize:"32px",marginBottom:"4px",color:"#1a1a2e"}},t.icon),e.createElement("h3",{className:"yt-loyalty-page-ways-to-earn-title",style:{fontSize:"13px",fontWeight:700,marginBottom:"2px",textTransform:"uppercase",color:"#000"}},t.title),e.createElement("p",{className:"yt-loyalty-page-ways-to-earn-subtitle",style:{fontSize:"11px",color:"#666"}},t.subtitle)))),D&&e.createElement("div",{className:"yt-loyalty-page-ways-to-earn-custom-text",style:{maxWidth:"1000px",margin:"24px auto 0",backgroundColor:b,color:"#fff",padding:"16px",textAlign:"center",fontSize:"12px",fontStyle:"italic",borderRadius:"4px"}},D)),"show"===A&&e.createElement("div",{className:"yt-loyalty-page-custom-section",style:{padding:ne?"40px 0px":"40px 20px",borderTop:"1px solid #eee"}},e.createElement("div",{className:"yt-loyalty-page-custom-section-container",style:{maxWidth:"1200px",margin:"0 auto",display:"flex",flexDirection:ne?"column":"row",alignItems:"center",gap:"40px",borderRadius:z,overflow:"hidden",backgroundColor:"#F9F9F9"}},e.createElement("div",{className:"yt-loyalty-page-custom-section-image-wrapper",style:{flex:1,width:"100%",order:ne||"left"===R?0:1}},e.createElement("div",{className:"yt-loyalty-page-custom-section-image",style:{display:"flex",width:"100%",height:"300px",backgroundColor:"#ddd",backgroundImage:V?`url(${oe(V)})`:o?`url(${oe(o)})`:void 0,backgroundSize:"cover",backgroundPosition:"center"}})),e.createElement("div",{className:"yt-loyalty-page-custom-section-content",style:{flex:1,paddingInline:ne?"20px":"10px",textAlign:ne?"center":W,order:ne||"left"===R?1:0,marginBottom:ne?"20px":"0px"}},e.createElement("h2",{className:"yt-loyalty-page-custom-section-title",style:{fontSize:M,fontWeight:700,marginBottom:"16px",color:H}},O),e.createElement("p",{className:"yt-loyalty-page-custom-section-subtitle",style:{fontSize:j,color:q,marginBottom:"24px",lineHeight:1.6,whiteSpace:"pre-line"}},L)))),"show"===_&&e.createElement("div",{className:"yt-loyalty-page-footer",style:{marginBottom:"20px"}},e.createElement("div",{className:"yt-loyalty-page-footer-container",style:{maxWidth:"1200px",margin:"0 auto"}},e.createElement("div",{className:"yt-loyalty-page-footer-custom-text",style:{backgroundColor:b,color:"#fff",padding:"16px",textAlign:"center",fontSize:"12px",fontStyle:"italic",borderRadius:"4px"}},ee),e.createElement("div",{className:"yt-loyalty-page-footer-signup",style:{display:"flex",flexDirection:ne?"column":"row",justifyContent:"space-between",alignItems:"center",marginTop:"40px",padding:"20px",border:"1px solid #eee",borderRadius:"4px",gap:"20px",textAlign:ne?"center":"left"}},e.createElement("div",{className:"yt-loyalty-page-footer-signup-content"},e.createElement("h3",{style:{fontSize:"20px",fontWeight:700,marginBottom:"4px",color:"#000",textAlign:ne?"center":"left"}},"Rewards Program"),e.createElement("p",{style:{fontSize:"14px",color:"#666"}},te)),e.createElement("button",{className:"yt-loyalty-page-footer-signup-button",style:ae,onClick:()=>{"undefined"!=typeof window&&window.ytapp&&(window.ytapp.loyaltyWidgetOpen=!0,window.dispatchEvent(new Event("loyaltyWidgetOpenChanged")))}},"JOIN NOW")))))},ku=({showPopup:n,selectedOffer:o,selectedOfferTerms:r,onClose:i,offersConfig:a})=>{const[l,c]=t(!1);if(!n||!o||!r)return null;const d=o._customOffer,s=d?.code||o.code,p=e.createElement("div",{className:"yt-product-offers-isolated",style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:2147483647},onClick:i},e.createElement("div",{style:{width:"90vw",minWidth:"375px",maxWidth:"480px",maxHeight:"90vh",backgroundColor:"#fff",borderRadius:"12px",padding:"16px",boxShadow:"0 4px 15px rgba(0,0,0,0.3)",position:"relative",flexDirection:"column",display:"flex"},onClick:e=>e.stopPropagation()},e.createElement("div",{style:{fontSize:"clamp(32px, 8vw, 40px)",color:"#4C4C4C",marginTop:"16px",marginBottom:"8px",display:"flex",justifyContent:"center",position:"relative"}},"free_product"===o.couponType?e.createElement(b,null):e.createElement(je,null)),e.createElement("div",{style:{fontSize:"clamp(16px, 4vw, 20px)",fontWeight:500,color:"#4C4C4C",lineHeight:"normal",textAlign:"center"}},o.couponType.replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")),e.createElement("div",{style:{fontSize:"clamp(28px, 7vw, 40px)",fontWeight:"600",color:a?.textColor||"#EE8E35",lineHeight:"normal",textAlign:"center"}},o.name),e.createElement("div",{style:{fontSize:"clamp(16px, 4vw, 20px)",color:"#000000",textAlign:"center",fontWeight:500}},r.offerMessage),s&&e.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",marginTop:"16px",padding:"12px 20px",backgroundColor:a?.cardBackgroundColor||"#F5F5F5",borderRadius:`${a?.roundness||8}px`,border:`1px dashed ${a?.accentColor||"#EE8E35"}`}},e.createElement("span",{style:{fontSize:"clamp(16px, 4vw, 18px)",fontWeight:"600",color:a?.textColor||"#333",letterSpacing:"1px"}},s),e.createElement("button",{onClick:async()=>{if(s)try{await navigator.clipboard.writeText(s),c(!0),setTimeout(()=>c(!1),2e3)}catch(e){console.error("Failed to copy:",e)}},style:{background:"none",border:"none",cursor:"pointer",padding:"4px",display:"flex",alignItems:"center",justifyContent:"center",color:l?"#22c55e":a?.accentColor||"#EE8E35",fontSize:"20px",transition:"color 0.2s ease"},title:l?"Copied!":"Copy code"},l?e.createElement(I,null):e.createElement(z,null))),r.terms.length>0&&e.createElement(e.Fragment,null,e.createElement("hr",{style:{border:"none",height:"2px",width:"100%",margin:"10px 0 18px 0",backgroundColor:"transparent",backgroundImage:"repeating-linear-gradient(to right, #ccc 0, #ccc 12px, transparent 12px, transparent 20px)",backgroundSize:"100% 2px",backgroundPosition:"0 0",backgroundRepeat:"repeat-x"}}),e.createElement("div",{style:{marginTop:"15px",fontSize:"clamp(14px, 3.5vw, 16px)",textAlign:"center",display:"flex",flexDirection:"column"}},e.createElement("strong",{style:{color:"#888"}},"Terms & Conditions"),e.createElement("ul",{style:{marginTop:"5px",paddingLeft:"20px",textAlign:"left",display:"inline-block",color:"#000",lineHeight:"1.3",marginBottom:"0"}},r.terms.map((t,n)=>e.createElement("li",{key:n,style:{marginBottom:"4px"}},t))))),e.createElement("button",{onClick:i,style:{width:"100%",padding:"10px 20px",marginTop:"10px",backgroundColor:"#fff",border:"none",borderTop:"1px solid #ddd",borderRadius:"0",fontSize:"16px",fontWeight:"600",color:"#333",cursor:"pointer",textAlign:"center",flexShrink:0}},"Close")));return A(p,document.body)},Tu=({showPopup:n,selectedOffer:o,selectedOfferTerms:r,onClose:i,offersConfig:a})=>{const[l,c]=t(!1);if(!n||!o||!r)return null;const d=o._customOffer,s=d?.code||o.code,p=e.createElement("div",{className:"yt-product-offers-isolated",style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"flex-end",justifyContent:"center",zIndex:2147483647,animation:"fadeIn 0.3s ease"},onClick:i},e.createElement("style",null,"\n @keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n @keyframes slideUp {\n from { transform: translateY(100%); }\n to { transform: translateY(0); }\n }\n "),e.createElement("div",{style:{width:"100%",maxHeight:"85vh",backgroundColor:"#fff",borderTopLeftRadius:"20px",borderTopRightRadius:"20px",borderTop:"1px solid #E5E5E5",position:"relative",flexDirection:"column",display:"flex",animation:"slideUp 0.3s ease",overflow:"hidden"},onClick:e=>e.stopPropagation()},e.createElement("div",{style:{width:"40px",height:"4px",backgroundColor:"#ddd",borderRadius:"2px",margin:"12px auto 16px",flexShrink:0}}),e.createElement("div",{style:{overflowY:"auto",flex:1}},e.createElement("div",{style:{padding:"0 20px 20px",backgroundColor:"#fff"}},e.createElement("div",{style:{fontSize:"48px",color:"#4C4C4C",display:"flex",justifyContent:"center",margin:"16px"}},"free_product"===o.couponType?e.createElement(b,null):e.createElement(je,null)),e.createElement("div",{style:{fontSize:"14px",fontWeight:500,color:"#888",textAlign:"center"}},o.couponType.replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")),e.createElement("div",{style:{fontSize:"32px",fontWeight:"700",color:a?.textColor||"#EE8E35",textAlign:"center",lineHeight:"1.2"}},o.name),e.createElement("div",{style:{fontSize:"18px",color:"#000000",textAlign:"center",fontWeight:500}},r.offerMessage),s&&e.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",marginTop:"20px",padding:"14px 20px",backgroundColor:a?.cardBackgroundColor||"#F5F5F5",borderRadius:`${a?.roundness||8}px`,border:`1px dashed ${a?.accentColor||"#EE8E35"}`}},e.createElement("span",{style:{fontSize:"18px",fontWeight:"600",color:a?.textColor||"#333",letterSpacing:"1px"}},s),e.createElement("button",{onClick:async()=>{if(s)try{await navigator.clipboard.writeText(s),c(!0),setTimeout(()=>c(!1),2e3)}catch(e){console.error("Failed to copy:",e)}},style:{background:"none",border:"none",cursor:"pointer",padding:"4px",display:"flex",alignItems:"center",justifyContent:"center",color:l?"#22c55e":a?.accentColor||"#EE8E35",fontSize:"22px",transition:"color 0.2s ease"},title:l?"Copied!":"Copy code"},l?e.createElement(I,null):e.createElement(z,null)))),r.terms.length>0&&e.createElement(e.Fragment,null,e.createElement("div",{style:{backgroundColor:"#F5F5F5",padding:"16px 20px"}},e.createElement("div",{style:{fontSize:"16px",fontWeight:"600",color:"#333",textAlign:"center"}},"Terms & Conditions")),e.createElement("div",{style:{padding:"20px",backgroundColor:"#fff"}},e.createElement("ul",{style:{margin:"0",paddingLeft:"20px",color:"#333",lineHeight:"1.6",fontSize:"14px"}},r.terms.map((t,n)=>e.createElement("li",{key:n,style:{marginBottom:"4px"}},t)))))),e.createElement("button",{onClick:i,style:{width:"100%",padding:"18px 20px",backgroundColor:"#F5F5F5",border:"none",borderTop:"1px solid #E5E5E5",fontSize:"16px",fontWeight:"600",color:"#333",cursor:"pointer",textAlign:"center",fontFamily:"'Poppins', sans-serif",flexShrink:0}},"Close")));return A(p,document.body)},Su=({offersToShow:o,offersConfig:i,getOfferCardMessage:a,setSelectedOffer:l,setShowPopup:c})=>{const d=r(null),[s,p]=t(!1),[u,m]=t(!0),[g,x]=t("undefined"!=typeof window&&window.innerWidth<=768),f=()=>{if(d.current){const{scrollLeft:e,scrollWidth:t,clientWidth:n}=d.current;p(e>0),m(e<t-n-10)}};n(()=>{f();const e=d.current;if(e)return e.addEventListener("scroll",f),()=>e.removeEventListener("scroll",f)},[o]),n(()=>{const e=()=>{x(window.innerWidth<=768)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const y=e=>{if(d.current){const t=g?280:365,n=16,o="right"===e?t+n:-(t+n);d.current.scrollBy({left:o,behavior:"smooth"})}};return e.createElement("div",{style:{position:"relative"}},e.createElement("svg",{style:{position:"absolute",width:0,height:0}},e.createElement("defs",null,e.createElement("mask",{id:"coupon-cut-mask-desktop"},e.createElement("rect",{width:"365",height:"138",fill:"white"}),e.createElement("circle",{cx:"80",cy:"0",r:"12",fill:"black"}),e.createElement("circle",{cx:"80",cy:"138",r:"12",fill:"black"})),e.createElement("mask",{id:"coupon-cut-mask-mobile"},e.createElement("rect",{width:"280",height:"120",fill:"white"}),e.createElement("circle",{cx:"60",cy:"0",r:"10",fill:"black"}),e.createElement("circle",{cx:"60",cy:"120",r:"10",fill:"black"})))),s&&e.createElement("button",{onClick:()=>y("left"),style:{position:"absolute",left:"5px",top:"50%",transform:"translateY(-50%)",background:"#fff",border:"1px solid #e0e0e0",borderRadius:"50%",width:"clamp(28px, 5vw, 38px)",height:"clamp(28px, 5vw, 38px)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:10,boxShadow:"0 2px 8px rgba(0,0,0,0.1)",color:"#333"}},e.createElement(F,{size:20})),u&&e.createElement("button",{onClick:()=>y("right"),style:{position:"absolute",right:"5px",top:"50%",transform:"translateY(-50%)",background:"#fff",border:"1px solid #e0e0e0",borderRadius:"50%",width:"clamp(28px, 5vw, 38px)",height:"clamp(28px, 5vw, 38px)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:10,boxShadow:"0 2px 8px rgba(0,0,0,0.1)",color:"#333"}},e.createElement(N,{size:20})),e.createElement("div",{ref:d,className:"hide-scrollbar",style:{display:"flex",alignItems:"stretch",overflowX:"auto",gap:"16px",scrollbarWidth:"none",msOverflowStyle:"none",minHeight:g?"110px":"128px"}},o?.map(t=>e.createElement("div",{key:t.discountId,style:{flexShrink:0,width:g?"280px":"365px",minWidth:g?"280px":"365px",minHeight:g?"110px":"128px",backgroundColor:"transparent",borderRadius:`${i?.roundness||0}px`,border:"1px solid #e0e0e0",display:"flex",position:"relative",overflow:"visible",mask:`url(#${g?"coupon-cut-mask-mobile":"coupon-cut-mask-desktop"})`,WebkitMask:`url(#${g?"coupon-cut-mask-mobile":"coupon-cut-mask-desktop"})`,maskImage:`url(#${g?"coupon-cut-mask-mobile":"coupon-cut-mask-desktop"})`,WebkitMaskImage:`url(#${g?"coupon-cut-mask-mobile":"coupon-cut-mask-desktop"})`}},e.createElement("div",{style:{width:g?"60px":"80px",minHeight:g?"110px":"128px",backgroundColor:i?.accentColor||"#EE8E35",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:g?"10px 6px":"12px 8px",position:"relative",borderTopLeftRadius:`${i?.roundness||0}px`,borderBottomLeftRadius:`${i?.roundness||0}px`}},e.createElement("div",{style:{position:"absolute",right:"-2px",top:"12px",bottom:"12px",width:"2px",borderLeft:"2px dashed #FFFFFF"}})),i?.iconVisibility&&e.createElement("div",{style:{position:"absolute",left:g?"42.5px":"57.5px",top:"35%",transform:"translateY(-50%)",width:g?"32px":"40px",height:g?"32px":"40px",backgroundColor:"#FFFFFF",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:g?"16px":"20px",color:"#333333",zIndex:10,boxShadow:"0 2px 5px rgba(0,0,0,0.1)",border:"1px solid #E0E0E0"}},"free_product"===t.couponType?e.createElement(b,null):e.createElement(je,null)),e.createElement("div",{style:{flex:1,padding:g?"12px 12px":"15px 15px",paddingLeft:g?"25px":"35px",display:"flex",flexDirection:"column",justifyContent:"space-between",borderTopRightRadius:`${i?.roundness||0}px`,borderBottomRightRadius:`${i?.roundness||0}px`,overflow:"hidden",backgroundColor:i?.cardBackgroundColor||"#ffffff",minWidth:0}},e.createElement("div",{style:{display:"flex",flexDirection:"column",gap:g?"4px":"6px",lineHeight:"normal"}},e.createElement("div",{style:{fontSize:g?"9px":"10px",color:"#666666",fontWeight:"400"}},"free_product"===t.couponType?"Free Gift":t._customOffer?.code?"Coupon":"Special Deal"),e.createElement("div",{style:{fontSize:g?"13px":"15px",fontWeight:"600",color:i?.textColor||"#2c3e50"}},t.name),e.createElement("div",{style:{fontSize:g?"11px":"12px",color:i?.accentColor||"#EE8E35",wordWrap:"break-word",overflowWrap:"break-word",whiteSpace:"normal",minHeight:g?"28px":"32px"}},a(t))),e.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},e.createElement("div",{style:{borderTop:"1px solid #999999",marginTop:"4px",width:"100%",height:"0",display:"block"}}),e.createElement("a",{href:"#",onClick:e=>{e.preventDefault(),l(t),c(!0)},style:{fontSize:g?"11px":"12px",color:"#2c3e50",fontWeight:"500",textDecoration:"none",cursor:"pointer",textAlign:"center",marginTop:"0"}},i?.viewDetailsTitle||"View Details")))))),e.createElement("style",null,"\n .hide-scrollbar::-webkit-scrollbar {\n display: none;\n }\n .hide-scrollbar {\n -ms-overflow-style: none;\n scrollbar-width: none;\n }\n "))},$u=({offersToShow:o,offersConfig:r,getOfferCardMessage:i,setSelectedOffer:a,setShowPopup:l})=>{const[c,d]=t("undefined"!=typeof window&&window.innerWidth<=768);return n(()=>{const e=()=>{d(window.innerWidth<=768)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e.createElement("div",{style:{borderRadius:`${r?.roundness||8}px`}},o?.map((t,n)=>e.createElement("div",{key:t.discountId,style:{display:"flex",alignItems:"flex-start",gap:c?"8px":"12px",padding:c?"12px 0":"16px 0",paddingLeft:c?"10px":"20px",backgroundColor:!0===r?.cardBackgroundTransparent||"true"===String(r?.cardBackgroundTransparent)?"transparent":r?.cardBackgroundColor||"#ffffff",borderBottom:n<(o?.length||0)-1?"1px solid rgb(225 218 218)":"none",marginBottom:"4px",borderRadius:`${r?.roundness||0}px`}},r?.iconVisibility&&e.createElement("div",{style:{width:c?"40px":"50px",height:c?"40px":"50px",backgroundColor:"#f8f9fa",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:c?"20px":"25px",marginTop:c?"5px":"10px",border:"2px solid #4a4a4a",color:"#4a4a4a"}},"free_product"===t.couponType?e.createElement(b,null):e.createElement(je,null)),e.createElement("div",{style:{flex:1}},e.createElement("div",{style:{fontSize:c?"14px":"15px",fontWeight:600,color:"#000000",lineHeight:"1"}},t.couponType.replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" "),":"," ",e.createElement("span",{style:{fontWeight:600,color:r?.textColor||"#34495e"}},t.name)),e.createElement("div",{style:{fontSize:c?"12px":"13px",color:"#7f8c8d",marginBottom:"6px"}},i(t)),e.createElement("div",{style:{fontSize:c?"11px":"12px",color:"#000000"}},"offer auto applied",e.createElement("a",{href:"#",onClick:e=>{e.preventDefault(),a(t),l(!0)},style:{color:r?.accentColor||"#7f8c8d",fontWeight:700,textDecoration:"none",marginLeft:"2px"}},r?.viewDetailsTitle||"T&C"))))))},Bu=({offersConfig:o,offers:i})=>{const[a,l]=t(!1),[c,d]=t(null),[s,p]=t(null),[u,m]=t("undefined"!=typeof window&&window.innerWidth<=768),[g,x]=t("undefined"!=typeof window&&window.innerWidth<=450),f=r(null);n(()=>{const e=()=>{m(window.innerWidth<=768),x(window.innerWidth<=450)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),n(()=>{f.current&&pn(f.current)},[o?.sectionBgContrastColor]);const y=(e=>{if(!e||0===e.length)return e;const t={};e.forEach(e=>{const n=e.customCartProgressBarCriteria||"none";t[n]=(t[n]||0)+1});let n="none",o=-1;Object.keys(t).forEach(e=>{t[e]>o&&(o=t[e],n=e)});const r=e.map((e,t)=>({o:e,idx:t})),i=e=>"minimum_order_value"===n?void 0!==e.minimumOrderValue&&null!==e.minimumOrderValue?Number(e.minimumOrderValue):1/0:"quantity"===n&&void 0!==e.quantityThreshold&&null!==e.quantityThreshold?Number(e.quantityThreshold):1/0;return r.sort((e,t)=>{const o=e.o.customCartProgressBarCriteria===n,r=t.o.customCartProgressBarCriteria===n;if(o&&r){const n=i(e.o),o=i(t.o);return n!==o?n-o:e.idx-t.idx}return o&&!r?-1:!o&&r?1:e.idx-t.idx}),r.map(e=>e.o)})((!1===o?.showBackendOffers&&o?.customOffers&&o.customOffers.length>0?o.customOffers.map((e,t)=>{return{discountId:-(t+1),name:(n=e).title,couponType:n.code?"discount_code":"special_deal",customCartProgressBarCriteria:null,discountPercentage:null,couponTemplateId:0,minimumOrderValue:0,quantityThreshold:0,_allVariantIds:[],description:n.description,_customOffer:n};var n}):i)||[]),b=e=>{if(d(e),e){const t=e._customOffer;p(t?(e=>({offerMessage:e.description||"Special offer available",terms:e.terms?e.terms.split("\n").filter(e=>""!==e.trim()):[]}))(t):(e=>{const t="free_product"===e.couponType;let n="";t?n="Get this product for free!":e.discountPercentage?n=`Get ${e.discountPercentage}% off`:e.discountValue&&(n=`Get ${e.discountValue} off`);const o=["Limited Time Offer","Applies automatically when criteria is met"];return"quantity"===e.customCartProgressBarCriteria&&e.quantityThreshold?o.push(`Unlock when you add ${e.quantityThreshold} ${e.quantityThreshold>1?"items":"item"} to cart`):"minimum_order_value"===e.customCartProgressBarCriteria&&e.minimumOrderValue&&o.push(`Unlock at order value of ${e.minimumOrderValue}`),t&&o.push("Combines with other order discounts"),t||o.push("Not applicable if other offer with higher discount applied on same product"),{offerMessage:n,terms:o}})(e))}},h=e=>{const t=e._customOffer;return t?t.description||"Special offer available":(e=>"quantity"===e.customCartProgressBarCriteria&&e.quantityThreshold?`add ${e.quantityThreshold} ${e.quantityThreshold>1?"items":"item"} to unlock`:"minimum_order_value"===e.customCartProgressBarCriteria&&e.minimumOrderValue?`unlocks on orders above ${e.minimumOrderValue}`:"Special offer available")(e)};return e.createElement("div",null,e.createElement("div",{style:{position:"relative",width:"100%",maxWidth:"450px",borderRadius:"list"===o?.sectionType?`${o?.roundness||0}px`:"0px",boxSizing:"border-box",backgroundColor:o?.sectionBackgroundColor||"#fff"}},e.createElement("div",{style:{border:"coupon"===o?.sectionType?"none":"1px solid rgb(169, 163, 163)",borderTop:"1px solid rgb(169, 163, 163)",padding:null!=o?.cardPadding?`${o.cardPadding}px`:u?"20px 10px 15px":"30px 15px 20px",position:"relative",borderRadius:"list"===o?.sectionType?`${o?.roundness||8}px`:"0px"}},e.createElement("span",{ref:f,className:"yt-product-offers-section-title",style:{position:"absolute",top:"0",left:"left"===o?.alignment?"coupon"===o?.sectionType?"0px":u?"10px":"20px":"right"===o?.alignment?"auto":"50%",right:"right"===o?.alignment?"coupon"===o?.sectionType?"0px":u?"10px":"20px":"auto",transform:"middle"===o?.alignment?"translateX(-50%) translateY(-50%)":"translateY(-50%)",background:o?.sectionBgContrastColor||"#fff",padding:u?"0 8px":"0 10px",fontWeight:"500",fontSize:u?"14px":"16px",textTransform:"uppercase",textAlign:"center"}},o?.sectionTitle||"Available Deals and Offers"),(()=>{const t=o?.sectionType;return"list"===t?e.createElement($u,{offersToShow:y,offersConfig:o||{},getOfferCardMessage:h,setSelectedOffer:b,setShowPopup:l}):"coupon"===t?e.createElement(Su,{offersToShow:y,offersConfig:o||{},getOfferCardMessage:h,setSelectedOffer:b,setShowPopup:l}):null})(),g?e.createElement(Tu,{selectedOffer:c,selectedOfferTerms:s,showPopup:a,offersConfig:o,onClose:()=>{l(!1),d(null),p(null)}}):e.createElement(ku,{selectedOffer:c,selectedOfferTerms:s,showPopup:a,offersConfig:o,onClose:()=>{l(!1),d(null),p(null)}}))))};export{zp as Bundle,Cu as BundleLoader,wu as Cart,Eu as LoyaltyPageBlock,Lt as Nudge,Bu as ProductOffers,Qt as SpinnerWheel};
5323
+ `,bu=l(({removeCartItem:i,addCartItem:a,getProductDetailsByVariantId:l,themeColor:c,cartComponentsCornerRadius:d,cartComponentsCornerType:s,backgroundColor:p,removeFreebieFromCart:u,freebieClaimAddToCart:m,stealDealAddToCart:g,productClaimCtaButtonText:x,backgroundSubdued:f,primaryTextColor:y},b)=>{const[h,v]=ie(en),w=ae(Ut),C=r(null),[E,k]=t(null),[T,S]=t({}),[$,B]=t(h?.variantId),[I,z]=t(h?.quantity||1),[F,N]=t(!1),P=ir();n(()=>{h?.open?setTimeout(()=>{N(!0)},10):N(!1)},[h?.open]);const D=()=>{N(!1),setTimeout(()=>{v({open:!1,variantId:void 0,handle:void 0,quantity:void 0})},300)};n(()=>{(async()=>{if(!E&&l&&h?.variantId&&h?.handle){const e=await l(h.handle,h.variantId);if(e&&e.variants&&e.options){let t;const n=h.allowedVariantIds,o=Array.isArray(n)&&n.length>0;if(t=o?e.variants.find(e=>e.available&&n.includes(String(e.id))&&String(e.id)===String(h.variantId))||e.variants.find(e=>e.available&&n.includes(String(e.id))):e.variants.find(e=>e.available&&String(e.id)===String(h.variantId)),t){B(String(t.id));const n={};e.options.forEach((e,o)=>{n[e.name]=t[`option${o+1}`]}),S(n)}else B(void 0),S({})}k(e)}})()},[E,l,h]);const A=(e,t)=>{const n={...T,[e]:t};S(n);const o=E?.variants?.find(e=>E.options.every((t,o)=>e[`option${o+1}`]===n[t.name]));if(o){const e=h?.allowedVariantIds;if(Array.isArray(e)&&e.length>0&&!e.includes(String(o.id)))return;o.available&&B(String(o.id))}},_=E?.variants?.find(e=>String(e.id)===String($)),R=on(w,w?.currency),O=o(()=>{const e={};if(!E)return e;const t=Array.isArray(h?.allowedVariantIds)&&h.allowedVariantIds.length>0;return E.options.forEach(n=>{e[n.name]=n.values.filter(e=>E.variants.filter(o=>{const r=E.options.indexOf(n);if(o[`option${r+1}`]!==e)return!1;return!!E.options.every((e,t)=>{if(e.name===n.name)return!0;const r=T[e.name];return!r||o[`option${t+1}`]===r})&&(!!(!t||Array.isArray(h.allowedVariantIds)&&h.allowedVariantIds.includes(String(o.id)))&&!!o.available)}).some(e=>!!(!t||Array.isArray(h.allowedVariantIds)&&h.allowedVariantIds.includes(String(e.id)))&&e.available))}),e},[E,T,h]);return E?e.createElement(e.Fragment,null,e.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",zIndex:2147483643,display:h?.open?"flex":"none",justifyContent:"center",alignItems:"center",opacity:F?1:0,transition:"opacity 0.3s ease"},onClick:D}),e.createElement(Xp,{ref:b,className:"yt-variant-selection-popup"},e.createElement(Jp,{ref:C,style:{backgroundColor:p||"white",opacity:F?1:0,transform:F?"translateY(0)":"translateY(20px)"},$themeColor:c,onClick:e=>e.stopPropagation()},h?.freebieSelection&&e.createElement(Zp,null,h?.stealDealSelection?"Unlocked Steal Deal":"Unlocked Freebie"),e.createElement(eu,null,e.createElement(tu,null,e.createElement(nu,null,e.createElement(ou,{src:_?.featured_image?.src??E?.featured_image,alt:_?.featured_image?.alt??E?.title})),e.createElement(ru,null,e.createElement(iu,{$themeColor:c,$primaryTextColor:y,href:`${E?.url}?variant=${_?.id}`},E?.title),e.createElement(xu,null,e.createElement(au,null,e.createElement(lu,{$primaryTextColor:y},R,tn(_?.price,w?.currency??"INR")),null!=_?.compare_at_price&&null!=_?.price&&_.compare_at_price>_.price&&e.createElement(cu,null,R,tn(_?.compare_at_price,w?.currency??"INR"))),!h?.freebieSelection&&e.createElement(Jo,{value:I,handleItemQuantityIncrement:async()=>{z(e=>e+1)},handleItemQuantityDecrement:async()=>{I>1&&z(e=>e-1)},cartComponentsCornerRadius:d,cartComponentsCornerType:s,backgroundSubdued:f})))),E?.options?.map(t=>{const n=P?.options?.find(e=>e.name.trim().toLowerCase()===t.name.trim().toLowerCase());return e.createElement(su,{key:t.name},e.createElement(uu,null,e.createElement("span",null,"Select ",t.name),T[t.name]&&e.createElement(mu,null,T[t.name])),e.createElement(gu,null,O[t.name]?.map(o=>{const r=T[t.name]===o,i=rr(n,o);return"color"===n?.type&&i?.value?e.createElement(fu,{key:o,$isSelected:r,$themeColor:c,onClick:()=>A(t.name,o),$colorValue:i.value}):"image"===n?.type&&i?.value?e.createElement(yu,{key:o,$isSelected:r,$themeColor:c,onClick:()=>A(t.name,o),$imageUrl:i.value}):e.createElement(pu,{$themeColor:c,key:o,$isSelected:r,backgroundColor:r?c:void 0,onClick:()=>A(t.name,o)},o)})))})),e.createElement(du,{className:"yt-cart-variant-popup-ATC-button",$themeColor:c??"#C33",onClick:h?.productRec?async()=>{if($&&a){D();try{await a($,I,"product-recommendation-variant-selector",!1,h.handle)}catch(e){console.error("Error adding item from product recommendation:",e)}}}:async()=>{if(!$)return;const e=!!h?.lineItemKey,t=String($)!==String(h?.variantId);if(D(),!e||t)try{const e=h?.freebieSelection;e&&!h?.lineItemKey||(e&&u&&h?.lineItemKey?await u(h.lineItemKey):await i(h?.lineItemKey||h?.variantId,"variant-selector",!0)),e&&h?.stealDealSelection&&g?await g($,h.allowedVariantIds):e&&m?await m($,h.allowedVariantIds):a&&$&&await a($,I,"variant-selector",!1,h.handle)}catch(e){}},disabled:!$},h?.productRec?"ADD TO BAG":h?.stealDealSelection?"CLAIM DEAL":h?.freebieSelection?x||"CLAIM FREEBIE":"GET IN BAG")))):e.createElement(Xp,{ref:b},e.createElement(Jp,{style:{backgroundColor:p||"white"}},e.createElement(Kp,null,e.createElement(it,{color:c||"#868E96"}))))});bu.displayName="DesktopVariantPopup";const hu=l(({removeCartItem:i,addCartItem:a,getProductDetailsByVariantId:l,themeColor:c,cartComponentsCornerRadius:d,cartComponentsCornerType:s,backgroundColor:p,removeFreebieFromCart:u,freebieClaimAddToCart:m,stealDealAddToCart:g,productClaimCtaButtonText:x,backgroundSubdued:f,primaryTextColor:y},b)=>{const[h,v]=ie(en),w=ae(Ut),[C,E]=t(null),[k,T]=t({}),[S,$]=t(h?.variantId),[B,I]=t(h?.quantity||1),z=r(null),F=ir(),[N,P]=t(!1);n(()=>{h?.open?setTimeout(()=>{P(!0)},10):P(!1)},[h?.open]);const D=()=>{P(!1),setTimeout(()=>{v({open:!1,variantId:void 0,handle:void 0,quantity:void 0})},300)};n(()=>{(async()=>{if(!C&&l&&h?.variantId&&h?.handle)try{const e=await l(h.handle,h.variantId);if(!e)return;if(!e.variants||!Array.isArray(e.variants))return;if(e&&e.variants&&e.options){let t;const n=h.allowedVariantIds,o=Array.isArray(n)&&n.length>0;if(t=o?e.variants.find(e=>e.available&&n.includes(String(e.id))&&String(e.id)===String(h.variantId))||e.variants.find(e=>e.available&&n.includes(String(e.id))):e.variants.find(e=>e.available&&String(e.id)===String(h.variantId)),t){$(String(t.id));const n={};e.options.forEach((e,o)=>{n[e.name]=t[`option${o+1}`]}),T(n)}else $(void 0),T({})}E(e)}catch(e){}})()},[C,l,h]),n(()=>{},[p,i,a,l]);const A=(e,t)=>{const n={...k,[e]:t};T(n);const o=C?.variants?.find(e=>C.options.every((t,o)=>e[`option${o+1}`]===n[t.name]));if(o){const e=h?.allowedVariantIds;if(Array.isArray(e)&&e.length>0&&!e.includes(String(o.id)))return;o.available&&$(String(o.id))}},_=C?.variants?.find(e=>String(e.id)===String(S)),R=on(w,w?.currency),O=o(()=>{const e={};if(!C)return e;const t=Array.isArray(h?.allowedVariantIds)&&h.allowedVariantIds.length>0;return C.options.forEach(n=>{e[n.name]=n.values.filter(e=>C.variants.filter(o=>{const r=C.options.indexOf(n);if(o[`option${r+1}`]!==e)return!1;return!!C.options.every((e,t)=>{if(e.name===n.name)return!0;const r=k[e.name];return!r||o[`option${t+1}`]===r})&&(!!(!t||Array.isArray(h.allowedVariantIds)&&h.allowedVariantIds.includes(String(o.id)))&&!!o.available)}).some(e=>!!(!t||Array.isArray(h.allowedVariantIds)&&h.allowedVariantIds.includes(String(e.id)))&&e.available))}),e},[C,k,h]);return C?e.createElement(e.Fragment,null,e.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",zIndex:2147483643,display:h?.open?"flex":"none",justifyContent:"center",alignItems:"center",opacity:N?1:0,transition:"opacity 0.3s ease"},onClick:D}),e.createElement(Xp,{ref:b,className:"yt-variant-selection-popup"},e.createElement(Jp,{ref:z,style:{backgroundColor:p||"white",opacity:N?1:0,transform:N?"translateY(0)":"translateY(20px)"},$themeColor:c,onClick:e=>e.stopPropagation()},h?.freebieSelection&&e.createElement(Zp,null,h?.stealDealSelection?"Unlocked Steal Deal":"Unlocked Freebie"),e.createElement(eu,null,e.createElement(tu,null,e.createElement(nu,null,e.createElement(ou,{src:_?.featured_image?.src??C?.featured_image,alt:_?.featured_image?.alt??C?.title})),e.createElement(ru,null,e.createElement(iu,{$themeColor:c,$primaryTextColor:y,href:`${C?.url}?variant=${_?.id}`},C?.title),e.createElement(xu,null,e.createElement(au,null,e.createElement(lu,{$primaryTextColor:y},R,tn(_?.price,w?.currency??"INR")),null!=_?.compare_at_price&&null!=_?.price&&_.compare_at_price>_.price&&e.createElement(cu,null,R,tn(_?.compare_at_price,w?.currency??"INR"))),!h?.freebieSelection&&e.createElement(Jo,{value:B,handleItemQuantityIncrement:async()=>{I(e=>e+1)},handleItemQuantityDecrement:async()=>{B>1&&I(e=>e-1)},cartComponentsCornerRadius:d,cartComponentsCornerType:s,backgroundSubdued:f})))),C?.options?.map(t=>{const n=F?.options?.find(e=>e.name.trim().toLowerCase()===t.name.trim().toLowerCase());return e.createElement(su,{key:t.name},e.createElement(uu,null,e.createElement("span",null,"Select ",t.name,":"),k[t.name]&&e.createElement(mu,null,k[t.name])),e.createElement(gu,null,O[t.name]?.map(o=>{const r=k[t.name]===o,i=rr(n,o);return"color"===n?.type&&i?.value?e.createElement(fu,{key:o,$isSelected:r,$themeColor:c,onClick:()=>A(t.name,o),$colorValue:i.value}):"image"===n?.type&&i?.value?e.createElement(yu,{key:o,$isSelected:r,$themeColor:c,onClick:()=>A(t.name,o),$imageUrl:i.value}):e.createElement(pu,{$themeColor:c,key:o,$isSelected:r,backgroundColor:r?c:void 0,onClick:()=>A(t.name,o)},o)})))})),e.createElement(du,{className:"yt-cart-variant-popup-ATC-button",$themeColor:c??"#C33",onClick:h?.productRec?async()=>{if(S&&a){D();try{await a(S,B,"product-recommendation-variant-selector",!1,h.handle)}catch(e){console.error("Error adding item from product recommendation:",e)}}}:async()=>{if(!S)return;const e=!!h?.lineItemKey,t=String(S)!==String(h?.variantId);if(D(),!e||t)try{const e=h?.freebieSelection;e&&!h?.lineItemKey||(e&&u&&h?.lineItemKey?await u(h.lineItemKey):await i(h?.lineItemKey||h?.variantId,"variant-selector",!0)),e&&h?.stealDealSelection&&g?await g(S,h.allowedVariantIds):e&&m?await m(S,h.allowedVariantIds):a&&S&&await a(S,B,"variant-selector",!1,h.handle)}catch(e){}},disabled:!S},h?.productRec?"ADD TO BAG":h?.stealDealSelection?"CLAIM DEAL":h?.freebieSelection?x||"CLAIM FREEBIE":"GET IN BAG")))):e.createElement(Xp,{ref:b},e.createElement(Jp,{style:{backgroundColor:p||"white"}},e.createElement(Kp,null,e.createElement(it,{color:c||"#868E96"}))))});const vu=({setIsCartOpen:t,isCartOpen:n,cartCheckpoints:o,customCartProgressBarCriteria:r,floatingCartData:i,effectiveQuantityForProgressBar:a,cartComponentsCornerType:l,cartComponentsCornerRadius:c})=>{const d=ae(Ut),s=i?.bannerFooterText,p="string"==typeof s&&s.trim().length>0,u=!n&&(e=>{try{if("undefined"==typeof window)return!1;const t=window.location.pathname||"/";if("/"===t||""===t)return!0;const n=e?.showOnPages;if(!Array.isArray(n)||0===n.length)return!1;const o=t.toLowerCase(),r=o.endsWith("/")?o:`${o}/`;return n.some(e=>{if(!e||"string"!=typeof e)return!1;const t=e.trim().toLowerCase().replace(/^\/|\/$/g,"");if(!t)return!1;const n=`/${t}/`;return r.includes(n)})}catch{return!1}})(i),m=d?.item_count??0,g=tn(d?.items_subtotal_price??0,d?.currency??"INR"),x=on(d),f=function(e,t,n,o,r){if(!e||0===e.length)return{deltaValue:0,show:!1};const i=(t??"minimum_order_value").toLowerCase(),a="quantity_threshold"===i?"number"==typeof r?r:o:n,l=[...e].sort((e,t)=>("quantity_threshold"===i?e.quantityThreshold:e.minimumOrderValue)-("quantity_threshold"===i?t.quantityThreshold:t.minimumOrderValue)).find(e=>("quantity_threshold"===i?e.quantityThreshold:e.minimumOrderValue)>a);if(!l)return{deltaValue:0,show:!1};const c="quantity_threshold"===i?l.quantityThreshold:l.minimumOrderValue,d=Math.max(0,c-a);return{deltaValue:d,show:d>0,isQuantity:"quantity_threshold"===i}}(o,r,g,m,a),y="sharp"===l?0:c??12,h=i?.textColor??"#111",v=i?.backgroundColor??"#FF7E6E",w=i?.bannerBackgroundColor??"#FFE0DC",C=i?.buttonColor??"#E8513F",E=e.useRef(null);e.useEffect(()=>{pn(E.current)},[C]);const k={position:"fixed",width:"100%",bottom:0,zIndex:2147483642,paddingBottom:"env(safe-area-inset-bottom)"},T={background:"#FFFFFF",color:"#111",padding:"5px",fontSize:12,fontFamily:"Poppins",fontWeight:600,textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",gap:8},S={background:"#fff",color:h,borderRadius:y,boxShadow:"0 10px 24px rgba(0,0,0,0.15)",overflow:"hidden",fontFamily:"Poppins"},$={position:"absolute",top:0,left:"50%",transform:"translate(-50%, -70%)",backgroundColor:w,color:h,padding:8,fontSize:12,lineHeight:"normal",borderTopLeftRadius:13,borderTopRightRadius:13,width:"97%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,zIndex:-1},B={display:"flex",alignItems:"center",gap:12,padding:"10px 12px",backgroundColor:v,cursor:"pointer"},I={display:"flex",alignItems:"center",gap:8,fontWeight:700,fontSize:16,color:h},z={fontSize:12,color:h,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},F={padding:"5px 10px",background:C,color:"#fff",borderRadius:8,fontSize:15,fontWeight:700,border:"none",outline:"none",flexShrink:0};if(!u)return null;if(0===m){if(!f.show)return null;const t=f.isQuantity?`${f.deltaValue} more items to get freebie`:`Add items worth ${x}${un(f.deltaValue.toFixed(0))} to get freebie`;return e.createElement("div",{style:k},e.createElement("div",{style:T},e.createElement(b,{"aria-hidden":!0}),e.createElement("span",null,t)))}const N=1===m?"1 item":`${m} items`,P=i?.lastTierUnlockedText||"Best tier unlocked",D=f.show?f.isQuantity?`${f.deltaValue} more items to get freebie`:`Add items worth ${x}${un(f.deltaValue.toFixed(0))} more to get freebie`:P;return e.createElement("div",{style:{position:"fixed",left:12,right:12,bottom:12,zIndex:2147483642,paddingBottom:"env(safe-area-inset-bottom)"}},e.createElement("div",{style:{position:"relative"}},(f.show||o&&o.length>0)&&e.createElement("div",{style:$},e.createElement(b,{"aria-hidden":!0,style:{marginBottom:7}}),e.createElement("span",{style:{display:"inline-block",marginBottom:7}},D)),e.createElement("div",{style:S},e.createElement("div",{style:B,onClick:()=>t(!0)},e.createElement(_,{width:24,height:24,color:h}),e.createElement("div",{style:{display:"flex",flexDirection:"column",minWidth:0,flex:1,lineHeight:"normal"}},e.createElement("div",{style:I},e.createElement("span",null,x,un(g.toFixed(0))),e.createElement("span",{style:{fontSize:9,fontWeight:600,color:"#fff",backgroundColor:"#828282",marginBottom:5,paddingInline:5}},N)),p?e.createElement("span",{style:z,title:s},s):null),e.createElement("button",{ref:E,style:F,onClick:()=>t(!0),"aria-label":"View Cart"},"View Cart")))))},wu=({exploreCTAColor:o,checkoutFontSize:i,handleDecrement:l,handleIncrement:c,removeCartItem:d,addCartItem:s,cartTitle:p,emptyCartTitle:u,emptyCartDescription:m,emptyCartButtons:g,backgroundColor:x,backgroundSubdued:f,tertiaryColor:y,tertiaryTextColor:b,backdrop:h=!0,cartData:v,isUserSignedIn:w,showBundle:C,bundleProducts:E,discountAmountOff:k,loyaltyIcon:T,pointsToBeUsed:S,rewardMultiplier:$,redemptionMultiplier:B,removeDiscount:I,applyDiscount:z,discountApplied:F,checkoutFunction:N,joinNowFunction:P,guestLoyaltyPercentage:D,showToggleButton:A,isOpen:_,setIsOpen:R,isDev:O,switchWidthVariant:L,recProductsList:M,showMultiStepProgressBar:j,cartCheckpoints:V,redemptionRate:W,pointsRewardRate:H,showCartLevelAltPay:q,exploreCtaRedirectLink:Q,discountAmountApplied:U,minimumCartValue:Y,discountInCheckoutButton:G,isStickyCheckout:X,handleCheckpointCrossed:Z,customCartProgressBarCriteria:J,checkoutButtonColor:K,ctaButtonBackgroundColor:ee,ctaButtonTextColor:te,primaryTextColor:ne,productRecsCtaButtonText:oe,productRecsTitleText:re,secondaryTextColor:ae,showProductRecsOnDesktop:ce,showProductRecsOnMobile:de,themeColor:se,themeTextColor:pe,companyName:ue,gstNumber:me,showGSTOption:ge,applyGSTToCart:xe,showMOVForProgressTiers:fe,freeProduct:ye,showLoyaltyCta:be,freeProductAdjustedCartTotal:he,minimumOrderValueToAvailDiscount:ve,signinCTAButtonVisible:we,cartSigninCTAMainText:Ce,showNoteOption:Ee,applyNoteToCart:ke,note:Te,inlineCartOfferInfoText:Se,inlineCartOfferInfoRedirectLink:$e,cartOfferTermsAndConditionsText:Be,showEditOptionOnProducts:Ie,getProductDetailsByVariantId:ze,onSetLoading:Fe,showVariantSelectionDropdownInProductRecs:Ne,originalCartSubtotal:Pe,currentTier:De,freebieProductsInCart:Ae,showFreebieClaim:_e,addFreebieToCart:Re,freebiesInCart:Oe,effectiveQuantityForProgressBar:Le,productPercentageOffMapping:Me,removeFreebieFromCart:je,postalCodeList:Ve,enableGeoLocationDeliveryRestriction:We,applyPostalCodeAndDeliverySlotToCart:He,showDeleteOnFreebies:qe,freebieCouponTemplates:Qe,freebieFlowCheckpoints:Ue,freebieClaimData:Ye,showStickyAddToCart:Ge,stickyCartLineItem:Xe,postalCodeBasedItemTrackingParameter:Ze,enableSlotPicker:Je,deliveryHeaderTitle:Ke,deliveryAvailableText:et,deliveryNotAvailableText:tt,giftWrapSetupData:nt,giftWrapProductDetail:ot,enableCustomCartOnCartPage:rt,isCartPage:it,progressBarFreeProductIconType:at,addToStickyCart:lt,productRecsCardLayout:ct,productRecsCardListVariant:dt,showCartTimer:st,showFreebieMilestone:pt,showFloatingCart:ut,floatingCartData:mt,freebieMilestoneData:gt,cartTimerInMinutes:xt,cartTimerCustomText:ft,imageAspectSelector:yt,cartComponentsCornerType:bt,cartComponentsCornerRadius:ht,stickyCartCustomizationData:vt,cartOffersCarousalData:wt,stickyBarBuyNowFunction:Ct,gstSectionCustomizationData:Et,noteSectionTitle:kt,checkoutSectionMessage:Tt,checkoutSectionMessageRedirectLink:St,checkoutSectionMessageDisplay:$t,showVariantSelectionDropdownInProductClaim:Bt,loyaltyDiscount:It,brandTokenName:zt,showDiscountOnMRP:Ft,prefixMessageText:Nt,suffixMessageText:Pt,successMessageText:Dt,toggleDecimal:At,cartOffersCarouselHeight:_t,disableCheckoutButton:Rt,showEmptyCartRecommendations:Ot,emptyProductRecsTitleText:Lt,checkoutButtonBottomSpacing:Mt,showPoweredByBadge:jt=!0,applyCouponCode:Vt,showApplyCoupon:Wt,enableConfetti:Ht,showCheckoutButtonPaymentIcons:qt=!0,showCouponOptions:Qt,rewardCoupons:Yt,comboBundleData:Gt,comboBundleAddToCartFunction:Xt,stealDealCheckpoints:Zt,stealDealProducts:Jt,stealDealAddToCart:Kt,useCartShell:tn})=>{const nn=le(Ut),[on,rn]=ie(en),[an,ln]=ie(ji),cn=()=>R(!_),[dn,sn]=t(()=>{const e=window.ytComboBundle;return{comboBundleData:e?.bundle??null,comboBundleAddToCartFunction:e?.addToCart??null}});n(()=>{const e=e=>{const t=e.detail;sn({comboBundleData:t?.bundle??null,comboBundleAddToCartFunction:t?.addToCart??null})};return window.addEventListener("yt-combo-bundle-updated",e),()=>window.removeEventListener("yt-combo-bundle-updated",e)},[]);const pn=dn.comboBundleData??Gt,un=dn.comboBundleAddToCartFunction??Xt,[mn,gn]=t(()=>{const e=window.ytVolumeBundle;return{bundle:e?.bundle??void 0,currentTier:e?.currentTier??void 0,volumeBundleAddToCartFunction:e?.addToCart??void 0}});n(()=>{const e=e=>{const t=e.detail;gn({bundle:t?.bundle??void 0,currentTier:t?.tierData??void 0,volumeBundleAddToCartFunction:t?.addToCart??void 0})};return window.addEventListener("yt-volume-bundle-updated",e),()=>window.removeEventListener("yt-volume-bundle-updated",e)},[]);const xn=r(null),fn=r(0);a(()=>{if(v){const e=v?.token??null,t="number"==typeof v?.cartUpdatedAtMs?v.cartUpdatedAtMs:void 0;e!==xn.current&&(xn.current=e,fn.current=t??0);const n=fn.current,o=void 0===t||t>=n;if(console.log("[yt-cart-trace] UIKit Cart.tsx received cartData",{itemCount:v?.item_count,itemsLength:v?.items?.length,cartUpdatedAtMs:t,accepted:o}),!o)return;void 0!==t&&(fn.current=t),nn(v)}},[v]);const yn=r(null);n(()=>{function e(e){yn.current&&!yn.current.contains(e.target)&&(rn({open:!1,variantId:void 0,quantity:void 0,handle:void 0}),ln({isOpen:!1}))}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]);const[bn,hn]=t(!1);return n(()=>{const e=()=>{hn(window.innerWidth>=768)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),n(()=>{if(!tn)return;const e=window.ytCartShell;if(!e)return;const t=e.getDrawerElement?.(),n=e.getOverlayElement?.();t&&(!_||rt&&it?(t.style.setProperty("transform","translateX(100%)","important"),t.style.boxShadow="none",n&&(n.style.display="none"),document.body.classList.remove("drawer-open")):(t.style.setProperty("transform","translateX(0)","important"),t.style.boxShadow="-14px 8px 14.4px 0px rgba(0, 0, 0, 0.35)",h&&n&&(n.style.display="block"),document.body.classList.add("drawer-open")))},[_,tn,rt,it,h]),n(()=>{if(!tn)return;const e=window.ytCartShell,t=e?.getOverlayElement?.();if(!t)return;const n=()=>R(!1);return t.addEventListener("click",n),()=>t.removeEventListener("click",n)},[tn,R]),e.createElement(e.Fragment,null,e.createElement("div",{style:{position:rt&&it?"relative":"absolute",width:"100%",display:rt&&it?"flex":"block",alignItems:"center",justifyContent:"center"}},A&&!(rt&&it)&&e.createElement("button",{style:{margin:"16px"},onClick:cn},_?"Close Drawer":"Open Drawer"),!tn&&_&&h&&!(rt&&it)&&e.createElement("div",{onClick:cn,id:"custom-cart-yt-overlay",style:{position:"fixed",top:0,right:0,zIndex:1e4,transform:"translateX(0)",backgroundColor:"rgba(0,0,0,0.5)",inset:0,height:"100%",width:"100%"}},"‎"),e.createElement(Il,{useCartShell:tn,isCartPage:it,enableCustomCartOnCartPage:rt,isOpen:_,setIsOpen:R,backgroundColor:x,backgroundSubdued:f??"#F5F5F5",tertiaryColor:y,tertiaryTextColor:b,exploreCTAColor:o,checkoutFontSize:i,cartTitle:p,handleDecrement:l,handleIncrement:c,removeCartItem:d,addCartItem:s,emptyCartTitle:u,emptyCartButtons:g,emptyCartDescription:m,showBundle:C,isUserSignedIn:w,bundleProducts:E,discountAmountOff:k,loyaltyIcon:T,pointsToBeUsed:S,rewardMultiplier:$,redemptionMultiplier:B,removeDiscount:I,applyDiscount:z,discountApplied:F,checkoutFunction:N,joinNowFunction:P,guestLoyaltyPercentage:D,isDev:O,switchWidthVariant:L,recProductsList:M,showMultiStepProgressBar:j,cartCheckpoints:V,redemptionRate:W,pointsRewardRate:H,showCartLevelAltPay:q,exploreCtaRedirectLink:Q,discountAmountApplied:U,minimumCartValue:Y,discountInCheckoutButton:G,isStickyCheckout:X,handleCheckpointCrossed:Z,customCartProgressBarCriteria:J??"minimum_order_value",checkoutButtonColor:K,ctaButtonBackgroundColor:ee,ctaButtonTextColor:te,primaryTextColor:ne,productRecsCtaButtonText:oe,productRecsTitleText:re,secondaryTextColor:ae,showProductRecsOnDesktop:ce,showProductRecsOnMobile:de,themeColor:se,themeTextColor:pe,companyName:ue,gstNumber:me,showGSTOption:ge,applyGSTToCart:xe,showMOVForProgressTiers:fe,freeProduct:ye,showLoyaltyCta:be,freeProductAdjustedCartTotal:he,minimumOrderValueToAvailDiscount:ve,signinCTAButtonVisible:we,cartSigninCTAMainText:Ce,applyNoteToCart:ke,note:Te,showNoteOption:Ee,inlineCartOfferInfoText:Se,inlineCartOfferInfoRedirectLink:$e,cartOfferTermsAndConditionsText:Be,showEditOptionOnProducts:Ie,onSetLoading:Fe,showVariantSelectionDropdownInProductRecs:Ne,originalCartSubtotal:Pe,currentTier:De,freebieProductsInCart:Ae,cartOffersCarousalData:wt,showFreebieClaim:_e,addFreebieToCart:Re,freebiesInCart:Oe,effectiveQuantityForProgressBar:Le,productPercentageOffMapping:Me,removeFreebieFromCart:je,postalCodeList:Ve,enableGeoLocationDeliveryRestriction:We,applyPostalCodeAndDeliverySlotToCart:He,showDeleteOnFreebies:qe,freebieCouponTemplates:Qe,freebieFlowCheckpoints:Ue,freebieClaimData:Ye,postalCodeBasedItemTrackingParameter:Ze,enableSlotPicker:Je,deliveryHeaderTitle:Ke,deliveryAvailableText:et,deliveryNotAvailableText:tt,giftWrapSetupData:nt,giftWrapProductDetail:ot,progressBarFreeProductIconType:at,productRecsCardLayout:ct,productRecsCardListVariant:dt,showCartTimer:st,showFreebieMilestone:pt,freebieMilestoneData:gt,cartTimerCustomText:ft,cartTimerInMinutes:xt,imageAspectSelector:yt,cartComponentsCornerType:bt,cartComponentsCornerRadius:ht,gstSectionCustomizationData:Et,noteSectionTitle:kt,checkoutSectionMessage:Tt,checkoutSectionMessageRedirectLink:St,checkoutSectionMessageDisplay:$t,showVariantSelectionDropdownInProductClaim:Bt,loyaltyDiscount:It,getProductDetailsByVariantId:ze,brandTokenName:zt,showDiscountOnMRP:Ft??!0,prefixMessageText:Nt,suffixMessageText:Pt,successMessageText:Dt,toggleDecimal:At,cartOffersCarouselHeight:_t,disableCheckoutButton:Rt,showEmptyCartRecommendations:Ot,emptyProductRecsTitleText:Lt,checkoutButtonBottomSpacing:Mt,showPoweredByBadge:jt,applyCouponCode:Vt,showApplyCoupon:Wt,enableConfetti:Ht,showCheckoutButtonPaymentIcons:qt,stealDealCheckpoints:Zt,stealDealProducts:Jt,stealDealAddToCart:Kt,showCouponOptions:Qt,rewardCoupons:Yt}),Ge&&Xe&&s&&e.createElement(Gp,{showStickyCart:Ge,stickyCartCustomizationData:vt,product:Xe,addCartItem:s,onSetLoading:Fe,themeColor:se,themeTextColor:pe,cartData:v,isCartOpen:_,setIsCartOpen:R,ctaButtonBackgroundColor:ee,ctaButtonTextColor:te,addToStickyCart:lt,cartComponentsCornerRadius:ht,cartComponentsCornerType:bt,checkoutFunction:Ct,backgroundColor:x,primaryTextColor:ne,comboBundleData:pn,comboBundleAddToCartFunction:un,volumeBundleCurrentTier:mn.currentTier,volumeBundleData:mn.bundle,volumeBundleAddToCartFunction:mn.volumeBundleAddToCartFunction}),bn&&on.open&&e.createElement(bu,{backgroundColor:x,ref:yn,isDev:O,removeCartItem:d,addCartItem:s,getProductDetailsByVariantId:ze,themeColor:se,cartComponentsCornerRadius:ht,cartComponentsCornerType:bt,removeFreebieFromCart:je,freebieClaimAddToCart:Re,stealDealAddToCart:Kt,productClaimCtaButtonText:Ye?.productClaimCtaButtonText,backgroundSubdued:f??"#F5F5F5",primaryTextColor:ne}),!bn&&on.open&&e.createElement(hu,{ref:yn,isDev:O,removeCartItem:d,addCartItem:s,getProductDetailsByVariantId:ze,themeColor:se,cartComponentsCornerRadius:ht,cartComponentsCornerType:bt,backgroundColor:x,removeFreebieFromCart:je,freebieClaimAddToCart:Re,stealDealAddToCart:Kt,productClaimCtaButtonText:Ye?.productClaimCtaButtonText,backgroundSubdued:f??"#F5F5F5",primaryTextColor:ne})),!bn&&ut&&e.createElement(vu,{isCartOpen:_,setIsCartOpen:R,cartCheckpoints:V,customCartProgressBarCriteria:J,floatingCartData:mt,effectiveQuantityForProgressBar:Le,cartComponentsCornerRadius:ht,cartComponentsCornerType:bt}))};gt(".scene {\n width: 100%;\n height: 60vh;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.floating {\n animation: float 3s ease-in-out infinite;\n}\n\n@keyframes float {\n 0%, 100% {\n transform: translateY(0);\n }\n 50% {\n transform: translateY(-10px);\n }\n}\n.cube {\n position: relative;\n width: 50px;\n height: 50px;\n transform-style: preserve-3d;\n transform: rotateX(-45deg) rotateY(50deg) rotateZ(0deg);\n}\n\n.side,\n.lid,\n.flap {\n position: absolute;\n width: 100px;\n height: 100px;\n border: 4px solid #333366;\n background: transparent;\n box-sizing: border-box;\n}\n\n.side {\n background: #fff;\n backface-visibility: hidden;\n}\n\n.side.front {\n transform: translateZ(50px);\n}\n\n.side.back {\n transform: rotateY(180deg) translateZ(50px);\n}\n\n.side.left {\n transform: rotateY(-90deg) translateZ(50px);\n}\n\n.side.right {\n transform: rotateY(90deg) translateZ(50px);\n}\n\n.side.bottom {\n transform: rotateX(-90deg) translateZ(50px);\n}\n\n.lid {\n transform: rotateX(90deg) translateZ(50px);\n transform-style: preserve-3d;\n}\n\n.flap.north {\n top: 0;\n left: 0;\n width: 100%;\n height: 50%;\n transform-origin: top center;\n animation: openNorth 3s ease-in-out infinite;\n}\n\n.flap.south {\n bottom: 0;\n left: 0;\n width: 100%;\n height: 50%;\n transform-origin: bottom center;\n animation: openSouth 3s ease-in-out infinite;\n}\n\n.flap.east {\n top: 0;\n right: 0;\n width: 50%;\n height: 100%;\n transform-origin: right center;\n animation: openEast 3s ease-in-out infinite;\n}\n\n.flap.west {\n top: 0;\n left: 0;\n width: 50%;\n height: 100%;\n transform-origin: left center;\n animation: openWest 3s ease-in-out infinite;\n}\n\n@keyframes openNorth {\n 0%, 100% {\n transform: rotateX(0deg);\n }\n 50% {\n transform: rotateX(180deg);\n }\n}\n@keyframes openSouth {\n 0%, 100% {\n transform: rotateX(0deg);\n }\n 50% {\n transform: rotateX(-180deg);\n }\n}\n@keyframes openEast {\n 0%, 100% {\n transform: rotateY(0deg);\n }\n 50% {\n transform: rotateY(180deg);\n }\n}\n@keyframes openWest {\n 0%, 100% {\n transform: rotateY(0deg);\n }\n 50% {\n transform: rotateY(-180deg);\n }\n}");const Cu=()=>e.createElement("div",{className:"scene"},e.createElement("div",{className:"floating"},e.createElement("div",{className:"cube"},e.createElement("div",{className:"side front"},"‎"),e.createElement("div",{className:"side back"},"‎"),e.createElement("div",{className:"side left"},"‎"),e.createElement("div",{className:"side right"},"‎"),e.createElement("div",{className:"side bottom"},"‎"),e.createElement("div",{className:"lid"},e.createElement("div",{className:"flap north"},"‎"),e.createElement("div",{className:"flap south"},"‎"),e.createElement("div",{className:"flap east"},"‎"),e.createElement("div",{className:"flap west"},"‎"))))),Eu=({config:t,brandConfig:n})=>{const{heroDesktopImage:o,heroMobileImage:r,heroTitle:i="ZERO WASTE PREMIUM PET CARE",heroSubtitle:a="Earn Doglycoins for exclusive rewards every time you shop.",heroTextAlignment:l="left",heroSubtitleFontSize:c="18px",heroSubtitleColor:d="#000000",heroSubtitleFontWeight:s="400",heroTitleFontSize:p="48px",heroTitleColor:u="#000000",heroRegistrationCTAVisibility:m=!0,primaryColor:g="#1C1C1D",primaryContrastColor:x="#FFFFFF",secondaryColor:f="#FFFFFF",secondaryContrastColor:y="#000000",accentColor:b="#FFFFFF",borderColor:I="#E5E5E5",themeRoundness:z="0px",heroBannerVisibility:F="show",stepsVisibility:N="show",waysToEarnVisibility:P="show",waysToEarnCustomText:D="Individual rewards of 750 points or more ship FREE. No merchandise purchase required.",customSectionVisibility:A="show",footerSignupVisibility:_="show",customSectionImagePosition:R="left",customSectionTitle:O="Earn Doglycoins every time you shop",customSectionSubtitle:L="Collect more Doglycoins by entering your birthday, following us on social or referring a friend (details below)\n\nRedeem your Doglycoins for cash off at checkout by signing in or creating an account. Did you shop without registering? No worries, your Credits have been saved for you",customSectionTitleFontSize:M="36px",customSectionSubtitleFontSize:j="18px",customSectionImage:V,customSectionTextAlignment:W="left",customSectionTitleColor:H="#000000",customSectionSubtitleColor:q="#000000",stepsTitle:Q="Getting started is easy",stepsSubtitle:U="Earn Stars and get rewarded in a few easy steps.",step1Title:Y="CREATE AN ACCOUNT",step1Description:G="To get started, Join Now. You can also register on the mobile app to get access to the full range of reward benefits",step2Title:X="ORDER AND EARN REWARDS POINTS",step2Description:Z="Use cash, credit/debit card or save some time and pay right through the app. You'll collect Stars all ways.",step3Title:J="UNLOCK REWARDS AND OFFERS",step3Description:K="As you earn Stars, you can redeem them for Rewards—like free food, drinks, and more. Start redeeming with as little as 25 Stars!",footerCustomText:ee="Individual rewards of 750 points or more ship FREE. No merchandise purchase required.",footerSignupSubtext:te="Use your points to redeem samples and more."}=t||{},ne="undefined"!=typeof window&&window.innerWidth<=768,oe=e=>e&&e.startsWith("//")?`https:${e}`:e,re={padding:"12px 32px",borderRadius:"30px",fontSize:"14px",fontWeight:600,cursor:"pointer",textTransform:"uppercase",border:`1px solid ${g}`,transition:"all 0.3s ease"},ie={...re,backgroundColor:g,color:x,borderColor:g},ae={...re,backgroundColor:f,color:y,borderColor:I},{newSignupTokens:le,firstOrderTokens:ce,instagramFollowPoints:de,twitterFollowPoints:se,facebookFollowPoints:pe,youtubeSubscriptionPoints:ue,rewardToLeaveReview:me,birthdayPoints:ge,referralPointsForReferrer:xe,tokenCreditPercentage:fe,brandTokenName:ye}=n||{},be=[...le?[{icon:e.createElement(h,null),title:`${le} ${ye}`,subtitle:"Create an account"}]:[],...ce?[{icon:e.createElement(v,null),title:`${ce} ${ye}`,subtitle:"Place your first order"}]:[],...fe?[{icon:e.createElement(v,null),title:`${fe}% ${ye}`,subtitle:`Earn ${fe}% back on every order`}]:[],...xe?[{icon:e.createElement(w,null),title:`${xe} ${ye}`,subtitle:"Refer a friend and get"}]:[],...ge?[{icon:e.createElement(C,null),title:`${ge} ${ye}`,subtitle:"Get on your birthday to spend"}]:[],...me?[{icon:e.createElement(E,null),title:`${me} ${ye}`,subtitle:"Write a Review"}]:[],...pe?[{icon:e.createElement(k,null),title:`${pe} ${ye}`,subtitle:"Like on Facebook"}]:[],...de?[{icon:e.createElement(T,null),title:`${de} ${ye}`,subtitle:"Follow on Instagram"}]:[],...se?[{icon:e.createElement(S,null),title:`${se} ${ye}`,subtitle:"Follow on Twitter"}]:[],...ue?[{icon:e.createElement($,null),title:`${ue} ${ye}`,subtitle:"Subscribe on YouTube"}]:[]];return e.createElement("div",{className:"yt-loyalty-page-container",style:{fontFamily:"'Poppins', sans-serif",width:"100%",overflow:"hidden"}},"show"===F&&e.createElement("div",{className:"yt-loyalty-page-hero",style:{position:"relative",minHeight:"500px",display:"flex",alignItems:"center",justifyContent:"center"===l?"center":"right"===l?"flex-end":"flex-start",backgroundImage:`url(${oe(ne&&r?r:o)})`,backgroundSize:"cover",backgroundPosition:"center",padding:ne?"40px 20px":"60px 80px"}},e.createElement("div",{className:"yt-loyalty-page-hero-content",style:{maxWidth:"600px",zIndex:2,textAlign:l}},e.createElement("h1",{className:"yt-loyalty-page-hero-title",style:{fontSize:ne?"32px":p,color:u,marginBottom:"16px",lineHeight:1.1,fontWeight:800,textTransform:"uppercase"}},i),e.createElement("p",{className:"yt-loyalty-page-hero-subtitle",style:{fontSize:c,color:d,fontWeight:Number(s)||400,marginBottom:"32px"}},a),m&&e.createElement("div",{className:"yt-loyalty-page-hero-button-wrapper",style:{display:"flex",gap:"16px",justifyContent:"center"===l?"center":"right"===l?"flex-end":"flex-start"}},e.createElement("button",{className:"yt-loyalty-page-hero-button",style:ie,onClick:()=>{"undefined"!=typeof window&&window.ytapp&&(window.ytapp.loyaltyWidgetOpen=!0,window.dispatchEvent(new Event("loyaltyWidgetOpenChanged")))}},"Join Now")))),"show"===N&&e.createElement("div",{className:"yt-loyalty-page-steps",style:{padding:"40px 20px",position:"relative",textAlign:"center"}},e.createElement("div",{className:"yt-loyalty-page-steps-background-text",style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",fontSize:"12vw",fontWeight:900,color:"#F5F5F5",zIndex:0,whiteSpace:"nowrap",pointerEvents:"none",opacity:.5}},"GETTING STARTED"),e.createElement("div",{className:"yt-loyalty-page-steps-content",style:{position:"relative",zIndex:1}},e.createElement("h2",{className:"yt-loyalty-page-steps-title",style:{fontSize:"32px",fontWeight:700,marginBottom:"8px",color:"#000"}},Q),e.createElement("p",{className:"yt-loyalty-page-steps-subtitle",style:{color:g,marginBottom:"24px"}},U),e.createElement("div",{className:"yt-loyalty-page-steps-grid",style:{display:"flex",flexDirection:ne?"column":"row",justifyContent:"center",gap:"40px",maxWidth:"1200px",margin:"0 auto"}},[{icon:e.createElement(v,null),title:Y,desc:G},{icon:e.createElement(B,null),title:X,desc:Z},{icon:e.createElement(C,null),title:J,desc:K}].map((t,n)=>e.createElement("div",{key:n,className:"yt-loyalty-page-step-item",style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center"}},e.createElement("div",{className:"yt-loyalty-page-step-icon",style:{width:"80px",height:"80px",borderRadius:"50%",border:"4px solid #ccc",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"32px",color:"#666",marginBottom:"12px"}},t.icon),e.createElement("div",{className:"yt-loyalty-page-step-title",style:{fontSize:"16px",fontWeight:700,color:g,textTransform:"uppercase",lineHeight:"normal"}},t.title),e.createElement("p",{className:"yt-loyalty-page-step-description",style:{fontSize:"13px",color:g,lineHeight:1.2,maxWidth:"300px"}},t.desc)))))),"show"===P&&e.createElement("div",{className:"yt-loyalty-page-ways-to-earn",style:{padding:"40px 20px",position:"relative",borderTop:"1px solid #eee"}},e.createElement("div",{className:"yt-loyalty-page-ways-to-earn-background-text",style:{position:"absolute",top:ne?"10%":"50%",left:"50%",transform:"translate(-50%, -50%)",fontSize:"12vw",fontWeight:900,color:"#F5F5F5",zIndex:0,whiteSpace:"nowrap",pointerEvents:"none",opacity:.5}},"WAYS TO EARN"),e.createElement("div",{className:"yt-loyalty-page-ways-to-earn-grid",style:{position:"relative",zIndex:1,maxWidth:"1000px",margin:"0 auto",display:"flex",flexWrap:"wrap",justifyContent:"center",gap:"12px"}},be.map((t,n)=>e.createElement("div",{key:n,className:"yt-loyalty-page-ways-to-earn-item",style:{width:ne?"100%":"220px",border:"2px solid #ddd",padding:"12px 8px",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",borderRadius:z,boxShadow:"-1px 2px 3px rgba(0,0,0,0.1)"}},e.createElement("div",{className:"yt-loyalty-page-ways-to-earn-icon",style:{fontSize:"32px",marginBottom:"4px",color:"#1a1a2e"}},t.icon),e.createElement("h3",{className:"yt-loyalty-page-ways-to-earn-title",style:{fontSize:"13px",fontWeight:700,marginBottom:"2px",textTransform:"uppercase",color:"#000"}},t.title),e.createElement("p",{className:"yt-loyalty-page-ways-to-earn-subtitle",style:{fontSize:"11px",color:"#666"}},t.subtitle)))),D&&e.createElement("div",{className:"yt-loyalty-page-ways-to-earn-custom-text",style:{maxWidth:"1000px",margin:"24px auto 0",backgroundColor:b,color:"#fff",padding:"16px",textAlign:"center",fontSize:"12px",fontStyle:"italic",borderRadius:"4px"}},D)),"show"===A&&e.createElement("div",{className:"yt-loyalty-page-custom-section",style:{padding:ne?"40px 0px":"40px 20px",borderTop:"1px solid #eee"}},e.createElement("div",{className:"yt-loyalty-page-custom-section-container",style:{maxWidth:"1200px",margin:"0 auto",display:"flex",flexDirection:ne?"column":"row",alignItems:"center",gap:"40px",borderRadius:z,overflow:"hidden",backgroundColor:"#F9F9F9"}},e.createElement("div",{className:"yt-loyalty-page-custom-section-image-wrapper",style:{flex:1,width:"100%",order:ne||"left"===R?0:1}},e.createElement("div",{className:"yt-loyalty-page-custom-section-image",style:{display:"flex",width:"100%",height:"300px",backgroundColor:"#ddd",backgroundImage:V?`url(${oe(V)})`:o?`url(${oe(o)})`:void 0,backgroundSize:"cover",backgroundPosition:"center"}})),e.createElement("div",{className:"yt-loyalty-page-custom-section-content",style:{flex:1,paddingInline:ne?"20px":"10px",textAlign:ne?"center":W,order:ne||"left"===R?1:0,marginBottom:ne?"20px":"0px"}},e.createElement("h2",{className:"yt-loyalty-page-custom-section-title",style:{fontSize:M,fontWeight:700,marginBottom:"16px",color:H}},O),e.createElement("p",{className:"yt-loyalty-page-custom-section-subtitle",style:{fontSize:j,color:q,marginBottom:"24px",lineHeight:1.6,whiteSpace:"pre-line"}},L)))),"show"===_&&e.createElement("div",{className:"yt-loyalty-page-footer",style:{marginBottom:"20px"}},e.createElement("div",{className:"yt-loyalty-page-footer-container",style:{maxWidth:"1200px",margin:"0 auto"}},e.createElement("div",{className:"yt-loyalty-page-footer-custom-text",style:{backgroundColor:b,color:"#fff",padding:"16px",textAlign:"center",fontSize:"12px",fontStyle:"italic",borderRadius:"4px"}},ee),e.createElement("div",{className:"yt-loyalty-page-footer-signup",style:{display:"flex",flexDirection:ne?"column":"row",justifyContent:"space-between",alignItems:"center",marginTop:"40px",padding:"20px",border:"1px solid #eee",borderRadius:"4px",gap:"20px",textAlign:ne?"center":"left"}},e.createElement("div",{className:"yt-loyalty-page-footer-signup-content"},e.createElement("h3",{style:{fontSize:"20px",fontWeight:700,marginBottom:"4px",color:"#000",textAlign:ne?"center":"left"}},"Rewards Program"),e.createElement("p",{style:{fontSize:"14px",color:"#666"}},te)),e.createElement("button",{className:"yt-loyalty-page-footer-signup-button",style:ae,onClick:()=>{"undefined"!=typeof window&&window.ytapp&&(window.ytapp.loyaltyWidgetOpen=!0,window.dispatchEvent(new Event("loyaltyWidgetOpenChanged")))}},"JOIN NOW")))))},ku=({showPopup:n,selectedOffer:o,selectedOfferTerms:r,onClose:i,offersConfig:a})=>{const[l,c]=t(!1);if(!n||!o||!r)return null;const d=o._customOffer,s=d?.code||o.code,p=e.createElement("div",{className:"yt-product-offers-isolated",style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:2147483647},onClick:i},e.createElement("div",{style:{width:"90vw",minWidth:"375px",maxWidth:"480px",maxHeight:"90vh",backgroundColor:"#fff",borderRadius:"12px",padding:"16px",boxShadow:"0 4px 15px rgba(0,0,0,0.3)",position:"relative",flexDirection:"column",display:"flex"},onClick:e=>e.stopPropagation()},e.createElement("div",{style:{fontSize:"clamp(32px, 8vw, 40px)",color:"#4C4C4C",marginTop:"16px",marginBottom:"8px",display:"flex",justifyContent:"center",position:"relative"}},"free_product"===o.couponType?e.createElement(b,null):e.createElement(je,null)),e.createElement("div",{style:{fontSize:"clamp(16px, 4vw, 20px)",fontWeight:500,color:"#4C4C4C",lineHeight:"normal",textAlign:"center"}},o.couponType.replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")),e.createElement("div",{style:{fontSize:"clamp(28px, 7vw, 40px)",fontWeight:"600",color:a?.textColor||"#EE8E35",lineHeight:"normal",textAlign:"center"}},o.name),e.createElement("div",{style:{fontSize:"clamp(16px, 4vw, 20px)",color:"#000000",textAlign:"center",fontWeight:500}},r.offerMessage),s&&e.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",marginTop:"16px",padding:"12px 20px",backgroundColor:a?.cardBackgroundColor||"#F5F5F5",borderRadius:`${a?.roundness||8}px`,border:`1px dashed ${a?.accentColor||"#EE8E35"}`}},e.createElement("span",{style:{fontSize:"clamp(16px, 4vw, 18px)",fontWeight:"600",color:a?.textColor||"#333",letterSpacing:"1px"}},s),e.createElement("button",{onClick:async()=>{if(s)try{await navigator.clipboard.writeText(s),c(!0),setTimeout(()=>c(!1),2e3)}catch(e){console.error("Failed to copy:",e)}},style:{background:"none",border:"none",cursor:"pointer",padding:"4px",display:"flex",alignItems:"center",justifyContent:"center",color:l?"#22c55e":a?.accentColor||"#EE8E35",fontSize:"20px",transition:"color 0.2s ease"},title:l?"Copied!":"Copy code"},l?e.createElement(I,null):e.createElement(z,null))),r.terms.length>0&&e.createElement(e.Fragment,null,e.createElement("hr",{style:{border:"none",height:"2px",width:"100%",margin:"10px 0 18px 0",backgroundColor:"transparent",backgroundImage:"repeating-linear-gradient(to right, #ccc 0, #ccc 12px, transparent 12px, transparent 20px)",backgroundSize:"100% 2px",backgroundPosition:"0 0",backgroundRepeat:"repeat-x"}}),e.createElement("div",{style:{marginTop:"15px",fontSize:"clamp(14px, 3.5vw, 16px)",textAlign:"center",display:"flex",flexDirection:"column"}},e.createElement("strong",{style:{color:"#888"}},"Terms & Conditions"),e.createElement("ul",{style:{marginTop:"5px",paddingLeft:"20px",textAlign:"left",display:"inline-block",color:"#000",lineHeight:"1.3",marginBottom:"0"}},r.terms.map((t,n)=>e.createElement("li",{key:n,style:{marginBottom:"4px"}},t))))),e.createElement("button",{onClick:i,style:{width:"100%",padding:"10px 20px",marginTop:"10px",backgroundColor:"#fff",border:"none",borderTop:"1px solid #ddd",borderRadius:"0",fontSize:"16px",fontWeight:"600",color:"#333",cursor:"pointer",textAlign:"center",flexShrink:0}},"Close")));return A(p,document.body)},Tu=({showPopup:n,selectedOffer:o,selectedOfferTerms:r,onClose:i,offersConfig:a})=>{const[l,c]=t(!1);if(!n||!o||!r)return null;const d=o._customOffer,s=d?.code||o.code,p=e.createElement("div",{className:"yt-product-offers-isolated",style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"flex-end",justifyContent:"center",zIndex:2147483647,animation:"fadeIn 0.3s ease"},onClick:i},e.createElement("style",null,"\n @keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n @keyframes slideUp {\n from { transform: translateY(100%); }\n to { transform: translateY(0); }\n }\n "),e.createElement("div",{style:{width:"100%",maxHeight:"85vh",backgroundColor:"#fff",borderTopLeftRadius:"20px",borderTopRightRadius:"20px",borderTop:"1px solid #E5E5E5",position:"relative",flexDirection:"column",display:"flex",animation:"slideUp 0.3s ease",overflow:"hidden"},onClick:e=>e.stopPropagation()},e.createElement("div",{style:{width:"40px",height:"4px",backgroundColor:"#ddd",borderRadius:"2px",margin:"12px auto 16px",flexShrink:0}}),e.createElement("div",{style:{overflowY:"auto",flex:1}},e.createElement("div",{style:{padding:"0 20px 20px",backgroundColor:"#fff"}},e.createElement("div",{style:{fontSize:"48px",color:"#4C4C4C",display:"flex",justifyContent:"center",margin:"16px"}},"free_product"===o.couponType?e.createElement(b,null):e.createElement(je,null)),e.createElement("div",{style:{fontSize:"14px",fontWeight:500,color:"#888",textAlign:"center"}},o.couponType.replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")),e.createElement("div",{style:{fontSize:"32px",fontWeight:"700",color:a?.textColor||"#EE8E35",textAlign:"center",lineHeight:"1.2"}},o.name),e.createElement("div",{style:{fontSize:"18px",color:"#000000",textAlign:"center",fontWeight:500}},r.offerMessage),s&&e.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",marginTop:"20px",padding:"14px 20px",backgroundColor:a?.cardBackgroundColor||"#F5F5F5",borderRadius:`${a?.roundness||8}px`,border:`1px dashed ${a?.accentColor||"#EE8E35"}`}},e.createElement("span",{style:{fontSize:"18px",fontWeight:"600",color:a?.textColor||"#333",letterSpacing:"1px"}},s),e.createElement("button",{onClick:async()=>{if(s)try{await navigator.clipboard.writeText(s),c(!0),setTimeout(()=>c(!1),2e3)}catch(e){console.error("Failed to copy:",e)}},style:{background:"none",border:"none",cursor:"pointer",padding:"4px",display:"flex",alignItems:"center",justifyContent:"center",color:l?"#22c55e":a?.accentColor||"#EE8E35",fontSize:"22px",transition:"color 0.2s ease"},title:l?"Copied!":"Copy code"},l?e.createElement(I,null):e.createElement(z,null)))),r.terms.length>0&&e.createElement(e.Fragment,null,e.createElement("div",{style:{backgroundColor:"#F5F5F5",padding:"16px 20px"}},e.createElement("div",{style:{fontSize:"16px",fontWeight:"600",color:"#333",textAlign:"center"}},"Terms & Conditions")),e.createElement("div",{style:{padding:"20px",backgroundColor:"#fff"}},e.createElement("ul",{style:{margin:"0",paddingLeft:"20px",color:"#333",lineHeight:"1.6",fontSize:"14px"}},r.terms.map((t,n)=>e.createElement("li",{key:n,style:{marginBottom:"4px"}},t)))))),e.createElement("button",{onClick:i,style:{width:"100%",padding:"18px 20px",backgroundColor:"#F5F5F5",border:"none",borderTop:"1px solid #E5E5E5",fontSize:"16px",fontWeight:"600",color:"#333",cursor:"pointer",textAlign:"center",fontFamily:"'Poppins', sans-serif",flexShrink:0}},"Close")));return A(p,document.body)},Su=({offersToShow:o,offersConfig:i,getOfferCardMessage:a,setSelectedOffer:l,setShowPopup:c})=>{const d=r(null),[s,p]=t(!1),[u,m]=t(!0),[g,x]=t("undefined"!=typeof window&&window.innerWidth<=768),f=()=>{if(d.current){const{scrollLeft:e,scrollWidth:t,clientWidth:n}=d.current;p(e>0),m(e<t-n-10)}};n(()=>{f();const e=d.current;if(e)return e.addEventListener("scroll",f),()=>e.removeEventListener("scroll",f)},[o]),n(()=>{const e=()=>{x(window.innerWidth<=768)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const y=e=>{if(d.current){const t=g?280:365,n=16,o="right"===e?t+n:-(t+n);d.current.scrollBy({left:o,behavior:"smooth"})}};return e.createElement("div",{style:{position:"relative"}},e.createElement("svg",{style:{position:"absolute",width:0,height:0}},e.createElement("defs",null,e.createElement("mask",{id:"coupon-cut-mask-desktop"},e.createElement("rect",{width:"365",height:"138",fill:"white"}),e.createElement("circle",{cx:"80",cy:"0",r:"12",fill:"black"}),e.createElement("circle",{cx:"80",cy:"138",r:"12",fill:"black"})),e.createElement("mask",{id:"coupon-cut-mask-mobile"},e.createElement("rect",{width:"280",height:"120",fill:"white"}),e.createElement("circle",{cx:"60",cy:"0",r:"10",fill:"black"}),e.createElement("circle",{cx:"60",cy:"120",r:"10",fill:"black"})))),s&&e.createElement("button",{onClick:()=>y("left"),style:{position:"absolute",left:"5px",top:"50%",transform:"translateY(-50%)",background:"#fff",border:"1px solid #e0e0e0",borderRadius:"50%",width:"clamp(28px, 5vw, 38px)",height:"clamp(28px, 5vw, 38px)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:10,boxShadow:"0 2px 8px rgba(0,0,0,0.1)",color:"#333"}},e.createElement(F,{size:20})),u&&e.createElement("button",{onClick:()=>y("right"),style:{position:"absolute",right:"5px",top:"50%",transform:"translateY(-50%)",background:"#fff",border:"1px solid #e0e0e0",borderRadius:"50%",width:"clamp(28px, 5vw, 38px)",height:"clamp(28px, 5vw, 38px)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:10,boxShadow:"0 2px 8px rgba(0,0,0,0.1)",color:"#333"}},e.createElement(N,{size:20})),e.createElement("div",{ref:d,className:"hide-scrollbar",style:{display:"flex",alignItems:"stretch",overflowX:"auto",gap:"16px",scrollbarWidth:"none",msOverflowStyle:"none",minHeight:g?"110px":"128px"}},o?.map(t=>e.createElement("div",{key:t.discountId,style:{flexShrink:0,width:g?"280px":"365px",minWidth:g?"280px":"365px",minHeight:g?"110px":"128px",backgroundColor:"transparent",borderRadius:`${i?.roundness||0}px`,border:"1px solid #e0e0e0",display:"flex",position:"relative",overflow:"visible",mask:`url(#${g?"coupon-cut-mask-mobile":"coupon-cut-mask-desktop"})`,WebkitMask:`url(#${g?"coupon-cut-mask-mobile":"coupon-cut-mask-desktop"})`,maskImage:`url(#${g?"coupon-cut-mask-mobile":"coupon-cut-mask-desktop"})`,WebkitMaskImage:`url(#${g?"coupon-cut-mask-mobile":"coupon-cut-mask-desktop"})`}},e.createElement("div",{style:{width:g?"60px":"80px",minHeight:g?"110px":"128px",backgroundColor:i?.accentColor||"#EE8E35",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:g?"10px 6px":"12px 8px",position:"relative",borderTopLeftRadius:`${i?.roundness||0}px`,borderBottomLeftRadius:`${i?.roundness||0}px`}},e.createElement("div",{style:{position:"absolute",right:"-2px",top:"12px",bottom:"12px",width:"2px",borderLeft:"2px dashed #FFFFFF"}})),i?.iconVisibility&&e.createElement("div",{style:{position:"absolute",left:g?"42.5px":"57.5px",top:"35%",transform:"translateY(-50%)",width:g?"32px":"40px",height:g?"32px":"40px",backgroundColor:"#FFFFFF",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:g?"16px":"20px",color:"#333333",zIndex:10,boxShadow:"0 2px 5px rgba(0,0,0,0.1)",border:"1px solid #E0E0E0"}},"free_product"===t.couponType?e.createElement(b,null):e.createElement(je,null)),e.createElement("div",{style:{flex:1,padding:g?"12px 12px":"15px 15px",paddingLeft:g?"25px":"35px",display:"flex",flexDirection:"column",justifyContent:"space-between",borderTopRightRadius:`${i?.roundness||0}px`,borderBottomRightRadius:`${i?.roundness||0}px`,overflow:"hidden",backgroundColor:i?.cardBackgroundColor||"#ffffff",minWidth:0}},e.createElement("div",{style:{display:"flex",flexDirection:"column",gap:g?"4px":"6px",lineHeight:"normal"}},e.createElement("div",{style:{fontSize:g?"9px":"10px",color:"#666666",fontWeight:"400"}},"free_product"===t.couponType?"Free Gift":t._customOffer?.code?"Coupon":"Special Deal"),e.createElement("div",{style:{fontSize:g?"13px":"15px",fontWeight:"600",color:i?.textColor||"#2c3e50"}},t.name),e.createElement("div",{style:{fontSize:g?"11px":"12px",color:i?.accentColor||"#EE8E35",wordWrap:"break-word",overflowWrap:"break-word",whiteSpace:"normal",minHeight:g?"28px":"32px"}},a(t))),e.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},e.createElement("div",{style:{borderTop:"1px solid #999999",marginTop:"4px",width:"100%",height:"0",display:"block"}}),e.createElement("a",{href:"#",onClick:e=>{e.preventDefault(),l(t),c(!0)},style:{fontSize:g?"11px":"12px",color:"#2c3e50",fontWeight:"500",textDecoration:"none",cursor:"pointer",textAlign:"center",marginTop:"0"}},i?.viewDetailsTitle||"View Details")))))),e.createElement("style",null,"\n .hide-scrollbar::-webkit-scrollbar {\n display: none;\n }\n .hide-scrollbar {\n -ms-overflow-style: none;\n scrollbar-width: none;\n }\n "))},$u=({offersToShow:o,offersConfig:r,getOfferCardMessage:i,setSelectedOffer:a,setShowPopup:l})=>{const[c,d]=t("undefined"!=typeof window&&window.innerWidth<=768);return n(()=>{const e=()=>{d(window.innerWidth<=768)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e.createElement("div",{style:{borderRadius:`${r?.roundness||8}px`}},o?.map((t,n)=>e.createElement("div",{key:t.discountId,style:{display:"flex",alignItems:"flex-start",gap:c?"8px":"12px",padding:c?"12px 0":"16px 0",paddingLeft:c?"10px":"20px",backgroundColor:!0===r?.cardBackgroundTransparent||"true"===String(r?.cardBackgroundTransparent)?"transparent":r?.cardBackgroundColor||"#ffffff",borderBottom:n<(o?.length||0)-1?"1px solid rgb(225 218 218)":"none",marginBottom:"4px",borderRadius:`${r?.roundness||0}px`}},r?.iconVisibility&&e.createElement("div",{style:{width:c?"40px":"50px",height:c?"40px":"50px",backgroundColor:"#f8f9fa",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:c?"20px":"25px",marginTop:c?"5px":"10px",border:"2px solid #4a4a4a",color:"#4a4a4a"}},"free_product"===t.couponType?e.createElement(b,null):e.createElement(je,null)),e.createElement("div",{style:{flex:1}},e.createElement("div",{style:{fontSize:c?"14px":"15px",fontWeight:600,color:"#000000",lineHeight:"1"}},t.couponType.replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" "),":"," ",e.createElement("span",{style:{fontWeight:600,color:r?.textColor||"#34495e"}},t.name)),e.createElement("div",{style:{fontSize:c?"12px":"13px",color:"#7f8c8d",marginBottom:"6px"}},i(t)),e.createElement("div",{style:{fontSize:c?"11px":"12px",color:"#000000"}},"offer auto applied",e.createElement("a",{href:"#",onClick:e=>{e.preventDefault(),a(t),l(!0)},style:{color:r?.accentColor||"#7f8c8d",fontWeight:700,textDecoration:"none",marginLeft:"2px"}},r?.viewDetailsTitle||"T&C"))))))},Bu=({offersConfig:o,offers:i})=>{const[a,l]=t(!1),[c,d]=t(null),[s,p]=t(null),[u,m]=t("undefined"!=typeof window&&window.innerWidth<=768),[g,x]=t("undefined"!=typeof window&&window.innerWidth<=450),f=r(null);n(()=>{const e=()=>{m(window.innerWidth<=768),x(window.innerWidth<=450)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),n(()=>{f.current&&pn(f.current)},[o?.sectionBgContrastColor]);const y=(e=>{if(!e||0===e.length)return e;const t={};e.forEach(e=>{const n=e.customCartProgressBarCriteria||"none";t[n]=(t[n]||0)+1});let n="none",o=-1;Object.keys(t).forEach(e=>{t[e]>o&&(o=t[e],n=e)});const r=e.map((e,t)=>({o:e,idx:t})),i=e=>"minimum_order_value"===n?void 0!==e.minimumOrderValue&&null!==e.minimumOrderValue?Number(e.minimumOrderValue):1/0:"quantity"===n&&void 0!==e.quantityThreshold&&null!==e.quantityThreshold?Number(e.quantityThreshold):1/0;return r.sort((e,t)=>{const o=e.o.customCartProgressBarCriteria===n,r=t.o.customCartProgressBarCriteria===n;if(o&&r){const n=i(e.o),o=i(t.o);return n!==o?n-o:e.idx-t.idx}return o&&!r?-1:!o&&r?1:e.idx-t.idx}),r.map(e=>e.o)})((!1===o?.showBackendOffers&&o?.customOffers&&o.customOffers.length>0?o.customOffers.map((e,t)=>{return{discountId:-(t+1),name:(n=e).title,couponType:n.code?"discount_code":"special_deal",customCartProgressBarCriteria:null,discountPercentage:null,couponTemplateId:0,minimumOrderValue:0,quantityThreshold:0,_allVariantIds:[],description:n.description,_customOffer:n};var n}):i)||[]),b=e=>{if(d(e),e){const t=e._customOffer;p(t?(e=>({offerMessage:e.description||"Special offer available",terms:e.terms?e.terms.split("\n").filter(e=>""!==e.trim()):[]}))(t):(e=>{const t="free_product"===e.couponType;let n="";t?n="Get this product for free!":e.discountPercentage?n=`Get ${e.discountPercentage}% off`:e.discountValue&&(n=`Get ${e.discountValue} off`);const o=["Limited Time Offer","Applies automatically when criteria is met"];return"quantity"===e.customCartProgressBarCriteria&&e.quantityThreshold?o.push(`Unlock when you add ${e.quantityThreshold} ${e.quantityThreshold>1?"items":"item"} to cart`):"minimum_order_value"===e.customCartProgressBarCriteria&&e.minimumOrderValue&&o.push(`Unlock at order value of ${e.minimumOrderValue}`),t&&o.push("Combines with other order discounts"),t||o.push("Not applicable if other offer with higher discount applied on same product"),{offerMessage:n,terms:o}})(e))}},h=e=>{const t=e._customOffer;return t?t.description||"Special offer available":(e=>"quantity"===e.customCartProgressBarCriteria&&e.quantityThreshold?`add ${e.quantityThreshold} ${e.quantityThreshold>1?"items":"item"} to unlock`:"minimum_order_value"===e.customCartProgressBarCriteria&&e.minimumOrderValue?`unlocks on orders above ${e.minimumOrderValue}`:"Special offer available")(e)};return e.createElement("div",null,e.createElement("div",{style:{position:"relative",width:"100%",maxWidth:"450px",borderRadius:"list"===o?.sectionType?`${o?.roundness||0}px`:"0px",boxSizing:"border-box",backgroundColor:o?.sectionBackgroundColor||"#fff"}},e.createElement("div",{style:{border:"coupon"===o?.sectionType?"none":"1px solid rgb(169, 163, 163)",borderTop:"1px solid rgb(169, 163, 163)",padding:null!=o?.cardPadding?`${o.cardPadding}px`:u?"20px 10px 15px":"30px 15px 20px",position:"relative",borderRadius:"list"===o?.sectionType?`${o?.roundness||8}px`:"0px"}},e.createElement("span",{ref:f,className:"yt-product-offers-section-title",style:{position:"absolute",top:"0",left:"left"===o?.alignment?"coupon"===o?.sectionType?"0px":u?"10px":"20px":"right"===o?.alignment?"auto":"50%",right:"right"===o?.alignment?"coupon"===o?.sectionType?"0px":u?"10px":"20px":"auto",transform:"middle"===o?.alignment?"translateX(-50%) translateY(-50%)":"translateY(-50%)",background:o?.sectionBgContrastColor||"#fff",padding:u?"0 8px":"0 10px",fontWeight:"500",fontSize:u?"14px":"16px",textTransform:"uppercase",textAlign:"center"}},o?.sectionTitle||"Available Deals and Offers"),(()=>{const t=o?.sectionType;return"list"===t?e.createElement($u,{offersToShow:y,offersConfig:o||{},getOfferCardMessage:h,setSelectedOffer:b,setShowPopup:l}):"coupon"===t?e.createElement(Su,{offersToShow:y,offersConfig:o||{},getOfferCardMessage:h,setSelectedOffer:b,setShowPopup:l}):null})(),g?e.createElement(Tu,{selectedOffer:c,selectedOfferTerms:s,showPopup:a,offersConfig:o,onClose:()=>{l(!1),d(null),p(null)}}):e.createElement(ku,{selectedOffer:c,selectedOfferTerms:s,showPopup:a,offersConfig:o,onClose:()=>{l(!1),d(null),p(null)}}))))};export{zp as Bundle,Cu as BundleLoader,wu as Cart,Eu as LoyaltyPageBlock,Lt as Nudge,Bu as ProductOffers,Qt as SpinnerWheel};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yt-uikit",
3
- "version": "0.8.72-optimistic-line.0",
3
+ "version": "0.8.72-optimistic-line.2",
4
4
  "description": "YourToken UI Kit",
5
5
  "scripts": {
6
6
  "rollup": "rm -rf dist && tsc && rollup -c",