whatmore-react-assets 1.0.905 → 1.0.906

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.905",
3
+ "version": "1.0.906",
4
4
  "description": "public repo for all whatmore js and css assets",
5
5
  "main": "whatmore.js",
6
6
  "scripts": {
@@ -73,7 +73,7 @@
73
73
  0% {
74
74
  transform: translateY(100%);
75
75
  }
76
- `} 0.5s`,bt=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"))})),[It,kt]=(0,r.useState)(-1!==bt?null===(n=q.options)||void 0===n||null===(i=n[bt])||void 0===i||null===(o=i.values)||void 0===o?void 0:o[0]:""),[_t,Ft]=(0,r.useState)({});(0,r.useEffect)((()=>{-1!==bt&&"whatmore"!==(0,c.Ipo)(wt)&&async function(){const t=await(0,lt.m3)(Z);Ft(t)}()}),[]);let Tt=-1,Et=-1!==bt&&null!==_t&&void 0!==_t&&_t.product&&(null===_t||void 0===_t||null===(l=_t.product)||void 0===l||null===(a=l.images)||void 0===a?void 0:a.length)>=(null===_t||void 0===_t||null===(d=_t.product)||void 0===d||null===(p=d.options)||void 0===p||null===(v=p[bt])||void 0===v||null===(m=v.values)||void 0===m?void 0:m.length)?null===_t||void 0===_t||null===(f=_t.product)||void 0===f||null===(w=f.images)||void 0===w?void 0:w.map((t=>{var e,n,i,o,r,l,a,d,s,c,u,h,p,v;const x=null===_t||void 0===_t||null===(e=_t.product)||void 0===e||null===(n=e.options)||void 0===n?void 0:n.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===_t||void 0===_t||null===(i=_t.product)||void 0===i||null===(o=i.options)||void 0===o||null===(r=o[x])||void 0===r||null===(l=r.values)||void 0===l?void 0:l[Math.min(++Tt,(null===_t||void 0===_t||null===(a=_t.product)||void 0===a||null===(d=a.options)||void 0===d||null===(s=d[bt])||void 0===s||null===(c=s.values)||void 0===c?void 0:c.length)-1)]:null===_t||void 0===_t||null===(u=_t.product)||void 0===u||null===(h=u.options)||void 0===h||null===(p=h[x])||void 0===p||null===(v=p.values)||void 0===v?void 0:v[Math.max(0,Tt)],src:null===t||void 0===t?void 0:t.src}})):[],Pt=[];if("whatmore"==(0,c.Ipo)(wt)&&(null===q||void 0===q||null===(j=q.images)||void 0===j?void 0:j.length)>0){var Ot;var Lt;if(-1!==(null===q||void 0===q||null===(Ot=q.options)||void 0===Ot?void 0:Ot.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"))}))))Pt=null===q||void 0===q||null===(Lt=q.images)||void 0===Lt?void 0:Lt.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc})))}return Tt+1<(null===_t||void 0===_t||null===(y=_t.product)||void 0===y||null===(C=y.options)||void 0===C||null===(b=C[bt])||void 0===b||null===(I=b.values)||void 0===I?void 0:I.length)&&(Et=[]),(0,x.jsxs)(s.kC,{sx:{"&::-webkit-scrollbar":{width:"0px"}},id:"whatmore-shopnow-view",position:"relative",maxHeight:"75vh",overflowY:"scroll",direction:"column",bg:"#FFF",height:"fit-content",opacity:"100%",borderTopRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"xl":null,animation:St,children:[(0,x.jsx)(At,{setOpenShopNow:U,setLockSwiper:B,FONT_SIZE:A}),(0,x.jsx)(s.M5,{marginBottom:"10px",px:"20px",py:"5px",children:(0,x.jsx)(s.kC,{bg:"whiteAlpha.900",width:"fit-content",height:"fit-content",borderRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"lg":null,overflow:"hidden",sx:{borderWidth:(0,c.alU)(wt),borderColor:(0,c.qPe)(wt)},children:(0,x.jsx)(s.kC,{width:"100%",children:(0,x.jsx)(Zt.P,{renderElement:t=>(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(s.xu,{width:M+"px",height:D+"px",children:(0,x.jsx)(g.Ee,{width:M+"px",height:D+"px",borderRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"lg":null,src:(0,pt.s)(t.eventData.src,"&width=400&height=400"),alt:Z.handle,sx:{objectFit:(0,c.yOX)(wt)+" !important"},fallback:(0,x.jsx)(K.Z,{width:M+"px",height:D+"px",borderRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"10px":"0px"})})})}),dataList:Et.length>0&&!Et.includes(null)?null===(k=Et)||void 0===k?void 0:k.filter((t=>(null===t||void 0===t?void 0:t.color)==It)):Pt.length>0?[null===(_=Pt)||void 0===_?void 0:_.find((t=>(null===t||void 0===t?void 0:t.color)==It))]:null===q||void 0===q||null===(F=q.images)||void 0===F?void 0:F.map((t=>({src:t.includes("https")?t:"https:"+t}))),spacing:10,defaultHeight:M+"px",defaultWidth:D+"px",retainAlreadyRenderedElements:!0,isScroll:!0})})})}),(0,x.jsx)(Ht,{data:q,product:Z,PRODUCT_TILE_HEIGHT:R,PRODUCT_TILE_WIDTH:z,FONT_SIZE:A,getVariantPrice:Yt,selectedVariantId:et,itemPrice:at,itemQuantity:it,setItemQuantity:ot,thumbnailImage:mt}),(null===q||void 0===q||null===(T=q.variants)||void 0===T?void 0:T.length)>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s.M5,{paddingTop:"4px",width:"100%",children:(0,x.jsx)(s.iz,{color:(0,c.W8U)(wt),size:"xs",width:"90%"})}),(0,x.jsx)(Vt,{data:q,dividerColor:(0,c.W8U)(wt),setSelectedColor:kt,finalArr:Et,finalArrExternal:Pt,product:Z,PRODUCT_TILE_HEIGHT:R,PRODUCT_TILE_WIDTH:z,FONT_SIZE:A,selectOptionFirstHandler:jt,selectOptionSecondHandler:yt,selectOptionThirdHandler:Ct,getVariantPrice:Yt,selectedOptionFirst:X,selectedOptionSecond:$,selectedOptionThird:Q,selectedVariantId:et})]}),c.$2G&&((null===q||void 0===q?void 0:q.description)||(null===q||void 0===q?void 0:q.body_html))&&(0,x.jsx)(Wt,{PRODUCT_TILE_HEIGHT:R,FONT_SIZE:A,data:q,handleToggle:()=>N(!W),show:W}),(0,x.jsx)(s.xu,{sx:{pointerEvents:"none"},paddingTop:"20px",opacity:0,children:(0,x.jsx)(Kt,{position:"relative",data:q,FONT_SIZE:A,product:Z})}),(0,x.jsx)(Kt,{position:"fixed",selectedVariantId:et,data:q,FONT_SIZE:A,PRODUCT_TILE_WIDTH:z,product:Z,itemQuantity:it,cartItemCount:st,addToCartFlag:ut,setAddToCartFlag:ht,soldOutFlag:vt,setSoldOutFlag:xt,event:H})]})}const Bt=(t,e,n,i)=>{var o,r,l,a,d,s,c,u,h,p;if(void 0===e&&void 0===n&&void 0===i)return null===t||void 0===t||null===(o=t.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.id;if(void 0===i&&void 0===n)return null===(l=t.variants.find((t=>t.option1===e)))||void 0===l?void 0:l.id;if(void 0===i&&void 0===e)return null===(a=t.variants.find((t=>t.option2===n)))||void 0===a?void 0:a.id;if(void 0===n&&void 0===e)return null===(d=t.variants.find((t=>t.option3===i)))||void 0===d?void 0:d.id;if(void 0===n)return null===(s=t.variants.find((t=>t.option1===e&&t.option3===i)))||void 0===s?void 0:s.id;if(void 0===i)return null===(c=t.variants.find((t=>t.option1===e&&t.option2===n)))||void 0===c?void 0:c.id;if(void 0===e)return null===(u=t.variants.find((t=>t.option2===n&&t.option3===i)))||void 0===u?void 0:u.id;const v=null===t||void 0===t?void 0:t.variants.find((t=>t.option1===e&&t.option2===n&&t.option3===i));return void 0===v?null===t||void 0===t||null===(h=t.variants)||void 0===h||null===(p=h[0])||void 0===p?void 0:p.id:v.id},Yt=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id===e)))||void 0===i?void 0:i.price},Xt=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id.toString()===e)))||void 0===i?void 0:i.option1},Gt=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id.toString()===e)))||void 0===i?void 0:i.option2},$t=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id.toString()===e)))||void 0===i?void 0:i.option3},Jt=(t,e)=>{var n;const i=null===t||void 0===t||null===(n=t.variants)||void 0===n?void 0:n.find((t=>t.id==e));return void 0===i?null:null===i||void 0===i||null===(o=i.featured_image)||void 0===o?void 0:o.src;var o},Qt=(0,r.createContext)({setShowOptionsChart:null});var te=function(t){const e=t.event,n=t.data,i=t.currentProduct,o=t.setOpenShopNow,l=t.setLockSwiper,[a,d]=(0,r.useState)(!1);return(0,x.jsx)(Qt.Provider,{value:{setShowOptionsChart:d},children:(0,x.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[(0,x.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",children:(0,x.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,x.jsx)(Ut,{data:n,event:e,product:i,setOpenShopNow:o,setLockSwiper:l})})}),a?(0,x.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",style:{position:"relative",zIndex:1,bottom:"100%"},className:"whatmore-ios-css-relative-fix",id:"whatmore-size-chart",children:(0,x.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,x.jsx)(Lt,{data:n,event:e,product:i,setShowOptionsChart:()=>{d(!1)}})})}):(0,x.jsx)(x.Fragment,{})]})})};var ee=function(t){var e,[n,i,o,l]=(0,h.Z)();const[a,d]=(0,r.useState)(!1),[v,g]=(0,r.useState)(),[f,w]=(0,r.useState)(),j=(0,u.MO)("whatmoreShopId"),y=t.event,C=t.onBack,S=r.useRef(),b=t.isPlaying,I=t.isLast,k=t.setLockSwiper,_=t.selectedVariantId,F=null===(e=t.showOverlay)||void 0===e||e,T="center";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:l,height:o,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:T,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:l/o,children:(0,x.jsx)(m,{height:"100%",width:"100%",url:y.event_hls_url,isPlaying:b,event:y})})})}),F?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:T,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(Ot,{focusRef:S,event:t.event,isLast:I,onCloseCallback:C,productClickHandler:async t=>{const e=await(0,p.p)(t,(0,c.Ipo)(j),j);w(t),g(e),d(!0),k(!0)}})})}):(0,x.jsx)(x.Fragment,{}),!0===a?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:T,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(te,{focusRef:S,event:t.event,isLast:I,onCloseCallback:()=>C(),setLockSwiper:k,data:v,currentProduct:f,setOpenShopNow:d,selectedVariantId:_})})}):(0,x.jsx)("div",{})]})})};const ne=function(t,e){return isNaN(t)||isNaN(e)||e<=0||t>e?0:Math.ceil(t/e*100)};function ie(t){var e,n,[i,o,r,l]=(0,h.Z)();const[a]=(0,u.j1)("whatmoreSecondaryColor"),[d]=(0,u.j1)("whatmoreSecondaryColorShade900"),c=t.progress,p=null!==(e=t.totalSiblings)&&void 0!==e?e:1,v=null!==(n=t.indexAmongSiblings)&&void 0!==n?n:0;return(0,x.jsx)(s.Kq,{width:"96%",height:"fit-content",direction:"row",justifyContent:"center",alignItems:"center",spacing:"1px",children:[...Array(p).keys()].map((t=>(0,x.jsx)(s.Kq,{width:"100%",height:.004*r+"px",backgroundColor:t<v?a:d+"99",borderRightRadius:"lg",borderLeftRadius:"lg",direction:"row",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",sx:{display:"block !important"},children:t==v?(0,x.jsx)(s.xu,{height:"100%",width:c+"%",bgColor:a,borderRightRadius:"lg",borderLeftRadius:"lg",sx:{display:"block !important"}}):(0,x.jsx)(x.Fragment,{})},"event-progress-bar-slab-"+t)))})}var oe=n(868),re=n(2630);const le=t=>t>=1e3?(t/1e3).toFixed(1)+"k":t;var ae=n(4862);var de=function(t){var e,n,i,o=t.whatmoreShareTemplateId;const l=t.whatmoreShareStoryId,a=t.whatmoreShareEventId,p=t.event,v=null===(e=t.showShareText)||void 0===e||e,m=null!==(n=t.shareButtonBottomMargin)&&void 0!==n?n:0,g=(0,u.MO)("whatmoreShopId"),f=(0,u.MO)("isInDesignMode"),w=(0,u.MO)("isDemoBrand"),j=(0,u.MO)("whatmorePrimaryFont"),{whatmoreWidgetSourceDetails:y}=(0,r.useContext)(V.I),[C,S,b,I]=(0,h.Z)(),k=null!==(i=t.iconSize)&&void 0!==i?i:.1*I;function _(){const e=(0,u.MO)("whatmoreLandingLocationType");var n;!function(t){f||w||(async()=>{(0,d.x0)(t)})()}(p),(e.startsWith("product")||"embed"===e)&&(o="te"),n="event_product_link"===(0,c.EEC)(g)?p.products[0].product_link||"":window.location.pathname,n=("event_product_link"===(0,c.EEC)(g)?"":window.location.hostname)+n+"?wtt="+o+"&wsid="+l+"&weid="+a,(0,c.lj5)(g)&&(n=n+"&"+(0,c.awP)(g)+"&utm_campaign=video-share&utm_medium="+e);const i={title:(0,c.JNF)(g),text:`${(0,c.Qa8)(g)} \n ${n} ${(0,c.AWG)(g)?"\n \n -via Whatmore":""}`};navigator.share&&!ae.nI?navigator.share(i):(t.setIsModalOpen(!0),t.setShareText([i,n]))}return(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{cursor:"pointer",style:{marginBottom:m+"px"},children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[(0,x.jsx)(re.Z,{sx:{boxShadow:3,transform:"scaleX(-1)",color:"white",fontSize:k,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),_(),(0,q.GF)({userInteractionType:H.K.VIDEO_SHARE_CTA_CLICKED,widgetSourceDetails:y,event:p,productList:p.products,ctaList:p.cta})}}),v&&(0,c.u8S)(g)?(0,x.jsxs)(s.xv,{fontSize:.3*k+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:j+" !important",color:"white !important",paddingRight:"10%"},children:["\xa0",p.total_share>(0,c.LWl)(g)?le(p.total_share):"Share","\xa0"]}):(0,x.jsx)(x.Fragment,{})]})})})},se=n(7933),ce=n(2785);var ue=function(t){var e;const n=(0,u.MO)("whatmoreShopId"),i=(0,u.MO)("whatmorePrimaryFont"),o=(0,u.MO)("whatmoreLikedEvents"),l=((0,u.MO)("whatmoreSecondaryColor"),(0,u.MO)("isInDesignMode")),a=(0,u.MO)("isDemoBrand"),{whatmoreWidgetSourceDetails:p}=(0,r.useContext)(V.I),v=t.event,[m,g]=(0,r.useState)(null!==(e=o[v.event_id])&&void 0!==e&&e),[f,w,j,y]=(0,h.Z)(),C=.1*y;function S(t,e){l||a||(async()=>{(0,d.Z6)(t,e)})()}function b(){(0,u.bU)("whatmoreLikedEvents",{...o,[v.event_id]:!m}),m?(S(v,-1),(0,q.GF)({userInteractionType:H.K.VIDEO_UNLIKED,widgetSourceDetails:p,event:v,productList:v.products,ctaList:v.cta})):(S(v,1),(0,q.GF)({userInteractionType:H.K.VIDEO_LIKED,widgetSourceDetails:p,event:v,productList:v.products,ctaList:v.cta})),g(!m)}const I=v.total_like+(m?1:0);return(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{cursor:"pointer",children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[m?(0,x.jsx)(ce.Z,{sx:{boxShadow:3,color:(0,c.dmX)(n),fontSize:C,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),b()}}):(0,x.jsx)(se.Z,{sx:{boxShadow:3,color:"white",fontSize:C,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),b()}}),(0,x.jsx)(x.Fragment,{children:(0,c.CEM)(n)?(0,x.jsxs)(s.xv,{fontSize:.3*C+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:i+" !important",color:"white !important",position:"relative",bottom:"5px"},children:["\xa0",I>=(0,c.zKg)(n)?le(I):"Like","\xa0"]}):(0,x.jsx)(x.Fragment,{})})]})})})};const he=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#25D366",borderRadius:"50%",padding:.3*e},children:(0,x.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,x.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 pe=n(8866);const ve=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,x.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,x.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"})})})},xe=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,x.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,x.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 me=t=>{const e=t.shareText,[n,i]=(0,r.useState)("Copy link"),[o,l]=(0,r.useState)("");return(0,x.jsx)(x.Fragment,{children:t.isModalOpen&&(0,x.jsxs)("div",{className:"modal-overlay",style:{backgroundColor:"white",borderRadius:"10px",padding:"12px 12px 20px 12px"},children:[(0,x.jsxs)("div",{style:{cursor:"pointer",display:"flex",justifyContent:"space-between",paddingBottom:"6px"},children:[(0,x.jsx)("img",{onClick:()=>{window.location.href="https://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,x.jsx)(P.Z,{onClick:e=>{e.stopPropagation(),t.setIsModalOpen(!1)}})]}),(0,x.jsx)("div",{}),(0,x.jsx)(s.iz,{color:"blackAlpha.500",size:"1px",width:"100%"}),(0,x.jsxs)("div",{className:"social-icons",style:{display:"flex",gap:"20px",justifyContent:"center",paddingTop:"12px"},children:[(0,x.jsxs)("div",{onClick:t=>{var n;t.stopPropagation();const i=encodeURIComponent(null===(n=e[0])||void 0===n?void 0:n.text);window.open(`https://wa.me/?text=${i}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(he,{iconSize:Math.min(t.iconSize,30)}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"Whatsapp"})]}),(0,x.jsxs)("div",{onClick:t=>{var n;t.stopPropagation();const i=encodeURIComponent(null===(n=e[0])||void 0===n?void 0:n.text);window.open(`https://twitter.com/intent/tweet?text=${i}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(ve,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"X"})]}),(0,x.jsxs)("div",{onClick:t=>{t.stopPropagation(),navigator.clipboard.writeText(e[1]),i("Link copied"),l("green")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(xe,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14),color:o},children:n})]})]})]})})};var ge=function(t){var e;const n=(0,u.MO)("whatmorePrimaryFont"),i=(0,u.MO)("whatmoreShopId"),o=null!==(e=t.fontSize)&&void 0!==e?e:"8";return(0,x.jsx)(s.rU,{href:"https://www.whatmore.ai/shoppable-videos",isExternal:!0,children:(0,c.XFt)(i)&&(0,x.jsxs)(s.Kq,{direction:"row",justifyContent:"flex-start",alignItems:"center",width:"fit-content",spacing:"2px",paddingLeft:"2px",paddingRight:"2px",paddingBottom:"2px",marginBottom:"2px",children:[(0,x.jsx)("p",{style:{textAlign:"center",color:"white",fontFamily:n,fontWeight:"normal",fontSize:1.1*o+"px",margin:0,padding:0,lineHeight:"110%"},children:"powered by Whatmore"}),(0,x.jsx)(s.xu,{width:"10px"}),(0,x.jsx)("img",{src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",width:1.7*o,backgroundColor:"transparent",borderRadius:"0px"}})]})})};function fe(t){var e;const n=t.event,[i,o,l,a]=(0,h.Z)(),[d]=(0,u.j1)("whatmorePrimaryFont"),{whatmoreIsStoriesTemplate:p}=(0,r.useContext)(V.I),[v]=(0,u.j1)("whatmoreSecondaryColor"),[m]=(0,u.j1)("whatmoreShopId"),g=(0,c.f63)(m),f=null!==(e=(0,c.u2W)(m))&&void 0!==e?e:[v,g,v,g,v],w=(0,r.useRef)(null);return(0,r.useEffect)((()=>{w.current&&w.current.play()}),[]),(0,x.jsx)(x.Fragment,{children:p?(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",padding:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-start",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{overflow:"hidden",size:.14*a+"px",sx:{boxShadow:"0px 2px 1px 0px "+f[0]+"50, 0px -2px 1px 0px "+f[1]+"50, 2px 0px 1px 0px "+f[2]+"50, -2px 0px 1px 0px "+f[3]+"80, 2px -2px 1px 0px "+f[4]+"80, -2px 2px 1px 0px "+f[0]+"DA, 2px 2px 1px 0px "+f[1]+"DA, -2px -2px 1px 0px "+f[2]+"DA"},children:"video"==(0,pt.$)((0,oe.V)(n.storyset_thumbnail_image))?(0,x.jsx)("video",{className:"whatmore-story-thumbnail",ref:w,preload:"metadata",loop:!0,playsInline:!0,src:(0,oe.V)(n.storyset_thumbnail_image),muted:!0,alt:"story image"}):(0,x.jsx)("img",{src:(0,oe.V)(n.storyset_thumbnail_image),style:{objectFit:"cover",height:"100%",width:"100%",backgroundColor:"white"}})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:.05*a+"px",fontWeight:"medium",lineHeight:"100%",sx:{fontFamily:d+" !important",color:"white !important",textShadow:"0px 0px 4px black !important;"},children:n.storyset_name})})]})}):(0,x.jsx)(x.Fragment,{})})}var we=function(t){const[e,n,i]=(0,pe.Z)(),[o]=(0,u.j1)("isInDesignMode"),[l]=(0,u.j1)("isDemoBrand"),[a,p]=(0,u.j1)("isProductSwiperCatalogOpen"),[v,m]=(0,u.j1)("isFirstIndicatorRenderDone"),[g]=(0,u.j1)("whatmoreShopId"),f=(0,r.useContext)(ln),{whatmoreEventsBrowsingTemplate:w}=(0,r.useContext)(V.I),[j,C,S,b]=(0,h.Z)(),I=(0,u.MO)("whatmorePrimaryFont"),k=t.event,_=t.storySetId,F=t.isLast,E=t.onCloseCallback,P=t.focusRef,L=t.productClickHandler,z=t.videoPlayingData,R=t.totalSiblingEvents,M=t.indexAmongSiblings,K=t.leftOpenSpaceClickHandler,A=t.midOpenSpaceClickHandler,W=t.rightOpenSpaceClickHandler,{whatmoreWidgetSourceDetails:N}=(0,r.useContext)(V.I),Z=.1*b,[U,B]=(0,r.useState)(!1),[Y,X]=(0,r.useState)([]),G=t=>{$.current&&!$.current.contains(t.target)&&B(!1)},$=(0,r.useRef)(null);(0,r.useEffect)((()=>(U?document.addEventListener("click",G):document.removeEventListener("click",G),()=>{document.removeEventListener("click",G)})),[U]);const J="Free"==(0,c.Svj)(g)&&"portrait"==e;return(0,x.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[U&&(0,x.jsx)("div",{ref:$,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,x.jsx)(me,{shareText:Y,setShareText:X,iconSize:Z,isModalOpen:U,setIsModalOpen:B})}),(0,x.jsxs)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,x.jsxs)(s.Kq,{width:"full",height:"fit-content",direction:"column",justifyContent:"flex-start",alignItems:"center",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:[f.showVideoPlayingData?(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",marginTop:"5px",justifyContent:"center",children:(0,x.jsx)(ie,{progress:ne(z.current_time,z.video_duration),totalSiblings:R,indexAmongSiblings:M})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{width:"full",margin:"2px",marginTop:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",paddingRight:"10px",paddingLeft:"10px",children:[(0,x.jsx)(fe,{event:k}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,mt.ZK)(w)?(0,x.jsx)(de,{whatmoreShareTemplateId:(0,mt.QN)(w),whatmoreShareStoryId:_,whatmoreShareEventId:k.event_id,event:k,showShareText:!1,iconSize:.07*b,shareButtonBottomMargin:6,setIsModalOpen:B,setShareText:X}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(y,{focusRef:P}),("landscape"!==e||t.showCloseOverlay)&&(0,x.jsx)(O,{event:k,onCloseCallback:E})]})]})})]}),(0,x.jsxs)(s.Kq,{width:"100%",height:"100%",direction:"row",justifyContent:"center",children:[(0,x.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{K()},sx:{display:"block !important"}}),(0,x.jsx)(s.xu,{width:"34%",height:"100%",onClick:()=>{A()},sx:{display:"block !important"}}),(0,x.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{W()},sx:{display:"block !important"}})]}),(0,x.jsxs)(s.xu,{width:"full",height:"fit-content",children:[f.totalEvents>1&&!v&&f.showSwipeIndicator?(0,x.jsx)(s.xu,{width:"full",margin:"2px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,x.jsx)(D,{swipeUp:!F})})}):null,(0,x.jsxs)(s.xu,{width:"fit-content",height:"fit-content",position:"absolute",right:0,bottom:"25%",children:[(0,c.slY)(g)&&!(0,mt.ZK)(w)?(0,x.jsx)(s.xu,{ml:"auto",width:"fit-content",paddingY:"12px",paddingX:"8px",children:(0,x.jsxs)(s.Kq,{gap:"4px",direction:"column",alignItems:"center",cursor:"pointer",onClick:function(){var t;o||l||(async()=>{(0,d.lY)(k,1)})(),(0,q.GF)({userInteractionType:H.K.WHATSAPP_ICON_CLICKED,widgetSourceDetails:N,event:k,productList:null===k||void 0===k?void 0:k.products,ctaList:null===k||void 0===k?void 0:k.cta});const e=k.products.map((t=>`${t.product_link} \n`)),n=(0,c.gtK)(g),i=`Hey, I am interested in ${k.products.length>1?"these products":"this product"} I saw on ${null===(t=k.products[0])||void 0===t?void 0:t.brand} store: \n${e}. Could you please help me with some queries?`;window.open(n+`&text=${i}&type=phone_number`,"_blank")},children:[(0,x.jsx)(he,{iconSize:.7*Z,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)(s.xv,{fontSize:Z*(0,c.Xod)(g)+"px",fontWeight:"bold",align:"center",style:{marginTop:0},sx:{fontFamily:I+" !important",color:"white !important"},children:(0,c.UiZ)(g)})]})}):(0,x.jsx)(x.Fragment,{}),(0,c.jY3)(g)?(0,x.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(ue,{event:k})})}):(0,x.jsx)(x.Fragment,{}),(0,c.ROU)(g)&&!(0,mt.ZK)(w)?(0,x.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(de,{whatmoreShareTemplateId:(0,mt.QN)(w),whatmoreShareStoryId:_,whatmoreShareEventId:k.event_id,event:k,setIsModalOpen:B,setShareText:X})})}):(0,x.jsx)(x.Fragment,{})]}),(0,_t.kT)(k)?(0,x.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(g)?(0,x.jsx)(s.xu,{w:"100%",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(T,{event:k,onToggle:t=>{p("minimize-button"!==t)}})})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{display:"flex",width:"100%",height:"fit-content",children:(0,x.jsx)(Et,{event:k,productClickHandler:L})})]}):(0,x.jsx)(x.Fragment,{})]}),J&&(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",bg:"gray",py:"2px",justifyContent:"center",children:(0,x.jsx)(ge,{fontSize:.032*b})})]})]})},je=n(2279),ye=n.n(je),Ce=n(342);var Se=function(t){var e,n,i,o,l,a,[d,m,g,f]=(0,h.Z)();const[w,j]=(0,r.useState)(!1),[y,C]=(0,r.useState)(),[S,b]=(0,r.useState)(),[I,k]=(0,r.useState)({current_time:0,video_duration:0,is_video_ended:!1}),_=(0,u.MO)("whatmoreShopId"),F=t.event,T=t.storyId,E=t.onBack,P=r.useRef(),O=t.isPlaying,L=t.isLast,z=t.setLockSwiper,R=t.onVideoEndedCallback,M=t.progressUpdateCallback,D=null!==(e=t.totalSiblingEvents)&&void 0!==e?e:0,K=null!==(n=t.indexAmongSiblings)&&void 0!==n?n:0,A=null===(i=t.showOverlay)||void 0===i||i,W=null!==(o=t.leftOpenSpaceClickHandler)&&void 0!==o?o:()=>{},N=null!==(l=t.midOpenSpaceClickHandler)&&void 0!==l?l:()=>{},Z=null!==(a=t.rightOpenSpaceClickHandler)&&void 0!==a?a:()=>{},{whatmoreWidgetSourceDetails:U}=(0,r.useContext)(V.I),B="center";let Y;try{Y=ye()((()=>{R()}),1e3,{leading:!0,trailing:!1})}catch(X){console.log(X)}return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:f,height:g,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:B,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:f/g,children:(0,x.jsx)(v.Z,{height:"100%",width:"100%",url:(0,oe.V)((0,Ce.uv)(F)),isPlaying:O,timeUpdateCallback:function(t,e){const n=ne(t,e);M(n);const i=I.is_video_ended;n>=99&&O&&!i?(Y(),k({current_time:t,video_duration:e,is_video_ended:!0})):k({current_time:t,video_duration:e,is_video_ended:i})},event:F,source:t.source})})})}),A?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:B,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(we,{focusRef:P,event:t.event,isLast:L,onCloseCallback:t=>{E(t),(0,q.Z2)({userInteractionType:H.K.VIDEO_PLAYBACK,userInteractionMetadata:{watch_time:I.current_time},widgetSourceDetails:U,event:F,productList:F.products,ctaList:F.cta})},productClickHandler:async t=>{const e=await(0,p.p)(t,(0,c.Ipo)(_),_);b(t),C(e),j(!0),z(!0),(0,q.GF)({userInteractionType:H.K.SHOPNOW_CLICKED,widgetSourceDetails:U,event:F,productList:F.products,ctaList:F.cta}),(0,u.bU)("whatmoreAllowAutoSlide",!1)},videoPlayingData:I,totalSiblingEvents:D,indexAmongSiblings:K,leftOpenSpaceClickHandler:W,midOpenSpaceClickHandler:N,rightOpenSpaceClickHandler:Z,storySetId:T,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay})})}):(0,x.jsx)(x.Fragment,{}),!0===w?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:B,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(te,{focusRef:P,event:t.event,isLast:L,onCloseCallback:()=>E(),setLockSwiper:z,data:y,currentProduct:S,setOpenShopNow:t=>{j(t),(0,u.bU)("whatmoreAllowAutoSlide",!t)}})})}):(0,x.jsx)("div",{})]})})},be=n(7300),Ie=n(8984),ke=n(58),_e=n(9723);var Fe=function(t){var[e,n,i,o]=(0,h.Z)();const r=(0,u.MO)("whatmoreShopId"),l=t.event,a=t.isPlaying,d="center";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:o,height:i,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:d,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:o/i,children:(0,x.jsx)(v.Z,{height:"100%",width:"100%",url:(0,oe.V)((0,Ce.uv)(l)),isPlaying:a,timeUpdateCallback:function(t,e){},event:l,source:t.source})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:d,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",backdropFilter:"auto",backdropBlur:"10px",onClick:t=>{(0,ke.QV)()},children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"full",width:"full",children:[(0,x.jsx)(_e.Z,{sx:{boxShadow:3,color:(0,c.Ya_)(r),fontSize:.4*o,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{(0,ke.QV)()}}),(0,x.jsx)(s.xv,{color:"white",fontSize:.05*o+"px",fontWeight:"bold",align:"left",children:"Please click to play video.."})]})})})]})})},Te=n(3433);var Ee=function(t){var e,n;const r=t.event,l=null===(e=t.isPlaying)||void 0===e||e,a=t.onBack,d=t.isLast,s=t.setLockSwiper,c=(t.heightFactor,t.widthFactor,t.onVideoEndedCallback),h=t.progressUpdateCallback,[p,v]=(0,j.Z)(),[m]=(0,u.j1)("whatmoreVideoPlayerPoolBlessed"),g=null===(n=t.showOverlay)||void 0===n||n;function f(){v(!p)}if((0,Ie.KE)()&&0==m)return(0,x.jsx)(Fe,{event:r,onBack:a,isPlaying:l,isLast:d,setLockSwiper:s,onVideoEndedCallback:c,progressUpdateCallback:h,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{f()},midOpenSpaceClickHandler:()=>{f()},rightOpenSpaceClickHandler:()=>{f()},showOverlay:g,source:Te.j.CAROUSEL_EVENT_OPENED},"shopping-video-view"+r.event_id);if((0,be.B6)(r)||(0,be.WJ)(r))return(0,x.jsx)(Se,{event:r,onBack:a,isPlaying:l,isLast:d,setLockSwiper:s,onVideoEndedCallback:c,progressUpdateCallback:h,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{f()},midOpenSpaceClickHandler:()=>{f()},rightOpenSpaceClickHandler:()=>{f()},showOverlay:g,source:Te.j.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+r.event_id);if((0,be.yC)(r)){var{status:w,bannerText:y,timeToStartInMins:C}=i.Z.getEventStatus(r);if(w.name===o.Z.LIVE.name)return(0,x.jsx)(ee,{event:r,onBack:a,isPlaying:l,isLast:d,showOverlay:g},"shopping-live-view"+r.event_id)}return console.error("Can't render event which is neither video or a currently-live-event"),(0,x.jsx)("div",{})},Pe=n(9284),Oe=n.n(Pe),Le=n(7463),ze=n(2154);function Re(t){var e;const[n,i]=(0,r.useState)(!1),o=t.onClick,l=null!==(e=t.fontSize)&&void 0!==e?e:50;return(0,x.jsx)("div",{style:{height:"fit-content",width:"fit-content",backgroundColor:"black",opacity:.4,borderRadius:"50%"},className:[n?"whatmore-scale-on-tap":""].join(" "),children:"left"===t.type?(0,x.jsx)(ze.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{i(!0),setTimeout((()=>{i(!1)}),500),o(t,"up")}}):(0,x.jsx)(Le.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{i(!0),setTimeout((()=>{i(!1)}),500),o(t,"down")}})})}var Me=function(t){var e,n,i;const o=null!==(e=t.relativeBottomPercentage)&&void 0!==e?e:"30%",r=null!==(n=t.width)&&void 0!==n?n:"100%",l=null!==(i=t.fontSize)&&void 0!==i?i:50,a=t.handleClick;return(0,x.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,x.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,x.jsx)(Re,{type:"left",onClick:a,fontSize:l}),(0,x.jsx)(Re,{type:"right",onClick:a,fontSize:l})]})})},De=n(2860),Ke=n(4669);var Ae=function(t,e){function n(t,e){return 1==e?0:t<0?e+t:t>=e?t-e:t}const i=(0,r.useRef)({prevIndex:n(t-1,e),activeIndex:t,nextIndex:n(t+1,e)});return[function(){return i.current},function(t){i.current="right"==t?{prevIndex:n(i.current.activeIndex,e),activeIndex:n(i.current.activeIndex+1,e),nextIndex:n(i.current.activeIndex+2,e)}:{prevIndex:n(i.current.activeIndex-2,e),activeIndex:n(i.current.activeIndex-1,e),nextIndex:n(i.current.activeIndex,e)}},function(t){return n(i.current.activeIndex+t)}]};var We=function(t,e){const n=(0,r.useRef)({clientX:0,clientY:0});return[function(t){n.current.clientX=t.changedTouches[0].clientX,n.current.clientY=t.changedTouches[0].clientY},function(i){const o=n.current.clientX,r=n.current.clientY;var l=o-i.changedTouches[0].clientX,a=r-i.changedTouches[0].clientY;return"vertical"==t&&Math.abs(a)>e||"horizontal"==t&&Math.abs(l)>e?"vertical"==t?a>0?"right":"left":l>0?"right":"left":null}]};var Ne=function(t,e){const n=(0,r.useRef)(ye()(((t,e)=>{t(e)}),300,{leading:!0,trailing:!1}));return[function(i,o){var r=0;if(r="vertical"==t?i.deltaY:i.deltaX,Math.abs(r)<=e)return;const l=r>0?"right":"left";n.current(o,l)}]},qe=n(5173);var He=function(t){const e=t.events,n=t.eventIndex,i=t.onBack;var[o,p,v,m]=(0,h.Z)();const[g]=(0,u.j1)("isInDesignMode"),[f]=(0,u.j1)("isDemoBrand"),[w,j]=(0,r.useState)(!0),[y,C]=(0,u.j1)("isFirstIndicatorRenderDone"),[S,b]=(0,r.useState)(!1),{setCloseClickComponent:I}=(0,r.useContext)(ln),{slideDirection:k}=(0,r.useContext)(ln),[_]=(0,u.j1)("whatmoreShopId"),[F]=(0,u.j1)("whatmoreLandingLocationType"),[T,E]=Ae(n,e.length),[P,O]=We(k,50),[L]=Ne("vertical",30),[z,R]=(0,r.useState)(!1),[M,D]=(0,r.useState)(null),{whatmoreWidgetSourceDetails:K,whatmoreUserInfo:A}=(0,r.useContext)(V.I);function N(){R(!1)}function Z(t){N(),setTimeout((()=>{i(t)}),500)}(0,r.useEffect)((()=>(R(!0),()=>{})),[]);const U=K.landingLocationType,B=K.templateType;function Y(){(0,u.MO)("whatmoreAllowAutoSlide")&&(E("right"),M.slideNext())}function X(t,e){E(e),function(t,e){M&&("left"===e?M.slidePrev():M.slideNext())}(0,e)}I(Z);const G=Math.round(.05*v);return(0,x.jsx)(Oe(),{isOpen:z,onAfterOpen:function(){},onRequestClose:N,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,x.jsx)(qe.Z,{children:(0,x.jsxs)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:(0,W.lA)("#000000",13)},onTouchStart:t=>{P(t)},onTouchEnd:t=>{if(S)return;const e=O(t);e&&X(0,e)},onWheel:t=>{S||L(t,(t=>{X(0,t)}))},children:[(0,x.jsx)(l.tq,{speed:400,threshold:G,slidesPerView:1,direction:k,modules:[a.tl,a.Gk],initialSlide:n,loop:1!=e.length,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,allowSlideNext:!S,allowSlidePrev:!S,allowTouchMove:!1,onSwiper:t=>{D(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:K,event:e[T().activeIndex],productList:e[T().activeIndex].products})},onSlideChange:t=>{var n;w?j(!1):(y||C(!0),n=e[T().activeIndex],g||f||(async()=>{const t=(0,mt.NY)(U)+(0,mt.dS)(B)+"_"+(null===n||void 0===n?void 0:n.event_id);(0,d.wh)(n),"index"===F?((0,Ke.Tc)(_,De.Xh,De.pR),(0,ot.H4)(n.event_id,n.products,De.Xh,De.pR,t,null===n||void 0===n?void 0:n.location,null===A||void 0===A?void 0:A.userType)):F.startsWith("product")||"embed"===F?((0,Ke.Tc)(_,De.h7,De.dU),(0,ot.H4)(n.event_id,n.products,De.h7,De.dU,t)):F.startsWith("collection")?((0,Ke.Tc)(_,De.U$,De.Pk),(0,ot.H4)(n.event_id,n.products,De.U$,De.Pk,t)):((0,Ke.Tc)(_,De.Xh,De.pR),(0,ot.H4)(n.event_id,n.products,De.Xh,De.pR,t))})(),(0,q.y4)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:K,event:e[T().activeIndex],productList:e[T().activeIndex].products}))},children:[...Array(Math.min(e.length,3)).keys()].map((n=>(0,x.jsx)(l.o5,{children:n=>{let{isActive:i,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=n;const d=i?"activeIndex":o?"prevIndex":"nextIndex";return(0,x.jsx)(s.Kq,{direction:"column",height:window.innerHeight,justifyContent:"center",children:(0,x.jsx)(Ee,{event:e[T()[d]],onBack:Z,isPlaying:1==e.length||i&&l,isLast:!1,setLockSwiper:b,onVideoEndedCallback:Y,progressUpdateCallback:t=>{},showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay})})}},"event-vertical-scroll-slide-"+n)))}),e.length>1&&!S&&(0,c.h6H)(_)&&"horizontal"===(0,c.e8z)(_)&&"horizontal"===k?(0,x.jsx)(Me,{relativeBottomPercentage:"50%",width:m,handleClick:(t,e)=>{X(0,"down"==e?"right":"left")},fontSize:parseInt(.12*m)}):(0,x.jsx)(x.Fragment,{})]})})})},Ve=n(1168);n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811);const Ze=t=>{let{children:e,customClass:n,show:i,closeCallback:o}=t;return Ve.createPortal((0,x.jsxs)("div",{className:`whatmore-landscape-modal whatmore-root ${n}`,style:{display:i?"block":"none"},children:[(0,x.jsx)("div",{className:"whatmore-landscape-modal-overlay",onClick:o}),(0,x.jsx)("div",{className:"whatmore-landscape-modal-content",children:e})]}),document.body)};Ze.defaultProps={children:(0,x.jsx)("div",{children:"Empty Modal"}),customClass:"",show:!1,closeCallback:()=>!1};var Ue=Ze;var Be=function(t){var[e,n,i,o]=(0,h.Z)();const[p]=(0,u.j1)("isInDesignMode"),[v]=(0,u.j1)("isDemoBrand"),[m,g]=(0,u.j1)("isFirstIndicatorRenderDone"),[f,w]=(0,r.useState)(0!=t.eventIndex),{setCloseClickComponent:j}=(0,r.useContext)(ln),[y,C]=(0,r.useState)(!1),[S]=(0,u.j1)("whatmoreShopId"),[b]=(0,u.j1)("whatmoreLandingLocationType"),{whatmoreUITheme:I}=(0,r.useContext)(V.I),{whatmoreWidgetSourceDetails:k,whatmoreUserInfo:_}=(0,r.useContext)(V.I),[F,T]=(0,r.useState)(!1),[E,P]=(0,r.useState)(null);function L(){T(!1)}const z=t.events,R=t.eventIndex,M=t.onBack,D=z.concat(z),K=z.length,A=(0,r.useRef)(0);function N(t){L(),setTimeout((()=>{M(t)}),500)}function Z(){E&&!E.isEnd&&(0,u.MO)("whatmoreAllowAutoSlide")&&E.slideNext()}(0,r.useEffect)((()=>(T(!0),()=>{})),[]),j(N);const U=k.landingLocationType,B=k.templateType,Y=parseInt(Math.min(5,z.length));return(0,x.jsx)(Ue,{show:F,closeCallback:L,customClass:"whatmore-landscape-modal-swipe-view",children:(0,x.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",aligntItems:"center",backgroundColor:(0,W.lA)("#000000",13),children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xu,{height:"fit-content",width:o*Y,children:(0,x.jsxs)(l.tq,{onInit:t=>{P(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:k,event:z[t.activeIndex],productList:z[t.activeIndex].products,ctaList:z[t.activeIndex].cta})},slidesPerView:Y,centeredSlides:!0,allowTouchMove:!1,initialSlide:R,modules:[a.lI,a.W_,a.Gk,a.pt,a.tl],navigation:Y>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*i),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:o*Y,watchSlidesProgress:!0,onSlideChange:t=>{var e;f?w(!1):(m||g(!0),e=z[t.activeIndex],p||v||(async()=>{const t=(0,mt.NY)(U)+(0,mt.dS)(B)+"_"+(null===e||void 0===e?void 0:e.event_id);(0,d.wh)(e),"index"===b?((0,Ke.Tc)(S,De.Xh,De.pR),(0,ot.H4)(e.event_id,e.products,De.Xh,De.pR,t,null===e||void 0===e?void 0:e.location,null===_||void 0===_?void 0:_.userType)):b.startsWith("product")||"embed"===b?((0,Ke.Tc)(S,De.h7,De.dU),(0,ot.H4)(e.event_id,e.products,De.h7,De.dU,t)):b.startsWith("collection")?((0,Ke.Tc)(S,De.U$,De.Pk),(0,ot.H4)(e.event_id,e.products,De.U$,De.Pk,t)):((0,Ke.Tc)(S,De.Xh,De.pR),(0,ot.H4)(e.event_id,e.products,De.Xh,De.pR,t))})(),(0,q.y4)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:k,event:z[t.activeIndex],productList:z[t.activeIndex].products,ctaList:z[t.activeIndex].cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[z.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(O,{onCloseCallback:M})}),D.slice(R,z.length+R).map(((t,e)=>(0,x.jsx)(l.o5,{children:t=>{let{isActive:n,isPrev:r,isNext:l,isVisible:a,isDuplicate:d}=t;if(n)return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:1*o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Ee,{event:z[e%K],onBack:N,isPlaying:!0,isLast:e%K===z.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:Z,progressUpdateCallback:t=>{},showCloseOverlay:(null===z||void 0===z?void 0:z.length)<=2})})});if(l)return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{E.slideTo(e%K,300)},children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Ee,{event:z[e%K],onBack:N,isPlaying:!1,isLast:e%K===z.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:Z,progressUpdateCallback:t=>{},showOverlay:!1})})});if(r&&1===A.current)return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{E.slideTo(e%K,300)},children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Ee,{event:z[e%K],onBack:N,isPlaying:!1,isLast:e%K===z.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:Z,progressUpdateCallback:t=>{},showOverlay:!1})})});try{R+e>=K-1&&(A.current=1)}catch(u){console.log(u)}return(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide"+t.event_id)))]})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(ge,{height:.04*i,width:.1*o,fontSize:.02*i})})]})})},Ye=n(6090),Xe=n(7616),Ge=n(9302),$e=n(2575);var Je=function(t){const[e,n,i,o]=(0,h.Z)(),[r]=(0,u.j1)("whatmorePrimaryColor"),[l]=(0,u.j1)("whatmoreSecondaryColor"),a="flex-end";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:o,height:i,backgroundColor:"whiteAlpha.200",backdropBlur:"10px",children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:a,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",children:(0,x.jsx)(s.oM,{width:"full",ratio:o/i,children:(0,x.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+r+", gray, "+l+")"})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:a,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{padding:"2px",margin:"5px",borderRadius:"md",backgroundColor:"transparent",children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,x.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",backdropFilter:"auto",backdropBlur:"5px"})})})})]})})};var Qe=function(t){var e;const n=t.stories,i=t.onBack,o=t.onStoryCompleteCallback,a=t.isActive,c=null!==(e=t.initialEventIndex)&&void 0!==e?e:0,p=n.events;var[v,m,g,f]=(0,h.Z)();const[w,y]=(0,j.Z)(),[C]=(0,u.j1)("isInDesignMode"),[S]=(0,u.j1)("isDemoBrand"),[b]=(0,u.j1)("whatmoreShopId"),[I,k]=(0,r.useState)(!0),[_,F]=(0,u.j1)("isFirstIndicatorRenderDone"),[T,E]=(0,r.useState)(null),[P,O]=(0,r.useState)(!1),{whatmoreWidgetSourceDetails:L,whatmoreUserInfo:z}=(0,r.useContext)(V.I),[R,M]=Ae(c,p.length);function D(t){i(t)}const K=L.landingLocationType,A=L.templateType;function W(){if(!(0,u.MO)("whatmoreAllowAutoSlide"))return;R().activeIndex+1>=p.length?o("right"):(M("right"),T&&T.slideNext())}function N(t){const e=R().activeIndex;"right"==t&&e+1>=p.length||"left"==t&&e-1<0?o(t):(M(t),T&&("left"==t?T.slidePrev():T.slideNext()))}return p[R().activeIndex],(0,x.jsx)("div",{children:(0,x.jsx)(l.tq,{speed:1,slidesPerView:1,direction:"horizontal",initialSlide:0,loop:!0,height:g,width:f,watchSlidesProgress:!0,allowTouchMove:!1,onSwiper:t=>{E(t)},onSlideChange:t=>{I?k(!1):(_||F(!0),function(t){const e=(0,mt.NY)(K)+(0,mt.dS)(A)+"_"+(null===t||void 0===t?void 0:t.event_id);C||S||(async()=>{(0,d.wh)(t),(0,Ke.Tc)(b,De.Xh,De.OW),(0,ot.H4)(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)})()}(p[R().activeIndex]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:L,event:p[R().activeIndex],productList:p[R().activeIndex].products,ctaList:p[R().activeIndex].cta}))},children:[...Array(Math.min(p.length,3)).keys()].map((e=>(0,x.jsx)(l.o5,{children:e=>{let{isActive:i,isPrev:o,isNext:r,isVisible:l,isDuplicate:d}=e;if(a){const e=i?"activeIndex":o?"prevIndex":"nextIndex",r=p[R()[e]];return(0,x.jsx)(s.Kq,{direction:"column",height:g,justifyContent:"center",children:(0,be.B6)(r)||(0,be.WJ)(r)?(0,x.jsx)(Se,{event:r,totalSiblingEvents:p.length,indexAmongSiblings:R()[e],onBack:D,isPlaying:a&&i&&l,isLast:!1,setLockSwiper:O,onVideoEndedCallback:W,progressUpdateCallback:t=>{},leftOpenSpaceClickHandler:()=>{N("left")},midOpenSpaceClickHandler:()=>{y(!w)},rightOpenSpaceClickHandler:()=>{N("right")},storyId:n.id,source:Te.j.STORY_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+r.event_id):(0,x.jsx)(x.Fragment,{})})}return(0,x.jsx)(s.Kq,{direction:"column",height:v,justifyContent:"center",children:(0,x.jsx)(Je,{})})}},"event-story-view-slide-"+e)))})})};var tn=function(t){const e=t.onBack,n=t.eventsStories,i=t.initialStoryIndex;var[o,c,p,v]=(0,h.Z)();const[m]=(0,u.j1)("isInDesignMode"),[g]=(0,u.j1)("isDemoBrand"),[f,w]=(0,r.useState)(!0),[j,y]=(0,u.j1)("isFirstIndicatorRenderDone"),[C,S]=(0,r.useState)(!1),{setCloseClickComponent:b}=(0,r.useContext)(ln),{slideDirection:I}=(0,r.useContext)(ln),[k]=(0,u.j1)("whatmoreShopId"),[_,F]=Ae(i,n.length),[T,E]=We("horizontal",50),[P]=Ne("vertical",30),O=t.eventIndex,[L,z]=(0,r.useState)(!1),[R,M]=(0,r.useState)(null),{whatmoreWidgetSourceDetails:D,whatmoreUserInfo:K}=(0,r.useContext)(V.I);function A(){z(!1)}function W(t){A(),setTimeout((()=>{e(t)}),500)}(0,r.useEffect)((()=>(z(!0),()=>{})),[]),b(W);const N=D.landingLocationType,Z=D.templateType;function U(t){R&&(0,u.MO)("whatmoreAllowAutoSlide")&&(F(t),"right"==t?R.slideNext():R.slidePrev())}function B(t,e){U(e)}return(0,x.jsx)(Oe(),{isOpen:L,onAfterOpen:function(){},onRequestClose:A,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,x.jsx)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:"#00000088"},onTouchStart:t=>{T(t)},onTouchEnd:t=>{const e=E(t);e&&B(0,e)},onWheel:t=>{P(t,(t=>{B(0,t)}))},children:(0,x.jsx)(l.tq,{speed:1,slidesPerView:1,direction:"horizontal",modules:[a.SH,a.Gk],initialSlide:i,loop:n.length>1,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,onSwiper:t=>{var e,i;M(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:D,event:n[_().activeIndex].events[0],productList:null===(e=n[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=n[_().activeIndex].events[0])||void 0===i?void 0:i.cta})},onSlideChange:t=>{var e,i;f?w(!1):(!function(t){const e=(0,mt.NY)(N)+(0,mt.dS)(Z)+"_"+(null===t||void 0===t?void 0:t.event_id);m||g||(async()=>{(0,d.wh)(t),(0,Ke.Tc)(k,De.Xh,De.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===K||void 0===K?void 0:K.userType)})()}(n[_().activeIndex].events[0]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:D,event:n[_().activeIndex].events[0],productList:null===(e=n[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=n[_().activeIndex].events[0])||void 0===i?void 0:i.cta}))},allowTouchMove:!1,cubeEffect:{shadow:!0,slideShadows:!0,shadowOffset:20,shadowScale:.94},children:[...Array(Math.min(n.length,3)).keys()].map((t=>(0,x.jsx)(l.o5,{children:t=>{let{isActive:e,isPrev:r,isNext:l,isVisible:a,isDuplicate:d}=t;const c=e?"activeIndex":r?"prevIndex":"nextIndex";return(0,x.jsx)(s.Kq,{direction:"column",height:o,justifyContent:"center",children:(0,x.jsx)(Qe,{stories:n[_()[c]],onBack:W,isActive:e&&a,isNext:l,isPrev:r,onStoryCompleteCallback:U,nextStories:n[_().nextIndex],prevStories:n[_().prevIndex],initialEventIndex:i==_()[c]?O:0},"event-story-view-"+n[_()[c]].id)})}},"event-vertical-scroll-slide-"+t)))})})})},en=n(4892);var nn=function(t){var e,n,i,[o,l,a,d]=(0,h.Z)();const[c]=(0,u.j1)("whatmorePrimaryColor"),[p]=(0,u.j1)("whatmoreSecondaryColor"),v=t.event,m=(t.onBack,r.useRef(),null!==(e=t.showPausedVideo)&&void 0!==e&&e),f=null!==(n=t.heightFactor)&&void 0!==n?n:1,w="flex-end";return d*=null!==(i=t.widthFactor)&&void 0!==i?i:1,a*=f,(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:d,height:a,children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:w,height:"full",width:"full",children:(0,x.jsx)(s.xu,{children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:m?(0,be.B6)(v)||(0,be.WJ)(v)?(0,x.jsx)(en.Z,{height:"100%",width:"100%",url:v.thumbnail_image,isPlaying:!1,pauseFromPlayTimeInMs:1e3,event:v}):(0,x.jsx)(g.Ee,{width:"full",height:"full",src:v.thumbnail_image,objectFit:"cover",borderRadius:"lg"}):(0,x.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+c+", gray, "+p+")"})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:w,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,x.jsx)(s.xu,{width:"full",height:"full",backgroundColor:"blackAlpha.400"})})})})]})})};var on=function(t){var[e,n,i,o]=(0,h.Z)();const[c]=(0,u.j1)("isInDesignMode"),[p]=(0,u.j1)("isDemoBrand"),[v,m]=(0,u.j1)("isFirstIndicatorRenderDone"),[g,f]=(0,r.useState)(0!=t.eventIndex),{setCloseClickComponent:w}=(0,r.useContext)(ln),[j,y]=(0,r.useState)(!1),[C]=(0,u.j1)("whatmoreShopId"),{whatmoreWidgetSourceDetails:S,whatmoreUserInfo:b}=(0,r.useContext)(V.I),[I,k]=(0,r.useState)(!1),[_,F]=(0,r.useState)(null);function T(){k(!1)}t.events;const E=t.eventIndex,P=t.onBack,L=t.eventsStories,z=t.initialStoryIndex;function R(t){T(),setTimeout((()=>{P(t)}),500)}(0,r.useEffect)((()=>(k(!0),()=>{})),[]),w(R);const M=S.landingLocationType,D=S.templateType;function K(t){_&&!_.isEnd&&("right"==t?_.slideNext():_.slidePrev())}const A=parseInt(Math.min(5,L.length));return(0,x.jsx)(Ue,{show:I,closeCallback:T,customClass:"whatmore-landscape-modal-stories-view",children:(0,x.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",aligntItems:"center",backgroundColor:"blackAlpha.800",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xu,{height:"fit-content",width:o*A,children:(0,x.jsxs)(l.tq,{onInit:t=>{var e,n;F(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:S,event:L[t.activeIndex].events[0],productList:null===(e=L[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=L[t.activeIndex].events[0])||void 0===n?void 0:n.cta})},slidesPerView:A,centeredSlides:!0,allowTouchMove:!1,initialSlide:z,modules:[a.lI,a.W_,a.Gk],navigation:A>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*i),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:o*A,watchSlidesProgress:!0,onSlideChange:t=>{var e,n;g?f(!1):(v||m(!0),function(t){const e=(0,mt.NY)(M)+(0,mt.dS)(D)+"_"+(null===t||void 0===t?void 0:t.event_id);c||p||(async()=>{(0,d.wh)(t),(0,Ke.Tc)(C,De.Xh,De.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===b||void 0===b?void 0:b.userType)})()}(L[t.activeIndex].events[0]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:S,event:L[t.activeIndex].events[0],productList:null===(e=L[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=L[t.activeIndex].events[0])||void 0===n?void 0:n.cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[L.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(O,{onCloseCallback:P})}),L.map(((t,e)=>(0,x.jsx)(l.o5,{children:n=>{let{isActive:r,isPrev:l,isNext:a,isVisible:d,isDuplicate:c}=n;if(r){const n=1;return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o*n,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(Qe,{stories:t,onBack:R,isActive:r&&d,isNext:!1,isPrev:!1,onStoryCompleteCallback:K,initialEventIndex:z==e?E:0,showCloseOverlay:(null===L||void 0===L?void 0:L.length)<=2},"event-story-view-"+t.id)})})}return l||a?(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{_.slideTo(e,300)},children:(0,x.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(nn,{showPausedVideo:!0,event:L[e].events[0],onBack:R,isPlaying:!1,setLockSwiper:y})})}):(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide-"+e)))]})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(ge,{height:.04*i,width:.1*o,fontSize:.02*i})})]})})};const rn=(0,$e.Z)({key:"whatmore-css-sv"}),ln=(0,r.createContext)({isIOS:!1,totalEvents:0,closeClickComponent:null,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:"vertical",showSwipeIndicator:!0});var an=function(t){var e,n;const[i,o,l]=(0,pe.Z)(),[a]=(0,u.j1)("whatmoreShopId"),{whatmoreRootId:d}=(0,r.useContext)(V.I),{whatmoreIsStoriesTemplate:s}=(0,r.useContext)(V.I);var h=t.events,p=t.index,v=t.onBack,m=t.eventsStories,g=t.initialStoryIndex,f=(0,c.cX2)(a),w=(h[p],"portrait"===i?null!==(e=t.slideDirection)&&void 0!==e?e:"vertical":null!==(n=t.slideDirection)&&void 0!==n?n:h.length>1?"horizontal":"vertical"),j="portrait"===i?!(0,c.h6H)(a)&&!s:(0,c.n89)(a);return h[p],(0,r.useLayoutEffect)((()=>{(0,c.TLG)(a)&&(window.location.href.includes(f)?history.replaceState(null,"","#"+f):history.pushState(null,"","#"+f),window.addEventListener("popstate",(()=>{window.location.href.includes(f)||v()})))}),[]),delete Xe.ZP.styles.global,s?(0,x.jsx)(Ge.C,{value:rn,children:(0,x.jsx)(Ye.x,{theme:Xe.ZP,cssVarsRoot:d,resetCSS:!1,children:(0,x.jsx)(ln.Provider,{value:{isIOS:(0,Ie.KE)(),totalEvents:h.length,closeClickComponent:v,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:w,showSwipeIndicator:j},children:"portrait"===i?(0,x.jsx)(tn,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p}):(0,c.Bbr)(a)?(0,x.jsx)(on,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p}):(0,x.jsx)(tn,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p})})})}):(0,x.jsx)(Ge.C,{value:rn,children:(0,x.jsx)(Ye.x,{theme:Xe.ZP,cssVarsRoot:d,resetCSS:!1,children:(0,x.jsx)(ln.Provider,{value:{isIOS:(0,Ie.KE)(),totalEvents:h.length,closeClickComponent:v,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:w,showSwipeIndicator:j},children:"portrait"===i?(0,x.jsx)(He,{events:h,eventIndex:p,onBack:v}):(0,x.jsx)(Be,{events:h,eventIndex:p,onBack:v})})})})}},9316:function(t,e,n){n.d(e,{mT:function(){return o}});var i=n(686);const o=`\n ${i.F4`
76
+ `} 0.5s`,bt=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"))})),[It,kt]=(0,r.useState)(-1!==bt?null===(n=q.options)||void 0===n||null===(i=n[bt])||void 0===i||null===(o=i.values)||void 0===o?void 0:o[0]:""),[_t,Ft]=(0,r.useState)({});(0,r.useEffect)((()=>{-1!==bt&&"whatmore"!==(0,c.Ipo)(wt)&&async function(){const t=await(0,lt.m3)(Z);Ft(t)}()}),[]);let Tt=-1,Et=-1!==bt&&null!==_t&&void 0!==_t&&_t.product&&(null===_t||void 0===_t||null===(l=_t.product)||void 0===l||null===(a=l.images)||void 0===a?void 0:a.length)>=(null===_t||void 0===_t||null===(d=_t.product)||void 0===d||null===(p=d.options)||void 0===p||null===(v=p[bt])||void 0===v||null===(m=v.values)||void 0===m?void 0:m.length)?null===_t||void 0===_t||null===(f=_t.product)||void 0===f||null===(w=f.images)||void 0===w?void 0:w.map((t=>{var e,n,i,o,r,l,a,d,s,c,u,h,p,v;const x=null===_t||void 0===_t||null===(e=_t.product)||void 0===e||null===(n=e.options)||void 0===n?void 0:n.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===_t||void 0===_t||null===(i=_t.product)||void 0===i||null===(o=i.options)||void 0===o||null===(r=o[x])||void 0===r||null===(l=r.values)||void 0===l?void 0:l[Math.min(++Tt,(null===_t||void 0===_t||null===(a=_t.product)||void 0===a||null===(d=a.options)||void 0===d||null===(s=d[bt])||void 0===s||null===(c=s.values)||void 0===c?void 0:c.length)-1)]:null===_t||void 0===_t||null===(u=_t.product)||void 0===u||null===(h=u.options)||void 0===h||null===(p=h[x])||void 0===p||null===(v=p.values)||void 0===v?void 0:v[Math.max(0,Tt)],src:null===t||void 0===t?void 0:t.src}})):[],Pt=[];if("whatmore"==(0,c.Ipo)(wt)&&(null===q||void 0===q||null===(j=q.images)||void 0===j?void 0:j.length)>0){var Ot;var Lt;if(-1!==(null===q||void 0===q||null===(Ot=q.options)||void 0===Ot?void 0:Ot.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"))}))))Pt=null===q||void 0===q||null===(Lt=q.images)||void 0===Lt?void 0:Lt.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc})))}return Tt+1<(null===_t||void 0===_t||null===(y=_t.product)||void 0===y||null===(C=y.options)||void 0===C||null===(b=C[bt])||void 0===b||null===(I=b.values)||void 0===I?void 0:I.length)&&(Et=[]),(0,x.jsxs)(s.kC,{sx:{"&::-webkit-scrollbar":{width:"0px"}},id:"whatmore-shopnow-view",position:"relative",maxHeight:"75vh",overflowY:"scroll",direction:"column",bg:"#FFF",height:"fit-content",opacity:"100%",borderTopRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"xl":null,animation:St,children:[(0,x.jsx)(At,{setOpenShopNow:U,setLockSwiper:B,FONT_SIZE:A}),(0,x.jsx)(s.M5,{marginBottom:"10px",px:"20px",py:"5px",children:(0,x.jsx)(s.kC,{bg:"whiteAlpha.900",width:"fit-content",height:"fit-content",borderRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"lg":null,overflow:"hidden",sx:{borderWidth:(0,c.alU)(wt),borderColor:(0,c.qPe)(wt)},children:(0,x.jsx)(s.kC,{width:"100%",children:(0,x.jsx)(Zt.P,{renderElement:t=>(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(s.xu,{width:M+"px",height:D+"px",children:(0,x.jsx)(g.Ee,{width:M+"px",height:D+"px",borderRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"lg":null,src:(0,pt.s)(t.eventData.src,"&width=400&height=400"),alt:Z.handle,sx:{objectFit:(0,c.yOX)(wt)+" !important"},fallback:(0,x.jsx)(K.Z,{width:M+"px",height:D+"px",borderRadius:"round"==(null===ft||void 0===ft?void 0:ft.whatmoreUITheme)?"10px":"0px"})})})}),dataList:Et.length>0&&!Et.includes(null)?null===(k=Et)||void 0===k?void 0:k.filter((t=>(null===t||void 0===t?void 0:t.color)==It)):Pt.length>0?[null===(_=Pt)||void 0===_?void 0:_.find((t=>(null===t||void 0===t?void 0:t.color)==It))]:null===q||void 0===q||null===(F=q.images)||void 0===F?void 0:F.map((t=>({src:t.includes("https")?t:"https:"+t}))),spacing:10,defaultHeight:M+"px",defaultWidth:D+"px",retainAlreadyRenderedElements:!0,isScroll:!0})})})}),(0,x.jsx)(Ht,{data:q,product:Z,PRODUCT_TILE_HEIGHT:R,PRODUCT_TILE_WIDTH:z,FONT_SIZE:A,getVariantPrice:Yt,selectedVariantId:et,itemPrice:at,itemQuantity:it,setItemQuantity:ot,thumbnailImage:mt}),(null===q||void 0===q||null===(T=q.variants)||void 0===T?void 0:T.length)>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s.M5,{paddingTop:"4px",width:"100%",children:(0,x.jsx)(s.iz,{color:(0,c.W8U)(wt),size:"xs",width:"90%"})}),(0,x.jsx)(Vt,{data:q,dividerColor:(0,c.W8U)(wt),setSelectedColor:kt,finalArr:Et,finalArrExternal:Pt,product:Z,PRODUCT_TILE_HEIGHT:R,PRODUCT_TILE_WIDTH:z,FONT_SIZE:A,selectOptionFirstHandler:jt,selectOptionSecondHandler:yt,selectOptionThirdHandler:Ct,getVariantPrice:Yt,selectedOptionFirst:X,selectedOptionSecond:$,selectedOptionThird:Q,selectedVariantId:et})]}),c.$2G&&((null===q||void 0===q?void 0:q.description)||(null===q||void 0===q?void 0:q.body_html))&&(0,x.jsx)(Wt,{PRODUCT_TILE_HEIGHT:R,FONT_SIZE:A,data:q,handleToggle:()=>N(!W),show:W}),(0,x.jsx)(s.xu,{sx:{pointerEvents:"none"},paddingTop:"20px",opacity:0,children:(0,x.jsx)(Kt,{position:"relative",data:q,FONT_SIZE:A,product:Z})}),(0,x.jsx)(Kt,{position:"fixed",selectedVariantId:et,data:q,FONT_SIZE:A,PRODUCT_TILE_WIDTH:z,product:Z,itemQuantity:it,cartItemCount:st,addToCartFlag:ut,setAddToCartFlag:ht,soldOutFlag:vt,setSoldOutFlag:xt,event:H})]})}const Bt=(t,e,n,i)=>{var o,r,l,a,d,s,c,u,h,p;if(void 0===e&&void 0===n&&void 0===i)return null===t||void 0===t||null===(o=t.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.id;if(void 0===i&&void 0===n)return null===(l=t.variants.find((t=>t.option1===e)))||void 0===l?void 0:l.id;if(void 0===i&&void 0===e)return null===(a=t.variants.find((t=>t.option2===n)))||void 0===a?void 0:a.id;if(void 0===n&&void 0===e)return null===(d=t.variants.find((t=>t.option3===i)))||void 0===d?void 0:d.id;if(void 0===n)return null===(s=t.variants.find((t=>t.option1===e&&t.option3===i)))||void 0===s?void 0:s.id;if(void 0===i)return null===(c=t.variants.find((t=>t.option1===e&&t.option2===n)))||void 0===c?void 0:c.id;if(void 0===e)return null===(u=t.variants.find((t=>t.option2===n&&t.option3===i)))||void 0===u?void 0:u.id;const v=null===t||void 0===t?void 0:t.variants.find((t=>t.option1===e&&t.option2===n&&t.option3===i));return void 0===v?null===t||void 0===t||null===(h=t.variants)||void 0===h||null===(p=h[0])||void 0===p?void 0:p.id:v.id},Yt=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id===e)))||void 0===i?void 0:i.price},Xt=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id.toString()===e)))||void 0===i?void 0:i.option1},Gt=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id.toString()===e)))||void 0===i?void 0:i.option2},$t=(t,e)=>{var n,i;return null===t||void 0===t||null===(n=t.variants)||void 0===n||null===(i=n.find((t=>t.id.toString()===e)))||void 0===i?void 0:i.option3},Jt=(t,e)=>{var n;const i=null===t||void 0===t||null===(n=t.variants)||void 0===n?void 0:n.find((t=>t.id==e));return void 0===i?null:null===i||void 0===i||null===(o=i.featured_image)||void 0===o?void 0:o.src;var o},Qt=(0,r.createContext)({setShowOptionsChart:null});var te=function(t){const e=t.event,n=t.data,i=t.currentProduct,o=t.setOpenShopNow,l=t.setLockSwiper,[a,d]=(0,r.useState)(!1);return(0,x.jsx)(Qt.Provider,{value:{setShowOptionsChart:d},children:(0,x.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[(0,x.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",children:(0,x.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,x.jsx)(Ut,{data:n,event:e,product:i,setOpenShopNow:o,setLockSwiper:l})})}),a?(0,x.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",style:{position:"relative",zIndex:1,bottom:"100%"},className:"whatmore-ios-css-relative-fix",id:"whatmore-size-chart",children:(0,x.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,x.jsx)(Lt,{data:n,event:e,product:i,setShowOptionsChart:()=>{d(!1)}})})}):(0,x.jsx)(x.Fragment,{})]})})};var ee=function(t){var e,[n,i,o,l]=(0,h.Z)();const[a,d]=(0,r.useState)(!1),[v,g]=(0,r.useState)(),[f,w]=(0,r.useState)(),j=(0,u.MO)("whatmoreShopId"),y=t.event,C=t.onBack,S=r.useRef(),b=t.isPlaying,I=t.isLast,k=t.setLockSwiper,_=t.selectedVariantId,F=null===(e=t.showOverlay)||void 0===e||e,T="center";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:l,height:o,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:T,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:l/o,children:(0,x.jsx)(m,{height:"100%",width:"100%",url:y.event_hls_url,isPlaying:b,event:y})})})}),F?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:T,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(Ot,{focusRef:S,event:t.event,isLast:I,onCloseCallback:C,productClickHandler:async t=>{const e=await(0,p.p)(t,(0,c.Ipo)(j),j);w(t),g(e),d(!0),k(!0)}})})}):(0,x.jsx)(x.Fragment,{}),!0===a?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:T,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(te,{focusRef:S,event:t.event,isLast:I,onCloseCallback:()=>C(),setLockSwiper:k,data:v,currentProduct:f,setOpenShopNow:d,selectedVariantId:_})})}):(0,x.jsx)("div",{})]})})};const ne=function(t,e){return isNaN(t)||isNaN(e)||e<=0||t>e?0:Math.ceil(t/e*100)};function ie(t){var e,n,[i,o,r,l]=(0,h.Z)();const[a]=(0,u.j1)("whatmoreSecondaryColor"),[d]=(0,u.j1)("whatmoreSecondaryColorShade900"),c=t.progress,p=null!==(e=t.totalSiblings)&&void 0!==e?e:1,v=null!==(n=t.indexAmongSiblings)&&void 0!==n?n:0;return(0,x.jsx)(s.Kq,{width:"96%",height:"fit-content",direction:"row",justifyContent:"center",alignItems:"center",spacing:"1px",children:[...Array(p).keys()].map((t=>(0,x.jsx)(s.Kq,{width:"100%",height:.004*r+"px",backgroundColor:t<v?a:d+"99",borderRightRadius:"lg",borderLeftRadius:"lg",direction:"row",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",sx:{display:"block !important"},children:t==v?(0,x.jsx)(s.xu,{height:"100%",width:c+"%",bgColor:a,borderRightRadius:"lg",borderLeftRadius:"lg",sx:{display:"block !important"}}):(0,x.jsx)(x.Fragment,{})},"event-progress-bar-slab-"+t)))})}var oe=n(868),re=n(2630);const le=t=>t>=1e3?(t/1e3).toFixed(1)+"k":t;var ae=n(4862);var de=function(t){var e,n,i,o=t.whatmoreShareTemplateId;const l=t.whatmoreShareStoryId,a=t.whatmoreShareEventId,p=t.event,v=null===(e=t.showShareText)||void 0===e||e,m=null!==(n=t.shareButtonBottomMargin)&&void 0!==n?n:0,g=(0,u.MO)("whatmoreShopId"),f=(0,u.MO)("isInDesignMode"),w=(0,u.MO)("isDemoBrand"),j=(0,u.MO)("whatmorePrimaryFont"),{whatmoreWidgetSourceDetails:y}=(0,r.useContext)(V.I),[C,S,b,I]=(0,h.Z)(),k=null!==(i=t.iconSize)&&void 0!==i?i:.1*I;function _(){const e=(0,u.MO)("whatmoreLandingLocationType");var n;!function(t){f||w||(async()=>{(0,d.x0)(t)})()}(p),(e.startsWith("product")||"embed"===e)&&(o="te"),n="event_product_link"===(0,c.EEC)(g)?p.products[0].product_link||"":window.location.pathname,n=("event_product_link"===(0,c.EEC)(g)?"":window.location.hostname)+n+"?wtt="+o+"&wsid="+l+"&weid="+a,(0,c.lj5)(g)&&(n=n+"&"+(0,c.awP)(g)+"&utm_campaign=video-share&utm_medium="+e);const i={title:(0,c.JNF)(g),text:`${(0,c.Qa8)(g)} \n ${n} ${(0,c.AWG)(g)?"\n \n -via Whatmore":""}`};navigator.share&&!ae.nI?navigator.share(i):(t.setIsModalOpen(!0),t.setShareText([i,n]))}return(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{cursor:"pointer",style:{marginBottom:m+"px"},children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[(0,x.jsx)(re.Z,{sx:{boxShadow:3,transform:"scaleX(-1)",color:"white",fontSize:k,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),_(),(0,q.GF)({userInteractionType:H.K.VIDEO_SHARE_CTA_CLICKED,widgetSourceDetails:y,event:p,productList:p.products,ctaList:p.cta})}}),v&&(0,c.u8S)(g)?(0,x.jsxs)(s.xv,{fontSize:.3*k+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:j+" !important",color:"white !important",paddingRight:"10%"},children:["\xa0",p.total_share>(0,c.LWl)(g)?le(p.total_share):"Share","\xa0"]}):(0,x.jsx)(x.Fragment,{})]})})})},se=n(7933),ce=n(2785);var ue=function(t){var e;const n=(0,u.MO)("whatmoreShopId"),i=(0,u.MO)("whatmorePrimaryFont"),o=(0,u.MO)("whatmoreLikedEvents"),l=((0,u.MO)("whatmoreSecondaryColor"),(0,u.MO)("isInDesignMode")),a=(0,u.MO)("isDemoBrand"),{whatmoreWidgetSourceDetails:p}=(0,r.useContext)(V.I),v=t.event,[m,g]=(0,r.useState)(null!==(e=o[v.event_id])&&void 0!==e&&e),[f,w,j,y]=(0,h.Z)(),C=.1*y;function S(t,e){l||a||(async()=>{(0,d.Z6)(t,e)})()}function b(){(0,u.bU)("whatmoreLikedEvents",{...o,[v.event_id]:!m}),m?(S(v,-1),(0,q.GF)({userInteractionType:H.K.VIDEO_UNLIKED,widgetSourceDetails:p,event:v,productList:v.products,ctaList:v.cta})):(S(v,1),(0,q.GF)({userInteractionType:H.K.VIDEO_LIKED,widgetSourceDetails:p,event:v,productList:v.products,ctaList:v.cta})),g(!m)}const I=v.total_like+(m?1:0);return(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{cursor:"pointer",children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[m?(0,x.jsx)(ce.Z,{sx:{boxShadow:3,color:(0,c.dmX)(n),fontSize:C,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),b()}}):(0,x.jsx)(se.Z,{sx:{boxShadow:3,color:"white",fontSize:C,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),b()}}),(0,x.jsx)(x.Fragment,{children:(0,c.CEM)(n)?(0,x.jsxs)(s.xv,{fontSize:.3*C+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:i+" !important",color:"white !important",position:"relative",bottom:"5px"},children:["\xa0",I>=(0,c.zKg)(n)?le(I):"Like","\xa0"]}):(0,x.jsx)(x.Fragment,{})})]})})})};const he=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#25D366",borderRadius:"50%",padding:.3*e},children:(0,x.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,x.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 pe=n(8866);const ve=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,x.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,x.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"})})})},xe=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,x.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,x.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 me=t=>{const e=t.shareText,[n,i]=(0,r.useState)("Copy link"),[o,l]=(0,r.useState)("");return(0,x.jsx)(x.Fragment,{children:t.isModalOpen&&(0,x.jsxs)("div",{className:"modal-overlay",style:{backgroundColor:"white",borderRadius:"10px",padding:"12px 12px 20px 12px"},children:[(0,x.jsxs)("div",{style:{cursor:"pointer",display:"flex",justifyContent:"space-between",paddingBottom:"6px"},children:[(0,x.jsx)("img",{onClick:()=>{window.location.href="https://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,x.jsx)(P.Z,{onClick:e=>{e.stopPropagation(),t.setIsModalOpen(!1)}})]}),(0,x.jsx)("div",{}),(0,x.jsx)(s.iz,{color:"blackAlpha.500",size:"1px",width:"100%"}),(0,x.jsxs)("div",{className:"social-icons",style:{display:"flex",gap:"20px",justifyContent:"center",paddingTop:"12px"},children:[(0,x.jsxs)("div",{onClick:t=>{var n;t.stopPropagation();const i=encodeURIComponent(null===(n=e[0])||void 0===n?void 0:n.text);window.open(`https://wa.me/?text=${i}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(he,{iconSize:Math.min(t.iconSize,30)}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"Whatsapp"})]}),(0,x.jsxs)("div",{onClick:t=>{var n;t.stopPropagation();const i=encodeURIComponent(null===(n=e[0])||void 0===n?void 0:n.text);window.open(`https://twitter.com/intent/tweet?text=${i}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(ve,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"X"})]}),(0,x.jsxs)("div",{onClick:t=>{t.stopPropagation(),navigator.clipboard.writeText(e[1]),i("Link copied"),l("green")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(xe,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14),color:o},children:n})]})]})]})})};var ge=function(t){var e;const n=(0,u.MO)("whatmorePrimaryFont"),i=(0,u.MO)("whatmoreShopId"),o=null!==(e=t.fontSize)&&void 0!==e?e:"8";return(0,x.jsx)(s.rU,{href:"https://www.whatmore.ai/shoppable-videos",isExternal:!0,children:(0,c.XFt)(i)&&(0,x.jsxs)(s.Kq,{direction:"row",justifyContent:"flex-start",alignItems:"center",width:"fit-content",spacing:"2px",paddingLeft:"2px",paddingRight:"2px",children:[(0,x.jsx)("p",{style:{textAlign:"center",color:"white",fontFamily:n,fontWeight:"normal",fontSize:1.1*o+"px"},children:"powered by Whatmore"}),(0,x.jsx)(s.xu,{width:"10px"}),(0,x.jsx)("img",{src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",width:1.7*o,backgroundColor:"transparent",borderRadius:"0px"}})]})})};function fe(t){var e;const n=t.event,[i,o,l,a]=(0,h.Z)(),[d]=(0,u.j1)("whatmorePrimaryFont"),{whatmoreIsStoriesTemplate:p}=(0,r.useContext)(V.I),[v]=(0,u.j1)("whatmoreSecondaryColor"),[m]=(0,u.j1)("whatmoreShopId"),g=(0,c.f63)(m),f=null!==(e=(0,c.u2W)(m))&&void 0!==e?e:[v,g,v,g,v],w=(0,r.useRef)(null);return(0,r.useEffect)((()=>{w.current&&w.current.play()}),[]),(0,x.jsx)(x.Fragment,{children:p?(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",padding:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-start",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{overflow:"hidden",size:.14*a+"px",sx:{boxShadow:"0px 2px 1px 0px "+f[0]+"50, 0px -2px 1px 0px "+f[1]+"50, 2px 0px 1px 0px "+f[2]+"50, -2px 0px 1px 0px "+f[3]+"80, 2px -2px 1px 0px "+f[4]+"80, -2px 2px 1px 0px "+f[0]+"DA, 2px 2px 1px 0px "+f[1]+"DA, -2px -2px 1px 0px "+f[2]+"DA"},children:"video"==(0,pt.$)((0,oe.V)(n.storyset_thumbnail_image))?(0,x.jsx)("video",{className:"whatmore-story-thumbnail",ref:w,preload:"metadata",loop:!0,playsInline:!0,src:(0,oe.V)(n.storyset_thumbnail_image),muted:!0,alt:"story image"}):(0,x.jsx)("img",{src:(0,oe.V)(n.storyset_thumbnail_image),style:{objectFit:"cover",height:"100%",width:"100%",backgroundColor:"white"}})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:.05*a+"px",fontWeight:"medium",lineHeight:"100%",sx:{fontFamily:d+" !important",color:"white !important",textShadow:"0px 0px 4px black !important;"},children:n.storyset_name})})]})}):(0,x.jsx)(x.Fragment,{})})}var we=function(t){const[e,n,i]=(0,pe.Z)(),[o]=(0,u.j1)("isInDesignMode"),[l]=(0,u.j1)("isDemoBrand"),[a,p]=(0,u.j1)("isProductSwiperCatalogOpen"),[v,m]=(0,u.j1)("isFirstIndicatorRenderDone"),[g]=(0,u.j1)("whatmoreShopId"),f=(0,r.useContext)(ln),{whatmoreEventsBrowsingTemplate:w}=(0,r.useContext)(V.I),[j,C,S,b]=(0,h.Z)(),I=(0,u.MO)("whatmorePrimaryFont"),k=t.event,_=t.storySetId,F=t.isLast,E=t.onCloseCallback,P=t.focusRef,L=t.productClickHandler,z=t.videoPlayingData,R=t.totalSiblingEvents,M=t.indexAmongSiblings,K=t.leftOpenSpaceClickHandler,A=t.midOpenSpaceClickHandler,W=t.rightOpenSpaceClickHandler,{whatmoreWidgetSourceDetails:N}=(0,r.useContext)(V.I),Z=.1*b,[U,B]=(0,r.useState)(!1),[Y,X]=(0,r.useState)([]),G=t=>{$.current&&!$.current.contains(t.target)&&B(!1)},$=(0,r.useRef)(null);(0,r.useEffect)((()=>(U?document.addEventListener("click",G):document.removeEventListener("click",G),()=>{document.removeEventListener("click",G)})),[U]);const J="Free"==(0,c.Svj)(g)&&"portrait"==e;return(0,x.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[U&&(0,x.jsx)("div",{ref:$,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,x.jsx)(me,{shareText:Y,setShareText:X,iconSize:Z,isModalOpen:U,setIsModalOpen:B})}),(0,x.jsxs)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,x.jsxs)(s.Kq,{width:"full",height:"fit-content",direction:"column",justifyContent:"flex-start",alignItems:"center",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:[f.showVideoPlayingData?(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",marginTop:"5px",justifyContent:"center",children:(0,x.jsx)(ie,{progress:ne(z.current_time,z.video_duration),totalSiblings:R,indexAmongSiblings:M})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{width:"full",margin:"2px",marginTop:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",paddingRight:"10px",paddingLeft:"10px",children:[(0,x.jsx)(fe,{event:k}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,mt.ZK)(w)?(0,x.jsx)(de,{whatmoreShareTemplateId:(0,mt.QN)(w),whatmoreShareStoryId:_,whatmoreShareEventId:k.event_id,event:k,showShareText:!1,iconSize:.07*b,shareButtonBottomMargin:6,setIsModalOpen:B,setShareText:X}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(y,{focusRef:P}),("landscape"!==e||t.showCloseOverlay)&&(0,x.jsx)(O,{event:k,onCloseCallback:E})]})]})})]}),(0,x.jsxs)(s.Kq,{width:"100%",height:"100%",direction:"row",justifyContent:"center",children:[(0,x.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{K()},sx:{display:"block !important"}}),(0,x.jsx)(s.xu,{width:"34%",height:"100%",onClick:()=>{A()},sx:{display:"block !important"}}),(0,x.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{W()},sx:{display:"block !important"}})]}),(0,x.jsxs)(s.xu,{width:"full",height:"fit-content",children:[f.totalEvents>1&&!v&&f.showSwipeIndicator?(0,x.jsx)(s.xu,{width:"full",margin:"2px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,x.jsx)(D,{swipeUp:!F})})}):null,(0,x.jsxs)(s.xu,{width:"fit-content",height:"fit-content",position:"absolute",right:0,bottom:"25%",children:[(0,c.slY)(g)&&!(0,mt.ZK)(w)?(0,x.jsx)(s.xu,{ml:"auto",width:"fit-content",paddingY:"12px",paddingX:"8px",children:(0,x.jsxs)(s.Kq,{gap:"4px",direction:"column",alignItems:"center",cursor:"pointer",onClick:function(){var t;o||l||(async()=>{(0,d.lY)(k,1)})(),(0,q.GF)({userInteractionType:H.K.WHATSAPP_ICON_CLICKED,widgetSourceDetails:N,event:k,productList:null===k||void 0===k?void 0:k.products,ctaList:null===k||void 0===k?void 0:k.cta});const e=k.products.map((t=>`${t.product_link} \n`)),n=(0,c.gtK)(g),i=`Hey, I am interested in ${k.products.length>1?"these products":"this product"} I saw on ${null===(t=k.products[0])||void 0===t?void 0:t.brand} store: \n${e}. Could you please help me with some queries?`;window.open(n+`&text=${i}&type=phone_number`,"_blank")},children:[(0,x.jsx)(he,{iconSize:.7*Z,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)(s.xv,{fontSize:Z*(0,c.Xod)(g)+"px",fontWeight:"bold",align:"center",style:{marginTop:0},sx:{fontFamily:I+" !important",color:"white !important"},children:(0,c.UiZ)(g)})]})}):(0,x.jsx)(x.Fragment,{}),(0,c.jY3)(g)?(0,x.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(ue,{event:k})})}):(0,x.jsx)(x.Fragment,{}),(0,c.ROU)(g)&&!(0,mt.ZK)(w)?(0,x.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(de,{whatmoreShareTemplateId:(0,mt.QN)(w),whatmoreShareStoryId:_,whatmoreShareEventId:k.event_id,event:k,setIsModalOpen:B,setShareText:X})})}):(0,x.jsx)(x.Fragment,{})]}),(0,_t.kT)(k)?(0,x.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(g)?(0,x.jsx)(s.xu,{w:"100%",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(T,{event:k,onToggle:t=>{p("minimize-button"!==t)}})})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{display:"flex",width:"100%",height:"fit-content",children:(0,x.jsx)(Et,{event:k,productClickHandler:L})})]}):(0,x.jsx)(x.Fragment,{})]}),J&&(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",bg:"gray",py:"3px",justifyContent:"center",children:(0,x.jsx)(ge,{fontSize:.033*b})})]})]})},je=n(2279),ye=n.n(je),Ce=n(342);var Se=function(t){var e,n,i,o,l,a,[d,m,g,f]=(0,h.Z)();const[w,j]=(0,r.useState)(!1),[y,C]=(0,r.useState)(),[S,b]=(0,r.useState)(),[I,k]=(0,r.useState)({current_time:0,video_duration:0,is_video_ended:!1}),_=(0,u.MO)("whatmoreShopId"),F=t.event,T=t.storyId,E=t.onBack,P=r.useRef(),O=t.isPlaying,L=t.isLast,z=t.setLockSwiper,R=t.onVideoEndedCallback,M=t.progressUpdateCallback,D=null!==(e=t.totalSiblingEvents)&&void 0!==e?e:0,K=null!==(n=t.indexAmongSiblings)&&void 0!==n?n:0,A=null===(i=t.showOverlay)||void 0===i||i,W=null!==(o=t.leftOpenSpaceClickHandler)&&void 0!==o?o:()=>{},N=null!==(l=t.midOpenSpaceClickHandler)&&void 0!==l?l:()=>{},Z=null!==(a=t.rightOpenSpaceClickHandler)&&void 0!==a?a:()=>{},{whatmoreWidgetSourceDetails:U}=(0,r.useContext)(V.I),B="center";let Y;try{Y=ye()((()=>{R()}),1e3,{leading:!0,trailing:!1})}catch(X){console.log(X)}return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:f,height:g,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:B,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:f/g,children:(0,x.jsx)(v.Z,{height:"100%",width:"100%",url:(0,oe.V)((0,Ce.uv)(F)),isPlaying:O,timeUpdateCallback:function(t,e){const n=ne(t,e);M(n);const i=I.is_video_ended;n>=99&&O&&!i?(Y(),k({current_time:t,video_duration:e,is_video_ended:!0})):k({current_time:t,video_duration:e,is_video_ended:i})},event:F,source:t.source})})})}),A?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:B,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(we,{focusRef:P,event:t.event,isLast:L,onCloseCallback:t=>{E(t),(0,q.Z2)({userInteractionType:H.K.VIDEO_PLAYBACK,userInteractionMetadata:{watch_time:I.current_time},widgetSourceDetails:U,event:F,productList:F.products,ctaList:F.cta})},productClickHandler:async t=>{const e=await(0,p.p)(t,(0,c.Ipo)(_),_);b(t),C(e),j(!0),z(!0),(0,q.GF)({userInteractionType:H.K.SHOPNOW_CLICKED,widgetSourceDetails:U,event:F,productList:F.products,ctaList:F.cta}),(0,u.bU)("whatmoreAllowAutoSlide",!1)},videoPlayingData:I,totalSiblingEvents:D,indexAmongSiblings:K,leftOpenSpaceClickHandler:W,midOpenSpaceClickHandler:N,rightOpenSpaceClickHandler:Z,storySetId:T,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay})})}):(0,x.jsx)(x.Fragment,{}),!0===w?(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:B,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(te,{focusRef:P,event:t.event,isLast:L,onCloseCallback:()=>E(),setLockSwiper:z,data:y,currentProduct:S,setOpenShopNow:t=>{j(t),(0,u.bU)("whatmoreAllowAutoSlide",!t)}})})}):(0,x.jsx)("div",{})]})})},be=n(7300),Ie=n(8984),ke=n(58),_e=n(9723);var Fe=function(t){var[e,n,i,o]=(0,h.Z)();const r=(0,u.MO)("whatmoreShopId"),l=t.event,a=t.isPlaying,d="center";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:o,height:i,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:d,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.oM,{width:"full",ratio:o/i,children:(0,x.jsx)(v.Z,{height:"100%",width:"100%",url:(0,oe.V)((0,Ce.uv)(l)),isPlaying:a,timeUpdateCallback:function(t,e){},event:l,source:t.source})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:d,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",backdropFilter:"auto",backdropBlur:"10px",onClick:t=>{(0,ke.QV)()},children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"full",width:"full",children:[(0,x.jsx)(_e.Z,{sx:{boxShadow:3,color:(0,c.Ya_)(r),fontSize:.4*o,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{(0,ke.QV)()}}),(0,x.jsx)(s.xv,{color:"white",fontSize:.05*o+"px",fontWeight:"bold",align:"left",children:"Please click to play video.."})]})})})]})})},Te=n(3433);var Ee=function(t){var e,n;const r=t.event,l=null===(e=t.isPlaying)||void 0===e||e,a=t.onBack,d=t.isLast,s=t.setLockSwiper,c=(t.heightFactor,t.widthFactor,t.onVideoEndedCallback),h=t.progressUpdateCallback,[p,v]=(0,j.Z)(),[m]=(0,u.j1)("whatmoreVideoPlayerPoolBlessed"),g=null===(n=t.showOverlay)||void 0===n||n;function f(){v(!p)}if((0,Ie.KE)()&&0==m)return(0,x.jsx)(Fe,{event:r,onBack:a,isPlaying:l,isLast:d,setLockSwiper:s,onVideoEndedCallback:c,progressUpdateCallback:h,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{f()},midOpenSpaceClickHandler:()=>{f()},rightOpenSpaceClickHandler:()=>{f()},showOverlay:g,source:Te.j.CAROUSEL_EVENT_OPENED},"shopping-video-view"+r.event_id);if((0,be.B6)(r)||(0,be.WJ)(r))return(0,x.jsx)(Se,{event:r,onBack:a,isPlaying:l,isLast:d,setLockSwiper:s,onVideoEndedCallback:c,progressUpdateCallback:h,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{f()},midOpenSpaceClickHandler:()=>{f()},rightOpenSpaceClickHandler:()=>{f()},showOverlay:g,source:Te.j.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+r.event_id);if((0,be.yC)(r)){var{status:w,bannerText:y,timeToStartInMins:C}=i.Z.getEventStatus(r);if(w.name===o.Z.LIVE.name)return(0,x.jsx)(ee,{event:r,onBack:a,isPlaying:l,isLast:d,showOverlay:g},"shopping-live-view"+r.event_id)}return console.error("Can't render event which is neither video or a currently-live-event"),(0,x.jsx)("div",{})},Pe=n(9284),Oe=n.n(Pe),Le=n(7463),ze=n(2154);function Re(t){var e;const[n,i]=(0,r.useState)(!1),o=t.onClick,l=null!==(e=t.fontSize)&&void 0!==e?e:50;return(0,x.jsx)("div",{style:{height:"fit-content",width:"fit-content",backgroundColor:"black",opacity:.4,borderRadius:"50%"},className:[n?"whatmore-scale-on-tap":""].join(" "),children:"left"===t.type?(0,x.jsx)(ze.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{i(!0),setTimeout((()=>{i(!1)}),500),o(t,"up")}}):(0,x.jsx)(Le.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{i(!0),setTimeout((()=>{i(!1)}),500),o(t,"down")}})})}var Me=function(t){var e,n,i;const o=null!==(e=t.relativeBottomPercentage)&&void 0!==e?e:"30%",r=null!==(n=t.width)&&void 0!==n?n:"100%",l=null!==(i=t.fontSize)&&void 0!==i?i:50,a=t.handleClick;return(0,x.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,x.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,x.jsx)(Re,{type:"left",onClick:a,fontSize:l}),(0,x.jsx)(Re,{type:"right",onClick:a,fontSize:l})]})})},De=n(2860),Ke=n(4669);var Ae=function(t,e){function n(t,e){return 1==e?0:t<0?e+t:t>=e?t-e:t}const i=(0,r.useRef)({prevIndex:n(t-1,e),activeIndex:t,nextIndex:n(t+1,e)});return[function(){return i.current},function(t){i.current="right"==t?{prevIndex:n(i.current.activeIndex,e),activeIndex:n(i.current.activeIndex+1,e),nextIndex:n(i.current.activeIndex+2,e)}:{prevIndex:n(i.current.activeIndex-2,e),activeIndex:n(i.current.activeIndex-1,e),nextIndex:n(i.current.activeIndex,e)}},function(t){return n(i.current.activeIndex+t)}]};var We=function(t,e){const n=(0,r.useRef)({clientX:0,clientY:0});return[function(t){n.current.clientX=t.changedTouches[0].clientX,n.current.clientY=t.changedTouches[0].clientY},function(i){const o=n.current.clientX,r=n.current.clientY;var l=o-i.changedTouches[0].clientX,a=r-i.changedTouches[0].clientY;return"vertical"==t&&Math.abs(a)>e||"horizontal"==t&&Math.abs(l)>e?"vertical"==t?a>0?"right":"left":l>0?"right":"left":null}]};var Ne=function(t,e){const n=(0,r.useRef)(ye()(((t,e)=>{t(e)}),300,{leading:!0,trailing:!1}));return[function(i,o){var r=0;if(r="vertical"==t?i.deltaY:i.deltaX,Math.abs(r)<=e)return;const l=r>0?"right":"left";n.current(o,l)}]},qe=n(5173);var He=function(t){const e=t.events,n=t.eventIndex,i=t.onBack;var[o,p,v,m]=(0,h.Z)();const[g]=(0,u.j1)("isInDesignMode"),[f]=(0,u.j1)("isDemoBrand"),[w,j]=(0,r.useState)(!0),[y,C]=(0,u.j1)("isFirstIndicatorRenderDone"),[S,b]=(0,r.useState)(!1),{setCloseClickComponent:I}=(0,r.useContext)(ln),{slideDirection:k}=(0,r.useContext)(ln),[_]=(0,u.j1)("whatmoreShopId"),[F]=(0,u.j1)("whatmoreLandingLocationType"),[T,E]=Ae(n,e.length),[P,O]=We(k,50),[L]=Ne("vertical",30),[z,R]=(0,r.useState)(!1),[M,D]=(0,r.useState)(null),{whatmoreWidgetSourceDetails:K,whatmoreUserInfo:A}=(0,r.useContext)(V.I);function N(){R(!1)}function Z(t){N(),setTimeout((()=>{i(t)}),500)}(0,r.useEffect)((()=>(R(!0),()=>{})),[]);const U=K.landingLocationType,B=K.templateType;function Y(){(0,u.MO)("whatmoreAllowAutoSlide")&&(E("right"),M.slideNext())}function X(t,e){E(e),function(t,e){M&&("left"===e?M.slidePrev():M.slideNext())}(0,e)}I(Z);const G=Math.round(.05*v);return(0,x.jsx)(Oe(),{isOpen:z,onAfterOpen:function(){},onRequestClose:N,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,x.jsx)(qe.Z,{children:(0,x.jsxs)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:(0,W.lA)("#000000",13)},onTouchStart:t=>{P(t)},onTouchEnd:t=>{if(S)return;const e=O(t);e&&X(0,e)},onWheel:t=>{S||L(t,(t=>{X(0,t)}))},children:[(0,x.jsx)(l.tq,{speed:400,threshold:G,slidesPerView:1,direction:k,modules:[a.tl,a.Gk],initialSlide:n,loop:1!=e.length,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,allowSlideNext:!S,allowSlidePrev:!S,allowTouchMove:!1,onSwiper:t=>{D(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:K,event:e[T().activeIndex],productList:e[T().activeIndex].products})},onSlideChange:t=>{var n;w?j(!1):(y||C(!0),n=e[T().activeIndex],g||f||(async()=>{const t=(0,mt.NY)(U)+(0,mt.dS)(B)+"_"+(null===n||void 0===n?void 0:n.event_id);(0,d.wh)(n),"index"===F?((0,Ke.Tc)(_,De.Xh,De.pR),(0,ot.H4)(n.event_id,n.products,De.Xh,De.pR,t,null===n||void 0===n?void 0:n.location,null===A||void 0===A?void 0:A.userType)):F.startsWith("product")||"embed"===F?((0,Ke.Tc)(_,De.h7,De.dU),(0,ot.H4)(n.event_id,n.products,De.h7,De.dU,t)):F.startsWith("collection")?((0,Ke.Tc)(_,De.U$,De.Pk),(0,ot.H4)(n.event_id,n.products,De.U$,De.Pk,t)):((0,Ke.Tc)(_,De.Xh,De.pR),(0,ot.H4)(n.event_id,n.products,De.Xh,De.pR,t))})(),(0,q.y4)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:K,event:e[T().activeIndex],productList:e[T().activeIndex].products}))},children:[...Array(Math.min(e.length,3)).keys()].map((n=>(0,x.jsx)(l.o5,{children:n=>{let{isActive:i,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=n;const d=i?"activeIndex":o?"prevIndex":"nextIndex";return(0,x.jsx)(s.Kq,{direction:"column",height:window.innerHeight,justifyContent:"center",children:(0,x.jsx)(Ee,{event:e[T()[d]],onBack:Z,isPlaying:1==e.length||i&&l,isLast:!1,setLockSwiper:b,onVideoEndedCallback:Y,progressUpdateCallback:t=>{},showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay})})}},"event-vertical-scroll-slide-"+n)))}),e.length>1&&!S&&(0,c.h6H)(_)&&"horizontal"===(0,c.e8z)(_)&&"horizontal"===k?(0,x.jsx)(Me,{relativeBottomPercentage:"50%",width:m,handleClick:(t,e)=>{X(0,"down"==e?"right":"left")},fontSize:parseInt(.12*m)}):(0,x.jsx)(x.Fragment,{})]})})})},Ve=n(1168);n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811);const Ze=t=>{let{children:e,customClass:n,show:i,closeCallback:o}=t;return Ve.createPortal((0,x.jsxs)("div",{className:`whatmore-landscape-modal whatmore-root ${n}`,style:{display:i?"block":"none"},children:[(0,x.jsx)("div",{className:"whatmore-landscape-modal-overlay",onClick:o}),(0,x.jsx)("div",{className:"whatmore-landscape-modal-content",children:e})]}),document.body)};Ze.defaultProps={children:(0,x.jsx)("div",{children:"Empty Modal"}),customClass:"",show:!1,closeCallback:()=>!1};var Ue=Ze;var Be=function(t){var[e,n,i,o]=(0,h.Z)();const[p]=(0,u.j1)("isInDesignMode"),[v]=(0,u.j1)("isDemoBrand"),[m,g]=(0,u.j1)("isFirstIndicatorRenderDone"),[f,w]=(0,r.useState)(0!=t.eventIndex),{setCloseClickComponent:j}=(0,r.useContext)(ln),[y,C]=(0,r.useState)(!1),[S]=(0,u.j1)("whatmoreShopId"),[b]=(0,u.j1)("whatmoreLandingLocationType"),{whatmoreUITheme:I}=(0,r.useContext)(V.I),{whatmoreWidgetSourceDetails:k,whatmoreUserInfo:_}=(0,r.useContext)(V.I),[F,T]=(0,r.useState)(!1),[E,P]=(0,r.useState)(null);function L(){T(!1)}const z=t.events,R=t.eventIndex,M=t.onBack,D=z.concat(z),K=z.length,A=(0,r.useRef)(0);function N(t){L(),setTimeout((()=>{M(t)}),500)}function Z(){E&&!E.isEnd&&(0,u.MO)("whatmoreAllowAutoSlide")&&E.slideNext()}(0,r.useEffect)((()=>(T(!0),()=>{})),[]),j(N);const U=k.landingLocationType,B=k.templateType,Y=parseInt(Math.min(5,z.length));return(0,x.jsx)(Ue,{show:F,closeCallback:L,customClass:"whatmore-landscape-modal-swipe-view",children:(0,x.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",aligntItems:"center",backgroundColor:(0,W.lA)("#000000",13),children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xu,{height:"fit-content",width:o*Y,children:(0,x.jsxs)(l.tq,{onInit:t=>{P(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:k,event:z[t.activeIndex],productList:z[t.activeIndex].products,ctaList:z[t.activeIndex].cta})},slidesPerView:Y,centeredSlides:!0,allowTouchMove:!1,initialSlide:R,modules:[a.lI,a.W_,a.Gk,a.pt,a.tl],navigation:Y>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*i),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:o*Y,watchSlidesProgress:!0,onSlideChange:t=>{var e;f?w(!1):(m||g(!0),e=z[t.activeIndex],p||v||(async()=>{const t=(0,mt.NY)(U)+(0,mt.dS)(B)+"_"+(null===e||void 0===e?void 0:e.event_id);(0,d.wh)(e),"index"===b?((0,Ke.Tc)(S,De.Xh,De.pR),(0,ot.H4)(e.event_id,e.products,De.Xh,De.pR,t,null===e||void 0===e?void 0:e.location,null===_||void 0===_?void 0:_.userType)):b.startsWith("product")||"embed"===b?((0,Ke.Tc)(S,De.h7,De.dU),(0,ot.H4)(e.event_id,e.products,De.h7,De.dU,t)):b.startsWith("collection")?((0,Ke.Tc)(S,De.U$,De.Pk),(0,ot.H4)(e.event_id,e.products,De.U$,De.Pk,t)):((0,Ke.Tc)(S,De.Xh,De.pR),(0,ot.H4)(e.event_id,e.products,De.Xh,De.pR,t))})(),(0,q.y4)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:k,event:z[t.activeIndex],productList:z[t.activeIndex].products,ctaList:z[t.activeIndex].cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[z.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(O,{onCloseCallback:M})}),D.slice(R,z.length+R).map(((t,e)=>(0,x.jsx)(l.o5,{children:t=>{let{isActive:n,isPrev:r,isNext:l,isVisible:a,isDuplicate:d}=t;if(n)return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:1*o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Ee,{event:z[e%K],onBack:N,isPlaying:!0,isLast:e%K===z.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:Z,progressUpdateCallback:t=>{},showCloseOverlay:(null===z||void 0===z?void 0:z.length)<=2})})});if(l)return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{E.slideTo(e%K,300)},children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Ee,{event:z[e%K],onBack:N,isPlaying:!1,isLast:e%K===z.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:Z,progressUpdateCallback:t=>{},showOverlay:!1})})});if(r&&1===A.current)return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{E.slideTo(e%K,300)},children:(0,x.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,x.jsx)(Ee,{event:z[e%K],onBack:N,isPlaying:!1,isLast:e%K===z.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:Z,progressUpdateCallback:t=>{},showOverlay:!1})})});try{R+e>=K-1&&(A.current=1)}catch(u){console.log(u)}return(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide"+t.event_id)))]})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(ge,{height:.04*i,width:.1*o,fontSize:.02*i})})]})})},Ye=n(6090),Xe=n(7616),Ge=n(9302),$e=n(2575);var Je=function(t){const[e,n,i,o]=(0,h.Z)(),[r]=(0,u.j1)("whatmorePrimaryColor"),[l]=(0,u.j1)("whatmoreSecondaryColor"),a="flex-end";return(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:o,height:i,backgroundColor:"whiteAlpha.200",backdropBlur:"10px",children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:a,height:"full",width:"full",children:(0,x.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",children:(0,x.jsx)(s.oM,{width:"full",ratio:o/i,children:(0,x.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+r+", gray, "+l+")"})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:a,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{padding:"2px",margin:"5px",borderRadius:"md",backgroundColor:"transparent",children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,x.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",backdropFilter:"auto",backdropBlur:"5px"})})})})]})})};var Qe=function(t){var e;const n=t.stories,i=t.onBack,o=t.onStoryCompleteCallback,a=t.isActive,c=null!==(e=t.initialEventIndex)&&void 0!==e?e:0,p=n.events;var[v,m,g,f]=(0,h.Z)();const[w,y]=(0,j.Z)(),[C]=(0,u.j1)("isInDesignMode"),[S]=(0,u.j1)("isDemoBrand"),[b]=(0,u.j1)("whatmoreShopId"),[I,k]=(0,r.useState)(!0),[_,F]=(0,u.j1)("isFirstIndicatorRenderDone"),[T,E]=(0,r.useState)(null),[P,O]=(0,r.useState)(!1),{whatmoreWidgetSourceDetails:L,whatmoreUserInfo:z}=(0,r.useContext)(V.I),[R,M]=Ae(c,p.length);function D(t){i(t)}const K=L.landingLocationType,A=L.templateType;function W(){if(!(0,u.MO)("whatmoreAllowAutoSlide"))return;R().activeIndex+1>=p.length?o("right"):(M("right"),T&&T.slideNext())}function N(t){const e=R().activeIndex;"right"==t&&e+1>=p.length||"left"==t&&e-1<0?o(t):(M(t),T&&("left"==t?T.slidePrev():T.slideNext()))}return p[R().activeIndex],(0,x.jsx)("div",{children:(0,x.jsx)(l.tq,{speed:1,slidesPerView:1,direction:"horizontal",initialSlide:0,loop:!0,height:g,width:f,watchSlidesProgress:!0,allowTouchMove:!1,onSwiper:t=>{E(t)},onSlideChange:t=>{I?k(!1):(_||F(!0),function(t){const e=(0,mt.NY)(K)+(0,mt.dS)(A)+"_"+(null===t||void 0===t?void 0:t.event_id);C||S||(async()=>{(0,d.wh)(t),(0,Ke.Tc)(b,De.Xh,De.OW),(0,ot.H4)(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)})()}(p[R().activeIndex]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:L,event:p[R().activeIndex],productList:p[R().activeIndex].products,ctaList:p[R().activeIndex].cta}))},children:[...Array(Math.min(p.length,3)).keys()].map((e=>(0,x.jsx)(l.o5,{children:e=>{let{isActive:i,isPrev:o,isNext:r,isVisible:l,isDuplicate:d}=e;if(a){const e=i?"activeIndex":o?"prevIndex":"nextIndex",r=p[R()[e]];return(0,x.jsx)(s.Kq,{direction:"column",height:g,justifyContent:"center",children:(0,be.B6)(r)||(0,be.WJ)(r)?(0,x.jsx)(Se,{event:r,totalSiblingEvents:p.length,indexAmongSiblings:R()[e],onBack:D,isPlaying:a&&i&&l,isLast:!1,setLockSwiper:O,onVideoEndedCallback:W,progressUpdateCallback:t=>{},leftOpenSpaceClickHandler:()=>{N("left")},midOpenSpaceClickHandler:()=>{y(!w)},rightOpenSpaceClickHandler:()=>{N("right")},storyId:n.id,source:Te.j.STORY_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+r.event_id):(0,x.jsx)(x.Fragment,{})})}return(0,x.jsx)(s.Kq,{direction:"column",height:v,justifyContent:"center",children:(0,x.jsx)(Je,{})})}},"event-story-view-slide-"+e)))})})};var tn=function(t){const e=t.onBack,n=t.eventsStories,i=t.initialStoryIndex;var[o,c,p,v]=(0,h.Z)();const[m]=(0,u.j1)("isInDesignMode"),[g]=(0,u.j1)("isDemoBrand"),[f,w]=(0,r.useState)(!0),[j,y]=(0,u.j1)("isFirstIndicatorRenderDone"),[C,S]=(0,r.useState)(!1),{setCloseClickComponent:b}=(0,r.useContext)(ln),{slideDirection:I}=(0,r.useContext)(ln),[k]=(0,u.j1)("whatmoreShopId"),[_,F]=Ae(i,n.length),[T,E]=We("horizontal",50),[P]=Ne("vertical",30),O=t.eventIndex,[L,z]=(0,r.useState)(!1),[R,M]=(0,r.useState)(null),{whatmoreWidgetSourceDetails:D,whatmoreUserInfo:K}=(0,r.useContext)(V.I);function A(){z(!1)}function W(t){A(),setTimeout((()=>{e(t)}),500)}(0,r.useEffect)((()=>(z(!0),()=>{})),[]),b(W);const N=D.landingLocationType,Z=D.templateType;function U(t){R&&(0,u.MO)("whatmoreAllowAutoSlide")&&(F(t),"right"==t?R.slideNext():R.slidePrev())}function B(t,e){U(e)}return(0,x.jsx)(Oe(),{isOpen:L,onAfterOpen:function(){},onRequestClose:A,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,x.jsx)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:"#00000088"},onTouchStart:t=>{T(t)},onTouchEnd:t=>{const e=E(t);e&&B(0,e)},onWheel:t=>{P(t,(t=>{B(0,t)}))},children:(0,x.jsx)(l.tq,{speed:1,slidesPerView:1,direction:"horizontal",modules:[a.SH,a.Gk],initialSlide:i,loop:n.length>1,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,onSwiper:t=>{var e,i;M(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:D,event:n[_().activeIndex].events[0],productList:null===(e=n[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=n[_().activeIndex].events[0])||void 0===i?void 0:i.cta})},onSlideChange:t=>{var e,i;f?w(!1):(!function(t){const e=(0,mt.NY)(N)+(0,mt.dS)(Z)+"_"+(null===t||void 0===t?void 0:t.event_id);m||g||(async()=>{(0,d.wh)(t),(0,Ke.Tc)(k,De.Xh,De.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===K||void 0===K?void 0:K.userType)})()}(n[_().activeIndex].events[0]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:D,event:n[_().activeIndex].events[0],productList:null===(e=n[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=n[_().activeIndex].events[0])||void 0===i?void 0:i.cta}))},allowTouchMove:!1,cubeEffect:{shadow:!0,slideShadows:!0,shadowOffset:20,shadowScale:.94},children:[...Array(Math.min(n.length,3)).keys()].map((t=>(0,x.jsx)(l.o5,{children:t=>{let{isActive:e,isPrev:r,isNext:l,isVisible:a,isDuplicate:d}=t;const c=e?"activeIndex":r?"prevIndex":"nextIndex";return(0,x.jsx)(s.Kq,{direction:"column",height:o,justifyContent:"center",children:(0,x.jsx)(Qe,{stories:n[_()[c]],onBack:W,isActive:e&&a,isNext:l,isPrev:r,onStoryCompleteCallback:U,nextStories:n[_().nextIndex],prevStories:n[_().prevIndex],initialEventIndex:i==_()[c]?O:0},"event-story-view-"+n[_()[c]].id)})}},"event-vertical-scroll-slide-"+t)))})})})},en=n(4892);var nn=function(t){var e,n,i,[o,l,a,d]=(0,h.Z)();const[c]=(0,u.j1)("whatmorePrimaryColor"),[p]=(0,u.j1)("whatmoreSecondaryColor"),v=t.event,m=(t.onBack,r.useRef(),null!==(e=t.showPausedVideo)&&void 0!==e&&e),f=null!==(n=t.heightFactor)&&void 0!==n?n:1,w="flex-end";return d*=null!==(i=t.widthFactor)&&void 0!==i?i:1,a*=f,(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xu,{width:d,height:a,children:[(0,x.jsx)(s.Kq,{direction:"column",justifyContent:w,height:"full",width:"full",children:(0,x.jsx)(s.xu,{children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:m?(0,be.B6)(v)||(0,be.WJ)(v)?(0,x.jsx)(en.Z,{height:"100%",width:"100%",url:v.thumbnail_image,isPlaying:!1,pauseFromPlayTimeInMs:1e3,event:v}):(0,x.jsx)(g.Ee,{width:"full",height:"full",src:v.thumbnail_image,objectFit:"cover",borderRadius:"lg"}):(0,x.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+c+", gray, "+p+")"})})})}),(0,x.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:w,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.xu,{children:(0,x.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,x.jsx)(s.xu,{width:"full",height:"full",backgroundColor:"blackAlpha.400"})})})})]})})};var on=function(t){var[e,n,i,o]=(0,h.Z)();const[c]=(0,u.j1)("isInDesignMode"),[p]=(0,u.j1)("isDemoBrand"),[v,m]=(0,u.j1)("isFirstIndicatorRenderDone"),[g,f]=(0,r.useState)(0!=t.eventIndex),{setCloseClickComponent:w}=(0,r.useContext)(ln),[j,y]=(0,r.useState)(!1),[C]=(0,u.j1)("whatmoreShopId"),{whatmoreWidgetSourceDetails:S,whatmoreUserInfo:b}=(0,r.useContext)(V.I),[I,k]=(0,r.useState)(!1),[_,F]=(0,r.useState)(null);function T(){k(!1)}t.events;const E=t.eventIndex,P=t.onBack,L=t.eventsStories,z=t.initialStoryIndex;function R(t){T(),setTimeout((()=>{P(t)}),500)}(0,r.useEffect)((()=>(k(!0),()=>{})),[]),w(R);const M=S.landingLocationType,D=S.templateType;function K(t){_&&!_.isEnd&&("right"==t?_.slideNext():_.slidePrev())}const A=parseInt(Math.min(5,L.length));return(0,x.jsx)(Ue,{show:I,closeCallback:T,customClass:"whatmore-landscape-modal-stories-view",children:(0,x.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",aligntItems:"center",backgroundColor:"blackAlpha.800",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xu,{height:"fit-content",width:o*A,children:(0,x.jsxs)(l.tq,{onInit:t=>{var e,n;F(t),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:S,event:L[t.activeIndex].events[0],productList:null===(e=L[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=L[t.activeIndex].events[0])||void 0===n?void 0:n.cta})},slidesPerView:A,centeredSlides:!0,allowTouchMove:!1,initialSlide:z,modules:[a.lI,a.W_,a.Gk],navigation:A>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*i),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:o*A,watchSlidesProgress:!0,onSlideChange:t=>{var e,n;g?f(!1):(v||m(!0),function(t){const e=(0,mt.NY)(M)+(0,mt.dS)(D)+"_"+(null===t||void 0===t?void 0:t.event_id);c||p||(async()=>{(0,d.wh)(t),(0,Ke.Tc)(C,De.Xh,De.OW),(0,ot.H4)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===b||void 0===b?void 0:b.userType)})()}(L[t.activeIndex].events[0]),(0,q.GF)({userInteractionType:H.K.EVENT_VIEW,widgetSourceDetails:S,event:L[t.activeIndex].events[0],productList:null===(e=L[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=L[t.activeIndex].events[0])||void 0===n?void 0:n.cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[L.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(O,{onCloseCallback:P})}),L.map(((t,e)=>(0,x.jsx)(l.o5,{children:n=>{let{isActive:r,isPrev:l,isNext:a,isVisible:d,isDuplicate:c}=n;if(r){const n=1;return(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o*n,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(Qe,{stories:t,onBack:R,isActive:r&&d,isNext:!1,isPrev:!1,onStoryCompleteCallback:K,initialEventIndex:z==e?E:0,showCloseOverlay:(null===L||void 0===L?void 0:L.length)<=2},"event-story-view-"+t.id)})})}return l||a?(0,x.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{_.slideTo(e,300)},children:(0,x.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(nn,{showPausedVideo:!0,event:L[e].events[0],onBack:R,isPlaying:!1,setLockSwiper:y})})}):(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide-"+e)))]})})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(ge,{height:.04*i,width:.1*o,fontSize:.02*i})})]})})};const rn=(0,$e.Z)({key:"whatmore-css-sv"}),ln=(0,r.createContext)({isIOS:!1,totalEvents:0,closeClickComponent:null,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:"vertical",showSwipeIndicator:!0});var an=function(t){var e,n;const[i,o,l]=(0,pe.Z)(),[a]=(0,u.j1)("whatmoreShopId"),{whatmoreRootId:d}=(0,r.useContext)(V.I),{whatmoreIsStoriesTemplate:s}=(0,r.useContext)(V.I);var h=t.events,p=t.index,v=t.onBack,m=t.eventsStories,g=t.initialStoryIndex,f=(0,c.cX2)(a),w=(h[p],"portrait"===i?null!==(e=t.slideDirection)&&void 0!==e?e:"vertical":null!==(n=t.slideDirection)&&void 0!==n?n:h.length>1?"horizontal":"vertical"),j="portrait"===i?!(0,c.h6H)(a)&&!s:(0,c.n89)(a);return h[p],(0,r.useLayoutEffect)((()=>{(0,c.TLG)(a)&&(window.location.href.includes(f)?history.replaceState(null,"","#"+f):history.pushState(null,"","#"+f),window.addEventListener("popstate",(()=>{window.location.href.includes(f)||v()})))}),[]),delete Xe.ZP.styles.global,s?(0,x.jsx)(Ge.C,{value:rn,children:(0,x.jsx)(Ye.x,{theme:Xe.ZP,cssVarsRoot:d,resetCSS:!1,children:(0,x.jsx)(ln.Provider,{value:{isIOS:(0,Ie.KE)(),totalEvents:h.length,closeClickComponent:v,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:w,showSwipeIndicator:j},children:"portrait"===i?(0,x.jsx)(tn,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p}):(0,c.Bbr)(a)?(0,x.jsx)(on,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p}):(0,x.jsx)(tn,{eventsStories:m,initialStoryIndex:g,onBack:v,eventIndex:p})})})}):(0,x.jsx)(Ge.C,{value:rn,children:(0,x.jsx)(Ye.x,{theme:Xe.ZP,cssVarsRoot:d,resetCSS:!1,children:(0,x.jsx)(ln.Provider,{value:{isIOS:(0,Ie.KE)(),totalEvents:h.length,closeClickComponent:v,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:w,showSwipeIndicator:j},children:"portrait"===i?(0,x.jsx)(He,{events:h,eventIndex:p,onBack:v}):(0,x.jsx)(Be,{events:h,eventIndex:p,onBack:v})})})})}},9316:function(t,e,n){n.d(e,{mT:function(){return o}});var i=n(686);const o=`\n ${i.F4`
77
77
  0% { transform: scale(1); }
78
78
  50%, { transform: scale(0.95); }
79
79
  100% { transform: scale(1); }