whatmore-react-assets 1.0.541 → 1.0.543

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whatmore-react-assets",
3
- "version": "1.0.541",
3
+ "version": "1.0.543",
4
4
  "description": "public repo for all whatmore js and css assets",
5
5
  "main": "whatmore.js",
6
6
  "scripts": {
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[12],{9723:function(e,a,r){var t=r(5318);a.Z=void 0;var c=t(r(5045)),l=r(6417),u=(0,c.default)((0,l.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");a.Z=u}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[196,790,12],{1332:function(t,e,n){var o=n(7313),a=(n(8743),n(7753)),r=n(5254),c=n(6417);e.Z=function(t){return(0,o.useEffect)((()=>{const t=(0,r.oo)((0,a.MO)("whatmoreSecondaryColor"));!function(t,e,n,o){const a="rgba(".concat(t,",").concat(e,",").concat(n,",").concat(o,")"),r="\n @keyframes whatmore-loading-indicator-keyframe {\n 0%,\n 100% {\n box-shadow: 0em -2.6em 0em 0em ".concat(a,", 1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5), -1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7);\n }\n 12.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7), 1.8em -1.8em 0 0em ").concat(a,", 2.5em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5);\n }\n 25% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5), 1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7), 2.5em 0em 0 0em ").concat(a,", 1.75em 1.75em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2);\n }\n 37.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5), 2.5em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7), 1.75em 1.75em 0 0em ").concat(a,", 0em 2.5em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2);\n }\n 50% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5), 1.75em 1.75em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7), 0em 2.5em 0 0em ").concat(a,", -1.8em 1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2);\n }\n 62.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5), 0em 2.5em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7), -1.8em 1.8em 0 0em ").concat(a,", -2.6em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2);\n }\n 75% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5), -1.8em 1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7), -2.6em 0em 0 0em ").concat(a,", -1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2);\n }\n 87.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5), -2.6em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7), -1.8em -1.8em 0 0em ").concat(a,";\n }\n }\n "),c=document.createElement("style");c.type="text/css",c.innerHTML=r,document.head.appendChild(c)}(t[0],t[1],t[2],.2)}),[]),(0,c.jsx)(c.Fragment,{children:(0,c.jsx)("span",{className:"whatmore-loading-indicator"})})}},4658:function(t,e,n){n.r(e),n.d(e,{default:function(){return L}});var o=n(7313),a=n(6090),r=n(7616),c=(n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811),n(9302)),i=n(2575),s=n(7129),l=n(9039),d=(n(3439),n(7753)),m=n(7931),h=n(9018),u=n(9854),p=n(3933),g=n(8866),f=n(868),v=n(342),x=n(3437),y=n(3455),b=n(6417);var w=function(t){var e;const n=t.isMuted,o=null!==(e=t.iconSize)&&void 0!==e?e:30;function a(){t.onToggle()}return(0,b.jsx)("div",{style:{cursor:"pointer"},children:n?(0,b.jsx)(y.Z,{sx:{color:"white",fontSize:o,filter:"drop-shadow(0 0 5px black);"},onClick:()=>{a()}}):(0,b.jsx)(x.Z,{sx:{color:"white",fontSize:o,filter:"drop-shadow(0 0 5px black);"},onClick:()=>{a()}})})},j=n(1896),C=n(8984),I=n(58),P=n(6119),k=n(7376),S=n(778),z=n(3433);function Z(t){const[e,n]=(0,o.useState)(t.initialMuteState),a=t.events,r=t.activeEventIndex,c=t.setActiveEventIndex,i=(0,d.MO)("whatmoreShopId"),s="portrait"===t.mode;function l(){(0,u.hr)(i)&&t.isCTAPresent||(n(!e),(0,C.KE)()&&(0,I.QV)(),t.onMuteToggle())}const p=t.event;return(0,b.jsx)("div",{style:{position:(0,u.SJ)(i)?"absolute":"relative",top:(0,u.SJ)(i)?0:"",zIndex:1,bottom:(0,u.SJ)(i)?"":"100%",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,b.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-between",alignItems:"center"},children:[(0,b.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"space-between",alignItems:"center",width:"100%",paddingRight:"1%",paddingLeft:"1%",paddingTop:"1%",backgroundImage:"linear-gradient(to top, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0.3))"},children:[!(t.isCTAPresent&&(0,u.hr)(i)||"video"!==p.event_type)&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:{width:"100%",height:"100%"},onClick:()=>l()}),(0,b.jsx)(w,{isMuted:e,onToggle:()=>{l()}})]}),a.length>1&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:{position:"absolute",left:"10px",top:"50%",transform:"translateY(-50%)",backgroundColor:"transparent",borderRadius:"50%",zIndex:2,border:"2px solid white",padding:"2px",cursor:"pointer"},onClick:t=>{t.stopPropagation(),c(0===r?a.length-1:r-1)},children:(0,b.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:"6px"},children:(0,b.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"20px",color:"#252525",height:"20px"},children:(0,b.jsx)(m.Z,{})})})}),(0,b.jsx)("div",{style:{position:"absolute",right:"10px",top:"50%",transform:"translateY(-50%)",backgroundColor:"transparent",borderRadius:"50%",zIndex:2,border:"2px solid white",padding:"2px",cursor:"pointer"},onClick:t=>{t.stopPropagation(),c(r===a.length-1?0:r+1)},children:(0,b.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:"6px"},children:(0,b.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"20px",color:"#252525",height:"20px",textAlign:"center"},children:(0,b.jsx)(h.Z,{})})})}),(0,u.cRS)(i)&&(0,b.jsx)("div",{style:{display:"flex",position:"absolute",bottom:"7%",left:"50%",transform:"translateX(-50%)",gap:"24px",zIndex:1},children:a.map(((t,e)=>{const n=e===r;return(0,b.jsx)("button",{onClick:t=>{t.stopPropagation(),c(e)},style:{width:n?"25px":s?"12px":"14px",height:s?"12px":"14px",borderRadius:n?"10px":"50%",backgroundColor:n?(0,u.YFz)(i):"#f8eeec",boxShadow:"0px 0px 8px rgba(0, 0, 0, 0.3)"}},e)}))})]})]}),(0,b.jsx)("div",{style:{width:"100%",height:"100%"},onClick:()=>l()})]})})}var M=function(t){var e,n;const[a,r,c]=(0,g.Z)(),[i,s]=(0,o.useState)(!0),{whatmoreUITheme:m}=(0,o.useContext)(l.I),h=(0,d.MO)("whatmoreVideoTileSize"),{ref:x,inView:y,entry:w}=(0,p.YD)({triggerOnce:!1}),{whatmoreWidgetSourceDetails:C}=(0,o.useContext)(l.I),I=(0,d.MO)("whatmoreShopId"),M=t.events,E=t.activeEventIndex,L=t.setActiveEventIndex,R=M[E],F=((0,u.nzC)(I),(0,v.uv)(R)),N=(0,v.WN)(R);if("portrait"===a&&!F)return console.log("enter"),(0,b.jsx)(b.Fragment,{});if("landscape"===a&&!N)return console.log("enter"),(0,b.jsx)(b.Fragment,{});const T=(0,f.V)("portrait"===a?F:N),A=h/100*(0,u.b4p)(I),O=h/100*(0,u.GmU)(I),W="portrait"===a?(0,u.oOc)(I):(0,u.snl)(I),D="portrait"===a?c*A:c*O,V=D*W,_=null!=(null===(e=R.cta)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.cta_link);return(0,o.useEffect)((()=>{l.$.forEach((t=>{var e;if(!(null!==(e=t.querySelector('.whatmore-template-type[data-wh="template-banner-a"]'))&&void 0!==e?e:t.querySelector('.whatmore-template-type[data="template-banner-a"]')))return;const n=t.querySelector(".whatmore-render-root");n&&(n.style.minHeight="0px")}))}),[]),(0,b.jsxs)("div",{ref:x,onClick:()=>{var t,e;(0,k.GF)({userInteractionType:S.K.BANNER_WIDGET_CLICKED,widgetSourceDetails:C,event:M[E]}),(0,u.hr)(I)&&_&&!(0,u.j1_)(I)&&window.open(null===(t=R.cta)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.cta_link,"_self")},style:{position:"relative",margin:"0 auto",width:(0,u.SJ)(I)?"100%":D,minHeight:(0,u.SJ)(I)?c*W:"",height:(0,u.SJ)(I)?"auto":V,borderWidth:(0,u.alU)(I),borderColor:(0,u.qPe)(I),overflow:"hidden",cursor:"pointer"},children:[(0,b.jsx)(j.Z,{height:"100%",width:"100%",url:T,isPlaying:y,event:R,isVideoMuted:i,setDuration:t.setDuration,source:z.j.BANNER}),(0,b.jsx)(Z,{isCTAPresent:_,events:M,activeEventIndex:E,setActiveEventIndex:L,event:R,mode:a,onMuteToggle:()=>s(!i),initialMuteState:i}),(0,u.j1_)(I)&&(0,b.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"portrait"===a?"12%":"20%"},className:"whatmore-ios-css-relative-fix",children:(0,b.jsx)("div",{children:(0,b.jsx)(P.Z,{event:R,cta:R.cta[0],fontFactor:.6})})})]})};const E=(0,i.Z)({key:"whatmore-css-bv"});var L=function(t){const{whatmoreRootId:e}=(0,o.useContext)(l.I),[n,i]=(0,o.useState)(0),d=t.events,[m,h]=(0,o.useState)(-1);let u;return(0,o.useEffect)((()=>{u&&clearInterval(u);const t="video"===d[n].event_type,e=t?1e3*m:6e3;return t?-1!=m&&(u=setInterval((()=>{i((t=>t===d.length-1?0:t+1))}),e)):u=setInterval((()=>{i((t=>t===d.length-1?0:t+1))}),e),()=>{clearInterval(u)}}),[m,n]),delete r.ZP.styles.global,(0,b.jsx)(c.C,{value:E,children:(0,b.jsx)("div",{children:(0,b.jsx)(a.x,{theme:r.ZP,cssVarsRoot:e,resetCSS:!1,children:(0,b.jsx)(s.V.Provider,{value:{tileTopMargin:0,tileBottomMMargin:0,tileLeftMargin:0,tileRightMargin:0,showPlayButton:!1},children:(0,b.jsx)(M,{activeEventIndex:n,events:d,setActiveEventIndex:i,setDuration:h})})})})})}},3867:function(t,e,n){var o=n(8816),a=n(417),r=n(4885),c=n(7753),i=n(9039),s=n(7313),l=n(6417);e.Z=function(t){var e;const{whatmoreUITheme:n}=(0,s.useContext)(i.I),[d]=(0,c.j1)("whatmoreSecondaryColor"),[m,h]=(0,c.j1)("productRatings"),u=(0,c.MO)("whatmorePrimaryFont"),p=(t.storeId,t.productId),g=(t.productLink,t.fontSize),f=null!==(e=t.fontColor)&&void 0!==e?e:"gray";if(null===m||"undefined"==typeof m||!(p in m)||m[p].avgRating>5)return(0,l.jsx)(l.Fragment,{});const v=m[p].avgRating,x=m[p].totalRatings;return(0,l.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center"},children:(0,l.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center",gap:"0px"},children:[[...Array(Math.floor(v))].map(((t,e)=>(0,l.jsx)(o.Z,{sx:{color:d,fontSize:g+"px"}},"star-icon"+e))),v-Math.floor(v)>.2?(0,l.jsx)(a.Z,{sx:{color:d,fontSize:g+"px"}},"star-half-icon"):v-Math.floor(v)==0?(0,l.jsx)(l.Fragment,{}):(0,l.jsx)(r.Z,{sx:{color:d,fontSize:g+"px"}},"star-outline-icon"),[...Array(Math.floor(5-v))].map(((t,e)=>(0,l.jsx)(r.Z,{sx:{color:d,fontSize:g+"px"}},"star-outline-icon-"+e))),(0,l.jsx)("div",{children:(0,l.jsx)("div",{width:"2px"})}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{style:{backgroundColor:d,borderRadius:"round"==n?"2px":"0px",padding:"1px",overflow:"hidden"},children:(0,l.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color","white","important"),t.style.setProperty("font-size",.8*g+"px","important"),t.style.setProperty("font-family",u,"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",v,"\xa0"]})})}),(0,l.jsx)("div",{children:(0,l.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color",f,"important"),t.style.setProperty("font-size",.8*g+"px","important"),t.style.setProperty("font-family",u,"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","("+x+")"]})})]})})}},7129:function(t,e,n){n.d(e,{V:function(){return o}});const o=(0,n(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},3175:function(t,e,n){var o=n(1332),a=n(5180),r=n(6417);e.Z=function(t){var e,n;const c=null!==(e=t.height)&&void 0!==e?e:"100%",i=null!==(n=t.width)&&void 0!==n?n:"100%";return(0,r.jsxs)("div",{style:{width:i,height:c,overflow:"hidden",minHeight:c,minWidth:i},children:[(0,r.jsx)(a.Z,{height:c,width:i}),(0,r.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignContent:"center",width:"100%",height:"100%",position:"relative",zIndex:1,bottom:"100%",className:"whatmore-ios-css-relative-fix"},children:(0,r.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",width:"100%",height:"fit-content"},children:(0,r.jsx)(o.Z,{})})})]})}},5180:function(t,e,n){var o=n(6417);e.Z=function(t){var e,n,a;const r=null!==(e=t.height)&&void 0!==e?e:"100%",c=null!==(n=t.width)&&void 0!==n?n:"100%",i=null!==(a=t.borderRadius)&&void 0!==a?a:"10px";return(0,o.jsx)("div",{style:{height:r,width:r,borderRadius:i,overflow:"hidden",minHeight:r,minWidth:c,maxHeight:r,maxWidth:c},children:(0,o.jsx)("div",{style:{minHeight:r,minWidth:c},height:"100%",width:"100%",className:"whatmore-shimmer"})})}},2887:function(t,e,n){var o=n(7313),a=n(3175),r=n(6417);e.Z=function(t){var e,n,c;const[i,s]=(0,o.useState)(!1),l=o.useRef(0),d=(0,o.useRef)(null),m=null!==(e=t.timeUpdateCallback)&&void 0!==e?e:()=>{},h=null!==(n=t.height)&&void 0!==n?n:"100%",u=null!==(c=t.width)&&void 0!==c?c:"100%";return(0,o.useEffect)((()=>{l.current=0;const t=setInterval((()=>{l.current=l.current+.03,d.current&&m(l.current,5),l.current>=5&&(l.current=0)}),30);return()=>{clearInterval(t)}}),[t.isPlaying]),(0,r.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:u,height:h,overflow:"hidden"},children:[(0,r.jsx)("div",{style:{width:i?"100%":"0px",height:i?"100%":"0px"},children:(0,r.jsx)("img",{ref:d,src:t.url,style:{objectFit:"cover",height:h,width:u,backgroundColor:"white"},alt:"image player",onLoad:()=>{s(!0)}})}),i?(0,r.jsx)(r.Fragment,{}):(0,r.jsx)(a.Z,{width:u,height:h})]})}},4892:function(t,e,n){n.d(e,{Z:function(){return h}});var o=n(7313),a=n(3933),r=n(868),c=n(8984),i=n(7300),s=n(2887),l=n(4862),d=n(6417);var m=function(t){var e,n;const r=(0,o.useRef)(null),[c,i,s]=(0,a.YD)({triggerOnce:!0}),m=null!==(e=t.height)&&void 0!==e?e:"100%",h=null!==(n=t.width)&&void 0!==n?n:"100%";return(0,o.useEffect)((()=>{r.current&&(t.isPlaying?r.current.play():(l.G6&&r.current.play(),r.current.pause()))}),[t.isPlaying,i]),(0,d.jsx)("div",{ref:c,style:{width:m,height:h,overflow:"hidden"},children:i?(0,d.jsx)("video",{ref:r,className:"whatmore-video-player",width:h,height:m,preload:"metadata",loop:!0,playsInline:!0,poster:t.isPlaying?t.url:"",muted:!0,src:t.url,style:{backgroundColor:"white"}}):(0,d.jsx)("div",{width:h,height:m,ref:t=>{t&&t.style.setProperty("display","block","important")}})})};var h=function(t){var e,n,l;const[h,u,p]=(0,a.YD)({triggerOnce:!0});if((0,i.WJ)(t.event))return(0,d.jsx)(s.Z,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback});const g=null!==(e=t.pauseFromPlayTimeInMs)&&void 0!==e?e:200;if((0,c.KE)())return(0,d.jsx)(m,{height:"100%",width:"100%",url:(0,r.V)(t.url),isPlaying:t.isPlaying,pauseFromPlayTimeInMs:g});const f=(0,o.useRef)(null),v=null!==(n=t.height)&&void 0!==n?n:"100%",x=null!==(l=t.width)&&void 0!==l?l:"100%";return(0,o.useEffect)((()=>{f.current&&(t.isPlaying?f.current.play():f.current.pause())}),[t.isPlaying,u]),(0,d.jsx)("div",{ref:h,style:{width:v,height:x,overflow:"hidden"},children:u?(0,d.jsx)("video",{ref:f,className:"whatmore-video-player",width:x,height:v,preload:"metadata",loop:!0,playsInline:!0,muted:!0,src:(0,r.V)(t.url),style:{backgroundColor:"white"}}):(0,d.jsx)("div",{width:x,height:v,ref:t=>{t&&t.style.setProperty("display","block","important")}})})}},868:function(t,e,n){n.d(e,{V:function(){return i}});var o=n(9854),a=n(7753);const r={"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"},c={"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"},i=function(t){const e=(0,a.MO)("whatmoreShopId");if(!t)return t;if(t.startsWith("https://cdn.shopify.com"))return t;if("AWSCDN"==(0,o.zpr)(e))return t;if("AZURECDN"==(0,o.zpr)(e)){if(t.includes(".azureedge.net"))return t;if(t.includes(".cloudfront.net")){for(const e of Object.keys(r))if(t.includes(e))return t.replace(e,r[e]);return t}}if("BUNNYCDN"==(0,o.zpr)(e)){if(t.includes(".b-cdn.net"))return t;if(t.includes(".cloudfront.net")){for(const e of Object.keys(c))if(t.includes(e))return t.replace(e,c[e]);return t}}return t}},9363:function(t,e,n){n.d(e,{s:function(){return r}});var o=n(9854),a=n(7753);function r(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=(0,a.MO)("whatmoreShopId");return"shopify"!=(0,o.Ipo)(n)?t:t+e}},5456:function(t,e,n){n.d(e,{B:function(){return o}});const o=function(t,e){return!(isNaN(e)||!e||("string"===typeof e||e instanceof String)&&!e.trim().length)&&!(parseInt(e)<=parseInt(t))}},8866:function(t,e,n){var o=n(7313);function a(){return[window.innerHeight,window.innerWidth]}e.Z=function(t){var[e,n]=a();const[r,c]=(0,o.useState)([e>n?"portrait":"landscape",e,n]);return(0,o.useLayoutEffect)((()=>{function t(){var[t,e]=a();c(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)}}),[]),r}},7931:function(t,e,n){var o=n(5318);e.Z=void 0;var a=o(n(5045)),r=n(6417),c=(0,a.default)((0,r.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore");e.Z=c},9018:function(t,e,n){var o=n(5318);e.Z=void 0;var a=o(n(5045)),r=n(6417),c=(0,a.default)((0,r.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext");e.Z=c},9723:function(t,e,n){var o=n(5318);e.Z=void 0;var a=o(n(5045)),r=n(6417),c=(0,a.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");e.Z=c},8816:function(t,e,n){var o=n(5318);e.Z=void 0;var a=o(n(5045)),r=n(6417),c=(0,a.default)((0,r.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=c},417:function(t,e,n){var o=n(5318);e.Z=void 0;var a=o(n(5045)),r=n(6417),c=(0,a.default)((0,r.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=c},4885:function(t,e,n){var o=n(5318);e.Z=void 0;var a=o(n(5045)),r=n(6417),c=(0,a.default)((0,r.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=c},8743:function(){},3439:function(){},123:function(){},7244:function(){},5892:function(){},4444:function(){},1811:function(){},7850:function(){}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[209],{4209:function(t,e,n){n.r(e),n.d(e,{EventClickComponentContext:function(){return gn},default:function(){return mn}});var i=n(4897),o=n(499),r=n(7313),a=n(2210),l=n(8486),d=n(5160),s=n(3271),c=n(9854),h=n(7753),u=n(7789),p=n(7053),x=n(1896),g=n(6417);var m=function(t){return(0,g.jsx)(x.Z,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback,event:t.event})},v=n(5098),f=n(3437),w=n(3455),j=n(6422);var C,y,S,b,I=function(t){const[e,n]=(0,j.Z)(),[i,o,r,a]=(0,u.Z)(),l=.08*a;function d(){n(!e)}return(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.Cd,{cursor:"pointer",children:e?(0,g.jsx)(w.Z,{sx:{color:"white",fontSize:l,filter:"drop-shadow(0 0 5px black);"},onClick:()=>{d()}}):(0,g.jsx)(f.Z,{sx:{color:"white",fontSize:l,filter:"drop-shadow(0 0 5px black);"},onClick:()=>{d()}})})})},k=n(168),_=n(8449),F=n(686);const E=(0,F.F4)(C||(C=(0,k.Z)(["\n 0%,10%,15% {\n opacity: 0; \n }\n 25%{\n opacity: 0.25;\n transform: translateY(-25%);\n }\n 50%{\n opacity: 0.5;\n transform: translateY(0%);\n }\n 75% {\n opacity: 0.75;\n transform: translateY(-8%)\n }\n 100%{\n opacity: 1;\n transform: translateY(0%)\n }\n"]))),T="".concat(E," 0.5s linear"),P=(0,F.F4)(y||(y=(0,k.Z)(["\n 30% { transform: scale(1.2); }\n 40%, 60% { transform: rotate(-20deg) scale(1.2); }\n 50% { transform: rotate(20deg) scale(1.2); }\n 70% { transform: rotate(0deg) scale(1.2); }\n 100% { transform: scale(1); }\n"]))),O="\n ".concat(P," 1.5s linear;\n"),L=(0,F.F4)(S||(S=(0,k.Z)(["\n 3% { transform: scale(1.2); }\n 4%, 6% { transform: rotate(-20deg) scale(1.2); }\n 5%,7% { transform: rotate(20deg) scale(1.2); }\n 8% { transform: rotate(0deg) scale(1.2); }\n 10% { transform: scale(1); }\n"]))),R=("\n ".concat(L," 10s linear infinite;\n"),(0,F.F4)(b||(b=(0,k.Z)(["\n 0% { transform: scale(1); }\n 10% { transform: scale(1.2); }\n 20% { transform: scale(1); }\n"]))));"\n ".concat(R," 5s ease-in-out infinite;\n");var D,z=n(4937);const K=(0,F.F4)(D||(D=(0,k.Z)(["\n 0% { \n opacity: 0;\n }\n 10%{\n opacity: 0.5;\n }\n 20%{\n opacity: 1;\n }\n \n"]))),M="\n ".concat(K," ").concat(3,"s ease-in-out;\n");function W(t){const[e,n,i,o]=(0,u.Z)(),[a]=(0,h.j1)("whatmoreSecondaryColor"),[l,d]=(0,r.useState)(0),c=t.event,p=t.onClick,x=c.products.length;t.isFirstProductsIconClickDone;(0,r.useEffect)((()=>{const t=setInterval((()=>{d((t=>(t+1)%x))}),3e3);return()=>{clearInterval(t)}}),[]);const m=.24,f=.024;var w=o*m+"px",j=o*m+"px",C=o*f*1.5+"px",y=o*f+"px",S=o*f*1.5+"px";if(void 0==c.products||0==c.products.length)return(0,g.jsx)(g.Fragment,{});var b=c.products;return(0,g.jsx)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",height:"fit-content",width:"fit-content",borderRadius:"lg",children:(0,g.jsxs)(s.xu,{margin:"10px",width:w,height:j,boxShadow:"dark-lg",borderColor:"white",borderWidth:"2px",borderRadius:"lg",overflow:"visible",backgroundColor:"gray.100",animation:T,onClick:()=>p(),children:[(0,g.jsx)(v.Ee,{width:"100%",height:"100%",src:b[l].thumbnail_image,objectFit:"cover",borderRadius:"lg",animation:M},l),(0,g.jsx)(s.xu,{width:"100%",height:"100%",style:{position:"relative",zIndex:2,bottom:"100%"},className:"whatmore-ios-css-relative-fix",borderRadius:"lg",children:(0,g.jsx)(s.Kq,{direction:"column",width:"100%",height:"100%",justifyContent:"flex-end",children:(0,g.jsx)(s.M5,{children:(0,g.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",backgroundColor:a,borderRadius:"lg",marginX:"5px",marginY:"5px",paddingX:"2px",paddingY:"2px",children:[(0,g.jsxs)(s.xv,{noOfLines:1,fontSize:y,fontFamily:"sans-serif",fontWeight:"semibold",textAlign:"center",lineHeight:"100%",sx:{color:"white !important"},children:["\xa0","Shop Now","\xa0"]}),(0,g.jsx)(s.M5,{children:(0,g.jsx)(z.Z,{sx:{color:"white",fontSize:S}})})]})})})}),(0,g.jsx)(s.Kq,{direction:"row",height:"fit-content",width:w,justifyContent:"flex-end",style:{position:"relative",zIndex:3,bottom:"210%",left:"5%"},className:"whatmore-ios-css-relative-fix",children:(0,g.jsx)(s.Ct,{fontSize:C,variant:"subtle",textColor:a,bgColor:"gray.100",borderRadius:"md",boxShadow:"dark-lg",children:x>1?x:""})})]})})}var A=function(t){const[e,n]=(0,h.j1)("isProductSwiperCatalogOpen"),[i,o,a,l]=(0,u.Z)(),[d,c]=(0,r.useState)(!1),p=t.onToggle,x=t.event,m=.07*l;return(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.bK,{style:{marginTop:"10px"},children:e?(0,g.jsx)(_.Z,{sx:{color:"white",fontSize:m,filter:"drop-shadow(0 0 5px black);",position:"relative",zIndex:2},onClick:()=>{p("minimize-button")}}):(0,g.jsx)(W,{event:x,onClick:()=>{p("products-button"),c(!0)},isFirstProductsIconClickDone:d})})})},q=n(2634),H=n(8302);var Z,N,U=function(t){const e=t.onCloseCallback,[n,i,o,r]=(0,u.Z)(),a=.08*r;return(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.Cd,{cursor:"pointer",children:(0,g.jsx)(H.Z,{sx:{boxShadow:3,color:"white",fontSize:a,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),e(t)}})})})},V=n(756),B=n(5428),Y=n(8022);var X=function(t){var e,n;const[i,o,a,l]=(0,u.Z)(),[d,c]=(0,r.useState)(!0),{slideDirection:h}=(0,r.useContext)(gn),p=null!==(e=t.showForSeconds)&&void 0!==e?e:3,x=null!==(n=t.delayInSeconds)&&void 0!==n?n:1;t.swipeUp,(0,r.useEffect)((()=>{const t=setTimeout((()=>{c(!1)}),1e3*p);return()=>{clearTimeout(t)}}),[]);const m=.15*l,v=.07*l,f=(0,F.F4)(Z||(Z=(0,k.Z)(["\n 0% {\n transform: translateY(0%) rotate(0deg);\n }\n 50% {\n transform: translateY(-100%) translateX(+10%) rotate(+30deg);\n }\n 100% {\n transform: translateY(0%) rotate(0deg);\n }\n "]))),w="".concat(f," infinite 1.5s linear"),j=(0,F.F4)(N||(N=(0,k.Z)(["\n 0% {\n transform: translateY(0%) rotate(0deg);\n }\n 50% {\n transform: translateX(30%) translateY(20%) rotate(-30deg);\n }\n 100% {\n transform: translateY(0%) rotate(0deg);\n }\n "]))),C="".concat(j," infinite 1.5s linear");return(0,g.jsx)(V.MT,{unmountOnExit:!0,initialScale:.2,in:d,reverse:!0,delay:x,children:(0,g.jsx)(s.xu,{width:"100%",height:"fit-content",paddingTop:100,borderRadius:"3xl",children:(0,g.jsxs)(s.Kq,{direction:"column",width:"100%",height:"fit-content",justifyContent:"flex-end",children:[(0,g.jsx)(s.M5,{animation:"vertical"===h?w:C,children:"vertical"===h?(0,g.jsx)(B.Z,{sx:{color:"white !important",fontSize:m,filter:"drop-shadow(0 0 20px black);"}}):(0,g.jsx)(Y.Z,{sx:{color:"white !important",fontSize:m,filter:"drop-shadow(0 0 20px black);"}})}),(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.xv,{textShadow:"dark-lg",fontSize:v+"px",fontWeight:"semibold",sx:{color:"white !important",textShadow:"0px 0px 20px black !important;"},children:"swipe for more"})})]})})})};var G=function(t){const[e,n]=(0,h.j1)("isFirstIndicatorRenderDone"),[i]=(0,h.j1)("indicatorRenderSeconds"),o=i,a=t.swipeUp;return(0,r.useEffect)((()=>{const t=setTimeout((()=>{n(!0)}),3e3+1e3*o);return()=>{clearTimeout(t)}}),[]),e?null:(0,g.jsx)(X,{showForSeconds:.8*o,delayInSeconds:3,swipeUp:a})},J=n(5180),$=n(9316),Q=n(5254);const tt="15px";var et=n(7376),nt=n(778),it=n(9039);var ot=function(t){const[e]=(0,h.j1)("isInDesignMode"),[n]=(0,h.j1)("isDemoBrand"),[i]=(0,h.j1)("whatmoreSecondaryColor"),[o]=(0,h.j1)("whatmorePrimaryFont"),[a]=(0,h.j1)("whatmoreShopId"),[l,p,x,m]=(0,u.Z)(),[v,f]=(0,r.useState)(!1),w=t.product,j=t.event,{whatmoreWidgetSourceDetails:C}=(0,r.useContext)(it.I),y=.1*x,S=.95*m,b=.05*m;return(0,g.jsx)(s.Kq,{direction:"row",height:y,justifyContent:"center",aligntItems:"center",alignContent:"center",bgGradient:"linear(to-b, transparent, blackAlpha.400, blackAlpha.600)",children:(0,g.jsx)(s.Kq,{direction:"column",width:"fit-content",height:y,justifyContent:"center",aligntItems:"center",alignContent:"center",children:(0,g.jsx)(s.xu,{width:S+"px",height:"fit-content",padding:"6px",marginTop:tt,backgroundColor:i,borderRadius:"5px",animation:v?$.mT:null,onAnimationEnd:()=>{f(!1)},marginBottom:(0,c.pq5)(a),onClick:()=>{f(!0),function(t,i){e||n||(async()=>{(0,d.wz)(t,i),(0,et.GF)({userInteractionType:nt.K.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:C,event:t,productList:[i],ctaList:t.cta})})()}(j,w),window.location.href=function(t){return(0,c.lj5)(a)?t.product_link+"?"+(0,c.awP)(a)+"&"+(0,c.n9s)(a)+"&"+(0,c.vaK)(a):t.product_link}(w)},_hover:{backgroundColor:(0,Q.lA)(i,8)},cursor:"pointer",children:(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*b+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:o+" !important",color:"white !important"},children:"Shop Now"})})})})})},rt=n(7009),at=n(5945),lt=n(5456),dt=n(6984),st=n(6227),ct=n(7329);n(9111);function ht(t){var e;const[n]=(0,h.j1)("whatmoreSecondaryColor"),[i]=(0,h.j1)("whatmorePrimaryFont"),[o]=(0,h.j1)("whatmoreShopId"),[a,l]=(0,r.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),u=t.onClick,p=t.width,x=t.height,m=t.title,v=t.showInProgressIcon;return(0,g.jsx)(s.xu,{width:p,height:x,padding:"2x",boxShadow:"lg",backgroundColor:v?(0,Q.lA)(n,8):n,onClick:t=>{t.stopPropagation(),u(),l(!0)},animation:a?$.mT:null,onAnimationEnd:()=>{l(!1)},cursor:"pointer",children:(0,g.jsxs)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",children:[(0,g.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d+"px",fontWeight:"semibold",sx:{fontFamily:i+" !important",color:(0,c.KCy)(o)+" !important"},children:["\xa0",m,"\xa0"]}),v?(0,g.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,g.jsx)(ct.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*d+"px"}})}):(0,g.jsx)(g.Fragment,{})]})})}function ut(t){var e;const[n]=(0,h.j1)("whatmoreSecondaryColor"),[i]=(0,h.j1)("whatmorePrimaryFont"),[o]=(0,h.j1)("whatmoreShopId"),[a,l]=(0,r.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),u=t.onClick,p=t.width,x=t.height;return(0,g.jsx)(s.xu,{width:p,height:x,padding:"2x",boxShadow:"lg",backgroundColor:n,onClick:t=>{t.stopPropagation(),u(),l(!0)},animation:a?$.mT:null,onAnimationEnd:()=>{l(!1)},cursor:"pointer",children:(0,g.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",children:(0,g.jsx)(s.M5,{children:(0,g.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d,fontWeight:"semibold",sx:{fontFamily:i+" !important",color:(0,c.KCy)(o)+" !important"},children:["\xa0",(0,c.tan)(o),"\xa0"]})})})})}function pt(t){var e;const[n]=(0,h.j1)("whatmorePrimaryFont"),[i]=(0,h.j1)("whatmoreShopId"),o=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),r=t.width,a=t.height;return(0,g.jsx)(s.xu,{width:r,height:a,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:"gray",borderWidth:"1px",onClick:t=>{t.stopPropagation()},children:(0,g.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:(0,g.jsxs)(s.xv,{color:"gray",lineHeight:"100%",fontSize:1.3*o,fontWeight:"semibold",sx:{fontFamily:n+" !important",color:"gray !important"},children:["\xa0"," Sold Out ","\xa0"]})})})}function xt(t){var e;const[n]=(0,h.j1)("whatmoreSecondaryColor"),[i]=(0,h.j1)("whatmorePrimaryFont"),[o]=(0,h.j1)("whatmoreShopId"),r=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),a=t.onClick,l=t.cartCount,d=t.width,c=t.height,u=t.onCartIconClick;return(0,g.jsx)(s.xu,{width:d,height:c,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:n,borderWidth:"1px",onClick:t=>{t.stopPropagation()},cursor:"pointer",children:(0,g.jsxs)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:[(0,g.jsx)(s.M5,{paddingX:"5px",onClick:()=>{u()},children:(0,g.jsx)(st.Z,{sx:{color:n,fontSize:1.6*r}})}),(0,g.jsx)(s.xv,{color:n,fontSize:1.3*r,fontWeight:"semibold",sx:{fontFamily:i+" !important"},children:l}),(0,g.jsx)(s.M5,{paddingX:"5px",onClick:t=>{t.stopPropagation(),a()},children:(0,g.jsx)(dt.Z,{sx:{color:n,fontSize:1.6*r}})})]})})}var gt=function(t){var e,n,i,o;const[r]=(0,h.j1)("whatmoreShopId"),a=t.event,l=t.product,d=null!==(e=t.baseFontSize)&&void 0!==e?e:10,s=null===(n=t.showAddedToCart)||void 0===n||n,c=t.cartState,u=t.cartCount,p=t.onClickAtc,x=t.onCartIconClick;function m(){p()}const v=null!==(i=t.width)&&void 0!==i?i:"100%",f=null!==(o=t.height)&&void 0!==o?o:"100%";return"errored"==c?(0,g.jsx)(V.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:f,width:v},children:(0,g.jsx)(pt,{event:a,product:l,baseFontSize:d,width:v,height:f})}):"init"==c?0==u?(0,g.jsx)(ut,{onClick:m,event:a,product:l,baseFontSize:d,width:v,height:f}):s?(0,g.jsx)(V.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:f,width:v},children:(0,g.jsx)(xt,{onClick:m,event:a,product:l,baseFontSize:d,cartCount:u,width:v,height:f,onCartIconClick:x})}):(0,g.jsx)(ut,{onClick:m,event:a,product:l,baseFontSize:d,width:v,height:f}):(0,g.jsx)(ht,{onClick:m,event:a,product:l,baseFontSize:d,width:v,height:f,title:"awaitingVariantSelection"==c?"Done":"",showInProgressIcon:"atcApiCallInProgress"==c||"productVariantDetailsApiCallInProgress"==c})},mt=n(6967),vt=n(2791),ft=n(4844);const wt=(0,h.MO)("isInDesignMode"),jt=(0,h.MO)("isDemoBrand");async function Ct(t,e,n,i,o,r){return"shopify"==n?(0,ft.wW)(t,e,i):(wt||jt||(async()=>{(0,mt.FF)(o,r)})(),(0,vt.jg)(t,e,i))}function yt(t,e){return"shopify"==t?(0,ft.JL)(e):(0,vt.TE)(e)}var St=function(t,e,n){const[i]=(0,h.j1)("whatmoreShopId"),[o]=(0,h.j1)("isInDesignMode"),[a]=(0,h.j1)("isDemoBrand"),[l,s]=(0,r.useState)(null),u=(0,r.useRef)(null),{closeClickComponent:x}=(0,r.useContext)(gn),[g,m]=(0,r.useState)({state:"init",cart_count:t});function v(t,e){m({state:t,cart_count:null!==e&&void 0!==e?e:g.cart_count}),"init"!=t&&"errored"!=t?(0,h.bU)("whatmoreAllowAutoSlide",!1):(0,h.bU)("whatmoreAllowAutoSlide",!0)}function f(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}function w(t){const r=function(t){const e=u.current.filter((e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]));return 0==e.length?null:e[0].id}(t);if(!r)return void v("init",g.cart_count);v("atcApiCallInProgress",null);Ct(r,1,(0,c.Ipo)(i),i,n,e).then((t=>{if(!t.ok)throw new Error(t.status);return t.json()})).then((t=>(function(t,e,n){o||a||(async()=>{(0,d.JX)(t,e,n)})()}(n,e,1),v("init",g.cart_count+1),(0,h.bU)("whatmoreAddedToCart",!0),t))).catch((t=>{v("errored",null),console.error("Error while adding to cart:",t)}))}return[g,l,function(){v("productVariantDetailsApiCallInProgress",null),(0,p.pO)(e,(0,c.Ipo)(i),i).then((t=>{u.current=t.variants;const e=function(t){var e=[],n=[],i=[];return t.variants.forEach((o=>{var r,a,l;o.option1&&e.push({option:o.option1,available:null===(r=o.available)||void 0===r||r,type:t.options[0].name}),o.option2&&n.push({option:o.option2,available:null===(a=o.available)||void 0===a||a,type:t.options[1].name}),o.option3&&i.push({option:o.option3,available:null===(l=o.available)||void 0===l||l,type:t.options[2].name})})),e=e.reduce(((t,e,n)=>{var i=t.filter((t=>t.option==e.option));return 0==i.length?[...t,e]:(i[0].available=i[0].available|e.available,t)}),[]),n=n.reduce(((t,e,n)=>{var i=t.filter((t=>t.option==e.option));return 0==i.length?[...t,e]:(i[0].available=i[0].available|e.available,t)}),[]),i=i.reduce(((t,e,n)=>{var i=t.filter((t=>t.option==e.option));return 0==i.length?[...t,e]:(i[0].available=i[0].available|e.available,t)}),[]),[e,n,i]}(t);s(e),!function(t){return t[0].length<=1&&t[1].length<=1&&t[2].length<=1}(e)?v("awaitingVariantSelection",null):!function(){if(u.current&&u.current.length>=1)return u.current.filter((t=>t.available)).length>=1;return!1}()?v("errored",null):w([f(e[0]),f(e[1]),f(e[2])])})).catch((t=>{v("errored",null)}))},w,function(t){var e,n;const i=u.current.filter((e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]));return 0==i.length?null:{price:(null!==(e=i[0].price)&&void 0!==e?e:0)/100,compare_price:(null!==(n=i[0].compare_at_price)&&void 0!==n?n:0)/100}},function(){"do_nothing"!==(0,c.v9M)(i)&&("go_to_cart_page"!==(0,c.v9M)(i)?"open_cart_slider"!==(0,c.v9M)(i)||null!==x&&x():yt((0,c.Ipo)(i),i))}]};var bt=function(t){var e,n,i,o;const a=t.productVariantOptions,l=null!==(e=t.width)&&void 0!==e?e:"100%",d=null!==(n=t.height)&&void 0!==n?n:"fit-content",u=null!==(i=t.baseFontSize)&&void 0!==i?i:10,p=t.onOptionSelected,x=null!==(o=t.optionTitleColor)&&void 0!==o?o:"black",[m]=(0,h.j1)("whatmoreSecondaryColor"),[f]=(0,h.j1)("whatmorePrimaryFont"),[w]=(0,h.j1)("whatmoreShopId");let j=[];for(let r=0;r<(null===t||void 0===t||null===(C=t.data)||void 0===C||null===(y=C.product)||void 0===y||null===(S=y.images)||void 0===S?void 0:S.length);r++){var C,y,S,b,I,k;(null===t||void 0===t||null===(b=t.data)||void 0===b||null===(I=b.product)||void 0===I||null===(k=I.images[r].variant_ids)||void 0===k?void 0:k.length)>0&&j.push(r)}function _(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}const[F,E]=(0,r.useState)([_(a[0]),_(a[1]),_(a[2])]);return(0,r.useEffect)((()=>{p(F)}),[F]),(0,g.jsx)(s.Kq,{direction:"column",width:l,height:d,justifyContent:"flex-start",alignItems:"center",spacing:"5px",children:a.map(((e,n)=>{if(0!=e.length)return(0,g.jsxs)(s.Kq,{width:"100%",direction:"column",alignItems:"center",justifyContent:"flex-start",children:[(0,g.jsx)(s.M5,{width:"100%",children:(0,g.jsx)(s.iz,{color:"blackAlpha.500",size:"1px",width:"20%"})}),(0,g.jsxs)(s.xv,{as:"b",fontSize:1.2*u+"px",sx:{color:x+" !important",fontFamily:f+" !important"},align:"center",children:["\xa0",e[0].type,"\xa0"]}),(0,g.jsx)(s.Eq,{justify:"center",children:e.map(((i,o)=>{var r,a,l,d;return(0,g.jsx)(s.Uc,{children:(0,g.jsx)(s.xu,{borderRadius:"Colour"!==i.type&&"Color"!==i.type||j.length!==(null===e||void 0===e?void 0:e.length)?"2px":"50%",padding:"2px",onClick:t=>{t.stopPropagation(),i.available&&E([0==n?i.option:F[0],1==n?i.option:F[1],2==n?i.option:F[2]])},backgroundColor:i.option==F[n]?m:"white",_hover:{bg:i.option==F[n]?m:(0,Q.lA)(m,5)},cursor:"pointer",children:"Colour"!==i.type&&"Color"!==i.type||j.length!==(null===e||void 0===e?void 0:e.length)?(0,g.jsxs)(s.xv,{as:i.available?"samp":"s",fontSize:u+"px",sx:{color:(i.available?i.option==F[n]?"white":"black":"gray")+" !important",fontFamily:f+" !important"},align:"center",paddingX:(d=i.option,d.length>=3?"0px":.5*u+"px"),children:["\xa0",i.option,"\xa0"]}):(0,g.jsx)(v.Ee,{padding:"2px",borderRadius:(0,c.lmH)(w),width:"58px",height:"58px",src:null===t||void 0===t||null===(r=t.data)||void 0===r||null===(a=r.product)||void 0===a||null===(l=a.images)||void 0===l?void 0:l[j[o]].src})})},i.option)}))},n)]},n)}))})},It=n(9219),kt=n(9363);var _t=function(t){const[e]=(0,h.j1)("isInDesignMode"),[n]=(0,h.j1)("isDemoBrand"),[i]=(0,h.j1)("whatmoreSecondaryColor"),o=(0,h.MO)("whatmoreSecondaryColorShade900"),[a]=(0,h.j1)("whatmorePrimaryFont"),[l]=(0,h.j1)("whatmoreShopId"),[x,m,f,w]=(0,u.Z)(),[j,C]=(0,r.useState)(!1),[y,S]=(0,r.useState)(t.product),{whatmoreUITheme:b}=(0,r.useContext)(it.I),{whatmoreWidgetSourceDetails:I}=(0,r.useContext)(it.I),[k,_,F,E,T,P]=St(0,y,t.event),[O,L]=(0,r.useState)(null),[R,D]=(0,r.useState)(parseFloat(y.price)),[z,K]=(0,r.useState)(parseFloat(y.compare_price)),[M,W]=(0,r.useState)(y.currency),[A,q]=(0,r.useState)(),H=t.event,Z=t.productClickHandler,{whatmoreIsPreviewMode:N}=(0,r.useContext)(it.I);(0,r.useEffect)((()=>{(0,c.N8M)(l)&&(0,It.Rb)(y,(0,c.Ipo)(l),l).then((t=>{S(t),D(parseFloat(t.price)),K(parseFloat(t.compare_price)),W(t.currency)}));(async()=>{const t=await(0,p.gK)(y,(0,c.Ipo)(l),l);q(t)})()}),[]);var U=.68*w,B=.55*U,Y=.4*U,X=U*(.55-.4),G=U+"px",J=Y+"px",ot=X+"px",dt=.12*Y;const st=(0,c.ITD)(l);return(0,g.jsxs)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:tt,marginBottom:(0,c.pq5)(l),width:G,height:"fit-content",boxShadow:"round"==b?"dark-lg":null,onClick:()=>{!function(t,i){e||n||(async()=>{(0,d.wz)(t,i)})(),Z(i),C(!0)}(H,y)},backgroundColor:(0,Q.lA)("#ffffff",(0,c.U5_)(l)),animation:j?$.mT:null,borderRadius:"round"==b?"xl":null,overflow:"hidden",onAnimationEnd:()=>{C(!1)},spacing:0,sx:{borderWidth:(0,c.alU)(l),borderColor:(0,c.qPe)(l)},children:[(0,g.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,g.jsx)(s.xu,{height:J,width:J,bgColor:o,children:(0,g.jsx)(v.Ee,{width:J,height:J,src:(0,kt.s)(y.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,c.yOX)(l)+" !important"}})}),(0,g.jsxs)(s.xu,{height:J,width:U-Y+"px",children:[(0,g.jsxs)(s.Kq,{direction:"column",justifyContent:(0,c.Fr)(l)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"4px",paddingY:"10px",children:[(0,g.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",1.1*dt+"px","important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",a,"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"),t.style.setProperty("padding","0","important"),t.style.setProperty("margin-bottom","4px","important"),t.style.setProperty("font-weight","normal","important"))},children:(0,at.s)(null==y.title?"":y.title.toString())}),(0,c.QaY)(l)?(0,g.jsxs)(s.Kq,{direction:(0,c.$zZ)(l)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",borderRadius:"round"==b?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"4px",sx:{margin:"0px !important",marginBottom:"4px !important"},children:[(0,g.jsxs)(s.xv,{noOfLines:1,fontSize:.9*dt*(0,c.Rqt)(l)+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:a+" !important",color:(0,c.Uyp)(l)+" !important",padding:"0px !important",letterSpacing:"normal !important",margin:"0px !important"},children:["\xa0"," "+(0,It.jx)(R,"",l,M)," \xa0"]}),(0,lt.B)(R,z)?(0,g.jsxs)(s.xv,{noOfLines:1,fontSize:.9*dt*(0,c.Rqt)(l)+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:a+" !important",color:(0,c.kPs)(l)+" !important",margin:"0px !important",letterSpacing:"normal !important",textDecoration:"line-through !important"},children:[" ",(0,It.jx)(z,"",l,M)]}):(0,g.jsx)(g.Fragment,{})]}):(0,g.jsx)(g.Fragment,{}),(0,g.jsx)(s.xv,{fontSize:.82*dt*(0,c.Rqt)(l)+"px",fontWeight:"medium",lineHeight:"110%",sx:{margin:"0px !important",fontFamily:a+" !important",color:(0,c.eod)(l)+" !important"},children:N?(0,c.qde)(l):(0,c.aTS)(l)})]}),(0,c.Fr)(l)?(0,g.jsx)(s.Kq,{className:"whatmore-ios-css-relative-fix",style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:"flex-start",height:"100%",width:"100%",children:(0,g.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,g.jsx)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:o,sx:{borderRadius:"round"==b?"5px":"0px",padding:"2px"},spacing:"0px",children:(0,g.jsx)(rt.Z,{sx:{color:i,fontSize:1.3*dt+"px"}})}),(0,g.jsx)(s.xu,{width:"2px"})]})}):(0,g.jsx)(g.Fragment,{})]})]}),(0,g.jsx)(V.Rg,{unmountOnExit:!0,initialScale:.5,in:"awaitingVariantSelection"==k.state,style:{height:"fit-content",width:"100%"},children:"awaitingVariantSelection"==k.state&&null!=_?(0,g.jsx)(s.xu,{width:"100%",height:"fit-content",marginTop:.1*B+"px",marginBottom:.1*B+"px",overflowY:"auto",overflowX:"hidden",maxHeight:B*st+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,g.jsx)(bt,{width:G,height:"fit-conten",event:H,product:y,data:A,productVariantOptions:_,baseFontSize:1.2*dt,onOptionSelected:t=>{!function(t){L(t);const e=T(t);e&&(D(e.price),K(e.compare_price))}(t)}})}):(0,g.jsx)(g.Fragment,{})}),(0,g.jsx)(s.Kq,{direction:"row",width:"100%",height:ot,justifyContent:"center",alignItems:"center",children:(0,g.jsx)(gt,{baseFontSize:.3*X,event:H,product:y,cartState:k.state,cartCount:k.cart_count,onClickAtc:t=>{"init"==k.state?(F(),(0,et.GF)({userInteractionType:nt.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:I,event:H,productList:[y],ctaList:H.cta})):"awaitingVariantSelection"==k.state&&E(O)},onCartIconClick:()=>{P()}})})]})},Ft=n(3867);var Et=function(t){var e,n,i;const[o]=(0,h.j1)("isInDesignMode"),[r]=(0,h.j1)("isDemoBrand"),[a]=(0,h.j1)("whatmoreSecondaryColor"),[l]=(0,h.j1)("whatmorePrimaryFont"),c=t.event,u=t.product,p=null!==(e=t.baseFontSize)&&void 0!==e?e:10,x=null!==(n=t.width)&&void 0!==n?n:"fit-content",m=null!==(i=t.height)&&void 0!==i?i:"fit-content";return(0,g.jsx)(s.rU,{href:u.product_link,color:a,onClick:()=>{!function(t,e){o||r||(async()=>{(0,d.$L)(t,e)})()}(c,u)},children:(0,g.jsx)(s.xu,{width:x,height:m,padding:"2x",boxShadow:"lg",borderRadius:"md",backgroundColor:"white",children:(0,g.jsxs)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",spacing:"5px",children:[(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.xv,{lineHeight:"100%",fontSize:1.4*p,fontWeight:"semibold",sx:{fontFamily:l+" !important",color:a+" !important"},children:" VIEW MORE "})}),(0,g.jsx)(s.M5,{children:(0,g.jsx)(rt.Z,{sx:{color:a,fontSize:1.4*p}})})]})})})},Tt=n(7605);var Pt=n(6163);function Ot(t){var e;const[n]=(0,h.j1)("whatmoreSecondaryColor"),[i]=(0,h.j1)("whatmorePrimaryFont"),[o]=(0,h.j1)("whatmoreShopId"),[a,l]=(0,r.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),u=t.onClick,p=t.width,x=t.height,m=t.title;return(0,g.jsx)(s.xu,{width:p,height:x,padding:"2x",boxShadow:"lg",backgroundColor:n,onClick:t=>{t.stopPropagation(),u(),l(!0)},animation:a?$.mT:null,onAnimationEnd:()=>{l(!1)},cursor:"pointer",children:(0,g.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",children:(0,g.jsxs)(s.xv,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},lineHeight:"100%",fontSize:1.4*d+"px",fontWeight:"semibold",sx:{fontFamily:i+" !important",color:(0,c.KCy)(o)+" !important"},children:["\xa0",m,"\xa0"]})})})}var Lt=function(t){var e,n,i;const[o]=(0,h.j1)("whatmoreShopId"),r=t.event,a=t.product,l=null!==(e=t.baseFontSize)&&void 0!==e?e:10,d=t.onShopNowClick,s=null!==(n=t.width)&&void 0!==n?n:"100%",c=null!==(i=t.height)&&void 0!==i?i:"100%";return(0,g.jsx)(Ot,{onClick:function(){d()},event:r,product:a,baseFontSize:l,width:s,height:c,title:"SHOP NOW"})};var Rt=function(t){var e;const[n]=(0,h.j1)("isInDesignMode"),[i]=(0,h.j1)("isDemoBrand"),[o]=(0,h.j1)("whatmorePrimaryFont"),[a]=(0,h.j1)("whatmoreShopId"),[l,p,x,m]=(0,u.Z)(),[f,w]=(0,r.useState)(!1),[j,C]=(0,r.useState)(t.product),{whatmoreWidgetSourceDetails:y}=(0,r.useContext)(it.I),[S,b,I,k,_,F]=St(0,j,t.event),[E,T]=(0,r.useState)(null),[P,O]=(0,r.useState)(parseFloat(j.price)),[L,R]=(0,r.useState)(parseFloat(j.compare_price)),[D,z]=(0,r.useState)(j.currency),K=t.event,M=t.productClickHandler,W=null!==(e=t.tileWidthFactor)&&void 0!==e?e:1;(0,r.useEffect)((()=>{(0,c.N8M)(a)&&(0,It.Rb)(j,brandDomainContext(a),a).then((t=>{C(t),O(parseFloat(t.price)),R(parseFloat(t.compare_price)),z(t.currency)}))}),[]);var A=m*W,q=.3*A,H=A+"px",Z=.7*q,N=.9*Z,U=.12*q;const B=(0,c.ITD)(a);function Y(t,e){n||i||(async()=>{(0,d.wz)(t,e)})(),M(e),w(!0)}return(0,g.jsx)(s.Kq,{direction:"row",width:H,height:"fit-content",justifyContent:"center",children:(0,g.jsx)(s.xu,{marginTop:tt,marginBottom:(0,c.pq5)(a),width:H,onClick:t=>{},animation:f?$.mT:null,borderRadius:"lg",onAnimationEnd:()=>{w(!1)},children:(0,g.jsxs)(s.Kq,{direction:"column",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",spacing:"0px",children:[(0,g.jsxs)(s.Kq,{direction:"row",width:"100%",height:"70%",justifyContent:"space-around",alignItems:"center",borderTopRadius:"lg",overflow:"hidden",onClick:()=>{Y(K,j)},children:[(0,g.jsx)(s.xu,{height:Z+"px",width:Z+"px",children:(0,g.jsx)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",children:(0,g.jsx)(s.xu,{height:N+"px",width:N+"px",borderRadius:"lg",bgColor:"gray.100",overflow:"hidden",children:(0,g.jsx)(v.Ee,{width:N+"px",height:N+"px",src:j.thumbnail_image,objectFit:"cover"})})})}),(0,g.jsx)(s.xu,{height:Z+"px",width:A-Z+"px",children:(0,g.jsxs)(s.Kq,{direction:"column",justifyContent:"space-between",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingY:"10px",spacing:"2px",children:[(0,g.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*U+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:o+" !important",color:"white !important"},children:(0,at.s)(j.title.toString())}),(0,g.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",aligntItems:"center",marginTop:"5px",children:[(0,c.QaY)(a)?(0,g.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"flex-start",aligntItems:"center",borderRadius:"lg",backgroundColor:"blackAlpha.500",paddingX:"10px",paddingY:"5px",children:[(0,g.jsxs)(s.xv,{noOfLines:1,fontSize:1*U+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:o+" !important",color:"white !important"},children:["\xa0"," ",(0,It.jx)(parseFloat(P),"",a,D)," \xa0"]}),(0,g.jsx)(s.M5,{children:(0,lt.B)(j.price,j.compare_price)?(0,g.jsxs)(s.xv,{noOfLines:1,fontSize:.8*U+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:o+" !important",color:"#F9F6EE !important",textDecoration:"line-through !important"},children:[" ",(0,It.jx)(parseFloat(L),"",a,D)]}):(0,g.jsx)(g.Fragment,{})})]}):(0,g.jsx)(g.Fragment,{}),(0,g.jsx)(s.M5,{children:(0,g.jsx)(Ft.Z,{storeId:a,productId:j.client_product_id,productLink:j.product_link,fontSize:1*U,fontColor:"white"})})]})]})})]}),(0,g.jsx)(V.Rg,{unmountOnExit:!0,initialScale:.5,in:"awaitingVariantSelection"==S.state,style:{height:"fit-content",width:"100%"},children:"awaitingVariantSelection"==S.state&&null!=b?(0,g.jsx)(s.xu,{width:"100%",height:"fit-content",marginTop:.1*q+"px",marginBottom:.1*q+"px",overflowY:"auto",overflowX:"hidden",maxHeight:q*B+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,g.jsx)(bt,{width:H,height:"fit-content",event:K,product:j,productVariantOptions:b,baseFontSize:1*U,onOptionSelected:t=>{!function(t){T(t);const e=_(t);e&&(O(e.price),R(e.compare_price))}(t)},optionTitleColor:"white"})}):(0,g.jsx)(g.Fragment,{})}),(0,g.jsxs)(s.Kq,{direction:"row",width:"100%",height:"30%",justifyContent:"center",alignItems:"center",paddingBottom:"2px",paddingLeft:"2px",paddingRight:"2px",children:[(0,g.jsx)(s.xu,{width:"100%",height:"100%",children:(0,g.jsx)(Et,{baseFontSize:.8*U,event:K,product:j,width:"100%",height:"100%"})}),(0,g.jsx)(s.xu,{width:"100%",height:"100%",borderRadius:"md",overflow:"hidden",children:(0,c.Ib9)(a)?(0,g.jsx)(Lt,{baseFontSize:.8*U,event:K,product:j,borderRadius:"md",onShopNowClick:t=>{Y(K,j)}}):(0,g.jsx)(g.Fragment,{children:"form"===(0,c._5p)(a)?(0,g.jsx)(Pt.default,{baseFontSize:.8*U,event:K,product:j,width:"100%",height:"100%",showAddedToCart:!0}):(0,g.jsx)(gt,{baseFontSize:.8*U,event:K,product:j,cartState:S.state,cartCount:S.cart_count,borderRadius:"md",onClickAtc:t=>{"init"==S.state?(I(),(0,et.GF)({userInteractionType:nt.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:y,event:K,productList:[j],ctaList:K.cta})):"awaitingVariantSelection"==S.state&&k(E)},onCartIconClick:()=>{F()}})})})]})]})})})};var Dt=function(t){const[e]=(0,h.j1)("isInDesignMode"),[n]=(0,h.j1)("isDemoBrand"),[i]=(0,h.j1)("whatmoreSecondaryColor"),o=(0,h.MO)("whatmoreSecondaryColorShade900"),[a]=(0,h.j1)("whatmorePrimaryFont"),[l]=(0,h.j1)("whatmoreShopId"),[p,x,m,f]=(0,u.Z)(),[w,j]=(0,r.useState)(!1),[C,y]=(0,r.useState)(t.product),{whatmoreUITheme:S}=(0,r.useContext)(it.I),[b,I]=(0,r.useState)(!(0,c.N8M)(l)),[k,_]=(0,r.useState)(parseFloat(C.price)),[F,E]=(0,r.useState)(parseFloat(C.compare_price)),[T,P]=(0,r.useState)(C.currency),O=t.event;t.productClickHandler,(0,r.useEffect)((()=>{(0,c.N8M)(l)&&(0,It.Rb)(C,(0,c.Ipo)(l),l).then((t=>{y(t),_(parseFloat(t.price)),E(parseFloat(t.compare_price)),P(t.currency),I(!0)}))}),[]);var L=.68*f,R=.4*L,D=L+"px",z=R+"px",K=L*(.55-.4)+"px",M=.12*R;(0,c.ITD)(l);const{whatmoreWidgetSourceDetails:W}=(0,r.useContext)(it.I);function A(t){return(0,c.lj5)(l)?t.product_link+"?"+(0,c.awP)(l)+"&"+(0,c.n9s)(l)+"&"+(0,c.vaK)(l):t.product_link}function q(t,i){e||n||(async()=>{(0,d.wz)(t,i),(0,et.GF)({userInteractionType:nt.K.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:W,event:t,productList:[i],ctaList:t.cta})})(),j(!0)}return(0,g.jsxs)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:tt,marginBottom:(0,c.pq5)(l),width:D,height:"fit-content",boxShadow:"round"==S?"dark-lg":null,onClick:()=>{q(O,C),window.location.href=A(C)},backgroundColor:(0,Q.lA)("#ffffff",(0,c.U5_)(l)),animation:w?$.mT:null,borderRadius:"round"==S?"xl":null,overflow:"hidden",onAnimationEnd:()=>{j(!1)},spacing:0,sx:{borderWidth:(0,c.alU)(l),borderColor:(0,c.qPe)(l)},children:[(0,g.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,g.jsx)(s.xu,{height:z,width:z,bgColor:o,children:(0,g.jsx)(v.Ee,{width:z,height:z,src:(0,kt.s)(C.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,c.yOX)(l)+" !important"}})}),(0,g.jsxs)(s.xu,{height:z,width:L-R+"px",children:[(0,g.jsxs)(s.Kq,{direction:"column",justifyContent:(0,c.Fr)(l)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingY:"10px",children:[(0,g.jsx)(s.xv,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},style:{overflow:"hidden",textOverflow:"ellipsis"},sx:{fontFamily:a+" !important",color:"black !important",lineHeight:"120% !important",fontWeight:"medium !important",fontSize:1.1*M+"px !important",noOfLines:"2 !important"},children:(0,at.s)(null==C.title?"":C.title.toString())}),(0,c.QaY)(l)?(0,g.jsxs)(s.Kq,{direction:(0,c.$zZ)(l)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",marginTop:"5px",borderRadius:"round"==S?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"5px",children:[b&&(0,g.jsxs)(s.xv,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},noOfLines:1,fontSize:.9*M+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:a+" !important",color:(0,c.Uyp)(l)+" !important",margin:"0px !important"},children:["\xa0"," "+(0,It.jx)(k,"",l,T)," \xa0"]}),(0,lt.B)(k,F)&&b?(0,g.jsxs)(s.xv,{as:"s",style:{minHeight:0},noOfLines:1,fontSize:.9*M+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:a+" !important",color:(0,c.kPs)(l)+" !important",margin:"0px !important"},children:[" ",(0,It.jx)(F,"",l,T)]}):(0,g.jsx)(g.Fragment,{})]}):(0,g.jsx)(g.Fragment,{})]}),(0,c.Fr)(l)?(0,g.jsx)(s.Kq,{className:"whatmore-ios-css-relative-fix",style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:"flex-start",height:"100%",width:"100%",children:(0,g.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,g.jsx)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:o,sx:{borderRadius:"round"==S?"5px":"0px",padding:"2px"},spacing:"0px",children:(0,g.jsx)(rt.Z,{sx:{color:i,fontSize:1.3*M+"px"}})}),(0,g.jsx)(s.xu,{width:"2px"})]})}):(0,g.jsx)(g.Fragment,{})]})]}),(0,c.pp3)(l)&&(0,g.jsx)(s.Kq,{direction:"row",width:"100%",height:K,justifyContent:"center",alignItems:"center",children:(0,g.jsx)(Lt,{baseFontSize:.8*M,event:O,product:C,borderRadius:"md",onShopNowClick:t=>{q(O,C),window.location.href=A(C)}})})]})};var zt=function(t){const[e]=(0,h.j1)("whatmoreShopId"),n=(0,c.eyg)(e),i=t.event,o=t.product;return"broad-tile"==n?(0,g.jsx)(_t,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"broad-tile-no-cta"==n?(0,g.jsx)(Dt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"link_only"==n?(0,g.jsx)(ot,{product:t.product,event:t.event}):"narrow-tile"==n?(0,g.jsx)(Rt,{event:i,product:o,productClickHandler:t.productClickHandler,tileWidthFactor:i.products.length>1?.68:void 0}):(0,g.jsx)(_t,{product:t.product,event:t.event,productClickHandler:t.productClickHandler})},Kt=n(6119),Mt=n(3388),Wt=n(7643);var At=function(t){const[e,n,i,o]=(0,u.Z)(),[r]=(0,h.j1)("whatmoreShopId"),d=(0,h.MO)("isInDesignMode"),p=(0,h.MO)("isDemoBrand"),x=t.event,m=t.productClickHandler,v=(0,c.eyg)(r);if(!(0,Mt.kT)(x))return(0,g.jsx)(g.Fragment,{});if(1==x.products.length&&(void 0==x.cta||0==x.cta.length)){const t=x.products[0];return(0,c.rnv)(r)?(0,g.jsx)(s.Kq,{direction:"horizontal",width:o,height:"fit-content",justifyContent:"center",backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))",children:(0,g.jsx)(Wt.u,{userInteractionType:nt.K.PRODUCT_CTA_VIEW,event:x,productList:[t],triggerFlag:!d&&!p,children:(0,g.jsx)(s.M5,{children:(0,g.jsx)(Rt,{event:x,product:t,productClickHandler:m},x.event_id+t.product_id)})})}):(0,g.jsx)(s.Kq,{direction:"horizontal",width:o,height:"fit-content",justifyContent:"center",backgroundImage:"narrow-tile"==v?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))":null,children:(0,g.jsx)(s.M5,{children:(0,g.jsx)(Wt.u,{userInteractionType:nt.K.PRODUCT_CTA_VIEW,event:x,productList:[t],triggerFlag:!d&&!p,children:(0,g.jsx)(zt,{event:x,product:t,productClickHandler:m},x.event_id+t.product_id)})})})}return(0,g.jsx)(s.M5,{children:(0,g.jsx)("div",{onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,g.jsx)(s.xu,{width:o+"px",backgroundImage:"narrow-tile"==v?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))":null,children:(0,g.jsxs)(a.tq,{slidesPerView:1==x.products.length?1:1.4,initialSlide:x.products.length<=2||(0,c.VqZ)(r)?0:1,centeredSlides:!(0,c.VqZ)(r),modules:[l.Gk],mousewheel:{invert:!1,thresholdDelta:20},nested:!0,children:[x.products.map((t=>(0,g.jsx)(a.o5,{children:(0,g.jsx)(Wt.u,{userInteractionType:nt.K.PRODUCT_CTA_VIEW,event:x,productList:[t],triggerFlag:!d&&!p,children:(0,g.jsx)(s.Kq,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",alignItems:"center",children:(0,g.jsx)(zt,{event:x,product:t,productClickHandler:m},x.event_id+t.product_id)})})},x.event_id+t.product_id))),(0,c.pp3)(r)&&void 0!=x.cta&&x.cta.map((t=>(0,g.jsx)(a.o5,{children:(0,g.jsx)(s.Kq,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",alignItems:"center",children:(0,g.jsx)(Kt.Z,{event:x,cta:t},x.event_id+t.cta_id)})},x.event_id+t.cta_id)))]})})})})};var qt=function(t){const[e,n]=(0,h.j1)("isProductSwiperCatalogOpen"),i=t.event,o=t.productClickHandler;return(0,r.useContext)(gn).isIOS&&e?(0,g.jsx)(At,{event:i,productClickHandler:o},i.event_id):(0,g.jsx)(V.MT,{unmountOnExit:!0,initialScale:.2,in:e,children:(0,g.jsx)(At,{event:i,productClickHandler:o},i.event_id)})};function Ht(t){const e=t.event,[n,i,o,r]=(0,u.Z)(),[a]=(0,h.j1)("whatmorePrimaryFont");return(0,g.jsx)(s.xu,{width:"fit-content",height:"fit-content",padding:"5px",children:(0,g.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",children:[(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.Cd,{overflow:"hidden",size:.15*r+"px",children:(0,g.jsx)(v.Ee,{width:"100%",height:"100%",src:e.thumbnail_image})})}),(0,g.jsx)(s.xu,{width:"fit-content",height:"fit-content",children:(0,g.jsxs)(s.Kq,{direction:"column",width:"fit-content",height:"fit-content",children:[(0,g.jsx)(s.xv,{color:"white",fontSize:.05*r+"px",fontWeight:"bold",fontFamily:"sans-serif",align:"left",sx:{fontFamily:a+" !important"},children:e.presenter_name.substring(0,15)}),(0,g.jsx)(q.Z,{event:e,fontSize:.03*r+"px"})]})})]})})}var Zt,Nt=function(t){const[e]=(0,h.j1)("isInDesignMode"),[n]=(0,h.j1)("isDemoBrand"),[i,o]=(0,h.j1)("isProductSwiperCatalogOpen"),[a,l]=(0,j.Z)(),[d,u]=(0,h.j1)("isFirstIndicatorRenderDone"),p=(0,r.useContext)(gn),[x]=(0,h.j1)("whatmoreShopId"),m=t.event,v=t.isLast,f=t.onCloseCallback,w=t.focusRef,C=t.productClickHandler;return(0,g.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",children:(0,g.jsxs)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,g.jsx)(s.xu,{width:"full",margin:"2px",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:(0,g.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"space-between",paddingRight:"10px",paddingLeft:"10px",children:[(0,g.jsx)(Ht,{event:m}),(0,g.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,g.jsx)(I,{focusRef:w}),(0,g.jsx)(U,{event:m,onCloseCallback:f})]})]})}),(0,g.jsx)(s.xu,{width:"100%",height:"100%",onClick:()=>{l(!a)}}),(0,g.jsxs)(s.xu,{width:"full",height:"fit-content",children:[p.totalEvents>1&&!d&&p.showSwipeIndicator?(0,g.jsx)(s.xu,{width:"full",margin:"2px",children:(0,g.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,g.jsx)(G,{swipeUp:!v})})}):null,void 0!=m.products&&m.products.length>0?(0,g.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(x)?(0,g.jsx)(s.xu,{w:"100%",children:(0,g.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,g.jsx)(A,{event:m,onToggle:t=>{o("minimize-button"!==t)}})})}):(0,g.jsx)(g.Fragment,{}),(0,g.jsx)(s.xu,{display:"flex",width:"100%",height:"fit-content",children:(0,g.jsx)(qt,{event:m,productClickHandler:C})})]}):(0,g.jsx)("div",{})]})]})})};function Ut(t){const[e,n,i,o]=(0,u.Z)(),[a]=(0,h.j1)("whatmorePrimaryFont"),[l]=(0,h.j1)("whatmoreShopId"),[d,p]=(0,r.useState)(""),x=t.data,m=(t.event,t.product,t.setShowOptionsChart);var f=.4*o*.8*.13;(0,r.useEffect)((()=>{var t,e,n;let i="vanyaclothing.myshopify.com";"1972174947"===l&&(i="vanyaclothing.myshopify.com");const o="https://app.kiwisizing.com/api/getSizingChart?shop=".concat(i,"&product=").concat(null===x||void 0===x||null===(t=x.product)||void 0===t||null===(e=t.image)||void 0===e?void 0:e.product_id,"&title=").concat(null===x||void 0===x||null===(n=x.product)||void 0===n?void 0:n.title,"&tags=&cacheSettingsUpdateAt=2020-08-11T15%3A19%3A49.000Z&settingsVersion=19");fetch(o).then((t=>{if(!t.ok)throw new Error("HTTP error! Status: ".concat(t.status));return t.json()})).then((t=>{p(t.sizings[0].layout.data[0].data.url)})).catch((t=>{console.error("Error fetching data:",t)}))}),[]);const w=(0,F.F4)(Zt||(Zt=(0,k.Z)(["\n 0% {\n transform: translateY(100%);\n }\n "]))),j="".concat(w," 0.5s");return(0,g.jsx)(s.Kq,{bg:"black",height:"100%",opacity:"100%",width:"100%",borderTopRadius:"xl",animation:j,justifyContent:"center",alignItems:"center",children:(0,g.jsxs)(s.xu,{width:"100%",height:"100%",children:[(0,g.jsx)(v.Ee,{width:"100%",height:"auto",src:(0,c.Zb8)(l)?d:(0,c.KM)(l),objectFit:"contain",borderTopRadius:"xl"}),(0,g.jsx)(s.Kq,{width:"100%",height:"100%",direction:"column",justifyContent:"flex-start",style:{position:"relative",zIndex:1,bottom:"90%"},className:"whatmore-ios-css-relative-fix",children:(0,g.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",onClick:t=>{t.stopPropagation(),m(!1)},cursor:"pointer",padding:"4px",children:(0,g.jsx)(H.Z,{sx:{boxShadow:3,color:"white !important",fontSize:1.6*f,filter:"drop-shadow(0 0 5px black);"}})})})]})})}var Vt=n(9748),Bt=n(5630),Yt=(n(1332),n(6665));function Xt(t){var e;const[n,i]=(0,r.useState)(null),o=t.product;return(0,r.useEffect)((()=>{(0,ft.bN)(o).then((t=>{i(t.variants)}))}),[]),null==n?(0,g.jsx)(g.Fragment,{}):(0,g.jsx)("div",{style:{width:null!==(e=t.width)&&void 0!==e?e:"100%",borderRadius:"6px",overflow:"hidden",height:1.5*t.height,backgroundColor:"white"},children:(0,g.jsxs)("form",{method:"post",action:"/cart/add","accept-charset":"UTF-8",class:"shopify-product-form",enctype:"multipart/form-data",is:"product-form",children:[(0,g.jsx)("input",{type:"hidden",name:"form_type",value:"product"}),(0,g.jsx)("input",{type:"hidden",name:"utf8",value:"\u2713"}),(0,g.jsx)("input",{type:"hidden",name:"id",value:t.variantId}),(0,g.jsx)("input",{type:"hidden",value:t.product.product_link,name:"productUrl"}),(0,g.jsx)("div",{class:"shiprocket-headless","data-type":"product"}),(0,g.jsx)("textarea",{"data-variant-json":"",class:"hide","aria-hidden":"true","aria-label":"Product JSON",children:JSON.stringify(n).toString()})]})})}function Gt(t){const e=(0,h.MO)("whatmoreShopId"),n=t.product;return"63748341981"==e||"55845847231"==e||"47837511839"==e?(0,g.jsx)(Xt,{product:n,variantId:t.variantId,height:t.height,width:t.width}):(0,g.jsx)(g.Fragment,{})}function Jt(t){var e,n,i;const[o]=(0,h.j1)("isInDesignMode"),[a]=(0,h.j1)("isDemoBrand"),[l]=(0,h.j1)("whatmoreShopId"),[u]=(0,h.j1)("whatmorePrimaryFont"),[p]=(0,h.j1)("whatmoreSecondaryColor"),{whatmoreUITheme:x}=(0,r.useContext)(it.I),{whatmoreWidgetSourceDetails:m}=(0,r.useContext)(it.I),[v,f]=(0,r.useState)(!1),{closeClickComponent:w}=(0,r.useContext)(gn),[j,C]=(0,r.useState)(!1),y=t.FONT_SIZE,S=t.data,b=t.event,I=t.selectedVariantId,k=t.product,_=t.itemQuantity,F=t.PRODUCT_TILE_WIDTH,E=t.cartItemCount,T=t.addToCartFlag,P=t.setAddToCartFlag,L=t.soldOutFlag,R=t.setSoldOutFlag;const D=t=>{var e,n,i;(function(t,e){o||a||(async()=>{(0,d.$L)(t,e)})()}(b,k),"buy-now"==t)&&(!function(t,e,n,i){"shopify"==n?(0,ft.bj)(t,e,i):(0,vt.rY)(t,e,i)}(void 0!==I?I:null===S||void 0===S||null===(e=S.product)||void 0===e||null===(n=e.variants)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.id,_,(0,c.Ipo)(l),l),(0,et.GF)({userInteractionType:nt.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:m,event:b,productList:[k],ctaList:b.cta}));"view-more"==t&&(window.location.href=k.product_link+"?"+(0,c.awP)(l)+"&"+(0,c.n9s)(l)+"&"+(0,c.vaK)(l)+((0,c.C0m)(l)?"&currency="+k.currency:""))};return(0,g.jsxs)(s.Kq,{boxShadow:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px",position:t.position,bg:"#D3D3D3",borderRadius:"10px",bottom:"10px",left:"50%",zIndex:"1",transform:"translateX(-50%)",direction:"row",width:"95%",paddingX:"20px",paddingTop:"15px",paddingBottom:"15px",spacing:"15px",fontSize:.9*y,children:[" ",L?(0,g.jsx)(Vt.zx,{width:"90%",bg:"#252324",variant:"outline",opacity:4,_hover:{bg:"#252324"},height:2.5*y,disabled:!0,sx:{borderRadius:"round"==x?"5px":"0px",borderWidth:(0,c.alU)(l),borderColor:(0,c.qPe)(l)},children:(0,g.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:"white !important",fontFamily:u+" !important"},children:"Sold Out"})}):(0,g.jsxs)(s.Kq,{direction:"vertical"==(0,c.rc3)(l)?"column":"row",width:"100%",spacing:"15px",fontSize:.9*y,justifyContent:"center",children:[(0,c.$bv)(l)?(0,g.jsx)(Vt.zx,{width:"90%",height:2.5*y,onClick:async t=>{var e,n,i;if(t.stopPropagation(),f(!0),function(t,e,n){o||a||(async()=>{(0,d.JX)(t,e,n)})()}(b,k,_),(0,et.GF)({userInteractionType:nt.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:m,event:b,productList:[k],ctaList:b.cta}),void 0===I)return void console.log("ERROR ! Select the option.");const r=void 0!==I?I:null===S||void 0===S||null===(e=S.product)||void 0===e||null===(n=e.variants)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.id,s=S.product.variants.filter((t=>t.id==r))[0].price;Ct(r,_,(0,c.Ipo)(l),l,b,k).then((t=>{if(!t.ok)throw new Error(t.status);return f(!1),P(!0),t.json()})).then((t=>((0,h.bU)("whatmoreAddedToCart",!0),(0,c.kad)(l)&&(o||(async()=>{const t=await(0,ft.Mj)().then((t=>t.json())).catch((t=>{console.error("Whatmore :: Error while fetching cart_token for initiateOrderTrackingEvent.",t)}));(0,Tt.a)(l,window.location.hostname,"",b.event_id,k.product_id,r,s,_,"add-to-cart",t.token)})()),t))).catch((t=>{f(!1),R(!0),console.error("Error:",t)}))},sx:{paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:"#343434"===(0,c.FdS)(l)?p+" !important":(0,c.FdS)(l)+" !important",borderRadius:"round"==x?"5px":"0px",borderWidth:(0,c.p5R)(l),borderColor:"#343434"===(0,c.yxc)(l)?p:(0,c.yxc)(l),_hover:{backgroundColor:"transparent !important",borderWidth:(0,c.p5R)(l),borderColor:"#343434"===(0,c.yxc)(l)?p:(0,c.yxc)(l)}},children:v?(0,g.jsx)(Bt.$,{display:"flex !important",color:"white"}):(0,g.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:(0,c.eSJ)(l)+" !important",fontFamily:u+" !important"},fontSize:y,children:(0,c.tan)(l)})}):(0,g.jsx)(g.Fragment,{}),(0,c.cDD)(l)?(0,g.jsx)(g.Fragment,{children:(0,c.H$w)(l)?(0,g.jsx)(Gt,{variantId:void 0!==I?I:null===S||void 0===S||null===(e=S.product)||void 0===e||null===(n=e.variants)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.id,product:k,height:2.5*y,width:"90%",fontSize:y,fontFamily:u}):(0,g.jsx)(g.Fragment,{children:(0,c.Stj)(l)?(0,g.jsx)(Vt.zx,{width:"90%",variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*y,onClick:()=>D("view-more"),sx:{backgroundColor:"white !important",borderRadius:"round"==x?"5px":"0px",borderWidth:(0,c.alU)(l),borderColor:(0,c.qPe)(l)},children:(0,g.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:p+"!important",fontFamily:u+" !important"},fontSize:y,children:(0,c.Z59)(l)})}):(0,g.jsx)(Vt.zx,{width:"90%",variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*y,onClick:()=>D("buy-now"),sx:{backgroundColor:(0,c.IIW)(l)+" !important",borderRadius:"round"==x?"5px":"0px",borderWidth:(0,c.p5R)(l),borderColor:"#343434"===(0,c.yxc)(l)?p:(0,c.yxc)(l),_hover:{backgroundColor:"transparent !important"}},children:(0,g.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:"#343434"===(0,c.iKW)(l)?p+" !important":(0,c.iKW)(l)+" !important",fontFamily:u+" !important"},fontSize:y,children:(0,c.ZuH)(l)})})})}):(0,g.jsx)(g.Fragment,{})]}),(0,g.jsx)(g.Fragment,{children:(0,c.$bv)(l)?(0,g.jsx)(g.Fragment,{children:j?(0,g.jsx)(s.kC,{width:"10%",spacing:"0",right:0,children:(0,g.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,g.jsx)(Yt.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*y}})})}):(0,g.jsxs)(s.kC,{animation:T?O:"none",onAnimationEnd:()=>P(!1),width:"10%",spacing:"0",right:0,onClick:()=>{"do_nothing"!==(0,c.v9M)(l)&&("go_to_cart_page"!==(0,c.v9M)(l)?(C(!0),function(t){"open_cart_slider"!==(0,c.v9M)(t)||null!==w&&w()}(l)):yt((0,c.Ipo)(l),l))},cursor:"pointer",children:[(0,g.jsx)(st.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*y}}),E>0?(0,g.jsx)(s.Cd,{padding:"2px",bg:"white",size:1.1*y,top:.03*-F,verticalAlign:"top",position:"relative",left:.11*-F,zIndex:"1",children:(0,g.jsx)(s.xv,{sx:{color:"black !important",fontFamily:u+" !important"},fontWeight:"bold",fontSize:.7*y,children:E})}):(0,g.jsx)(g.Fragment,{})]})}):(0,g.jsx)(g.Fragment,{})})]})}function $t(t){var e;const[n]=(0,h.j1)("whatmorePrimaryFont"),i=t.setOpenShopNow,o=t.FONT_SIZE,r=t.setLockSwiper,a=null!==(e=t.headerText)&&void 0!==e?e:"Shop Now";return(0,g.jsxs)(s.kC,{justifyContent:"center",paddingTop:"10px",paddingBottom:"8px",width:"100%",children:[(0,g.jsx)(s.kC,{width:"10%",display:"flex !important"}),(0,g.jsx)(s.kC,{width:"90%",justifyContent:"center",children:(0,g.jsx)(s.xv,{align:"center",fontSize:1.25*o,fontWeight:"semibold",sx:{color:"black !important",fontFamily:n+" !important"},as:"b",children:a})}),(0,g.jsx)(s.kC,{justifyContent:"center",width:"10%",alignItems:"center",onClick:t=>{t.stopPropagation(),i(!1),r(!1)},cursor:"pointer",children:(0,g.jsx)(H.Z,{sx:{boxShadow:3,color:"black !important",fontSize:1.2*o,filter:"drop-shadow(0 0 5px black);"}})})]})}function Qt(t){const[e]=(0,h.j1)("whatmorePrimaryFont"),n=t.FONT_SIZE,i=t.data;return(0,g.jsxs)(s.Kq,{direction:"column",paddingX:"20px",height:"fit-content",children:[(0,g.jsx)(s.Kq,{children:(0,g.jsx)(s.xv,{fontSize:n,fontWeight:"bold",justifyContent:"center",sx:{color:"black !important",fontFamily:e+" !important"},children:"Description"})}),(0,g.jsx)(s.Kq,{children:(0,g.jsx)(s.xu,{overflowY:"auto",scrollBehavior:"smooth",sx:{"::-webkit-scrollbar":{display:"none"}},children:(0,g.jsx)(s.xv,{fontSize:.8*n,justifyContent:"normal",dangerouslySetInnerHTML:{__html:(o=i.product.body_html,o.replace(/style="[^"]*color[^"]*"/gi,""))},sx:{fontFamily:e+" !important",lineHeight:"140% !important"}})})})]});var o}function te(t){var e;const[n,i]=(0,r.useState)(t.product),[o]=(0,h.j1)("whatmorePrimaryFont"),[a]=(0,h.j1)("whatmoreShopId");(0,r.useEffect)((()=>{(0,c.N8M)(a)&&(0,It.Rb)(n,(0,c.Ipo)(a),a).then((t=>{i(t)}))}),[]);const l=t.FONT_SIZE,d=t.data,u=t.itemPrice;const p=null===(e=t.data.product.variants.find((e=>e.id==t.selectedVariantId)))||void 0===e?void 0:e.compare_at_price,x=p&&0!=p&&p>u?Math.ceil((p-u)/p*100):NaN;return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(s.kC,{direction:"column",paddingLeft:"20px",paddingRight:"20px",paddingY:"5px",children:[(0,g.jsx)(s.kC,{children:(0,g.jsx)(s.rU,{href:function(t){return(0,c.lj5)(a)?t.product_link+"?"+(0,c.awP)(a)+"&"+(0,c.n9s)(a)+"&"+(0,c.vaK)(a)+((0,c.C0m)(a)?"&currency="+t.currency:""):t.product_link+((0,c.C0m)(a)?"?currency="+t.currency:"")}(n),color:"white",children:(0,g.jsx)(s.xv,{isTruncated:!0,noOfLines:2,padding:"2px",fontSize:1.1*l,sx:{color:"black !important",lineHeight:"140% !important",fontFamily:o+" !important"},as:"b",children:d.product.title})})}),(0,g.jsxs)(s.kC,{direction:"row",gap:"6px",paddingTop:"4px",children:[p&&p>u&&(0,g.jsx)(s.xv,{as:"s",padding:"2px",fontSize:1.2*l,fontWeight:"semibold",sx:{color:"gray !important",fontFamily:o+" !important"},children:(0,It.jx)(parseFloat(p)," ",a,n.currency)}),(0,g.jsx)(s.xv,{as:"b",padding:"2px",fontSize:1.2*l,fontWeight:"semibold",sx:{color:"black !important",fontFamily:o+" !important"},children:(0,It.jx)(parseFloat(u)," ",a,n.currency)}),!isNaN(x)&&0!=x&&(0,g.jsx)(s.xu,{display:"flex",bg:(0,c.sTg)(a)?(0,c.ZJm)(a):"white",alignItems:"center",borderRadius:"4px",width:"fit-content",px:"6px",children:(0,g.jsx)(s.xv,{fontSize:(0,c.sTg)(a)?"14px":1.1*l,sx:{color:(0,c.mso)(a)+" !important",fontFamily:o+" !important"},children:(0,c.sTg)(a)?"".concat(x,"% off"):"Save ".concat((0,It.jx)(parseFloat(p-u)," ",a,n.currency))})})]})]})})}function ee(t){var e,n;const[i]=(0,h.j1)("whatmorePrimaryFont"),[o]=(0,h.j1)("whatmoreShopId"),{setShowOptionsChart:a}=(0,r.useContext)(he),[l,d]=(0,r.useState)({}),u=(0,h.MO)("whatmoreSecondaryColorShade300"),p=t.selectedColor,x=t.selectOptionFirstHandler,m=t.selectOptionSecondHandler,f=t.selectOptionThirdHandler,w=(t.PRODUCT_TILE_HEIGHT,t.PRODUCT_TILE_WIDTH,t.FONT_SIZE),j=t.data,C=(t.product,(t,e)=>{d((n=>({...n,[t]:e})))});(0,r.useEffect)((()=>{d((t=>{var e,n,i,o,r,a,l,d,s,c,h,u,p,x,g,m,v,f,w,C;return{...t,[null===j||void 0===j||null===(e=j.product)||void 0===e||null===(n=e.options)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.name]:null===(o=j.product.options)||void 0===o||null===(r=o[0])||void 0===r||null===(a=r.values)||void 0===a?void 0:a[0],[null===j||void 0===j||null===(l=j.product)||void 0===l||null===(d=l.options)||void 0===d||null===(s=d[1])||void 0===s?void 0:s.name]:null===j||void 0===j||null===(c=j.product)||void 0===c||null===(h=c.options)||void 0===h||null===(u=h[1])||void 0===u||null===(p=u.values)||void 0===p?void 0:p[0],[null===j||void 0===j||null===(x=j.product)||void 0===x||null===(g=x.options)||void 0===g||null===(m=g[2])||void 0===m?void 0:m.name]:null===j||void 0===j||null===(v=j.product)||void 0===v||null===(f=v.options)||void 0===f||null===(w=f[2])||void 0===w||null===(C=w.values)||void 0===C?void 0:C[0]}}))}),[]);let y=[];for(let r=0;r<(null===j||void 0===j||null===(S=j.product)||void 0===S||null===(b=S.images)||void 0===b?void 0:b.length);r++){var S,b,I,k;(null===j||void 0===j||null===(I=j.product)||void 0===I||null===(k=I.images[r].variant_ids)||void 0===k?void 0:k.length)>0&&y.push(r)}return(0,g.jsx)(s.kC,{direction:"row",paddingLeft:"20px",paddingRight:"20px",paddingY:"10px",children:(null===j||void 0===j||null===(e=j.product)||void 0===e||null===(n=e.options)||void 0===n?void 0:n.length)>0&&(0,g.jsx)(s.kC,{direction:"column",width:"100%",gap:"4px",children:j.product.options.map(((e,n)=>{var r,d;return(0,g.jsx)(g.Fragment,{children:(e.values.length>1||"Color"===e.name||"Colour"===e.name)&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(s.kC,{justifyContent:"space-between",alignItems:"center",children:[(0,g.jsx)(s.xv,{fontSize:1*w,sx:{color:"black !important",fontFamily:i+" !important",fontWeight:"bold"},children:e.name}),"Size"===e.name&&(0,c.Ip6)(o)?(0,g.jsx)(s.kC,{marginTop:"4px",whiteSpace:"nowrap",cursor:"pointer",children:(0,g.jsx)(s.xv,{fontSize:.7*w,as:"u",sx:{color:"black !important",fontFamily:i+" !important"},onClick:()=>{null!==a&&a(!0)},children:(0,c.meb)(o)})}):(0,g.jsx)(g.Fragment,{})]}),(0,g.jsx)(s.Ug,{spacing:0,flexWrap:"wrap",alignContent:"flex-start",alignItems:"center",justifyContent:"flex-start",children:e.values.map(((t,r)=>{var a,d;return"Color"!==e.name&&"Colour"!==e.name||y.length!==(null===e||void 0===e||null===(a=e.values)||void 0===a?void 0:a.length)?(0,g.jsx)(s.kC,{paddingBottom:"8px",paddingRight:"8px",children:(0,g.jsx)(Vt.zx,{size:"sm",px:"8px !important",bg:l[e.name]===t?(null!==(d=(0,c.CPm)(o))&&void 0!==d?d:u)+" !important":(0,c.bC3)(o)+" !important",width:"fit-content !important",onClick:()=>{C(e.name,t),0===n&&x(t),1===n&&m(t),2===n&&f(t)},children:(0,g.jsx)(s.xv,{fontSize:.9*w,sx:{fontFamily:i+" !important",fontWeight:"normal",color:l[e.name]===t?(0,c.cY_)(o)+" !important":(0,c.FbM)(o)+" !important"},children:t})})},t):(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(s.kC,{paddingBottom:"8px",px:"2px",paddingRight:"8px",children:(0,g.jsx)(s.xu,{boxShadow:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px",borderRadius:(0,c.lmH)(o),size:"sm",border:l[e.name]===t?"2px solid ".concat((0,c.ua_)(o)," !important"):"",width:"fit-content !important",onClick:()=>{C(e.name,t);const i=e.values.indexOf(t);p(i),0===n&&x(t),1===n&&m(t),2===n&&f(t)},children:(0,g.jsx)(v.Ee,{padding:"2px",borderRadius:(0,c.lmH)(o),width:"58px",height:"58px",src:j.product.images[y[r]].src})})},t)})}))}),n===(null===j||void 0===j||null===(r=j.product)||void 0===r||null===(d=r.options)||void 0===d?void 0:d.length)-1&&(0,g.jsx)(s.M5,{paddingTop:"8px",width:"100%",children:(0,g.jsx)(s.iz,{color:t.dividerColor,size:"xs"})})]})})}))})})}var ne,ie=n(8782);function oe(t){var e,n;const[i,o,a,l]=(0,u.Z)();var d=.4*l*.8,p=d*(16/9)*.6*.8;const x=1.1*d,m=x*(16/9)*.8;var f=.13*d;const[w,j]=(0,r.useState)(!1),C=t.data,y=t.event,S=t.product,b=t.setOpenShopNow,I=t.setLockSwiper,[_]=(0,h.j1)("whatmoreEmbedAppUseVariant"),[E,T]=(0,r.useState)((()=>{if("true"===_)return le(C,S.client_product_id)})),[P,O]=(0,r.useState)((()=>{if("true"===_)return de(C,S.client_product_id)})),[L,R]=(0,r.useState)((()=>{if("true"===_)return se(C,S.client_product_id)})),[D,z]=(0,r.useState)(),[K,M]=(0,r.useState)(1),[W,A]=(0,r.useState)(),[q,H]=(0,r.useState)(0),[Z,N]=(0,r.useState)(!1),[U,V]=(0,r.useState)(!1),[B,Y]=(0,r.useState)(S.thumbnail_image),X=(0,r.useContext)(it.I),G=(0,h.MO)("whatmoreShopId"),$=(0,r.useCallback)((t=>{T(t)}),[]),Q=(0,r.useCallback)((t=>{O(t)}),[]),tt=(0,r.useCallback)((t=>{R(t)}),[]);(0,r.useEffect)((()=>{const t=re(C,E,P,L);z(t),A(ae(C,t)),M(1),V(!1);const e=ce(C,t);null!==e&&Y(e)}),[E,P,L]),(0,r.useEffect)((()=>{var t,e,n;const i=void 0===D?null===(t=C.product)||void 0===t||null===(e=t.variants)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.price:ae(C,D);A(i*K)}),[K]),(0,r.useEffect)((()=>{function t(t){const e=document.getElementById("whatmore-shopnow-view"),n=document.getElementById("whatmore-size-chart");n&&n.contains(t.target)||!e||e.contains(t.target)||(b(!1),I(!1))}function e(t){t.preventDefault(),t.stopPropagation(),n.scrollTop+=t.deltaY}document.addEventListener("click",t);const n=document.getElementById("whatmore-shopnow-view");return null===n||void 0===n||n.addEventListener("wheel",e),()=>{document.removeEventListener("click",t),document.removeEventListener("wheel",e)}}),[]),(0,r.useEffect)((()=>{const t=async function(t,e){return"shopify"==t?(0,ft.Bi)():(0,vt.OM)(e)}((0,c.Ipo)(G),G);t.then((t=>t.json())).then((t=>{H(t.item_count)})).catch((t=>{console.error("Cart Add Error:",t)}))}),[Z]);const[et,nt]=(0,r.useState)(0),ot=(0,F.F4)(ne||(ne=(0,k.Z)(["\n 0% {\n transform: translateY(100%);\n }\n "]))),rt="".concat(ot," 0.5s"),at=t.data.product.images;let lt=0,dt=at.length,st=0;for(let r=0,s=0;r<at.length;r++){var ct,ht;if((null===(ct=at[r])||void 0===ct||null===(ht=ct.variant_ids)||void 0===ht?void 0:ht.length)>0){if(s++,s===et+1){st=1,lt=r;continue}if(1==st){dt=r;break}}}return(0,g.jsxs)(s.kC,{sx:{"&::-webkit-scrollbar":{width:"0px"}},id:"whatmore-shopnow-view",position:"relative",maxHeight:"75vh",overflowY:"scroll",direction:"column",bg:"#FFF",height:"fit-content",opacity:"100%",borderTopRadius:"round"==(null===X||void 0===X?void 0:X.whatmoreUITheme)?"xl":null,animation:rt,children:[(0,g.jsx)($t,{setOpenShopNow:b,setLockSwiper:I,FONT_SIZE:f}),(0,g.jsx)(s.M5,{marginBottom:"10px",px:"20px",py:"5px",children:(0,g.jsx)(s.kC,{bg:"whiteAlpha.900",width:"fit-content",height:"fit-content",borderRadius:"round"==(null===X||void 0===X?void 0:X.whatmoreUITheme)?"lg":null,overflow:"hidden",sx:{borderWidth:(0,c.alU)(G),borderColor:(0,c.qPe)(G)},children:(0,g.jsx)(s.kC,{width:"100%",children:(0,g.jsx)(ie.P,{renderElement:t=>(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(s.xu,{width:x+"px",height:m+"px",children:(0,g.jsx)(v.Ee,{width:x+"px",height:m+"px",borderRadius:"round"==(null===X||void 0===X?void 0:X.whatmoreUITheme)?"lg":null,src:(0,kt.s)(t.eventData.src,"&width=400&height=400"),alt:S.handle,sx:{objectFit:(0,c.yOX)(G)+" !important"},fallback:(0,g.jsx)(J.Z,{width:x+"px",height:m+"px",borderRadius:"round"==(null===X||void 0===X?void 0:X.whatmoreUITheme)?"10px":"0px"})})})}),dataList:null===C||void 0===C||null===(e=C.product)||void 0===e?void 0:e.images.slice(lt,dt),spacing:10,defaultHeight:x+"px",defaultWidth:m+"px",retainAlreadyRenderedElements:!0,isScroll:!0})})})}),(0,g.jsx)(te,{data:C,product:S,PRODUCT_TILE_HEIGHT:p,PRODUCT_TILE_WIDTH:d,FONT_SIZE:f,getVariantPrice:ae,selectedVariantId:D,itemPrice:W,itemQuantity:K,setItemQuantity:M,thumbnailImage:B}),C.product.variants.length>0&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(s.M5,{paddingTop:"4px",width:"100%",children:(0,g.jsx)(s.iz,{color:(0,c.W8U)(G),size:"xs",width:"90%"})}),(0,g.jsx)(ee,{data:C,dividerColor:(0,c.W8U)(G),selectedColor:t=>{nt(t)},product:S,PRODUCT_TILE_HEIGHT:p,PRODUCT_TILE_WIDTH:d,FONT_SIZE:f,selectOptionFirstHandler:$,selectOptionSecondHandler:Q,selectOptionThirdHandler:tt,getVariantPrice:ae,selectedOptionFirst:E,selectedOptionSecond:P,selectedOptionThird:L,selectedVariantId:D})]}),c.$2G&&(null===C||void 0===C||null===(n=C.product)||void 0===n?void 0:n.body_html)&&(0,g.jsx)(Qt,{PRODUCT_TILE_HEIGHT:p,FONT_SIZE:f,data:C,handleToggle:()=>j(!w),show:w}),(0,g.jsx)(s.xu,{sx:{pointerEvents:"none"},paddingTop:"20px",opacity:0,children:(0,g.jsx)(Jt,{position:"relative",data:C,FONT_SIZE:f,product:S})}),(0,g.jsx)(Jt,{position:"fixed",selectedVariantId:D,data:C,FONT_SIZE:f,PRODUCT_TILE_WIDTH:d,product:S,itemQuantity:K,cartItemCount:q,addToCartFlag:Z,setAddToCartFlag:N,soldOutFlag:U,setSoldOutFlag:V,event:y})]})}const re=(t,e,n,i)=>{var o,r,a,l,d,s,c,h,u,p,x,g;if(void 0===e&&void 0===n&&void 0===i)return null===t||void 0===t||null===(o=t.product)||void 0===o||null===(r=o.variants)||void 0===r||null===(a=r[0])||void 0===a?void 0:a.id;if(void 0===i&&void 0===n)return null===(l=t.product.variants.find((t=>t.option1===e)))||void 0===l?void 0:l.id;if(void 0===i&&void 0===e)return null===(d=t.product.variants.find((t=>t.option2===n)))||void 0===d?void 0:d.id;if(void 0===n&&void 0===e)return null===(s=t.product.variants.find((t=>t.option3===i)))||void 0===s?void 0:s.id;if(void 0===n)return null===(c=t.product.variants.find((t=>t.option1===e&&t.option3===i)))||void 0===c?void 0:c.id;if(void 0===i)return null===(h=t.product.variants.find((t=>t.option1===e&&t.option2===n)))||void 0===h?void 0:h.id;if(void 0===e)return null===(u=t.product.variants.find((t=>t.option2===n&&t.option3===i)))||void 0===u?void 0:u.id;const m=t.product.variants.find((t=>t.option1===e&&t.option2===n&&t.option3===i));return void 0===m?null===t||void 0===t||null===(p=t.product)||void 0===p||null===(x=p.variants)||void 0===x||null===(g=x[0])||void 0===g?void 0:g.id:m.id},ae=(t,e)=>{var n;return null===(n=t.product.variants.find((t=>t.id===e)))||void 0===n?void 0:n.price},le=(t,e)=>{var n;return null===(n=t.product.variants.find((t=>t.id.toString()===e)))||void 0===n?void 0:n.option1},de=(t,e)=>{var n;return null===(n=t.product.variants.find((t=>t.id.toString()===e)))||void 0===n?void 0:n.option2},se=(t,e)=>{var n;return null===(n=t.product.variants.find((t=>t.id.toString()===e)))||void 0===n?void 0:n.option3},ce=(t,e)=>{var n;const i=null===(n=t.product)||void 0===n?void 0:n.images.find((t=>{var n;return null===t||void 0===t||null===(n=t.variant_ids)||void 0===n?void 0:n.find((t=>t===e))}));return void 0===i?null:i.src},he=(0,r.createContext)({setShowOptionsChart:null});var ue=function(t){const e=t.event,n=t.data,i=t.currentProduct,o=t.setOpenShopNow,a=t.setLockSwiper,[l,d]=(t.isLast,t.onCloseCallback,t.focusRef,(0,r.useState)(!1));return(0,g.jsx)(he.Provider,{value:{setShowOptionsChart:d},children:(0,g.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[(0,g.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",children:(0,g.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,g.jsx)(oe,{data:n,event:e,product:i,setOpenShopNow:o,setLockSwiper:a})})}),l?(0,g.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",style:{position:"relative",zIndex:1,bottom:"100%"},className:"whatmore-ios-css-relative-fix",id:"whatmore-size-chart",children:(0,g.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,g.jsx)(Ut,{data:n,event:e,product:i,setShowOptionsChart:()=>{d(!1)}})})}):(0,g.jsx)(g.Fragment,{})]})})};var pe=function(t){var e,[n,i,o,a]=(0,u.Z)();const[l,d]=(0,r.useState)(!1),[x,v]=(0,r.useState)(),[f,w]=(0,r.useState)(),j=(0,h.MO)("whatmoreShopId"),C=t.event,y=t.onBack,S=r.useRef(),b=t.isPlaying,I=t.isLast,k=t.setLockSwiper,_=t.selectedVariantId,F=null===(e=t.showOverlay)||void 0===e||e,E="center";return(0,g.jsx)(s.M5,{children:(0,g.jsxs)(s.xu,{width:a,height:o,sx:{overflow:"hidden"},children:[(0,g.jsx)(s.Kq,{direction:"column",justifyContent:E,height:"full",width:"full",children:(0,g.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,g.jsx)(s.oM,{width:"full",ratio:a/o,children:(0,g.jsx)(m,{height:"100%",width:"100%",url:C.event_hls_url,isPlaying:b,event:C})})})}),F?(0,g.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:E,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,g.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,g.jsx)(Nt,{focusRef:S,event:t.event,isLast:I,onCloseCallback:y,productClickHandler:async t=>{const e=await(0,p.gK)(t,(0,c.Ipo)(j),j);w(t),v(e),d(!0),k(!0)}})})}):(0,g.jsx)(g.Fragment,{}),!0===l?(0,g.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:E,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,g.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,g.jsx)(ue,{focusRef:S,event:t.event,isLast:I,onCloseCallback:()=>y(),setLockSwiper:k,data:x,currentProduct:f,setOpenShopNow:d,selectedVariantId:_})})}):(0,g.jsx)("div",{})]})})};const xe=function(t,e){return isNaN(t)||isNaN(e)||e<=0||t>e?0:Math.ceil(t/e*100)};function ge(t){var e,n,[i,o,r,a]=(0,u.Z)();const[l]=(0,h.j1)("whatmoreSecondaryColor"),[d]=(0,h.j1)("whatmoreSecondaryColorShade900"),c=t.progress,p=null!==(e=t.totalSiblings)&&void 0!==e?e:1,x=null!==(n=t.indexAmongSiblings)&&void 0!==n?n:0;return(0,g.jsx)(s.Kq,{width:"96%",height:"fit-content",direction:"row",justifyContent:"center",alignItems:"center",spacing:"1px",children:[...Array(p).keys()].map((t=>(0,g.jsx)(s.Kq,{width:"100%",height:.004*r+"px",backgroundColor:t<x?l:d+"99",borderRightRadius:"lg",borderLeftRadius:"lg",direction:"row",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",sx:{display:"block !important"},children:t==x?(0,g.jsx)(s.xu,{height:"100%",width:c+"%",bgColor:l,borderRightRadius:"lg",borderLeftRadius:"lg",sx:{display:"block !important"}}):(0,g.jsx)(g.Fragment,{})},"event-progress-bar-slab-"+t)))})}var me=n(868),ve=n(2630);const fe=t=>t>=1e3?(t/1e3).toFixed(1)+"k":t;var we=n(8984);var je=function(t){var e,n,i,o=t.whatmoreShareTemplateId;const a=t.whatmoreShareStoryId,l=t.whatmoreShareEventId,p=t.event,x=null===(e=t.showShareText)||void 0===e||e,m=null!==(n=t.shareButtonBottomMargin)&&void 0!==n?n:0,v=(0,h.MO)("whatmoreShopId"),f=(0,h.MO)("isInDesignMode"),w=(0,h.MO)("isDemoBrand"),j=(0,h.MO)("whatmorePrimaryFont"),{whatmoreWidgetSourceDetails:C}=(0,r.useContext)(it.I),[y,S,b,I]=(0,u.Z)(),k=null!==(i=t.iconSize)&&void 0!==i?i:.1*I;function _(){const t=(0,h.MO)("whatmoreLandingLocationType");var e;!function(t){f||w||(async()=>{(0,d.x0)(t)})()}(p),(t.startsWith("product")||"embed"===t)&&(o="te"),e="event_product_link"===(0,c.EEC)(v)?p.products[0].product_link||"":window.location.pathname,e=("event_product_link"===(0,c.EEC)(v)?"":window.location.hostname)+e+"?wtt="+o+"&wsid="+a+"&weid="+l,(0,c.lj5)(v)&&(e=e+"&"+(0,c.awP)(v)+"&utm_campaign=video-share&utm_medium="+t);const n={title:(0,c.JNF)(v),text:"".concat((0,c.Qa8)(v)," \n ").concat(e," \n -via Whatmore")};navigator.share(n)}return(0,c.$Ii)(v)&&(0,we.eE)()?(0,g.jsx)(g.Fragment,{}):(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.Cd,{cursor:"pointer",style:{marginBottom:m+"px"},children:(0,g.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[(0,g.jsx)(ve.Z,{sx:{boxShadow:3,transform:"scaleX(-1)",color:"white",fontSize:k,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),_(),(0,et.GF)({userInteractionType:nt.K.VIDEO_SHARE_CTA_CLICKED,widgetSourceDetails:C,event:p,productList:p.products,ctaList:p.cta})}}),x&&(0,c.u8S)(v)?(0,g.jsxs)(s.xv,{fontSize:.3*k+"px",fontWeight:"semibold",align:"center",sx:{fontFamily:j+" !important",color:"white !important",paddingRight:"10%"},children:["\xa0",p.total_share>(0,c.LWl)(v)?fe(p.total_share):"Share","\xa0"]}):(0,g.jsx)(g.Fragment,{})]})})})},Ce=n(6524),ye=n(7933),Se=n(2785);var be=function(t){var e;const n=(0,h.MO)("whatmoreShopId"),i=(0,h.MO)("whatmorePrimaryFont"),o=(0,h.MO)("whatmoreLikedEvents"),a=((0,h.MO)("whatmoreSecondaryColor"),(0,h.MO)("isInDesignMode")),l=(0,h.MO)("isDemoBrand"),{whatmoreWidgetSourceDetails:p}=(0,r.useContext)(it.I),x=t.event,[m,v]=(0,r.useState)(null!==(e=o[x.event_id])&&void 0!==e&&e),[f,w,j,C]=(0,u.Z)(),y=.1*C;function S(t,e){a||l||(async()=>{(0,d.Z6)(t,e)})()}function b(){(0,h.bU)("whatmoreLikedEvents",{...o,[x.event_id]:!m}),m?(S(x,-1),(0,et.GF)({userInteractionType:nt.K.VIDEO_UNLIKED,widgetSourceDetails:p,event:x,productList:x.products,ctaList:x.cta})):(S(x,1),(0,et.GF)({userInteractionType:nt.K.VIDEO_LIKED,widgetSourceDetails:p,event:x,productList:x.products,ctaList:x.cta})),v(!m)}const I=x.total_like+(m?1:0);return(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.Cd,{cursor:"pointer",children:(0,g.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[m?(0,g.jsx)(Se.Z,{sx:{boxShadow:3,color:(0,c.dmX)(n),fontSize:y,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),b()}}):(0,g.jsx)(ye.Z,{sx:{boxShadow:3,color:"white",fontSize:y,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),b()}}),(0,g.jsx)(g.Fragment,{children:(0,c.CEM)(n)?(0,g.jsxs)(s.xv,{fontSize:.3*y+"px",fontWeight:"semibold",align:"center",sx:{fontFamily:i+" !important",color:"white !important",position:"relative",bottom:"5px"},children:["\xa0",I>=(0,c.zKg)(n)?fe(I):"Like","\xa0"]}):(0,g.jsx)(g.Fragment,{})})]})})})};const Ie=t=>{let{iconSize:e}=t;return(0,g.jsx)("div",{style:{backgroundColor:"#25D366",borderRadius:"50%",padding:.3*e},children:(0,g.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"white",class:"bi bi-whatsapp",viewBox:"0 0 16 16",children:(0,g.jsx)("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})})})};var ke=n(8866);function _e(t){var e;const n=t.event,[i,o,a,l]=(0,u.Z)(),[d]=(0,h.j1)("whatmorePrimaryFont"),{whatmoreIsStoriesTemplate:p}=(0,r.useContext)(it.I),[x]=(0,h.j1)("whatmoreSecondaryColor"),[m]=(0,h.j1)("whatmoreShopId"),v=(0,c.f63)(m),f=null!==(e=(0,c.u2W)(m))&&void 0!==e?e:[x,v,x,v,x];return(0,g.jsx)(g.Fragment,{children:p?(0,g.jsx)(s.xu,{width:"100%",height:"fit-content",padding:"5px",children:(0,g.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-start",children:[(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.Cd,{overflow:"hidden",size:.14*l+"px",sx:{boxShadow:"0px 2px 1px 0px "+f[0]+"50, 0px -2px 1px 0px "+f[1]+"50, 2px 0px 1px 0px "+f[2]+"50, -2px 0px 1px 0px "+f[3]+"80, 2px -2px 1px 0px "+f[4]+"80, -2px 2px 1px 0px "+f[0]+"DA, 2px 2px 1px 0px "+f[1]+"DA, -2px -2px 1px 0px "+f[2]+"DA"},children:(0,g.jsx)("img",{src:(0,me.V)(n.storyset_thumbnail_image),style:{objectFit:"cover",height:"100%",width:"100%",backgroundColor:"white"}})})}),(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:.05*l+"px",fontWeight:"medium",lineHeight:"100%",sx:{fontFamily:d+" !important",color:"white !important",textShadow:"0px 0px 4px black !important;"},children:n.storyset_name})})]})}):(0,g.jsx)(g.Fragment,{})})}var Fe=function(t){const[e,n,i]=(0,ke.Z)(),[o]=(0,h.j1)("isInDesignMode"),[a]=(0,h.j1)("isDemoBrand"),[l,p]=(0,h.j1)("isProductSwiperCatalogOpen"),[x,m]=(0,h.j1)("isFirstIndicatorRenderDone"),[v]=(0,h.j1)("whatmoreShopId"),f=(0,r.useContext)(gn),{whatmoreEventsBrowsingTemplate:w}=(0,r.useContext)(it.I),[j,C,y,S]=(0,u.Z)(),b=(0,h.MO)("whatmorePrimaryFont"),k=t.event,_=t.storySetId,F=t.isLast,E=t.onCloseCallback,T=t.focusRef,P=t.productClickHandler,O=t.videoPlayingData,L=t.totalSiblingEvents,R=t.indexAmongSiblings,D=t.leftOpenSpaceClickHandler,z=t.midOpenSpaceClickHandler,K=t.rightOpenSpaceClickHandler,{whatmoreWidgetSourceDetails:M}=(0,r.useContext)(it.I),W=.1*S;return(0,g.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",children:(0,g.jsxs)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,g.jsxs)(s.Kq,{width:"full",height:"fit-content",direction:"column",justifyContent:"flex-start",alignItems:"center",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:[f.showVideoPlayingData?(0,g.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",marginTop:"5px",justifyContent:"center",children:(0,g.jsx)(ge,{progress:xe(O.current_time,O.video_duration),totalSiblings:L,indexAmongSiblings:R})}):(0,g.jsx)(g.Fragment,{}),(0,g.jsx)(s.xu,{width:"full",margin:"2px",marginTop:"5px",children:(0,g.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",paddingRight:"10px",paddingLeft:"10px",children:[(0,g.jsx)(_e,{event:k}),(0,g.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,Ce.ZK)(w)?(0,g.jsx)(je,{whatmoreShareTemplateId:(0,Ce.QN)(w),whatmoreShareStoryId:_,whatmoreShareEventId:k.event_id,event:k,showShareText:!1,iconSize:.07*S,shareButtonBottomMargin:6}):(0,g.jsx)(g.Fragment,{}),(0,g.jsx)(I,{focusRef:T}),"landscape"!==e&&(0,g.jsx)(U,{event:k,onCloseCallback:E})]})]})})]}),(0,g.jsxs)(s.Kq,{width:"100%",height:"100%",direction:"row",justifyContent:"center",children:[(0,g.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{D()},sx:{display:"block !important"}}),(0,g.jsx)(s.xu,{width:"34%",height:"100%",onClick:()=>{z()},sx:{display:"block !important"}}),(0,g.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{K()},sx:{display:"block !important"}})]}),(0,g.jsxs)(s.xu,{width:"full",height:"fit-content",paddingX:"2%",children:[f.totalEvents>1&&!x&&f.showSwipeIndicator?(0,g.jsx)(s.xu,{width:"full",margin:"2px",children:(0,g.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,g.jsx)(G,{swipeUp:!F})})}):null,(0,c.slY)(v)&&!(0,Ce.ZK)(w)?(0,g.jsx)(s.xu,{ml:"auto",width:"fit-content",paddingY:"4%",children:(0,g.jsxs)(s.Kq,{gap:"4px",direction:"column",alignItems:"center",cursor:"pointer",onClick:function(){var t;o||a||(async()=>{(0,d.lY)(k,1)})(),(0,et.GF)({userInteractionType:nt.K.WHATSAPP_ICON_CLICKED,widgetSourceDetails:M,event:k,productList:null===k||void 0===k?void 0:k.products,ctaList:null===k||void 0===k?void 0:k.cta});const e=k.products.map((t=>"".concat(t.product_link," \n"))),n=(0,c.gtK)(v),i="Hey, I am interested in ".concat(k.products.length>1?"these products":"this product"," I saw on ").concat(null===(t=k.products[0])||void 0===t?void 0:t.brand," store: \n").concat(e,". Could you please help me with some queries?");window.open(n+"&text=".concat(i,"&type=phone_number"),"_blank")},children:[(0,g.jsx)(Ie,{iconSize:.7*W,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,g.jsx)(s.xv,{fontSize:W*(0,c.Xod)(v)+"px",fontWeight:"bold",align:"center",style:{marginTop:0},sx:{fontFamily:b+" !important",color:"white !important"},children:(0,c.UiZ)(v)})]})}):(0,g.jsx)(g.Fragment,{}),(0,c.jY3)(v)?(0,g.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,g.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",paddingX:"1.4%",children:(0,g.jsx)(be,{event:k})})}):(0,g.jsx)(g.Fragment,{}),(0,c.ROU)(v)&&!(0,Ce.ZK)(w)?(0,g.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,g.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",paddingX:"0.8%",children:(0,g.jsx)(je,{whatmoreShareTemplateId:(0,Ce.QN)(w),whatmoreShareStoryId:_,whatmoreShareEventId:k.event_id,event:k})})}):(0,g.jsx)(g.Fragment,{}),(0,Mt.kT)(k)?(0,g.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(v)?(0,g.jsx)(s.xu,{w:"100%",children:(0,g.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,g.jsx)(A,{event:k,onToggle:t=>{p("minimize-button"!==t)}})})}):(0,g.jsx)(g.Fragment,{}),(0,g.jsx)(s.xu,{display:"flex",width:"100%",height:"fit-content",children:(0,g.jsx)(qt,{event:k,productClickHandler:P})})]}):(0,g.jsx)(g.Fragment,{})]})]})})},Ee=n(2279),Te=n.n(Ee),Pe=n(342);var Oe=function(t){var e,n,i,o,a,l,[d,m,v,f]=(0,u.Z)();const[w,j]=(0,r.useState)(!1),[C,y]=(0,r.useState)(),[S,b]=(0,r.useState)(),[I,k]=(0,r.useState)({current_time:0,video_duration:0,is_video_ended:!1}),_=(0,h.MO)("whatmoreShopId"),F=t.event,E=t.storyId,T=t.onBack,P=r.useRef(),O=t.isPlaying,L=t.isLast,R=t.setLockSwiper,D=t.onVideoEndedCallback,z=t.progressUpdateCallback,K=null!==(e=t.totalSiblingEvents)&&void 0!==e?e:0,M=null!==(n=t.indexAmongSiblings)&&void 0!==n?n:0,W=null===(i=t.showOverlay)||void 0===i||i,A=null!==(o=t.leftOpenSpaceClickHandler)&&void 0!==o?o:()=>{},q=null!==(a=t.midOpenSpaceClickHandler)&&void 0!==a?a:()=>{},H=null!==(l=t.rightOpenSpaceClickHandler)&&void 0!==l?l:()=>{},{whatmoreWidgetSourceDetails:Z}=(0,r.useContext)(it.I),N="center";let U;try{U=Te()((()=>{D()}),1e3,{leading:!0,trailing:!1})}catch(V){console.log(V)}return(0,g.jsx)(s.M5,{children:(0,g.jsxs)(s.xu,{width:f,height:v,sx:{overflow:"hidden"},children:[(0,g.jsx)(s.Kq,{direction:"column",justifyContent:N,height:"full",width:"full",children:(0,g.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,g.jsx)(s.oM,{width:"full",ratio:f/v,children:(0,g.jsx)(x.Z,{height:"100%",width:"100%",url:(0,me.V)((0,Pe.uv)(F)),isPlaying:O,timeUpdateCallback:function(t,e){const n=xe(t,e);z(n);const i=I.is_video_ended;n>=99&&O&&!i?(U(),k({current_time:t,video_duration:e,is_video_ended:!0})):k({current_time:t,video_duration:e,is_video_ended:i})},event:F,source:t.source})})})}),W?(0,g.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:N,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,g.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,g.jsx)(Fe,{focusRef:P,event:t.event,isLast:L,onCloseCallback:()=>{T(),(0,et.Z2)({userInteractionType:nt.K.VIDEO_PLAYBACK,userInteractionMetadata:{watch_time:I.current_time},widgetSourceDetails:Z,event:F,productList:F.products,ctaList:F.cta})},productClickHandler:async t=>{const e=await(0,p.gK)(t,(0,c.Ipo)(_),_);b(t),y(e),j(!0),R(!0),(0,et.GF)({userInteractionType:nt.K.SHOPNOW_CLICKED,widgetSourceDetails:Z,event:F,productList:F.products,ctaList:F.cta}),(0,h.bU)("whatmoreAllowAutoSlide",!1)},videoPlayingData:I,totalSiblingEvents:K,indexAmongSiblings:M,leftOpenSpaceClickHandler:A,midOpenSpaceClickHandler:q,rightOpenSpaceClickHandler:H,storySetId:E})})}):(0,g.jsx)(g.Fragment,{}),!0===w?(0,g.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:N,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,g.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,g.jsx)(ue,{focusRef:P,event:t.event,isLast:L,onCloseCallback:()=>T(),setLockSwiper:R,data:C,currentProduct:S,setOpenShopNow:t=>{j(t),(0,h.bU)("whatmoreAllowAutoSlide",!t)}})})}):(0,g.jsx)("div",{})]})})},Le=n(7300),Re=n(58),De=n(9723);var ze=function(t){var[e,n,i,o]=(0,u.Z)();const r=(0,h.MO)("whatmoreShopId"),a=t.event,l=t.isPlaying,d="center";return(0,g.jsx)(s.M5,{children:(0,g.jsxs)(s.xu,{width:o,height:i,sx:{overflow:"hidden"},children:[(0,g.jsx)(s.Kq,{direction:"column",justifyContent:d,height:"full",width:"full",children:(0,g.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,g.jsx)(s.oM,{width:"full",ratio:o/i,children:(0,g.jsx)(x.Z,{height:"100%",width:"100%",url:(0,me.V)((0,Pe.uv)(a)),isPlaying:l,timeUpdateCallback:function(t,e){},event:a,source:t.source})})})}),(0,g.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:d,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,g.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",backdropFilter:"auto",backdropBlur:"10px",onClick:t=>{(0,Re.QV)()},children:(0,g.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"full",width:"full",children:[(0,g.jsx)(De.Z,{sx:{boxShadow:3,color:(0,c.Ya_)(r),fontSize:.4*o,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{(0,Re.QV)()}}),(0,g.jsx)(s.xv,{color:"white",fontSize:.05*o+"px",fontWeight:"bold",align:"left",children:"Please click to play video.."})]})})})]})})},Ke=n(3433);var Me=function(t){var e,n;const r=t.event,a=null===(e=t.isPlaying)||void 0===e||e,l=t.onBack,d=t.isLast,s=t.setLockSwiper,c=(t.heightFactor,t.widthFactor,t.onVideoEndedCallback),u=t.progressUpdateCallback,[p,x]=(0,j.Z)(),[m]=(0,h.j1)("whatmoreVideoPlayerPoolBlessed"),v=null===(n=t.showOverlay)||void 0===n||n;function f(){x(!p)}if((0,we.KE)()&&0==m)return(0,g.jsx)(ze,{event:r,onBack:l,isPlaying:a,isLast:d,setLockSwiper:s,onVideoEndedCallback:c,progressUpdateCallback:u,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{f()},midOpenSpaceClickHandler:()=>{f()},rightOpenSpaceClickHandler:()=>{f()},showOverlay:v,source:Ke.j.CAROUSEL_EVENT_OPENED},"shopping-video-view"+r.event_id);if((0,Le.B6)(r)||(0,Le.WJ)(r))return(0,g.jsx)(Oe,{event:r,onBack:l,isPlaying:a,isLast:d,setLockSwiper:s,onVideoEndedCallback:c,progressUpdateCallback:u,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{f()},midOpenSpaceClickHandler:()=>{f()},rightOpenSpaceClickHandler:()=>{f()},showOverlay:v,source:Ke.j.CAROUSEL_EVENT_OPENED},"shopping-video-view"+r.event_id);if((0,Le.yC)(r)){var{status:w,bannerText:C,timeToStartInMins:y}=i.Z.getEventStatus(r);if(w.name===o.Z.LIVE.name)return(0,g.jsx)(pe,{event:r,onBack:l,isPlaying:a,isLast:d,showOverlay:v},"shopping-live-view"+r.event_id)}return console.error("Can't render event which is neither video or a currently-live-event"),(0,g.jsx)("div",{})},We=n(9284),Ae=n.n(We),qe=n(7463),He=n(2154);function Ze(t){var e;const[n,i]=(0,r.useState)(!1),o=t.onClick,a=null!==(e=t.fontSize)&&void 0!==e?e:50;return(0,g.jsx)("div",{style:{height:"fit-content",width:"fit-content",backgroundColor:"black",opacity:.4,borderRadius:"50%"},className:[n?"whatmore-scale-on-tap":""].join(" "),children:"left"===t.type?(0,g.jsx)(He.Z,{sx:{color:"white",fontSize:a+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{i(!0),setTimeout((()=>{i(!1)}),500),o(t,"up")}}):(0,g.jsx)(qe.Z,{sx:{color:"white",fontSize:a+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{i(!0),setTimeout((()=>{i(!1)}),500),o(t,"down")}})})}var Ne=function(t){var e,n,i;const o=null!==(e=t.relativeBottomPercentage)&&void 0!==e?e:"30%",r=null!==(n=t.width)&&void 0!==n?n:"100%",a=null!==(i=t.fontSize)&&void 0!==i?i:50,l=t.handleClick;return(0,g.jsx)("div",{style:{position:"relative",zIndex:1,bottom:o,width:"100%",height:"fit-content",display:"flex",flexFlow:"row nowrap",justifyContent:"center"},id:"here",children:(0,g.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:r,height:"fit-content",paddingRight:"5px",paddingLeft:"5px",paddingTop:"5px",paddingBottom:"5px",justifyContent:"space-between",alignContent:"center"},children:[(0,g.jsx)(Ze,{type:"left",onClick:l,fontSize:a}),(0,g.jsx)(Ze,{type:"right",onClick:l,fontSize:a})]})})},Ue=n(2860),Ve=n(4669);var Be=function(t,e){function n(t,e){return 1==e?0:t<0?e+t:t>=e?t-e:t}const i=(0,r.useRef)({prevIndex:n(t-1,e),activeIndex:t,nextIndex:n(t+1,e)});return[function(){return i.current},function(t){i.current="right"==t?{prevIndex:n(i.current.activeIndex,e),activeIndex:n(i.current.activeIndex+1,e),nextIndex:n(i.current.activeIndex+2,e)}:{prevIndex:n(i.current.activeIndex-2,e),activeIndex:n(i.current.activeIndex-1,e),nextIndex:n(i.current.activeIndex,e)}},function(t){return n(i.current.activeIndex+t)}]};var Ye=function(t,e){const n=(0,r.useRef)({clientX:0,clientY:0});return[function(t){n.current.clientX=t.changedTouches[0].clientX,n.current.clientY=t.changedTouches[0].clientY},function(i){const o=n.current.clientX,r=n.current.clientY;var a=o-i.changedTouches[0].clientX,l=r-i.changedTouches[0].clientY;return"vertical"==t&&Math.abs(l)>e||"horizontal"==t&&Math.abs(a)>e?"vertical"==t?l>0?"right":"left":a>0?"right":"left":null}]};var Xe=function(t,e){const n=(0,r.useRef)(Te()(((t,e)=>{t(e)}),300,{leading:!0,trailing:!1}));return[function(i,o){var r=0;if(r="vertical"==t?i.deltaY:i.deltaX,Math.abs(r)<=e)return;const a=r>0?"right":"left";n.current(o,a)}]},Ge=n(5173);var Je=function(t){const e=t.events,n=t.eventIndex,i=t.onBack;var[o,p,x,m]=(0,u.Z)();const[v]=(0,h.j1)("isInDesignMode"),[f]=(0,h.j1)("isDemoBrand"),[w,j]=(0,r.useState)(!0),[C,y]=(0,h.j1)("isFirstIndicatorRenderDone"),[S,b]=(0,r.useState)(!1),{setCloseClickComponent:I}=(0,r.useContext)(gn),{slideDirection:k}=(0,r.useContext)(gn),[_]=(0,h.j1)("whatmoreShopId"),[F]=(0,h.j1)("whatmoreLandingLocationType"),[E,T]=Be(n,e.length),[P,O]=Ye(k,50),[L]=Xe("vertical",30),[R,D]=(0,r.useState)(!1),[z,K]=(0,r.useState)(null),{whatmoreWidgetSourceDetails:M}=(0,r.useContext)(it.I);function W(){D(!1)}function A(){W(),setTimeout((()=>{i()}),500)}function q(){(0,h.MO)("whatmoreAllowAutoSlide")&&(T("right"),z.slideNext())}function H(t,e){T(e),function(t,e){z&&("left"===e?z.slidePrev():z.slideNext())}(0,e)}(0,r.useEffect)((()=>(D(!0),()=>{})),[]),I(A);const Z=Math.round(.05*x);return(0,g.jsx)(Ae(),{isOpen:R,onAfterOpen:function(){},onRequestClose:W,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,g.jsx)(Ge.Z,{children:(0,g.jsxs)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:(0,Q.lA)("#000000",13)},onTouchStart:t=>{P(t)},onTouchEnd:t=>{const e=O(t);e&&H(0,e)},onWheel:t=>{L(t,(t=>{H(0,t)}))},children:[(0,g.jsx)(a.tq,{speed:400,threshold:Z,slidesPerView:1,direction:k,modules:[l.tl,l.Gk],initialSlide:n,loop:1!=e.length,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,allowSlideNext:!S,allowSlidePrev:!S,allowTouchMove:!1,onSwiper:t=>{K(t)},onSlideChange:t=>{var n;w?j(!1):(C||y(!0),n=e[E().activeIndex],v||f||(async()=>{(0,d.wh)(n),"index"===F?((0,Ve.Tc)(_,Ue.Xh,Ue.pR),(0,mt.H4)(n.event_id,n.products,Ue.Xh,Ue.pR)):F.startsWith("product")||"embed"===F?((0,Ve.Tc)(_,Ue.h7,Ue.dU),(0,mt.H4)(n.event_id,n.products,Ue.h7,Ue.dU)):F.startsWith("collection")?((0,Ve.Tc)(_,Ue.U$,Ue.Pk),(0,mt.H4)(n.event_id,n.products,Ue.U$,Ue.Pk)):((0,Ve.Tc)(_,Ue.Xh,Ue.pR),(0,mt.H4)(n.event_id,n.products,Ue.Xh,Ue.pR))})(),(0,et.y4)({userInteractionType:nt.K.EVENT_VIEW,widgetSourceDetails:M,event:e[E().activeIndex],productList:e[E().activeIndex].products}))},children:[...Array(Math.min(e.length,3)).keys()].map((t=>(0,g.jsx)(a.o5,{children:t=>{let{isActive:n,isPrev:i,isNext:r,isVisible:a,isDuplicate:l}=t;const d=n?"activeIndex":i?"prevIndex":"nextIndex";return(0,g.jsx)(s.Kq,{direction:"column",height:o,justifyContent:"center",children:(0,g.jsx)(Me,{event:e[E()[d]],onBack:A,isPlaying:1==e.length||n&&a,isLast:!1,setLockSwiper:b,onVideoEndedCallback:q,progressUpdateCallback:t=>{}})})}},"event-vertical-scroll-slide-"+t)))}),e.length>1&&!S&&(0,c.h6H)(_)&&"horizontal"===(0,c.e8z)(_)&&"horizontal"===k?(0,g.jsx)(Ne,{relativeBottomPercentage:"50%",width:m,handleClick:(t,e)=>{H(0,"down"==e?"right":"left")},fontSize:parseInt(.12*m)}):(0,g.jsx)(g.Fragment,{})]})})})},$e=n(1168);n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811);const Qe=t=>{let{children:e,customClass:n,show:i,closeCallback:o}=t;return $e.createPortal((0,g.jsxs)("div",{className:"whatmore-landscape-modal whatmore-root ".concat(n),style:{display:i?"block":"none"},children:[(0,g.jsx)("div",{className:"whatmore-landscape-modal-overlay",onClick:o}),(0,g.jsx)("div",{className:"whatmore-landscape-modal-content",children:e})]}),document.body)};Qe.defaultProps={children:(0,g.jsx)("div",{children:"Empty Modal"}),customClass:"",show:!1,closeCallback:()=>!1};var tn=Qe;var en=function(t){var e;const[n]=(0,h.j1)("whatmorePrimaryFont"),i=null!==(e=t.fontSize)&&void 0!==e?e:"8";return(0,g.jsx)(s.rU,{href:"https://www.whatmore.live",isExternal:!0,children:(0,g.jsxs)(s.Kq,{direction:"row",justifyContent:"flex-start",alignItems:"center",width:"fit-content",spacing:"2px",paddingLeft:"2px",paddingRight:"2px",paddingBottom:"2px",marginBottom:"2px",children:[(0,g.jsx)("p",{style:{textAlign:"center",color:"white",fontFamily:n,fontWeight:"normal",fontSize:1.1*i+"px",margin:0,padding:0,lineHeight:"110%"},children:"powered by whatmore"}),(0,g.jsx)(s.xu,{width:"10px"}),(0,g.jsx)("img",{src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",width:1.7*i,backgroundColor:"transparent",borderRadius:"0px"}})]})})};var nn=function(t){var[e,n,i,o]=(0,u.Z)();const[p]=(0,h.j1)("isInDesignMode"),[x]=(0,h.j1)("isDemoBrand"),[m,v]=(0,h.j1)("isFirstIndicatorRenderDone"),[f,w]=(0,r.useState)(0!=t.eventIndex),{setCloseClickComponent:j}=(0,r.useContext)(gn),[C,y]=(0,r.useState)(!1),[S]=(0,h.j1)("whatmoreShopId"),[b]=(0,h.j1)("whatmoreLandingLocationType"),{whatmoreUITheme:I}=(0,r.useContext)(it.I),{whatmoreWidgetSourceDetails:k}=(0,r.useContext)(it.I),[_,F]=(0,r.useState)(!1),[E,T]=(0,r.useState)(null);function P(){F(!1)}const O=t.events,L=t.eventIndex,R=t.onBack;function D(){P(),setTimeout((()=>{R()}),500)}function z(){E&&!E.isEnd&&(0,h.MO)("whatmoreAllowAutoSlide")&&E.slideNext()}(0,r.useEffect)((()=>(F(!0),()=>{})),[]),j(D);const K=parseInt(Math.min(5,O.length));return(0,g.jsx)(tn,{show:_,closeCallback:P,customClass:"whatmore-landscape-modal-swipe-view",children:(0,g.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",aligntItems:"center",backgroundColor:(0,Q.lA)("#000000",13),children:[(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.xu,{height:"fit-content",width:o*K,children:(0,g.jsxs)(a.tq,{onInit:t=>{T(t)},slidesPerView:K,centeredSlides:!0,allowTouchMove:!1,initialSlide:L,modules:[l.lI,l.W_,l.Gk],navigation:K>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*i),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:o*K,watchSlidesProgress:!0,onSlideChange:t=>{var e;f?w(!1):(m||v(!0),e=O[t.activeIndex],p||x||(async()=>{(0,d.wh)(e),"index"===b?((0,Ve.Tc)(S,Ue.Xh,Ue.pR),(0,mt.H4)(e.event_id,e.products,Ue.Xh,Ue.pR)):b.startsWith("product")||"embed"===b?((0,Ve.Tc)(S,Ue.h7,Ue.dU),(0,mt.H4)(e.event_id,e.products,Ue.h7,Ue.dU)):b.startsWith("collection")?((0,Ve.Tc)(S,Ue.U$,Ue.Pk),(0,mt.H4)(e.event_id,e.products,Ue.U$,Ue.Pk)):((0,Ve.Tc)(S,Ue.Xh,Ue.pR),(0,mt.H4)(e.event_id,e.products,Ue.Xh,Ue.pR))})(),(0,et.y4)({userInteractionType:nt.K.EVENT_VIEW,widgetSourceDetails:k,event:O[t.activeIndex],productList:O[t.activeIndex].products,ctaList:O[t.activeIndex].cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[(0,g.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,g.jsx)(U,{onCloseCallback:R})}),O.map(((t,e)=>(0,g.jsx)(a.o5,{children:t=>{let{isActive:n,isPrev:r,isNext:a,isVisible:l,isDuplicate:d}=t;return n?(0,g.jsx)(s.Kq,{direction:"column",height:i,width:1*o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,g.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,g.jsx)(Me,{event:O[e],onBack:D,isPlaying:!0,isLast:e===O.length-1,setLockSwiper:y,widthFactor:1,heightFactor:1,onVideoEndedCallback:z,progressUpdateCallback:t=>{}})})}):a||r?(0,g.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{E.slideTo(e,300)},children:(0,g.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,g.jsx)(Me,{event:O[e],onBack:D,isPlaying:!1,isLast:e===O.length-1,setLockSwiper:y,widthFactor:1,heightFactor:1,onVideoEndedCallback:z,progressUpdateCallback:t=>{},showOverlay:!1})})}):(0,g.jsx)(g.Fragment,{})}},"event-horizontal-scroll-slide"+t.event_id)))]})})}),(0,c.XFt)(S)?(0,g.jsx)(s.M5,{children:(0,g.jsx)(en,{height:.04*i,width:.1*o,fontSize:.02*i})}):(0,g.jsx)(g.Fragment,{})]})})},on=n(6090),rn=n(7616),an=n(9302),ln=n(2575);var dn=function(t){const[e,n,i,o]=(0,u.Z)(),[r]=(0,h.j1)("whatmorePrimaryColor"),[a]=(0,h.j1)("whatmoreSecondaryColor"),l="flex-end";return(0,g.jsx)(s.M5,{children:(0,g.jsxs)(s.xu,{width:o,height:i,backgroundColor:"whiteAlpha.200",backdropBlur:"10px",children:[(0,g.jsx)(s.Kq,{direction:"column",justifyContent:l,height:"full",width:"full",children:(0,g.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",children:(0,g.jsx)(s.oM,{width:"full",ratio:o/i,children:(0,g.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+r+", gray, "+a+")"})})})}),(0,g.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:l,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,g.jsx)(s.xu,{padding:"2px",margin:"5px",borderRadius:"md",backgroundColor:"transparent",children:(0,g.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,g.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",backdropFilter:"auto",backdropBlur:"5px"})})})})]})})};var sn=function(t){var e;const n=t.stories,i=t.onBack,o=t.onStoryCompleteCallback,l=t.isActive,c=null!==(e=t.initialEventIndex)&&void 0!==e?e:0,p=n.events;var[x,m,v,f]=(0,u.Z)();const[w,C]=(0,j.Z)(),[y]=(0,h.j1)("isInDesignMode"),[S]=(0,h.j1)("isDemoBrand"),[b]=(0,h.j1)("whatmoreShopId"),[I,k]=(0,r.useState)(!0),[_,F]=(0,h.j1)("isFirstIndicatorRenderDone"),[E,T]=(0,r.useState)(null),[P,O]=(0,r.useState)(!1),{whatmoreWidgetSourceDetails:L}=(0,r.useContext)(it.I),[R,D]=Be(c,p.length);function z(){i()}function K(){if(!(0,h.MO)("whatmoreAllowAutoSlide"))return;R().activeIndex+1>=p.length?o("right"):(D("right"),E&&E.slideNext())}function M(t){const e=R().activeIndex;"right"==t&&e+1>=p.length||"left"==t&&e-1<0?o(t):(D(t),E&&("left"==t?E.slidePrev():E.slideNext()))}return p[R().activeIndex],(0,g.jsx)("div",{children:(0,g.jsx)(a.tq,{speed:1,slidesPerView:1,direction:"horizontal",initialSlide:0,loop:!0,height:v,width:f,watchSlidesProgress:!0,allowTouchMove:!1,onSwiper:t=>{T(t)},onSlideChange:t=>{var e;I?k(!1):(_||F(!0),e=p[R().activeIndex],y||S||(async()=>{(0,d.wh)(e),(0,Ve.Tc)(b,Ue.Xh,Ue.OW),(0,mt.H4)(e.event_id,e.products,"homepage","stories")})(),(0,et.GF)({userInteractionType:nt.K.EVENT_VIEW,widgetSourceDetails:L,event:p[R().activeIndex],productList:p[R().activeIndex].products,ctaList:p[R().activeIndex].cta}))},children:[...Array(Math.min(p.length,3)).keys()].map((t=>(0,g.jsx)(a.o5,{children:t=>{let{isActive:e,isPrev:i,isNext:o,isVisible:r,isDuplicate:a}=t;if(l){const t=e?"activeIndex":i?"prevIndex":"nextIndex",o=p[R()[t]];return(0,g.jsx)(s.Kq,{direction:"column",height:v,justifyContent:"center",children:(0,Le.B6)(o)||(0,Le.WJ)(o)?(0,g.jsx)(Oe,{event:o,totalSiblingEvents:p.length,indexAmongSiblings:R()[t],onBack:z,isPlaying:l&&e&&r,isLast:!1,setLockSwiper:O,onVideoEndedCallback:K,progressUpdateCallback:t=>{},leftOpenSpaceClickHandler:()=>{M("left")},midOpenSpaceClickHandler:()=>{C(!w)},rightOpenSpaceClickHandler:()=>{M("right")},storyId:n.id,source:Ke.j.STORY_EVENT_OPENED},"shopping-video-view"+o.event_id):(0,g.jsx)(g.Fragment,{})})}return(0,g.jsx)(s.Kq,{direction:"column",height:x,justifyContent:"center",children:(0,g.jsx)(dn,{})})}},"event-story-view-slide-"+t)))})})};var cn=function(t){const e=t.onBack,n=t.eventsStories,i=t.initialStoryIndex;var[o,c,p,x]=(0,u.Z)();const[m]=(0,h.j1)("isInDesignMode"),[v]=(0,h.j1)("isDemoBrand"),[f,w]=(0,r.useState)(!0),[j,C]=(0,h.j1)("isFirstIndicatorRenderDone"),[y,S]=(0,r.useState)(!1),{setCloseClickComponent:b}=(0,r.useContext)(gn),{slideDirection:I}=(0,r.useContext)(gn),[k]=(0,h.j1)("whatmoreShopId"),[_,F]=Be(i,n.length),[E,T]=Ye("horizontal",50),[P]=Xe("vertical",30),O=t.eventIndex,[L,R]=(0,r.useState)(!1),[D,z]=(0,r.useState)(null),{whatmoreWidgetSourceDetails:K}=(0,r.useContext)(it.I);function M(){R(!1)}function W(){M(),setTimeout((()=>{e()}),500)}function A(t){D&&(0,h.MO)("whatmoreAllowAutoSlide")&&(F(t),"right"==t?D.slideNext():D.slidePrev())}function q(t,e){A(e)}return(0,r.useEffect)((()=>(R(!0),()=>{})),[]),b(W),(0,g.jsx)(Ae(),{isOpen:L,onAfterOpen:function(){},onRequestClose:M,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,g.jsx)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:"#00000088"},onTouchStart:t=>{E(t)},onTouchEnd:t=>{const e=T(t);e&&q(0,e)},onWheel:t=>{P(t,(t=>{q(0,t)}))},children:(0,g.jsx)(a.tq,{speed:1,slidesPerView:1,direction:"horizontal",modules:[l.SH,l.Gk],initialSlide:i,loop:n.length>1,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,onSwiper:t=>{z(t)},onSlideChange:t=>{var e,i,o;f?w(!1):(o=n[_().activeIndex].events[0],m||v||(async()=>{(0,d.wh)(o),(0,Ve.Tc)(k,Ue.Xh,Ue.OW),(0,mt.H4)(o.event_id,o.products,"homepage","stories")})(),(0,et.GF)({userInteractionType:nt.K.EVENT_VIEW,widgetSourceDetails:K,event:n[_().activeIndex].events[0],productList:null===(e=n[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=n[_().activeIndex].events[0])||void 0===i?void 0:i.cta}))},allowTouchMove:!1,cubeEffect:{shadow:!0,slideShadows:!0,shadowOffset:20,shadowScale:.94},children:[...Array(Math.min(n.length,3)).keys()].map((t=>(0,g.jsx)(a.o5,{children:t=>{let{isActive:e,isPrev:r,isNext:a,isVisible:l,isDuplicate:d}=t;const c=e?"activeIndex":r?"prevIndex":"nextIndex";return(0,g.jsx)(s.Kq,{direction:"column",height:o,justifyContent:"center",children:(0,g.jsx)(sn,{stories:n[_()[c]],onBack:W,isActive:e&&l,isNext:a,isPrev:r,onStoryCompleteCallback:A,nextStories:n[_().nextIndex],prevStories:n[_().prevIndex],initialEventIndex:i==_()[c]?O:0},"event-story-view-"+n[_()[c]].id)})}},"event-vertical-scroll-slide-"+t)))})})})},hn=n(4892);var un=function(t){var e,n,i,[o,a,l,d]=(0,u.Z)();const[c]=(0,h.j1)("whatmorePrimaryColor"),[p]=(0,h.j1)("whatmoreSecondaryColor"),x=t.event,m=(t.onBack,r.useRef(),null!==(e=t.showPausedVideo)&&void 0!==e&&e),f=null!==(n=t.heightFactor)&&void 0!==n?n:1,w="flex-end";return d*=null!==(i=t.widthFactor)&&void 0!==i?i:1,l*=f,(0,g.jsx)(s.M5,{children:(0,g.jsxs)(s.xu,{width:d,height:l,children:[(0,g.jsx)(s.Kq,{direction:"column",justifyContent:w,height:"full",width:"full",children:(0,g.jsx)(s.xu,{children:(0,g.jsx)(s.oM,{width:"full",ratio:9/16,children:m?(0,Le.B6)(x)||(0,Le.WJ)(x)?(0,g.jsx)(hn.Z,{height:"100%",width:"100%",url:x.thumbnail_image,isPlaying:!1,pauseFromPlayTimeInMs:1e3,event:x}):(0,g.jsx)(v.Ee,{width:"full",height:"full",src:x.thumbnail_image,objectFit:"cover",borderRadius:"lg"}):(0,g.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+c+", gray, "+p+")"})})})}),(0,g.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:w,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,g.jsx)(s.xu,{children:(0,g.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,g.jsx)(s.xu,{width:"full",height:"full",backgroundColor:"blackAlpha.400"})})})})]})})};var pn=function(t){var[e,n,i,o]=(0,u.Z)();const[p]=(0,h.j1)("isInDesignMode"),[x]=(0,h.j1)("isDemoBrand"),[m,v]=(0,h.j1)("isFirstIndicatorRenderDone"),[f,w]=(0,r.useState)(0!=t.eventIndex),{setCloseClickComponent:j}=(0,r.useContext)(gn),[C,y]=(0,r.useState)(!1),[S]=(0,h.j1)("whatmoreShopId"),{whatmoreWidgetSourceDetails:b}=(0,r.useContext)(it.I),[I,k]=(0,r.useState)(!1),[_,F]=(0,r.useState)(null);function E(){k(!1)}t.events;const T=t.eventIndex,P=t.onBack,O=t.eventsStories,L=t.initialStoryIndex;function R(){E(),setTimeout((()=>{P()}),500)}function D(t){_&&!_.isEnd&&("right"==t?_.slideNext():_.slidePrev())}(0,r.useEffect)((()=>(k(!0),()=>{})),[]),j(R);const z=parseInt(Math.min(5,O.length));return(0,g.jsx)(tn,{show:I,closeCallback:E,customClass:"whatmore-landscape-modal-stories-view",children:(0,g.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",aligntItems:"center",backgroundColor:"blackAlpha.800",children:[(0,g.jsx)(s.M5,{children:(0,g.jsx)(s.xu,{height:"fit-content",width:o*z,children:(0,g.jsxs)(a.tq,{onInit:t=>{F(t)},slidesPerView:z,centeredSlides:!0,allowTouchMove:!1,initialSlide:L,modules:[l.lI,l.W_,l.Gk],navigation:z>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*i),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:o*z,watchSlidesProgress:!0,onSlideChange:t=>{var e,n,i;f?w(!1):(m||v(!0),i=O[t.activeIndex].events[0],p||x||(async()=>{(0,d.wh)(i),(0,Ve.Tc)(S,Ue.Xh,Ue.OW),(0,mt.H4)(i.event_id,i.products,"homepage","stories")})(),(0,et.GF)({userInteractionType:nt.K.EVENT_VIEW,widgetSourceDetails:b,event:O[t.activeIndex].events[0],productList:null===(e=O[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=O[t.activeIndex].events[0])||void 0===n?void 0:n.cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[(0,g.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,g.jsx)(U,{onCloseCallback:P})}),O.map(((t,e)=>(0,g.jsx)(a.o5,{children:n=>{let{isActive:r,isPrev:a,isNext:l,isVisible:d,isDuplicate:c}=n;if(r){const n=1;return(0,g.jsx)(s.Kq,{direction:"column",height:i,width:o*n,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,g.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,g.jsx)(sn,{stories:t,onBack:R,isActive:r&&d,isNext:!1,isPrev:!1,onStoryCompleteCallback:D,initialEventIndex:L==e?T:0},"event-story-view-"+t.id)})})}return a||l?(0,g.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{_.slideTo(e,300)},children:(0,g.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,g.jsx)(un,{showPausedVideo:!0,event:O[e].events[0],onBack:R,isPlaying:!1,setLockSwiper:y})})}):(0,g.jsx)(g.Fragment,{})}},"event-horizontal-scroll-slide-"+e)))]})})}),(0,c.XFt)(S)?(0,g.jsx)(s.M5,{children:(0,g.jsx)(en,{height:.04*i,width:.1*o,fontSize:.02*i})}):(0,g.jsx)(g.Fragment,{})]})})};const xn=(0,ln.Z)({key:"whatmore-css-sv"}),gn=(0,r.createContext)({isIOS:!1,totalEvents:0,closeClickComponent:null,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:"vertical",showSwipeIndicator:!0});var mn=function(t){var e,n;const[a,l,d]=(0,ke.Z)(),[s]=(0,h.j1)("whatmoreShopId"),{whatmoreRootId:u}=(0,r.useContext)(it.I),{whatmoreIsStoriesTemplate:p}=(0,r.useContext)(it.I);var x=t.events,m=t.index,v=t.onBack,f=t.eventsStories,w=t.initialStoryIndex,j=(0,c.cX2)(s),C=x[m],y="portrait"===a?null!==(e=t.slideDirection)&&void 0!==e?e:"vertical":null!==(n=t.slideDirection)&&void 0!==n?n:x.length>1?"horizontal":"vertical",S="portrait"===a?!(0,c.h6H)(s)&&!p:(0,c.n89)(s),b=(C=x[m],[]);if((0,r.useLayoutEffect)((()=>{(0,c.TLG)(s)&&(window.location.href.includes(j)?history.replaceState(null,"","#"+j):history.pushState(null,"","#"+j),window.addEventListener("popstate",(()=>{window.location.href.includes(j)||v()})))}),[]),(0,Le.yC)(C)){var{status:I,bannerText:k,timeToStartInMins:_}=i.Z.getEventStatus(x[m]);if(I.name!=o.Z.LIVE.name)return(0,g.jsx)("div",{children:"// TODO : fix event registration view for live events"})}if(delete rn.ZP.styles.global,p)return(0,g.jsx)(an.C,{value:xn,children:(0,g.jsx)(on.x,{theme:rn.ZP,cssVarsRoot:u,resetCSS:!1,children:(0,g.jsx)(gn.Provider,{value:{isIOS:(0,we.KE)(),totalEvents:x.length,closeClickComponent:v,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:y,showSwipeIndicator:S},children:"portrait"===a?(0,g.jsx)(cn,{eventsStories:f,initialStoryIndex:w,onBack:v,eventIndex:m}):x.length>1&&(0,c.Bbr)(s)?(0,g.jsx)(pn,{eventsStories:f,initialStoryIndex:w,onBack:v,eventIndex:m}):(0,g.jsx)(cn,{eventsStories:f,initialStoryIndex:w,onBack:v,eventIndex:m})})})});b=[];for(var F=0;F<x.length;F++)if((0,Le.B6)(x[F])||(0,Le.WJ)(x[F]))b.push(x[F]);else if((0,Le.yC)(x[F])){var{status:I,bannerText:k,timeToStartInMins:_}=i.Z.getEventStatus(x[F]);I.name===o.Z.LIVE.name&&b.push(x[F])}return(0,g.jsx)(an.C,{value:xn,children:(0,g.jsx)(on.x,{theme:rn.ZP,cssVarsRoot:u,resetCSS:!1,children:(0,g.jsx)(gn.Provider,{value:{isIOS:(0,we.KE)(),totalEvents:x.length,closeClickComponent:v,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:y,showSwipeIndicator:S},children:"portrait"===a?(0,g.jsx)(Je,{events:b,eventIndex:m,onBack:v}):x.length>1?(0,g.jsx)(nn,{events:b,eventIndex:m,onBack:v}):(0,g.jsx)(Je,{events:b,eventIndex:m,onBack:v})})})})}},9316:function(t,e,n){n.d(e,{mT:function(){return s}});var i,o,r,a=n(168),l=n(686);const d=(0,l.F4)(i||(i=(0,a.Z)(["\n 0% { transform: scale(1); }\n 50%, { transform: scale(0.95); }\n 100% { transform: scale(1); }\n"]))),s="\n ".concat(d," 0.2s linear;\n"),c=(0,l.F4)(o||(o=(0,a.Z)(["\n 100% { \n -webkit-transform: rotate(360deg); \n transform:rotate(360deg); \n }\n"]))),h=("\n ".concat(c," 0.5s infinite linear;\n"),(0,l.F4)(r||(r=(0,a.Z)(["\n 0% { \n opacity: 1;\n transform: translateY(100%);\n }\n 10%{\n transform: translateY(0%);\n }\n 12%{\n transform: translateY(-5%);\n }\n 20%{\n transform: translateY(0%);\n }\n 95%{\n opacity: 1;\n transform: scale(1);\n }\n 100%{\n opacity: 0;\n }\n"]))));"\n ".concat(h," ").concat(3,"s ease-in-out;\n")},6163:function(t,e,n){n.r(e),n.d(e,{default:function(){return w}});var i=n(3271),o=n(5427),r=n(7313),a=n(7753),l=n(756),d=(n(4844),n(5160));var s=n(9316),c=n(9748),h=n(4209),u=n(9854),p=(n(7605),n(7053)),x=n(9039),g=n(7376),m=n(778),v=n(6417);function f(t){var e;const[n]=(0,a.j1)("whatmoreSecondaryColor"),[r]=(0,a.j1)("whatmorePrimaryFont"),l=null!==(e=t.baseFontSize)&&void 0!==e?e:10,d=t.width,s=t.height;return(0,v.jsx)(i.xu,{width:d,height:s,padding:"0px",boxShadow:"lg",borderRadius:"md",backgroundColor:"white",borderColor:n,borderWidth:"1px",children:(0,v.jsxs)(i.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"2px",justifyContent:"center",children:[(0,v.jsxs)(i.xv,{color:n,fontSize:1.3*l,fontWeight:"semibold",sx:{fontFamily:r+" !important"},children:["\xa0"," In Cart ","\xa0"]}),(0,v.jsx)(i.M5,{paddingX:"5px",children:(0,v.jsx)(o.Z,{sx:{color:n,fontSize:1.5*l}})})]})})}var w=function(t){var e,n,o,w;const[j]=(0,a.j1)("whatmorePrimaryFont"),[C]=(0,a.j1)("isInDesignMode"),[y]=(0,a.j1)("isDemoBrand"),[S,b]=(0,a.j1)("appCartData"),[I]=(0,a.j1)("whatmoreShopId"),[k]=[(0,u.hmr)(I)],_=(0,u.hmr)(I),[F,E]=(0,r.useState)(!1),[T,P]=(0,r.useState)({state:"initial"}),[O,L]=(0,r.useState)({loaded:!1,client_product_id:"",variant_id:"",variant_price:""}),{closeClickComponent:R}=(0,r.useContext)(h.EventClickComponentContext),{whatmoreWidgetSourceDetails:D}=(0,r.useContext)(x.I),z=t.event,K=t.product,M=null!==(e=t.baseFontSize)&&void 0!==e?e:10;function W(t,e,n){C||y||(async()=>{(0,d.JX)(t,e,n)})()}(0,r.useEffect)((()=>{!async function(){var t,e,n,i,o;const r=await(0,p.gK)(K,(0,u.Ipo)(I),I);L({loaded:!0,client_product_id:K.client_product_id,variant_id:null===(t=r.product)||void 0===t||null===(e=t.variants)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.id,variant_price:null===(i=r.product.variants)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.price})}()}),[]);const A=null!==(n=t.width)&&void 0!==n?n:"fit-content",q=null!==(o=t.height)&&void 0!==o?o:"fit-content",H=(null!==(w=(0,u.Jb1)(I))&&void 0!==w?w:2)+"px";return O.loaded?(0,v.jsx)("div",{style:{width:A,height:q},children:(0,v.jsx)("a",{href:"javascript:void(0)","data-variant-id":O.variant_id,"data-action-atc":"",rel:"nofollow","aria-describedby":"a11y-external-message",children:(0,v.jsx)(c.zx,{type:"submit",className:(0,u.Sl8)(I),sx:{width:A,height:q,minHeight:q},onClick:t=>{E(!0),W(z,K,1),(0,g.GF)({userInteractionType:m.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:D,event:z,productList:[K],ctaList:z.cta}),null!==R&&setTimeout((()=>{R()}),2e3)},children:"initial"===T.state?(0,v.jsx)(l.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:q,width:A},children:(0,v.jsx)(i.xu,{width:"100%",height:"100%",padding:H,boxShadow:"lg",borderRadius:"md",backgroundColor:_,borderColor:_,borderWidth:"1px",animation:F?s.mT:null,onAnimationEnd:()=>{E(!1)},children:(0,v.jsx)(i.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",children:(0,v.jsx)(i.M5,{children:(0,v.jsxs)(i.xv,{lineHeight:"100%",fontSize:1.3*M,fontWeight:"semibold",sx:{fontFamily:j+" !important",color:(0,u.KCy)(I)+" !important"},children:["\xa0"," ADD TO CART ","\xa0"]})})})})}):(0,v.jsx)(l.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:q,width:A},children:(0,v.jsx)(f,{event:z,product:K,baseFontSize:M,cartState:T,width:A,height:q})})})})}):(0,v.jsx)(v.Fragment,{})}},2634:function(t,e,n){var i=n(3271),o=n(4897),r=n(499),a=n(6417);e.Z=function(t){var e,n=t.event,l=t.fontSize,d=null!==(e=t.maxWidth)&&void 0!==e?e:"100%",{status:s,bannerText:c,timeToStartInMins:h}=o.Z.getEventStatus(n);return s.name===r.Z.LIVE.name?(0,a.jsx)(i.xu,{maxWidth:d,width:"fit-content",borderRadius:"md",paddingLeft:"2px",paddingRight:"2px",backgroundColor:"tomato",color:s.color,children:(0,a.jsx)(i.Kq,{direction:"row",justifyContent:"flex-start",width:"fit-content",alignContent:"center",paddingLeft:"2px",paddingRight:"2px",children:(0,a.jsx)(i.xv,{fontSize:l,fontWeight:"bold",color:"white",children:c})})}):(0,a.jsx)(i.xu,{maxWidth:d,borderRadius:"md",paddingLeft:"2px",paddingRight:"2px",backgroundColor:"white",color:s.color,children:(0,a.jsx)(i.Kq,{direction:"row",justifyContent:"flex-start",width:"fit-content",alignContent:"center",children:(0,a.jsx)(i.xv,{fontSize:l,fontWeight:"medium",children:c})})})}},7605:function(t,e,n){n.d(e,{a:function(){return i}});n(5160);const i=async function(t,e,n,i,o,r,a,l,d,s){}},1896:function(t,e,n){n.d(e,{Z:function(){return f}});var i=n(7313),o=n(7300),r=n(6422),a=n(4209),l=n(3175),d=n(2887),s=n(7753),c=n(58),h=n(3433),u=n(9854),p=n(4862),x=(n(8743),n(6417));function g(t){var e,n,o;const[a,d]=(0,r.Z)(),[g,m]=(0,i.useState)(i.useRef()),v=t.posterImage,[f,w]=(0,s.j1)("whatmoreVideoPlayerPoolBlessed"),[j,C]=(0,i.useState)(!0),[y,S]=(0,i.useState)(!1),b=t.timeUpdateCallback,I=null!==(e=t.isVideoMuted)&&void 0!==e?e:a,k=null!==(n=t.height)&&void 0!==n?n:"100%",_=null!==(o=t.width)&&void 0!==o?o:"100%",F=(0,s.MO)("whatmoreShopId");(0,i.useLayoutEffect)((()=>{var e;g.current&&f&&(0==g.current.children.length?((e=(0,c.Bi)(g.current,t.url,I||!t.isPlaying,t.isPlaying)).addEventListener("loadeddata",(()=>{C(!1)})),b&&e.addEventListener("timeupdate",(t=>{var n,i;e&&b(null!==(n=e.currentTime)&&void 0!==n?n:0,null!==(i=e.duration)&&void 0!==i?i:0)}))):((e=g.current.children[0]).muted=I||!t.isPlaying,t.isPlaying?e.play():(e.pause(),(0,u.dF_)(F)&&t.source==h.j.CAROUSEL_EVENT_OPENED&&(!t.isPlaying&&e.play(),setTimeout((()=>{!t.isPlaying&&e.pause()}),p.G6?1900:800)))))}),[I,t.isPlaying,f,j]),(0,i.useLayoutEffect)((()=>()=>{g.current&&0!=g.current.children.length&&(0,c.P7)(g.current)}),[]);return(0,x.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:_,height:k,overflow:"hidden"},children:[(0,x.jsx)("div",{ref:g,style:{width:j?"0px":"100%",height:j?"0px":"100%"},className:"whatmore-video-player-ios-holder"}),j&&y?(0,x.jsx)(x.Fragment,{children:(0,x.jsx)("div",{style:{width:"100%",height:"100%",position:"relative"},children:(0,x.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,x.jsx)("img",{src:v,height:k,width:_,style:{animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})})})}):j&&!y&&(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)("div",{style:{width:"100%",height:"100%",position:"relative"},children:[(0,x.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,x.jsx)("img",{src:v,height:k,width:_,onLoad:()=>{S(!0)},style:{animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})}),(0,x.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,x.jsx)(l.Z,{width:_,height:k,style:{position:"absolute",top:"50%",left:"50%",opacity:"0.6"}})})]})})]})}var m=function(t){var e;return(0,x.jsx)(g,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback,isVideoMuted:null!==(e=t.isVideoMuted)&&void 0!==e?e:null,source:t.source,posterImage:t.posterImage})};function v(t){var e,n,o;const[a,d]=(0,r.Z)(),[c,g]=(0,i.useState)(!1),[m,v]=(0,i.useState)(!1),f=t.setDuration,w=(0,i.useRef)(null),j=(0,s.MO)("whatmoreShopId"),C=t.timeUpdateCallback,y=null!==(e=t.height)&&void 0!==e?e:"100%",S=null!==(n=t.width)&&void 0!==n?n:"100%",b=null!==(o=t.isVideoMuted)&&void 0!==o?o:a,I=null===t||void 0===t?void 0:t.posterImage;return(0,i.useEffect)((()=>{w.current&&(t.isPlaying?w.current.paused&&w.current.play():w.current.pause(),C&&w.current.addEventListener("timeupdate",(t=>{var e,n;w.current&&C(null!==(e=w.current.currentTime)&&void 0!==e?e:0,null!==(n=w.current.duration)&&void 0!==n?n:0)})))}),[t.isPlaying]),(0,x.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:S,height:y,overflow:"hidden"},children:[(0,x.jsx)("div",{style:{width:c?"100%":"0px",height:c?"100%":"0px"},children:(0,x.jsx)("video",{ref:w,className:"whatmore-video-player",width:S,height:y,preload:"auto",loop:!0,playsInline:!0,muted:!(!b&&t.isPlaying),src:t.url,onLoadedData:()=>{g(!0),t.isPlaying&&w.current&&w.current.play(),(0,u.dF_)(j)&&t.source==h.j.CAROUSEL_EVENT_OPENED&&(!t.isPlaying&&w.current&&w.current.play(),setTimeout((()=>{!t.isPlaying&&w.current&&w.current.pause()}),p.G6?1900:800))},onLoadedMetadata:()=>{w.current&&f&&f(w.current.duration)},poster:I})}),!c&&m?(0,x.jsx)(x.Fragment,{children:(0,x.jsx)("div",{style:{width:"100%",height:"100%",position:"relative"},children:(0,x.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,x.jsx)("img",{src:I,height:y,width:S,style:{animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})})})}):!c&&!m&&(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)("div",{style:{width:"100%",height:"100%",position:"relative"},children:[(0,x.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,x.jsx)("img",{src:I,height:y,width:S,onLoad:()=>{v(!0)},style:{animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})}),(0,x.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,x.jsx)(l.Z,{width:S,height:y,style:{position:"absolute",top:"50%",left:"50%",opacity:"0.6"}})})]})})]})}var f=function(t){var e,n,r,l;return(0,o.WJ)(t.event)?(0,x.jsx)(d.Z,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback}):1==(0,i.useContext)(a.EventClickComponentContext).isIOS&&1==(0,s.MO)("whatmoreVideoPlayerPoolBlessed")?(0,x.jsx)(m,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback,isVideoMuted:null!==(r=t.isVideoMuted)&&void 0!==r?r:null,source:t.source,posterImage:null===(l=t.event)||void 0===l?void 0:l.poster_image}):(0,x.jsx)(v,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback,isVideoMuted:null!==(e=t.isVideoMuted)&&void 0!==e?e:null,setDuration:t.setDuration,source:t.source,posterImage:null===(n=t.event)||void 0===n?void 0:n.poster_image})}},3433:function(t,e,n){n.d(e,{j:function(){return i}});const i={BANNER:"banner",CAROUSEL_EVENT_OPENED:"carousel_event_opened",CAROUSEL_THUMBNAIL_VIEW:"carousel_thumbnail_view",STORY_EVENT_OPENED:"story_event_opened",STORY_THUMBNAIL_VIEW:"story_thumbnail_view"}},6119:function(t,e,n){var i,o=n(168),r=n(3271),a=n(7313),l=n(7789),d=n(7753),s=n(686),c=n(9854),h=n(9039),u=n(5160),p=n(6417);const x=(0,s.F4)(i||(i=(0,o.Z)(["\n 0% { \n opacity: 0;\n }\n 10%{\n opacity: 0.5;\n }\n 20%{\n opacity: 1;\n }\n \n"]))),g=("\n ".concat(x," ").concat(3,"s ease-in-out;\n"),function(t,e){return(0,c.lj5)(e)?t+"?"+(0,c.awP)(e)+"&"+(0,c.n9s)(e)+"&"+(0,c.poG)(e):t});e.Z=function(t){var e;const[n,i,o,s]=(0,l.Z)(),[x,m]=(0,a.useState)(!1),{whatmoreUITheme:v}=(0,a.useContext)(h.I),f=(0,d.MO)("isInDesignMode"),w=(0,d.MO)("isDemoBrand"),j=(0,d.MO)("whatmoreSecondaryColor"),C=(0,d.MO)("whatmoreSecondaryColorShade1200"),y=(0,d.MO)("whatmorePrimaryFont"),S=(0,d.MO)("whatmoreShopId"),b=(t.event,t.cta),I=.05*s;return(0,p.jsx)(r.M5,{children:(0,p.jsx)(r.Kq,{direction:"row",height:"fit-content",width:"100%",justifyContent:"center",marginBottom:.03*s+"px",marginTop:.03*s+"px",children:(0,p.jsx)(r.rU,{href:g(b.cta_link,S),color:"white",onClick:()=>{f||w||(async()=>{(0,u.uD)(t)})()},children:(0,p.jsx)(r.xv,{fontSize:I*(null!==(e=t.fontFactor)&&void 0!==e?e:1)+"px",variant:"subtle",textColor:j,bgColor:C,sx:{borderRadius:"round"==v?"5px":"0px",borderWidth:(0,c.p5R)(S),borderColor:"#343434"===(0,c.yxc)(S)?j:(0,c.yxc)(S),fontFamily:y+" !important",textAlign:"center!important",fontWeight:"bold"},paddingY:"8px",paddingX:.05*s+"px",children:b.cta_title})})})})}},8782:function(t,e,n){n.d(e,{P:function(){return l}});var i=n(3933),o=n(7313),r=(n(123),n(6417));function a(t){const{ref:e,inView:n,entry:o}=(0,i.YD)({triggerOnce:t.retainAlreadyRenderedElements});return(0,r.jsx)("div",{ref:e,children:n?t.renderElement({eventData:t.data}):(0,r.jsx)("div",{style:{minWidth:t.defaultHeight,minHeight:t.defaultWidth}})})}function l(t){var e;return(0,o.useEffect)((()=>{const t=document.querySelector(".whatmore-carousel-horizontal-flex");let e,n=!1;function i(t){t.touches&&(null===t||void 0===t?void 0:t.touches.length)>0?(n=!0,e=t.touches[0].clientX):(n=!0,e=t.clientX)}function o(i){if(!n)return;const o=i.touches?i.touches[0].clientX:i.clientX;t.style.pointerEvents="none";const r=2*(e-o);t.scrollLeft+=r,e=o}function r(e){t.style.pointerEvents="auto",n=!1}return t&&("ontouchstart"in window&&(t.addEventListener("touchstart",i),t.addEventListener("touchmove",o),t.addEventListener("touchend",r)),t.addEventListener("mousedown",i),document.addEventListener("mousemove",o),document.addEventListener("mouseup",r)),()=>{t&&("ontouchstart"in window&&(t.removeEventListener("touchstart",i),t.removeEventListener("touchmove",o),t.removeEventListener("touchend",r)),t.removeEventListener("mousedown",i),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r))}}),[]),(0,r.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",height:"fit-content",width:"100%",gap:null!==(e=t.spacing)&&void 0!==e?e:3},className:"whatmore-carousel-horizontal-flex",children:t.dataList.map(((e,n)=>(0,r.jsx)(a,{renderElement:t.renderElement,data:e,defaultHeight:t.defaultHeight,defaultWidth:t.defaultWidth,retainAlreadyRenderedElements:t.retainAlreadyRenderedElements},"key-"+n)))})}},342:function(t,e,n){n.d(e,{WN:function(){return o},uv:function(){return i}});const i=function(t){var e;return"event_media_urls"in t?"image"===t.event_type?t.event_media_urls.primary.portrait.content_image_original:"secondary"in t.event_media_urls&&t.event_media_urls.secondary.portrait.content_video_1080p?t.event_media_urls.secondary.portrait.content_video_1080p:null!==(e=t.event_media_urls.primary.portrait.content_video_1080p)&&void 0!==e?e:null:t.event_hls_url},o=function(t){return"event_media_urls"in t?"image"===t.event_type?t.event_media_urls.primary.landscape.content_image_original:"secondary"in t.event_media_urls&&t.event_media_urls.secondary.landscape.content_video_1080p?t.event_media_urls.secondary.landscape.content_video_1080p:t.event_media_urls.primary.landscape.content_video_1080p:t.event_hls_url}},6422:function(t,e,n){var i=n(7313),o=n(7753);e.Z=function(t){const[e,n]=(0,o.j1)("muted");return(0,i.useEffect)((()=>{}),[]),[e,n]}},7789:function(t,e,n){var i=n(8866);e.Z=function(t){const[e,n,o]=(0,i.Z)();var r="landscape"==e?n*(9/16):o;if("landscape"==e){const t=.85;return[n,r,n*t,r*t]}return[n,r,n,r]}},7053:function(t,e,n){n.d(e,{gK:function(){return r},pO:function(){return a}});var i=n(2791),o=n(4844);async function r(t,e,n){return"shopify"==e?(0,o.dg)(t):(0,i.Y4)(t,n)}async function a(t,e,n){return"shopify"==e?(0,o.bN)(t):(0,i.ln)(t,n)}},9111:function(){}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[692],{3388:function(e,t,i){i.d(t,{OC:function(){return l},e8:function(){return r},kT:function(){return n},kW:function(){return a},xg:function(){return o}});const n=function(e,t){return!((void 0==e.products||0==e.products.length)&&(void 0==e.cta||0==e.cta.length))},o=function(e,t){return!(void 0==e.products||0==e.products.length)},r=function(e,t){if(null!=e)return e.filter((e=>1==n(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 l=function(e,t){var i;if(null==e)return[];if(!("eventsets"in e))return[];const n=null!==(i=e.eventsets[t])&&void 0!==i?i:null;return n?function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{e.events.forEach((e=>{t.push(e)}))})),t}(n):[]}},5380:function(e,t,i){i.d(t,{Z:function(){return v}});var n=i(4959),o=i(7313),r=i(4892),a=i(6805),l=i(7753),s=i(9821);var d=function(e){const[t,i,n,o,r]=(0,s.Z)(),[d]=(0,l.j1)("whatmoreEmbedAppVideoPlayerSizePortrait"),[c]=(0,l.j1)("whatmoreEmbedAppVideoPlayerSizeLandscape"),h=r[a.YP]===a.$w?c/100:d/100*1.2;return[t*h,i*h,r]},c=i(9723),h=i(9461),p=i.n(h),u=i(1195),x=i(7108),f=(i(7244),i(123),i(9854)),g=i(9039),m=i(6417);var v=function(e){var t;const i=o.useRef(null);var[s,h,v]=d();const{whatmoreUITheme:w}=(0,o.useContext)(g.I),[j]=(0,l.j1)("whatmoreEmbedAppVideoTitle"),[b]=(0,l.j1)("whatmoreEmbedAppPositionPortrait"),[y]=(0,l.j1)("whatmoreEmbedAppHorizontalPaddingPortrait"),[S]=(0,l.j1)("whatmoreEmbedAppVerticalPaddingPortrait"),[I]=(0,l.j1)("whatmoreEmbedAppPositionLandscape"),[E]=(0,l.j1)("whatmoreEmbedAppHorizontalPaddingLandscape"),[z]=(0,l.j1)("whatmoreEmbedAppVerticalPaddingLandscape"),P=(0,l.MO)("whatmoreShopId");var k=b,C=y,_=S;v[a.YP]===a.$w&&(k=I,C=E,_=z);const[L,O]=(0,o.useState)(["initial",window.pageYOffset]),[A,M]=(0,o.useState)(!1),T=null!==(t=e.isSpotlight)&&void 0!==t&&t,V=v[a.YP]===a.$w?.7*(0,f.zGA)(P):(0,f.zGA)(P),B=T?V:1;s*=B,h*=B;const F=T?(0,f.G0o)(P):k,R=T?(0,f.X8j)(P):(0,f.lVn)(P),[Z,D]=(0,o.useState)(!T&&(0,f.eXi)(P));function N(e,t){O(e),e[1]<=100?M(!1):t!=A&&(M(t),D(!1))}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const i=()=>{const i=window.pageYOffset;Math.abs(i-e)<100||(N([i>e?"scrolled-down":"scrolled-up",i],!0),e=i>0?i:0),t=!1},n=()=>{t||(window.requestAnimationFrame(i),t=!0)};return window.addEventListener("scroll",n),()=>window.removeEventListener("scroll",n)}),[L]),(0,n.O3)({ref:i,handler:()=>{N(["scrolled-up",L[1]],!0)}});const Y=e.event,$=e.inVideoClick,G=e.closeClick,H=.3*h,W=.6*h,K=.1*h,U=.1*(.5*h),X="round"==w?"10px":"0px",q=(0,f.Z$A)(P);var J=!1,Q=0,ee=0;function te(e){J=e}return(0,m.jsx)("div",{children:Z&&!R?(0,m.jsx)(m.Fragment,{}):A&&R?(0,m.jsx)("div",{style:"left"===F?{left:"1px",bottom:T?(0,f.vnu)(P)+"px":_+"px",position:"fixed",zIndex:q}:{right:"5px",bottom:T?(0,f.vnu)(P)+"px":_+"px",position:"fixed",zIndex:q},children:(0,m.jsxs)("div",{onClick:()=>{N(["initial",L[1]],!1)},style:{margin:"1px",width:h+"px",height:s+"px"},className:"left"===F?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,m.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:X,overflow:"hidden"},children:(0,m.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,m.jsx)(r.Z,{url:Y.thumbnail_image,isPlaying:!1,event:Y})})}),(0,m.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,m.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,m.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",children:(0,m.jsx)(u.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:H+"px"},style:{position:"relative",zIndex:1,left:U+"px",bottom:U+"px"},onClick:G})})}),(0,m.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,m.jsx)(x.Z,{sx:{color:"white",fontSize:2*H+"px",filter:"drop-shadow(0 0 15px black);"}})})]})})]})}):(0,m.jsx)(p(),{nodeRef:i,cancel:".activate-button,.close-btn",defaultClassName:"whatmore-react-draggable",defaultClassNameDragging:"whatmore-react-draggable-dragging",defaultClassNameDragged:"whatmore-react-draggable-dragged",bounds:"html",onStart:(e,t)=>{var i,n;i=t.x,n=t.y,Q=i,ee=n},onDrag:(e,t)=>{te(!0)},onStop:(e,t)=>{J&&(Math.abs(t.x-Q)>5||Math.abs(t.y-ee)>5)?te(!1):$(Y)},children:(0,m.jsx)("div",{ref:i,style:"left"===F?{left:T?(0,f.$II)(P)+"px":C+"px",bottom:T?(0,f.vnu)(P)+"px":_+"px",position:"fixed",zIndex:q}:{right:T?(0,f.$II)(P)+"px":C+"px",bottom:T?(0,f.vnu)(P)+"px":_+"px",position:"fixed",zIndex:q},children:(0,m.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:h+"px",height:s+"px"}),className:"left"===F?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,m.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:X,overflow:"hidden",position:"relative"},children:(0,m.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,m.jsx)(r.Z,{url:Y.thumbnail_image,isMuted:!0,isPlaying:!0,event:Y})})}),(0,m.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%"},children:[(0,m.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,m.jsx)(u.Z,{className:"close-btn",sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:H+"px"},onClick:G,style:{position:"relative",zIndex:1,left:K+"px",bottom:K+"px"}})}),(0,m.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,m.jsx)(c.Z,{sx:{color:(0,f.Ya_)(P),fontSize:W+"px",filter:"drop-shadow(0 0 15px black);"}})}),(0,m.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:X,borderBottomRightRadius:X,backgroundImage:j?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))":""},children:(0,m.jsxs)("p",{style:{textAlign:"center",color:"white",fontFamily:"Sans-serif",fontWeight:"semi-bold",fontSize:.4*H+"px",margin:0,padding:0,lineHeight:"110%"},children:["\xa0",j]})})]})})]})})})})}},2209:function(e,t,i){i.r(t);var n=i(7313),o=i(9854),r=i(2860),a=i(7753),l=i(5160),s=i(6967),d=i(5380),c=i(58),h=i(8984),p=i(4669),u=i(941),x=i(9302),f=i(7381),g=i(2575),m=i(7300),v=i(6524),w=i(3388),j=i(7643),b=i(778),y=i(6417);const S=(0,g.Z)({key:"whatmore-css-wsv"}),I=n.lazy((()=>Promise.all([i.e(819),i.e(576),i.e(210),i.e(955),i.e(926),i.e(303),i.e(209),i.e(62)]).then(i.bind(i,4209))));t.default=function(e){const[t,i]=(0,n.useState)(),[g,E]=(0,n.useState)(),[z]=(0,a.j1)("isInDesignMode"),[P]=(0,a.j1)("isDemoBrand"),[k,C]=(0,n.useState)(-2),[_]=(0,a.j1)("whatmoreShopId"),L=(0,a.MO)("isLandingSharedLink"),O=(0,a.MO)("whatmoreShareTemplateId"),A=((0,a.MO)("whatmoreShareStoryId"),(0,a.MO)("whatmoreShareEventId")),M=(0,a.MO)("whatmoreLandingLocationType"),T=(0,a.MO)("whatmoreLoggingActive");var V=(0,o.efR)(_)?r.Dm+"/get_eventset/":r.Gc+"/get_eventset/";(0,n.useEffect)((()=>{(0,s.hb)()}),[]),(0,n.useEffect)((()=>{(0,p.ll)(_)}),[]),(0,n.useEffect)((()=>{null==t||0==t.length||g||!(0,h.KE)()||(0,a.MO)("whatmoreVideoPlayerPoolInitiated")||(0,c.b5)(c.UD)}),[t]),(0,n.useEffect)((()=>{C(-1);const e=v.NX,t=(0,v.H1)(M),n=V.toString()+_.toString()+"?eventset_type="+e+"&source="+t+"&source_id="+_;fetch(n).then((e=>e.json())).then((t=>(0,w.OC)(t,e))).then((e=>(i(e),e))).catch((e=>{E(e.message)}))}),[]),(0,n.useEffect)((()=>{C(-2)}),[t]),(0,n.useEffect)((()=>{null==t||0==t.length||g||L&&"template-embed"==(0,v.zv)(O)&&null!=A&&t.forEach(((e,t)=>{A==e.event_id&&B(e,!0,t)}))}),[t]);const B=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if((0,h.KE)()&&!t&&(0,c.QV)(),(0,m.B6)(e)||(0,m.WJ)(e))return z||P||(async()=>{(0,l.wh)(e),(0,p.Tc)(_,r.h7,r.dU),(0,s.H4)(e.event_id,e.products,"spotlight","video_popup")})(),void C(i)};function F(){return(0,y.jsx)(y.Fragment,{})}return null==t||0==t.length||g?(0,y.jsx)("div",{}):(T&&(0,f.EI)(t),(0,o.B$L)(_)&&k<0&&null!==localStorage.getItem("_whatmore_spotlight_viewed")?(0,y.jsx)(y.Fragment,{}):(localStorage.setItem("_whatmore_spotlight_viewed",!0),(0,y.jsx)(x.C,{value:S,children:-1===k||0===t.length?(0,y.jsx)(F,{}):-2===k&&t.length>0?(0,y.jsx)("div",{children:(0,y.jsx)(j.u,{userInteractionType:b.K.SPOTLIGHT_WIDGET_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!z&&!P,children:(0,y.jsx)(d.Z,{event:t[0],inVideoClick:B,closeClick:e=>{e.stopPropagation(),C(-1)},isSpotlight:!0})})}):(0,y.jsx)("div",{children:(0,y.jsx)(n.Suspense,{children:(0,y.jsx)(j.u,{userInteractionType:b.K.EVENT_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!z&&!P,children:(0,y.jsx)(I,{events:t,index:k,onBack:function(){(0,o.n2L)(_)&&(0,a.MO)("whatmoreAddedToCart")&&(0,u.D)(_,(()=>{}),100,window.location.hostname),C(-2)},template:"template-embed"})})})})})))}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[74],{5380:function(e,t,n){n.d(t,{Z:function(){return v}});var i=n(4959),o=n(7313),a=n(4892),r=n(6805),s=n(7753),d=n(9821);var l=function(e){const[t,n,i,o,a]=(0,d.Z)(),[l]=(0,s.j1)("whatmoreEmbedAppVideoPlayerSizePortrait"),[c]=(0,s.j1)("whatmoreEmbedAppVideoPlayerSizeLandscape"),p=a[r.YP]===r.$w?c/100:l/100*1.2;return[t*p,n*p,a]},c=n(9723),p=n(9461),u=n.n(p),h=n(1195),w=n(7108),f=(n(7244),n(123),n(9854)),x=n(9039),g=n(6417);var v=function(e){var t;const n=o.useRef(null);var[d,p,v]=l();const{whatmoreUITheme:m}=(0,o.useContext)(x.I),[y]=(0,s.j1)("whatmoreEmbedAppVideoTitle"),[b]=(0,s.j1)("whatmoreEmbedAppPositionPortrait"),[j]=(0,s.j1)("whatmoreEmbedAppHorizontalPaddingPortrait"),[I]=(0,s.j1)("whatmoreEmbedAppVerticalPaddingPortrait"),[S]=(0,s.j1)("whatmoreEmbedAppPositionLandscape"),[E]=(0,s.j1)("whatmoreEmbedAppHorizontalPaddingLandscape"),[L]=(0,s.j1)("whatmoreEmbedAppVerticalPaddingLandscape"),P=(0,s.MO)("whatmoreShopId");var z=b,_=j,k=I;v[r.YP]===r.$w&&(z=S,_=E,k=L);const[T,C]=(0,o.useState)(["initial",window.pageYOffset]),[D,M]=(0,o.useState)(!1),A=null!==(t=e.isSpotlight)&&void 0!==t&&t,V=v[r.YP]===r.$w?.7*(0,f.zGA)(P):(0,f.zGA)(P),O=A?V:1;d*=O,p*=O;const B=A?(0,f.G0o)(P):z,F=A?(0,f.X8j)(P):(0,f.lVn)(P),[Z,R]=(0,o.useState)(!A&&(0,f.eXi)(P));function N(e,t){C(e),e[1]<=100?M(!1):t!=D&&(M(t),R(!1))}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const n=()=>{const n=window.pageYOffset;Math.abs(n-e)<100||(N([n>e?"scrolled-down":"scrolled-up",n],!0),e=n>0?n:0),t=!1},i=()=>{t||(window.requestAnimationFrame(n),t=!0)};return window.addEventListener("scroll",i),()=>window.removeEventListener("scroll",i)}),[T]),(0,i.O3)({ref:n,handler:()=>{N(["scrolled-up",T[1]],!0)}});const G=e.event,W=e.inVideoClick,Y=e.closeClick,K=.3*p,U=.6*p,$=.1*p,H=.1*(.5*p),J="round"==m?"10px":"0px",X=(0,f.Z$A)(P);var q=!1,Q=0,ee=0;function te(e){q=e}return(0,g.jsx)("div",{children:Z&&!F?(0,g.jsx)(g.Fragment,{}):D&&F?(0,g.jsx)("div",{style:"left"===B?{left:"1px",bottom:A?(0,f.vnu)(P)+"px":k+"px",position:"fixed",zIndex:X}:{right:"5px",bottom:A?(0,f.vnu)(P)+"px":k+"px",position:"fixed",zIndex:X},children:(0,g.jsxs)("div",{onClick:()=>{N(["initial",T[1]],!1)},style:{margin:"1px",width:p+"px",height:d+"px"},className:"left"===B?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,g.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:J,overflow:"hidden"},children:(0,g.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,g.jsx)(a.Z,{url:G.thumbnail_image,isPlaying:!1,event:G})})}),(0,g.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,g.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,g.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,g.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",children:(0,g.jsx)(h.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:K+"px"},style:{position:"relative",zIndex:1,left:H+"px",bottom:H+"px"},onClick:Y})})}),(0,g.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,g.jsx)(w.Z,{sx:{color:"white",fontSize:2*K+"px",filter:"drop-shadow(0 0 15px black);"}})})]})})]})}):(0,g.jsx)(u(),{nodeRef:n,cancel:".activate-button,.close-btn",defaultClassName:"whatmore-react-draggable",defaultClassNameDragging:"whatmore-react-draggable-dragging",defaultClassNameDragged:"whatmore-react-draggable-dragged",bounds:"html",onStart:(e,t)=>{var n,i;n=t.x,i=t.y,Q=n,ee=i},onDrag:(e,t)=>{te(!0)},onStop:(e,t)=>{q&&(Math.abs(t.x-Q)>5||Math.abs(t.y-ee)>5)?te(!1):W(G)},children:(0,g.jsx)("div",{ref:n,style:"left"===B?{left:A?(0,f.$II)(P)+"px":_+"px",bottom:A?(0,f.vnu)(P)+"px":k+"px",position:"fixed",zIndex:X}:{right:A?(0,f.$II)(P)+"px":_+"px",bottom:A?(0,f.vnu)(P)+"px":k+"px",position:"fixed",zIndex:X},children:(0,g.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:p+"px",height:d+"px"}),className:"left"===B?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,g.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:J,overflow:"hidden",position:"relative"},children:(0,g.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,g.jsx)(a.Z,{url:G.thumbnail_image,isMuted:!0,isPlaying:!0,event:G})})}),(0,g.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,g.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%"},children:[(0,g.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,g.jsx)(h.Z,{className:"close-btn",sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:K+"px"},onClick:Y,style:{position:"relative",zIndex:1,left:$+"px",bottom:$+"px"}})}),(0,g.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,g.jsx)(c.Z,{sx:{color:(0,f.Ya_)(P),fontSize:U+"px",filter:"drop-shadow(0 0 15px black);"}})}),(0,g.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:J,borderBottomRightRadius:J,backgroundImage:y?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))":""},children:(0,g.jsxs)("p",{style:{textAlign:"center",color:"white",fontFamily:"Sans-serif",fontWeight:"semi-bold",fontSize:.4*K+"px",margin:0,padding:0,lineHeight:"110%"},children:["\xa0",y]})})]})})]})})})})}},4284:function(e,t,n){n.r(t);var i=n(7313),o=n(9854),a=n(2860),r=n(7753),s=n(5160),d=n(6967),l=n(5380),c=n(58),p=n(8984),u=n(4669),h=n(941),w=n(9302),f=n(2575),x=n(7300),g=n(6524),v=n(9039),m=n(7376),y=n(778),b=n(7643),j=n(7008),I=n(7381),S=n(6417);const E=(0,f.Z)({key:"whatmore-css-ppv"}),L=i.lazy((()=>Promise.all([n.e(819),n.e(576),n.e(210),n.e(955),n.e(926),n.e(303),n.e(209),n.e(903)]).then(n.bind(n,4209))));function P(e){return e.split(/[?#]/)[0]}t.default=function(e){const[t,n]=(0,i.useState)(),[f,z]=(0,i.useState)(),[_]=(0,r.j1)("isInDesignMode"),[k]=(0,r.j1)("isDemoBrand"),[T]=(0,r.j1)("whatmoreEmbedAppUseVariant"),[C,D]=(0,i.useState)(-2),[M]=(0,r.j1)("whatmoreVariantId"),[A]=(0,r.j1)("whatmoreShopId");var[V]=(0,r.j1)("whatmoreProductId");const O=(0,r.MO)("isLandingSharedLink"),B=(0,r.MO)("whatmoreShareTemplateId"),F=(0,r.MO)("whatmoreShareEventId");V=(0,o.iXA)(A)?P(window.location.href):V;const[Z,R]=(0,i.useState)((()=>"true"===T?M:V));var N=a.Gc+"/v2/brand/"+A+"/product-events";const{whatmoreWidgetSourceDetails:G}=(0,i.useContext)(v.I);(0,i.useEffect)((()=>{(0,I.Oo)("Video shopping powered by Whatmore!"),(0,d.hb)();const e=()=>{const e="_whatmore_bulk_events",t=JSON.parse(localStorage.getItem(e))||[];t&&t.length>0&&((0,j.K)(t),localStorage.removeItem(e))};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),[]),(0,i.useEffect)((()=>{(0,u.ll)(A)}),[]),(0,i.useEffect)((()=>{null==t||0==t.length||f||!(0,p.KE)()||(0,r.MO)("whatmoreVideoPlayerPoolInitiated")||(0,c.b5)(c.UD)}),[t]),(0,i.useEffect)((()=>{D(-1),fetch(N.toString()+"?client_product_id="+Z.toString()+"&status="+"upcoming".toString()+"&event_type=video").then((e=>e.json())).then((e=>e.events)).then((e=>(n(e),e))).then((e=>((0,o.yoE)(A)&&function(e,t){setTimeout((async()=>{const n=e.reduce(((e,t)=>[...e,...t.products]),[]).filter((e=>e.client_product_id==t))[0];if(!n||n.product_link==P(window.location.href))return;const i={product_id:n.product_id,product_link:P(window.location.href)};fetch(a.Gc+"/product",{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)})}),500)}(e,Z),e))).catch((e=>{z(e.message)}))}),[Z]),(0,i.useEffect)((()=>{D(-2),t&&t.length>0&&(0,m.PB)({userInteractionType:y.K.PDP_VISITED,widgetSourceDetails:G,event:t[0],productList:t[0].products,ctaList:t[0].cta})}),[t]),(0,i.useEffect)((()=>{let e=history.pushState;history.pushState=function(){let t=e.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),t};let t=history.replaceState;history.replaceState=function(){let e=t.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),e},window.addEventListener("popstate",(()=>{window.dispatchEvent(new Event("locationchange"))})),window.addEventListener("locationchange",(function(){if("true"===T){const e=function(e){for(var t=window.location.search.substring(1).split("&"),n=0;n<t.length;n++){var i=t[n].split("=");if(i[0]==e)return i[1]}return!1}("variant");e&&""!==e&&R(e)}}))}),[]),(0,i.useEffect)((()=>{null==t||0==t.length||f||O&&"template-embed"==(0,g.zv)(B)&&null!=F&&t.forEach(((e,t)=>{F==e.event_id&&W(e,!0,t)}))}),[t]);const W=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if((0,p.KE)()&&!t&&(0,c.QV)(),(0,x.B6)(e)||(0,x.WJ)(e))return _||k||(async()=>{(0,s.wh)(e),(0,u.Tc)(A,a.h7,a.dU),(0,d.H4)(e.event_id,e.products,"product_page","video_popup")})(),void D(n)};function Y(){return(0,S.jsx)(S.Fragment,{})}return null==t||0==t.length||f?(0,S.jsx)("div",{}):(0,S.jsx)(w.C,{value:E,children:"no-product"===Z||-1===C||0===t.length?(0,S.jsx)(Y,{}):-2===C&&t.length>0?(0,S.jsx)("div",{children:(0,S.jsx)(b.u,{userInteractionType:y.K.PDP_POPUP_WIDGET_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!_&&!k,children:(0,S.jsx)(l.Z,{event:t[0],inVideoClick:W,closeClick:e=>{e.stopPropagation(),D(-1)}})})}):(0,S.jsx)("div",{children:(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(b.u,{userInteractionType:y.K.EVENT_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!_&&!k,children:(0,S.jsx)(L,{events:t,index:C,onBack:function(){(0,o.n2L)(A)&&(0,r.MO)("whatmoreAddedToCart")&&(0,h.D)(A,(()=>{}),100,window.location.hostname),D(-2)},template:"template-product-page"})})})})})}},7376:function(e,t,n){n.d(t,{GF:function(){return o},PB:function(){return s},Z2:function(){return a},y4:function(){return r}});var i=n(733);function o(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:o,event:a,productList:r,ctaList:s}=e;(0,i.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:o,event:a,productList:r,ctaList:s})}function a(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:o,event:a,productList:r,ctaList:s}=e;(0,i.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:o,event:a,productList:r,ctaList:s})}function r(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:o,event:a,productList:r,ctaList:s}=e;(0,i.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:o,event:a,productList:r,ctaList:s})}function s(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:o,event:a,productList:r,ctaList:s}=e;(0,i.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:o,event:a,productList:r,ctaList:s})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[790,12],{1332:function(t,e,n){var o=n(7313),c=(n(8743),n(7753)),a=n(5254),r=n(6417);e.Z=function(t){return(0,o.useEffect)((()=>{const t=(0,a.oo)((0,c.MO)("whatmoreSecondaryColor"));!function(t,e,n,o){const c="rgba(".concat(t,",").concat(e,",").concat(n,",").concat(o,")"),a="\n @keyframes whatmore-loading-indicator-keyframe {\n 0%,\n 100% {\n box-shadow: 0em -2.6em 0em 0em ".concat(c,", 1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5), -1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7);\n }\n 12.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7), 1.8em -1.8em 0 0em ").concat(c,", 2.5em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5);\n }\n 25% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5), 1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7), 2.5em 0em 0 0em ").concat(c,", 1.75em 1.75em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2);\n }\n 37.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5), 2.5em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7), 1.75em 1.75em 0 0em ").concat(c,", 0em 2.5em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2);\n }\n 50% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5), 1.75em 1.75em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7), 0em 2.5em 0 0em ").concat(c,", -1.8em 1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -2.6em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2);\n }\n 62.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5), 0em 2.5em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7), -1.8em 1.8em 0 0em ").concat(c,", -2.6em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2);\n }\n 75% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5), -1.8em 1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7), -2.6em 0em 0 0em ").concat(c,", -1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2);\n }\n 87.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.8em -1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 2.5em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 1.75em 1.75em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), 0em 2.5em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.2), -1.8em 1.8em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.5), -2.6em 0em 0 0em rgba(").concat(t,", ").concat(e,", ").concat(n,", 0.7), -1.8em -1.8em 0 0em ").concat(c,";\n }\n }\n "),r=document.createElement("style");r.type="text/css",r.innerHTML=a,document.head.appendChild(r)}(t[0],t[1],t[2],.2)}),[]),(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("span",{className:"whatmore-loading-indicator"})})}},3867:function(t,e,n){var o=n(8816),c=n(417),a=n(4885),r=n(7753),i=n(9039),s=n(7313),m=n(6417);e.Z=function(t){var e;const{whatmoreUITheme:n}=(0,s.useContext)(i.I),[l]=(0,r.j1)("whatmoreSecondaryColor"),[d,h]=(0,r.j1)("productRatings"),u=(0,r.MO)("whatmorePrimaryFont"),f=(t.storeId,t.productId),p=(t.productLink,t.fontSize),g=null!==(e=t.fontColor)&&void 0!==e?e:"gray";if(null===d||"undefined"==typeof d||!(f in d)||d[f].avgRating>5)return(0,m.jsx)(m.Fragment,{});const y=d[f].avgRating,b=d[f].totalRatings;return(0,m.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center"},children:(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center",gap:"0px"},children:[[...Array(Math.floor(y))].map(((t,e)=>(0,m.jsx)(o.Z,{sx:{color:l,fontSize:p+"px"}},"star-icon"+e))),y-Math.floor(y)>.2?(0,m.jsx)(c.Z,{sx:{color:l,fontSize:p+"px"}},"star-half-icon"):y-Math.floor(y)==0?(0,m.jsx)(m.Fragment,{}):(0,m.jsx)(a.Z,{sx:{color:l,fontSize:p+"px"}},"star-outline-icon"),[...Array(Math.floor(5-y))].map(((t,e)=>(0,m.jsx)(a.Z,{sx:{color:l,fontSize:p+"px"}},"star-outline-icon-"+e))),(0,m.jsx)("div",{children:(0,m.jsx)("div",{width:"2px"})}),(0,m.jsx)("div",{children:(0,m.jsx)("div",{style:{backgroundColor:l,borderRadius:"round"==n?"2px":"0px",padding:"1px",overflow:"hidden"},children:(0,m.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color","white","important"),t.style.setProperty("font-size",.8*p+"px","important"),t.style.setProperty("font-family",u,"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",y,"\xa0"]})})}),(0,m.jsx)("div",{children:(0,m.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color",g,"important"),t.style.setProperty("font-size",.8*p+"px","important"),t.style.setProperty("font-family",u,"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","("+b+")"]})})]})})}},3175:function(t,e,n){var o=n(1332),c=n(5180),a=n(6417);e.Z=function(t){var e,n;const r=null!==(e=t.height)&&void 0!==e?e:"100%",i=null!==(n=t.width)&&void 0!==n?n:"100%";return(0,a.jsxs)("div",{style:{width:i,height:r,overflow:"hidden",minHeight:r,minWidth:i},children:[(0,a.jsx)(c.Z,{height:r,width:i}),(0,a.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignContent:"center",width:"100%",height:"100%",position:"relative",zIndex:1,bottom:"100%",className:"whatmore-ios-css-relative-fix"},children:(0,a.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",width:"100%",height:"fit-content"},children:(0,a.jsx)(o.Z,{})})})]})}},5180:function(t,e,n){var o=n(6417);e.Z=function(t){var e,n,c;const a=null!==(e=t.height)&&void 0!==e?e:"100%",r=null!==(n=t.width)&&void 0!==n?n:"100%",i=null!==(c=t.borderRadius)&&void 0!==c?c:"10px";return(0,o.jsx)("div",{style:{height:a,width:a,borderRadius:i,overflow:"hidden",minHeight:a,minWidth:r,maxHeight:a,maxWidth:r},children:(0,o.jsx)("div",{style:{minHeight:a,minWidth:r},height:"100%",width:"100%",className:"whatmore-shimmer"})})}},2887:function(t,e,n){var o=n(7313),c=n(3175),a=n(6417);e.Z=function(t){var e,n,r;const[i,s]=(0,o.useState)(!1),m=o.useRef(0),l=(0,o.useRef)(null),d=null!==(e=t.timeUpdateCallback)&&void 0!==e?e:()=>{},h=null!==(n=t.height)&&void 0!==n?n:"100%",u=null!==(r=t.width)&&void 0!==r?r:"100%";return(0,o.useEffect)((()=>{m.current=0;const t=setInterval((()=>{m.current=m.current+.03,l.current&&d(m.current,5),m.current>=5&&(m.current=0)}),30);return()=>{clearInterval(t)}}),[t.isPlaying]),(0,a.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:u,height:h,overflow:"hidden"},children:[(0,a.jsx)("div",{style:{width:i?"100%":"0px",height:i?"100%":"0px"},children:(0,a.jsx)("img",{ref:l,src:t.url,style:{objectFit:"cover",height:h,width:u,backgroundColor:"white"},alt:"image player",onLoad:()=>{s(!0)}})}),i?(0,a.jsx)(a.Fragment,{}):(0,a.jsx)(c.Z,{width:u,height:h})]})}},4892:function(t,e,n){n.d(e,{Z:function(){return h}});var o=n(7313),c=n(3933),a=n(868),r=n(8984),i=n(7300),s=n(2887),m=n(4862),l=n(6417);var d=function(t){var e,n;const a=(0,o.useRef)(null),[r,i,s]=(0,c.YD)({triggerOnce:!0}),d=null!==(e=t.height)&&void 0!==e?e:"100%",h=null!==(n=t.width)&&void 0!==n?n:"100%";return(0,o.useEffect)((()=>{a.current&&(t.isPlaying?a.current.play():(m.G6&&a.current.play(),a.current.pause()))}),[t.isPlaying,i]),(0,l.jsx)("div",{ref:r,style:{width:d,height:h,overflow:"hidden"},children:i?(0,l.jsx)("video",{ref:a,className:"whatmore-video-player",width:h,height:d,preload:"metadata",loop:!0,playsInline:!0,poster:t.isPlaying?t.url:"",muted:!0,src:t.url,style:{backgroundColor:"white"}}):(0,l.jsx)("div",{width:h,height:d,ref:t=>{t&&t.style.setProperty("display","block","important")}})})};var h=function(t){var e,n,m;const[h,u,f]=(0,c.YD)({triggerOnce:!0});if((0,i.WJ)(t.event))return(0,l.jsx)(s.Z,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback});const p=null!==(e=t.pauseFromPlayTimeInMs)&&void 0!==e?e:200;if((0,r.KE)())return(0,l.jsx)(d,{height:"100%",width:"100%",url:(0,a.V)(t.url),isPlaying:t.isPlaying,pauseFromPlayTimeInMs:p});const g=(0,o.useRef)(null),y=null!==(n=t.height)&&void 0!==n?n:"100%",b=null!==(m=t.width)&&void 0!==m?m:"100%";return(0,o.useEffect)((()=>{g.current&&(t.isPlaying?g.current.play():g.current.pause())}),[t.isPlaying,u]),(0,l.jsx)("div",{ref:h,style:{width:y,height:b,overflow:"hidden"},children:u?(0,l.jsx)("video",{ref:g,className:"whatmore-video-player",width:b,height:y,preload:"metadata",loop:!0,playsInline:!0,muted:!0,src:(0,a.V)(t.url),style:{backgroundColor:"white"}}):(0,l.jsx)("div",{width:b,height:y,ref:t=>{t&&t.style.setProperty("display","block","important")}})})}},868:function(t,e,n){n.d(e,{V:function(){return i}});var o=n(9854),c=n(7753);const a={"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"},r={"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"},i=function(t){const e=(0,c.MO)("whatmoreShopId");if(!t)return t;if(t.startsWith("https://cdn.shopify.com"))return t;if("AWSCDN"==(0,o.zpr)(e))return t;if("AZURECDN"==(0,o.zpr)(e)){if(t.includes(".azureedge.net"))return t;if(t.includes(".cloudfront.net")){for(const e of Object.keys(a))if(t.includes(e))return t.replace(e,a[e]);return t}}if("BUNNYCDN"==(0,o.zpr)(e)){if(t.includes(".b-cdn.net"))return t;if(t.includes(".cloudfront.net")){for(const e of Object.keys(r))if(t.includes(e))return t.replace(e,r[e]);return t}}return t}},9363:function(t,e,n){n.d(e,{s:function(){return a}});var o=n(9854),c=n(7753);function a(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=(0,c.MO)("whatmoreShopId");return"shopify"!=(0,o.Ipo)(n)?t:t+e}},5456:function(t,e,n){n.d(e,{B:function(){return o}});const o=function(t,e){return!(isNaN(e)||!e||("string"===typeof e||e instanceof String)&&!e.trim().length)&&!(parseInt(e)<=parseInt(t))}},8866:function(t,e,n){var o=n(7313);function c(){return[window.innerHeight,window.innerWidth]}e.Z=function(t){var[e,n]=c();const[a,r]=(0,o.useState)([e>n?"portrait":"landscape",e,n]);return(0,o.useLayoutEffect)((()=>{function t(){var[t,e]=c();r(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)}}),[]),a}},9723:function(t,e,n){var o=n(5318);e.Z=void 0;var c=o(n(5045)),a=n(6417),r=(0,c.default)((0,a.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");e.Z=r},8816:function(t,e,n){var o=n(5318);e.Z=void 0;var c=o(n(5045)),a=n(6417),r=(0,c.default)((0,a.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=r},417:function(t,e,n){var o=n(5318);e.Z=void 0;var c=o(n(5045)),a=n(6417),r=(0,c.default)((0,a.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=r},4885:function(t,e,n){var o=n(5318);e.Z=void 0;var c=o(n(5045)),a=n(6417),r=(0,c.default)((0,a.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=r},8743:function(){},123:function(){},7244:function(){},5892:function(){},4444:function(){},1811:function(){},7850:function(){}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[876],{941:function(e,t,n){n.d(t,{D:function(){return r}});const o=function(){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 c=document.querySelector("cart-drawer");c&&c.classList.remove("is-empty");const i=document.querySelector("cart-drawer-items");i&&i.classList.remove("is-empty");const a=document.getElementById("cart-icon-bubble");if(a.querySelector(".cart-count-bubble")){a.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 "),a.appendChild(t)}a.click();document.getElementById("CartDrawer-Overlay").addEventListener("click",(()=>{const e=document.querySelector("cart-drawer");e&&e.classList.remove("active"),document.body.classList.remove("overflow-hidden")}))}))}))},r=async function(e,t,n,r){if("STRNV8MHJTF"!=e&&"STR6HU283UZ"!=e&&"STR9T3LLEJB"!=e&&"STRWJMIOJNX"!=e&&"STRUDQ36YAC"!=e&&"STR1D5ONOZX"!=e){var c=await fetch("https://"+window.location.hostname+"/cart.js",{cache:"reload"}).then((e=>e.json()));if("57939755089"==e||"27358003275"==e||"63748341981"==e||"68237558034"==e||"63046287536"==e)document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0,detail:{cart:c,openMiniCart:!0}}));else if("19506115"==e)window.PXUTheme.jsAjaxCart.showDrawer(),window.PXUTheme.jsAjaxCart.updateView();else if("54465429691"==e)refreshCart(c),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("83096174866"==e||"63791857821"==e||"70963003672"==e||"20157815"==e||"60492578980"==e||"12183765088"==e||"58546946211"==e||"42070737058"==e||"71321583919"==e||"68492624171"==e||"74541891876"==e||"21187677"==e||"74021110038"==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)o();else if("80856187185"==e||"71256211737"==e)fetch("/cart?section_id=mini-cart").then((e=>e.text())).then((e=>{const t=(new DOMParser).parseFromString(e,"text/html").querySelector(".mini-cart__inner").innerHTML;console.log(t,"sq"),$(".mini-cart__inner").html(t).addClass("active__drawer")})).catch((e=>{console.error(e)})),o();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"1972174947"==e||"55194878152"==e?document.documentElement.dispatchEvent(new CustomEvent("cart:refresh:opend",{bubbles:!0,detail:{}})):"64463667449"==e||"63897370681"==e||"81998840121"==e||"70964478228"==e?(document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0})),document.documentElement.dispatchEvent(new CustomEvent("cart:updated",{bubbles:!0,detail:{cart:c}})),document.getElementById("mini-cart").open=!0):"81545986363"==e?(document.dispatchEvent(new CustomEvent("theme:cartchanged",{bubbles:!0})),document.dispatchEvent(new CustomEvent("theme:open-cart-drawer",{bubbles:!0}))):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()}}},58:function(e,t,n){n.d(t,{Bi:function(){return a},P7:function(){return u},QV:function(){return s},UD:function(){return r},b5:function(){return i}});var o=n(7753);const r=6;function c(){const e=(0,o.MO)("whatmoreVideoPlayerPool");var t=document.createElement("video");return t.setAttribute("class","whatmore-video-player whatmore-main-video-player-from-pool"),t.setAttribute("width","100%"),t.setAttribute("src","https://whatmore-other-assets.b-cdn.net/whatmore/dummy_for_video_pool_3s_muted_11kb.mp4"),t.muted=!0,t.setAttribute("height","100%"),t.setAttribute("preload","metadata"),t.setAttribute("loop",""),t.setAttribute("playsinline",""),t.setAttribute("x-webkit-airplay","allow"),t.controls=!1,e.appendChild(t),t}const i=function(e){for(let t=1;t<=e;t++)c();(0,o.bU)("whatmoreVideoPlayerPoolInitiated",!0)};const a=function(e,t,n,r){(0,o.MO)("whatmoreVideoPlayerPool");const c=function(e,t,n){var r=(c=(0,o.MO)("whatmoreVideoPlayerPool").children,c.length>0?c[0]:null);var c;if(!r)throw new Error("Whatmore :: not enough blessed videos available in video pool.");return r.setAttribute("src",e),r.muted=t,r.play().then((()=>{!n&&r.pause()})).catch((e=>{})),r}(t,n,r);return e.innerHTML="",e.appendChild(c),c},s=async function(){const e=(0,o.MO)("whatmoreVideoPlayerPool"),t=(0,o.MO)("whatmoreVideoPlayerPoolInitiated");t||i(r);var n=[];for(let o of e.children){o.muted=!0;var c=o.play().then((e=>(!t&&o.pause(),e)));n.push(c)}await Promise.all(n).then((e=>{(0,o.bU)("whatmoreVideoPlayerPoolBlessed",!0)})).catch((e=>{console.error("Whatmore :: Error while blessing "+e.message)}))},u=function(e){const t=(0,o.MO)("whatmoreVideoPlayerPool"),n=e.children[0];n.muted=!0,!n.paused&&n.pause(),t.appendChild(n)}},8984:function(e,t,n){n.d(t,{KE:function(){return i},eE:function(){return c},gE:function(){return r}});var o=n(4862);const r=function(){return o.gn},c=function(){return o.Q5},i=function(){return r()||c()}},7300:function(e,t,n){n.d(t,{B6:function(){return o},WJ:function(){return r},yC:function(){return c}});const o=function(e){return"video"===e.event_type},r=function(e){return"image"===e.event_type},c=function(e){return"livestream"===e.event_type}},5160:function(e,t,n){n.d(t,{$L:function(){return p},JX:function(){return l},Z6:function(){return a},lY:function(){return u},rp:function(){return h},uD:function(){return v},wh:function(){return i},wz:function(){return d},x0:function(){return s}});var o,r=n(2860);const c=null!==(o="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==o&&o;function i(e){c&&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=>(c&&console.debug("updating user view count response : HTTP "+e.status),e.json()))).then((e=>{c&&console.debug("updating user view count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating user view count user for event : ",e)}))}function a(e,t){c&&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=>(c&&console.debug("updating like count response : HTTP "+e.status),e.json()))).then((e=>{c&&console.debug("updating like count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating like count user for event : ",e)}))}function s(e){c&&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=>(c&&console.debug("updating share count response : HTTP "+e.status),e.json()))).then((e=>{c&&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){c&&console.debug("updating wa click count for event.");const n={event_id:e.event_id,increase_by:t};fetch(r.Gc+"/event/metrics/whatsapp",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(c&&console.debug("updating whatsapp click count response : HTTP "+e.status),e.json()))).then((e=>{c&&console.debug("updating whatsapp click count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating whatsapp click count user for event : ",e)}))}function d(e,t){c&&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=>(c&&console.debug("updating user event-product click count response : HTTP "+e.status),e.json()))).then((e=>{c&&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 l(e,t,n){c&&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=>(c&&console.debug("updating user event-product add to cart count response : HTTP "+e.status),e.json()))).then((e=>{c&&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 p(e,t){c&&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=>(c&&console.debug("updating user event-product buy now count response : HTTP "+e.status),e.json()))).then((e=>{c&&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:i="",checkoutToken:a="",quantity:s=0,price:u="",actionType:d="",trackingId:l=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},p={event_id:t,product_id:n,cart_token:i,checkout_token:a,quantity:s,price:u,variant_id:o,action_type:d,tracking_id:l};c&&console.debug("initiating ATC metadata event for eventId {}, productId {}, variantId {} ",t,n,o);const h=await fetch(r.Gc+"/cart-metadata/"+e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(p)}).then((e=>(c&&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 h}function v(e){const t={event_id:e.event.event_id,cta_id:e.cta.cta_id,increase_by:1};fetch(r.Gc+"/event/metrics/cta/clicks",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>(c&&console.debug("updating user cta click count response : HTTP "+e.status),e.json()))).then((e=>{c&&console.debug("updating user cta click count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating cta click count : ",e)}))}},4669:function(e,t,n){n.d(t,{Tc:function(){return h},ll:function(){return p}});var o,r=n(1824),c=n(7786),i=n(9854);const a="Whatmore Video Shopping",s=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 p(e){if((0,i.DvX)(e)&&null!==(0,i.hfN)(e)&&(c.ZP.initialize((0,i.hfN)(e)),s&&console.debug("Whatmore: initialized GA4")),(0,i.hvq)(e)&&null!==(0,i.BHj)(e)){const t=(0,i.OQz)(e);r.ZP.initialize((0,i.BHj)(e),{useExistingGa:t}),s&&console.debug("Whatmore: initialized GA3")}}async function h(e,t,n){(0,i.hvq)(e)&&null!==(0,i.BHj)(e)&&(r.ZP.event({category:a,action:u,label:l[t]+":"+d[n]}),s&&console.debug("Whatmore: pushed view event to GA3")),(0,i.DvX)(e)&&null!==(0,i.hfN)(e)&&(c.ZP.event({category:a,action:u+":"+l[t]+":"+d[n],value:1,nonInteraction:!1}),s&&console.debug("Whatmore: pushed view event to GA4"))}},733:function(e,t,n){n.d(t,{s:function(){return p}});var o=n(7381),r=n(9854),c=n(7753),i=n(7008);const a=function(e,t,n,o){var r;return{landing_location_type:t.landingLocationType,template_type:t.templateType,whatmore_event:{id:e.event_id,eventset_id:null!==(r=e.eventset_id)&&void 0!==r?r:null,cta_list:o.map((e=>e.cta_id)),product_list:n.map((e=>e.product_id))}}};var s=n(778),u=n(2751),d=n(6967);const l=function(){return{user_id:(0,d.hb)(),session_id:(0,d.sQ)(),user_group:"group-a",user_agent:navigator.userAgent,store_id:(0,c.MO)("whatmoreShopId"),hostname:window.location.hostname,page_path:window.location.pathname,event_id:(0,u.x0)(),event_timestamp:Math.round((new Date).getTime()/1e3)}},p=function(){let{userInteractionType:e="",userInteractionMetadata:t={},widgetSourceDetails:n={},event:u="",productList:d=[],ctaList:p=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const h=(0,c.MO)("isInDesignMode"),v=(0,c.MO)("isDemoBrand"),m=(0,c.MO)("whatmoreShopId");if(!(0,r.AAS)(m)||v||h)return;const g="_whatmore_bulk_events",f=l(),_=(0,s.r)(e,t),b=a(u,n,d,p),w=(0,c.MO)("whatmoreLoggingActive"),y={...f,interaction_data:_,data:b},E=JSON.parse(localStorage.getItem(g))||[];if(E.push(y),localStorage.setItem(g,JSON.stringify(E)),w&&(0,o.EI)(y),clearTimeout(localStorage.getItem("_whatmore_bulk_timer_id")),E.length>=10)(0,i.K)(E),localStorage.removeItem(g);else if(E.length>0){let e=setTimeout((()=>{(0,i.K)(E),localStorage.removeItem(g)}),14e3);localStorage.setItem("_whatmore_bulk_timer_id",e)}}},778:function(e,t,n){n.d(t,{K:function(){return o},r:function(){return r}});const o=Object.freeze({EVENT_VIEW:"event-view",PRODUCT_CTA_VIEW:"product-cta-view",SHOPNOW_ATC_CLICKED:"shop-now-atc-clicked",SHOPNOW_BUYNOW_CLICKED:"shop-now-buy-now-clicked",PRODUCT_TILE_ATC_CLICKED:"product-tile-atc-clicked",PRODUCT_TILE_SHOPNOW_CLICKED:"product-tile-shopnow-clicked",VIDEO_LIKED:"video-liked",VIDEO_UNLIKED:"video-unliked",VIDEO_SHARE_CTA_CLICKED:"video-share-cta-clicked",VIDEO_MUTED:"video-muted",HOMEPAGE_CAROUSEL_SWIPED:"homepage-carousel-swiped",HOMEPAGE_VISITED:"homepage-visited",COLLECTION_PAGE_VISITED:"collection-page-visited",PDP_VISITED:"product-page-visited",HOMEPAGE_CAROUSEL_WIDGET_VIEW:"homepage-carousel-widget-view",BANNER_WIDGET_VIEW:"banner-widget-view",STORIES_WIDGET_VIEW:"stories-widget-view",COLLECTION_WIDGET_VIEW:"collection-widget-view",SPOTLIGHT_WIDGET_VIEW:"spotlight-widget-view",PDP_POPUP_WIDGET_VIEW:"pdp-popup-widget-view",VIDEO_PLAYBACK:"video-playback",SHOPNOW_CLICKED:"shopnow-clicked",WHATSAPP_ICON_CLICKED:"whatsapp-icon-clicked",BANNER_WIDGET_CLICKED:"banner-widget-clicked"}),r=function(e,t){return{name:e,metadata:JSON.stringify(t)}}},7643:function(e,t,n){n.d(t,{u:function(){return s}});var o=n(3933),r=n(9039),c=n(7313),i=n(733),a=n(6417);const s=function(e){var t;const{ref:n,inView:s,entry:u}=(0,o.YD)({triggerOnce:!1,threshold:null!==(t=e.threshold)&&void 0!==t?t:1}),{whatmoreWidgetSourceDetails:d}=(0,c.useContext)(r.I);return(0,c.useEffect)((()=>{var t,n,o,r;s&&null!==(t=e.triggerFlag)&&void 0!==t&&t&&(0,i.s)({userInteractionType:e.userInteractionType,userInteractionMetadata:null!==(n=e.userInteractionMetadata)&&void 0!==n?n:{},widgetSourceDetails:d,event:e.event,productList:null!==(o=e.productList)&&void 0!==o?o:[],ctaList:null!==(r=e.ctaList)&&void 0!==r?r:[]})}),[s]),(0,a.jsx)("div",{ref:n,children:e.children})}}}]);