whatmore-react-assets 1.0.1431 → 1.0.1433
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[620],{3590:function(t,e,i){var n=i(2375),o=i(1348),r=i(5830),l=i(4414);function s(t){return t<1e3?t:t<1e5?(t/1e3).toFixed(0)+"K":(t/1e5).toFixed(0)+"L"}e.A=function(t){const e=(0,r.Xd)("whatmoreUITheme"),i=(0,r.Xd)("whatmoreShopId"),a=(0,r.Xd)("whatmorePrimaryFont"),d=t.event,p=t.fontSize;if(d.total_views<=0)return(0,l.jsx)(l.Fragment,{});const c=(0,o.FVo)(i);return"template-icon"==c?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,o.sIk)(i),color:"white",borderRadius:"round"==e?"5px":"0px",borderWidth:(0,o.YcK)(i),borderColor:(0,o.Fwt)(i)},children:(0,l.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:[(0,l.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,l.jsx)(n.A,{sx:{color:(0,o.s0t)(i)+" !important",fontSize:p,fontWeight:"normal"}})}),(0,l.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,l.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,o.s0t)(i),"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",a,"important"),t.style.setProperty("font-size",p,"important"),t.style.setProperty("min-height","0","important"),t.style.setProperty("display","inline","important"),t.style.setProperty("width","auto","important"))},style:{fontWeight:"normal"},children:" "+s(d.total_views)+" "})})]})})}):"template-text"==c?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,o.sIk)(i),color:"white",borderRadius:"round"==e?"5px":"0px",borderWidth:(0,o.YcK)(i),borderColor:(0,o.Fwt)(i)},children:(0,l.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:(0,l.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,l.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,o.s0t)(i),"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",a,"important"))},style:{fontSize:p,fontWeight:"bold"},children:" "+s(d.total_views)+" views"})})})})}):void 0}},7509:function(t,e,i){i.d(e,{h:function(){return n}});const n=(0,i(9950).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},4616:function(t,e,i){var n=i(9950),o=i(5830),r=i(932),l=i(8538),s=(i(4826),i(1348)),a=i(7973),d=i(4414);e.A=function(t){var e,i,p,c,[h,m]=(0,r.A)();const x=(0,o.Xd)("whatmoreUITheme"),[y]=(0,o.QN)("whatmorePrimaryFont"),[f,v]=(0,n.useState)(0),u=(0,o.Xd)("whatmoreShopId"),g=t.event;if(0==g.products.length)return(0,d.jsx)(d.Fragment,{});const w=.3*m,j=w+"px",b=w+"px",P=.07*m,F=P+"px";return(0,d.jsx)("div",{style:{width:m+"px",height:"fit-content",backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0.3)"},children:(0,d.jsxs)("div",{ref:t=>{t&&t.style.setProperty("height","fit-content","important")},style:{display:"flex",flexFlow:"row nowrap",width:"100%",justifyContent:"space-between",alignItems:"center",paddingLeft:"5px",paddingRight:"5px",paddingTop:"5px",paddingBottom:"5px",gap:"5px"},className:"whatmore-event-tile-product-scale-in-and-out-animation",children:[(0,d.jsx)("div",{ref:t=>{t&&t.style.setProperty("height",b,"important")},style:{width:(0,s.H$k)(u)?j:"auto",boxShadow:"round"==x?"0px 0px 5px 2px #B0B0B0":null,borderRadius:"round"==x?"5px":"0px",borderWidth:(0,s.YcK)(u),borderColor:(0,s.Fwt)(u),overflow:"hidden",backgroundColor:"rgb(220, 220, 220, 1)"},children:(0,d.jsx)("img",{ref:t=>{t&&(t.style.setProperty("object-fit",(0,s.KZe)(u),"important"),t.style.setProperty("max-width",j,"important"))},src:(0,a.b)(g.products[f].thumbnail_image,"&width=400&height=400"),style:{width:"100%",height:"100%",borderRadius:"round"==x?"5px":"0px"},alt:"product image"})}),(0,d.jsxs)("div",{style:{width:m-5-w+"px",height:"100%",borderRadius:"round"==x?"5px":"0px",overflow:"visible"},children:[(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"fit-content",justifyContent:"center",alignItems:"center",paddingBottom:"4px"},children:(0,d.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","white","important"),t.style.setProperty("font-size",F,"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",y,"important"),t.style.setProperty("-webkit-line-clamp",3,"important"),t.style.setProperty("line-clamp",3,"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:"normal"},children:(0,l.v)(g.products[f].title)})}),(0,s.gZ6)(u)&&(null===(e=g.products[f])||void 0===e||null===(i=e.product_metadata)||void 0===i?void 0:i.product_type)&&(0,d.jsx)("div",{style:{display:"flex",opacity:.8,width:"fit-content",maxWidth:m-5-w+"px",padding:"3px 6px",backgroundColor:"#D3D3D3",borderRadius:"round"==x?"3px":"0"},children:(0,d.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","#000","important"),t.style.setProperty("maxWidth",m-5-w+"px","important"),t.style.setProperty("font-size",.7*P+"px","important"),t.style.setProperty("font-family",y,"important"),t.style.setProperty("font-weight","bold","important"),t.style.setProperty("text-overflow","ellipsis","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("-webkit-line-clamp",1,"important"),t.style.setProperty("line-clamp",1,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"))},children:null===(p=g.products[f])||void 0===p||null===(c=p.product_metadata)||void 0===c?void 0:c.product_type})})]})]},f)})}},5620:function(t,e,i){i.d(e,{A:function(){return w}});var n=i(9950),o=i(932),r=(i(4826),i(5727)),l=i(5830),s=i(9879),a=i(7509),d=i(22),p=i(1348),c=i(3590),h=i(4616),m=i(6649),x=i(6613),y=i(1131),f=(i(4365),i(4414));function v(t){var e,[i,s]=(0,o.A)();const[d]=(0,l.QN)("whatmoreShopId"),[c,y,v]=(0,m.A)({triggerOnce:!0});var u=(0,n.useContext)(a.h);const g=t.event,w=null!==(e=t.unfocusedDisplay)&&void 0!==e&&e,j=.5*s,b=(0,x.At)()?t.isOnFocus:y;return(0,f.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"200%",overflow:"hidden",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,f.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",alignItems:"center",height:"100%",width:"100%"},children:[(0,f.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,f.jsx)("p",{children:" "})}),u.showPlayButton&&!w||"60934750449"==d?(0,f.jsx)("div",{style:{position:"relative",top:"10%",overflow:"hidden",marginLeft:"5px",marginRight:"5px",width:"100%"},children:(0,f.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",alignItems:"center"},children:(0,f.jsxs)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:["60934750449"==d&&(0,f.jsx)("div",{style:{boxShadow:"dark-lg",transform:"scale(0.7)"},children:(0,f.jsx)("img",{src:"https://s3.ap-south-1.amazonaws.com/whatmorelive.brand.other.assets/maryumnmaria/Text2.png"})}),"60934750449"!=d&&"video"==g.event_type&&(0,f.jsx)(r.A,{sx:{color:(0,p.KFN)(d)+" !important",opacity:.8,fontSize:j,filter:"drop-shadow(0 0 15px black);"}})]})})}):(0,f.jsx)(f.Fragment,{}),(0,f.jsx)("div",{ref:c,children:b&&(0,p.imx)(d)?(0,f.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,f.jsx)(h.A,{event:g})}):(0,f.jsx)("div",{height:"20px"})})]})})}function u(t){var[e,i]=(0,o.A)();const[n]=(0,l.QN)("whatmorePrimaryFont"),r=t.event;return r.title.trim().length?(0,f.jsx)("div",{style:{width:"100%",height:"fit-content",backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))"},children:(0,f.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"flex-end",alignContent:"center",width:"100%",height:"100%"},children:(0,f.jsx)("div",{style:{width:"100%",padding:"2px"},children:(0,f.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",alignItems:"flex-start",marginLeft:"5px",marginRight:"5px",marginBottom:"2px"},children:[(0,f.jsx)("p",{style:{color:"white",fontSize:.08*i+"px",fontWeight:"normal",textAlign:"left"},children:" "}),(0,f.jsx)("p",{ref:t=>{t&&t.style.setProperty("font-family",n,"important")},style:{color:"white",fontSize:.08*i+"px",fontWeight:"normal",textAlign:"left"},children:r.title.substring(0,60)})]})})})}):(0,f.jsx)(f.Fragment,{})}function g(t){const[e,i,n,r,s]=(0,o.A)(),[a]=(0,l.QN)("whatmoreShowViews"),h=(0,l.Xd)("whatmoreShopId"),m=t.event,x=t.isOnFocus;return(0,f.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",overflow:"hidden",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,f.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-between",alignItems:"center"},children:[(0,f.jsx)("div",{style:{width:"100%",backgroundImage:"linear-gradient(to top, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0.3))"},children:(0,f.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",alignItems:"center"},children:["show"===a&&"show"===(0,p.klK)(h)?(0,f.jsx)("div",{style:{width:"100%",marginLeft:"5px",marginRight:"5px",marginTop:"10px"},children:(0,f.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",paddingLeft:"5px",width:"fit-content",height:"fit-content",justifyContent:"space-between",alignItems:"center"},children:(0,f.jsx)(c.A,{event:m,fontSize:.07*i+"px"})})}):(0,f.jsx)(f.Fragment,{}),!1]})}),d.nN===s[d.dl]?(0,f.jsx)(f.Fragment,{}):x?(0,f.jsx)("div",{className:"whatmore-event-tile-component-fade-out-animation",children:(0,f.jsx)(u,{event:m})}):(0,f.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,f.jsx)(u,{event:m})})]})})}var w=function(t){var e,i,r;const[c,h,m,x,u]=(0,o.A)();var w=(0,n.useContext)(a.h);const j=(0,l.Xd)("whatmoreUITheme"),b=(0,l.Xd)("whatmoreShopId"),[P]=(0,l.Xd)("whatmorePrimaryFont"),F=t.event,C=t.onClick,k=null===(e=t.isOnFocus)||void 0===e||e,I=null!==(i=t.playOnUnfocus)&&void 0!==i&&i,A=null!==(r=t.animateOnFocus&&(0,p.n5O)(b))&&void 0!==r&&r,S=(0,p.VYo)(b);return(0,f.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top",w.tileTopMargin+"px"),t.style.setProperty("margin-bottom",w.tileBottomMMargin+"px"))},style:{margin:"0 10px",width:"8968077397"==b||"19501891"==b?void 0:h,aspectRatio:"8968077397"==b||"19501891"==b?9/16:void 0,height:"8968077397"==b||"19501891"==b?"100%":c,borderRadius:"round"==j?"5px":"0px",boxShadow:"round"==j||"61187850326"==b||"19501891"==b?S:null,borderWidth:(0,p.YcK)(b),borderColor:(0,p.Fwt)(b),overflow:"hidden",cursor:"pointer",position:"relative"},className:A?k?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",onClick:()=>{C(F)},children:[(0,f.jsx)(s.A,{height:(0,p.u06)(b)+" !important",width:"100%",url:F.thumbnail_image,isPlaying:k||I,event:F}),"51394281658"===b?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("div",{style:{position:"absolute",bottom:"4%",left:"50%",transform:"translateX(-50%)",color:"white",padding:"0.5rem 0rem 0rem 0.5rem",zIndex:1,fontSize:"1.4rem",fontWeight:"600",width:"90%",maxWidth:"100%",wordWrap:"break-word",textShadow:"2px 2px 4px rgba(0, 0, 0, 0.5)",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,overflow:"hidden",textOverflow:"ellipsis",fontFamily:P+" !important"},children:null===F||void 0===F?void 0:F.title}),(0,f.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",zIndex:2},children:(0,f.jsx)(y.A,{sx:{color:"white",fontSize:"1.3rem",filter:"drop-shadow(0 0 5px black)"}})})]}):(0,p.Q$)(b)&&(0,f.jsxs)("div",{style:{width:h,height:c},children:[(0,f.jsx)(g,{event:F,isOnFocus:k}),"87043703105"===b||"76467011883"===b||!k&&d.nN!==u[d.dl]?null:(0,f.jsx)(v,{event:F,unfocusedDisplay:!k,isOnFocus:k})]})]})}},7973:function(t,e,i){i.d(e,{B:function(){return l},b:function(){return r}});var n=i(1348),o=i(5830);function r(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const i=(0,o.Xd)("whatmoreShopId");return"shopify"!=(0,n.NCy)(i)?"STRNV8MHJTF"==i?t+"?format=webp":t:t+e}function l(t){var e;if(null!==t&&void 0!==t&&t.includes("https://w-media.b-cdn.net/process-media"))return"image";const i=null===t||void 0===t||null===(e=t.trim())||void 0===e?void 0:e.split("?")[0],n=/\.(jpeg|jpg|gif|png|svg|webp)$/i,o=/\.(mp4|mov|wmv|avi|flv|mkv)$/i;return null!==n&&void 0!==n&&n.test(i)?"image":null!==o&&void 0!==o&&o.test(i)?"video":void 0}},5727:function(t,e,i){var n=i(4994);e.A=void 0;var o=n(i(9526)),r=i(4414);e.A=(0,o.default)((0,r.jsx)("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82"}),"PlayArrowRounded")},1131:function(t,e,i){var n=i(4994);e.A=void 0;var o=n(i(9526)),r=i(4414);e.A=(0,o.default)([(0,r.jsx)("path",{d:"M18 20H6V8h2v2c0 .55.45 1 1 1s1-.45 1-1V8h4v2c0 .55.45 1 1 1s1-.45 1-1V8h2z",opacity:".3"},"0"),(0,r.jsx)("path",{d:"M18 6h-2c0-2.21-1.79-4-4-4S8 3.79 8 6H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m-6-2c1.1 0 2 .9 2 2h-4c0-1.1.9-2 2-2m6 16H6V8h2v2c0 .55.45 1 1 1s1-.45 1-1V8h4v2c0 .55.45 1 1 1s1-.45 1-1V8h2z"},"1")],"ShoppingBagTwoTone")},2375:function(t,e,i){var n=i(4994);e.A=void 0;var o=n(i(9526)),r=i(4414);e.A=(0,o.default)((0,r.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility")},4826:function(){}}]);
|
@@ -73,7 +73,7 @@
|
|
73
73
|
0% {
|
74
74
|
transform: translateY(100%);
|
75
75
|
}
|
76
|
-
`} 0.5s`,zt=null===M||void 0===M||null===(e=M.options)||void 0===e?void 0:e.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))})),[Et,Tt]=(0,n.useState)(-1!==zt?null===(i=M.options)||void 0===i||null===(o=i[zt])||void 0===o||null===(r=o.values)||void 0===r?void 0:r[0]:""),[Nt,Ft]=(0,n.useState)({});(0,n.useEffect)((()=>{-1!==zt&&"whatmore"!==(0,p.NCy)(Ct)&&async function(){const t=await(0,ht._N)(U);Ft(t)}()}),[]);let At=-1,Pt=-1!==zt&&null!==Nt&&void 0!==Nt&&Nt.product&&(null===Nt||void 0===Nt||null===(l=Nt.product)||void 0===l||null===(a=l.images)||void 0===a?void 0:a.length)>=(null===Nt||void 0===Nt||null===(d=Nt.product)||void 0===d||null===(u=d.options)||void 0===u||null===(h=u[zt])||void 0===h||null===(m=h.values)||void 0===m?void 0:m.length)?null===Nt||void 0===Nt||null===(g=Nt.product)||void 0===g||null===(w=g.images)||void 0===w?void 0:w.map((t=>{var e,i,n,o,r,l,a,d,s,c,u,h,p,v;const x=null===Nt||void 0===Nt||null===(e=Nt.product)||void 0===e||null===(i=e.options)||void 0===i?void 0:i.findIndex((t=>"Color"==(null===t||void 0===t?void 0:t.name)||"Colour"==(null===t||void 0===t?void 0:t.name)||"COLOR"==(null===t||void 0===t?void 0:t.name)));return{color:(null===t||void 0===t?void 0:t.variant_ids.length)>0?null===Nt||void 0===Nt||null===(n=Nt.product)||void 0===n||null===(o=n.options)||void 0===o||null===(r=o[x])||void 0===r||null===(l=r.values)||void 0===l?void 0:l[Math.min(++At,(null===Nt||void 0===Nt||null===(a=Nt.product)||void 0===a||null===(d=a.options)||void 0===d||null===(s=d[zt])||void 0===s||null===(c=s.values)||void 0===c?void 0:c.length)-1)]:null===Nt||void 0===Nt||null===(u=Nt.product)||void 0===u||null===(h=u.options)||void 0===h||null===(p=h[x])||void 0===p||null===(v=p.values)||void 0===v?void 0:v[Math.max(0,At)],src:null===t||void 0===t?void 0:t.src}})):[],Lt=[];if("whatmore"==(0,p.NCy)(Ct)&&(null===M||void 0===M||null===(j=M.images)||void 0===j?void 0:j.length)>0){var Bt;var Ot;if(-1!==(null===M||void 0===M||null===(Bt=M.options)||void 0===Bt?void 0:Bt.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))}))))Lt=null===M||void 0===M||null===(Ot=M.images)||void 0===Ot?void 0:Ot.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc})))}return At+1<(null===Nt||void 0===Nt||null===(b=Nt.product)||void 0===b||null===(C=b.options)||void 0===C||null===(S=C[zt])||void 0===S||null===(k=S.values)||void 0===k?void 0:k.length)&&(Pt=[]),(0,f.jsxs)(jt.s,{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===bt||void 0===bt?void 0:bt.whatmoreUITheme)?"xl":null,animation:_t,children:[(0,f.jsx)(ee,{setOpenShopNow:X,setLockSwiper:Y,FONT_SIZE:R}),(0,f.jsx)(s.o,{marginBottom:"10px",px:"20px",py:"5px",children:(0,f.jsx)(jt.s,{bg:"whiteAlpha.900",width:"fit-content",height:"fit-content",borderRadius:"round"==(null===bt||void 0===bt?void 0:bt.whatmoreUITheme)?"lg":null,overflow:"hidden",sx:{borderWidth:(0,p.YcK)(Ct),borderColor:(0,p.Fwt)(Ct)},children:(0,f.jsx)(jt.s,{width:"100%",children:(0,f.jsx)(ae.c,{renderElement:t=>(0,f.jsx)(f.Fragment,{children:(0,f.jsx)(c.az,{width:O+"px",height:D+"px",children:(0,f.jsx)(y._,{width:O+"px",height:D+"px",borderRadius:"round"==(null===bt||void 0===bt?void 0:bt.whatmoreUITheme)?"lg":null,src:(0,yt.b)(t.eventData.src,"&width=400&height=400"),alt:U.handle,sx:{objectFit:(0,p.KZe)(Ct)+" !important"},fallback:(0,f.jsx)(V.A,{width:O+"px",height:D+"px",borderRadius:"round"==(null===bt||void 0===bt?void 0:bt.whatmoreUITheme)?"10px":"0px"})})})}),dataList:Pt.length>0&&!Pt.includes(null)?null===(I=Pt)||void 0===I?void 0:I.filter((t=>(null===t||void 0===t?void 0:t.color)==Et)):Lt.length>0?[null===(_=Lt)||void 0===_?void 0:_.find((t=>(null===t||void 0===t?void 0:t.color)==Et))]:null===M||void 0===M||null===(E=M.images)||void 0===E?void 0:E.map((t=>({src:t.includes("https")?t:"https:"+t}))),spacing:10,defaultHeight:O+"px",defaultWidth:D+"px",retainAlreadyRenderedElements:!0,isScroll:!0})})})}),(0,f.jsx)(oe,{data:M,product:U,PRODUCT_TILE_HEIGHT:B,PRODUCT_TILE_WIDTH:L,FONT_SIZE:R,getVariantPrice:ce,selectedVariantId:nt,itemPrice:at,itemQuantity:rt,setItemQuantity:lt,thumbnailImage:gt}),(null===M||void 0===M||null===(T=M.variants)||void 0===T?void 0:T.length)>0&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(s.o,{paddingTop:"4px",width:"100%",children:(0,f.jsx)(wt.c,{color:(0,p.R6d)(Ct),size:"xs",width:"90%"})}),(0,f.jsx)(le,{data:M,dividerColor:(0,p.R6d)(Ct),setSelectedColor:Tt,finalArr:Pt,finalArrExternal:Lt,product:U,PRODUCT_TILE_HEIGHT:B,PRODUCT_TILE_WIDTH:L,FONT_SIZE:R,selectOptionFirstHandler:St,selectOptionSecondHandler:kt,selectOptionThirdHandler:It,getVariantPrice:ce,selectedOptionFirst:G,selectedOptionSecond:J,selectedOptionThird:et,selectedVariantId:nt,isVariantAvailable:K})]}),p.wW8&&((null===M||void 0===M?void 0:M.description)||(null===M||void 0===M?void 0:M.body_html))&&(0,f.jsx)(ie,{PRODUCT_TILE_HEIGHT:B,FONT_SIZE:R,data:M,handleToggle:()=>Q(!W),show:W}),(0,f.jsx)(c.az,{sx:{pointerEvents:"none"},paddingTop:"20px",opacity:0,children:(0,f.jsx)(te,{position:"relative",data:M,FONT_SIZE:R,product:U})}),(0,f.jsx)(te,{position:"fixed",selectedVariantId:nt,data:M,FONT_SIZE:R,PRODUCT_TILE_WIDTH:L,product:U,itemQuantity:rt,cartItemCount:st,addToCartFlag:pt,setAddToCartFlag:vt,soldOutFlag:xt,setSoldOutFlag:mt,event:H})]})}const se=(t,e,i,n)=>{var o;if(!e&&!i&&!n)return;const r=null===t||void 0===t||null===(o=t.variants)||void 0===o?void 0:o.find((t=>(!e||t.option1===e)&&(!i||t.option2===i)&&(!n||t.option3===n)));return r?r.id:void 0},ce=(t,e)=>{var i,n;return null===t||void 0===t||null===(i=t.variants)||void 0===i||null===(n=i.find((t=>t.id===e)))||void 0===n?void 0:n.price},ue=(t,e)=>{var i;const n=null===t||void 0===t||null===(i=t.variants)||void 0===i?void 0:i.find((t=>t.id==e));return void 0===n?null:null===n||void 0===n||null===(o=n.featured_image)||void 0===o?void 0:o.src;var o},he=(0,n.createContext)({setShowOptionsChart:null});var pe=function(t){const e=t.event,i=t.data,o=t.currentProduct,r=t.setOpenShopNow,l=t.setLockSwiper,[a,d]=(0,n.useState)(!1);return(0,f.jsx)(he.Provider,{value:{setShowOptionsChart:d},children:(0,f.jsxs)(c.az,{width:"full",height:"full",borderRadius:"md",children:[(0,f.jsx)(u.B,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",children:(0,f.jsx)(c.az,{width:"full",height:"fit-content",children:(0,f.jsx)(de,{data:i,event:e,product:o,setOpenShopNow:r,setLockSwiper:l})})}),a?(0,f.jsx)(u.B,{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,f.jsx)(c.az,{width:"full",height:"fit-content",children:(0,f.jsx)($t,{data:i,event:e,product:o,setShowOptionsChart:()=>{d(!1)}})})}):(0,f.jsx)(f.Fragment,{})]})})};var ve=function(t){var e,[i,o,r,l]=(0,x.A)();const[a,d]=(0,n.useState)(!1),[g,j]=(0,n.useState)(),[y,b]=(0,n.useState)(),C=(0,v.Xd)("whatmoreShopId"),S=t.event,k=t.onBack,I=n.useRef(),_=t.isPlaying,z=t.isLast,E=t.setLockSwiper,T=t.selectedVariantId,N=null===(e=t.showOverlay)||void 0===e||e,F="center";return(0,f.jsx)(s.o,{children:(0,f.jsxs)(c.az,{width:l,height:r,sx:{overflow:"hidden"},children:[(0,f.jsx)(u.B,{direction:"column",justifyContent:F,height:"full",width:"full",children:(0,f.jsx)(c.az,{borderRadius:"md",backgroundColor:"white",children:(0,f.jsx)(h.g,{width:"full",ratio:l/r,children:(0,f.jsx)(w,{height:"100%",width:"100%",url:S.event_hls_url,isPlaying:_,event:S})})})}),N?(0,f.jsx)(u.B,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:F,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,f.jsx)(c.az,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,f.jsx)(Yt,{focusRef:I,event:t.event,isLast:z,onCloseCallback:k,productClickHandler:async t=>{const e=await(0,m.M)(t,(0,p.NCy)(C),C);b(t),j(e),d(!0),E(!0)}})})}):(0,f.jsx)(f.Fragment,{}),!0===a?(0,f.jsx)(u.B,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:F,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,f.jsx)(c.az,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,f.jsx)(pe,{focusRef:I,event:t.event,isLast:z,onCloseCallback:()=>k(),setLockSwiper:E,data:g,currentProduct:y,setOpenShopNow:d,selectedVariantId:T})})}):(0,f.jsx)("div",{})]})})};const xe=function(t,e){return isNaN(t)||isNaN(e)||e<=0||t>e?0:Math.ceil(t/e*100)};function me(t){var e,i,[n,o,r,l]=(0,x.A)();const[a]=(0,v.QN)("whatmoreSecondaryColor"),[d]=(0,v.QN)("whatmoreSecondaryColorShade900"),s=t.progress,h=null!==(e=t.totalSiblings)&&void 0!==e?e:1,p=null!==(i=t.indexAmongSiblings)&&void 0!==i?i:0;return(0,f.jsx)(u.B,{width:"96%",height:"fit-content",direction:"row",justifyContent:"center",alignItems:"center",spacing:"1px",children:[...Array(h).keys()].map((t=>(0,f.jsx)(u.B,{width:"100%",height:.004*r+"px",backgroundColor:t<p?a:d+"99",borderRightRadius:"lg",borderLeftRadius:"lg",direction:"row",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",sx:{display:"block !important"},children:t==p?(0,f.jsx)(c.az,{height:"100%",width:s+"%",bgColor:a,borderRightRadius:"lg",borderLeftRadius:"lg",sx:{display:"block !important"}}):(0,f.jsx)(f.Fragment,{})},"event-progress-bar-slab-"+t)))})}var ge=i(3788),fe=i(758);const we=t=>t>=1e3?(t/1e3).toFixed(1)+"k":t,je=()=>"undefined"!==typeof window&&window.innerWidth>=1024;var ye=function(t){var e,i,o,r,a,d=t.whatmoreShareTemplateId;const h=t.whatmoreShareStoryId,m=t.whatmoreShareEventId,g=t.event,w=null===(e=t.showShareText)||void 0===e||e,y=null!==(i=t.shareButtonBottomMargin)&&void 0!==i?i:0,b=(0,v.Xd)("whatmoreShopId"),C=(0,v.Xd)("isInDesignMode"),S=(0,v.Xd)("isDemoBrand"),k=(0,v.Xd)("whatmorePrimaryFont"),I=(0,v.Xd)("websiteLanguage"),{whatmoreWidgetSourceDetails:_}=(0,n.useContext)(q.B),[z,E,T,N]=(0,x.A)(),F=null!==(o=t.iconSize)&&void 0!==o?o:.1*N*(0,p.xkB)(b);function A(){const e=(0,v.Xd)("whatmoreLandingLocationType");var i;!function(t){C||S||(async()=>{(0,l.Zh)(t)})()}(g),(e.startsWith("product")||"embed"===e)&&(d="te"),i="event_product_link"===(0,p.moP)(b)?g.products[0].product_link||"":window.location.pathname,i=("event_product_link"===(0,p.moP)(b)?"":window.location.hostname)+i+"?wtt="+d+"&wsid="+h+"&weid="+m,(0,p.BLb)(b)&&(i=i+"&"+(0,p.VCz)(b)+"&utm_campaign=video-share&utm_medium="+e);const n={title:(0,p.kZI)(b),text:`${(0,p.dmA)(b)} \n ${i} ${(0,p.ZX9)(b)?"\n \n -via Whatmore":""}`};navigator.share&&!je?navigator.share(n):(t.setIsModalOpen(!0),t.setShareText([n,i]))}return(0,f.jsx)(s.o,{children:(0,f.jsx)(c.jl,{cursor:"pointer",style:{marginBottom:y+"px"},children:(0,f.jsxs)(u.B,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[(0,f.jsx)(fe.A,{sx:{transform:"scaleX(-1)",color:"white",fontSize:F,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),A(),(0,X.kz)({userInteractionType:Y.O.VIDEO_SHARE_CTA_CLICKED,widgetSourceDetails:_,event:g,productList:g.products,ctaList:g.cta})}}),w&&(0,p.ViG)(b)?(0,f.jsxs)(j.E,{fontSize:.3*F+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:k+" !important",color:"white !important",paddingRight:"10%",maxWidth:"48px",wordWrap:"break-word"},children:["\xa0",g.total_share>(0,p.vDV)(b)?we(g.total_share):null!==(r=null===ot||void 0===ot||null===(a=ot[I])||void 0===a?void 0:a.share)&&void 0!==r?r:"Share","\xa0"]}):(0,f.jsx)(f.Fragment,{})]})})})},be=i(3420),Ce=i(7170);var Se=function(t){var e,i,o;const r=(0,v.Xd)("whatmoreShopId"),a=(0,v.Xd)("whatmorePrimaryFont"),d=(0,v.Xd)("whatmoreLikedEvents"),h=(0,v.Xd)("isInDesignMode"),m=(0,v.Xd)("isDemoBrand"),g=(0,v.Xd)("websiteLanguage"),{whatmoreWidgetSourceDetails:w}=(0,n.useContext)(q.B),y=t.event,[b,C]=(0,n.useState)(null!==(e=d[y.event_id])&&void 0!==e&&e),[S,k,I,_]=(0,x.A)(),z=.1*_*(0,p.xkB)(r);function E(t,e){h||m||(async()=>{(0,l.$B)(t,e)})()}function T(){(0,v.t2)("whatmoreLikedEvents",{...d,[y.event_id]:!b}),b?(E(y,-1),(0,X.kz)({userInteractionType:Y.O.VIDEO_UNLIKED,widgetSourceDetails:w,event:y,productList:y.products,ctaList:y.cta})):(E(y,1),(0,X.kz)({userInteractionType:Y.O.VIDEO_LIKED,widgetSourceDetails:w,event:y,productList:y.products,ctaList:y.cta})),C(!b)}const N=y.total_like+(b?1:0);return(0,f.jsx)(s.o,{children:(0,f.jsx)(c.jl,{cursor:"pointer",children:(0,f.jsxs)(u.B,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[b?(0,f.jsx)(Ce.A,{sx:{boxShadow:3,color:(0,p.MJ6)(r),fontSize:z,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),T()}}):(0,f.jsx)(be.A,{sx:{boxShadow:3,color:"white",fontSize:z,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),T()}}),(0,f.jsx)(f.Fragment,{children:(0,p.FlI)(r)?(0,f.jsxs)(j.E,{fontSize:.3*z+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:a+" !important",color:"white !important",position:"relative",bottom:"5px"},children:["\xa0",N>=(0,p.LGx)(r)?we(N):null!==(i=null===ot||void 0===ot||null===(o=ot[g])||void 0===o?void 0:o.like)&&void 0!==i?i:"Like","\xa0"]}):(0,f.jsx)(f.Fragment,{})})]})})})};const ke=t=>{let{iconSize:e}=t;return(0,f.jsx)("div",{style:{backgroundColor:"#25D366",borderRadius:"50%",padding:.3*e},children:(0,f.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,f.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 Ie=i(7300);const _e=t=>{let{iconSize:e}=t;return(0,f.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,f.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-twitter-x",viewBox:"0 0 16 16",children:(0,f.jsx)("path",{d:"M12.6.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867-5.07-4.425 5.07H.316l5.733-6.57L0 .75h5.063l3.495 4.633L12.601.75Zm-.86 13.028h1.36L4.323 2.145H2.865z"})})})},ze=t=>{let{iconSize:e}=t;return(0,f.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,f.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-copy",viewBox:"0 0 16 16",children:(0,f.jsx)("path",{"fill-rule":"evenodd",d:"M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z"})})})};var Ee=t=>{const e=t.shareText,[i,o]=(0,n.useState)("Copy link"),[r,l]=(0,n.useState)("");return(0,f.jsx)(f.Fragment,{children:t.isModalOpen&&(0,f.jsxs)("div",{className:"modal-overlay",style:{backgroundColor:"white",borderRadius:"10px",padding:"12px 12px 20px 12px"},children:[(0,f.jsxs)("div",{style:{cursor:"pointer",display:"flex",justifyContent:"space-between",paddingBottom:"6px"},children:[(0,f.jsx)("img",{className:"whatmore-label",onClick:()=>{window.location.href="https://www.whatmore.ai"},src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",backgroundColor:"transparent",borderRadius:"0px",width:Math.min(t.iconSize,28)+"px"}}),(0,f.jsx)(qt.A,{className:"close-rounded-icon",onClick:e=>{e.stopPropagation(),t.setIsModalOpen(!1)}})]}),(0,f.jsx)("div",{}),(0,f.jsx)(wt.c,{color:"blackAlpha.500",size:"1px",width:"100%"}),(0,f.jsxs)("div",{className:"social-icons",style:{display:"flex",gap:"20px",justifyContent:"center",paddingTop:"12px"},children:[(0,f.jsxs)("div",{onClick:t=>{var i;t.stopPropagation();const n=encodeURIComponent(null===(i=e[0])||void 0===i?void 0:i.text);window.open(`https://wa.me/?text=${n}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,f.jsx)(ke,{iconSize:Math.min(t.iconSize,30)}),(0,f.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"Whatsapp"})]}),(0,f.jsxs)("div",{onClick:t=>{var i;t.stopPropagation();const n=encodeURIComponent(null===(i=e[0])||void 0===i?void 0:i.text);window.open(`https://twitter.com/intent/tweet?text=${n}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,f.jsx)(_e,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,f.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"X"})]}),(0,f.jsxs)("div",{onClick:t=>{t.stopPropagation(),navigator.clipboard.writeText(e[1]),o("Link copied"),l("green")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,f.jsx)(ze,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,f.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14),color:r},children:i})]})]})]})})};var Te=function(t){var e,i;const o=null===(e=t.brandName)||void 0===e?void 0:e.replace(/\s+/g,"_"),r=(0,v.Xd)("whatmorePrimaryFont"),l=(0,v.Xd)("whatmoreShopId"),a=null!==(i=t.fontSize)&&void 0!==i?i:"8",[d]=(0,Ie.A)(),s=`https://www.whatmore.ai/shoppable-videos?utm_source=${o}&utm_medium=referral&utm_campaign=${"landscape"===d?"customer_referral_desktop":"customer_referral_mobile"}`,{whatmoreEventsBrowsingTemplate:h}=(0,n.useContext)(q.B);return(0,f.jsx)(_t.N,{href:s,isExternal:!0,children:(0,p.SGs)(l)&&(0,f.jsxs)(u.B,{direction:"row",justifyContent:"flex-start",alignItems:"center",width:"fit-content",spacing:"2px",paddingLeft:"2px",paddingRight:"2px",children:[(0,f.jsx)("img",{src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",width:1.7*a,backgroundColor:"transparent",borderRadius:"0px"}}),(0,f.jsx)(c.az,{width:"5px"}),(0,f.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-family",r,"important"),t.style.setProperty("font-size",1.1*a+"px","important"),t.style.setProperty("text-align","center","important"),t.style.setProperty("color","white"))},children:(0,St.Yt)(h)?"Powered by Whatmore":"Whatmore"})]})})},Ne=i(9879),Fe=i(9556),Ae=i(2209);var Pe=()=>(0,f.jsxs)(c.az,{as:"svg",width:"46px",height:"46px",viewBox:"0 0 24 24",fill:"none",className:"tick-animation",marginBottom:"20px",children:[(0,f.jsx)("circle",{cx:"12",cy:"12",r:"11",stroke:"gray",strokeWidth:"2",fill:"none"}),(0,f.jsx)("path",{d:"M7 12l3 3 7-7",stroke:"gray",strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]});var Le=t=>{var e;const i={text:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.title,options:(null===t||void 0===t?void 0:t.options)||[]},[o,r]=(0,n.useState)(!1),[l,a]=(0,n.useState)(null),[d,s]=(0,n.useState)(null),h=(0,n.useRef)(null),p=(0,n.useContext)(q.B);return(0,n.useEffect)((()=>{if(o){const e=setTimeout((()=>{t.setIsQuestionVisible(!1)}),1e3);return()=>clearTimeout(e)}}),[o]),(0,n.useEffect)((()=>{!o&&h.current&&s(h.current.offsetHeight)}),[o]),(0,f.jsxs)(c.az,{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",minWidth:"320px",width:"fit-content",bg:"white",borderRadius:"lg",boxShadow:"md",display:"flex",flexDirection:"column",maxWidth:"90%",maxHeight:"90%",overflowY:"visible",ref:h,height:d?`${d}px`:"auto",children:[(0,f.jsx)(c.az,{position:"absolute",top:"-10px",right:"-10px",bg:"rgba(255, 255, 255, 0.8)",borderRadius:"full",padding:1,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:"10",onClick:()=>{var e;t.setIsQuestionVisible(!1),(0,X.kz)({userInteractionType:Y.O.QUESTION_CLOSED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id},widgetSourceDetails:p})},children:(0,f.jsx)(Ae.A,{})}),(0,f.jsx)(c.az,{bg:"gray.700",borderTopRadius:"lg",py:3,px:6,display:"flex",flexDirection:"column",justifyContent:"center",width:"100%",children:(0,f.jsx)(Fe.D,{py:6,as:"h2",textAlign:"center",style:{fontWeight:"bold",fontSize:"18px",color:"white"},children:null===i||void 0===i?void 0:i.text})}),(0,f.jsx)(c.az,{flex:"1",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",py:5,px:6,width:"100%",children:o?(0,f.jsxs)(c.az,{flex:"1",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",children:[(0,f.jsx)(Pe,{}),(0,f.jsx)(Fe.D,{as:"h3",size:"md",color:"gray.700",fontWeight:"medium",textAlign:"center",mt:4,fontSize:"lg",children:"Thank you for your response!"})]}):(0,f.jsx)(u.B,{spacing:5,width:"100%",align:"center",children:i.options.map(((e,i)=>(0,f.jsx)(c.az,{px:4,borderWidth:2,borderRadius:"md",cursor:"pointer",bg:l===e?"gray.200":"white",borderColor:l===e?"gray.400":"gray.200",_hover:{bg:"gray.200"},onClick:()=>(e=>{var i;a(e),r(!0),(0,X.kz)({userInteractionType:Y.O.QUESTION_ANSWERED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(i=t.question)||void 0===i?void 0:i.id,response:e},widgetSourceDetails:p})})(e),transition:"background-color 0.2s, border-color 0.2s",display:"flex",alignItems:"center",width:"100%",children:(0,f.jsx)(j.E,{py:5,color:"gray.800",children:e})},i)))})})]})},Be=i(9935);var Oe=t=>{var e,i;const[o,r]=(0,n.useState)(""),[l,a]=(0,n.useState)(""),[d,s]=(0,n.useState)(!1),[u,h]=(0,n.useState)(!1),x=(0,v.Xd)("whatmoreShopId"),m=(0,v.Xd)("whatmoreSecondaryColor"),g=(0,v.Xd)("whatmorePrimaryFont"),w=null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.title,y=(0,n.useContext)(q.B),b=()=>{var e,i;(()=>{const{type:e}=(null===t||void 0===t?void 0:t.question)||{};return"number"===e?/^\d{10}$/.test(o):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o)})()?(s(!0),(0,X.kz)({userInteractionType:Y.O.QUESTION_ANSWERED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id,response:o,type:"number"===(null===t||void 0===t||null===(i=t.question)||void 0===i?void 0:i.type)?"leadgen:number":"leadgen:email"},widgetSourceDetails:y})):a("Please enter valid contact info.")},C=()=>{var e;t.setIsQuestionVisible(!1),(0,X.kz)({userInteractionType:Y.O.QUESTION_CLOSED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id},widgetSourceDetails:y})};return(0,f.jsx)(jt.s,{bg:m,p:"6%",borderRadius:"md",boxShadow:"md",width:"90vw",mx:"auto",minH:"40vh",maxH:"80vh",position:"fixed",top:"30%",left:"50%",transform:"translateX(-50%)",direction:"column",align:"center",justify:"center",zIndex:100,overflow:"hidden",children:d?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(c.az,{textAlign:"center",color:"white",children:[(0,f.jsx)(c.az,{fontSize:"2xl",fontWeight:"bold",children:"CONGRATULATIONS!"}),(0,f.jsx)(c.az,{my:"4%",fontSize:"xl",children:"Claim Now"})]}),(0,f.jsx)(c.az,{position:"absolute",top:"2%",right:"2%",zIndex:20,children:(0,f.jsx)(B.A,{onCloseCallback:C})}),(0,f.jsxs)(c.az,{position:"relative",width:"70%",onClick:()=>{const t=(0,p.TH)(x);navigator.clipboard.writeText(t).then((()=>{h(!0),setTimeout((()=>{C()}),1e3),setTimeout((()=>h(!1)),2e3)}),(()=>{console.error("Failed to copy the coupon code")}))},cursor:"pointer",children:[(0,f.jsxs)(c.az,{bg:"white",border:"2px dashed black",borderRadius:"md",p:"2%",display:"flex",alignItems:"center",justifyContent:"space-between",mt:"4%",children:[(0,f.jsx)(c.az,{as:"span",fontWeight:"bold",color:"black",children:(0,p.TH)(x)}),(0,f.jsx)(Be.A,{sx:{color:u?{whatmoreSecondaryColor:m}:"gray",cursor:"pointer",marginLeft:"2%"}})]}),u&&(0,f.jsx)(c.az,{padding:"4%",position:"absolute",left:"50%",transform:"translateX(-50%)",bg:m,color:"white",fontSize:"12px",borderRadius:"md",px:"2%",py:"0.5%",textAlign:"center",children:"Copied!"})]})]}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(c.az,{textAlign:"center",color:"white",children:[(0,f.jsx)(c.az,{children:(0,f.jsx)(j.E,{fontFamily:g,fontSize:"22px",fontWeight:"bold",children:w})}),(0,f.jsx)(c.az,{marginBottom:"10%",fontSize:"md",children:(0,p.aRV)(x)})]}),(0,f.jsx)(c.az,{position:"fixed",top:"2%",right:"2%",zIndex:20,children:(0,f.jsx)(B.A,{onCloseCallback:C})}),(0,f.jsxs)(jt.s,{mt:"4%",align:"center",direction:"column",width:"80%",children:[(0,f.jsx)(c.az,{sx:{bg:"white",border:"2px solid #4A4A4A",borderRadius:"8px",paddingLeft:"4%",display:"flex",alignItems:"center",marginBottom:"6%",width:"100%",height:"auto",minH:"48px"},children:(0,f.jsx)("input",{fontFamily:g,type:"number"===(null===(i=t.question)||void 0===i?void 0:i.type)?"tel":"email",placeholder:t.placeholder,value:o,onChange:t=>{r(t.target.value),l&&a("")},onKeyDown:t=>{"Enter"===t.key&&b()},style:{fontSize:"1em",border:"none",outline:"none",width:"100%"}})}),l&&(0,f.jsx)(j.E,{color:"red.500",mb:"4% !important",fontSize:"md",textAlign:"center",width:"100%",children:l}),(0,f.jsx)(c.az,{as:"button",bg:"#D3D3D3",color:"#343434",borderRadius:"md",fontWeight:"bold",height:"35px",display:"flex",alignItems:"center",justifyContent:"center",onClick:b,width:"50%",children:(0,f.jsx)(j.E,{fontFamily:g,fontSize:"0.8em",padding:"2%",color:m,children:"SUBMIT"})})]})]})})};var De=t=>{const[e,i]=(0,n.useState)(null);return(0,f.jsx)(c.az,{children:!e&&(0,f.jsx)(Oe,{question:t.question,onEmailSubmit:t=>{i(t)},setIsQuestionVisible:t.setIsQuestionVisible,placeholder:t.placeholder})})};var Re=t=>{var e;const[i,o]=(0,n.useState)(null),r=t.questionIndex,l=t.questionList;if((0,n.useEffect)((()=>{if(!(r>=l.length))return()=>(0,ct.Hm)()}),[]),r>=l.length)return;const a=null===l||void 0===l?void 0:l[r];return"string"===(null===a||void 0===a?void 0:a.type)||"number"===(null===a||void 0===a?void 0:a.type)?(0,f.jsx)(c.az,{children:(0,f.jsx)(De,{setIsQuestionVisible:t.setIsQuestionVisible,question:a,placeholder:"number"===(null===a||void 0===a?void 0:a.type)?"Enter your phone number":"Enter your email"})}):(0,f.jsx)(c.az,{children:(0,f.jsx)(Le,{question:a,options:null===a||void 0===a||null===(e=a.answers)||void 0===e?void 0:e.values.map((t=>null===t||void 0===t?void 0:t.value)),onAnswerSelect:t=>{o(t)},selectedAnswer:i,onClose:()=>{t.setIsQuestionVisible(!1)},setIsQuestionVisible:t.setIsQuestionVisible})})},We=i(6118);function Qe(t){var e;const i=t.event,[o,r,l,a]=(0,x.A)(),[d]=(0,v.QN)("whatmorePrimaryFont"),{whatmoreIsStoriesTemplate:h}=(0,n.useContext)(q.B),[m]=(0,v.QN)("whatmoreSecondaryColor"),[g]=(0,v.QN)("whatmoreShopId"),w=(0,p.ivI)(g),y=null!==(e=(0,p.qAx)(g))&&void 0!==e?e:[m,w,m,w,m],b=(0,n.useRef)(null);(0,n.useEffect)((()=>{b.current&&b.current.play()}),[]);const C=(0,ge.s)(null===i||void 0===i?void 0:i.storyset_thumbnail_image);return(0,f.jsx)(f.Fragment,{children:h?(0,f.jsx)(c.az,{width:"100%",height:"fit-content",padding:"5px",children:(0,f.jsxs)(u.B,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-start",children:[(0,f.jsx)(s.o,{children:(0,f.jsx)(c.jl,{overflow:"hidden",size:.14*t.width+"px",sx:{boxShadow:"0px 2px 1px 0px "+y[0]+"50, 0px -2px 1px 0px "+y[1]+"50, 2px 0px 1px 0px "+y[2]+"50, -2px 0px 1px 0px "+y[3]+"80, 2px -2px 1px 0px "+y[4]+"80, -2px 2px 1px 0px "+y[0]+"DA, 2px 2px 1px 0px "+y[1]+"DA, -2px -2px 1px 0px "+y[2]+"DA"},children:"video"==(0,yt.B)(C)?(0,f.jsx)(Ne.A,{height:"100%",width:"100%",poster:null===i||void 0===i?void 0:i.thumbnail_image,url:C,isPlaying:!0,event:{event_type:"video"},borderRadius:"50%"}):(0,f.jsx)("img",{src:C,style:{objectFit:"cover",height:"100%",width:"100%",backgroundColor:"white"}})})}),(0,f.jsx)(s.o,{children:(0,f.jsx)(j.E,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:.05*t.width+"px",fontWeight:"medium",lineHeight:"100%",sx:{fontFamily:d+" !important",color:"white !important",textShadow:"0px 0px 4px black !important;"},children:i.storyset_name})})]})}):(0,f.jsx)(f.Fragment,{})})}var Ve=function(t){var e,i,o;const[r,a,d]=(0,Ie.A)(),[s]=(0,v.QN)("isInDesignMode"),[h]=(0,v.QN)("isDemoBrand"),[m,g]=(0,v.QN)("isProductSwiperCatalogOpen"),[w,y]=(0,v.QN)("isFirstIndicatorRenderDone"),[b]=(0,v.QN)("whatmoreShopId"),C=(0,n.useContext)(Ei),{whatmoreEventsBrowsingTemplate:S}=(0,n.useContext)(q.B),[I,_,z,E]=(0,x.A)(),T=(0,v.Xd)("whatmorePrimaryFont"),N=t.event,F=t.storySetId,A=t.isLast,L=t.onCloseCallback,O=t.focusRef,D=t.productClickHandler,R=t.videoPlayingData,W=t.totalSiblingEvents,V=t.indexAmongSiblings,M=t.leftOpenSpaceClickHandler,H=t.midOpenSpaceClickHandler,U=t.rightOpenSpaceClickHandler,{whatmoreWidgetSourceDetails:$}=(0,n.useContext)(q.B),K=.1*E,[G,Z]=(0,n.useState)(!1),[J,tt]=(0,n.useState)([]),et=t=>{it.current&&!it.current.contains(t.target)&&Z(!1)},it=(0,n.useRef)(null);return(0,n.useEffect)((()=>(G?document.addEventListener("click",et):document.removeEventListener("click",et),()=>{document.removeEventListener("click",et)})),[G]),(0,p.yt9)(b),(0,f.jsxs)(c.az,{width:"full",height:"full",borderRadius:"md",children:[t.isQuestionVisible&&(0,f.jsx)(Mt.S,{userInteractionType:Y.O.QUESTION_VIEWED,userInteractionMetadata:{questionId:null===(e=t.questionList)||void 0===e||null===(i=e[t.qIndex])||void 0===i?void 0:i.id},triggerFlag:!s&&!h,children:(0,f.jsx)(Re,{questionList:t.questionList,questionIndex:t.qIndex,setIsQuestionVisible:t.setIsQuestionVisible})}),G&&(0,f.jsx)("div",{ref:it,className:"whatmore-share-modal",style:{zIndex:100,position:"absolute",boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.6)",width:"75%",top:"45%",left:"50%",transform:"translateX(-50%) translateY(-50%)"},children:(0,f.jsx)(Ee,{shareText:J,setShareText:tt,iconSize:K,isModalOpen:G,setIsModalOpen:Z})}),"55194878152"==b&&(0,f.jsx)("div",{style:{position:"absolute",boxShadow:"dark-lg",transform:"scale(1.2) translateY(10%) translateX(5%)"},children:(0,f.jsx)("img",{src:"https://s3.ap-south-1.amazonaws.com/whatmorelive.brand.other.assets/nureh/Shop_by_Sale_50_-removebg-preview.png"})}),(!t.isQuestionVisible||t.qIndex>=(null===t||void 0===t||null===(o=t.questionList)||void 0===o?void 0:o.length))&&(0,f.jsxs)(u.B,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,f.jsxs)(u.B,{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:[C.showVideoPlayingData?(0,f.jsx)(u.B,{direction:"row",width:"100%",height:"fit-content",marginTop:"5px",justifyContent:"center",children:(0,f.jsx)(me,{progress:xe(R.current_time,R.video_duration),totalSiblings:W,indexAmongSiblings:V})}):(0,f.jsx)(f.Fragment,{}),(0,f.jsx)(c.az,{width:"full",margin:"2px",marginTop:"5px",children:(0,f.jsxs)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",paddingRight:"10px",paddingLeft:"10px",children:[(0,f.jsx)(Qe,{event:N,width:E}),(0,f.jsxs)(u.B,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,St.Yt)(S)?(0,f.jsx)(ye,{whatmoreShareTemplateId:(0,St.Gy)(S),whatmoreShareStoryId:F,whatmoreShareEventId:N.event_id,event:N,showShareText:!1,iconSize:.098*E,setIsModalOpen:Z,setShareText:tt}):(0,f.jsx)(f.Fragment,{}),!(0,St.Yt)(S)&&(0,f.jsx)(u.B,{pt:"12px",pl:"10px",sx:{position:"absolute",top:"10px",left:"0px"},children:(0,f.jsx)(Te,{brandName:null===N||void 0===N?void 0:N.brand,fontSize:.033*E})}),(0,f.jsx)(k,{focusRef:O}),("landscape"!==r||t.showCloseOverlay)&&(0,f.jsx)(B.A,{event:N,onCloseCallback:L})]})]})})]}),"78232846646"===b&&"portrait"===r&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(c.az,{position:"absolute",top:.49*window.innerHeight+"px",left:.92*window.innerWidth+"px",transform:"translate(-50%, -50%)",zIndex:101,children:(0,f.jsx)(We.A,{style:{fontSize:1.3*K+"px",transform:"rotate(180deg)",color:"white",cursor:"pointer",filter:"drop-shadow(0 0 5px black)"},onClick:()=>{t.changeSlide(N,"right")}})}),(0,f.jsx)(c.az,{position:"absolute",top:.42*window.innerHeight+"px",left:.92*window.innerWidth+"px",transform:"translate(-50%, -50%)",zIndex:101,children:(0,f.jsx)(We.A,{style:{fontSize:1.3*K+"px",color:"white",cursor:"pointer",filter:"drop-shadow(0 0 5px black)"},onClick:()=>{t.changeSlide(N,"left")}})})]}),(0,f.jsxs)(u.B,{width:"100%",height:"100%",direction:"row",justifyContent:"center",children:[(0,f.jsx)(c.az,{width:"33%",height:"100%",onClick:()=>{M()},sx:{display:"block !important"}}),(0,f.jsx)(c.az,{width:"34%",height:"100%",onClick:()=>{H()},sx:{display:"block !important"}}),(0,f.jsx)(c.az,{width:"33%",height:"100%",onClick:()=>{U()},sx:{display:"block !important"}})]}),(0,f.jsxs)(c.az,{width:"full",height:"fit-content",children:[C.totalEvents>1&&!w&&C.showSwipeIndicator?(0,f.jsx)(c.az,{width:"full",margin:"2px",children:(0,f.jsx)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,f.jsx)(Q,{swipeUp:!A})})}):null,(0,f.jsxs)(c.az,{width:"fit-content",height:"fit-content",position:"absolute",right:0,bottom:"25%",children:[(0,p.oZc)(b)&&!(0,St.Yt)(S)?(0,f.jsx)(c.az,{ml:"auto",width:"fit-content",paddingY:"12px",paddingX:"8px",position:"relative",top:"-30px",children:(0,f.jsxs)(u.B,{gap:"4px",direction:"column",alignItems:"center",cursor:"pointer",onClick:function(){var t;s||h||(async()=>{(0,l.A9)(N,1)})(),(0,X.kz)({userInteractionType:Y.O.WHATSAPP_ICON_CLICKED,widgetSourceDetails:$,event:N,productList:null===N||void 0===N?void 0:N.products,ctaList:null===N||void 0===N?void 0:N.cta});const e=N.products.map((t=>`${t.product_link} \n`)),i=(0,p.dzp)(b),n=`Hey, I am interested in ${N.products.length>1?"these products":"this product"} I saw on ${null===(t=N.products[0])||void 0===t?void 0:t.brand} store: \n${e}. Could you please help me with some queries?`;window.open(i+`&text=${n}&type=phone_number`,"_blank")},children:[(0,f.jsx)(ke,{iconSize:.7*K,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,f.jsx)(j.E,{fontSize:K*(0,p.LOH)(b)+"px",fontWeight:"bold",align:"center",style:{marginTop:0},sx:{fontFamily:T+" !important",color:"white !important"},children:(0,p.wtw)(b)})]})}):(0,f.jsx)(f.Fragment,{}),(0,p.MdM)(b)?(0,f.jsx)(c.az,{width:"full",height:"fit-content",paddingX:"12px",position:"relative",top:"-30px",children:(0,f.jsx)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,f.jsx)(Se,{event:N})})}):(0,f.jsx)(f.Fragment,{}),(0,p.iQ5)(b)&&!(0,St.Yt)(S)?(0,f.jsx)(c.az,{width:"full",height:"fit-content",paddingX:"12px",position:"relative",top:"-30px",children:(0,f.jsx)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,f.jsx)(ye,{whatmoreShareTemplateId:(0,St.Gy)(S),whatmoreShareStoryId:F,whatmoreShareEventId:N.event_id,event:N,setIsModalOpen:Z,setShareText:tt})})}):(0,f.jsx)(f.Fragment,{})]}),(0,Vt.Z_)(N)?(0,f.jsxs)(c.az,{width:"full",children:[(0,p.ek9)(b)?(0,f.jsx)(c.az,{w:"100%",children:(0,f.jsx)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,f.jsx)(P,{event:N,onToggle:t=>{g("minimize-button"!==t)}})})}):(0,f.jsx)(f.Fragment,{}),(0,f.jsx)(c.az,{display:"flex",width:"100%",height:"fit-content",children:(0,f.jsx)(Ut,{event:N,productClickHandler:D})})]}):(0,f.jsx)(f.Fragment,{})]})]})]})},Me=i(5491),He=i.n(Me),Ue=i(6493);var Xe=function(t){var e,i,o,r,l,a,[d,w,j,y]=(0,x.A)();const[b,C]=(0,n.useState)(!1),[S,k]=(0,n.useState)(),[I,_]=(0,n.useState)(),[z,E]=(0,n.useState)({current_time:0,video_duration:0,is_video_ended:!1}),T=(0,v.Xd)("whatmoreShopId"),N=t.event,F=t.storyId,A=t.onBack,P=n.useRef(),L=t.changeSlide,B=t.isPlaying,O=t.isLast,D=t.setLockSwiper,R=t.onVideoEndedCallback,W=t.progressUpdateCallback,Q=null!==(e=t.totalSiblingEvents)&&void 0!==e?e:0,V=null!==(i=t.indexAmongSiblings)&&void 0!==i?i:0,M=null===(o=t.showOverlay)||void 0===o||o,H=null!==(r=t.leftOpenSpaceClickHandler)&&void 0!==r?r:()=>{},U=null!==(l=t.midOpenSpaceClickHandler)&&void 0!==l?l:()=>{},$=null!==(a=t.rightOpenSpaceClickHandler)&&void 0!==a?a:()=>{},{whatmoreWidgetSourceDetails:K}=(0,n.useContext)(q.B),{questionList:G}=(0,n.useContext)(Ei),Z=(null===G||void 0===G?void 0:G.length)>0?parseInt(localStorage.getItem("_whatmore_qview_index")):1e4,[J,tt]=(0,n.useState)();(0,n.useEffect)((()=>{tt(t.showQuestion)}),[t.showQuestion]);const et="center";let it;try{it=He()((()=>{R()}),1e3,{leading:!0,trailing:!1})}catch(nt){console.log(nt)}return(0,f.jsx)(s.o,{children:(0,f.jsxs)(c.az,{width:y,height:j,sx:{overflow:"hidden"},children:[(0,f.jsx)(u.B,{direction:"column",justifyContent:et,height:"full",width:"full",children:(0,f.jsx)(c.az,{borderRadius:"md",backgroundColor:"white",children:(0,f.jsx)(h.g,{width:"full",ratio:y/j,children:(0,f.jsx)(g.A,{height:"100%",width:"100%",url:(0,ge.s)((0,Ue.lP)(N)),isPlaying:B&&(!J||Z>=G.length),timeUpdateCallback:function(t,e){const i=xe(t,e);W({watch_time:t,video_duration:e});const n=z.is_video_ended;i>=99&&B&&!n?(it(),E({current_time:t,video_duration:e,is_video_ended:!0})):E({current_time:t,video_duration:e,is_video_ended:n})},event:N,question:J&&Z<(null===G||void 0===G?void 0:G.length),source:t.source})})})}),M?(0,f.jsx)(u.B,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:et,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,f.jsx)(c.az,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,f.jsx)(Ve,{focusRef:P,event:t.event,isLast:O,onCloseCallback:t=>{A(t),(0,X.DG)({userInteractionType:Y.O.VIDEO_PLAYBACK,userInteractionMetadata:{watch_time:z.current_time,video_duration:z.video_duration},widgetSourceDetails:K,event:N,productList:N.products,ctaList:N.cta})},productClickHandler:async t=>{const e=await(0,m.M)(t,(0,p.NCy)(T),T);_(t),k(e),C(!0),D(!0),(0,X.kz)({userInteractionType:Y.O.SHOPNOW_CLICKED,widgetSourceDetails:K,event:N,productList:N.products,ctaList:N.cta}),(0,v.t2)("whatmoreAllowAutoSlide",!1)},videoPlayingData:z,totalSiblingEvents:Q,indexAmongSiblings:V,questionList:G,isQuestionVisible:J&&Z<(null===G||void 0===G?void 0:G.length),qIndex:Z,setIsQuestionVisible:tt,leftOpenSpaceClickHandler:H,midOpenSpaceClickHandler:U,rightOpenSpaceClickHandler:$,storySetId:F,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:L})})}):(0,f.jsx)(f.Fragment,{}),!0===b?(0,f.jsx)(u.B,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:et,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,f.jsx)(c.az,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,f.jsx)(pe,{focusRef:P,event:t.event,isLast:O,onCloseCallback:()=>A(),setLockSwiper:D,data:S,currentProduct:I,setOpenShopNow:t=>{C(t),(0,v.t2)("whatmoreAllowAutoSlide",!t)}})})}):(0,f.jsx)("div",{})]})})},Ye=i(2039),qe=i(6613),$e=i(1085),Ke=i(5727);var Ge=function(t){var[e,i,n,o]=(0,x.A)();const r=(0,v.Xd)("whatmoreShopId"),l=t.event,a=t.isPlaying,d="center";return(0,f.jsx)(s.o,{children:(0,f.jsxs)(c.az,{width:o,height:n,sx:{overflow:"hidden"},children:[(0,f.jsx)(u.B,{direction:"column",justifyContent:d,height:"full",width:"full",children:(0,f.jsx)(c.az,{borderRadius:"md",backgroundColor:"white",children:(0,f.jsx)(h.g,{width:"full",ratio:o/n,children:(0,f.jsx)(g.A,{height:"100%",width:"100%",url:(0,ge.s)((0,Ue.lP)(l)),isPlaying:a,timeUpdateCallback:function(t,e){},event:l,source:t.source})})})}),(0,f.jsx)(u.B,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:d,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,f.jsx)(c.az,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",backdropFilter:"auto",backdropBlur:"10px",onClick:t=>{(0,$e.bo)()},children:(0,f.jsxs)(u.B,{direction:"column",justifyContent:"center",alignItems:"center",height:"full",width:"full",children:[(0,f.jsx)(Ke.A,{sx:{boxShadow:3,color:(0,p.KFN)(r),fontSize:.4*o,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{(0,$e.bo)()}}),(0,f.jsx)(j.E,{color:"white",fontSize:.05*o+"px",fontWeight:"bold",align:"left",children:"Please click to play video.."})]})})})]})})},Ze=i(3294),Je=i(9821);const ti=n.lazy((()=>i.e(931).then(i.bind(i,5015))));var ei=function(t){var e,i;const n=t.changeSlide,o=t.event,r=null===(e=t.isPlaying)||void 0===e||e,l=t.onBack,s=t.isLast,c=t.setLockSwiper,u=(t.heightFactor,t.widthFactor,t.onVideoEndedCallback),h=t.progressUpdateCallback,[p,x]=(0,S.A)(),[m]=(0,v.QN)("whatmoreVideoPlayerPoolBlessed"),g=null===(i=t.showOverlay)||void 0===i||i;function w(){x(!p)}if((0,qe.MN)()&&0==m&&"recommended_images"!=(null===o||void 0===o?void 0:o.event_type))return(0,Je._)()?(0,f.jsx)(Ge,{event:o,onBack:l,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:u,progressUpdateCallback:h,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:g,source:Ze.N.CAROUSEL_EVENT_OPENED},"shopping-video-view"+o.event_id):(0,f.jsx)(Xe,{event:o,onBack:l,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:u,progressUpdateCallback:h,showQuestion:t.showQuestion,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:g,source:Ze.N.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:n},"shopping-video-view"+o.event_id);if((0,Ye.ij)(o)||(0,Ye.Il)(o))return(0,f.jsx)(Xe,{event:o,onBack:l,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:u,progressUpdateCallback:h,showQuestion:t.showQuestion,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:g,source:Ze.N.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:n},"shopping-video-view"+o.event_id);if("recommended_images"==(null===o||void 0===o?void 0:o.event_type))return(0,f.jsx)(ti,{onBack:l,mode:t.mode,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,imageUrls:null===o||void 0===o?void 0:o.product_list});if((0,Ye.Th)(o)){var{status:j,bannerText:y,timeToStartInMins:b}=d.A.getEventStatus(o);if(j.name===a.A.LIVE.name)return(0,f.jsx)(ve,{event:o,onBack:l,isPlaying:r,isLast:s,showOverlay:g},"shopping-live-view"+o.event_id)}return console.error("Can't render event which is neither video or a currently-live-event"),(0,f.jsx)("div",{})},ii=i(4806),ni=i.n(ii),oi=i(2804),ri=i(6834);function li(t){var e;const[i,o]=(0,n.useState)(!1),r=t.onClick,l=null!==(e=t.fontSize)&&void 0!==e?e:50;return(0,f.jsx)("div",{style:{height:"fit-content",width:"fit-content",backgroundColor:"black",opacity:.4,borderRadius:"50%"},className:[i?"whatmore-scale-on-tap":""].join(" "),children:"left"===t.type?(0,f.jsx)(ri.A,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{o(!0),setTimeout((()=>{o(!1)}),500),r(t,"up")}}):(0,f.jsx)(oi.A,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{o(!0),setTimeout((()=>{o(!1)}),500),r(t,"down")}})})}var ai=function(t){var e,i,n;const o=null!==(e=t.relativeBottomPercentage)&&void 0!==e?e:"30%",r=null!==(i=t.width)&&void 0!==i?i:"100%",l=null!==(n=t.fontSize)&&void 0!==n?n:50,a=t.handleClick;return(0,f.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,f.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,f.jsx)(li,{type:"left",onClick:a,fontSize:l}),(0,f.jsx)(li,{type:"right",onClick:a,fontSize:l})]})})},di=i(964),si=i(3330);var ci=function(t,e){function i(t,e){return 1==e?0:t<0?e+t:t>=e?t-e:t}const o=(0,n.useRef)({prevIndex:i(t-1,e),activeIndex:t,nextIndex:i(t+1,e)});return[function(){return o.current},function(t){o.current="right"==t?{prevIndex:i(o.current.activeIndex,e),activeIndex:i(o.current.activeIndex+1,e),nextIndex:i(o.current.activeIndex+2,e)}:{prevIndex:i(o.current.activeIndex-2,e),activeIndex:i(o.current.activeIndex-1,e),nextIndex:i(o.current.activeIndex,e)}},function(t){return i(o.current.activeIndex+t)}]};var ui=function(t,e){const i=(0,n.useRef)({clientX:0,clientY:0});return[function(t){i.current.clientX=t.changedTouches[0].clientX,i.current.clientY=t.changedTouches[0].clientY},function(n){const o=i.current.clientX,r=i.current.clientY;var l=o-n.changedTouches[0].clientX,a=r-n.changedTouches[0].clientY;return"vertical"==t&&Math.abs(a)>e||"horizontal"==t&&Math.abs(l)>e?"vertical"==t?a>0?"right":"left":l>0?"right":"left":null}]};var hi=function(t,e){const i=(0,n.useRef)(He()(((t,e)=>{t(e)}),300,{leading:!0,trailing:!1}));return[function(n,o){var r=0;if(r="vertical"==t?n.deltaY:n.deltaX,Math.abs(r)<=e)return;const l=r>0?"right":"left";i.current(o,l)}]},pi=i(6325);var vi=function(t){const e=t.events,i=t.eventIndex,a=t.onBack;var[d,s,c,h]=(0,x.A)();const[m]=(0,v.QN)("isInDesignMode"),[g]=(0,v.QN)("isDemoBrand"),[w,j]=(0,n.useState)(!0),[y,b]=(0,v.QN)("isFirstIndicatorRenderDone"),[C,S]=(0,n.useState)(!1),[k,I]=(0,n.useState)({}),{setCloseClickComponent:_}=(0,n.useContext)(Ei),{slideDirection:z}=(0,n.useContext)(Ei),[E]=(0,v.QN)("whatmoreShopId"),[T]=(0,v.QN)("whatmoreLandingLocationType"),[N,F]=ci(i,e.length),[A,P]=ui(z,50),[L]=hi("vertical",30),[B,O]=(0,n.useState)(!1),[D,R]=(0,n.useState)(null),{whatmoreWidgetSourceDetails:W,whatmoreUserInfo:Q}=(0,n.useContext)(q.B);function V(){O(!1)}function M(t){V(),setTimeout((()=>{a(t)}),500)}(0,n.useEffect)((()=>(O(!0),()=>{})),[]);const U=W.landingLocationType,$=W.templateType;_(M);let K=i;const{questionList:G}=(0,n.useContext)(Ei);function Z(){(0,v.Xd)("whatmoreAllowAutoSlide")&&(F("right"),D.slideNext())}function J(t,e){F(e),function(t,e){D&&("left"===e?D.slidePrev():D.slideNext())}(0,e)}const tt=Math.round(.05*c);return(0,f.jsx)(ni(),{isOpen:B,onAfterOpen:function(){},onRequestClose:V,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,f.jsx)(pi.A,{children:(0,f.jsxs)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:(0,H.YU)("#000000",13)},onTouchStart:t=>{A(t)},onTouchEnd:t=>{if(C)return;const e=P(t);e&&J(0,e)},onWheel:t=>{C||L(t,(t=>{J(0,t)}))},children:[(0,f.jsx)(o.RC,{speed:400,threshold:tt,slidesPerView:1,direction:z,modules:[r.dK,r.FJ],initialSlide:i,loop:1!=e.length,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,allowSlideNext:!C,allowSlidePrev:!C,allowTouchMove:!1,onSwiper:t=>{R(t),(0,X.kz)({userInteractionType:Y.O.EVENT_VIEW,widgetSourceDetails:W,event:e[N().activeIndex],productList:e[N().activeIndex].products})},onSlideChange:t=>{var i;w?j(!1):(y||b(!0),(0,X.DG)({userInteractionType:Y.O.VIDEO_PLAYBACK,userInteractionMetadata:k,widgetSourceDetails:W,event:e[N().activeIndex],productList:e[N().activeIndex].products}),i=e[N().activeIndex],m||g||null===i||void 0===i||!i.event_id||(async()=>{const t=(0,St.Wd)(U)+(0,St.gf)($)+(null!==i&&void 0!==i&&i.isRelatedEvent?"R":"E")+"_"+(null===i||void 0===i?void 0:i.event_id);(0,l.lB)(i),"index"===T?((0,si.Si)(E,di.TB,di.Dk),(0,ct.Ch)(i.event_id,i.products,di.TB,di.Dk,t,null===i||void 0===i?void 0:i.location,null===Q||void 0===Q?void 0:Q.userType)):T.startsWith("product")||"embed"===T?((0,si.Si)(E,di.DK,di.K1),(0,ct.Ch)(i.event_id,i.products,di.DK,di.K1,t)):T.startsWith("collection")?((0,si.Si)(E,di.Sx,di.rz),(0,ct.Ch)(i.event_id,i.products,di.Sx,di.rz,t)):((0,si.Si)(E,di.TB,di.Dk),(0,ct.Ch)(i.event_id,i.products,di.TB,di.Dk,t))})(),(0,X.UM)({userInteractionType:Y.O.EVENT_VIEW,widgetSourceDetails:W,event:e[N().activeIndex],productList:e[N().activeIndex].products}))},children:[...Array(Math.min(e.length,3)).keys()].map((n=>(0,f.jsx)(o.qr,{children:n=>{let{isActive:o,isPrev:r,isNext:l,isVisible:a,isDuplicate:d}=n;const s=o?"activeIndex":r?"prevIndex":"nextIndex",c=N()[s];"activeIndex"==s&&(K=Math.max(K,c),0==c&&(K=0));const h=(null===G||void 0===G?void 0:G.length)>0&&o&&a&&(c>i||K<i&&c>0)&&c>=K&&c%(0,p.uSp)(E)==i%(0,p.uSp)(E);return(0,f.jsx)(u.B,{direction:"column",height:window.innerHeight,justifyContent:"center",children:(0,f.jsx)(ei,{event:e[c],showQuestion:h,onBack:M,isPlaying:1==e.length||o&&a,isLast:!1,setLockSwiper:S,onVideoEndedCallback:Z,progressUpdateCallback:t=>{I(t)},showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,mode:"portrait",changeSlide:J})})}},"event-vertical-scroll-slide-"+n)))}),e.length>1&&!C&&(0,p.kb)(E)&&"horizontal"===(0,p.br0)(E)&&"horizontal"===z?(0,f.jsx)(ai,{relativeBottomPercentage:"50%",width:h,handleClick:(t,e)=>{J(0,"down"==e?"right":"left")},fontSize:parseInt(.12*h)}):(0,f.jsx)(f.Fragment,{})]})})})},xi=i(7119);i(3997),i(9130),i(4669),i(9733),i(4365),i(7229),i(6042);const mi=t=>{let{children:e,customClass:i,show:n,closeCallback:o}=t;return xi.createPortal((0,f.jsxs)("div",{className:`whatmore-landscape-modal whatmore-root ${i}`,style:{display:n?"block":"none"},children:[(0,f.jsx)("div",{className:"whatmore-landscape-modal-overlay",onClick:o}),(0,f.jsx)("div",{className:"whatmore-landscape-modal-content",children:e})]}),document.body)};mi.defaultProps={children:(0,f.jsx)("div",{children:"Empty Modal"}),customClass:"",show:!1,closeCallback:()=>!1};var gi=mi;var fi=function(t){var e,[i,a,d,h]=(0,x.A)();const[m]=(0,v.QN)("isInDesignMode"),[g]=(0,v.QN)("isDemoBrand"),[w,j]=(0,v.QN)("isFirstIndicatorRenderDone"),[y,b]=(0,n.useState)(0!=t.eventIndex),{setCloseClickComponent:C}=(0,n.useContext)(Ei),[S,k]=(0,n.useState)(!1),[I]=(0,v.QN)("whatmoreShopId"),[_]=(0,v.QN)("whatmoreLandingLocationType"),z=(0,v.Xd)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:E,whatmoreUserInfo:T}=(0,n.useContext)(q.B),[N,F]=(0,n.useState)(!1),[A,P]=(0,n.useState)(null);function L(){F(!1)}const O=t.events,D=t.eventIndex,R=t.onBack,W=O.concat(O),Q=O.length,V=(null===O||void 0===O||null===(e=O[0])||void 0===e||e.brand,(0,n.useRef)(0));function M(t){L(),setTimeout((()=>{R(t)}),500)}function U(){A&&!A.isEnd&&(0,v.Xd)("whatmoreAllowAutoSlide")&&A.slideNext()}(0,n.useEffect)((()=>(F(!0),()=>{})),[]),C(M);const $=E.landingLocationType,K=E.templateType,[G,Z]=(0,n.useState)({}),J=parseInt(Math.min(5,O.length));return(0,f.jsx)(gi,{show:N,closeCallback:L,customClass:"whatmore-landscape-modal-swipe-view",children:(0,f.jsx)(u.B,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",alignItems:"center",backgroundColor:(0,H.YU)("#000000",13),children:(0,f.jsx)(s.o,{children:(0,f.jsx)(c.az,{height:"fit-content",width:h*J,children:(0,f.jsxs)(o.RC,{onInit:t=>{P(t),(0,X.kz)({userInteractionType:Y.O.EVENT_VIEW,widgetSourceDetails:E,event:O[t.activeIndex],productList:O[t.activeIndex].products,ctaList:O[t.activeIndex].cta})},slidesPerView:J,centeredSlides:!0,allowTouchMove:!1,initialSlide:D,modules:[r.t9,r.Vx,r.FJ,r.Ij,r.dK],navigation:J>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*d),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:h*J,watchSlidesProgress:!0,onSlideChange:t=>{var e;y?b(!1):(w||j(!0),e=O[t.activeIndex],m||g||null===e||void 0===e||!e.event_id||(async()=>{const t=(0,St.Wd)($)+(0,St.gf)(K)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,l.lB)(e),"index"===_?((0,si.Si)(I,di.TB,di.Dk),(0,ct.Ch)(e.event_id,e.products,di.TB,di.Dk,t,null===e||void 0===e?void 0:e.location,null===T||void 0===T?void 0:T.userType)):_.startsWith("product")||"embed"===_?((0,si.Si)(I,di.DK,di.K1),(0,ct.Ch)(e.event_id,e.products,di.DK,di.K1,t)):_.startsWith("collection")?((0,si.Si)(I,di.Sx,di.rz),(0,ct.Ch)(e.event_id,e.products,di.Sx,di.rz,t)):((0,si.Si)(I,di.TB,di.Dk),(0,ct.Ch)(e.event_id,e.products,di.TB,di.Dk,t))})(),(0,X.DG)({userInteractionType:Y.O.VIDEO_PLAYBACK,userInteractionMetadata:G,widgetSourceDetails:E,event:O[t.activeIndex],productList:O[t.activeIndex].products,ctaList:O[t.activeIndex].cta}),(0,X.UM)({userInteractionType:Y.O.EVENT_VIEW,widgetSourceDetails:E,event:O[t.activeIndex],productList:O[t.activeIndex].products,ctaList:O[t.activeIndex].cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[O.length>2&&(0,f.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,f.jsx)(B.A,{onCloseCallback:R})}),W.slice(D,O.length+D).map(((t,e)=>(0,f.jsx)(o.qr,{children:t=>{let{isActive:i,isPrev:n,isNext:o,isVisible:r,isDuplicate:l}=t;if(i)return(0,f.jsx)(u.B,{direction:"column",height:d,width:1*h,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,f.jsx)(c.az,{overflow:"hidden",sx:{borderRadius:"round"==z?"10px":"0px",borderWidth:(0,p.YcK)(I),borderColor:(0,p.Fwt)(I)},children:(0,f.jsx)(ei,{event:O[e%Q],onBack:M,isPlaying:!0,isLast:e%Q===O.length-1,setLockSwiper:k,widthFactor:1,heightFactor:1,onVideoEndedCallback:U,progressUpdateCallback:t=>{Z(t)},showCloseOverlay:(null===O||void 0===O?void 0:O.length)<=2,mode:"landscape"})})});if(o)return(0,f.jsx)(u.B,{direction:"column",height:d,width:h,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{A.slideTo(e%Q,300)},children:(0,f.jsx)(c.az,{overflow:"hidden",sx:{borderRadius:"round"==z?"10px":"0px",borderWidth:(0,p.YcK)(I),borderColor:(0,p.Fwt)(I)},children:(0,f.jsx)(ei,{event:O[e%Q],onBack:M,isPlaying:!1,isLast:e%Q===O.length-1,setLockSwiper:k,widthFactor:1,heightFactor:1,onVideoEndedCallback:U,progressUpdateCallback:t=>{Z(t)},showOverlay:!1,mode:"landscape"})})});if(n&&1===V.current)return(0,f.jsx)(u.B,{direction:"column",height:d,width:h,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{A.slideTo(e%Q,300)},children:(0,f.jsx)(c.az,{overflow:"hidden",sx:{borderRadius:"round"==z?"10px":"0px",borderWidth:(0,p.YcK)(I),borderColor:(0,p.Fwt)(I)},children:(0,f.jsx)(ei,{event:O[e%Q],onBack:M,isPlaying:!1,isLast:e%Q===O.length-1,setLockSwiper:k,widthFactor:1,heightFactor:1,onVideoEndedCallback:U,progressUpdateCallback:t=>{Z(t)},showOverlay:!1,mode:"landscape"})})});try{D+e>=Q-1&&(V.current=1)}catch(a){console.log(a)}return(0,f.jsx)(f.Fragment,{})}},"event-horizontal-scroll-slide"+t.event_id)))]})})})})})},wi=i(340),ji=i(5089),yi=i(572),bi=i(8603);var Ci=function(t){const[e,i,n,o]=(0,x.A)(),[r]=(0,v.QN)("whatmorePrimaryColor"),[l]=(0,v.QN)("whatmoreSecondaryColor"),a="flex-end";return(0,f.jsx)(s.o,{children:(0,f.jsxs)(c.az,{width:o,height:n,backgroundColor:"whiteAlpha.200",backdropBlur:"10px",children:[(0,f.jsx)(u.B,{direction:"column",justifyContent:a,height:"full",width:"full",children:(0,f.jsx)(c.az,{borderRadius:"md",backgroundColor:"transparent",children:(0,f.jsx)(h.g,{width:"full",ratio:o/n,children:(0,f.jsx)(c.az,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+r+", gray, "+l+")"})})})}),(0,f.jsx)(u.B,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:a,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,f.jsx)(c.az,{padding:"2px",margin:"5px",borderRadius:"md",backgroundColor:"transparent",children:(0,f.jsx)(h.g,{width:"full",ratio:9/16,children:(0,f.jsx)(c.az,{width:"full",height:"full",borderRadius:"md",backdropFilter:"auto",backdropBlur:"5px"})})})})]})})};var Si=function(t){var e;const i=t.stories,r=t.onBack,a=t.onStoryCompleteCallback,d=t.isActive,s=null!==(e=t.initialEventIndex)&&void 0!==e?e:0,c=i.events;var[h,p,m,g]=(0,x.A)();const[w,j]=(0,S.A)(),[y]=(0,v.QN)("isInDesignMode"),[b]=(0,v.QN)("isDemoBrand"),[C]=(0,v.QN)("whatmoreShopId"),[k,I]=(0,n.useState)(!0),[_,z]=(0,v.QN)("isFirstIndicatorRenderDone"),[E,T]=(0,n.useState)(null),[N,F]=(0,n.useState)(!1),{whatmoreWidgetSourceDetails:A,whatmoreUserInfo:P}=(0,n.useContext)(q.B),[L,B]=ci(s,c.length);function O(t){r(t)}const D=A.landingLocationType,R=A.templateType;function W(){if(!(0,v.Xd)("whatmoreAllowAutoSlide"))return;L().activeIndex+1>=c.length?a("right"):(B("right"),E&&E.slideNext())}function Q(t){const e=L().activeIndex;"right"==t&&e+1>=c.length||"left"==t&&e-1<0?a(t):(B(t),E&&("left"==t?E.slidePrev():E.slideNext()))}const[V,M]=(0,n.useState)({});return c[L().activeIndex],(0,f.jsx)("div",{children:(0,f.jsx)(o.RC,{speed:1,slidesPerView:1,direction:"horizontal",initialSlide:0,loop:!0,height:m,width:g,watchSlidesProgress:!0,allowTouchMove:!1,onSwiper:t=>{T(t)},onSlideChange:t=>{k?I(!1):(_||z(!0),(0,X.DG)({userInteractionType:Y.O.VIDEO_PLAYBACK,userInteractionMetadata:V,widgetSourceDetails:A,event:c[L().activeIndex],productList:c[L().activeIndex].products,ctaList:c[L().activeIndex].cta}),function(t){const e=(0,St.Wd)(D)+(0,St.gf)(R)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);y||b||(async()=>{(0,l.lB)(t),(0,si.Si)(C,di.TB,di.OL),(0,ct.Ch)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===P||void 0===P?void 0:P.userType)})()}(c[L().activeIndex]),(0,X.kz)({userInteractionType:Y.O.EVENT_VIEW,widgetSourceDetails:A,event:c[L().activeIndex],productList:c[L().activeIndex].products,ctaList:c[L().activeIndex].cta}))},children:[...Array(Math.min(c.length,3)).keys()].map((e=>(0,f.jsx)(o.qr,{children:e=>{let{isActive:n,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=e;if(d){const e=n?"activeIndex":o?"prevIndex":"nextIndex",r=c[L()[e]];return(0,f.jsx)(u.B,{direction:"column",height:m,justifyContent:"center",children:(0,Ye.ij)(r)||(0,Ye.Il)(r)?(0,f.jsx)(Xe,{event:r,totalSiblingEvents:c.length,indexAmongSiblings:L()[e],onBack:O,isPlaying:d&&n&&l,isLast:!1,setLockSwiper:F,onVideoEndedCallback:W,progressUpdateCallback:t=>{M(t)},leftOpenSpaceClickHandler:()=>{Q("left")},midOpenSpaceClickHandler:()=>{j(!w)},rightOpenSpaceClickHandler:()=>{Q("right")},storyId:i.id,source:Ze.N.STORY_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+r.event_id):(0,f.jsx)(f.Fragment,{})})}return(0,f.jsx)(u.B,{direction:"column",height:h,justifyContent:"center",children:(0,f.jsx)(Ci,{})})}},"event-story-view-slide-"+e)))})})};var ki=function(t){const e=t.onBack,i=t.eventsStories,a=t.initialStoryIndex;var[d,s,c,h]=(0,x.A)();const[p]=(0,v.QN)("isInDesignMode"),[m]=(0,v.QN)("isDemoBrand"),[g,w]=(0,n.useState)(!0),[j,y]=(0,v.QN)("isFirstIndicatorRenderDone"),[b,C]=(0,n.useState)(!1),{setCloseClickComponent:S}=(0,n.useContext)(Ei),{slideDirection:k}=(0,n.useContext)(Ei),[I]=(0,v.QN)("whatmoreShopId"),[_,z]=ci(a,i.length),[E,T]=ui("horizontal",50),[N]=hi("vertical",30),F=t.eventIndex,[A,P]=(0,n.useState)(!1),[L,B]=(0,n.useState)(null),{whatmoreWidgetSourceDetails:O,whatmoreUserInfo:D}=(0,n.useContext)(q.B);function R(){P(!1)}function W(t){R(),setTimeout((()=>{e(t)}),500)}(0,n.useEffect)((()=>(P(!0),()=>{})),[]),S(W);const Q=O.landingLocationType,V=O.templateType;function M(t){L&&(0,v.Xd)("whatmoreAllowAutoSlide")&&(z(t),"right"==t?L.slideNext():L.slidePrev())}function H(t,e){M(e)}return(0,f.jsx)(ni(),{isOpen:A,onAfterOpen:function(){},onRequestClose:R,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,f.jsx)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:"#00000088"},onTouchStart:t=>{E(t)},onTouchEnd:t=>{const e=T(t);e&&H(0,e)},onWheel:t=>{N(t,(t=>{H(0,t)}))},children:(0,f.jsx)(o.RC,{speed:1,slidesPerView:1,direction:"horizontal",modules:[r.hw,r.FJ],initialSlide:a,loop:i.length>1,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,onSwiper:t=>{var e,n;B(t),(0,X.kz)({userInteractionType:Y.O.EVENT_VIEW,widgetSourceDetails:O,event:i[_().activeIndex].events[0],productList:null===(e=i[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=i[_().activeIndex].events[0])||void 0===n?void 0:n.cta})},onSlideChange:t=>{var e,n;g?w(!1):(!function(t){const e=(0,St.Wd)(Q)+(0,St.gf)(V)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);p||m||(async()=>{(0,l.lB)(t),(0,si.Si)(I,di.TB,di.OL),(0,ct.Ch)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===D||void 0===D?void 0:D.userType)})()}(i[_().activeIndex].events[0]),(0,X.kz)({userInteractionType:Y.O.EVENT_VIEW,widgetSourceDetails:O,event:i[_().activeIndex].events[0],productList:null===(e=i[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=i[_().activeIndex].events[0])||void 0===n?void 0:n.cta}))},allowTouchMove:!1,cubeEffect:{shadow:!0,slideShadows:!0,shadowOffset:20,shadowScale:.94},children:[...Array(Math.min(i.length,3)).keys()].map((t=>(0,f.jsx)(o.qr,{children:t=>{let{isActive:e,isPrev:n,isNext:o,isVisible:r,isDuplicate:l}=t;const s=e?"activeIndex":n?"prevIndex":"nextIndex";return(0,f.jsx)(u.B,{direction:"column",height:d,justifyContent:"center",children:(0,f.jsx)(Si,{stories:i[_()[s]],onBack:W,isActive:e&&r,isNext:o,isPrev:n,onStoryCompleteCallback:M,nextStories:i[_().nextIndex],prevStories:i[_().prevIndex],initialEventIndex:a==_()[s]?F:0},"event-story-view-"+i[_()[s]].id)})}},"event-vertical-scroll-slide-"+t)))})})})};var Ii=function(t){var e,i,o,[r,l,a,d]=(0,x.A)();const[p]=(0,v.QN)("whatmorePrimaryColor"),[m]=(0,v.QN)("whatmoreSecondaryColor"),g=t.event,w=(t.onBack,n.useRef(),null!==(e=t.showPausedVideo)&&void 0!==e&&e),j=null!==(i=t.heightFactor)&&void 0!==i?i:1,b="flex-end";return d*=null!==(o=t.widthFactor)&&void 0!==o?o:1,a*=j,(0,f.jsx)(s.o,{children:(0,f.jsxs)(c.az,{width:d,height:a,children:[(0,f.jsx)(u.B,{direction:"column",justifyContent:b,height:"full",width:"full",children:(0,f.jsx)(c.az,{children:(0,f.jsx)(h.g,{width:"full",ratio:9/16,children:w?(0,Ye.ij)(g)||(0,Ye.Il)(g)?(0,f.jsx)(Ne.A,{height:"100%",width:"100%",url:g.thumbnail_image,isPlaying:!1,pauseFromPlayTimeInMs:1e3,event:g}):(0,f.jsx)(y._,{width:"full",height:"full",src:g.thumbnail_image,objectFit:"cover",borderRadius:"lg"}):(0,f.jsx)(c.az,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+p+", gray, "+m+")"})})})}),(0,f.jsx)(u.B,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:b,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,f.jsx)(c.az,{children:(0,f.jsx)(h.g,{width:"full",ratio:9/16,children:(0,f.jsx)(c.az,{width:"full",height:"full",backgroundColor:"blackAlpha.400"})})})})]})})};var _i=function(t){var e,i,[a,d,h,p]=(0,x.A)();const[m]=(0,v.QN)("isInDesignMode"),[g]=(0,v.QN)("isDemoBrand"),[w,j]=(0,v.QN)("isFirstIndicatorRenderDone"),[y,b]=(0,n.useState)(0!=t.eventIndex),{setCloseClickComponent:C}=(0,n.useContext)(Ei),[S,k]=(0,n.useState)(!1),[I]=(0,v.QN)("whatmoreShopId"),{whatmoreWidgetSourceDetails:_,whatmoreUserInfo:z}=(0,n.useContext)(q.B),[E,T]=(0,n.useState)(!1),[N,F]=(0,n.useState)(null);function A(){T(!1)}t.events;const P=t.eventIndex,L=t.onBack,O=t.eventsStories,D=t.initialStoryIndex,R=null===(e=O[0])||void 0===e||null===(i=e.events[0])||void 0===i?void 0:i.brand;function W(t){A(),setTimeout((()=>{L(t)}),500)}(0,n.useEffect)((()=>(T(!0),()=>{})),[]),C(W);const Q=_.landingLocationType,V=_.templateType;function M(t){N&&!N.isEnd&&("right"==t?N.slideNext():N.slidePrev())}const H=parseInt(Math.min(5,O.length));return(0,f.jsx)(gi,{show:E,closeCallback:A,customClass:"whatmore-landscape-modal-stories-view",children:(0,f.jsxs)(u.B,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",alignItems:"center",backgroundColor:"blackAlpha.800",children:[(0,f.jsx)(s.o,{children:(0,f.jsx)(c.az,{height:"fit-content",width:p*H,children:(0,f.jsxs)(o.RC,{onInit:t=>{var e,i;F(t),(0,X.kz)({userInteractionType:Y.O.EVENT_VIEW,widgetSourceDetails:_,event:O[t.activeIndex].events[0],productList:null===(e=O[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=O[t.activeIndex].events[0])||void 0===i?void 0:i.cta})},slidesPerView:H,centeredSlides:!0,allowTouchMove:!1,initialSlide:D,modules:[r.t9,r.Vx,r.FJ],navigation:H>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*h),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:p*H,watchSlidesProgress:!0,onSlideChange:t=>{var e,i;y?b(!1):(w||j(!0),function(t){const e=(0,St.Wd)(Q)+(0,St.gf)(V)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);m||g||(async()=>{(0,l.lB)(t),(0,si.Si)(I,di.TB,di.OL),(0,ct.Ch)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===z||void 0===z?void 0:z.userType)})()}(O[t.activeIndex].events[0]),(0,X.kz)({userInteractionType:Y.O.EVENT_VIEW,widgetSourceDetails:_,event:O[t.activeIndex].events[0],productList:null===(e=O[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=O[t.activeIndex].events[0])||void 0===i?void 0:i.cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[O.length>2&&(0,f.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,f.jsx)(B.A,{onCloseCallback:L})}),O.map(((t,e)=>(0,f.jsx)(o.qr,{children:i=>{let{isActive:n,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=i;if(n){const i=1;return(0,f.jsx)(u.B,{direction:"column",height:h,width:p*i,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,f.jsx)(c.az,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,f.jsx)(Si,{stories:t,onBack:W,isActive:n&&l,isNext:!1,isPrev:!1,onStoryCompleteCallback:M,initialEventIndex:D==e?P:0,showCloseOverlay:(null===O||void 0===O?void 0:O.length)<=2},"event-story-view-"+t.id)})})}return o||r?(0,f.jsx)(u.B,{direction:"column",height:h,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{N.slideTo(e,300)},children:(0,f.jsx)(c.az,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,f.jsx)(Ii,{showPausedVideo:!0,event:O[e].events[0],onBack:W,isPlaying:!1,setLockSwiper:k})})}):(0,f.jsx)(f.Fragment,{})}},"event-horizontal-scroll-slide-"+e)))]})})}),(0,f.jsx)(s.o,{children:(0,f.jsx)(Te,{brandName:R,height:.04*h,width:.1*p,fontSize:.02*h})})]})})};const zi=(0,bi.A)({key:"whatmore-css-sv"}),Ei=(0,n.createContext)({isIOS:!1,totalEvents:0,closeClickComponent:null,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:"vertical",showSwipeIndicator:!0,questionList:[]});var Ti=function(t){var e,i,o;const[r,l,a]=(0,Ie.A)(),[d]=(0,v.QN)("whatmoreShopId"),{whatmoreRootId:s}=(0,n.useContext)(q.B),{whatmoreIsStoriesTemplate:c}=(0,n.useContext)(q.B);var u=t.events,h=t.index,x=t.onBack,m=t.eventsStories,g=t.initialStoryIndex,w=(0,p.M3_)(d),j="portrait"===r?null!==(e=t.slideDirection)&&void 0!==e?e:"vertical":null!==(i=t.slideDirection)&&void 0!==i?i:u.length>1?"horizontal":"vertical",y="portrait"===r?!(0,p.kb)(d)&&!c:(0,p.DNc)(d);return(0,n.useLayoutEffect)((()=>{(0,p.hpk)(d)&&(window.location.href.includes(w)?history.replaceState(null,"","#"+w):history.pushState(null,"","#"+w),window.addEventListener("popstate",(()=>{window.location.href.includes(w)||x()})))}),[]),delete ji.Ay.styles.global,c?(0,f.jsx)(yi.C,{value:zi,children:(0,f.jsx)(wi.s,{theme:ji.Ay,cssVarsRoot:s,resetCSS:!1,children:(0,f.jsx)(Ei.Provider,{value:{isIOS:(0,qe.MN)(),totalEvents:u.length,closeClickComponent:x,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:j,showSwipeIndicator:y},children:"portrait"===r?(0,f.jsx)(ki,{eventsStories:m,initialStoryIndex:g,onBack:x,eventIndex:h}):(0,p.Rdb)(d)?(0,f.jsx)(_i,{eventsStories:m,initialStoryIndex:g,onBack:x,eventIndex:h}):(0,f.jsx)(ki,{eventsStories:m,initialStoryIndex:g,onBack:x,eventIndex:h})})})}):(0,f.jsx)(yi.C,{value:zi,children:(0,f.jsx)(wi.s,{theme:ji.Ay,cssVarsRoot:s,resetCSS:!1,children:(0,f.jsx)(Ei.Provider,{value:{isIOS:(0,qe.MN)(),totalEvents:u.length,closeClickComponent:x,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:j,showSwipeIndicator:y,questionList:(0,p.JwJ)(d)?null===(o=JSON.parse(localStorage.getItem("_whatmore_brand_questions")))||void 0===o?void 0:o.questionList:[]},children:"portrait"===r?(0,f.jsx)(vi,{events:u,eventIndex:h,onBack:x}):(0,f.jsx)(fi,{events:u,eventIndex:h,onBack:x})})})})}},5144:function(t,e,i){i.d(e,{jd:function(){return o}});var n=i(8283);const o=`\n ${n.i7`
|
76
|
+
`} 0.5s`,zt=null===M||void 0===M||null===(e=M.options)||void 0===e?void 0:e.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))})),[Et,Tt]=(0,n.useState)(-1!==zt?null===(i=M.options)||void 0===i||null===(o=i[zt])||void 0===o||null===(r=o.values)||void 0===r?void 0:r[0]:""),[Nt,Ft]=(0,n.useState)({});(0,n.useEffect)((()=>{-1!==zt&&"whatmore"!==(0,p.NCy)(Ct)&&async function(){const t=await(0,ht._N)(U);Ft(t)}()}),[]);let At=-1,Pt=-1!==zt&&null!==Nt&&void 0!==Nt&&Nt.product&&(null===Nt||void 0===Nt||null===(l=Nt.product)||void 0===l||null===(a=l.images)||void 0===a?void 0:a.length)>=(null===Nt||void 0===Nt||null===(d=Nt.product)||void 0===d||null===(u=d.options)||void 0===u||null===(h=u[zt])||void 0===h||null===(m=h.values)||void 0===m?void 0:m.length)?null===Nt||void 0===Nt||null===(g=Nt.product)||void 0===g||null===(w=g.images)||void 0===w?void 0:w.map((t=>{var e,i,n,o,r,l,a,d,s,c,u,h,p,v;const x=null===Nt||void 0===Nt||null===(e=Nt.product)||void 0===e||null===(i=e.options)||void 0===i?void 0:i.findIndex((t=>"Color"==(null===t||void 0===t?void 0:t.name)||"Colour"==(null===t||void 0===t?void 0:t.name)||"COLOR"==(null===t||void 0===t?void 0:t.name)));return{color:(null===t||void 0===t?void 0:t.variant_ids.length)>0?null===Nt||void 0===Nt||null===(n=Nt.product)||void 0===n||null===(o=n.options)||void 0===o||null===(r=o[x])||void 0===r||null===(l=r.values)||void 0===l?void 0:l[Math.min(++At,(null===Nt||void 0===Nt||null===(a=Nt.product)||void 0===a||null===(d=a.options)||void 0===d||null===(s=d[zt])||void 0===s||null===(c=s.values)||void 0===c?void 0:c.length)-1)]:null===Nt||void 0===Nt||null===(u=Nt.product)||void 0===u||null===(h=u.options)||void 0===h||null===(p=h[x])||void 0===p||null===(v=p.values)||void 0===v?void 0:v[Math.max(0,At)],src:null===t||void 0===t?void 0:t.src}})):[],Lt=[];if("whatmore"==(0,p.NCy)(Ct)&&(null===M||void 0===M||null===(j=M.images)||void 0===j?void 0:j.length)>0){var Bt;var Ot;if(-1!==(null===M||void 0===M||null===(Bt=M.options)||void 0===Bt?void 0:Bt.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))}))))Lt=null===M||void 0===M||null===(Ot=M.images)||void 0===Ot?void 0:Ot.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc})))}return At+1<(null===Nt||void 0===Nt||null===(b=Nt.product)||void 0===b||null===(C=b.options)||void 0===C||null===(S=C[zt])||void 0===S||null===(k=S.values)||void 0===k?void 0:k.length)&&(Pt=[]),(0,f.jsxs)(jt.s,{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===bt||void 0===bt?void 0:bt.whatmoreUITheme)?"xl":null,animation:_t,children:[(0,f.jsx)(ee,{setOpenShopNow:X,setLockSwiper:Y,FONT_SIZE:R}),(0,f.jsx)(s.o,{marginBottom:"10px",px:"20px",py:"5px",children:(0,f.jsx)(jt.s,{bg:"whiteAlpha.900",width:"fit-content",height:"fit-content",borderRadius:"round"==(null===bt||void 0===bt?void 0:bt.whatmoreUITheme)?"lg":null,overflow:"hidden",sx:{borderWidth:(0,p.YcK)(Ct),borderColor:(0,p.Fwt)(Ct)},children:(0,f.jsx)(jt.s,{width:"100%",children:(0,f.jsx)(ae.c,{renderElement:t=>(0,f.jsx)(f.Fragment,{children:(0,f.jsx)(c.az,{width:O+"px",height:D+"px",children:(0,f.jsx)(y._,{width:O+"px",height:D+"px",borderRadius:"round"==(null===bt||void 0===bt?void 0:bt.whatmoreUITheme)?"lg":null,src:(0,yt.b)(t.eventData.src,"&width=400&height=400"),alt:U.handle,sx:{objectFit:(0,p.KZe)(Ct)+" !important"},fallback:(0,f.jsx)(V.A,{width:O+"px",height:D+"px",borderRadius:"round"==(null===bt||void 0===bt?void 0:bt.whatmoreUITheme)?"10px":"0px"})})})}),dataList:Pt.length>0&&!Pt.includes(null)?null===(I=Pt)||void 0===I?void 0:I.filter((t=>(null===t||void 0===t?void 0:t.color)==Et)):Lt.length>0?[null===(_=Lt)||void 0===_?void 0:_.find((t=>(null===t||void 0===t?void 0:t.color)==Et))]:null===M||void 0===M||null===(E=M.images)||void 0===E?void 0:E.map((t=>({src:t.includes("https")?t:"https:"+t}))),spacing:10,defaultHeight:O+"px",defaultWidth:D+"px",retainAlreadyRenderedElements:!0,isScroll:!0})})})}),(0,f.jsx)(oe,{data:M,product:U,PRODUCT_TILE_HEIGHT:B,PRODUCT_TILE_WIDTH:L,FONT_SIZE:R,getVariantPrice:ce,selectedVariantId:nt,itemPrice:at,itemQuantity:rt,setItemQuantity:lt,thumbnailImage:gt}),(null===M||void 0===M||null===(T=M.variants)||void 0===T?void 0:T.length)>0&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(s.o,{paddingTop:"4px",width:"100%",children:(0,f.jsx)(wt.c,{color:(0,p.R6d)(Ct),size:"xs",width:"90%"})}),(0,f.jsx)(le,{data:M,dividerColor:(0,p.R6d)(Ct),setSelectedColor:Tt,finalArr:Pt,finalArrExternal:Lt,product:U,PRODUCT_TILE_HEIGHT:B,PRODUCT_TILE_WIDTH:L,FONT_SIZE:R,selectOptionFirstHandler:St,selectOptionSecondHandler:kt,selectOptionThirdHandler:It,getVariantPrice:ce,selectedOptionFirst:G,selectedOptionSecond:J,selectedOptionThird:et,selectedVariantId:nt,isVariantAvailable:K})]}),p.wW8&&((null===M||void 0===M?void 0:M.description)||(null===M||void 0===M?void 0:M.body_html))&&(0,f.jsx)(ie,{PRODUCT_TILE_HEIGHT:B,FONT_SIZE:R,data:M,handleToggle:()=>Q(!W),show:W}),(0,f.jsx)(c.az,{sx:{pointerEvents:"none"},paddingTop:"20px",opacity:0,children:(0,f.jsx)(te,{position:"relative",data:M,FONT_SIZE:R,product:U})}),(0,f.jsx)(te,{position:"fixed",selectedVariantId:nt,data:M,FONT_SIZE:R,PRODUCT_TILE_WIDTH:L,product:U,itemQuantity:rt,cartItemCount:st,addToCartFlag:pt,setAddToCartFlag:vt,soldOutFlag:xt,setSoldOutFlag:mt,event:H})]})}const se=(t,e,i,n)=>{var o;if(!e&&!i&&!n)return;const r=null===t||void 0===t||null===(o=t.variants)||void 0===o?void 0:o.find((t=>(!e||t.option1===e)&&(!i||t.option2===i)&&(!n||t.option3===n)));return r?r.id:void 0},ce=(t,e)=>{var i,n;return null===t||void 0===t||null===(i=t.variants)||void 0===i||null===(n=i.find((t=>t.id===e)))||void 0===n?void 0:n.price},ue=(t,e)=>{var i;const n=null===t||void 0===t||null===(i=t.variants)||void 0===i?void 0:i.find((t=>t.id==e));return void 0===n?null:null===n||void 0===n||null===(o=n.featured_image)||void 0===o?void 0:o.src;var o},he=(0,n.createContext)({setShowOptionsChart:null});var pe=function(t){const e=t.event,i=t.data,o=t.currentProduct,r=t.setOpenShopNow,l=t.setLockSwiper,[a,d]=(0,n.useState)(!1);return(0,f.jsx)(he.Provider,{value:{setShowOptionsChart:d},children:(0,f.jsxs)(c.az,{width:"full",height:"full",borderRadius:"md",children:[(0,f.jsx)(u.B,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",children:(0,f.jsx)(c.az,{width:"full",height:"fit-content",children:(0,f.jsx)(de,{data:i,event:e,product:o,setOpenShopNow:r,setLockSwiper:l})})}),a?(0,f.jsx)(u.B,{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,f.jsx)(c.az,{width:"full",height:"fit-content",children:(0,f.jsx)($t,{data:i,event:e,product:o,setShowOptionsChart:()=>{d(!1)}})})}):(0,f.jsx)(f.Fragment,{})]})})};var ve=function(t){var e,[i,o,r,l]=(0,x.A)();const[a,d]=(0,n.useState)(!1),[g,j]=(0,n.useState)(),[y,b]=(0,n.useState)(),C=(0,v.Xd)("whatmoreShopId"),S=t.event,k=t.onBack,I=n.useRef(),_=t.isPlaying,z=t.isLast,E=t.setLockSwiper,T=t.selectedVariantId,N=null===(e=t.showOverlay)||void 0===e||e,F="center";return(0,f.jsx)(s.o,{children:(0,f.jsxs)(c.az,{width:l,height:r,sx:{overflow:"hidden"},children:[(0,f.jsx)(u.B,{direction:"column",justifyContent:F,height:"full",width:"full",children:(0,f.jsx)(c.az,{borderRadius:"md",backgroundColor:"white",children:(0,f.jsx)(h.g,{width:"full",ratio:l/r,children:(0,f.jsx)(w,{height:"100%",width:"100%",url:S.event_hls_url,isPlaying:_,event:S})})})}),N?(0,f.jsx)(u.B,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:F,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,f.jsx)(c.az,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,f.jsx)(Yt,{focusRef:I,event:t.event,isLast:z,onCloseCallback:k,productClickHandler:async t=>{const e=await(0,m.M)(t,(0,p.NCy)(C),C);b(t),j(e),d(!0),E(!0)}})})}):(0,f.jsx)(f.Fragment,{}),!0===a?(0,f.jsx)(u.B,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:F,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,f.jsx)(c.az,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,f.jsx)(pe,{focusRef:I,event:t.event,isLast:z,onCloseCallback:()=>k(),setLockSwiper:E,data:g,currentProduct:y,setOpenShopNow:d,selectedVariantId:T})})}):(0,f.jsx)("div",{})]})})};const xe=function(t,e){return isNaN(t)||isNaN(e)||e<=0||t>e?0:Math.ceil(t/e*100)};function me(t){var e,i,[n,o,r,l]=(0,x.A)();const[a]=(0,v.QN)("whatmoreSecondaryColor"),[d]=(0,v.QN)("whatmoreSecondaryColorShade900"),s=t.progress,h=null!==(e=t.totalSiblings)&&void 0!==e?e:1,p=null!==(i=t.indexAmongSiblings)&&void 0!==i?i:0;return(0,f.jsx)(u.B,{width:"96%",height:"fit-content",direction:"row",justifyContent:"center",alignItems:"center",spacing:"1px",children:[...Array(h).keys()].map((t=>(0,f.jsx)(u.B,{width:"100%",height:.004*r+"px",backgroundColor:t<p?a:d+"99",borderRightRadius:"lg",borderLeftRadius:"lg",direction:"row",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",sx:{display:"block !important"},children:t==p?(0,f.jsx)(c.az,{height:"100%",width:s+"%",bgColor:a,borderRightRadius:"lg",borderLeftRadius:"lg",sx:{display:"block !important"}}):(0,f.jsx)(f.Fragment,{})},"event-progress-bar-slab-"+t)))})}var ge=i(3788),fe=i(758);const we=t=>t>=1e3?(t/1e3).toFixed(1)+"k":t,je=()=>"undefined"!==typeof window&&window.innerWidth>=1024;var ye=function(t){var e,i,o,r,a,d=t.whatmoreShareTemplateId;const h=t.whatmoreShareStoryId,m=t.whatmoreShareEventId,g=t.event,w=null===(e=t.showShareText)||void 0===e||e,y=null!==(i=t.shareButtonBottomMargin)&&void 0!==i?i:0,b=(0,v.Xd)("whatmoreShopId"),C=(0,v.Xd)("isInDesignMode"),S=(0,v.Xd)("isDemoBrand"),k=(0,v.Xd)("whatmorePrimaryFont"),I=(0,v.Xd)("websiteLanguage"),{whatmoreWidgetSourceDetails:_}=(0,n.useContext)(q.B),[z,E,T,N]=(0,x.A)(),F=null!==(o=t.iconSize)&&void 0!==o?o:.1*N*(0,p.xkB)(b);function A(){const e=(0,v.Xd)("whatmoreLandingLocationType");var i;!function(t){C||S||(async()=>{(0,l.Zh)(t)})()}(g),(e.startsWith("product")||"embed"===e)&&(d="te"),i="event_product_link"===(0,p.moP)(b)?g.products[0].product_link||"":window.location.pathname,i=("event_product_link"===(0,p.moP)(b)?"":window.location.hostname)+i+"?wtt="+d+"&wsid="+h+"&weid="+m,(0,p.BLb)(b)&&(i=i+"&"+(0,p.VCz)(b)+"&utm_campaign=video-share&utm_medium="+e);const n={title:(0,p.kZI)(b),text:`${(0,p.dmA)(b)} \n ${i} ${(0,p.ZX9)(b)?"\n \n -via Whatmore":""}`};navigator.share&&!je?navigator.share(n):(t.setIsModalOpen(!0),t.setShareText([n,i]))}return(0,f.jsx)(s.o,{children:(0,f.jsx)(c.jl,{cursor:"pointer",style:{marginBottom:y+"px"},children:(0,f.jsxs)(u.B,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[(0,f.jsx)(fe.A,{sx:{transform:"scaleX(-1)",color:"white",fontSize:F,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),A(),(0,X.kz)({userInteractionType:Y.O.VIDEO_SHARE_CTA_CLICKED,widgetSourceDetails:_,event:g,productList:g.products,ctaList:g.cta})}}),w&&(0,p.ViG)(b)?(0,f.jsxs)(j.E,{fontSize:.3*F+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:k+" !important",color:"white !important",paddingRight:"10%",maxWidth:"48px",wordWrap:"break-word"},children:["\xa0",g.total_share>(0,p.vDV)(b)?we(g.total_share):null!==(r=null===ot||void 0===ot||null===(a=ot[I])||void 0===a?void 0:a.share)&&void 0!==r?r:"Share","\xa0"]}):(0,f.jsx)(f.Fragment,{})]})})})},be=i(3420),Ce=i(7170);var Se=function(t){var e,i,o;const r=(0,v.Xd)("whatmoreShopId"),a=(0,v.Xd)("whatmorePrimaryFont"),d=(0,v.Xd)("whatmoreLikedEvents"),h=(0,v.Xd)("isInDesignMode"),m=(0,v.Xd)("isDemoBrand"),g=(0,v.Xd)("websiteLanguage"),{whatmoreWidgetSourceDetails:w}=(0,n.useContext)(q.B),y=t.event,[b,C]=(0,n.useState)(null!==(e=d[y.event_id])&&void 0!==e&&e),[S,k,I,_]=(0,x.A)(),z=.1*_*(0,p.xkB)(r);function E(t,e){h||m||(async()=>{(0,l.$B)(t,e)})()}function T(){(0,v.t2)("whatmoreLikedEvents",{...d,[y.event_id]:!b}),b?(E(y,-1),(0,X.kz)({userInteractionType:Y.O.VIDEO_UNLIKED,widgetSourceDetails:w,event:y,productList:y.products,ctaList:y.cta})):(E(y,1),(0,X.kz)({userInteractionType:Y.O.VIDEO_LIKED,widgetSourceDetails:w,event:y,productList:y.products,ctaList:y.cta})),C(!b)}const N=y.total_like+(b?1:0);return(0,f.jsx)(s.o,{children:(0,f.jsx)(c.jl,{cursor:"pointer",children:(0,f.jsxs)(u.B,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[b?(0,f.jsx)(Ce.A,{sx:{boxShadow:3,color:(0,p.MJ6)(r),fontSize:z,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),T()}}):(0,f.jsx)(be.A,{sx:{boxShadow:3,color:"white",fontSize:z,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),T()}}),(0,f.jsx)(f.Fragment,{children:(0,p.FlI)(r)?(0,f.jsxs)(j.E,{fontSize:.3*z+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:a+" !important",color:"white !important",position:"relative",bottom:"5px"},children:["\xa0",N>=(0,p.LGx)(r)?we(N):null!==(i=null===ot||void 0===ot||null===(o=ot[g])||void 0===o?void 0:o.like)&&void 0!==i?i:"Like","\xa0"]}):(0,f.jsx)(f.Fragment,{})})]})})})};const ke=t=>{let{iconSize:e}=t;return(0,f.jsx)("div",{style:{backgroundColor:"#25D366",borderRadius:"50%",padding:.3*e},children:(0,f.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,f.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 Ie=i(7300);const _e=t=>{let{iconSize:e}=t;return(0,f.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,f.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-twitter-x",viewBox:"0 0 16 16",children:(0,f.jsx)("path",{d:"M12.6.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867-5.07-4.425 5.07H.316l5.733-6.57L0 .75h5.063l3.495 4.633L12.601.75Zm-.86 13.028h1.36L4.323 2.145H2.865z"})})})},ze=t=>{let{iconSize:e}=t;return(0,f.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,f.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-copy",viewBox:"0 0 16 16",children:(0,f.jsx)("path",{"fill-rule":"evenodd",d:"M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z"})})})};var Ee=t=>{const e=t.shareText,[i,o]=(0,n.useState)("Copy link"),[r,l]=(0,n.useState)("");return(0,f.jsx)(f.Fragment,{children:t.isModalOpen&&(0,f.jsxs)("div",{className:"modal-overlay",style:{backgroundColor:"white",borderRadius:"10px",padding:"12px 12px 20px 12px"},children:[(0,f.jsxs)("div",{style:{cursor:"pointer",display:"flex",justifyContent:"space-between",paddingBottom:"6px"},children:[(0,f.jsx)("img",{className:"whatmore-label",onClick:()=>{window.location.href="https://www.whatmore.ai"},src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",backgroundColor:"transparent",borderRadius:"0px",width:Math.min(t.iconSize,28)+"px"}}),(0,f.jsx)(qt.A,{className:"close-rounded-icon",onClick:e=>{e.stopPropagation(),t.setIsModalOpen(!1)}})]}),(0,f.jsx)("div",{}),(0,f.jsx)(wt.c,{color:"blackAlpha.500",size:"1px",width:"100%"}),(0,f.jsxs)("div",{className:"social-icons",style:{display:"flex",gap:"20px",justifyContent:"center",paddingTop:"12px"},children:[(0,f.jsxs)("div",{onClick:t=>{var i;t.stopPropagation();const n=encodeURIComponent(null===(i=e[0])||void 0===i?void 0:i.text);window.open(`https://wa.me/?text=${n}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,f.jsx)(ke,{iconSize:Math.min(t.iconSize,30)}),(0,f.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"Whatsapp"})]}),(0,f.jsxs)("div",{onClick:t=>{var i;t.stopPropagation();const n=encodeURIComponent(null===(i=e[0])||void 0===i?void 0:i.text);window.open(`https://twitter.com/intent/tweet?text=${n}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,f.jsx)(_e,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,f.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"X"})]}),(0,f.jsxs)("div",{onClick:t=>{t.stopPropagation(),navigator.clipboard.writeText(e[1]),o("Link copied"),l("green")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,f.jsx)(ze,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,f.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14),color:r},children:i})]})]})]})})};var Te=function(t){var e,i;const o=null===(e=t.brandName)||void 0===e?void 0:e.replace(/\s+/g,"_"),r=(0,v.Xd)("whatmorePrimaryFont"),l=(0,v.Xd)("whatmoreShopId"),a=null!==(i=t.fontSize)&&void 0!==i?i:"8",[d]=(0,Ie.A)(),s=`https://www.whatmore.ai/shoppable-videos?utm_source=${o}&utm_medium=referral&utm_campaign=${"landscape"===d?"customer_referral_desktop":"customer_referral_mobile"}`,{whatmoreEventsBrowsingTemplate:h}=(0,n.useContext)(q.B);return(0,f.jsx)(_t.N,{href:s,isExternal:!0,children:(0,p.SGs)(l)&&(0,f.jsxs)(u.B,{direction:"row",justifyContent:"flex-start",alignItems:"center",width:"fit-content",spacing:"2px",paddingLeft:"2px",paddingRight:"2px",children:[(0,f.jsx)("img",{src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",width:1.7*a,backgroundColor:"transparent",borderRadius:"0px"}}),(0,f.jsx)(c.az,{width:"5px"}),(0,f.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-family",r,"important"),t.style.setProperty("font-size",1.1*a+"px","important"),t.style.setProperty("text-align","center","important"),t.style.setProperty("color","white"))},children:(0,St.Yt)(h)?"Powered by Whatmore":"Whatmore"})]})})},Ne=i(9879),Fe=i(9556),Ae=i(2209);var Pe=()=>(0,f.jsxs)(c.az,{as:"svg",width:"46px",height:"46px",viewBox:"0 0 24 24",fill:"none",className:"tick-animation",marginBottom:"20px",children:[(0,f.jsx)("circle",{cx:"12",cy:"12",r:"11",stroke:"gray",strokeWidth:"2",fill:"none"}),(0,f.jsx)("path",{d:"M7 12l3 3 7-7",stroke:"gray",strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]});var Le=t=>{var e;const i={text:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.title,options:(null===t||void 0===t?void 0:t.options)||[]},[o,r]=(0,n.useState)(!1),[l,a]=(0,n.useState)(null),[d,s]=(0,n.useState)(null),h=(0,n.useRef)(null),p=(0,n.useContext)(q.B);return(0,n.useEffect)((()=>{if(o){const e=setTimeout((()=>{t.setIsQuestionVisible(!1)}),1e3);return()=>clearTimeout(e)}}),[o]),(0,n.useEffect)((()=>{!o&&h.current&&s(h.current.offsetHeight)}),[o]),(0,f.jsxs)(c.az,{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",minWidth:"320px",width:"fit-content",bg:"white",borderRadius:"lg",boxShadow:"md",display:"flex",flexDirection:"column",maxWidth:"90%",maxHeight:"90%",overflowY:"visible",ref:h,height:d?`${d}px`:"auto",children:[(0,f.jsx)(c.az,{position:"absolute",top:"-10px",right:"-10px",bg:"rgba(255, 255, 255, 0.8)",borderRadius:"full",padding:1,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:"10",onClick:()=>{var e;t.setIsQuestionVisible(!1),(0,X.kz)({userInteractionType:Y.O.QUESTION_CLOSED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id},widgetSourceDetails:p})},children:(0,f.jsx)(Ae.A,{})}),(0,f.jsx)(c.az,{bg:"gray.700",borderTopRadius:"lg",py:3,px:6,display:"flex",flexDirection:"column",justifyContent:"center",width:"100%",children:(0,f.jsx)(Fe.D,{py:6,as:"h2",textAlign:"center",style:{fontWeight:"bold",fontSize:"18px",color:"white"},children:null===i||void 0===i?void 0:i.text})}),(0,f.jsx)(c.az,{flex:"1",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",py:5,px:6,width:"100%",children:o?(0,f.jsxs)(c.az,{flex:"1",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",children:[(0,f.jsx)(Pe,{}),(0,f.jsx)(Fe.D,{as:"h3",size:"md",color:"gray.700",fontWeight:"medium",textAlign:"center",mt:4,fontSize:"lg",children:"Thank you for your response!"})]}):(0,f.jsx)(u.B,{spacing:5,width:"100%",align:"center",children:i.options.map(((e,i)=>(0,f.jsx)(c.az,{px:4,borderWidth:2,borderRadius:"md",cursor:"pointer",bg:l===e?"gray.200":"white",borderColor:l===e?"gray.400":"gray.200",_hover:{bg:"gray.200"},onClick:()=>(e=>{var i;a(e),r(!0),(0,X.kz)({userInteractionType:Y.O.QUESTION_ANSWERED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(i=t.question)||void 0===i?void 0:i.id,response:e},widgetSourceDetails:p})})(e),transition:"background-color 0.2s, border-color 0.2s",display:"flex",alignItems:"center",width:"100%",children:(0,f.jsx)(j.E,{py:5,color:"gray.800",children:e})},i)))})})]})},Be=i(9935);var Oe=t=>{var e,i;const[o,r]=(0,n.useState)(""),[l,a]=(0,n.useState)(""),[d,s]=(0,n.useState)(!1),[u,h]=(0,n.useState)(!1),x=(0,v.Xd)("whatmoreShopId"),m=(0,v.Xd)("whatmoreSecondaryColor"),g=(0,v.Xd)("whatmorePrimaryFont"),w=null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.title,y=(0,n.useContext)(q.B),b=()=>{var e,i;(()=>{const{type:e}=(null===t||void 0===t?void 0:t.question)||{};return"number"===e?/^\d{10}$/.test(o):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o)})()?(s(!0),(0,X.kz)({userInteractionType:Y.O.QUESTION_ANSWERED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id,response:o,type:"number"===(null===t||void 0===t||null===(i=t.question)||void 0===i?void 0:i.type)?"leadgen:number":"leadgen:email"},widgetSourceDetails:y})):a("Please enter valid contact info.")},C=()=>{var e;t.setIsQuestionVisible(!1),(0,X.kz)({userInteractionType:Y.O.QUESTION_CLOSED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id},widgetSourceDetails:y})};return(0,f.jsx)(jt.s,{bg:m,p:"6%",borderRadius:"md",boxShadow:"md",width:"90vw",mx:"auto",minH:"40vh",maxH:"80vh",position:"fixed",top:"30%",left:"50%",transform:"translateX(-50%)",direction:"column",align:"center",justify:"center",zIndex:100,overflow:"hidden",children:d?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(c.az,{textAlign:"center",color:"white",children:[(0,f.jsx)(c.az,{fontSize:"2xl",fontWeight:"bold",children:"CONGRATULATIONS!"}),(0,f.jsx)(c.az,{my:"4%",fontSize:"xl",children:"Claim Now"})]}),(0,f.jsx)(c.az,{position:"absolute",top:"2%",right:"2%",zIndex:20,children:(0,f.jsx)(B.A,{onCloseCallback:C})}),(0,f.jsxs)(c.az,{position:"relative",width:"70%",onClick:()=>{const t=(0,p.TH)(x);navigator.clipboard.writeText(t).then((()=>{h(!0),setTimeout((()=>{C()}),1e3),setTimeout((()=>h(!1)),2e3)}),(()=>{console.error("Failed to copy the coupon code")}))},cursor:"pointer",children:[(0,f.jsxs)(c.az,{bg:"white",border:"2px dashed black",borderRadius:"md",p:"2%",display:"flex",alignItems:"center",justifyContent:"space-between",mt:"4%",children:[(0,f.jsx)(c.az,{as:"span",fontWeight:"bold",color:"black",children:(0,p.TH)(x)}),(0,f.jsx)(Be.A,{sx:{color:u?{whatmoreSecondaryColor:m}:"gray",cursor:"pointer",marginLeft:"2%"}})]}),u&&(0,f.jsx)(c.az,{padding:"4%",position:"absolute",left:"50%",transform:"translateX(-50%)",bg:m,color:"white",fontSize:"12px",borderRadius:"md",px:"2%",py:"0.5%",textAlign:"center",children:"Copied!"})]})]}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(c.az,{textAlign:"center",color:"white",children:[(0,f.jsx)(c.az,{children:(0,f.jsx)(j.E,{fontFamily:g,fontSize:"22px",fontWeight:"bold",children:w})}),(0,f.jsx)(c.az,{marginBottom:"10%",fontSize:"md",children:(0,p.aRV)(x)})]}),(0,f.jsx)(c.az,{position:"fixed",top:"2%",right:"2%",zIndex:20,children:(0,f.jsx)(B.A,{onCloseCallback:C})}),(0,f.jsxs)(jt.s,{mt:"4%",align:"center",direction:"column",width:"80%",children:[(0,f.jsx)(c.az,{sx:{bg:"white",border:"2px solid #4A4A4A",borderRadius:"8px",paddingLeft:"4%",display:"flex",alignItems:"center",marginBottom:"6%",width:"100%",height:"auto",minH:"48px"},children:(0,f.jsx)("input",{fontFamily:g,type:"number"===(null===(i=t.question)||void 0===i?void 0:i.type)?"tel":"email",placeholder:t.placeholder,value:o,onChange:t=>{r(t.target.value),l&&a("")},onKeyDown:t=>{"Enter"===t.key&&b()},style:{fontSize:"1em",border:"none",outline:"none",width:"100%"}})}),l&&(0,f.jsx)(j.E,{color:"red.500",mb:"4% !important",fontSize:"md",textAlign:"center",width:"100%",children:l}),(0,f.jsx)(c.az,{as:"button",bg:"#D3D3D3",color:"#343434",borderRadius:"md",fontWeight:"bold",height:"35px",display:"flex",alignItems:"center",justifyContent:"center",onClick:b,width:"50%",children:(0,f.jsx)(j.E,{fontFamily:g,fontSize:"0.8em",padding:"2%",color:m,children:"SUBMIT"})})]})]})})};var De=t=>{const[e,i]=(0,n.useState)(null);return(0,f.jsx)(c.az,{children:!e&&(0,f.jsx)(Oe,{question:t.question,onEmailSubmit:t=>{i(t)},setIsQuestionVisible:t.setIsQuestionVisible,placeholder:t.placeholder})})};var Re=t=>{var e;const[i,o]=(0,n.useState)(null),r=t.questionIndex,l=t.questionList;if((0,n.useEffect)((()=>{if(!(r>=l.length))return()=>(0,ct.Hm)()}),[]),r>=l.length)return;const a=null===l||void 0===l?void 0:l[r];return"string"===(null===a||void 0===a?void 0:a.type)||"number"===(null===a||void 0===a?void 0:a.type)?(0,f.jsx)(c.az,{children:(0,f.jsx)(De,{setIsQuestionVisible:t.setIsQuestionVisible,question:a,placeholder:"number"===(null===a||void 0===a?void 0:a.type)?"Enter your phone number":"Enter your email"})}):(0,f.jsx)(c.az,{children:(0,f.jsx)(Le,{question:a,options:null===a||void 0===a||null===(e=a.answers)||void 0===e?void 0:e.values.map((t=>null===t||void 0===t?void 0:t.value)),onAnswerSelect:t=>{o(t)},selectedAnswer:i,onClose:()=>{t.setIsQuestionVisible(!1)},setIsQuestionVisible:t.setIsQuestionVisible})})},We=i(6118);function Qe(t){var e;const i=t.event,[o,r,l,a]=(0,x.A)(),[d]=(0,v.QN)("whatmorePrimaryFont"),{whatmoreIsStoriesTemplate:h}=(0,n.useContext)(q.B),[m]=(0,v.QN)("whatmoreSecondaryColor"),[g]=(0,v.QN)("whatmoreShopId"),w=(0,p.ivI)(g),y=null!==(e=(0,p.qAx)(g))&&void 0!==e?e:[m,w,m,w,m],b=(0,n.useRef)(null);(0,n.useEffect)((()=>{b.current&&b.current.play()}),[]);const C=(0,ge.s)(null===i||void 0===i?void 0:i.storyset_thumbnail_image);return(0,f.jsx)(f.Fragment,{children:h?(0,f.jsx)(c.az,{width:"100%",height:"fit-content",padding:"5px",children:(0,f.jsxs)(u.B,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-start",children:[(0,f.jsx)(s.o,{children:(0,f.jsx)(c.jl,{overflow:"hidden",size:.14*t.width+"px",sx:{boxShadow:"0px 2px 1px 0px "+y[0]+"50, 0px -2px 1px 0px "+y[1]+"50, 2px 0px 1px 0px "+y[2]+"50, -2px 0px 1px 0px "+y[3]+"80, 2px -2px 1px 0px "+y[4]+"80, -2px 2px 1px 0px "+y[0]+"DA, 2px 2px 1px 0px "+y[1]+"DA, -2px -2px 1px 0px "+y[2]+"DA"},children:"video"==(0,yt.B)(C)?(0,f.jsx)(Ne.A,{height:"100%",width:"100%",poster:null===i||void 0===i?void 0:i.thumbnail_image,url:C,isPlaying:!0,event:{event_type:"video"},borderRadius:"50%"}):(0,f.jsx)("img",{src:C,style:{objectFit:"cover",height:"100%",width:"100%",backgroundColor:"white"}})})}),(0,f.jsx)(s.o,{children:(0,f.jsx)(j.E,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:.05*t.width+"px",fontWeight:"medium",lineHeight:"100%",sx:{fontFamily:d+" !important",color:"white !important",textShadow:"0px 0px 4px black !important;"},children:i.storyset_name})})]})}):(0,f.jsx)(f.Fragment,{})})}var Ve=function(t){var e,i,o;const[r,a,d]=(0,Ie.A)(),[s]=(0,v.QN)("isInDesignMode"),[h]=(0,v.QN)("isDemoBrand"),[m,g]=(0,v.QN)("isProductSwiperCatalogOpen"),[w,y]=(0,v.QN)("isFirstIndicatorRenderDone"),[b]=(0,v.QN)("whatmoreShopId"),C=(0,n.useContext)(Ei),{whatmoreEventsBrowsingTemplate:S}=(0,n.useContext)(q.B),[I,_,z,E]=(0,x.A)(),T=(0,v.Xd)("whatmorePrimaryFont"),N=t.event,F=t.storySetId,A=t.isLast,L=t.onCloseCallback,O=t.focusRef,D=t.productClickHandler,R=t.videoPlayingData,W=t.totalSiblingEvents,V=t.indexAmongSiblings,M=t.leftOpenSpaceClickHandler,H=t.midOpenSpaceClickHandler,U=t.rightOpenSpaceClickHandler,{whatmoreWidgetSourceDetails:$}=(0,n.useContext)(q.B),K=.1*E,[G,Z]=(0,n.useState)(!1),[J,tt]=(0,n.useState)([]),et=t=>{it.current&&!it.current.contains(t.target)&&Z(!1)},it=(0,n.useRef)(null);return(0,n.useEffect)((()=>(G?document.addEventListener("click",et):document.removeEventListener("click",et),()=>{document.removeEventListener("click",et)})),[G]),(0,p.yt9)(b),(0,f.jsxs)(c.az,{width:"full",height:"full",borderRadius:"md",children:[t.isQuestionVisible&&(0,f.jsx)(Mt.S,{userInteractionType:Y.O.QUESTION_VIEWED,userInteractionMetadata:{questionId:null===(e=t.questionList)||void 0===e||null===(i=e[t.qIndex])||void 0===i?void 0:i.id},triggerFlag:!s&&!h,children:(0,f.jsx)(Re,{questionList:t.questionList,questionIndex:t.qIndex,setIsQuestionVisible:t.setIsQuestionVisible})}),G&&(0,f.jsx)("div",{ref:it,className:"whatmore-share-modal",style:{zIndex:100,position:"absolute",boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.6)",width:"75%",top:"45%",left:"50%",transform:"translateX(-50%) translateY(-50%)"},children:(0,f.jsx)(Ee,{shareText:J,setShareText:tt,iconSize:K,isModalOpen:G,setIsModalOpen:Z})}),"60934750449"==b&&(0,f.jsx)("div",{style:{position:"absolute",top:"50%",boxShadow:"dark-lg",transform:"translateY(-50%) scale(0.6)"},children:(0,f.jsx)("img",{src:"https://s3.ap-south-1.amazonaws.com/whatmorelive.brand.other.assets/maryumnmaria/Text2.png"})}),(!t.isQuestionVisible||t.qIndex>=(null===t||void 0===t||null===(o=t.questionList)||void 0===o?void 0:o.length))&&(0,f.jsxs)(u.B,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,f.jsxs)(u.B,{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:[C.showVideoPlayingData?(0,f.jsx)(u.B,{direction:"row",width:"100%",height:"fit-content",marginTop:"5px",justifyContent:"center",children:(0,f.jsx)(me,{progress:xe(R.current_time,R.video_duration),totalSiblings:W,indexAmongSiblings:V})}):(0,f.jsx)(f.Fragment,{}),(0,f.jsx)(c.az,{width:"full",margin:"2px",marginTop:"5px",children:(0,f.jsxs)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",paddingRight:"10px",paddingLeft:"10px",children:[(0,f.jsx)(Qe,{event:N,width:E}),(0,f.jsxs)(u.B,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,St.Yt)(S)?(0,f.jsx)(ye,{whatmoreShareTemplateId:(0,St.Gy)(S),whatmoreShareStoryId:F,whatmoreShareEventId:N.event_id,event:N,showShareText:!1,iconSize:.098*E,setIsModalOpen:Z,setShareText:tt}):(0,f.jsx)(f.Fragment,{}),!(0,St.Yt)(S)&&(0,f.jsx)(u.B,{pt:"12px",pl:"10px",sx:{position:"absolute",top:"10px",left:"0px"},children:(0,f.jsx)(Te,{brandName:null===N||void 0===N?void 0:N.brand,fontSize:.033*E})}),(0,f.jsx)(k,{focusRef:O}),("landscape"!==r||t.showCloseOverlay)&&(0,f.jsx)(B.A,{event:N,onCloseCallback:L})]})]})})]}),"78232846646"===b&&"portrait"===r&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(c.az,{position:"absolute",top:.49*window.innerHeight+"px",left:.92*window.innerWidth+"px",transform:"translate(-50%, -50%)",zIndex:101,children:(0,f.jsx)(We.A,{style:{fontSize:1.3*K+"px",transform:"rotate(180deg)",color:"white",cursor:"pointer",filter:"drop-shadow(0 0 5px black)"},onClick:()=>{t.changeSlide(N,"right")}})}),(0,f.jsx)(c.az,{position:"absolute",top:.42*window.innerHeight+"px",left:.92*window.innerWidth+"px",transform:"translate(-50%, -50%)",zIndex:101,children:(0,f.jsx)(We.A,{style:{fontSize:1.3*K+"px",color:"white",cursor:"pointer",filter:"drop-shadow(0 0 5px black)"},onClick:()=>{t.changeSlide(N,"left")}})})]}),(0,f.jsxs)(u.B,{width:"100%",height:"100%",direction:"row",justifyContent:"center",children:[(0,f.jsx)(c.az,{width:"33%",height:"100%",onClick:()=>{M()},sx:{display:"block !important"}}),(0,f.jsx)(c.az,{width:"34%",height:"100%",onClick:()=>{H()},sx:{display:"block !important"}}),(0,f.jsx)(c.az,{width:"33%",height:"100%",onClick:()=>{U()},sx:{display:"block !important"}})]}),(0,f.jsxs)(c.az,{width:"full",height:"fit-content",children:[C.totalEvents>1&&!w&&C.showSwipeIndicator?(0,f.jsx)(c.az,{width:"full",margin:"2px",children:(0,f.jsx)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,f.jsx)(Q,{swipeUp:!A})})}):null,(0,f.jsxs)(c.az,{width:"fit-content",height:"fit-content",position:"absolute",right:0,bottom:"25%",children:[(0,p.oZc)(b)&&!(0,St.Yt)(S)?(0,f.jsx)(c.az,{ml:"auto",width:"fit-content",paddingY:"12px",paddingX:"8px",position:"relative",top:"-30px",children:(0,f.jsxs)(u.B,{gap:"4px",direction:"column",alignItems:"center",cursor:"pointer",onClick:function(){var t;s||h||(async()=>{(0,l.A9)(N,1)})(),(0,X.kz)({userInteractionType:Y.O.WHATSAPP_ICON_CLICKED,widgetSourceDetails:$,event:N,productList:null===N||void 0===N?void 0:N.products,ctaList:null===N||void 0===N?void 0:N.cta});const e=N.products.map((t=>`${t.product_link} \n`)),i=(0,p.dzp)(b),n=`Hey, I am interested in ${N.products.length>1?"these products":"this product"} I saw on ${null===(t=N.products[0])||void 0===t?void 0:t.brand} store: \n${e}. Could you please help me with some queries?`;window.open(i+`&text=${n}&type=phone_number`,"_blank")},children:[(0,f.jsx)(ke,{iconSize:.7*K,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,f.jsx)(j.E,{fontSize:K*(0,p.LOH)(b)+"px",fontWeight:"bold",align:"center",style:{marginTop:0},sx:{fontFamily:T+" !important",color:"white !important"},children:(0,p.wtw)(b)})]})}):(0,f.jsx)(f.Fragment,{}),(0,p.MdM)(b)?(0,f.jsx)(c.az,{width:"full",height:"fit-content",paddingX:"12px",position:"relative",top:"-30px",children:(0,f.jsx)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,f.jsx)(Se,{event:N})})}):(0,f.jsx)(f.Fragment,{}),(0,p.iQ5)(b)&&!(0,St.Yt)(S)?(0,f.jsx)(c.az,{width:"full",height:"fit-content",paddingX:"12px",position:"relative",top:"-30px",children:(0,f.jsx)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,f.jsx)(ye,{whatmoreShareTemplateId:(0,St.Gy)(S),whatmoreShareStoryId:F,whatmoreShareEventId:N.event_id,event:N,setIsModalOpen:Z,setShareText:tt})})}):(0,f.jsx)(f.Fragment,{})]}),(0,Vt.Z_)(N)?(0,f.jsxs)(c.az,{width:"full",children:[(0,p.ek9)(b)?(0,f.jsx)(c.az,{w:"100%",children:(0,f.jsx)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,f.jsx)(P,{event:N,onToggle:t=>{g("minimize-button"!==t)}})})}):(0,f.jsx)(f.Fragment,{}),(0,f.jsx)(c.az,{display:"flex",width:"100%",height:"fit-content",children:(0,f.jsx)(Ut,{event:N,productClickHandler:D})})]}):(0,f.jsx)(f.Fragment,{})]})]})]})},Me=i(5491),He=i.n(Me),Ue=i(6493);var Xe=function(t){var e,i,o,r,l,a,[d,w,j,y]=(0,x.A)();const[b,C]=(0,n.useState)(!1),[S,k]=(0,n.useState)(),[I,_]=(0,n.useState)(),[z,E]=(0,n.useState)({current_time:0,video_duration:0,is_video_ended:!1}),T=(0,v.Xd)("whatmoreShopId"),N=t.event,F=t.storyId,A=t.onBack,P=n.useRef(),L=t.changeSlide,B=t.isPlaying,O=t.isLast,D=t.setLockSwiper,R=t.onVideoEndedCallback,W=t.progressUpdateCallback,Q=null!==(e=t.totalSiblingEvents)&&void 0!==e?e:0,V=null!==(i=t.indexAmongSiblings)&&void 0!==i?i:0,M=null===(o=t.showOverlay)||void 0===o||o,H=null!==(r=t.leftOpenSpaceClickHandler)&&void 0!==r?r:()=>{},U=null!==(l=t.midOpenSpaceClickHandler)&&void 0!==l?l:()=>{},$=null!==(a=t.rightOpenSpaceClickHandler)&&void 0!==a?a:()=>{},{whatmoreWidgetSourceDetails:K}=(0,n.useContext)(q.B),{questionList:G}=(0,n.useContext)(Ei),Z=(null===G||void 0===G?void 0:G.length)>0?parseInt(localStorage.getItem("_whatmore_qview_index")):1e4,[J,tt]=(0,n.useState)();(0,n.useEffect)((()=>{tt(t.showQuestion)}),[t.showQuestion]);const et="center";let it;try{it=He()((()=>{R()}),1e3,{leading:!0,trailing:!1})}catch(nt){console.log(nt)}return(0,f.jsx)(s.o,{children:(0,f.jsxs)(c.az,{width:y,height:j,sx:{overflow:"hidden"},children:[(0,f.jsx)(u.B,{direction:"column",justifyContent:et,height:"full",width:"full",children:(0,f.jsx)(c.az,{borderRadius:"md",backgroundColor:"white",children:(0,f.jsx)(h.g,{width:"full",ratio:y/j,children:(0,f.jsx)(g.A,{height:"100%",width:"100%",url:(0,ge.s)((0,Ue.lP)(N)),isPlaying:B&&(!J||Z>=G.length),timeUpdateCallback:function(t,e){const i=xe(t,e);W({watch_time:t,video_duration:e});const n=z.is_video_ended;i>=99&&B&&!n?(it(),E({current_time:t,video_duration:e,is_video_ended:!0})):E({current_time:t,video_duration:e,is_video_ended:n})},event:N,question:J&&Z<(null===G||void 0===G?void 0:G.length),source:t.source})})})}),M?(0,f.jsx)(u.B,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:et,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,f.jsx)(c.az,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,f.jsx)(Ve,{focusRef:P,event:t.event,isLast:O,onCloseCallback:t=>{A(t),(0,X.DG)({userInteractionType:Y.O.VIDEO_PLAYBACK,userInteractionMetadata:{watch_time:z.current_time,video_duration:z.video_duration},widgetSourceDetails:K,event:N,productList:N.products,ctaList:N.cta})},productClickHandler:async t=>{const e=await(0,m.M)(t,(0,p.NCy)(T),T);_(t),k(e),C(!0),D(!0),(0,X.kz)({userInteractionType:Y.O.SHOPNOW_CLICKED,widgetSourceDetails:K,event:N,productList:N.products,ctaList:N.cta}),(0,v.t2)("whatmoreAllowAutoSlide",!1)},videoPlayingData:z,totalSiblingEvents:Q,indexAmongSiblings:V,questionList:G,isQuestionVisible:J&&Z<(null===G||void 0===G?void 0:G.length),qIndex:Z,setIsQuestionVisible:tt,leftOpenSpaceClickHandler:H,midOpenSpaceClickHandler:U,rightOpenSpaceClickHandler:$,storySetId:F,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:L})})}):(0,f.jsx)(f.Fragment,{}),!0===b?(0,f.jsx)(u.B,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:et,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,f.jsx)(c.az,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,f.jsx)(pe,{focusRef:P,event:t.event,isLast:O,onCloseCallback:()=>A(),setLockSwiper:D,data:S,currentProduct:I,setOpenShopNow:t=>{C(t),(0,v.t2)("whatmoreAllowAutoSlide",!t)}})})}):(0,f.jsx)("div",{})]})})},Ye=i(2039),qe=i(6613),$e=i(1085),Ke=i(5727);var Ge=function(t){var[e,i,n,o]=(0,x.A)();const r=(0,v.Xd)("whatmoreShopId"),l=t.event,a=t.isPlaying,d="center";return(0,f.jsx)(s.o,{children:(0,f.jsxs)(c.az,{width:o,height:n,sx:{overflow:"hidden"},children:[(0,f.jsx)(u.B,{direction:"column",justifyContent:d,height:"full",width:"full",children:(0,f.jsx)(c.az,{borderRadius:"md",backgroundColor:"white",children:(0,f.jsx)(h.g,{width:"full",ratio:o/n,children:(0,f.jsx)(g.A,{height:"100%",width:"100%",url:(0,ge.s)((0,Ue.lP)(l)),isPlaying:a,timeUpdateCallback:function(t,e){},event:l,source:t.source})})})}),(0,f.jsx)(u.B,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:d,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,f.jsx)(c.az,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",backdropFilter:"auto",backdropBlur:"10px",onClick:t=>{(0,$e.bo)()},children:(0,f.jsxs)(u.B,{direction:"column",justifyContent:"center",alignItems:"center",height:"full",width:"full",children:[(0,f.jsx)(Ke.A,{sx:{boxShadow:3,color:(0,p.KFN)(r),fontSize:.4*o,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{(0,$e.bo)()}}),(0,f.jsx)(j.E,{color:"white",fontSize:.05*o+"px",fontWeight:"bold",align:"left",children:"Please click to play video.."})]})})})]})})},Ze=i(3294),Je=i(9821);const ti=n.lazy((()=>i.e(931).then(i.bind(i,5015))));var ei=function(t){var e,i;const n=t.changeSlide,o=t.event,r=null===(e=t.isPlaying)||void 0===e||e,l=t.onBack,s=t.isLast,c=t.setLockSwiper,u=(t.heightFactor,t.widthFactor,t.onVideoEndedCallback),h=t.progressUpdateCallback,[p,x]=(0,S.A)(),[m]=(0,v.QN)("whatmoreVideoPlayerPoolBlessed"),g=null===(i=t.showOverlay)||void 0===i||i;function w(){x(!p)}if((0,qe.MN)()&&0==m&&"recommended_images"!=(null===o||void 0===o?void 0:o.event_type))return(0,Je._)()?(0,f.jsx)(Ge,{event:o,onBack:l,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:u,progressUpdateCallback:h,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:g,source:Ze.N.CAROUSEL_EVENT_OPENED},"shopping-video-view"+o.event_id):(0,f.jsx)(Xe,{event:o,onBack:l,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:u,progressUpdateCallback:h,showQuestion:t.showQuestion,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:g,source:Ze.N.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:n},"shopping-video-view"+o.event_id);if((0,Ye.ij)(o)||(0,Ye.Il)(o))return(0,f.jsx)(Xe,{event:o,onBack:l,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:u,progressUpdateCallback:h,showQuestion:t.showQuestion,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:g,source:Ze.N.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:n},"shopping-video-view"+o.event_id);if("recommended_images"==(null===o||void 0===o?void 0:o.event_type))return(0,f.jsx)(ti,{onBack:l,mode:t.mode,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,imageUrls:null===o||void 0===o?void 0:o.product_list});if((0,Ye.Th)(o)){var{status:j,bannerText:y,timeToStartInMins:b}=d.A.getEventStatus(o);if(j.name===a.A.LIVE.name)return(0,f.jsx)(ve,{event:o,onBack:l,isPlaying:r,isLast:s,showOverlay:g},"shopping-live-view"+o.event_id)}return console.error("Can't render event which is neither video or a currently-live-event"),(0,f.jsx)("div",{})},ii=i(4806),ni=i.n(ii),oi=i(2804),ri=i(6834);function li(t){var e;const[i,o]=(0,n.useState)(!1),r=t.onClick,l=null!==(e=t.fontSize)&&void 0!==e?e:50;return(0,f.jsx)("div",{style:{height:"fit-content",width:"fit-content",backgroundColor:"black",opacity:.4,borderRadius:"50%"},className:[i?"whatmore-scale-on-tap":""].join(" "),children:"left"===t.type?(0,f.jsx)(ri.A,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{o(!0),setTimeout((()=>{o(!1)}),500),r(t,"up")}}):(0,f.jsx)(oi.A,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{o(!0),setTimeout((()=>{o(!1)}),500),r(t,"down")}})})}var ai=function(t){var e,i,n;const o=null!==(e=t.relativeBottomPercentage)&&void 0!==e?e:"30%",r=null!==(i=t.width)&&void 0!==i?i:"100%",l=null!==(n=t.fontSize)&&void 0!==n?n:50,a=t.handleClick;return(0,f.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,f.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,f.jsx)(li,{type:"left",onClick:a,fontSize:l}),(0,f.jsx)(li,{type:"right",onClick:a,fontSize:l})]})})},di=i(964),si=i(3330);var ci=function(t,e){function i(t,e){return 1==e?0:t<0?e+t:t>=e?t-e:t}const o=(0,n.useRef)({prevIndex:i(t-1,e),activeIndex:t,nextIndex:i(t+1,e)});return[function(){return o.current},function(t){o.current="right"==t?{prevIndex:i(o.current.activeIndex,e),activeIndex:i(o.current.activeIndex+1,e),nextIndex:i(o.current.activeIndex+2,e)}:{prevIndex:i(o.current.activeIndex-2,e),activeIndex:i(o.current.activeIndex-1,e),nextIndex:i(o.current.activeIndex,e)}},function(t){return i(o.current.activeIndex+t)}]};var ui=function(t,e){const i=(0,n.useRef)({clientX:0,clientY:0});return[function(t){i.current.clientX=t.changedTouches[0].clientX,i.current.clientY=t.changedTouches[0].clientY},function(n){const o=i.current.clientX,r=i.current.clientY;var l=o-n.changedTouches[0].clientX,a=r-n.changedTouches[0].clientY;return"vertical"==t&&Math.abs(a)>e||"horizontal"==t&&Math.abs(l)>e?"vertical"==t?a>0?"right":"left":l>0?"right":"left":null}]};var hi=function(t,e){const i=(0,n.useRef)(He()(((t,e)=>{t(e)}),300,{leading:!0,trailing:!1}));return[function(n,o){var r=0;if(r="vertical"==t?n.deltaY:n.deltaX,Math.abs(r)<=e)return;const l=r>0?"right":"left";i.current(o,l)}]},pi=i(6325);var vi=function(t){const e=t.events,i=t.eventIndex,a=t.onBack;var[d,s,c,h]=(0,x.A)();const[m]=(0,v.QN)("isInDesignMode"),[g]=(0,v.QN)("isDemoBrand"),[w,j]=(0,n.useState)(!0),[y,b]=(0,v.QN)("isFirstIndicatorRenderDone"),[C,S]=(0,n.useState)(!1),[k,I]=(0,n.useState)({}),{setCloseClickComponent:_}=(0,n.useContext)(Ei),{slideDirection:z}=(0,n.useContext)(Ei),[E]=(0,v.QN)("whatmoreShopId"),[T]=(0,v.QN)("whatmoreLandingLocationType"),[N,F]=ci(i,e.length),[A,P]=ui(z,50),[L]=hi("vertical",30),[B,O]=(0,n.useState)(!1),[D,R]=(0,n.useState)(null),{whatmoreWidgetSourceDetails:W,whatmoreUserInfo:Q}=(0,n.useContext)(q.B);function V(){O(!1)}function M(t){V(),setTimeout((()=>{a(t)}),500)}(0,n.useEffect)((()=>(O(!0),()=>{})),[]);const U=W.landingLocationType,$=W.templateType;_(M);let K=i;const{questionList:G}=(0,n.useContext)(Ei);function Z(){(0,v.Xd)("whatmoreAllowAutoSlide")&&(F("right"),D.slideNext())}function J(t,e){F(e),function(t,e){D&&("left"===e?D.slidePrev():D.slideNext())}(0,e)}const tt=Math.round(.05*c);return(0,f.jsx)(ni(),{isOpen:B,onAfterOpen:function(){},onRequestClose:V,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,f.jsx)(pi.A,{children:(0,f.jsxs)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:(0,H.YU)("#000000",13)},onTouchStart:t=>{A(t)},onTouchEnd:t=>{if(C)return;const e=P(t);e&&J(0,e)},onWheel:t=>{C||L(t,(t=>{J(0,t)}))},children:[(0,f.jsx)(o.RC,{speed:400,threshold:tt,slidesPerView:1,direction:z,modules:[r.dK,r.FJ],initialSlide:i,loop:1!=e.length,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,allowSlideNext:!C,allowSlidePrev:!C,allowTouchMove:!1,onSwiper:t=>{R(t),(0,X.kz)({userInteractionType:Y.O.EVENT_VIEW,widgetSourceDetails:W,event:e[N().activeIndex],productList:e[N().activeIndex].products})},onSlideChange:t=>{var i;w?j(!1):(y||b(!0),(0,X.DG)({userInteractionType:Y.O.VIDEO_PLAYBACK,userInteractionMetadata:k,widgetSourceDetails:W,event:e[N().activeIndex],productList:e[N().activeIndex].products}),i=e[N().activeIndex],m||g||null===i||void 0===i||!i.event_id||(async()=>{const t=(0,St.Wd)(U)+(0,St.gf)($)+(null!==i&&void 0!==i&&i.isRelatedEvent?"R":"E")+"_"+(null===i||void 0===i?void 0:i.event_id);(0,l.lB)(i),"index"===T?((0,si.Si)(E,di.TB,di.Dk),(0,ct.Ch)(i.event_id,i.products,di.TB,di.Dk,t,null===i||void 0===i?void 0:i.location,null===Q||void 0===Q?void 0:Q.userType)):T.startsWith("product")||"embed"===T?((0,si.Si)(E,di.DK,di.K1),(0,ct.Ch)(i.event_id,i.products,di.DK,di.K1,t)):T.startsWith("collection")?((0,si.Si)(E,di.Sx,di.rz),(0,ct.Ch)(i.event_id,i.products,di.Sx,di.rz,t)):((0,si.Si)(E,di.TB,di.Dk),(0,ct.Ch)(i.event_id,i.products,di.TB,di.Dk,t))})(),(0,X.UM)({userInteractionType:Y.O.EVENT_VIEW,widgetSourceDetails:W,event:e[N().activeIndex],productList:e[N().activeIndex].products}))},children:[...Array(Math.min(e.length,3)).keys()].map((n=>(0,f.jsx)(o.qr,{children:n=>{let{isActive:o,isPrev:r,isNext:l,isVisible:a,isDuplicate:d}=n;const s=o?"activeIndex":r?"prevIndex":"nextIndex",c=N()[s];"activeIndex"==s&&(K=Math.max(K,c),0==c&&(K=0));const h=(null===G||void 0===G?void 0:G.length)>0&&o&&a&&(c>i||K<i&&c>0)&&c>=K&&c%(0,p.uSp)(E)==i%(0,p.uSp)(E);return(0,f.jsx)(u.B,{direction:"column",height:window.innerHeight,justifyContent:"center",children:(0,f.jsx)(ei,{event:e[c],showQuestion:h,onBack:M,isPlaying:1==e.length||o&&a,isLast:!1,setLockSwiper:S,onVideoEndedCallback:Z,progressUpdateCallback:t=>{I(t)},showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,mode:"portrait",changeSlide:J})})}},"event-vertical-scroll-slide-"+n)))}),e.length>1&&!C&&(0,p.kb)(E)&&"horizontal"===(0,p.br0)(E)&&"horizontal"===z?(0,f.jsx)(ai,{relativeBottomPercentage:"50%",width:h,handleClick:(t,e)=>{J(0,"down"==e?"right":"left")},fontSize:parseInt(.12*h)}):(0,f.jsx)(f.Fragment,{})]})})})},xi=i(7119);i(3997),i(9130),i(4669),i(9733),i(4365),i(7229),i(6042);const mi=t=>{let{children:e,customClass:i,show:n,closeCallback:o}=t;return xi.createPortal((0,f.jsxs)("div",{className:`whatmore-landscape-modal whatmore-root ${i}`,style:{display:n?"block":"none"},children:[(0,f.jsx)("div",{className:"whatmore-landscape-modal-overlay",onClick:o}),(0,f.jsx)("div",{className:"whatmore-landscape-modal-content",children:e})]}),document.body)};mi.defaultProps={children:(0,f.jsx)("div",{children:"Empty Modal"}),customClass:"",show:!1,closeCallback:()=>!1};var gi=mi;var fi=function(t){var e,[i,a,d,h]=(0,x.A)();const[m]=(0,v.QN)("isInDesignMode"),[g]=(0,v.QN)("isDemoBrand"),[w,j]=(0,v.QN)("isFirstIndicatorRenderDone"),[y,b]=(0,n.useState)(0!=t.eventIndex),{setCloseClickComponent:C}=(0,n.useContext)(Ei),[S,k]=(0,n.useState)(!1),[I]=(0,v.QN)("whatmoreShopId"),[_]=(0,v.QN)("whatmoreLandingLocationType"),z=(0,v.Xd)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:E,whatmoreUserInfo:T}=(0,n.useContext)(q.B),[N,F]=(0,n.useState)(!1),[A,P]=(0,n.useState)(null);function L(){F(!1)}const O=t.events,D=t.eventIndex,R=t.onBack,W=O.concat(O),Q=O.length,V=(null===O||void 0===O||null===(e=O[0])||void 0===e||e.brand,(0,n.useRef)(0));function M(t){L(),setTimeout((()=>{R(t)}),500)}function U(){A&&!A.isEnd&&(0,v.Xd)("whatmoreAllowAutoSlide")&&A.slideNext()}(0,n.useEffect)((()=>(F(!0),()=>{})),[]),C(M);const $=E.landingLocationType,K=E.templateType,[G,Z]=(0,n.useState)({}),J=parseInt(Math.min(5,O.length));return(0,f.jsx)(gi,{show:N,closeCallback:L,customClass:"whatmore-landscape-modal-swipe-view",children:(0,f.jsx)(u.B,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",alignItems:"center",backgroundColor:(0,H.YU)("#000000",13),children:(0,f.jsx)(s.o,{children:(0,f.jsx)(c.az,{height:"fit-content",width:h*J,children:(0,f.jsxs)(o.RC,{onInit:t=>{P(t),(0,X.kz)({userInteractionType:Y.O.EVENT_VIEW,widgetSourceDetails:E,event:O[t.activeIndex],productList:O[t.activeIndex].products,ctaList:O[t.activeIndex].cta})},slidesPerView:J,centeredSlides:!0,allowTouchMove:!1,initialSlide:D,modules:[r.t9,r.Vx,r.FJ,r.Ij,r.dK],navigation:J>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*d),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:h*J,watchSlidesProgress:!0,onSlideChange:t=>{var e;y?b(!1):(w||j(!0),e=O[t.activeIndex],m||g||null===e||void 0===e||!e.event_id||(async()=>{const t=(0,St.Wd)($)+(0,St.gf)(K)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,l.lB)(e),"index"===_?((0,si.Si)(I,di.TB,di.Dk),(0,ct.Ch)(e.event_id,e.products,di.TB,di.Dk,t,null===e||void 0===e?void 0:e.location,null===T||void 0===T?void 0:T.userType)):_.startsWith("product")||"embed"===_?((0,si.Si)(I,di.DK,di.K1),(0,ct.Ch)(e.event_id,e.products,di.DK,di.K1,t)):_.startsWith("collection")?((0,si.Si)(I,di.Sx,di.rz),(0,ct.Ch)(e.event_id,e.products,di.Sx,di.rz,t)):((0,si.Si)(I,di.TB,di.Dk),(0,ct.Ch)(e.event_id,e.products,di.TB,di.Dk,t))})(),(0,X.DG)({userInteractionType:Y.O.VIDEO_PLAYBACK,userInteractionMetadata:G,widgetSourceDetails:E,event:O[t.activeIndex],productList:O[t.activeIndex].products,ctaList:O[t.activeIndex].cta}),(0,X.UM)({userInteractionType:Y.O.EVENT_VIEW,widgetSourceDetails:E,event:O[t.activeIndex],productList:O[t.activeIndex].products,ctaList:O[t.activeIndex].cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[O.length>2&&(0,f.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,f.jsx)(B.A,{onCloseCallback:R})}),W.slice(D,O.length+D).map(((t,e)=>(0,f.jsx)(o.qr,{children:t=>{let{isActive:i,isPrev:n,isNext:o,isVisible:r,isDuplicate:l}=t;if(i)return(0,f.jsx)(u.B,{direction:"column",height:d,width:1*h,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,f.jsx)(c.az,{overflow:"hidden",sx:{borderRadius:"round"==z?"10px":"0px",borderWidth:(0,p.YcK)(I),borderColor:(0,p.Fwt)(I)},children:(0,f.jsx)(ei,{event:O[e%Q],onBack:M,isPlaying:!0,isLast:e%Q===O.length-1,setLockSwiper:k,widthFactor:1,heightFactor:1,onVideoEndedCallback:U,progressUpdateCallback:t=>{Z(t)},showCloseOverlay:(null===O||void 0===O?void 0:O.length)<=2,mode:"landscape"})})});if(o)return(0,f.jsx)(u.B,{direction:"column",height:d,width:h,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{A.slideTo(e%Q,300)},children:(0,f.jsx)(c.az,{overflow:"hidden",sx:{borderRadius:"round"==z?"10px":"0px",borderWidth:(0,p.YcK)(I),borderColor:(0,p.Fwt)(I)},children:(0,f.jsx)(ei,{event:O[e%Q],onBack:M,isPlaying:!1,isLast:e%Q===O.length-1,setLockSwiper:k,widthFactor:1,heightFactor:1,onVideoEndedCallback:U,progressUpdateCallback:t=>{Z(t)},showOverlay:!1,mode:"landscape"})})});if(n&&1===V.current)return(0,f.jsx)(u.B,{direction:"column",height:d,width:h,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{A.slideTo(e%Q,300)},children:(0,f.jsx)(c.az,{overflow:"hidden",sx:{borderRadius:"round"==z?"10px":"0px",borderWidth:(0,p.YcK)(I),borderColor:(0,p.Fwt)(I)},children:(0,f.jsx)(ei,{event:O[e%Q],onBack:M,isPlaying:!1,isLast:e%Q===O.length-1,setLockSwiper:k,widthFactor:1,heightFactor:1,onVideoEndedCallback:U,progressUpdateCallback:t=>{Z(t)},showOverlay:!1,mode:"landscape"})})});try{D+e>=Q-1&&(V.current=1)}catch(a){console.log(a)}return(0,f.jsx)(f.Fragment,{})}},"event-horizontal-scroll-slide"+t.event_id)))]})})})})})},wi=i(340),ji=i(5089),yi=i(572),bi=i(8603);var Ci=function(t){const[e,i,n,o]=(0,x.A)(),[r]=(0,v.QN)("whatmorePrimaryColor"),[l]=(0,v.QN)("whatmoreSecondaryColor"),a="flex-end";return(0,f.jsx)(s.o,{children:(0,f.jsxs)(c.az,{width:o,height:n,backgroundColor:"whiteAlpha.200",backdropBlur:"10px",children:[(0,f.jsx)(u.B,{direction:"column",justifyContent:a,height:"full",width:"full",children:(0,f.jsx)(c.az,{borderRadius:"md",backgroundColor:"transparent",children:(0,f.jsx)(h.g,{width:"full",ratio:o/n,children:(0,f.jsx)(c.az,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+r+", gray, "+l+")"})})})}),(0,f.jsx)(u.B,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:a,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,f.jsx)(c.az,{padding:"2px",margin:"5px",borderRadius:"md",backgroundColor:"transparent",children:(0,f.jsx)(h.g,{width:"full",ratio:9/16,children:(0,f.jsx)(c.az,{width:"full",height:"full",borderRadius:"md",backdropFilter:"auto",backdropBlur:"5px"})})})})]})})};var Si=function(t){var e;const i=t.stories,r=t.onBack,a=t.onStoryCompleteCallback,d=t.isActive,s=null!==(e=t.initialEventIndex)&&void 0!==e?e:0,c=i.events;var[h,p,m,g]=(0,x.A)();const[w,j]=(0,S.A)(),[y]=(0,v.QN)("isInDesignMode"),[b]=(0,v.QN)("isDemoBrand"),[C]=(0,v.QN)("whatmoreShopId"),[k,I]=(0,n.useState)(!0),[_,z]=(0,v.QN)("isFirstIndicatorRenderDone"),[E,T]=(0,n.useState)(null),[N,F]=(0,n.useState)(!1),{whatmoreWidgetSourceDetails:A,whatmoreUserInfo:P}=(0,n.useContext)(q.B),[L,B]=ci(s,c.length);function O(t){r(t)}const D=A.landingLocationType,R=A.templateType;function W(){if(!(0,v.Xd)("whatmoreAllowAutoSlide"))return;L().activeIndex+1>=c.length?a("right"):(B("right"),E&&E.slideNext())}function Q(t){const e=L().activeIndex;"right"==t&&e+1>=c.length||"left"==t&&e-1<0?a(t):(B(t),E&&("left"==t?E.slidePrev():E.slideNext()))}const[V,M]=(0,n.useState)({});return c[L().activeIndex],(0,f.jsx)("div",{children:(0,f.jsx)(o.RC,{speed:1,slidesPerView:1,direction:"horizontal",initialSlide:0,loop:!0,height:m,width:g,watchSlidesProgress:!0,allowTouchMove:!1,onSwiper:t=>{T(t)},onSlideChange:t=>{k?I(!1):(_||z(!0),(0,X.DG)({userInteractionType:Y.O.VIDEO_PLAYBACK,userInteractionMetadata:V,widgetSourceDetails:A,event:c[L().activeIndex],productList:c[L().activeIndex].products,ctaList:c[L().activeIndex].cta}),function(t){const e=(0,St.Wd)(D)+(0,St.gf)(R)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);y||b||(async()=>{(0,l.lB)(t),(0,si.Si)(C,di.TB,di.OL),(0,ct.Ch)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===P||void 0===P?void 0:P.userType)})()}(c[L().activeIndex]),(0,X.kz)({userInteractionType:Y.O.EVENT_VIEW,widgetSourceDetails:A,event:c[L().activeIndex],productList:c[L().activeIndex].products,ctaList:c[L().activeIndex].cta}))},children:[...Array(Math.min(c.length,3)).keys()].map((e=>(0,f.jsx)(o.qr,{children:e=>{let{isActive:n,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=e;if(d){const e=n?"activeIndex":o?"prevIndex":"nextIndex",r=c[L()[e]];return(0,f.jsx)(u.B,{direction:"column",height:m,justifyContent:"center",children:(0,Ye.ij)(r)||(0,Ye.Il)(r)?(0,f.jsx)(Xe,{event:r,totalSiblingEvents:c.length,indexAmongSiblings:L()[e],onBack:O,isPlaying:d&&n&&l,isLast:!1,setLockSwiper:F,onVideoEndedCallback:W,progressUpdateCallback:t=>{M(t)},leftOpenSpaceClickHandler:()=>{Q("left")},midOpenSpaceClickHandler:()=>{j(!w)},rightOpenSpaceClickHandler:()=>{Q("right")},storyId:i.id,source:Ze.N.STORY_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+r.event_id):(0,f.jsx)(f.Fragment,{})})}return(0,f.jsx)(u.B,{direction:"column",height:h,justifyContent:"center",children:(0,f.jsx)(Ci,{})})}},"event-story-view-slide-"+e)))})})};var ki=function(t){const e=t.onBack,i=t.eventsStories,a=t.initialStoryIndex;var[d,s,c,h]=(0,x.A)();const[p]=(0,v.QN)("isInDesignMode"),[m]=(0,v.QN)("isDemoBrand"),[g,w]=(0,n.useState)(!0),[j,y]=(0,v.QN)("isFirstIndicatorRenderDone"),[b,C]=(0,n.useState)(!1),{setCloseClickComponent:S}=(0,n.useContext)(Ei),{slideDirection:k}=(0,n.useContext)(Ei),[I]=(0,v.QN)("whatmoreShopId"),[_,z]=ci(a,i.length),[E,T]=ui("horizontal",50),[N]=hi("vertical",30),F=t.eventIndex,[A,P]=(0,n.useState)(!1),[L,B]=(0,n.useState)(null),{whatmoreWidgetSourceDetails:O,whatmoreUserInfo:D}=(0,n.useContext)(q.B);function R(){P(!1)}function W(t){R(),setTimeout((()=>{e(t)}),500)}(0,n.useEffect)((()=>(P(!0),()=>{})),[]),S(W);const Q=O.landingLocationType,V=O.templateType;function M(t){L&&(0,v.Xd)("whatmoreAllowAutoSlide")&&(z(t),"right"==t?L.slideNext():L.slidePrev())}function H(t,e){M(e)}return(0,f.jsx)(ni(),{isOpen:A,onAfterOpen:function(){},onRequestClose:R,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,f.jsx)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:"#00000088"},onTouchStart:t=>{E(t)},onTouchEnd:t=>{const e=T(t);e&&H(0,e)},onWheel:t=>{N(t,(t=>{H(0,t)}))},children:(0,f.jsx)(o.RC,{speed:1,slidesPerView:1,direction:"horizontal",modules:[r.hw,r.FJ],initialSlide:a,loop:i.length>1,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,onSwiper:t=>{var e,n;B(t),(0,X.kz)({userInteractionType:Y.O.EVENT_VIEW,widgetSourceDetails:O,event:i[_().activeIndex].events[0],productList:null===(e=i[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=i[_().activeIndex].events[0])||void 0===n?void 0:n.cta})},onSlideChange:t=>{var e,n;g?w(!1):(!function(t){const e=(0,St.Wd)(Q)+(0,St.gf)(V)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);p||m||(async()=>{(0,l.lB)(t),(0,si.Si)(I,di.TB,di.OL),(0,ct.Ch)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===D||void 0===D?void 0:D.userType)})()}(i[_().activeIndex].events[0]),(0,X.kz)({userInteractionType:Y.O.EVENT_VIEW,widgetSourceDetails:O,event:i[_().activeIndex].events[0],productList:null===(e=i[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=i[_().activeIndex].events[0])||void 0===n?void 0:n.cta}))},allowTouchMove:!1,cubeEffect:{shadow:!0,slideShadows:!0,shadowOffset:20,shadowScale:.94},children:[...Array(Math.min(i.length,3)).keys()].map((t=>(0,f.jsx)(o.qr,{children:t=>{let{isActive:e,isPrev:n,isNext:o,isVisible:r,isDuplicate:l}=t;const s=e?"activeIndex":n?"prevIndex":"nextIndex";return(0,f.jsx)(u.B,{direction:"column",height:d,justifyContent:"center",children:(0,f.jsx)(Si,{stories:i[_()[s]],onBack:W,isActive:e&&r,isNext:o,isPrev:n,onStoryCompleteCallback:M,nextStories:i[_().nextIndex],prevStories:i[_().prevIndex],initialEventIndex:a==_()[s]?F:0},"event-story-view-"+i[_()[s]].id)})}},"event-vertical-scroll-slide-"+t)))})})})};var Ii=function(t){var e,i,o,[r,l,a,d]=(0,x.A)();const[p]=(0,v.QN)("whatmorePrimaryColor"),[m]=(0,v.QN)("whatmoreSecondaryColor"),g=t.event,w=(t.onBack,n.useRef(),null!==(e=t.showPausedVideo)&&void 0!==e&&e),j=null!==(i=t.heightFactor)&&void 0!==i?i:1,b="flex-end";return d*=null!==(o=t.widthFactor)&&void 0!==o?o:1,a*=j,(0,f.jsx)(s.o,{children:(0,f.jsxs)(c.az,{width:d,height:a,children:[(0,f.jsx)(u.B,{direction:"column",justifyContent:b,height:"full",width:"full",children:(0,f.jsx)(c.az,{children:(0,f.jsx)(h.g,{width:"full",ratio:9/16,children:w?(0,Ye.ij)(g)||(0,Ye.Il)(g)?(0,f.jsx)(Ne.A,{height:"100%",width:"100%",url:g.thumbnail_image,isPlaying:!1,pauseFromPlayTimeInMs:1e3,event:g}):(0,f.jsx)(y._,{width:"full",height:"full",src:g.thumbnail_image,objectFit:"cover",borderRadius:"lg"}):(0,f.jsx)(c.az,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+p+", gray, "+m+")"})})})}),(0,f.jsx)(u.B,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:b,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,f.jsx)(c.az,{children:(0,f.jsx)(h.g,{width:"full",ratio:9/16,children:(0,f.jsx)(c.az,{width:"full",height:"full",backgroundColor:"blackAlpha.400"})})})})]})})};var _i=function(t){var e,i,[a,d,h,p]=(0,x.A)();const[m]=(0,v.QN)("isInDesignMode"),[g]=(0,v.QN)("isDemoBrand"),[w,j]=(0,v.QN)("isFirstIndicatorRenderDone"),[y,b]=(0,n.useState)(0!=t.eventIndex),{setCloseClickComponent:C}=(0,n.useContext)(Ei),[S,k]=(0,n.useState)(!1),[I]=(0,v.QN)("whatmoreShopId"),{whatmoreWidgetSourceDetails:_,whatmoreUserInfo:z}=(0,n.useContext)(q.B),[E,T]=(0,n.useState)(!1),[N,F]=(0,n.useState)(null);function A(){T(!1)}t.events;const P=t.eventIndex,L=t.onBack,O=t.eventsStories,D=t.initialStoryIndex,R=null===(e=O[0])||void 0===e||null===(i=e.events[0])||void 0===i?void 0:i.brand;function W(t){A(),setTimeout((()=>{L(t)}),500)}(0,n.useEffect)((()=>(T(!0),()=>{})),[]),C(W);const Q=_.landingLocationType,V=_.templateType;function M(t){N&&!N.isEnd&&("right"==t?N.slideNext():N.slidePrev())}const H=parseInt(Math.min(5,O.length));return(0,f.jsx)(gi,{show:E,closeCallback:A,customClass:"whatmore-landscape-modal-stories-view",children:(0,f.jsxs)(u.B,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",alignItems:"center",backgroundColor:"blackAlpha.800",children:[(0,f.jsx)(s.o,{children:(0,f.jsx)(c.az,{height:"fit-content",width:p*H,children:(0,f.jsxs)(o.RC,{onInit:t=>{var e,i;F(t),(0,X.kz)({userInteractionType:Y.O.EVENT_VIEW,widgetSourceDetails:_,event:O[t.activeIndex].events[0],productList:null===(e=O[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=O[t.activeIndex].events[0])||void 0===i?void 0:i.cta})},slidesPerView:H,centeredSlides:!0,allowTouchMove:!1,initialSlide:D,modules:[r.t9,r.Vx,r.FJ],navigation:H>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*h),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:p*H,watchSlidesProgress:!0,onSlideChange:t=>{var e,i;y?b(!1):(w||j(!0),function(t){const e=(0,St.Wd)(Q)+(0,St.gf)(V)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);m||g||(async()=>{(0,l.lB)(t),(0,si.Si)(I,di.TB,di.OL),(0,ct.Ch)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===z||void 0===z?void 0:z.userType)})()}(O[t.activeIndex].events[0]),(0,X.kz)({userInteractionType:Y.O.EVENT_VIEW,widgetSourceDetails:_,event:O[t.activeIndex].events[0],productList:null===(e=O[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=O[t.activeIndex].events[0])||void 0===i?void 0:i.cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[O.length>2&&(0,f.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,f.jsx)(B.A,{onCloseCallback:L})}),O.map(((t,e)=>(0,f.jsx)(o.qr,{children:i=>{let{isActive:n,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=i;if(n){const i=1;return(0,f.jsx)(u.B,{direction:"column",height:h,width:p*i,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,f.jsx)(c.az,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,f.jsx)(Si,{stories:t,onBack:W,isActive:n&&l,isNext:!1,isPrev:!1,onStoryCompleteCallback:M,initialEventIndex:D==e?P:0,showCloseOverlay:(null===O||void 0===O?void 0:O.length)<=2},"event-story-view-"+t.id)})})}return o||r?(0,f.jsx)(u.B,{direction:"column",height:h,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{N.slideTo(e,300)},children:(0,f.jsx)(c.az,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,f.jsx)(Ii,{showPausedVideo:!0,event:O[e].events[0],onBack:W,isPlaying:!1,setLockSwiper:k})})}):(0,f.jsx)(f.Fragment,{})}},"event-horizontal-scroll-slide-"+e)))]})})}),(0,f.jsx)(s.o,{children:(0,f.jsx)(Te,{brandName:R,height:.04*h,width:.1*p,fontSize:.02*h})})]})})};const zi=(0,bi.A)({key:"whatmore-css-sv"}),Ei=(0,n.createContext)({isIOS:!1,totalEvents:0,closeClickComponent:null,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:"vertical",showSwipeIndicator:!0,questionList:[]});var Ti=function(t){var e,i,o;const[r,l,a]=(0,Ie.A)(),[d]=(0,v.QN)("whatmoreShopId"),{whatmoreRootId:s}=(0,n.useContext)(q.B),{whatmoreIsStoriesTemplate:c}=(0,n.useContext)(q.B);var u=t.events,h=t.index,x=t.onBack,m=t.eventsStories,g=t.initialStoryIndex,w=(0,p.M3_)(d),j="portrait"===r?null!==(e=t.slideDirection)&&void 0!==e?e:"vertical":null!==(i=t.slideDirection)&&void 0!==i?i:u.length>1?"horizontal":"vertical",y="portrait"===r?!(0,p.kb)(d)&&!c:(0,p.DNc)(d);return(0,n.useLayoutEffect)((()=>{(0,p.hpk)(d)&&(window.location.href.includes(w)?history.replaceState(null,"","#"+w):history.pushState(null,"","#"+w),window.addEventListener("popstate",(()=>{window.location.href.includes(w)||x()})))}),[]),delete ji.Ay.styles.global,c?(0,f.jsx)(yi.C,{value:zi,children:(0,f.jsx)(wi.s,{theme:ji.Ay,cssVarsRoot:s,resetCSS:!1,children:(0,f.jsx)(Ei.Provider,{value:{isIOS:(0,qe.MN)(),totalEvents:u.length,closeClickComponent:x,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:j,showSwipeIndicator:y},children:"portrait"===r?(0,f.jsx)(ki,{eventsStories:m,initialStoryIndex:g,onBack:x,eventIndex:h}):(0,p.Rdb)(d)?(0,f.jsx)(_i,{eventsStories:m,initialStoryIndex:g,onBack:x,eventIndex:h}):(0,f.jsx)(ki,{eventsStories:m,initialStoryIndex:g,onBack:x,eventIndex:h})})})}):(0,f.jsx)(yi.C,{value:zi,children:(0,f.jsx)(wi.s,{theme:ji.Ay,cssVarsRoot:s,resetCSS:!1,children:(0,f.jsx)(Ei.Provider,{value:{isIOS:(0,qe.MN)(),totalEvents:u.length,closeClickComponent:x,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:j,showSwipeIndicator:y,questionList:(0,p.JwJ)(d)?null===(o=JSON.parse(localStorage.getItem("_whatmore_brand_questions")))||void 0===o?void 0:o.questionList:[]},children:"portrait"===r?(0,f.jsx)(vi,{events:u,eventIndex:h,onBack:x}):(0,f.jsx)(fi,{events:u,eventIndex:h,onBack:x})})})})}},5144:function(t,e,i){i.d(e,{jd:function(){return o}});var n=i(8283);const o=`\n ${n.i7`
|
77
77
|
0% { transform: scale(1); }
|
78
78
|
50%, { transform: scale(0.95); }
|
79
79
|
100% { transform: scale(1); }
|