whatmore-react-assets 1.0.1549 → 1.0.1551
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[806,939,956],{3278:function(e,t,n){n.r(t),n.d(t,{default:function(){return T}});var r=n(9950),i=n(340),o=n(9983),a=n(7300),s=n(5830),l=(n(3997),n(9130),n(4669),n(9733),n(4365),n(7229),n(6042),n(572)),d=n(8603),m=n(7509),c=n(4737),u=(n(4826),n(7575)),h=n(2257),p=n(1348),v=n(6649),g=n(3788),f=n(6493),x=n(4895),y=n(5375),b=n(4833),$=n(4414);var w=function(e){var t;const n=e.isMuted,{whatmoreWidgetSourceDetails:i}=(0,r.useContext)(c.B),o=i.templateType,a=(0,b.l2)(o),s=null!==(t=e.iconSize)&&void 0!==t?t:30;function l(t){e.onToggle(t)}return(0,$.jsx)("div",{style:{cursor:"pointer"},children:n?(0,$.jsx)(y.A,{sx:{color:"white",fontSize:a?1.3*s:s,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:e=>{l(e)}}):(0,$.jsx)(x.A,{sx:{color:"white",fontSize:a?1.3*s:s,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"50%",padding:"10px"},onClick:e=>{l(e)}})})},j=n(3771),_=n(6613),C=n(1085),A=n(1079),I=n(5873),P=n(1351),k=n(6157),S=n(3294),M=n(9879),z=n(9821),N=n(69);function R(e){const[t,n]=(0,r.useState)(e.initialMuteState),i=e.events,o=e.activeEventIndex,a=e.setActiveEventIndex,l=(0,s.Xd)("whatmoreShopId"),d="portrait"===e.mode,m=(0,s.Xd)("isWhatmorePreviewModeWidth");function c(r){r.stopPropagation(),n(!t),(0,_.MN)()&&((0,z._)()?(0,C.bo)():(0,N.bi)()),e.onMuteToggle()}const v=e.event;return(0,$.jsx)("div",{style:{position:!m&&(0,p.D7t)(l)?"absolute":"relative",top:!m&&(0,p.D7t)(l)?0:"",zIndex:1,bottom:!m&&(0,p.D7t)(l)?"":"100%",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,$.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-between",alignItems:"center"},children:[(0,$.jsxs)("div",{className:"banner-event-overlay",style:{display:"flex",flexFlow:"row nowrap",justifyContent:"space-between",alignItems:"center",width:"100%",paddingRight:"1%",paddingLeft:"1%",paddingTop:"1%",backgroundImage:"linear-gradient(to top, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0.3))"},children:["video"==v.event_type&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("div",{style:{width:"100%",height:"100%"},onClick:e=>{c(e)}}),(0,$.jsx)(w,{isMuted:t,onToggle:e=>{c(e)}})]}),i.length>1&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("div",{classname:"banner-navigation-overlay-left",style:{position:"absolute",left:"10px",top:"50%",transform:"translateY(-50%)",backgroundColor:"transparent",borderRadius:"50%",zIndex:2,border:"2px solid white",padding:"2px",cursor:"pointer"},onClick:e=>{e.stopPropagation(),a(0===o?i.length-1:o-1)},children:(0,$.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:"6px"},children:(0,$.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"20px",color:"#252525",height:"20px"},children:(0,$.jsx)(u.A,{})})})}),(0,$.jsx)("div",{classname:"banner-navigation-overlay-right",style:{position:"absolute",right:"10px",top:"50%",transform:"translateY(-50%)",backgroundColor:"transparent",borderRadius:"50%",zIndex:2,border:"2px solid white",padding:"2px",cursor:"pointer"},onClick:e=>{e.stopPropagation(),a(o===i.length-1?0:o+1)},children:(0,$.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:"6px"},children:(0,$.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"20px",color:"#252525",height:"20px",textAlign:"center"},children:(0,$.jsx)(h.A,{})})})}),(0,p.JiT)(l)&&(0,$.jsx)("div",{style:{display:"flex",position:"absolute",bottom:"7%",left:"50%",transform:"translateX(-50%)",gap:"24px",zIndex:1},children:i.map(((e,t)=>{const n=t===o;return(0,$.jsx)("button",{onClick:e=>{e.stopPropagation(),a(t)},style:{width:n?"25px":d?"12px":"14px",height:d?"12px":"14px",borderRadius:n?"10px":"50%",backgroundColor:n?(0,p.z1s)(l):"#f8eeec",boxShadow:"0px 0px 8px rgba(0, 0, 0, 0.3)"}},t)}))})]})]}),!(0,p.OC6)(l)&&(0,$.jsx)("div",{style:{width:"100%",height:"100%"},onClick:c})]})})}var E=function(e){var t,n,i,o;const[l,d,m]=(0,a.A)(),[u,h]=(0,r.useState)(!0),x=(0,s.Xd)("whatmoreVideoTileSize"),y=(0,s.Xd)("isWhatmorePreviewModeWidth"),[b,w,_]=(0,v.A)({triggerOnce:!1}),{whatmoreWidgetSourceDetails:C}=(0,r.useContext)(c.B),z=(0,s.Xd)("whatmoreShopId"),N=e.events,E=e.activeEventIndex,F=e.setActiveEventIndex,T=N[E],D=(0,f.lP)(T),L=(0,f.cb)(T);if((0,r.useEffect)((()=>{I.Sn.forEach((e=>{var t;if(!(null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-banner-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-banner-a"]')))return;e&&(e.style.minHeight="0px")}))}),[]),"portrait"===l&&!D)return(0,$.jsx)($.Fragment,{});if("landscape"===l&&!L)return(0,$.jsx)($.Fragment,{});const W=(0,g.s)("portrait"===l?D:L),X=x/100*(0,p.igk)(z),B=x/100*(0,p.Y_l)(z),O="portrait"===l?(0,p.G0Q)(z):(0,p.ga9)(z),V="portrait"===l?m*X:m*B,H=V*O,q=null!=(null===(t=T.cta)||void 0===t||null===(n=t[1])||void 0===n?void 0:n.cta_link);return(0,$.jsxs)("div",{ref:b,onClick:()=>{var e,t;(0,P.kz)({userInteractionType:k.O.BANNER_WIDGET_CLICKED,widgetSourceDetails:C,event:N[E]}),(0,p.OC6)(z)&&q&&window.open(null===(e=T.cta)||void 0===e||null===(t=e[1])||void 0===t?void 0:t.cta_link,"_self")},className:"wht-banner-event-tile",style:{position:"relative",margin:"0 auto",width:!y&&(0,p.D7t)(z)?"100%":V,minHeight:!y&&(0,p.D7t)(z)?m*O:"",height:!y&&(0,p.D7t)(z)?"auto":H,borderWidth:(0,p.YcK)(z),borderColor:(0,p.Fwt)(z),overflow:"hidden",cursor:"pointer"},children:["28273541192"===z?(0,$.jsx)(M.A,{height:"100%",width:"100%",url:W,isPlaying:w,event:T,isVideoMuted:!w||u,source:S.N.BANNER}):(0,$.jsx)(j.A,{height:"100%",width:"100%",url:W,isPlaying:w,event:T,isVideoMuted:!w||u,setDuration:e.setDuration,source:S.N.BANNER}),(0,$.jsx)(R,{isCTAPresent:q,events:N,activeEventIndex:E,setActiveEventIndex:F,event:T,mode:l,onMuteToggle:()=>h(!u),initialMuteState:u}),(0,p.XYM)(z)&&(null===T||void 0===T||null===(i=T.cta)||void 0===i?void 0:i.length)>1&&(0,$.jsx)("div",{style:{position:"absolute",zIndex:1,bottom:"10%",left:"50%",transform:"translateX(-50%)"},className:"whatmore-ios-css-relative-fix",children:(0,$.jsx)(A.A,{isBanner:!0,event:T,cta:null===T||void 0===T||null===(o=T.cta)||void 0===o?void 0:o[1],fontFactor:.6})})]})};const F=(0,d.A)({key:"whatmore-css-bv"});var T=function(e){const{whatmoreRootId:t}=(0,r.useContext)(c.B),[n,d]=(0,r.useState)(0),u=e.events,[h,p]=(0,r.useState)(-1),[v]=(0,s.QN)("whatmoreShopId"),[g]=(0,a.A)();let f;return(0,r.useEffect)((()=>{f&&clearInterval(f);const e="video"===u[n].event_type,t=e?1e3*h:6e3;return e?-1!=h&&(f=setInterval((()=>{d((e=>e===u.length-1?0:e+1))}),t)):f=setInterval((()=>{d((e=>e===u.length-1?0:e+1))}),t),()=>{clearInterval(f)}}),[h,n]),delete o.Ay.styles.global,(0,$.jsx)(l.C,{value:F,children:(0,$.jsx)("div",{className:"whatmore-banner-events",style:{height:"60183543963"===v&&"portrait"==g?"200px":void 0},children:(0,$.jsx)(i.s,{theme:o.Ay,cssVarsRoot:t,resetCSS:!1,children:(0,$.jsx)(m.h.Provider,{value:{tileTopMargin:0,tileBottomMMargin:0,tileLeftMargin:0,tileRightMargin:0,showPlayButton:!1},children:(0,$.jsx)(E,{activeEventIndex:n,events:u,setActiveEventIndex:d,setDuration:p})})})})})}},2835:function(e,t,n){var r=n(7891),i=n(8454),o=n(3781),a=n(5830),s=n(4414);t.A=function(e){var t;const n=(0,a.Xd)("whatmoreUITheme"),[l]=(0,a.QN)("whatmoreSecondaryColor"),[d,m]=(0,a.QN)("productRatings"),c=(0,a.Xd)("whatmorePrimaryFont"),u=e.productId,h=e.fontSize,p=null!==(t=e.fontColor)&&void 0!==t?t:"gray";if(null===d||"undefined"==typeof d||!(u in d)||d[u].avgRating>5)return(0,s.jsx)(s.Fragment,{});const v=d[u].avgRating,g=d[u].totalRatings;return(0,s.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center"},children:(0,s.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center",gap:"0px"},children:[[...Array(Math.floor(v))].map(((e,t)=>(0,s.jsx)(r.A,{sx:{color:l,fontSize:h+"px"}},"star-icon"+t))),v-Math.floor(v)>.2?(0,s.jsx)(i.A,{sx:{color:l,fontSize:h+"px"}},"star-half-icon"):v-Math.floor(v)==0?(0,s.jsx)(s.Fragment,{}):(0,s.jsx)(o.A,{sx:{color:l,fontSize:h+"px"}},"star-outline-icon"),[...Array(Math.floor(5-v))].map(((e,t)=>(0,s.jsx)(o.A,{sx:{color:l,fontSize:h+"px"}},"star-outline-icon-"+t))),(0,s.jsx)("div",{children:(0,s.jsx)("div",{width:"2px"})}),(0,s.jsx)("div",{children:(0,s.jsx)("div",{style:{backgroundColor:l,borderRadius:"round"==n?"2px":"0px",padding:"1px",overflow:"hidden"},children:(0,s.jsxs)("p",{ref:e=>{e&&(e.style.setProperty("color","white","important"),e.style.setProperty("font-size",.8*h+"px","important"),e.style.setProperty("font-family",c,"important"),e.style.setProperty("-webkit-line-clamp",2,"important"),e.style.setProperty("line-clamp",2,"important"),e.style.setProperty("-webkit-box-orient","vertical","important"),e.style.setProperty("display","-webkit-box","important"),e.style.setProperty("overflow","hidden","important"),e.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"medium"},children:["\xa0",v,"\xa0"]})})}),(0,s.jsx)("div",{children:(0,s.jsxs)("p",{ref:e=>{e&&(e.style.setProperty("color",p,"important"),e.style.setProperty("font-size",.8*h+"px","important"),e.style.setProperty("font-family",c,"important"),e.style.setProperty("-webkit-line-clamp",2,"important"),e.style.setProperty("line-clamp",2,"important"),e.style.setProperty("-webkit-box-orient","vertical","important"),e.style.setProperty("display","-webkit-box","important"),e.style.setProperty("overflow","hidden","important"),e.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"medium"},children:["\xa0","("+g+")"]})})]})})}},7509:function(e,t,n){n.d(t,{h:function(){return r}});const r=(0,n(9950).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},16:function(e,t,n){n.d(t,{A:function(){return d}});var r=n(9950),i=(n(5410),n(5830)),o=n(4459),a=n(4414);var s=function(e){return(0,r.useEffect)((()=>{const e=(0,o.E2)((0,i.Xd)("whatmoreSecondaryColor"));!function(e,t,n,r){const i=`rgba(${e},${t},${n},${r})`,o=`\n @keyframes whatmore-loading-indicator-keyframe {\n 0%,\n 100% {\n box-shadow: 0em -2.6em 0em 0em ${i}, 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.5), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.7);\n }\n 12.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.7), 1.8em -1.8em 0 0em ${i}, 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.5);\n }\n 25% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.5), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.7), 2.5em 0em 0 0em ${i}, 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2);\n }\n 37.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.5), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.7), 1.75em 1.75em 0 0em ${i}, 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2);\n }\n 50% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.5), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.7), 0em 2.5em 0 0em ${i}, -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2);\n }\n 62.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.5), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.7), -1.8em 1.8em 0 0em ${i}, -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2);\n }\n 75% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.5), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.7), -2.6em 0em 0 0em ${i}, -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2);\n }\n 87.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${n}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${n}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${n}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${n}, 0.5), -2.6em 0em 0 0em rgba(${e}, ${t}, ${n}, 0.7), -1.8em -1.8em 0 0em ${i};\n }\n }\n `,a=document.createElement("style");a.type="text/css",a.innerHTML=o,document.head.appendChild(a)}(e[0],e[1],e[2],.2)}),[]),(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("span",{className:"whatmore-loading-indicator"})})},l=n(8781);var d=function(e){var t,n;const r=null!==(t=e.height)&&void 0!==t?t:"100%",i=null!==(n=e.width)&&void 0!==n?n:"100%";return(0,a.jsxs)("div",{style:{width:i,height:r,overflow:"hidden",minHeight:r,minWidth:i},children:[(0,a.jsx)(l.A,{height:r,width:i}),(0,a.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignContent:"center",width:"100%",height:"100%",position:"relative",zIndex:1,bottom:"100%",className:"whatmore-ios-css-relative-fix"},children:(0,a.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",width:"100%",height:"fit-content"},children:(0,a.jsx)(s,{})})})]})}},8781:function(e,t,n){var r=n(4414);t.A=function(e){var t,n,i;const o=null!==(t=e.height)&&void 0!==t?t:"100%",a=null!==(n=e.width)&&void 0!==n?n:"100%",s=null!==(i=e.borderRadius)&&void 0!==i?i:"10px";return(0,r.jsx)("div",{style:{height:o,width:o,borderRadius:s,overflow:"hidden",minHeight:o,minWidth:a,maxHeight:o,maxWidth:a},children:(0,r.jsx)("div",{style:{minHeight:o,minWidth:a},height:"100%",width:"100%",className:"whatmore-shimmer"})})}},4033:function(e,t,n){n.d(t,{n:function(){return r}});const r=()=>{if("undefined"!==typeof window){const e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")&&navigator.vendor.includes("Apple")}return!1}},69:function(e,t,n){n.d(t,{Ij:function(){return o},bi:function(){return a}});let r,i=!1;function o(){return r?r.play().then((()=>{i=!0,console.debug("iOS autoplay restrictions bypassed."),r.pause()})).catch((e=>{console.error("Failed to bless videos:",e.message)})):Promise.reject(new Error("Blessing video not initialized."))}function a(){r||(r=document.createElement("video"),r.src="https://whatmore-other-assets.b-cdn.net/whatmore/dummy_for_video_pool_3s_muted_11kb.mp4",r.muted=!0,r.playsInline=!0,r.style.display="none",document.body.appendChild(r));const e=()=>{i||o()};document.addEventListener("click",e,{once:!0}),document.addEventListener("touchstart",e,{once:!0})}},9098:function(e,t,n){var r=n(9950),i=n(16),o=n(4414);t.A=function(e){var t,n,a;const[s,l]=(0,r.useState)(!1),d=r.useRef(0),m=(0,r.useRef)(null),c=null!==(t=e.timeUpdateCallback)&&void 0!==t?t:()=>{},u=null!==(n=e.height)&&void 0!==n?n:"100%",h=null!==(a=e.width)&&void 0!==a?a:"100%";return(0,r.useEffect)((()=>{d.current=0;const e=setInterval((()=>{d.current=d.current+.03,m.current&&c(d.current,5),d.current>=5&&(d.current=0)}),30);return()=>{clearInterval(e)}}),[e.isPlaying]),(0,o.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:h,height:"100%",overflow:"hidden"},children:[(0,o.jsx)("div",{style:{width:s?"100%":"0px",height:s?"100%":"0px"},children:(0,o.jsx)("img",{ref:m,src:e.url,style:{objectFit:"cover",height:"100%",width:h,backgroundColor:"white"},alt:"image player",onLoad:()=>{l(!0)}})}),s?(0,o.jsx)(o.Fragment,{}):(0,o.jsx)(i.A,{width:h,height:u})]})}},9879:function(e,t,n){n.d(t,{A:function(){return p}});var r=n(9950),i=n(6649),o=n(3788),a=n(6613),s=n(2039),l=n(9098),d=n(4033),m=n(5830),c=n(6493),u=n(4414);var h=function(e){var t,n,o,s;const l=(0,r.useRef)(null),[h,p,v]=(0,i.A)({triggerOnce:!0}),g=(0,m.Xd)("whatmoreShopId"),f=null!==(t=e.height)&&void 0!==t?t:"100%",x=null!==(n=e.width)&&void 0!==n?n:"100%";return(0,r.useEffect)((()=>{l.current&&(e.isPlaying?l.current.play():(((0,d.n)()||(0,a.At)())&&l.current.play(),"57939755089"==g?setTimeout((()=>{l.current.pause()}),300):l.current.pause()))}),[e.isPlaying,p]),(0,u.jsx)("div",{ref:h,style:{width:f,height:x,overflow:"hidden",display:"flex",alignItems:"center"},children:p||"51394281658"==g||"8968077397"==g?(0,u.jsxs)("video",{ref:l,className:"whatmore-video-player-muted",width:x,height:f,preload:"metadata",loop:!0,playsInline:!0,poster:e.isPlaying&&1!=(null===(o=e.event)||void 0===o?void 0:o.index)&&"STRTFEDEDAP"!==g&&"STRY2V4XO5L"!==g?e.url:e.poster,muted:null===(s=e.isVideoMuted)||void 0===s||s,style:{backgroundColor:"white",borderRadius:e.borderRadius,objectFit:"cover"},children:[(0,u.jsx)("source",{src:e.url,type:"video/mp4"}),(0,u.jsx)("source",{src:(0,c.yD)(e.url),type:"video/mp4"})]}):(0,u.jsx)("div",{width:x,height:f,ref:e=>{e&&e.style.setProperty("display","block","important")}})})};var p=function(e){var t,n,d,p,v,g,f,x,y;const[b,$,w]=(0,i.A)({triggerOnce:!0}),j=(0,m.Xd)("whatmoreShopId"),_=(0,r.useRef)(null);if((0,r.useEffect)((()=>{_.current&&(e.isPlaying?_.current.play():_.current.pause())}),[e.isPlaying,$]),(0,s.Il)(e.event))return(0,u.jsx)(l.A,{height:e.height,width:e.width,url:e.url,isPlaying:e.isPlaying,timeUpdateCallback:e.timeUpdateCallback});const C=null!==(t=e.pauseFromPlayTimeInMs)&&void 0!==t?t:200,A=null!==e&&void 0!==e&&null!==(n=e.event)&&void 0!==n&&null!==(d=n.poster_image)&&void 0!==d&&d.startsWith("https://cdn.shopify.com")?(null===e||void 0===e||null===(p=e.event)||void 0===p||null===(v=p.poster_image)||void 0===v?void 0:v.split("?")[0])+"?width=400&height=400":null===e||void 0===e||null===(g=e.event)||void 0===g?void 0:g.poster_image;if((0,a.MN)())return(0,u.jsx)(h,{isVideoMuted:e.isVideoMuted,event:null===e||void 0===e?void 0:e.event,borderRadius:e.borderRadius,height:"100%",width:"100%",poster:A,url:(0,o.s)(e.url),isPlaying:e.isPlaying,pauseFromPlayTimeInMs:C});const I=null!==(f=e.height)&&void 0!==f?f:"100%",P=null!==(x=e.width)&&void 0!==x?x:"100%";return(0,u.jsx)("div",{ref:b,style:{width:I,height:P,overflow:"hidden",display:"flex",alignItems:"center"},children:$||"51394281658"==j||"8968077397"==j?(0,u.jsxs)("video",{ref:_,className:"whatmore-video-player-muted",width:P,height:I,preload:"metadata",loop:!0,playsInline:!0,muted:null===(y=e.isVideoMuted)||void 0===y||y,poster:"57939755089"==j?"":A,style:{backgroundColor:"white",objectFit:"cover"},children:[(0,u.jsx)("source",{src:(0,o.s)(e.url),type:"video/mp4"}),(0,u.jsx)("source",{src:(0,c.yD)(e.url),type:"video/mp4"})]}):(0,u.jsx)("div",{width:P,height:I,ref:e=>{e&&e.style.setProperty("display","block","important")}})})}},3788:function(e,t,n){n.d(t,{s:function(){return s}});var r=n(1348),i=n(5830);const o={"https://d3syezql093hs1.cloudfront.net":"https://whatmore-brand-video-assets.azureedge.net","https://d2r0bijhs9mx1s.cloudfront.net":"https://whatmore-brand-thumbnail-video-assets.azureedge.net","https://d2oouab8j9eigo.cloudfront.net":"https://whatmore-brand-story-assets.azureedge.net","https://d28nus7q7qajdn.cloudfront.net":"https://whatmore-video-assets.azureedge.net","https://d1zl4k1t5o4s75.cloudfront.net":"https://whatmore-brand-video-assets-720p.azureedge.net"},a={"https://d3syezql093hs1.cloudfront.net":"https://whatmore-brand-video-assets.b-cdn.net","https://d2r0bijhs9mx1s.cloudfront.net":"https://whatmore-brand-thumbnail-video-assets.b-cdn.net","https://d2oouab8j9eigo.cloudfront.net":"https://whatmore-brand-story-assets.b-cdn.net","https://d28nus7q7qajdn.cloudfront.net":"https://whatmore-video-assets-old.b-cdn.net","https://d1zl4k1t5o4s75.cloudfront.net":"https://whatmore-brand-video-assets-720p.b-cdn.net"},s=function(e){const t=(0,i.Xd)("whatmoreShopId");if(!e)return e;if(e.startsWith("https://cdn.shopify.com"))return e;if("AWSCDN"==(0,r.CfJ)(t))return e;if("AZURECDN"==(0,r.CfJ)(t)){if(e.includes(".azureedge.net"))return e;if(e.includes(".cloudfront.net")){for(const t of Object.keys(o))if(e.includes(t))return e.replace(t,o[t]);return e}}if("BUNNYCDN"==(0,r.CfJ)(t)){if(e.includes(".b-cdn.net"))return e;if(e.includes(".cloudfront.net")){for(const t of Object.keys(a))if(e.includes(t))return e.replace(t,a[t]);return e}}return e}},6493:function(e,t,n){n.d(t,{Cr:function(){return s},cb:function(){return a},lP:function(){return o},yD:function(){return l}});var r=n(1348);const i=(0,n(5830).Xd)("whatmoreShopId"),o=function(e){var t,n;return"event_media_urls"in e?"image"===e.event_type?e.event_media_urls.primary.portrait.content_image_original:"secondary"in e.event_media_urls&&e.event_media_urls.secondary.portrait.content_video_1080p?e.event_media_urls.secondary.portrait.content_video_1080p:null!==(t=e.event_media_urls.primary.portrait.content_video_1080p)&&void 0!==t?t:null===(n=e.event_media_urls.primary.landscape)||void 0===n?void 0:n.content_video_1080p:e.event_hls_url},a=function(e){var t;return"event_media_urls"in e?"image"===e.event_type?e.event_media_urls.primary.landscape.content_image_original:"secondary"in e.event_media_urls&&e.event_media_urls.secondary.landscape.content_video_1080p?e.event_media_urls.secondary.landscape.content_video_1080p:null!==(t=e.event_media_urls.primary.landscape.content_video_1080p)&&void 0!==t?t:e.event_media_urls.primary.portrait.content_video_1080p:e.event_hls_url},s=function(e){if(e.startsWith("https://cdn.shopify.com")&&e.includes("whatmore_")){const t=(0,r.ath)(i);if(!t)return e;return`https://whatmore-brand-video-assets-720p.b-cdn.net/${t}/${e.split("whatmore_")[1].split("?")[0]}`}return e},l=function(e){if(e.startsWith("https://cdn.shopify.com")&&e.includes("whatmore_")){const t=(0,r.ath)(i);if(!t)return e;return`https://whatmore-brand-thumbnail-video-assets.b-cdn.net/${t}/${e.split("whatmore_")[1].split("?")[0]}`}return e}},7973:function(e,t,n){n.d(t,{B:function(){return a},b:function(){return o}});var r=n(1348),i=n(5830);function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=(0,i.Xd)("whatmoreShopId");return"shopify"!=(0,r.NCy)(n)?"STRNV8MHJTF"==n?e+"?format=webp":e:e+t}function a(e){var t;if(null!==e&&void 0!==e&&e.includes("https://w-media.b-cdn.net/process-media"))return"image";const n=null===e||void 0===e||null===(t=e.trim())||void 0===t?void 0:t.split("?")[0],r=/\.(jpeg|jpg|gif|png|svg|webp)$/i,i=/\.(mp4|mov|wmv|avi|flv|mkv)$/i;return null!==r&&void 0!==r&&r.test(n)?"image":null!==i&&void 0!==i&&i.test(n)?"video":void 0}},7458:function(e,t,n){n.d(t,{P:function(){return r}});const r=function(e,t){return!(isNaN(t)||!t||("string"===typeof t||t instanceof String)&&!t.trim().length)&&!(parseInt(t)<=parseInt(e))}},2209:function(e,t,n){var r=n(4994);t.A=void 0;var i=r(n(9526)),o=n(4414);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel")},7575:function(e,t,n){var r=n(4994);t.A=void 0;var i=r(n(9526)),o=n(4414);t.A=(0,i.default)((0,o.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore")},2257:function(e,t,n){var r=n(4994);t.A=void 0;var i=r(n(9526)),o=n(4414);t.A=(0,i.default)((0,o.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext")},5727:function(e,t,n){var r=n(4994);t.A=void 0;var i=r(n(9526)),o=n(4414);t.A=(0,i.default)((0,o.jsx)("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82"}),"PlayArrowRounded")},7891:function(e,t,n){var r=n(4994);t.A=void 0;var i=r(n(9526)),o=n(4414);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star")},8454:function(e,t,n){var r=n(4994);t.A=void 0;var i=r(n(9526)),o=n(4414);t.A=(0,i.default)((0,o.jsx)("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28z"}),"StarHalf")},3781:function(e,t,n){var r=n(4994);t.A=void 0;var i=r(n(9526)),o=n(4414);t.A=(0,i.default)((0,o.jsx)("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28z"}),"StarOutline")},5410:function(){},4826:function(){},4365:function(){},9733:function(){},7229:function(){},4669:function(){},6042:function(){},9130:function(){}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[717],{69:function(e,t,i){i.d(t,{Ij:function(){return a},bi:function(){return d}});let n,o=!1;function a(){return n?n.play().then((()=>{o=!0,console.debug("iOS autoplay restrictions bypassed."),n.pause()})).catch((e=>{console.error("Failed to bless videos:",e.message)})):Promise.reject(new Error("Blessing video not initialized."))}function d(){n||(n=document.createElement("video"),n.src="https://whatmore-other-assets.b-cdn.net/whatmore/dummy_for_video_pool_3s_muted_11kb.mp4",n.muted=!0,n.playsInline=!0,n.style.display="none",document.body.appendChild(n));const e=()=>{o||a()};document.addEventListener("click",e,{once:!0}),document.addEventListener("touchstart",e,{once:!0})}},5901:function(e,t,i){i.d(t,{A:function(){return v}});var n=i(1005),o=i(9950),a=i(9879),d=i(22),r=i(5830),l=i(932);var s=function(e){const[t,i,n,o,a]=(0,l.A)(),[s]=(0,r.QN)("whatmoreEmbedAppVideoPlayerSizePortrait"),[c]=(0,r.QN)("whatmoreEmbedAppVideoPlayerSizeLandscape"),h=a[d.dl]===d.nN?c/100:s/100*1.2;return[t*h,i*h,a]},c=i(5727),h=i(1628),p=i.n(h),m=i(2209),g=i(6702),x=(i(9733),i(4365),i(1348)),u=i(7300),f=i(4414);var v=function(e){var t;const i=o.useRef(null);var[l,h,v]=s();const[w,b,y]=(0,u.A)(),j=(0,r.Xd)("whatmoreUITheme"),[S]=(0,r.QN)("whatmoreEmbedAppVideoTitle"),[_]=(0,r.QN)("whatmoreEmbedAppPositionPortrait"),[E]=(0,r.QN)("whatmoreEmbedAppHorizontalPaddingPortrait"),[I]=(0,r.QN)("whatmoreEmbedAppVerticalPaddingPortrait"),[A]=(0,r.QN)("whatmoreEmbedAppPositionLandscape"),[N]=(0,r.QN)("whatmoreEmbedAppHorizontalPaddingLandscape"),[z]=(0,r.QN)("whatmoreEmbedAppVerticalPaddingLandscape"),P=(0,r.Xd)("whatmoreShopId");var L=_,k=E,C=I;v[d.dl]===d.nN&&(L=A,k=N,C=z);const[Q,F]=(0,o.useState)(["initial",window.pageYOffset]),[D,T]=(0,o.useState)(!1),O=null!==(t=e.isSpotlight)&&void 0!==t&&t,R=v[d.dl]===d.nN?.7*(0,x.O86)(P):(0,x.O86)(P),V=O?R:1;l*=V,h*=V;const X=O?(0,x.LrK)(P):L,M=O?(0,x._2D)(P):(0,x.GSq)(P),[W,B]=(0,o.useState)(!O&&(0,x.n8Q)(P));function H(e,t){F(e),e[1]<=100?T(!1):t!=D&&(T(t),B(!1))}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const i=()=>{const i=window.pageYOffset;Math.abs(i-e)<100||(H([i>e?"scrolled-down":"scrolled-up",i],!0),e=i>0?i:0),t=!1},n=()=>{t||(window.requestAnimationFrame(i),t=!0)};return window.addEventListener("scroll",n),()=>window.removeEventListener("scroll",n)}),[Q]),(0,n.j)({ref:i,handler:()=>{H(["scrolled-up",Q[1]],!0)}});const U=e.event,G=e.inVideoClick,K=e.closeClick,$=.3*h,Y=.6*h,q=.1*h,J=.1*(.5*h),Z="round"==j?"10px":"0px",ee=(0,x.GvQ)(P);var te=!1,ie=0,ne=0;function oe(e){te=e}return(0,f.jsx)("div",{children:W&&!M?(0,f.jsx)(f.Fragment,{}):D&&M?(0,f.jsx)("div",{style:"left"===X?{left:"1px",bottom:O?(0,x.pUQ)(P)+"px":C+"px",position:"fixed",zIndex:ee}:{right:"5px",bottom:O?(0,x.pUQ)(P)+"px":C+"px",position:"fixed",zIndex:ee},children:(0,f.jsxs)("div",{onClick:()=>{H(["initial",Q[1]],!1)},style:{margin:"1px",width:h+"px",height:l+"px"},className:"left"===X?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,f.jsx)("div",{style:{overflow:"hidden"},children:(0,f.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,f.jsx)(a.A,{url:U.thumbnail_image,isPlaying:!1,event:U})})}),(0,f.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,f.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,f.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,f.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",children:(0,f.jsx)(m.A,{sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:$+"px"},style:{position:"relative",zIndex:1,left:J+"px",bottom:J+"px"},onClick:K})})}),(0,f.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,f.jsx)(g.A,{sx:{color:"white",fontSize:2*$+"px",filter:"drop-shadow(0 0 2px black);"}})})]})})]})}):(0,f.jsx)(p(),{nodeRef:i,cancel:".activate-button,.close-btn",defaultClassName:"whatmore-react-draggable",defaultClassNameDragging:"whatmore-react-draggable-dragging",defaultClassNameDragged:"whatmore-react-draggable-dragged",bounds:"html",onStart:(e,t)=>{var i,n;i=t.x,n=t.y,ie=i,ne=n},onDrag:(e,t)=>{oe(!0)},onStop:(e,t)=>{te&&(Math.abs(t.x-ie)>5||Math.abs(t.y-ne)>5)?oe(!1):G(U)},children:(0,f.jsx)("div",{ref:i,style:"left"===X?{left:O?(0,x.D2A)(P)+"px":k+"px",bottom:O?(0,x.pUQ)(P)+"px":C+"px",position:"fixed",zIndex:ee}:{right:O?(0,x.D2A)(P)+"px":k+"px",bottom:O?(0,x.pUQ)(P)+"px":C+"px",position:"fixed",zIndex:ee},children:(0,f.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:e.isSpotlight&&"60122562760"==P?l+"px":h+"px",height:e.isSpotlight&&"60122562760"==P?h+"px":l+"px"}),className:"left"===X?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,f.jsx)("div",{style:{overflow:"hidden",position:"relative"},children:(0,f.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:e.isSpotlight&&"60122562760"==P?16/9:9/16},children:(0,f.jsx)(a.A,{url:U.thumbnail_image,isMuted:!0,isPlaying:!0,event:U})})}),(0,f.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,f.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%"},children:[(0,f.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,f.jsx)(m.A,{className:"close-btn",sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:$+"px"},onClick:K,style:{position:"relative",zIndex:1,left:q+"px",bottom:q+"px"}})}),(0,f.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,f.jsx)(c.A,{sx:{color:(0,x.KFN)(P),fontSize:Y+"px",filter:"drop-shadow(0 0 2px black);"}})}),(0,f.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:Z,borderBottomRightRadius:Z,backgroundImage:S?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))":""},children:(0,f.jsxs)("p",{style:{textAlign:"center",color:"white",fontFamily:"Sans-serif",fontWeight:"semi-bold",fontSize:.4*$+"px",margin:0,padding:0,lineHeight:"110%"},children:["\xa0",S]})})]})})]})})})})}},8154:function(e,t,i){i.r(t);var n=i(9950),o=i(1348),a=i(964),d=i(5830),r=i(140),l=i(4533),s=i(5901),c=i(1085),h=i(6613),p=i(3330),m=i(852),g=i(572),x=i(6641),u=i(8603),f=i(2039),v=i(4833),w=i(7802),b=i(2979),y=i(6157),j=i(4737),S=i(69),_=i(9821),E=i(6018),I=i(4414);const A=(0,u.A)({key:"whatmore-css-wsv"}),N=n.lazy((()=>Promise.all([i.e(714),i.e(378),i.e(437),i.e(181),i.e(987),i.e(669),i.e(650),i.e(657)]).then(i.bind(i,8650))));t.default=function(e){const[t,i]=(0,n.useState)(),[u,z]=(0,n.useState)(),[P]=(0,d.QN)("isInDesignMode"),[L]=(0,d.QN)("isDemoBrand"),[k,C]=(0,n.useState)(-2),[Q]=(0,d.QN)("whatmoreShopId"),F=(0,d.Xd)("isLandingSharedLink"),D=(0,d.Xd)("whatmoreShareTemplateId"),T=((0,d.Xd)("whatmoreShareStoryId"),(0,d.Xd)("whatmoreShareEventId")),O=(0,d.Xd)("whatmoreLandingLocationType"),R=(0,d.Xd)("whatmoreLoggingActive"),V=(0,d.Xd)("isWhatmorePreviewModeWidth"),{whatmoreWidgetSourceDetails:X}=(0,n.useContext)(j.B);var M=(0,o.SOt)(Q)?a.aD+"/get_eventset/":a.$$+"/get_eventset/",W=(0,o.SOt)(Q)?a.aD+"/get_eventset_v1/":a.$$+"/get_eventset_v1/";(0,n.useEffect)((()=>{(0,l.wm)()}),[]),(0,n.useEffect)((()=>{(0,p.hr)(Q)}),[]),(0,n.useEffect)((()=>{null==t||0==t.length||u||!(0,h.MN)()||(0,d.Xd)("whatmoreVideoPlayerPoolInitiated")||((0,_._)()?(0,c.Pc)(c.F5):(0,S.bi)())}),[t]),(0,n.useEffect)((()=>{C(-1);const e=v.JA,t=(0,v.t6)(O),n="78232846646"===Q.toString()?W.toString()+Q.toString()+"?eventset_type="+e+"&event_type=video&source="+t+"&source_id="+Q:M.toString()+Q.toString()+"?eventset_type="+e+"&source="+t+"&source_id="+Q;fetch(n).then((e=>e.json())).then((t=>(0,w.Po)(t,e))).then((e=>
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[717],{69:function(e,t,i){i.d(t,{Ij:function(){return a},bi:function(){return d}});let n,o=!1;function a(){return n?n.play().then((()=>{o=!0,console.debug("iOS autoplay restrictions bypassed."),n.pause()})).catch((e=>{console.error("Failed to bless videos:",e.message)})):Promise.reject(new Error("Blessing video not initialized."))}function d(){n||(n=document.createElement("video"),n.src="https://whatmore-other-assets.b-cdn.net/whatmore/dummy_for_video_pool_3s_muted_11kb.mp4",n.muted=!0,n.playsInline=!0,n.style.display="none",document.body.appendChild(n));const e=()=>{o||a()};document.addEventListener("click",e,{once:!0}),document.addEventListener("touchstart",e,{once:!0})}},5901:function(e,t,i){i.d(t,{A:function(){return v}});var n=i(1005),o=i(9950),a=i(9879),d=i(22),r=i(5830),l=i(932);var s=function(e){const[t,i,n,o,a]=(0,l.A)(),[s]=(0,r.QN)("whatmoreEmbedAppVideoPlayerSizePortrait"),[c]=(0,r.QN)("whatmoreEmbedAppVideoPlayerSizeLandscape"),h=a[d.dl]===d.nN?c/100:s/100*1.2;return[t*h,i*h,a]},c=i(5727),h=i(1628),p=i.n(h),m=i(2209),g=i(6702),x=(i(9733),i(4365),i(1348)),u=i(7300),f=i(4414);var v=function(e){var t;const i=o.useRef(null);var[l,h,v]=s();const[w,b,y]=(0,u.A)(),j=(0,r.Xd)("whatmoreUITheme"),[S]=(0,r.QN)("whatmoreEmbedAppVideoTitle"),[_]=(0,r.QN)("whatmoreEmbedAppPositionPortrait"),[E]=(0,r.QN)("whatmoreEmbedAppHorizontalPaddingPortrait"),[I]=(0,r.QN)("whatmoreEmbedAppVerticalPaddingPortrait"),[A]=(0,r.QN)("whatmoreEmbedAppPositionLandscape"),[N]=(0,r.QN)("whatmoreEmbedAppHorizontalPaddingLandscape"),[z]=(0,r.QN)("whatmoreEmbedAppVerticalPaddingLandscape"),P=(0,r.Xd)("whatmoreShopId");var L=_,k=E,C=I;v[d.dl]===d.nN&&(L=A,k=N,C=z);const[Q,F]=(0,o.useState)(["initial",window.pageYOffset]),[D,T]=(0,o.useState)(!1),O=null!==(t=e.isSpotlight)&&void 0!==t&&t,R=v[d.dl]===d.nN?.7*(0,x.O86)(P):(0,x.O86)(P),V=O?R:1;l*=V,h*=V;const X=O?(0,x.LrK)(P):L,M=O?(0,x._2D)(P):(0,x.GSq)(P),[W,B]=(0,o.useState)(!O&&(0,x.n8Q)(P));function H(e,t){F(e),e[1]<=100?T(!1):t!=D&&(T(t),B(!1))}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const i=()=>{const i=window.pageYOffset;Math.abs(i-e)<100||(H([i>e?"scrolled-down":"scrolled-up",i],!0),e=i>0?i:0),t=!1},n=()=>{t||(window.requestAnimationFrame(i),t=!0)};return window.addEventListener("scroll",n),()=>window.removeEventListener("scroll",n)}),[Q]),(0,n.j)({ref:i,handler:()=>{H(["scrolled-up",Q[1]],!0)}});const U=e.event,G=e.inVideoClick,K=e.closeClick,$=.3*h,Y=.6*h,q=.1*h,J=.1*(.5*h),Z="round"==j?"10px":"0px",ee=(0,x.GvQ)(P);var te=!1,ie=0,ne=0;function oe(e){te=e}return(0,f.jsx)("div",{children:W&&!M?(0,f.jsx)(f.Fragment,{}):D&&M?(0,f.jsx)("div",{style:"left"===X?{left:"1px",bottom:O?(0,x.pUQ)(P)+"px":C+"px",position:"fixed",zIndex:ee}:{right:"5px",bottom:O?(0,x.pUQ)(P)+"px":C+"px",position:"fixed",zIndex:ee},children:(0,f.jsxs)("div",{onClick:()=>{H(["initial",Q[1]],!1)},style:{margin:"1px",width:h+"px",height:l+"px"},className:"left"===X?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,f.jsx)("div",{style:{overflow:"hidden"},children:(0,f.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,f.jsx)(a.A,{url:U.thumbnail_image,isPlaying:!1,event:U})})}),(0,f.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,f.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,f.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,f.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",children:(0,f.jsx)(m.A,{sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:$+"px"},style:{position:"relative",zIndex:1,left:J+"px",bottom:J+"px"},onClick:K})})}),(0,f.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,f.jsx)(g.A,{sx:{color:"white",fontSize:2*$+"px",filter:"drop-shadow(0 0 2px black);"}})})]})})]})}):(0,f.jsx)(p(),{nodeRef:i,cancel:".activate-button,.close-btn",defaultClassName:"whatmore-react-draggable",defaultClassNameDragging:"whatmore-react-draggable-dragging",defaultClassNameDragged:"whatmore-react-draggable-dragged",bounds:"html",onStart:(e,t)=>{var i,n;i=t.x,n=t.y,ie=i,ne=n},onDrag:(e,t)=>{oe(!0)},onStop:(e,t)=>{te&&(Math.abs(t.x-ie)>5||Math.abs(t.y-ne)>5)?oe(!1):G(U)},children:(0,f.jsx)("div",{ref:i,style:"left"===X?{left:O?(0,x.D2A)(P)+"px":k+"px",bottom:O?(0,x.pUQ)(P)+"px":C+"px",position:"fixed",zIndex:ee}:{right:O?(0,x.D2A)(P)+"px":k+"px",bottom:O?(0,x.pUQ)(P)+"px":C+"px",position:"fixed",zIndex:ee},children:(0,f.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:e.isSpotlight&&"60122562760"==P?l+"px":h+"px",height:e.isSpotlight&&"60122562760"==P?h+"px":l+"px"}),className:"left"===X?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,f.jsx)("div",{style:{overflow:"hidden",position:"relative"},children:(0,f.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:e.isSpotlight&&"60122562760"==P?16/9:9/16},children:(0,f.jsx)(a.A,{url:U.thumbnail_image,isMuted:!0,isPlaying:!0,event:U})})}),(0,f.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,f.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%"},children:[(0,f.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,f.jsx)(m.A,{className:"close-btn",sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:$+"px"},onClick:K,style:{position:"relative",zIndex:1,left:q+"px",bottom:q+"px"}})}),(0,f.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,f.jsx)(c.A,{sx:{color:(0,x.KFN)(P),fontSize:Y+"px",filter:"drop-shadow(0 0 2px black);"}})}),(0,f.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:Z,borderBottomRightRadius:Z,backgroundImage:S?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))":""},children:(0,f.jsxs)("p",{style:{textAlign:"center",color:"white",fontFamily:"Sans-serif",fontWeight:"semi-bold",fontSize:.4*$+"px",margin:0,padding:0,lineHeight:"110%"},children:["\xa0",S]})})]})})]})})})})}},8154:function(e,t,i){i.r(t);var n=i(9950),o=i(1348),a=i(964),d=i(5830),r=i(140),l=i(4533),s=i(5901),c=i(1085),h=i(6613),p=i(3330),m=i(852),g=i(572),x=i(6641),u=i(8603),f=i(2039),v=i(4833),w=i(7802),b=i(2979),y=i(6157),j=i(4737),S=i(69),_=i(9821),E=i(6018),I=i(4414);const A=(0,u.A)({key:"whatmore-css-wsv"}),N=n.lazy((()=>Promise.all([i.e(714),i.e(378),i.e(437),i.e(181),i.e(987),i.e(669),i.e(650),i.e(657)]).then(i.bind(i,8650))));t.default=function(e){const[t,i]=(0,n.useState)(),[u,z]=(0,n.useState)(),[P]=(0,d.QN)("isInDesignMode"),[L]=(0,d.QN)("isDemoBrand"),[k,C]=(0,n.useState)(-2),[Q]=(0,d.QN)("whatmoreShopId"),F=(0,d.Xd)("isLandingSharedLink"),D=(0,d.Xd)("whatmoreShareTemplateId"),T=((0,d.Xd)("whatmoreShareStoryId"),(0,d.Xd)("whatmoreShareEventId")),O=(0,d.Xd)("whatmoreLandingLocationType"),R=(0,d.Xd)("whatmoreLoggingActive"),V=(0,d.Xd)("isWhatmorePreviewModeWidth"),{whatmoreWidgetSourceDetails:X}=(0,n.useContext)(j.B);var M=(0,o.SOt)(Q)?a.aD+"/get_eventset/":a.$$+"/get_eventset/",W=(0,o.SOt)(Q)?a.aD+"/get_eventset_v1/":a.$$+"/get_eventset_v1/";(0,n.useEffect)((()=>{(0,l.wm)()}),[]),(0,n.useEffect)((()=>{(0,p.hr)(Q)}),[]),(0,n.useEffect)((()=>{null==t||0==t.length||u||!(0,h.MN)()||(0,d.Xd)("whatmoreVideoPlayerPoolInitiated")||((0,_._)()?(0,c.Pc)(c.F5):(0,S.bi)())}),[t]),(0,n.useEffect)((()=>{C(-1);const e=v.JA,t=(0,v.t6)(O),n="78232846646"===Q.toString()?W.toString()+Q.toString()+"?eventset_type="+e+"&event_type=video&source="+t+"&source_id="+Q:M.toString()+Q.toString()+"?eventset_type="+e+"&source="+t+"&source_id="+Q;fetch(n).then((e=>e.json())).then((t=>(0,w.Po)(t,e))).then((e=>0!=V&&(null==e||e&&0==(null===e||void 0===e?void 0:e.length))?(i(E.nw),E.nw):(i(e),e))).catch((e=>{z(e.message)}))}),[]),(0,n.useEffect)((()=>{C(-2)}),[t]),(0,n.useEffect)((()=>{null==t||0==t.length||u||F&&"template-embed"==(0,v.Mm)(D)&&null!=T&&t.forEach(((e,t)=>{T==e.event_id&&U(e,!0,t)}))}),[t]);const B=X.landingLocationType,H=X.templateType,U=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if((0,h.MN)()&&!t&&((0,_._)()?(0,c.bo)():(0,S.Ij)()),(0,f.ij)(e)||(0,f.Il)(e))return P||L||(async()=>{const t=(0,v.Wd)(B)+(0,v.gf)(H)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,r.lB)(e),(0,p.Si)(Q,a.DK,a.K1),(0,l.Ch)(e.event_id,e.products,"spotlight","video_popup",t)})(),void C(i)};function G(){return(0,I.jsx)(I.Fragment,{})}return null==t||0==t.length||u?(0,I.jsx)("div",{}):(R&&(0,x.xv)(t),(0,o.ALN)(Q)&&k<0&&null!==localStorage.getItem("_whatmore_spotlight_viewed")?(0,I.jsx)(I.Fragment,{}):(localStorage.setItem("_whatmore_spotlight_viewed",!0),(0,I.jsx)(g.C,{value:A,children:-1===k||0===t.length?(0,I.jsx)(G,{}):-2===k&&t.length>0?(0,I.jsx)("div",{children:(0,I.jsx)(b.S,{userInteractionType:y.O.SPOTLIGHT_WIDGET_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!P&&!L,children:(0,I.jsx)(s.A,{event:t[0],inVideoClick:U,closeClick:e=>{e.stopPropagation(),C(-1)},isSpotlight:!0})})}):(0,I.jsx)("div",{children:(0,I.jsx)(n.Suspense,{children:(0,I.jsx)(b.S,{userInteractionType:y.O.EVENT_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!P&&!L,children:(0,I.jsx)(N,{events:t,index:k,onBack:function(){(0,o.ei)(Q)&&(0,d.Xd)("whatmoreAddedToCart")&&(0,m.H)(Q,(()=>{}),100,window.location.hostname),C(-2)},template:"template-embed"})})})})})))}}}]);
|