whatmore-react-assets 1.0.1418 → 1.0.1420
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -73,7 +73,7 @@
|
|
73
73
|
0% {
|
74
74
|
transform: translateY(100%);
|
75
75
|
}
|
76
|
-
`} 0.5s`,kt=null===V||void 0===V||null===(e=V.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,_t]=(0,n.useState)(-1!==kt?null===(i=V.options)||void 0===i||null===(o=i[kt])||void 0===o||null===(r=o.values)||void 0===r?void 0:r[0]:""),[zt,Et]=(0,n.useState)({});(0,n.useEffect)((()=>{-1!==kt&&"whatmore"!==(0,c.NCy)(jt)&&async function(){const t=await(0,lt._N)(H);Et(t)}()}),[]);let Tt=-1,Ft=-1!==kt&&null!==zt&&void 0!==zt&&zt.product&&(null===zt||void 0===zt||null===(l=zt.product)||void 0===l||null===(a=l.images)||void 0===a?void 0:a.length)>=(null===zt||void 0===zt||null===(d=zt.product)||void 0===d||null===(p=d.options)||void 0===p||null===(v=p[kt])||void 0===v||null===(m=v.values)||void 0===m?void 0:m.length)?null===zt||void 0===zt||null===(f=zt.product)||void 0===f||null===(w=f.images)||void 0===w?void 0:w.map((t=>{var e,i,n,o,r,l,a,d,s,c,u,h,p,v;const x=null===zt||void 0===zt||null===(e=zt.product)||void 0===e||null===(i=e.options)||void 0===i?void 0:i.findIndex((t=>"Color"==(null===t||void 0===t?void 0:t.name)||"Colour"==(null===t||void 0===t?void 0:t.name)||"COLOR"==(null===t||void 0===t?void 0:t.name)));return{color:(null===t||void 0===t?void 0:t.variant_ids.length)>0?null===zt||void 0===zt||null===(n=zt.product)||void 0===n||null===(o=n.options)||void 0===o||null===(r=o[x])||void 0===r||null===(l=r.values)||void 0===l?void 0:l[Math.min(++Tt,(null===zt||void 0===zt||null===(a=zt.product)||void 0===a||null===(d=a.options)||void 0===d||null===(s=d[kt])||void 0===s||null===(c=s.values)||void 0===c?void 0:c.length)-1)]:null===zt||void 0===zt||null===(u=zt.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}})):[],Nt=[];if("whatmore"==(0,c.NCy)(jt)&&(null===V||void 0===V||null===(j=V.images)||void 0===j?void 0:j.length)>0){var At;var Pt;if(-1!==(null===V||void 0===V||null===(At=V.options)||void 0===At?void 0:At.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"))}))))Nt=null===V||void 0===V||null===(Pt=V.images)||void 0===Pt?void 0:Pt.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc})))}return Tt+1<(null===zt||void 0===zt||null===(y=zt.product)||void 0===y||null===(b=y.options)||void 0===b||null===(S=b[kt])||void 0===S||null===(k=S.values)||void 0===k?void 0:k.length)&&(Ft=[]),(0,x.jsxs)(s.so,{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===wt||void 0===wt?void 0:wt.whatmoreUITheme)?"xl":null,animation:St,children:[(0,x.jsx)(Jt,{setOpenShopNow:Y,setLockSwiper:J,FONT_SIZE:R}),(0,x.jsx)(s.ov,{marginBottom:"10px",px:"20px",py:"5px",children:(0,x.jsx)(s.so,{bg:"whiteAlpha.900",width:"fit-content",height:"fit-content",borderRadius:"round"==(null===wt||void 0===wt?void 0:wt.whatmoreUITheme)?"lg":null,overflow:"hidden",sx:{borderWidth:(0,c.YcK)(jt),borderColor:(0,c.Fwt)(jt)},children:(0,x.jsx)(s.so,{width:"100%",children:(0,x.jsx)($t.c,{renderElement:t=>(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(s.az,{width:B+"px",height:D+"px",children:(0,x.jsx)(g._V,{width:B+"px",height:D+"px",borderRadius:"round"==(null===wt||void 0===wt?void 0:wt.whatmoreUITheme)?"lg":null,src:(0,pt.b)(t.eventData.src,"&width=400&height=400"),alt:H.handle,sx:{objectFit:(0,c.KZe)(jt)+" !important"},fallback:(0,x.jsx)(O.A,{width:B+"px",height:D+"px",borderRadius:"round"==(null===wt||void 0===wt?void 0:wt.whatmoreUITheme)?"10px":"0px"})})})}),dataList:Ft.length>0&&!Ft.includes(null)?null===(I=Ft)||void 0===I?void 0:I.filter((t=>(null===t||void 0===t?void 0:t.color)==It)):Nt.length>0?[null===(_=Nt)||void 0===_?void 0:_.find((t=>(null===t||void 0===t?void 0:t.color)==It))]:null===V||void 0===V||null===(z=V.images)||void 0===z?void 0:z.map((t=>({src:t.includes("https")?t:"https:"+t}))),spacing:10,defaultHeight:B+"px",defaultWidth:D+"px",retainAlreadyRenderedElements:!0,isScroll:!0})})})}),(0,x.jsx)(qt,{data:V,product:H,PRODUCT_TILE_HEIGHT:L,PRODUCT_TILE_WIDTH:P,FONT_SIZE:R,getVariantPrice:te,selectedVariantId:it,itemPrice:dt,itemQuantity:ot,setItemQuantity:at,thumbnailImage:gt}),(null===V||void 0===V||null===(E=V.variants)||void 0===E?void 0:E.length)>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s.ov,{paddingTop:"4px",width:"100%",children:(0,x.jsx)(s.cG,{color:(0,c.R6d)(jt),size:"xs",width:"90%"})}),(0,x.jsx)(Kt,{data:V,dividerColor:(0,c.R6d)(jt),setSelectedColor:_t,finalArr:Ft,finalArrExternal:Nt,product:H,PRODUCT_TILE_HEIGHT:L,PRODUCT_TILE_WIDTH:P,FONT_SIZE:R,selectOptionFirstHandler:yt,selectOptionSecondHandler:bt,selectOptionThirdHandler:Ct,getVariantPrice:te,selectedOptionFirst:K,selectedOptionSecond:G,selectedOptionThird:tt,selectedVariantId:it,isVariantAvailable:q})]}),c.wW8&&((null===V||void 0===V?void 0:V.description)||(null===V||void 0===V?void 0:V.body_html))&&(0,x.jsx)(Ut,{PRODUCT_TILE_HEIGHT:L,FONT_SIZE:R,data:V,handleToggle:()=>Q(!W),show:W}),(0,x.jsx)(s.az,{sx:{pointerEvents:"none"},paddingTop:"20px",opacity:0,children:(0,x.jsx)(Yt,{position:"relative",data:V,FONT_SIZE:R,product:H})}),(0,x.jsx)(Yt,{position:"fixed",selectedVariantId:it,data:V,FONT_SIZE:R,PRODUCT_TILE_WIDTH:P,product:H,itemQuantity:ot,cartItemCount:ct,addToCartFlag:ht,setAddToCartFlag:vt,soldOutFlag:xt,setSoldOutFlag:mt,event:M})]})}const Zt=(t,e,i,n)=>{var o;if(!e&&!i&&!n)return;const r=null===t||void 0===t||null===(o=t.variants)||void 0===o?void 0:o.find((t=>(!e||t.option1===e)&&(!i||t.option2===i)&&(!n||t.option3===n)));return r?r.id:void 0},te=(t,e)=>{var i,n;return null===t||void 0===t||null===(i=t.variants)||void 0===i||null===(n=i.find((t=>t.id===e)))||void 0===n?void 0:n.price},ee=(t,e)=>{var i;const n=null===t||void 0===t||null===(i=t.variants)||void 0===i?void 0:i.find((t=>t.id==e));return void 0===n?null:null===n||void 0===n||null===(o=n.featured_image)||void 0===o?void 0:o.src;var o},ie=(0,n.createContext)({setShowOptionsChart:null});var ne=function(t){const e=t.event,i=t.data,o=t.currentProduct,r=t.setOpenShopNow,l=t.setLockSwiper,[a,d]=(0,n.useState)(!1);return(0,x.jsx)(ie.Provider,{value:{setShowOptionsChart:d},children:(0,x.jsxs)(s.az,{width:"full",height:"full",borderRadius:"md",children:[(0,x.jsx)(s.BJ,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",children:(0,x.jsx)(s.az,{width:"full",height:"fit-content",children:(0,x.jsx)(Gt,{data:i,event:e,product:o,setOpenShopNow:r,setLockSwiper:l})})}),a?(0,x.jsx)(s.BJ,{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.az,{width:"full",height:"fit-content",children:(0,x.jsx)(Wt,{data:i,event:e,product:o,setShowOptionsChart:()=>{d(!1)}})})}):(0,x.jsx)(x.Fragment,{})]})})};var oe=function(t){var e,[i,o,r,l]=(0,h.A)();const[a,d]=(0,n.useState)(!1),[v,g]=(0,n.useState)(),[f,w]=(0,n.useState)(),j=(0,u.Xd)("whatmoreShopId"),y=t.event,b=t.onBack,C=n.useRef(),S=t.isPlaying,k=t.isLast,I=t.setLockSwiper,_=t.selectedVariantId,z=null===(e=t.showOverlay)||void 0===e||e,E="center";return(0,x.jsx)(s.ov,{children:(0,x.jsxs)(s.az,{width:l,height:r,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.BJ,{direction:"column",justifyContent:E,height:"full",width:"full",children:(0,x.jsx)(s.az,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.gl,{width:"full",ratio:l/r,children:(0,x.jsx)(m,{height:"100%",width:"100%",url:y.event_hls_url,isPlaying:S,event:y})})})}),z?(0,x.jsx)(s.BJ,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:E,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.az,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(Dt,{focusRef:C,event:t.event,isLast:k,onCloseCallback:b,productClickHandler:async t=>{const e=await(0,p.M)(t,(0,c.NCy)(j),j);w(t),g(e),d(!0),I(!0)}})})}):(0,x.jsx)(x.Fragment,{}),!0===a?(0,x.jsx)(s.BJ,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:E,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.az,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(ne,{focusRef:C,event:t.event,isLast:k,onCloseCallback:()=>b(),setLockSwiper:I,data:v,currentProduct:f,setOpenShopNow:d,selectedVariantId:_})})}):(0,x.jsx)("div",{})]})})};const re=function(t,e){return isNaN(t)||isNaN(e)||e<=0||t>e?0:Math.ceil(t/e*100)};function le(t){var e,i,[n,o,r,l]=(0,h.A)();const[a]=(0,u.QN)("whatmoreSecondaryColor"),[d]=(0,u.QN)("whatmoreSecondaryColorShade900"),c=t.progress,p=null!==(e=t.totalSiblings)&&void 0!==e?e:1,v=null!==(i=t.indexAmongSiblings)&&void 0!==i?i:0;return(0,x.jsx)(s.BJ,{width:"96%",height:"fit-content",direction:"row",justifyContent:"center",alignItems:"center",spacing:"1px",children:[...Array(p).keys()].map((t=>(0,x.jsx)(s.BJ,{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.az,{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 ae=i(3788),de=i(758);const se=t=>t>=1e3?(t/1e3).toFixed(1)+"k":t,ce=()=>"undefined"!==typeof window&&window.innerWidth>=1024;var ue=function(t){var e,i,o,r,a,d=t.whatmoreShareTemplateId;const p=t.whatmoreShareStoryId,v=t.whatmoreShareEventId,m=t.event,g=null===(e=t.showShareText)||void 0===e||e,f=null!==(i=t.shareButtonBottomMargin)&&void 0!==i?i:0,w=(0,u.Xd)("whatmoreShopId"),j=(0,u.Xd)("isInDesignMode"),y=(0,u.Xd)("isDemoBrand"),b=(0,u.Xd)("whatmorePrimaryFont"),C=(0,u.Xd)("websiteLanguage"),{whatmoreWidgetSourceDetails:S}=(0,n.useContext)(M.B),[k,I,_,z]=(0,h.A)(),E=null!==(o=t.iconSize)&&void 0!==o?o:.1*z*(0,c.xkB)(w);function T(){const e=(0,u.Xd)("whatmoreLandingLocationType");var i;!function(t){j||y||(async()=>{(0,l.Zh)(t)})()}(m),(e.startsWith("product")||"embed"===e)&&(d="te"),i="event_product_link"===(0,c.moP)(w)?m.products[0].product_link||"":window.location.pathname,i=("event_product_link"===(0,c.moP)(w)?"":window.location.hostname)+i+"?wtt="+d+"&wsid="+p+"&weid="+v,(0,c.BLb)(w)&&(i=i+"&"+(0,c.VCz)(w)+"&utm_campaign=video-share&utm_medium="+e);const n={title:(0,c.kZI)(w),text:`${(0,c.dmA)(w)} \n ${i} ${(0,c.ZX9)(w)?"\n \n -via Whatmore":""}`};navigator.share&&!ce?navigator.share(n):(t.setIsModalOpen(!0),t.setShareText([n,i]))}return(0,x.jsx)(s.ov,{children:(0,x.jsx)(s.jl,{cursor:"pointer",style:{marginBottom:f+"px"},children:(0,x.jsxs)(s.BJ,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[(0,x.jsx)(de.A,{sx:{transform:"scaleX(-1)",color:"white",fontSize:E,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),T(),(0,Q.kz)({userInteractionType:V.O.VIDEO_SHARE_CTA_CLICKED,widgetSourceDetails:S,event:m,productList:m.products,ctaList:m.cta})}}),g&&(0,c.ViG)(w)?(0,x.jsxs)(s.EY,{fontSize:.3*E+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:b+" !important",color:"white !important",paddingRight:"10%",maxWidth:"48px",wordWrap:"break-word"},children:["\xa0",m.total_share>(0,c.vDV)(w)?se(m.total_share):null!==(r=null===G||void 0===G||null===(a=G[C])||void 0===a?void 0:a.share)&&void 0!==r?r:"Share","\xa0"]}):(0,x.jsx)(x.Fragment,{})]})})})},he=i(3420),pe=i(7170);var ve=function(t){var e,i,o;const r=(0,u.Xd)("whatmoreShopId"),a=(0,u.Xd)("whatmorePrimaryFont"),d=(0,u.Xd)("whatmoreLikedEvents"),p=(0,u.Xd)("isInDesignMode"),v=(0,u.Xd)("isDemoBrand"),m=(0,u.Xd)("websiteLanguage"),{whatmoreWidgetSourceDetails:g}=(0,n.useContext)(M.B),f=t.event,[w,j]=(0,n.useState)(null!==(e=d[f.event_id])&&void 0!==e&&e),[y,b,C,S]=(0,h.A)(),k=.1*S*(0,c.xkB)(r);function I(t,e){p||v||(async()=>{(0,l.$B)(t,e)})()}function _(){(0,u.t2)("whatmoreLikedEvents",{...d,[f.event_id]:!w}),w?(I(f,-1),(0,Q.kz)({userInteractionType:V.O.VIDEO_UNLIKED,widgetSourceDetails:g,event:f,productList:f.products,ctaList:f.cta})):(I(f,1),(0,Q.kz)({userInteractionType:V.O.VIDEO_LIKED,widgetSourceDetails:g,event:f,productList:f.products,ctaList:f.cta})),j(!w)}const z=f.total_like+(w?1:0);return(0,x.jsx)(s.ov,{children:(0,x.jsx)(s.jl,{cursor:"pointer",children:(0,x.jsxs)(s.BJ,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[w?(0,x.jsx)(pe.A,{sx:{boxShadow:3,color:(0,c.MJ6)(r),fontSize:k,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),_()}}):(0,x.jsx)(he.A,{sx:{boxShadow:3,color:"white",fontSize:k,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),_()}}),(0,x.jsx)(x.Fragment,{children:(0,c.FlI)(r)?(0,x.jsxs)(s.EY,{fontSize:.3*k+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:a+" !important",color:"white !important",position:"relative",bottom:"5px"},children:["\xa0",z>=(0,c.LGx)(r)?se(z):null!==(i=null===G||void 0===G||null===(o=G[m])||void 0===o?void 0:o.like)&&void 0!==i?i:"Like","\xa0"]}):(0,x.jsx)(x.Fragment,{})})]})})})};const xe=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 me=i(7300);const ge=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"})})})},fe=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 we=t=>{const e=t.shareText,[i,o]=(0,n.useState)("Copy link"),[r,l]=(0,n.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://www.whatmore.ai"},src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",backgroundColor:"transparent",borderRadius:"0px",width:Math.min(t.iconSize,28)+"px"}}),(0,x.jsx)(Rt.A,{onClick:e=>{e.stopPropagation(),t.setIsModalOpen(!1)}})]}),(0,x.jsx)("div",{}),(0,x.jsx)(s.cG,{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 i;t.stopPropagation();const n=encodeURIComponent(null===(i=e[0])||void 0===i?void 0:i.text);window.open(`https://wa.me/?text=${n}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(xe,{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 i;t.stopPropagation();const n=encodeURIComponent(null===(i=e[0])||void 0===i?void 0:i.text);window.open(`https://twitter.com/intent/tweet?text=${n}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(ge,{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]),o("Link copied"),l("green")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(fe,{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:r},children:i})]})]})]})})};var je=function(t){var e,i;const n=null===(e=t.brandName)||void 0===e?void 0:e.replace(/\s+/g,"_"),o=(0,u.Xd)("whatmorePrimaryFont"),r=(0,u.Xd)("whatmoreShopId"),l=null!==(i=t.fontSize)&&void 0!==i?i:"8",[a]=(0,me.A)(),d=`https://www.whatmore.ai/shoppable-videos?utm_source=${n}&utm_medium=referral&utm_campaign=${"landscape"===a?"customer_referral_desktop":"customer_referral_mobile"}`;return(0,x.jsx)(s.N_,{href:d,isExternal:!0,children:(0,c.SGs)(r)&&(0,x.jsxs)(s.BJ,{direction:"row",justifyContent:"flex-start",alignItems:"center",width:"fit-content",spacing:"2px",paddingLeft:"2px",paddingRight:"2px",children:[(0,x.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-family",o,"important"),t.style.setProperty("font-size",1.1*l+"px","important"),t.style.setProperty("text-align","center","important"),t.style.setProperty("color","white"))},children:"powered by Whatmore"}),(0,x.jsx)(s.az,{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*l,backgroundColor:"transparent",borderRadius:"0px"}})]})})},ye=i(9879),be=i(2209);var Ce=()=>(0,x.jsxs)(s.az,{as:"svg",width:"46px",height:"46px",viewBox:"0 0 24 24",fill:"none",className:"tick-animation",marginBottom:"20px",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"11",stroke:"gray",strokeWidth:"2",fill:"none"}),(0,x.jsx)("path",{d:"M7 12l3 3 7-7",stroke:"gray",strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]});var Se=t=>{var e;const i={text:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.title,options:(null===t||void 0===t?void 0:t.options)||[]},[o,r]=(0,n.useState)(!1),[l,a]=(0,n.useState)(null),[d,c]=(0,n.useState)(null),u=(0,n.useRef)(null),h=(0,n.useContext)(M.B);return(0,n.useEffect)((()=>{if(o){const e=setTimeout((()=>{t.setIsQuestionVisible(!1)}),1e3);return()=>clearTimeout(e)}}),[o]),(0,n.useEffect)((()=>{!o&&u.current&&c(u.current.offsetHeight)}),[o]),(0,x.jsxs)(s.az,{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",minWidth:"320px",width:"fit-content",bg:"white",borderRadius:"lg",boxShadow:"md",display:"flex",flexDirection:"column",maxWidth:"90%",maxHeight:"90%",overflowY:"visible",ref:u,height:d?`${d}px`:"auto",children:[(0,x.jsx)(s.az,{position:"absolute",top:"-10px",right:"-10px",bg:"rgba(255, 255, 255, 0.8)",borderRadius:"full",padding:1,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:"10",onClick:()=>{var e;t.setIsQuestionVisible(!1),(0,Q.kz)({userInteractionType:V.O.QUESTION_CLOSED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id},widgetSourceDetails:h})},children:(0,x.jsx)(be.A,{})}),(0,x.jsx)(s.az,{bg:"gray.700",borderTopRadius:"lg",py:3,px:6,display:"flex",flexDirection:"column",justifyContent:"center",width:"100%",children:(0,x.jsx)(s.DZ,{py:6,as:"h2",textAlign:"center",style:{fontWeight:"bold",fontSize:"18px",color:"white"},children:null===i||void 0===i?void 0:i.text})}),(0,x.jsx)(s.az,{flex:"1",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",py:5,px:6,width:"100%",children:o?(0,x.jsxs)(s.az,{flex:"1",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",children:[(0,x.jsx)(Ce,{}),(0,x.jsx)(s.DZ,{as:"h3",size:"md",color:"gray.700",fontWeight:"medium",textAlign:"center",mt:4,fontSize:"lg",children:"Thank you for your response!"})]}):(0,x.jsx)(s.BJ,{spacing:5,width:"100%",align:"center",children:i.options.map(((e,i)=>(0,x.jsx)(s.az,{px:4,borderWidth:2,borderRadius:"md",cursor:"pointer",bg:l===e?"gray.200":"white",borderColor:l===e?"gray.400":"gray.200",_hover:{bg:"gray.200"},onClick:()=>(e=>{var i;a(e),r(!0),(0,Q.kz)({userInteractionType:V.O.QUESTION_ANSWERED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(i=t.question)||void 0===i?void 0:i.id,response:e},widgetSourceDetails:h})})(e),transition:"background-color 0.2s, border-color 0.2s",display:"flex",alignItems:"center",width:"100%",children:(0,x.jsx)(s.EY,{py:5,color:"gray.800",children:e})},i)))})})]})},ke=i(9935);var Ie=t=>{var e,i;const[o,r]=(0,n.useState)(""),[l,a]=(0,n.useState)(""),[d,h]=(0,n.useState)(!1),[p,v]=(0,n.useState)(!1),m=(0,u.Xd)("whatmoreShopId"),g=(0,u.Xd)("whatmoreSecondaryColor"),f=(0,u.Xd)("whatmorePrimaryFont"),w=null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.title,j=(0,n.useContext)(M.B),y=()=>{var e,i;(()=>{const{type:e}=(null===t||void 0===t?void 0:t.question)||{};return"number"===e?/^\d{10}$/.test(o):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o)})()?(h(!0),(0,Q.kz)({userInteractionType:V.O.QUESTION_ANSWERED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id,response:o,type:"number"===(null===t||void 0===t||null===(i=t.question)||void 0===i?void 0:i.type)?"leadgen:number":"leadgen:email"},widgetSourceDetails:j})):a("Please enter valid contact info.")},b=()=>{var e;t.setIsQuestionVisible(!1),(0,Q.kz)({userInteractionType:V.O.QUESTION_CLOSED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id},widgetSourceDetails:j})};return(0,x.jsx)(s.so,{bg:g,p:"6%",borderRadius:"md",boxShadow:"md",width:"90vw",mx:"auto",minH:"40vh",maxH:"80vh",position:"fixed",top:"30%",left:"50%",transform:"translateX(-50%)",direction:"column",align:"center",justify:"center",zIndex:100,overflow:"hidden",children:d?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(s.az,{textAlign:"center",color:"white",children:[(0,x.jsx)(s.az,{fontSize:"2xl",fontWeight:"bold",children:"CONGRATULATIONS!"}),(0,x.jsx)(s.az,{my:"4%",fontSize:"xl",children:"Claim Now"})]}),(0,x.jsx)(s.az,{position:"absolute",top:"2%",right:"2%",zIndex:20,children:(0,x.jsx)(F.A,{onCloseCallback:b})}),(0,x.jsxs)(s.az,{position:"relative",width:"70%",onClick:()=>{const t=(0,c.TH)(m);navigator.clipboard.writeText(t).then((()=>{v(!0),setTimeout((()=>{b()}),1e3),setTimeout((()=>v(!1)),2e3)}),(()=>{console.error("Failed to copy the coupon code")}))},cursor:"pointer",children:[(0,x.jsxs)(s.az,{bg:"white",border:"2px dashed black",borderRadius:"md",p:"2%",display:"flex",alignItems:"center",justifyContent:"space-between",mt:"4%",children:[(0,x.jsx)(s.az,{as:"span",fontWeight:"bold",color:"black",children:(0,c.TH)(m)}),(0,x.jsx)(ke.A,{sx:{color:p?{whatmoreSecondaryColor:g}:"gray",cursor:"pointer",marginLeft:"2%"}})]}),p&&(0,x.jsx)(s.az,{padding:"4%",position:"absolute",left:"50%",transform:"translateX(-50%)",bg:g,color:"white",fontSize:"12px",borderRadius:"md",px:"2%",py:"0.5%",textAlign:"center",children:"Copied!"})]})]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(s.az,{textAlign:"center",color:"white",children:[(0,x.jsx)(s.az,{children:(0,x.jsx)(s.EY,{fontFamily:f,fontSize:"22px",fontWeight:"bold",children:w})}),(0,x.jsx)(s.az,{marginBottom:"10%",fontSize:"md",children:(0,c.aRV)(m)})]}),(0,x.jsx)(s.az,{position:"fixed",top:"2%",right:"2%",zIndex:20,children:(0,x.jsx)(F.A,{onCloseCallback:b})}),(0,x.jsxs)(s.so,{mt:"4%",align:"center",direction:"column",width:"80%",children:[(0,x.jsx)(s.az,{sx:{bg:"white",border:"2px solid #4A4A4A",borderRadius:"8px",paddingLeft:"4%",display:"flex",alignItems:"center",marginBottom:"6%",width:"100%",height:"auto",minH:"48px"},children:(0,x.jsx)("input",{fontFamily:f,type:"number"===(null===(i=t.question)||void 0===i?void 0:i.type)?"tel":"email",placeholder:t.placeholder,value:o,onChange:t=>{r(t.target.value),l&&a("")},onKeyDown:t=>{"Enter"===t.key&&y()},style:{fontSize:"1em",border:"none",outline:"none",width:"100%"}})}),l&&(0,x.jsx)(s.EY,{color:"red.500",mb:"4% !important",fontSize:"md",textAlign:"center",width:"100%",children:l}),(0,x.jsx)(s.az,{as:"button",bg:"#D3D3D3",color:"#343434",borderRadius:"md",fontWeight:"bold",height:"35px",display:"flex",alignItems:"center",justifyContent:"center",onClick:y,width:"50%",children:(0,x.jsx)(s.EY,{fontFamily:f,fontSize:"0.8em",padding:"2%",color:g,children:"SUBMIT"})})]})]})})};var _e=t=>{const[e,i]=(0,n.useState)(null);return(0,x.jsx)(s.az,{children:!e&&(0,x.jsx)(Ie,{question:t.question,onEmailSubmit:t=>{i(t)},setIsQuestionVisible:t.setIsQuestionVisible,placeholder:t.placeholder})})};var ze=t=>{var e;const[i,o]=(0,n.useState)(null),r=t.questionIndex,l=t.questionList;if((0,n.useEffect)((()=>{if(!(r>=l.length))return()=>(0,ot.Hm)()}),[]),r>=l.length)return;const a=null===l||void 0===l?void 0:l[r];return"string"===(null===a||void 0===a?void 0:a.type)||"number"===(null===a||void 0===a?void 0:a.type)?(0,x.jsx)(s.az,{children:(0,x.jsx)(_e,{setIsQuestionVisible:t.setIsQuestionVisible,question:a,placeholder:"number"===(null===a||void 0===a?void 0:a.type)?"Enter your phone number":"Enter your email"})}):(0,x.jsx)(s.az,{children:(0,x.jsx)(Se,{question:a,options:null===a||void 0===a||null===(e=a.answers)||void 0===e?void 0:e.values.map((t=>null===t||void 0===t?void 0:t.value)),onAnswerSelect:t=>{o(t)},selectedAnswer:i,onClose:()=>{t.setIsQuestionVisible(!1)},setIsQuestionVisible:t.setIsQuestionVisible})})},Ee=i(6118);function Te(t){var e;const i=t.event,[o,r,l,a]=(0,h.A)(),[d]=(0,u.QN)("whatmorePrimaryFont"),{whatmoreIsStoriesTemplate:p}=(0,n.useContext)(M.B),[v]=(0,u.QN)("whatmoreSecondaryColor"),[m]=(0,u.QN)("whatmoreShopId"),g=(0,c.ivI)(m),f=null!==(e=(0,c.qAx)(m))&&void 0!==e?e:[v,g,v,g,v],w=(0,n.useRef)(null);(0,n.useEffect)((()=>{w.current&&w.current.play()}),[]);const j=(0,ae.s)(null===i||void 0===i?void 0:i.storyset_thumbnail_image);return(0,x.jsx)(x.Fragment,{children:p?(0,x.jsx)(s.az,{width:"100%",height:"fit-content",padding:"5px",children:(0,x.jsxs)(s.BJ,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-start",children:[(0,x.jsx)(s.ov,{children:(0,x.jsx)(s.jl,{overflow:"hidden",size:.14*t.width+"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.B)(j)?(0,x.jsx)(ye.A,{height:"100%",width:"100%",poster:null===i||void 0===i?void 0:i.thumbnail_image,url:j,isPlaying:!0,event:{event_type:"video"},borderRadius:"50%"}):(0,x.jsx)("img",{src:j,style:{objectFit:"cover",height:"100%",width:"100%",backgroundColor:"white"}})})}),(0,x.jsx)(s.ov,{children:(0,x.jsx)(s.EY,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:.05*t.width+"px",fontWeight:"medium",lineHeight:"100%",sx:{fontFamily:d+" !important",color:"white !important",textShadow:"0px 0px 4px black !important;"},children:i.storyset_name})})]})}):(0,x.jsx)(x.Fragment,{})})}var Fe=function(t){var e,i,o;const[r,a,d]=(0,me.A)(),[p]=(0,u.QN)("isInDesignMode"),[v]=(0,u.QN)("isDemoBrand"),[m,g]=(0,u.QN)("isProductSwiperCatalogOpen"),[f,w]=(0,u.QN)("isFirstIndicatorRenderDone"),[j]=(0,u.QN)("whatmoreShopId"),b=(0,n.useContext)(fi),{whatmoreEventsBrowsingTemplate:C}=(0,n.useContext)(M.B),[S,k,I,_]=(0,h.A)(),z=(0,u.Xd)("whatmorePrimaryFont"),T=t.event,N=t.storySetId,A=t.isLast,P=t.onCloseCallback,L=t.focusRef,O=t.productClickHandler,D=t.videoPlayingData,R=t.totalSiblingEvents,W=t.indexAmongSiblings,H=t.leftOpenSpaceClickHandler,Y=t.midOpenSpaceClickHandler,J=t.rightOpenSpaceClickHandler,{whatmoreWidgetSourceDetails:U}=(0,n.useContext)(M.B),X=.1*_,[q,K]=(0,n.useState)(!1),[$,G]=(0,n.useState)([]),Z=t=>{tt.current&&!tt.current.contains(t.target)&&K(!1)},tt=(0,n.useRef)(null);(0,n.useEffect)((()=>(q?document.addEventListener("click",Z):document.removeEventListener("click",Z),()=>{document.removeEventListener("click",Z)})),[q]);const et="Free"==(0,c.yt9)(j)&&"portrait"==r;return(0,x.jsxs)(s.az,{width:"full",height:"full",borderRadius:"md",children:[t.isQuestionVisible&&(0,x.jsx)(Pt.S,{userInteractionType:V.O.QUESTION_VIEWED,userInteractionMetadata:{questionId:null===(e=t.questionList)||void 0===e||null===(i=e[t.qIndex])||void 0===i?void 0:i.id},triggerFlag:!p&&!v,children:(0,x.jsx)(ze,{questionList:t.questionList,questionIndex:t.qIndex,setIsQuestionVisible:t.setIsQuestionVisible})}),q&&(0,x.jsx)("div",{ref:tt,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)(we,{shareText:$,setShareText:G,iconSize:X,isModalOpen:q,setIsModalOpen:K})}),"55194878152"==j&&(0,x.jsx)("div",{style:{position:"absolute",boxShadow:"dark-lg",transform:"scale(1.2) translateY(10%) translateX(5%)"},children:(0,x.jsx)("img",{src:"https://s3.ap-south-1.amazonaws.com/whatmorelive.brand.other.assets/nureh/Shop_by_Sale_50_-removebg-preview.png"})}),(!t.isQuestionVisible||t.qIndex>=(null===t||void 0===t||null===(o=t.questionList)||void 0===o?void 0:o.length))&&(0,x.jsxs)(s.BJ,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,x.jsxs)(s.BJ,{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:[b.showVideoPlayingData?(0,x.jsx)(s.BJ,{direction:"row",width:"100%",height:"fit-content",marginTop:"5px",justifyContent:"center",children:(0,x.jsx)(le,{progress:re(D.current_time,D.video_duration),totalSiblings:R,indexAmongSiblings:W})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.az,{width:"full",margin:"2px",marginTop:"5px",children:(0,x.jsxs)(s.BJ,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",paddingRight:"10px",paddingLeft:"10px",children:[(0,x.jsx)(Te,{event:T,width:_}),(0,x.jsxs)(s.BJ,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,mt.Yt)(C)?(0,x.jsx)(ue,{whatmoreShareTemplateId:(0,mt.Gy)(C),whatmoreShareStoryId:N,whatmoreShareEventId:T.event_id,event:T,showShareText:!1,iconSize:.07*_,shareButtonBottomMargin:6,setIsModalOpen:K,setShareText:G}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(y,{focusRef:L}),("landscape"!==r||t.showCloseOverlay)&&(0,x.jsx)(F.A,{event:T,onCloseCallback:P})]})]})})]}),"78232846646"===j&&"portrait"===r&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s.az,{position:"absolute",top:.49*window.innerHeight+"px",left:.92*window.innerWidth+"px",transform:"translate(-50%, -50%)",zIndex:101,children:(0,x.jsx)(Ee.A,{style:{fontSize:1.3*X+"px",transform:"rotate(180deg)",color:"white",cursor:"pointer",filter:"drop-shadow(0 0 5px black)"},onClick:()=>{t.changeSlide(T,"right")}})}),(0,x.jsx)(s.az,{position:"absolute",top:.42*window.innerHeight+"px",left:.92*window.innerWidth+"px",transform:"translate(-50%, -50%)",zIndex:101,children:(0,x.jsx)(Ee.A,{style:{fontSize:1.3*X+"px",color:"white",cursor:"pointer",filter:"drop-shadow(0 0 5px black)"},onClick:()=>{t.changeSlide(T,"left")}})})]}),(0,x.jsxs)(s.BJ,{width:"100%",height:"100%",direction:"row",justifyContent:"center",children:[(0,x.jsx)(s.az,{width:"33%",height:"100%",onClick:()=>{H()},sx:{display:"block !important"}}),(0,x.jsx)(s.az,{width:"34%",height:"100%",onClick:()=>{Y()},sx:{display:"block !important"}}),(0,x.jsx)(s.az,{width:"33%",height:"100%",onClick:()=>{J()},sx:{display:"block !important"}})]}),(0,x.jsxs)(s.az,{width:"full",height:"fit-content",children:[b.totalEvents>1&&!f&&b.showSwipeIndicator?(0,x.jsx)(s.az,{width:"full",margin:"2px",children:(0,x.jsx)(s.BJ,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,x.jsx)(B,{swipeUp:!A})})}):null,(0,x.jsxs)(s.az,{width:"fit-content",height:"fit-content",position:"absolute",right:0,bottom:"25%",children:[(0,c.oZc)(j)&&!(0,mt.Yt)(C)?(0,x.jsx)(s.az,{ml:"auto",width:"fit-content",paddingY:"12px",paddingX:"8px",position:"relative",top:"-30px",children:(0,x.jsxs)(s.BJ,{gap:"4px",direction:"column",alignItems:"center",cursor:"pointer",onClick:function(){var t;p||v||(async()=>{(0,l.A9)(T,1)})(),(0,Q.kz)({userInteractionType:V.O.WHATSAPP_ICON_CLICKED,widgetSourceDetails:U,event:T,productList:null===T||void 0===T?void 0:T.products,ctaList:null===T||void 0===T?void 0:T.cta});const e=T.products.map((t=>`${t.product_link} \n`)),i=(0,c.dzp)(j),n=`Hey, I am interested in ${T.products.length>1?"these products":"this product"} I saw on ${null===(t=T.products[0])||void 0===t?void 0:t.brand} store: \n${e}. Could you please help me with some queries?`;window.open(i+`&text=${n}&type=phone_number`,"_blank")},children:[(0,x.jsx)(xe,{iconSize:.7*X,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)(s.EY,{fontSize:X*(0,c.LOH)(j)+"px",fontWeight:"bold",align:"center",style:{marginTop:0},sx:{fontFamily:z+" !important",color:"white !important"},children:(0,c.wtw)(j)})]})}):(0,x.jsx)(x.Fragment,{}),(0,c.MdM)(j)?(0,x.jsx)(s.az,{width:"full",height:"fit-content",paddingX:"12px",position:"relative",top:"-30px",children:(0,x.jsx)(s.BJ,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(ve,{event:T})})}):(0,x.jsx)(x.Fragment,{}),(0,c.iQ5)(j)&&!(0,mt.Yt)(C)?(0,x.jsx)(s.az,{width:"full",height:"fit-content",paddingX:"12px",position:"relative",top:"-30px",children:(0,x.jsx)(s.BJ,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(ue,{whatmoreShareTemplateId:(0,mt.Gy)(C),whatmoreShareStoryId:N,whatmoreShareEventId:T.event_id,event:T,setIsModalOpen:K,setShareText:G})})}):(0,x.jsx)(x.Fragment,{})]}),(0,At.Z_)(T)?(0,x.jsxs)(s.az,{width:"full",children:[(0,c.ek9)(j)?(0,x.jsx)(s.az,{w:"100%",children:(0,x.jsx)(s.BJ,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(E,{event:T,onToggle:t=>{g("minimize-button"!==t)}})})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.az,{display:"flex",width:"100%",height:"fit-content",children:(0,x.jsx)(Bt,{event:T,productClickHandler:O})})]}):(0,x.jsx)(x.Fragment,{})]}),et&&(0,x.jsx)(s.BJ,{direction:"row",width:"100%",height:"fit-content",bg:"rgba(52, 52, 52, 0.9)",py:"3px",justifyContent:"center",children:(0,x.jsx)(je,{brandName:null===T||void 0===T?void 0:T.brand,fontSize:.033*_})})]})]})},Ne=i(5491),Ae=i.n(Ne),Pe=i(6493);var Le=function(t){var e,i,o,r,l,a,[d,m,g,f]=(0,h.A)();const[w,j]=(0,n.useState)(!1),[y,b]=(0,n.useState)(),[C,S]=(0,n.useState)(),[k,I]=(0,n.useState)({current_time:0,video_duration:0,is_video_ended:!1}),_=(0,u.Xd)("whatmoreShopId"),z=t.event,E=t.storyId,T=t.onBack,F=n.useRef(),N=t.changeSlide,A=t.isPlaying,P=t.isLast,L=t.setLockSwiper,B=t.onVideoEndedCallback,O=t.progressUpdateCallback,D=null!==(e=t.totalSiblingEvents)&&void 0!==e?e:0,R=null!==(i=t.indexAmongSiblings)&&void 0!==i?i:0,W=null===(o=t.showOverlay)||void 0===o||o,H=null!==(r=t.leftOpenSpaceClickHandler)&&void 0!==r?r:()=>{},Y=null!==(l=t.midOpenSpaceClickHandler)&&void 0!==l?l:()=>{},J=null!==(a=t.rightOpenSpaceClickHandler)&&void 0!==a?a:()=>{},{whatmoreWidgetSourceDetails:U}=(0,n.useContext)(M.B),{questionList:X}=(0,n.useContext)(fi),q=(null===X||void 0===X?void 0:X.length)>0?parseInt(localStorage.getItem("_whatmore_qview_index")):1e4,[K,$]=(0,n.useState)();(0,n.useEffect)((()=>{$(t.showQuestion)}),[t.showQuestion]);const G="center";let Z;try{Z=Ae()((()=>{B()}),1e3,{leading:!0,trailing:!1})}catch(tt){console.log(tt)}return(0,x.jsx)(s.ov,{children:(0,x.jsxs)(s.az,{width:f,height:g,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.BJ,{direction:"column",justifyContent:G,height:"full",width:"full",children:(0,x.jsx)(s.az,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.gl,{width:"full",ratio:f/g,children:(0,x.jsx)(v.A,{height:"100%",width:"100%",url:(0,ae.s)((0,Pe.lP)(z)),isPlaying:A&&(!K||q>=X.length),timeUpdateCallback:function(t,e){const i=re(t,e);O({watch_time:t,video_duration:e});const n=k.is_video_ended;i>=99&&A&&!n?(Z(),I({current_time:t,video_duration:e,is_video_ended:!0})):I({current_time:t,video_duration:e,is_video_ended:n})},event:z,question:K&&q<(null===X||void 0===X?void 0:X.length),source:t.source})})})}),W?(0,x.jsx)(s.BJ,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:G,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.az,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(Fe,{focusRef:F,event:t.event,isLast:P,onCloseCallback:t=>{T(t),(0,Q.DG)({userInteractionType:V.O.VIDEO_PLAYBACK,userInteractionMetadata:{watch_time:k.current_time,video_duration:k.video_duration},widgetSourceDetails:U,event:z,productList:z.products,ctaList:z.cta})},productClickHandler:async t=>{const e=await(0,p.M)(t,(0,c.NCy)(_),_);S(t),b(e),j(!0),L(!0),(0,Q.kz)({userInteractionType:V.O.SHOPNOW_CLICKED,widgetSourceDetails:U,event:z,productList:z.products,ctaList:z.cta}),(0,u.t2)("whatmoreAllowAutoSlide",!1)},videoPlayingData:k,totalSiblingEvents:D,indexAmongSiblings:R,questionList:X,isQuestionVisible:K&&q<(null===X||void 0===X?void 0:X.length),qIndex:q,setIsQuestionVisible:$,leftOpenSpaceClickHandler:H,midOpenSpaceClickHandler:Y,rightOpenSpaceClickHandler:J,storySetId:E,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:N})})}):(0,x.jsx)(x.Fragment,{}),!0===w?(0,x.jsx)(s.BJ,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:G,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.az,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(ne,{focusRef:F,event:t.event,isLast:P,onCloseCallback:()=>T(),setLockSwiper:L,data:y,currentProduct:C,setOpenShopNow:t=>{j(t),(0,u.t2)("whatmoreAllowAutoSlide",!t)}})})}):(0,x.jsx)("div",{})]})})},Be=i(2039),Oe=i(6613),De=i(1085),Re=i(5727);var We=function(t){var[e,i,n,o]=(0,h.A)();const r=(0,u.Xd)("whatmoreShopId"),l=t.event,a=t.isPlaying,d="center";return(0,x.jsx)(s.ov,{children:(0,x.jsxs)(s.az,{width:o,height:n,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.BJ,{direction:"column",justifyContent:d,height:"full",width:"full",children:(0,x.jsx)(s.az,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.gl,{width:"full",ratio:o/n,children:(0,x.jsx)(v.A,{height:"100%",width:"100%",url:(0,ae.s)((0,Pe.lP)(l)),isPlaying:a,timeUpdateCallback:function(t,e){},event:l,source:t.source})})})}),(0,x.jsx)(s.BJ,{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.az,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",backdropFilter:"auto",backdropBlur:"10px",onClick:t=>{(0,De.bo)()},children:(0,x.jsxs)(s.BJ,{direction:"column",justifyContent:"center",alignItems:"center",height:"full",width:"full",children:[(0,x.jsx)(Re.A,{sx:{boxShadow:3,color:(0,c.KFN)(r),fontSize:.4*o,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{(0,De.bo)()}}),(0,x.jsx)(s.EY,{color:"white",fontSize:.05*o+"px",fontWeight:"bold",align:"left",children:"Please click to play video.."})]})})})]})})},Qe=i(3294),Ve=i(9821);const Me=n.lazy((()=>i.e(931).then(i.bind(i,3658))));var He=function(t){var e,i;const n=t.changeSlide,o=t.event,r=null===(e=t.isPlaying)||void 0===e||e,l=t.onBack,s=t.isLast,c=t.setLockSwiper,h=(t.heightFactor,t.widthFactor,t.onVideoEndedCallback),p=t.progressUpdateCallback,[v,m]=(0,j.A)(),[g]=(0,u.QN)("whatmoreVideoPlayerPoolBlessed"),f=null===(i=t.showOverlay)||void 0===i||i;function w(){m(!v)}if((0,Oe.MN)()&&0==g&&"recommended_images"!=(null===o||void 0===o?void 0:o.event_type))return(0,Ve._)()?(0,x.jsx)(We,{event:o,onBack:l,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:h,progressUpdateCallback:p,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:f,source:Qe.N.CAROUSEL_EVENT_OPENED},"shopping-video-view"+o.event_id):(0,x.jsx)(Le,{event:o,onBack:l,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:h,progressUpdateCallback:p,showQuestion:t.showQuestion,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:f,source:Qe.N.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:n},"shopping-video-view"+o.event_id);if((0,Be.ij)(o)||(0,Be.Il)(o))return(0,x.jsx)(Le,{event:o,onBack:l,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:h,progressUpdateCallback:p,showQuestion:t.showQuestion,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:f,source:Qe.N.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:n},"shopping-video-view"+o.event_id);if("recommended_images"==(null===o||void 0===o?void 0:o.event_type))return(0,x.jsx)(Me,{onBack:l,mode:t.mode,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,imageUrls:null===o||void 0===o?void 0:o.product_list});if((0,Be.Th)(o)){var{status:y,bannerText:b,timeToStartInMins:C}=d.A.getEventStatus(o);if(y.name===a.A.LIVE.name)return(0,x.jsx)(oe,{event:o,onBack:l,isPlaying:r,isLast:s,showOverlay:f},"shopping-live-view"+o.event_id)}return console.error("Can't render event which is neither video or a currently-live-event"),(0,x.jsx)("div",{})},Ye=i(4806),Je=i.n(Ye),Ue=i(2804),Xe=i(6834);function qe(t){var e;const[i,o]=(0,n.useState)(!1),r=t.onClick,l=null!==(e=t.fontSize)&&void 0!==e?e:50;return(0,x.jsx)("div",{style:{height:"fit-content",width:"fit-content",backgroundColor:"black",opacity:.4,borderRadius:"50%"},className:[i?"whatmore-scale-on-tap":""].join(" "),children:"left"===t.type?(0,x.jsx)(Xe.A,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{o(!0),setTimeout((()=>{o(!1)}),500),r(t,"up")}}):(0,x.jsx)(Ue.A,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{o(!0),setTimeout((()=>{o(!1)}),500),r(t,"down")}})})}var Ke=function(t){var e,i,n;const o=null!==(e=t.relativeBottomPercentage)&&void 0!==e?e:"30%",r=null!==(i=t.width)&&void 0!==i?i:"100%",l=null!==(n=t.fontSize)&&void 0!==n?n:50,a=t.handleClick;return(0,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)(qe,{type:"left",onClick:a,fontSize:l}),(0,x.jsx)(qe,{type:"right",onClick:a,fontSize:l})]})})},$e=i(964),Ge=i(3330);var Ze=function(t,e){function i(t,e){return 1==e?0:t<0?e+t:t>=e?t-e:t}const o=(0,n.useRef)({prevIndex:i(t-1,e),activeIndex:t,nextIndex:i(t+1,e)});return[function(){return o.current},function(t){o.current="right"==t?{prevIndex:i(o.current.activeIndex,e),activeIndex:i(o.current.activeIndex+1,e),nextIndex:i(o.current.activeIndex+2,e)}:{prevIndex:i(o.current.activeIndex-2,e),activeIndex:i(o.current.activeIndex-1,e),nextIndex:i(o.current.activeIndex,e)}},function(t){return i(o.current.activeIndex+t)}]};var ti=function(t,e){const i=(0,n.useRef)({clientX:0,clientY:0});return[function(t){i.current.clientX=t.changedTouches[0].clientX,i.current.clientY=t.changedTouches[0].clientY},function(n){const o=i.current.clientX,r=i.current.clientY;var l=o-n.changedTouches[0].clientX,a=r-n.changedTouches[0].clientY;return"vertical"==t&&Math.abs(a)>e||"horizontal"==t&&Math.abs(l)>e?"vertical"==t?a>0?"right":"left":l>0?"right":"left":null}]};var ei=function(t,e){const i=(0,n.useRef)(Ae()(((t,e)=>{t(e)}),300,{leading:!0,trailing:!1}));return[function(n,o){var r=0;if(r="vertical"==t?n.deltaY:n.deltaX,Math.abs(r)<=e)return;const l=r>0?"right":"left";i.current(o,l)}]},ii=i(8675);var ni=function(t){const e=t.events,i=t.eventIndex,a=t.onBack;var[d,p,v,m]=(0,h.A)();const[g]=(0,u.QN)("isInDesignMode"),[f]=(0,u.QN)("isDemoBrand"),[w,j]=(0,n.useState)(!0),[y,b]=(0,u.QN)("isFirstIndicatorRenderDone"),[C,S]=(0,n.useState)(!1),[k,I]=(0,n.useState)({}),{setCloseClickComponent:_}=(0,n.useContext)(fi),{slideDirection:z}=(0,n.useContext)(fi),[E]=(0,u.QN)("whatmoreShopId"),[T]=(0,u.QN)("whatmoreLandingLocationType"),[F,N]=Ze(i,e.length),[A,P]=ti(z,50),[L]=ei("vertical",30),[B,O]=(0,n.useState)(!1),[D,W]=(0,n.useState)(null),{whatmoreWidgetSourceDetails:H,whatmoreUserInfo:Y}=(0,n.useContext)(M.B);function J(){O(!1)}function U(t){J(),setTimeout((()=>{a(t)}),500)}(0,n.useEffect)((()=>(O(!0),()=>{})),[]);const X=H.landingLocationType,q=H.templateType;_(U);let K=i;const{questionList:$}=(0,n.useContext)(fi);function G(){(0,u.Xd)("whatmoreAllowAutoSlide")&&(N("right"),D.slideNext())}function Z(t,e){N(e),function(t,e){D&&("left"===e?D.slidePrev():D.slideNext())}(0,e)}const tt=Math.round(.05*v);return(0,x.jsx)(Je(),{isOpen:B,onAfterOpen:function(){},onRequestClose:J,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,x.jsx)(ii.A,{children:(0,x.jsxs)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:(0,R.YU)("#000000",13)},onTouchStart:t=>{A(t)},onTouchEnd:t=>{if(C)return;const e=P(t);e&&Z(0,e)},onWheel:t=>{C||L(t,(t=>{Z(0,t)}))},children:[(0,x.jsx)(o.RC,{speed:400,threshold:tt,slidesPerView:1,direction:z,modules:[r.dK,r.FJ],initialSlide:i,loop:1!=e.length,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,allowSlideNext:!C,allowSlidePrev:!C,allowTouchMove:!1,onSwiper:t=>{W(t),(0,Q.kz)({userInteractionType:V.O.EVENT_VIEW,widgetSourceDetails:H,event:e[F().activeIndex],productList:e[F().activeIndex].products})},onSlideChange:t=>{var i;w?j(!1):(y||b(!0),(0,Q.DG)({userInteractionType:V.O.VIDEO_PLAYBACK,userInteractionMetadata:k,widgetSourceDetails:H,event:e[F().activeIndex],productList:e[F().activeIndex].products}),i=e[F().activeIndex],g||f||null===i||void 0===i||!i.event_id||(async()=>{const t=(0,mt.Wd)(X)+(0,mt.gf)(q)+(null!==i&&void 0!==i&&i.isRelatedEvent?"R":"E")+"_"+(null===i||void 0===i?void 0:i.event_id);(0,l.lB)(i),"index"===T?((0,Ge.Si)(E,$e.TB,$e.Dk),(0,ot.Ch)(i.event_id,i.products,$e.TB,$e.Dk,t,null===i||void 0===i?void 0:i.location,null===Y||void 0===Y?void 0:Y.userType)):T.startsWith("product")||"embed"===T?((0,Ge.Si)(E,$e.DK,$e.K1),(0,ot.Ch)(i.event_id,i.products,$e.DK,$e.K1,t)):T.startsWith("collection")?((0,Ge.Si)(E,$e.Sx,$e.rz),(0,ot.Ch)(i.event_id,i.products,$e.Sx,$e.rz,t)):((0,Ge.Si)(E,$e.TB,$e.Dk),(0,ot.Ch)(i.event_id,i.products,$e.TB,$e.Dk,t))})(),(0,Q.UM)({userInteractionType:V.O.EVENT_VIEW,widgetSourceDetails:H,event:e[F().activeIndex],productList:e[F().activeIndex].products}))},children:[...Array(Math.min(e.length,3)).keys()].map((n=>(0,x.jsx)(o.qr,{children:n=>{let{isActive:o,isPrev:r,isNext:l,isVisible:a,isDuplicate:d}=n;const u=o?"activeIndex":r?"prevIndex":"nextIndex",h=F()[u];"activeIndex"==u&&(K=Math.max(K,h),0==h&&(K=0));const p=(null===$||void 0===$?void 0:$.length)>0&&o&&a&&(h>i||K<i&&h>0)&&h>=K&&h%(0,c.uSp)(E)==i%(0,c.uSp)(E);return(0,x.jsx)(s.BJ,{direction:"column",height:window.innerHeight,justifyContent:"center",children:(0,x.jsx)(He,{event:e[h],showQuestion:p,onBack:U,isPlaying:1==e.length||o&&a,isLast:!1,setLockSwiper:S,onVideoEndedCallback:G,progressUpdateCallback:t=>{I(t)},showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,mode:"portrait",changeSlide:Z})})}},"event-vertical-scroll-slide-"+n)))}),e.length>1&&!C&&(0,c.kb)(E)&&"horizontal"===(0,c.br0)(E)&&"horizontal"===z?(0,x.jsx)(Ke,{relativeBottomPercentage:"50%",width:m,handleClick:(t,e)=>{Z(0,"down"==e?"right":"left")},fontSize:parseInt(.12*m)}):(0,x.jsx)(x.Fragment,{})]})})})},oi=i(7119);i(3997),i(9130),i(4669),i(9733),i(4365),i(7229),i(6042);const ri=t=>{let{children:e,customClass:i,show:n,closeCallback:o}=t;return oi.createPortal((0,x.jsxs)("div",{className:`whatmore-landscape-modal whatmore-root ${i}`,style:{display:n?"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)};ri.defaultProps={children:(0,x.jsx)("div",{children:"Empty Modal"}),customClass:"",show:!1,closeCallback:()=>!1};var li=ri;var ai=function(t){var e,[i,a,d,p]=(0,h.A)();const[v]=(0,u.QN)("isInDesignMode"),[m]=(0,u.QN)("isDemoBrand"),[g,f]=(0,u.QN)("isFirstIndicatorRenderDone"),[w,j]=(0,n.useState)(0!=t.eventIndex),{setCloseClickComponent:y}=(0,n.useContext)(fi),[b,C]=(0,n.useState)(!1),[S]=(0,u.QN)("whatmoreShopId"),[k]=(0,u.QN)("whatmoreLandingLocationType"),I=(0,u.Xd)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:_,whatmoreUserInfo:z}=(0,n.useContext)(M.B),[E,T]=(0,n.useState)(!1),[N,A]=(0,n.useState)(null);function P(){T(!1)}const L=t.events,B=t.eventIndex,O=t.onBack,D=L.concat(L),W=L.length,H=null===L||void 0===L||null===(e=L[0])||void 0===e?void 0:e.brand,Y=(0,n.useRef)(0);function J(t){P(),setTimeout((()=>{O(t)}),500)}function U(){N&&!N.isEnd&&(0,u.Xd)("whatmoreAllowAutoSlide")&&N.slideNext()}(0,n.useEffect)((()=>(T(!0),()=>{})),[]),y(J);const X=_.landingLocationType,q=_.templateType,[K,$]=(0,n.useState)({}),G=parseInt(Math.min(5,L.length));return(0,x.jsx)(li,{show:E,closeCallback:P,customClass:"whatmore-landscape-modal-swipe-view",children:(0,x.jsxs)(s.BJ,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",alignItems:"center",backgroundColor:(0,R.YU)("#000000",13),children:[(0,x.jsx)(s.ov,{children:(0,x.jsx)(s.az,{height:"fit-content",width:p*G,children:(0,x.jsxs)(o.RC,{onInit:t=>{A(t),(0,Q.kz)({userInteractionType:V.O.EVENT_VIEW,widgetSourceDetails:_,event:L[t.activeIndex],productList:L[t.activeIndex].products,ctaList:L[t.activeIndex].cta})},slidesPerView:G,centeredSlides:!0,allowTouchMove:!1,initialSlide:B,modules:[r.t9,r.Vx,r.FJ,r.Ij,r.dK],navigation:G>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*d),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:p*G,watchSlidesProgress:!0,onSlideChange:t=>{var e;w?j(!1):(g||f(!0),e=L[t.activeIndex],v||m||null===e||void 0===e||!e.event_id||(async()=>{const t=(0,mt.Wd)(X)+(0,mt.gf)(q)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,l.lB)(e),"index"===k?((0,Ge.Si)(S,$e.TB,$e.Dk),(0,ot.Ch)(e.event_id,e.products,$e.TB,$e.Dk,t,null===e||void 0===e?void 0:e.location,null===z||void 0===z?void 0:z.userType)):k.startsWith("product")||"embed"===k?((0,Ge.Si)(S,$e.DK,$e.K1),(0,ot.Ch)(e.event_id,e.products,$e.DK,$e.K1,t)):k.startsWith("collection")?((0,Ge.Si)(S,$e.Sx,$e.rz),(0,ot.Ch)(e.event_id,e.products,$e.Sx,$e.rz,t)):((0,Ge.Si)(S,$e.TB,$e.Dk),(0,ot.Ch)(e.event_id,e.products,$e.TB,$e.Dk,t))})(),(0,Q.DG)({userInteractionType:V.O.VIDEO_PLAYBACK,userInteractionMetadata:K,widgetSourceDetails:_,event:L[t.activeIndex],productList:L[t.activeIndex].products,ctaList:L[t.activeIndex].cta}),(0,Q.UM)({userInteractionType:V.O.EVENT_VIEW,widgetSourceDetails:_,event:L[t.activeIndex],productList:L[t.activeIndex].products,ctaList:L[t.activeIndex].cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[L.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(F.A,{onCloseCallback:O})}),D.slice(B,L.length+B).map(((t,e)=>(0,x.jsx)(o.qr,{children:t=>{let{isActive:i,isPrev:n,isNext:o,isVisible:r,isDuplicate:l}=t;if(i)return(0,x.jsx)(s.BJ,{direction:"column",height:d,width:1*p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.az,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.YcK)(S),borderColor:(0,c.Fwt)(S)},children:(0,x.jsx)(He,{event:L[e%W],onBack:J,isPlaying:!0,isLast:e%W===L.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:U,progressUpdateCallback:t=>{$(t)},showCloseOverlay:(null===L||void 0===L?void 0:L.length)<=2,mode:"landscape"})})});if(o)return(0,x.jsx)(s.BJ,{direction:"column",height:d,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{N.slideTo(e%W,300)},children:(0,x.jsx)(s.az,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.YcK)(S),borderColor:(0,c.Fwt)(S)},children:(0,x.jsx)(He,{event:L[e%W],onBack:J,isPlaying:!1,isLast:e%W===L.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:U,progressUpdateCallback:t=>{$(t)},showOverlay:!1,mode:"landscape"})})});if(n&&1===Y.current)return(0,x.jsx)(s.BJ,{direction:"column",height:d,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{N.slideTo(e%W,300)},children:(0,x.jsx)(s.az,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.YcK)(S),borderColor:(0,c.Fwt)(S)},children:(0,x.jsx)(He,{event:L[e%W],onBack:J,isPlaying:!1,isLast:e%W===L.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:U,progressUpdateCallback:t=>{$(t)},showOverlay:!1,mode:"landscape"})})});try{B+e>=W-1&&(Y.current=1)}catch(a){console.log(a)}return(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide"+t.event_id)))]})})}),(0,x.jsx)(s.ov,{children:(0,x.jsx)(je,{brandName:H,height:.04*d,width:.1*p,fontSize:.02*d})})]})})},di=i(9769),si=i(9108),ci=i(2682),ui=i(4910);var hi=function(t){const[e,i,n,o]=(0,h.A)(),[r]=(0,u.QN)("whatmorePrimaryColor"),[l]=(0,u.QN)("whatmoreSecondaryColor"),a="flex-end";return(0,x.jsx)(s.ov,{children:(0,x.jsxs)(s.az,{width:o,height:n,backgroundColor:"whiteAlpha.200",backdropBlur:"10px",children:[(0,x.jsx)(s.BJ,{direction:"column",justifyContent:a,height:"full",width:"full",children:(0,x.jsx)(s.az,{borderRadius:"md",backgroundColor:"transparent",children:(0,x.jsx)(s.gl,{width:"full",ratio:o/n,children:(0,x.jsx)(s.az,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+r+", gray, "+l+")"})})})}),(0,x.jsx)(s.BJ,{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.az,{padding:"2px",margin:"5px",borderRadius:"md",backgroundColor:"transparent",children:(0,x.jsx)(s.gl,{width:"full",ratio:9/16,children:(0,x.jsx)(s.az,{width:"full",height:"full",borderRadius:"md",backdropFilter:"auto",backdropBlur:"5px"})})})})]})})};var pi=function(t){var e;const i=t.stories,r=t.onBack,a=t.onStoryCompleteCallback,d=t.isActive,c=null!==(e=t.initialEventIndex)&&void 0!==e?e:0,p=i.events;var[v,m,g,f]=(0,h.A)();const[w,y]=(0,j.A)(),[b]=(0,u.QN)("isInDesignMode"),[C]=(0,u.QN)("isDemoBrand"),[S]=(0,u.QN)("whatmoreShopId"),[k,I]=(0,n.useState)(!0),[_,z]=(0,u.QN)("isFirstIndicatorRenderDone"),[E,T]=(0,n.useState)(null),[F,N]=(0,n.useState)(!1),{whatmoreWidgetSourceDetails:A,whatmoreUserInfo:P}=(0,n.useContext)(M.B),[L,B]=Ze(c,p.length);function O(t){r(t)}const D=A.landingLocationType,R=A.templateType;function W(){if(!(0,u.Xd)("whatmoreAllowAutoSlide"))return;L().activeIndex+1>=p.length?a("right"):(B("right"),E&&E.slideNext())}function H(t){const e=L().activeIndex;"right"==t&&e+1>=p.length||"left"==t&&e-1<0?a(t):(B(t),E&&("left"==t?E.slidePrev():E.slideNext()))}const[Y,J]=(0,n.useState)({});return p[L().activeIndex],(0,x.jsx)("div",{children:(0,x.jsx)(o.RC,{speed:1,slidesPerView:1,direction:"horizontal",initialSlide:0,loop:!0,height:g,width:f,watchSlidesProgress:!0,allowTouchMove:!1,onSwiper:t=>{T(t)},onSlideChange:t=>{k?I(!1):(_||z(!0),(0,Q.DG)({userInteractionType:V.O.VIDEO_PLAYBACK,userInteractionMetadata:Y,widgetSourceDetails:A,event:p[L().activeIndex],productList:p[L().activeIndex].products,ctaList:p[L().activeIndex].cta}),function(t){const e=(0,mt.Wd)(D)+(0,mt.gf)(R)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);b||C||(async()=>{(0,l.lB)(t),(0,Ge.Si)(S,$e.TB,$e.OL),(0,ot.Ch)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===P||void 0===P?void 0:P.userType)})()}(p[L().activeIndex]),(0,Q.kz)({userInteractionType:V.O.EVENT_VIEW,widgetSourceDetails:A,event:p[L().activeIndex],productList:p[L().activeIndex].products,ctaList:p[L().activeIndex].cta}))},children:[...Array(Math.min(p.length,3)).keys()].map((e=>(0,x.jsx)(o.qr,{children:e=>{let{isActive:n,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=e;if(d){const e=n?"activeIndex":o?"prevIndex":"nextIndex",r=p[L()[e]];return(0,x.jsx)(s.BJ,{direction:"column",height:g,justifyContent:"center",children:(0,Be.ij)(r)||(0,Be.Il)(r)?(0,x.jsx)(Le,{event:r,totalSiblingEvents:p.length,indexAmongSiblings:L()[e],onBack:O,isPlaying:d&&n&&l,isLast:!1,setLockSwiper:N,onVideoEndedCallback:W,progressUpdateCallback:t=>{J(t)},leftOpenSpaceClickHandler:()=>{H("left")},midOpenSpaceClickHandler:()=>{y(!w)},rightOpenSpaceClickHandler:()=>{H("right")},storyId:i.id,source:Qe.N.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.BJ,{direction:"column",height:v,justifyContent:"center",children:(0,x.jsx)(hi,{})})}},"event-story-view-slide-"+e)))})})};var vi=function(t){const e=t.onBack,i=t.eventsStories,a=t.initialStoryIndex;var[d,c,p,v]=(0,h.A)();const[m]=(0,u.QN)("isInDesignMode"),[g]=(0,u.QN)("isDemoBrand"),[f,w]=(0,n.useState)(!0),[j,y]=(0,u.QN)("isFirstIndicatorRenderDone"),[b,C]=(0,n.useState)(!1),{setCloseClickComponent:S}=(0,n.useContext)(fi),{slideDirection:k}=(0,n.useContext)(fi),[I]=(0,u.QN)("whatmoreShopId"),[_,z]=Ze(a,i.length),[E,T]=ti("horizontal",50),[F]=ei("vertical",30),N=t.eventIndex,[A,P]=(0,n.useState)(!1),[L,B]=(0,n.useState)(null),{whatmoreWidgetSourceDetails:O,whatmoreUserInfo:D}=(0,n.useContext)(M.B);function R(){P(!1)}function W(t){R(),setTimeout((()=>{e(t)}),500)}(0,n.useEffect)((()=>(P(!0),()=>{})),[]),S(W);const H=O.landingLocationType,Y=O.templateType;function J(t){L&&(0,u.Xd)("whatmoreAllowAutoSlide")&&(z(t),"right"==t?L.slideNext():L.slidePrev())}function U(t,e){J(e)}return(0,x.jsx)(Je(),{isOpen:A,onAfterOpen:function(){},onRequestClose:R,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=>{E(t)},onTouchEnd:t=>{const e=T(t);e&&U(0,e)},onWheel:t=>{F(t,(t=>{U(0,t)}))},children:(0,x.jsx)(o.RC,{speed:1,slidesPerView:1,direction:"horizontal",modules:[r.hw,r.FJ],initialSlide:a,loop:i.length>1,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,onSwiper:t=>{var e,n;B(t),(0,Q.kz)({userInteractionType:V.O.EVENT_VIEW,widgetSourceDetails:O,event:i[_().activeIndex].events[0],productList:null===(e=i[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=i[_().activeIndex].events[0])||void 0===n?void 0:n.cta})},onSlideChange:t=>{var e,n;f?w(!1):(!function(t){const e=(0,mt.Wd)(H)+(0,mt.gf)(Y)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);m||g||(async()=>{(0,l.lB)(t),(0,Ge.Si)(I,$e.TB,$e.OL),(0,ot.Ch)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===D||void 0===D?void 0:D.userType)})()}(i[_().activeIndex].events[0]),(0,Q.kz)({userInteractionType:V.O.EVENT_VIEW,widgetSourceDetails:O,event:i[_().activeIndex].events[0],productList:null===(e=i[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=i[_().activeIndex].events[0])||void 0===n?void 0:n.cta}))},allowTouchMove:!1,cubeEffect:{shadow:!0,slideShadows:!0,shadowOffset:20,shadowScale:.94},children:[...Array(Math.min(i.length,3)).keys()].map((t=>(0,x.jsx)(o.qr,{children:t=>{let{isActive:e,isPrev:n,isNext:o,isVisible:r,isDuplicate:l}=t;const c=e?"activeIndex":n?"prevIndex":"nextIndex";return(0,x.jsx)(s.BJ,{direction:"column",height:d,justifyContent:"center",children:(0,x.jsx)(pi,{stories:i[_()[c]],onBack:W,isActive:e&&r,isNext:o,isPrev:n,onStoryCompleteCallback:J,nextStories:i[_().nextIndex],prevStories:i[_().prevIndex],initialEventIndex:a==_()[c]?N:0},"event-story-view-"+i[_()[c]].id)})}},"event-vertical-scroll-slide-"+t)))})})})};var xi=function(t){var e,i,o,[r,l,a,d]=(0,h.A)();const[c]=(0,u.QN)("whatmorePrimaryColor"),[p]=(0,u.QN)("whatmoreSecondaryColor"),v=t.event,m=(t.onBack,n.useRef(),null!==(e=t.showPausedVideo)&&void 0!==e&&e),f=null!==(i=t.heightFactor)&&void 0!==i?i:1,w="flex-end";return d*=null!==(o=t.widthFactor)&&void 0!==o?o:1,a*=f,(0,x.jsx)(s.ov,{children:(0,x.jsxs)(s.az,{width:d,height:a,children:[(0,x.jsx)(s.BJ,{direction:"column",justifyContent:w,height:"full",width:"full",children:(0,x.jsx)(s.az,{children:(0,x.jsx)(s.gl,{width:"full",ratio:9/16,children:m?(0,Be.ij)(v)||(0,Be.Il)(v)?(0,x.jsx)(ye.A,{height:"100%",width:"100%",url:v.thumbnail_image,isPlaying:!1,pauseFromPlayTimeInMs:1e3,event:v}):(0,x.jsx)(g._V,{width:"full",height:"full",src:v.thumbnail_image,objectFit:"cover",borderRadius:"lg"}):(0,x.jsx)(s.az,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+c+", gray, "+p+")"})})})}),(0,x.jsx)(s.BJ,{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.az,{children:(0,x.jsx)(s.gl,{width:"full",ratio:9/16,children:(0,x.jsx)(s.az,{width:"full",height:"full",backgroundColor:"blackAlpha.400"})})})})]})})};var mi=function(t){var e,i,[a,d,c,p]=(0,h.A)();const[v]=(0,u.QN)("isInDesignMode"),[m]=(0,u.QN)("isDemoBrand"),[g,f]=(0,u.QN)("isFirstIndicatorRenderDone"),[w,j]=(0,n.useState)(0!=t.eventIndex),{setCloseClickComponent:y}=(0,n.useContext)(fi),[b,C]=(0,n.useState)(!1),[S]=(0,u.QN)("whatmoreShopId"),{whatmoreWidgetSourceDetails:k,whatmoreUserInfo:I}=(0,n.useContext)(M.B),[_,z]=(0,n.useState)(!1),[E,T]=(0,n.useState)(null);function N(){z(!1)}t.events;const A=t.eventIndex,P=t.onBack,L=t.eventsStories,B=t.initialStoryIndex,O=null===(e=L[0])||void 0===e||null===(i=e.events[0])||void 0===i?void 0:i.brand;function D(t){N(),setTimeout((()=>{P(t)}),500)}(0,n.useEffect)((()=>(z(!0),()=>{})),[]),y(D);const R=k.landingLocationType,W=k.templateType;function H(t){E&&!E.isEnd&&("right"==t?E.slideNext():E.slidePrev())}const Y=parseInt(Math.min(5,L.length));return(0,x.jsx)(li,{show:_,closeCallback:N,customClass:"whatmore-landscape-modal-stories-view",children:(0,x.jsxs)(s.BJ,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",alignItems:"center",backgroundColor:"blackAlpha.800",children:[(0,x.jsx)(s.ov,{children:(0,x.jsx)(s.az,{height:"fit-content",width:p*Y,children:(0,x.jsxs)(o.RC,{onInit:t=>{var e,i;T(t),(0,Q.kz)({userInteractionType:V.O.EVENT_VIEW,widgetSourceDetails:k,event:L[t.activeIndex].events[0],productList:null===(e=L[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=L[t.activeIndex].events[0])||void 0===i?void 0:i.cta})},slidesPerView:Y,centeredSlides:!0,allowTouchMove:!1,initialSlide:B,modules:[r.t9,r.Vx,r.FJ],navigation:Y>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*c),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:p*Y,watchSlidesProgress:!0,onSlideChange:t=>{var e,i;w?j(!1):(g||f(!0),function(t){const e=(0,mt.Wd)(R)+(0,mt.gf)(W)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);v||m||(async()=>{(0,l.lB)(t),(0,Ge.Si)(S,$e.TB,$e.OL),(0,ot.Ch)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===I||void 0===I?void 0:I.userType)})()}(L[t.activeIndex].events[0]),(0,Q.kz)({userInteractionType:V.O.EVENT_VIEW,widgetSourceDetails:k,event:L[t.activeIndex].events[0],productList:null===(e=L[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=L[t.activeIndex].events[0])||void 0===i?void 0:i.cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[L.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(F.A,{onCloseCallback:P})}),L.map(((t,e)=>(0,x.jsx)(o.qr,{children:i=>{let{isActive:n,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=i;if(n){const i=1;return(0,x.jsx)(s.BJ,{direction:"column",height:c,width:p*i,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.az,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(pi,{stories:t,onBack:D,isActive:n&&l,isNext:!1,isPrev:!1,onStoryCompleteCallback:H,initialEventIndex:B==e?A:0,showCloseOverlay:(null===L||void 0===L?void 0:L.length)<=2},"event-story-view-"+t.id)})})}return o||r?(0,x.jsx)(s.BJ,{direction:"column",height:c,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{E.slideTo(e,300)},children:(0,x.jsx)(s.az,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(xi,{showPausedVideo:!0,event:L[e].events[0],onBack:D,isPlaying:!1,setLockSwiper:C})})}):(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide-"+e)))]})})}),(0,x.jsx)(s.ov,{children:(0,x.jsx)(je,{brandName:O,height:.04*c,width:.1*p,fontSize:.02*c})})]})})};const gi=(0,ui.A)({key:"whatmore-css-sv"}),fi=(0,n.createContext)({isIOS:!1,totalEvents:0,closeClickComponent:null,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:"vertical",showSwipeIndicator:!0,questionList:[]});var wi=function(t){var e,i,o;const[r,l,a]=(0,me.A)(),[d]=(0,u.QN)("whatmoreShopId"),{whatmoreRootId:s}=(0,n.useContext)(M.B),{whatmoreIsStoriesTemplate:h}=(0,n.useContext)(M.B);var p=t.events,v=t.index,m=t.onBack,g=t.eventsStories,f=t.initialStoryIndex,w=(0,c.M3_)(d),j="portrait"===r?null!==(e=t.slideDirection)&&void 0!==e?e:"vertical":null!==(i=t.slideDirection)&&void 0!==i?i:p.length>1?"horizontal":"vertical",y="portrait"===r?!(0,c.kb)(d)&&!h:(0,c.DNc)(d);return(0,n.useLayoutEffect)((()=>{(0,c.hpk)(d)&&(window.location.href.includes(w)?history.replaceState(null,"","#"+w):history.pushState(null,"","#"+w),window.addEventListener("popstate",(()=>{window.location.href.includes(w)||m()})))}),[]),delete si.Ay.styles.global,h?(0,x.jsx)(ci.C,{value:gi,children:(0,x.jsx)(di.s,{theme:si.Ay,cssVarsRoot:s,resetCSS:!1,children:(0,x.jsx)(fi.Provider,{value:{isIOS:(0,Oe.MN)(),totalEvents:p.length,closeClickComponent:m,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:j,showSwipeIndicator:y},children:"portrait"===r?(0,x.jsx)(vi,{eventsStories:g,initialStoryIndex:f,onBack:m,eventIndex:v}):(0,c.Rdb)(d)?(0,x.jsx)(mi,{eventsStories:g,initialStoryIndex:f,onBack:m,eventIndex:v}):(0,x.jsx)(vi,{eventsStories:g,initialStoryIndex:f,onBack:m,eventIndex:v})})})}):(0,x.jsx)(ci.C,{value:gi,children:(0,x.jsx)(di.s,{theme:si.Ay,cssVarsRoot:s,resetCSS:!1,children:(0,x.jsx)(fi.Provider,{value:{isIOS:(0,Oe.MN)(),totalEvents:p.length,closeClickComponent:m,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:j,showSwipeIndicator:y,questionList:(0,c.JwJ)(d)?null===(o=JSON.parse(localStorage.getItem("_whatmore_brand_questions")))||void 0===o?void 0:o.questionList:[]},children:"portrait"===r?(0,x.jsx)(ni,{events:p,eventIndex:v,onBack:m}):(0,x.jsx)(ai,{events:p,eventIndex:v,onBack:m})})})})}},5144:function(t,e,i){i.d(e,{jd:function(){return o}});var n=i(8283);const o=`\n ${n.i7`
|
76
|
+
`} 0.5s`,kt=null===V||void 0===V||null===(e=V.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,_t]=(0,n.useState)(-1!==kt?null===(i=V.options)||void 0===i||null===(o=i[kt])||void 0===o||null===(r=o.values)||void 0===r?void 0:r[0]:""),[zt,Et]=(0,n.useState)({});(0,n.useEffect)((()=>{-1!==kt&&"whatmore"!==(0,c.NCy)(jt)&&async function(){const t=await(0,lt._N)(H);Et(t)}()}),[]);let Tt=-1,Ft=-1!==kt&&null!==zt&&void 0!==zt&&zt.product&&(null===zt||void 0===zt||null===(l=zt.product)||void 0===l||null===(a=l.images)||void 0===a?void 0:a.length)>=(null===zt||void 0===zt||null===(d=zt.product)||void 0===d||null===(p=d.options)||void 0===p||null===(v=p[kt])||void 0===v||null===(m=v.values)||void 0===m?void 0:m.length)?null===zt||void 0===zt||null===(f=zt.product)||void 0===f||null===(w=f.images)||void 0===w?void 0:w.map((t=>{var e,i,n,o,r,l,a,d,s,c,u,h,p,v;const x=null===zt||void 0===zt||null===(e=zt.product)||void 0===e||null===(i=e.options)||void 0===i?void 0:i.findIndex((t=>"Color"==(null===t||void 0===t?void 0:t.name)||"Colour"==(null===t||void 0===t?void 0:t.name)||"COLOR"==(null===t||void 0===t?void 0:t.name)));return{color:(null===t||void 0===t?void 0:t.variant_ids.length)>0?null===zt||void 0===zt||null===(n=zt.product)||void 0===n||null===(o=n.options)||void 0===o||null===(r=o[x])||void 0===r||null===(l=r.values)||void 0===l?void 0:l[Math.min(++Tt,(null===zt||void 0===zt||null===(a=zt.product)||void 0===a||null===(d=a.options)||void 0===d||null===(s=d[kt])||void 0===s||null===(c=s.values)||void 0===c?void 0:c.length)-1)]:null===zt||void 0===zt||null===(u=zt.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}})):[],Nt=[];if("whatmore"==(0,c.NCy)(jt)&&(null===V||void 0===V||null===(j=V.images)||void 0===j?void 0:j.length)>0){var At;var Pt;if(-1!==(null===V||void 0===V||null===(At=V.options)||void 0===At?void 0:At.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"))}))))Nt=null===V||void 0===V||null===(Pt=V.images)||void 0===Pt?void 0:Pt.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc})))}return Tt+1<(null===zt||void 0===zt||null===(y=zt.product)||void 0===y||null===(b=y.options)||void 0===b||null===(S=b[kt])||void 0===S||null===(k=S.values)||void 0===k?void 0:k.length)&&(Ft=[]),(0,x.jsxs)(s.so,{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===wt||void 0===wt?void 0:wt.whatmoreUITheme)?"xl":null,animation:St,children:[(0,x.jsx)(Jt,{setOpenShopNow:Y,setLockSwiper:J,FONT_SIZE:R}),(0,x.jsx)(s.ov,{marginBottom:"10px",px:"20px",py:"5px",children:(0,x.jsx)(s.so,{bg:"whiteAlpha.900",width:"fit-content",height:"fit-content",borderRadius:"round"==(null===wt||void 0===wt?void 0:wt.whatmoreUITheme)?"lg":null,overflow:"hidden",sx:{borderWidth:(0,c.YcK)(jt),borderColor:(0,c.Fwt)(jt)},children:(0,x.jsx)(s.so,{width:"100%",children:(0,x.jsx)($t.c,{renderElement:t=>(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(s.az,{width:B+"px",height:D+"px",children:(0,x.jsx)(g._V,{width:B+"px",height:D+"px",borderRadius:"round"==(null===wt||void 0===wt?void 0:wt.whatmoreUITheme)?"lg":null,src:(0,pt.b)(t.eventData.src,"&width=400&height=400"),alt:H.handle,sx:{objectFit:(0,c.KZe)(jt)+" !important"},fallback:(0,x.jsx)(O.A,{width:B+"px",height:D+"px",borderRadius:"round"==(null===wt||void 0===wt?void 0:wt.whatmoreUITheme)?"10px":"0px"})})})}),dataList:Ft.length>0&&!Ft.includes(null)?null===(I=Ft)||void 0===I?void 0:I.filter((t=>(null===t||void 0===t?void 0:t.color)==It)):Nt.length>0?[null===(_=Nt)||void 0===_?void 0:_.find((t=>(null===t||void 0===t?void 0:t.color)==It))]:null===V||void 0===V||null===(z=V.images)||void 0===z?void 0:z.map((t=>({src:t.includes("https")?t:"https:"+t}))),spacing:10,defaultHeight:B+"px",defaultWidth:D+"px",retainAlreadyRenderedElements:!0,isScroll:!0})})})}),(0,x.jsx)(qt,{data:V,product:H,PRODUCT_TILE_HEIGHT:L,PRODUCT_TILE_WIDTH:P,FONT_SIZE:R,getVariantPrice:te,selectedVariantId:it,itemPrice:dt,itemQuantity:ot,setItemQuantity:at,thumbnailImage:gt}),(null===V||void 0===V||null===(E=V.variants)||void 0===E?void 0:E.length)>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s.ov,{paddingTop:"4px",width:"100%",children:(0,x.jsx)(s.cG,{color:(0,c.R6d)(jt),size:"xs",width:"90%"})}),(0,x.jsx)(Kt,{data:V,dividerColor:(0,c.R6d)(jt),setSelectedColor:_t,finalArr:Ft,finalArrExternal:Nt,product:H,PRODUCT_TILE_HEIGHT:L,PRODUCT_TILE_WIDTH:P,FONT_SIZE:R,selectOptionFirstHandler:yt,selectOptionSecondHandler:bt,selectOptionThirdHandler:Ct,getVariantPrice:te,selectedOptionFirst:K,selectedOptionSecond:G,selectedOptionThird:tt,selectedVariantId:it,isVariantAvailable:q})]}),c.wW8&&((null===V||void 0===V?void 0:V.description)||(null===V||void 0===V?void 0:V.body_html))&&(0,x.jsx)(Ut,{PRODUCT_TILE_HEIGHT:L,FONT_SIZE:R,data:V,handleToggle:()=>Q(!W),show:W}),(0,x.jsx)(s.az,{sx:{pointerEvents:"none"},paddingTop:"20px",opacity:0,children:(0,x.jsx)(Yt,{position:"relative",data:V,FONT_SIZE:R,product:H})}),(0,x.jsx)(Yt,{position:"fixed",selectedVariantId:it,data:V,FONT_SIZE:R,PRODUCT_TILE_WIDTH:P,product:H,itemQuantity:ot,cartItemCount:ct,addToCartFlag:ht,setAddToCartFlag:vt,soldOutFlag:xt,setSoldOutFlag:mt,event:M})]})}const Zt=(t,e,i,n)=>{var o;if(!e&&!i&&!n)return;const r=null===t||void 0===t||null===(o=t.variants)||void 0===o?void 0:o.find((t=>(!e||t.option1===e)&&(!i||t.option2===i)&&(!n||t.option3===n)));return r?r.id:void 0},te=(t,e)=>{var i,n;return null===t||void 0===t||null===(i=t.variants)||void 0===i||null===(n=i.find((t=>t.id===e)))||void 0===n?void 0:n.price},ee=(t,e)=>{var i;const n=null===t||void 0===t||null===(i=t.variants)||void 0===i?void 0:i.find((t=>t.id==e));return void 0===n?null:null===n||void 0===n||null===(o=n.featured_image)||void 0===o?void 0:o.src;var o},ie=(0,n.createContext)({setShowOptionsChart:null});var ne=function(t){const e=t.event,i=t.data,o=t.currentProduct,r=t.setOpenShopNow,l=t.setLockSwiper,[a,d]=(0,n.useState)(!1);return(0,x.jsx)(ie.Provider,{value:{setShowOptionsChart:d},children:(0,x.jsxs)(s.az,{width:"full",height:"full",borderRadius:"md",children:[(0,x.jsx)(s.BJ,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",children:(0,x.jsx)(s.az,{width:"full",height:"fit-content",children:(0,x.jsx)(Gt,{data:i,event:e,product:o,setOpenShopNow:r,setLockSwiper:l})})}),a?(0,x.jsx)(s.BJ,{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.az,{width:"full",height:"fit-content",children:(0,x.jsx)(Wt,{data:i,event:e,product:o,setShowOptionsChart:()=>{d(!1)}})})}):(0,x.jsx)(x.Fragment,{})]})})};var oe=function(t){var e,[i,o,r,l]=(0,h.A)();const[a,d]=(0,n.useState)(!1),[v,g]=(0,n.useState)(),[f,w]=(0,n.useState)(),j=(0,u.Xd)("whatmoreShopId"),y=t.event,b=t.onBack,C=n.useRef(),S=t.isPlaying,k=t.isLast,I=t.setLockSwiper,_=t.selectedVariantId,z=null===(e=t.showOverlay)||void 0===e||e,E="center";return(0,x.jsx)(s.ov,{children:(0,x.jsxs)(s.az,{width:l,height:r,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.BJ,{direction:"column",justifyContent:E,height:"full",width:"full",children:(0,x.jsx)(s.az,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.gl,{width:"full",ratio:l/r,children:(0,x.jsx)(m,{height:"100%",width:"100%",url:y.event_hls_url,isPlaying:S,event:y})})})}),z?(0,x.jsx)(s.BJ,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:E,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.az,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(Dt,{focusRef:C,event:t.event,isLast:k,onCloseCallback:b,productClickHandler:async t=>{const e=await(0,p.M)(t,(0,c.NCy)(j),j);w(t),g(e),d(!0),I(!0)}})})}):(0,x.jsx)(x.Fragment,{}),!0===a?(0,x.jsx)(s.BJ,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:E,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.az,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(ne,{focusRef:C,event:t.event,isLast:k,onCloseCallback:()=>b(),setLockSwiper:I,data:v,currentProduct:f,setOpenShopNow:d,selectedVariantId:_})})}):(0,x.jsx)("div",{})]})})};const re=function(t,e){return isNaN(t)||isNaN(e)||e<=0||t>e?0:Math.ceil(t/e*100)};function le(t){var e,i,[n,o,r,l]=(0,h.A)();const[a]=(0,u.QN)("whatmoreSecondaryColor"),[d]=(0,u.QN)("whatmoreSecondaryColorShade900"),c=t.progress,p=null!==(e=t.totalSiblings)&&void 0!==e?e:1,v=null!==(i=t.indexAmongSiblings)&&void 0!==i?i:0;return(0,x.jsx)(s.BJ,{width:"96%",height:"fit-content",direction:"row",justifyContent:"center",alignItems:"center",spacing:"1px",children:[...Array(p).keys()].map((t=>(0,x.jsx)(s.BJ,{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.az,{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 ae=i(3788),de=i(758);const se=t=>t>=1e3?(t/1e3).toFixed(1)+"k":t,ce=()=>"undefined"!==typeof window&&window.innerWidth>=1024;var ue=function(t){var e,i,o,r,a,d=t.whatmoreShareTemplateId;const p=t.whatmoreShareStoryId,v=t.whatmoreShareEventId,m=t.event,g=null===(e=t.showShareText)||void 0===e||e,f=null!==(i=t.shareButtonBottomMargin)&&void 0!==i?i:0,w=(0,u.Xd)("whatmoreShopId"),j=(0,u.Xd)("isInDesignMode"),y=(0,u.Xd)("isDemoBrand"),b=(0,u.Xd)("whatmorePrimaryFont"),C=(0,u.Xd)("websiteLanguage"),{whatmoreWidgetSourceDetails:S}=(0,n.useContext)(M.B),[k,I,_,z]=(0,h.A)(),E=null!==(o=t.iconSize)&&void 0!==o?o:.1*z*(0,c.xkB)(w);function T(){const e=(0,u.Xd)("whatmoreLandingLocationType");var i;!function(t){j||y||(async()=>{(0,l.Zh)(t)})()}(m),(e.startsWith("product")||"embed"===e)&&(d="te"),i="event_product_link"===(0,c.moP)(w)?m.products[0].product_link||"":window.location.pathname,i=("event_product_link"===(0,c.moP)(w)?"":window.location.hostname)+i+"?wtt="+d+"&wsid="+p+"&weid="+v,(0,c.BLb)(w)&&(i=i+"&"+(0,c.VCz)(w)+"&utm_campaign=video-share&utm_medium="+e);const n={title:(0,c.kZI)(w),text:`${(0,c.dmA)(w)} \n ${i} ${(0,c.ZX9)(w)?"\n \n -via Whatmore":""}`};navigator.share&&!ce?navigator.share(n):(t.setIsModalOpen(!0),t.setShareText([n,i]))}return(0,x.jsx)(s.ov,{children:(0,x.jsx)(s.jl,{cursor:"pointer",style:{marginBottom:f+"px"},children:(0,x.jsxs)(s.BJ,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[(0,x.jsx)(de.A,{sx:{transform:"scaleX(-1)",color:"white",fontSize:E,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),T(),(0,Q.kz)({userInteractionType:V.O.VIDEO_SHARE_CTA_CLICKED,widgetSourceDetails:S,event:m,productList:m.products,ctaList:m.cta})}}),g&&(0,c.ViG)(w)?(0,x.jsxs)(s.EY,{fontSize:.3*E+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:b+" !important",color:"white !important",paddingRight:"10%",maxWidth:"48px",wordWrap:"break-word"},children:["\xa0",m.total_share>(0,c.vDV)(w)?se(m.total_share):null!==(r=null===G||void 0===G||null===(a=G[C])||void 0===a?void 0:a.share)&&void 0!==r?r:"Share","\xa0"]}):(0,x.jsx)(x.Fragment,{})]})})})},he=i(3420),pe=i(7170);var ve=function(t){var e,i,o;const r=(0,u.Xd)("whatmoreShopId"),a=(0,u.Xd)("whatmorePrimaryFont"),d=(0,u.Xd)("whatmoreLikedEvents"),p=(0,u.Xd)("isInDesignMode"),v=(0,u.Xd)("isDemoBrand"),m=(0,u.Xd)("websiteLanguage"),{whatmoreWidgetSourceDetails:g}=(0,n.useContext)(M.B),f=t.event,[w,j]=(0,n.useState)(null!==(e=d[f.event_id])&&void 0!==e&&e),[y,b,C,S]=(0,h.A)(),k=.1*S*(0,c.xkB)(r);function I(t,e){p||v||(async()=>{(0,l.$B)(t,e)})()}function _(){(0,u.t2)("whatmoreLikedEvents",{...d,[f.event_id]:!w}),w?(I(f,-1),(0,Q.kz)({userInteractionType:V.O.VIDEO_UNLIKED,widgetSourceDetails:g,event:f,productList:f.products,ctaList:f.cta})):(I(f,1),(0,Q.kz)({userInteractionType:V.O.VIDEO_LIKED,widgetSourceDetails:g,event:f,productList:f.products,ctaList:f.cta})),j(!w)}const z=f.total_like+(w?1:0);return(0,x.jsx)(s.ov,{children:(0,x.jsx)(s.jl,{cursor:"pointer",children:(0,x.jsxs)(s.BJ,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[w?(0,x.jsx)(pe.A,{sx:{boxShadow:3,color:(0,c.MJ6)(r),fontSize:k,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),_()}}):(0,x.jsx)(he.A,{sx:{boxShadow:3,color:"white",fontSize:k,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:t=>{t.stopPropagation(),_()}}),(0,x.jsx)(x.Fragment,{children:(0,c.FlI)(r)?(0,x.jsxs)(s.EY,{fontSize:.3*k+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:a+" !important",color:"white !important",position:"relative",bottom:"5px"},children:["\xa0",z>=(0,c.LGx)(r)?se(z):null!==(i=null===G||void 0===G||null===(o=G[m])||void 0===o?void 0:o.like)&&void 0!==i?i:"Like","\xa0"]}):(0,x.jsx)(x.Fragment,{})})]})})})};const xe=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 me=i(7300);const ge=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"})})})},fe=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 we=t=>{const e=t.shareText,[i,o]=(0,n.useState)("Copy link"),[r,l]=(0,n.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://www.whatmore.ai"},src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",backgroundColor:"transparent",borderRadius:"0px",width:Math.min(t.iconSize,28)+"px"}}),(0,x.jsx)(Rt.A,{onClick:e=>{e.stopPropagation(),t.setIsModalOpen(!1)}})]}),(0,x.jsx)("div",{}),(0,x.jsx)(s.cG,{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 i;t.stopPropagation();const n=encodeURIComponent(null===(i=e[0])||void 0===i?void 0:i.text);window.open(`https://wa.me/?text=${n}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(xe,{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 i;t.stopPropagation();const n=encodeURIComponent(null===(i=e[0])||void 0===i?void 0:i.text);window.open(`https://twitter.com/intent/tweet?text=${n}`,"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(ge,{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]),o("Link copied"),l("green")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,x.jsx)(fe,{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:r},children:i})]})]})]})})};var je=function(t){var e,i;const n=null===(e=t.brandName)||void 0===e?void 0:e.replace(/\s+/g,"_"),o=(0,u.Xd)("whatmorePrimaryFont"),r=(0,u.Xd)("whatmoreShopId"),l=null!==(i=t.fontSize)&&void 0!==i?i:"8",[a]=(0,me.A)(),d=`https://www.whatmore.ai/shoppable-videos?utm_source=${n}&utm_medium=referral&utm_campaign=${"landscape"===a?"customer_referral_desktop":"customer_referral_mobile"}`;return(0,x.jsx)(s.N_,{href:d,isExternal:!0,children:(0,c.SGs)(r)&&(0,x.jsxs)(s.BJ,{direction:"row",justifyContent:"flex-start",alignItems:"center",width:"fit-content",spacing:"2px",paddingLeft:"2px",paddingRight:"2px",children:[(0,x.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-family",o,"important"),t.style.setProperty("font-size",1.1*l+"px","important"),t.style.setProperty("text-align","center","important"),t.style.setProperty("color","white"))},children:"powered by Whatmore"}),(0,x.jsx)(s.az,{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*l,backgroundColor:"transparent",borderRadius:"0px"}})]})})},ye=i(9879),be=i(2209);var Ce=()=>(0,x.jsxs)(s.az,{as:"svg",width:"46px",height:"46px",viewBox:"0 0 24 24",fill:"none",className:"tick-animation",marginBottom:"20px",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"11",stroke:"gray",strokeWidth:"2",fill:"none"}),(0,x.jsx)("path",{d:"M7 12l3 3 7-7",stroke:"gray",strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]});var Se=t=>{var e;const i={text:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.title,options:(null===t||void 0===t?void 0:t.options)||[]},[o,r]=(0,n.useState)(!1),[l,a]=(0,n.useState)(null),[d,c]=(0,n.useState)(null),u=(0,n.useRef)(null),h=(0,n.useContext)(M.B);return(0,n.useEffect)((()=>{if(o){const e=setTimeout((()=>{t.setIsQuestionVisible(!1)}),1e3);return()=>clearTimeout(e)}}),[o]),(0,n.useEffect)((()=>{!o&&u.current&&c(u.current.offsetHeight)}),[o]),(0,x.jsxs)(s.az,{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",minWidth:"320px",width:"fit-content",bg:"white",borderRadius:"lg",boxShadow:"md",display:"flex",flexDirection:"column",maxWidth:"90%",maxHeight:"90%",overflowY:"visible",ref:u,height:d?`${d}px`:"auto",children:[(0,x.jsx)(s.az,{position:"absolute",top:"-10px",right:"-10px",bg:"rgba(255, 255, 255, 0.8)",borderRadius:"full",padding:1,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:"10",onClick:()=>{var e;t.setIsQuestionVisible(!1),(0,Q.kz)({userInteractionType:V.O.QUESTION_CLOSED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id},widgetSourceDetails:h})},children:(0,x.jsx)(be.A,{})}),(0,x.jsx)(s.az,{bg:"gray.700",borderTopRadius:"lg",py:3,px:6,display:"flex",flexDirection:"column",justifyContent:"center",width:"100%",children:(0,x.jsx)(s.DZ,{py:6,as:"h2",textAlign:"center",style:{fontWeight:"bold",fontSize:"18px",color:"white"},children:null===i||void 0===i?void 0:i.text})}),(0,x.jsx)(s.az,{flex:"1",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",py:5,px:6,width:"100%",children:o?(0,x.jsxs)(s.az,{flex:"1",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",children:[(0,x.jsx)(Ce,{}),(0,x.jsx)(s.DZ,{as:"h3",size:"md",color:"gray.700",fontWeight:"medium",textAlign:"center",mt:4,fontSize:"lg",children:"Thank you for your response!"})]}):(0,x.jsx)(s.BJ,{spacing:5,width:"100%",align:"center",children:i.options.map(((e,i)=>(0,x.jsx)(s.az,{px:4,borderWidth:2,borderRadius:"md",cursor:"pointer",bg:l===e?"gray.200":"white",borderColor:l===e?"gray.400":"gray.200",_hover:{bg:"gray.200"},onClick:()=>(e=>{var i;a(e),r(!0),(0,Q.kz)({userInteractionType:V.O.QUESTION_ANSWERED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(i=t.question)||void 0===i?void 0:i.id,response:e},widgetSourceDetails:h})})(e),transition:"background-color 0.2s, border-color 0.2s",display:"flex",alignItems:"center",width:"100%",children:(0,x.jsx)(s.EY,{py:5,color:"gray.800",children:e})},i)))})})]})},ke=i(9935);var Ie=t=>{var e,i;const[o,r]=(0,n.useState)(""),[l,a]=(0,n.useState)(""),[d,h]=(0,n.useState)(!1),[p,v]=(0,n.useState)(!1),m=(0,u.Xd)("whatmoreShopId"),g=(0,u.Xd)("whatmoreSecondaryColor"),f=(0,u.Xd)("whatmorePrimaryFont"),w=null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.title,j=(0,n.useContext)(M.B),y=()=>{var e,i;(()=>{const{type:e}=(null===t||void 0===t?void 0:t.question)||{};return"number"===e?/^\d{10}$/.test(o):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o)})()?(h(!0),(0,Q.kz)({userInteractionType:V.O.QUESTION_ANSWERED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id,response:o,type:"number"===(null===t||void 0===t||null===(i=t.question)||void 0===i?void 0:i.type)?"leadgen:number":"leadgen:email"},widgetSourceDetails:j})):a("Please enter valid contact info.")},b=()=>{var e;t.setIsQuestionVisible(!1),(0,Q.kz)({userInteractionType:V.O.QUESTION_CLOSED,userInteractionMetadata:{questionId:null===t||void 0===t||null===(e=t.question)||void 0===e?void 0:e.id},widgetSourceDetails:j})};return(0,x.jsx)(s.so,{bg:g,p:"6%",borderRadius:"md",boxShadow:"md",width:"90vw",mx:"auto",minH:"40vh",maxH:"80vh",position:"fixed",top:"30%",left:"50%",transform:"translateX(-50%)",direction:"column",align:"center",justify:"center",zIndex:100,overflow:"hidden",children:d?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(s.az,{textAlign:"center",color:"white",children:[(0,x.jsx)(s.az,{fontSize:"2xl",fontWeight:"bold",children:"CONGRATULATIONS!"}),(0,x.jsx)(s.az,{my:"4%",fontSize:"xl",children:"Claim Now"})]}),(0,x.jsx)(s.az,{position:"absolute",top:"2%",right:"2%",zIndex:20,children:(0,x.jsx)(F.A,{onCloseCallback:b})}),(0,x.jsxs)(s.az,{position:"relative",width:"70%",onClick:()=>{const t=(0,c.TH)(m);navigator.clipboard.writeText(t).then((()=>{v(!0),setTimeout((()=>{b()}),1e3),setTimeout((()=>v(!1)),2e3)}),(()=>{console.error("Failed to copy the coupon code")}))},cursor:"pointer",children:[(0,x.jsxs)(s.az,{bg:"white",border:"2px dashed black",borderRadius:"md",p:"2%",display:"flex",alignItems:"center",justifyContent:"space-between",mt:"4%",children:[(0,x.jsx)(s.az,{as:"span",fontWeight:"bold",color:"black",children:(0,c.TH)(m)}),(0,x.jsx)(ke.A,{sx:{color:p?{whatmoreSecondaryColor:g}:"gray",cursor:"pointer",marginLeft:"2%"}})]}),p&&(0,x.jsx)(s.az,{padding:"4%",position:"absolute",left:"50%",transform:"translateX(-50%)",bg:g,color:"white",fontSize:"12px",borderRadius:"md",px:"2%",py:"0.5%",textAlign:"center",children:"Copied!"})]})]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(s.az,{textAlign:"center",color:"white",children:[(0,x.jsx)(s.az,{children:(0,x.jsx)(s.EY,{fontFamily:f,fontSize:"22px",fontWeight:"bold",children:w})}),(0,x.jsx)(s.az,{marginBottom:"10%",fontSize:"md",children:(0,c.aRV)(m)})]}),(0,x.jsx)(s.az,{position:"fixed",top:"2%",right:"2%",zIndex:20,children:(0,x.jsx)(F.A,{onCloseCallback:b})}),(0,x.jsxs)(s.so,{mt:"4%",align:"center",direction:"column",width:"80%",children:[(0,x.jsx)(s.az,{sx:{bg:"white",border:"2px solid #4A4A4A",borderRadius:"8px",paddingLeft:"4%",display:"flex",alignItems:"center",marginBottom:"6%",width:"100%",height:"auto",minH:"48px"},children:(0,x.jsx)("input",{fontFamily:f,type:"number"===(null===(i=t.question)||void 0===i?void 0:i.type)?"tel":"email",placeholder:t.placeholder,value:o,onChange:t=>{r(t.target.value),l&&a("")},onKeyDown:t=>{"Enter"===t.key&&y()},style:{fontSize:"1em",border:"none",outline:"none",width:"100%"}})}),l&&(0,x.jsx)(s.EY,{color:"red.500",mb:"4% !important",fontSize:"md",textAlign:"center",width:"100%",children:l}),(0,x.jsx)(s.az,{as:"button",bg:"#D3D3D3",color:"#343434",borderRadius:"md",fontWeight:"bold",height:"35px",display:"flex",alignItems:"center",justifyContent:"center",onClick:y,width:"50%",children:(0,x.jsx)(s.EY,{fontFamily:f,fontSize:"0.8em",padding:"2%",color:g,children:"SUBMIT"})})]})]})})};var _e=t=>{const[e,i]=(0,n.useState)(null);return(0,x.jsx)(s.az,{children:!e&&(0,x.jsx)(Ie,{question:t.question,onEmailSubmit:t=>{i(t)},setIsQuestionVisible:t.setIsQuestionVisible,placeholder:t.placeholder})})};var ze=t=>{var e;const[i,o]=(0,n.useState)(null),r=t.questionIndex,l=t.questionList;if((0,n.useEffect)((()=>{if(!(r>=l.length))return()=>(0,ot.Hm)()}),[]),r>=l.length)return;const a=null===l||void 0===l?void 0:l[r];return"string"===(null===a||void 0===a?void 0:a.type)||"number"===(null===a||void 0===a?void 0:a.type)?(0,x.jsx)(s.az,{children:(0,x.jsx)(_e,{setIsQuestionVisible:t.setIsQuestionVisible,question:a,placeholder:"number"===(null===a||void 0===a?void 0:a.type)?"Enter your phone number":"Enter your email"})}):(0,x.jsx)(s.az,{children:(0,x.jsx)(Se,{question:a,options:null===a||void 0===a||null===(e=a.answers)||void 0===e?void 0:e.values.map((t=>null===t||void 0===t?void 0:t.value)),onAnswerSelect:t=>{o(t)},selectedAnswer:i,onClose:()=>{t.setIsQuestionVisible(!1)},setIsQuestionVisible:t.setIsQuestionVisible})})},Ee=i(6118);function Te(t){var e;const i=t.event,[o,r,l,a]=(0,h.A)(),[d]=(0,u.QN)("whatmorePrimaryFont"),{whatmoreIsStoriesTemplate:p}=(0,n.useContext)(M.B),[v]=(0,u.QN)("whatmoreSecondaryColor"),[m]=(0,u.QN)("whatmoreShopId"),g=(0,c.ivI)(m),f=null!==(e=(0,c.qAx)(m))&&void 0!==e?e:[v,g,v,g,v],w=(0,n.useRef)(null);(0,n.useEffect)((()=>{w.current&&w.current.play()}),[]);const j=(0,ae.s)(null===i||void 0===i?void 0:i.storyset_thumbnail_image);return(0,x.jsx)(x.Fragment,{children:p?(0,x.jsx)(s.az,{width:"100%",height:"fit-content",padding:"5px",children:(0,x.jsxs)(s.BJ,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-start",children:[(0,x.jsx)(s.ov,{children:(0,x.jsx)(s.jl,{overflow:"hidden",size:.14*t.width+"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.B)(j)?(0,x.jsx)(ye.A,{height:"100%",width:"100%",poster:null===i||void 0===i?void 0:i.thumbnail_image,url:j,isPlaying:!0,event:{event_type:"video"},borderRadius:"50%"}):(0,x.jsx)("img",{src:j,style:{objectFit:"cover",height:"100%",width:"100%",backgroundColor:"white"}})})}),(0,x.jsx)(s.ov,{children:(0,x.jsx)(s.EY,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:.05*t.width+"px",fontWeight:"medium",lineHeight:"100%",sx:{fontFamily:d+" !important",color:"white !important",textShadow:"0px 0px 4px black !important;"},children:i.storyset_name})})]})}):(0,x.jsx)(x.Fragment,{})})}var Fe=function(t){var e,i,o;const[r,a,d]=(0,me.A)(),[p]=(0,u.QN)("isInDesignMode"),[v]=(0,u.QN)("isDemoBrand"),[m,g]=(0,u.QN)("isProductSwiperCatalogOpen"),[f,w]=(0,u.QN)("isFirstIndicatorRenderDone"),[j]=(0,u.QN)("whatmoreShopId"),b=(0,n.useContext)(fi),{whatmoreEventsBrowsingTemplate:C}=(0,n.useContext)(M.B),[S,k,I,_]=(0,h.A)(),z=(0,u.Xd)("whatmorePrimaryFont"),T=t.event,N=t.storySetId,A=t.isLast,P=t.onCloseCallback,L=t.focusRef,O=t.productClickHandler,D=t.videoPlayingData,R=t.totalSiblingEvents,W=t.indexAmongSiblings,H=t.leftOpenSpaceClickHandler,Y=t.midOpenSpaceClickHandler,J=t.rightOpenSpaceClickHandler,{whatmoreWidgetSourceDetails:U}=(0,n.useContext)(M.B),X=.1*_,[q,K]=(0,n.useState)(!1),[$,G]=(0,n.useState)([]),Z=t=>{tt.current&&!tt.current.contains(t.target)&&K(!1)},tt=(0,n.useRef)(null);(0,n.useEffect)((()=>(q?document.addEventListener("click",Z):document.removeEventListener("click",Z),()=>{document.removeEventListener("click",Z)})),[q]);const et="Free"==(0,c.yt9)(j)&&"portrait"==r;return(0,x.jsxs)(s.az,{width:"full",height:"full",borderRadius:"md",children:[t.isQuestionVisible&&(0,x.jsx)(Pt.S,{userInteractionType:V.O.QUESTION_VIEWED,userInteractionMetadata:{questionId:null===(e=t.questionList)||void 0===e||null===(i=e[t.qIndex])||void 0===i?void 0:i.id},triggerFlag:!p&&!v,children:(0,x.jsx)(ze,{questionList:t.questionList,questionIndex:t.qIndex,setIsQuestionVisible:t.setIsQuestionVisible})}),q&&(0,x.jsx)("div",{ref:tt,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)(we,{shareText:$,setShareText:G,iconSize:X,isModalOpen:q,setIsModalOpen:K})}),"55194878152"==j&&(0,x.jsx)("div",{style:{position:"absolute",boxShadow:"dark-lg",transform:"scale(1.2) translateY(10%) translateX(5%)"},children:(0,x.jsx)("img",{src:"https://s3.ap-south-1.amazonaws.com/whatmorelive.brand.other.assets/nureh/Shop_by_Sale_50_-removebg-preview.png"})}),(!t.isQuestionVisible||t.qIndex>=(null===t||void 0===t||null===(o=t.questionList)||void 0===o?void 0:o.length))&&(0,x.jsxs)(s.BJ,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,x.jsxs)(s.BJ,{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:[b.showVideoPlayingData?(0,x.jsx)(s.BJ,{direction:"row",width:"100%",height:"fit-content",marginTop:"5px",justifyContent:"center",children:(0,x.jsx)(le,{progress:re(D.current_time,D.video_duration),totalSiblings:R,indexAmongSiblings:W})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.az,{width:"full",margin:"2px",marginTop:"5px",children:(0,x.jsxs)(s.BJ,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",paddingRight:"10px",paddingLeft:"10px",children:[(0,x.jsx)(Te,{event:T,width:_}),(0,x.jsxs)(s.BJ,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,mt.Yt)(C)?(0,x.jsx)(ue,{whatmoreShareTemplateId:(0,mt.Gy)(C),whatmoreShareStoryId:N,whatmoreShareEventId:T.event_id,event:T,showShareText:!1,iconSize:.098*_,setIsModalOpen:K,setShareText:G}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(y,{focusRef:L}),("landscape"!==r||t.showCloseOverlay)&&(0,x.jsx)(F.A,{event:T,onCloseCallback:P})]})]})})]}),"78232846646"===j&&"portrait"===r&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s.az,{position:"absolute",top:.49*window.innerHeight+"px",left:.92*window.innerWidth+"px",transform:"translate(-50%, -50%)",zIndex:101,children:(0,x.jsx)(Ee.A,{style:{fontSize:1.3*X+"px",transform:"rotate(180deg)",color:"white",cursor:"pointer",filter:"drop-shadow(0 0 5px black)"},onClick:()=>{t.changeSlide(T,"right")}})}),(0,x.jsx)(s.az,{position:"absolute",top:.42*window.innerHeight+"px",left:.92*window.innerWidth+"px",transform:"translate(-50%, -50%)",zIndex:101,children:(0,x.jsx)(Ee.A,{style:{fontSize:1.3*X+"px",color:"white",cursor:"pointer",filter:"drop-shadow(0 0 5px black)"},onClick:()=>{t.changeSlide(T,"left")}})})]}),(0,x.jsxs)(s.BJ,{width:"100%",height:"100%",direction:"row",justifyContent:"center",children:[(0,x.jsx)(s.az,{width:"33%",height:"100%",onClick:()=>{H()},sx:{display:"block !important"}}),(0,x.jsx)(s.az,{width:"34%",height:"100%",onClick:()=>{Y()},sx:{display:"block !important"}}),(0,x.jsx)(s.az,{width:"33%",height:"100%",onClick:()=>{J()},sx:{display:"block !important"}})]}),(0,x.jsxs)(s.az,{width:"full",height:"fit-content",children:[b.totalEvents>1&&!f&&b.showSwipeIndicator?(0,x.jsx)(s.az,{width:"full",margin:"2px",children:(0,x.jsx)(s.BJ,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,x.jsx)(B,{swipeUp:!A})})}):null,(0,x.jsxs)(s.az,{width:"fit-content",height:"fit-content",position:"absolute",right:0,bottom:"25%",children:[(0,c.oZc)(j)&&!(0,mt.Yt)(C)?(0,x.jsx)(s.az,{ml:"auto",width:"fit-content",paddingY:"12px",paddingX:"8px",position:"relative",top:"-30px",children:(0,x.jsxs)(s.BJ,{gap:"4px",direction:"column",alignItems:"center",cursor:"pointer",onClick:function(){var t;p||v||(async()=>{(0,l.A9)(T,1)})(),(0,Q.kz)({userInteractionType:V.O.WHATSAPP_ICON_CLICKED,widgetSourceDetails:U,event:T,productList:null===T||void 0===T?void 0:T.products,ctaList:null===T||void 0===T?void 0:T.cta});const e=T.products.map((t=>`${t.product_link} \n`)),i=(0,c.dzp)(j),n=`Hey, I am interested in ${T.products.length>1?"these products":"this product"} I saw on ${null===(t=T.products[0])||void 0===t?void 0:t.brand} store: \n${e}. Could you please help me with some queries?`;window.open(i+`&text=${n}&type=phone_number`,"_blank")},children:[(0,x.jsx)(xe,{iconSize:.7*X,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,x.jsx)(s.EY,{fontSize:X*(0,c.LOH)(j)+"px",fontWeight:"bold",align:"center",style:{marginTop:0},sx:{fontFamily:z+" !important",color:"white !important"},children:(0,c.wtw)(j)})]})}):(0,x.jsx)(x.Fragment,{}),(0,c.MdM)(j)?(0,x.jsx)(s.az,{width:"full",height:"fit-content",paddingX:"12px",position:"relative",top:"-30px",children:(0,x.jsx)(s.BJ,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(ve,{event:T})})}):(0,x.jsx)(x.Fragment,{}),(0,c.iQ5)(j)&&!(0,mt.Yt)(C)?(0,x.jsx)(s.az,{width:"full",height:"fit-content",paddingX:"12px",position:"relative",top:"-30px",children:(0,x.jsx)(s.BJ,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(ue,{whatmoreShareTemplateId:(0,mt.Gy)(C),whatmoreShareStoryId:N,whatmoreShareEventId:T.event_id,event:T,setIsModalOpen:K,setShareText:G})})}):(0,x.jsx)(x.Fragment,{})]}),(0,At.Z_)(T)?(0,x.jsxs)(s.az,{width:"full",children:[(0,c.ek9)(j)?(0,x.jsx)(s.az,{w:"100%",children:(0,x.jsx)(s.BJ,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(E,{event:T,onToggle:t=>{g("minimize-button"!==t)}})})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.az,{display:"flex",width:"100%",height:"fit-content",children:(0,x.jsx)(Bt,{event:T,productClickHandler:O})})]}):(0,x.jsx)(x.Fragment,{})]}),et&&(0,x.jsx)(s.BJ,{direction:"row",width:"100%",height:"fit-content",bg:"rgba(52, 52, 52, 0.9)",py:"3px",justifyContent:"center",children:(0,x.jsx)(je,{brandName:null===T||void 0===T?void 0:T.brand,fontSize:.033*_})})]})]})},Ne=i(5491),Ae=i.n(Ne),Pe=i(6493);var Le=function(t){var e,i,o,r,l,a,[d,m,g,f]=(0,h.A)();const[w,j]=(0,n.useState)(!1),[y,b]=(0,n.useState)(),[C,S]=(0,n.useState)(),[k,I]=(0,n.useState)({current_time:0,video_duration:0,is_video_ended:!1}),_=(0,u.Xd)("whatmoreShopId"),z=t.event,E=t.storyId,T=t.onBack,F=n.useRef(),N=t.changeSlide,A=t.isPlaying,P=t.isLast,L=t.setLockSwiper,B=t.onVideoEndedCallback,O=t.progressUpdateCallback,D=null!==(e=t.totalSiblingEvents)&&void 0!==e?e:0,R=null!==(i=t.indexAmongSiblings)&&void 0!==i?i:0,W=null===(o=t.showOverlay)||void 0===o||o,H=null!==(r=t.leftOpenSpaceClickHandler)&&void 0!==r?r:()=>{},Y=null!==(l=t.midOpenSpaceClickHandler)&&void 0!==l?l:()=>{},J=null!==(a=t.rightOpenSpaceClickHandler)&&void 0!==a?a:()=>{},{whatmoreWidgetSourceDetails:U}=(0,n.useContext)(M.B),{questionList:X}=(0,n.useContext)(fi),q=(null===X||void 0===X?void 0:X.length)>0?parseInt(localStorage.getItem("_whatmore_qview_index")):1e4,[K,$]=(0,n.useState)();(0,n.useEffect)((()=>{$(t.showQuestion)}),[t.showQuestion]);const G="center";let Z;try{Z=Ae()((()=>{B()}),1e3,{leading:!0,trailing:!1})}catch(tt){console.log(tt)}return(0,x.jsx)(s.ov,{children:(0,x.jsxs)(s.az,{width:f,height:g,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.BJ,{direction:"column",justifyContent:G,height:"full",width:"full",children:(0,x.jsx)(s.az,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.gl,{width:"full",ratio:f/g,children:(0,x.jsx)(v.A,{height:"100%",width:"100%",url:(0,ae.s)((0,Pe.lP)(z)),isPlaying:A&&(!K||q>=X.length),timeUpdateCallback:function(t,e){const i=re(t,e);O({watch_time:t,video_duration:e});const n=k.is_video_ended;i>=99&&A&&!n?(Z(),I({current_time:t,video_duration:e,is_video_ended:!0})):I({current_time:t,video_duration:e,is_video_ended:n})},event:z,question:K&&q<(null===X||void 0===X?void 0:X.length),source:t.source})})})}),W?(0,x.jsx)(s.BJ,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:G,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.az,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(Fe,{focusRef:F,event:t.event,isLast:P,onCloseCallback:t=>{T(t),(0,Q.DG)({userInteractionType:V.O.VIDEO_PLAYBACK,userInteractionMetadata:{watch_time:k.current_time,video_duration:k.video_duration},widgetSourceDetails:U,event:z,productList:z.products,ctaList:z.cta})},productClickHandler:async t=>{const e=await(0,p.M)(t,(0,c.NCy)(_),_);S(t),b(e),j(!0),L(!0),(0,Q.kz)({userInteractionType:V.O.SHOPNOW_CLICKED,widgetSourceDetails:U,event:z,productList:z.products,ctaList:z.cta}),(0,u.t2)("whatmoreAllowAutoSlide",!1)},videoPlayingData:k,totalSiblingEvents:D,indexAmongSiblings:R,questionList:X,isQuestionVisible:K&&q<(null===X||void 0===X?void 0:X.length),qIndex:q,setIsQuestionVisible:$,leftOpenSpaceClickHandler:H,midOpenSpaceClickHandler:Y,rightOpenSpaceClickHandler:J,storySetId:E,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:N})})}):(0,x.jsx)(x.Fragment,{}),!0===w?(0,x.jsx)(s.BJ,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:G,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.az,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,x.jsx)(ne,{focusRef:F,event:t.event,isLast:P,onCloseCallback:()=>T(),setLockSwiper:L,data:y,currentProduct:C,setOpenShopNow:t=>{j(t),(0,u.t2)("whatmoreAllowAutoSlide",!t)}})})}):(0,x.jsx)("div",{})]})})},Be=i(2039),Oe=i(6613),De=i(1085),Re=i(5727);var We=function(t){var[e,i,n,o]=(0,h.A)();const r=(0,u.Xd)("whatmoreShopId"),l=t.event,a=t.isPlaying,d="center";return(0,x.jsx)(s.ov,{children:(0,x.jsxs)(s.az,{width:o,height:n,sx:{overflow:"hidden"},children:[(0,x.jsx)(s.BJ,{direction:"column",justifyContent:d,height:"full",width:"full",children:(0,x.jsx)(s.az,{borderRadius:"md",backgroundColor:"white",children:(0,x.jsx)(s.gl,{width:"full",ratio:o/n,children:(0,x.jsx)(v.A,{height:"100%",width:"100%",url:(0,ae.s)((0,Pe.lP)(l)),isPlaying:a,timeUpdateCallback:function(t,e){},event:l,source:t.source})})})}),(0,x.jsx)(s.BJ,{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.az,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",backdropFilter:"auto",backdropBlur:"10px",onClick:t=>{(0,De.bo)()},children:(0,x.jsxs)(s.BJ,{direction:"column",justifyContent:"center",alignItems:"center",height:"full",width:"full",children:[(0,x.jsx)(Re.A,{sx:{boxShadow:3,color:(0,c.KFN)(r),fontSize:.4*o,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{(0,De.bo)()}}),(0,x.jsx)(s.EY,{color:"white",fontSize:.05*o+"px",fontWeight:"bold",align:"left",children:"Please click to play video.."})]})})})]})})},Qe=i(3294),Ve=i(9821);const Me=n.lazy((()=>i.e(931).then(i.bind(i,3658))));var He=function(t){var e,i;const n=t.changeSlide,o=t.event,r=null===(e=t.isPlaying)||void 0===e||e,l=t.onBack,s=t.isLast,c=t.setLockSwiper,h=(t.heightFactor,t.widthFactor,t.onVideoEndedCallback),p=t.progressUpdateCallback,[v,m]=(0,j.A)(),[g]=(0,u.QN)("whatmoreVideoPlayerPoolBlessed"),f=null===(i=t.showOverlay)||void 0===i||i;function w(){m(!v)}if((0,Oe.MN)()&&0==g&&"recommended_images"!=(null===o||void 0===o?void 0:o.event_type))return(0,Ve._)()?(0,x.jsx)(We,{event:o,onBack:l,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:h,progressUpdateCallback:p,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:f,source:Qe.N.CAROUSEL_EVENT_OPENED},"shopping-video-view"+o.event_id):(0,x.jsx)(Le,{event:o,onBack:l,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:h,progressUpdateCallback:p,showQuestion:t.showQuestion,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:f,source:Qe.N.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:n},"shopping-video-view"+o.event_id);if((0,Be.ij)(o)||(0,Be.Il)(o))return(0,x.jsx)(Le,{event:o,onBack:l,isPlaying:r,isLast:s,setLockSwiper:c,onVideoEndedCallback:h,progressUpdateCallback:p,showQuestion:t.showQuestion,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{w()},midOpenSpaceClickHandler:()=>{w()},rightOpenSpaceClickHandler:()=>{w()},showOverlay:f,source:Qe.N.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,changeSlide:n},"shopping-video-view"+o.event_id);if("recommended_images"==(null===o||void 0===o?void 0:o.event_type))return(0,x.jsx)(Me,{onBack:l,mode:t.mode,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,imageUrls:null===o||void 0===o?void 0:o.product_list});if((0,Be.Th)(o)){var{status:y,bannerText:b,timeToStartInMins:C}=d.A.getEventStatus(o);if(y.name===a.A.LIVE.name)return(0,x.jsx)(oe,{event:o,onBack:l,isPlaying:r,isLast:s,showOverlay:f},"shopping-live-view"+o.event_id)}return console.error("Can't render event which is neither video or a currently-live-event"),(0,x.jsx)("div",{})},Ye=i(4806),Je=i.n(Ye),Ue=i(2804),Xe=i(6834);function qe(t){var e;const[i,o]=(0,n.useState)(!1),r=t.onClick,l=null!==(e=t.fontSize)&&void 0!==e?e:50;return(0,x.jsx)("div",{style:{height:"fit-content",width:"fit-content",backgroundColor:"black",opacity:.4,borderRadius:"50%"},className:[i?"whatmore-scale-on-tap":""].join(" "),children:"left"===t.type?(0,x.jsx)(Xe.A,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{o(!0),setTimeout((()=>{o(!1)}),500),r(t,"up")}}):(0,x.jsx)(Ue.A,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{o(!0),setTimeout((()=>{o(!1)}),500),r(t,"down")}})})}var Ke=function(t){var e,i,n;const o=null!==(e=t.relativeBottomPercentage)&&void 0!==e?e:"30%",r=null!==(i=t.width)&&void 0!==i?i:"100%",l=null!==(n=t.fontSize)&&void 0!==n?n:50,a=t.handleClick;return(0,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)(qe,{type:"left",onClick:a,fontSize:l}),(0,x.jsx)(qe,{type:"right",onClick:a,fontSize:l})]})})},$e=i(964),Ge=i(3330);var Ze=function(t,e){function i(t,e){return 1==e?0:t<0?e+t:t>=e?t-e:t}const o=(0,n.useRef)({prevIndex:i(t-1,e),activeIndex:t,nextIndex:i(t+1,e)});return[function(){return o.current},function(t){o.current="right"==t?{prevIndex:i(o.current.activeIndex,e),activeIndex:i(o.current.activeIndex+1,e),nextIndex:i(o.current.activeIndex+2,e)}:{prevIndex:i(o.current.activeIndex-2,e),activeIndex:i(o.current.activeIndex-1,e),nextIndex:i(o.current.activeIndex,e)}},function(t){return i(o.current.activeIndex+t)}]};var ti=function(t,e){const i=(0,n.useRef)({clientX:0,clientY:0});return[function(t){i.current.clientX=t.changedTouches[0].clientX,i.current.clientY=t.changedTouches[0].clientY},function(n){const o=i.current.clientX,r=i.current.clientY;var l=o-n.changedTouches[0].clientX,a=r-n.changedTouches[0].clientY;return"vertical"==t&&Math.abs(a)>e||"horizontal"==t&&Math.abs(l)>e?"vertical"==t?a>0?"right":"left":l>0?"right":"left":null}]};var ei=function(t,e){const i=(0,n.useRef)(Ae()(((t,e)=>{t(e)}),300,{leading:!0,trailing:!1}));return[function(n,o){var r=0;if(r="vertical"==t?n.deltaY:n.deltaX,Math.abs(r)<=e)return;const l=r>0?"right":"left";i.current(o,l)}]},ii=i(8675);var ni=function(t){const e=t.events,i=t.eventIndex,a=t.onBack;var[d,p,v,m]=(0,h.A)();const[g]=(0,u.QN)("isInDesignMode"),[f]=(0,u.QN)("isDemoBrand"),[w,j]=(0,n.useState)(!0),[y,b]=(0,u.QN)("isFirstIndicatorRenderDone"),[C,S]=(0,n.useState)(!1),[k,I]=(0,n.useState)({}),{setCloseClickComponent:_}=(0,n.useContext)(fi),{slideDirection:z}=(0,n.useContext)(fi),[E]=(0,u.QN)("whatmoreShopId"),[T]=(0,u.QN)("whatmoreLandingLocationType"),[F,N]=Ze(i,e.length),[A,P]=ti(z,50),[L]=ei("vertical",30),[B,O]=(0,n.useState)(!1),[D,W]=(0,n.useState)(null),{whatmoreWidgetSourceDetails:H,whatmoreUserInfo:Y}=(0,n.useContext)(M.B);function J(){O(!1)}function U(t){J(),setTimeout((()=>{a(t)}),500)}(0,n.useEffect)((()=>(O(!0),()=>{})),[]);const X=H.landingLocationType,q=H.templateType;_(U);let K=i;const{questionList:$}=(0,n.useContext)(fi);function G(){(0,u.Xd)("whatmoreAllowAutoSlide")&&(N("right"),D.slideNext())}function Z(t,e){N(e),function(t,e){D&&("left"===e?D.slidePrev():D.slideNext())}(0,e)}const tt=Math.round(.05*v);return(0,x.jsx)(Je(),{isOpen:B,onAfterOpen:function(){},onRequestClose:J,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,x.jsx)(ii.A,{children:(0,x.jsxs)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:(0,R.YU)("#000000",13)},onTouchStart:t=>{A(t)},onTouchEnd:t=>{if(C)return;const e=P(t);e&&Z(0,e)},onWheel:t=>{C||L(t,(t=>{Z(0,t)}))},children:[(0,x.jsx)(o.RC,{speed:400,threshold:tt,slidesPerView:1,direction:z,modules:[r.dK,r.FJ],initialSlide:i,loop:1!=e.length,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,allowSlideNext:!C,allowSlidePrev:!C,allowTouchMove:!1,onSwiper:t=>{W(t),(0,Q.kz)({userInteractionType:V.O.EVENT_VIEW,widgetSourceDetails:H,event:e[F().activeIndex],productList:e[F().activeIndex].products})},onSlideChange:t=>{var i;w?j(!1):(y||b(!0),(0,Q.DG)({userInteractionType:V.O.VIDEO_PLAYBACK,userInteractionMetadata:k,widgetSourceDetails:H,event:e[F().activeIndex],productList:e[F().activeIndex].products}),i=e[F().activeIndex],g||f||null===i||void 0===i||!i.event_id||(async()=>{const t=(0,mt.Wd)(X)+(0,mt.gf)(q)+(null!==i&&void 0!==i&&i.isRelatedEvent?"R":"E")+"_"+(null===i||void 0===i?void 0:i.event_id);(0,l.lB)(i),"index"===T?((0,Ge.Si)(E,$e.TB,$e.Dk),(0,ot.Ch)(i.event_id,i.products,$e.TB,$e.Dk,t,null===i||void 0===i?void 0:i.location,null===Y||void 0===Y?void 0:Y.userType)):T.startsWith("product")||"embed"===T?((0,Ge.Si)(E,$e.DK,$e.K1),(0,ot.Ch)(i.event_id,i.products,$e.DK,$e.K1,t)):T.startsWith("collection")?((0,Ge.Si)(E,$e.Sx,$e.rz),(0,ot.Ch)(i.event_id,i.products,$e.Sx,$e.rz,t)):((0,Ge.Si)(E,$e.TB,$e.Dk),(0,ot.Ch)(i.event_id,i.products,$e.TB,$e.Dk,t))})(),(0,Q.UM)({userInteractionType:V.O.EVENT_VIEW,widgetSourceDetails:H,event:e[F().activeIndex],productList:e[F().activeIndex].products}))},children:[...Array(Math.min(e.length,3)).keys()].map((n=>(0,x.jsx)(o.qr,{children:n=>{let{isActive:o,isPrev:r,isNext:l,isVisible:a,isDuplicate:d}=n;const u=o?"activeIndex":r?"prevIndex":"nextIndex",h=F()[u];"activeIndex"==u&&(K=Math.max(K,h),0==h&&(K=0));const p=(null===$||void 0===$?void 0:$.length)>0&&o&&a&&(h>i||K<i&&h>0)&&h>=K&&h%(0,c.uSp)(E)==i%(0,c.uSp)(E);return(0,x.jsx)(s.BJ,{direction:"column",height:window.innerHeight,justifyContent:"center",children:(0,x.jsx)(He,{event:e[h],showQuestion:p,onBack:U,isPlaying:1==e.length||o&&a,isLast:!1,setLockSwiper:S,onVideoEndedCallback:G,progressUpdateCallback:t=>{I(t)},showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay,mode:"portrait",changeSlide:Z})})}},"event-vertical-scroll-slide-"+n)))}),e.length>1&&!C&&(0,c.kb)(E)&&"horizontal"===(0,c.br0)(E)&&"horizontal"===z?(0,x.jsx)(Ke,{relativeBottomPercentage:"50%",width:m,handleClick:(t,e)=>{Z(0,"down"==e?"right":"left")},fontSize:parseInt(.12*m)}):(0,x.jsx)(x.Fragment,{})]})})})},oi=i(7119);i(3997),i(9130),i(4669),i(9733),i(4365),i(7229),i(6042);const ri=t=>{let{children:e,customClass:i,show:n,closeCallback:o}=t;return oi.createPortal((0,x.jsxs)("div",{className:`whatmore-landscape-modal whatmore-root ${i}`,style:{display:n?"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)};ri.defaultProps={children:(0,x.jsx)("div",{children:"Empty Modal"}),customClass:"",show:!1,closeCallback:()=>!1};var li=ri;var ai=function(t){var e,[i,a,d,p]=(0,h.A)();const[v]=(0,u.QN)("isInDesignMode"),[m]=(0,u.QN)("isDemoBrand"),[g,f]=(0,u.QN)("isFirstIndicatorRenderDone"),[w,j]=(0,n.useState)(0!=t.eventIndex),{setCloseClickComponent:y}=(0,n.useContext)(fi),[b,C]=(0,n.useState)(!1),[S]=(0,u.QN)("whatmoreShopId"),[k]=(0,u.QN)("whatmoreLandingLocationType"),I=(0,u.Xd)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:_,whatmoreUserInfo:z}=(0,n.useContext)(M.B),[E,T]=(0,n.useState)(!1),[N,A]=(0,n.useState)(null);function P(){T(!1)}const L=t.events,B=t.eventIndex,O=t.onBack,D=L.concat(L),W=L.length,H=null===L||void 0===L||null===(e=L[0])||void 0===e?void 0:e.brand,Y=(0,n.useRef)(0);function J(t){P(),setTimeout((()=>{O(t)}),500)}function U(){N&&!N.isEnd&&(0,u.Xd)("whatmoreAllowAutoSlide")&&N.slideNext()}(0,n.useEffect)((()=>(T(!0),()=>{})),[]),y(J);const X=_.landingLocationType,q=_.templateType,[K,$]=(0,n.useState)({}),G=parseInt(Math.min(5,L.length));return(0,x.jsx)(li,{show:E,closeCallback:P,customClass:"whatmore-landscape-modal-swipe-view",children:(0,x.jsxs)(s.BJ,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",alignItems:"center",backgroundColor:(0,R.YU)("#000000",13),children:[(0,x.jsx)(s.ov,{children:(0,x.jsx)(s.az,{height:"fit-content",width:p*G,children:(0,x.jsxs)(o.RC,{onInit:t=>{A(t),(0,Q.kz)({userInteractionType:V.O.EVENT_VIEW,widgetSourceDetails:_,event:L[t.activeIndex],productList:L[t.activeIndex].products,ctaList:L[t.activeIndex].cta})},slidesPerView:G,centeredSlides:!0,allowTouchMove:!1,initialSlide:B,modules:[r.t9,r.Vx,r.FJ,r.Ij,r.dK],navigation:G>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*d),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:p*G,watchSlidesProgress:!0,onSlideChange:t=>{var e;w?j(!1):(g||f(!0),e=L[t.activeIndex],v||m||null===e||void 0===e||!e.event_id||(async()=>{const t=(0,mt.Wd)(X)+(0,mt.gf)(q)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,l.lB)(e),"index"===k?((0,Ge.Si)(S,$e.TB,$e.Dk),(0,ot.Ch)(e.event_id,e.products,$e.TB,$e.Dk,t,null===e||void 0===e?void 0:e.location,null===z||void 0===z?void 0:z.userType)):k.startsWith("product")||"embed"===k?((0,Ge.Si)(S,$e.DK,$e.K1),(0,ot.Ch)(e.event_id,e.products,$e.DK,$e.K1,t)):k.startsWith("collection")?((0,Ge.Si)(S,$e.Sx,$e.rz),(0,ot.Ch)(e.event_id,e.products,$e.Sx,$e.rz,t)):((0,Ge.Si)(S,$e.TB,$e.Dk),(0,ot.Ch)(e.event_id,e.products,$e.TB,$e.Dk,t))})(),(0,Q.DG)({userInteractionType:V.O.VIDEO_PLAYBACK,userInteractionMetadata:K,widgetSourceDetails:_,event:L[t.activeIndex],productList:L[t.activeIndex].products,ctaList:L[t.activeIndex].cta}),(0,Q.UM)({userInteractionType:V.O.EVENT_VIEW,widgetSourceDetails:_,event:L[t.activeIndex],productList:L[t.activeIndex].products,ctaList:L[t.activeIndex].cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[L.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(F.A,{onCloseCallback:O})}),D.slice(B,L.length+B).map(((t,e)=>(0,x.jsx)(o.qr,{children:t=>{let{isActive:i,isPrev:n,isNext:o,isVisible:r,isDuplicate:l}=t;if(i)return(0,x.jsx)(s.BJ,{direction:"column",height:d,width:1*p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.az,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.YcK)(S),borderColor:(0,c.Fwt)(S)},children:(0,x.jsx)(He,{event:L[e%W],onBack:J,isPlaying:!0,isLast:e%W===L.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:U,progressUpdateCallback:t=>{$(t)},showCloseOverlay:(null===L||void 0===L?void 0:L.length)<=2,mode:"landscape"})})});if(o)return(0,x.jsx)(s.BJ,{direction:"column",height:d,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{N.slideTo(e%W,300)},children:(0,x.jsx)(s.az,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.YcK)(S),borderColor:(0,c.Fwt)(S)},children:(0,x.jsx)(He,{event:L[e%W],onBack:J,isPlaying:!1,isLast:e%W===L.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:U,progressUpdateCallback:t=>{$(t)},showOverlay:!1,mode:"landscape"})})});if(n&&1===Y.current)return(0,x.jsx)(s.BJ,{direction:"column",height:d,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{N.slideTo(e%W,300)},children:(0,x.jsx)(s.az,{overflow:"hidden",sx:{borderRadius:"round"==I?"10px":"0px",borderWidth:(0,c.YcK)(S),borderColor:(0,c.Fwt)(S)},children:(0,x.jsx)(He,{event:L[e%W],onBack:J,isPlaying:!1,isLast:e%W===L.length-1,setLockSwiper:C,widthFactor:1,heightFactor:1,onVideoEndedCallback:U,progressUpdateCallback:t=>{$(t)},showOverlay:!1,mode:"landscape"})})});try{B+e>=W-1&&(Y.current=1)}catch(a){console.log(a)}return(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide"+t.event_id)))]})})}),(0,x.jsx)(s.ov,{children:(0,x.jsx)(je,{brandName:H,height:.04*d,width:.1*p,fontSize:.02*d})})]})})},di=i(9769),si=i(9108),ci=i(2682),ui=i(4910);var hi=function(t){const[e,i,n,o]=(0,h.A)(),[r]=(0,u.QN)("whatmorePrimaryColor"),[l]=(0,u.QN)("whatmoreSecondaryColor"),a="flex-end";return(0,x.jsx)(s.ov,{children:(0,x.jsxs)(s.az,{width:o,height:n,backgroundColor:"whiteAlpha.200",backdropBlur:"10px",children:[(0,x.jsx)(s.BJ,{direction:"column",justifyContent:a,height:"full",width:"full",children:(0,x.jsx)(s.az,{borderRadius:"md",backgroundColor:"transparent",children:(0,x.jsx)(s.gl,{width:"full",ratio:o/n,children:(0,x.jsx)(s.az,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+r+", gray, "+l+")"})})})}),(0,x.jsx)(s.BJ,{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.az,{padding:"2px",margin:"5px",borderRadius:"md",backgroundColor:"transparent",children:(0,x.jsx)(s.gl,{width:"full",ratio:9/16,children:(0,x.jsx)(s.az,{width:"full",height:"full",borderRadius:"md",backdropFilter:"auto",backdropBlur:"5px"})})})})]})})};var pi=function(t){var e;const i=t.stories,r=t.onBack,a=t.onStoryCompleteCallback,d=t.isActive,c=null!==(e=t.initialEventIndex)&&void 0!==e?e:0,p=i.events;var[v,m,g,f]=(0,h.A)();const[w,y]=(0,j.A)(),[b]=(0,u.QN)("isInDesignMode"),[C]=(0,u.QN)("isDemoBrand"),[S]=(0,u.QN)("whatmoreShopId"),[k,I]=(0,n.useState)(!0),[_,z]=(0,u.QN)("isFirstIndicatorRenderDone"),[E,T]=(0,n.useState)(null),[F,N]=(0,n.useState)(!1),{whatmoreWidgetSourceDetails:A,whatmoreUserInfo:P}=(0,n.useContext)(M.B),[L,B]=Ze(c,p.length);function O(t){r(t)}const D=A.landingLocationType,R=A.templateType;function W(){if(!(0,u.Xd)("whatmoreAllowAutoSlide"))return;L().activeIndex+1>=p.length?a("right"):(B("right"),E&&E.slideNext())}function H(t){const e=L().activeIndex;"right"==t&&e+1>=p.length||"left"==t&&e-1<0?a(t):(B(t),E&&("left"==t?E.slidePrev():E.slideNext()))}const[Y,J]=(0,n.useState)({});return p[L().activeIndex],(0,x.jsx)("div",{children:(0,x.jsx)(o.RC,{speed:1,slidesPerView:1,direction:"horizontal",initialSlide:0,loop:!0,height:g,width:f,watchSlidesProgress:!0,allowTouchMove:!1,onSwiper:t=>{T(t)},onSlideChange:t=>{k?I(!1):(_||z(!0),(0,Q.DG)({userInteractionType:V.O.VIDEO_PLAYBACK,userInteractionMetadata:Y,widgetSourceDetails:A,event:p[L().activeIndex],productList:p[L().activeIndex].products,ctaList:p[L().activeIndex].cta}),function(t){const e=(0,mt.Wd)(D)+(0,mt.gf)(R)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);b||C||(async()=>{(0,l.lB)(t),(0,Ge.Si)(S,$e.TB,$e.OL),(0,ot.Ch)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===P||void 0===P?void 0:P.userType)})()}(p[L().activeIndex]),(0,Q.kz)({userInteractionType:V.O.EVENT_VIEW,widgetSourceDetails:A,event:p[L().activeIndex],productList:p[L().activeIndex].products,ctaList:p[L().activeIndex].cta}))},children:[...Array(Math.min(p.length,3)).keys()].map((e=>(0,x.jsx)(o.qr,{children:e=>{let{isActive:n,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=e;if(d){const e=n?"activeIndex":o?"prevIndex":"nextIndex",r=p[L()[e]];return(0,x.jsx)(s.BJ,{direction:"column",height:g,justifyContent:"center",children:(0,Be.ij)(r)||(0,Be.Il)(r)?(0,x.jsx)(Le,{event:r,totalSiblingEvents:p.length,indexAmongSiblings:L()[e],onBack:O,isPlaying:d&&n&&l,isLast:!1,setLockSwiper:N,onVideoEndedCallback:W,progressUpdateCallback:t=>{J(t)},leftOpenSpaceClickHandler:()=>{H("left")},midOpenSpaceClickHandler:()=>{y(!w)},rightOpenSpaceClickHandler:()=>{H("right")},storyId:i.id,source:Qe.N.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.BJ,{direction:"column",height:v,justifyContent:"center",children:(0,x.jsx)(hi,{})})}},"event-story-view-slide-"+e)))})})};var vi=function(t){const e=t.onBack,i=t.eventsStories,a=t.initialStoryIndex;var[d,c,p,v]=(0,h.A)();const[m]=(0,u.QN)("isInDesignMode"),[g]=(0,u.QN)("isDemoBrand"),[f,w]=(0,n.useState)(!0),[j,y]=(0,u.QN)("isFirstIndicatorRenderDone"),[b,C]=(0,n.useState)(!1),{setCloseClickComponent:S}=(0,n.useContext)(fi),{slideDirection:k}=(0,n.useContext)(fi),[I]=(0,u.QN)("whatmoreShopId"),[_,z]=Ze(a,i.length),[E,T]=ti("horizontal",50),[F]=ei("vertical",30),N=t.eventIndex,[A,P]=(0,n.useState)(!1),[L,B]=(0,n.useState)(null),{whatmoreWidgetSourceDetails:O,whatmoreUserInfo:D}=(0,n.useContext)(M.B);function R(){P(!1)}function W(t){R(),setTimeout((()=>{e(t)}),500)}(0,n.useEffect)((()=>(P(!0),()=>{})),[]),S(W);const H=O.landingLocationType,Y=O.templateType;function J(t){L&&(0,u.Xd)("whatmoreAllowAutoSlide")&&(z(t),"right"==t?L.slideNext():L.slidePrev())}function U(t,e){J(e)}return(0,x.jsx)(Je(),{isOpen:A,onAfterOpen:function(){},onRequestClose:R,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=>{E(t)},onTouchEnd:t=>{const e=T(t);e&&U(0,e)},onWheel:t=>{F(t,(t=>{U(0,t)}))},children:(0,x.jsx)(o.RC,{speed:1,slidesPerView:1,direction:"horizontal",modules:[r.hw,r.FJ],initialSlide:a,loop:i.length>1,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,onSwiper:t=>{var e,n;B(t),(0,Q.kz)({userInteractionType:V.O.EVENT_VIEW,widgetSourceDetails:O,event:i[_().activeIndex].events[0],productList:null===(e=i[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=i[_().activeIndex].events[0])||void 0===n?void 0:n.cta})},onSlideChange:t=>{var e,n;f?w(!1):(!function(t){const e=(0,mt.Wd)(H)+(0,mt.gf)(Y)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);m||g||(async()=>{(0,l.lB)(t),(0,Ge.Si)(I,$e.TB,$e.OL),(0,ot.Ch)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===D||void 0===D?void 0:D.userType)})()}(i[_().activeIndex].events[0]),(0,Q.kz)({userInteractionType:V.O.EVENT_VIEW,widgetSourceDetails:O,event:i[_().activeIndex].events[0],productList:null===(e=i[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=i[_().activeIndex].events[0])||void 0===n?void 0:n.cta}))},allowTouchMove:!1,cubeEffect:{shadow:!0,slideShadows:!0,shadowOffset:20,shadowScale:.94},children:[...Array(Math.min(i.length,3)).keys()].map((t=>(0,x.jsx)(o.qr,{children:t=>{let{isActive:e,isPrev:n,isNext:o,isVisible:r,isDuplicate:l}=t;const c=e?"activeIndex":n?"prevIndex":"nextIndex";return(0,x.jsx)(s.BJ,{direction:"column",height:d,justifyContent:"center",children:(0,x.jsx)(pi,{stories:i[_()[c]],onBack:W,isActive:e&&r,isNext:o,isPrev:n,onStoryCompleteCallback:J,nextStories:i[_().nextIndex],prevStories:i[_().prevIndex],initialEventIndex:a==_()[c]?N:0},"event-story-view-"+i[_()[c]].id)})}},"event-vertical-scroll-slide-"+t)))})})})};var xi=function(t){var e,i,o,[r,l,a,d]=(0,h.A)();const[c]=(0,u.QN)("whatmorePrimaryColor"),[p]=(0,u.QN)("whatmoreSecondaryColor"),v=t.event,m=(t.onBack,n.useRef(),null!==(e=t.showPausedVideo)&&void 0!==e&&e),f=null!==(i=t.heightFactor)&&void 0!==i?i:1,w="flex-end";return d*=null!==(o=t.widthFactor)&&void 0!==o?o:1,a*=f,(0,x.jsx)(s.ov,{children:(0,x.jsxs)(s.az,{width:d,height:a,children:[(0,x.jsx)(s.BJ,{direction:"column",justifyContent:w,height:"full",width:"full",children:(0,x.jsx)(s.az,{children:(0,x.jsx)(s.gl,{width:"full",ratio:9/16,children:m?(0,Be.ij)(v)||(0,Be.Il)(v)?(0,x.jsx)(ye.A,{height:"100%",width:"100%",url:v.thumbnail_image,isPlaying:!1,pauseFromPlayTimeInMs:1e3,event:v}):(0,x.jsx)(g._V,{width:"full",height:"full",src:v.thumbnail_image,objectFit:"cover",borderRadius:"lg"}):(0,x.jsx)(s.az,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+c+", gray, "+p+")"})})})}),(0,x.jsx)(s.BJ,{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.az,{children:(0,x.jsx)(s.gl,{width:"full",ratio:9/16,children:(0,x.jsx)(s.az,{width:"full",height:"full",backgroundColor:"blackAlpha.400"})})})})]})})};var mi=function(t){var e,i,[a,d,c,p]=(0,h.A)();const[v]=(0,u.QN)("isInDesignMode"),[m]=(0,u.QN)("isDemoBrand"),[g,f]=(0,u.QN)("isFirstIndicatorRenderDone"),[w,j]=(0,n.useState)(0!=t.eventIndex),{setCloseClickComponent:y}=(0,n.useContext)(fi),[b,C]=(0,n.useState)(!1),[S]=(0,u.QN)("whatmoreShopId"),{whatmoreWidgetSourceDetails:k,whatmoreUserInfo:I}=(0,n.useContext)(M.B),[_,z]=(0,n.useState)(!1),[E,T]=(0,n.useState)(null);function N(){z(!1)}t.events;const A=t.eventIndex,P=t.onBack,L=t.eventsStories,B=t.initialStoryIndex,O=null===(e=L[0])||void 0===e||null===(i=e.events[0])||void 0===i?void 0:i.brand;function D(t){N(),setTimeout((()=>{P(t)}),500)}(0,n.useEffect)((()=>(z(!0),()=>{})),[]),y(D);const R=k.landingLocationType,W=k.templateType;function H(t){E&&!E.isEnd&&("right"==t?E.slideNext():E.slidePrev())}const Y=parseInt(Math.min(5,L.length));return(0,x.jsx)(li,{show:_,closeCallback:N,customClass:"whatmore-landscape-modal-stories-view",children:(0,x.jsxs)(s.BJ,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",alignItems:"center",backgroundColor:"blackAlpha.800",children:[(0,x.jsx)(s.ov,{children:(0,x.jsx)(s.az,{height:"fit-content",width:p*Y,children:(0,x.jsxs)(o.RC,{onInit:t=>{var e,i;T(t),(0,Q.kz)({userInteractionType:V.O.EVENT_VIEW,widgetSourceDetails:k,event:L[t.activeIndex].events[0],productList:null===(e=L[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=L[t.activeIndex].events[0])||void 0===i?void 0:i.cta})},slidesPerView:Y,centeredSlides:!0,allowTouchMove:!1,initialSlide:B,modules:[r.t9,r.Vx,r.FJ],navigation:Y>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*c),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:p*Y,watchSlidesProgress:!0,onSlideChange:t=>{var e,i;w?j(!1):(g||f(!0),function(t){const e=(0,mt.Wd)(R)+(0,mt.gf)(W)+(null!==t&&void 0!==t&&t.isRelatedEvent?"R":"E")+"_"+(null===t||void 0===t?void 0:t.event_id);v||m||(async()=>{(0,l.lB)(t),(0,Ge.Si)(S,$e.TB,$e.OL),(0,ot.Ch)(t.event_id,t.products,"homepage","stories",e,null===t||void 0===t?void 0:t.location,null===I||void 0===I?void 0:I.userType)})()}(L[t.activeIndex].events[0]),(0,Q.kz)({userInteractionType:V.O.EVENT_VIEW,widgetSourceDetails:k,event:L[t.activeIndex].events[0],productList:null===(e=L[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=L[t.activeIndex].events[0])||void 0===i?void 0:i.cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[L.length>2&&(0,x.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,x.jsx)(F.A,{onCloseCallback:P})}),L.map(((t,e)=>(0,x.jsx)(o.qr,{children:i=>{let{isActive:n,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=i;if(n){const i=1;return(0,x.jsx)(s.BJ,{direction:"column",height:c,width:p*i,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,x.jsx)(s.az,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(pi,{stories:t,onBack:D,isActive:n&&l,isNext:!1,isPrev:!1,onStoryCompleteCallback:H,initialEventIndex:B==e?A:0,showCloseOverlay:(null===L||void 0===L?void 0:L.length)<=2},"event-story-view-"+t.id)})})}return o||r?(0,x.jsx)(s.BJ,{direction:"column",height:c,width:p,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{E.slideTo(e,300)},children:(0,x.jsx)(s.az,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,x.jsx)(xi,{showPausedVideo:!0,event:L[e].events[0],onBack:D,isPlaying:!1,setLockSwiper:C})})}):(0,x.jsx)(x.Fragment,{})}},"event-horizontal-scroll-slide-"+e)))]})})}),(0,x.jsx)(s.ov,{children:(0,x.jsx)(je,{brandName:O,height:.04*c,width:.1*p,fontSize:.02*c})})]})})};const gi=(0,ui.A)({key:"whatmore-css-sv"}),fi=(0,n.createContext)({isIOS:!1,totalEvents:0,closeClickComponent:null,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:"vertical",showSwipeIndicator:!0,questionList:[]});var wi=function(t){var e,i,o;const[r,l,a]=(0,me.A)(),[d]=(0,u.QN)("whatmoreShopId"),{whatmoreRootId:s}=(0,n.useContext)(M.B),{whatmoreIsStoriesTemplate:h}=(0,n.useContext)(M.B);var p=t.events,v=t.index,m=t.onBack,g=t.eventsStories,f=t.initialStoryIndex,w=(0,c.M3_)(d),j="portrait"===r?null!==(e=t.slideDirection)&&void 0!==e?e:"vertical":null!==(i=t.slideDirection)&&void 0!==i?i:p.length>1?"horizontal":"vertical",y="portrait"===r?!(0,c.kb)(d)&&!h:(0,c.DNc)(d);return(0,n.useLayoutEffect)((()=>{(0,c.hpk)(d)&&(window.location.href.includes(w)?history.replaceState(null,"","#"+w):history.pushState(null,"","#"+w),window.addEventListener("popstate",(()=>{window.location.href.includes(w)||m()})))}),[]),delete si.Ay.styles.global,h?(0,x.jsx)(ci.C,{value:gi,children:(0,x.jsx)(di.s,{theme:si.Ay,cssVarsRoot:s,resetCSS:!1,children:(0,x.jsx)(fi.Provider,{value:{isIOS:(0,Oe.MN)(),totalEvents:p.length,closeClickComponent:m,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:j,showSwipeIndicator:y},children:"portrait"===r?(0,x.jsx)(vi,{eventsStories:g,initialStoryIndex:f,onBack:m,eventIndex:v}):(0,c.Rdb)(d)?(0,x.jsx)(mi,{eventsStories:g,initialStoryIndex:f,onBack:m,eventIndex:v}):(0,x.jsx)(vi,{eventsStories:g,initialStoryIndex:f,onBack:m,eventIndex:v})})})}):(0,x.jsx)(ci.C,{value:gi,children:(0,x.jsx)(di.s,{theme:si.Ay,cssVarsRoot:s,resetCSS:!1,children:(0,x.jsx)(fi.Provider,{value:{isIOS:(0,Oe.MN)(),totalEvents:p.length,closeClickComponent:m,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:j,showSwipeIndicator:y,questionList:(0,c.JwJ)(d)?null===(o=JSON.parse(localStorage.getItem("_whatmore_brand_questions")))||void 0===o?void 0:o.questionList:[]},children:"portrait"===r?(0,x.jsx)(ni,{events:p,eventIndex:v,onBack:m}):(0,x.jsx)(ai,{events:p,eventIndex:v,onBack:m})})})})}},5144:function(t,e,i){i.d(e,{jd:function(){return o}});var n=i(8283);const o=`\n ${n.i7`
|
77
77
|
0% { transform: scale(1); }
|
78
78
|
50%, { transform: scale(0.95); }
|
79
79
|
100% { transform: scale(1); }
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[590],{7220:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return y}});var o=n(664),i=n(9950),r=n(1348),l=n(1745);const a=function(t){new PerformanceObserver((e=>{for(const n of e.getEntries()){[`${window.location.origin}/cart/add.js`,`${window.location.origin}/cart/add`].includes(n.name)&&(console.debug("Whatmore :: Fetch request detected to",n.name),(0,r.dnh)(whatmoreShopId)&&setTimeout((()=>{(0,l.sw)(t)}),1e3))}})).observe({entryTypes:["resource"]})};var c=n(7740),s=n(4737),u=n(4833);var d,f=n(5491),h=n.n(f),g=n(964),m=n(4414);const p=i.lazy((()=>Promise.all([n.e(286),n.e(461),n.e(760)]).then(n.bind(n,1746)))),v=i.lazy((()=>Promise.all([n.e(682),n.e(2),n.e(497),n.e(859),n.e(286),n.e(296),n.e(461),n.e(774)]).then(n.bind(n,3389)))),w=i.lazy((()=>Promise.all([n.e(682),n.e(2),n.e(497),n.e(859),n.e(286),n.e(296),n.e(461),n.e(717)]).then(n.bind(n,8154)))),S=null!==(d="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==d&&d;let _=h()((t=>{fetch(g.$$+"/customization/frontend/"+t).then((t=>t.json())).then((e=>{(0,r.Tzr)(e,t),(0,o.t2)("brandCustomizationsLoaded",!0)})).catch((t=>{console.error("Whatmore : Error while fetching brandCustomizations : "+t)}))}),100,{leading:!0,trailing:!1});var y=function(){var t;const[e]=(0,o.QN)("whatmoreLandingLocationType"),[d]=(0,o.QN)("whatmoreShopId"),f=(0,o.Xd)("isInDesignMode"),[h,g]=(0,o.QN)("brandCustomizationsLoaded"),[y]=(0,o.QN)("whatmoreEmbedAppUseVariant"),{whatmoreEventsBrowsingTemplate:b}=(0,i.useContext)(s.B),[j]=null===(t=performance)||void 0===t?void 0:t.getEntriesByType("navigation");if((0,i.useEffect)((()=>{if(!h){const t=3e5;(0,r.tVc)(t)&&"reload"!=(null===j||void 0===j?void 0:j.type)?g(!0):_(d)}null==localStorage.getItem("_user_wh_lc")&&"72201044272"==d&&n.e(259).then(n.bind(n,3446)).then((t=>{let{getLocationDetails:e}=t;return e()})).then((t=>(localStorage.setItem("_user_wh_lc",JSON.stringify(t)),{}))).catch((t=>{localStorage.setItem("_user_wh_lc",JSON.stringify({latitude:"",longitude:""})),console.error(`Error: ${t}`)}))}),[]),(0,i.useEffect)((()=>{a("true"===y),(0,r.WmJ)(d)&&function(t){let e=document.createElement("style");e.innerHTML=t,document.head.appendChild(e)}((0,r.WmJ)(d))}),[h]),!h)return(0,m.jsx)(m.Fragment,{});if((0,c.U)()){if((0,u.Ig)(b))return(0,m.jsx)(m.Fragment,{});if("index"===e||"collection"===e||e.startsWith("collection")||e.startsWith("page")){if(!(0,u.io)(b))return S&&console.debug("Whatmore : Shopify, rendering index/collection page carousels : "+b),(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(i.Suspense,{children:(0,m.jsx)(p,{})})});if(function(){var t,e,n,i,l,a,c,s,u,h,g,m;const p=(0,o.Xd)("whatmoreCollectionId");return f||(null===(t=window)||void 0===t||null===(e=t.Shopify)||void 0===e||null===(n=e.theme)||void 0===n?void 0:n.role)&&"main"!==(null===(i=window)||void 0===i||null===(l=i.Shopify)||void 0===l||null===(a=l.theme)||void 0===a?void 0:a.role)||(0,r.hbj)(d)&&(null===(c=window)||void 0===c||null===(s=c.Shopify)||void 0===s||null===(u=s.theme)||void 0===u?void 0:u.role)&&"main"===(null===(h=window)||void 0===h||null===(g=h.Shopify)||void 0===g||null===(m=g.theme)||void 0===m?void 0:m.role)&&((0,r.R2w)(d)||p&&(0,r.Idi)(d).includes(p))}())return S&&console.debug("Whatmore : Shopify, rendering index/collection page spotlight : "+b),(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(i.Suspense,{children:(0,m.jsx)(w,{})})})}var x,I,T,O,N,$,W,E,P,k,J,F;return e.startsWith("product")?(0,u.io)(b)?(null!==(x=window)&&void 0!==x&&null!==(I=x.Shopify)&&void 0!==I&&null!==(T=I.theme)&&void 0!==T&&T.role&&"main"===(null===(O=window)||void 0===O||null===(N=O.Shopify)||void 0===N||null===($=N.theme)||void 0===$?void 0:$.role)||window.location.href.includes("localhost:"))&&(0,r.fDZ)(d)?(S&&console.debug("Whatmore : Shopify, rendering PDP-page popup : "+b),(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(i.Suspense,{children:(0,m.jsx)(v,{})})})):(null!==(W=window)&&void 0!==W&&null!==(E=W.Shopify)&&void 0!==E&&null!==(P=E.theme)&&void 0!==P&&P.role&&"main"!==(null===(k=window)||void 0===k||null===(J=k.Shopify)||void 0===J||null===(F=J.theme)||void 0===F?void 0:F.role)||f)&&(0,r.C1J)(d)?(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(i.Suspense,{children:(0,m.jsx)(v,{})})}):(S&&console.debug("Whatmore : Shopify, PDP-page popup disabled."),(0,m.jsx)(m.Fragment,{})):(S&&console.debug("Whatmore : Shopify, rendering PDP-page carousels : "+b),(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(i.Suspense,{children:(0,m.jsx)(p,{})})})):((0,r.dnh)(d)&&(0,r.bQo)(d)&&"cart"===e&&(S&&console.debug("Whatmore : initiating whatmore attribution from cart page."),(0,l.sw)("true"===y)),(0,m.jsx)(m.Fragment,{}))}return"index"===e||"collection"===e?(0,u.io)(b)?(S&&console.debug("Whatmore : External, rendering index/collection page popup : "+b),(0,m.jsx)(m.Fragment,{})):(S&&console.debug("Whatmore : External, rendering index/collection page carousels : "+b),(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(i.Suspense,{children:(0,m.jsx)(p,{})})})):e.startsWith("product")||"embed"===e?(0,u.Ig)(b)||(0,u.io)(b)?(0,r.fDZ)(d)?(S&&console.debug("Whatmore : External, rendering PDP-page popup : "+b),(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(i.Suspense,{children:(0,m.jsx)(v,{})})})):(S&&console.debug("Whatmore : External, PDP-page popup disabled."),(0,m.jsx)(m.Fragment,{})):(S&&console.debug("Whatmore : External, rendering PDP-page carousels : "+b),(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(i.Suspense,{children:(0,m.jsx)(p,{})})})):(0,m.jsx)(m.Fragment,{})}},7740:function(t,e,n){"use strict";function o(){return!(void 0==window.Shopify&&!window.location.href.includes("shopify")&&!window.location.href.includes("localhost:"))}n.d(e,{U:function(){return o}})},6641:function(t,e,n){"use strict";n.d(e,{Fk:function(){return s},gv:function(){return c},xv:function(){return a}});var o=n(664);const i="Whatmore : ",r=(0,o.Xd)("whatmoreShopId");function l(t){console.debug(i+t)}function a(t){var e;null!==(e="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==e&&e&&(l("total events received : "+(t&&t.length)),l("events data : "+JSON.stringify(t)))}function c(t){var e;null!==(e="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==e&&e&&l(t)}const s=t=>{"STR60LW4WMA"!=r&&console.log(`%c ${t}`,"background: #D53F8C; color: white; font-size: 19px; padding: 5px; font-weight: semibold;","\n\nFind us here -> https://www.whatmore.ai")}},1745:function(t,e,n){"use strict";n.d(e,{RX:function(){return d},sw:function(){return u},iL:function(){return h},oV:function(){return f},Lt:function(){return c},js:function(){return s},tN:function(){return g},_N:function(){return m}});var o=n(1348);const i="_whatmore-tracking-id";var r=n(2089),l=n(4533),a=n(664);function c(){const t="https://"+window.location.hostname+"/cart.json";return fetch(t,{method:"GET"})}async function s(){const t="https://"+window.location.hostname+"/cart.json";return await fetch(t,{method:"GET"})}async function u(t){var e;let n=(0,r.Ak)(),o=null,c=null,u={},d=null,f=null,h=null,g={},m=(0,l.CK)(),p=null===(e=localStorage)||void 0===e?void 0:e.wht_is_impression,v=m.length>0;m.forEach((t=>{g.hasOwnProperty(null===t||void 0===t?void 0:t.product_id)||(g[null===t||void 0===t?void 0:t.product_id]={widgetInfo:null===t||void 0===t?void 0:t.widget_info,location:null===t||void 0===t?void 0:t.location,userType:null===t||void 0===t?void 0:t.user_type})})),await s().then((t=>t.json())).then((e=>{n=e.token;let r=[];if(r=!0===t?e.items.map((t=>{const e=g[null===t||void 0===t?void 0:t.variant_id];return{...t,location:null===e||void 0===e?void 0:e.location,userType:null===e||void 0===e?void 0:e.userType,widget_info:null===e||void 0===e?void 0:e.widgetInfo}})):e.items.map((t=>{const e=g[null===t||void 0===t?void 0:t.product_id];return{...t,location:null===e||void 0===e?void 0:e.location,userType:null===e||void 0===e?void 0:e.userType,widget_info:null===e||void 0===e?void 0:e.widgetInfo}})),0==r.length)return console.debug("Whatmore :: no cart items available for view products"),null;r.map((e=>{if(o=e.key,c=e.quantity,u=e.properties,d=e.widget_info,f=e.location,h=e.userType,null===u||!(i in u)){const n=async function(t,e,n,o){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"default",c=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0,u=arguments.length>7?arguments[7]:void 0,d=arguments.length>8?arguments[8]:void 0;const f=(0,a.Xd)("whatmoreShopId"),h=s?(0,l.wm)()+("72201044272"==f?`#${o}#${r}#${c?"olduser":"newuser"}`:`#${o}`):d?"_wt_vs":u?"_wt_vi":"";if(""==h||"9238315068"==f&&("_wt_vs"==h||"_wt_vi"==h))return;let g={id:t,quantity:e,properties:{...h?{[i]:h}:{},...n}};const m=await fetch("https://"+window.location.hostname+"/cart/change.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)}).then((t=>t.json())).catch((t=>{console.error("Whatmore :: Error while updating cart attribute.",t)}));return m}(o,c,u,d,f,h,g.hasOwnProperty(JSON.stringify(!0===t?e.variant_id:e.product_id)),p,v);return n}}))})).catch((t=>{console.error("Whatmore :: Error while fetching cart_token for cart attribute update.",t)}))}async function d(t,e,n,r){let a,c,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"default",u=arguments.length>5?arguments[5]:void 0,d=arguments.length>6?arguments[6]:void 0;if((0,o.dnh)(n)){const o=(0,l.wm)()+("72201044272"==n?`#${r}#${s}#${u?"olduser":"newuser"}:direct`:`#${r}:direct`);if(a={items:[{id:t,quantity:e,properties:{[i]:o}}]},"77105758517"==n){c=new URLSearchParams,c.append("product-id",null===d||void 0===d?void 0:d.client_product_id),c.append("id",t),c.append("quantity",e);return await fetch("https://"+window.location.hostname+"/cart/add.js",{method:"POST",body:c})}}else a={items:[{id:t,quantity:e}]};return await fetch("https://"+window.location.hostname+"/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})}function f(t,e,n,i){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"default",l=arguments.length>5?arguments[5]:void 0;const a="https://"+window.location.hostname;var c;const s="72201044272"==n?`came-from-whatmore-live_${i}_${r}_${l?"olduser":"newuser"}`:`came-from-whatmore-live_${i}`;(0,o.BLb)(n)?(c=`${a}/cart/${t}:${e}?`+(0,o.VCz)(n)+"&"+(0,o.Spk)(n)+"&"+(0,o.KMo)(n),(0,o.dnh)(n)&&(c=`${c}&ref=`+s)):(c=`${a}/cart/${t}:${e}`,(0,o.dnh)(n)&&(c=`${c}?ref=`+s)),window.location.href=c}function h(t){const e="https://"+window.location.hostname+"/cart";(0,o.BLb)(t)?window.location.href=e+"?"+(0,o.VCz)(t)+"&"+(0,o.Spk)(t)+"&"+(0,o.yD5)(t):window.location.href=e}async function g(t){let e;if("27303477337"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"")){var n,o;const i="https://"+window.location.hostname,r=window.location.pathname.split("/");e=i+"/"+(null!==r&&void 0!==r&&null!==(n=r[1])&&void 0!==n&&n.startsWith("en-")?(null===r||void 0===r?void 0:r[1])+"/":"")+(null===t||void 0===t||null===(o=t.product_link)||void 0===o?void 0:o.split(".co")[1])+".js"}else e=(null===t||void 0===t?void 0:t.product_link)+".js";const i=await fetch(e,{method:"GET"});if(!i.ok)throw new Error(`Error! status: ${i.status}`);return await i.json()}async function m(t){const e=t.product_link+".json",n=await fetch(e,{method:"GET"});if(!n.ok)throw new Error(`Error! status: ${n.status}`);return await n.json()}},4533:function(t,e,n){"use strict";n.d(e,{CK:function(){return j},Ch:function(){return b},Fu:function(){return y},Hm:function(){return x},d3:function(){return I},wm:function(){return S},zv:function(){return _}});var o=n(2089),i=n(664),r=n(4820);const l="_whatmore_user_id",a="_whatmore_session_id",c="_whatmore_viewed_products",s="_whatmore_add_to_cart_products",u="_whatmore_session_time",d="_whatmore_store_id",f="_whatmore_qview_index",h="_whatmore_brand_questions",g=(0,i.Xd)("whatmoreShopId"),m=18e5,p=2592e5,v=6e5,w="_whatmore_bulk_events";function S(){return localStorage.getItem(d)!=g&&localStorage.setItem(d,g),null==localStorage.getItem(l)&&function(){new Date;const t=(0,o.Ak)();localStorage.setItem(l,t)}(),localStorage.getItem(l)}function _(){const t=new Date,e=JSON.parse(localStorage.getItem(w))||[],n=localStorage.getItem(u);return(null==localStorage.getItem(a)||null==n||t.getTime()>n)&&(localStorage.removeItem(a),localStorage.removeItem(u),function(){const t=(0,o.Ak)(),e=(new Date).getTime()+m;localStorage.setItem(a,t),localStorage.setItem(u,e)}(),e&&e.length>0&&((0,r.u)(e),localStorage.removeItem(w))),localStorage.getItem(a)}function y(t,e,n,o,i){const r=(new Date).getTime(),l={event_id:t.event_id,product_id:e.client_product_id,product_title:e.title,price:e.price,timestamp:r,widget_info:n,location:o,user_type:i?"olduser":"newuser",variants:[]};if(null===localStorage.getItem(s))localStorage.setItem(s,JSON.stringify([l]));else{let t=JSON.parse(localStorage.getItem(s)).filter((t=>t.timestamp+p>r));localStorage.setItem(s,JSON.stringify([...t,l]))}}function b(t,e,n,o,i){let r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"default",l=arguments.length>6?arguments[6]:void 0;const a=[],s=(new Date).getTime();if(e.map((e=>{const c={event_id:t,product_id:e.client_product_id,product_title:e.title,price:e.price,timestamp:s,variants:[],page:n,widget_type:o,widget_info:i,location:r,user_type:l?"olduser":"newuser"};a.push(c)})),null===localStorage.getItem(c))console.debug("viewed Products",JSON.stringify(a)),localStorage.setItem(c,JSON.stringify(a));else{let e=JSON.parse(localStorage.getItem(c)),n=!1;e.map((e=>{let o=Object.assign({},e);return e.event_id===t&&(e.timestamp=s,n=!0),o})),n?localStorage.setItem(c,JSON.stringify(e)):localStorage.setItem(c,JSON.stringify([...e,...a]))}}function j(){const t=(new Date).getTime();let e=JSON.parse(localStorage.getItem(c));if(!e)return[];let n=e.filter((e=>e.timestamp+p>t));return localStorage.setItem(c,JSON.stringify(n)),n}function x(){if(null!=localStorage.getItem(f)){const t=parseInt(localStorage.getItem(f))+1;localStorage.setItem(f,t)}}function I(t){const e=(new Date).getTime();if(null==localStorage.getItem(h)){const n={questionList:null===t||void 0===t?void 0:t.filter((t=>1==(null===t||void 0===t?void 0:t.is_active))),timestamp:e};localStorage.setItem(h,JSON.stringify(n))}else{const n=JSON.parse(localStorage.getItem(h));if((null===n||void 0===n?void 0:n.timestamp)+v>e){const n={questionList:null===t||void 0===t?void 0:t.filter((t=>1==(null===t||void 0===t?void 0:t.is_active))),timestamp:e};localStorage.setItem(h,JSON.stringify(n))}}}},4820:function(t,e,n){"use strict";n.d(e,{u:function(){return r}});var o=n(964),i=n(6641);const r=function(t){let e={};const n=t.length<10;e.metric_event_list=t,(async()=>{!function(t,e){const n="ingesting analytis-event";(0,i.gv)(n);const r=t;fetch(o.qW+"/event_metrics/bulk",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(r),keepalive:e}).then((t=>t.json())).then((t=>{})).catch((t=>{console.error("error "+n,t)}))}(e,n)})()}},4635:function(t,e,n){var o=n(4759).Symbol;t.exports=o},2022:function(t,e,n){var o=n(4635),i=n(1581),r=n(5336),l=o?o.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":l&&l in Object(t)?i(t):r(t)}},6914:function(t,e,n){var o=n(8798),i=/^\s+/;t.exports=function(t){return t?t.slice(0,o(t)+1).replace(i,""):t}},6658:function(t,e,n){var o="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=o},1581:function(t,e,n){var o=n(4635),i=Object.prototype,r=i.hasOwnProperty,l=i.toString,a=o?o.toStringTag:void 0;t.exports=function(t){var e=r.call(t,a),n=t[a];try{t[a]=void 0;var o=!0}catch(c){}var i=l.call(t);return o&&(e?t[a]=n:delete t[a]),i}},5336:function(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},4759:function(t,e,n){var o=n(6658),i="object"==typeof self&&self&&self.Object===Object&&self,r=o||i||Function("return this")();t.exports=r},8798:function(t){var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},5491:function(t,e,n){var o=n(4567),i=n(4378),r=n(2588),l=Math.max,a=Math.min;t.exports=function(t,e,n){var c,s,u,d,f,h,g=0,m=!1,p=!1,v=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function w(e){var n=c,o=s;return c=s=void 0,g=e,d=t.apply(o,n)}function S(t){var n=t-h;return void 0===h||n>=e||n<0||p&&t-g>=u}function _(){var t=i();if(S(t))return y(t);f=setTimeout(_,function(t){var n=e-(t-h);return p?a(n,u-(t-g)):n}(t))}function y(t){return f=void 0,v&&c?w(t):(c=s=void 0,d)}function b(){var t=i(),n=S(t);if(c=arguments,s=this,h=t,n){if(void 0===f)return function(t){return g=t,f=setTimeout(_,e),m?w(t):d}(h);if(p)return clearTimeout(f),f=setTimeout(_,e),w(h)}return void 0===f&&(f=setTimeout(_,e)),d}return e=r(e)||0,o(n)&&(m=!!n.leading,u=(p="maxWait"in n)?l(r(n.maxWait)||0,e):u,v="trailing"in n?!!n.trailing:v),b.cancel=function(){void 0!==f&&clearTimeout(f),g=0,c=h=s=f=void 0},b.flush=function(){return void 0===f?d:y(i())},b}},4567:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},9248:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},184:function(t,e,n){var o=n(2022),i=n(9248);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==o(t)}},4378:function(t,e,n){var o=n(4759);t.exports=function(){return o.Date.now()}},2588:function(t,e,n){var o=n(6914),i=n(4567),r=n(184),l=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,s=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(r(t))return NaN;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=o(t);var n=a.test(t);return n||c.test(t)?s(t.slice(2),n?2:8):l.test(t)?NaN:+t}},2089:function(t,e,n){"use strict";n.d(e,{Ak:function(){return o}});let o=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;return crypto.getRandomValues(new Uint8Array(t)).reduce(((t,e)=>t+=(e&=63)<36?e.toString(36):e<62?(e-26).toString(36).toUpperCase():e>62?"-":"_"),"")}}}]);
|