whatmore-react-assets 1.0.899 → 1.0.900

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whatmore-react-assets",
3
- "version": "1.0.899",
3
+ "version": "1.0.900",
4
4
  "description": "public repo for all whatmore js and css assets",
5
5
  "main": "whatmore.js",
6
6
  "scripts": {
@@ -69,7 +69,7 @@
69
69
  0% {
70
70
  transform: translateY(100%);
71
71
  }
72
- `} 0.5s`;return(0,x.jsx)(s.Kq,{bg:"black",height:"100%",opacity:"100%",width:"100%",borderTopRadius:"xl",animation:w,justifyContent:"center",alignItems:"center",children:(0,x.jsxs)(s.xu,{width:"100%",height:"100%",children:[(0,x.jsx)(g.Ee,{width:"100%",height:"auto",src:(0,c.Zb8)(a)?d:(0,c.KM)(a),objectFit:"contain",borderTopRadius:"xl"}),(0,x.jsx)(s.Kq,{width:"100%",height:"100%",direction:"column",justifyContent:"flex-start",style:{position:"relative",zIndex:1,bottom:"90%"},className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",onClick:t=>{t.stopPropagation(),m(!1)},cursor:"pointer",padding:"4px",children:(0,x.jsx)(P.Z,{sx:{boxShadow:3,color:"white !important",fontSize:1.6*f,filter:"drop-shadow(0 0 5px black);"}})})})]})})}var zt=n(5630),Rt=(n(1332),n(6665));function Mt(t){var e;const[n,i]=(0,r.useState)(null),o=t.product;return(0,r.useEffect)((()=>{(0,lt.bN)(o).then((t=>{i(t.variants)}))}),[]),null==n?(0,x.jsx)(x.Fragment,{}):(0,x.jsx)("div",{style:{width:null!==(e=t.width)&&void 0!==e?e:"100%",borderRadius:"6px",height:1.5*t.height,backgroundColor:"white"},children:(0,x.jsxs)("form",{method:"post",action:"/cart/add","accept-charset":"UTF-8",class:"shopify-product-form",enctype:"multipart/form-data",is:"product-form",children:[(0,x.jsx)("input",{type:"hidden",name:"form_type",value:"product"}),(0,x.jsx)("input",{type:"hidden",name:"utf8",value:"\u2713"}),(0,x.jsx)("input",{type:"hidden",name:"id",value:t.variantId}),(0,x.jsx)("input",{type:"hidden",value:t.product.product_link,name:"productUrl"}),(0,x.jsx)("div",{class:"shiprocket-headless","data-type":"product"}),(0,x.jsx)("textarea",{"data-variant-json":"",class:"hide","aria-hidden":"true","aria-label":"Product JSON",children:JSON.stringify(n).toString()})]})})}function Dt(t){const e=t.product;return(0,x.jsx)(Mt,{product:e,variantId:t.variantId,height:t.height,width:t.width})}function Kt(t){var e,n;const[i]=(0,u.j1)("isInDesignMode"),[o]=(0,u.j1)("isDemoBrand"),[l]=(0,u.j1)("whatmoreShopId"),[a]=(0,u.j1)("whatmorePrimaryFont"),[h]=(0,u.j1)("whatmoreSecondaryColor"),{whatmoreUITheme:p}=(0,r.useContext)(V.I),{whatmoreWidgetSourceDetails:v,whatmoreUserInfo:m}=(0,r.useContext)(V.I),[g,f]=(0,r.useState)(!1),{closeClickComponent:w}=(0,r.useContext)(ln),[j,y]=(0,r.useState)(!1),C=t.FONT_SIZE,S=t.data,b=t.event,k=t.selectedVariantId,_=t.product,F=t.itemQuantity,T=t.PRODUCT_TILE_WIDTH,E=t.cartItemCount,P=t.addToCartFlag,O=t.setAddToCartFlag,L=t.soldOutFlag,z=t.setSoldOutFlag,R=v.landingLocationType,M=v.templateType,D=(0,mt.NY)(R)+(0,mt.dS)(M)+"_"+(null===b||void 0===b?void 0:b.event_id);const K=t=>{var e,n;(function(t,e){i||o||(async()=>{(0,d.$L)(t,e)})()}(b,_),"buy-now"==t)&&(!function(t,e,n,i,o,r,l){"shopify"==n?(0,lt.bj)(t,e,i,o,r,l):(0,rt.rY)(t,e,i)}(void 0!==k?k:null===S||void 0===S||null===(e=S.variants)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.id,F,(0,c.Ipo)(l),l,D,null===b||void 0===b?void 0:b.location,null===m||void 0===m?void 0:m.userType),(0,q.GF)({userInteractionType:H.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:v,event:b,productList:[_],ctaList:b.cta}));"view-more"==t&&((0,c.lj5)(l)?window.location.href=_.product_link+"?"+(0,c.awP)(l)+"&"+(0,c.n9s)(l)+"&"+(0,c.vaK)(l)+((0,c.C0m)(l)?"&currency="+_.currency:""):window.location.href=_.product_link+((0,c.C0m)(l)?"?currency="+_.currency:""))};return(0,x.jsxs)(s.Kq,{boxShadow:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.2) 0px 4px 6px -2px",position:t.position,bg:"27951333450"==l?"#fff":"#D3D3D3",borderRadius:"10px",bottom:"10px",left:"50%",zIndex:"1",transform:"translateX(-50%)",direction:"row",width:"95%",paddingX:"20px",paddingTop:"15px",paddingBottom:"15px",spacing:"15px",fontSize:.9*C,children:[" ",L?(0,x.jsx)(J.zx,{width:"90%",bg:"#252324",variant:"outline",opacity:4,_hover:{bg:"#252324"},height:2.5*C,disabled:!0,sx:{borderRadius:"round"==p?"5px":"0px",borderWidth:(0,c.alU)(l),borderColor:(0,c.qPe)(l)},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:"white !important",fontFamily:a+" !important"},children:"Sold Out"})}):(0,x.jsxs)(s.Kq,{direction:"vertical"==(0,c.rc3)(l)?"column":"row",width:"100%",spacing:"15px",fontSize:.9*C,justifyContent:"center",children:[(0,c.$bv)(l)?(0,x.jsx)(J.zx,{width:"90%",height:2.5*C,onClick:async t=>{var e,n,r;if(t.stopPropagation(),f(!0),function(t,e,n){i||o||(async()=>{(0,d.JX)(t,e,n)})()}(b,_,F),(0,q.GF)({userInteractionType:H.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:v,event:b,productList:[_],ctaList:b.cta}),void 0===k)return void console.log("ERROR ! Select the option.");const a=void 0!==k?k:null===S||void 0===S||null===(e=S.variants)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.id;null===(r=S.variants.filter((t=>t.id==a)))||void 0===r||r.price;st(a,F,(0,c.Ipo)(l),l,b,_,D,null===b||void 0===b?void 0:b.location,null===m||void 0===m?void 0:m.userType).then((t=>{if(!t.ok)throw new Error(t.status);return f(!1),O(!0),t.json()})).then((t=>((0,u.bU)("whatmoreAddedToCart",!0),(0,c.kad)(l)&&(i||(async()=>{await(0,lt.Mj)().then((t=>t.json())).catch((t=>{console.error("Whatmore :: Error while fetching cart_token for initiateOrderTrackingEvent.",t)}))})()),t))).catch((t=>{f(!1),z(!0),console.error("Error:",t)}))},sx:{paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:"#343434"===(0,c.FdS)(l)?h+" !important":(0,c.FdS)(l)+" !important",borderRadius:"round"==p?"27951333450"==l?"50px":"5px":"0px",borderWidth:(0,c.p5R)(l),borderColor:"#343434"===(0,c.yxc)(l)?h:(0,c.yxc)(l),_hover:{backgroundColor:"transparent !important",borderWidth:(0,c.p5R)(l),borderColor:"#343434"===(0,c.yxc)(l)?h:(0,c.yxc)(l)}},children:g?(0,x.jsx)(zt.$,{display:"flex !important",color:"white"}):(0,x.jsx)(s.xv,{fontWeight:"extrabold !important",sx:{color:(0,c.eSJ)(l)+" !important",fontFamily:a+" !important"},fontSize:C+"px !important",children:(0,c.tan)(l)})}):(0,x.jsx)(x.Fragment,{}),(0,c.cDD)(l)?(0,x.jsx)(x.Fragment,{children:(0,c.H$w)(l)?(0,x.jsx)(Dt,{variantId:void 0!==k?k:null===S||void 0===S||null===(e=S.variants)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.id,product:_,height:2.5*C,width:"90%",fontSize:C,fontFamily:a}):(0,x.jsx)(x.Fragment,{children:(0,c.Stj)(l)?(0,x.jsx)(J.zx,{width:"90%",variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*C,onClick:()=>K("view-more"),sx:{backgroundColor:(0,c.IIW)(l)+" !important",borderRadius:"round"==p?"27951333450"==l?"50px":"5px":"0px",borderWidth:(0,c.alU)(l),borderColor:(0,c.qPe)(l)},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:"#343434"===(0,c.iKW)(l)?h+" !important":(0,c.iKW)(l)+" !important",fontFamily:a+" !important"},fontSize:C,children:(0,c.Z59)(l)})}):(0,x.jsx)(J.zx,{width:"90%",variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*C,onClick:t=>{K("buy-now")},sx:{backgroundColor:(0,c.IIW)(l)+" !important",borderRadius:"round"==p?"27951333450"==l?"50px":"5px":"0px",borderWidth:(0,c.p5R)(l),borderColor:"#343434"===(0,c.yxc)(l)?h:(0,c.yxc)(l),_hover:{backgroundColor:"transparent !important"}},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold !important",sx:{color:"#343434"===(0,c.iKW)(l)?h+" !important":(0,c.iKW)(l)+" !important",fontFamily:a+" !important"},fontSize:C+"px !important",children:(0,c.ZuH)(l)})})})}):(0,x.jsx)(x.Fragment,{})]}),(0,x.jsx)(x.Fragment,{children:(0,c.$bv)(l)?(0,x.jsx)(x.Fragment,{children:j?(0,x.jsx)(s.kC,{width:"10%",spacing:"0",right:0,children:(0,x.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,x.jsx)(Rt.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*C}})})}):(0,x.jsxs)(s.kC,{animation:P?I:"none",onAnimationEnd:()=>O(!1),width:"10%",spacing:"0",right:0,onClick:()=>{"do_nothing"!==(0,c.v9M)(l)&&("go_to_cart_page"!==(0,c.v9M)(l)?(y(!0),function(t){"open_cart_slider"!==(0,c.v9M)(t)||null!==w&&w()}(l)):ct((0,c.Ipo)(l),l))},cursor:"pointer",children:[(0,x.jsx)(G.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*C}}),E>0?(0,x.jsx)(s.Cd,{padding:"2px",bg:"white",size:1.1*C,top:.03*-T,verticalAlign:"top",position:"relative",left:.11*-T,zIndex:"1",children:(0,x.jsx)(s.xv,{sx:{color:"black !important",fontFamily:a+" !important"},fontWeight:"bold !important",fontSize:.7*C+"px !important",children:E})}):(0,x.jsx)(x.Fragment,{})]})}):(0,x.jsx)(x.Fragment,{})})]})}function At(t){const[e]=(0,u.j1)("whatmorePrimaryFont"),n=((0,u.MO)("whatmoreShopId"),t.setOpenShopNow),i=t.FONT_SIZE,o=t.setLockSwiper;return(0,x.jsxs)(s.kC,{justifyContent:"center",paddingTop:"10px",paddingBottom:"8px",width:"100%",children:[(0,x.jsx)(s.kC,{width:"10%",display:"flex !important"}),(0,x.jsx)(s.kC,{width:"90%",justifyContent:"center",children:(0,x.jsx)(s.xv,{align:"center",fontSize:1.25*i,fontWeight:"semibold",sx:{color:"black !important",fontFamily:e+" !important"},as:"b",children:"Shop Now"})}),(0,x.jsx)(s.kC,{justifyContent:"center",width:"10%",alignItems:"center",onClick:t=>{t.stopPropagation(),n(!1),o(!1)},cursor:"pointer",children:(0,x.jsx)(P.Z,{sx:{boxShadow:3,color:"black !important",fontSize:1.2*i,filter:"drop-shadow(0 0 5px black);"}})})]})}function Wt(t){var e;const[n]=(0,u.j1)("whatmorePrimaryFont"),i=((0,u.MO)("whatmoreShopId"),t.FONT_SIZE),o=t.data;return(0,x.jsxs)(s.Kq,{direction:"column",paddingX:"20px",height:"fit-content",children:[(0,x.jsx)(s.Kq,{children:(0,x.jsx)(s.xv,{fontSize:i+"px !important",fontWeight:"bold !important",justifyContent:"center",sx:{color:"black !important",fontFamily:n+" !important"},children:"Description"})}),(0,x.jsx)(s.Kq,{children:(0,x.jsx)(s.xu,{overflowY:"auto",scrollBehavior:"smooth",sx:{"::-webkit-scrollbar":{display:"none"}},children:(0,x.jsx)(s.xv,{fontSize:.8*i+"px !important",justifyContent:"normal",fontWeight:"normal !important",dangerouslySetInnerHTML:{__html:(r=null!==(e=null===o||void 0===o?void 0:o.description)&&void 0!==e?e:null===o||void 0===o?void 0:o.body_html,r.replace(/style="[^"]*color[^"]*"/gi,""))},sx:{fontFamily:n+" !important",lineHeight:"140% !important"}})})})]});var r}const Nt=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{color:"black",paddingTop:"2px"},children:(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-box-arrow-up-right",viewBox:"0 0 16 16",style:{stroke:"black",strokeWidth:"0.4"},children:[(0,x.jsx)("path",{"fill-rule":"evenodd",d:"M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5"}),(0,x.jsx)("path",{"fill-rule":"evenodd",d:"M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0z"})]})})};var qt=n(5416);function Ht(t){var e,n;const[i,o]=(0,r.useState)(t.product),[l]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[d]=(0,u.j1)("whatmoreSecondaryColor");(0,r.useEffect)((()=>{(0,c.N8M)(a)&&(0,xt.Rb)(i,(0,c.Ipo)(a),a).then((t=>{o(t)}))}),[]);const h=t.FONT_SIZE,p=t.data,v=t.itemPrice;const m=null===p||void 0===p||null===(e=p.variants)||void 0===e||null===(n=e.find((e=>e.id==t.selectedVariantId)))||void 0===n?void 0:n.compare_at_price,g=m&&0!=m&&m>v?Math.round((m-v)/m*100):NaN;return(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)(s.kC,{direction:"column",paddingLeft:"20px",paddingRight:"20px",paddingY:"5px",children:[(0,x.jsx)(s.rU,{href:function(t){return(0,c.lj5)(a)?t.product_link+"?"+(0,c.awP)(a)+"&"+(0,c.n9s)(a)+"&"+(0,c.vaK)(a)+((0,c.C0m)(a)?"&currency="+t.currency:""):t.product_link+((0,c.C0m)(a)?"?currency="+t.currency:"")}(i),color:"white",width:"fit-content",children:(0,x.jsxs)(s.kC,{sx:{display:"flex",gap:"6px"},children:[(0,x.jsx)(s.xv,{isTruncated:!0,noOfLines:2,padding:"2px",fontSize:h,sx:{color:"black !important",lineHeight:"140% !important",fontFamily:l+" !important"},as:"b",children:null===p||void 0===p?void 0:p.title}),(0,x.jsx)(Nt,{iconSize:1.1*h})]})}),(0,x.jsxs)(s.kC,{direction:"row",gap:"6px",paddingTop:"4px",children:[m&&m>v&&(0,x.jsx)(s.xv,{as:"s",padding:"2px",fontSize:1.2*h,fontWeight:"semibold",sx:{color:"gray !important",fontFamily:l+" !important"},children:(0,xt.jx)(parseFloat((0,qt.G)()?m/100:m)," ",a,i.currency,!0)}),(0,x.jsx)(s.xv,{as:"b",padding:"2px",fontSize:1.2*h,fontWeight:"semibold !important",sx:{color:"black !important",fontFamily:l+" !important"},children:(0,xt.jx)(parseFloat((0,qt.G)()?v/100:v)," ",a,i.currency,!0)}),!isNaN(g)&&0!=g&&(0,x.jsx)(s.xu,{display:"flex",backgroundColor:"green"==(0,c.ZJm)(a)?"#343434"==d?(0,c.ZJm)(a):d:(0,c.ZJm)(a),alignItems:"center",borderRadius:"4px",width:"fit-content",px:"6px",children:(0,x.jsx)(s.xv,{fontSize:(0,c.sTg)(a)?"14px !important":1.1*h,fontWeight:"normal !important",sx:{color:(0,c.mso)(a)+" !important",fontFamily:l+" !important"},children:(0,c.sTg)(a)?`${g}% off`:`Save ${(0,xt.jx)(parseFloat(m/100-v/100)," ",a,i.currency)}`})})]})]})})}function Vt(t){var e,n;const[i]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),{setShowOptionsChart:l}=(0,r.useContext)(Qt),[a,d]=(0,r.useState)({}),h=(0,u.MO)("whatmoreSecondaryColorShade300"),p=t.setSelectedColor,v=t.selectOptionFirstHandler,m=t.selectOptionSecondHandler,f=t.selectOptionThirdHandler,w=t.FONT_SIZE,j=t.data,y=(t,e,n)=>{if(2==n)d((n=>({...n,[t]:e})));else if(1==n)d((n=>{var i,o,r,l;return{...n,[t]:e,[null===j||void 0===j||null===(i=j.options)||void 0===i||null===(o=i[2])||void 0===o?void 0:o.name]:null===j||void 0===j||null===(r=j.variants)||void 0===r||null===(l=r.find((t=>(null===t||void 0===t?void 0:t.option2)==e)))||void 0===l?void 0:l.option3}}));else{var i,o;const n=null===j||void 0===j||null===(i=j.variants)||void 0===i||null===(o=i.find((t=>(null===t||void 0===t?void 0:t.option1)==e)))||void 0===o?void 0:o.option2;d((i=>{var o,r,l,a,d,s,c,u;return{...i,[null===j||void 0===j||null===(o=j.options)||void 0===o||null===(r=o[1])||void 0===r?void 0:r.name]:null===j||void 0===j||null===(l=j.variants)||void 0===l||null===(a=l.find((t=>(null===t||void 0===t?void 0:t.option1)==e)))||void 0===a?void 0:a.option2,[null===j||void 0===j||null===(d=j.options)||void 0===d||null===(s=d[2])||void 0===s?void 0:s.name]:null===j||void 0===j||null===(c=j.variants)||void 0===c||null===(u=c.find((t=>(null===t||void 0===t?void 0:t.option2)==n)))||void 0===u?void 0:u.option3,[t]:e}}))}};(0,r.useEffect)((()=>{d((t=>{var e,n,i,o,r,l,a,d,s,c,u,h;return{...t,[null===j||void 0===j||null===(e=j.options)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.name]:null===j||void 0===j||null===(i=j.variants)||void 0===i||null===(o=i.find((t=>{var e,n,i;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(n=e[0])||void 0===n||null===(i=n.values)||void 0===i?void 0:i.includes(null===t||void 0===t?void 0:t.option1))&&(null===t||void 0===t?void 0:t.available)})))||void 0===o?void 0:o.option1,[null===j||void 0===j||null===(r=j.options)||void 0===r||null===(l=r[1])||void 0===l?void 0:l.name]:null===j||void 0===j||null===(a=j.variants)||void 0===a||null===(d=a.find((t=>{var e,n,i;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(n=e[1])||void 0===n||null===(i=n.values)||void 0===i?void 0:i.includes(null===t||void 0===t?void 0:t.option2))&&(null===t||void 0===t?void 0:t.available)})))||void 0===d?void 0:d.option2,[null===j||void 0===j||null===(s=j.options)||void 0===s||null===(c=s[2])||void 0===c?void 0:c.name]:null===j||void 0===j||null===(u=j.variants)||void 0===u||null===(h=u.find((t=>{var e,n,i;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(n=e[2])||void 0===n||null===(i=n.values)||void 0===i?void 0:i.includes(null===t||void 0===t?void 0:t.option3))&&(null===t||void 0===t?void 0:t.available)})))||void 0===h?void 0:h.option3}}))}),[]);return(0,x.jsx)(s.kC,{direction:"row",paddingLeft:"20px",paddingRight:"20px",paddingY:"10px",children:(null===j||void 0===j||null===(e=j.options)||void 0===e?void 0:e.length)>0&&(0,x.jsx)(s.kC,{direction:"column",width:"100%",gap:"4px",children:null===j||void 0===j||null===(n=j.options)||void 0===n?void 0:n.map(((e,n)=>{var r,d,u,C,S,b;return(0,x.jsx)(x.Fragment,{children:((null===e||void 0===e||null===(r=e.values)||void 0===r?void 0:r.length)>1||"Colour"===(null===e||void 0===e?void 0:e.name)||(null===e||void 0===e||null===(d=e.name)||void 0===d?void 0:d.toLowerCase().includes("color"))||1==(null===e||void 0===e||null===(u=e.values)||void 0===u?void 0:u.length)&&(null===e||void 0===e?void 0:e.position)==(null===j||void 0===j||null===(C=j.options)||void 0===C?void 0:C.length))&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(s.kC,{justifyContent:"space-between",alignItems:"center",children:[(0,x.jsx)(s.xv,{fontSize:1*w+"px !important",sx:{color:"black !important",fontFamily:i+" !important",fontWeight:"bold !important"},children:null===e||void 0===e?void 0:e.name}),"Size"===e.name&&(0,c.Ip6)(o)?(0,x.jsx)(s.kC,{marginTop:"4px",whiteSpace:"nowrap",cursor:"pointer",children:(0,x.jsx)(s.xv,{fontSize:.7*w,as:"u",sx:{color:"black !important",fontFamily:i+" !important"},onClick:()=>{null!==l&&l(!0)},children:(0,c.meb)(o)})}):(0,x.jsx)(x.Fragment,{})]}),(0,x.jsx)(s.Ug,{spacing:0,flexWrap:"wrap",alignContent:"flex-start",alignItems:"center",justifyContent:"flex-start",children:null===e||void 0===e||null===(S=e.values)||void 0===S?void 0:S.map((r=>{var l,d,u,C,S,b,I,k,_;const F=((t,e)=>{var n,i,o,r,l,d,s,c;if(null!==j&&void 0!==j&&j.options&&(null===j||void 0===j||null===(n=j.options)||void 0===n?void 0:n.length)>0)switch(null===j||void 0===j||null===(c=j.options)||void 0===c?void 0:c.length){case 1:return null===j||void 0===j||null===(i=j.variants)||void 0===i||null===(o=i.find((e=>(null===e||void 0===e?void 0:e.option1)===t)))||void 0===o?void 0:o.available;case 2:return 0==e||(null===j||void 0===j||null===(r=j.variants)||void 0===r||null===(l=r.find((e=>{var n,i;return(null===e||void 0===e?void 0:e.option2)===t&&(null===e||void 0===e?void 0:e.option1)===a[null===j||void 0===j||null===(n=j.options)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.name]})))||void 0===l?void 0:l.available);case 3:return 0==e||1==e||(null===j||void 0===j||null===(d=j.variants)||void 0===d||null===(s=d.find((e=>{var n,i,o,r;return(null===e||void 0===e?void 0:e.option3)===t&&(null===e||void 0===e?void 0:e.option1)===a[null===j||void 0===j||null===(n=j.options)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.name]&&(null===e||void 0===e?void 0:e.option2)===a[null===j||void 0===j||null===(o=j.options)||void 0===o||null===(r=o[1])||void 0===r?void 0:r.name]})))||void 0===s?void 0:s.available);default:return!0}})(r,n),T=0==n||j.variants.find((t=>{var e,i;return t[`option${n}`]==(null===(e=Object.entries(a))||void 0===e||null===(i=e[n-1])||void 0===i?void 0:i[1])&&t[`option${n+1}`]==r}));return("Colour"===(null===e||void 0===e?void 0:e.name)||null!==e&&void 0!==e&&e.name.toLowerCase().includes("color"))&&T&&((null===t||void 0===t||null===(l=t.finalArr)||void 0===l?void 0:l.length)>0&&(null===t||void 0===t||null===(d=t.finalArr)||void 0===d||!d.includes(null))||(null===t||void 0===t||null===(u=t.finalArrExternal)||void 0===u?void 0:u.length)>0)?(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(s.kC,{paddingBottom:"8px",px:"2px",paddingRight:"8px",children:(0,x.jsx)(s.xu,{boxShadow:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px",borderRadius:(0,c.lmH)(o),size:"sm",border:a[null===e||void 0===e?void 0:e.name]===r?`2px solid ${(0,c.ua_)(o)} !important`:"",cursor:"pointer",width:"fit-content !important",onClick:()=>{y(null===e||void 0===e?void 0:e.name,r,n),p(r),0===n&&v(r),1===n&&m(r),2===n&&f(r)},children:(0,x.jsx)(g.Ee,{padding:"2px",borderRadius:(0,c.lmH)(o),width:"58px",height:"58px",src:(0,pt.s)(null!==(C=null===t||void 0===t||null===(S=t.finalArr)||void 0===S||null===(b=S.find((t=>(null===t||void 0===t?void 0:t.color)==r)))||void 0===b?void 0:b.src)&&void 0!==C?C:null===t||void 0===t||null===(I=t.finalArrExternal)||void 0===I||null===(k=I.find((t=>(null===t||void 0===t?void 0:t.color)==r)))||void 0===k?void 0:k.optionsrc,"?width=400&height=400")})})},r)}):T&&(0,x.jsx)(s.kC,{paddingBottom:"8px",paddingRight:"8px",children:(0,x.jsx)(J.zx,{isDisabled:!F,size:"sm",px:"8px !important",bg:a[null===e||void 0===e?void 0:e.name]===r&&F?(null!==(_=(0,c.CPm)(o))&&void 0!==_?_:h)+" !important":(0,c.bC3)(o)+" !important",width:"fit-content !important",onClick:()=>{y(null===e||void 0===e?void 0:e.name,r,n),0===n&&v(r),1===n&&m(r),2===n&&f(r)},children:(0,x.jsx)(s.xv,{as:F?"p":"s",fontSize:.9*w+"px !important",sx:{fontFamily:i+" !important",fontWeight:"normal !important",color:a[null===e||void 0===e?void 0:e.name]===r&&F?(0,c.cY_)(o)+" !important":(0,c.FbM)(o)+" !important"},children:r})})},r)}))}),n===(null===j||void 0===j||null===(b=j.options)||void 0===b?void 0:b.length)-1&&(0,x.jsx)(s.M5,{paddingTop:"8px",width:"100%",children:(0,x.jsx)(s.iz,{color:t.dividerColor,size:"xs"})})]})})}))})})}var Zt=n(8782);function Ut(t){var e,n,i,o,l,a,d,p,v,m,f,w,j,y,C,b,I,k,_,F,T;const[E,P,O,L]=(0,h.Z)();var z=.4*L*.8,R=z*(16/9)*.6*.8;const M=1.1*z,D=M*(16/9)*.8;var A=.12*z;const[W,N]=(0,r.useState)(!1),q=t.data,H=t.event,Z=t.product,U=t.setOpenShopNow,B=t.setLockSwiper,[Y]=(0,u.j1)("whatmoreEmbedAppUseVariant"),[X,G]=(0,r.useState)((()=>{if("true"===Y)return Xt(q,Z.client_product_id)})),[$,J]=(0,r.useState)((()=>{if("true"===Y)return Gt(q,Z.client_product_id)})),[Q,tt]=(0,r.useState)((()=>{if("true"===Y)return $t(q,Z.client_product_id)})),[et,nt]=(0,r.useState)(),[it,ot]=(0,r.useState)(1),[at,dt]=(0,r.useState)(),[st,ct]=(0,r.useState)(0),[ut,ht]=(0,r.useState)(!1),[vt,xt]=(0,r.useState)(!1),[mt,gt]=(0,r.useState)(Z.thumbnail_image),ft=(0,r.useContext)(V.I),wt=(0,u.MO)("whatmoreShopId"),jt=(0,r.useCallback)((t=>{G(t)}),[]),yt=(0,r.useCallback)((t=>{J(t)}),[]),Ct=(0,r.useCallback)((t=>{tt(t)}),[]);(0,r.useEffect)((()=>{const t=Bt(q,X,$,Q);nt(t),dt(Yt(q,t)),ot(1),xt(!1);const e=Jt(q,t);null!==e&&gt(e)}),[X,$,Q]),(0,r.useEffect)((()=>{var t,e;const n=void 0===et?null===q||void 0===q||null===(t=q.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.price:Yt(q,et);dt(n*it)}),[it]),(0,r.useEffect)((()=>{function t(t){const e=document.getElementById("whatmore-shopnow-view"),n=document.getElementById("whatmore-size-chart");n&&n.contains(t.target)||!e||e.contains(t.target)||(U(!1),B(!1))}function e(t){t.preventDefault(),t.stopPropagation(),n.scrollTop+=t.deltaY}document.addEventListener("click",t);const n=document.getElementById("whatmore-shopnow-view");return null===n||void 0===n||n.addEventListener("wheel",e),()=>{document.removeEventListener("click",t),document.removeEventListener("wheel",e)}}),[]),(0,r.useEffect)((()=>{const t=async function(t,e){return"shopify"==t?(0,lt.Bi)():(0,rt.OM)(e)}((0,c.Ipo)(wt),wt);t.then((t=>t.json())).then((t=>{ct(t.item_count)})).catch((t=>{console.error("Cart Add Error:",t)}))}),[ut]);const St=`${S.F4`
72
+ `} 0.5s`;return(0,x.jsx)(s.Kq,{bg:"black",height:"100%",opacity:"100%",width:"100%",borderTopRadius:"xl",animation:w,justifyContent:"center",alignItems:"center",children:(0,x.jsxs)(s.xu,{width:"100%",height:"100%",children:[(0,x.jsx)(g.Ee,{width:"100%",height:"auto",src:(0,c.Zb8)(a)?d:(0,c.KM)(a),objectFit:"contain",borderTopRadius:"xl"}),(0,x.jsx)(s.Kq,{width:"100%",height:"100%",direction:"column",justifyContent:"flex-start",style:{position:"relative",zIndex:1,bottom:"90%"},className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",onClick:t=>{t.stopPropagation(),m(!1)},cursor:"pointer",padding:"4px",children:(0,x.jsx)(P.Z,{sx:{boxShadow:3,color:"white !important",fontSize:1.6*f,filter:"drop-shadow(0 0 5px black);"}})})})]})})}var zt=n(5630),Rt=(n(1332),n(6665));function Mt(t){var e;const[n,i]=(0,r.useState)(null),o=t.product;return(0,r.useEffect)((()=>{(0,lt.bN)(o).then((t=>{i(t.variants)}))}),[]),null==n?(0,x.jsx)(x.Fragment,{}):(0,x.jsx)("div",{style:{width:null!==(e=t.width)&&void 0!==e?e:"100%",borderRadius:"6px",height:1.5*t.height,backgroundColor:"white"},children:(0,x.jsxs)("form",{method:"post",action:"/cart/add","accept-charset":"UTF-8",class:"shopify-product-form",enctype:"multipart/form-data",is:"product-form",children:[(0,x.jsx)("input",{type:"hidden",name:"form_type",value:"product"}),(0,x.jsx)("input",{type:"hidden",name:"utf8",value:"\u2713"}),(0,x.jsx)("input",{type:"hidden",name:"id",value:t.variantId}),(0,x.jsx)("input",{type:"hidden",value:t.product.product_link,name:"productUrl"}),(0,x.jsx)("div",{class:"shiprocket-headless","data-type":"product"}),(0,x.jsx)("textarea",{"data-variant-json":"",class:"hide","aria-hidden":"true","aria-label":"Product JSON",children:JSON.stringify(n).toString()})]})})}function Dt(t){const e=t.product;return(0,x.jsx)(Mt,{product:e,variantId:t.variantId,height:t.height,width:t.width})}function Kt(t){var e,n;const[i]=(0,u.j1)("isInDesignMode"),[o]=(0,u.j1)("isDemoBrand"),[l]=(0,u.j1)("whatmoreShopId"),[a]=(0,u.j1)("whatmorePrimaryFont"),[h]=(0,u.j1)("whatmoreSecondaryColor"),{whatmoreUITheme:p}=(0,r.useContext)(V.I),{whatmoreWidgetSourceDetails:v,whatmoreUserInfo:m}=(0,r.useContext)(V.I),[g,f]=(0,r.useState)(!1),{closeClickComponent:w}=(0,r.useContext)(ln),[j,y]=(0,r.useState)(!1),C=t.FONT_SIZE,S=t.data,b=t.event,k=t.selectedVariantId,_=t.product,F=t.itemQuantity,T=t.PRODUCT_TILE_WIDTH,E=t.cartItemCount,P=t.addToCartFlag,O=t.setAddToCartFlag,L=t.soldOutFlag,z=t.setSoldOutFlag,R=v.landingLocationType,M=v.templateType,D=(0,mt.NY)(R)+(0,mt.dS)(M)+"_"+(null===b||void 0===b?void 0:b.event_id);const K=t=>{var e,n;(function(t,e){i||o||(async()=>{(0,d.$L)(t,e)})()}(b,_),"buy-now"==t)&&(!function(t,e,n,i,o,r,l){"shopify"==n?(0,lt.bj)(t,e,i,o,r,l):(0,rt.rY)(t,e,i)}(void 0!==k?k:null===S||void 0===S||null===(e=S.variants)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.id,F,(0,c.Ipo)(l),l,D,null===b||void 0===b?void 0:b.location,null===m||void 0===m?void 0:m.userType),(0,q.GF)({userInteractionType:H.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:v,event:b,productList:[_],ctaList:b.cta}));"view-more"==t&&((0,c.lj5)(l)?window.location.href=_.product_link+"?"+(0,c.awP)(l)+"&"+(0,c.n9s)(l)+"&"+(0,c.vaK)(l)+((0,c.C0m)(l)?"&currency="+_.currency:""):window.location.href=_.product_link+((0,c.C0m)(l)?"?currency="+_.currency:""))};return(0,x.jsxs)(s.Kq,{boxShadow:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.2) 0px 4px 6px -2px",position:t.position,bg:"27951333450"==l?"#fff":"#D3D3D3",borderRadius:"10px",bottom:"10px",left:"50%",zIndex:"1",transform:"translateX(-50%)",direction:"row",width:"95%",paddingX:"20px",paddingTop:"15px",paddingBottom:"15px",spacing:"15px",fontSize:.9*C,children:[" ",L?(0,x.jsx)(J.zx,{width:"90%",bg:"#252324",variant:"outline",opacity:4,_hover:{bg:"#252324"},height:2.5*C,disabled:!0,sx:{borderRadius:"round"==p?"5px":"0px",borderWidth:(0,c.alU)(l),borderColor:(0,c.qPe)(l)},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:"white !important",fontFamily:a+" !important"},children:"Sold Out"})}):(0,x.jsxs)(s.Kq,{direction:"vertical"==(0,c.rc3)(l)?"column":"row",width:"100%",spacing:"15px",fontSize:.9*C,justifyContent:"center",children:[(0,c.$bv)(l)?(0,x.jsx)(J.zx,{width:"90%",height:2.5*C,onClick:async t=>{var e,n,r;if(t.stopPropagation(),f(!0),function(t,e,n){i||o||(async()=>{(0,d.JX)(t,e,n)})()}(b,_,F),(0,q.GF)({userInteractionType:H.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:v,event:b,productList:[_],ctaList:b.cta}),void 0===k)return void console.log("ERROR ! Select the option.");const a=void 0!==k?k:null===S||void 0===S||null===(e=S.variants)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.id;null===(r=S.variants.filter((t=>t.id==a)))||void 0===r||r.price;st(a,F,(0,c.Ipo)(l),l,b,_,D,null===b||void 0===b?void 0:b.location,null===m||void 0===m?void 0:m.userType).then((t=>{if(!t.ok)throw new Error(t.status);return f(!1),O(!0),t.json()})).then((t=>((0,u.bU)("whatmoreAddedToCart",!0),(0,c.kad)(l)&&(i||(async()=>{await(0,lt.Mj)().then((t=>t.json())).catch((t=>{console.error("Whatmore :: Error while fetching cart_token for initiateOrderTrackingEvent.",t)}))})()),t))).catch((t=>{f(!1),z(!0),console.error("Error:",t)}))},sx:{paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:"#343434"===(0,c.FdS)(l)?h+" !important":(0,c.FdS)(l)+" !important",borderRadius:"round"==p?"27951333450"==l?"50px":"5px":"0px",borderWidth:(0,c.p5R)(l),borderColor:"#343434"===(0,c.yxc)(l)?h:(0,c.yxc)(l),_hover:{backgroundColor:"transparent !important",borderWidth:(0,c.p5R)(l),borderColor:"#343434"===(0,c.yxc)(l)?h:(0,c.yxc)(l)}},children:g?(0,x.jsx)(zt.$,{display:"flex !important",color:"white"}):(0,x.jsx)(s.xv,{fontWeight:"extrabold !important",sx:{color:(0,c.eSJ)(l)+" !important",fontFamily:a+" !important"},fontSize:C+"px !important",children:(0,c.tan)(l)})}):(0,x.jsx)(x.Fragment,{}),(0,c.cDD)(l)?(0,x.jsx)(x.Fragment,{children:(0,c.H$w)(l)?(0,x.jsx)(Dt,{variantId:void 0!==k?k:null===S||void 0===S||null===(e=S.variants)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.id,product:_,height:2.5*C,width:"90%",fontSize:C,fontFamily:a}):(0,x.jsx)(x.Fragment,{children:(0,c.Stj)(l)?(0,x.jsx)(J.zx,{width:"90%",variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*C,onClick:()=>K("view-more"),sx:{backgroundColor:(0,c.IIW)(l)+" !important",borderRadius:"round"==p?"27951333450"==l?"50px":"5px":"0px",borderWidth:(0,c.alU)(l),borderColor:(0,c.qPe)(l)},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:"#343434"===(0,c.iKW)(l)?h+" !important":(0,c.iKW)(l)+" !important",fontFamily:a+" !important"},fontSize:C,children:(0,c.Z59)(l)})}):(0,x.jsx)(J.zx,{width:"90%",variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*C,onClick:t=>{K("buy-now")},sx:{backgroundColor:(0,c.IIW)(l)+" !important",borderRadius:"round"==p?"27951333450"==l?"50px":"5px":"0px",borderWidth:(0,c.p5R)(l),borderColor:"#343434"===(0,c.yxc)(l)?h:(0,c.yxc)(l),_hover:{backgroundColor:"transparent !important"}},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold !important",sx:{color:"#343434"===(0,c.iKW)(l)?h+" !important":(0,c.iKW)(l)+" !important",fontFamily:a+" !important"},fontSize:C+"px !important",children:(0,c.ZuH)(l)})})})}):(0,x.jsx)(x.Fragment,{})]}),(0,x.jsx)(x.Fragment,{children:(0,c.$bv)(l)?(0,x.jsx)(x.Fragment,{children:j?(0,x.jsx)(s.kC,{width:"10%",spacing:"0",right:0,children:(0,x.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,x.jsx)(Rt.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*C}})})}):(0,x.jsxs)(s.kC,{animation:P?I:"none",onAnimationEnd:()=>O(!1),width:"10%",spacing:"0",right:0,onClick:()=>{"do_nothing"!==(0,c.v9M)(l)&&("go_to_cart_page"!==(0,c.v9M)(l)?(y(!0),function(t){"open_cart_slider"!==(0,c.v9M)(t)||null!==w&&w()}(l)):ct((0,c.Ipo)(l),l))},cursor:"pointer",children:[(0,x.jsx)(G.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*C}}),E>0?(0,x.jsx)(s.Cd,{padding:"2px",bg:"white",size:1.1*C,top:.03*-T,verticalAlign:"top",position:"relative",left:.11*-T,zIndex:"1",children:(0,x.jsx)(s.xv,{sx:{color:"black !important",fontFamily:a+" !important"},fontWeight:"bold !important",fontSize:.7*C+"px !important",children:E})}):(0,x.jsx)(x.Fragment,{})]})}):(0,x.jsx)(x.Fragment,{})})]})}function At(t){const[e]=(0,u.j1)("whatmorePrimaryFont"),n=((0,u.MO)("whatmoreShopId"),t.setOpenShopNow),i=t.FONT_SIZE,o=t.setLockSwiper;return(0,x.jsxs)(s.kC,{justifyContent:"center",paddingTop:"10px",paddingBottom:"8px",width:"100%",children:[(0,x.jsx)(s.kC,{width:"10%",display:"flex !important"}),(0,x.jsx)(s.kC,{width:"90%",justifyContent:"center",children:(0,x.jsx)(s.xv,{align:"center",fontSize:1.25*i,fontWeight:"semibold",sx:{color:"black !important",fontFamily:e+" !important"},as:"b",children:"Shop Now"})}),(0,x.jsx)(s.kC,{justifyContent:"center",width:"10%",alignItems:"center",onClick:t=>{t.stopPropagation(),n(!1),o(!1)},cursor:"pointer",children:(0,x.jsx)(P.Z,{sx:{boxShadow:3,color:"black !important",fontSize:1.2*i,filter:"drop-shadow(0 0 5px black);"}})})]})}function Wt(t){var e;const[n]=(0,u.j1)("whatmorePrimaryFont"),i=((0,u.MO)("whatmoreShopId"),t.FONT_SIZE),o=t.data;return(0,x.jsxs)(s.Kq,{direction:"column",paddingX:"20px",height:"fit-content",children:[(0,x.jsx)(s.Kq,{children:(0,x.jsx)(s.xv,{fontSize:i+"px !important",fontWeight:"bold !important",justifyContent:"center",sx:{color:"black !important",fontFamily:n+" !important"},children:"Description"})}),(0,x.jsx)(s.Kq,{children:(0,x.jsx)(s.xu,{overflowY:"auto",scrollBehavior:"smooth",sx:{"::-webkit-scrollbar":{display:"none"}},children:(0,x.jsx)(s.xv,{fontSize:.8*i+"px !important",justifyContent:"normal",fontWeight:"normal !important",dangerouslySetInnerHTML:{__html:(r=null!==(e=null===o||void 0===o?void 0:o.description)&&void 0!==e?e:null===o||void 0===o?void 0:o.body_html,r.replace(/style="[^"]*color[^"]*"/gi,""))},sx:{fontFamily:n+" !important",lineHeight:"140% !important"}})})})]});var r}const Nt=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{color:"black",paddingTop:"2px"},children:(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-box-arrow-up-right",viewBox:"0 0 16 16",style:{stroke:"black",strokeWidth:"0.4"},children:[(0,x.jsx)("path",{"fill-rule":"evenodd",d:"M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5"}),(0,x.jsx)("path",{"fill-rule":"evenodd",d:"M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0z"})]})})};var qt=n(5416);function Ht(t){var e,n;const[i,o]=(0,r.useState)(t.product),[l]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[d]=(0,u.j1)("whatmoreSecondaryColor");(0,r.useEffect)((()=>{(0,c.N8M)(a)&&(0,xt.Rb)(i,(0,c.Ipo)(a),a).then((t=>{o(t)}))}),[]);const h=t.FONT_SIZE,p=t.data,v=t.itemPrice;const m=null===p||void 0===p||null===(e=p.variants)||void 0===e||null===(n=e.find((e=>e.id==t.selectedVariantId)))||void 0===n?void 0:n.compare_at_price,g=m&&0!=m&&m>v?Math.round((m-v)/m*100):NaN;return(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)(s.kC,{direction:"column",paddingLeft:"20px",paddingRight:"20px",paddingY:"5px",children:[(0,x.jsx)(s.rU,{href:function(t){return(0,c.lj5)(a)?t.product_link+"?"+(0,c.awP)(a)+"&"+(0,c.n9s)(a)+"&"+(0,c.vaK)(a)+((0,c.C0m)(a)?"&currency="+t.currency:""):t.product_link+((0,c.C0m)(a)?"?currency="+t.currency:"")}(i),color:"white",width:"fit-content",children:(0,x.jsxs)(s.kC,{sx:{display:"flex",gap:"6px"},children:[(0,x.jsx)(s.xv,{isTruncated:!0,noOfLines:2,padding:"2px",fontSize:h,sx:{color:"black !important",lineHeight:"140% !important",fontFamily:l+" !important"},as:"b",children:null===p||void 0===p?void 0:p.title}),(0,x.jsx)(Nt,{iconSize:1.1*h})]})}),(0,x.jsxs)(s.kC,{direction:"row",gap:"6px",paddingTop:"4px",children:[m&&m>v&&(0,x.jsx)(s.xv,{as:"s",padding:"2px",fontSize:1.2*h,fontWeight:"semibold",sx:{color:"gray !important",fontFamily:l+" !important"},children:(0,xt.jx)(parseFloat((0,qt.G)()?m/100:m)," ",a,i.currency,!0)}),(0,x.jsx)(s.xv,{as:"b",padding:"2px",fontSize:1.2*h,fontWeight:"semibold !important",sx:{color:"black !important",fontFamily:l+" !important"},children:(0,xt.jx)(parseFloat((0,qt.G)()?v/100:v)," ",a,i.currency,!0)}),!isNaN(g)&&0!=g&&(0,x.jsx)(s.xu,{display:"flex",backgroundColor:"green"==(0,c.ZJm)(a)?"#343434"==d?(0,c.ZJm)(a):d:(0,c.ZJm)(a),alignItems:"center",borderRadius:"4px",width:"fit-content",px:"6px",children:(0,x.jsx)(s.xv,{fontSize:(0,c.sTg)(a)?"14px !important":1.1*h,fontWeight:"normal !important",sx:{color:(0,c.mso)(a)+" !important",fontFamily:l+" !important"},children:(0,c.sTg)(a)?`${g}% off`:`Save ${(0,xt.jx)(parseFloat(m/100-v/100)," ",a,i.currency)}`})})]})]})})}function Vt(t){var e,n;const[i]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),{setShowOptionsChart:l}=(0,r.useContext)(Qt),[a,d]=(0,r.useState)({}),h=(0,u.MO)("whatmoreSecondaryColorShade300"),p=t.setSelectedColor,v=t.selectOptionFirstHandler,m=t.selectOptionSecondHandler,f=t.selectOptionThirdHandler,w=t.FONT_SIZE,j=t.data,y=(t,e,n)=>{if(2==n)d((n=>({...n,[t]:e})));else if(1==n)d((n=>{var i,o,r,l;return{...n,[t]:e,[null===j||void 0===j||null===(i=j.options)||void 0===i||null===(o=i[2])||void 0===o?void 0:o.name]:null===j||void 0===j||null===(r=j.variants)||void 0===r||null===(l=r.find((t=>(null===t||void 0===t?void 0:t.option2)==e)))||void 0===l?void 0:l.option3}}));else{var i,o;const n=null===j||void 0===j||null===(i=j.variants)||void 0===i||null===(o=i.find((t=>(null===t||void 0===t?void 0:t.option1)==e)))||void 0===o?void 0:o.option2;d((i=>{var o,r,l,a,d,s,c,u;return{...i,[null===j||void 0===j||null===(o=j.options)||void 0===o||null===(r=o[1])||void 0===r?void 0:r.name]:null===j||void 0===j||null===(l=j.variants)||void 0===l||null===(a=l.find((t=>(null===t||void 0===t?void 0:t.option1)==e)))||void 0===a?void 0:a.option2,[null===j||void 0===j||null===(d=j.options)||void 0===d||null===(s=d[2])||void 0===s?void 0:s.name]:null===j||void 0===j||null===(c=j.variants)||void 0===c||null===(u=c.find((t=>(null===t||void 0===t?void 0:t.option2)==n)))||void 0===u?void 0:u.option3,[t]:e}}))}};(0,r.useEffect)((()=>{d((t=>{var e,n,i,o,r,l,a,d,s,c,u,h;return{...t,[null===j||void 0===j||null===(e=j.options)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.name]:null===j||void 0===j||null===(i=j.variants)||void 0===i||null===(o=i.find((t=>{var e,n,i;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(n=e[0])||void 0===n||null===(i=n.values)||void 0===i?void 0:i.includes(null===t||void 0===t?void 0:t.option1))&&(null===t||void 0===t?void 0:t.available)})))||void 0===o?void 0:o.option1,[null===j||void 0===j||null===(r=j.options)||void 0===r||null===(l=r[1])||void 0===l?void 0:l.name]:null===j||void 0===j||null===(a=j.variants)||void 0===a||null===(d=a.find((t=>{var e,n,i;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(n=e[1])||void 0===n||null===(i=n.values)||void 0===i?void 0:i.includes(null===t||void 0===t?void 0:t.option2))&&(null===t||void 0===t?void 0:t.available)})))||void 0===d?void 0:d.option2,[null===j||void 0===j||null===(s=j.options)||void 0===s||null===(c=s[2])||void 0===c?void 0:c.name]:null===j||void 0===j||null===(u=j.variants)||void 0===u||null===(h=u.find((t=>{var e,n,i;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(n=e[2])||void 0===n||null===(i=n.values)||void 0===i?void 0:i.includes(null===t||void 0===t?void 0:t.option3))&&(null===t||void 0===t?void 0:t.available)})))||void 0===h?void 0:h.option3}}))}),[]);return(0,x.jsx)(s.kC,{direction:"row",paddingLeft:"20px",paddingRight:"20px",paddingY:"10px",children:(null===j||void 0===j||null===(e=j.options)||void 0===e?void 0:e.length)>0&&(0,x.jsx)(s.kC,{direction:"column",width:"100%",gap:"4px",children:null===j||void 0===j||null===(n=j.options)||void 0===n?void 0:n.map(((e,n)=>{var r,d,u,C,S,b;return(0,x.jsx)(x.Fragment,{children:((null===e||void 0===e||null===(r=e.values)||void 0===r?void 0:r.length)>1||"Colour"===(null===e||void 0===e?void 0:e.name)||(null===e||void 0===e||null===(d=e.name)||void 0===d?void 0:d.toLowerCase().includes("color"))||1==(null===e||void 0===e||null===(u=e.values)||void 0===u?void 0:u.length)&&(null===e||void 0===e?void 0:e.position)>1&&(null===e||void 0===e?void 0:e.position)==(null===j||void 0===j||null===(C=j.options)||void 0===C?void 0:C.length))&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(s.kC,{justifyContent:"space-between",alignItems:"center",children:[(0,x.jsx)(s.xv,{fontSize:1*w+"px !important",sx:{color:"black !important",fontFamily:i+" !important",fontWeight:"bold !important"},children:null===e||void 0===e?void 0:e.name}),"Size"===e.name&&(0,c.Ip6)(o)?(0,x.jsx)(s.kC,{marginTop:"4px",whiteSpace:"nowrap",cursor:"pointer",children:(0,x.jsx)(s.xv,{fontSize:.7*w,as:"u",sx:{color:"black !important",fontFamily:i+" !important"},onClick:()=>{null!==l&&l(!0)},children:(0,c.meb)(o)})}):(0,x.jsx)(x.Fragment,{})]}),(0,x.jsx)(s.Ug,{spacing:0,flexWrap:"wrap",alignContent:"flex-start",alignItems:"center",justifyContent:"flex-start",children:null===e||void 0===e||null===(S=e.values)||void 0===S?void 0:S.map((r=>{var l,d,u,C,S,b,I,k,_;const F=((t,e)=>{var n,i,o,r,l,d,s,c;if(null!==j&&void 0!==j&&j.options&&(null===j||void 0===j||null===(n=j.options)||void 0===n?void 0:n.length)>0)switch(null===j||void 0===j||null===(c=j.options)||void 0===c?void 0:c.length){case 1:return null===j||void 0===j||null===(i=j.variants)||void 0===i||null===(o=i.find((e=>(null===e||void 0===e?void 0:e.option1)===t)))||void 0===o?void 0:o.available;case 2:return 0==e||(null===j||void 0===j||null===(r=j.variants)||void 0===r||null===(l=r.find((e=>{var n,i;return(null===e||void 0===e?void 0:e.option2)===t&&(null===e||void 0===e?void 0:e.option1)===a[null===j||void 0===j||null===(n=j.options)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.name]})))||void 0===l?void 0:l.available);case 3:return 0==e||1==e||(null===j||void 0===j||null===(d=j.variants)||void 0===d||null===(s=d.find((e=>{var n,i,o,r;return(null===e||void 0===e?void 0:e.option3)===t&&(null===e||void 0===e?void 0:e.option1)===a[null===j||void 0===j||null===(n=j.options)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.name]&&(null===e||void 0===e?void 0:e.option2)===a[null===j||void 0===j||null===(o=j.options)||void 0===o||null===(r=o[1])||void 0===r?void 0:r.name]})))||void 0===s?void 0:s.available);default:return!0}})(r,n),T=0==n||j.variants.find((t=>{var e,i;return t[`option${n}`]==(null===(e=Object.entries(a))||void 0===e||null===(i=e[n-1])||void 0===i?void 0:i[1])&&t[`option${n+1}`]==r}));return("Colour"===(null===e||void 0===e?void 0:e.name)||null!==e&&void 0!==e&&e.name.toLowerCase().includes("color"))&&T&&((null===t||void 0===t||null===(l=t.finalArr)||void 0===l?void 0:l.length)>0&&(null===t||void 0===t||null===(d=t.finalArr)||void 0===d||!d.includes(null))||(null===t||void 0===t||null===(u=t.finalArrExternal)||void 0===u?void 0:u.length)>0)?(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(s.kC,{paddingBottom:"8px",px:"2px",paddingRight:"8px",children:(0,x.jsx)(s.xu,{boxShadow:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px",borderRadius:(0,c.lmH)(o),size:"sm",border:a[null===e||void 0===e?void 0:e.name]===r?`2px solid ${(0,c.ua_)(o)} !important`:"",cursor:"pointer",width:"fit-content !important",onClick:()=>{y(null===e||void 0===e?void 0:e.name,r,n),p(r),0===n&&v(r),1===n&&m(r),2===n&&f(r)},children:(0,x.jsx)(g.Ee,{padding:"2px",borderRadius:(0,c.lmH)(o),width:"58px",height:"58px",src:(0,pt.s)(null!==(C=null===t||void 0===t||null===(S=t.finalArr)||void 0===S||null===(b=S.find((t=>(null===t||void 0===t?void 0:t.color)==r)))||void 0===b?void 0:b.src)&&void 0!==C?C:null===t||void 0===t||null===(I=t.finalArrExternal)||void 0===I||null===(k=I.find((t=>(null===t||void 0===t?void 0:t.color)==r)))||void 0===k?void 0:k.optionsrc,"?width=400&height=400")})})},r)}):T&&(0,x.jsx)(s.kC,{paddingBottom:"8px",paddingRight:"8px",children:(0,x.jsx)(J.zx,{isDisabled:!F,size:"sm",px:"8px !important",bg:a[null===e||void 0===e?void 0:e.name]===r&&F?(null!==(_=(0,c.CPm)(o))&&void 0!==_?_:h)+" !important":(0,c.bC3)(o)+" !important",width:"fit-content !important",onClick:()=>{y(null===e||void 0===e?void 0:e.name,r,n),0===n&&v(r),1===n&&m(r),2===n&&f(r)},children:(0,x.jsx)(s.xv,{as:F?"p":"s",fontSize:.9*w+"px !important",sx:{fontFamily:i+" !important",fontWeight:"normal !important",color:a[null===e||void 0===e?void 0:e.name]===r&&F?(0,c.cY_)(o)+" !important":(0,c.FbM)(o)+" !important"},children:r})})},r)}))}),n===(null===j||void 0===j||null===(b=j.options)||void 0===b?void 0:b.length)-1&&(0,x.jsx)(s.M5,{paddingTop:"8px",width:"100%",children:(0,x.jsx)(s.iz,{color:t.dividerColor,size:"xs"})})]})})}))})})}var Zt=n(8782);function Ut(t){var e,n,i,o,l,a,d,p,v,m,f,w,j,y,C,b,I,k,_,F,T;const[E,P,O,L]=(0,h.Z)();var z=.4*L*.8,R=z*(16/9)*.6*.8;const M=1.1*z,D=M*(16/9)*.8;var A=.12*z;const[W,N]=(0,r.useState)(!1),q=t.data,H=t.event,Z=t.product,U=t.setOpenShopNow,B=t.setLockSwiper,[Y]=(0,u.j1)("whatmoreEmbedAppUseVariant"),[X,G]=(0,r.useState)((()=>{if("true"===Y)return Xt(q,Z.client_product_id)})),[$,J]=(0,r.useState)((()=>{if("true"===Y)return Gt(q,Z.client_product_id)})),[Q,tt]=(0,r.useState)((()=>{if("true"===Y)return $t(q,Z.client_product_id)})),[et,nt]=(0,r.useState)(),[it,ot]=(0,r.useState)(1),[at,dt]=(0,r.useState)(),[st,ct]=(0,r.useState)(0),[ut,ht]=(0,r.useState)(!1),[vt,xt]=(0,r.useState)(!1),[mt,gt]=(0,r.useState)(Z.thumbnail_image),ft=(0,r.useContext)(V.I),wt=(0,u.MO)("whatmoreShopId"),jt=(0,r.useCallback)((t=>{G(t)}),[]),yt=(0,r.useCallback)((t=>{J(t)}),[]),Ct=(0,r.useCallback)((t=>{tt(t)}),[]);(0,r.useEffect)((()=>{const t=Bt(q,X,$,Q);nt(t),dt(Yt(q,t)),ot(1),xt(!1);const e=Jt(q,t);null!==e&&gt(e)}),[X,$,Q]),(0,r.useEffect)((()=>{var t,e;const n=void 0===et?null===q||void 0===q||null===(t=q.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.price:Yt(q,et);dt(n*it)}),[it]),(0,r.useEffect)((()=>{function t(t){const e=document.getElementById("whatmore-shopnow-view"),n=document.getElementById("whatmore-size-chart");n&&n.contains(t.target)||!e||e.contains(t.target)||(U(!1),B(!1))}function e(t){t.preventDefault(),t.stopPropagation(),n.scrollTop+=t.deltaY}document.addEventListener("click",t);const n=document.getElementById("whatmore-shopnow-view");return null===n||void 0===n||n.addEventListener("wheel",e),()=>{document.removeEventListener("click",t),document.removeEventListener("wheel",e)}}),[]),(0,r.useEffect)((()=>{const t=async function(t,e){return"shopify"==t?(0,lt.Bi)():(0,rt.OM)(e)}((0,c.Ipo)(wt),wt);t.then((t=>t.json())).then((t=>{ct(t.item_count)})).catch((t=>{console.error("Cart Add Error:",t)}))}),[ut]);const St=`${S.F4`
73
73
  0% {
74
74
  transform: translateY(100%);
75
75
  }