whatmore-react-assets 1.0.1611 → 1.0.1612

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whatmore-react-assets",
3
- "version": "1.0.1611",
3
+ "version": "1.0.1612",
4
4
  "description": "public repo for all whatmore js and css assets",
5
5
  "main": "whatmore.js",
6
6
  "scripts": {
@@ -84,7 +84,7 @@
84
84
  0% {
85
85
  transform: translateY(100%);
86
86
  }
87
- `} 0.5s`,zt=null===Q||void 0===Q||null===(e=Q.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"))})),[Tt,Et]=(0,n.useState)(-1!==zt?null===(i=Q.options)||void 0===i||null===(o=i[zt])||void 0===o||null===(r=o.values)||void 0===r?void 0:r[0]:""),[Nt,Pt]=(0,n.useState)({});(0,n.useEffect)((()=>{-1!==zt&&"whatmore"!==(0,h.NCy)(jt)&&async function(){const t=await(0,st._N)(U);Pt(t)}()}),[]);let At=-1,Ft=-1!==zt&&null!==Nt&&void 0!==Nt&&Nt.product&&(null===Nt||void 0===Nt||null===(a=Nt.product)||void 0===a||null===(l=a.images)||void 0===l?void 0:l.length)>=(null===Nt||void 0===Nt||null===(d=Nt.product)||void 0===d||null===(u=d.options)||void 0===u||null===(p=u[zt])||void 0===p||null===(g=p.values)||void 0===g?void 0:g.length)?null===Nt||void 0===Nt||null===(x=Nt.product)||void 0===x||null===(w=x.images)||void 0===w?void 0:w.map((t=>{var e,i,n,o,r,a,l,d,s,c,u,p,h,v;const m=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[m])||void 0===r||null===(a=r.values)||void 0===a?void 0:a[Math.min(++At,(null===Nt||void 0===Nt||null===(l=Nt.product)||void 0===l||null===(d=l.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===(p=u.options)||void 0===p||null===(h=p[m])||void 0===h||null===(v=h.values)||void 0===v?void 0:v[Math.max(0,At)],src:null===t||void 0===t?void 0:t.src}})):[],Rt=[];if("whatmore"==(0,h.NCy)(jt)&&(null===Q||void 0===Q||null===(y=Q.images)||void 0===y?void 0:y.length)>0){var Lt;var Bt;if(-1!==(null===Q||void 0===Q||null===(Lt=Q.options)||void 0===Lt?void 0:Lt.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"))}))))Rt=null===Q||void 0===Q||null===(Bt=Q.images)||void 0===Bt?void 0:Bt.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===(j=b.options)||void 0===j||null===(S=j[zt])||void 0===S||null===(k=S.values)||void 0===k?void 0:k.length)&&(Ft=[]),(0,f.jsxs)(xt.s,{sx:{"&::-webkit-scrollbar":{width:"0px"}},id:"whatmore-shopnow-view",className:"wht-shn-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:It,children:[(0,f.jsx)(te,{setOpenShopNow:X,setLockSwiper:$,FONT_SIZE:W}),(0,f.jsx)(s.o,{marginBottom:"10px",px:"20px",py:"5px",children:(0,f.jsx)(xt.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,h.YcK)(jt),borderColor:(0,h.Fwt)(jt)},children:(0,f.jsx)(xt.s,{width:"100%",children:(0,f.jsx)(ae.c,{renderElement:t=>(0,f.jsx)(f.Fragment,{children:(0,f.jsx)(c.az,{width:B+"px",height:O+"px",children:(0,f.jsx)(_._,{width:B+"px",height:O+"px",borderRadius:"round"==(null===bt||void 0===bt?void 0:bt.whatmoreUITheme)?"lg":null,src:(0,ft.b)(t.eventData.src,"&width=400&height=400"),alt:U.handle,sx:{objectFit:(0,h.KZe)(jt)+" !important"},fallback:(0,f.jsx)(D.A,{width:B+"px",height:O+"px",borderRadius:"round"==(null===bt||void 0===bt?void 0:bt.whatmoreUITheme)?"10px":"0px"})})})}),dataList:Ft.length>0&&!Ft.includes(null)?null===(I=Ft)||void 0===I?void 0:I.filter((t=>(null===t||void 0===t?void 0:t.color)==Tt)):Rt.length>0?[null===(z=Rt)||void 0===z?void 0:z.find((t=>(null===t||void 0===t?void 0:t.color)==Tt))]:null===Q||void 0===Q||null===(T=Q.images)||void 0===T?void 0:T.map((t=>({src:t.includes("https")?t:"https:"+t}))),spacing:10,defaultHeight:B+"px",defaultWidth:O+"px",retainAlreadyRenderedElements:!0,isScroll:!0})})})}),(0,f.jsx)(ne,{data:Q,product:U,PRODUCT_TILE_HEIGHT:L,PRODUCT_TILE_WIDTH:R,FONT_SIZE:W,getVariantPrice:se,selectedVariantId:nt,itemPrice:lt,itemQuantity:rt,setItemQuantity:at,thumbnailImage:yt}),(null===Q||void 0===Q||null===(E=Q.variants)||void 0===E?void 0:E.length)>0&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(s.o,{paddingTop:"4px",width:"100%",children:(0,f.jsx)(gt.c,{color:(0,h.R6d)(jt),size:"xs",width:"90%"})}),(0,f.jsx)(re,{data:Q,dividerColor:(0,h.R6d)(jt),setSelectedColor:Et,finalArr:Ft,finalArrExternal:Rt,product:U,PRODUCT_TILE_HEIGHT:L,PRODUCT_TILE_WIDTH:R,FONT_SIZE:W,selectOptionFirstHandler:St,selectOptionSecondHandler:Ct,selectOptionThirdHandler:kt,getVariantPrice:se,selectedOptionFirst:K,selectedOptionSecond:Z,selectedOptionThird:et,selectedVariantId:nt,isVariantAvailable:G})]}),(0,h.wW8)(jt)&&((null===Q||void 0===Q?void 0:Q.description)||(null===Q||void 0===Q?void 0:Q.body_html))&&(0,f.jsx)(ee,{PRODUCT_TILE_HEIGHT:L,FONT_SIZE:W,data:Q,handleToggle:()=>M(!V),show:V}),(0,f.jsx)(c.az,{sx:{pointerEvents:"none"},paddingTop:"20px",opacity:0,children:(0,f.jsx)(Zt,{position:"relative",data:Q,FONT_SIZE:W,product:U})}),(0,f.jsx)(Zt,{position:"fixed",selectedVariantId:nt,data:Q,FONT_SIZE:W,PRODUCT_TILE_WIDTH:R,product:U,itemQuantity:rt,cartItemCount:ut,addToCartFlag:ht,setAddToCartFlag:vt,soldOutFlag:mt,setSoldOutFlag:wt,event:H})]})}const de=(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},se=(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},ce=(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},ue=(0,n.createContext)({setShowOptionsChart:null});var pe=function(t){const e=t.event,i=t.data,o=t.currentProduct,r=t.setOpenShopNow,a=t.setLockSwiper,[l,d]=(0,n.useState)(!1);return(0,f.jsx)(ue.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)(le,{data:i,event:e,product:o,setOpenShopNow:r,setLockSwiper:a})})}),l?(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)(Yt,{data:i,event:e,product:o,setShowOptionsChart:()=>{d(!1)}})})}):(0,f.jsx)(f.Fragment,{})]})})};var he=function(t){var e,[i,o,r,a]=(0,m.A)();const[l,d]=(0,n.useState)(!1),[x,y]=(0,n.useState)(),[_,b]=(0,n.useState)(),j=(0,v.Xd)("whatmoreShopId"),S=t.event,C=t.onBack,k=n.useRef(),I=t.isPlaying,z=t.isLast,T=t.setLockSwiper,E=t.selectedVariantId,N=null===(e=t.showOverlay)||void 0===e||e,P="center";return(0,f.jsx)(s.o,{children:(0,f.jsxs)(c.az,{width:a,height:r,sx:{overflow:"hidden"},children:[(0,f.jsx)(u.B,{direction:"column",justifyContent:P,height:"full",width:"full",children:(0,f.jsx)(c.az,{borderRadius:"md",backgroundColor:"white",children:(0,f.jsx)(p.g,{width:"full",ratio:a/r,children:(0,f.jsx)(w,{height:"100%",width:"100%",url:S.event_hls_url,isPlaying:I,event:S})})})}),N?(0,f.jsx)(u.B,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:P,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)(Xt,{focusRef:k,event:t.event,isLast:z,onCloseCallback:C,productClickHandler:async t=>{const e=await(0,g.M)(t,(0,h.NCy)(j),j);b(t),y(e),d(!0),T(!0)}})})}):(0,f.jsx)(f.Fragment,{}),!0===l?(0,f.jsx)(u.B,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:P,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:k,event:t.event,isLast:z,onCloseCallback:()=>C(),setLockSwiper:T,data:x,currentProduct:_,setOpenShopNow:d,selectedVariantId:E})})}):(0,f.jsx)("div",{})]})})};const ve=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,a]=(0,m.A)();const[l]=(0,v.QN)("whatmoreSecondaryColor"),[d]=(0,v.QN)("whatmoreSecondaryColorShade900"),s=t.progress,p=null!==(e=t.totalSiblings)&&void 0!==e?e:1,h=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(p).keys()].map((t=>(0,f.jsx)(u.B,{width:"100%",height:.004*r+"px",backgroundColor:t<h?l:d+"99",borderRightRadius:"lg",borderLeftRadius:"lg",direction:"row",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",sx:{display:"block !important"},children:t==h?(0,f.jsx)(c.az,{height:"100%",width:s+"%",bgColor:l,borderRightRadius:"lg",borderLeftRadius:"lg",sx:{display:"block !important"}}):(0,f.jsx)(f.Fragment,{})},"event-progress-bar-slab-"+t)))})}var ge=i(3788),xe=i(758);const fe=t=>t>=1e3?(t/1e3).toFixed(1)+"k":t,we=()=>"undefined"!==typeof window&&window.innerWidth>=1024;var ye=function(t){var e,i,o,r,l,d=t.whatmoreShareTemplateId;const p=t.whatmoreShareStoryId,g=t.whatmoreShareEventId,x=t.event,w=null===(e=t.showShareText)||void 0===e||e,_=null!==(i=t.shareButtonBottomMargin)&&void 0!==i?i:0,b=(0,v.Xd)("whatmoreShopId"),j=(0,v.Xd)("isInDesignMode"),S=(0,v.Xd)("isDemoBrand"),C=(0,v.Xd)("whatmorePrimaryFont"),k=(0,v.Xd)("websiteLanguage"),{whatmoreWidgetSourceDetails:I}=(0,n.useContext)(U.B),[z,T,E,N]=(0,m.A)(),P=null!==(o=t.iconSize)&&void 0!==o?o:.1*N*(0,h.xkB)(b);function A(){const e=(0,v.Xd)("whatmoreLandingLocationType");var i;!function(t){j||S||(async()=>{(0,a.Zh)(t)})()}(x),(e.startsWith("product")||"embed"===e)&&(d="te"),i="event_product_link"===(0,h.moP)(b)?x.products[0].product_link||"":window.location.pathname,i=("event_product_link"===(0,h.moP)(b)?"":window.location.hostname)+i+"?wtt="+d+"&wsid="+p+"&weid="+g,(0,h.BLb)(b)&&(i=i+"&"+(0,h.VCz)(b)+"&utm_campaign=video-share&utm_medium="+e);const n={title:(0,h.kZI)(b),text:`${(0,h.dmA)(b)} \n ${i} ${"50529403072"!==b&&(0,h.ZX9)(b)?"\n \n -via Whatmore":""}`};navigator.share&&!we?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:_+"px"},children:(0,f.jsxs)(u.B,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[(0,f.jsx)(xe.A,{sx:{transform:"scaleX(-1)",color:"white",fontSize:P,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),A(),(0,Q.kz)({userInteractionType:H.O.VIDEO_SHARE_CTA_CLICKED,widgetSourceDetails:I,event:x,productList:x.products,ctaList:x.cta})}}),w&&(0,h.ViG)(b)?(0,f.jsxs)(y.E,{fontSize:.3*P+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:C+" !important",color:"white !important",maxWidth:"48px",wordWrap:"break-word"},children:["\xa0",x.total_share>(0,h.vDV)(b)?fe(x.total_share):null!==(r=null===et||void 0===et||null===(l=et[k])||void 0===l?void 0:l.share)&&void 0!==r?r:"Share","\xa0"]}):(0,f.jsx)(f.Fragment,{})]})})})},_e=i(3420),be=i(7170);var je=function(t){var e,i,o;const r=(0,v.Xd)("whatmoreShopId"),l=(0,v.Xd)("whatmorePrimaryFont"),d=(0,v.Xd)("whatmoreLikedEvents"),p=(0,v.Xd)("isInDesignMode"),g=(0,v.Xd)("isDemoBrand"),x=(0,v.Xd)("websiteLanguage"),{whatmoreWidgetSourceDetails:w}=(0,n.useContext)(U.B),_=t.event,[b,j]=(0,n.useState)(null!==(e=d[_.event_id])&&void 0!==e&&e),[S,C,k,I]=(0,m.A)(),z=.1*I*(0,h.xkB)(r);function T(t,e){p||g||(async()=>{(0,a.$B)(t,e)})()}function E(){(0,v.t2)("whatmoreLikedEvents",{...d,[_.event_id]:!b}),b?(T(_,-1),(0,Q.kz)({userInteractionType:H.O.VIDEO_UNLIKED,widgetSourceDetails:w,event:_,productList:_.products,ctaList:_.cta})):(T(_,1),(0,Q.kz)({userInteractionType:H.O.VIDEO_LIKED,widgetSourceDetails:w,event:_,productList:_.products,ctaList:_.cta})),j(!b)}const N=_.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)(be.A,{sx:{boxShadow:3,color:(0,h.MJ6)(r),fontSize:z,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),E()}}):(0,f.jsx)(_e.A,{sx:{boxShadow:3,color:"white",fontSize:z,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),E()}}),(0,f.jsx)(f.Fragment,{children:(0,h.FlI)(r)?(0,f.jsxs)(y.E,{fontSize:.3*z+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:l+" !important",color:"white !important",position:"relative",bottom:"5px"},children:["\xa0",N>=(0,h.LGx)(r)?fe(N):null!==(i=null===et||void 0===et||null===(o=et[x])||void 0===o?void 0:o.like)&&void 0!==i?i:"Like","\xa0"]}):(0,f.jsx)(f.Fragment,{})})]})})})};const Se=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 Ce=i(1941);const ke=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"})})})},Ie=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 ze=t=>{const e=t.shareText,[i,o]=(0,n.useState)("Copy link"),[r,a]=(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)($t.A,{className:"close-rounded-icon",onClick:e=>{e.stopPropagation(),t.setIsModalOpen(!1)}})]}),(0,f.jsx)("div",{}),(0,f.jsx)(gt.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)(Se,{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)(ke,{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"),a("green")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,f.jsx)(Ie,{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 n=null===(e=t.brandName)||void 0===e?void 0:e.replace(/\s+/g,"_"),o=(0,v.Xd)("whatmorePrimaryFont"),r=(0,v.Xd)("whatmoreShopId"),a=null!==(i=t.fontSize)&&void 0!==i?i:"8",[l]=(0,Ce.A)(),d="landscape"===l?"customer_referral_desktop":"customer_referral_mobile",s="60183543963"==r,p=(0,v.Xd)("whatmoreLandingLocationType"),m=t.isOutside||!p.includes("index")||r.includes("STR")?`https://www.whatmore.ai/shoppable-videos?utm_source=${n}&utm_medium=referral&utm_campaign=${d}`:`https://apps.shopify.com/whatmore-live?utm_source=${n}&utm_medium=referral&utm_campaign=${d}`,g=s?"https://www.letsmapit.in/":m;return(0,f.jsx)(St.N,{href:g,isExternal:!0,textDecoration:"none",children:(0,h.SGs)(r)&&(0,f.jsxs)(u.B,{direction:"row",justifyContent:"flex-start",alignItems:"center",width:"fit-content",spacing:"6px",paddingLeft:"2px",paddingRight:"2px",children:[(0,f.jsx)("p",{ref:e=>{var i;e&&(e.style.setProperty("font-family",o,"important"),e.style.setProperty("font-size",a+"px","important"),e.style.setProperty("text-align","center","important"),e.style.setProperty("color",null!==(i=t.color)&&void 0!==i?i:"white"))},children:s?"marketed by":"Powered By"}),s?(0,f.jsx)(c.az,{padding:"1px 4px",bg:"#fff",width:"fit-content",children:(0,f.jsx)("img",{src:"https://whatmore-other-assets.b-cdn.net/gudworld/Letsmapit_Logo.png",style:{objectFit:"contain",width:1.7*a,backgroundColor:"transparent",borderRadius:"0px"},alt:"letsmapit"})}):(0,f.jsxs)(c.az,{display:"flex",alignItems:"center",gap:"4px",children:[(0,f.jsx)("img",{src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",width:1.3*a,backgroundColor:"transparent",borderRadius:"0px"},alt:"whatmore"}),(0,f.jsx)("p",{ref:e=>{var i;e&&(e.style.setProperty("font-family",o,"important"),e.style.setProperty("font-size",a+"px","important"),e.style.setProperty("text-align","center","important"),e.style.setProperty("color",null!==(i=t.color)&&void 0!==i?i:"white"))},children:"Whatmore"})]})]})})},Ee=i(9879),Ne=i(9556),Pe=i(2209);var Ae=()=>(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 Fe=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),[a,l]=(0,n.useState)(null),[d,s]=(0,n.useState)(null),p=(0,n.useRef)(null),h=(0,n.useContext)(U.B);return(0,n.useEffect)((()=>{if(o){const e=setTimeout((()=>{t.setIsQuestionVisible(!1)}),1e3);return()=>clearTimeout(e)}}),[o]),(0,n.useEffect)((()=>{!o&&p.current&&s(p.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:p,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,Q.kz)({userInteractionType:H.O.QUESTION_CLOSED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id},widgetSourceDetails:h})},children:(0,f.jsx)(Pe.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)(Ne.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)(Ae,{}),(0,f.jsx)(Ne.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:a===e?"gray.200":"white",borderColor:a===e?"gray.400":"gray.200",_hover:{bg:"gray.200"},onClick:()=>(e=>{var i;l(e),r(!0),(0,Q.kz)({userInteractionType:H.O.QUESTION_ANSWERED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(i=t.question)||void 0===i?void 0:i.id,response:e},widgetSourceDetails:h})})(e),transition:"background-color 0.2s, border-color 0.2s",display:"flex",alignItems:"center",width:"100%",children:(0,f.jsx)(y.E,{py:5,color:"gray.800",children:e})},i)))})})]})},Re=i(9935);var Le=t=>{var e,i;const[o,r]=(0,n.useState)(""),[a,l]=(0,n.useState)(""),[d,s]=(0,n.useState)(!1),[u,p]=(0,n.useState)(!1),m=(0,v.Xd)("whatmoreShopId"),g=(0,v.Xd)("whatmoreSecondaryColor"),x=(0,v.Xd)("whatmorePrimaryFont"),w=null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.title,_=(0,n.useContext)(U.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,Q.kz)({userInteractionType:H.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:_})):l("Please enter valid contact info.")},j=()=>{var e;t.setIsQuestionVisible(!1),(0,Q.kz)({userInteractionType:H.O.QUESTION_CLOSED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id},widgetSourceDetails:_})};return(0,f.jsx)(xt.s,{bg:g,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)(A.A,{onCloseCallback:j})}),(0,f.jsxs)(c.az,{position:"relative",width:"70%",onClick:()=>{const t=(0,h.TH)(m);navigator.clipboard.writeText(t).then((()=>{p(!0),setTimeout((()=>{j()}),1e3),setTimeout((()=>p(!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,h.TH)(m)}),(0,f.jsx)(Re.A,{sx:{color:u?{whatmoreSecondaryColor:g}:"gray",cursor:"pointer",marginLeft:"2%"}})]}),u&&(0,f.jsx)(c.az,{padding:"4%",position:"absolute",left:"50%",transform:"translateX(-50%)",bg:g,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)(y.E,{fontFamily:x,fontSize:"22px",fontWeight:"bold",children:w})}),(0,f.jsx)(c.az,{marginBottom:"10%",fontSize:"md",children:(0,h.aRV)(m)})]}),(0,f.jsx)(c.az,{position:"fixed",top:"2%",right:"2%",zIndex:20,children:(0,f.jsx)(A.A,{onCloseCallback:j})}),(0,f.jsxs)(xt.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:x,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),a&&l("")},onKeyDown:t=>{"Enter"===t.key&&b()},style:{fontSize:"1em",border:"none",outline:"none",width:"100%"}})}),a&&(0,f.jsx)(y.E,{color:"red.500",mb:"4% !important",fontSize:"md",textAlign:"center",width:"100%",children:a}),(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)(y.E,{fontFamily:x,fontSize:"0.8em",padding:"2%",color:g,children:"SUBMIT"})})]})]})})};var Be=t=>{const[e,i]=(0,n.useState)(null);return(0,f.jsx)(c.az,{children:!e&&(0,f.jsx)(Le,{question:t.question,onEmailSubmit:t=>{i(t)},setIsQuestionVisible:t.setIsQuestionVisible,placeholder:t.placeholder})})};var Oe=t=>{var e;const[i,o]=(0,n.useState)(null),r=t.questionIndex,a=t.questionList;if((0,n.useEffect)((()=>{if(!(r>=a.length))return()=>(0,lt.Hm)()}),[]),r>=a.length)return;const l=null===a||void 0===a?void 0:a[r];return"string"===(null===l||void 0===l?void 0:l.type)||"number"===(null===l||void 0===l?void 0:l.type)?(0,f.jsx)(c.az,{children:(0,f.jsx)(Be,{setIsQuestionVisible:t.setIsQuestionVisible,question:l,placeholder:"number"===(null===l||void 0===l?void 0:l.type)?"Enter your phone number":"Enter your email"})}):(0,f.jsx)(c.az,{children:(0,f.jsx)(Fe,{question:l,options:null===l||void 0===l||null===(e=l.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})})},De=i(6118);function We(t){var e;const i=t.event,[o,r,a,l]=(0,m.A)(),[d]=(0,v.QN)("whatmorePrimaryFont"),{whatmoreIsStoriesTemplate:p}=(0,n.useContext)(U.B),[g]=(0,v.QN)("whatmoreSecondaryColor"),[x]=(0,v.QN)("whatmoreShopId"),w=(0,h.ivI)(x),_=null!==(e=(0,h.qAx)(x))&&void 0!==e?e:[g,w,g,w,g],b=(0,n.useRef)(null);(0,n.useEffect)((()=>{b.current&&b.current.play()}),[]);const j=(0,ge.s)(null===i||void 0===i?void 0:i.storyset_thumbnail_image);return(0,f.jsx)(f.Fragment,{children:p?(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 "+_[0]+"50, 0px -2px 1px 0px "+_[1]+"50, 2px 0px 1px 0px "+_[2]+"50, -2px 0px 1px 0px "+_[3]+"80, 2px -2px 1px 0px "+_[4]+"80, -2px 2px 1px 0px "+_[0]+"DA, 2px 2px 1px 0px "+_[1]+"DA, -2px -2px 1px 0px "+_[2]+"DA"},children:"video"==(0,ft.B)(j)?(0,f.jsx)(Ee.A,{height:"100%",width:"100%",poster:null===i||void 0===i?void 0:i.thumbnail_image,url:j,isPlaying:!0,event:{event_type:"video"},borderRadius:"50%"}):(0,f.jsx)("img",{src:j,style:{objectFit:"cover",height:"100%",width:"100%",backgroundColor:"white"}})})}),(0,f.jsx)(s.o,{children:(0,f.jsx)(y.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,l,d]=(0,Ce.A)(),[s]=(0,v.QN)("isInDesignMode"),[p]=(0,v.QN)("isDemoBrand"),[g,x]=(0,v.QN)("isProductSwiperCatalogOpen"),[w,_]=(0,v.QN)("isFirstIndicatorRenderDone"),[j]=(0,v.QN)("whatmoreShopId"),S=(0,n.useContext)(zi),{whatmoreEventsBrowsingTemplate:C}=(0,n.useContext)(U.B),[k,I,z,T]=(0,m.A)(),E=(0,v.Xd)("whatmorePrimaryFont"),P=t.event,F=t.storySetId,R=t.isLast,L=t.onCloseCallback,B=t.focusRef,D=t.productClickHandler,W=t.videoPlayingData,V=t.totalSiblingEvents,M=t.indexAmongSiblings,X=t.leftOpenSpaceClickHandler,$=t.midOpenSpaceClickHandler,Y=t.rightOpenSpaceClickHandler,{whatmoreWidgetSourceDetails:q}=(0,n.useContext)(U.B),G=.1*T,[K,J]=(0,n.useState)(!1),[Z,tt]=(0,n.useState)([]);function et(){var t;s||p||(async()=>{(0,a.A9)(P,1)})(),(0,Q.kz)({userInteractionType:H.O.WHATSAPP_ICON_CLICKED,widgetSourceDetails:q,event:P,productList:null===P||void 0===P?void 0:P.products,ctaList:null===P||void 0===P?void 0:P.cta});const e=P.products.map((t=>`${t.product_link} \n`)),i=(0,h.dzp)(j),n="50529403072"==j?`Hey, I saw a video on your website, need more info about this: \n${e}`:`Hey, I am interested in ${P.products.length>1?"these products":"this product"} I saw on ${null===(t=P.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")}const it=t=>{nt.current&&!nt.current.contains(t.target)&&J(!1)},nt=(0,n.useRef)(null);(0,n.useEffect)((()=>(K?document.addEventListener("click",it):document.removeEventListener("click",it),()=>{document.removeEventListener("click",it)})),[K]);const ot=(()=>{const t=(0,v.Xd)("whatmoreShopId");return"Free"==(0,h.yt9)(t)})()&&"portrait"==r;return(0,f.jsxs)(c.az,{width:"full",height:"full",borderRadius:"md",children:[t.isQuestionVisible&&(0,f.jsx)(Vt.S,{userInteractionType:H.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&&!p,children:(0,f.jsx)(Oe,{questionList:t.questionList,questionIndex:t.qIndex,setIsQuestionVisible:t.setIsQuestionVisible})}),K&&(0,f.jsx)("div",{ref:nt,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)(ze,{shareText:Z,setShareText:tt,iconSize:G,isModalOpen:K,setIsModalOpen:J})}),(!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:[S.showVideoPlayingData?(0,f.jsx)(u.B,{direction:"row",width:"100%",height:"fit-content",marginTop:"5px",justifyContent:"center",children:(0,f.jsx)(me,{progress:ve(W.current_time,W.video_duration),totalSiblings:V,indexAmongSiblings:M})}):(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)(We,{event:P,width:T}),(0,f.jsxs)(u.B,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,_t.Yt)(C)?(0,f.jsx)(ye,{whatmoreShareTemplateId:(0,_t.Gy)(C),whatmoreShareStoryId:F,whatmoreShareEventId:P.event_id,event:P,showShareText:!1,iconSize:.098*T,setIsModalOpen:J,setShareText:tt}):(0,f.jsx)(f.Fragment,{}),(0,f.jsx)(b.A,{focusRef:B}),("landscape"!==r||t.showCloseOverlay)&&(0,f.jsx)(A.A,{event:P,onCloseCallback:L})]})]})})]}),"78232846646"===j&&"portrait"===r&&S.totalEvents>1&&(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)(De.A,{style:{fontSize:1.3*G+"px",transform:"rotate(180deg)",color:"white",cursor:"pointer",filter:"drop-shadow(0 0 5px black)"},onClick:()=>{t.changeSlide(P,"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)(De.A,{style:{fontSize:1.3*G+"px",color:"white",cursor:"pointer",filter:"drop-shadow(0 0 5px black)"},onClick:()=>{t.changeSlide(P,"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:()=>{X()},sx:{display:"block !important"}}),(0,f.jsx)(c.az,{width:"34%",height:"100%",onClick:()=>{$()},sx:{display:"block !important"}}),(0,f.jsx)(c.az,{width:"33%",height:"100%",onClick:()=>{Y()},sx:{display:"block !important"}})]}),(0,f.jsxs)(c.az,{width:"full",height:"fit-content",children:[S.totalEvents>1&&!w&&S.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)(O,{swipeUp:!R})})}):null,(0,f.jsx)(c.az,{width:"fit-content",height:"fit-content",position:"absolute",right:4,bottom:"30%",children:(0,f.jsxs)(c.az,{display:"flex",flexDirection:"column",alignItems:"center",children:[(0,h.oZc)(j)&&!(0,_t.Yt)(C)?(0,f.jsx)(c.az,{width:"fit-content",paddingY:"12px",position:"relative",children:(0,f.jsxs)(u.B,{gap:"4px",direction:"column",alignItems:"center",cursor:"pointer",onClick:et,children:[(0,f.jsx)(Se,{iconSize:.7*G,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,f.jsx)(y.E,{fontSize:G*(0,h.LOH)(j)+"px",fontWeight:"bold",align:"center",style:{marginTop:0},sx:{fontFamily:E+" !important",color:"white !important"},children:(0,h.wtw)(j)})]})}):(0,f.jsx)(f.Fragment,{}),(0,h.MdM)(j)&&(0,f.jsxs)(c.az,{height:"fit-content",position:"relative",children:[(0,f.jsx)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,f.jsx)(je,{event:P})}),(0,_t.Yt)(C)&&"50529403072"===j&&(0,f.jsx)(c.az,{ml:"auto",width:"fit-content",paddingY:"12px",children:(0,f.jsxs)(u.B,{gap:"4px",marginRight:"-3px",direction:"column",justifyContent:"flex-end",alignItems:"center",cursor:"pointer",onClick:et,children:[(0,f.jsx)(Se,{iconSize:.6*G,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,f.jsx)(y.E,{fontSize:G*(0,h.LOH)(j)+"px",fontWeight:"bold",align:"center",style:{marginTop:0},sx:{fontFamily:E+" !important",color:"white !important"},children:(0,h.wtw)(j)})]})})]}),(0,h.iQ5)(j)&&!(0,_t.Yt)(C)?(0,f.jsx)(c.az,{height:"fit-content",paddingY:"2px",position:"relative",children:(0,f.jsx)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,f.jsx)(ye,{whatmoreShareTemplateId:(0,_t.Gy)(C),whatmoreShareStoryId:F,whatmoreShareEventId:P.event_id,event:P,setIsModalOpen:J,setShareText:tt})})}):(0,f.jsx)(f.Fragment,{})]})}),(0,Wt.Z_)(P)?(0,f.jsxs)(c.az,{width:"full",children:[(0,h.ek9)(j)?(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)(N,{event:P,onToggle:t=>{x("minimize-button"!==t)}})})}):(0,f.jsx)(f.Fragment,{}),(0,f.jsx)(c.az,{display:"flex",width:"100%",height:"fit-content",children:(0,f.jsx)(Qt,{event:P,productClickHandler:D})})]}):(0,f.jsx)(f.Fragment,{})]}),ot&&(0,f.jsx)(u.B,{direction:"row",width:"100%",height:"fit-content",bg:"rgba(52, 52, 52, 0.9)",py:"3px",justifyContent:"center",children:(0,f.jsx)(Te,{brandName:null===P||void 0===P?void 0:P.brand,fontSize:.033*T})})]})]})},Me=i(5491),Qe=i.n(Me),He=i(6493);var Ue=function(t){var e,i,o,r,a,l,[d,w,y,_]=(0,m.A)();const[b,j]=(0,n.useState)(!1),[S,C]=(0,n.useState)(),[k,I]=(0,n.useState)(),[z,T]=(0,n.useState)({current_time:0,video_duration:0,is_video_ended:!1}),E=(0,v.Xd)("whatmoreShopId"),N=t.event,P=t.storyId,A=t.onBack,F=n.useRef(),R=t.changeSlide,L=t.isPlaying,B=t.isLast,O=t.setLockSwiper,D=t.onVideoEndedCallback,W=t.progressUpdateCallback,V=null!==(e=t.totalSiblingEvents)&&void 0!==e?e:0,M=null!==(i=t.indexAmongSiblings)&&void 0!==i?i:0,X=null===(o=t.showOverlay)||void 0===o||o,$=null!==(r=t.leftOpenSpaceClickHandler)&&void 0!==r?r:()=>{},Y=null!==(a=t.midOpenSpaceClickHandler)&&void 0!==a?a:()=>{},q=null!==(l=t.rightOpenSpaceClickHandler)&&void 0!==l?l:()=>{},{whatmoreWidgetSourceDetails:G}=(0,n.useContext)(U.B),{questionList:K}=(0,n.useContext)(zi),J=(null===K||void 0===K?void 0:K.length)>0?parseInt(localStorage.getItem("_whatmore_qview_index")):1e4,[Z,tt]=(0,n.useState)();(0,n.useEffect)((()=>{tt(t.showQuestion)}),[t.showQuestion]);const et="center";let it;try{it=Qe()((()=>{D()}),1e3,{leading:!0,trailing:!1})}catch(nt){console.log(nt)}return(0,f.jsx)(s.o,{children:(0,f.jsxs)(c.az,{width:_,height:y,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)(p.g,{width:"full",ratio:_/y,children:(0,f.jsx)(x.A,{height:"100%",width:"100%",url:(0,ge.s)((0,He.lP)(N)),isPlaying:L&&(!Z||J>=K.length),timeUpdateCallback:function(t,e){const i=ve(t,e);W({watch_time:t,video_duration:e});const n=z.is_video_ended;i>=99&&L&&!n?(it(),T({current_time:t,video_duration:e,is_video_ended:!0})):T({current_time:t,video_duration:e,is_video_ended:n})},event:N,question:Z&&J<(null===K||void 0===K?void 0:K.length),source:t.source})})})}),X?(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:F,event:t.event,isLast:B,onCloseCallback:t=>{A(t),(0,Q.DG)({userInteractionType:H.O.VIDEO_PLAYBACK,userInteractionMetadata:{watch_time:z.current_time,video_duration:z.video_duration},widgetSourceDetails:G,event:N,productList:N.products,ctaList:N.cta})},productClickHandler:async t=>{const e=await(0,g.M)(t,(0,h.NCy)(E),E);I(t),C(e),j(!0),O(!0),(0,Q.kz)({userInteractionType:H.O.SHOPNOW_CLICKED,widgetSourceDetails:G,event:N,productList:N.products,ctaList:N.cta}),(0,v.t2)("whatmoreAllowAutoSlide",!1)},videoPlayingData:z,totalSiblingEvents:V,indexAmongSiblings:M,questionList:K,isQuestionVisible:Z&&J<(null===K||void 0===K?void 0:K.length),qIndex:J,setIsQuestionVisible:tt,leftOpenSpaceClickHandler:$,midOpenSpaceClickHandler:Y,rightOpenSpaceClickHandler:q,storySetId:P,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:R})})}):(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:F,event:t.event,isLast:B,onCloseCallback:()=>A(),setLockSwiper:O,data:S,currentProduct:k,setOpenShopNow:t=>{j(t),(0,v.t2)("whatmoreAllowAutoSlide",!t)}})})}):(0,f.jsx)("div",{})]})})},Xe=i(2039),$e=i(6613),Ye=i(1085),qe=i(5727);var Ge=function(t){var[e,i,n,o]=(0,m.A)();const r=(0,v.Xd)("whatmoreShopId"),a=t.event,l=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)(p.g,{width:"full",ratio:o/n,children:(0,f.jsx)(x.A,{height:"100%",width:"100%",url:(0,ge.s)((0,He.lP)(a)),isPlaying:l,timeUpdateCallback:function(t,e){},event:a,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,Ye.bo)()},children:(0,f.jsxs)(u.B,{direction:"column",justifyContent:"center",alignItems:"center",height:"full",width:"full",children:[(0,f.jsx)(qe.A,{sx:{boxShadow:3,color:(0,h.KFN)(r),fontSize:.4*o,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{(0,Ye.bo)()}}),(0,f.jsx)(y.E,{color:"white",fontSize:.05*o+"px",fontWeight:"bold",align:"left",children:"Please click to play video.."})]})})})]})})},Ke=i(3294),Je=i(9821);const Ze=n.lazy((()=>i.e(931).then(i.bind(i,7059))));var ti=function(t){var e,i;const n=t.changeSlide,o=t.event,r=null===(e=t.isPlaying)||void 0===e||e,a=t.onBack,s=t.isLast,c=t.setLockSwiper,u=(t.heightFactor,t.widthFactor,t.onVideoEndedCallback),p=t.progressUpdateCallback,[h,m]=(0,Ht.A)(),[g]=(0,v.QN)("whatmoreVideoPlayerPoolBlessed"),x=null===(i=t.showOverlay)||void 0===i||i;function w(){m(!h)}if((0,$e.MN)()&&0==g&&"recommended_images"!=(null===o||void 0===o?void 0:o.event_type))return(0,Je._)()?(0,f.jsx)(Ge,{event:o,onBack:a,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:u,progressUpdateCallback:p,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:x,source:Ke.N.CAROUSEL_EVENT_OPENED},"shopping-video-view"+o.event_id):(0,f.jsx)(Ue,{event:o,onBack:a,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:u,progressUpdateCallback:p,showQuestion:t.showQuestion,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:x,source:Ke.N.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:n},"shopping-video-view"+o.event_id);if((0,Xe.ij)(o)||(0,Xe.Il)(o))return(0,f.jsx)(Ue,{event:o,onBack:a,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:u,progressUpdateCallback:p,showQuestion:t.showQuestion,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:x,source:Ke.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)(Ze,{onBack:a,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,Xe.Th)(o)){var{status:y,bannerText:_,timeToStartInMins:b}=d.A.getEventStatus(o);if(y.name===l.A.LIVE.name)return(0,f.jsx)(he,{event:o,onBack:a,isPlaying:r,isLast:s,showOverlay:x},"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",{})},ei=i(4806),ii=i.n(ei),ni=i(2804),oi=i(6834);function ri(t){var e;const[i,o]=(0,n.useState)(!1),r=t.onClick,a=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)(oi.A,{sx:{color:"white",fontSize:a+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{o(!0),setTimeout((()=>{o(!1)}),500),r(t,"up")}}):(0,f.jsx)(ni.A,{sx:{color:"white",fontSize:a+"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%",a=null!==(n=t.fontSize)&&void 0!==n?n:50,l=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)(ri,{type:"left",onClick:l,fontSize:a}),(0,f.jsx)(ri,{type:"right",onClick:l,fontSize:a})]})})},li=i(964),di=i(3330);var si=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 ci=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 a=o-n.changedTouches[0].clientX,l=r-n.changedTouches[0].clientY;return"vertical"==t&&Math.abs(l)>e||"horizontal"==t&&Math.abs(a)>e?"vertical"==t?l>0?"right":"left":a>0?"right":"left":null}]};var ui=function(t,e){const i=(0,n.useRef)(Qe()(((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 a=r>0?"right":"left";i.current(o,a)}]},pi=i(6325);var hi=function(t){const e=t.events,i=t.eventIndex,l=t.onBack;var[d,s,c,p]=(0,m.A)();const[g]=(0,v.QN)("isInDesignMode"),[x]=(0,v.QN)("isDemoBrand"),[w,y]=(0,n.useState)(!0),[_,b]=(0,v.QN)("isFirstIndicatorRenderDone"),[j,S]=(0,n.useState)(!1),[C,k]=(0,n.useState)({}),{setCloseClickComponent:I}=(0,n.useContext)(zi),{slideDirection:z}=(0,n.useContext)(zi),[T]=(0,v.QN)("whatmoreShopId"),[E]=(0,v.QN)("whatmoreLandingLocationType"),[N,P]=si(i,e.length),[A,F]=ci(z,10),[R]=ui("vertical",10),[L,B]=(0,n.useState)(!0),[O,D]=(0,n.useState)(null),{whatmoreWidgetSourceDetails:W,whatmoreUserInfo:M}=(0,n.useContext)(U.B);function X(){B(!1)}function $(t){X(),setTimeout((()=>{l(t)}),500)}const Y=W.landingLocationType,q=W.templateType;I($);let G=i;const{questionList:K}=(0,n.useContext)(zi);function J(){(0,v.Xd)("whatmoreAllowAutoSlide")&&(P("right"),O.slideNext())}function Z(t,e){P(e),function(t,e){O&&("left"===e?O.slidePrev():O.slideNext())}(0,e)}const tt=Math.round(.05*c);return(0,f.jsx)(ii(),{isOpen:L,onRequestClose:X,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,V.YU)("#000000",13)},onTouchStart:t=>{A(t)},onTouchEnd:t=>{if(j)return;const e=F(t);e&&Z(0,e)},onWheel:t=>{j||R(t,(t=>{Z(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:!j,allowSlidePrev:!j,allowTouchMove:!1,onSwiper:t=>{D(t),(0,Q.kz)({userInteractionType:H.O.EVENT_VIEW,widgetSourceDetails:W,event:e[N().activeIndex],productList:e[N().activeIndex].products})},onSlideChange:t=>{var i;w?y(!1):(_||b(!0),(0,Q.DG)({userInteractionType:H.O.VIDEO_PLAYBACK,userInteractionMetadata:C,widgetSourceDetails:W,event:e[N().activeIndex],productList:e[N().activeIndex].products}),i=e[N().activeIndex],g||x||null===i||void 0===i||!i.event_id||(async()=>{const t=(0,_t.Wd)(Y)+(0,_t.gf)(q)+(null!==i&&void 0!==i&&i.isRelatedEvent?"R":"E")+"_"+(null===i||void 0===i?void 0:i.event_id);(0,a.lB)(i),"index"===E?((0,di.Si)(T,li.TB,li.Dk),(0,lt.Ch)(i.event_id,i.products,li.TB,li.Dk,t,null===i||void 0===i?void 0:i.location,null===M||void 0===M?void 0:M.userType)):E.startsWith("product")||"embed"===E?((0,di.Si)(T,li.DK,li.K1),(0,lt.Ch)(i.event_id,i.products,li.DK,li.K1,t)):E.startsWith("collection")?((0,di.Si)(T,li.Sx,li.rz),(0,lt.Ch)(i.event_id,i.products,li.Sx,li.rz,t)):((0,di.Si)(T,li.TB,li.Dk),(0,lt.Ch)(i.event_id,i.products,li.TB,li.Dk,t))})(),(0,Q.UM)({userInteractionType:H.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:a,isVisible:l,isDuplicate:d}=n;const s=o?"activeIndex":r?"prevIndex":"nextIndex",c=N()[s];"activeIndex"==s&&(G=Math.max(G,c),0==c&&(G=0));const p=(null===K||void 0===K?void 0:K.length)>0&&o&&l&&(c>i||G<i&&c>0)&&c>=G&&c%(0,h.uSp)(T)==i%(0,h.uSp)(T);return(0,f.jsx)(u.B,{direction:"column",height:window.innerHeight,justifyContent:"center",children:(0,f.jsx)(ti,{event:e[c],showQuestion:p,onBack:$,isPlaying:1==e.length||o&&l,isLast:!1,setLockSwiper:S,onVideoEndedCallback:J,progressUpdateCallback:t=>{k(t)},showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,mode:"portrait",changeSlide:Z})})}},"event-vertical-scroll-slide-"+n)))}),e.length>1&&!j&&(0,h.kb)(T)&&"horizontal"===(0,h.br0)(T)&&"horizontal"===z?(0,f.jsx)(ai,{relativeBottomPercentage:"50%",width:p,handleClick:(t,e)=>{Z(0,"down"==e?"right":"left")},fontSize:parseInt(.12*p)}):(0,f.jsx)(f.Fragment,{})]})})})},vi=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 vi.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 xi=function(t){var e,[i,l,d,p]=(0,m.A)();const[g]=(0,v.QN)("isInDesignMode"),[x]=(0,v.QN)("isDemoBrand"),[w,y]=(0,v.QN)("isFirstIndicatorRenderDone"),[_,b]=(0,n.useState)(0!=t.eventIndex),{setCloseClickComponent:j}=(0,n.useContext)(zi),[S,C]=(0,n.useState)(!1),[k]=(0,v.QN)("whatmoreShopId"),[I]=(0,v.QN)("whatmoreLandingLocationType"),z=(0,v.Xd)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:T,whatmoreUserInfo:E}=(0,n.useContext)(U.B),[N,P]=(0,n.useState)(!1),[F,R]=(0,n.useState)(null);function L(){P(!1)}const B=t.events,O=t.eventIndex,D=t.onBack,W=B.concat(B),M=B.length,X=null===B||void 0===B||null===(e=B[0])||void 0===e?void 0:e.brand,$=(0,n.useRef)(0);function Y(t){L(),setTimeout((()=>{D(t)}),500)}function q(){F&&!F.isEnd&&(0,v.Xd)("whatmoreAllowAutoSlide")&&F.slideNext()}(0,n.useEffect)((()=>(P(!0),()=>{})),[]),j(Y);const G=T.landingLocationType,K=T.templateType,[J,Z]=(0,n.useState)({}),tt=parseInt(Math.min(5,B.length));return(0,f.jsx)(gi,{show:N,closeCallback:L,customClass:"whatmore-landscape-modal-swipe-view",children:(0,f.jsxs)(u.B,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",alignItems:"center",backgroundColor:(0,V.YU)("#000000",13),children:[(0,f.jsx)(s.o,{children:(0,f.jsx)(c.az,{height:"fit-content",width:p*tt,children:(0,f.jsxs)(o.RC,{onInit:t=>{R(t),(0,Q.kz)({userInteractionType:H.O.EVENT_VIEW,widgetSourceDetails:T,event:B[t.activeIndex],productList:B[t.activeIndex].products,ctaList:B[t.activeIndex].cta})},slidesPerView:tt,centeredSlides:!0,allowTouchMove:!1,initialSlide:O,modules:[r.t9,r.Vx,r.FJ,r.Ij,r.dK],navigation:tt>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*d),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:p*tt,watchSlidesProgress:!0,onSlideChange:t=>{var e;_?b(!1):(w||y(!0),e=B[t.activeIndex],g||x||null===e||void 0===e||!e.event_id||(async()=>{const t=(0,_t.Wd)(G)+(0,_t.gf)(K)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,a.lB)(e),"index"===I?((0,di.Si)(k,li.TB,li.Dk),(0,lt.Ch)(e.event_id,e.products,li.TB,li.Dk,t,null===e||void 0===e?void 0:e.location,null===E||void 0===E?void 0:E.userType)):I.startsWith("product")||"embed"===I?((0,di.Si)(k,li.DK,li.K1),(0,lt.Ch)(e.event_id,e.products,li.DK,li.K1,t)):I.startsWith("collection")?((0,di.Si)(k,li.Sx,li.rz),(0,lt.Ch)(e.event_id,e.products,li.Sx,li.rz,t)):((0,di.Si)(k,li.TB,li.Dk),(0,lt.Ch)(e.event_id,e.products,li.TB,li.Dk,t))})(),(0,Q.DG)({userInteractionType:H.O.VIDEO_PLAYBACK,userInteractionMetadata:J,widgetSourceDetails:T,event:B[t.activeIndex],productList:B[t.activeIndex].products,ctaList:B[t.activeIndex].cta}),(0,Q.UM)({userInteractionType:H.O.EVENT_VIEW,widgetSourceDetails:T,event:B[t.activeIndex],productList:B[t.activeIndex].products,ctaList:B[t.activeIndex].cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[B.length>2&&(0,f.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,f.jsx)(A.A,{onCloseCallback:D})}),W.slice(O,B.length+O).map(((t,e)=>(0,f.jsx)(o.qr,{children:t=>{let{isActive:i,isPrev:n,isNext:o,isVisible:r,isDuplicate:a}=t;if(i)return(0,f.jsx)(u.B,{direction:"column",height:d,width:1*p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,f.jsx)(c.az,{overflow:"hidden",sx:{borderRadius:"round"==z?"10px":"0px",borderWidth:(0,h.YcK)(k),borderColor:(0,h.Fwt)(k)},children:(0,f.jsx)(ti,{event:B[e%M],onBack:Y,isPlaying:!0,isLast:e%M===B.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:q,progressUpdateCallback:t=>{Z(t)},showCloseOverlay:(null===B||void 0===B?void 0:B.length)<=2,mode:"landscape"})})});if(o)return(0,f.jsx)(u.B,{direction:"column",height:d,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{F.slideTo(e%M,300)},children:(0,f.jsx)(c.az,{overflow:"hidden",sx:{borderRadius:"round"==z?"10px":"0px",borderWidth:(0,h.YcK)(k),borderColor:(0,h.Fwt)(k)},children:(0,f.jsx)(ti,{event:B[e%M],onBack:Y,isPlaying:!1,isLast:e%M===B.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:q,progressUpdateCallback:t=>{Z(t)},showOverlay:!1,mode:"landscape"})})});if(n&&1===$.current)return(0,f.jsx)(u.B,{direction:"column",height:d,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{F.slideTo(e%M,300)},children:(0,f.jsx)(c.az,{overflow:"hidden",sx:{borderRadius:"round"==z?"10px":"0px",borderWidth:(0,h.YcK)(k),borderColor:(0,h.Fwt)(k)},children:(0,f.jsx)(ti,{event:B[e%M],onBack:Y,isPlaying:!1,isLast:e%M===B.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:q,progressUpdateCallback:t=>{Z(t)},showOverlay:!1,mode:"landscape"})})});try{O+e>=M-1&&($.current=1)}catch(l){console.log(l)}return(0,f.jsx)(f.Fragment,{})}},"event-horizontal-scroll-slide"+t.event_id)))]})})}),(0,f.jsx)(s.o,{children:(0,f.jsx)(Te,{brandName:X,height:.04*d,width:.1*p,fontSize:.02*d})})]})})},fi=i(340),wi=i(5089),yi=i(572),_i=i(8603);var bi=function(t){const[e,i,n,o]=(0,m.A)(),[r]=(0,v.QN)("whatmorePrimaryColor"),[a]=(0,v.QN)("whatmoreSecondaryColor"),l="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:l,height:"full",width:"full",children:(0,f.jsx)(c.az,{borderRadius:"md",backgroundColor:"transparent",children:(0,f.jsx)(p.g,{width:"full",ratio:o/n,children:(0,f.jsx)(c.az,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+r+", gray, "+a+")"})})})}),(0,f.jsx)(u.B,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:l,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)(p.g,{width:"full",ratio:9/16,children:(0,f.jsx)(c.az,{width:"full",height:"full",borderRadius:"md",backdropFilter:"auto",backdropBlur:"5px"})})})})]})})};var ji=function(t){var e;const i=t.stories,r=t.onBack,l=t.onStoryCompleteCallback,d=t.isActive,s=null!==(e=t.initialEventIndex)&&void 0!==e?e:0,c=i.events;var[p,h,g,x]=(0,m.A)();const[w,y]=(0,Ht.A)(),[_]=(0,v.QN)("isInDesignMode"),[b]=(0,v.QN)("isDemoBrand"),[j]=(0,v.QN)("whatmoreShopId"),[S,C]=(0,n.useState)(!0),[k,I]=(0,v.QN)("isFirstIndicatorRenderDone"),[z,T]=(0,n.useState)(null),[E,N]=(0,n.useState)(!1),{whatmoreWidgetSourceDetails:P,whatmoreUserInfo:A}=(0,n.useContext)(U.B),[F,R]=si(s,c.length);function L(t){r(t)}const B=P.landingLocationType,O=P.templateType;function D(){if(!(0,v.Xd)("whatmoreAllowAutoSlide"))return;F().activeIndex+1>=c.length?l("right"):(R("right"),z&&z.slideNext())}function W(t){const e=F().activeIndex;"right"==t&&e+1>=c.length||"left"==t&&e-1<0?l(t):(R(t),z&&("left"==t?z.slidePrev():z.slideNext()))}const[V,M]=(0,n.useState)({});return c[F().activeIndex],(0,f.jsx)("div",{children:(0,f.jsx)(o.RC,{speed:1,slidesPerView:1,direction:"horizontal",initialSlide:0,loop:!0,height:g,width:x,watchSlidesProgress:!0,allowTouchMove:!1,onSwiper:t=>{T(t)},onSlideChange:t=>{S?C(!1):(k||I(!0),(0,Q.DG)({userInteractionType:H.O.VIDEO_PLAYBACK,userInteractionMetadata:V,widgetSourceDetails:P,event:c[F().activeIndex],productList:c[F().activeIndex].products,ctaList:c[F().activeIndex].cta}),function(t){const e=(0,_t.Wd)(B)+(0,_t.gf)(O)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);_||b||(async()=>{(0,a.lB)(t),(0,di.Si)(j,li.TB,li.OL),(0,lt.Ch)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===A||void 0===A?void 0:A.userType)})()}(c[F().activeIndex]),(0,Q.kz)({userInteractionType:H.O.EVENT_VIEW,widgetSourceDetails:P,event:c[F().activeIndex],productList:c[F().activeIndex].products,ctaList:c[F().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:a,isDuplicate:l}=e;if(d){const e=n?"activeIndex":o?"prevIndex":"nextIndex",r=c[F()[e]];return(0,f.jsx)(u.B,{direction:"column",height:g,justifyContent:"center",children:(0,Xe.ij)(r)||(0,Xe.Il)(r)?(0,f.jsx)(Ue,{event:r,totalSiblingEvents:c.length,indexAmongSiblings:F()[e],onBack:L,isPlaying:d&&n&&a,isLast:!1,setLockSwiper:N,onVideoEndedCallback:D,progressUpdateCallback:t=>{M(t)},leftOpenSpaceClickHandler:()=>{W("left")},midOpenSpaceClickHandler:()=>{y(!w)},rightOpenSpaceClickHandler:()=>{W("right")},storyId:i.id,source:Ke.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:p,justifyContent:"center",children:(0,f.jsx)(bi,{})})}},"event-story-view-slide-"+e)))})})};var Si=function(t){const e=t.onBack,i=t.eventsStories,l=t.initialStoryIndex,[d,s,c]=(0,Ce.A)(),[p]=(0,v.QN)("isInDesignMode"),[h]=(0,v.QN)("isDemoBrand"),[m,g]=(0,n.useState)(!0),{setCloseClickComponent:x}=(0,n.useContext)(zi),[w]=(0,v.QN)("whatmoreShopId"),[y,_]=si(l,i.length),[b,j]=ci("horizontal",50),[S]=ui("vertical",30),C=t.eventIndex,[k,I]=(0,n.useState)(!0),[z,T]=(0,n.useState)(null),{whatmoreWidgetSourceDetails:E,whatmoreUserInfo:N}=(0,n.useContext)(U.B);function P(){I(!1)}function A(t){P(),setTimeout((()=>{e(t)}),500)}x(A);const F=E.landingLocationType,R=E.templateType;function L(t){z&&(0,v.Xd)("whatmoreAllowAutoSlide")&&(_(t),"right"==t?z.slideNext():z.slidePrev())}function B(t,e){L(e)}return(0,f.jsx)(ii(),{isOpen:k,onRequestClose:P,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,f.jsx)("div",{style:{height:s,width:c,backgroundColor:"#00000088"},onTouchStart:t=>{b(t)},onTouchEnd:t=>{const e=j(t);e&&B(0,e)},onWheel:t=>{S(t,(t=>{B(0,t)}))},children:(0,f.jsx)(o.RC,{speed:1,slidesPerView:1,direction:"horizontal",modules:[r.hw,r.FJ],initialSlide:l,loop:i.length>1,height:s,width:c,watchSlidesProgress:!0,onSwiper:t=>{var e,n;T(t),(0,Q.kz)({userInteractionType:H.O.EVENT_VIEW,widgetSourceDetails:E,event:i[y().activeIndex].events[0],productList:null===(e=i[y().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=i[y().activeIndex].events[0])||void 0===n?void 0:n.cta})},onSlideChange:t=>{var e,n;m?g(!1):(!function(t){const e=(0,_t.Wd)(F)+(0,_t.gf)(R)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);p||h||(async()=>{(0,a.lB)(t),(0,di.Si)(w,li.TB,li.OL),(0,lt.Ch)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===N||void 0===N?void 0:N.userType)})()}(i[y().activeIndex].events[0]),(0,Q.kz)({userInteractionType:H.O.EVENT_VIEW,widgetSourceDetails:E,event:i[y().activeIndex].events[0],productList:null===(e=i[y().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=i[y().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:a}=t;const d=e?"activeIndex":n?"prevIndex":"nextIndex";return(0,f.jsx)(u.B,{direction:"column",height:s,justifyContent:"center",children:(0,f.jsx)(ji,{stories:i[y()[d]],onBack:A,isActive:e&&r,isNext:o,isPrev:n,onStoryCompleteCallback:L,nextStories:i[y().nextIndex],prevStories:i[y().prevIndex],initialEventIndex:l==y()[d]?C:0},"event-story-view-"+i[y()[d]].id)})}},"event-vertical-scroll-slide-"+t)))})})})};var Ci=function(t){var e,i,o,[r,a,l,d]=(0,m.A)();const[h]=(0,v.QN)("whatmorePrimaryColor"),[g]=(0,v.QN)("whatmoreSecondaryColor"),x=t.event,w=(t.onBack,n.useRef(),null!==(e=t.showPausedVideo)&&void 0!==e&&e),y=null!==(i=t.heightFactor)&&void 0!==i?i:1,b="flex-end";return d*=null!==(o=t.widthFactor)&&void 0!==o?o:1,l*=y,(0,f.jsx)(s.o,{children:(0,f.jsxs)(c.az,{width:d,height:l,children:[(0,f.jsx)(u.B,{direction:"column",justifyContent:b,height:"full",width:"full",children:(0,f.jsx)(c.az,{children:(0,f.jsx)(p.g,{width:"full",ratio:9/16,children:w?(0,Xe.ij)(x)||(0,Xe.Il)(x)?(0,f.jsx)(Ee.A,{height:"100%",width:"100%",url:x.thumbnail_image,isPlaying:!1,pauseFromPlayTimeInMs:1e3,event:x}):(0,f.jsx)(_._,{width:"full",height:"full",src:x.thumbnail_image,objectFit:"cover",borderRadius:"lg"}):(0,f.jsx)(c.az,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+h+", gray, "+g+")"})})})}),(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)(p.g,{width:"full",ratio:9/16,children:(0,f.jsx)(c.az,{width:"full",height:"full",backgroundColor:"blackAlpha.400"})})})})]})})};var ki=function(t){var e,i,[l,d,p,h]=(0,m.A)();const[g]=(0,v.QN)("isInDesignMode"),[x]=(0,v.QN)("isDemoBrand"),[w,y]=(0,v.QN)("isFirstIndicatorRenderDone"),[_,b]=(0,n.useState)(0!=t.eventIndex),{setCloseClickComponent:j}=(0,n.useContext)(zi),[S,C]=(0,n.useState)(!1),[k]=(0,v.QN)("whatmoreShopId"),{whatmoreWidgetSourceDetails:I,whatmoreUserInfo:z}=(0,n.useContext)(U.B),[T,E]=(0,n.useState)(!1),[N,P]=(0,n.useState)(null);function F(){E(!1)}t.events;const R=t.eventIndex,L=t.onBack,B=t.eventsStories,O=t.initialStoryIndex,D=null===(e=B[0])||void 0===e||null===(i=e.events[0])||void 0===i?void 0:i.brand;function W(t){F(),setTimeout((()=>{L(t)}),500)}(0,n.useEffect)((()=>(E(!0),()=>{})),[]),j(W);const V=I.landingLocationType,M=I.templateType;function X(t){N&&!N.isEnd&&("right"==t?N.slideNext():N.slidePrev())}const $=parseInt(Math.min(5,B.length));return(0,f.jsx)(gi,{show:T,closeCallback:F,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:h*$,children:(0,f.jsxs)(o.RC,{onInit:t=>{var e,i;P(t),(0,Q.kz)({userInteractionType:H.O.EVENT_VIEW,widgetSourceDetails:I,event:B[t.activeIndex].events[0],productList:null===(e=B[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=B[t.activeIndex].events[0])||void 0===i?void 0:i.cta})},slidesPerView:$,centeredSlides:!0,allowTouchMove:!1,initialSlide:O,modules:[r.t9,r.Vx,r.FJ],navigation:$>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*p),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:h*$,watchSlidesProgress:!0,onSlideChange:t=>{var e,i;_?b(!1):(w||y(!0),function(t){const e=(0,_t.Wd)(V)+(0,_t.gf)(M)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);g||x||(async()=>{(0,a.lB)(t),(0,di.Si)(k,li.TB,li.OL),(0,lt.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)})()}(B[t.activeIndex].events[0]),(0,Q.kz)({userInteractionType:H.O.EVENT_VIEW,widgetSourceDetails:I,event:B[t.activeIndex].events[0],productList:null===(e=B[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=B[t.activeIndex].events[0])||void 0===i?void 0:i.cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[B.length>2&&(0,f.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,f.jsx)(A.A,{onCloseCallback:L})}),B.map(((t,e)=>(0,f.jsx)(o.qr,{children:i=>{let{isActive:n,isPrev:o,isNext:r,isVisible:a,isDuplicate:l}=i;if(n){const i=1;return(0,f.jsx)(u.B,{direction:"column",height:p,width:h*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)(ji,{stories:t,onBack:W,isActive:n&&a,isNext:!1,isPrev:!1,onStoryCompleteCallback:X,initialEventIndex:O==e?R:0,showCloseOverlay:(null===B||void 0===B?void 0:B.length)<=2},"event-story-view-"+t.id)})})}return o||r?(0,f.jsx)(u.B,{direction:"column",height:p,width:h,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)(Ci,{showPausedVideo:!0,event:B[e].events[0],onBack:W,isPlaying:!1,setLockSwiper:C})})}):(0,f.jsx)(f.Fragment,{})}},"event-horizontal-scroll-slide-"+e)))]})})}),(0,f.jsx)(s.o,{children:(0,f.jsx)(Te,{brandName:D,height:.04*p,width:.1*h,fontSize:.02*p})})]})})};const Ii=(0,_i.A)({key:"whatmore-css-sv"}),zi=(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,a,l]=(0,Ce.A)(),[d]=(0,v.QN)("whatmoreShopId"),{whatmoreRootId:s}=(0,n.useContext)(U.B),{whatmoreIsStoriesTemplate:c}=(0,n.useContext)(U.B),u=(0,v.QN)("isWhatmorePreviewMode");var p=t.events,m=t.index,g=t.onBack,x=t.eventsStories,w=t.initialStoryIndex,y=(0,h.M3_)(d),_="portrait"===r?null!==(e=t.slideDirection)&&void 0!==e?e:"vertical":null!==(i=t.slideDirection)&&void 0!==i?i:p.length>1?"horizontal":"vertical",b="portrait"===r?!(0,h.kb)(d)&&!c:(0,h.DNc)(d);return(0,n.useLayoutEffect)((()=>{(0,h.hpk)(d)&&(window.location.href.includes(y)?history.replaceState(null,"","#"+y):history.pushState(null,"","#"+y),window.addEventListener("popstate",(()=>{window.location.href.includes(y)||g()})))}),[]),delete wi.Ay.styles.global,c?(0,f.jsx)(yi.C,{value:Ii,children:(0,f.jsx)(fi.s,{theme:wi.Ay,cssVarsRoot:s,resetCSS:!1,children:(0,f.jsx)(zi.Provider,{value:{isIOS:(0,$e.MN)(),totalEvents:p.length,closeClickComponent:g,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:_,showSwipeIndicator:b},children:("portrait"!==r||u)&&(0,h.Rdb)(d)?(0,f.jsx)(ki,{eventsStories:x,initialStoryIndex:w,onBack:g,eventIndex:m}):(0,f.jsx)(Si,{eventsStories:x,initialStoryIndex:w,onBack:g,eventIndex:m})})})}):(0,f.jsx)(yi.C,{value:Ii,children:(0,f.jsx)(fi.s,{theme:wi.Ay,cssVarsRoot:s,resetCSS:!1,children:(0,f.jsx)(zi.Provider,{value:{isIOS:(0,$e.MN)(),totalEvents:p.length,closeClickComponent:g,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:_,showSwipeIndicator:b,questionList:(0,h.JwJ)(d)?null===(o=JSON.parse(localStorage.getItem("_whatmore_brand_questions")))||void 0===o?void 0:o.questionList:[]},children:"portrait"===r?(0,f.jsx)(hi,{events:p,eventIndex:m,onBack:g}):(0,f.jsx)(xi,{events:p,eventIndex:m,onBack:g})})})})}},3771:function(t,e,i){i.d(e,{A:function(){return y}});var n=i(9950),o=i(2039),r=i(6670),a=i(3568),l=i(16),d=i(9098),s=i(5830),c=i(1085),u=i(3294),p=i(1348),h=i(4033),v=(i(5410),i(4737)),m=i(6493),g=i(4414);function x(t){var e,i,o;const[a,d]=(0,r.A)(),[x,f]=(0,n.useState)(n.useRef()),w=t.posterImage,[y,_]=(0,s.QN)("whatmoreVideoPlayerPoolBlessed"),[b,j]=(0,n.useState)(!0),[S,C]=(0,n.useState)(!1),k=t.timeUpdateCallback,{whatmoreIsPreviewMode:I}=(0,n.useContext)(v.B),z=null!==(e=t.isVideoMuted)&&void 0!==e?e:a,T=null!==(i=t.height)&&void 0!==i?i:"100%",E=null!==(o=t.width)&&void 0!==o?o:"100%",N=(0,s.Xd)("whatmoreShopId");(0,n.useLayoutEffect)((()=>{if(x.current&&y)if(0==x.current.children.length){const i=(0,m.Cr)(t.url);(e=(0,c.Z4)(x.current,t.url,z||!t.isPlaying,t.isPlaying,i)).setAttribute("playsinline","true"),e.setAttribute("preload","auto"),e.addEventListener("loadeddata",(()=>{j(!1)})),k&&e.addEventListener("timeupdate",(t=>{var i,n;e&&k(null!==(i=e.currentTime)&&void 0!==i?i:0,null!==(n=e.duration)&&void 0!==n?n:0)}))}else{var e;(e=x.current.children[0]).muted=z||!t.isPlaying,t.isPlaying?e.play():(e.pause(),(0,p.fwF)(N)&&t.source==u.N.CAROUSEL_EVENT_OPENED&&(!t.isPlaying&&e.play(),setTimeout((()=>{!t.isPlaying&&e.pause()}),(0,h.n)()?1900:800)))}}),[z,t.isPlaying,y,b]),(0,n.useLayoutEffect)((()=>()=>{x.current&&0!=x.current.children.length&&(0,c.rq)(x.current)}),[]);const P=(0,s.Xd)("whatmoreLandingLocationType");return(0,g.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:E,height:T,overflow:"hidden",backgroundColor:I?(0,p.KVz)(N):(0,p.QSX)(N),filter:t.showQuestion?"blur(24px)":""},children:[(0,g.jsx)("div",{ref:x,style:{width:b?"0px":"100%",height:b?"0px":I?(0,p.tbf)(N):(0,p.CBm)(N)&&"product"==P?"auto":(0,p.R7q)(N)},className:"whatmore-video-player-ios-holder"}),"40273707171"!==N&&b&&S?(0,g.jsx)(g.Fragment,{children:(0,g.jsx)("div",{style:{width:"100%",height:"100%",position:"relative"},children:(0,g.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,g.jsx)("img",{src:w,style:{height:"100%",width:E,animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})})})}):b&&!S&&(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{style:{width:"100%",height:"100%",position:"relative"},children:[(0,g.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,g.jsx)("img",{src:w,height:"100%",width:E,onLoad:()=>{C(!0)},style:{animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})}),(0,g.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,g.jsx)(l.A,{width:E,height:T,style:{position:"absolute",top:"50%",left:"50%",opacity:"0.6"}})})]})})]})}var f=function(t){var e;return(0,g.jsx)(x,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback,isVideoMuted:null!==(e=t.isVideoMuted)&&void 0!==e?e:null,source:t.source,posterImage:t.posterImage,showQuestion:t.showQuestion})};function w(t){var e,i,o;const[a,d]=(0,r.A)(),[c,x]=(0,n.useState)(!1),[f,w]=(0,n.useState)(!1),y=t.setDuration,_=(0,n.useRef)(null),b=(0,s.Xd)("whatmoreShopId"),j=t.timeUpdateCallback,{whatmoreIsPreviewMode:S}=(0,n.useContext)(v.B),C=(0,s.Xd)("whatmoreLandingLocationType"),k=null!==(e=t.height)&&void 0!==e?e:"100%",I=null!==(i=t.width)&&void 0!==i?i:"100%",z=null!==(o=t.isVideoMuted)&&void 0!==o?o:a,T=null===t||void 0===t?void 0:t.posterImage;return(0,n.useEffect)((()=>{_.current&&(t.isPlaying?_.current.paused&&_.current.play():_.current.pause(),j&&_.current.addEventListener("timeupdate",(t=>{var e,i;_.current&&j(null!==(e=_.current.currentTime)&&void 0!==e?e:0,null!==(i=_.current.duration)&&void 0!==i?i:0)})))}),[t.isPlaying,t.url]),(0,g.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:I,height:k,overflow:"hidden",backgroundColor:S?(0,p.KVz)(b):(0,p.QSX)(b),filter:null!==t&&void 0!==t&&t.showQuestion?"blur(24px)":""},children:[(0,g.jsx)("div",{style:{width:c?"100%":"0px",height:c?S?(0,p.tbf)(b):(0,p.CBm)(b)&&"product"==C?"auto":(0,p.R7q)(b):"0px"},children:(0,g.jsxs)("video",{ref:_,className:"whatmore-video-player",preload:"auto",loop:!0,src:"banner"==t.source?t.url:void 0,playsInline:!0,muted:!(!z&&t.isPlaying),onLoadedData:()=>{x(!0),t.isPlaying&&_.current&&_.current.play(),(0,p.fwF)(b)&&t.source==u.N.CAROUSEL_EVENT_OPENED&&(!t.isPlaying&&_.current&&_.current.play(),setTimeout((()=>{!t.isPlaying&&_.current&&_.current.pause()}),(0,h.n)()?1900:800))},onLoadedMetadata:()=>{_.current&&y&&y(_.current.duration)},poster:"banner"==t.source?t.url:T,children:[(0,g.jsx)("track",{src:"data:,",kind:"captions",srclang:"en",label:"english_captions"}),(0,g.jsx)("source",{src:t.url,type:"video/mp4"}),(0,g.jsx)("source",{src:(0,m.Cr)(t.url),type:"video/mp4"})]})}),"40273707171"!==b&&!c&&f?(0,g.jsx)(g.Fragment,{children:(0,g.jsx)("div",{style:{width:"100%",height:"100%",position:"relative"},children:(0,g.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,g.jsx)("img",{src:T,style:{height:"100%",width:I,animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})})})}):!c&&!f&&(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{style:{width:"100%",height:"100%",position:"relative"},children:[(0,g.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,g.jsx)("img",{src:T,height:"100%",width:I,onLoad:()=>{w(!0)},style:{animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})}),(0,g.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,g.jsx)(l.A,{width:I,height:k,style:{position:"absolute",top:"50%",left:"50%",opacity:"0.6"}})})]})})]})}var y=function(t){var e,i,r,l;return(0,o.Il)(t.event)?(0,g.jsx)(d.A,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback}):1==(0,n.useContext)(a.EventClickComponentContext).isIOS&&1==(0,s.Xd)("whatmoreVideoPlayerPoolBlessed")&&"banner"!=t.source?(0,g.jsx)(f,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback,isVideoMuted:null!==(r=t.isVideoMuted)&&void 0!==r?r:null,source:t.source,posterImage:null===(l=t.event)||void 0===l?void 0:l.poster_image,showQuestion:null===t||void 0===t?void 0:t.question}):(0,g.jsx)(w,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback,isVideoMuted:null!==(e=t.isVideoMuted)&&void 0!==e?e:null,setDuration:t.setDuration,source:t.source,posterImage:null===(i=t.event)||void 0===i?void 0:i.poster_image,showQuestion:null===t||void 0===t?void 0:t.question})}},3936:function(t,e,i){var n=i(6086),o=i(3247),r=(i(9950),i(3080)),a=i(4895),l=i(5375),d=i(6670),s=i(4414);e.A=function(t){var e;const[i,c]=(0,d.A)(),[u,p,h,v]=(0,r.A)(),m=v*(null!==(e=t.fontFactor)&&void 0!==e?e:.1);function g(){c(!i)}return(0,s.jsx)(n.o,{children:(0,s.jsx)(o.jl,{cursor:"pointer",children:i?(0,s.jsx)(l.A,{sx:{color:"white",fontSize:m,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:()=>{g()}}):(0,s.jsx)(a.A,{sx:{color:"white",fontSize:m,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:()=>{g()}})})})}},3997:function(){},4669:function(){},5144:function(t,e,i){i.d(e,{jd:function(){return o},so:function(){return r}});var n=i(8283);const o=`\n ${n.i7`
87
+ `} 0.5s`,zt=null===Q||void 0===Q||null===(e=Q.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"))})),[Tt,Et]=(0,n.useState)(-1!==zt?null===(i=Q.options)||void 0===i||null===(o=i[zt])||void 0===o||null===(r=o.values)||void 0===r?void 0:r[0]:""),[Nt,Pt]=(0,n.useState)({});(0,n.useEffect)((()=>{-1!==zt&&"whatmore"!==(0,h.NCy)(jt)&&async function(){const t=await(0,st._N)(U);Pt(t)}()}),[]);let At=-1,Ft=-1!==zt&&null!==Nt&&void 0!==Nt&&Nt.product&&(null===Nt||void 0===Nt||null===(a=Nt.product)||void 0===a||null===(l=a.images)||void 0===l?void 0:l.length)>=(null===Nt||void 0===Nt||null===(d=Nt.product)||void 0===d||null===(u=d.options)||void 0===u||null===(p=u[zt])||void 0===p||null===(g=p.values)||void 0===g?void 0:g.length)?null===Nt||void 0===Nt||null===(x=Nt.product)||void 0===x||null===(w=x.images)||void 0===w?void 0:w.map((t=>{var e,i,n,o,r,a,l,d,s,c,u,p,h,v;const m=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[m])||void 0===r||null===(a=r.values)||void 0===a?void 0:a[Math.min(++At,(null===Nt||void 0===Nt||null===(l=Nt.product)||void 0===l||null===(d=l.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===(p=u.options)||void 0===p||null===(h=p[m])||void 0===h||null===(v=h.values)||void 0===v?void 0:v[Math.max(0,At)],src:null===t||void 0===t?void 0:t.src}})):[],Rt=[];if("whatmore"==(0,h.NCy)(jt)&&(null===Q||void 0===Q||null===(y=Q.images)||void 0===y?void 0:y.length)>0){var Lt;var Bt;if(-1!==(null===Q||void 0===Q||null===(Lt=Q.options)||void 0===Lt?void 0:Lt.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"))}))))Rt=null===Q||void 0===Q||null===(Bt=Q.images)||void 0===Bt?void 0:Bt.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===(j=b.options)||void 0===j||null===(S=j[zt])||void 0===S||null===(k=S.values)||void 0===k?void 0:k.length)&&(Ft=[]),(0,f.jsxs)(xt.s,{sx:{"&::-webkit-scrollbar":{width:"0px"}},id:"whatmore-shopnow-view",className:"wht-shn-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:It,children:[(0,f.jsx)(te,{setOpenShopNow:X,setLockSwiper:$,FONT_SIZE:W}),(0,f.jsx)(s.o,{marginBottom:"10px",px:"20px",py:"5px",children:(0,f.jsx)(xt.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,h.YcK)(jt),borderColor:(0,h.Fwt)(jt)},children:(0,f.jsx)(xt.s,{width:"100%",children:(0,f.jsx)(ae.c,{renderElement:t=>(0,f.jsx)(f.Fragment,{children:(0,f.jsx)(c.az,{width:B+"px",height:O+"px",children:(0,f.jsx)(_._,{width:B+"px",height:O+"px",borderRadius:"round"==(null===bt||void 0===bt?void 0:bt.whatmoreUITheme)?"lg":null,src:(0,ft.b)(t.eventData.src,"&width=400&height=400"),alt:U.handle,sx:{objectFit:(0,h.KZe)(jt)+" !important"},fallback:(0,f.jsx)(D.A,{width:B+"px",height:O+"px",borderRadius:"round"==(null===bt||void 0===bt?void 0:bt.whatmoreUITheme)?"10px":"0px"})})})}),dataList:Ft.length>0&&!Ft.includes(null)?null===(I=Ft)||void 0===I?void 0:I.filter((t=>(null===t||void 0===t?void 0:t.color)==Tt)):Rt.length>0?[null===(z=Rt)||void 0===z?void 0:z.find((t=>(null===t||void 0===t?void 0:t.color)==Tt))]:null===Q||void 0===Q||null===(T=Q.images)||void 0===T?void 0:T.map((t=>({src:t.includes("https")?t:"https:"+t}))),spacing:10,defaultHeight:B+"px",defaultWidth:O+"px",retainAlreadyRenderedElements:!0,isScroll:!0})})})}),(0,f.jsx)(ne,{data:Q,product:U,PRODUCT_TILE_HEIGHT:L,PRODUCT_TILE_WIDTH:R,FONT_SIZE:W,getVariantPrice:se,selectedVariantId:nt,itemPrice:lt,itemQuantity:rt,setItemQuantity:at,thumbnailImage:yt}),(null===Q||void 0===Q||null===(E=Q.variants)||void 0===E?void 0:E.length)>0&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(s.o,{paddingTop:"4px",width:"100%",children:(0,f.jsx)(gt.c,{color:(0,h.R6d)(jt),size:"xs",width:"90%"})}),(0,f.jsx)(re,{data:Q,dividerColor:(0,h.R6d)(jt),setSelectedColor:Et,finalArr:Ft,finalArrExternal:Rt,product:U,PRODUCT_TILE_HEIGHT:L,PRODUCT_TILE_WIDTH:R,FONT_SIZE:W,selectOptionFirstHandler:St,selectOptionSecondHandler:Ct,selectOptionThirdHandler:kt,getVariantPrice:se,selectedOptionFirst:K,selectedOptionSecond:Z,selectedOptionThird:et,selectedVariantId:nt,isVariantAvailable:G})]}),(0,h.wW8)(jt)&&((null===Q||void 0===Q?void 0:Q.description)||(null===Q||void 0===Q?void 0:Q.body_html))&&(0,f.jsx)(ee,{PRODUCT_TILE_HEIGHT:L,FONT_SIZE:W,data:Q,handleToggle:()=>M(!V),show:V}),(0,f.jsx)(c.az,{sx:{pointerEvents:"none"},paddingTop:"20px",opacity:0,children:(0,f.jsx)(Zt,{position:"relative",data:Q,FONT_SIZE:W,product:U})}),(0,f.jsx)(Zt,{position:"fixed",selectedVariantId:nt,data:Q,FONT_SIZE:W,PRODUCT_TILE_WIDTH:R,product:U,itemQuantity:rt,cartItemCount:ut,addToCartFlag:ht,setAddToCartFlag:vt,soldOutFlag:mt,setSoldOutFlag:wt,event:H})]})}const de=(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},se=(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},ce=(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},ue=(0,n.createContext)({setShowOptionsChart:null});var pe=function(t){const e=t.event,i=t.data,o=t.currentProduct,r=t.setOpenShopNow,a=t.setLockSwiper,[l,d]=(0,n.useState)(!1);return(0,f.jsx)(ue.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)(le,{data:i,event:e,product:o,setOpenShopNow:r,setLockSwiper:a})})}),l?(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)(Yt,{data:i,event:e,product:o,setShowOptionsChart:()=>{d(!1)}})})}):(0,f.jsx)(f.Fragment,{})]})})};var he=function(t){var e,[i,o,r,a]=(0,m.A)();const[l,d]=(0,n.useState)(!1),[x,y]=(0,n.useState)(),[_,b]=(0,n.useState)(),j=(0,v.Xd)("whatmoreShopId"),S=t.event,C=t.onBack,k=n.useRef(),I=t.isPlaying,z=t.isLast,T=t.setLockSwiper,E=t.selectedVariantId,N=null===(e=t.showOverlay)||void 0===e||e,P="center";return(0,f.jsx)(s.o,{children:(0,f.jsxs)(c.az,{width:a,height:r,sx:{overflow:"hidden"},children:[(0,f.jsx)(u.B,{direction:"column",justifyContent:P,height:"full",width:"full",children:(0,f.jsx)(c.az,{borderRadius:"md",backgroundColor:"white",children:(0,f.jsx)(p.g,{width:"full",ratio:a/r,children:(0,f.jsx)(w,{height:"100%",width:"100%",url:S.event_hls_url,isPlaying:I,event:S})})})}),N?(0,f.jsx)(u.B,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:P,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)(Xt,{focusRef:k,event:t.event,isLast:z,onCloseCallback:C,productClickHandler:async t=>{const e=await(0,g.M)(t,(0,h.NCy)(j),j);b(t),y(e),d(!0),T(!0)}})})}):(0,f.jsx)(f.Fragment,{}),!0===l?(0,f.jsx)(u.B,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:P,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:k,event:t.event,isLast:z,onCloseCallback:()=>C(),setLockSwiper:T,data:x,currentProduct:_,setOpenShopNow:d,selectedVariantId:E})})}):(0,f.jsx)("div",{})]})})};const ve=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,a]=(0,m.A)();const[l]=(0,v.QN)("whatmoreSecondaryColor"),[d]=(0,v.QN)("whatmoreSecondaryColorShade900"),s=t.progress,p=null!==(e=t.totalSiblings)&&void 0!==e?e:1,h=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(p).keys()].map((t=>(0,f.jsx)(u.B,{width:"100%",height:.004*r+"px",backgroundColor:t<h?l:d+"99",borderRightRadius:"lg",borderLeftRadius:"lg",direction:"row",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",sx:{display:"block !important"},children:t==h?(0,f.jsx)(c.az,{height:"100%",width:s+"%",bgColor:l,borderRightRadius:"lg",borderLeftRadius:"lg",sx:{display:"block !important"}}):(0,f.jsx)(f.Fragment,{})},"event-progress-bar-slab-"+t)))})}var ge=i(3788),xe=i(758);const fe=t=>t>=1e3?(t/1e3).toFixed(1)+"k":t,we=()=>"undefined"!==typeof window&&window.innerWidth>=1024;var ye=function(t){var e,i,o,r,l,d=t.whatmoreShareTemplateId;const p=t.whatmoreShareStoryId,g=t.whatmoreShareEventId,x=t.event,w=null===(e=t.showShareText)||void 0===e||e,_=null!==(i=t.shareButtonBottomMargin)&&void 0!==i?i:0,b=(0,v.Xd)("whatmoreShopId"),j=(0,v.Xd)("isInDesignMode"),S=(0,v.Xd)("isDemoBrand"),C=(0,v.Xd)("whatmorePrimaryFont"),k=(0,v.Xd)("websiteLanguage"),{whatmoreWidgetSourceDetails:I}=(0,n.useContext)(U.B),[z,T,E,N]=(0,m.A)(),P=null!==(o=t.iconSize)&&void 0!==o?o:.1*N*(0,h.xkB)(b);function A(){const e=(0,v.Xd)("whatmoreLandingLocationType");var i;!function(t){j||S||(async()=>{(0,a.Zh)(t)})()}(x),(e.startsWith("product")||"embed"===e)&&(d="te"),i="event_product_link"===(0,h.moP)(b)?x.products[0].product_link||"":window.location.pathname,i=("event_product_link"===(0,h.moP)(b)?"":window.location.hostname)+i+"?wtt="+d+"&wsid="+p+"&weid="+g,(0,h.BLb)(b)&&(i=i+"&"+(0,h.VCz)(b)+"&utm_campaign=video-share&utm_medium="+e);const n={title:(0,h.kZI)(b),text:`${(0,h.dmA)(b)} \n ${i} ${"50529403072"!==b&&(0,h.ZX9)(b)?"\n \n -via Whatmore":""}`};navigator.share&&!we?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:_+"px"},children:(0,f.jsxs)(u.B,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[(0,f.jsx)(xe.A,{sx:{transform:"scaleX(-1)",color:"white",fontSize:P,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),A(),(0,Q.kz)({userInteractionType:H.O.VIDEO_SHARE_CTA_CLICKED,widgetSourceDetails:I,event:x,productList:x.products,ctaList:x.cta})}}),w&&(0,h.ViG)(b)?(0,f.jsxs)(y.E,{fontSize:.3*P+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:C+" !important",color:"white !important",maxWidth:"48px",wordWrap:"break-word"},children:["\xa0",x.total_share>(0,h.vDV)(b)?fe(x.total_share):null!==(r=null===et||void 0===et||null===(l=et[k])||void 0===l?void 0:l.share)&&void 0!==r?r:"Share","\xa0"]}):(0,f.jsx)(f.Fragment,{})]})})})},_e=i(3420),be=i(7170);var je=function(t){var e,i,o;const r=(0,v.Xd)("whatmoreShopId"),l=(0,v.Xd)("whatmorePrimaryFont"),d=(0,v.Xd)("whatmoreLikedEvents"),p=(0,v.Xd)("isInDesignMode"),g=(0,v.Xd)("isDemoBrand"),x=(0,v.Xd)("websiteLanguage"),{whatmoreWidgetSourceDetails:w}=(0,n.useContext)(U.B),_=t.event,[b,j]=(0,n.useState)(null!==(e=d[_.event_id])&&void 0!==e&&e),[S,C,k,I]=(0,m.A)(),z=.1*I*(0,h.xkB)(r);function T(t,e){p||g||(async()=>{(0,a.$B)(t,e)})()}function E(){(0,v.t2)("whatmoreLikedEvents",{...d,[_.event_id]:!b}),b?(T(_,-1),(0,Q.kz)({userInteractionType:H.O.VIDEO_UNLIKED,widgetSourceDetails:w,event:_,productList:_.products,ctaList:_.cta})):(T(_,1),(0,Q.kz)({userInteractionType:H.O.VIDEO_LIKED,widgetSourceDetails:w,event:_,productList:_.products,ctaList:_.cta})),j(!b)}const N=_.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)(be.A,{sx:{boxShadow:3,color:(0,h.MJ6)(r),fontSize:z,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),E()}}):(0,f.jsx)(_e.A,{sx:{boxShadow:3,color:"white",fontSize:z,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),E()}}),(0,f.jsx)(f.Fragment,{children:(0,h.FlI)(r)?(0,f.jsxs)(y.E,{fontSize:.3*z+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:l+" !important",color:"white !important",position:"relative",bottom:"5px"},children:["\xa0",N>=(0,h.LGx)(r)?fe(N):null!==(i=null===et||void 0===et||null===(o=et[x])||void 0===o?void 0:o.like)&&void 0!==i?i:"Like","\xa0"]}):(0,f.jsx)(f.Fragment,{})})]})})})};const Se=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 Ce=i(1941);const ke=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"})})})},Ie=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 ze=t=>{const e=t.shareText,[i,o]=(0,n.useState)("Copy link"),[r,a]=(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)($t.A,{className:"close-rounded-icon",onClick:e=>{e.stopPropagation(),t.setIsModalOpen(!1)}})]}),(0,f.jsx)("div",{}),(0,f.jsx)(gt.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)(Se,{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)(ke,{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"),a("green")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,f.jsx)(Ie,{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 n=null===(e=t.brandName)||void 0===e?void 0:e.replace(/\s+/g,"_"),o=(0,v.Xd)("whatmorePrimaryFont"),r=(0,v.Xd)("whatmoreShopId"),a=null!==(i=t.fontSize)&&void 0!==i?i:"8",[l]=(0,Ce.A)(),d="landscape"===l?"customer_referral_desktop":"customer_referral_mobile",s="60183543963"==r,p=(0,v.Xd)("whatmoreLandingLocationType"),m=t.isOutside||!p.includes("index")||r.includes("STR")?`https://www.whatmore.ai/shoppable-videos?utm_source=${n}&utm_medium=referral&utm_campaign=${d}`:`https://apps.shopify.com/whatmore-live?utm_source=${n}&utm_medium=referral&utm_campaign=${d}`,g=s?"https://www.letsmapit.in/":m;return(0,f.jsx)(St.N,{href:g,isExternal:!0,textDecoration:"none",children:(0,h.SGs)(r)&&(0,f.jsxs)(u.B,{direction:"row",justifyContent:"flex-start",alignItems:"center",width:"fit-content",spacing:"6px",paddingLeft:"2px",paddingRight:"2px",children:[(0,f.jsx)("p",{ref:e=>{var i;e&&(e.style.setProperty("font-family",o,"important"),e.style.setProperty("font-size",a+"px","important"),e.style.setProperty("text-align","center","important"),e.style.setProperty("color",null!==(i=t.color)&&void 0!==i?i:"white"))},children:s?"marketed by":"Powered By"}),s?(0,f.jsx)(c.az,{padding:"1px 4px",bg:"#fff",width:"fit-content",children:(0,f.jsx)("img",{src:"https://whatmore-other-assets.b-cdn.net/gudworld/Letsmapit_Logo.png",style:{objectFit:"contain",width:1.7*a,backgroundColor:"transparent",borderRadius:"0px"},alt:"letsmapit"})}):(0,f.jsxs)(c.az,{display:"flex",alignItems:"center",gap:"4px",children:[(0,f.jsx)("img",{src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",width:1.3*a,backgroundColor:"transparent",borderRadius:"0px"},alt:"whatmore"}),(0,f.jsx)("p",{ref:e=>{var i;e&&(e.style.setProperty("font-family",o,"important"),e.style.setProperty("font-size",a+"px","important"),e.style.setProperty("text-align","center","important"),e.style.setProperty("color",null!==(i=t.color)&&void 0!==i?i:"white"))},children:"Whatmore"})]})]})})},Ee=i(9879),Ne=i(9556),Pe=i(2209);var Ae=()=>(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 Fe=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),[a,l]=(0,n.useState)(null),[d,s]=(0,n.useState)(null),p=(0,n.useRef)(null),h=(0,n.useContext)(U.B);return(0,n.useEffect)((()=>{if(o){const e=setTimeout((()=>{t.setIsQuestionVisible(!1)}),1e3);return()=>clearTimeout(e)}}),[o]),(0,n.useEffect)((()=>{!o&&p.current&&s(p.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:p,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,Q.kz)({userInteractionType:H.O.QUESTION_CLOSED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id},widgetSourceDetails:h})},children:(0,f.jsx)(Pe.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)(Ne.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)(Ae,{}),(0,f.jsx)(Ne.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:a===e?"gray.200":"white",borderColor:a===e?"gray.400":"gray.200",_hover:{bg:"gray.200"},onClick:()=>(e=>{var i;l(e),r(!0),(0,Q.kz)({userInteractionType:H.O.QUESTION_ANSWERED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(i=t.question)||void 0===i?void 0:i.id,response:e},widgetSourceDetails:h})})(e),transition:"background-color 0.2s, border-color 0.2s",display:"flex",alignItems:"center",width:"100%",children:(0,f.jsx)(y.E,{py:5,color:"gray.800",children:e})},i)))})})]})},Re=i(9935);var Le=t=>{var e,i;const[o,r]=(0,n.useState)(""),[a,l]=(0,n.useState)(""),[d,s]=(0,n.useState)(!1),[u,p]=(0,n.useState)(!1),m=(0,v.Xd)("whatmoreShopId"),g=(0,v.Xd)("whatmoreSecondaryColor"),x=(0,v.Xd)("whatmorePrimaryFont"),w=null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.title,_=(0,n.useContext)(U.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,Q.kz)({userInteractionType:H.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:_})):l("Please enter valid contact info.")},j=()=>{var e;t.setIsQuestionVisible(!1),(0,Q.kz)({userInteractionType:H.O.QUESTION_CLOSED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id},widgetSourceDetails:_})};return(0,f.jsx)(xt.s,{bg:g,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)(A.A,{onCloseCallback:j})}),(0,f.jsxs)(c.az,{position:"relative",width:"70%",onClick:()=>{const t=(0,h.TH)(m);navigator.clipboard.writeText(t).then((()=>{p(!0),setTimeout((()=>{j()}),1e3),setTimeout((()=>p(!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,h.TH)(m)}),(0,f.jsx)(Re.A,{sx:{color:u?{whatmoreSecondaryColor:g}:"gray",cursor:"pointer",marginLeft:"2%"}})]}),u&&(0,f.jsx)(c.az,{padding:"4%",position:"absolute",left:"50%",transform:"translateX(-50%)",bg:g,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)(y.E,{fontFamily:x,fontSize:"22px",fontWeight:"bold",children:w})}),(0,f.jsx)(c.az,{marginBottom:"10%",fontSize:"md",children:(0,h.aRV)(m)})]}),(0,f.jsx)(c.az,{position:"fixed",top:"2%",right:"2%",zIndex:20,children:(0,f.jsx)(A.A,{onCloseCallback:j})}),(0,f.jsxs)(xt.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:x,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),a&&l("")},onKeyDown:t=>{"Enter"===t.key&&b()},style:{fontSize:"1em",border:"none",outline:"none",width:"100%"}})}),a&&(0,f.jsx)(y.E,{color:"red.500",mb:"4% !important",fontSize:"md",textAlign:"center",width:"100%",children:a}),(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)(y.E,{fontFamily:x,fontSize:"0.8em",padding:"2%",color:g,children:"SUBMIT"})})]})]})})};var Be=t=>{const[e,i]=(0,n.useState)(null);return(0,f.jsx)(c.az,{children:!e&&(0,f.jsx)(Le,{question:t.question,onEmailSubmit:t=>{i(t)},setIsQuestionVisible:t.setIsQuestionVisible,placeholder:t.placeholder})})};var Oe=t=>{var e;const[i,o]=(0,n.useState)(null),r=t.questionIndex,a=t.questionList;if((0,n.useEffect)((()=>{if(!(r>=a.length))return()=>(0,lt.Hm)()}),[]),r>=a.length)return;const l=null===a||void 0===a?void 0:a[r];return"string"===(null===l||void 0===l?void 0:l.type)||"number"===(null===l||void 0===l?void 0:l.type)?(0,f.jsx)(c.az,{children:(0,f.jsx)(Be,{setIsQuestionVisible:t.setIsQuestionVisible,question:l,placeholder:"number"===(null===l||void 0===l?void 0:l.type)?"Enter your phone number":"Enter your email"})}):(0,f.jsx)(c.az,{children:(0,f.jsx)(Fe,{question:l,options:null===l||void 0===l||null===(e=l.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})})},De=i(6118);function We(t){var e;const i=t.event,[o,r,a,l]=(0,m.A)(),[d]=(0,v.QN)("whatmorePrimaryFont"),{whatmoreIsStoriesTemplate:p}=(0,n.useContext)(U.B),[g]=(0,v.QN)("whatmoreSecondaryColor"),[x]=(0,v.QN)("whatmoreShopId"),w=(0,h.ivI)(x),_=null!==(e=(0,h.qAx)(x))&&void 0!==e?e:[g,w,g,w,g],b=(0,n.useRef)(null);(0,n.useEffect)((()=>{b.current&&b.current.play()}),[]);const j=(0,ge.s)(null===i||void 0===i?void 0:i.storyset_thumbnail_image);return(0,f.jsx)(f.Fragment,{children:p?(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 "+_[0]+"50, 0px -2px 1px 0px "+_[1]+"50, 2px 0px 1px 0px "+_[2]+"50, -2px 0px 1px 0px "+_[3]+"80, 2px -2px 1px 0px "+_[4]+"80, -2px 2px 1px 0px "+_[0]+"DA, 2px 2px 1px 0px "+_[1]+"DA, -2px -2px 1px 0px "+_[2]+"DA"},children:"video"==(0,ft.B)(j)?(0,f.jsx)(Ee.A,{height:"100%",width:"100%",poster:null===i||void 0===i?void 0:i.thumbnail_image,url:j,isPlaying:!0,event:{event_type:"video"},borderRadius:"50%"}):(0,f.jsx)("img",{src:j,style:{objectFit:"cover",height:"100%",width:"100%",backgroundColor:"white"}})})}),(0,f.jsx)(s.o,{children:(0,f.jsx)(y.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,l,d]=(0,Ce.A)(),[s]=(0,v.QN)("isInDesignMode"),[p]=(0,v.QN)("isDemoBrand"),[g,x]=(0,v.QN)("isProductSwiperCatalogOpen"),[w,_]=(0,v.QN)("isFirstIndicatorRenderDone"),[j]=(0,v.QN)("whatmoreShopId"),S=(0,n.useContext)(zi),{whatmoreEventsBrowsingTemplate:C}=(0,n.useContext)(U.B),[k,I,z,T]=(0,m.A)(),E=(0,v.Xd)("whatmorePrimaryFont"),P=t.event,F=t.storySetId,R=t.isLast,L=t.onCloseCallback,B=t.focusRef,D=t.productClickHandler,W=t.videoPlayingData,V=t.totalSiblingEvents,M=t.indexAmongSiblings,X=t.leftOpenSpaceClickHandler,$=t.midOpenSpaceClickHandler,Y=t.rightOpenSpaceClickHandler,{whatmoreWidgetSourceDetails:q}=(0,n.useContext)(U.B),G=.1*T,[K,J]=(0,n.useState)(!1),[Z,tt]=(0,n.useState)([]);function et(){var t;s||p||(async()=>{(0,a.A9)(P,1)})(),(0,Q.kz)({userInteractionType:H.O.WHATSAPP_ICON_CLICKED,widgetSourceDetails:q,event:P,productList:null===P||void 0===P?void 0:P.products,ctaList:null===P||void 0===P?void 0:P.cta});const e=P.products.map((t=>`${t.product_link} \n`)),i=(0,h.dzp)(j),n="50529403072"==j?`Hey, I saw a video on your website, need more info about this: \n${e}`:`Hey, I am interested in ${P.products.length>1?"these products":"this product"} I saw on ${null===(t=P.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")}const it=t=>{nt.current&&!nt.current.contains(t.target)&&J(!1)},nt=(0,n.useRef)(null);(0,n.useEffect)((()=>(K?document.addEventListener("click",it):document.removeEventListener("click",it),()=>{document.removeEventListener("click",it)})),[K]);const ot=(()=>{const t=(0,v.Xd)("whatmoreShopId");return"Free"==(0,h.yt9)(t)})()&&"portrait"==r;return(0,f.jsxs)(c.az,{width:"full",height:"full",borderRadius:"md",children:[t.isQuestionVisible&&(0,f.jsx)(Vt.S,{userInteractionType:H.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&&!p,children:(0,f.jsx)(Oe,{questionList:t.questionList,questionIndex:t.qIndex,setIsQuestionVisible:t.setIsQuestionVisible})}),K&&(0,f.jsx)("div",{ref:nt,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)(ze,{shareText:Z,setShareText:tt,iconSize:G,isModalOpen:K,setIsModalOpen:J})}),(!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:[S.showVideoPlayingData?(0,f.jsx)(u.B,{direction:"row",width:"100%",height:"fit-content",marginTop:"5px",justifyContent:"center",children:(0,f.jsx)(me,{progress:ve(W.current_time,W.video_duration),totalSiblings:V,indexAmongSiblings:M})}):(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)(We,{event:P,width:T}),(0,f.jsxs)(u.B,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,_t.Yt)(C)?(0,f.jsx)(ye,{whatmoreShareTemplateId:(0,_t.Gy)(C),whatmoreShareStoryId:F,whatmoreShareEventId:P.event_id,event:P,showShareText:!1,iconSize:.098*T,setIsModalOpen:J,setShareText:tt}):(0,f.jsx)(f.Fragment,{}),(0,f.jsx)(b.A,{focusRef:B}),("landscape"!==r||t.showCloseOverlay)&&(0,f.jsx)(A.A,{event:P,onCloseCallback:L})]})]})})]}),"78232846646"===j&&"portrait"===r&&S.totalEvents>1&&(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)(De.A,{style:{fontSize:1.3*G+"px",transform:"rotate(180deg)",color:"white",cursor:"pointer",filter:"drop-shadow(0 0 5px black)"},onClick:()=>{t.changeSlide(P,"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)(De.A,{style:{fontSize:1.3*G+"px",color:"white",cursor:"pointer",filter:"drop-shadow(0 0 5px black)"},onClick:()=>{t.changeSlide(P,"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:()=>{X()},sx:{display:"block !important"}}),(0,f.jsx)(c.az,{width:"34%",height:"100%",onClick:()=>{$()},sx:{display:"block !important"}}),(0,f.jsx)(c.az,{width:"33%",height:"100%",onClick:()=>{Y()},sx:{display:"block !important"}})]}),(0,f.jsxs)(c.az,{width:"full",height:"fit-content",children:[S.totalEvents>1&&!w&&S.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)(O,{swipeUp:!R})})}):null,(0,f.jsx)(c.az,{width:"fit-content",height:"fit-content",position:"absolute",right:4,bottom:"30%",children:(0,f.jsxs)(c.az,{display:"flex",flexDirection:"column",alignItems:"center",children:[(0,h.oZc)(j)&&!(0,_t.Yt)(C)?(0,f.jsx)(c.az,{width:"fit-content",paddingY:"12px",position:"relative",children:(0,f.jsxs)(u.B,{gap:"4px",direction:"column",alignItems:"center",cursor:"pointer",onClick:et,children:[(0,f.jsx)(Se,{iconSize:.7*G,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,f.jsx)(y.E,{fontSize:G*(0,h.LOH)(j)+"px",fontWeight:"bold",align:"center",style:{marginTop:0},sx:{fontFamily:E+" !important",color:"white !important"},children:(0,h.wtw)(j)})]})}):(0,f.jsx)(f.Fragment,{}),(0,h.MdM)(j)&&(0,f.jsxs)(c.az,{height:"fit-content",position:"relative",children:[(0,f.jsx)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,f.jsx)(je,{event:P})}),(0,_t.Yt)(C)&&"50529403072"===j&&(0,f.jsx)(c.az,{ml:"auto",width:"fit-content",paddingY:"12px",children:(0,f.jsxs)(u.B,{gap:"4px",marginRight:"-3px",direction:"column",justifyContent:"flex-end",alignItems:"center",cursor:"pointer",onClick:et,children:[(0,f.jsx)(Se,{iconSize:.6*G,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,f.jsx)(y.E,{fontSize:G*(0,h.LOH)(j)+"px",fontWeight:"bold",align:"center",style:{marginTop:0},sx:{fontFamily:E+" !important",color:"white !important"},children:(0,h.wtw)(j)})]})})]}),(0,h.iQ5)(j)&&!(0,_t.Yt)(C)?(0,f.jsx)(c.az,{height:"fit-content",paddingY:"2px",position:"relative",children:(0,f.jsx)(u.B,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,f.jsx)(ye,{whatmoreShareTemplateId:(0,_t.Gy)(C),whatmoreShareStoryId:F,whatmoreShareEventId:P.event_id,event:P,setIsModalOpen:J,setShareText:tt})})}):(0,f.jsx)(f.Fragment,{})]})}),(0,Wt.Z_)(P)?(0,f.jsxs)(c.az,{width:"full",children:[(0,h.ek9)(j)?(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)(N,{event:P,onToggle:t=>{x("minimize-button"!==t)}})})}):(0,f.jsx)(f.Fragment,{}),(0,f.jsx)(c.az,{display:"flex",width:"100%",height:"fit-content",children:(0,f.jsx)(Qt,{event:P,productClickHandler:D})})]}):(0,f.jsx)(f.Fragment,{})]}),ot&&(0,f.jsx)(u.B,{direction:"row",width:"100%",height:"fit-content",bg:"rgba(52, 52, 52, 0.9)",py:"3px",justifyContent:"center",children:(0,f.jsx)(Te,{brandName:null===P||void 0===P?void 0:P.brand,fontSize:.033*T})})]})]})},Me=i(5491),Qe=i.n(Me),He=i(6493);var Ue=function(t){var e,i,o,r,a,l,[d,w,y,_]=(0,m.A)();const[b,j]=(0,n.useState)(!1),[S,C]=(0,n.useState)(),[k,I]=(0,n.useState)(),[z,T]=(0,n.useState)({current_time:0,video_duration:0,is_video_ended:!1}),E=(0,v.Xd)("whatmoreShopId"),N=t.event,P=t.storyId,A=t.onBack,F=n.useRef(),R=t.changeSlide,L=t.isPlaying,B=t.isLast,O=t.setLockSwiper,D=t.onVideoEndedCallback,W=t.progressUpdateCallback,V=null!==(e=t.totalSiblingEvents)&&void 0!==e?e:0,M=null!==(i=t.indexAmongSiblings)&&void 0!==i?i:0,X=null===(o=t.showOverlay)||void 0===o||o,$=null!==(r=t.leftOpenSpaceClickHandler)&&void 0!==r?r:()=>{},Y=null!==(a=t.midOpenSpaceClickHandler)&&void 0!==a?a:()=>{},q=null!==(l=t.rightOpenSpaceClickHandler)&&void 0!==l?l:()=>{},{whatmoreWidgetSourceDetails:G}=(0,n.useContext)(U.B),{questionList:K}=(0,n.useContext)(zi),J=(null===K||void 0===K?void 0:K.length)>0?parseInt(localStorage.getItem("_whatmore_qview_index")):1e4,[Z,tt]=(0,n.useState)();(0,n.useEffect)((()=>{tt(t.showQuestion)}),[t.showQuestion]);const et="center";let it;try{it=Qe()((()=>{D()}),1e3,{leading:!0,trailing:!1})}catch(nt){console.log(nt)}return(0,f.jsx)(s.o,{children:(0,f.jsxs)(c.az,{width:_,height:y,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)(p.g,{width:"full",ratio:_/y,children:(0,f.jsx)(x.A,{height:"100%",width:"100%",url:(0,ge.s)((0,He.lP)(N)),isPlaying:L&&(!Z||J>=K.length),timeUpdateCallback:function(t,e){const i=ve(t,e);W({watch_time:t,video_duration:e});const n=z.is_video_ended;i>=99&&L&&!n?(it(),T({current_time:t,video_duration:e,is_video_ended:!0})):T({current_time:t,video_duration:e,is_video_ended:n})},event:N,question:Z&&J<(null===K||void 0===K?void 0:K.length),source:t.source})})})}),X?(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:F,event:t.event,isLast:B,onCloseCallback:t=>{A(t),(0,Q.DG)({userInteractionType:H.O.VIDEO_PLAYBACK,userInteractionMetadata:{watch_time:z.current_time,video_duration:z.video_duration},widgetSourceDetails:G,event:N,productList:N.products,ctaList:N.cta})},productClickHandler:async t=>{const e=await(0,g.M)(t,(0,h.NCy)(E),E);I(t),C(e),j(!0),O(!0),(0,Q.kz)({userInteractionType:H.O.SHOPNOW_CLICKED,widgetSourceDetails:G,event:N,productList:N.products,ctaList:N.cta}),(0,v.t2)("whatmoreAllowAutoSlide",!1)},videoPlayingData:z,totalSiblingEvents:V,indexAmongSiblings:M,questionList:K,isQuestionVisible:Z&&J<(null===K||void 0===K?void 0:K.length),qIndex:J,setIsQuestionVisible:tt,leftOpenSpaceClickHandler:$,midOpenSpaceClickHandler:Y,rightOpenSpaceClickHandler:q,storySetId:P,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:R})})}):(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:F,event:t.event,isLast:B,onCloseCallback:()=>A(),setLockSwiper:O,data:S,currentProduct:k,setOpenShopNow:t=>{j(t),(0,v.t2)("whatmoreAllowAutoSlide",!t)}})})}):(0,f.jsx)("div",{})]})})},Xe=i(2039),$e=i(6613),Ye=i(1085),qe=i(5727);var Ge=function(t){var[e,i,n,o]=(0,m.A)();const r=(0,v.Xd)("whatmoreShopId"),a=t.event,l=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)(p.g,{width:"full",ratio:o/n,children:(0,f.jsx)(x.A,{height:"100%",width:"100%",url:(0,ge.s)((0,He.lP)(a)),isPlaying:l,timeUpdateCallback:function(t,e){},event:a,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,Ye.bo)()},children:(0,f.jsxs)(u.B,{direction:"column",justifyContent:"center",alignItems:"center",height:"full",width:"full",children:[(0,f.jsx)(qe.A,{sx:{boxShadow:3,color:(0,h.KFN)(r),fontSize:.4*o,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{(0,Ye.bo)()}}),(0,f.jsx)(y.E,{color:"white",fontSize:.05*o+"px",fontWeight:"bold",align:"left",children:"Please click to play video.."})]})})})]})})},Ke=i(3294),Je=i(9821);const Ze=n.lazy((()=>i.e(931).then(i.bind(i,7059))));var ti=function(t){var e,i;const n=t.changeSlide,o=t.event,r=null===(e=t.isPlaying)||void 0===e||e,a=t.onBack,s=t.isLast,c=t.setLockSwiper,u=(t.heightFactor,t.widthFactor,t.onVideoEndedCallback),p=t.progressUpdateCallback,[h,m]=(0,Ht.A)(),[g]=(0,v.QN)("whatmoreVideoPlayerPoolBlessed"),x=null===(i=t.showOverlay)||void 0===i||i;function w(){m(!h)}if((0,$e.MN)()&&0==g&&"recommended_images"!=(null===o||void 0===o?void 0:o.event_type))return(0,Je._)()?(0,f.jsx)(Ge,{event:o,onBack:a,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:u,progressUpdateCallback:p,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:x,source:Ke.N.CAROUSEL_EVENT_OPENED},"shopping-video-view"+o.event_id):(0,f.jsx)(Ue,{event:o,onBack:a,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:u,progressUpdateCallback:p,showQuestion:t.showQuestion,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:x,source:Ke.N.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:n},"shopping-video-view"+o.event_id);if((0,Xe.ij)(o)||(0,Xe.Il)(o))return(0,f.jsx)(Ue,{event:o,onBack:a,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:u,progressUpdateCallback:p,showQuestion:t.showQuestion,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:x,source:Ke.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)(Ze,{onBack:a,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,Xe.Th)(o)){var{status:y,bannerText:_,timeToStartInMins:b}=d.A.getEventStatus(o);if(y.name===l.A.LIVE.name)return(0,f.jsx)(he,{event:o,onBack:a,isPlaying:r,isLast:s,showOverlay:x},"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",{})},ei=i(4806),ii=i.n(ei),ni=i(2804),oi=i(6834);function ri(t){var e;const[i,o]=(0,n.useState)(!1),r=t.onClick,a=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)(oi.A,{sx:{color:"white",fontSize:a+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{o(!0),setTimeout((()=>{o(!1)}),500),r(t,"up")}}):(0,f.jsx)(ni.A,{sx:{color:"white",fontSize:a+"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%",a=null!==(n=t.fontSize)&&void 0!==n?n:50,l=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)(ri,{type:"left",onClick:l,fontSize:a}),(0,f.jsx)(ri,{type:"right",onClick:l,fontSize:a})]})})},li=i(964),di=i(3330);var si=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 ci=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 a=o-n.changedTouches[0].clientX,l=r-n.changedTouches[0].clientY;return"vertical"==t&&Math.abs(l)>e||"horizontal"==t&&Math.abs(a)>e?"vertical"==t?l>0?"right":"left":a>0?"right":"left":null}]};var ui=function(t,e){const i=(0,n.useRef)(Qe()(((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 a=r>0?"right":"left";i.current(o,a)}]},pi=i(6325);var hi=function(t){const e=t.events,i=t.eventIndex,l=t.onBack;var[d,s,c,p]=(0,m.A)();const[g]=(0,v.QN)("isInDesignMode"),[x]=(0,v.QN)("isDemoBrand"),[w,y]=(0,n.useState)(!0),[_,b]=(0,v.QN)("isFirstIndicatorRenderDone"),[j,S]=(0,n.useState)(!1),[C,k]=(0,n.useState)({}),{setCloseClickComponent:I}=(0,n.useContext)(zi),{slideDirection:z}=(0,n.useContext)(zi),[T]=(0,v.QN)("whatmoreShopId"),[E]=(0,v.QN)("whatmoreLandingLocationType"),[N,P]=si(i,e.length),[A,F]=ci(z,10),[R]=ui("vertical",10),[L,B]=(0,n.useState)(!0),[O,D]=(0,n.useState)(null),{whatmoreWidgetSourceDetails:W,whatmoreUserInfo:M}=(0,n.useContext)(U.B);function X(){B(!1)}function $(t){X(),setTimeout((()=>{l(t)}),500)}const Y=W.landingLocationType,q=W.templateType;I($);let G=i;const{questionList:K}=(0,n.useContext)(zi);function J(){(0,v.Xd)("whatmoreAllowAutoSlide")&&(P("right"),O.slideNext())}function Z(t,e){P(e),function(t,e){O&&("left"===e?O.slidePrev():O.slideNext())}(0,e)}const tt=Math.round(.05*c);return(0,f.jsx)(ii(),{isOpen:L,onRequestClose:X,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,V.YU)("#000000",13)},onTouchStart:t=>{A(t)},onTouchEnd:t=>{if(j)return;const e=F(t);e&&Z(0,e)},onWheel:t=>{j||R(t,(t=>{Z(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:!j,allowSlidePrev:!j,allowTouchMove:!1,onSwiper:t=>{D(t),(0,Q.kz)({userInteractionType:H.O.EVENT_VIEW,widgetSourceDetails:W,event:e[N().activeIndex],productList:e[N().activeIndex].products})},onSlideChange:t=>{var i;w?y(!1):(_||b(!0),(0,Q.DG)({userInteractionType:H.O.VIDEO_PLAYBACK,userInteractionMetadata:C,widgetSourceDetails:W,event:e[N().activeIndex],productList:e[N().activeIndex].products}),i=e[N().activeIndex],g||x||null===i||void 0===i||!i.event_id||(async()=>{const t=(0,_t.Wd)(Y)+(0,_t.gf)(q)+(null!==i&&void 0!==i&&i.isRelatedEvent?"R":"E")+"_"+(null===i||void 0===i?void 0:i.event_id);(0,a.lB)(i),"index"===E?((0,di.Si)(T,li.TB,li.Dk),(0,lt.Ch)(i.event_id,i.products,li.TB,li.Dk,t,null===i||void 0===i?void 0:i.location,null===M||void 0===M?void 0:M.userType)):E.startsWith("product")||"embed"===E?((0,di.Si)(T,li.DK,li.K1),(0,lt.Ch)(i.event_id,i.products,li.DK,li.K1,t)):E.startsWith("collection")?((0,di.Si)(T,li.Sx,li.rz),(0,lt.Ch)(i.event_id,i.products,li.Sx,li.rz,t)):((0,di.Si)(T,li.TB,li.Dk),(0,lt.Ch)(i.event_id,i.products,li.TB,li.Dk,t))})(),(0,Q.UM)({userInteractionType:H.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:a,isVisible:l,isDuplicate:d}=n;const s=o?"activeIndex":r?"prevIndex":"nextIndex",c=N()[s];"activeIndex"==s&&(G=Math.max(G,c),0==c&&(G=0));const p=(null===K||void 0===K?void 0:K.length)>0&&o&&l&&(c>i||G<i&&c>0)&&c>=G&&c%(0,h.uSp)(T)==i%(0,h.uSp)(T);return(0,f.jsx)(u.B,{direction:"column",height:window.innerHeight,justifyContent:"center",children:(0,f.jsx)(ti,{event:e[c],showQuestion:p,onBack:$,isPlaying:1==e.length||o&&l,isLast:!1,setLockSwiper:S,onVideoEndedCallback:J,progressUpdateCallback:t=>{k(t)},showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,mode:"portrait",changeSlide:Z})})}},"event-vertical-scroll-slide-"+n)))}),e.length>1&&!j&&(0,h.kb)(T)&&"horizontal"===(0,h.br0)(T)&&"horizontal"===z?(0,f.jsx)(ai,{relativeBottomPercentage:"50%",width:p,handleClick:(t,e)=>{Z(0,"down"==e?"right":"left")},fontSize:parseInt(.12*p)}):(0,f.jsx)(f.Fragment,{})]})})})},vi=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 vi.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 xi=function(t){var e,[i,l,d,p]=(0,m.A)();const[g]=(0,v.QN)("isInDesignMode"),[x]=(0,v.QN)("isDemoBrand"),[w,y]=(0,v.QN)("isFirstIndicatorRenderDone"),[_,b]=(0,n.useState)(0!=t.eventIndex),{setCloseClickComponent:j}=(0,n.useContext)(zi),[S,C]=(0,n.useState)(!1),[k]=(0,v.QN)("whatmoreShopId"),[I]=(0,v.QN)("whatmoreLandingLocationType"),z=(0,v.Xd)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:T,whatmoreUserInfo:E}=(0,n.useContext)(U.B),[N,P]=(0,n.useState)(!1),[F,R]=(0,n.useState)(null);function L(){P(!1)}const B=t.events,O=t.eventIndex,D=t.onBack,W=B.concat(B),M=B.length,X=null===B||void 0===B||null===(e=B[0])||void 0===e?void 0:e.brand,$=(0,n.useRef)(0);function Y(t){L(),setTimeout((()=>{D(t)}),500)}function q(){F&&!F.isEnd&&(0,v.Xd)("whatmoreAllowAutoSlide")&&F.slideNext()}(0,n.useEffect)((()=>(P(!0),()=>{})),[]),j(Y);const G=T.landingLocationType,K=T.templateType,[J,Z]=(0,n.useState)({}),tt=parseInt(Math.min(5,B.length));return(0,f.jsx)(gi,{show:N,closeCallback:L,customClass:"whatmore-landscape-modal-swipe-view",children:(0,f.jsxs)(u.B,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",alignItems:"center",backgroundColor:(0,V.YU)("#000000",13),children:[(0,f.jsx)(s.o,{children:(0,f.jsx)(c.az,{height:"fit-content",width:p*tt,children:(0,f.jsxs)(o.RC,{onInit:t=>{R(t),(0,Q.kz)({userInteractionType:H.O.EVENT_VIEW,widgetSourceDetails:T,event:B[t.activeIndex],productList:B[t.activeIndex].products,ctaList:B[t.activeIndex].cta})},slidesPerView:tt,centeredSlides:!0,allowTouchMove:!1,initialSlide:O,modules:[r.t9,r.Vx,r.FJ,r.Ij,r.dK],navigation:tt>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*d),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:p*tt,watchSlidesProgress:!0,onSlideChange:t=>{var e;_?b(!1):(w||y(!0),e=B[t.activeIndex],g||x||null===e||void 0===e||!e.event_id||(async()=>{const t=(0,_t.Wd)(G)+(0,_t.gf)(K)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,a.lB)(e),"index"===I?((0,di.Si)(k,li.TB,li.Dk),(0,lt.Ch)(e.event_id,e.products,li.TB,li.Dk,t,null===e||void 0===e?void 0:e.location,null===E||void 0===E?void 0:E.userType)):I.startsWith("product")||"embed"===I?((0,di.Si)(k,li.DK,li.K1),(0,lt.Ch)(e.event_id,e.products,li.DK,li.K1,t)):I.startsWith("collection")?((0,di.Si)(k,li.Sx,li.rz),(0,lt.Ch)(e.event_id,e.products,li.Sx,li.rz,t)):((0,di.Si)(k,li.TB,li.Dk),(0,lt.Ch)(e.event_id,e.products,li.TB,li.Dk,t))})(),(0,Q.DG)({userInteractionType:H.O.VIDEO_PLAYBACK,userInteractionMetadata:J,widgetSourceDetails:T,event:B[t.activeIndex],productList:B[t.activeIndex].products,ctaList:B[t.activeIndex].cta}),(0,Q.UM)({userInteractionType:H.O.EVENT_VIEW,widgetSourceDetails:T,event:B[t.activeIndex],productList:B[t.activeIndex].products,ctaList:B[t.activeIndex].cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[B.length>2&&(0,f.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,f.jsx)(A.A,{onCloseCallback:D})}),W.slice(O,B.length+O).map(((t,e)=>(0,f.jsx)(o.qr,{children:t=>{let{isActive:i,isPrev:n,isNext:o,isVisible:r,isDuplicate:a}=t;if(i)return(0,f.jsx)(u.B,{direction:"column",height:d,width:1*p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,f.jsx)(c.az,{overflow:"hidden",sx:{borderRadius:"round"==z?"10px":"0px",borderWidth:(0,h.YcK)(k),borderColor:(0,h.Fwt)(k)},children:(0,f.jsx)(ti,{event:B[e%M],onBack:Y,isPlaying:!0,isLast:e%M===B.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:q,progressUpdateCallback:t=>{Z(t)},showCloseOverlay:(null===B||void 0===B?void 0:B.length)<=2,mode:"landscape"})})});if(o)return(0,f.jsx)(u.B,{direction:"column",height:d,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{F.slideTo(e%M,300)},children:(0,f.jsx)(c.az,{overflow:"hidden",sx:{borderRadius:"round"==z?"10px":"0px",borderWidth:(0,h.YcK)(k),borderColor:(0,h.Fwt)(k)},children:(0,f.jsx)(ti,{event:B[e%M],onBack:Y,isPlaying:!1,isLast:e%M===B.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:q,progressUpdateCallback:t=>{Z(t)},showOverlay:!1,mode:"landscape"})})});if(n&&1===$.current)return(0,f.jsx)(u.B,{direction:"column",height:d,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{F.slideTo(e%M,300)},children:(0,f.jsx)(c.az,{overflow:"hidden",sx:{borderRadius:"round"==z?"10px":"0px",borderWidth:(0,h.YcK)(k),borderColor:(0,h.Fwt)(k)},children:(0,f.jsx)(ti,{event:B[e%M],onBack:Y,isPlaying:!1,isLast:e%M===B.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:q,progressUpdateCallback:t=>{Z(t)},showOverlay:!1,mode:"landscape"})})});try{O+e>=M-1&&($.current=1)}catch(l){console.log(l)}return(0,f.jsx)(f.Fragment,{})}},"event-horizontal-scroll-slide"+t.event_id)))]})})}),(0,f.jsx)(s.o,{children:(0,f.jsx)(Te,{brandName:X,height:.04*d,width:.1*p,fontSize:.02*d})})]})})},fi=i(340),wi=i(5089),yi=i(572),_i=i(8603);var bi=function(t){const[e,i,n,o]=(0,m.A)(),[r]=(0,v.QN)("whatmorePrimaryColor"),[a]=(0,v.QN)("whatmoreSecondaryColor"),l="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:l,height:"full",width:"full",children:(0,f.jsx)(c.az,{borderRadius:"md",backgroundColor:"transparent",children:(0,f.jsx)(p.g,{width:"full",ratio:o/n,children:(0,f.jsx)(c.az,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+r+", gray, "+a+")"})})})}),(0,f.jsx)(u.B,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:l,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)(p.g,{width:"full",ratio:9/16,children:(0,f.jsx)(c.az,{width:"full",height:"full",borderRadius:"md",backdropFilter:"auto",backdropBlur:"5px"})})})})]})})};var ji=function(t){var e;const i=t.stories,r=t.onBack,l=t.onStoryCompleteCallback,d=t.isActive,s=null!==(e=t.initialEventIndex)&&void 0!==e?e:0,c=i.events;var[p,h,g,x]=(0,m.A)();const[w,y]=(0,Ht.A)(),[_]=(0,v.QN)("isInDesignMode"),[b]=(0,v.QN)("isDemoBrand"),[j]=(0,v.QN)("whatmoreShopId"),[S,C]=(0,n.useState)(!0),[k,I]=(0,v.QN)("isFirstIndicatorRenderDone"),[z,T]=(0,n.useState)(null),[E,N]=(0,n.useState)(!1),{whatmoreWidgetSourceDetails:P,whatmoreUserInfo:A}=(0,n.useContext)(U.B),[F,R]=si(s,c.length);function L(t){r(t)}const B=P.landingLocationType,O=P.templateType;function D(){if(!(0,v.Xd)("whatmoreAllowAutoSlide"))return;F().activeIndex+1>=c.length?l("right"):(R("right"),z&&z.slideNext())}function W(t){const e=F().activeIndex;"right"==t&&e+1>=c.length||"left"==t&&e-1<0?l(t):(R(t),z&&("left"==t?z.slidePrev():z.slideNext()))}const[V,M]=(0,n.useState)({});return c[F().activeIndex],(0,f.jsx)("div",{children:(0,f.jsx)(o.RC,{speed:1,slidesPerView:1,direction:"horizontal",initialSlide:0,loop:!0,height:g,width:x,watchSlidesProgress:!0,allowTouchMove:!1,onSwiper:t=>{T(t)},onSlideChange:t=>{S?C(!1):(k||I(!0),(0,Q.DG)({userInteractionType:H.O.VIDEO_PLAYBACK,userInteractionMetadata:V,widgetSourceDetails:P,event:c[F().activeIndex],productList:c[F().activeIndex].products,ctaList:c[F().activeIndex].cta}),function(t){const e=(0,_t.Wd)(B)+(0,_t.gf)(O)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);_||b||(async()=>{(0,a.lB)(t),(0,di.Si)(j,li.TB,li.OL),(0,lt.Ch)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===A||void 0===A?void 0:A.userType)})()}(c[F().activeIndex]),(0,Q.kz)({userInteractionType:H.O.EVENT_VIEW,widgetSourceDetails:P,event:c[F().activeIndex],productList:c[F().activeIndex].products,ctaList:c[F().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:a,isDuplicate:l}=e;if(d){const e=n?"activeIndex":o?"prevIndex":"nextIndex",r=c[F()[e]];return(0,f.jsx)(u.B,{direction:"column",height:g,justifyContent:"center",children:(0,Xe.ij)(r)||(0,Xe.Il)(r)?(0,f.jsx)(Ue,{event:r,totalSiblingEvents:c.length,indexAmongSiblings:F()[e],onBack:L,isPlaying:d&&n&&a,isLast:!1,setLockSwiper:N,onVideoEndedCallback:D,progressUpdateCallback:t=>{M(t)},leftOpenSpaceClickHandler:()=>{W("left")},midOpenSpaceClickHandler:()=>{y(!w)},rightOpenSpaceClickHandler:()=>{W("right")},storyId:i.id,source:Ke.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:p,justifyContent:"center",children:(0,f.jsx)(bi,{})})}},"event-story-view-slide-"+e)))})})};var Si=function(t){const e=t.onBack,i=t.eventsStories,l=t.initialStoryIndex,[d,s,c]=(0,Ce.A)(),[p]=(0,v.QN)("isInDesignMode"),[h]=(0,v.QN)("isDemoBrand"),[m,g]=(0,n.useState)(!0),{setCloseClickComponent:x}=(0,n.useContext)(zi),[w]=(0,v.QN)("whatmoreShopId"),[y,_]=si(l,i.length),[b,j]=ci("horizontal",50),[S]=ui("vertical",30),C=t.eventIndex,[k,I]=(0,n.useState)(!0),[z,T]=(0,n.useState)(null),{whatmoreWidgetSourceDetails:E,whatmoreUserInfo:N}=(0,n.useContext)(U.B);function P(){I(!1)}function A(t){P(),setTimeout((()=>{e(t)}),500)}x(A);const F=E.landingLocationType,R=E.templateType;function L(t){z&&(0,v.Xd)("whatmoreAllowAutoSlide")&&(_(t),"right"==t?z.slideNext():z.slidePrev())}function B(t,e){L(e)}return(0,f.jsx)(ii(),{isOpen:k,onRequestClose:P,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,f.jsx)("div",{style:{height:s,width:c,backgroundColor:"#00000088"},onTouchStart:t=>{b(t)},onTouchEnd:t=>{const e=j(t);e&&B(0,e)},onWheel:t=>{S(t,(t=>{B(0,t)}))},children:(0,f.jsx)(o.RC,{speed:1,slidesPerView:1,direction:"horizontal",modules:[r.hw,r.FJ],initialSlide:l,loop:i.length>1,height:s,width:c,watchSlidesProgress:!0,onSwiper:t=>{var e,n;T(t),(0,Q.kz)({userInteractionType:H.O.EVENT_VIEW,widgetSourceDetails:E,event:i[y().activeIndex].events[0],productList:null===(e=i[y().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=i[y().activeIndex].events[0])||void 0===n?void 0:n.cta})},onSlideChange:t=>{var e,n;m?g(!1):(!function(t){const e=(0,_t.Wd)(F)+(0,_t.gf)(R)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);p||h||(async()=>{(0,a.lB)(t),(0,di.Si)(w,li.TB,li.OL),(0,lt.Ch)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===N||void 0===N?void 0:N.userType)})()}(i[y().activeIndex].events[0]),(0,Q.kz)({userInteractionType:H.O.EVENT_VIEW,widgetSourceDetails:E,event:i[y().activeIndex].events[0],productList:null===(e=i[y().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=i[y().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:a}=t;const d=e?"activeIndex":n?"prevIndex":"nextIndex";return(0,f.jsx)(u.B,{direction:"column",height:s,justifyContent:"center",children:(0,f.jsx)(ji,{stories:i[y()[d]],onBack:A,isActive:e&&r,isNext:o,isPrev:n,onStoryCompleteCallback:L,nextStories:i[y().nextIndex],prevStories:i[y().prevIndex],initialEventIndex:l==y()[d]?C:0},"event-story-view-"+i[y()[d]].id)})}},"event-vertical-scroll-slide-"+t)))})})})};var Ci=function(t){var e,i,o,[r,a,l,d]=(0,m.A)();const[h]=(0,v.QN)("whatmorePrimaryColor"),[g]=(0,v.QN)("whatmoreSecondaryColor"),x=t.event,w=(t.onBack,n.useRef(),null!==(e=t.showPausedVideo)&&void 0!==e&&e),y=null!==(i=t.heightFactor)&&void 0!==i?i:1,b="flex-end";return d*=null!==(o=t.widthFactor)&&void 0!==o?o:1,l*=y,(0,f.jsx)(s.o,{children:(0,f.jsxs)(c.az,{width:d,height:l,children:[(0,f.jsx)(u.B,{direction:"column",justifyContent:b,height:"full",width:"full",children:(0,f.jsx)(c.az,{children:(0,f.jsx)(p.g,{width:"full",ratio:9/16,children:w?(0,Xe.ij)(x)||(0,Xe.Il)(x)?(0,f.jsx)(Ee.A,{height:"100%",width:"100%",url:x.thumbnail_image,isPlaying:!1,pauseFromPlayTimeInMs:1e3,event:x}):(0,f.jsx)(_._,{width:"full",height:"full",src:x.thumbnail_image,objectFit:"cover",borderRadius:"lg"}):(0,f.jsx)(c.az,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+h+", gray, "+g+")"})})})}),(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)(p.g,{width:"full",ratio:9/16,children:(0,f.jsx)(c.az,{width:"full",height:"full",backgroundColor:"blackAlpha.400"})})})})]})})};var ki=function(t){var e,i,[l,d,p,h]=(0,m.A)();const[g]=(0,v.QN)("isInDesignMode"),[x]=(0,v.QN)("isDemoBrand"),[w,y]=(0,v.QN)("isFirstIndicatorRenderDone"),[_,b]=(0,n.useState)(0!=t.eventIndex),{setCloseClickComponent:j}=(0,n.useContext)(zi),[S,C]=(0,n.useState)(!1),[k]=(0,v.QN)("whatmoreShopId"),{whatmoreWidgetSourceDetails:I,whatmoreUserInfo:z}=(0,n.useContext)(U.B),[T,E]=(0,n.useState)(!1),[N,P]=(0,n.useState)(null);function F(){E(!1)}t.events;const R=t.eventIndex,L=t.onBack,B=t.eventsStories,O=t.initialStoryIndex,D=null===(e=B[0])||void 0===e||null===(i=e.events[0])||void 0===i?void 0:i.brand;function W(t){F(),setTimeout((()=>{L(t)}),500)}(0,n.useEffect)((()=>(E(!0),()=>{})),[]),j(W);const V=I.landingLocationType,M=I.templateType;function X(t){N&&!N.isEnd&&("right"==t?N.slideNext():N.slidePrev())}const $=parseInt(Math.min(5,B.length));return(0,f.jsx)(gi,{show:T,closeCallback:F,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:h*$,children:(0,f.jsxs)(o.RC,{onInit:t=>{var e,i;P(t),(0,Q.kz)({userInteractionType:H.O.EVENT_VIEW,widgetSourceDetails:I,event:B[t.activeIndex].events[0],productList:null===(e=B[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=B[t.activeIndex].events[0])||void 0===i?void 0:i.cta})},slidesPerView:$,centeredSlides:!0,allowTouchMove:!1,initialSlide:O,modules:[r.t9,r.Vx,r.FJ],navigation:$>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*p),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:h*$,watchSlidesProgress:!0,onSlideChange:t=>{var e,i;_?b(!1):(w||y(!0),function(t){const e=(0,_t.Wd)(V)+(0,_t.gf)(M)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);g||x||(async()=>{(0,a.lB)(t),(0,di.Si)(k,li.TB,li.OL),(0,lt.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)})()}(B[t.activeIndex].events[0]),(0,Q.kz)({userInteractionType:H.O.EVENT_VIEW,widgetSourceDetails:I,event:B[t.activeIndex].events[0],productList:null===(e=B[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=B[t.activeIndex].events[0])||void 0===i?void 0:i.cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[B.length>2&&(0,f.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,f.jsx)(A.A,{onCloseCallback:L})}),B.map(((t,e)=>(0,f.jsx)(o.qr,{children:i=>{let{isActive:n,isPrev:o,isNext:r,isVisible:a,isDuplicate:l}=i;if(n){const i=1;return(0,f.jsx)(u.B,{direction:"column",height:p,width:h*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)(ji,{stories:t,onBack:W,isActive:n&&a,isNext:!1,isPrev:!1,onStoryCompleteCallback:X,initialEventIndex:O==e?R:0,showCloseOverlay:(null===B||void 0===B?void 0:B.length)<=2},"event-story-view-"+t.id)})})}return o||r?(0,f.jsx)(u.B,{direction:"column",height:p,width:h,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)(Ci,{showPausedVideo:!0,event:B[e].events[0],onBack:W,isPlaying:!1,setLockSwiper:C})})}):(0,f.jsx)(f.Fragment,{})}},"event-horizontal-scroll-slide-"+e)))]})})}),(0,f.jsx)(s.o,{children:(0,f.jsx)(Te,{brandName:D,height:.04*p,width:.1*h,fontSize:.02*p})})]})})};const Ii=(0,_i.A)({key:"whatmore-css-sv"}),zi=(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,a,l]=(0,Ce.A)(),[d]=(0,v.QN)("whatmoreShopId"),{whatmoreRootId:s}=(0,n.useContext)(U.B),{whatmoreIsStoriesTemplate:c}=(0,n.useContext)(U.B),u=(0,v.QN)("isWhatmorePreviewMode");var p=t.events,m=t.index,g=t.onBack,x=t.eventsStories,w=t.initialStoryIndex,y=(0,h.M3_)(d),_="portrait"===r?null!==(e=t.slideDirection)&&void 0!==e?e:"vertical":null!==(i=t.slideDirection)&&void 0!==i?i:p.length>1?"horizontal":"vertical",b="portrait"===r?!(0,h.kb)(d)&&!c:(0,h.DNc)(d);return(0,n.useLayoutEffect)((()=>{(0,h.hpk)(d)&&(window.location.href.includes(y)?history.replaceState(null,"","#"+y):history.pushState(null,"","#"+y),window.addEventListener("popstate",(()=>{window.location.href.includes(y)||g()})))}),[]),delete wi.Ay.styles.global,c?(0,f.jsx)(yi.C,{value:Ii,children:(0,f.jsx)(fi.s,{theme:wi.Ay,cssVarsRoot:s,resetCSS:!1,children:(0,f.jsx)(zi.Provider,{value:{isIOS:(0,$e.MN)(),totalEvents:p.length,closeClickComponent:g,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:_,showSwipeIndicator:b},children:("portrait"!==r||u)&&(0,h.Rdb)(d)?(0,f.jsx)(ki,{eventsStories:x,initialStoryIndex:w,onBack:g,eventIndex:m}):(0,f.jsx)(Si,{eventsStories:x,initialStoryIndex:w,onBack:g,eventIndex:m})})})}):(0,f.jsx)(yi.C,{value:Ii,children:(0,f.jsx)(fi.s,{theme:wi.Ay,cssVarsRoot:s,resetCSS:!1,children:(0,f.jsx)(zi.Provider,{value:{isIOS:(0,$e.MN)(),totalEvents:p.length,closeClickComponent:g,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:_,showSwipeIndicator:b,questionList:(0,h.JwJ)(d)?null===(o=JSON.parse(localStorage.getItem("_whatmore_brand_questions")))||void 0===o?void 0:o.questionList:[]},children:"portrait"===r?(0,f.jsx)(hi,{events:p,eventIndex:m,onBack:g}):(0,f.jsx)(xi,{events:p,eventIndex:m,onBack:g})})})})}},3771:function(t,e,i){i.d(e,{A:function(){return y}});var n=i(9950),o=i(2039),r=i(6670),a=i(3568),l=i(16),d=i(9098),s=i(5830),c=i(1085),u=i(3294),p=i(1348),h=i(4033),v=(i(5410),i(4737)),m=i(6493),g=i(4414);function x(t){var e,i,o;const[a,d]=(0,r.A)(),[x,f]=(0,n.useState)(n.useRef()),w=t.posterImage,[y,_]=(0,s.QN)("whatmoreVideoPlayerPoolBlessed"),[b,j]=(0,n.useState)(!0),[S,C]=(0,n.useState)(!1),k=t.timeUpdateCallback,{whatmoreIsPreviewMode:I}=(0,n.useContext)(v.B),z=null!==(e=t.isVideoMuted)&&void 0!==e?e:a,T=null!==(i=t.height)&&void 0!==i?i:"100%",E=null!==(o=t.width)&&void 0!==o?o:"100%",N=(0,s.Xd)("whatmoreShopId");(0,n.useLayoutEffect)((()=>{if(x.current&&y)if(0==x.current.children.length){const i=(0,m.Cr)(t.url);(e=(0,c.Z4)(x.current,t.url,z||!t.isPlaying,t.isPlaying,i)).setAttribute("playsinline","true"),e.setAttribute("preload","auto"),e.addEventListener("loadeddata",(()=>{j(!1)})),k&&e.addEventListener("timeupdate",(t=>{var i,n;e&&k(null!==(i=e.currentTime)&&void 0!==i?i:0,null!==(n=e.duration)&&void 0!==n?n:0)}))}else{var e;(e=x.current.children[0]).muted=z||!t.isPlaying,t.isPlaying?e.play():(e.pause(),(0,p.fwF)(N)&&t.source==u.N.CAROUSEL_EVENT_OPENED&&(!t.isPlaying&&e.play(),setTimeout((()=>{!t.isPlaying&&e.pause()}),(0,h.n)()?1900:800)))}}),[z,t.isPlaying,y,b]),(0,n.useLayoutEffect)((()=>()=>{x.current&&0!=x.current.children.length&&(0,c.rq)(x.current)}),[]);const P=(0,s.Xd)("whatmoreLandingLocationType");return(0,g.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:E,height:T,overflow:"hidden",backgroundColor:I?(0,p.KVz)(N):(0,p.QSX)(N),filter:t.showQuestion?"blur(24px)":""},children:[(0,g.jsx)("div",{ref:x,style:{width:b?"0px":"100%",height:b?"0px":I?(0,p.tbf)(N):(0,p.CBm)(N)&&"product"==P?"auto":(0,p.R7q)(N)},className:"whatmore-video-player-ios-holder"}),"40273707171"!==N&&b&&S?(0,g.jsx)(g.Fragment,{children:(0,g.jsx)("div",{style:{width:"100%",height:"100%",position:"relative"},children:(0,g.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,g.jsx)("img",{src:w,style:{height:"100%",width:E,animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})})})}):b&&!S&&(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{style:{width:"100%",height:"100%",position:"relative"},children:[(0,g.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,g.jsx)("img",{src:w,height:"100%",width:E,onLoad:()=>{C(!0)},style:{animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})}),(0,g.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,g.jsx)(l.A,{width:E,height:T,style:{position:"absolute",top:"50%",left:"50%",opacity:"0.6"}})})]})})]})}var f=function(t){var e;return(0,g.jsx)(x,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback,isVideoMuted:null!==(e=t.isVideoMuted)&&void 0!==e?e:null,source:t.source,posterImage:t.posterImage,showQuestion:t.showQuestion})};function w(t){var e,i,o;const[a,d]=(0,r.A)(),[c,x]=(0,n.useState)(!1),[f,w]=(0,n.useState)(!1),y=t.setDuration,_=(0,n.useRef)(null),b=(0,s.Xd)("whatmoreShopId"),j=t.timeUpdateCallback,{whatmoreIsPreviewMode:S}=(0,n.useContext)(v.B),C=(0,s.Xd)("whatmoreLandingLocationType"),k=null!==(e=t.height)&&void 0!==e?e:"100%",I=null!==(i=t.width)&&void 0!==i?i:"100%",z=null!==(o=t.isVideoMuted)&&void 0!==o?o:a,T=null===t||void 0===t?void 0:t.posterImage;return(0,n.useEffect)((()=>{_.current&&(t.isPlaying?_.current.paused&&_.current.play():_.current.pause(),j&&_.current.addEventListener("timeupdate",(t=>{var e,i;_.current&&j(null!==(e=_.current.currentTime)&&void 0!==e?e:0,null!==(i=_.current.duration)&&void 0!==i?i:0)})))}),[t.isPlaying,t.url]),(0,g.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:I,height:k,overflow:"hidden",backgroundColor:S?(0,p.KVz)(b):(0,p.QSX)(b),filter:null!==t&&void 0!==t&&t.showQuestion?"blur(24px)":""},children:[(0,g.jsx)("div",{style:{width:c?"100%":"0px",height:c?S?(0,p.tbf)(b):(0,p.CBm)(b)&&"product"==C?"auto":(0,p.R7q)(b):"0px"},children:(0,g.jsxs)("video",{ref:_,className:"whatmore-video-player",preload:"auto",loop:!0,src:"banner"==t.source?t.url:void 0,playsInline:!0,muted:!(!z&&t.isPlaying),onLoadedData:()=>{x(!0),t.isPlaying&&_.current&&_.current.play(),(0,p.fwF)(b)&&t.source==u.N.CAROUSEL_EVENT_OPENED&&(!t.isPlaying&&_.current&&_.current.play(),setTimeout((()=>{!t.isPlaying&&_.current&&_.current.pause()}),(0,h.n)()?1900:800))},onLoadedMetadata:()=>{_.current&&y&&y(_.current.duration)},poster:"banner"==t.source?t.url:T,children:[(0,g.jsx)("track",{src:"data:,",kind:"captions",srclang:"en",label:"english_captions"}),(0,g.jsx)("source",{src:t.url,type:"video/mp4"}),(0,g.jsx)("source",{src:(0,m.Cr)(t.url),type:"video/mp4"})]})}),"40273707171"!==b&&!c&&f?(0,g.jsx)(g.Fragment,{children:(0,g.jsx)("div",{style:{width:"100%",height:"100%",position:"relative"},children:(0,g.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,g.jsx)("img",{src:T,style:{height:"100%",width:I,animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})})})}):!c&&!f&&(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{style:{width:"100%",height:"100%",position:"relative"},children:[(0,g.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,g.jsx)("img",{src:T,height:"100%",width:I,onLoad:()=>{w(!0)},style:{animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})}),(0,g.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,g.jsx)(l.A,{width:I,height:k,style:{position:"absolute",top:"50%",left:"50%",opacity:"0.6"}})})]})})]})}var y=function(t){var e,i,r,l;return(0,o.Il)(t.event)?(0,g.jsx)(d.A,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback}):1==(0,n.useContext)(a.EventClickComponentContext).isIOS&&1==(0,s.Xd)("whatmoreVideoPlayerPoolBlessed")&&"banner"!=t.source?(0,g.jsx)(f,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback,isVideoMuted:null!==(r=t.isVideoMuted)&&void 0!==r?r:null,source:t.source,posterImage:null===(l=t.event)||void 0===l?void 0:l.poster_image,showQuestion:null===t||void 0===t?void 0:t.question}):(0,g.jsx)(w,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback,isVideoMuted:null!==(e=t.isVideoMuted)&&void 0!==e?e:null,setDuration:t.setDuration,source:t.source,posterImage:null===(i=t.event)||void 0===i?void 0:i.poster_image,showQuestion:null===t||void 0===t?void 0:t.question})}},3936:function(t,e,i){var n=i(6086),o=i(3247),r=(i(9950),i(3080)),a=i(4895),l=i(5375),d=i(6670),s=i(4414);e.A=function(t){const[e,i]=(0,d.A)(),[c,u,p,h]=(0,r.A)(),v=.095*h;function m(){i(!e)}return(0,s.jsx)(n.o,{children:(0,s.jsx)(o.jl,{cursor:"pointer",children:e?(0,s.jsx)(l.A,{sx:{color:"white",fontSize:v,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:()=>{m()}}):(0,s.jsx)(a.A,{sx:{color:"white",fontSize:v,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:()=>{m()}})})})}},3997:function(){},4669:function(){},5144:function(t,e,i){i.d(e,{jd:function(){return o},so:function(){return r}});var n=i(8283);const o=`\n ${n.i7`
88
88
  0% { transform: scale(1); }
89
89
  50%, { transform: scale(0.95); }
90
90
  100% { transform: scale(1); }
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[306],{22:function(t,e,i){i.d(e,{$S:function(){return s},_:function(){return o},b4:function(){return n},dl:function(){return r},nN:function(){return d},tn:function(){return a},vF:function(){return l}});const o="device_type",r="device_mode",n="mobile",l="tablet",s="desktop",a="portrait",d="landscape"},932:function(t,e,i){var o=i(5830),r=i(1941),n=i(22),l=i(1348);e.A=function(t){const[e,i,s]=(0,r.A)(),[a]=(0,o.QN)("whatmoreLandscapePadding"),[d]=(0,o.QN)("whatmoreShopId"),[c]=(0,o.QN)("whatmoreVideoTileSize"),[p]=(0,o.QN)("whatmoreVideoTileSizePortrait"),u=s>=1025,h="portrait"==e?p:c,v=!("portrait"!=e||!(s>=481)),y=h/100*1.3*.5,m=h/100;var f=Math.min(s,i),[x,w,g,P]=[.6*f*(16/9),.6*f,1.4,0];function j(t){return Math.round(10*t)/10}var b={DEVICE_TYPE:n.b4,DEVICE_MODE:n.tn};if(u){const t=w*y,e=x*y;[x,w,g,P]=[e,t,(s-2*a-2*(0,l.$du)(d))/(1.1*t),a],b[n._]=n.$S,b[n.dl]=n.nN}else if(v){var C=.8*w,S=.8*x;"portrait"==e?(C*=m,S*=m,[x,w,g,P]=[S,C,j(s/(1.2*C)),0],b[n._]=n.vF,b[n.dl]=n.tn):([x,w,g,P]=[S,C,(s-2*a)/(1.1*C),a],b[n._]=n.vF,b[n.dl]=n.nN)}else{C=w,S=x;"portrait"==e?(C=C*m*.9,S=S*m*.9,[x,w,g,P]=[S,C,j(s/(1.15*C)),0],b[n._]=n.b4,b[n.dl]=n.tn):(C=.7*w,S=.7*x,[x,w,g,P]=[S,C,(s-2*a)/(1.1*C),a],b[n._]=n.b4,b[n.dl]=n.nN)}return[x,w,g,P,b]}},4826:function(){},7136:function(t,e,i){var o=i(9950),r=i(932),n=i(7509),l=i(5830),s=i(4414);e.A=function(t){var[e,i]=(0,r.A)();(0,o.useContext)(n.h);const a=(0,l.Xd)("whatmoreShopId");return t.event,(0,s.jsx)("div",{style:{margin:"0 auto",width:"8968077397"==a?void 0:i,aspectRatio:"8968077397"==a?9/16:void 0,height:"8968077397"==a?"100%":e,overflow:"hidden"}})}},7509:function(t,e,i){i.d(e,{h:function(){return o}});const o=(0,i(9950).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},9406:function(t,e,i){i.r(e),i.d(e,{default:function(){return I}});var o=i(9950),r=i(340),n=i(5089),l=i(5873),s=(i(3997),i(9130),i(4669),i(9733),i(4365),i(7229),i(6042),i(572)),a=i(8603),d=i(9946),c=i(9094),p=i(1941),u=i(5830),h=i(7509),v=i(7136),y=i(1348),m=i(4737),f=(i(1351),i(6157),i(6641)),x=i(3080),w=i(932),g=(i(4826),i(9879),i(22)),P=i(6594),j=i(7740),b=i(8538),C=i(8149),S=i(3771),N=i(3936),_=i(4414);var A=function(t){var e,i,r,n,l,s,a,d,c,p,h,v,f,x,A,k,M,F,I,[z,V,E,R,T]=(0,w.A)();V*=null!==(e=t.scaleFactor)&&void 0!==e?e:1,z*=null!==(i=t.scaleFactor)&&void 0!==i?i:1;const O=(0,u.Xd)("whatmoreUITheme"),W=(0,u.Xd)("whatmoreShopId"),$=(0,u.Xd)("whatmorePrimaryFont"),B=(0,u.Xd)("whatmoreSecondaryColor"),D=t.onClick,X=null===(r=t.isOnFocus)||void 0===r||r,H=null!==(n=t.playOnUnfocus)&&void 0!==n&&n,Q="portrait"===T[g.dl],U=(Q?1.076*V*(0,y.HWj)(W):V*(0,y.N_4)(W))+"px",Y=(Q?1.076*V*(0,y.HWj)(W):V*(0,y.N_4)(W))+"px",q=(Q?.965*V*(0,y.HWj)(W):.859*V*(0,y.N_4)(W))+"px",L=(0,y.VYo)(W),{whatmoreIsPreviewMode:G}=(0,o.useContext)(m.B),K=.25*V,J=K+"px",Z=1.25*K+"px",[tt,et]=(0,o.useState)(t.event),[it,ot]=(0,o.useState)(),rt=null!==(l=null===(s=tt.products)||void 0===s?void 0:s.find((t=>"active"==t.product_status)))&&void 0!==l?l:null===(a=tt.products)||void 0===a?void 0:a[0],nt=Math.round(+(null===rt||void 0===rt?void 0:rt.price)),lt=Math.round(+(null===rt||void 0===rt?void 0:rt.compare_price)),st=lt&&0!=lt&&lt>nt?Math.round((lt-nt)/lt*100):NaN,[at,dt]=(0,o.useState)(st),[ct,pt]=(0,o.useState)(!1);return(0,o.useEffect)((()=>{(0,y.w4b)(W)?(0,P.fu)(tt,(0,y.NCy)(W),W).then((t=>{var e,i,o;et(t);const r=Math.round(null===(e=t.products)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.price),n=Math.round(null===t||void 0===t||null===(o=t.products[0])||void 0===o?void 0:o.compare_price),l=n&&0!=n&&n>r?Math.round((n-r)/n*100):NaN;dt(l),pt(!0)})):(async()=>{const t=await(0,C.M)(rt,(0,y.NCy)(W),W);ot(t),pt(!0)})()}),[]),(0,_.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top","24px"),t.style.setProperty("margin-bottom","12px"))},style:{width:V,margin:"0 auto",cursor:"pointer",filter:X||t.isActive?void 0:"blur(1.25px) drop-shadow(0 0 10px rgba(0, 0, 0, 0.2))"},onClick:()=>{D(tt)},children:[(0,_.jsxs)("div",{style:{position:"relative",width:V,height:z,borderRadius:"round"==O?"5px":"0px",boxShadow:"round"==O?L:null,borderWidth:(0,y.YcK)(W),borderColor:(0,y.Fwt)(W),overflow:"hidden"},children:[(0,_.jsx)("div",{onClick:t=>t.stopPropagation(),style:{display:X||t.isActive?"block":"none",position:"absolute",right:6,top:6,zIndex:10},children:(0,_.jsx)(N.A,{})}),(0,_.jsx)(S.A,{height:"100%",width:"100%",url:null!==(d=null===tt||void 0===tt?void 0:tt.event_hls_url)&&void 0!==d?d:null===tt||void 0===tt?void 0:tt.thumbnail_image,isPlaying:X||H,event:tt})]}),(0,_.jsxs)("div",{style:{cursor:"pointer",display:"flex",gap:"6px",padding:"12px 4px"},children:[(G?(0,y.Tr1)(W):(0,y.UmS)(W))&&(null===tt||void 0===tt||null===(c=tt.products)||void 0===c?void 0:c.length)>0&&(0,_.jsx)("div",{style:{maxHeight:Z,maxWidth:J,minWidth:null!==rt&&void 0!==rt&&rt.thumbnail_image?J:"0",overflow:"hidden"},children:(0,_.jsx)("img",{ref:t=>{t&&t.style.setProperty("object-fit",(0,y.KZe)(W),"important")},style:{height:"100%"},src:(null===rt||void 0===rt||null===(p=rt.thumbnail_image)||void 0===p||null===(h=p.split("?"))||void 0===h?void 0:h[0])+"?width=400&height=400",alt:"thumbnail"})}),(0,_.jsxs)("div",{className:"wht-prod-info",style:{display:"flex",flexDirection:"column",gap:"5px"},children:[(0,_.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,y.m5c)(W),"important"),t.style.setProperty("font-size",U,"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",$,"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"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},children:(0,b.v)(null===rt||void 0===rt?void 0:rt.title)}),ct&&(0,y.Nzx)(W)&&(0,_.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px",flexDirection:(0,y.vw2)(W)?"row":"row-reverse",justifyContent:(0,y.vw2)(W)?"flex-start":"flex-end"},children:[(0,_.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,y.m5c)(W),"important"),t.style.setProperty("font-size",Y,"important"),t.style.setProperty("font-family",$,"important"),t.style.setProperty("white-space","nowrap","important"),t.style.setProperty("width","fit-content","important"))},style:{textAlign:"left",fontWeight:"normal"==(0,y.i6j)(W)?"normal":"bold"},children:(0,P.Sb)(parseFloat((0,j.U)()?(null!==(v=null===it||void 0===it||null===(f=it.variants)||void 0===f||null===(x=f[0])||void 0===x?void 0:x.price)&&void 0!==v?v:null===it||void 0===it?void 0:it.price)/100:null===rt||void 0===rt?void 0:rt.price)," ",W,null===(A=tt.products[0])||void 0===A?void 0:A.currency)}),!isNaN(lt)&&lt>nt&&(0,_.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,y.gld)(W),"important"),t.style.setProperty("font-size",Y,"important"),t.style.setProperty("font-family",$,"important"),t.style.setProperty("width","fit-content","important"),t.style.setProperty("white-space","nowrap","important"))},style:{textDecoration:"line-through"},children:(0,P.Sb)(parseFloat((0,j.U)()?(null!==(k=null===it||void 0===it||null===(M=it.variants)||void 0===M||null===(F=M[0])||void 0===F?void 0:F.compare_at_price)&&void 0!==k?k:null===it||void 0===it?void 0:it.compare_at_price)/100:null===rt||void 0===rt?void 0:rt.compare_price)," ",W,null===(I=tt.products[0])||void 0===I?void 0:I.currency)}),"56352899156"==W&&(0,y.Nzx)(W)&&ct&&!isNaN(at)&&0!=at&&(0,_.jsx)("div",{style:{display:"flex",backgroundColor:"green"==(0,y.ub$)(W)?"#343434"==B?(0,y.ub$)(W):B:(0,y.ub$)(W),alignItems:"center",borderRadius:(0,y.v8m)(W)+"px",width:"fit-content",padding:"3px 4px"},children:(0,_.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,y.BRY)(W),"important"),t.style.setProperty("font-size",q,"important"),t.style.setProperty("font-family",$,"important"),t.style.setProperty("width","fit-content","important"),t.style.setProperty("white-space","nowrap","important"))},children:`${at}% off`})})]}),(X||t.isActive)&&(0,y.Nzx)(W)&&ct&&!isNaN(at)&&0!=at&&(0,_.jsx)("div",{style:{display:"flex",backgroundColor:"green"==(0,y.ub$)(W)?"#343434"==B?(0,y.ub$)(W):B:(0,y.ub$)(W),alignItems:"center",borderRadius:(0,y.v8m)(W)+"px",width:"fit-content",padding:(0,y.Cf)(W)?"3px 6px":"0px"},children:(0,y.Cf)(W)?(0,_.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,y.BRY)(W),"important"),t.style.setProperty("font-size",q,"important"),t.style.setProperty("font-family",$,"important"))},children:`${at}% Off`}):(0,_.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,y._zx)(W),"important"),t.style.setProperty("font-size",q,"important"),t.style.setProperty("font-family",(0,y.ogW)(W),"important"))},children:(0,y.rsz)(W)})})]})]})]})};const k=(0,a.A)({key:"whatmore-css-hv"});function M(t){const e=t.events,i=t.onClick,r=t.index,[n,l]=(0,o.useState)(6);var[s,a,u,h]=(0,x.A)();const[y,m,f]=(0,p.A)(),[g,P,j]=(0,w.A)();return(0,_.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,_.jsx)("div",{style:{width:f,height:"fit-content"},children:(0,_.jsx)(d.RC,{effect:"coverflow",slidesPerView:j,initialSlide:1,slidesPerGroup:1,centeredSlides:!0,watchSlidesProgress:!0,onSlideChange:t=>{t.realIndex>t.previousIndex&&l((t=>t+1))},modules:[c.t9,c.Vx],coverflowEffect:{rotate:0,stretch:Math.floor(.16*h),depth:100,scale:.75,modifier:1,slideShadows:!1},children:e.map(((t,e)=>e<=n&&(0,_.jsx)(d.qr,{children:e=>{let{isActive:o,isPrev:n,isNext:l,isVisible:s}=e;return o||n||l||s?(0,_.jsx)(A,{isOnFocus:o&&r<0,playOnUnfocus:!1,animateOnFocus:!0,isActive:o,event:t,onClick:()=>{i(t)}}):(0,_.jsx)(v.A,{})}},"whatmore-event-tile-portrait-"+t.index)))})})})}function F(t){var[e,i,r,n]=(0,x.A)();const l=t.onClick,s=t.index,a=t.events,[u,h]=(0,o.useState)(6),[y,m,f]=(0,p.A)();return(0,_.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,_.jsx)("div",{style:{width:f,height:"fit-content"},children:(0,_.jsx)(d.RC,{effect:"coverflow",slidesPerView:a.length>=5?5:a.length,slidesPerGroup:1,initialSlide:a.length>=5?2:Math.floor(a.length/2),centeredSlides:!0,onSlideChange:t=>{t.realIndex>t.previousIndex&&h((t=>t+1))},mousewheel:{forceToAxis:!0,thresholdDelta:10},modules:[c.t9,c.Vx,c.FJ],watchSlidesProgress:!0,navigation:!0,coverflowEffect:{rotate:0,stretch:Math.floor(.21*n),depth:100,scale:.8,modifier:1,slideShadows:!1},children:a.map(((t,e)=>e<=u&&(0,_.jsx)(d.qr,{children:e=>{let{isActive:i,isPrev:o,isNext:r,isVisible:n}=e;return n?(0,_.jsx)(A,{isOnFocus:i&&s<0,isActive:i,playOnUnfocus:!1,animateOnFocus:!0,event:t,scaleFactor:1.3,onClick:()=>{l(t)}}):(0,_.jsx)(v.A,{})}},"whatmore-event-tile-portr-"+t.index)))})})})}var I=function(t){const[e,i,a]=(0,p.A)(),[d]=(0,u.QN)("whatmoreShopId"),[c]=(0,u.QN)("whatmorePrimaryColor"),[v]=(0,u.QN)("whatmoreTitleFont"),x="portrait"==e?(0,u.Xd)("whatmoreTitleFontSizePortrait"):(0,u.Xd)("whatmoreTitleFontSize"),{whatmoreRootId:w}=(0,o.useContext)(m.B),g=(0,u.Xd)("whatmoreCollectionHeading"),{whatmoreIsCollectionsTemplate:P}=(0,o.useContext)(m.B),j=t.events,b=t.onClick,C=v;function S(t){b(t)}return(0,o.useEffect)((()=>{(0,f.Fk)("Video shopping powered by Whatmore!")}),[]),(0,o.useEffect)((()=>{l.Sn.forEach((t=>{var e;const i=null!==(e=t.querySelector('.whatmore-template-type[data-wh="template-a"]'))&&void 0!==e?e:t.querySelector('.whatmore-template-type[data="template-a"]');if(!i)return;i&&t&&(t.style.minHeight="0px")})),(0,u.t2)("muted",!0)}),[]),delete n.Ay.styles.global,(0,_.jsx)(s.C,{value:k,children:(0,_.jsx)("div",{className:"whatmore-carousel-events",style:{height:"100%"},children:(0,_.jsx)(r.s,{theme:n.Ay,cssVarsRoot:w,resetCSS:!1,children:(0,_.jsxs)(h.h.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[t.heading.trim().length>0||P?(0,_.jsx)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:(0,_.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-family",C,"important"),t.style.setProperty("font-size",x+"px","important"))},style:{color:c,backgroundClip:"text",textAlign:"center",fontWeight:(0,y.Odx)(d),lineHeight:(0,y.L0y)(d),letterSpacing:(0,y.l3V)(d)},children:P?"W"!==g?g:"":t.heading})}):(0,_.jsx)(_.Fragment,{}),"landscape"===e?(0,_.jsx)(F,{index:t.index,events:j,onClick:S}):(0,_.jsx)(M,{index:t.index,events:j,onClick:S})]})})})})}}}]);