whatmore-react-assets 1.0.1677 → 1.0.1678
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
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
100% {
|
|
13
13
|
transform: scale(1);
|
|
14
14
|
}
|
|
15
|
-
`,m=`\n ${p}; \n infinite;\n animation-duration:0.2s; \n animation-direction: linear ;\n animation-timing-function: ease-in;\n animation-fill-mode: forwards;\n`,f=`\n ${h}; \n infinite;\n animation-duration:0.2s; \n animation-direction: linear ;\n animation-timing-function: ease-in;\n animation-fill-mode: forwards;\n`;var x=n(5830),g=n(7509),v=n(4414);var y=function(t){var e,n,[u,p]=(0,s.A)();const[h]=(0,x.QN)("whatmorePrimaryFont");var y=(0,a.useContext)(g.h);const w=t.event,b=t.onClick,j=null===(e=t.isOnFocus)||void 0===e||e,A=(t.playOnUnfocus,null!==(n=t.animateOnFocus)&&void 0!==n&&n);return(0,v.jsxs)(i.az,{animation:A?j?m:f:"none",marginTop:y.tileTopMargin,marginBottom:y.tileBottomMMargin,marginLeft:y.tileLeftMargin,marginRight:y.tileRightMargin,width:p,height:u,borderRadius:"lg",sx:{boxShadow:"0px 0px 10px 3px #B0B0B0"},overflow:"hidden",onClick:()=>{b(w)},cursor:"pointer",children:[(0,v.jsx)(l._,{width:"full",height:"full",src:w.thumbnail_image,objectFit:"cover",fallback:(0,v.jsx)(c.A,{width:p,height:u}),borderRadius:"lg"}),(0,v.jsx)(i.az,{style:{position:"relative",zIndex:1,bottom:"100%",overflow:"hidden"},width:"full",height:"full",borderRadius:"lg",overflow:"hidden",className:"whatmore-ios-css-relative-fix",children:(0,v.jsxs)(o.B,{direction:"column",height:"full",width:"full",justifyContent:"space-between",children:[(0,v.jsx)(i.az,{w:"100%",borderRadius:"lg",bgGradient:"linear(to-t, transparent, blackAlpha.200, blackAlpha.400, blackAlpha.600)",children:(0,v.jsx)(o.B,{direction:"column",justifyContent:"flex-start",children:(0,v.jsx)(i.az,{width:"100%",marginLeft:"5px",marginRight:"5px",marginTop:"10px",children:(0,v.jsx)(o.B,{direction:"row",justifyContent:"space-between",children:(0,v.jsx)(d.A,{event:w,fontSize:.05*u+"px",maxWidth:.8*p})})})})}),(0,v.jsx)(i.az,{w:"100%",borderRadius:"lg",bgGradient:"linear(to-b, transparent, blackAlpha.300, blackAlpha.400, blackAlpha.500, blackAlpha.600)",children:(0,v.jsx)(o.B,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",alignContent:"center",children:(0,v.jsx)(i.az,{width:"full",borderRadius:"lg",children:(0,v.jsxs)(o.B,{direction:"column",justifyContent:"space-between",alignContent:"flex-start",marginLeft:"5px",marginRight:"5px",marginBottom:"2px",children:[(0,v.jsx)(r.E,{color:"white",fontSize:.08*p+"px",fontWeight:"normal",align:"left",children:" "}),(0,v.jsx)(r.E,{fontSize:.08*p+"px",fontWeight:"normal",align:"left",sx:{fontFamily:h+" !important",color:"white !important"},children:w.title.substring(0,40)}),(0,v.jsx)(r.E,{fontSize:.08*p+"px",fontWeight:"bold",align:"left",sx:{fontFamily:h+" !important",color:"white !important"},children:w.presenter_name.substring(0,15)})]})})})})]})})]})}},4826:function(){},5727:function(t,e,n){var i=n(4994);e.A=void 0;var o=i(n(9526)),r=n(4414);e.A=(0,o.default)((0,r.jsx)("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82"}),"PlayArrowRounded")},6989:function(t,e,n){n.r(e),n.d(e,{default:function(){return W}});var i=n(9950),o=n(3852),r=n(340),l=n(5089),a=(n(3997),n(9733),n(4365),n(572)),s=n(8603),d=n(6086),c=n(3731),u=n(1941),p=n(5830),h=n(7509),m=n(1348),f=n(5551),x=n(1422),g=n(932),v=n(6649),y=n(4414);function w(t){var e;const[n,i,o]=(0,v.A)({triggerOnce:!1}),r=null!==(e=t.defaultHeight)&&void 0!==e?e:"fit-content";return(0,y.jsx)(x.B,{ref:n,direction:"row",minHeight:r,height:r,width:"100%",justifyContent:"center",alignItems:"center",children:i?t.data.map((e,n)=>(0,y.jsx)("div",{children:t.renderElement({eventData:e})},"key"+n)):(0,y.jsx)("div",{style:{minHeight:{rowHeight:r},minWidth:"100%"}})})}function b(t){var e;const[n,i,o]=(0,g.A)(),r=null!==(e=t.elementsPerRow)&&void 0!==e?e:Math.floor(Math.min(o,t.dataList.length)),l=function(t,e){var n=[];const i=e;for(let o=0;o<t.length;o+=i){const e=t.slice(o,o+i);n.push(e)}return n}(t.dataList,r);return(0,y.jsx)(x.B,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-start",alignItems:"center",spacing:.2*n,children:l.map((e,o)=>(0,y.jsx)(w,{renderElement:t.renderElement,data:e,defaultHeight:n,defaultWidth:i},"key-"+o))})}var j=n(2039),A=(n(4826),n(9879)),S=n(9258),C=n(8538),k=n(6594),F=n(7973),P=n(8149),R=n(7740),T=n(22);var M=function(t){var e,n,o,r,[l,a,s,d,c]=(0,g.A)();const u="portrait"===c[T.dl],[h,f]=(0,i.useState)(0),[x,v]=(0,i.useState)(t.event),[w]=(0,p.QN)("whatmoreShopId"),b=(0,p.QN)("whatmoreUITheme"),[j]=(0,p.QN)("whatmorePrimaryFont"),[A]=(0,p.QN)("whatmoreSecondaryColorShade900"),S=x.products.length,[M,I]=(0,i.useState)(),[O,N]=(0,i.useState)(!1);if(0==S)return(0,y.jsx)(y.Fragment,{});(0,i.useEffect)(()=>{const t=setInterval(()=>{f(t=>(t+1)%S)},3e3);return()=>{clearInterval(t)}},[]),(0,i.useEffect)(()=>{(0,m.w4b)(w)?(0,k.fu)(x,(0,m.NCy)(w),w).then(t=>{v(t),N(!0)}):(async()=>{var t;const e=await(0,P.M)(null===x||void 0===x||null===(t=x.products)||void 0===t?void 0:t[0],(0,m.NCy)(w),w);I(e),N(!0)})()},[]);const z=(u?1.23*a*(0,m.HWj)(w):1.4*a*(0,m.N_4)(w))+"px",L=(u?1.15*a*(0,m.HWj)(w):1.31*a*(0,m.N_4)(w))+"px",E=(+x.products[h].price).toFixed(),B=(+x.products[h].compare_price).toFixed(),q=.25*a,_=(0,m.zAb)(w);return(0,y.jsxs)("div",{style:{background:"9238315068"===w?"transparent":(0,m.ivR)(w),display:"flex",flexDirection:_?"row":"column",padding:"10px 12px",gap:_?"8px":"6px",borderRadius:"round"==b?"0 0 12px 12px":"0",alignItems:_?"center":"stretch"},children:[(0,y.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"6px",flex:_?"1":"none"},children:[(0,y.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",z),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",j,"important"),t.style.setProperty("-webkit-line-clamp",1),t.style.setProperty("line-clamp",1,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"bolder"},children:(0,C.v)(x.products[h].title)}),(0,y.jsxs)("div",{style:{display:"flex",gap:"4px"},children:[O&&(0,y.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",L),t.style.setProperty("font-family",j,"important"),t.style.setProperty("overflow","hidden","important"))},style:{textAlign:"left",fontWeight:"bold"},children:(0,k.Sb)(parseFloat((0,R.U)()?(null===M||void 0===M?void 0:M.price)/100:null===x||void 0===x||null===(e=x.products)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.price)," ",w,x.products[h].currency)}),!isNaN(B)&&B>E&&O&&(0,y.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","#808191","important"),t.style.setProperty("font-size",L),t.style.setProperty("font-family",j,"important"),t.style.setProperty("overflow","hidden","important"))},style:{fontWeight:"bold",textDecoration:"line-through"},children:(0,k.Sb)(parseFloat((0,R.U)()?(null===M||void 0===M?void 0:M.compare_at_price)/100:null===x||void 0===x||null===(o=x.products)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.compare_price)," ",w,x.products[h].currency)})]})]}),_&&(0,y.jsx)("img",{ref:t=>{t&&t.style.setProperty("object-fit",(0,m.KZe)(w),"important")},src:(0,F.b)(x.products[h].thumbnail_image,"&width=400&height=400"),style:{width:q,height:q,borderRadius:"round"==b?"5px":"0px",backgroundColor:A,flexShrink:0},alt:"product img"})]})},I=n(6613),O=n(6305),N=n(4833),z=n(1351),L=n(6157),E=n(4533),B=n(9664);function q(t){const[e,n]=(0,g.A)(),[i]=(0,p.QN)("whatmoreShowViews"),o=t.event;return(0,y.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",overflow:"hidden",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,y.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-between",alignItems:"center"},children:(0,y.jsx)("div",{style:{width:"100%",backgroundImage:"linear-gradient(to top, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0.3))"},children:(0,y.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"flex-start",alignItems:"center"},children:"show"===i?(0,y.jsx)("div",{style:{width:"100%",marginLeft:"5px",marginRight:"5px",marginTop:"10px"},children:(0,y.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",paddingLeft:"5px",width:"fit-content",height:"fit-content",justifyContent:"space-between",alignItems:"center"},children:(0,y.jsx)(S.A,{event:o,fontSize:.07*n+"px"})})}):(0,y.jsx)(y.Fragment,{})})})})})}var _=function(t){var e,n,o,r,l,a,s=(0,i.useContext)(h.h);const d=(0,p.Xd)("whatmoreUITheme"),c=(0,p.Xd)("whatmoreSecondaryColor"),u=(0,p.Xd)("whatmoreShopId"),[x]=(0,p.QN)("whatmorePrimaryFont");var[w,b,j,S,C]=(0,g.A)();const k="portrait"===C[T.dl],F=t.event,P=t.onClick,R=null===(e=t.isOnFocus)||void 0===e||e,_=null!==(n=t.playOnUnfocus)&&void 0!==n&&n,D=null!==(o=t.animateOnFocus&&(0,m.n5O)(u))&&void 0!==o&&o,[W,U,Q]=(0,v.A)({triggerOnce:!0}),[H,X]=(0,i.useState)(!1),{whatmoreWidgetSourceDetails:V,whatmoreUserInfo:J}=(0,i.useContext)(f.B),K=null!==(r=null===(l=F.products)||void 0===l?void 0:l.find(t=>"active"==t.product_status))&&void 0!==r?r:null===(a=F.products)||void 0===a?void 0:a[0],Y=K&&Object.keys(K).length>0,[Z,G,$,tt,et,nt]=(0,O.A)(0,K,F),it=.07*b+"px",ot=Y&&(0,m.Kr7)(u),rt=t=>{if(t.stopPropagation(),!Y)return;const e=V.landingLocationType,n=V.templateType,i=(0,N.Wd)(e)+(0,N.gf)(n)+(null!==F&&void 0!==F&&F.isRelatedEvent?"R":"E")+"_"+(null===F||void 0===F?void 0:F.event_id);(0,E.Ch)(F.event_id,F.products,"homepage","carousel",i,null===F||void 0===F?void 0:F.location,null===J||void 0===J?void 0:J.userType),"init"==Z.state?(et(i,!0),(0,z.kz)({userInteractionType:L.O.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:V,event:F,productList:[K],ctaList:F.cta})):"awaitingVariantSelection"==Z.state&&nt(null,i)};return(0,y.jsxs)("div",{style:{display:"flex",flexDirection:"column",margin:"0 auto"},children:[(0,y.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top",s.tileTopMargin+"px","important"),t.style.setProperty("margin-bottom","9238315068"===u?"0px":s.tileBottomMMargin+"px","important"))},style:{width:b,height:w,borderRadius:"round"==d?"12px":"0px",borderWidth:"9238315068"===u?0:(0,m.MRv)(u),borderColor:"9238315068"===u?"transparent":"white"==(0,m.Fwt)(u)?c:(0,m.Fwt)(u),overflow:"hidden",cursor:"pointer",position:"relative"},className:D?R?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",onClick:()=>{P(F)},onMouseEnter:()=>X(!0),onMouseLeave:()=>X(!1),children:[(0,y.jsx)(A.A,{height:"100%",width:"100%",url:F.thumbnail_image,isPlaying:R||_||(0,I.At)(),event:F}),"9238315068"===u&&Y&&(H||k)&&(0,y.jsx)("div",{style:{position:"absolute",bottom:0,left:0,right:0,background:H||k?"rgba(0, 0, 0, 0.75)":"rgba(0, 0, 0, 0.6)",padding:"12px",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s ease",cursor:"pointer",transform:H||k?"translateY(0)":"translateY(100%)",opacity:H||k?1:0,zIndex:10},onClick:rt,onMouseEnter:t=>{t.target.style.background="rgba(0, 0, 0, 0.85)"},onMouseLeave:t=>{t.target.style.background="rgba(0, 0, 0, 0.75)"},children:(0,y.jsx)("span",{style:{color:"white",fontSize:it,fontFamily:x,fontWeight:"500",textAlign:"center",letterSpacing:"0.5px"},children:"ADD TO CART"})}),(0,y.jsxs)("div",{style:{width:b,height:w},ref:W,children:[(0,y.jsx)(q,{event:F,isOnFocus:R}),"9238315068"!==u&&(0,y.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"200%",overflow:"hidden",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,y.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",alignItems:"center",height:"100%",width:"100%"},children:[(0,y.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,y.jsx)("p",{children:" "})}),(0,y.jsx)("div",{style:{width:"100%"},children:U&&(0,m.imx)(u)?(0,y.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",style:"40273707171"===u?{backgroundColor:"white",borderRadius:"2px",margin:"5px"}:{},children:"40273707171"===u?(0,y.jsx)(B.Ay,{event:F}):(0,y.jsx)(M,{event:F})}):(0,y.jsx)("div",{height:"20px"})})]})})]})]}),"9238315068"===u&&U&&(0,m.imx)(u)&&(0,y.jsx)("div",{style:{width:b,marginBottom:s.tileBottomMMargin+"px"},className:"whatmore-event-tile-component-fade-in-animation",children:(0,y.jsx)(M,{event:F})}),ot&&(0,y.jsx)("div",{style:{width:b,padding:"15px 0"},children:(0,y.jsx)("button",{style:{backgroundColor:c,color:"white",border:"none",borderRadius:"12px",padding:"8px 8px",fontSize:it,fontFamily:x,fontWeight:"500",cursor:"pointer",textAlign:"center",letterSpacing:"0.5px",transition:"opacity 0.2s ease",width:"100%"},onClick:rt,onMouseEnter:t=>{t.target.style.opacity="0.8"},onMouseLeave:t=>{t.target.style.opacity="1"},children:"ADD TO CART"})})]})};const D=(0,s.A)({key:"whatmore-css-hv"});var W=function(t){var e;const[n,s,x]=(0,u.A)(),[v,w,A]=(0,g.A)(),[S]=(0,p.QN)("whatmoreShopId"),[C]=(0,p.QN)("whatmorePrimaryColor"),[k]=(0,p.QN)("whatmoreTitleFont"),F="portrait"==n?(0,p.Xd)("whatmoreTitleFontSizePortrait"):(0,p.Xd)("whatmoreTitleFontSize"),{whatmoreRootId:P}=(0,i.useContext)(f.B),R=t.events,T=t.onClick,M=null!==(e=(0,m.sa6)(S))&&void 0!==e?e:k;function I(t){T(t)}const O=parseInt(Math.floor(A));return delete l.Ay.styles.global,(0,y.jsx)(a.C,{value:D,children:(0,y.jsx)("div",{className:"whatmore-carousel-events-feed",children:(0,y.jsx)(r.s,{theme:l.Ay,cssVarsRoot:P,resetCSS:!1,children:(0,y.jsxs)(h.h.Provider,{value:{tileTopMargin:3,tileBottomMMargin:3,tileLeftMargin:3,tileRightMargin:3,showPlayButton:!1},children:[t.heading.trim().length>0?(0,y.jsx)(d.o,{paddingBottom:"28px",children:(0,y.jsx)(c.E,{bgColor:C,bgClip:"text",fontSize:F,sx:{fontFamily:M+" !important"},align:"center",children:t.heading})}):(0,y.jsx)(y.Fragment,{}),"landscape"===n?(0,y.jsx)(b,{renderElement:t=>{const e=t.eventData;return(0,y.jsx)("div",{style:{margin:"10px"},children:(0,j.ij)(e)||(0,j.Il)(e)?(0,y.jsx)(_,{isOnFocus:!0,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{I(e)}}):(0,y.jsx)(o.A,{isOnFocus:!0,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{I(e)}})})},dataList:R,elementsPerRow:O}):(0,y.jsx)(b,{renderElement:t=>{const e=t.eventData;return(0,y.jsx)("div",{style:{margin:"10px"},children:(0,y.jsx)(_,{isOnFocus:!0,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{I(e)}})})},dataList:R,elementsPerRow:O})]})})})})}}}]);
|
|
15
|
+
`,m=`\n ${p}; \n infinite;\n animation-duration:0.2s; \n animation-direction: linear ;\n animation-timing-function: ease-in;\n animation-fill-mode: forwards;\n`,f=`\n ${h}; \n infinite;\n animation-duration:0.2s; \n animation-direction: linear ;\n animation-timing-function: ease-in;\n animation-fill-mode: forwards;\n`;var x=n(5830),g=n(7509),v=n(4414);var y=function(t){var e,n,[u,p]=(0,s.A)();const[h]=(0,x.QN)("whatmorePrimaryFont");var y=(0,a.useContext)(g.h);const w=t.event,b=t.onClick,j=null===(e=t.isOnFocus)||void 0===e||e,A=(t.playOnUnfocus,null!==(n=t.animateOnFocus)&&void 0!==n&&n);return(0,v.jsxs)(i.az,{animation:A?j?m:f:"none",marginTop:y.tileTopMargin,marginBottom:y.tileBottomMMargin,marginLeft:y.tileLeftMargin,marginRight:y.tileRightMargin,width:p,height:u,borderRadius:"lg",sx:{boxShadow:"0px 0px 10px 3px #B0B0B0"},overflow:"hidden",onClick:()=>{b(w)},cursor:"pointer",children:[(0,v.jsx)(l._,{width:"full",height:"full",src:w.thumbnail_image,objectFit:"cover",fallback:(0,v.jsx)(c.A,{width:p,height:u}),borderRadius:"lg"}),(0,v.jsx)(i.az,{style:{position:"relative",zIndex:1,bottom:"100%",overflow:"hidden"},width:"full",height:"full",borderRadius:"lg",overflow:"hidden",className:"whatmore-ios-css-relative-fix",children:(0,v.jsxs)(o.B,{direction:"column",height:"full",width:"full",justifyContent:"space-between",children:[(0,v.jsx)(i.az,{w:"100%",borderRadius:"lg",bgGradient:"linear(to-t, transparent, blackAlpha.200, blackAlpha.400, blackAlpha.600)",children:(0,v.jsx)(o.B,{direction:"column",justifyContent:"flex-start",children:(0,v.jsx)(i.az,{width:"100%",marginLeft:"5px",marginRight:"5px",marginTop:"10px",children:(0,v.jsx)(o.B,{direction:"row",justifyContent:"space-between",children:(0,v.jsx)(d.A,{event:w,fontSize:.05*u+"px",maxWidth:.8*p})})})})}),(0,v.jsx)(i.az,{w:"100%",borderRadius:"lg",bgGradient:"linear(to-b, transparent, blackAlpha.300, blackAlpha.400, blackAlpha.500, blackAlpha.600)",children:(0,v.jsx)(o.B,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",alignContent:"center",children:(0,v.jsx)(i.az,{width:"full",borderRadius:"lg",children:(0,v.jsxs)(o.B,{direction:"column",justifyContent:"space-between",alignContent:"flex-start",marginLeft:"5px",marginRight:"5px",marginBottom:"2px",children:[(0,v.jsx)(r.E,{color:"white",fontSize:.08*p+"px",fontWeight:"normal",align:"left",children:" "}),(0,v.jsx)(r.E,{fontSize:.08*p+"px",fontWeight:"normal",align:"left",sx:{fontFamily:h+" !important",color:"white !important"},children:w.title.substring(0,40)}),(0,v.jsx)(r.E,{fontSize:.08*p+"px",fontWeight:"bold",align:"left",sx:{fontFamily:h+" !important",color:"white !important"},children:w.presenter_name.substring(0,15)})]})})})})]})})]})}},4826:function(){},5727:function(t,e,n){var i=n(4994);e.A=void 0;var o=i(n(9526)),r=n(4414);e.A=(0,o.default)((0,r.jsx)("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82"}),"PlayArrowRounded")},6989:function(t,e,n){n.r(e),n.d(e,{default:function(){return D}});var i=n(9950),o=n(3852),r=n(340),l=n(5089),a=(n(3997),n(9733),n(4365),n(572)),s=n(8603),d=n(6086),c=n(3731),u=n(1941),p=n(5830),h=n(7509),m=n(1348),f=n(5551),x=n(1422),g=n(932),v=n(6649),y=n(4414);function w(t){var e;const[n,i,o]=(0,v.A)({triggerOnce:!1}),r=null!==(e=t.defaultHeight)&&void 0!==e?e:"fit-content";return(0,y.jsx)(x.B,{ref:n,direction:"row",minHeight:r,height:r,width:"100%",justifyContent:"center",alignItems:"center",children:i?t.data.map((e,n)=>(0,y.jsx)("div",{children:t.renderElement({eventData:e})},"key"+n)):(0,y.jsx)("div",{style:{minHeight:{rowHeight:r},minWidth:"100%"}})})}function b(t){var e;const[n,i,o]=(0,g.A)(),r=null!==(e=t.elementsPerRow)&&void 0!==e?e:Math.floor(Math.min(o,t.dataList.length)),l=function(t,e){var n=[];const i=e;for(let o=0;o<t.length;o+=i){const e=t.slice(o,o+i);n.push(e)}return n}(t.dataList,r);return(0,y.jsx)(x.B,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-start",alignItems:"center",spacing:.2*n,children:l.map((e,o)=>(0,y.jsx)(w,{renderElement:t.renderElement,data:e,defaultHeight:n,defaultWidth:i},"key-"+o))})}var j=n(2039),A=(n(4826),n(9879)),S=n(9258),C=n(8538),k=n(6594),F=n(7973),P=n(8149),R=n(7740),M=n(22);var T=function(t){var e,n,o,r,[l,a,s,d,c]=(0,g.A)();const u="portrait"===c[M.dl],[h,f]=(0,i.useState)(0),[x,v]=(0,i.useState)(t.event),[w]=(0,p.QN)("whatmoreShopId"),b=(0,p.QN)("whatmoreUITheme"),[j]=(0,p.QN)("whatmorePrimaryFont"),[A]=(0,p.QN)("whatmoreSecondaryColorShade900"),S=x.products.length,[T,I]=(0,i.useState)(),[N,O]=(0,i.useState)(!1);if(0==S)return(0,y.jsx)(y.Fragment,{});(0,i.useEffect)(()=>{const t=setInterval(()=>{f(t=>(t+1)%S)},3e3);return()=>{clearInterval(t)}},[]),(0,i.useEffect)(()=>{(0,m.w4b)(w)?(0,k.fu)(x,(0,m.NCy)(w),w).then(t=>{v(t),O(!0)}):(async()=>{var t;const e=await(0,P.M)(null===x||void 0===x||null===(t=x.products)||void 0===t?void 0:t[0],(0,m.NCy)(w),w);I(e),O(!0)})()},[]);const z=(u?1.23*a*(0,m.HWj)(w):1.4*a*(0,m.N_4)(w))+"px",L=(u?1.15*a*(0,m.HWj)(w):1.31*a*(0,m.N_4)(w))+"px",B=(+x.products[h].price).toFixed(),E=(+x.products[h].compare_price).toFixed(),_=.25*a,q=(0,m.zAb)(w);return(0,y.jsxs)("div",{style:{background:"9238315068"===w?"transparent":(0,m.ivR)(w),display:"flex",flexDirection:q?"row":"column",padding:"10px 12px",gap:q?"8px":"6px",borderRadius:"round"==b?"0 0 12px 12px":"0",alignItems:q?"center":"stretch"},children:[(0,y.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"6px",flex:q?"1":"none"},children:[(0,y.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",z),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",j,"important"),t.style.setProperty("-webkit-line-clamp",1),t.style.setProperty("line-clamp",1,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"bolder"},children:(0,C.v)(x.products[h].title)}),(0,y.jsxs)("div",{style:{display:"flex",gap:"4px"},children:[N&&(0,y.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",L),t.style.setProperty("font-family",j,"important"),t.style.setProperty("overflow","hidden","important"))},style:{textAlign:"left",fontWeight:"bold"},children:(0,k.Sb)(parseFloat((0,R.U)()?(null===T||void 0===T?void 0:T.price)/100:null===x||void 0===x||null===(e=x.products)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.price)," ",w,x.products[h].currency)}),!isNaN(E)&&E>B&&N&&(0,y.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","#808191","important"),t.style.setProperty("font-size",L),t.style.setProperty("font-family",j,"important"),t.style.setProperty("overflow","hidden","important"))},style:{fontWeight:"bold",textDecoration:"line-through"},children:(0,k.Sb)(parseFloat((0,R.U)()?(null===T||void 0===T?void 0:T.compare_at_price)/100:null===x||void 0===x||null===(o=x.products)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.compare_price)," ",w,x.products[h].currency)})]})]}),q&&(0,y.jsx)("img",{ref:t=>{t&&t.style.setProperty("object-fit",(0,m.KZe)(w),"important")},src:(0,F.b)(x.products[h].thumbnail_image,"&width=400&height=400"),style:{width:_,height:_,borderRadius:"round"==b?"5px":"0px",backgroundColor:A,flexShrink:0},alt:"product img"})]})},I=n(6613),N=n(6305),O=n(4833),z=n(1351),L=n(6157),B=n(4533),E=n(9664);function _(t){const[e,n]=(0,g.A)(),[i]=(0,p.QN)("whatmoreShowViews"),o=t.event;return(0,y.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",overflow:"hidden",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,y.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-between",alignItems:"center"},children:(0,y.jsx)("div",{style:{width:"100%",backgroundImage:"linear-gradient(to top, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0.3))"},children:(0,y.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"flex-start",alignItems:"center"},children:"show"===i?(0,y.jsx)("div",{style:{width:"100%",marginLeft:"5px",marginRight:"5px",marginTop:"10px"},children:(0,y.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",paddingLeft:"5px",width:"fit-content",height:"fit-content",justifyContent:"space-between",alignItems:"center"},children:(0,y.jsx)(S.A,{event:o,fontSize:.07*n+"px"})})}):(0,y.jsx)(y.Fragment,{})})})})})}var q=function(t){var e,n,o,r,l,a,s=(0,i.useContext)(h.h);const d=(0,p.Xd)("whatmoreUITheme"),c=(0,p.Xd)("whatmoreSecondaryColor"),u=(0,p.Xd)("whatmoreShopId"),[x]=(0,p.QN)("whatmorePrimaryFont");var[w,b,j,S,C]=(0,g.A)();const k="portrait"===C[M.dl],F=t.event,P=t.onClick,R=null===(e=t.isOnFocus)||void 0===e||e,q=null!==(n=t.playOnUnfocus)&&void 0!==n&&n,W=null!==(o=t.animateOnFocus&&(0,m.n5O)(u))&&void 0!==o&&o,[D,U,Q]=(0,v.A)({triggerOnce:!0}),[H,X]=(0,i.useState)(!1),{whatmoreWidgetSourceDetails:V,whatmoreUserInfo:J}=(0,i.useContext)(f.B),Y=null!==(r=null===(l=F.products)||void 0===l?void 0:l.find(t=>"active"==t.product_status))&&void 0!==r?r:null===(a=F.products)||void 0===a?void 0:a[0],Z=Y&&Object.keys(Y).length>0,[K,G,$,tt,et,nt]=(0,N.A)(0,Y,F),it=.07*b+"px",ot=Z&&(0,m.Kr7)(u),rt=(0,m.ZzM)(u),lt=rt?"BUY NOW":"ADD TO CART",at=t=>{if(t.stopPropagation(),!Z)return;const e=V.landingLocationType,n=V.templateType,i=(0,O.Wd)(e)+(0,O.gf)(n)+(null!==F&&void 0!==F&&F.isRelatedEvent?"R":"E")+"_"+(null===F||void 0===F?void 0:F.event_id);if((0,B.Ch)(F.event_id,F.products,"homepage","carousel",i,null===F||void 0===F?void 0:F.location,null===J||void 0===J?void 0:J.userType),rt&&Y){const t=Y.product_link;if(t)return void window.open(t,"_blank")}"init"==K.state?(et(i,!0),(0,z.kz)({userInteractionType:L.O.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:V,event:F,productList:[Y],ctaList:F.cta})):"awaitingVariantSelection"==K.state&&nt(null,i)};return(0,y.jsxs)("div",{style:{display:"flex",flexDirection:"column",margin:"0 auto"},children:[(0,y.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top",s.tileTopMargin+"px","important"),t.style.setProperty("margin-bottom","9238315068"===u?"0px":s.tileBottomMMargin+"px","important"))},style:{width:b,height:w,borderRadius:"round"==d?"12px":"0px",borderWidth:"9238315068"===u?0:(0,m.MRv)(u),borderColor:"9238315068"===u?"transparent":"white"==(0,m.Fwt)(u)?c:(0,m.Fwt)(u),overflow:"hidden",cursor:"pointer",position:"relative"},className:W?R?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",onClick:()=>{P(F)},onMouseEnter:()=>X(!0),onMouseLeave:()=>X(!1),children:[(0,y.jsx)(A.A,{height:"100%",width:"100%",url:F.thumbnail_image,isPlaying:R||q||(0,I.At)(),event:F}),"9238315068"===u&&Z&&(H||k)&&(0,y.jsx)("div",{style:{position:"absolute",bottom:0,left:0,right:0,background:H||k?"rgba(0, 0, 0, 0.75)":"rgba(0, 0, 0, 0.6)",padding:"12px",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s ease",cursor:"pointer",transform:H||k?"translateY(0)":"translateY(100%)",opacity:H||k?1:0,zIndex:10},onClick:at,onMouseEnter:t=>{t.target.style.background="rgba(0, 0, 0, 0.85)"},onMouseLeave:t=>{t.target.style.background="rgba(0, 0, 0, 0.75)"},children:(0,y.jsx)("span",{style:{color:"white",fontSize:it,fontFamily:x,fontWeight:"500",textAlign:"center",letterSpacing:"0.5px"},children:lt})}),(0,y.jsxs)("div",{style:{width:b,height:w},ref:D,children:[(0,y.jsx)(_,{event:F,isOnFocus:R}),"9238315068"!==u&&(0,y.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"200%",overflow:"hidden",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,y.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",alignItems:"center",height:"100%",width:"100%"},children:[(0,y.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,y.jsx)("p",{children:" "})}),(0,y.jsx)("div",{style:{width:"100%"},children:U&&(0,m.imx)(u)?(0,y.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",style:"40273707171"===u?{backgroundColor:"white",borderRadius:"2px",margin:"5px"}:{},children:"40273707171"===u?(0,y.jsx)(E.Ay,{event:F}):(0,y.jsx)(T,{event:F})}):(0,y.jsx)("div",{height:"20px"})})]})})]})]}),"9238315068"===u&&U&&(0,m.imx)(u)&&(0,y.jsx)("div",{style:{width:b,marginBottom:s.tileBottomMMargin+"px"},className:"whatmore-event-tile-component-fade-in-animation",children:(0,y.jsx)(T,{event:F})}),ot&&(0,y.jsx)("div",{style:{width:b,padding:"15px 0"},children:(0,y.jsx)("button",{style:{backgroundColor:c,color:"white",border:"none",borderRadius:"12px",padding:"8px 8px",fontSize:it,fontFamily:x,fontWeight:"500",cursor:"pointer",textAlign:"center",letterSpacing:"0.5px",transition:"opacity 0.2s ease",width:"100%"},onClick:at,onMouseEnter:t=>{t.target.style.opacity="0.8"},onMouseLeave:t=>{t.target.style.opacity="1"},children:lt})})]})};const W=(0,s.A)({key:"whatmore-css-hv"});var D=function(t){var e;const[n,s,x]=(0,u.A)(),[v,w,A]=(0,g.A)(),[S]=(0,p.QN)("whatmoreShopId"),[C]=(0,p.QN)("whatmorePrimaryColor"),[k]=(0,p.QN)("whatmoreTitleFont"),F="portrait"==n?(0,p.Xd)("whatmoreTitleFontSizePortrait"):(0,p.Xd)("whatmoreTitleFontSize"),{whatmoreRootId:P}=(0,i.useContext)(f.B),R=t.events,M=t.onClick,T=null!==(e=(0,m.sa6)(S))&&void 0!==e?e:k;function I(t){M(t)}const N=parseInt(Math.floor(A));return delete l.Ay.styles.global,(0,y.jsx)(a.C,{value:W,children:(0,y.jsx)("div",{className:"whatmore-carousel-events-feed",children:(0,y.jsx)(r.s,{theme:l.Ay,cssVarsRoot:P,resetCSS:!1,children:(0,y.jsxs)(h.h.Provider,{value:{tileTopMargin:3,tileBottomMMargin:3,tileLeftMargin:3,tileRightMargin:3,showPlayButton:!1},children:[t.heading.trim().length>0?(0,y.jsx)(d.o,{paddingBottom:"28px",children:(0,y.jsx)(c.E,{bgColor:C,bgClip:"text",fontSize:F,sx:{fontFamily:T+" !important"},align:"center",children:t.heading})}):(0,y.jsx)(y.Fragment,{}),"landscape"===n?(0,y.jsx)(b,{renderElement:t=>{const e=t.eventData;return(0,y.jsx)("div",{style:{margin:"10px"},children:(0,j.ij)(e)||(0,j.Il)(e)?(0,y.jsx)(q,{isOnFocus:!0,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{I(e)}}):(0,y.jsx)(o.A,{isOnFocus:!0,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{I(e)}})})},dataList:R,elementsPerRow:N}):(0,y.jsx)(b,{renderElement:t=>{const e=t.eventData;return(0,y.jsx)("div",{style:{margin:"10px"},children:(0,y.jsx)(q,{isOnFocus:!0,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{I(e)}})})},dataList:R,elementsPerRow:N})]})})})})}}}]);
|