whatmore-react-assets 1.0.1376 → 1.0.1378

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[281],{8181:function(e,t,n){var i=n(7313),o=n(8866),r=n(7753),a=n(6417);const d=i.memo((()=>{if(!(0,r.MO)("isLandingSharedLink"))return(0,a.jsx)(a.Fragment,{});const[e]=(0,o.Z)();return(0,a.jsxs)("div",{className:`shimmer-container ${e}`,children:["portrait"===e?(0,a.jsx)("div",{className:"shimmer-item portrait-full",children:(0,a.jsx)("div",{className:"shimmer-effect"})}):Array(3).fill().map(((e,t)=>(0,a.jsx)("div",{className:"shimmer-item landscape-item "+(1===t?"center-item":""),children:(0,a.jsx)("div",{className:"shimmer-effect"})},t))),(0,a.jsx)("style",{children:"\n .shimmer-container {\n display: flex;\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n scroll-behavior: smooth;\n z-index: 1000;\n }\n\n .portrait {\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.6);\n }\n\n .landscape {\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.8);\n }\n\n .shimmer-item {\n scroll-snap-align: start;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n transition: transform 0.3s ease;\n }\n\n .portrait-full {\n width: 100vw;\n height: 100vh;\n margin: 0; \n }\n\n .landscape-item {\n width: 250px;\n height: 450px;\n background: #D3D3D3;\n border-radius: 8px;\n margin-left: -50px; \n }\n\n .center-item {\n width: 360px;\n height: 620px;\n box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.5); \n z-index: 10; \n }\n\n .shimmer-effect {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(90deg, rgba(0, 0, 0, 0.3) 25%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.3) 75%);\n animation: shimmer 2s infinite;\n background-size: 200% 100%;\n }\n\n @keyframes shimmer {\n 0% {\n background-position: -200% 0;\n }\n 100% {\n background-position: 200% 0;\n }\n }\n "})]})}));t.Z=d},7951:function(e,t,n){n.d(t,{BU:function(){return r},FC:function(){return a}});let i,o=!1;function r(){return i?i.play().then((()=>{o=!0,console.debug("iOS autoplay restrictions bypassed."),i.pause()})).catch((e=>{console.error("Failed to bless videos:",e.message)})):Promise.reject(new Error("Blessing video not initialized."))}function a(){i||(i=document.createElement("video"),i.src="https://whatmore-other-assets.b-cdn.net/whatmore/dummy_for_video_pool_3s_muted_11kb.mp4",i.muted=!0,i.playsInline=!0,i.style.display="none",document.body.appendChild(i));const e=()=>{o||r()};document.addEventListener("click",e,{once:!0}),document.addEventListener("touchstart",e,{once:!0})}},5380:function(e,t,n){n.d(t,{Z:function(){return w}});var i=n(4959),o=n(7313),r=n(4892),a=n(6805),d=n(7753),s=n(9821);var l=function(e){const[t,n,i,o,r]=(0,s.Z)(),[l]=(0,d.j1)("whatmoreEmbedAppVideoPlayerSizePortrait"),[c]=(0,d.j1)("whatmoreEmbedAppVideoPlayerSizeLandscape"),u=r[a.YP]===a.$w?c/100:l/100*1.2;return[t*u,n*u,r]},c=n(9723),u=n(9461),p=n.n(u),h=n(1195),v=n(7108),m=(n(7244),n(123),n(9854)),f=n(6417);var w=function(e){var t;const n=o.useRef(null);var[s,u,w]=l();const g=(0,d.MO)("whatmoreUITheme"),[x]=(0,d.j1)("whatmoreEmbedAppVideoTitle"),[_]=(0,d.j1)("whatmoreEmbedAppPositionPortrait"),[y]=(0,d.j1)("whatmoreEmbedAppHorizontalPaddingPortrait"),[E]=(0,d.j1)("whatmoreEmbedAppVerticalPaddingPortrait"),[b]=(0,d.j1)("whatmoreEmbedAppPositionLandscape"),[j]=(0,d.j1)("whatmoreEmbedAppHorizontalPaddingLandscape"),[I]=(0,d.j1)("whatmoreEmbedAppVerticalPaddingLandscape"),S=(0,d.MO)("whatmoreShopId");var L=_,C=y,P=E;w[a.YP]===a.$w&&(L=b,C=j,P=I);const[D,O]=(0,o.useState)(["initial",window.pageYOffset]),[T,K]=(0,o.useState)(!1),A=null!==(t=e.isSpotlight)&&void 0!==t&&t,k=w[a.YP]===a.$w?.7*(0,m.zGA)(S):(0,m.zGA)(S),z=A?k:1;s*=z,u*=z;const V=A?(0,m.G0o)(S):L,M=A?(0,m.X8j)(S):(0,m.lVn)(S),[N,F]=(0,o.useState)(!A&&(0,m.eXi)(S));function Y(e,t){O(e),e[1]<=100?K(!1):t!=T&&(K(t),F(!1))}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const n=()=>{const n=window.pageYOffset;Math.abs(n-e)<100||(Y([n>e?"scrolled-down":"scrolled-up",n],!0),e=n>0?n:0),t=!1},i=()=>{t||(window.requestAnimationFrame(n),t=!0)};return window.addEventListener("scroll",i),()=>window.removeEventListener("scroll",i)}),[D]),(0,i.O3)({ref:n,handler:()=>{Y(["scrolled-up",D[1]],!0)}});const $=e.event,R=e.inVideoClick,Z=e.closeClick,W=.3*u,U=.6*u,B=.1*u,H=.1*(.5*u),G="round"==g?"10px":"0px",q=(0,m.Z$A)(S);var J=!1,X=0,Q=0;function ee(e){J=e}return(0,f.jsx)("div",{children:N&&!M?(0,f.jsx)(f.Fragment,{}):T&&M?(0,f.jsx)("div",{style:"left"===V?{left:"1px",bottom:A?(0,m.vnu)(S)+"px":P+"px",position:"fixed",zIndex:q}:{right:"5px",bottom:A?(0,m.vnu)(S)+"px":P+"px",position:"fixed",zIndex:q},children:(0,f.jsxs)("div",{onClick:()=>{Y(["initial",D[1]],!1)},style:{margin:"1px",width:u+"px",height:s+"px"},className:"left"===V?"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)(r.Z,{url:$.thumbnail_image,isPlaying:!1,event:$})})}),(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)(h.Z,{sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:W+"px"},style:{position:"relative",zIndex:1,left:H+"px",bottom:H+"px"},onClick:Z})})}),(0,f.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,f.jsx)(v.Z,{sx:{color:"white",fontSize:2*W+"px",filter:"drop-shadow(0 0 2px black);"}})})]})})]})}):(0,f.jsx)(p(),{nodeRef:n,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 n,i;n=t.x,i=t.y,X=n,Q=i},onDrag:(e,t)=>{ee(!0)},onStop:(e,t)=>{J&&(Math.abs(t.x-X)>5||Math.abs(t.y-Q)>5)?ee(!1):R($)},children:(0,f.jsx)("div",{ref:n,style:"left"===V?{left:A?(0,m.$II)(S)+"px":C+"px",bottom:A?(0,m.vnu)(S)+"px":P+"px",position:"fixed",zIndex:q}:{right:A?(0,m.$II)(S)+"px":C+"px",bottom:A?(0,m.vnu)(S)+"px":P+"px",position:"fixed",zIndex:q},children:(0,f.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:e.isSpotlight&&"60122562760"==S?s+"px":u+"px",height:e.isSpotlight&&"60122562760"==S?u+"px":s+"px"}),className:"left"===V?"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"==S?16/9:9/16},children:(0,f.jsx)(r.Z,{url:$.thumbnail_image,isMuted:!0,isPlaying:!0,event:$})})}),(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)(h.Z,{className:"close-btn",sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:W+"px"},onClick:Z,style:{position:"relative",zIndex:1,left:B+"px",bottom:B+"px"}})}),(0,f.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,f.jsx)(c.Z,{sx:{color:(0,m.Ya_)(S),fontSize:U+"px",filter:"drop-shadow(0 0 2px black);"}})}),(0,f.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:G,borderBottomRightRadius:G,backgroundImage:x?"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*W+"px",margin:0,padding:0,lineHeight:"110%"},children:["\xa0",x]})})]})})]})})})})}},4284:function(e,t,n){n.r(t);var i=n(7313),o=n(9854),r=n(2860),a=n(7753),d=n(5160),s=n(6967),l=n(5380),c=n(58),u=n(8984),p=n(4669),h=n(513),v=n(9302),m=n(2575),f=n(7300),w=n(6524),g=n(364),x=n(4522),_=n(778),y=n(7643),E=n(7008),b=n(7381),j=n(8181),I=n(6095),S=n(653),L=n(7951),C=n(6417);const P=(0,m.Z)({key:"whatmore-css-ppv"}),D=i.lazy((()=>Promise.all([n.e(819),n.e(210),n.e(577),n.e(745),n.e(926),n.e(824),n.e(348),n.e(647)]).then(n.bind(n,6348))));function O(e){return e.split(/[?#]/)[0]}t.default=function(e){const[t,n]=(0,i.useState)(),[m,T]=(0,i.useState)(),{whatmoreIsPreviewMode:K}=(0,i.useContext)(g.I),[A]=(0,a.j1)("isInDesignMode"),[k]=(0,a.j1)("isDemoBrand"),[z]=(0,a.j1)("whatmoreEmbedAppUseVariant"),[V,M]=(0,i.useState)(-2),[N]=(0,a.j1)("whatmoreVariantId"),[F]=(0,a.j1)("whatmoreShopId");var[Y]=(0,a.j1)("whatmoreProductId");const $=(0,a.MO)("isLandingSharedLink"),R=(0,a.MO)("whatmoreShareTemplateId"),Z=(0,a.MO)("whatmoreShareEventId"),W=$&&"template-embed"===(0,w.zv)(R),[U,B]=(0,i.useState)(W);Y=(0,o.iXA)(F)?O(window.location.href):Y;const[H,G]=(0,i.useState)((()=>"true"===z?N:Y));var q=r.Gc+"/v2/brand/"+F+"/product-events";const{whatmoreWidgetSourceDetails:J}=(0,i.useContext)(g.I);(0,i.useEffect)((()=>{(0,b.Oo)("Video shopping powered by Whatmore!"),(0,s.hb)();const e=()=>{const e="_whatmore_bulk_events",t=JSON.parse(localStorage.getItem(e))||[];t&&t.length>0&&((0,E.K)(t),localStorage.removeItem(e))};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),[]),(0,i.useEffect)((()=>{(0,p.ll)(F)}),[]),(0,i.useEffect)((()=>{null==t||0==t.length||m||!(0,u.KE)()||(0,a.MO)("whatmoreVideoPlayerPoolInitiated")||((0,S.j)()?(0,c.b5)(c.UD):(0,L.FC)())}),[t]),(0,i.useEffect)((()=>{if(M(-1),(0,o.ly4)(F)){const e=`${r.Gc}/v2/brand/${F}/product-events/recommendation`,t=(0,o.FSv)(F);fetch(`${e}?client_product_id=${H}&limit=10&recommended=${!t}&origin=${window.location.hostname}&status=live,upcoming&event_type=video`).then((e=>e.json())).then((e=>{var i;const o=e=>{var t;return null===(t=e.products)||void 0===t?void 0:t.some((e=>"oos"!=(null===e||void 0===e?void 0:e.product_status)))},r=null===e||void 0===e||null===(i=e.events)||void 0===i?void 0:i.filter((e=>o(e)));if((null===r||void 0===r?void 0:r.length)>0){var a,d,s;const i=t?null===e||void 0===e||null===(a=e.all_events)||void 0===a?void 0:a.filter((e=>o(e))):null===e||void 0===e||null===(d=e.related_events)||void 0===d?void 0:d.filter((e=>o(e))).map((e=>({...e,isRelatedEvent:!0})));(null===i||void 0===i?void 0:i.length)>0&&(null===e||void 0===e||null===(s=e.product_info)||void 0===s?void 0:s.length)>0&&"6749782119"!=F?n([...r,...i,{event_type:"recommended_images",product_list:[...e.product_info]}]):n([...r,...i])}else n([])})).catch((e=>T(e.message)))}else fetch(q.toString()+"?client_product_id="+H.toString()+"&status="+"upcoming".toString()+"&event_type=video").then((e=>e.json())).then((e=>e.events)).then((e=>(null!=e&&0!=e.length&&(0,o.Htz)(F)&&(0,o.d0x)(e),n(e),e))).then((e=>((0,o.yoE)(F)&&function(e,t){setTimeout((async()=>{const n=e.reduce(((e,t)=>[...e,...t.products]),[]).filter((e=>e.client_product_id==t))[0];if(!n||n.product_link==O(window.location.href))return;const i={product_id:n.product_id,product_link:O(window.location.href)};fetch(r.Gc+"/product",{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)})}),500)}(e,H),e))).catch((e=>{T(e.message)}))}),[H]),(0,i.useEffect)((()=>{var e,n;M(-2),(t&&t.length>0||(0,o.uO6)(F))&&(0,x.PB)({userInteractionType:_.K.PDP_VISITED,widgetSourceDetails:J,event:null===t||void 0===t?void 0:t[0],productList:null===t||void 0===t||null===(e=t[0])||void 0===e?void 0:e.products,ctaList:null===t||void 0===t||null===(n=t[0])||void 0===n?void 0:n.cta})}),[t]),(0,i.useEffect)((()=>{let e=history.pushState;history.pushState=function(){let t=e.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),t};let t=history.replaceState;history.replaceState=function(){let e=t.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),e},window.addEventListener("popstate",(()=>{window.dispatchEvent(new Event("locationchange"))})),window.addEventListener("locationchange",(function(){if("24950997070"==F&&fetch(window.location.origin+window.location.pathname+".json").then((e=>e.json())).then((e=>{var t;return G(null===e||void 0===e||null===(t=e.product)||void 0===t?void 0:t.id)})),"true"===z){const e=function(e){for(var t=window.location.search.substring(1).split("&"),n=0;n<t.length;n++){var i=t[n].split("=");if(i[0]==e)return i[1]}return!1}("variant");e&&""!==e&&G(e)}}))}),[]),(0,i.useEffect)((()=>{if(null!=t&&0!==t.length&&!m&&W&&((0,I.A)("whatmore-video-player",(()=>{B(!1)})),null!=Z)){const e=t.find((e=>Z==e.event_id));if(e)return void ee(e,!0,t.indexOf(e))}}),[t]);const X=J.landingLocationType,Q=J.templateType,ee=async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if((0,u.KE)()&&!t&&await((0,S.j)()?(0,c.QV)():(0,L.FC)()),(0,f.B6)(e)||(0,f.WJ)(e))return A||k||(async()=>{const t=(0,w.NY)(X)+(0,w.dS)(Q)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,d.wh)(e),(0,p.Tc)(F,r.h7,r.dU),(0,s.H4)(e.event_id,e.products,"product_page","video_popup",t)})(),void M(n)};function te(){return(0,C.jsx)(C.Fragment,{})}return null==t||0==t.length||m?(0,C.jsx)("div",{}):(0,C.jsxs)(v.C,{value:P,children:[U&&(0,C.jsx)(j.Z,{}),"no-product"===H||-1===V||0===t.length?(0,C.jsx)(te,{}):-2===V&&t.length>0?(0,C.jsx)("div",{children:(0,C.jsx)(y.u,{userInteractionType:_.K.PDP_POPUP_WIDGET_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!A&&!k,children:(0,C.jsx)(l.Z,{event:t[0],inVideoClick:ee,closeClick:e=>{var n;e.stopPropagation(),M(-1),(0,x.GF)({userInteractionType:_.K.PDP_POPUP_CLOSED,widgetSourceDetails:J,event:null===t||void 0===t?void 0:t[0],productList:null===t||void 0===t||null===(n=t[0])||void 0===n?void 0:n.products})}})})}):(0,C.jsx)("div",{children:(0,C.jsx)(i.Suspense,{children:(0,C.jsx)(y.u,{userInteractionType:_.K.EVENT_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!A&&!k,children:(0,C.jsx)(D,{events:t,index:V,onBack:function(e){(0,o.n2L)(F)&&(0,a.MO)("whatmoreAddedToCart")&&(0,h.D)(F,(()=>{}),100,window.location.hostname,e),M(-2),B(!1)},template:"template-product-page"})})})})]})}},6095:function(e,t,n){function i(e,t){let n=0;let i=new MutationObserver((function(){document.querySelector("."+e)?(t(),i.disconnect()):0==n&&(n=1,setTimeout((()=>{t(),i.disconnect()}),8e3))}));i.observe(document.body,{childList:!0,subtree:!0})}n.d(t,{A:function(){return i}})},6805:function(e,t,n){n.d(t,{$I:function(){return d},$w:function(){return l},AK:function(){return r},AL:function(){return a},YP:function(){return o},me:function(){return i},rE:function(){return s}});const i="device_type",o="device_mode",r="mobile",a="tablet",d="desktop",s="portrait",l="landscape"},9821:function(e,t,n){var i=n(7753),o=n(8866),r=n(6805),a=n(9854);t.Z=function(e){const[t,n,d]=(0,o.Z)(),[s]=(0,i.j1)("whatmoreLandscapePadding"),[l]=(0,i.j1)("whatmoreShopId"),[c]=(0,i.j1)("whatmoreVideoTileSize"),[u]=(0,i.j1)("whatmoreVideoTileSizePortrait"),p=d>=1025,h="portrait"==t?u:c,v=!("portrait"!=t||!(d>=481)),m=h/100*1.3*.5,f=h/100;var w=Math.min(d,n),[g,x,_,y]=[.6*w*(16/9),.6*w,1.4,0];function E(e){return Math.round(10*e)/10}var b={DEVICE_TYPE:r.AK,DEVICE_MODE:r.rE};if(p){const e=x*m,t=g*m;[g,x,_,y]=[t,e,(d-2*s-2*(0,a.mZU)(l))/(1.1*e),s],b[r.me]=r.$I,b[r.YP]=r.$w}else if(v){var j=.8*x,I=.8*g;"portrait"==t?(j*=f,I*=f,[g,x,_,y]=[I,j,E(d/(1.2*j)),0],b[r.me]=r.AL,b[r.YP]=r.rE):([g,x,_,y]=[I,j,(d-2*s)/(1.1*j),s],b[r.me]=r.AL,b[r.YP]=r.$w)}else{j=x,I=g;"portrait"==t?(j=j*f*.9,I=I*f*.9,[g,x,_,y]=[I,j,E(d/(1.15*j)),0],b[r.me]=r.AK,b[r.YP]=r.rE):(j=.7*x,I=.7*g,[g,x,_,y]=[I,j,(d-2*s)/(1.1*j),s],b[r.me]=r.AK,b[r.YP]=r.$w)}return[g,x,_,y,b]}},4522:function(e,t,n){n.d(t,{gW:function(){return s},GF:function(){return l},y4:function(){return u},PB:function(){return p},Z2:function(){return c}});var i=n(9854),o=n(7753),r=n(778);function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(0,o.MO)("whatmoreShopId");(e!=r.K.EVENT_VIEW||(0,i.UAB)(a))&&(e!=r.K.VIDEO_PLAYBACK||(0,i.JP0)(a))&&(e!=r.K.SHOPNOW_ATC_CLICKED&&e!=r.K.PRODUCT_TILE_ATC_CLICKED||(0,i.Tn_)(a))&&(e!=r.K.VIDEO_LIKED||(0,i.sKB)(a))&&(e!=r.K.VIDEO_SHARE_CTA_CLICKED||(0,i.YOU)(a))&&(e!=r.K.PRODUCT_TILE_SHOPNOW_CLICKED&&e!=r.K.SHOPNOW_CLICKED||(0,i.ejq)(a))&&"function"==typeof fbq&&(async()=>{fbq("trackCustom",s[e],{id:null===t||void 0===t?void 0:t.client_product_id,product_url:null===t||void 0===t?void 0:t.product_link,...e===r.K.VIDEO_PLAYBACK?{watch_time:n.watch_time,video_duration:n.video_duration}:{}})})()}var d=n(733);const s={[r.K.EVENT_VIEW]:"whatmore_video_click_event",[r.K.VIDEO_LIKED]:"whatmore_video_like_event",[r.K.VIDEO_SHARE_CTA_CLICKED]:"whatmore_video_share_event",[r.K.PRODUCT_TILE_ATC_CLICKED]:"whatmore_video_atc_event",[r.K.SHOPNOW_ATC_CLICKED]:"whatmore_video_atc_event",[r.K.SHOPNOW_CLICKED]:"whatmore_product_tile_click_event",[r.K.PRODUCT_TILE_SHOPNOW_CLICKED]:"whatmore_product_tile_click_event",[r.K.VIDEO_PLAYBACK]:"whatmore_video_watch_event"};function l(e){var t;let{userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}=e;(0,d.s)({userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}),n in s&&a(n,null!==(t=null===l||void 0===l?void 0:l[1])&&void 0!==t?t:null===l||void 0===l?void 0:l[0])}function c(e){var t;let{userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}=e;(0,d.s)({userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}),n in s&&a(n,null!==(t=null===l||void 0===l?void 0:l[1])&&void 0!==t?t:null===l||void 0===l?void 0:l[0],i)}function u(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a}=e;(0,d.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a})}function p(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a}=e;(0,d.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a})}},7244:function(){}}]);
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[281],{8181:function(e,t,n){var i=n(7313),o=n(8866),r=n(7753),a=n(6417);const d=i.memo((()=>{if(!(0,r.MO)("isLandingSharedLink"))return(0,a.jsx)(a.Fragment,{});const[e]=(0,o.Z)();return(0,a.jsxs)("div",{className:`shimmer-container ${e}`,children:["portrait"===e?(0,a.jsx)("div",{className:"shimmer-item portrait-full",children:(0,a.jsx)("div",{className:"shimmer-effect"})}):Array(3).fill().map(((e,t)=>(0,a.jsx)("div",{className:"shimmer-item landscape-item "+(1===t?"center-item":""),children:(0,a.jsx)("div",{className:"shimmer-effect"})},t))),(0,a.jsx)("style",{children:"\n .shimmer-container {\n display: flex;\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n scroll-behavior: smooth;\n z-index: 1000;\n }\n\n .portrait {\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.6);\n }\n\n .landscape {\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.8);\n }\n\n .shimmer-item {\n scroll-snap-align: start;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n transition: transform 0.3s ease;\n }\n\n .portrait-full {\n width: 100vw;\n height: 100vh;\n margin: 0; \n }\n\n .landscape-item {\n width: 250px;\n height: 450px;\n background: #D3D3D3;\n border-radius: 8px;\n margin-left: -50px; \n }\n\n .center-item {\n width: 360px;\n height: 620px;\n box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.5); \n z-index: 10; \n }\n\n .shimmer-effect {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(90deg, rgba(0, 0, 0, 0.3) 25%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.3) 75%);\n animation: shimmer 2s infinite;\n background-size: 200% 100%;\n }\n\n @keyframes shimmer {\n 0% {\n background-position: -200% 0;\n }\n 100% {\n background-position: 200% 0;\n }\n }\n "})]})}));t.Z=d},7951:function(e,t,n){n.d(t,{BU:function(){return r},FC:function(){return a}});let i,o=!1;function r(){return i?i.play().then((()=>{o=!0,console.debug("iOS autoplay restrictions bypassed."),i.pause()})).catch((e=>{console.error("Failed to bless videos:",e.message)})):Promise.reject(new Error("Blessing video not initialized."))}function a(){i||(i=document.createElement("video"),i.src="https://whatmore-other-assets.b-cdn.net/whatmore/dummy_for_video_pool_3s_muted_11kb.mp4",i.muted=!0,i.playsInline=!0,i.style.display="none",document.body.appendChild(i));const e=()=>{o||r()};document.addEventListener("click",e,{once:!0}),document.addEventListener("touchstart",e,{once:!0})}},5380:function(e,t,n){n.d(t,{Z:function(){return w}});var i=n(4959),o=n(7313),r=n(4892),a=n(6805),d=n(7753),s=n(9821);var l=function(e){const[t,n,i,o,r]=(0,s.Z)(),[l]=(0,d.j1)("whatmoreEmbedAppVideoPlayerSizePortrait"),[c]=(0,d.j1)("whatmoreEmbedAppVideoPlayerSizeLandscape"),u=r[a.YP]===a.$w?c/100:l/100*1.2;return[t*u,n*u,r]},c=n(9723),u=n(9461),p=n.n(u),h=n(1195),v=n(7108),m=(n(7244),n(123),n(9854)),f=n(6417);var w=function(e){var t;const n=o.useRef(null);var[s,u,w]=l();const g=(0,d.MO)("whatmoreUITheme"),[x]=(0,d.j1)("whatmoreEmbedAppVideoTitle"),[_]=(0,d.j1)("whatmoreEmbedAppPositionPortrait"),[y]=(0,d.j1)("whatmoreEmbedAppHorizontalPaddingPortrait"),[E]=(0,d.j1)("whatmoreEmbedAppVerticalPaddingPortrait"),[b]=(0,d.j1)("whatmoreEmbedAppPositionLandscape"),[j]=(0,d.j1)("whatmoreEmbedAppHorizontalPaddingLandscape"),[I]=(0,d.j1)("whatmoreEmbedAppVerticalPaddingLandscape"),S=(0,d.MO)("whatmoreShopId");var L=_,C=y,P=E;w[a.YP]===a.$w&&(L=b,C=j,P=I);const[D,O]=(0,o.useState)(["initial",window.pageYOffset]),[T,K]=(0,o.useState)(!1),A=null!==(t=e.isSpotlight)&&void 0!==t&&t,k=w[a.YP]===a.$w?.7*(0,m.zGA)(S):(0,m.zGA)(S),z=A?k:1;s*=z,u*=z;const V=A?(0,m.G0o)(S):L,M=A?(0,m.X8j)(S):(0,m.lVn)(S),[N,F]=(0,o.useState)(!A&&(0,m.eXi)(S));function Y(e,t){O(e),e[1]<=100?K(!1):t!=T&&(K(t),F(!1))}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const n=()=>{const n=window.pageYOffset;Math.abs(n-e)<100||(Y([n>e?"scrolled-down":"scrolled-up",n],!0),e=n>0?n:0),t=!1},i=()=>{t||(window.requestAnimationFrame(n),t=!0)};return window.addEventListener("scroll",i),()=>window.removeEventListener("scroll",i)}),[D]),(0,i.O3)({ref:n,handler:()=>{Y(["scrolled-up",D[1]],!0)}});const $=e.event,R=e.inVideoClick,Z=e.closeClick,W=.3*u,U=.6*u,B=.1*u,H=.1*(.5*u),G="round"==g?"10px":"0px",q=(0,m.Z$A)(S);var J=!1,X=0,Q=0;function ee(e){J=e}return(0,f.jsx)("div",{children:N&&!M?(0,f.jsx)(f.Fragment,{}):T&&M?(0,f.jsx)("div",{style:"left"===V?{left:"1px",bottom:A?(0,m.vnu)(S)+"px":P+"px",position:"fixed",zIndex:q}:{right:"5px",bottom:A?(0,m.vnu)(S)+"px":P+"px",position:"fixed",zIndex:q},children:(0,f.jsxs)("div",{onClick:()=>{Y(["initial",D[1]],!1)},style:{margin:"1px",width:u+"px",height:s+"px"},className:"left"===V?"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)(r.Z,{url:$.thumbnail_image,isPlaying:!1,event:$})})}),(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)(h.Z,{sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:W+"px"},style:{position:"relative",zIndex:1,left:H+"px",bottom:H+"px"},onClick:Z})})}),(0,f.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,f.jsx)(v.Z,{sx:{color:"white",fontSize:2*W+"px",filter:"drop-shadow(0 0 2px black);"}})})]})})]})}):(0,f.jsx)(p(),{nodeRef:n,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 n,i;n=t.x,i=t.y,X=n,Q=i},onDrag:(e,t)=>{ee(!0)},onStop:(e,t)=>{J&&(Math.abs(t.x-X)>5||Math.abs(t.y-Q)>5)?ee(!1):R($)},children:(0,f.jsx)("div",{ref:n,style:"left"===V?{left:A?(0,m.$II)(S)+"px":C+"px",bottom:A?(0,m.vnu)(S)+"px":P+"px",position:"fixed",zIndex:q}:{right:A?(0,m.$II)(S)+"px":C+"px",bottom:A?(0,m.vnu)(S)+"px":P+"px",position:"fixed",zIndex:q},children:(0,f.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:e.isSpotlight&&"60122562760"==S?s+"px":u+"px",height:e.isSpotlight&&"60122562760"==S?u+"px":s+"px"}),className:"left"===V?"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"==S?16/9:9/16},children:(0,f.jsx)(r.Z,{url:$.thumbnail_image,isMuted:!0,isPlaying:!0,event:$})})}),(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)(h.Z,{className:"close-btn",sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:W+"px"},onClick:Z,style:{position:"relative",zIndex:1,left:B+"px",bottom:B+"px"}})}),(0,f.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,f.jsx)(c.Z,{sx:{color:(0,m.Ya_)(S),fontSize:U+"px",filter:"drop-shadow(0 0 2px black);"}})}),(0,f.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:G,borderBottomRightRadius:G,backgroundImage:x?"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*W+"px",margin:0,padding:0,lineHeight:"110%"},children:["\xa0",x]})})]})})]})})})})}},4284:function(e,t,n){n.r(t);var i=n(7313),o=n(9854),r=n(2860),a=n(7753),d=n(5160),s=n(6967),l=n(5380),c=n(58),u=n(8984),p=n(4669),h=n(513),v=n(9302),m=n(2575),f=n(7300),w=n(6524),g=n(364),x=n(4522),_=n(778),y=n(7643),E=n(7008),b=n(7381),j=n(8181),I=n(6095),S=n(653),L=n(7951),C=n(6417);const P=(0,m.Z)({key:"whatmore-css-ppv"}),D=i.lazy((()=>Promise.all([n.e(819),n.e(210),n.e(577),n.e(745),n.e(926),n.e(824),n.e(348),n.e(647)]).then(n.bind(n,6348))));function O(e){return e.split(/[?#]/)[0]}t.default=function(e){const[t,n]=(0,i.useState)(),[m,T]=(0,i.useState)(),{whatmoreIsPreviewMode:K}=(0,i.useContext)(g.I),[A]=(0,a.j1)("isInDesignMode"),[k]=(0,a.j1)("isDemoBrand"),[z]=(0,a.j1)("whatmoreEmbedAppUseVariant"),[V,M]=(0,i.useState)(-2),[N]=(0,a.j1)("whatmoreVariantId"),[F]=(0,a.j1)("whatmoreShopId");var[Y]=(0,a.j1)("whatmoreProductId");const $=(0,a.MO)("isLandingSharedLink"),R=(0,a.MO)("whatmoreShareTemplateId"),Z=(0,a.MO)("whatmoreShareEventId"),W=$&&"template-embed"===(0,w.zv)(R),[U,B]=(0,i.useState)(W);Y=(0,o.iXA)(F)?O(window.location.href):Y;const[H,G]=(0,i.useState)((()=>"true"===z?N:Y));var q=r.Gc+"/v2/brand/"+F+"/product-events";const{whatmoreWidgetSourceDetails:J}=(0,i.useContext)(g.I);(0,i.useEffect)((()=>{(0,b.Oo)("Video shopping powered by Whatmore!"),(0,s.hb)();const e=()=>{const e="_whatmore_bulk_events",t=JSON.parse(localStorage.getItem(e))||[];t&&t.length>0&&((0,E.K)(t),localStorage.removeItem(e))};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),[]),(0,i.useEffect)((()=>{(0,p.ll)(F)}),[]),(0,i.useEffect)((()=>{null==t||0==t.length||m||!(0,u.KE)()||(0,a.MO)("whatmoreVideoPlayerPoolInitiated")||((0,S.j)()?(0,c.b5)(c.UD):(0,L.FC)())}),[t]),(0,i.useEffect)((()=>{if(M(-1),(0,o.ly4)(F)){const e=`${r.Gc}/v2/brand/${F}/product-events/recommendation`,t=(0,o.FSv)(F);fetch(`${e}?client_product_id=${H}&limit=10&recommended=${!t}&origin=${window.location.hostname}&status=live,upcoming&event_type=video`).then((e=>e.json())).then((e=>{var i;const o=e=>{var t;return null===(t=e.products)||void 0===t?void 0:t.some((e=>"oos"!=(null===e||void 0===e?void 0:e.product_status)))},r=null===e||void 0===e||null===(i=e.events)||void 0===i?void 0:i.filter((e=>o(e)));if((null===r||void 0===r?void 0:r.length)>0){var a,d,s;const i=t?null===e||void 0===e||null===(a=e.all_events)||void 0===a?void 0:a.filter((e=>o(e))):null===e||void 0===e||null===(d=e.related_events)||void 0===d?void 0:d.filter((e=>o(e))).map((e=>({...e,isRelatedEvent:!0})));(null===i||void 0===i?void 0:i.length)>0&&(null===e||void 0===e||null===(s=e.product_info)||void 0===s?void 0:s.length)>0&&"6749782119"!=F?n([...r,...i,{event_type:"recommended_images",product_list:[...e.product_info]}]):n([...r,...i])}else n([])})).catch((e=>T(e.message)))}else fetch(q.toString()+"?client_product_id="+H.toString()+"&status="+"upcoming".toString()+"&event_type=video").then((e=>e.json())).then((e=>e.events)).then((e=>(null!=e&&0!=e.length&&(0,o.Htz)(F)&&(0,o.d0x)(e),n(e),e))).then((e=>((0,o.yoE)(F)&&function(e,t){setTimeout((async()=>{const n=e.reduce(((e,t)=>[...e,...t.products]),[]).filter((e=>e.client_product_id==t))[0];if(!n||n.product_link==O(window.location.href))return;const i={product_id:n.product_id,product_link:O(window.location.href)};fetch(r.Gc+"/product",{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)})}),500)}(e,H),e))).catch((e=>{T(e.message)}))}),[H]),(0,i.useEffect)((()=>{var e,n;M(-2),(t&&t.length>0||(0,o.uO6)(F))&&(0,x.PB)({userInteractionType:_.K.PDP_VISITED,widgetSourceDetails:J,event:null===t||void 0===t?void 0:t[0],productList:null===t||void 0===t||null===(e=t[0])||void 0===e?void 0:e.products,ctaList:null===t||void 0===t||null===(n=t[0])||void 0===n?void 0:n.cta})}),[t]),(0,i.useEffect)((()=>{const e=O(window.location.href);let t=history.pushState;history.pushState=function(){let e=t.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),e};let n=history.replaceState;history.replaceState=function(){let e=n.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),e},window.addEventListener("popstate",(()=>{window.dispatchEvent(new Event("locationchange"))})),window.addEventListener("locationchange",(function(){if("24950997070"==F&&window.location.origin+window.location.pathname!=e&&fetch(window.location.origin+window.location.pathname+".json").then((e=>e.json())).then((e=>{var t;return G(null===e||void 0===e||null===(t=e.product)||void 0===t?void 0:t.id)})),"true"===z){const e=function(e){for(var t=window.location.search.substring(1).split("&"),n=0;n<t.length;n++){var i=t[n].split("=");if(i[0]==e)return i[1]}return!1}("variant");e&&""!==e&&G(e)}}))}),[]),(0,i.useEffect)((()=>{if(null!=t&&0!==t.length&&!m&&W&&((0,I.A)("whatmore-video-player",(()=>{B(!1)})),null!=Z)){const e=t.find((e=>Z==e.event_id));if(e)return void ee(e,!0,t.indexOf(e))}}),[t]);const X=J.landingLocationType,Q=J.templateType,ee=async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if((0,u.KE)()&&!t&&await((0,S.j)()?(0,c.QV)():(0,L.FC)()),(0,f.B6)(e)||(0,f.WJ)(e))return A||k||(async()=>{const t=(0,w.NY)(X)+(0,w.dS)(Q)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,d.wh)(e),(0,p.Tc)(F,r.h7,r.dU),(0,s.H4)(e.event_id,e.products,"product_page","video_popup",t)})(),void M(n)};function te(){return(0,C.jsx)(C.Fragment,{})}return null==t||0==t.length||m?(0,C.jsx)("div",{}):(0,C.jsxs)(v.C,{value:P,children:[U&&(0,C.jsx)(j.Z,{}),"no-product"===H||-1===V||0===t.length?(0,C.jsx)(te,{}):-2===V&&t.length>0?(0,C.jsx)("div",{children:(0,C.jsx)(y.u,{userInteractionType:_.K.PDP_POPUP_WIDGET_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!A&&!k,children:(0,C.jsx)(l.Z,{event:t[0],inVideoClick:ee,closeClick:e=>{var n;e.stopPropagation(),M(-1),(0,x.GF)({userInteractionType:_.K.PDP_POPUP_CLOSED,widgetSourceDetails:J,event:null===t||void 0===t?void 0:t[0],productList:null===t||void 0===t||null===(n=t[0])||void 0===n?void 0:n.products})}})})}):(0,C.jsx)("div",{children:(0,C.jsx)(i.Suspense,{children:(0,C.jsx)(y.u,{userInteractionType:_.K.EVENT_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!A&&!k,children:(0,C.jsx)(D,{events:t,index:V,onBack:function(e){(0,o.n2L)(F)&&(0,a.MO)("whatmoreAddedToCart")&&(0,h.D)(F,(()=>{}),100,window.location.hostname,e),M(-2),B(!1)},template:"template-product-page"})})})})]})}},6095:function(e,t,n){function i(e,t){let n=0;let i=new MutationObserver((function(){document.querySelector("."+e)?(t(),i.disconnect()):0==n&&(n=1,setTimeout((()=>{t(),i.disconnect()}),8e3))}));i.observe(document.body,{childList:!0,subtree:!0})}n.d(t,{A:function(){return i}})},6805:function(e,t,n){n.d(t,{$I:function(){return d},$w:function(){return l},AK:function(){return r},AL:function(){return a},YP:function(){return o},me:function(){return i},rE:function(){return s}});const i="device_type",o="device_mode",r="mobile",a="tablet",d="desktop",s="portrait",l="landscape"},9821:function(e,t,n){var i=n(7753),o=n(8866),r=n(6805),a=n(9854);t.Z=function(e){const[t,n,d]=(0,o.Z)(),[s]=(0,i.j1)("whatmoreLandscapePadding"),[l]=(0,i.j1)("whatmoreShopId"),[c]=(0,i.j1)("whatmoreVideoTileSize"),[u]=(0,i.j1)("whatmoreVideoTileSizePortrait"),p=d>=1025,h="portrait"==t?u:c,v=!("portrait"!=t||!(d>=481)),m=h/100*1.3*.5,f=h/100;var w=Math.min(d,n),[g,x,_,y]=[.6*w*(16/9),.6*w,1.4,0];function E(e){return Math.round(10*e)/10}var b={DEVICE_TYPE:r.AK,DEVICE_MODE:r.rE};if(p){const e=x*m,t=g*m;[g,x,_,y]=[t,e,(d-2*s-2*(0,a.mZU)(l))/(1.1*e),s],b[r.me]=r.$I,b[r.YP]=r.$w}else if(v){var j=.8*x,I=.8*g;"portrait"==t?(j*=f,I*=f,[g,x,_,y]=[I,j,E(d/(1.2*j)),0],b[r.me]=r.AL,b[r.YP]=r.rE):([g,x,_,y]=[I,j,(d-2*s)/(1.1*j),s],b[r.me]=r.AL,b[r.YP]=r.$w)}else{j=x,I=g;"portrait"==t?(j=j*f*.9,I=I*f*.9,[g,x,_,y]=[I,j,E(d/(1.15*j)),0],b[r.me]=r.AK,b[r.YP]=r.rE):(j=.7*x,I=.7*g,[g,x,_,y]=[I,j,(d-2*s)/(1.1*j),s],b[r.me]=r.AK,b[r.YP]=r.$w)}return[g,x,_,y,b]}},4522:function(e,t,n){n.d(t,{gW:function(){return s},GF:function(){return l},y4:function(){return u},PB:function(){return p},Z2:function(){return c}});var i=n(9854),o=n(7753),r=n(778);function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(0,o.MO)("whatmoreShopId");(e!=r.K.EVENT_VIEW||(0,i.UAB)(a))&&(e!=r.K.VIDEO_PLAYBACK||(0,i.JP0)(a))&&(e!=r.K.SHOPNOW_ATC_CLICKED&&e!=r.K.PRODUCT_TILE_ATC_CLICKED||(0,i.Tn_)(a))&&(e!=r.K.VIDEO_LIKED||(0,i.sKB)(a))&&(e!=r.K.VIDEO_SHARE_CTA_CLICKED||(0,i.YOU)(a))&&(e!=r.K.PRODUCT_TILE_SHOPNOW_CLICKED&&e!=r.K.SHOPNOW_CLICKED||(0,i.ejq)(a))&&"function"==typeof fbq&&(async()=>{fbq("trackCustom",s[e],{id:null===t||void 0===t?void 0:t.client_product_id,product_url:null===t||void 0===t?void 0:t.product_link,...e===r.K.VIDEO_PLAYBACK?{watch_time:n.watch_time,video_duration:n.video_duration}:{}})})()}var d=n(733);const s={[r.K.EVENT_VIEW]:"whatmore_video_click_event",[r.K.VIDEO_LIKED]:"whatmore_video_like_event",[r.K.VIDEO_SHARE_CTA_CLICKED]:"whatmore_video_share_event",[r.K.PRODUCT_TILE_ATC_CLICKED]:"whatmore_video_atc_event",[r.K.SHOPNOW_ATC_CLICKED]:"whatmore_video_atc_event",[r.K.SHOPNOW_CLICKED]:"whatmore_product_tile_click_event",[r.K.PRODUCT_TILE_SHOPNOW_CLICKED]:"whatmore_product_tile_click_event",[r.K.VIDEO_PLAYBACK]:"whatmore_video_watch_event"};function l(e){var t;let{userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}=e;(0,d.s)({userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}),n in s&&a(n,null!==(t=null===l||void 0===l?void 0:l[1])&&void 0!==t?t:null===l||void 0===l?void 0:l[0])}function c(e){var t;let{userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}=e;(0,d.s)({userInteractionType:n,userInteractionMetadata:i,widgetSourceDetails:o,event:r,productList:l,ctaList:c}),n in s&&a(n,null!==(t=null===l||void 0===l?void 0:l[1])&&void 0!==t?t:null===l||void 0===l?void 0:l[0],i)}function u(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a}=e;(0,d.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a})}function p(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a}=e;(0,d.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:i,event:o,productList:r,ctaList:a})}},7244:function(){}}]);