yt-uikit 0.8.23-gift-wrap-product-image.1 → 0.8.23-gift-wrap-product-image.3

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
@@ -1898,10 +1898,14 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
1898
1898
  color: ${e=>e.tileTextColor||"#374151"} !important;
1899
1899
  }
1900
1900
  `,jd=({themeColor:e,themeTextColor:n,disabledDates:r=[]})=>{const[o,i]=c(!1),[s,d]=un(wn),p=pn(yn),u=t.useRef(null),m=s?new Date(s):null,f=Array.isArray(r)?r:[r],g=a(()=>{const e=new Date;return e.setDate(e.getDate()+1),e},[]),x=a(e=>f.some(t=>t instanceof Date&&(e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate())),[f]),h=a(e=>{if(!e)return!1;const t=g(),n=new Date(e.getFullYear(),e.getMonth(),e.getDate());return n>=new Date(t.getFullYear(),t.getMonth(),t.getDate())&&!x(n)},[g,x]);l(()=>{const e=e=>{u.current&&!u.current.contains(e.target)&&i(!1)};return o&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[o]),l(()=>{const e=h(m);p(t=>t.isDateValid!==e?{...t,isDateValid:e}:t)},[m,h,p]);const y=a(({date:e,view:t})=>{if("month"===t){const t=g(),n=new Date(e.getFullYear(),e.getMonth(),e.getDate());if(n>=new Date(t.getFullYear(),t.getMonth(),t.getDate())&&!x(n)){const e=s?new Date(s):null;return e&&n.getFullYear()===e.getFullYear()&&n.getMonth()===e.getMonth()&&n.getDate()===e.getDate()?"active-date":"black-date"}}return null},[g,s,x]);return t.createElement("div",{className:"custom-date-picker"},t.createElement("div",{className:"date-display",onClick:()=>i(!o)},t.createElement("span",{style:{fontSize:"12px"}},(b=s?new Date(s):null)?b.toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}).replace(/\//g,"/"):"Select a date"),t.createElement(A,null)),o&&t.createElement("div",{className:"calendar-container",ref:u},t.createElement(Ld,{onChange:(e,t)=>{e instanceof Date&&!x(e)&&(d(e.toISOString()),i(!1));const n=h(e instanceof Date?e:null);p(e=>e.isDateValid!==n?{...e,isDateValid:n}:e)},value:s?new Date(s):null,className:"custom-calendar",minDate:g(),tileBackgroundColor:e,tileTextColor:n,tileHoverColor:An(e,.2),tileClassName:y,tileDisabled:({date:e,view:t})=>"month"===t&&x(e)})));var b};q(".shipment-container {\n font-family: Arial, sans-serif;\n max-width: 400px;\n padding: 3px;\n padding-bottom: 0;\n background-color: #fff;\n border-radius: 8px;\n margin: 8px 1rem;\n}\n\n.shipment-header {\n background-color: #f6efdd;\n padding: 4px;\n border-radius: 0px;\n margin-bottom: 12px;\n}\n\n.shipment-header-text {\n color: #ae8846;\n font-size: 14px;\n font-weight: 500;\n text-align: center;\n margin: 0;\n line-height: normal;\n}\n\n.shipment-option {\n border: 1px solid #e5e7eb;\n border-radius: 8px;\n padding: 12px;\n margin-bottom: 8px;\n cursor: pointer;\n transition: all 0.3s ease;\n}\n\n.shipment-option:hover {\n background-color: #f9fafb;\n}\n\n.shipment-option.selected {\n border-color: #ae8846;\n border-width: 1 1 0 2 px;\n box-shadow: 0 0 0 1px #ae8846;\n}\n\n.option-content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.option-title {\n font-size: 12px;\n margin-bottom: 4px;\n font-weight: 600;\n}\n\n.option-subtitle {\n color: #6b7280;\n font-size: 10px;\n}\n\n.checkmark {\n color: #ae8846;\n font-size: 20px;\n font-weight: bold;\n}\n\n.availability-check {\n margin-top: 8px;\n}\n\n.availability-title {\n font-size: 12px;\n color: #374151;\n margin-bottom: 3px;\n font-weight: 600;\n}\n\n.availability-input {\n width: 98%;\n padding: 2px;\n border: none;\n border-bottom: 2px solid #d1d5db;\n border-radius: 0;\n font-size: 12px;\n transition: border-color 0.3s ease;\n background: none;\n outline: none;\n font-weight: 500 !important;\n box-shadow: none;\n text-shadow: none;\n}\n\n.availability-input:focus {\n outline: none;\n border-color: #ae8846;\n border: none;\n border-bottom: 2px solid #000000;\n border-radius: 0;\n font-weight: 500 !important;\n box-shadow: none;\n text-shadow: none;\n}\n\n.availability-input:hover {\n outline: none;\n border-color: #ae8846;\n border: none;\n border-bottom: 2px solid #000000;\n border-radius: 0;\n font-weight: 500 !important;\n}\n\n.error-message {\n background-color: #fee2e2;\n color: #b91c1c;\n padding: 6px;\n border-bottom-left-radius: 6px;\n border-bottom-right-radius: 6px;\n font-size: 13px;\n margin-top: 10px;\n display: flex;\n align-items: center;\n margin-bottom: -12px;\n margin-left: -12px;\n margin-right: -12px;\n line-height: normal;\n justify-content: center;\n text-align: center;\n}\n\n.error-icon {\n margin-right: 8px;\n}\n\n.slot {\n width: 98%;\n margin-top: 4px;\n padding: 4px;\n display: flex;\n justify-content: space-between;\n align-items: left;\n flex-direction: column;\n border-bottom: 2px solid #e5e7eb;\n}\n\n.slot:focus {\n outline: none;\n border-color: #ae8846;\n border: none;\n border-bottom: 2px solid #000000;\n border-radius: 0;\n}\n\n.slot:hover {\n outline: none;\n border-color: #ae8846;\n border: none;\n border-bottom: 2px solid #000000;\n border-radius: 0;\n}\n\n.slot-label {\n font-size: 12px;\n margin-bottom: 4px;\n color: #374151;\n margin-left: -4px;\n font-weight: 600;\n}\n\n.success-message {\n background-color: #dcf6ee;\n color: #307d66;\n padding: 6px;\n border-bottom-left-radius: 6px;\n border-bottom-right-radius: 6px;\n font-size: 13px;\n margin-top: 6px;\n display: flex;\n align-items: center;\n margin-bottom: -12px;\n margin-left: -12px;\n margin-right: -12px;\n line-height: normal;\n justify-content: center;\n}");const Vd=({title:e="Cart Item(s) available in NCR only",backgroundColor:n="#F6EFDD78",tag:r="NCR",postalCodeList:i=[110001,110002,110003,110004,110005],themeColor:s,themeTextColor:d,enableSlotPicker:p,deliveryHeaderTitle:u,deliveryAvailableText:m,deliveryNotAvailableText:f,disabledDates:g})=>{const[x,h]=c(!1),[y,b]=un(Go),[v,w]=un(yn),[C,k]=un(vn),E=dn(bn),S=o(null),T=a(e=>{const t=i.includes(e);h(!t),w(e=>({...e,isPostalCodeValid:t}))},[i,w]);return l(()=>{k("specific")},[]),l(()=>{void 0!==y&&T(y)},[y,T]),l(()=>{!1===p&&w(e=>e.isDateValid?e:{...e,isDateValid:!0})},[p,w]),t.createElement("div",null,u&&t.createElement("div",{className:"shipment-header"},t.createElement("h2",{className:"shipment-header-text"},u)),t.createElement("div",{className:"availability-check",style:{border:`2px solid ${s||"black"}`,padding:"12px",borderRadius:"8px",margin:"8px 1rem"}},t.createElement("div",{className:"availability-title"},"Check Shipment Availability"),t.createElement("input",{className:"availability-input",type:"text",placeholder:"Enter Postal Code",value:y||"",onChange:e=>{const t=e.target.value;if(""===t)return b(void 0),h(!1),void w(e=>({...e,isPostalCodeValid:!1}));if(!/^\d+$/.test(t))return;const n=Number(t);b(n),h(!1),w(e=>({...e,isPostalCodeValid:!1})),S.current&&clearTimeout(S.current),S.current=setTimeout(()=>{T(n)},1e3)},onBlur:()=>{S.current&&clearTimeout(S.current),void 0!==y&&T(y)}}),x&&t.createElement("div",{className:"error-message"},f||"Cart items aren't available at your address"),v.isPostalCodeValid&&p&&t.createElement("div",{className:"slot"},t.createElement("label",{className:"slot-label"},"Select Delivery Slot"),t.createElement(jd,{themeColor:s,themeTextColor:d,disabledDates:g})),E&&t.createElement("div",{className:"success-message"},m||"Voila! Local delivery is available")))},Wd=({postalCodeList:e=[110001,110002,110003,110004,110005],themeColor:n,themeTextColor:r,enableSlotPicker:i,disabledDates:s})=>{const[d,p]=c("standard"),[u,m]=c(!1),[f,g]=un(Go),[x,h]=un(yn),[y,b]=un(vn),v=dn(bn),w=o(null),C=a(t=>{const n=e.includes(t);t?(m(!n),h(e=>({...e,isPostalCodeValid:n}))):h(e=>({...e,isPostalCodeValid:!1}))},[e,h]);return l(()=>{b("delhi-ncr"===d?"specific":"standard"),f&&C(f)},[d]),t.createElement("div",{className:"shipment-container"},t.createElement("div",{className:"shipment-header"},t.createElement("p",{className:"shipment-header-text"},"Cart Item(s) are available for standard shipment")),t.createElement("div",{className:"shipment-option "+("standard"===d?"selected":""),onClick:()=>p("standard")},t.createElement("div",{className:"option-content"},t.createElement("div",{className:"option-text"},t.createElement("div",{className:"option-title"},"Pan India"),t.createElement("div",{className:"option-subtitle"},"7-10 days")),"standard"===d&&t.createElement(lt,{className:"checkmark"}))),t.createElement("div",{className:"shipment-option "+("delhi-ncr"===d?"selected":""),onClick:()=>p("delhi-ncr")},t.createElement("div",{className:"option-content"},t.createElement("div",{className:"option-text"},t.createElement("div",{className:"option-title"},"Delhi NCR"),t.createElement("div",{className:"option-subtitle"},"Single day delivery")),"delhi-ncr"===d&&t.createElement(lt,{className:"checkmark"})),"delhi-ncr"===d&&t.createElement("div",{className:"availability-check"},t.createElement("div",{className:"availability-title"},"Check Product Availability"),t.createElement("input",{className:"availability-input",type:"text",placeholder:"Enter Postal Code",value:f,onChange:e=>{const t=e.target.value;if(""===t)return g(void 0),m(!1),void h(e=>({...e,isPostalCodeValid:!1}));if(!/^\d+$/.test(t))return;const n=Number(t);g(n),m(!1),h(e=>({...e,isPostalCodeValid:!1})),w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{C(n)},1e3)},onBlur:()=>{w.current&&clearTimeout(w.current),C(f)}}),u&&t.createElement("div",{className:"error-message"},"Cart items aren't available on your selected pincode for quick shipment"),x.isPostalCodeValid&&i&&t.createElement("div",{className:"slot"},t.createElement("label",{className:"slot-label"},"Pick a Selivery Slot"),t.createElement(jd,{themeColor:n,themeTextColor:r,disabledDates:s})),v&&t.createElement("div",{className:"success-message"},"Voila! Local delivery is available"))))},Hd=hn("gift_wrap",!1);hn("gift_wrap_id","");const qd=h.img`
1901
- width: 24px;
1902
- height: 24px;
1901
+ width: 24px !important;
1902
+ height: 24px !important;
1903
+ min-width: 24px !important;
1904
+ min-height: 24px !important;
1903
1905
  object-fit: cover;
1904
1906
  border-radius: 4px;
1907
+ display: block !important;
1908
+ flex-shrink: 0;
1905
1909
  `,Ud=h.div`
1906
1910
  display: flex;
1907
1911
  flex-direction: column;
@@ -1939,7 +1943,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
1939
1943
  font-size: 12px;
1940
1944
  margin-top: 5px;
1941
1945
  padding: 0 20px;
1942
- `,Xd=e=>{if("string"!=typeof e)return e;const t=e.match(/^gid:\/\/shopify\/\w+\/(\d+)$/);return t?t[1]:e};function Kd({themeColor:e,id:n,showPrice:r,detail:o,errorText:a,customText:i,showGiftIcon:s,showProductImage:d,addCartItem:p,removeCartItem:u}){const[m,f]=un(Hd),[g,x]=c(null),[h,y]=c(!1),[b,v]=c(null),{setLoading:w}=kn();l(()=>{o?.availableForSale&&y(!0),o?.variants?.nodes&&o?.variants?.nodes.length>0&&x(o?.variants?.nodes[0])},[o]);const C=g?.price?.amount,k=g?.image?.url||o?.featuredImage?.url;return console.log("yt::kit gift wrap imageUrl:",k),h?t.createElement(Ud,null,t.createElement(Qd,null,t.createElement(Yd,null,d&&k?t.createElement(qd,{src:k,alt:"Gift wrap",className:"yt-cart-gift-wrap-product-image"}):s?t.createElement(pt,{size:24,color:e,style:{height:"24px",width:"24px"}}):null,i||"+ Gift-Wrap",r?t.createElement("span",{style:{color:e}},"₹",Number(C).toFixed(0)):""),t.createElement(Gd,{type:"checkbox",checked:m,onChange:async()=>{try{w(!0,!0),v(null),f(!m),!m&&p&&g?await p(Xd(g?.id),1):m&&u&&g&&await u(Xd(g?.id),"giftWrap"),w(!1,!1)}catch(e){w(!1,!1),v("Failed to add to cart"),f(m),console.error("Error updating gift wrap:",e)}},$themeColor:e,disabled:!h})),b&&t.createElement(Zd,null,b)):null}const Jd=h.div`
1946
+ `,Xd=e=>{if("string"!=typeof e)return e;const t=e.match(/^gid:\/\/shopify\/\w+\/(\d+)$/);return t?t[1]:e};function Kd({themeColor:e,id:n,showPrice:r,detail:o,errorText:a,customText:i,showGiftIcon:s,showProductImage:d,addCartItem:p,removeCartItem:u}){const[m,f]=un(Hd),[g,x]=c(null),[h,y]=c(!1),[b,v]=c(null),{setLoading:w}=kn();l(()=>{o?.availableForSale&&y(!0),o?.variants?.nodes&&o?.variants?.nodes.length>0&&x(o?.variants?.nodes[0])},[o]);const C=g?.price?.amount,k=g?.image?.url||o?.featuredImage?.url;return h?t.createElement(Ud,null,t.createElement(Qd,null,t.createElement(Yd,null,d&&k?t.createElement(qd,{src:k,alt:"Gift wrap",className:"yt-cart-gift-wrap-product-image"}):s?t.createElement(pt,{size:24,color:e,style:{height:"24px",width:"24px"}}):null,i||"+ Gift-Wrap",r?t.createElement("span",{style:{color:e}},"₹",Number(C).toFixed(0)):""),t.createElement(Gd,{type:"checkbox",checked:m,onChange:async()=>{try{w(!0,!0),v(null),f(!m),!m&&p&&g?await p(Xd(g?.id),1):m&&u&&g&&await u(Xd(g?.id),"giftWrap"),w(!1,!1)}catch(e){w(!1,!1),v("Failed to add to cart"),f(m),console.error("Error updating gift wrap:",e)}},$themeColor:e,disabled:!h})),b&&t.createElement(Zd,null,b)):null}const Jd=h.div`
1943
1947
  margin-top: 10px;
1944
1948
  margin-bottom: 5px;
1945
1949
  margin-left: 1rem;
@@ -2241,7 +2245,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
2241
2245
  font-weight: 400;
2242
2246
  min-width: 14px;
2243
2247
  line-height: 14px;
2244
- `,Pp=({isOpen:e,setIsOpen:n,backgroundColor:r="white",backgroundSubdued:a="#3947821F",tertiaryColor:i="#067D431A",tertiaryTextColor:s="#000000",exploreCTAColor:d,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:k,loyaltyIcon:E,pointsToBeUsed:S,rewardMultiplier:T,redemptionMultiplier:$,discountApplied:B,removeDiscount:z,applyDiscount:I,checkoutFunction:N,joinNowFunction:D,guestLoyaltyPercentage:_,isDev:P,recProductsList:O,showMultiStepProgressBar:F,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:se,showMOVForProgressTiers:de,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:ke,onSetLoading:Ee,showVariantSelectionDropdownInProductRecs:Se,originalCartSubtotal:Te,freebieProductsInCart:$e,showFreebieClaim:Be,addFreebieToCart:ze,freebiesInCart:Ie,effectiveQuantityForProgressBar:Ne,productPercentageOffMapping:De,removeFreebieFromCart:_e,postalCodeList:Pe,enableGeoLocationDeliveryRestriction:Oe=!1,getProductDetailsByVariantId:Fe,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:pt,noteSectionTitle:ut,checkoutSectionMessage:mt,checkoutSectionMessageDisplay:ft,showVariantSelectionDropdownInProductClaim:gt,loyaltyDiscount:ht,brandTokenName:bt,showDiscountOnMRP:vt,switchWidthVariant:wt,prefixMessageText:Ct,suffixMessageText:kt,successMessageText:Et,toggleDecimal:St,cartOffersCarouselHeight:Tt,disableCheckoutButton:$t,showEmptyCartRecommendations:Bt=!1,checkoutButtonBottomSpacing:zt,showPoweredByBadge:It,applyCouponCode:Nt,showApplyCoupon:Dt,enableConfetti:_t,checkoutSectionMessageRedirectLink:Pt,showCheckoutButtonPaymentIcons:Ot})=>{const Ft=dn(mn),At=dn(Cn),[Mt,Rt]=c(!1),[Lt,jt]=c(!1),[Vt,Wt]=c(!0),{setLoading:Ht}=kn();t.useEffect(()=>{Ee&&Ee(Ht)},[Ee]);const qt=o(!1);l(()=>{const t=()=>{n(!1)};return e?(qt.current||window.history.pushState({ytCustomCartDrawer:"open"},""),window.addEventListener("popstate",t),qt.current=!0):(qt.current&&"open"===window.history.state?.ytCustomCartDrawer&&window.history.back(),qt.current=!1),()=>{window.removeEventListener("popstate",t)}},[e,n]);const[Ut,Qt]=c(!1);l(()=>{const t=document.querySelector("body");if(t)return Ze&&Xe?(t.classList.remove("drawer-open"),void t.classList.remove("drawer-closed")):void(Ut?(t.classList.remove("drawer-open"),t.classList.remove("drawer-closed")):e?(t.classList.add("drawer-open"),t.classList.remove("drawer-closed")):(t.classList.remove("drawer-open"),t.classList.add("drawer-closed")))},[e,Ze,Xe,Ut]),l(()=>{function e(){const e=window.innerWidth;Qt(e>=450)}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]);const Yt=Ft?.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[Gt,Zt]=c("normal"),[Xt,Kt]=c("normal"),[Jt,en]=c("auto");l(()=>{CSS.supports("font-weight","500")?Zt("500"):CSS.supports("font-weight","400")?Zt("400"):CSS.supports("font-weight","600")&&Zt("600"),CSS.supports("font-weight","400")?Kt("400"):CSS.supports("font-weight","300")?Kt("300"):CSS.supports("font-weight","200")&&Kt("200"),CSS.supports("width","-webkit-fill-available")?en("-webkit-fill-available"):CSS.supports("width","-moz-available")&&en("-moz-available")},[]),l(()=>{document.documentElement.style.setProperty("--yt-cart-font-weight",Gt),document.documentElement.style.setProperty("--yt-cart-product-rec-price-font-weight",Xt),document.documentElement.style.setProperty("--yt-cart-custom-fill-width",Jt)},[Gt,Xt]);const[tn]=un(yn),[nn]=un(wn),[rn]=un(vn);l(()=>{Wt(!("all-products"!==Ve&&("specific-tags"!==Ve||tn.isPostalCodeValid||We)&&("specific-tags"!==Ve||tn.isPostalCodeValid||nn||!We)&&("specific-tags"===Ve&&"standard"===rn||Lt&&(We?tn.isPostalCodeValid&&nn:tn.isPostalCodeValid))))},[tn.isPostalCodeValid,nn,Lt,Ve,We]),un(En);const[on,an]=c(!0);l(()=>{"true"===localStorage.getItem("cartTimerRanOnce")&&an(!1);const e=localStorage.getItem("cartTimerTimeLeft");e&&parseInt(e,10)<=0&&an(!1)},[]);const ln=new Date("2024-11-01");return zn(Ft?.items_subtotal_price,Ft?.currency),t.createElement(Dp,{className:"yt-cart-drawer",$isDev:P,$isOpen:e,$backgroundColor:r,$enableCustomCartOnCartPage:Ze,$isCartPage:Xe,$isLargeScreen:Ut,$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("span",{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),Ft?.item_count>0&&L&&!(ue&&L)&&R>0&&t.createElement(Ip,{pointsRewardRate:R,loyaltyIcon:E,brandTokenName:bt,themeColor:oe,themeTextColor:ae,rewardMultiplier:T}),Yt>0&&t.createElement(_p,{$backgroundSubdued:a},Yt)),t.createElement("div",{style:{display:"flex",gap:"8px",flexDirection:"row",alignItems:"center"}},!(Ze&&Xe)&&t.createElement("div",{className:"close-button",style:{backgroundColor:a||"#cacaca30"}},t.createElement(yt,{style:{height:"auto",width:"auto",color:X},fontSize:24,cursor:"pointer",onClick:()=>n(!e)})))),At&&t.createElement(Tp,{$themeColor:oe,show:At.showLoader}),ct?.enableCartOffersCarousel&&t.createElement(Cp,{themeColor:oe,cartOffersCarousalData:ct,cartOffersCarouselHeight:Tt,cartData:Ft}),Ke&&on&&Ft?.item_count?t.createElement(tp,{minutes:tt,customText:nt,onTimerComplete:()=>{an(!1),localStorage.setItem("cartTimerRanOnce","true"),localStorage.removeItem("timeLeft"),localStorage.removeItem("lastUpdate")}}):null,Mt&&_t&&t.createElement(oo,{particleCount:50,spread:90,origin:{y:.3}}),ve?t.createElement(Bl,{inlineCartOfferInfoText:ve,inlineCartOfferInfoRedirectLink:we,themeColor:oe,tooltipText:Ce,themeTextColor:ae}):null),F&&Ft?.items_subtotal_price>0&&Ft?.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?.[Xr(r)]&&("minimum_order_value"!==r||1!==e?.[Xr(r)])).some((e,i)=>Kr(e,i,a,o,{currentCartAmount:t,effectiveQuantityForProgressBar:n,customCartProgressBarCriteria:r,checkpoints:a}).progressPercentage>0)}(A,zn(void 0!==Te?Te:Ft?.items_subtotal_price,Ft.currency),void 0===Ne?Ft?.item_count:Ne,Q??"minimum_order_value",Ft?.item_count)&&t.createElement(t.Fragment,null,t.createElement(Oo,{customCartProgressBarCriteria:Q??"minimum_order_value",handleCheckpointCrossed:U,checkpoints:A,effectiveQuantityForProgressBar:void 0===Ne?Ft?.item_count:Ne,currentCartAmount:zn(void 0!==Te?Te:Ft?.items_subtotal_price,Ft.currency),themeColor:oe,themeTextColor:ae,primaryTextColor:X,secondaryTextColor:K,showMOVForProgressTiers:de,progressBarFreeProductIconType:Ge,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,prefixMessageText:Ct,suffixMessageText:kt,successMessageText:Et,enableConfetti:_t})),Ft?.item_count>0&&t.createElement("div",{style:{display:"flex",height:"12px",background:"#87878717"}}),0===Ft?.items?.length&&0===Ft?.item_count&&!1===At?.showSkeletonLoader?t.createElement(jo,{showLoyaltyCta:ue,joinNowFunction:D,emptyCartTitle:m,emptyCartDescription:f,exploreCTAColor:d,isUserSignedIn:v,exploreCtaRedirectLink:j,themeColor:oe,emptyCartButtons:g,cartComponentsCornerRadius:lt,cartComponentsCornerType:it,themeTextColor:ae,recProductsList:O,addCartItem:b,productRecsCtaButtonText:J,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,primaryTextColor:X,secondaryTextColor:K,showVariantSelectionDropdownInProductRecs:Se,emptyProductRecsTitleText:te,backgroundSubdued:a,showEmptyCartRecommendations:Bt,tertiaryColor:i,tertiaryTextColor:s}):t.createElement("div",{style:{display:"flex",flexDirection:"column",overflowY:"auto",flex:1,overflowX:"hidden",height:"100%",scrollbarWidth:"none"}},t.createElement(ai,{isDev:P,themeColor:oe,handleDecrement:y,handleIncrement:h,removeCartItem:x,addCartItem:b,primaryTextColor:X,secondaryTextColor:K,freeProduct:pe,themeTextColor:ae,showEditOptionOnProducts:ke,productPercentageOffMapping:De,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:s,backgroundColor:r,showDiscountOnMRP:vt,checkoutSectionMessage:mt,checkoutSectionMessageRedirectLink:Pt,showFreebieMilestone:Je,freebieMilestoneData:et}),Ut&&ne&&!!O&&O?.length>0&&Ft?.item_count>0&&b&&t.createElement(Nr,{addCartItem:b,products:O,productRecsCtaButtonText:J,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,productRecsTitleText:ee,themeColor:oe,primaryTextColor:X,secondaryTextColor:K,showVariantSelectionDropdownInProductRecs:Se,cardLayout:rt,variant:ot,cartComponentsCornerType:it,cartComponentsCornerRadius:lt,backgroundSubdued:a,backgroundColor:r,tertiaryColor:i,tertiaryTextColor:s}),!Ut&&re&&!!O&&O?.length>0&&Ft?.item_count>0&&b&&t.createElement(Nr,{addCartItem:b,products:O,productRecsCtaButtonText:J,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,productRecsTitleText:ee,themeColor:oe,primaryTextColor:X,secondaryTextColor:K,showVariantSelectionDropdownInProductRecs:Se,cardLayout:rt,variant:ot,cartComponentsCornerRadius:lt,cartComponentsCornerType:it,backgroundSubdued:a,tertiaryColor:i,tertiaryTextColor:s})),t.createElement(ra,null,Ft?.item_count>0&&w&&C&&t.createElement(li,{bundleProducts:C}),ce&&!!se&&Ft?.item_count>0&&t.createElement(vi,{companyName:ie,gstNumber:le,themeColor:oe,iconColor:pt?.iconColor,showIcon:pt?.showIcon,backgroundColor:pt?.backgroundColor,textColor:pt?.textColor,title:pt?.title}),!!Ft&&Ft?.item_count>0&&!!ze&&!!$e&&!!Ie&&$e.length>0&&t.createElement($l,{freebieProductsInCart:$e,themeColor:oe,themeTextColor:ae,primaryTextColor:X,addFreebieToCart:ze,freebiesInCart:Ie,imageAspectSelector:at,freebieCouponTemplates:Re,freebieClaimData:je,cartCheckpoints:A,isCartDrawerOpen:e}),Oe&&(Pe?.length??0)>0&&!!Ae&&Ft?.item_count>0&&t.createElement("div",{className:"form-group"},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(xt,null)),t.createElement("div",{className:"icon-transition"},Vt?t.createElement(st,null):t.createElement(dt,null))),"all-products"===Ve&&Vt?t.createElement(Vd,{postalCodeList:Pe,themeColor:oe,themeTextColor:ae,enableSlotPicker:We,deliveryHeaderTitle:He,deliveryAvailableText:qe,deliveryNotAvailableText:Ue,disabledDates:ln}):Vt&&(Lt?t.createElement(Vd,{postalCodeList:Pe,themeColor:oe,themeTextColor:ae,enableSlotPicker:We,deliveryHeaderTitle:He,deliveryAvailableText:qe,deliveryNotAvailableText:Ue,disabledDates:ln}):t.createElement(Wd,{postalCodeList:Pe,themeColor:oe,themeTextColor:ae,enableSlotPicker:We,disabledDates:ln}))),be&&!!he&&Ft?.item_count>0&&t.createElement(wi,{note:ye,noteSectionTitle:ut}),Qe?.showGiftWrapOption&&Ft?.item_count>0&&t.createElement(Kd,{themeColor:oe,id:Qe?.giftProductId,detail:Ye,showPrice:Qe?.showPrice,errorText:Qe?.errorText,customText:Qe?.customText,showGiftIcon:Qe?.showGiftIcon,addCartItem:b,removeCartItem:x}),Ft?.item_count>0&&Dt&&!ue&&Nt&&t.createElement(Np,{backgroundSubdued:a,themeColor:oe,themeTextColor:ae,primaryTextColor:X,cartComponentsCornerRadius:lt,applyCouponCode:Nt,removeDiscount:z,enableConfetti:_t}),Ft?.item_count>0&&t.createElement(t.Fragment,null,v||!ue||ht?!ht&&void 0!==k&&void 0!==S&&!!E&&ue&&!!I&&t.createElement(va,{themeColor:oe,applyDiscount:I,discountAmountOff:k,loyaltyIcon:E,pointsToBeUsed:S,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,primaryTextColor:X,secondaryTextColor:K,minimumOrderValueToAvailDiscount:fe,brandTokenName:bt,showCartLevelAltPay:L,redemptionMultiplier:$}):!!_&&!!D&&t.createElement(ta,{cartSigninCTAMainText:xe,signinCTAButtonVisible:ge,themeColor:oe,joinNowFunction:D,guestLoyaltyPercentage:_,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,primaryTextColor:X,secondaryTextColor:K,cartComponentsCornerRadius:lt,cartComponentsCornerType:it,showCartLevelAltPay:L})),Ft?.item_count>0&&!!ht&&!!z&&ue&&ht&&void 0!==S&&t.createElement(xa,{themeColor:oe,removeDiscount:z,loyaltyDiscount:ht,isDev:P,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,primaryTextColor:X,secondaryTextColor:K,pointsToBeUsed:S,brandTokenName:bt,showCartLevelAltPay:L}),ue&&L&&M&&E&&Ft?.item_count>0&&t.createElement(Bp,{loyaltyIcon:E,backgroundSubdued:a,primaryTextColor:X,pointsRewardRate:R,rewardMultiplier:T}),ue&&Ft&&Ft.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 ",bt,":"," ",fe),Ft&&N&&Ft?.item_count>0&&t.createElement("div",null,t.createElement(Zo,{disableCheckoutButton:!!$t||At.cartLoading,discountApplied:B,checkoutFunction:N,checkoutButtonColor:Y,checkoutFontSize:p,discountInCheckoutButton:H,isStickyCheckout:q,discountAmountApplied:V,minimumCartValue:W,themeTextColor:ae,applyGSTToCart:se,showGSTOption:ce,applyNoteToCart:he,showNoteOption:be,enableGeoLocationDeliveryRestriction:Oe,applyPostalCodeAndDeliverySlotToCart:Ae,enableSlotPicker:We,cartComponentsCornerRadius:lt,cartComponentsCornerType:it,checkoutSectionMessage:mt,checkoutSectionMessageDisplay:ft,checkoutSectionMessageRedirectLink:Pt,showDiscountOnMRP:vt,tertiaryColor:i,tertiaryTextColor:s,cartCheckpoints:A,toggleDecimal:St,checkoutButtonBottomSpacing:zt,showPoweredByBadge:It,showCheckoutButtonPaymentIcons:Ot,primaryTextColor:X}))))))},Op=h.div`
2248
+ `,Pp=({isOpen:e,setIsOpen:n,backgroundColor:r="white",backgroundSubdued:a="#3947821F",tertiaryColor:i="#067D431A",tertiaryTextColor:s="#000000",exploreCTAColor:d,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:k,loyaltyIcon:E,pointsToBeUsed:S,rewardMultiplier:T,redemptionMultiplier:$,discountApplied:B,removeDiscount:z,applyDiscount:I,checkoutFunction:N,joinNowFunction:D,guestLoyaltyPercentage:_,isDev:P,recProductsList:O,showMultiStepProgressBar:F,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:se,showMOVForProgressTiers:de,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:ke,onSetLoading:Ee,showVariantSelectionDropdownInProductRecs:Se,originalCartSubtotal:Te,freebieProductsInCart:$e,showFreebieClaim:Be,addFreebieToCart:ze,freebiesInCart:Ie,effectiveQuantityForProgressBar:Ne,productPercentageOffMapping:De,removeFreebieFromCart:_e,postalCodeList:Pe,enableGeoLocationDeliveryRestriction:Oe=!1,getProductDetailsByVariantId:Fe,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:pt,noteSectionTitle:ut,checkoutSectionMessage:mt,checkoutSectionMessageDisplay:ft,showVariantSelectionDropdownInProductClaim:gt,loyaltyDiscount:ht,brandTokenName:bt,showDiscountOnMRP:vt,switchWidthVariant:wt,prefixMessageText:Ct,suffixMessageText:kt,successMessageText:Et,toggleDecimal:St,cartOffersCarouselHeight:Tt,disableCheckoutButton:$t,showEmptyCartRecommendations:Bt=!1,checkoutButtonBottomSpacing:zt,showPoweredByBadge:It,applyCouponCode:Nt,showApplyCoupon:Dt,enableConfetti:_t,checkoutSectionMessageRedirectLink:Pt,showCheckoutButtonPaymentIcons:Ot})=>{const Ft=dn(mn),At=dn(Cn),[Mt,Rt]=c(!1),[Lt,jt]=c(!1),[Vt,Wt]=c(!0),{setLoading:Ht}=kn();t.useEffect(()=>{Ee&&Ee(Ht)},[Ee]);const qt=o(!1);l(()=>{const t=()=>{n(!1)};return e?(qt.current||window.history.pushState({ytCustomCartDrawer:"open"},""),window.addEventListener("popstate",t),qt.current=!0):(qt.current&&"open"===window.history.state?.ytCustomCartDrawer&&window.history.back(),qt.current=!1),()=>{window.removeEventListener("popstate",t)}},[e,n]);const[Ut,Qt]=c(!1);l(()=>{const t=document.querySelector("body");if(t)return Ze&&Xe?(t.classList.remove("drawer-open"),void t.classList.remove("drawer-closed")):void(Ut?(t.classList.remove("drawer-open"),t.classList.remove("drawer-closed")):e?(t.classList.add("drawer-open"),t.classList.remove("drawer-closed")):(t.classList.remove("drawer-open"),t.classList.add("drawer-closed")))},[e,Ze,Xe,Ut]),l(()=>{function e(){const e=window.innerWidth;Qt(e>=450)}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]);const Yt=Ft?.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[Gt,Zt]=c("normal"),[Xt,Kt]=c("normal"),[Jt,en]=c("auto");l(()=>{CSS.supports("font-weight","500")?Zt("500"):CSS.supports("font-weight","400")?Zt("400"):CSS.supports("font-weight","600")&&Zt("600"),CSS.supports("font-weight","400")?Kt("400"):CSS.supports("font-weight","300")?Kt("300"):CSS.supports("font-weight","200")&&Kt("200"),CSS.supports("width","-webkit-fill-available")?en("-webkit-fill-available"):CSS.supports("width","-moz-available")&&en("-moz-available")},[]),l(()=>{document.documentElement.style.setProperty("--yt-cart-font-weight",Gt),document.documentElement.style.setProperty("--yt-cart-product-rec-price-font-weight",Xt),document.documentElement.style.setProperty("--yt-cart-custom-fill-width",Jt)},[Gt,Xt]);const[tn]=un(yn),[nn]=un(wn),[rn]=un(vn);l(()=>{Wt(!("all-products"!==Ve&&("specific-tags"!==Ve||tn.isPostalCodeValid||We)&&("specific-tags"!==Ve||tn.isPostalCodeValid||nn||!We)&&("specific-tags"===Ve&&"standard"===rn||Lt&&(We?tn.isPostalCodeValid&&nn:tn.isPostalCodeValid))))},[tn.isPostalCodeValid,nn,Lt,Ve,We]),un(En);const[on,an]=c(!0);l(()=>{"true"===localStorage.getItem("cartTimerRanOnce")&&an(!1);const e=localStorage.getItem("cartTimerTimeLeft");e&&parseInt(e,10)<=0&&an(!1)},[]);const ln=new Date("2024-11-01");return zn(Ft?.items_subtotal_price,Ft?.currency),t.createElement(Dp,{className:"yt-cart-drawer",$isDev:P,$isOpen:e,$backgroundColor:r,$enableCustomCartOnCartPage:Ze,$isCartPage:Xe,$isLargeScreen:Ut,$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("span",{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),Ft?.item_count>0&&L&&!(ue&&L)&&R>0&&t.createElement(Ip,{pointsRewardRate:R,loyaltyIcon:E,brandTokenName:bt,themeColor:oe,themeTextColor:ae,rewardMultiplier:T}),Yt>0&&t.createElement(_p,{$backgroundSubdued:a},Yt)),t.createElement("div",{style:{display:"flex",gap:"8px",flexDirection:"row",alignItems:"center"}},!(Ze&&Xe)&&t.createElement("div",{className:"close-button",style:{backgroundColor:a||"#cacaca30"}},t.createElement(yt,{style:{height:"auto",width:"auto",color:X},fontSize:24,cursor:"pointer",onClick:()=>n(!e)})))),At&&t.createElement(Tp,{$themeColor:oe,show:At.showLoader}),ct?.enableCartOffersCarousel&&t.createElement(Cp,{themeColor:oe,cartOffersCarousalData:ct,cartOffersCarouselHeight:Tt,cartData:Ft}),Ke&&on&&Ft?.item_count?t.createElement(tp,{minutes:tt,customText:nt,onTimerComplete:()=>{an(!1),localStorage.setItem("cartTimerRanOnce","true"),localStorage.removeItem("timeLeft"),localStorage.removeItem("lastUpdate")}}):null,Mt&&_t&&t.createElement(oo,{particleCount:50,spread:90,origin:{y:.3}}),ve?t.createElement(Bl,{inlineCartOfferInfoText:ve,inlineCartOfferInfoRedirectLink:we,themeColor:oe,tooltipText:Ce,themeTextColor:ae}):null),F&&Ft?.items_subtotal_price>0&&Ft?.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?.[Xr(r)]&&("minimum_order_value"!==r||1!==e?.[Xr(r)])).some((e,i)=>Kr(e,i,a,o,{currentCartAmount:t,effectiveQuantityForProgressBar:n,customCartProgressBarCriteria:r,checkpoints:a}).progressPercentage>0)}(A,zn(void 0!==Te?Te:Ft?.items_subtotal_price,Ft.currency),void 0===Ne?Ft?.item_count:Ne,Q??"minimum_order_value",Ft?.item_count)&&t.createElement(t.Fragment,null,t.createElement(Oo,{customCartProgressBarCriteria:Q??"minimum_order_value",handleCheckpointCrossed:U,checkpoints:A,effectiveQuantityForProgressBar:void 0===Ne?Ft?.item_count:Ne,currentCartAmount:zn(void 0!==Te?Te:Ft?.items_subtotal_price,Ft.currency),themeColor:oe,themeTextColor:ae,primaryTextColor:X,secondaryTextColor:K,showMOVForProgressTiers:de,progressBarFreeProductIconType:Ge,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,prefixMessageText:Ct,suffixMessageText:kt,successMessageText:Et,enableConfetti:_t})),Ft?.item_count>0&&t.createElement("div",{style:{display:"flex",height:"12px",background:"#87878717"}}),0===Ft?.items?.length&&0===Ft?.item_count&&!1===At?.showSkeletonLoader?t.createElement(jo,{showLoyaltyCta:ue,joinNowFunction:D,emptyCartTitle:m,emptyCartDescription:f,exploreCTAColor:d,isUserSignedIn:v,exploreCtaRedirectLink:j,themeColor:oe,emptyCartButtons:g,cartComponentsCornerRadius:lt,cartComponentsCornerType:it,themeTextColor:ae,recProductsList:O,addCartItem:b,productRecsCtaButtonText:J,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,primaryTextColor:X,secondaryTextColor:K,showVariantSelectionDropdownInProductRecs:Se,emptyProductRecsTitleText:te,backgroundSubdued:a,showEmptyCartRecommendations:Bt,tertiaryColor:i,tertiaryTextColor:s}):t.createElement("div",{style:{display:"flex",flexDirection:"column",overflowY:"auto",flex:1,overflowX:"hidden",height:"100%",scrollbarWidth:"none"}},t.createElement(ai,{isDev:P,themeColor:oe,handleDecrement:y,handleIncrement:h,removeCartItem:x,addCartItem:b,primaryTextColor:X,secondaryTextColor:K,freeProduct:pe,themeTextColor:ae,showEditOptionOnProducts:ke,productPercentageOffMapping:De,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:s,backgroundColor:r,showDiscountOnMRP:vt,checkoutSectionMessage:mt,checkoutSectionMessageRedirectLink:Pt,showFreebieMilestone:Je,freebieMilestoneData:et}),Ut&&ne&&!!O&&O?.length>0&&Ft?.item_count>0&&b&&t.createElement(Nr,{addCartItem:b,products:O,productRecsCtaButtonText:J,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,productRecsTitleText:ee,themeColor:oe,primaryTextColor:X,secondaryTextColor:K,showVariantSelectionDropdownInProductRecs:Se,cardLayout:rt,variant:ot,cartComponentsCornerType:it,cartComponentsCornerRadius:lt,backgroundSubdued:a,backgroundColor:r,tertiaryColor:i,tertiaryTextColor:s}),!Ut&&re&&!!O&&O?.length>0&&Ft?.item_count>0&&b&&t.createElement(Nr,{addCartItem:b,products:O,productRecsCtaButtonText:J,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,productRecsTitleText:ee,themeColor:oe,primaryTextColor:X,secondaryTextColor:K,showVariantSelectionDropdownInProductRecs:Se,cardLayout:rt,variant:ot,cartComponentsCornerRadius:lt,cartComponentsCornerType:it,backgroundSubdued:a,tertiaryColor:i,tertiaryTextColor:s})),t.createElement(ra,null,Ft?.item_count>0&&w&&C&&t.createElement(li,{bundleProducts:C}),ce&&!!se&&Ft?.item_count>0&&t.createElement(vi,{companyName:ie,gstNumber:le,themeColor:oe,iconColor:pt?.iconColor,showIcon:pt?.showIcon,backgroundColor:pt?.backgroundColor,textColor:pt?.textColor,title:pt?.title}),!!Ft&&Ft?.item_count>0&&!!ze&&!!$e&&!!Ie&&$e.length>0&&t.createElement($l,{freebieProductsInCart:$e,themeColor:oe,themeTextColor:ae,primaryTextColor:X,addFreebieToCart:ze,freebiesInCart:Ie,imageAspectSelector:at,freebieCouponTemplates:Re,freebieClaimData:je,cartCheckpoints:A,isCartDrawerOpen:e}),Oe&&(Pe?.length??0)>0&&!!Ae&&Ft?.item_count>0&&t.createElement("div",{className:"form-group"},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(xt,null)),t.createElement("div",{className:"icon-transition"},Vt?t.createElement(st,null):t.createElement(dt,null))),"all-products"===Ve&&Vt?t.createElement(Vd,{postalCodeList:Pe,themeColor:oe,themeTextColor:ae,enableSlotPicker:We,deliveryHeaderTitle:He,deliveryAvailableText:qe,deliveryNotAvailableText:Ue,disabledDates:ln}):Vt&&(Lt?t.createElement(Vd,{postalCodeList:Pe,themeColor:oe,themeTextColor:ae,enableSlotPicker:We,deliveryHeaderTitle:He,deliveryAvailableText:qe,deliveryNotAvailableText:Ue,disabledDates:ln}):t.createElement(Wd,{postalCodeList:Pe,themeColor:oe,themeTextColor:ae,enableSlotPicker:We,disabledDates:ln}))),be&&!!he&&Ft?.item_count>0&&t.createElement(wi,{note:ye,noteSectionTitle:ut}),Qe?.showGiftWrapOption&&Ft?.item_count>0&&t.createElement(Kd,{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}),Ft?.item_count>0&&Dt&&!ue&&Nt&&t.createElement(Np,{backgroundSubdued:a,themeColor:oe,themeTextColor:ae,primaryTextColor:X,cartComponentsCornerRadius:lt,applyCouponCode:Nt,removeDiscount:z,enableConfetti:_t}),Ft?.item_count>0&&t.createElement(t.Fragment,null,v||!ue||ht?!ht&&void 0!==k&&void 0!==S&&!!E&&ue&&!!I&&t.createElement(va,{themeColor:oe,applyDiscount:I,discountAmountOff:k,loyaltyIcon:E,pointsToBeUsed:S,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,primaryTextColor:X,secondaryTextColor:K,minimumOrderValueToAvailDiscount:fe,brandTokenName:bt,showCartLevelAltPay:L,redemptionMultiplier:$}):!!_&&!!D&&t.createElement(ta,{cartSigninCTAMainText:xe,signinCTAButtonVisible:ge,themeColor:oe,joinNowFunction:D,guestLoyaltyPercentage:_,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,primaryTextColor:X,secondaryTextColor:K,cartComponentsCornerRadius:lt,cartComponentsCornerType:it,showCartLevelAltPay:L})),Ft?.item_count>0&&!!ht&&!!z&&ue&&ht&&void 0!==S&&t.createElement(xa,{themeColor:oe,removeDiscount:z,loyaltyDiscount:ht,isDev:P,ctaButtonBackgroundColor:G,ctaButtonTextColor:Z,primaryTextColor:X,secondaryTextColor:K,pointsToBeUsed:S,brandTokenName:bt,showCartLevelAltPay:L}),ue&&L&&M&&E&&Ft?.item_count>0&&t.createElement(Bp,{loyaltyIcon:E,backgroundSubdued:a,primaryTextColor:X,pointsRewardRate:R,rewardMultiplier:T}),ue&&Ft&&Ft.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 ",bt,":"," ",fe),Ft&&N&&Ft?.item_count>0&&t.createElement("div",null,t.createElement(Zo,{disableCheckoutButton:!!$t||At.cartLoading,discountApplied:B,checkoutFunction:N,checkoutButtonColor:Y,checkoutFontSize:p,discountInCheckoutButton:H,isStickyCheckout:q,discountAmountApplied:V,minimumCartValue:W,themeTextColor:ae,applyGSTToCart:se,showGSTOption:ce,applyNoteToCart:he,showNoteOption:be,enableGeoLocationDeliveryRestriction:Oe,applyPostalCodeAndDeliverySlotToCart:Ae,enableSlotPicker:We,cartComponentsCornerRadius:lt,cartComponentsCornerType:it,checkoutSectionMessage:mt,checkoutSectionMessageDisplay:ft,checkoutSectionMessageRedirectLink:Pt,showDiscountOnMRP:vt,tertiaryColor:i,tertiaryTextColor:s,cartCheckpoints:A,toggleDecimal:St,checkoutButtonBottomSpacing:zt,showPoweredByBadge:It,showCheckoutButtonPaymentIcons:Ot,primaryTextColor:X}))))))},Op=h.div`
2245
2249
  position: relative;
2246
2250
  `,Fp=h.button`
2247
2251
  border: 1px solid #ccc;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yt-uikit",
3
- "version": "0.8.23-gift-wrap-product-image.1",
3
+ "version": "0.8.23-gift-wrap-product-image.3",
4
4
  "description": "YourToken UI Kit",
5
5
  "scripts": {
6
6
  "rollup": "tsc && rollup -c",