yt-uikit 0.8.29-shadow-dom.0 → 0.8.29-shadow-dom.1

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
@@ -1992,7 +1992,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
1992
1992
  border: none;
1993
1993
  max-width: unset;
1994
1994
  margin-left: 10px;
1995
- `,ql=({freebieProductsInCart:e,maxFreebiesInTier:n,tierName:r,themeColor:o,themeTextColor:a,primaryTextColor:i,addFreebieToCart:c,imageAspectSelector:d="square",freebieCouponTemplates:s=[],freebieClaimData:p,isCartDrawerOpen:u=!0})=>{const[m]=mn(gl),[f]=mn(hl),g=un(bl),x=un(vl),[h,y]=mn(Dl),[b,v]=t.useState(!1),C=p?.allowOverlayClose??!0,E=p?.freebieSectionTitle;l(()=>u?(x(n,r),y({isOpen:!0}),()=>{g(),y({isOpen:!1})}):(y({isOpen:!1}),void g()),[u,n,r,x,g,y]);const k=()=>{y({isOpen:!1}),g()},T=()=>{y({isOpen:!0})};l(()=>{const e=e=>{"Escape"===e.key&&k()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]);m.selectedProducts.length;const S=f>=n,$=b?"Adding to Cart...":S?`Claim Gifts • ${f}/${n} added`:`${f}/${n} added`;if(!h.isOpen)return t.createElement("div",{style:{display:"flex",flexDirection:"column",marginTop:"5px"}},t.createElement(Vl,{onClick:T},t.createElement(Wl,{$primaryTextColor:i},t.createElement(j,{size:16}),E??"Freebies"," • ",n," items available"),t.createElement(Hl,null)));const B=t.createElement(Nl,{role:"dialog","aria-modal":"true",onClick:C?k:void 0},t.createElement(_l,{onClick:e=>e.stopPropagation(),"aria-labelledby":"freebie-modal-title"},t.createElement(Pl,null,t.createElement(Fl,null,t.createElement(ut,{color:"#4D4D4D",size:22})),t.createElement(Ol,{id:"freebie-modal-title"},t.createElement("span",{className:"bold"},"Freebie")," Unlocked!"),t.createElement(Al,null,"claim up to ",t.createElement("span",{className:"bold"},n," items")," for free")),t.createElement(Ml,null,t.createElement(Rl,null,e.map(n=>t.createElement(Il,{key:n.id,product:n,imageAspectSelector:d,freebieCouponTemplates:s,accentColor:o,freebieProductsInCart:e})))),t.createElement(Ll,null,t.createElement(jl,{$themeColor:o||"#000",$themeTextColor:a,$disabled:!S||b,onClick:async()=>{if(m.selectedProducts.length>0&&!b){v(!0);try{await c(m.selectedProducts),k()}catch(e){console.error("Failed to add freebies:",e)}finally{v(!1)}}},disabled:!S||b},$))));return"undefined"!=typeof document&&document.body?w.createPortal(B,document.body):null},Ul=({freebieProductsInCart:e,themeColor:n,themeTextColor:r,primaryTextColor:o,addFreebieToCart:a,freebiesInCart:i,freebieClaimData:l,imageAspectSelector:c,freebieCouponTemplates:d,cartCheckpoints:s,isCartDrawerOpen:p})=>{const u=t.useMemo(()=>{const t=s?.filter(e=>"free_product"===e?.couponType);if(!t||0===t.length)return;const n=Array.from(new Set((e??[]).map(e=>e?.couponTemplateId).filter(e=>"number"==typeof e)));if(n.length>0){const e=t.find(e=>n.includes(e.couponTemplateId));if(e)return e}},[s,e]),m=t.useMemo(()=>{const e=u?.maxFreebiesInTier;return"number"!=typeof e||isNaN(e)?1:e},[u]),f=t.useMemo(()=>u?.name??"Freebie",[u]),g=async t=>{try{await Gi(t,e,a)}catch(e){console.error("Failed to add multiclaim freebies:",e)}},x=l?.type||"section";return"section"===x?t.createElement(sl,{freebieProductsInCart:e,themeColor:n,themeTextColor:r,primaryTextColor:o,addFreebieToCart:a,freebiesInCart:i,imageAspectSelector:c,freebieCouponTemplates:d,maxFreebiesInTier:m,tierName:f,freebieClaimData:l}):"overlay"===x?t.createElement(ql,{freebieProductsInCart:e,maxFreebiesInTier:m,tierName:f,themeColor:n,themeTextColor:r,primaryTextColor:o,addFreebieToCart:g,imageAspectSelector:c,freebieCouponTemplates:d,freebieClaimData:l,isCartDrawerOpen:p}):(console.warn(`Unknown claimDisplayType: ${x}`),null)};function Ql({inlineCartOfferInfoText:e,inlineCartOfferInfoRedirectLink:n,themeColor:r,tooltipText:o,themeTextColor:a}){const[i,l]=c(!1),d="polygon(0% 100%, 100% 100%, 100% 0%, 100% 0%, 90% 18%, 0% 18%)",s=t.createElement("div",{className:"yt-cart-top-bar",style:{marginTop:"4px",display:"flex",flexDirection:"row",width:"100%",fontSize:"12px",borderRadius:"none",textAlign:"center",justifyContent:"center",position:"relative",background:Mn(r,1),color:a,fontWeight:"var(--yt-cart-font-weight)",padding:"3px",cursor:n?"pointer":"default"}},e,o&&t.createElement("div",{style:{position:"relative",alignSelf:"center",justifySelf:"center",display:"flex",justifyContent:"center",alignItems:"center"}},t.createElement(xt,{size:16,style:{marginLeft:"5px",cursor:"pointer",alignSelf:"center",color:a},onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1)}),i&&t.createElement("div",{style:{position:"absolute",top:"100%",right:"100%",zIndex:1e3,filter:"drop-shadow(0px 0px 10px rgba(0,0,0,0.1))"}},t.createElement("div",{style:{backgroundColor:"gray",clipPath:d,padding:".5px"}},t.createElement("div",{style:{backgroundColor:"white",clipPath:d,padding:"10px",fontSize:"10px",color:"black",whiteSpace:"nowrap",display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"15px",height:"10px"}},o)))));return n?t.createElement("a",{href:n,style:{textDecoration:"none",color:"inherit"}},s):s}var Yl={exports:{}},Gl={},Zl=t,Xl=Symbol.for("react.element"),Kl=Symbol.for("react.fragment"),Jl=Object.prototype.hasOwnProperty,ec=Zl.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,tc={key:!0,ref:!0,__self:!0,__source:!0};function nc(e,t,n){var r,o={},a=null,i=null;for(r in void 0!==n&&(a=""+n),void 0!==t.key&&(a=""+t.key),void 0!==t.ref&&(i=t.ref),t)Jl.call(t,r)&&!tc.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:Xl,type:e,key:a,ref:i,props:o,_owner:ec.current}}Gl.Fragment=Kl,Gl.jsx=nc,Gl.jsxs=nc;var rc={};
1995
+ `,ql=({freebieProductsInCart:e,maxFreebiesInTier:n,tierName:r,themeColor:o,themeTextColor:a,primaryTextColor:i,addFreebieToCart:c,imageAspectSelector:d="square",freebieCouponTemplates:s=[],freebieClaimData:p,isCartDrawerOpen:u=!0})=>{const[m]=mn(gl),[f]=mn(hl),g=un(bl),x=un(vl),[h,y]=mn(Dl),[b,v]=t.useState(!1),w=p?.allowOverlayClose??!0,C=p?.freebieSectionTitle;l(()=>u?(x(n,r),y({isOpen:!0}),()=>{g(),y({isOpen:!1})}):(y({isOpen:!1}),void g()),[u,n,r,x,g,y]);const E=()=>{y({isOpen:!1}),g()},k=()=>{y({isOpen:!0})};l(()=>{const e=e=>{"Escape"===e.key&&E()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]);m.selectedProducts.length;const T=f>=n,S=b?"Adding to Cart...":T?`Claim Gifts • ${f}/${n} added`:`${f}/${n} added`;if(!h.isOpen)return t.createElement("div",{style:{display:"flex",flexDirection:"column",marginTop:"5px"}},t.createElement(Vl,{onClick:k},t.createElement(Wl,{$primaryTextColor:i},t.createElement(j,{size:16}),C??"Freebies"," • ",n," items available"),t.createElement(Hl,null)));return t.createElement(Nl,{role:"dialog","aria-modal":"true",onClick:w?E:void 0},t.createElement(_l,{onClick:e=>e.stopPropagation(),"aria-labelledby":"freebie-modal-title"},t.createElement(Pl,null,t.createElement(Fl,null,t.createElement(ut,{color:"#4D4D4D",size:22})),t.createElement(Ol,{id:"freebie-modal-title"},t.createElement("span",{className:"bold"},"Freebie")," Unlocked!"),t.createElement(Al,null,"claim up to ",t.createElement("span",{className:"bold"},n," items")," for free")),t.createElement(Ml,null,t.createElement(Rl,null,e.map(n=>t.createElement(Il,{key:n.id,product:n,imageAspectSelector:d,freebieCouponTemplates:s,accentColor:o,freebieProductsInCart:e})))),t.createElement(Ll,null,t.createElement(jl,{$themeColor:o||"#000",$themeTextColor:a,$disabled:!T||b,onClick:async()=>{if(m.selectedProducts.length>0&&!b){v(!0);try{await c(m.selectedProducts),E()}catch(e){console.error("Failed to add freebies:",e)}finally{v(!1)}}},disabled:!T||b},S))))},Ul=({freebieProductsInCart:e,themeColor:n,themeTextColor:r,primaryTextColor:o,addFreebieToCart:a,freebiesInCart:i,freebieClaimData:l,imageAspectSelector:c,freebieCouponTemplates:d,cartCheckpoints:s,isCartDrawerOpen:p})=>{const u=t.useMemo(()=>{const t=s?.filter(e=>"free_product"===e?.couponType);if(!t||0===t.length)return;const n=Array.from(new Set((e??[]).map(e=>e?.couponTemplateId).filter(e=>"number"==typeof e)));if(n.length>0){const e=t.find(e=>n.includes(e.couponTemplateId));if(e)return e}},[s,e]),m=t.useMemo(()=>{const e=u?.maxFreebiesInTier;return"number"!=typeof e||isNaN(e)?1:e},[u]),f=t.useMemo(()=>u?.name??"Freebie",[u]),g=async t=>{try{await Gi(t,e,a)}catch(e){console.error("Failed to add multiclaim freebies:",e)}},x=l?.type||"section";return"section"===x?t.createElement(sl,{freebieProductsInCart:e,themeColor:n,themeTextColor:r,primaryTextColor:o,addFreebieToCart:a,freebiesInCart:i,imageAspectSelector:c,freebieCouponTemplates:d,maxFreebiesInTier:m,tierName:f,freebieClaimData:l}):"overlay"===x?t.createElement(ql,{freebieProductsInCart:e,maxFreebiesInTier:m,tierName:f,themeColor:n,themeTextColor:r,primaryTextColor:o,addFreebieToCart:g,imageAspectSelector:c,freebieCouponTemplates:d,freebieClaimData:l,isCartDrawerOpen:p}):(console.warn(`Unknown claimDisplayType: ${x}`),null)};function Ql({inlineCartOfferInfoText:e,inlineCartOfferInfoRedirectLink:n,themeColor:r,tooltipText:o,themeTextColor:a}){const[i,l]=c(!1),d="polygon(0% 100%, 100% 100%, 100% 0%, 100% 0%, 90% 18%, 0% 18%)",s=t.createElement("div",{className:"yt-cart-top-bar",style:{marginTop:"4px",display:"flex",flexDirection:"row",width:"100%",fontSize:"12px",borderRadius:"none",textAlign:"center",justifyContent:"center",position:"relative",background:Mn(r,1),color:a,fontWeight:"var(--yt-cart-font-weight)",padding:"3px",cursor:n?"pointer":"default"}},e,o&&t.createElement("div",{style:{position:"relative",alignSelf:"center",justifySelf:"center",display:"flex",justifyContent:"center",alignItems:"center"}},t.createElement(xt,{size:16,style:{marginLeft:"5px",cursor:"pointer",alignSelf:"center",color:a},onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1)}),i&&t.createElement("div",{style:{position:"absolute",top:"100%",right:"100%",zIndex:1e3,filter:"drop-shadow(0px 0px 10px rgba(0,0,0,0.1))"}},t.createElement("div",{style:{backgroundColor:"gray",clipPath:d,padding:".5px"}},t.createElement("div",{style:{backgroundColor:"white",clipPath:d,padding:"10px",fontSize:"10px",color:"black",whiteSpace:"nowrap",display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"15px",height:"10px"}},o)))));return n?t.createElement("a",{href:n,style:{textDecoration:"none",color:"inherit"}},s):s}var Yl={exports:{}},Gl={},Zl=t,Xl=Symbol.for("react.element"),Kl=Symbol.for("react.fragment"),Jl=Object.prototype.hasOwnProperty,ec=Zl.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,tc={key:!0,ref:!0,__self:!0,__source:!0};function nc(e,t,n){var r,o={},a=null,i=null;for(r in void 0!==n&&(a=""+n),void 0!==t.key&&(a=""+t.key),void 0!==t.ref&&(i=t.ref),t)Jl.call(t,r)&&!tc.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:Xl,type:e,key:a,ref:i,props:o,_owner:ec.current}}Gl.Fragment=Kl,Gl.jsx=nc,Gl.jsxs=nc;var rc={};
1996
1996
  /**
1997
1997
  * @license React
1998
1998
  * react-jsx-runtime.development.js
@@ -2593,7 +2593,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
2593
2593
  &:hover {
2594
2594
  transform: rotate(360deg);
2595
2595
  }
2596
- `,hu=({isOpen:e,setIsOpen:n,backgroundColor:r="white",backgroundSubdued:a="#3947821F",tertiaryColor:i="#067D431A",tertiaryTextColor:d="#000000",exploreCTAColor:s,checkoutFontSize:p,cartTitle:u="My Cart",emptyCartTitle:m,emptyCartDescription:f,emptyCartButtons:g,removeCartItem:x,handleIncrement:h,handleDecrement:y,addCartItem:b,isUserSignedIn:v,showBundle:w,bundleProducts:C,discountAmountOff:E,loyaltyIcon:k,pointsToBeUsed:T,rewardMultiplier:S,redemptionMultiplier:$,discountApplied:B,removeDiscount:z,applyDiscount:I,checkoutFunction:D,joinNowFunction:N,guestLoyaltyPercentage:_,isDev:P,recProductsList:F,showMultiStepProgressBar:O,cartCheckpoints:A,redemptionRate:M,pointsRewardRate:R,showCartLevelAltPay:L,exploreCtaRedirectLink:j,discountAmountApplied:V,minimumCartValue:W,discountInCheckoutButton:H,isStickyCheckout:q,handleCheckpointCrossed:U,customCartProgressBarCriteria:Q,checkoutButtonColor:Y="#252E69",ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,primaryTextColor:X,secondaryTextColor:K,productRecsCtaButtonText:J,productRecsTitleText:ee,emptyProductRecsTitleText:te,showProductRecsOnDesktop:ne,showProductRecsOnMobile:re,themeColor:oe,themeTextColor:ae,companyName:ie,gstNumber:le,showGSTOption:ce,applyGSTToCart:de,showMOVForProgressTiers:se,freeProduct:pe,showLoyaltyCta:ue=!1,freeProductAdjustedCartTotal:me,minimumOrderValueToAvailDiscount:fe,signinCTAButtonVisible:ge,cartSigninCTAMainText:xe,applyNoteToCart:he,note:ye,showNoteOption:be,inlineCartOfferInfoText:ve,inlineCartOfferInfoRedirectLink:we,cartOfferTermsAndConditionsText:Ce,showEditOptionOnProducts:Ee,onSetLoading:ke,showVariantSelectionDropdownInProductRecs:Te,originalCartSubtotal:Se,freebieProductsInCart:$e,showFreebieClaim:Be,addFreebieToCart:ze,freebiesInCart:Ie,effectiveQuantityForProgressBar:De,productPercentageOffMapping:Ne,removeFreebieFromCart:_e,postalCodeList:Pe,enableGeoLocationDeliveryRestriction:Fe=!1,getProductDetailsByVariantId:Oe,applyPostalCodeAndDeliverySlotToCart:Ae,showDeleteOnFreebies:Me,freebieCouponTemplates:Re,freebieFlowCheckpoints:Le,freebieClaimData:je,postalCodeBasedItemTrackingParameter:Ve,enableSlotPicker:We,deliveryHeaderTitle:He,deliveryAvailableText:qe,deliveryNotAvailableText:Ue,giftWrapSetupData:Qe,giftWrapProductDetail:Ye,progressBarFreeProductIconType:Ge,enableCustomCartOnCartPage:Ze,isCartPage:Xe,showCartTimer:Ke,showFreebieMilestone:Je,freebieMilestoneData:et,cartTimerInMinutes:tt,cartTimerCustomText:nt,productRecsCardLayout:rt,productRecsCardListVariant:ot,imageAspectSelector:at,cartComponentsCornerType:it,cartComponentsCornerRadius:lt,cartOffersCarousalData:ct,gstSectionCustomizationData:dt,noteSectionTitle:ut,checkoutSectionMessage:mt,checkoutSectionMessageDisplay:ft,showVariantSelectionDropdownInProductClaim:gt,loyaltyDiscount:xt,brandTokenName:yt,showDiscountOnMRP:vt,switchWidthVariant:wt,prefixMessageText:Ct,suffixMessageText:Et,successMessageText:kt,toggleDecimal:Tt,cartOffersCarouselHeight:St,disableCheckoutButton:$t,showEmptyCartRecommendations:Bt=!1,checkoutButtonBottomSpacing:zt,showPoweredByBadge:It,applyCouponCode:Dt,showApplyCoupon:Nt,enableConfetti:_t,checkoutSectionMessageRedirectLink:Pt,showCheckoutButtonPaymentIcons:Ft})=>{const Ot=pn(fn),At=pn(En),[Mt,Rt]=c(!1),[Lt,jt]=c(!1),[Vt,Wt]=c(!0),{setLoading:Ht}=kn();t.useEffect(()=>{ke&&ke(Ht)},[ke]);const qt=o(!1),Ut=o(null),Qt=o(null);l(()=>{const t=()=>{n(!1)};return e?(qt.current||(Ut.current=window.history.state,Qt.current=window.location.href,window.history.pushState({ytCustomCartDrawer:"open"},"")),window.addEventListener("popstate",t),qt.current=!0):(qt.current&&"open"===window.history.state?.ytCustomCartDrawer&&window.history.replaceState(Ut.current,"",Qt.current??window.location.href),qt.current=!1),()=>{window.removeEventListener("popstate",t)}},[e,n]);const[Yt,Gt]=c(!1);l(()=>{const t=document.querySelector("body");t&&(Ze&&Xe?t.classList.remove("drawer-open"):!Yt&&e?t.classList.add("drawer-open"):t.classList.remove("drawer-open"))},[e,Ze,Xe,Yt]),l(()=>{function e(){const e=window.innerWidth;Gt(e>=450)}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]);const Zt=Ot?.items?.reduce((e,t)=>e+t?.quantity,0);l(()=>{const e=()=>{Rt(!0),window.setTimeout(()=>Rt(!1),3e3)};return window.addEventListener("yt:autoFreebieAdded",e),()=>window.removeEventListener("yt:autoFreebieAdded",e)},[]);const[Xt,Kt]=c("normal"),[Jt,en]=c("normal"),[tn,nn]=c("auto");l(()=>{CSS.supports("font-weight","500")?Kt("500"):CSS.supports("font-weight","400")?Kt("400"):CSS.supports("font-weight","600")&&Kt("600"),CSS.supports("font-weight","400")?en("400"):CSS.supports("font-weight","300")?en("300"):CSS.supports("font-weight","200")&&en("200"),CSS.supports("width","-webkit-fill-available")?nn("-webkit-fill-available"):CSS.supports("width","-moz-available")&&nn("-moz-available")},[]),l(()=>{document.documentElement.style.setProperty("--yt-cart-font-weight",Xt),document.documentElement.style.setProperty("--yt-cart-product-rec-price-font-weight",Jt),document.documentElement.style.setProperty("--yt-cart-custom-fill-width",tn)},[Xt,Jt]);const[rn]=mn(bn),[on]=mn(Cn),[an]=mn(wn);l(()=>{Wt(!("all-products"!==Ve&&("specific-tags"!==Ve||rn.isPostalCodeValid||We)&&("specific-tags"!==Ve||rn.isPostalCodeValid||on||!We)&&("specific-tags"===Ve&&"standard"===an||Lt&&(We?rn.isPostalCodeValid&&on:rn.isPostalCodeValid))))},[rn.isPostalCodeValid,on,Lt,Ve,We]),mn(Tn);const[ln,cn]=c(!0);l(()=>{"true"===localStorage.getItem("cartTimerRanOnce")&&cn(!1);const e=localStorage.getItem("cartTimerTimeLeft");e&&parseInt(e,10)<=0&&cn(!1)},[]);const dn=new Date("2024-11-01");return In(Ot?.items_subtotal_price,Ot?.currency),t.createElement(mu,{className:"yt-cart-drawer",$isDev:P,$isOpen:e,$backgroundColor:r,$enableCustomCartOnCartPage:Ze,$isCartPage:Xe,$isLargeScreen:Yt,$switchWidthVariant:wt},At.cartLoading?t.createElement("div",{style:{backgroundColor:"#fff",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",display:"flex",position:"absolute",opacity:0,zIndex:51}},At.showLoader&&!At.showSkeletonLoader&&t.createElement("div",{className:"loader"},"‎")):t.createElement(t.Fragment,null),t.createElement(t.Fragment,null,t.createElement("div",{className:"yt-cart-drawer-content",style:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"space-between"}},t.createElement("div",null,t.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",margin:"1rem 1rem 0px"}},t.createElement(gu,{className:"yt-cart-title-container",style:{fontWeight:"var(--yt-cart-font-weight, bold)",color:X,fontSize:"16px"}},t.createElement("span",{style:{whiteSpace:"nowrap",flexShrink:0}},u),Ot?.item_count>0&&L&&!(ue&&L)&&R>0&&t.createElement(pu,{pointsRewardRate:R,loyaltyIcon:k,brandTokenName:yt,themeColor:oe,themeTextColor:ae,rewardMultiplier:S}),Zt>0&&t.createElement(fu,{$backgroundSubdued:a},Zt)),t.createElement("div",{style:{display:"flex",gap:"8px",flexDirection:"row",alignItems:"center"}},!(Ze&&Xe)&&t.createElement(xu,{className:"yt-cart-close-button",$backgroundColor:a||"#cacaca30",onClick:()=>n(!e)},t.createElement(bt,{style:{height:"auto",width:"auto",color:X},fontSize:24,cursor:"pointer",onClick:()=>{n(!e)}})))),At&&t.createElement(lu,{$themeColor:oe,show:At.showLoader}),ct?.enableCartOffersCarousel&&t.createElement(ru,{themeColor:oe,cartOffersCarousalData:ct,cartOffersCarouselHeight:St,cartData:Ot}),Ke&&ln&&Ot?.item_count?t.createElement(Op,{minutes:tt,customText:nt,onTimerComplete:()=>{cn(!1),localStorage.setItem("cartTimerRanOnce","true"),localStorage.removeItem("timeLeft"),localStorage.removeItem("lastUpdate")}}):null,Mt&&_t&&t.createElement(ao,{particleCount:50,spread:90,origin:{y:.3}}),ve?t.createElement(Ql,{inlineCartOfferInfoText:ve,inlineCartOfferInfoRedirectLink:we,themeColor:oe,tooltipText:Ce,themeTextColor:ae}):null),O&&Ot?.items_subtotal_price>0&&Ot?.currency&&!!A&&function(e,t,n,r,o){if(!e||0===e.length)return!1;const a=[...e].sort((e,t)=>"minimum_order_value"===r?e?.minimumOrderValue-t?.minimumOrderValue:e?.quantityThreshold-t?.quantityThreshold);return a.filter(e=>0!==e?.[Kr(r)]&&("minimum_order_value"!==r||1!==e?.[Kr(r)])).some((e,i)=>Jr(e,i,a,o,{currentCartAmount:t,effectiveQuantityForProgressBar:n,customCartProgressBarCriteria:r,checkpoints:a}).progressPercentage>0)}(A,In(void 0!==Se?Se:Ot?.items_subtotal_price,Ot.currency),void 0===De?Ot?.item_count:De,Q??"minimum_order_value",Ot?.item_count)&&t.createElement(t.Fragment,null,t.createElement(Oo,{customCartProgressBarCriteria:Q??"minimum_order_value",handleCheckpointCrossed:U,checkpoints:A,effectiveQuantityForProgressBar:void 0===De?Ot?.item_count:De,currentCartAmount:In(void 0!==Se?Se:Ot?.items_subtotal_price,Ot.currency),themeColor:oe,themeTextColor:ae,primaryTextColor:X,secondaryTextColor:K,showMOVForProgressTiers:se,progressBarFreeProductIconType:Ge,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,prefixMessageText:Ct,suffixMessageText:Et,successMessageText:kt,enableConfetti:_t})),Ot?.item_count>0&&t.createElement("div",{style:{display:"flex",height:"12px",background:"#87878717"}}),0===Ot?.items?.length&&0===Ot?.item_count&&!1===At?.showSkeletonLoader?t.createElement(Vo,{showLoyaltyCta:ue,joinNowFunction:N,emptyCartTitle:m,emptyCartDescription:f,exploreCTAColor:s,isUserSignedIn:v,exploreCtaRedirectLink:j,themeColor:oe,emptyCartButtons:g,cartComponentsCornerRadius:lt,cartComponentsCornerType:it,themeTextColor:ae,recProductsList:F,addCartItem:b,productRecsCtaButtonText:J,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,primaryTextColor:X,secondaryTextColor:K,showVariantSelectionDropdownInProductRecs:Te,emptyProductRecsTitleText:te,backgroundSubdued:a,showEmptyCartRecommendations:Bt,tertiaryColor:i,tertiaryTextColor:d}):t.createElement("div",{style:{display:"flex",flexDirection:"column",overflowY:"auto",flex:1,overflowX:"hidden",height:"100%",scrollbarWidth:"none"}},t.createElement(wi,{isDev:P,themeColor:oe,handleDecrement:y,handleIncrement:h,removeCartItem:x,addCartItem:b,primaryTextColor:X,secondaryTextColor:K,freeProduct:pe,themeTextColor:ae,showEditOptionOnProducts:Ee,productPercentageOffMapping:Ne,removeFreebieFromCart:_e,showDeleteOnFreebies:Me,freebieCouponTemplates:Re??[],freebieFlowCheckpoints:Le??[],cartCheckpoints:A,freeProductAdjustedCartTotal:me,imageAspectSelector:at,cartComponentsCornerRadius:lt,cartComponentsCornerType:it,giftWrapVariantId:Ye?.variants?.nodes[0]?.id,giftWrapProductId:Qe?.giftProductId,showGiftWrapAsLineItem:Qe?.showGiftWrapAsLineItem,backgroundSubdued:a,tertiaryColor:i,tertiaryTextColor:d,backgroundColor:r,showDiscountOnMRP:vt,checkoutSectionMessage:mt,checkoutSectionMessageRedirectLink:Pt,showFreebieMilestone:Je,freebieMilestoneData:et}),Yt&&ne&&!!F&&F?.length>0&&Ot?.item_count>0&&b&&t.createElement(Nr,{addCartItem:b,products:F,productRecsCtaButtonText:J,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,productRecsTitleText:ee,themeColor:oe,primaryTextColor:X,secondaryTextColor:K,showVariantSelectionDropdownInProductRecs:Te,cardLayout:rt,variant:ot,cartComponentsCornerType:it,cartComponentsCornerRadius:lt,backgroundSubdued:a,backgroundColor:r,tertiaryColor:i,tertiaryTextColor:d}),!Yt&&re&&!!F&&F?.length>0&&Ot?.item_count>0&&b&&t.createElement(Nr,{addCartItem:b,products:F,productRecsCtaButtonText:J,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,productRecsTitleText:ee,themeColor:oe,primaryTextColor:X,secondaryTextColor:K,showVariantSelectionDropdownInProductRecs:Te,cardLayout:rt,variant:ot,cartComponentsCornerRadius:lt,cartComponentsCornerType:it,backgroundSubdued:a,tertiaryColor:i,tertiaryTextColor:d})),t.createElement(ia,null,Ot?.item_count>0&&w&&C&&t.createElement(Ei,{bundleProducts:C}),ce&&!!de&&Ot?.item_count>0&&t.createElement(Oi,{companyName:ie,gstNumber:le,themeColor:oe,iconColor:dt?.iconColor,showIcon:dt?.showIcon,backgroundColor:dt?.backgroundColor,textColor:dt?.textColor,title:dt?.title}),!!Ot&&Ot?.item_count>0&&!!ze&&!!$e&&!!Ie&&$e.length>0&&t.createElement(Ul,{freebieProductsInCart:$e,themeColor:oe,themeTextColor:ae,primaryTextColor:X,addFreebieToCart:ze,freebiesInCart:Ie,imageAspectSelector:at,freebieCouponTemplates:Re,freebieClaimData:je,cartCheckpoints:A,isCartDrawerOpen:e}),Fe&&(Pe?.length??0)>0&&!!Ae&&Ot?.item_count>0&&t.createElement(Ai,null,t.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",margin:"6px 1rem 1rem 1rem"},onClick:()=>Wt(!Vt)},t.createElement("span",{style:{fontSize:"12px",display:"flex",gap:"5px",alignItems:"center"}},"Shipping ",t.createElement(ht,null)),t.createElement(Mi,null,Vt?t.createElement(st,null):t.createElement(pt,null))),"all-products"===Ve&&Vt?t.createElement(Ep,{postalCodeList:Pe,themeColor:oe,themeTextColor:ae,enableSlotPicker:We,deliveryHeaderTitle:He,deliveryAvailableText:qe,deliveryNotAvailableText:Ue,disabledDates:dn}):Vt&&(Lt?t.createElement(Ep,{postalCodeList:Pe,themeColor:oe,themeTextColor:ae,enableSlotPicker:We,deliveryHeaderTitle:He,deliveryAvailableText:qe,deliveryNotAvailableText:Ue,disabledDates:dn}):t.createElement(kp,{postalCodeList:Pe,themeColor:oe,themeTextColor:ae,enableSlotPicker:We,disabledDates:dn}))),be&&!!he&&Ot?.item_count>0&&t.createElement(Li,{note:ye,noteSectionTitle:ut}),Qe?.showGiftWrapOption&&Ot?.item_count>0&&t.createElement(_p,{themeColor:oe,id:Qe?.giftProductId,detail:Ye,showPrice:Qe?.showPrice,errorText:Qe?.errorText,customText:Qe?.customText,showGiftIcon:Qe?.showGiftIcon,showProductImage:Qe?.showProductImage,addCartItem:b,removeCartItem:x}),Ot?.item_count>0&&Nt&&!ue&&Dt&&t.createElement(uu,{backgroundSubdued:a,themeColor:oe,themeTextColor:ae,primaryTextColor:X,cartComponentsCornerRadius:lt,applyCouponCode:Dt,removeDiscount:z,enableConfetti:_t}),Ot?.item_count>0&&t.createElement(t.Fragment,null,v||!ue||xt?!xt&&void 0!==E&&void 0!==T&&!!k&&ue&&!!I&&t.createElement($a,{themeColor:oe,applyDiscount:I,discountAmountOff:E,loyaltyIcon:k,pointsToBeUsed:T,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,primaryTextColor:X,secondaryTextColor:K,minimumOrderValueToAvailDiscount:fe,brandTokenName:yt,showCartLevelAltPay:L,redemptionMultiplier:$}):!!_&&!!N&&t.createElement(oa,{cartSigninCTAMainText:xe,signinCTAButtonVisible:ge,themeColor:oe,joinNowFunction:N,guestLoyaltyPercentage:_,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,primaryTextColor:X,secondaryTextColor:K,cartComponentsCornerRadius:lt,cartComponentsCornerType:it,showCartLevelAltPay:L})),Ot?.item_count>0&&!!xt&&!!z&&ue&&xt&&void 0!==T&&t.createElement(Ea,{themeColor:oe,removeDiscount:z,loyaltyDiscount:xt,isDev:P,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,primaryTextColor:X,secondaryTextColor:K,pointsToBeUsed:T,brandTokenName:yt,showCartLevelAltPay:L}),ue&&L&&M&&k&&Ot?.item_count>0&&t.createElement(du,{loyaltyIcon:k,backgroundSubdued:a,primaryTextColor:X,pointsRewardRate:R,rewardMultiplier:S}),ue&&Ot&&Ot.item_count>0&&!!fe&&fe>1&&t.createElement("span",{className:"yt-cart-loyalty-mov-text",style:{fontSize:"10px",color:oe??"#50D1AA",fontWeight:600,display:"flex",justifyContent:ge?"space-between":"center"}},"Minimum order value to use ",yt,":"," ",fe),Ot&&D&&Ot?.item_count>0&&t.createElement("div",null,t.createElement(Jo,{disableCheckoutButton:!!$t||At.cartLoading,discountApplied:B,checkoutFunction:D,checkoutButtonColor:Y,checkoutFontSize:p,discountInCheckoutButton:H,isStickyCheckout:q,discountAmountApplied:V,minimumCartValue:W,themeTextColor:ae,applyGSTToCart:de,showGSTOption:ce,applyNoteToCart:he,showNoteOption:be,enableGeoLocationDeliveryRestriction:Fe,applyPostalCodeAndDeliverySlotToCart:Ae,enableSlotPicker:We,cartComponentsCornerRadius:lt,cartComponentsCornerType:it,checkoutSectionMessage:mt,checkoutSectionMessageDisplay:ft,checkoutSectionMessageRedirectLink:Pt,showDiscountOnMRP:vt,tertiaryColor:i,tertiaryTextColor:d,cartCheckpoints:A,toggleDecimal:Tt,checkoutButtonBottomSpacing:zt,showPoweredByBadge:It,showCheckoutButtonPaymentIcons:Ft,primaryTextColor:X}))))))},yu=h.div`
2596
+ `,hu=({isOpen:e,setIsOpen:n,backgroundColor:r="white",backgroundSubdued:a="#3947821F",tertiaryColor:i="#067D431A",tertiaryTextColor:d="#000000",exploreCTAColor:s,checkoutFontSize:p,cartTitle:u="My Cart",emptyCartTitle:m,emptyCartDescription:f,emptyCartButtons:g,removeCartItem:x,handleIncrement:h,handleDecrement:y,addCartItem:b,isUserSignedIn:v,showBundle:w,bundleProducts:C,discountAmountOff:E,loyaltyIcon:k,pointsToBeUsed:T,rewardMultiplier:S,redemptionMultiplier:$,discountApplied:B,removeDiscount:z,applyDiscount:I,checkoutFunction:D,joinNowFunction:N,guestLoyaltyPercentage:_,isDev:P,recProductsList:F,showMultiStepProgressBar:O,cartCheckpoints:A,redemptionRate:M,pointsRewardRate:R,showCartLevelAltPay:L,exploreCtaRedirectLink:j,discountAmountApplied:V,minimumCartValue:W,discountInCheckoutButton:H,isStickyCheckout:q,handleCheckpointCrossed:U,customCartProgressBarCriteria:Q,checkoutButtonColor:Y="#252E69",ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,primaryTextColor:X,secondaryTextColor:K,productRecsCtaButtonText:J,productRecsTitleText:ee,emptyProductRecsTitleText:te,showProductRecsOnDesktop:ne,showProductRecsOnMobile:re,themeColor:oe,themeTextColor:ae,companyName:ie,gstNumber:le,showGSTOption:ce,applyGSTToCart:de,showMOVForProgressTiers:se,freeProduct:pe,showLoyaltyCta:ue=!1,freeProductAdjustedCartTotal:me,minimumOrderValueToAvailDiscount:fe,signinCTAButtonVisible:ge,cartSigninCTAMainText:xe,applyNoteToCart:he,note:ye,showNoteOption:be,inlineCartOfferInfoText:ve,inlineCartOfferInfoRedirectLink:we,cartOfferTermsAndConditionsText:Ce,showEditOptionOnProducts:Ee,onSetLoading:ke,showVariantSelectionDropdownInProductRecs:Te,originalCartSubtotal:Se,freebieProductsInCart:$e,showFreebieClaim:Be,addFreebieToCart:ze,freebiesInCart:Ie,effectiveQuantityForProgressBar:De,productPercentageOffMapping:Ne,removeFreebieFromCart:_e,postalCodeList:Pe,enableGeoLocationDeliveryRestriction:Fe=!1,getProductDetailsByVariantId:Oe,applyPostalCodeAndDeliverySlotToCart:Ae,showDeleteOnFreebies:Me,freebieCouponTemplates:Re,freebieFlowCheckpoints:Le,freebieClaimData:je,postalCodeBasedItemTrackingParameter:Ve,enableSlotPicker:We,deliveryHeaderTitle:He,deliveryAvailableText:qe,deliveryNotAvailableText:Ue,giftWrapSetupData:Qe,giftWrapProductDetail:Ye,progressBarFreeProductIconType:Ge,enableCustomCartOnCartPage:Ze,isCartPage:Xe,showCartTimer:Ke,showFreebieMilestone:Je,freebieMilestoneData:et,cartTimerInMinutes:tt,cartTimerCustomText:nt,productRecsCardLayout:rt,productRecsCardListVariant:ot,imageAspectSelector:at,cartComponentsCornerType:it,cartComponentsCornerRadius:lt,cartOffersCarousalData:ct,gstSectionCustomizationData:dt,noteSectionTitle:ut,checkoutSectionMessage:mt,checkoutSectionMessageDisplay:ft,showVariantSelectionDropdownInProductClaim:gt,loyaltyDiscount:xt,brandTokenName:yt,showDiscountOnMRP:vt,switchWidthVariant:wt,prefixMessageText:Ct,suffixMessageText:Et,successMessageText:kt,toggleDecimal:Tt,cartOffersCarouselHeight:St,disableCheckoutButton:$t,showEmptyCartRecommendations:Bt=!1,checkoutButtonBottomSpacing:zt,showPoweredByBadge:It,applyCouponCode:Dt,showApplyCoupon:Nt,enableConfetti:_t,checkoutSectionMessageRedirectLink:Pt,showCheckoutButtonPaymentIcons:Ft})=>{const Ot=pn(fn),At=pn(En),[Mt,Rt]=c(!1),[Lt,jt]=c(!1),[Vt,Wt]=c(!0),{setLoading:Ht}=kn();t.useEffect(()=>{ke&&ke(Ht)},[ke]);const qt=o(!1),Ut=o(null),Qt=o(null);l(()=>{const t=()=>{n(!1)};return e?(qt.current||(Ut.current=window.history.state,Qt.current=window.location.href,window.history.pushState({ytCustomCartDrawer:"open"},"")),window.addEventListener("popstate",t),qt.current=!0):(qt.current&&"open"===window.history.state?.ytCustomCartDrawer&&window.history.replaceState(Ut.current,"",Qt.current??window.location.href),qt.current=!1),()=>{window.removeEventListener("popstate",t)}},[e,n]);const[Yt,Gt]=c(!1);l(()=>{const t=document.querySelector("body");t&&(Ze&&Xe?t.classList.remove("drawer-open"):!Yt&&e?t.classList.add("drawer-open"):t.classList.remove("drawer-open"))},[e,Ze,Xe,Yt]),l(()=>{function e(){const e=window.innerWidth;Gt(e>=450)}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]);const Zt=Ot?.items?.reduce((e,t)=>e+t?.quantity,0);l(()=>{const e=()=>{Rt(!0),window.setTimeout(()=>Rt(!1),3e3)};return window.addEventListener("yt:autoFreebieAdded",e),()=>window.removeEventListener("yt:autoFreebieAdded",e)},[]);const[Xt,Kt]=c("normal"),[Jt,en]=c("normal"),[tn,nn]=c("auto");l(()=>{CSS.supports("font-weight","500")?Kt("500"):CSS.supports("font-weight","400")?Kt("400"):CSS.supports("font-weight","600")&&Kt("600"),CSS.supports("font-weight","400")?en("400"):CSS.supports("font-weight","300")?en("300"):CSS.supports("font-weight","200")&&en("200"),CSS.supports("width","-webkit-fill-available")?nn("-webkit-fill-available"):CSS.supports("width","-moz-available")&&nn("-moz-available")},[]);const[rn]=mn(bn),[on]=mn(Cn),[an]=mn(wn);l(()=>{Wt(!("all-products"!==Ve&&("specific-tags"!==Ve||rn.isPostalCodeValid||We)&&("specific-tags"!==Ve||rn.isPostalCodeValid||on||!We)&&("specific-tags"===Ve&&"standard"===an||Lt&&(We?rn.isPostalCodeValid&&on:rn.isPostalCodeValid))))},[rn.isPostalCodeValid,on,Lt,Ve,We]),mn(Tn);const[ln,cn]=c(!0);l(()=>{"true"===localStorage.getItem("cartTimerRanOnce")&&cn(!1);const e=localStorage.getItem("cartTimerTimeLeft");e&&parseInt(e,10)<=0&&cn(!1)},[]);const dn=new Date("2024-11-01");return In(Ot?.items_subtotal_price,Ot?.currency),t.createElement(mu,{className:"yt-cart-drawer",$isDev:P,$isOpen:e,$backgroundColor:r,$enableCustomCartOnCartPage:Ze,$isCartPage:Xe,$isLargeScreen:Yt,$switchWidthVariant:wt,style:{"--yt-cart-font-weight":Xt,"--yt-cart-product-rec-price-font-weight":Jt,"--yt-cart-custom-fill-width":tn}},At.cartLoading?t.createElement("div",{style:{backgroundColor:"#fff",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",display:"flex",position:"absolute",opacity:0,zIndex:51}},At.showLoader&&!At.showSkeletonLoader&&t.createElement("div",{className:"loader"},"‎")):t.createElement(t.Fragment,null),t.createElement(t.Fragment,null,t.createElement("div",{className:"yt-cart-drawer-content",style:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"space-between"}},t.createElement("div",null,t.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",margin:"1rem 1rem 0px"}},t.createElement(gu,{className:"yt-cart-title-container",style:{fontWeight:"var(--yt-cart-font-weight, bold)",color:X,fontSize:"16px"}},t.createElement("span",{style:{whiteSpace:"nowrap",flexShrink:0}},u),Ot?.item_count>0&&L&&!(ue&&L)&&R>0&&t.createElement(pu,{pointsRewardRate:R,loyaltyIcon:k,brandTokenName:yt,themeColor:oe,themeTextColor:ae,rewardMultiplier:S}),Zt>0&&t.createElement(fu,{$backgroundSubdued:a},Zt)),t.createElement("div",{style:{display:"flex",gap:"8px",flexDirection:"row",alignItems:"center"}},!(Ze&&Xe)&&t.createElement(xu,{className:"yt-cart-close-button",$backgroundColor:a||"#cacaca30",onClick:()=>n(!e)},t.createElement(bt,{style:{height:"auto",width:"auto",color:X},fontSize:24,cursor:"pointer",onClick:()=>{n(!e)}})))),At&&t.createElement(lu,{$themeColor:oe,show:At.showLoader}),ct?.enableCartOffersCarousel&&t.createElement(ru,{themeColor:oe,cartOffersCarousalData:ct,cartOffersCarouselHeight:St,cartData:Ot}),Ke&&ln&&Ot?.item_count?t.createElement(Op,{minutes:tt,customText:nt,onTimerComplete:()=>{cn(!1),localStorage.setItem("cartTimerRanOnce","true"),localStorage.removeItem("timeLeft"),localStorage.removeItem("lastUpdate")}}):null,Mt&&_t&&t.createElement(ao,{particleCount:50,spread:90,origin:{y:.3}}),ve?t.createElement(Ql,{inlineCartOfferInfoText:ve,inlineCartOfferInfoRedirectLink:we,themeColor:oe,tooltipText:Ce,themeTextColor:ae}):null),O&&Ot?.items_subtotal_price>0&&Ot?.currency&&!!A&&function(e,t,n,r,o){if(!e||0===e.length)return!1;const a=[...e].sort((e,t)=>"minimum_order_value"===r?e?.minimumOrderValue-t?.minimumOrderValue:e?.quantityThreshold-t?.quantityThreshold);return a.filter(e=>0!==e?.[Kr(r)]&&("minimum_order_value"!==r||1!==e?.[Kr(r)])).some((e,i)=>Jr(e,i,a,o,{currentCartAmount:t,effectiveQuantityForProgressBar:n,customCartProgressBarCriteria:r,checkpoints:a}).progressPercentage>0)}(A,In(void 0!==Se?Se:Ot?.items_subtotal_price,Ot.currency),void 0===De?Ot?.item_count:De,Q??"minimum_order_value",Ot?.item_count)&&t.createElement(t.Fragment,null,t.createElement(Oo,{customCartProgressBarCriteria:Q??"minimum_order_value",handleCheckpointCrossed:U,checkpoints:A,effectiveQuantityForProgressBar:void 0===De?Ot?.item_count:De,currentCartAmount:In(void 0!==Se?Se:Ot?.items_subtotal_price,Ot.currency),themeColor:oe,themeTextColor:ae,primaryTextColor:X,secondaryTextColor:K,showMOVForProgressTiers:se,progressBarFreeProductIconType:Ge,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,prefixMessageText:Ct,suffixMessageText:Et,successMessageText:kt,enableConfetti:_t})),Ot?.item_count>0&&t.createElement("div",{style:{display:"flex",height:"12px",background:"#87878717"}}),0===Ot?.items?.length&&0===Ot?.item_count&&!1===At?.showSkeletonLoader?t.createElement(Vo,{showLoyaltyCta:ue,joinNowFunction:N,emptyCartTitle:m,emptyCartDescription:f,exploreCTAColor:s,isUserSignedIn:v,exploreCtaRedirectLink:j,themeColor:oe,emptyCartButtons:g,cartComponentsCornerRadius:lt,cartComponentsCornerType:it,themeTextColor:ae,recProductsList:F,addCartItem:b,productRecsCtaButtonText:J,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,primaryTextColor:X,secondaryTextColor:K,showVariantSelectionDropdownInProductRecs:Te,emptyProductRecsTitleText:te,backgroundSubdued:a,showEmptyCartRecommendations:Bt,tertiaryColor:i,tertiaryTextColor:d}):t.createElement("div",{style:{display:"flex",flexDirection:"column",overflowY:"auto",flex:1,overflowX:"hidden",height:"100%",scrollbarWidth:"none"}},t.createElement(wi,{isDev:P,themeColor:oe,handleDecrement:y,handleIncrement:h,removeCartItem:x,addCartItem:b,primaryTextColor:X,secondaryTextColor:K,freeProduct:pe,themeTextColor:ae,showEditOptionOnProducts:Ee,productPercentageOffMapping:Ne,removeFreebieFromCart:_e,showDeleteOnFreebies:Me,freebieCouponTemplates:Re??[],freebieFlowCheckpoints:Le??[],cartCheckpoints:A,freeProductAdjustedCartTotal:me,imageAspectSelector:at,cartComponentsCornerRadius:lt,cartComponentsCornerType:it,giftWrapVariantId:Ye?.variants?.nodes[0]?.id,giftWrapProductId:Qe?.giftProductId,showGiftWrapAsLineItem:Qe?.showGiftWrapAsLineItem,backgroundSubdued:a,tertiaryColor:i,tertiaryTextColor:d,backgroundColor:r,showDiscountOnMRP:vt,checkoutSectionMessage:mt,checkoutSectionMessageRedirectLink:Pt,showFreebieMilestone:Je,freebieMilestoneData:et}),Yt&&ne&&!!F&&F?.length>0&&Ot?.item_count>0&&b&&t.createElement(Nr,{addCartItem:b,products:F,productRecsCtaButtonText:J,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,productRecsTitleText:ee,themeColor:oe,primaryTextColor:X,secondaryTextColor:K,showVariantSelectionDropdownInProductRecs:Te,cardLayout:rt,variant:ot,cartComponentsCornerType:it,cartComponentsCornerRadius:lt,backgroundSubdued:a,backgroundColor:r,tertiaryColor:i,tertiaryTextColor:d}),!Yt&&re&&!!F&&F?.length>0&&Ot?.item_count>0&&b&&t.createElement(Nr,{addCartItem:b,products:F,productRecsCtaButtonText:J,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,productRecsTitleText:ee,themeColor:oe,primaryTextColor:X,secondaryTextColor:K,showVariantSelectionDropdownInProductRecs:Te,cardLayout:rt,variant:ot,cartComponentsCornerRadius:lt,cartComponentsCornerType:it,backgroundSubdued:a,tertiaryColor:i,tertiaryTextColor:d})),t.createElement(ia,null,Ot?.item_count>0&&w&&C&&t.createElement(Ei,{bundleProducts:C}),ce&&!!de&&Ot?.item_count>0&&t.createElement(Oi,{companyName:ie,gstNumber:le,themeColor:oe,iconColor:dt?.iconColor,showIcon:dt?.showIcon,backgroundColor:dt?.backgroundColor,textColor:dt?.textColor,title:dt?.title}),!!Ot&&Ot?.item_count>0&&!!ze&&!!$e&&!!Ie&&$e.length>0&&t.createElement(Ul,{freebieProductsInCart:$e,themeColor:oe,themeTextColor:ae,primaryTextColor:X,addFreebieToCart:ze,freebiesInCart:Ie,imageAspectSelector:at,freebieCouponTemplates:Re,freebieClaimData:je,cartCheckpoints:A,isCartDrawerOpen:e}),Fe&&(Pe?.length??0)>0&&!!Ae&&Ot?.item_count>0&&t.createElement(Ai,null,t.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",margin:"6px 1rem 1rem 1rem"},onClick:()=>Wt(!Vt)},t.createElement("span",{style:{fontSize:"12px",display:"flex",gap:"5px",alignItems:"center"}},"Shipping ",t.createElement(ht,null)),t.createElement(Mi,null,Vt?t.createElement(st,null):t.createElement(pt,null))),"all-products"===Ve&&Vt?t.createElement(Ep,{postalCodeList:Pe,themeColor:oe,themeTextColor:ae,enableSlotPicker:We,deliveryHeaderTitle:He,deliveryAvailableText:qe,deliveryNotAvailableText:Ue,disabledDates:dn}):Vt&&(Lt?t.createElement(Ep,{postalCodeList:Pe,themeColor:oe,themeTextColor:ae,enableSlotPicker:We,deliveryHeaderTitle:He,deliveryAvailableText:qe,deliveryNotAvailableText:Ue,disabledDates:dn}):t.createElement(kp,{postalCodeList:Pe,themeColor:oe,themeTextColor:ae,enableSlotPicker:We,disabledDates:dn}))),be&&!!he&&Ot?.item_count>0&&t.createElement(Li,{note:ye,noteSectionTitle:ut}),Qe?.showGiftWrapOption&&Ot?.item_count>0&&t.createElement(_p,{themeColor:oe,id:Qe?.giftProductId,detail:Ye,showPrice:Qe?.showPrice,errorText:Qe?.errorText,customText:Qe?.customText,showGiftIcon:Qe?.showGiftIcon,showProductImage:Qe?.showProductImage,addCartItem:b,removeCartItem:x}),Ot?.item_count>0&&Nt&&!ue&&Dt&&t.createElement(uu,{backgroundSubdued:a,themeColor:oe,themeTextColor:ae,primaryTextColor:X,cartComponentsCornerRadius:lt,applyCouponCode:Dt,removeDiscount:z,enableConfetti:_t}),Ot?.item_count>0&&t.createElement(t.Fragment,null,v||!ue||xt?!xt&&void 0!==E&&void 0!==T&&!!k&&ue&&!!I&&t.createElement($a,{themeColor:oe,applyDiscount:I,discountAmountOff:E,loyaltyIcon:k,pointsToBeUsed:T,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,primaryTextColor:X,secondaryTextColor:K,minimumOrderValueToAvailDiscount:fe,brandTokenName:yt,showCartLevelAltPay:L,redemptionMultiplier:$}):!!_&&!!N&&t.createElement(oa,{cartSigninCTAMainText:xe,signinCTAButtonVisible:ge,themeColor:oe,joinNowFunction:N,guestLoyaltyPercentage:_,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,primaryTextColor:X,secondaryTextColor:K,cartComponentsCornerRadius:lt,cartComponentsCornerType:it,showCartLevelAltPay:L})),Ot?.item_count>0&&!!xt&&!!z&&ue&&xt&&void 0!==T&&t.createElement(Ea,{themeColor:oe,removeDiscount:z,loyaltyDiscount:xt,isDev:P,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,primaryTextColor:X,secondaryTextColor:K,pointsToBeUsed:T,brandTokenName:yt,showCartLevelAltPay:L}),ue&&L&&M&&k&&Ot?.item_count>0&&t.createElement(du,{loyaltyIcon:k,backgroundSubdued:a,primaryTextColor:X,pointsRewardRate:R,rewardMultiplier:S}),ue&&Ot&&Ot.item_count>0&&!!fe&&fe>1&&t.createElement("span",{className:"yt-cart-loyalty-mov-text",style:{fontSize:"10px",color:oe??"#50D1AA",fontWeight:600,display:"flex",justifyContent:ge?"space-between":"center"}},"Minimum order value to use ",yt,":"," ",fe),Ot&&D&&Ot?.item_count>0&&t.createElement("div",null,t.createElement(Jo,{disableCheckoutButton:!!$t||At.cartLoading,discountApplied:B,checkoutFunction:D,checkoutButtonColor:Y,checkoutFontSize:p,discountInCheckoutButton:H,isStickyCheckout:q,discountAmountApplied:V,minimumCartValue:W,themeTextColor:ae,applyGSTToCart:de,showGSTOption:ce,applyNoteToCart:he,showNoteOption:be,enableGeoLocationDeliveryRestriction:Fe,applyPostalCodeAndDeliverySlotToCart:Ae,enableSlotPicker:We,cartComponentsCornerRadius:lt,cartComponentsCornerType:it,checkoutSectionMessage:mt,checkoutSectionMessageDisplay:ft,checkoutSectionMessageRedirectLink:Pt,showDiscountOnMRP:vt,tertiaryColor:i,tertiaryTextColor:d,cartCheckpoints:A,toggleDecimal:Tt,checkoutButtonBottomSpacing:zt,showPoweredByBadge:It,showCheckoutButtonPaymentIcons:Ft,primaryTextColor:X}))))))},yu=h.div`
2597
2597
  position: relative;
2598
2598
  `,bu=h.button`
2599
2599
  border: 1px solid #ccc;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yt-uikit",
3
- "version": "0.8.29-shadow-dom.0",
3
+ "version": "0.8.29-shadow-dom.1",
4
4
  "description": "YourToken UI Kit",
5
5
  "scripts": {
6
6
  "rollup": "tsc && rollup -c",