whatmore-react-assets 1.0.374 → 1.0.376
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 +1 -1
- package/static/js/{580.d18fbff9.chunk.js → 580.29c8dcc2.chunk.js} +1 -1
- package/static/js/{891.2dea7883.chunk.js → 891.24ef2324.chunk.js} +1 -1
- package/static/js/959.45be2922.chunk.js +1 -0
- package/static/js/972.db9af023.chunk.js +1 -0
- package/whatmore.js +2 -2
- package/static/js/959.267ba927.chunk.js +0 -1
- package/static/js/972.7be39e14.chunk.js +0 -1
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[580],{3580:function(t,e,n){n.r(e),n.d(e,{default:function(){return h}});var r=n(7313),o=n(8866),i=n(7753),s=(n(9111),n(123),n(9778),n(9854)),a=n(868),d=n(6417);var l=function(t){var e,n;const[l,p,c]=(0,o.Z)(),h=(0,i.MO)("whatmorePrimaryFont"),u=((0,i.MO)("whatmorePrimaryColor"),(0,i.MO)("whatmoreSecondaryColor")),f=(0,i.MO)("whatmoreShopId"),[x,m]=(0,r.useState)(!1),w=t.storyId,g=(0,a.V)(t.imageUrl),v=t.title,y=t.onClick,b=t.template,j=(0,s.f6)(f),z="template-stories-a"===b?"50%":"30%",k="portrait"==l?1:(0,s.Zy)(f),S=Math.floor(t.tileSize*k),C=.12*S*(0,s.LM)(f),F=null!==(e=(0,s.Q)(f))&&void 0!==e?e:h,L=null!==(n=(0,s.u2)(f))&&void 0!==n?n:[u,j,u,j,u];return(0,d.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignItems:"center",flexShrink:0,height:"fit-content",width:S*(0,s.jJ)(f)+"px",marginLeft:"10px",marginRight:"10px",marginTop:"10px",marginBottom:"10px",cursor:"pointer"},onClick:()=>{m(!0),y(w)},className:[x?"whatmore-scale-on-tap":""].join(" "),children:[(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:z,boxShadow:"0px 2px 1px 0px "+L[0]+"50, 0px -2px 1px 0px "+L[1]+"50, 2px 0px 1px 0px "+L[2]+"50, -2px 0px 1px 0px "+L[3]+"80, 2px -2px 1px 0px "+L[4]+"80, -2px 2px 1px 0px "+L[0]+"DA, 2px 2px 1px 0px "+L[1]+"DA, -2px -2px 1px 0px "+L[2]+"DA"},children:(0,d.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:S+"px",width:S+"px",borderRadius:z,border:"3px solid white",backgroundColor:"gray",overflow:"hidden"},children:(0,d.jsx)("img",{src:g,style:{objectFit:"cover",height:S+"px",width:S+"px",backgroundColor:"white"},alt:"story image"})})}),(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"100%",marginTop:"10px"},children:(0,d.jsx)("p",{ref:t=>{t&&t.style.setProperty("font-size",C+"px","important")},style:{textAlign:"center",color:(0,s.WS)(f),fontFamily:F,fontWeight:"normal",lineHeight:"110%",margin:0,padding:0,overflow:"hidden",textOverflow:"ellipsis"},children:v.substring(0,24)})})]})},p=n(9302);const c=(0,n(2575).Z)({key:"whatmore-stories-css"});var h=function(t){const[e,n,r]=(0,o.Z)(),[a]=(0,i.j1)("whatmoreLandscapePadding"),[h]=(0,i.j1)("whatmoreStoryTileSize"),[u]=(0,i.j1)("whatmoreStoryTileSizeDesktop"),[f]=(0,i.j1)("whatmoreShopId");var x=t.eventsStories;const m=t.onClick,w=t.template,g="landscape"===e?n*(u/100)*.3:r*(h/100)*.5;return(0,d.jsx)(p.C,{value:c,children:(0,d.jsx)("div",{style:{left:a+"px",right:a+"px",marginBottom:"portrait"==e?(0,s.cj)(f):(0,s.TM)(f)},children:"landscape"==e&&!(0,s.DF)(f)||"portrait"==e&&!(0,s.J)(f)?(0,d.jsx)(d.Fragment,{}):(0,d.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[580],{3580:function(t,e,n){n.r(e),n.d(e,{default:function(){return h}});var r=n(7313),o=n(8866),i=n(7753),s=(n(9111),n(123),n(9778),n(9854)),a=n(868),d=n(6417);var l=function(t){var e,n;const[l,p,c]=(0,o.Z)(),h=(0,i.MO)("whatmorePrimaryFont"),u=((0,i.MO)("whatmorePrimaryColor"),(0,i.MO)("whatmoreSecondaryColor")),f=(0,i.MO)("whatmoreShopId"),[x,m]=(0,r.useState)(!1),w=t.storyId,g=(0,a.V)(t.imageUrl),v=t.title,y=t.onClick,b=t.template,j=(0,s.f6)(f),z="template-stories-a"===b?"50%":"30%",k="portrait"==l?1:(0,s.Zy)(f),S=Math.floor(t.tileSize*k),C=.12*S*(0,s.LM)(f),F=null!==(e=(0,s.Q)(f))&&void 0!==e?e:h,L=null!==(n=(0,s.u2)(f))&&void 0!==n?n:[u,j,u,j,u];return(0,d.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignItems:"center",flexShrink:0,height:"fit-content",width:S*(0,s.jJ)(f)+"px",marginLeft:"10px",marginRight:"10px",marginTop:"10px",marginBottom:"10px",cursor:"pointer"},onClick:()=>{m(!0),y(w)},className:[x?"whatmore-scale-on-tap":""].join(" "),children:[(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:z,boxShadow:"0px 2px 1px 0px "+L[0]+"50, 0px -2px 1px 0px "+L[1]+"50, 2px 0px 1px 0px "+L[2]+"50, -2px 0px 1px 0px "+L[3]+"80, 2px -2px 1px 0px "+L[4]+"80, -2px 2px 1px 0px "+L[0]+"DA, 2px 2px 1px 0px "+L[1]+"DA, -2px -2px 1px 0px "+L[2]+"DA"},children:(0,d.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:S+"px",width:S+"px",borderRadius:z,border:"3px solid white",backgroundColor:"gray",overflow:"hidden"},children:(0,d.jsx)("img",{src:g,style:{objectFit:"cover",height:S+"px",width:S+"px",backgroundColor:"white"},alt:"story image"})})}),(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"100%",marginTop:"10px"},children:(0,d.jsx)("p",{ref:t=>{t&&t.style.setProperty("font-size",C+"px","important")},style:{textAlign:"center",color:(0,s.WS)(f),fontFamily:F,fontWeight:"normal",lineHeight:"110%",margin:0,padding:0,overflow:"hidden",textOverflow:"ellipsis"},children:v.substring(0,24)})})]})},p=n(9302);const c=(0,n(2575).Z)({key:"whatmore-stories-css"});var h=function(t){const[e,n,r]=(0,o.Z)(),[a]=(0,i.j1)("whatmoreLandscapePadding"),[h]=(0,i.j1)("whatmoreStoryTileSize"),[u]=(0,i.j1)("whatmoreStoryTileSizeDesktop"),[f]=(0,i.j1)("whatmoreShopId");var x=t.eventsStories;const m=t.onClick,w=t.template,g="landscape"===e?n*(u/100)*.3:r*(h/100)*.5;return(0,d.jsx)(p.C,{value:c,children:(0,d.jsx)("div",{style:{left:a+"px",right:a+"px",marginBottom:"portrait"==e?(0,s.cj)(f):(0,s.TM)(f)},children:"landscape"==e&&!(0,s.DF)(f)||"portrait"==e&&!(0,s.J)(f)?(0,d.jsx)(d.Fragment,{}):(0,d.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",height:"fit-content",width:"100%"},className:"whatmore-story-horizontal-flex",children:x.map(((t,e)=>(0,d.jsx)(l,{storyId:t.id,tileSize:g,onClick:t=>{m(e)},template:w,imageUrl:t.thumbnail_image,title:t.title},"whatmore-story-"+t.id)))})})})}},868:function(t,e,n){n.d(e,{V:function(){return a}});var r=n(9854),o=n(7753);const i={"https://d3syezql093hs1.cloudfront.net":"https://whatmore-brand-video-assets.azureedge.net","https://d2r0bijhs9mx1s.cloudfront.net":"https://whatmore-brand-thumbnail-video-assets.azureedge.net","https://d2oouab8j9eigo.cloudfront.net":"https://whatmore-brand-story-assets.azureedge.net","https://d28nus7q7qajdn.cloudfront.net":"https://whatmore-video-assets.azureedge.net","https://d1zl4k1t5o4s75.cloudfront.net":"https://whatmore-brand-video-assets-720p.azureedge.net"},s={"https://d3syezql093hs1.cloudfront.net":"https://whatmore-brand-video-assets.b-cdn.net","https://d2r0bijhs9mx1s.cloudfront.net":"https://whatmore-brand-thumbnail-video-assets.b-cdn.net","https://d2oouab8j9eigo.cloudfront.net":"https://whatmore-brand-story-assets.b-cdn.net","https://d28nus7q7qajdn.cloudfront.net":"https://whatmore-video-assets-old.b-cdn.net","https://d1zl4k1t5o4s75.cloudfront.net":"https://whatmore-brand-video-assets-720p.b-cdn.net"},a=function(t){const e=(0,o.MO)("whatmoreShopId");if(!t)return t;if(t.startsWith("https://cdn.shopify.com"))return t;if("AWSCDN"==(0,r.zp)(e))return t;if("AZURECDN"==(0,r.zp)(e)){if(t.includes(".azureedge.net"))return t;if(t.includes(".cloudfront.net")){for(const e of Object.keys(i))if(t.includes(e))return t.replace(e,i[e]);return t}}if("BUNNYCDN"==(0,r.zp)(e)){if(t.includes(".b-cdn.net"))return t;if(t.includes(".cloudfront.net")){for(const e of Object.keys(s))if(t.includes(e))return t.replace(e,s[e]);return t}}return t}},8866:function(t,e,n){var r=n(7313);function o(){return[window.innerHeight,window.innerWidth]}e.Z=function(t){var[e,n]=o();const[i,s]=(0,r.useState)(["portrait",e,n]);return(0,r.useLayoutEffect)((()=>{function t(){var[t,e]=o();s(t>e?["portrait",t,e]:["landscape",t,e])}return window.addEventListener("resize",t),window.addEventListener("orientationchange",t),screen.orientation&&screen.orientation.addEventListener("change",t),t(),()=>{window.removeEventListener("resize",t),window.removeEventListener("orientationchange",t),screen.orientation&&screen.orientation.removeEventListener("change",t)}}),[]),i}},9111:function(){},123:function(){},9778:function(){}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[891],{3867:function(t,e,i){var n=i(8816),r=i(417),o=i(4885),l=i(7753),s=i(4136),a=i(7313),d=i(6417);e.Z=function(t){var e;const{whatmoreUITheme:i}=(0,a.useContext)(s.I),[p]=(0,l.j1)("whatmoreSecondaryColor"),[c,h]=(0,l.j1)("productRatings"),x=(0,l.MO)("whatmorePrimaryFont"),y=(t.storeId,t.productId),f=(t.productLink,t.fontSize),m=null!==(e=t.fontColor)&&void 0!==e?e:"gray";if(null===c||"undefined"==typeof c||!(y in c)||c[y].avgRating>5)return(0,d.jsx)(d.Fragment,{});const u=c[y].avgRating,g=c[y].totalRatings;return(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center"},children:(0,d.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center",gap:"0px"},children:[[...Array(Math.floor(u))].map(((t,e)=>(0,d.jsx)(n.Z,{sx:{color:p,fontSize:f+"px"}},"star-icon"+e))),u-Math.floor(u)>.2?(0,d.jsx)(r.Z,{sx:{color:p,fontSize:f+"px"}},"star-half-icon"):u-Math.floor(u)==0?(0,d.jsx)(d.Fragment,{}):(0,d.jsx)(o.Z,{sx:{color:p,fontSize:f+"px"}},"star-outline-icon"),[...Array(Math.floor(5-u))].map(((t,e)=>(0,d.jsx)(o.Z,{sx:{color:p,fontSize:f+"px"}},"star-outline-icon-"+e))),(0,d.jsx)("div",{children:(0,d.jsx)("div",{width:"2px"})}),(0,d.jsx)("div",{children:(0,d.jsx)("div",{style:{backgroundColor:p,borderRadius:"round"==i?"2px":"0px",padding:"1px",overflow:"hidden"},children:(0,d.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color","white","important"),t.style.setProperty("font-size",.8*f+"px","important"),t.style.setProperty("font-family",x,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"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:"medium"},children:["\xa0",u,"\xa0"]})})}),(0,d.jsx)("div",{children:(0,d.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color",m,"important"),t.style.setProperty("font-size",.8*f+"px","important"),t.style.setProperty("font-family",x,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"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:"medium"},children:["\xa0","("+g+")"]})})]})})}},4095:function(t,e,i){i.r(e),i.d(e,{default:function(){return _}});var n=i(7313),r=i(6090),o=i(7616),l=(i(6143),i(7850),i(4444),i(7244),i(123),i(5892),i(1811),i(9302)),s=i(2575),a=i(2210),d=i(8486),p=i(9821),c=i(8866),h=i(2279),x=i.n(h),y=i(7753),f=i(7129),m=i(9854),u=i(4136),g=i(1855),w=i(4892),v=i(3933),j=i(1092),P=i(5945),C=i(5456),b=i(3867),I=i(9219),k=i(6417);const F=n.lazy((()=>Promise.all([i.e(576),i.e(803),i.e(607),i.e(12)]).then(i.bind(i,6163))));var S=function(t){const{whatmoreUITheme:e}=(0,n.useContext)(u.I);var[i,r]=(0,p.Z)();const[o]=(0,y.j1)("whatmorePrimaryFont"),[l]=(0,y.j1)("whatmoreSecondaryColorShade900"),[s]=(0,y.j1)("whatmoreShopId"),[a,d]=(0,n.useState)(0),[c,h]=(0,n.useState)(t.event),x=t.onClick,f=c.products.length;if(0==f)return(0,k.jsx)(k.Fragment,{});(0,n.useEffect)((()=>{const t=setInterval((()=>{d((t=>(t+1)%f))}),4e3);return()=>{clearInterval(t)}}),[]),(0,n.useEffect)((()=>{(0,m.N8)(s)&&(0,I.p_)(c,(0,m.Ip)(s),s).then((t=>{h(t)}))}),[]);const g=.3*r,w=g+"px",v=g+"px",j=.05*r+"px",S=.07*r,M=S+"px",O=.05*r;return(0,k.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-around",alignItems:"center",marginTop:"2px",marginBottom:"2px",gap:"0px"},children:[(0,k.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:.95*r,height:"fit-content",paddingLeft:"4px",paddingRight:"4px",justifyContent:"space-between",alignItems:"center",gap:"4px"},className:"whatmore-event-tile-product-scale-in-and-out-animation",onClick:x,children:[(0,k.jsx)("div",{style:{width:w,height:v,overflow:"hidden",backgroundColor:l,borderRadius:"round"==e?"5px":"0px",borderWidth:"0px"==(0,m.al)(s)?"2px":(0,m.al)(s),borderColor:"white"==(0,m.qP)(s)?l:(0,m.qP)(s)},children:(0,k.jsx)("img",{ref:t=>{t&&t.style.setProperty("object-fit",(0,m.yO)(s),"important")},src:c.products[a].thumbnail_image,style:{width:w,height:w,borderRadius:"round"==e?"5px":"0px",backgroundColor:l},alt:"product image"})}),(0,k.jsx)("div",{style:{width:.7*r+"px",height:"100%",overflow:"visible",marginBottom:"2px",marginRight:"2px",borderRadius:"round"==e?"5px":"0px"},children:(0,k.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",paddingTop:"5px"},children:[(0,k.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center"},children:(0,k.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",j,"important"),t.style.setProperty("line-height","140%","important"),t.style.setProperty("font-family",o,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"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:"medium"},children:(0,P.s)(c.products[a].title)})}),(0,k.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center",gap:"4px"},children:[(0,k.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",M,"important"),t.style.setProperty("line-height","140%","important"),t.style.setProperty("font-family",o,"important"))},style:{textAlign:"left",fontWeight:"medium",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:1,overflow:"hidden",textOverflow:"ellipsis"},children:[" ",(0,I.jx)(parseFloat(c.products[a].price),"",s,c.products[a].currency)]}),(0,k.jsx)("div",{children:(0,C.B)(c.products[a].price,c.products[a].compare_price)?(0,k.jsxs)("strike",{ref:t=>{t&&(t.style.setProperty("color","gray","important"),t.style.setProperty("font-size",.9*S+"px","important"),t.style.setProperty("line-height","140%","important"),t.style.setProperty("font-family",o,"important"),t.style.setProperty("text-decoration","line-through","important"))},style:{textAlign:"left",fontWeight:"medium",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:1,overflow:"hidden",textOverflow:"ellipsis"},children:[" ",(0,I.jx)(parseFloat(c.products[a].compare_price),"",s,c.products[a].currency)]}):(0,k.jsx)(k.Fragment,{})})]}),(0,k.jsx)(b.Z,{storeId:s,productId:c.products[a].client_product_id,productLink:c.products[a].product_link,fontSize:O})]})})]},a),(0,m.IX)(s)?(0,k.jsx)(n.Suspense,{children:(0,k.jsx)(F,{baseFontSize:.05*r,event:c,product:c.products[0],width:.9*r,height:"fit-content"})}):(0,k.jsx)(k.Fragment,{})]})},M=i(3388);function O(t){const[e,i,r,o,l]=(0,p.Z)(),{whatmoreUITheme:s}=(0,n.useContext)(u.I),a=(0,y.MO)("whatmoreShowViews"),d=(0,y.MO)("whatmoreShopId"),c=((0,y.MO)("whatmoreSecondaryColorShade600"),t.PRODUCT_BOX_HEIGHT),h=t.PRODUCT_BOX_HEIGHT_IN_PX,x=t.PRODUCT_BOX_MARGIN,[f,g,w]=(0,v.YD)({triggerOnce:!0}),P=t.event;t.isOnFocus;return(0,k.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,k.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-between",alignItems:"center"},children:[(0,k.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"flex-start",alignItems:"center",width:"100%"},onClick:()=>{t.onClick(P)},children:"show"===a?(0,k.jsx)("div",{style:{width:"100%",marginLeft:"5px",marginRight:"5px",marginTop:"10px"},children:(0,k.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",paddingLeft:"5px",width:"fit-content",height:"fit-content",justifyContent:"space-between",alignItems:"center"},children:(0,k.jsx)(j.Z,{event:P,fontSize:.07*i+"px"})})}):(0,k.jsx)(k.Fragment,{})}),(0,k.jsx)("div",{style:{display:"flex",width:"100%",height:e-c+"px"},onClick:()=>{t.onClick(P)}}),(0,M.xg)(P,d)?(0,k.jsx)("div",{style:{position:"relative",zIndex:1,bottom:x+"px",display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignItems:"center",width:.95*i,height:h,marginLeft:x+"px",marginRight:x+"px",backgroundColor:"white",borderRadius:"round"==s?"5px":"0px",borderWidth:(0,m.al)(d),borderColor:(0,m.qP)(d),paddingLeft:"5px",paddingRight:"5px",overflow:"hidden"},children:(0,k.jsx)("div",{ref:f,children:g&&(0,m.PW)(d)?(0,k.jsx)(S,{event:P,onClick:()=>{t.onClick(P)}}):(0,k.jsx)("div",{height:"20px"})})}):(0,k.jsx)(k.Fragment,{})]})})}var R=function(t){var e,i,r;const[o,l,s,a,d]=(0,p.Z)();var c=(0,n.useContext)(f.V);const{whatmoreUITheme:h}=(0,n.useContext)(u.I),x=(0,y.MO)("whatmoreShopId"),g=(0,y.MO)("whatmoreSecondaryColorShade600"),v=t.event,j=t.onClick,P=null===(e=t.isOnFocus)||void 0===e||e,C=null!==(i=t.playOnUnfocus)&&void 0!==i&&i,b=null!==(r=t.animateOnFocus&&(0,m.iW)(x))&&void 0!==r&&r,I=(0,m.IX)(x)?.7:.8,F=o*I+"px",S=1-I,R=o*S,z=o*S+"px",L=o*S*.1,Z=(0,m.nz)(x);return(0,k.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top",c.tileTopMargin+"px","important"),t.style.setProperty("margin-bottom",c.tileBottomMMargin+"px","important"))},style:{margin:"0 auto",width:l+"px",height:1.2*o+"px",borderRadius:"round"==h?"5px":"0px",boxShadow:"round"==h?Z:null,borderWidth:(0,m.al)(x),borderColor:(0,m.qP)(x),overflow:"hidden",cursor:"pointer",position:"relative"},className:b?P?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",onClick:()=>{},children:[(0,k.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"flex-start",alignItems:"center"},children:[(0,k.jsx)(w.Z,{height:F,width:"100%",url:v.thumbnail_image,isPlaying:P||C,event:v}),(0,M.xg)(v,x)?(0,k.jsx)("div",{style:{width:"100%",height:z,backgroundColor:g}}):(0,k.jsx)(k.Fragment,{})]}),(0,k.jsx)(O,{event:v,isOnFocus:P,PRODUCT_BOX_HEIGHT:R,PRODUCT_BOX_HEIGHT_IN_PX:z,PRODUCT_BOX_MARGIN:L,onClick:j})]})};const z=(0,s.Z)({key:"whatmore-css-hv"});function L(t){const[e,i,n]=(0,p.Z)(),r=(0,y.MO)("whatmoreShopId"),o=t.events,l=t.onClick;return(0,k.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,k.jsx)("div",{style:{width:window.innerWidth,height:"fit-content"},children:(0,k.jsx)(a.tq,{slidesPerView:n*(0,m.u6)(r),initialSlide:o.length>1?1:0,centeredSlides:!0,centeredSlidesBounds:!0,watchSlidesProgress:!0,touchRatio:.5,children:o.map((t=>(0,k.jsx)(a.o5,{children:e=>{let{isActive:i,isPrev:n,isNext:r,isVisible:o}=e;return n||r||i?(0,k.jsx)(R,{isOnFocus:i&&o,playOnUnfocus:!1,animateOnFocus:!0,event:t,onClick:()=>{l(t)}}):(0,k.jsx)(g.Z,{})}},"whatmore-event-tile-portrait-"+t.index)))})})})}function Z(t){const[e,i,r,o]=(0,p.Z)(),[l,s]=(0,n.useState)((c=r,Math.floor(Math.random()*Math.floor(c))));var c;const h=t.onClick,y=t.events,f=Math.min(r,y.length);return(0,k.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:o+"px",paddingRight:o+"px"},children:(0,k.jsx)("div",{style:{width:i*f*1.1+"px"},children:(0,k.jsx)(a.tq,{slidesPerView:f,watchSlidesProgress:!0,modules:[d.W_],navigation:!0,slidesPerGroup:parseInt(f),children:y.map(((t,e)=>{const i=x()((()=>s(e)),300);return(0,k.jsx)(a.o5,{onMouseEnter:()=>{i()},onMouseLeave:()=>{i.cancel()},children:i=>{let{isActive:n,isPrev:r,isNext:o,isVisible:s}=i;return s?(0,k.jsx)(R,{isOnFocus:e==l,playOnUnfocus:!0,animateOnFocus:!0,event:t,onClick:()=>{h(t)}}):(0,k.jsx)(g.Z,{})}},"whatmore-event-tile-landscape-"+t.index)}))})})})}var _=function(t){var e;const[i,s,a]=(0,c.Z)(),[d]=(0,y.j1)("whatmorePrimaryColor"),[p]=(0,y.j1)("whatmoreShopId"),[h]=(0,y.j1)("whatmoreSecondaryColor"),[x]=(0,y.j1)("whatmoreTitleFont"),g="portrait"==i?(0,y.MO)("whatmoreTitleFontSizePortrait"):(0,y.MO)("whatmoreTitleFontSize"),{whatmoreRootId:w}=(0,n.useContext)(u.I),v=t.events,j=t.onClick,P=null!==(e=(0,m.aR)(p))&&void 0!==e?e:x;function C(t){j(t)}return delete o.ZP.styles.global,(0,k.jsx)(l.C,{value:z,children:(0,k.jsx)("div",{children:(0,k.jsx)(r.x,{theme:o.ZP,cssVarsRoot:w,resetCSS:!1,children:(0,k.jsxs)(f.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!1},children:[t.heading.trim().length>0?(0,k.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,k.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-family",P,"important"),t.style.setProperty("font-size",g+"px","important"))},style:{color:d,backgroundClip:"text",textAlign:"center"},children:t.heading})}):(0,k.jsx)(k.Fragment,{}),"landscape"===i?(0,k.jsx)(Z,{events:v,onClick:C}):(0,k.jsx)(L,{events:v,onClick:C})]})})})})}},1092:function(t,e,i){var n=i(237),r=i(9854),o=i(7753),l=i(4136),s=i(7313),a=i(6417);function d(t){return t<1e3?t:t<1e5?(t/1e3).toFixed(0)+"K":(t/1e5).toFixed(0)+"L"}e.Z=function(t){const{whatmoreUITheme:e}=(0,s.useContext)(l.I),i=(0,o.MO)("whatmoreShopId"),p=(0,o.MO)("whatmorePrimaryFont"),c=t.event,h=t.fontSize;if(c.total_views<=0)return(0,a.jsx)(a.Fragment,{});const x=(0,r.S_)(i);return"template-icon"==x?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,r.XC)(i),color:"white",borderRadius:"round"==e?"5px":"0px",borderWidth:(0,r.al)(i),borderColor:(0,r.qP)(i)},children:(0,a.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:[(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)(n.Z,{sx:{color:(0,r.aL)(i)+" !important",fontSize:h,fontWeight:"normal"}})}),(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,r.aL)(i),"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",p,"important"),t.style.setProperty("font-size",h,"important"),t.style.setProperty("min-height","0","important"),t.style.setProperty("display","inline","important"))},style:{fontWeight:"normal"},children:" "+d(c.total_views)+" "})})]})})}):"template-text"==x?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,r.XC)(i),color:"white",borderRadius:"round"==e?"5px":"0px",borderWidth:(0,r.al)(i),borderColor:(0,r.qP)(i)},children:(0,a.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,r.aL)(i),"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",p,"important"))},style:{fontSize:h,fontWeight:"bold"},children:" "+d(c.total_views)+" views"})})})})}):void 0}},7129:function(t,e,i){i.d(e,{V:function(){return n}});const n=(0,i(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},1855:function(t,e,i){var n=i(7313),r=i(9821),o=i(7129),l=i(6417);e.Z=function(t){var[e,i]=(0,r.Z)();return(0,n.useContext)(o.V),t.event,(0,l.jsx)("div",{style:{margin:"0 auto",width:i,height:e,overflow:"hidden"}})}},5456:function(t,e,i){i.d(e,{B:function(){return n}});const n=function(t,e){return!(isNaN(e)||!e||("string"===typeof e||e instanceof String)&&!e.trim().length)&&!(parseInt(e)<=parseInt(t))}},8816:function(t,e,i){var n=i(5318);e.Z=void 0;var r=n(i(5045)),o=i(6417),l=(0,r.default)((0,o.jsx)("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star");e.Z=l},417:function(t,e,i){var n=i(5318);e.Z=void 0;var r=n(i(5045)),o=i(6417),l=(0,r.default)((0,o.jsx)("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarHalf");e.Z=l},4885:function(t,e,i){var n=i(5318);e.Z=void 0;var r=n(i(5045)),o=i(6417),l=(0,r.default)((0,o.jsx)("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarOutline");e.Z=l},237:function(t,e,i){var n=i(5318);e.Z=void 0;var r=n(i(5045)),o=i(6417),l=(0,r.default)((0,o.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility");e.Z=l},5892:function(){},4444:function(){},1811:function(){},7850:function(){}}]);
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[891],{3867:function(t,e,i){var n=i(8816),r=i(417),o=i(4885),l=i(7753),s=i(4136),a=i(7313),d=i(6417);e.Z=function(t){var e;const{whatmoreUITheme:i}=(0,a.useContext)(s.I),[p]=(0,l.j1)("whatmoreSecondaryColor"),[c,h]=(0,l.j1)("productRatings"),x=(0,l.MO)("whatmorePrimaryFont"),y=(t.storeId,t.productId),f=(t.productLink,t.fontSize),m=null!==(e=t.fontColor)&&void 0!==e?e:"gray";if(null===c||"undefined"==typeof c||!(y in c)||c[y].avgRating>5)return(0,d.jsx)(d.Fragment,{});const u=c[y].avgRating,g=c[y].totalRatings;return(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center"},children:(0,d.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center",gap:"0px"},children:[[...Array(Math.floor(u))].map(((t,e)=>(0,d.jsx)(n.Z,{sx:{color:p,fontSize:f+"px"}},"star-icon"+e))),u-Math.floor(u)>.2?(0,d.jsx)(r.Z,{sx:{color:p,fontSize:f+"px"}},"star-half-icon"):u-Math.floor(u)==0?(0,d.jsx)(d.Fragment,{}):(0,d.jsx)(o.Z,{sx:{color:p,fontSize:f+"px"}},"star-outline-icon"),[...Array(Math.floor(5-u))].map(((t,e)=>(0,d.jsx)(o.Z,{sx:{color:p,fontSize:f+"px"}},"star-outline-icon-"+e))),(0,d.jsx)("div",{children:(0,d.jsx)("div",{width:"2px"})}),(0,d.jsx)("div",{children:(0,d.jsx)("div",{style:{backgroundColor:p,borderRadius:"round"==i?"2px":"0px",padding:"1px",overflow:"hidden"},children:(0,d.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color","white","important"),t.style.setProperty("font-size",.8*f+"px","important"),t.style.setProperty("font-family",x,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"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:"medium"},children:["\xa0",u,"\xa0"]})})}),(0,d.jsx)("div",{children:(0,d.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color",m,"important"),t.style.setProperty("font-size",.8*f+"px","important"),t.style.setProperty("font-family",x,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"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:"medium"},children:["\xa0","("+g+")"]})})]})})}},4095:function(t,e,i){i.r(e),i.d(e,{default:function(){return _}});var n=i(7313),r=i(6090),o=i(7616),l=(i(6143),i(7850),i(4444),i(7244),i(123),i(5892),i(1811),i(9302)),s=i(2575),a=i(2210),d=i(8486),p=i(9821),c=i(8866),h=i(2279),x=i.n(h),y=i(7753),f=i(7129),m=i(9854),u=i(4136),g=i(1855),w=i(4892),v=i(3933),j=i(1092),P=i(5945),C=i(5456),b=i(3867),I=i(9219),k=i(6417);const F=n.lazy((()=>Promise.all([i.e(576),i.e(803),i.e(607),i.e(12)]).then(i.bind(i,6163))));var S=function(t){const{whatmoreUITheme:e}=(0,n.useContext)(u.I);var[i,r]=(0,p.Z)();const[o]=(0,y.j1)("whatmorePrimaryFont"),[l]=(0,y.j1)("whatmoreSecondaryColorShade900"),[s]=(0,y.j1)("whatmoreShopId"),[a,d]=(0,n.useState)(0),[c,h]=(0,n.useState)(t.event),x=t.onClick,f=c.products.length;if(0==f)return(0,k.jsx)(k.Fragment,{});(0,n.useEffect)((()=>{const t=setInterval((()=>{d((t=>(t+1)%f))}),4e3);return()=>{clearInterval(t)}}),[]),(0,n.useEffect)((()=>{(0,m.N8)(s)&&(0,I.p_)(c,(0,m.Ip)(s),s).then((t=>{h(t)}))}),[]);const g=.3*r,w=g+"px",v=g+"px",j=.05*r+"px",S=.07*r,M=S+"px",O=.05*r;return(0,k.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-around",alignItems:"center",marginTop:"2px",marginBottom:"2px",gap:"0px"},children:[(0,k.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:.95*r,height:"fit-content",paddingLeft:"4px",paddingRight:"4px",justifyContent:"space-between",alignItems:"center",gap:"4px"},className:"whatmore-event-tile-product-scale-in-and-out-animation",onClick:x,children:[(0,k.jsx)("div",{style:{width:w,height:v,overflow:"hidden",backgroundColor:l,borderRadius:"round"==e?"5px":"0px",borderWidth:"0px"==(0,m.al)(s)?"2px":(0,m.al)(s),borderColor:"white"==(0,m.qP)(s)?l:(0,m.qP)(s)},children:(0,k.jsx)("img",{ref:t=>{t&&t.style.setProperty("object-fit",(0,m.yO)(s),"important")},src:c.products[a].thumbnail_image,style:{width:w,height:w,borderRadius:"round"==e?"5px":"0px",backgroundColor:l},alt:"product image"})}),(0,k.jsx)("div",{style:{width:.7*r+"px",height:"100%",overflow:"visible",marginBottom:"2px",marginRight:"2px",borderRadius:"round"==e?"5px":"0px"},children:(0,k.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",paddingTop:"5px"},children:[(0,k.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center"},children:(0,k.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",j,"important"),t.style.setProperty("line-height","140%","important"),t.style.setProperty("font-family",o,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"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:"medium"},children:(0,P.s)(c.products[a].title)})}),(0,k.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center",gap:"4px"},children:[(0,k.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",M,"important"),t.style.setProperty("line-height","140%","important"),t.style.setProperty("font-family",o,"important"))},style:{textAlign:"left",fontWeight:"medium",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:1,overflow:"hidden",textOverflow:"ellipsis"},children:[" ",(0,I.jx)(parseFloat(c.products[a].price),"",s,c.products[a].currency)]}),(0,k.jsx)("div",{children:(0,C.B)(c.products[a].price,c.products[a].compare_price)?(0,k.jsxs)("strike",{ref:t=>{t&&(t.style.setProperty("color","gray","important"),t.style.setProperty("font-size",.9*S+"px","important"),t.style.setProperty("line-height","140%","important"),t.style.setProperty("font-family",o,"important"),t.style.setProperty("text-decoration","line-through","important"))},style:{textAlign:"left",fontWeight:"medium",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:1,overflow:"hidden",textOverflow:"ellipsis"},children:[" ",(0,I.jx)(parseFloat(c.products[a].compare_price),"",s,c.products[a].currency)]}):(0,k.jsx)(k.Fragment,{})})]}),(0,k.jsx)(b.Z,{storeId:s,productId:c.products[a].client_product_id,productLink:c.products[a].product_link,fontSize:O})]})})]},a),(0,m.IX)(s)?(0,k.jsx)(n.Suspense,{children:(0,k.jsx)(F,{baseFontSize:.05*r,event:c,product:c.products[0],width:.9*r,height:"fit-content"})}):(0,k.jsx)(k.Fragment,{})]})},M=i(3388);function O(t){const[e,i,r,o,l]=(0,p.Z)(),{whatmoreUITheme:s}=(0,n.useContext)(u.I),a=(0,y.MO)("whatmoreShowViews"),d=(0,y.MO)("whatmoreShopId"),c=((0,y.MO)("whatmoreSecondaryColorShade600"),t.PRODUCT_BOX_HEIGHT),h=t.PRODUCT_BOX_HEIGHT_IN_PX,x=t.PRODUCT_BOX_MARGIN,[f,g,w]=(0,v.YD)({triggerOnce:!0}),P=t.event;t.isOnFocus;return(0,k.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,k.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-between",alignItems:"center"},children:[(0,k.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"flex-start",alignItems:"center",width:"100%"},onClick:()=>{t.onClick(P)},children:"show"===a?(0,k.jsx)("div",{style:{width:"100%",marginLeft:"5px",marginRight:"5px",marginTop:"10px"},children:(0,k.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",paddingLeft:"5px",width:"fit-content",height:"fit-content",justifyContent:"space-between",alignItems:"center"},children:(0,k.jsx)(j.Z,{event:P,fontSize:.07*i+"px"})})}):(0,k.jsx)(k.Fragment,{})}),(0,k.jsx)("div",{style:{display:"flex",width:"100%",height:e-c+"px"},onClick:()=>{t.onClick(P)}}),(0,M.xg)(P,d)?(0,k.jsx)("div",{style:{position:"relative",zIndex:1,bottom:x+"px",display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignItems:"center",width:.95*i,height:h,marginLeft:x+"px",marginRight:x+"px",backgroundColor:"white",borderRadius:"round"==s?"5px":"0px",borderWidth:(0,m.al)(d),borderColor:(0,m.qP)(d),paddingLeft:"5px",paddingRight:"5px",overflow:"hidden"},children:(0,k.jsx)("div",{ref:f,children:g&&(0,m.PW)(d)?(0,k.jsx)(S,{event:P,onClick:()=>{t.onClick(P)}}):(0,k.jsx)("div",{height:"20px"})})}):(0,k.jsx)(k.Fragment,{})]})})}var R=function(t){var e,i,r;const[o,l,s,a,d]=(0,p.Z)();var c=(0,n.useContext)(f.V);const{whatmoreUITheme:h}=(0,n.useContext)(u.I),x=(0,y.MO)("whatmoreShopId"),g=(0,y.MO)("whatmoreSecondaryColorShade600"),v=t.event,j=t.onClick,P=null===(e=t.isOnFocus)||void 0===e||e,C=null!==(i=t.playOnUnfocus)&&void 0!==i&&i,b=null!==(r=t.animateOnFocus&&(0,m.iW)(x))&&void 0!==r&&r,I=(0,m.IX)(x)?.7:.8,F=o*I+"px",S=1-I,R=o*S,z=o*S+"px",L=o*S*.1,Z=(0,m.nz)(x);return(0,k.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top",c.tileTopMargin+"px","important"),t.style.setProperty("margin-bottom",c.tileBottomMMargin+"px","important"))},style:{margin:"0 auto",width:l+"px",height:1.2*o+"px",borderRadius:"round"==h?"5px":"0px",boxShadow:"round"==h?Z:null,borderWidth:(0,m.al)(x),borderColor:(0,m.qP)(x),overflow:"hidden",cursor:"pointer",position:"relative"},className:b?P?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",onClick:()=>{},children:[(0,k.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"flex-start",alignItems:"center"},children:[(0,k.jsx)(w.Z,{height:F,width:"100%",url:v.thumbnail_image,isPlaying:P||C,event:v}),(0,M.xg)(v,x)?(0,k.jsx)("div",{style:{width:"100%",height:z,backgroundColor:g}}):(0,k.jsx)(k.Fragment,{})]}),(0,k.jsx)(O,{event:v,isOnFocus:P,PRODUCT_BOX_HEIGHT:R,PRODUCT_BOX_HEIGHT_IN_PX:z,PRODUCT_BOX_MARGIN:L,onClick:j})]})};const z=(0,s.Z)({key:"whatmore-css-hv"});function L(t){const[e,i,n]=(0,p.Z)(),r=(0,y.MO)("whatmoreShopId"),o=t.events,l=t.onClick,s=n*(0,m.u6)(r);return(0,k.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,k.jsx)("div",{style:{width:window.innerWidth,height:"fit-content"},children:(0,k.jsx)(a.tq,{slidesPerView:o.length>1?s:1,initialSlide:o.length>1?1:0,centeredSlides:!0,centeredSlidesBounds:!0,watchSlidesProgress:!0,touchRatio:.5,children:o.map((t=>(0,k.jsx)(a.o5,{children:e=>{let{isActive:i,isPrev:n,isNext:r,isVisible:o}=e;return n||r||i?(0,k.jsx)(R,{isOnFocus:i&&o,playOnUnfocus:!1,animateOnFocus:!0,event:t,onClick:()=>{l(t)}}):(0,k.jsx)(g.Z,{})}},"whatmore-event-tile-portrait-"+t.index)))})})})}function Z(t){const[e,i,r,o]=(0,p.Z)(),[l,s]=(0,n.useState)((c=r,Math.floor(Math.random()*Math.floor(c))));var c;const h=t.onClick,y=t.events,f=Math.min(r,y.length);return(0,k.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:o+"px",paddingRight:o+"px"},children:(0,k.jsx)("div",{style:{width:i*f*1.1+"px"},children:(0,k.jsx)(a.tq,{slidesPerView:f,watchSlidesProgress:!0,modules:[d.W_],navigation:!0,slidesPerGroup:parseInt(f),children:y.map(((t,e)=>{const i=x()((()=>s(e)),300);return(0,k.jsx)(a.o5,{onMouseEnter:()=>{i()},onMouseLeave:()=>{i.cancel()},children:i=>{let{isActive:n,isPrev:r,isNext:o,isVisible:s}=i;return s?(0,k.jsx)(R,{isOnFocus:e==l,playOnUnfocus:!0,animateOnFocus:!0,event:t,onClick:()=>{h(t)}}):(0,k.jsx)(g.Z,{})}},"whatmore-event-tile-landscape-"+t.index)}))})})})}var _=function(t){var e;const[i,s,a]=(0,c.Z)(),[d]=(0,y.j1)("whatmorePrimaryColor"),[p]=(0,y.j1)("whatmoreShopId"),[h]=(0,y.j1)("whatmoreSecondaryColor"),[x]=(0,y.j1)("whatmoreTitleFont"),g="portrait"==i?(0,y.MO)("whatmoreTitleFontSizePortrait"):(0,y.MO)("whatmoreTitleFontSize"),{whatmoreRootId:w}=(0,n.useContext)(u.I),v=t.events,j=t.onClick,P=null!==(e=(0,m.aR)(p))&&void 0!==e?e:x;function C(t){j(t)}return delete o.ZP.styles.global,(0,k.jsx)(l.C,{value:z,children:(0,k.jsx)("div",{children:(0,k.jsx)(r.x,{theme:o.ZP,cssVarsRoot:w,resetCSS:!1,children:(0,k.jsxs)(f.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!1},children:[t.heading.trim().length>0?(0,k.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,k.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-family",P,"important"),t.style.setProperty("font-size",g+"px","important"))},style:{color:d,backgroundClip:"text",textAlign:"center"},children:t.heading})}):(0,k.jsx)(k.Fragment,{}),"landscape"===i?(0,k.jsx)(Z,{events:v,onClick:C}):(0,k.jsx)(L,{events:v,onClick:C})]})})})})}},1092:function(t,e,i){var n=i(237),r=i(9854),o=i(7753),l=i(4136),s=i(7313),a=i(6417);function d(t){return t<1e3?t:t<1e5?(t/1e3).toFixed(0)+"K":(t/1e5).toFixed(0)+"L"}e.Z=function(t){const{whatmoreUITheme:e}=(0,s.useContext)(l.I),i=(0,o.MO)("whatmoreShopId"),p=(0,o.MO)("whatmorePrimaryFont"),c=t.event,h=t.fontSize;if(c.total_views<=0)return(0,a.jsx)(a.Fragment,{});const x=(0,r.S_)(i);return"template-icon"==x?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,r.XC)(i),color:"white",borderRadius:"round"==e?"5px":"0px",borderWidth:(0,r.al)(i),borderColor:(0,r.qP)(i)},children:(0,a.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:[(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)(n.Z,{sx:{color:(0,r.aL)(i)+" !important",fontSize:h,fontWeight:"normal"}})}),(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,r.aL)(i),"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",p,"important"),t.style.setProperty("font-size",h,"important"),t.style.setProperty("min-height","0","important"),t.style.setProperty("display","inline","important"))},style:{fontWeight:"normal"},children:" "+d(c.total_views)+" "})})]})})}):"template-text"==x?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,r.XC)(i),color:"white",borderRadius:"round"==e?"5px":"0px",borderWidth:(0,r.al)(i),borderColor:(0,r.qP)(i)},children:(0,a.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,r.aL)(i),"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",p,"important"))},style:{fontSize:h,fontWeight:"bold"},children:" "+d(c.total_views)+" views"})})})})}):void 0}},7129:function(t,e,i){i.d(e,{V:function(){return n}});const n=(0,i(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},1855:function(t,e,i){var n=i(7313),r=i(9821),o=i(7129),l=i(6417);e.Z=function(t){var[e,i]=(0,r.Z)();return(0,n.useContext)(o.V),t.event,(0,l.jsx)("div",{style:{margin:"0 auto",width:i,height:e,overflow:"hidden"}})}},5456:function(t,e,i){i.d(e,{B:function(){return n}});const n=function(t,e){return!(isNaN(e)||!e||("string"===typeof e||e instanceof String)&&!e.trim().length)&&!(parseInt(e)<=parseInt(t))}},8816:function(t,e,i){var n=i(5318);e.Z=void 0;var r=n(i(5045)),o=i(6417),l=(0,r.default)((0,o.jsx)("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star");e.Z=l},417:function(t,e,i){var n=i(5318);e.Z=void 0;var r=n(i(5045)),o=i(6417),l=(0,r.default)((0,o.jsx)("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarHalf");e.Z=l},4885:function(t,e,i){var n=i(5318);e.Z=void 0;var r=n(i(5045)),o=i(6417),l=(0,r.default)((0,o.jsx)("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarOutline");e.Z=l},237:function(t,e,i){var n=i(5318);e.Z=void 0;var r=n(i(5045)),o=i(6417),l=(0,r.default)((0,o.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility");e.Z=l},5892:function(){},4444:function(){},1811:function(){},7850:function(){}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[959],{4048:function(e,t,n){n.r(t);var i=n(7313),o=n(6090),r=n(7616),l=(n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811),n(9302)),s=n(2575),a=n(2210),d=n(8486),c=n(9821),h=n(8866),p=n(2279),x=n.n(p),m=n(7753),f=n(7129),u=n(1855),y=n(9854),g=n(4136),w=n(4920),v=n(6417);const j=(0,s.Z)({key:"whatmore-css-hv"});function b(e){const[t,n,i]=(0,c.Z)(),o=(0,m.MO)("whatmoreShopId"),r=e.events,l=e.onClick,s=i*(0,y.u6)(o);return(0,v.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,v.jsx)("div",{style:{width:window.innerWidth,height:"fit-content"},children:(0,v.jsx)(a.tq,{slidesPerView:r.length>1?s:1,initialSlide:r.length>1?1:0,centeredSlides:!0,centeredSlidesBounds:!0,watchSlidesProgress:!0,touchRatio:.5,children:r.map((e=>(0,v.jsx)(a.o5,{children:t=>{let{isActive:n,isPrev:i,isNext:o,isVisible:r}=t;return i||o||n?(0,v.jsx)(w.Z,{isOnFocus:n&&r,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{l(e)}}):(0,v.jsx)(u.Z,{})}},"whatmore-event-tile-portrait-"+e.index)))})})})}function C(e){const[t,n,o,r]=(0,c.Z)(),[l,s]=(0,i.useState)((h=o,Math.floor(Math.random()*Math.floor(h))));var h;const p=e.onClick,m=e.events,f=Math.min(o,m.length);return(0,v.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:r+"px",paddingRight:r+"px"},children:(0,v.jsx)("div",{style:{width:n*f*1.1+"px"},children:(0,v.jsx)(a.tq,{slidesPerView:f,watchSlidesProgress:!0,modules:[d.W_],navigation:!0,slidesPerGroup:parseInt(f),children:m.map(((e,t)=>{const n=x()((()=>s(t)),300);return(0,v.jsx)(a.o5,{onMouseEnter:()=>{n()},onMouseLeave:()=>{n.cancel()},children:n=>{let{isActive:i,isPrev:o,isNext:r,isVisible:s}=n;return s?(0,v.jsx)(w.Z,{isOnFocus:t==l,playOnUnfocus:!0,animateOnFocus:!0,event:e,onClick:()=>{p(e)}}):(0,v.jsx)(u.Z,{})}},"whatmore-event-tile-landscape-"+e.index)}))})})})}t.default=function(e){var t;const[n,s,a]=(0,h.Z)(),[d]=(0,m.j1)("whatmoreShopId"),[c]=(0,m.j1)("whatmorePrimaryColor"),[p]=(0,m.j1)("whatmoreSecondaryColor"),[x]=(0,m.j1)("whatmoreTitleFont"),u="portrait"==n?(0,m.MO)("whatmoreTitleFontSizePortrait"):(0,m.MO)("whatmoreTitleFontSize"),{whatmoreRootId:w}=(0,i.useContext)(g.I),P=e.events,F=e.onClick,I=null!==(t=(0,y.aR)(d))&&void 0!==t?t:x;function S(e){F(e)}return delete r.ZP.styles.global,(0,v.jsx)(l.C,{value:j,children:(0,v.jsx)("div",{children:(0,v.jsx)(o.x,{theme:r.ZP,cssVarsRoot:w,resetCSS:!1,children:(0,v.jsxs)(f.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[e.heading.trim().length>0?(0,v.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,v.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-family",I,"important"),e.style.setProperty("font-size",u+"px","important"))},style:{color:c,backgroundClip:"text",textAlign:"center"},children:e.heading})}):(0,v.jsx)(v.Fragment,{}),"landscape"===n?(0,v.jsx)(C,{events:P,onClick:S}):(0,v.jsx)(b,{events:P,onClick:S})]})})})})}},1092:function(e,t,n){var i=n(237),o=n(9854),r=n(7753),l=n(4136),s=n(7313),a=n(6417);function d(e){return e<1e3?e:e<1e5?(e/1e3).toFixed(0)+"K":(e/1e5).toFixed(0)+"L"}t.Z=function(e){const{whatmoreUITheme:t}=(0,s.useContext)(l.I),n=(0,r.MO)("whatmoreShopId"),c=(0,r.MO)("whatmorePrimaryFont"),h=e.event,p=e.fontSize;if(h.total_views<=0)return(0,a.jsx)(a.Fragment,{});const x=(0,o.S_)(n);return"template-icon"==x?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,o.XC)(n),color:"white",borderRadius:"round"==t?"5px":"0px",borderWidth:(0,o.al)(n),borderColor:(0,o.qP)(n)},children:(0,a.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:[(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)(i.Z,{sx:{color:(0,o.aL)(n)+" !important",fontSize:p,fontWeight:"normal"}})}),(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,o.aL)(n),"important"),e.style.setProperty("line-height","120%","important"),e.style.setProperty("font-family",c,"important"),e.style.setProperty("font-size",p,"important"),e.style.setProperty("min-height","0","important"),e.style.setProperty("display","inline","important"))},style:{fontWeight:"normal"},children:" "+d(h.total_views)+" "})})]})})}):"template-text"==x?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,o.XC)(n),color:"white",borderRadius:"round"==t?"5px":"0px",borderWidth:(0,o.al)(n),borderColor:(0,o.qP)(n)},children:(0,a.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,o.aL)(n),"important"),e.style.setProperty("line-height","120%","important"),e.style.setProperty("font-family",c,"important"))},style:{fontSize:p,fontWeight:"bold"},children:" "+d(h.total_views)+" views"})})})})}):void 0}},7129:function(e,t,n){n.d(t,{V:function(){return i}});const i=(0,n(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},5945:function(e,t,n){function i(e){return"undefined"==typeof e||"undefined"==e||null==e?"":e.replace(/\w\S*/g,(function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}))}n.d(t,{s:function(){return i}})},1855:function(e,t,n){var i=n(7313),o=n(9821),r=n(7129),l=n(6417);t.Z=function(e){var[t,n]=(0,o.Z)();return(0,i.useContext)(r.V),e.event,(0,l.jsx)("div",{style:{margin:"0 auto",width:n,height:t,overflow:"hidden"}})}},4920:function(e,t,n){n.d(t,{Z:function(){return j}});var i=n(7313),o=n(9821),r=(n(3439),n(9723)),l=n(7753),s=n(4892),a=n(7129),d=n(6805),c=n(9854),h=n(1092),p=n(5945),x=n(4136),m=n(6417);var f=function(e){var[t,n]=(0,o.Z)();const{whatmoreUITheme:r}=(0,i.useContext)(x.I),[s]=(0,l.j1)("whatmorePrimaryFont"),[a]=(0,l.j1)("whatmorePrimaryColor"),[d]=(0,l.j1)("whatmoreSecondaryColor"),[h,f]=(0,i.useState)(0),u=(0,l.MO)("whatmoreShopId"),y=e.event,g=y.products.length;if(0==g)return(0,m.jsx)(m.Fragment,{});(0,i.useEffect)((()=>{const e=setInterval((()=>{f((e=>(e+1)%g))}),3e3);return()=>{clearInterval(e)}}),[]);const w=.3*n,v=w+"px",j=w+"px",b=.07*n+"px";return(0,m.jsx)("div",{style:{width:n+"px",height:"fit-content",backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0.3)"},children:(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"space-between",alignItems:"center",paddingLeft:"5px",paddingRight:"5px",paddingTop:"5px",paddingBottom:"5px",gap:"5px"},className:"whatmore-event-tile-product-scale-in-and-out-animation",children:[(0,m.jsx)("div",{style:{width:v,height:j,boxShadow:"round"==r?"0px 0px 5px 2px #B0B0B0":null,borderRadius:"round"==r?"5px":"0px",borderWidth:(0,c.al)(u),borderColor:(0,c.qP)(u),overflow:"hidden",backgroundColor:"rgb(220, 220, 220, 1)"},children:(0,m.jsx)("img",{ref:e=>{e&&e.style.setProperty("object-fit",(0,c.yO)(u),"important")},src:y.products[h].thumbnail_image,style:{width:"100%",height:"100%",borderRadius:"round"==r?"5px":"0px"},alt:"product image"})}),(0,m.jsx)("div",{style:{width:n-5-w+"px",height:j,borderRadius:"round"==r?"5px":"0px",overflow:"visible"},children:(0,m.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"fit-content",height:"100%",justifyContent:"center",alignItems:"center"},children:(0,m.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color","white","important"),e.style.setProperty("font-size",b,"important"),e.style.setProperty("line-height","120%","important"),e.style.setProperty("font-family",s,"important"),e.style.setProperty("-webkit-line-clamp",3,"important"),e.style.setProperty("line-clamp",3,"important"),e.style.setProperty("-webkit-box-orient","vertical","important"),e.style.setProperty("display","-webkit-box","important"),e.style.setProperty("overflow","hidden","important"),e.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"normal"},children:(0,p.s)(y.products[h].title)})})})]},h)})},u=n(3933),y=n(8984);function g(e){var t,[n,s]=(0,o.Z)();const[d]=(0,l.j1)("whatmoreShopId"),[h,p,x]=(0,u.YD)({triggerOnce:!0});var g=(0,i.useContext)(a.V);const w=e.event,v=null!==(t=e.unfocusedDisplay)&&void 0!==t&&t,j=.5*s;return(0,m.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,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",alignItems:"center",height:"100%",width:"100%"},children:[(0,m.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,m.jsx)("p",{children:" "})}),g.showPlayButton&&!v?(0,m.jsx)("div",{style:{position:"relative",top:"10%",overflow:"hidden",marginLeft:"5px",marginRight:"5px",width:"100%"},children:(0,m.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",alignItems:"center"},children:(0,m.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,m.jsx)(r.Z,{sx:{color:"#F5F5F5 !important",opacity:(0,y.KE)()?0:.8,fontSize:j,filter:"drop-shadow(0 0 15px black);"}})})})}):(0,m.jsx)(m.Fragment,{}),(0,m.jsx)("div",{ref:h,children:p&&(0,c.PW)(d)?(0,m.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,m.jsx)(f,{event:w})}):(0,m.jsx)("div",{height:"20px"})})]})})}function w(e){var[t,n]=(0,o.Z)();const[i]=(0,l.j1)("whatmorePrimaryFont"),r=e.event;return r.title.trim().length?(0,m.jsx)("div",{style:{width:"100%",height:"fit-content",backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))"},children:(0,m.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"flex-end",alignContent:"center",width:"100%",height:"100%"},children:(0,m.jsx)("div",{style:{width:"100%",padding:"2px"},children:(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",alignItems:"flex-start",marginLeft:"5px",marginRight:"5px",marginBottom:"2px"},children:[(0,m.jsx)("p",{style:{color:"white",fontSize:.08*n+"px",fontWeight:"normal",textAlign:"left"},children:" "}),(0,m.jsx)("p",{ref:e=>{e&&e.style.setProperty("font-family",i,"important")},style:{color:"white",fontSize:.08*n+"px",fontWeight:"normal",textAlign:"left"},children:r.title.substring(0,60)})]})})})}):(0,m.jsx)(m.Fragment,{})}function v(e){const[t,n,i,r,s]=(0,o.Z)(),[a]=(0,l.j1)("whatmoreShowViews"),c=e.event,p=e.isOnFocus;return(0,m.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,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-between",alignItems:"center"},children:[(0,m.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,m.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"flex-start",alignItems:"center"},children:"show"===a?(0,m.jsx)("div",{style:{width:"100%",marginLeft:"5px",marginRight:"5px",marginTop:"10px"},children:(0,m.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",paddingLeft:"5px",width:"fit-content",height:"fit-content",justifyContent:"space-between",alignItems:"center"},children:(0,m.jsx)(h.Z,{event:c,fontSize:.07*n+"px"})})}):(0,m.jsx)(m.Fragment,{})})}),d.$w===s[d.YP]?(0,m.jsx)(m.Fragment,{}):p?(0,m.jsx)("div",{className:"whatmore-event-tile-component-fade-out-animation",children:(0,m.jsx)(w,{event:c})}):(0,m.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,m.jsx)(w,{event:c})})]})})}var j=function(e){var t,n,r;const[h,p,f,u,y]=(0,o.Z)();var w=(0,i.useContext)(a.V);const{whatmoreUITheme:j}=(0,i.useContext)(x.I),b=(0,l.MO)("whatmoreShopId"),C=e.event,P=e.onClick,F=null===(t=e.isOnFocus)||void 0===t||t,I=null!==(n=e.playOnUnfocus)&&void 0!==n&&n,S=null!==(r=e.animateOnFocus&&(0,c.iW)(b))&&void 0!==r&&r,M=(0,c.nz)(b);return(0,m.jsxs)("div",{ref:e=>{e&&(e.style.setProperty("margin-top",w.tileTopMargin+"px","important"),e.style.setProperty("margin-bottom",w.tileBottomMMargin+"px","important"))},style:{margin:"0 auto",width:p,height:h,borderRadius:"round"==j?"5px":"0px",boxShadow:"round"==j?M:null,borderWidth:(0,c.al)(b),borderColor:(0,c.qP)(b),overflow:"hidden",cursor:"pointer"},className:S?F?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",onClick:()=>{P(C)},children:[(0,m.jsx)(s.Z,{height:"100%",width:"100%",url:C.thumbnail_image,isPlaying:F||I,event:C}),(0,m.jsxs)("div",{style:{width:p,height:h},children:[(0,m.jsx)(v,{event:C,isOnFocus:F}),F||d.$w===y[d.YP]?(0,m.jsx)(g,{event:C,unfocusedDisplay:!F}):null]})]})}},9723:function(e,t,n){var i=n(5318);t.Z=void 0;var o=i(n(5045)),r=n(6417),l=(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.82z"}),"PlayArrowRounded");t.Z=l},237:function(e,t,n){var i=n(5318);t.Z=void 0;var o=i(n(5045)),r=n(6417),l=(0,o.default)((0,r.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility");t.Z=l},3439:function(){},5892:function(){},4444:function(){},1811:function(){},6143:function(){},7850:function(){}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[972],{7381:function(e,t,n){n.d(t,{E:function(){return r}});function o(e){console.debug("Whatmore : "+e)}function r(e){var t;const n=null!==(t="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==t&&t;n&&(o("total events received : "+(e&&e.length)),o("events data : "+JSON.stringify(e)))}},3972:function(e,t,n){n.r(t),n.d(t,{default:function(){return L}});var o=n(7753),r=n(7313),i=n(2860),a=n(499),s=n(4897),c=n(5160),u=n(9854),d=n(6967),l=n(8984),h=n(58),p=n(4669),v=n(941),m=n(4136),g=n(7300),f=n(6524),y=n(6417);const b=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(319),n.e(367),n.e(240),n.e(210),n.e(926),n.e(950),n.e(303),n.e(891)]).then(n.bind(n,4095)))),S=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(319),n.e(367),n.e(240),n.e(576),n.e(950),n.e(364),n.e(530)]).then(n.bind(n,5523)))),_=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(319),n.e(367),n.e(926),n.e(950),n.e(358)]).then(n.bind(n,3827)))),T=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(319),n.e(367),n.e(926),n.e(950),n.e(870)]).then(n.bind(n,6071)))),w=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(319),n.e(367),n.e(926),n.e(950),n.e(708)]).then(n.bind(n,1291)))),j=r.lazy((()=>Promise.all([n.e(302),n.e(580)]).then(n.bind(n,3580)))),I=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(319),n.e(240),n.e(576),n.e(210),n.e(803),n.e(926),n.e(303),n.e(607),n.e(68)]).then(n.bind(n,2607)))),x=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(319),n.e(367),n.e(240),n.e(210),n.e(926),n.e(950),n.e(959)]).then(n.bind(n,4048)))),C=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(319),n.e(367),n.e(240),n.e(576),n.e(950),n.e(303),n.e(364),n.e(67)]).then(n.bind(n,4362)))),E=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(319),n.e(240),n.e(576),n.e(210),n.e(803),n.e(926),n.e(303),n.e(607),n.e(334)]).then(n.bind(n,4658))));var O=function(e){const[t]=(0,o.j1)("isInDesignMode"),[n]=(0,o.j1)("isDemoBrand"),[O]=(0,o.j1)("whatmoreTopBottomPadding"),[P]=(0,o.j1)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:M}=(0,r.useContext)(m.I),[k]=(0,o.j1)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:D}=(0,r.useContext)(m.I),L=(0,o.MO)("isLandingSharedLink"),N=(0,o.MO)("whatmoreShareTemplateId"),A=(0,o.MO)("whatmoreShareStoryId"),G=(0,o.MO)("whatmoreShareEventId"),[J,Z]=(0,r.useState)(-1),[z,H]=(0,r.useState)(null);var U=e.events,B=null;function R(e){let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,l.KE)()&&!o&&(0,h.QV)(),t||n||(async()=>{const t=B[e].events[0];(0,c.wh)(t),(0,p.Tc)(k,i.Xh,i.OW),(0,d.H4)(t.event_id,t.products,"homepage","stories")})();var a=0;null!=r&&B[e].events.map(((e,t)=>{e.event_id==r&&(a=t)})),Z(a),H(e)}function V(e){let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,l.KE)()&&!o&&(0,h.QV)(),(0,g.B6)(e)||(0,g.WJ)(e))return t||n||(async()=>{(0,c.wh)(e),(0,p.Tc)(k,i.Xh,i.pR),(0,d.H4)(e.event_id,e.products,"homepage","carousel")})(),void Z(e.index);const r=20;var{status:u,bannerText:v,timeToStartInMins:m}=s.Z.getEventStatus(e);m<=r&&u.name!==a.Z.LIVE.name?console.debug(" TODO : show toast on upcoming live event."):Z(e.index)}function W(e){return(0,y.jsx)(y.Fragment,{})}return M&&!B&&(B=function(e){var t=e.reduce(((e,t,n)=>{var o=t.storyset_id;return o in e?(e[o].total_events=e[o].total_events+1,e[o].events.push(t)):e[o]={id:t.storyset_id,title:t.storyset_name,thumbnail_image:t.storyset_thumbnail_image,total_events:1,start_event_index:n,events:[t]},e}),{}),n=Object.values(t);return n.sort(((e,t)=>e.start_event_index-t.start_event_index)),n}(U)),(0,r.useEffect)((()=>{L&&D==(0,f.zv)(N)&&(null!=A&&M?B.forEach(((e,t)=>{A==e.id&&R(t,!0,G)})):null!=G&&U.forEach(((e,t)=>{G==e.event_id&&V(e,!0)})))}),[]),(0,y.jsxs)("div",{children:[(0,y.jsx)("div",{style:{marginTop:(M?P:O)+"px",marginBottom:(M?P:O)+"px"},children:"template-b"===D?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(b,{events:U,onClick:V,heading:e.heading})}):"template-a-1"===D?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(S,{events:U,onClick:V,heading:e.heading})}):"template-feed-a"===D?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(C,{events:U,onClick:V,heading:e.heading})}):"template-collections-a"===D||"template-c"===D?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(_,{events:U,onClick:V,heading:e.heading})}):"template-collections-b"===D||"template-d"===D?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(T,{events:U,onClick:V,heading:e.heading})}):"template-collections-c"===D||"template-e"===D?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(w,{events:U,onClick:V,heading:e.heading})}):"template-collections-d"===D?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(b,{events:U,onClick:V,heading:e.heading})}):"template-collections-e"===D?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(x,{events:U,onClick:V,heading:e.heading})}):"template-banner-a"===D?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(E,{events:U})}):M?(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(j,{eventsStories:B,onClick:R,template:D})}):(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(x,{events:U,onClick:V,heading:e.heading})})}),-1==J?(0,y.jsx)(W,{}):(0,y.jsx)(r.Suspense,{children:(0,y.jsx)(I,{events:U,index:J,onBack:function(e){(0,u.n2)(k)&&(0,o.MO)("whatmoreAddedToCart")&&(0,v.D)(k,(()=>{}),100,window.location.hostname),Z(-1)},slideDirection:M||"horizontal"===(0,u.e8)(k)?"horizontal":"vertical",eventsStories:B,initialStoryIndex:z,template:D})})]})};const P=function(e,t,n){const r=(0,o.MO)("whatmoreShopId");var i=t.reduce(((e,t,n)=>(t.products.map((e=>e.client_product_id)).forEach((t=>{t in e||(e[t]=!0)})),e)),{}),a=Object.keys(i);if("60960964855"==r&&"undefined"!=typeof fera&&"function"===typeof fera.getRatings){var s={};fera.getRatings(a,(e=>{new Promise(((t,n)=>{e.forEach((e=>{s[e.external_product_id]={avgRating:e.average,totalRatings:e.count}})),t(s)})).then((e=>n(e)))}))}if("23114481744"==r){const e="1e6MQXxzYR19mpw9Km6Dcm86";s={};fetch("https://api.juniphq.com/v1/products?filter[remote_ids]="+a.toString(),{headers:{"Junip-Store-Key":e}}).then((e=>e.json())).then((e=>(e.products.forEach((e=>{s[e.remote_id]={avgRating:parseFloat(e.rating_average).toFixed(1),totalRatings:e.rating_count}})),s))).then((e=>n(e))).catch((e=>console.error(e)))}};var M=n(3388),k=n(7381);var D=function(e){const[t,n]=(0,r.useState)(),[a,s]=(0,r.useState)(),{whatmoreIsStoriesTemplate:c}=(0,r.useContext)(m.I),{whatmoreIsCollectionsTemplate:p}=(0,r.useContext)(m.I),{whatmoreIsBannerTemplate:v}=(0,r.useContext)(m.I),[g]=(0,o.j1)("whatmoreShopId"),[b]=(0,o.j1)("whatmoreCollectionId"),S=(0,o.MO)("whatmoreLandingLocationType"),_=(0,o.MO)("whatmoreLoggingActive"),T=(0,u.cZ)(g)?window.location.href.split(/[?#]/)[0]:b,[w,j]=(0,o.j1)("productRatings");var I=(0,u.ef)(g)?i.Dm+"/v2/events/":i.Gc+"/v2/events/",x=(0,u.ef)(g)?i.Dm+"/get_eventset/":i.Gc+"/get_eventset/",C=(0,u.ef)(g)?i.Dm+"/v2/collection":i.Gc+"/v2/collection",E=(0,u.ef)(g)?i.Dm+"/v2/brand/"+g+"/product-events":i.Gc+"/v2/brand/"+g+"/product-events",D=e.shopId,L="live,upcoming";return(0,r.useEffect)((()=>{(0,d.hb)()}),[]),(0,r.useEffect)((()=>{null==t||0==t.length||a||!(0,l.KE)()||(0,o.MO)("whatmoreVideoPlayerPoolInitiated")||(0,h.b5)(h.UD)}),[t]),(0,r.useEffect)((()=>{var e;if(S.startsWith("product")){var t=(0,o.MO)("whatmoreProductId");t=(0,u.iX)(g)?function(e){return e.split(/[?#]/)[0]}(window.location.href):t,e=E.toString()+"?client_product_id="+t.toString()+"&status="+L.toString()+"&event_type=video"}else if(p)e=C.toString()+"?store_id="+D.toString()+"&client_collection_id="+T;else if(v){const t=f.ls,n=(0,f.H1)(S);e=x.toString()+D.toString()+"?eventset_type="+t+"&source="+n+"&source_id="+g}else e=I.toString()+D.toString()+"?status="+L.toString()+"&is_active="+"true".toString()+(c?"&template_type=stories":"");fetch(e).then((e=>e.json())).then((e=>{if(v){const t=f.ls;return(0,M.OC)(e,t)}return(0,M.kW)(e,p)})).then((e=>(_&&console.debug("initial received events size : "+e.length),c||v?e:(0,M.e8)(e,D)))).then((e=>(null!=e&&0!=e.length&&(0,u.LU)(g)&&function(e,t,n){const r=setInterval((()=>{null===(0,o.MO)("productRatings")&&P(e,t,n)}),1e3);setTimeout((()=>{clearInterval(r)}),1e4)}(g,e,(e=>{j(e)})),e))).then((e=>{null==e||0==e.length||c||(0,u.NO)(D,e),n(e)})).catch((e=>{s(e.message)}))}),[]),null==t||0==t.length||a?(0,y.jsx)("div",{}):(_&&(0,k.E)(t),function(e,t){if(null!=e){var n=0;e.forEach((e=>{e.index=n++}))}}(t),_&&console.debug("final transformed events data : "+JSON.stringify(t)),_&&console.debug("valid events size : "+t.length),(0,y.jsx)("div",{children:(0,y.jsx)(O,{heading:e.heading,events:t})},"whatmore-main-coponent"))};var L=function(e){const[t]=(0,o.j1)("isInDesignMode"),[n]=(0,o.j1)("isDemoBrand"),[a]=(0,o.j1)("whatmoreShopId"),[s]=(0,o.j1)("whatmoreHeading"),[c]=(0,o.j1)("whatmorePrimaryColor"),[u]=(0,o.j1)("whatmoreSecondaryColor");return(0,r.useEffect)((()=>{(0,p.ll)(a)}),[]),(0,y.jsx)(y.Fragment,{children:(0,y.jsx)("div",{children:t||n?(0,y.jsx)("div",{children:(0,y.jsx)(D,{heading:s,shopId:i.aA})}):(0,y.jsx)("div",{children:(0,y.jsx)(D,{heading:s,shopId:a})})})})}},499:function(e,t){t.Z={LIVE:{name:"LIVE",color:"gray.600"},UPCOMING:{name:"UPCOMING",color:"gray.600"},DEFAULT:{name:"LIVE EVENT",color:"gray.600"},COMPLETED:{name:"ENDED",color:"gray.600"}}},4897:function(e,t,n){var o=n(499);t.Z=class{static getEventStatus(e){e.time_zone="GMT+5:30";var t=e.start_time+":00",n=e.end_time,r=e.scheduled_date,i=e.status,a=e.time_zone;if(i.toUpperCase()==o.Z.LIVE.name)return{status:o.Z.LIVE,bannerText:" "+o.Z.LIVE.name+" ",timeToStartInMins:0};if(i.toUpperCase()==o.Z.UPCOMING.name){var s=new Date(r+" "+t+" "+a),c=(new Date(r+" "+n+" "+a),function(e){var t=new Date,n=(e.getTime()-t.getTime())/1e3,r=n/60,i=r/60,a=i/24;return n<=0?{status:o.Z.COMPLETED,bannerText:" "+o.Z.COMPLETED.name+" ",timeToStartInMins:0}:n>=1&&n<=30?{status:o.Z.UPCOMING,bannerText:"Starts in "+Math.round(n)+" sec ",timeToStartInMins:n/60}:r<60?{status:o.Z.UPCOMING,bannerText:"Starts in "+Math.round(r)+" min ",timeToStartInMins:r}:i<24?{status:o.Z.UPCOMING,bannerText:"Starts in "+Math.round(i)+" hr ",timeToStartInMins:60*i}:a<7?{status:o.Z.UPCOMING,bannerText:" "+["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()]+" ",timeToStartInMins:60*a*24}:{status:o.Z.UPCOMING,bannerText:"Upcoming",timeToStartInMins:2880}}(s));return{status:c.status,bannerText:c.bannerText,timeToStartInMins:c.timeToStartInMins}}return console.error("invalid status for event :: id : "+e.event_id+", status : "+e.status),{status:o.Z.DEFAULT,bannerText:"live event",timeToStartInMins:2880}}}},941:function(e,t,n){n.d(t,{D:function(){return o}});const o=async function(e,t,n,o){if("STRNV8MHJTF"!=e&&"STR6HU283UZ"!=e&&"STR9T3LLEJB"!=e&&"STRWJMIOJNX"!=e&&"STRUDQ36YAC"!=e&&"STR1D5ONOZX"!=e){var r=await fetch("https://"+window.location.hostname+"/cart.js",{cache:"reload"}).then((e=>e.json()));if("27358003275"==e||"63748341981"==e||"68237558034"==e)document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0,detail:{cart:r,openMiniCart:!0}}));else if("19506115"==e)window.PXUTheme.jsAjaxCart.showDrawer(),window.PXUTheme.jsAjaxCart.updateView();else if("54465429691"==e)refreshCart(r),window.setTimeout((function(){$.fancybox.close(),$(".cart-button").click()}),500);else if("25427564"==e||"4243849314"==e||"57708314789"==e){(new theme.CartDrawer).open()}else if("62602182872"==e||"57362710572"==e)CartJS.getCart(),$(".block-cart").addClass("active");else if("20157815"==e||"60492578980"==e||"12183765088"==e||"58546946211"==e||"42070737058"==e||"71321583919"==e||"68492624171"==e||"74541891876"==e)document.documentElement.dispatchEvent(new CustomEvent("ajaxProduct:added",{bubbles:!0,detail:{}})),document.documentElement.dispatchEvent(new CustomEvent("cart:open",{bubbles:!0,detail:{}}));else if("2665447536"==e)fetch("/?section_id=cart-drawer").then((e=>e.text())).then((e=>{const t=(new DOMParser).parseFromString(e,"text/html").getElementById("cart-drawer").innerHTML;$("#cart-drawer").html(t),$('[aria-controls="cart-drawer"]')[0].click(),$(".header__cart-count .count-bubble ").html(cart.item_count).css("opacity",1)}));else if("57824805033"==e||"59504656436"==e||"58112966749"==e)fetch("/cart.json").then((e=>e.json())).then((e=>{fetch("/cart?view=item").then((e=>e.text())).then((t=>{const n=(new DOMParser).parseFromString(t,"text/html"),o=n.getElementById("CartDrawer"),r=document.getElementById("CartDrawer");o&&r&&(r.innerHTML=o.innerHTML),n.querySelector("#CartDrawer .totals__subtotal-value");const i=document.querySelector("cart-drawer");i&&i.classList.remove("is-empty");const a=document.querySelector("cart-drawer-items");a&&a.classList.remove("is-empty");const s=document.getElementById("cart-icon-bubble");if(s.querySelector(".cart-count-bubble"))s.querySelectorAll('.cart-count-bubble span[aria-hidden="true"]').forEach((t=>{t.textContent=e.item_count}));else{const t=document.createElement("div");t.className="cart-count-bubble",t.innerHTML='\n <span aria-hidden="true">'.concat(e.item_count,'</span>\n <span class="visually-hidden">').concat(e.item_count," items</span>\n "),s.appendChild(t)}s.click(),document.getElementById("CartDrawer-Overlay").addEventListener("click",(()=>{const e=document.querySelector("cart-drawer");e&&e.classList.remove("active"),document.body.classList.remove("overflow-hidden")}))}))}));else if("61094723750"==e)SLIDECART&&(SLIDECART_UPDATE(),SLIDECART_OPEN());else if("10272035"==e){const e=document.querySelector(".cart-drawer"),t=e.parentNode;t.classList.add("menu-opening"),t.setAttribute("open","open"),e.style.visibility="visible",e.style.transform="translate(0)"}else document.documentElement.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{}}));setTimeout(t,n)}else{console.log("Executing cart refresh script..");document.getElementById("whatsmorecart").value=Math.random()}}},3388:function(e,t,n){n.d(t,{OC:function(){return s},e8:function(){return i},kT:function(){return o},kW:function(){return a},xg:function(){return r}});const o=function(e,t){return!((void 0==e.products||0==e.products.length)&&(void 0==e.cta||0==e.cta.length))},r=function(e,t){return!(void 0==e.products||0==e.products.length)},i=function(e,t){if(null!=e)return e.filter((e=>1==o(e)))},a=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null!=e)return t?e.events[0].events:e.events};const s=function(e,t){var n;if(null==e)return[];if(!("eventsets"in e))return[];const o=null!==(n=e.eventsets[t])&&void 0!==n?n:null;return o?function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{e.events.forEach((e=>{t.push(e)}))})),t}(o):[]}},7300:function(e,t,n){n.d(t,{B6:function(){return o},WJ:function(){return r},yC:function(){return i}});const o=function(e){return"video"===e.event_type},r=function(e){return"image"===e.event_type},i=function(e){return"livestream"===e.event_type}},5160:function(e,t,n){n.d(t,{$L:function(){return l},JX:function(){return d},Z6:function(){return s},rp:function(){return h},wh:function(){return a},wz:function(){return u},x0:function(){return c}});var o,r=n(2860);n(7753);const i=null!==(o="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==o&&o;function a(e){i&&console.debug("updating user view count for event.");const t={event_id:e.event_id,increase_by:1};fetch(r.Gc+"/event/metrics/views",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>(i&&console.debug("updating user view count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating user view count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating user view count user for event : ",e)}))}function s(e,t){i&&console.debug("updating like count for event.");const n={event_id:e.event_id,increase_by:t};fetch(r.Gc+"/event/metrics/like",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(i&&console.debug("updating like count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating like count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating like count user for event : ",e)}))}function c(e){i&&console.debug("updating share count for event.");const t={event_id:e.event_id,increase_by:1};fetch(r.Gc+"/event/metrics/share",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>(i&&console.debug("updating share count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating share count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating share count user for event : ",e)}))}function u(e,t){i&&console.debug("updating event-product click count for event {} and product {}.",e.event_id,t.product_id);const n={event_id:e.event_id,product_id:t.product_id,increase_by:1};fetch(r.Gc+"/event/metrics/clicks",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(i&&console.debug("updating user event-product click count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating user event-product click count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product click count for event {} : ",e.event_id,t)}))}function d(e,t,n){i&&console.debug("updating event-product add to cart count for event {} and product {}.",e.event_id,t.product_id);const o={event_id:e.event_id,product_id:t.product_id,increase_by:n};fetch(r.Gc+"/event/metrics/add_to_cart",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(o)}).then((e=>(i&&console.debug("updating user event-product add to cart count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating user event-product add to cart count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product add to cart count for event {} : ",e.event_id,t)}))}function l(e,t){i&&console.debug("updating event-product buy now count for event {} and product {}.",e.event_id,t.product_id);const n={event_id:e.event_id,product_id:t.product_id,increase_by:1};fetch(r.Gc+"/event/metrics/buy_now",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(i&&console.debug("updating user event-product buy now count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating user event-product buy now count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product buy now count for event {} : ",e.event_id,t)}))}async function h(){let{storeId:e="",eventId:t=0,productId:n="",variantId:o="",cartToken:a="",checkoutToken:s="",quantity:c=0,price:u="",actionType:d="",trackingId:l=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},h={event_id:t,product_id:n,cart_token:a,checkout_token:s,quantity:c,price:u,variant_id:o,action_type:d,tracking_id:l};i&&console.debug("initiating ATC metadata event for eventId {}, productId {}, variantId {} ",t,n,o);const p=await fetch(r.Gc+"/cart-metadata/"+e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(h)}).then((e=>(i&&console.debug("initiating ATC metadata event for eventId {}, productId {}, variantId {} : HTTP "+e.status),e.json()))).catch((e=>{console.error("error initiating ATC metadata event for eventId {}, productId {}, variantId {} : ",t,n,o)}));return p}},4669:function(e,t,n){n.d(t,{Tc:function(){return p},ll:function(){return h}});var o,r=n(1824),i=n(7786),a=n(9854);n(7753);const s="Whatmore Video Shopping",c=null!==(o="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==o&&o,u="Video View",d={carousel:"Carousel",stories:"Stories",video_popup:"Video Popup"},l={homepage:"Home Page",product_page:"Product Page"};async function h(e){if((0,a.Dv)(e)&&null!==(0,a.hf)(e)&&(i.ZP.initialize((0,a.hf)(e)),c&&console.debug("Whatmore: initialized GA4")),(0,a.hv)(e)&&null!==(0,a.BH)(e)){const t=(0,a.OQ)(e);r.ZP.initialize((0,a.BH)(e),{useExistingGa:t}),c&&console.debug("Whatmore: initialized GA3")}}async function p(e,t,n){(0,a.hv)(e)&&null!==(0,a.BH)(e)&&(r.ZP.event({category:s,action:u,label:l[t]+":"+d[n]}),c&&console.debug("Whatmore: pushed view event to GA3")),(0,a.Dv)(e)&&null!==(0,a.hf)(e)&&(i.ZP.event({category:s,action:u+":"+l[t]+":"+d[n],value:1,nonInteraction:!1}),c&&console.debug("Whatmore: pushed view event to GA4"))}}}]);
|