whatmore-react-assets 1.0.454 → 1.0.455
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 +1 -1
- package/static/js/358.292e9571.chunk.js +1 -0
- package/static/js/{565.6ad843c9.chunk.js → 565.620287c0.chunk.js} +1 -1
- package/static/js/607.8dd54de1.chunk.js +1 -0
- package/static/js/{708.8200af77.chunk.js → 708.942928e0.chunk.js} +1 -1
- package/static/js/{74.8a2e0dea.chunk.js → 74.798641c4.chunk.js} +1 -1
- package/static/js/{972.b5c2bcdc.chunk.js → 972.66dec893.chunk.js} +1 -1
- package/static/js/986.6474a94e.chunk.js +1 -0
- package/whatmore.js +2 -2
- package/static/js/358.d860c7b4.chunk.js +0 -1
- package/static/js/607.74d61136.chunk.js +0 -1
- package/static/js/986.a7abedc6.chunk.js +0 -1
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[358],{3827:function(e,t,n){n.r(t);var r=n(7313),i=n(6090),o=n(7616),l=(n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811),n(9302)),a=n(2575),x=n(8866),p=n(7753),d=n(7129),s=n(7592),h=n(8631),c=n(6066),u=n(8782),f=n(9821),m=(n(8984),n(6417));const g=(0,a.Z)({key:"whatmore-css-cv"});t.default=function(e){const t=e.events,[n,a,w]=(0,x.Z)(),[v,j,y,C,b]=(0,f.Z)(),[S,k]=(0,r.useState)(Array(t.length).fill(0).map((()=>Math.random()))),R=(0,p.MO)("whatmoreCollectionsTileSize"),P="portrait"==n?0:(0,p.MO)("whatmoreLandscapePadding"),Z=(0,p.MO)("whatmoreCollectionsTilesSpacing"),{whatmoreRootId:L}=(0,r.useContext)(s.I),M=e.onClick;function B(e){M(e)}delete o.ZP.styles.global;var A=[];for(let r=0,i=!1;r<t.length;)i&&r!=t.length-1&&S[r]>.2?(A.push((0,m.jsx)(c.Z,{event1:t[r],event2:t[r+1],onClick:()=>{B(t[r-1])}},"collections-tile-"+r)),r+=2,i=!i):(A.push((0,m.jsx)(h.Z,{event:t[r],onClick:()=>{B(t[r-1])},borderRadius:"10%",removeBorders:!1},"collections-tile-"+r)),r+=1,i=!i);return(0,m.jsx)(l.C,{value:g,children:(0,m.jsx)("div",{children:(0,m.jsx)(i.x,{theme:o.ZP,cssVarsRoot:L,resetCSS:!1,children:(0,m.jsx)(d.V.Provider,{value:{tileTopMargin:0,tileBottomMMargin:0,tileLeftMargin:0,tileRightMargin:0,showPlayButton:!1},children:(0,m.jsx)("div",{style:{marginLeft:P+"px",marginRight:P+"px"},children:(0,m.jsx)(u.P,{renderElement:e=>(0,m.jsx)(m.Fragment,{children:e.eventData}),dataList:A,spacing:Z,defaultHeight:v*R*.01+"px",defaultWidth:j*R*.01+"px",retainAlreadyRenderedElements:!0})})})})})})}},7129:function(e,t,n){n.d(t,{V:function(){return r}});const r=(0,n(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},8631:function(e,t,n){var r=n(7313),i=n(9854),o=n(7753),l=(n(9111),n(123),n(9778),n(4892)),a=n(7129),x=n(9821),p=n(6417);t.Z=function(e){var t;const[n,d,s,h,c]=(0,x.Z)(),[u]=(0,o.j1)("whatmorePrimaryFont"),[f]=(0,o.j1)("whatmorePrimaryColor"),[m]=(0,o.j1)("whatmoreSecondaryColor"),[g]=(0,o.j1)("whatmoreShopId"),[w]=(0,o.j1)("whatmoreCollectionsTileSize"),[v,j]=(0,r.useState)(!1),y=(0,i.f6)(g);(0,r.useContext)(a.V);const C=e.event,b=e.onClick,S=e.removeBorders,k=n*w*.01,R=d*w*.01,P=null!==(t=e.borderRadius)&&void 0!==t?t:"0%";return(0,p.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:R+"px",marginLeft:S?"2px":"5px",marginRight:S?"2px":"5px",marginTop:S?"2px":"5px",marginBottom:S?"2px":"5px",cursor:"pointer"},onClick:()=>{j(!0),b(C)},className:[v?"whatmore-scale-on-tap":""].join(" "),children:(0,p.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:P,overflow:"hidden",boxShadow:S?"":"0px 1px 1px 0px "+m+"50, 0px -1px 1px 0px "+y+"50, 1px 0px 1px 0px "+m+"50, -1px 0px 1px 0px "+y+"80, 1px -1px 1px 0px "+m+"80, -1px 1px 1px 0px "+y+"DA, 1px 1px 1px 0px "+m+"DA, -1px -1px 1px 0px "+y+"DA"},children:(0,p.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:k+"px",width:R+"px",borderRadius:P,backgroundColor:"gray",overflow:"hidden"},children:(0,p.jsx)(l.Z,{height:"100%",width:"100%",url:C.thumbnail_image,isPlaying:!0,event:C})})})})}},6066:function(e,t,n){var r=n(7313),i=n(9854),o=n(7753),l=(n(9111),n(123),n(9778),n(4892)),a=n(7129),x=n(9821),p=n(6417);t.Z=function(e){var t;const[n,d,s,h,c]=(0,x.Z)(),[u]=(0,o.j1)("whatmorePrimaryFont"),[f]=(0,o.j1)("whatmorePrimaryColor"),[m]=(0,o.j1)("whatmoreSecondaryColor"),[g]=(0,o.j1)("whatmoreShopId"),[w]=(0,o.j1)("whatmoreCollectionsTileSize"),[v,j]=(0,r.useState)(!1),y=(0,i.f6)(g);(0,r.useContext)(a.V);const C=e.event1,b=e.event2,S=e.onClick,k=.01*w,R=n*k,P=n*k*.5,Z=d*k,L=null!==(t=e.borderRadius)&&void 0!==t?t:"10%",M="15%",B=e.removeBorders;return(0,p.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",flexShrink:0,height:R+"px",width:Z+"px",marginLeft:B?"2px":"5px",marginRight:B?"2px":"5px",marginTop:B?"2px":"5px",marginBottom:B?"2px":"5px",cursor:"pointer"},children:(0,p.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:B?"0px":L,boxShadow:B?"":"0px 1px 1px 0px "+m+"50, 0px -1px 1px 0px "+y+"50, 1px 0px 1px 0px "+m+"50, -1px 0px 1px 0px "+y+"80, 1px -1px 1px 0px "+m+"80, -1px 1px 1px 0px "+y+"DA, 1px 1px 1px 0px "+m+"DA, -1px -1px 1px 0px "+y+"DA"},onClick:()=>{j(!0),S(C)},className:[v?"whatmore-scale-on-tap":""].join(" "),children:[(0,p.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:P+"px",width:Z+"px",borderTopLeftRadius:B?"0px":M,borderTopRightRadius:B?"0px":M,borderBottom:"2px solid transparent",backgroundColor:"transparent",overflow:"hidden"},children:(0,p.jsx)(l.Z,{height:"100%",width:"100%",url:C.thumbnail_image,isPlaying:!0,event:C})}),(0,p.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:P+"px",width:Z+"px",borderBottomLeftRadius:B?"0px":M,borderBottomRightRadius:B?"0px":M,borderTop:"2px solid transparent",backgroundColor:"transparent",overflow:"hidden"},children:(0,p.jsx)(l.Z,{height:"100%",width:"100%",url:b.thumbnail_image,isPlaying:!0,event:b})})]})})}},8782:function(e,t,n){n.d(t,{P:function(){return x}});var r=n(3933),i=n(8866),o=n(7313),l=(n(123),n(6417));function a(e){const{ref:t,inView:n,entry:i}=(0,r.YD)({triggerOnce:e.retainAlreadyRenderedElements});return(0,l.jsx)("div",{ref:t,children:n?e.renderElement({eventData:e.data}):(0,l.jsx)("div",{style:{minWidth:e.defaultHeight,minHeight:e.defaultWidth}})})}function x(e){var t;const[n,r,x]=(0,i.Z)();return(0,o.useEffect)((()=>{function t(e){e.preventDefault(),e.stopPropagation(),n.scrollLeft+=e.deltaX,n.scrollLeft+=e.deltaY}const n=document.querySelector(".whatmore-carousel-horizontal-flex");return e.isScroll&&(null===n||void 0===n||n.addEventListener("wheel",t)),()=>{document.removeEventListener("wheel",t)}}),[]),(0,l.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",height:"fit-content",width:"100%",gap:null!==(t=e.spacing)&&void 0!==t?t:3,overflowX:"auto"},className:"whatmore-carousel-horizontal-flex",children:e.dataList.map(((t,n)=>(0,l.jsx)(a,{renderElement:e.renderElement,data:t,defaultHeight:e.defaultHeight,defaultWidth:e.defaultWidth,retainAlreadyRenderedElements:e.retainAlreadyRenderedElements},"key-"+n)))})}},9111:function(){},5892:function(){},4444:function(){},1811:function(){},6143:function(){},7850:function(){},9778:function(){}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[565],{941:function(e,t,n){n.d(t,{D:function(){return o}});const o=async function(e,t,n,o){if("STRNV8MHJTF"!=e&&"STR6HU283UZ"!=e&&"STR9T3LLEJB"!=e&&"STRWJMIOJNX"!=e&&"STRUDQ36YAC"!=e&&"STR1D5ONOZX"!=e){var c=await fetch("https://"+window.location.hostname+"/cart.js",{cache:"reload"}).then((e=>e.json()));if("27358003275"==e||"63748341981"==e||"68237558034"==e)document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0,detail:{cart:c,openMiniCart:!0}}));else if("19506115"==e)window.PXUTheme.jsAjaxCart.showDrawer(),window.PXUTheme.jsAjaxCart.updateView();else if("54465429691"==e)refreshCart(c),window.setTimeout((function(){$.fancybox.close(),$(".cart-button").click()}),500);else if("25427564"==e||"4243849314"==e||"57708314789"==e){(new theme.CartDrawer).open()}else if("62602182872"==e||"57362710572"==e)CartJS.getCart(),$(".block-cart").addClass("active");else if("20157815"==e||"60492578980"==e||"12183765088"==e||"58546946211"==e||"42070737058"==e||"71321583919"==e||"68492624171"==e||"74541891876"==e||"21187677"==e)document.documentElement.dispatchEvent(new CustomEvent("ajaxProduct:added",{bubbles:!0,detail:{}})),document.documentElement.dispatchEvent(new CustomEvent("cart:open",{bubbles:!0,detail:{}}));else if("2665447536"==e)fetch("/?section_id=cart-drawer").then((e=>e.text())).then((e=>{const t=(new DOMParser).parseFromString(e,"text/html").getElementById("cart-drawer").innerHTML;$("#cart-drawer").html(t),$('[aria-controls="cart-drawer"]')[0].click(),$(".header__cart-count .count-bubble ").html(cart.item_count).css("opacity",1)}));else if("57824805033"==e||"59504656436"==e||"58112966749"==e)fetch("/cart.json").then((e=>e.json())).then((e=>{fetch("/cart?view=item").then((e=>e.text())).then((t=>{const n=(new DOMParser).parseFromString(t,"text/html"),o=n.getElementById("CartDrawer"),c=document.getElementById("CartDrawer");o&&c&&(c.innerHTML=o.innerHTML),n.querySelector("#CartDrawer .totals__subtotal-value");const i=document.querySelector("cart-drawer");i&&i.classList.remove("is-empty");const r=document.querySelector("cart-drawer-items");r&&r.classList.remove("is-empty");const a=document.getElementById("cart-icon-bubble");if(a.querySelector(".cart-count-bubble"))a.querySelectorAll('.cart-count-bubble span[aria-hidden="true"]').forEach((t=>{t.textContent=e.item_count}));else{const t=document.createElement("div");t.className="cart-count-bubble",t.innerHTML='\n <span aria-hidden="true">'.concat(e.item_count,'</span>\n <span class="visually-hidden">').concat(e.item_count," items</span>\n "),a.appendChild(t)}a.click(),document.getElementById("CartDrawer-Overlay").addEventListener("click",(()=>{const e=document.querySelector("cart-drawer");e&&e.classList.remove("active"),document.body.classList.remove("overflow-hidden")}))}))}));else if("61094723750"==e)SLIDECART&&(SLIDECART_UPDATE(),SLIDECART_OPEN());else if("10272035"==e){const e=document.querySelector(".cart-drawer"),t=e.parentNode;t.classList.add("menu-opening"),t.setAttribute("open","open"),e.style.visibility="visible",e.style.transform="translate(0)"}else"1972174947"==e||"55194878152"==e?document.documentElement.dispatchEvent(new CustomEvent("cart:refresh:opend",{bubbles:!0,detail:{}})):"64463667449"==e?(document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0})),document.documentElement.dispatchEvent(new CustomEvent("cart:updated",{bubbles:!0,detail:{cart:c}})),document.getElementById("mini-cart").open=!0):document.documentElement.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{}}));setTimeout(t,n)}else{console.log("Executing cart refresh script..");document.getElementById("whatsmorecart").value=Math.random()}}},7300:function(e,t,n){n.d(t,{B6:function(){return o},WJ:function(){return c},yC:function(){return i}});const o=function(e){return"video"===e.event_type},c=function(e){return"image"===e.event_type},i=function(e){return"livestream"===e.event_type}},5160:function(e,t,n){n.d(t,{$L:function(){return p},JX:function(){return l},Z6:function(){return a},lY:function(){return d},rp:function(){return v},uD:function(){return h},wh:function(){return r},wz:function(){return u},x0:function(){return s}});var o,c=n(2860);n(7753),n(6967);const i=null!==(o="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==o&&o;function r(e){i&&console.debug("updating user view count for event.");const t={event_id:e.event_id,increase_by:1};fetch(c.Gc+"/event/metrics/views",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>(i&&console.debug("updating user view count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating user view count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating user view count user for event : ",e)}))}function a(e,t){i&&console.debug("updating like count for event.");const n={event_id:e.event_id,increase_by:t};fetch(c.Gc+"/event/metrics/like",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(i&&console.debug("updating like count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating like count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating like count user for event : ",e)}))}function s(e){i&&console.debug("updating share count for event.");const t={event_id:e.event_id,increase_by:1};fetch(c.Gc+"/event/metrics/share",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>(i&&console.debug("updating share count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating share count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating share count user for event : ",e)}))}function d(e,t){i&&console.debug("updating wa click count for event.");const n={event_id:e.event_id,increase_by:t};fetch(c.Gc+"/event/metrics/whatsapp",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(i&&console.debug("updating whatsapp click count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating whatsapp click count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating whatsapp click count user for event : ",e)}))}function u(e,t){i&&console.debug("updating event-product click count for event {} and product {}.",e.event_id,t.product_id);const n={event_id:e.event_id,product_id:t.product_id,increase_by:1};fetch(c.Gc+"/event/metrics/clicks",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(i&&console.debug("updating user event-product click count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating user event-product click count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product click count for event {} : ",e.event_id,t)}))}function l(e,t,n){i&&console.debug("updating event-product add to cart count for event {} and product {}.",e.event_id,t.product_id);const o={event_id:e.event_id,product_id:t.product_id,increase_by:n};fetch(c.Gc+"/event/metrics/add_to_cart",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(o)}).then((e=>(i&&console.debug("updating user event-product add to cart count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating user event-product add to cart count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product add to cart count for event {} : ",e.event_id,t)}))}function p(e,t){i&&console.debug("updating event-product buy now count for event {} and product {}.",e.event_id,t.product_id);const n={event_id:e.event_id,product_id:t.product_id,increase_by:1};fetch(c.Gc+"/event/metrics/buy_now",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(i&&console.debug("updating user event-product buy now count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating user event-product buy now count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product buy now count for event {} : ",e.event_id,t)}))}async function v(){let{storeId:e="",eventId:t=0,productId:n="",variantId:o="",cartToken:r="",checkoutToken:a="",quantity:s=0,price:d="",actionType:u="",trackingId:l=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},p={event_id:t,product_id:n,cart_token:r,checkout_token:a,quantity:s,price:d,variant_id:o,action_type:u,tracking_id:l};i&&console.debug("initiating ATC metadata event for eventId {}, productId {}, variantId {} ",t,n,o);const v=await fetch(c.Gc+"/cart-metadata/"+e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(p)}).then((e=>(i&&console.debug("initiating ATC metadata event for eventId {}, productId {}, variantId {} : HTTP "+e.status),e.json()))).catch((e=>{console.error("error initiating ATC metadata event for eventId {}, productId {}, variantId {} : ",t,n,o)}));return v}function h(e){const t={event_id:e.event.event_id,cta_id:e.cta.cta_id,increase_by:1};fetch(c.Gc+"/event/metrics/cta/clicks",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>(i&&console.debug("updating user cta click count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating user cta click count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating cta click count : ",e)}))}},4669:function(e,t,n){n.d(t,{Tc:function(){return v},ll:function(){return p}});var o,c=n(1824),i=n(7786),r=n(9854);n(7753);const a="Whatmore Video Shopping",s=null!==(o="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==o&&o,d="Video View",u={carousel:"Carousel",stories:"Stories",video_popup:"Video Popup"},l={homepage:"Home Page",product_page:"Product Page"};async function p(e){if((0,r.Dv)(e)&&null!==(0,r.hf)(e)&&(i.ZP.initialize((0,r.hf)(e)),s&&console.debug("Whatmore: initialized GA4")),(0,r.hv)(e)&&null!==(0,r.BH)(e)){const t=(0,r.OQ)(e);c.ZP.initialize((0,r.BH)(e),{useExistingGa:t}),s&&console.debug("Whatmore: initialized GA3")}}async function v(e,t,n){(0,r.hv)(e)&&null!==(0,r.BH)(e)&&(c.ZP.event({category:a,action:d,label:l[t]+":"+u[n]}),s&&console.debug("Whatmore: pushed view event to GA3")),(0,r.Dv)(e)&&null!==(0,r.hf)(e)&&(i.ZP.event({category:a,action:d+":"+l[t]+":"+u[n],value:1,nonInteraction:!1}),s&&console.debug("Whatmore: pushed view event to GA4"))}},795:function(e,t,n){n.d(t,{s:function(){return v}});var o=n(7381),c=n(9854),i=n(7753),r=n(2860);const a=function(e){let t={};t.metric_event_list=[e],(async()=>{!function(e){const t="ingesting analytis-event";(0,o.fs)(t);const n=e;fetch(r.DG+"/event_metrics/bulk",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>e.json())).then((e=>{})).catch((e=>{console.error("error "+t,e)}))}(t)})()},s=function(e,t,n,o){var c;return{landing_location_type:t.landingLocationType,template_type:t.templateType,whatmore_event:{id:e.event_id,eventset_id:null!==(c=e.eventset_id)&&void 0!==c?c:null,cta_list:o.map((e=>e.cta_id)),product_list:n.map((e=>e.product_id))}}};var d=n(778),u=n(2751),l=n(6967);const p=function(){return{user_id:(0,l.hb)(),session_id:(0,l.sQ)(),user_group:"group-a",user_agent:navigator.userAgent,store_id:(0,i.MO)("whatmoreShopId"),hostname:window.location.hostname,page_path:window.location.pathname,event_id:(0,u.x0)(),event_timestamp:Math.round((new Date).getTime()/1e3)}},v=function(){let{userInteractionType:e="",userInteractionMetadata:t={},widgetSourceDetails:n={},event:r="",productList:u=[],ctaList:l=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const v=(0,i.MO)("isInDesignMode"),h=(0,i.MO)("isDemoBrand"),g=(0,i.MO)("whatmoreShopId");if(!(0,c.AA)(g)||h||v)return;const m=p(),_=(0,d.r)(e,t),f=s(r,n,u,l),b=(0,i.MO)("whatmoreLoggingActive"),y={...m,interaction_data:_,data:f};b&&(0,o.EI)(y),(0,c.AA)(g)&&a({...m,interaction_data:_,data:f})}},778:function(e,t,n){n.d(t,{K:function(){return o},r:function(){return c}});const o=Object.freeze({EVENT_VIEW:"event-view",PRODUCT_CTA_VIEW:"product-cta-view",SHOPNOW_ATC_CLICKED:"shop-now-atc-clicked",SHOPNOW_BUYNOW_CLICKED:"shop-now-buy-now-clicked",PRODUCT_TILE_ATC_CLICKED:"product-tile-atc-clicked",PRODUCT_TILE_SHOPNOW_CLICKED:"product-tile-shopnow-clicked",VIDEO_LIKED:"video-liked",VIDEO_UNLIKED:"video-unliked",VIDEO_SHARE_CTA_CLICKED:"video-share-cta-clicked",VIDEO_MUTED:"video-muted",HOMEPAGE_CAROUSEL_SWIPED:"homepage-carousel-swiped",HOMEPAGE_VISITED:"homepage-visited",COLLECTION_PAGE_VISITED:"collection-page-visited",PDP_VISITED:"product-page-visited",HOMEPAGE_CAROUSEL_WIDGET_VIEW:"homepage-carousel-widget-view",BANNER_WIDGET_VIEW:"banner-widget-view",STORIES_WIDGET_VIEW:"stories-widget-view",COLLECTION_WIDGET_VIEW:"collection-widget-view",SPOTLIGHT_WIDGET_VIEW:"spotlight-widget-view",PDP_POPUP_WIDGET_VIEW:"pdp-popup-widget-view",VIDEO_PLAYBACK:"video-playback",SHOPNOW_CLICKED:"shopnow-clicked",WHATSAPP_ICON_CLICKED:"whatsapp-icon-clicked",BANNER_WIDGET_CLICKED:"banner-widget-clicked"}),c=function(e,t){return{name:e,metadata:JSON.stringify(t)}}},7643:function(e,t,n){n.d(t,{u:function(){return s}});var o=n(3933),c=n(7592),i=n(7313),r=n(795),a=(n(778),n(6417));const s=function(e){var t;const{ref:n,inView:s,entry:d}=(0,o.YD)({triggerOnce:!1,threshold:null!==(t=e.threshold)&&void 0!==t?t:1}),{whatmoreWidgetSourceDetails:u}=(0,i.useContext)(c.I);return(0,i.useEffect)((()=>{var t,n,o,c;s&&null!==(t=e.triggerFlag)&&void 0!==t&&t&&(0,r.s)({userInteractionType:e.userInteractionType,userInteractionMetadata:null!==(n=e.userInteractionMetadata)&&void 0!==n?n:{},widgetSourceDetails:u,event:e.event,productList:null!==(o=e.productList)&&void 0!==o?o:[],ctaList:null!==(c=e.ctaList)&&void 0!==c?c:[]})}),[s]),(0,a.jsx)("div",{ref:n,children:e.children})}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[565],{941:function(e,t,n){n.d(t,{D:function(){return o}});const o=async function(e,t,n,o){if("STRNV8MHJTF"!=e&&"STR6HU283UZ"!=e&&"STR9T3LLEJB"!=e&&"STRWJMIOJNX"!=e&&"STRUDQ36YAC"!=e&&"STR1D5ONOZX"!=e){var c=await fetch("https://"+window.location.hostname+"/cart.js",{cache:"reload"}).then((e=>e.json()));if("27358003275"==e||"63748341981"==e||"68237558034"==e)document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0,detail:{cart:c,openMiniCart:!0}}));else if("19506115"==e)window.PXUTheme.jsAjaxCart.showDrawer(),window.PXUTheme.jsAjaxCart.updateView();else if("54465429691"==e)refreshCart(c),window.setTimeout((function(){$.fancybox.close(),$(".cart-button").click()}),500);else if("25427564"==e||"4243849314"==e||"57708314789"==e){(new theme.CartDrawer).open()}else if("62602182872"==e||"57362710572"==e)CartJS.getCart(),$(".block-cart").addClass("active");else if("20157815"==e||"60492578980"==e||"12183765088"==e||"58546946211"==e||"42070737058"==e||"71321583919"==e||"68492624171"==e||"74541891876"==e||"21187677"==e)document.documentElement.dispatchEvent(new CustomEvent("ajaxProduct:added",{bubbles:!0,detail:{}})),document.documentElement.dispatchEvent(new CustomEvent("cart:open",{bubbles:!0,detail:{}}));else if("2665447536"==e)fetch("/?section_id=cart-drawer").then((e=>e.text())).then((e=>{const t=(new DOMParser).parseFromString(e,"text/html").getElementById("cart-drawer").innerHTML;$("#cart-drawer").html(t),$('[aria-controls="cart-drawer"]')[0].click(),$(".header__cart-count .count-bubble ").html(cart.item_count).css("opacity",1)}));else if("57824805033"==e||"59504656436"==e||"58112966749"==e)fetch("/cart.json").then((e=>e.json())).then((e=>{fetch("/cart?view=item").then((e=>e.text())).then((t=>{const n=(new DOMParser).parseFromString(t,"text/html"),o=n.getElementById("CartDrawer"),c=document.getElementById("CartDrawer");o&&c&&(c.innerHTML=o.innerHTML),n.querySelector("#CartDrawer .totals__subtotal-value");const i=document.querySelector("cart-drawer");i&&i.classList.remove("is-empty");const r=document.querySelector("cart-drawer-items");r&&r.classList.remove("is-empty");const a=document.getElementById("cart-icon-bubble");if(a.querySelector(".cart-count-bubble"))a.querySelectorAll('.cart-count-bubble span[aria-hidden="true"]').forEach((t=>{t.textContent=e.item_count}));else{const t=document.createElement("div");t.className="cart-count-bubble",t.innerHTML='\n <span aria-hidden="true">'.concat(e.item_count,'</span>\n <span class="visually-hidden">').concat(e.item_count," items</span>\n "),a.appendChild(t)}a.click(),document.getElementById("CartDrawer-Overlay").addEventListener("click",(()=>{const e=document.querySelector("cart-drawer");e&&e.classList.remove("active"),document.body.classList.remove("overflow-hidden")}))}))}));else if("61094723750"==e)SLIDECART&&(SLIDECART_UPDATE(),SLIDECART_OPEN());else if("10272035"==e){const e=document.querySelector(".cart-drawer"),t=e.parentNode;t.classList.add("menu-opening"),t.setAttribute("open","open"),e.style.visibility="visible",e.style.transform="translate(0)"}else"1972174947"==e||"55194878152"==e?document.documentElement.dispatchEvent(new CustomEvent("cart:refresh:opend",{bubbles:!0,detail:{}})):"64463667449"==e?(document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0})),document.documentElement.dispatchEvent(new CustomEvent("cart:updated",{bubbles:!0,detail:{cart:c}})),document.getElementById("mini-cart").open=!0):document.documentElement.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{}}));setTimeout(t,n)}else{console.log("Executing cart refresh script..");document.getElementById("whatsmorecart").value=Math.random()}}},7300:function(e,t,n){n.d(t,{B6:function(){return o},WJ:function(){return c},yC:function(){return i}});const o=function(e){return"video"===e.event_type},c=function(e){return"image"===e.event_type},i=function(e){return"livestream"===e.event_type}},5160:function(e,t,n){n.d(t,{$L:function(){return p},JX:function(){return l},Z6:function(){return a},lY:function(){return d},rp:function(){return v},uD:function(){return h},wh:function(){return r},wz:function(){return u},x0:function(){return s}});var o,c=n(2860);n(7753),n(6967);const i=null!==(o="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==o&&o;function r(e){i&&console.debug("updating user view count for event.");const t={event_id:e.event_id,increase_by:1};fetch(c.Gc+"/event/metrics/views",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>(i&&console.debug("updating user view count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating user view count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating user view count user for event : ",e)}))}function a(e,t){i&&console.debug("updating like count for event.");const n={event_id:e.event_id,increase_by:t};fetch(c.Gc+"/event/metrics/like",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(i&&console.debug("updating like count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating like count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating like count user for event : ",e)}))}function s(e){i&&console.debug("updating share count for event.");const t={event_id:e.event_id,increase_by:1};fetch(c.Gc+"/event/metrics/share",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>(i&&console.debug("updating share count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating share count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating share count user for event : ",e)}))}function d(e,t){i&&console.debug("updating wa click count for event.");const n={event_id:e.event_id,increase_by:t};fetch(c.Gc+"/event/metrics/whatsapp",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(i&&console.debug("updating whatsapp click count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating whatsapp click count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating whatsapp click count user for event : ",e)}))}function u(e,t){i&&console.debug("updating event-product click count for event {} and product {}.",e.event_id,t.product_id);const n={event_id:e.event_id,product_id:t.product_id,increase_by:1};fetch(c.Gc+"/event/metrics/clicks",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(i&&console.debug("updating user event-product click count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating user event-product click count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product click count for event {} : ",e.event_id,t)}))}function l(e,t,n){i&&console.debug("updating event-product add to cart count for event {} and product {}.",e.event_id,t.product_id);const o={event_id:e.event_id,product_id:t.product_id,increase_by:n};fetch(c.Gc+"/event/metrics/add_to_cart",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(o)}).then((e=>(i&&console.debug("updating user event-product add to cart count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating user event-product add to cart count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product add to cart count for event {} : ",e.event_id,t)}))}function p(e,t){i&&console.debug("updating event-product buy now count for event {} and product {}.",e.event_id,t.product_id);const n={event_id:e.event_id,product_id:t.product_id,increase_by:1};fetch(c.Gc+"/event/metrics/buy_now",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>(i&&console.debug("updating user event-product buy now count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating user event-product buy now count response : "+JSON.stringify(e))})).catch((t=>{console.error("error updating user event-product buy now count for event {} : ",e.event_id,t)}))}async function v(){let{storeId:e="",eventId:t=0,productId:n="",variantId:o="",cartToken:r="",checkoutToken:a="",quantity:s=0,price:d="",actionType:u="",trackingId:l=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},p={event_id:t,product_id:n,cart_token:r,checkout_token:a,quantity:s,price:d,variant_id:o,action_type:u,tracking_id:l};i&&console.debug("initiating ATC metadata event for eventId {}, productId {}, variantId {} ",t,n,o);const v=await fetch(c.Gc+"/cart-metadata/"+e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(p)}).then((e=>(i&&console.debug("initiating ATC metadata event for eventId {}, productId {}, variantId {} : HTTP "+e.status),e.json()))).catch((e=>{console.error("error initiating ATC metadata event for eventId {}, productId {}, variantId {} : ",t,n,o)}));return v}function h(e){const t={event_id:e.event.event_id,cta_id:e.cta.cta_id,increase_by:1};fetch(c.Gc+"/event/metrics/cta/clicks",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>(i&&console.debug("updating user cta click count response : HTTP "+e.status),e.json()))).then((e=>{i&&console.debug("updating user cta click count response : "+JSON.stringify(e))})).catch((e=>{console.error("error updating cta click count : ",e)}))}},4669:function(e,t,n){n.d(t,{Tc:function(){return v},ll:function(){return p}});var o,c=n(1824),i=n(7786),r=n(9854);n(7753);const a="Whatmore Video Shopping",s=null!==(o="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==o&&o,d="Video View",u={carousel:"Carousel",stories:"Stories",video_popup:"Video Popup"},l={homepage:"Home Page",product_page:"Product Page"};async function p(e){if((0,r.Dv)(e)&&null!==(0,r.hf)(e)&&(i.ZP.initialize((0,r.hf)(e)),s&&console.debug("Whatmore: initialized GA4")),(0,r.hv)(e)&&null!==(0,r.BH)(e)){const t=(0,r.OQ)(e);c.ZP.initialize((0,r.BH)(e),{useExistingGa:t}),s&&console.debug("Whatmore: initialized GA3")}}async function v(e,t,n){(0,r.hv)(e)&&null!==(0,r.BH)(e)&&(c.ZP.event({category:a,action:d,label:l[t]+":"+u[n]}),s&&console.debug("Whatmore: pushed view event to GA3")),(0,r.Dv)(e)&&null!==(0,r.hf)(e)&&(i.ZP.event({category:a,action:d+":"+l[t]+":"+u[n],value:1,nonInteraction:!1}),s&&console.debug("Whatmore: pushed view event to GA4"))}},733:function(e,t,n){n.d(t,{s:function(){return p}});var o=n(7381),c=n(9854),i=n(7753),r=n(7008);const a=function(e,t,n,o){var c;return{landing_location_type:t.landingLocationType,template_type:t.templateType,whatmore_event:{id:e.event_id,eventset_id:null!==(c=e.eventset_id)&&void 0!==c?c:null,cta_list:o.map((e=>e.cta_id)),product_list:n.map((e=>e.product_id))}}};var s=n(778),d=n(2751),u=n(6967);const l=function(){return{user_id:(0,u.hb)(),session_id:(0,u.sQ)(),user_group:"group-a",user_agent:navigator.userAgent,store_id:(0,i.MO)("whatmoreShopId"),hostname:window.location.hostname,page_path:window.location.pathname,event_id:(0,d.x0)(),event_timestamp:Math.round((new Date).getTime()/1e3)}},p=function(){let{userInteractionType:e="",userInteractionMetadata:t={},widgetSourceDetails:n={},event:d="",productList:u=[],ctaList:p=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const v=(0,i.MO)("isInDesignMode"),h=(0,i.MO)("isDemoBrand"),g=(0,i.MO)("whatmoreShopId"),m=10;if(!(0,c.AA)(g)||h||v)return;const _="_whatmore_bulk_events",f=l(),b=(0,s.r)(e,t),w=a(d,n,u,p),y=(0,i.MO)("whatmoreLoggingActive"),T={...f,interaction_data:b,data:w},E=JSON.parse(localStorage.getItem(_))||[];E.push(T),localStorage.setItem(_,JSON.stringify(E)),y&&(0,o.EI)(T),E.length>=m&&((0,r.K)(E),localStorage.removeItem(_))}},778:function(e,t,n){n.d(t,{K:function(){return o},r:function(){return c}});const o=Object.freeze({EVENT_VIEW:"event-view",PRODUCT_CTA_VIEW:"product-cta-view",SHOPNOW_ATC_CLICKED:"shop-now-atc-clicked",SHOPNOW_BUYNOW_CLICKED:"shop-now-buy-now-clicked",PRODUCT_TILE_ATC_CLICKED:"product-tile-atc-clicked",PRODUCT_TILE_SHOPNOW_CLICKED:"product-tile-shopnow-clicked",VIDEO_LIKED:"video-liked",VIDEO_UNLIKED:"video-unliked",VIDEO_SHARE_CTA_CLICKED:"video-share-cta-clicked",VIDEO_MUTED:"video-muted",HOMEPAGE_CAROUSEL_SWIPED:"homepage-carousel-swiped",HOMEPAGE_VISITED:"homepage-visited",COLLECTION_PAGE_VISITED:"collection-page-visited",PDP_VISITED:"product-page-visited",HOMEPAGE_CAROUSEL_WIDGET_VIEW:"homepage-carousel-widget-view",BANNER_WIDGET_VIEW:"banner-widget-view",STORIES_WIDGET_VIEW:"stories-widget-view",COLLECTION_WIDGET_VIEW:"collection-widget-view",SPOTLIGHT_WIDGET_VIEW:"spotlight-widget-view",PDP_POPUP_WIDGET_VIEW:"pdp-popup-widget-view",VIDEO_PLAYBACK:"video-playback",SHOPNOW_CLICKED:"shopnow-clicked",WHATSAPP_ICON_CLICKED:"whatsapp-icon-clicked",BANNER_WIDGET_CLICKED:"banner-widget-clicked"}),c=function(e,t){return{name:e,metadata:JSON.stringify(t)}}},7643:function(e,t,n){n.d(t,{u:function(){return s}});var o=n(3933),c=n(7592),i=n(7313),r=n(733),a=(n(778),n(6417));const s=function(e){var t;const{ref:n,inView:s,entry:d}=(0,o.YD)({triggerOnce:!1,threshold:null!==(t=e.threshold)&&void 0!==t?t:1}),{whatmoreWidgetSourceDetails:u}=(0,i.useContext)(c.I);return(0,i.useEffect)((()=>{var t,n,o,c;s&&null!==(t=e.triggerFlag)&&void 0!==t&&t&&(0,r.s)({userInteractionType:e.userInteractionType,userInteractionMetadata:null!==(n=e.userInteractionMetadata)&&void 0!==n?n:{},widgetSourceDetails:u,event:e.event,productList:null!==(o=e.productList)&&void 0!==o?o:[],ctaList:null!==(c=e.ctaList)&&void 0!==c?c:[]})}),[s]),(0,a.jsx)("div",{ref:n,children:e.children})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[607],{6071:function(e,t,n){n.r(t);var r=n(7313),o=n(6090),i=n(7616),l=(n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811),n(9302)),a=n(2575),x=(n(8984),n(8866)),p=n(7753),d=n(7129),s=n(7592),h=n(8631),c=n(6066),u=n(8782),f=n(9821),m=(n(4862),n(6417));const g=(0,a.Z)({key:"whatmore-css-cv"});t.default=function(e){const t=e.events,[n,a,v]=(0,x.Z)(),[w,j]=(0,r.useState)(Array(t.length).fill(0).map((()=>Math.random()))),[y,C,b,S,k]=(0,f.Z)(),R=(0,p.MO)("whatmoreCollectionsTileSize"),P="portrait"==n?0:(0,p.MO)("whatmoreLandscapePadding"),Z=(0,p.MO)("whatmoreCollectionsTilesSpacing"),{whatmoreRootId:L}=(0,r.useContext)(s.I),M=e.onClick;function B(e){M(e)}delete i.ZP.styles.global;var A=[];for(let r=0,o=!1;r<t.length;)o&&r!=t.length-1&&w[r]>.2?(A.push((0,m.jsx)(c.Z,{event1:t[r],event2:t[r+1],onClick:()=>{B(t[r-1])},removeBorders:!0},"collections-tile-"+r)),r+=2,o=!o):(A.push((0,m.jsx)(h.Z,{event:t[r],onClick:()=>{B(t[r-1])},removeBorders:!0,borderRadius:"0%"},"collections-tile-"+r)),r+=1,o=!o);return(0,m.jsx)(l.C,{value:g,children:(0,m.jsx)("div",{children:(0,m.jsx)(o.x,{theme:i.ZP,cssVarsRoot:L,resetCSS:!1,children:(0,m.jsx)(d.V.Provider,{value:{tileTopMargin:0,tileBottomMMargin:0,tileLeftMargin:0,tileRightMargin:0,showPlayButton:!1},children:(0,m.jsx)("div",{style:{marginLeft:P+"px",marginRight:P+"px"},children:(0,m.jsx)(u.P,{renderElement:e=>(0,m.jsx)(m.Fragment,{children:e.eventData}),dataList:A,spacing:Z,defaultHeight:y*R*.01+"px",defaultWidth:C*R*.01+"px",retainAlreadyRenderedElements:!0})})})})})})}},7129:function(e,t,n){n.d(t,{V:function(){return r}});const r=(0,n(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},8631:function(e,t,n){var r=n(7313),o=n(9854),i=n(7753),l=(n(9111),n(123),n(9778),n(4892)),a=n(7129),x=n(9821),p=n(6417);t.Z=function(e){var t;const[n,d,s,h,c]=(0,x.Z)(),[u]=(0,i.j1)("whatmorePrimaryFont"),[f]=(0,i.j1)("whatmorePrimaryColor"),[m]=(0,i.j1)("whatmoreSecondaryColor"),[g]=(0,i.j1)("whatmoreShopId"),[v]=(0,i.j1)("whatmoreCollectionsTileSize"),[w,j]=(0,r.useState)(!1),y=(0,o.f6)(g);(0,r.useContext)(a.V);const C=e.event,b=e.onClick,S=e.removeBorders,k=n*v*.01,R=d*v*.01,P=null!==(t=e.borderRadius)&&void 0!==t?t:"0%";return(0,p.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:R+"px",marginLeft:S?"2px":"5px",marginRight:S?"2px":"5px",marginTop:S?"2px":"5px",marginBottom:S?"2px":"5px",cursor:"pointer"},onClick:()=>{j(!0),b(C)},className:[w?"whatmore-scale-on-tap":""].join(" "),children:(0,p.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:P,overflow:"hidden",boxShadow:S?"":"0px 1px 1px 0px "+m+"50, 0px -1px 1px 0px "+y+"50, 1px 0px 1px 0px "+m+"50, -1px 0px 1px 0px "+y+"80, 1px -1px 1px 0px "+m+"80, -1px 1px 1px 0px "+y+"DA, 1px 1px 1px 0px "+m+"DA, -1px -1px 1px 0px "+y+"DA"},children:(0,p.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:k+"px",width:R+"px",borderRadius:P,backgroundColor:"gray",overflow:"hidden"},children:(0,p.jsx)(l.Z,{height:"100%",width:"100%",url:C.thumbnail_image,isPlaying:!0,event:C})})})})}},6066:function(e,t,n){var r=n(7313),o=n(9854),i=n(7753),l=(n(9111),n(123),n(9778),n(4892)),a=n(7129),x=n(9821),p=n(6417);t.Z=function(e){var t;const[n,d,s,h,c]=(0,x.Z)(),[u]=(0,i.j1)("whatmorePrimaryFont"),[f]=(0,i.j1)("whatmorePrimaryColor"),[m]=(0,i.j1)("whatmoreSecondaryColor"),[g]=(0,i.j1)("whatmoreShopId"),[v]=(0,i.j1)("whatmoreCollectionsTileSize"),[w,j]=(0,r.useState)(!1),y=(0,o.f6)(g);(0,r.useContext)(a.V);const C=e.event1,b=e.event2,S=e.onClick,k=.01*v,R=n*k,P=n*k*.5,Z=d*k,L=null!==(t=e.borderRadius)&&void 0!==t?t:"10%",M="15%",B=e.removeBorders;return(0,p.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",flexShrink:0,height:R+"px",width:Z+"px",marginLeft:B?"2px":"5px",marginRight:B?"2px":"5px",marginTop:B?"2px":"5px",marginBottom:B?"2px":"5px",cursor:"pointer"},children:(0,p.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:B?"0px":L,boxShadow:B?"":"0px 1px 1px 0px "+m+"50, 0px -1px 1px 0px "+y+"50, 1px 0px 1px 0px "+m+"50, -1px 0px 1px 0px "+y+"80, 1px -1px 1px 0px "+m+"80, -1px 1px 1px 0px "+y+"DA, 1px 1px 1px 0px "+m+"DA, -1px -1px 1px 0px "+y+"DA"},onClick:()=>{j(!0),S(C)},className:[w?"whatmore-scale-on-tap":""].join(" "),children:[(0,p.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:P+"px",width:Z+"px",borderTopLeftRadius:B?"0px":M,borderTopRightRadius:B?"0px":M,borderBottom:"2px solid transparent",backgroundColor:"transparent",overflow:"hidden"},children:(0,p.jsx)(l.Z,{height:"100%",width:"100%",url:C.thumbnail_image,isPlaying:!0,event:C})}),(0,p.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:P+"px",width:Z+"px",borderBottomLeftRadius:B?"0px":M,borderBottomRightRadius:B?"0px":M,borderTop:"2px solid transparent",backgroundColor:"transparent",overflow:"hidden"},children:(0,p.jsx)(l.Z,{height:"100%",width:"100%",url:b.thumbnail_image,isPlaying:!0,event:b})})]})})}},8782:function(e,t,n){n.d(t,{P:function(){return x}});var r=n(3933),o=n(8866),i=n(7313),l=(n(123),n(6417));function a(e){const{ref:t,inView:n,entry:o}=(0,r.YD)({triggerOnce:e.retainAlreadyRenderedElements});return(0,l.jsx)("div",{ref:t,children:n?e.renderElement({eventData:e.data}):(0,l.jsx)("div",{style:{minWidth:e.defaultHeight,minHeight:e.defaultWidth}})})}function x(e){var t;const[n,r,x]=(0,o.Z)();return(0,i.useEffect)((()=>{function t(e){e.preventDefault(),e.stopPropagation(),n.scrollLeft+=e.deltaX,n.scrollLeft+=e.deltaY}const n=document.querySelector(".whatmore-carousel-horizontal-flex");return e.isScroll&&(null===n||void 0===n||n.addEventListener("wheel",t)),()=>{document.removeEventListener("wheel",t)}}),[]),(0,l.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",height:"fit-content",width:"100%",gap:null!==(t=e.spacing)&&void 0!==t?t:3,overflowX:"auto"},className:"whatmore-carousel-horizontal-flex",children:e.dataList.map(((t,n)=>(0,l.jsx)(a,{renderElement:e.renderElement,data:t,defaultHeight:e.defaultHeight,defaultWidth:e.defaultWidth,retainAlreadyRenderedElements:e.retainAlreadyRenderedElements},"key-"+n)))})}},9111:function(){},5892:function(){},4444:function(){},1811:function(){},6143:function(){},7850:function(){},9778:function(){}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[708],{3867:function(t,e,n){var r=n(8816),a=n(417),i=n(4885),o=n(7753),s=n(7592),l=n(7313),c=n(6417);e.Z=function(t){var e;const{whatmoreUITheme:n}=(0,l.useContext)(s.I),[u]=(0,o.j1)("whatmoreSecondaryColor"),[p,d]=(0,o.j1)("productRatings"),y=(0,o.MO)("whatmorePrimaryFont"),f=(t.storeId,t.productId),m=(t.productLink,t.fontSize),x=null!==(e=t.fontColor)&&void 0!==e?e:"gray";if(null===p||"undefined"==typeof p||!(f in p)||p[f].avgRating>5)return(0,c.jsx)(c.Fragment,{});const v=p[f].avgRating,I=p[f].totalRatings;return(0,c.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center"},children:(0,c.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(((t,e)=>(0,c.jsx)(r.Z,{sx:{color:u,fontSize:m+"px"}},"star-icon"+e))),v-Math.floor(v)>.2?(0,c.jsx)(a.Z,{sx:{color:u,fontSize:m+"px"}},"star-half-icon"):v-Math.floor(v)==0?(0,c.jsx)(c.Fragment,{}):(0,c.jsx)(i.Z,{sx:{color:u,fontSize:m+"px"}},"star-outline-icon"),[...Array(Math.floor(5-v))].map(((t,e)=>(0,c.jsx)(i.Z,{sx:{color:u,fontSize:m+"px"}},"star-outline-icon-"+e))),(0,c.jsx)("div",{children:(0,c.jsx)("div",{width:"2px"})}),(0,c.jsx)("div",{children:(0,c.jsx)("div",{style:{backgroundColor:u,borderRadius:"round"==n?"2px":"0px",padding:"1px",overflow:"hidden"},children:(0,c.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color","white","important"),t.style.setProperty("font-size",.8*m+"px","important"),t.style.setProperty("font-family",y,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"medium"},children:["\xa0",v,"\xa0"]})})}),(0,c.jsx)("div",{children:(0,c.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color",x,"important"),t.style.setProperty("font-size",.8*m+"px","important"),t.style.setProperty("font-family",y,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"medium"},children:["\xa0","("+I+")"]})})]})})}},499:function(t,e){e.Z={LIVE:{name:"LIVE",color:"gray.600"},UPCOMING:{name:"UPCOMING",color:"gray.600"},DEFAULT:{name:"LIVE EVENT",color:"gray.600"},COMPLETED:{name:"ENDED",color:"gray.600"}}},4897:function(t,e,n){var r=n(499);e.Z=class{static getEventStatus(t){t.time_zone="GMT+5:30";var e=t.start_time+":00",n=t.end_time,a=t.scheduled_date,i=t.status,o=t.time_zone;if(i.toUpperCase()==r.Z.LIVE.name)return{status:r.Z.LIVE,bannerText:" "+r.Z.LIVE.name+" ",timeToStartInMins:0};if(i.toUpperCase()==r.Z.UPCOMING.name){var s=new Date(a+" "+e+" "+o),l=(new Date(a+" "+n+" "+o),function(t){var e=new Date,n=(t.getTime()-e.getTime())/1e3,a=n/60,i=a/60,o=i/24;return n<=0?{status:r.Z.COMPLETED,bannerText:" "+r.Z.COMPLETED.name+" ",timeToStartInMins:0}:n>=1&&n<=30?{status:r.Z.UPCOMING,bannerText:"Starts in "+Math.round(n)+" sec ",timeToStartInMins:n/60}:a<60?{status:r.Z.UPCOMING,bannerText:"Starts in "+Math.round(a)+" min ",timeToStartInMins:a}:i<24?{status:r.Z.UPCOMING,bannerText:"Starts in "+Math.round(i)+" hr ",timeToStartInMins:60*i}:o<7?{status:r.Z.UPCOMING,bannerText:" "+["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][t.getDay()]+" ",timeToStartInMins:60*o*24}:{status:r.Z.UPCOMING,bannerText:"Upcoming",timeToStartInMins:2880}}(s));return{status:l.status,bannerText:l.bannerText,timeToStartInMins:l.timeToStartInMins}}return console.error("invalid status for event :: id : "+t.event_id+", status : "+t.status),{status:r.Z.DEFAULT,bannerText:"live event",timeToStartInMins:2880}}}},5456:function(t,e,n){n.d(e,{B:function(){return r}});const r=function(t,e){return!(isNaN(e)||!e||("string"===typeof e||e instanceof String)&&!e.trim().length)&&!(parseInt(e)<=parseInt(t))}},7376:function(t,e,n){n.d(e,{GF:function(){return a},PB:function(){return s},Z2:function(){return i},y4:function(){return o}});var r=n(
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[708],{3867:function(t,e,n){var r=n(8816),a=n(417),i=n(4885),o=n(7753),s=n(7592),l=n(7313),c=n(6417);e.Z=function(t){var e;const{whatmoreUITheme:n}=(0,l.useContext)(s.I),[u]=(0,o.j1)("whatmoreSecondaryColor"),[p,d]=(0,o.j1)("productRatings"),y=(0,o.MO)("whatmorePrimaryFont"),f=(t.storeId,t.productId),m=(t.productLink,t.fontSize),x=null!==(e=t.fontColor)&&void 0!==e?e:"gray";if(null===p||"undefined"==typeof p||!(f in p)||p[f].avgRating>5)return(0,c.jsx)(c.Fragment,{});const v=p[f].avgRating,I=p[f].totalRatings;return(0,c.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center"},children:(0,c.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(((t,e)=>(0,c.jsx)(r.Z,{sx:{color:u,fontSize:m+"px"}},"star-icon"+e))),v-Math.floor(v)>.2?(0,c.jsx)(a.Z,{sx:{color:u,fontSize:m+"px"}},"star-half-icon"):v-Math.floor(v)==0?(0,c.jsx)(c.Fragment,{}):(0,c.jsx)(i.Z,{sx:{color:u,fontSize:m+"px"}},"star-outline-icon"),[...Array(Math.floor(5-v))].map(((t,e)=>(0,c.jsx)(i.Z,{sx:{color:u,fontSize:m+"px"}},"star-outline-icon-"+e))),(0,c.jsx)("div",{children:(0,c.jsx)("div",{width:"2px"})}),(0,c.jsx)("div",{children:(0,c.jsx)("div",{style:{backgroundColor:u,borderRadius:"round"==n?"2px":"0px",padding:"1px",overflow:"hidden"},children:(0,c.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color","white","important"),t.style.setProperty("font-size",.8*m+"px","important"),t.style.setProperty("font-family",y,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"medium"},children:["\xa0",v,"\xa0"]})})}),(0,c.jsx)("div",{children:(0,c.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color",x,"important"),t.style.setProperty("font-size",.8*m+"px","important"),t.style.setProperty("font-family",y,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"medium"},children:["\xa0","("+I+")"]})})]})})}},499:function(t,e){e.Z={LIVE:{name:"LIVE",color:"gray.600"},UPCOMING:{name:"UPCOMING",color:"gray.600"},DEFAULT:{name:"LIVE EVENT",color:"gray.600"},COMPLETED:{name:"ENDED",color:"gray.600"}}},4897:function(t,e,n){var r=n(499);e.Z=class{static getEventStatus(t){t.time_zone="GMT+5:30";var e=t.start_time+":00",n=t.end_time,a=t.scheduled_date,i=t.status,o=t.time_zone;if(i.toUpperCase()==r.Z.LIVE.name)return{status:r.Z.LIVE,bannerText:" "+r.Z.LIVE.name+" ",timeToStartInMins:0};if(i.toUpperCase()==r.Z.UPCOMING.name){var s=new Date(a+" "+e+" "+o),l=(new Date(a+" "+n+" "+o),function(t){var e=new Date,n=(t.getTime()-e.getTime())/1e3,a=n/60,i=a/60,o=i/24;return n<=0?{status:r.Z.COMPLETED,bannerText:" "+r.Z.COMPLETED.name+" ",timeToStartInMins:0}:n>=1&&n<=30?{status:r.Z.UPCOMING,bannerText:"Starts in "+Math.round(n)+" sec ",timeToStartInMins:n/60}:a<60?{status:r.Z.UPCOMING,bannerText:"Starts in "+Math.round(a)+" min ",timeToStartInMins:a}:i<24?{status:r.Z.UPCOMING,bannerText:"Starts in "+Math.round(i)+" hr ",timeToStartInMins:60*i}:o<7?{status:r.Z.UPCOMING,bannerText:" "+["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][t.getDay()]+" ",timeToStartInMins:60*o*24}:{status:r.Z.UPCOMING,bannerText:"Upcoming",timeToStartInMins:2880}}(s));return{status:l.status,bannerText:l.bannerText,timeToStartInMins:l.timeToStartInMins}}return console.error("invalid status for event :: id : "+t.event_id+", status : "+t.status),{status:r.Z.DEFAULT,bannerText:"live event",timeToStartInMins:2880}}}},5456:function(t,e,n){n.d(e,{B:function(){return r}});const r=function(t,e){return!(isNaN(e)||!e||("string"===typeof e||e instanceof String)&&!e.trim().length)&&!(parseInt(e)<=parseInt(t))}},7376:function(t,e,n){n.d(e,{GF:function(){return a},PB:function(){return s},Z2:function(){return i},y4:function(){return o}});var r=n(733);function a(t){let{userInteractionType:e,userInteractionMetadata:n,widgetSourceDetails:a,event:i,productList:o,ctaList:s}=t;(0,r.s)({userInteractionType:e,userInteractionMetadata:n,widgetSourceDetails:a,event:i,productList:o,ctaList:s})}function i(t){let{userInteractionType:e,userInteractionMetadata:n,widgetSourceDetails:a,event:i,productList:o,ctaList:s}=t;(0,r.s)({userInteractionType:e,userInteractionMetadata:n,widgetSourceDetails:a,event:i,productList:o,ctaList:s})}function o(t){let{userInteractionType:e,userInteractionMetadata:n,widgetSourceDetails:a,event:i,productList:o,ctaList:s}=t;(0,r.s)({userInteractionType:e,userInteractionMetadata:n,widgetSourceDetails:a,event:i,productList:o,ctaList:s})}function s(t){let{userInteractionType:e,userInteractionMetadata:n,widgetSourceDetails:a,event:i,productList:o,ctaList:s}=t;(0,r.s)({userInteractionType:e,userInteractionMetadata:n,widgetSourceDetails:a,event:i,productList:o,ctaList:s})}},8816:function(t,e,n){var r=n(5318);e.Z=void 0;var a=r(n(5045)),i=n(6417),o=(0,a.default)((0,i.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");e.Z=o},417:function(t,e,n){var r=n(5318);e.Z=void 0;var a=r(n(5045)),i=n(6417),o=(0,a.default)((0,i.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.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarHalf");e.Z=o},4885:function(t,e,n){var r=n(5318);e.Z=void 0;var a=r(n(5045)),i=n(6417),o=(0,a.default)((0,i.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.03L22 9.24zM12 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.28L12 15.4z"}),"StarOutline");e.Z=o},5892:function(){},4444:function(){},1811:function(){},7850:function(){}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[74],{5380:function(e,t,i){i.d(t,{Z:function(){return v}});var n=i(4959),o=i(7313),a=i(4892),r=i(6805),s=i(7753),d=i(9821);var c=function(e){const[t,i,n,o,a]=(0,d.Z)(),[c]=(0,s.j1)("whatmoreEmbedAppVideoPlayerSizePortrait"),[l]=(0,s.j1)("whatmoreEmbedAppVideoPlayerSizeLandscape"),p=a[r.YP]===r.$w?l/100:c/100*1.2;return[t*p,i*p,a]},l=i(9723),p=i(9461),u=i.n(p),h=i(1195),w=i(7108),x=(i(7244),i(123),i(9854)),f=i(7592),g=i(6417);var v=function(e){var t;const i=o.useRef(null);var[d,p,v]=c();const{whatmoreUITheme:m}=(0,o.useContext)(f.I),[y]=(0,s.j1)("whatmoreEmbedAppVideoTitle"),[j]=(0,s.j1)("whatmoreEmbedAppPositionPortrait"),[b]=(0,s.j1)("whatmoreEmbedAppHorizontalPaddingPortrait"),[I]=(0,s.j1)("whatmoreEmbedAppVerticalPaddingPortrait"),[S]=(0,s.j1)("whatmoreEmbedAppPositionLandscape"),[E]=(0,s.j1)("whatmoreEmbedAppHorizontalPaddingLandscape"),[L]=(0,s.j1)("whatmoreEmbedAppVerticalPaddingLandscape"),P=(0,s.MO)("whatmoreShopId");var z=j,T=b,_=I;v[r.YP]===r.$w&&(z=S,T=E,_=L);const[k,C]=(0,o.useState)(["initial",window.pageYOffset]),[D,M]=(0,o.useState)(!1),V=null!==(t=e.isSpotlight)&&void 0!==t&&t,A=v[r.YP]===r.$w?.7*(0,x.zG)(P):(0,x.zG)(P),O=V?A:1;d*=O,p*=O;const B=V?(0,x.G0)(P):z,F=V?(0,x.X8)(P):(0,x.lV)(P),[Z,R]=(0,o.useState)(!V&&(0,x.eX)(P));function N(e,t){C(e),e[1]<=100?M(!1):t!=D&&(M(t),R(!1))}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const i=()=>{const i=window.pageYOffset;Math.abs(i-e)<100||(N([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)}),[k]),(0,n.O3)({ref:i,handler:()=>{N(["scrolled-up",k[1]],!0)}});const G=e.event,Y=e.inVideoClick,U=e.closeClick,W=.3*p,$=.6*p,K=.1*p,H=.1*(.5*p),X="round"==m?"10px":"0px",J=(0,x.Z$)(P);var q=!1,Q=0,ee=0;function te(e){q=e}return(0,g.jsx)("div",{children:Z&&!F?(0,g.jsx)(g.Fragment,{}):D&&F?(0,g.jsx)("div",{style:"left"===B?{left:"1px",bottom:V?(0,x.vn)(P)+"px":_+"px",position:"fixed",zIndex:J}:{right:"5px",bottom:V?(0,x.vn)(P)+"px":_+"px",position:"fixed",zIndex:J},children:(0,g.jsxs)("div",{onClick:()=>{N(["initial",k[1]],!1)},style:{margin:"1px",width:p+"px",height:d+"px"},className:"left"===B?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,g.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:X,overflow:"hidden"},children:(0,g.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,g.jsx)(a.Z,{url:G.thumbnail_image,isPlaying:!1,event:G})})}),(0,g.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,g.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,g.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,g.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",children:(0,g.jsx)(h.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:W+"px"},style:{position:"relative",zIndex:1,left:H+"px",bottom:H+"px"},onClick:U})})}),(0,g.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,g.jsx)(w.Z,{sx:{color:"white",fontSize:2*W+"px",filter:"drop-shadow(0 0 15px black);"}})})]})})]})}):(0,g.jsx)(u(),{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,Q=i,ee=n},onDrag:(e,t)=>{te(!0)},onStop:(e,t)=>{q&&(Math.abs(t.x-Q)>5||Math.abs(t.y-ee)>5)?te(!1):Y(G)},children:(0,g.jsx)("div",{ref:i,style:"left"===B?{left:V?(0,x.$I)(P)+"px":T+"px",bottom:V?(0,x.vn)(P)+"px":_+"px",position:"fixed",zIndex:J}:{right:V?(0,x.$I)(P)+"px":T+"px",bottom:V?(0,x.vn)(P)+"px":_+"px",position:"fixed",zIndex:J},children:(0,g.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:p+"px",height:d+"px"}),className:"left"===B?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,g.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:X,overflow:"hidden",position:"relative"},children:(0,g.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,g.jsx)(a.Z,{url:G.thumbnail_image,isMuted:!0,isPlaying:!0,event:G})})}),(0,g.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,g.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%"},children:[(0,g.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,g.jsx)(h.Z,{className:"close-btn",sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:W+"px"},onClick:U,style:{position:"relative",zIndex:1,left:K+"px",bottom:K+"px"}})}),(0,g.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,g.jsx)(l.Z,{sx:{color:(0,x.Y)(P),fontSize:$+"px",filter:"drop-shadow(0 0 15px black);"}})}),(0,g.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:X,borderBottomRightRadius:X,backgroundImage:y?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))":""},children:(0,g.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",y]})})]})})]})})})})}},4284:function(e,t,i){i.r(t);var n=i(7313),o=i(9854),a=i(2860),r=i(7753),s=i(5160),d=(i(4844),i(6967)),c=i(5380),l=i(58),p=i(8984),u=(i(7247),i(1824),i(4669)),h=i(941),w=i(9302),x=i(2575),f=i(7300),g=i(6524),v=i(7592),m=i(7376),y=i(778),j=i(7643),b=i(6417);const I=(0,x.Z)({key:"whatmore-css-ppv"}),S=n.lazy((()=>Promise.all([i.e(819),i.e(576),i.e(210),i.e(803),i.e(926),i.e(303),i.e(171),i.e(108)]).then(i.bind(i,8171))));function E(e){return e.split(/[?#]/)[0]}t.default=function(e){const[t,i]=(0,n.useState)(),[x,L]=(0,n.useState)(),[P]=(0,r.j1)("isInDesignMode"),[z]=(0,r.j1)("isDemoBrand"),[T]=(0,r.j1)("whatmoreEmbedAppUseVariant"),[_,k]=(0,n.useState)(-2),[C]=(0,r.j1)("whatmoreVariantId"),[D]=(0,r.j1)("whatmoreShopId");var[M]=(0,r.j1)("whatmoreProductId");const V=(0,r.MO)("isLandingSharedLink"),A=(0,r.MO)("whatmoreShareTemplateId"),O=((0,r.MO)("whatmoreShareStoryId"),(0,r.MO)("whatmoreShareEventId"));M=(0,o.iX)(D)?E(window.location.href):M;const[B,F]=(0,n.useState)((()=>"true"===T?C:M));var Z=a.Gc+"/v2/brand/"+D+"/product-events";const{whatmoreWidgetSourceDetails:R}=(0,n.useContext)(v.I);(0,n.useEffect)((()=>{(0,d.hb)()}),[]),(0,n.useEffect)((()=>{(0,u.ll)(D)}),[]),(0,n.useEffect)((()=>{null==t||0==t.length||x||!(0,p.KE)()||(0,r.MO)("whatmoreVideoPlayerPoolInitiated")||(0,l.b5)(l.UD)}),[t]),(0,n.useEffect)((()=>{k(-1),fetch(Z.toString()+"?client_product_id="+B.toString()+"&status="+"upcoming".toString()+"&event_type=video").then((e=>e.json())).then((e=>e.events)).then((e=>(i(e),e))).then((e=>((0,o.yo)(D)&&function(e,t){setTimeout((async()=>{const i=e.reduce(((e,t)=>[...e,...t.products]),[]).filter((e=>e.client_product_id==t))[0];if(!i||i.product_link==E(window.location.href))return;const n={product_id:i.product_id,product_link:E(window.location.href)};fetch(a.Gc+"/product",{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)})}),500)}(e,B),e))).catch((e=>{L(e.message)}))}),[B]),(0,n.useEffect)((()=>{k(-2),t&&t.length>0&&(0,m.PB)({userInteractionType:y.K.PDP_VISITED,widgetSourceDetails:R,event:t[0],productList:t[0].products,ctaList:t[0].cta})}),[t]),(0,n.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("true"===T){const e=function(e){for(var t=window.location.search.substring(1).split("&"),i=0;i<t.length;i++){var n=t[i].split("=");if(n[0]==e)return n[1]}return!1}("variant");e&&""!==e&&F(e)}}))}),[]),(0,n.useEffect)((()=>{null==t||0==t.length||x||V&&"template-embed"==(0,g.zv)(A)&&null!=O&&t.forEach(((e,t)=>{O==e.event_id&&N(e,!0,t)}))}),[t]);const N=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,p.KE)()&&!t&&(0,l.QV)(),(0,f.B6)(e)||(0,f.WJ)(e))return P||z||(async()=>{(0,s.wh)(e),(0,u.Tc)(D,a.h7,a.dU),(0,d.H4)(e.event_id,e.products,"product_page","video_popup")})(),void k(i)};function G(){return(0,b.jsx)(b.Fragment,{})}return null==t||0==t.length||x?(0,b.jsx)("div",{}):(0,b.jsx)(w.C,{value:I,children:"no-product"===B||-1===_||0===t.length?(0,b.jsx)(G,{}):-2===_&&t.length>0?(0,b.jsx)("div",{children:(0,b.jsx)(j.u,{userInteractionType:y.K.PDP_POPUP_WIDGET_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!P&&!z,children:(0,b.jsx)(c.Z,{event:t[0],inVideoClick:N,closeClick:e=>{e.stopPropagation(),k(-1)}})})}):(0,b.jsx)("div",{children:(0,b.jsx)(n.Suspense,{children:(0,b.jsx)(j.u,{userInteractionType:y.K.EVENT_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!P&&!z,children:(0,b.jsx)(S,{events:t,index:_,onBack:function(){(0,o.n2)(D)&&(0,r.MO)("whatmoreAddedToCart")&&(0,h.D)(D,(()=>{}),100,window.location.hostname),k(-2)},template:"template-product-page"})})})})})}},7376:function(e,t,i){i.d(t,{GF:function(){return o},PB:function(){return s},Z2:function(){return a},y4:function(){return r}});var n=i(795);function o(e){let{userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s})}function a(e){let{userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s})}function r(e){let{userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s})}function s(e){let{userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s})}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[74],{5380:function(e,t,i){i.d(t,{Z:function(){return v}});var n=i(4959),o=i(7313),a=i(4892),r=i(6805),s=i(7753),d=i(9821);var c=function(e){const[t,i,n,o,a]=(0,d.Z)(),[c]=(0,s.j1)("whatmoreEmbedAppVideoPlayerSizePortrait"),[l]=(0,s.j1)("whatmoreEmbedAppVideoPlayerSizeLandscape"),p=a[r.YP]===r.$w?l/100:c/100*1.2;return[t*p,i*p,a]},l=i(9723),p=i(9461),u=i.n(p),h=i(1195),w=i(7108),x=(i(7244),i(123),i(9854)),f=i(7592),g=i(6417);var v=function(e){var t;const i=o.useRef(null);var[d,p,v]=c();const{whatmoreUITheme:m}=(0,o.useContext)(f.I),[y]=(0,s.j1)("whatmoreEmbedAppVideoTitle"),[j]=(0,s.j1)("whatmoreEmbedAppPositionPortrait"),[b]=(0,s.j1)("whatmoreEmbedAppHorizontalPaddingPortrait"),[I]=(0,s.j1)("whatmoreEmbedAppVerticalPaddingPortrait"),[S]=(0,s.j1)("whatmoreEmbedAppPositionLandscape"),[E]=(0,s.j1)("whatmoreEmbedAppHorizontalPaddingLandscape"),[L]=(0,s.j1)("whatmoreEmbedAppVerticalPaddingLandscape"),P=(0,s.MO)("whatmoreShopId");var z=j,T=b,_=I;v[r.YP]===r.$w&&(z=S,T=E,_=L);const[k,C]=(0,o.useState)(["initial",window.pageYOffset]),[D,M]=(0,o.useState)(!1),V=null!==(t=e.isSpotlight)&&void 0!==t&&t,A=v[r.YP]===r.$w?.7*(0,x.zG)(P):(0,x.zG)(P),O=V?A:1;d*=O,p*=O;const B=V?(0,x.G0)(P):z,F=V?(0,x.X8)(P):(0,x.lV)(P),[Z,R]=(0,o.useState)(!V&&(0,x.eX)(P));function N(e,t){C(e),e[1]<=100?M(!1):t!=D&&(M(t),R(!1))}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const i=()=>{const i=window.pageYOffset;Math.abs(i-e)<100||(N([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)}),[k]),(0,n.O3)({ref:i,handler:()=>{N(["scrolled-up",k[1]],!0)}});const G=e.event,Y=e.inVideoClick,U=e.closeClick,W=.3*p,$=.6*p,K=.1*p,H=.1*(.5*p),X="round"==m?"10px":"0px",J=(0,x.Z$)(P);var q=!1,Q=0,ee=0;function te(e){q=e}return(0,g.jsx)("div",{children:Z&&!F?(0,g.jsx)(g.Fragment,{}):D&&F?(0,g.jsx)("div",{style:"left"===B?{left:"1px",bottom:V?(0,x.vn)(P)+"px":_+"px",position:"fixed",zIndex:J}:{right:"5px",bottom:V?(0,x.vn)(P)+"px":_+"px",position:"fixed",zIndex:J},children:(0,g.jsxs)("div",{onClick:()=>{N(["initial",k[1]],!1)},style:{margin:"1px",width:p+"px",height:d+"px"},className:"left"===B?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,g.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:X,overflow:"hidden"},children:(0,g.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,g.jsx)(a.Z,{url:G.thumbnail_image,isPlaying:!1,event:G})})}),(0,g.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,g.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,g.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,g.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",children:(0,g.jsx)(h.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:W+"px"},style:{position:"relative",zIndex:1,left:H+"px",bottom:H+"px"},onClick:U})})}),(0,g.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,g.jsx)(w.Z,{sx:{color:"white",fontSize:2*W+"px",filter:"drop-shadow(0 0 15px black);"}})})]})})]})}):(0,g.jsx)(u(),{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,Q=i,ee=n},onDrag:(e,t)=>{te(!0)},onStop:(e,t)=>{q&&(Math.abs(t.x-Q)>5||Math.abs(t.y-ee)>5)?te(!1):Y(G)},children:(0,g.jsx)("div",{ref:i,style:"left"===B?{left:V?(0,x.$I)(P)+"px":T+"px",bottom:V?(0,x.vn)(P)+"px":_+"px",position:"fixed",zIndex:J}:{right:V?(0,x.$I)(P)+"px":T+"px",bottom:V?(0,x.vn)(P)+"px":_+"px",position:"fixed",zIndex:J},children:(0,g.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:p+"px",height:d+"px"}),className:"left"===B?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,g.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:X,overflow:"hidden",position:"relative"},children:(0,g.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,g.jsx)(a.Z,{url:G.thumbnail_image,isMuted:!0,isPlaying:!0,event:G})})}),(0,g.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,g.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%"},children:[(0,g.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,g.jsx)(h.Z,{className:"close-btn",sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:W+"px"},onClick:U,style:{position:"relative",zIndex:1,left:K+"px",bottom:K+"px"}})}),(0,g.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,g.jsx)(l.Z,{sx:{color:(0,x.Y)(P),fontSize:$+"px",filter:"drop-shadow(0 0 15px black);"}})}),(0,g.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:X,borderBottomRightRadius:X,backgroundImage:y?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))":""},children:(0,g.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",y]})})]})})]})})})})}},4284:function(e,t,i){i.r(t);var n=i(7313),o=i(9854),a=i(2860),r=i(7753),s=i(5160),d=(i(4844),i(6967)),c=i(5380),l=i(58),p=i(8984),u=(i(7247),i(1824),i(4669)),h=i(941),w=i(9302),x=i(2575),f=i(7300),g=i(6524),v=i(7592),m=i(7376),y=i(778),j=i(7643),b=i(6417);const I=(0,x.Z)({key:"whatmore-css-ppv"}),S=n.lazy((()=>Promise.all([i.e(819),i.e(576),i.e(210),i.e(803),i.e(926),i.e(303),i.e(171),i.e(108)]).then(i.bind(i,8171))));function E(e){return e.split(/[?#]/)[0]}t.default=function(e){const[t,i]=(0,n.useState)(),[x,L]=(0,n.useState)(),[P]=(0,r.j1)("isInDesignMode"),[z]=(0,r.j1)("isDemoBrand"),[T]=(0,r.j1)("whatmoreEmbedAppUseVariant"),[_,k]=(0,n.useState)(-2),[C]=(0,r.j1)("whatmoreVariantId"),[D]=(0,r.j1)("whatmoreShopId");var[M]=(0,r.j1)("whatmoreProductId");const V=(0,r.MO)("isLandingSharedLink"),A=(0,r.MO)("whatmoreShareTemplateId"),O=((0,r.MO)("whatmoreShareStoryId"),(0,r.MO)("whatmoreShareEventId"));M=(0,o.iX)(D)?E(window.location.href):M;const[B,F]=(0,n.useState)((()=>"true"===T?C:M));var Z=a.Gc+"/v2/brand/"+D+"/product-events";const{whatmoreWidgetSourceDetails:R}=(0,n.useContext)(v.I);(0,n.useEffect)((()=>{(0,d.hb)()}),[]),(0,n.useEffect)((()=>{(0,u.ll)(D)}),[]),(0,n.useEffect)((()=>{null==t||0==t.length||x||!(0,p.KE)()||(0,r.MO)("whatmoreVideoPlayerPoolInitiated")||(0,l.b5)(l.UD)}),[t]),(0,n.useEffect)((()=>{k(-1),fetch(Z.toString()+"?client_product_id="+B.toString()+"&status="+"upcoming".toString()+"&event_type=video").then((e=>e.json())).then((e=>e.events)).then((e=>(i(e),e))).then((e=>((0,o.yo)(D)&&function(e,t){setTimeout((async()=>{const i=e.reduce(((e,t)=>[...e,...t.products]),[]).filter((e=>e.client_product_id==t))[0];if(!i||i.product_link==E(window.location.href))return;const n={product_id:i.product_id,product_link:E(window.location.href)};fetch(a.Gc+"/product",{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)})}),500)}(e,B),e))).catch((e=>{L(e.message)}))}),[B]),(0,n.useEffect)((()=>{k(-2),t&&t.length>0&&(0,m.PB)({userInteractionType:y.K.PDP_VISITED,widgetSourceDetails:R,event:t[0],productList:t[0].products,ctaList:t[0].cta})}),[t]),(0,n.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("true"===T){const e=function(e){for(var t=window.location.search.substring(1).split("&"),i=0;i<t.length;i++){var n=t[i].split("=");if(n[0]==e)return n[1]}return!1}("variant");e&&""!==e&&F(e)}}))}),[]),(0,n.useEffect)((()=>{null==t||0==t.length||x||V&&"template-embed"==(0,g.zv)(A)&&null!=O&&t.forEach(((e,t)=>{O==e.event_id&&N(e,!0,t)}))}),[t]);const N=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,p.KE)()&&!t&&(0,l.QV)(),(0,f.B6)(e)||(0,f.WJ)(e))return P||z||(async()=>{(0,s.wh)(e),(0,u.Tc)(D,a.h7,a.dU),(0,d.H4)(e.event_id,e.products,"product_page","video_popup")})(),void k(i)};function G(){return(0,b.jsx)(b.Fragment,{})}return null==t||0==t.length||x?(0,b.jsx)("div",{}):(0,b.jsx)(w.C,{value:I,children:"no-product"===B||-1===_||0===t.length?(0,b.jsx)(G,{}):-2===_&&t.length>0?(0,b.jsx)("div",{children:(0,b.jsx)(j.u,{userInteractionType:y.K.PDP_POPUP_WIDGET_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!P&&!z,children:(0,b.jsx)(c.Z,{event:t[0],inVideoClick:N,closeClick:e=>{e.stopPropagation(),k(-1)}})})}):(0,b.jsx)("div",{children:(0,b.jsx)(n.Suspense,{children:(0,b.jsx)(j.u,{userInteractionType:y.K.EVENT_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!P&&!z,children:(0,b.jsx)(S,{events:t,index:_,onBack:function(){(0,o.n2)(D)&&(0,r.MO)("whatmoreAddedToCart")&&(0,h.D)(D,(()=>{}),100,window.location.hostname),k(-2)},template:"template-product-page"})})})})})}},7376:function(e,t,i){i.d(t,{GF:function(){return o},PB:function(){return s},Z2:function(){return a},y4:function(){return r}});var n=i(733);function o(e){let{userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s})}function a(e){let{userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s})}function r(e){let{userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s})}function s(e){let{userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:i,widgetSourceDetails:o,event:a,productList:r,ctaList:s})}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[972],{3972:function(e,t,n){n.r(t),n.d(t,{default:function(){return U}});var i=n(7753),r=n(7313),a=n(2860),s=n(499),o=n(4897),c=n(5160),l=n(9854),u=n(6967),d=n(8984),h=n(58),g=n(4669),v=n(941),m=n(7592),p=n(7300),I=n(6524),f=n(7643),T=n(778),E=n(6417);const S=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(210),n.e(926),n.e(950),n.e(303),n.e(891)]).then(n.bind(n,4095)))),x=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(576),n.e(950),n.e(364),n.e(530)]).then(n.bind(n,5523)))),_=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(358)]).then(n.bind(n,3827)))),j=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(607)]).then(n.bind(n,6071)))),y=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(986)]).then(n.bind(n,1291)))),w=r.lazy((()=>Promise.all([n.e(302),n.e(580)]).then(n.bind(n,3580)))),M=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(576),n.e(210),n.e(803),n.e(926),n.e(303),n.e(171),n.e(68)]).then(n.bind(n,8171)))),C=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(210),n.e(926),n.e(950),n.e(959)]).then(n.bind(n,4048)))),O=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(303),n.e(554)]).then(n.bind(n,9085)))),L=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(576),n.e(950),n.e(303),n.e(364),n.e(67)]).then(n.bind(n,4362)))),D=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(576),n.e(210),n.e(803),n.e(926),n.e(303),n.e(171),n.e(334)]).then(n.bind(n,4658))));var b=function(e){const[t]=(0,i.j1)("isInDesignMode"),[n]=(0,i.j1)("isDemoBrand"),[b]=(0,i.j1)("whatmoreTopBottomPadding"),[P]=(0,i.j1)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:G}=(0,r.useContext)(m.I),[W]=(0,i.j1)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:V}=(0,r.useContext)(m.I),k=(0,i.MO)("isLandingSharedLink"),U=(0,i.MO)("whatmoreShareTemplateId"),z=(0,i.MO)("whatmoreShareStoryId"),N=(0,i.MO)("whatmoreShareEventId"),[F,Z]=(0,r.useState)(-1),[K,A]=(0,r.useState)(null);var R=e.events,B=null;function H(e){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,d.KE)()&&!i&&(0,h.QV)(),t||n||(async()=>{const t=B[e].events[0];(0,c.wh)(t),(0,g.Tc)(W,a.Xh,a.OW),(0,u.H4)(t.event_id,t.products,"homepage","stories")})();var s=0;null!=r&&B[e].events.map(((e,t)=>{e.event_id==r&&(s=t)})),Z(s),A(e)}function X(e){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,d.KE)()&&!i&&(0,h.QV)(),(0,p.B6)(e)||(0,p.WJ)(e))return t||n||(async()=>{(0,c.wh)(e),(0,g.Tc)(W,a.Xh,a.pR),(0,u.H4)(e.event_id,e.products,"homepage","carousel")})(),void Z(e.index);const r=20;var{status:l,bannerText:v,timeToStartInMins:m}=o.Z.getEventStatus(e);m<=r&&l.name!==s.Z.LIVE.name?console.debug(" TODO : show toast on upcoming live event."):Z(e.index)}function J(e){return(0,E.jsx)(E.Fragment,{})}return G&&!B&&(B=function(e){var t=e.reduce(((e,t,n)=>{var i=t.storyset_id;return i in e?(e[i].total_events=e[i].total_events+1,e[i].events.push(t)):e[i]={id:t.storyset_id,title:t.storyset_name,thumbnail_image:t.storyset_thumbnail_image,total_events:1,start_event_index:n,events:[t]},e}),{}),n=Object.values(t);return n.sort(((e,t)=>e.start_event_index-t.start_event_index)),n}(R)),(0,r.useEffect)((()=>{k&&V==(0,I.zv)(U)&&(null!=z&&G?B.forEach(((e,t)=>{z==e.id&&H(t,!0,N)})):null!=N&&R.forEach(((e,t)=>{N==e.event_id&&X(e,!0)})))}),[]),(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{style:{marginTop:(G?P:b)+"px",marginBottom:(G?P:b)+"px"},children:"template-b"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(S,{events:R,onClick:X,heading:e.heading})}):"template-a-1"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(x,{events:R,onClick:X,heading:e.heading})}):"template-feed-a"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(L,{events:R,onClick:X,heading:e.heading})}):"template-collections-a"===V||"template-c"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(_,{events:R,onClick:X,heading:e.heading})})}):"template-collections-b"===V||"template-d"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(j,{events:R,onClick:X,heading:e.heading})})}):"template-collections-c"===V||"template-e"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(y,{events:R,onClick:X,heading:e.heading})})}):"template-collections-d"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(S,{events:R,onClick:X,heading:e.heading})})}):"template-collections-e"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(C,{events:R,onClick:X,heading:e.heading})})}):"template-f"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(O,{events:R,onClick:X,heading:e.heading})})}):"template-banner-a"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.BANNER_WIDGET_VIEW,event:R[0],triggerFlag:!t&&!n,children:(0,E.jsx)(D,{events:R})})}):G?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.STORIES_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(w,{eventsStories:B,onClick:H,template:V})})}):(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(C,{events:R,onClick:X,heading:e.heading})})})}),-1==F?(0,E.jsx)(J,{}):(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.EVENT_VIEW,event:R[F],productList:R[F].products,cta:R[F].cta,triggerFlag:!t&&!n,children:(0,E.jsx)(M,{events:R,index:F,onBack:function(e){(0,l.n2)(W)&&(0,i.MO)("whatmoreAddedToCart")&&(0,v.D)(W,(()=>{}),100,window.location.hostname),Z(-1)},slideDirection:G||"horizontal"===(0,l.e8)(W)?"horizontal":"vertical",eventsStories:B,initialStoryIndex:K,template:V})})})]})};const P=function(e,t,n){const r=(0,i.MO)("whatmoreShopId");var a=t.reduce(((e,t,n)=>(t.products.map((e=>e.client_product_id)).forEach((t=>{t in e||(e[t]=!0)})),e)),{}),s=Object.keys(a);if("60960964855"==r&&"undefined"!=typeof fera&&"function"===typeof fera.getRatings){var o={};fera.getRatings(s,(e=>{new Promise(((t,n)=>{e.forEach((e=>{o[e.external_product_id]={avgRating:e.average,totalRatings:e.count}})),t(o)})).then((e=>n(e)))}))}if("23114481744"==r){const e="1e6MQXxzYR19mpw9Km6Dcm86";o={};fetch("https://api.juniphq.com/v1/products?filter[remote_ids]="+s.toString(),{headers:{"Junip-Store-Key":e}}).then((e=>e.json())).then((e=>(e.products.forEach((e=>{o[e.remote_id]={avgRating:parseFloat(e.rating_average).toFixed(1),totalRatings:e.rating_count}})),o))).then((e=>n(e))).catch((e=>console.error(e)))}};var G=n(3388),W=n(7381),V=n(7376);var k=function(e){const[t,n]=(0,r.useState)(),[s,o]=(0,r.useState)(),{whatmoreIsStoriesTemplate:c}=(0,r.useContext)(m.I),{whatmoreIsCollectionsTemplate:g}=(0,r.useContext)(m.I),{whatmoreIsBannerTemplate:v}=(0,r.useContext)(m.I),[p]=(0,i.j1)("whatmoreShopId"),[f]=(0,i.j1)("whatmoreCollectionId"),S=(0,i.MO)("whatmoreLandingLocationType"),x=(0,i.MO)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:_}=(0,r.useContext)(m.I),{whatmoreCollectionUrl:j}=(0,r.useContext)(m.I),y=(0,l.cZ)(p)?(0,l._u)(p)?j:window.location.href.split(/[?#]/)[0]:f,[w,M]=(0,i.j1)("productRatings");var C=(0,l.ef)(p)?a.Dm+"/v2/events/":a.Gc+"/v2/events/",O=(0,l.ef)(p)?a.Dm+"/get_eventset/":a.Gc+"/get_eventset/",L=(0,l.ef)(p)?a.Dm+"/v2/collection":a.Gc+"/v2/collection",D=(0,l.ef)(p)?a.Dm+"/v2/brand/"+p+"/product-events":a.Gc+"/v2/brand/"+p+"/product-events",k=e.shopId,U="live,upcoming";return(0,r.useEffect)((()=>{(0,u.hb)()}),[]),(0,r.useEffect)((()=>{null==t||0==t.length||s||!(0,d.KE)()||(0,i.MO)("whatmoreVideoPlayerPoolInitiated")||(0,h.b5)(h.UD)}),[t]),(0,r.useEffect)((()=>{var e;if(S.startsWith("product")){var t=(0,i.MO)("whatmoreProductId");t=(0,l.iX)(p)?function(e){return e.split(/[?#]/)[0]}(window.location.href):t,e=D.toString()+"?client_product_id="+t.toString()+"&status="+U.toString()+"&event_type=video"}else if(g||"invalid-url"!==j)e=L.toString()+"?store_id="+k.toString()+"&client_collection_id="+y;else if(v){const t=I.ls,n=(0,I.H1)(S);e=O.toString()+k.toString()+"?eventset_type="+t+"&source="+n+"&source_id="+p}else e=C.toString()+k.toString()+"?status="+U.toString()+"&is_active="+"true".toString()+(c?"&template_type=stories":"");fetch(e).then((e=>e.json())).then((e=>{if(v){const t=I.ls;return(0,G.OC)(e,t)}return(0,G.kW)(e,g||"invalid-url"!==j)})).then((e=>(x&&console.debug("initial received events size : "+e.length),c||v?e:(0,G.e8)(e,k)))).then((e=>(null!=e&&0!=e.length&&(0,l.LU)(p)&&function(e,t,n){const r=setInterval((()=>{null===(0,i.MO)("productRatings")&&P(e,t,n)}),1e3);setTimeout((()=>{clearInterval(r)}),1e4)}(p,e,(e=>{M(e)})),e))).then((e=>{null==e||0==e.length||c||v||(0,l.NO)(k,e),n(e)})).catch((e=>{o(e.message)}))}),[]),(0,r.useEffect)((()=>{"index"===S?t&&t.length>0&&(0,V.PB)({userInteractionType:T.K.HOMEPAGE_VISITED,widgetSourceDetails:_}):"collection"===S&&t&&t.length>0&&(0,V.PB)({userInteractionType:T.K.COLLECTION_PAGE_VISITED,widgetSourceDetails:_})}),[t]),null==t||0==t.length||s?(0,E.jsx)("div",{}):(x&&(0,W.EI)(t),function(e,t){if(null!=e){var n=0;e.forEach((e=>{e.index=n++}))}}(t),x&&console.debug("final transformed events data : "+JSON.stringify(t)),x&&console.debug("valid events size : "+t.length),(0,E.jsx)("div",{children:(0,E.jsx)(b,{heading:e.heading,events:t})},"whatmore-main-coponent"))};var U=function(e){const[t]=(0,i.j1)("isInDesignMode"),[n]=(0,i.j1)("isDemoBrand"),[s]=(0,i.j1)("whatmoreShopId"),[o]=(0,i.j1)("whatmoreHeading"),[c]=(0,i.j1)("whatmorePrimaryColor"),[l]=(0,i.j1)("whatmoreSecondaryColor");return(0,r.useEffect)((()=>{(0,g.ll)(s)}),[]),(0,E.jsx)(E.Fragment,{children:(0,E.jsx)("div",{children:t||n?(0,E.jsx)("div",{children:(0,E.jsx)(k,{heading:o,shopId:a.aA})}):(0,E.jsx)("div",{children:(0,E.jsx)(k,{heading:o,shopId:s})})})})}},499:function(e,t){t.Z={LIVE:{name:"LIVE",color:"gray.600"},UPCOMING:{name:"UPCOMING",color:"gray.600"},DEFAULT:{name:"LIVE EVENT",color:"gray.600"},COMPLETED:{name:"ENDED",color:"gray.600"}}},4897:function(e,t,n){var i=n(499);t.Z=class{static getEventStatus(e){e.time_zone="GMT+5:30";var t=e.start_time+":00",n=e.end_time,r=e.scheduled_date,a=e.status,s=e.time_zone;if(a.toUpperCase()==i.Z.LIVE.name)return{status:i.Z.LIVE,bannerText:" "+i.Z.LIVE.name+" ",timeToStartInMins:0};if(a.toUpperCase()==i.Z.UPCOMING.name){var o=new Date(r+" "+t+" "+s),c=(new Date(r+" "+n+" "+s),function(e){var t=new Date,n=(e.getTime()-t.getTime())/1e3,r=n/60,a=r/60,s=a/24;return n<=0?{status:i.Z.COMPLETED,bannerText:" "+i.Z.COMPLETED.name+" ",timeToStartInMins:0}:n>=1&&n<=30?{status:i.Z.UPCOMING,bannerText:"Starts in "+Math.round(n)+" sec ",timeToStartInMins:n/60}:r<60?{status:i.Z.UPCOMING,bannerText:"Starts in "+Math.round(r)+" min ",timeToStartInMins:r}:a<24?{status:i.Z.UPCOMING,bannerText:"Starts in "+Math.round(a)+" hr ",timeToStartInMins:60*a}:s<7?{status:i.Z.UPCOMING,bannerText:" "+["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()]+" ",timeToStartInMins:60*s*24}:{status:i.Z.UPCOMING,bannerText:"Upcoming",timeToStartInMins:2880}}(o));return{status:c.status,bannerText:c.bannerText,timeToStartInMins:c.timeToStartInMins}}return console.error("invalid status for event :: id : "+e.event_id+", status : "+e.status),{status:i.Z.DEFAULT,bannerText:"live event",timeToStartInMins:2880}}}},3388:function(e,t,n){n.d(t,{OC:function(){return o},e8:function(){return a},kT:function(){return i},kW:function(){return s},xg:function(){return r}});const i=function(e,t){return!((void 0==e.products||0==e.products.length)&&(void 0==e.cta||0==e.cta.length))},r=function(e,t){return!(void 0==e.products||0==e.products.length)},a=function(e,t){if(null!=e)return e.filter((e=>1==i(e)))},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null!=e)return t?e.events[0].events:e.events};const o=function(e,t){var n;if(null==e)return[];if(!("eventsets"in e))return[];const i=null!==(n=e.eventsets[t])&&void 0!==n?n:null;return i?function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{e.events.forEach((e=>{t.push(e)}))})),t}(i):[]}},7376:function(e,t,n){n.d(t,{GF:function(){return r},PB:function(){return o},Z2:function(){return a},y4:function(){return s}});var i=n(795);function r(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o}=e;(0,i.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o})}function a(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o}=e;(0,i.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o})}function s(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o}=e;(0,i.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o})}function o(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o}=e;(0,i.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o})}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[972],{3972:function(e,t,n){n.r(t),n.d(t,{default:function(){return U}});var i=n(7753),r=n(7313),a=n(2860),s=n(499),o=n(4897),c=n(5160),l=n(9854),u=n(6967),d=n(8984),h=n(58),g=n(4669),v=n(941),m=n(7592),p=n(7300),I=n(6524),f=n(7643),T=n(778),E=n(6417);const S=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(210),n.e(926),n.e(950),n.e(303),n.e(891)]).then(n.bind(n,4095)))),x=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(576),n.e(950),n.e(364),n.e(530)]).then(n.bind(n,5523)))),_=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(358)]).then(n.bind(n,3827)))),j=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(607)]).then(n.bind(n,6071)))),y=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(986)]).then(n.bind(n,1291)))),w=r.lazy((()=>Promise.all([n.e(302),n.e(580)]).then(n.bind(n,3580)))),M=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(576),n.e(210),n.e(803),n.e(926),n.e(303),n.e(171),n.e(68)]).then(n.bind(n,8171)))),C=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(210),n.e(926),n.e(950),n.e(959)]).then(n.bind(n,4048)))),O=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(926),n.e(950),n.e(303),n.e(554)]).then(n.bind(n,9085)))),L=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(367),n.e(240),n.e(576),n.e(950),n.e(303),n.e(364),n.e(67)]).then(n.bind(n,4362)))),D=r.lazy((()=>Promise.all([n.e(302),n.e(819),n.e(13),n.e(240),n.e(576),n.e(210),n.e(803),n.e(926),n.e(303),n.e(171),n.e(334)]).then(n.bind(n,4658))));var b=function(e){const[t]=(0,i.j1)("isInDesignMode"),[n]=(0,i.j1)("isDemoBrand"),[b]=(0,i.j1)("whatmoreTopBottomPadding"),[P]=(0,i.j1)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:G}=(0,r.useContext)(m.I),[W]=(0,i.j1)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:V}=(0,r.useContext)(m.I),k=(0,i.MO)("isLandingSharedLink"),U=(0,i.MO)("whatmoreShareTemplateId"),z=(0,i.MO)("whatmoreShareStoryId"),N=(0,i.MO)("whatmoreShareEventId"),[F,Z]=(0,r.useState)(-1),[K,A]=(0,r.useState)(null);var R=e.events,B=null;function H(e){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,d.KE)()&&!i&&(0,h.QV)(),t||n||(async()=>{const t=B[e].events[0];(0,c.wh)(t),(0,g.Tc)(W,a.Xh,a.OW),(0,u.H4)(t.event_id,t.products,"homepage","stories")})();var s=0;null!=r&&B[e].events.map(((e,t)=>{e.event_id==r&&(s=t)})),Z(s),A(e)}function X(e){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,d.KE)()&&!i&&(0,h.QV)(),(0,p.B6)(e)||(0,p.WJ)(e))return t||n||(async()=>{(0,c.wh)(e),(0,g.Tc)(W,a.Xh,a.pR),(0,u.H4)(e.event_id,e.products,"homepage","carousel")})(),void Z(e.index);const r=20;var{status:l,bannerText:v,timeToStartInMins:m}=o.Z.getEventStatus(e);m<=r&&l.name!==s.Z.LIVE.name?console.debug(" TODO : show toast on upcoming live event."):Z(e.index)}function J(e){return(0,E.jsx)(E.Fragment,{})}return G&&!B&&(B=function(e){var t=e.reduce(((e,t,n)=>{var i=t.storyset_id;return i in e?(e[i].total_events=e[i].total_events+1,e[i].events.push(t)):e[i]={id:t.storyset_id,title:t.storyset_name,thumbnail_image:t.storyset_thumbnail_image,total_events:1,start_event_index:n,events:[t]},e}),{}),n=Object.values(t);return n.sort(((e,t)=>e.start_event_index-t.start_event_index)),n}(R)),(0,r.useEffect)((()=>{k&&V==(0,I.zv)(U)&&(null!=z&&G?B.forEach(((e,t)=>{z==e.id&&H(t,!0,N)})):null!=N&&R.forEach(((e,t)=>{N==e.event_id&&X(e,!0)})))}),[]),(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{style:{marginTop:(G?P:b)+"px",marginBottom:(G?P:b)+"px"},children:"template-b"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(S,{events:R,onClick:X,heading:e.heading})}):"template-a-1"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(x,{events:R,onClick:X,heading:e.heading})}):"template-feed-a"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(L,{events:R,onClick:X,heading:e.heading})}):"template-collections-a"===V||"template-c"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(_,{events:R,onClick:X,heading:e.heading})})}):"template-collections-b"===V||"template-d"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(j,{events:R,onClick:X,heading:e.heading})})}):"template-collections-c"===V||"template-e"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(y,{events:R,onClick:X,heading:e.heading})})}):"template-collections-d"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(S,{events:R,onClick:X,heading:e.heading})})}):"template-collections-e"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(C,{events:R,onClick:X,heading:e.heading})})}):"template-f"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(O,{events:R,onClick:X,heading:e.heading})})}):"template-banner-a"===V?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.BANNER_WIDGET_VIEW,event:R[0],triggerFlag:!t&&!n,children:(0,E.jsx)(D,{events:R})})}):G?(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.STORIES_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(w,{eventsStories:B,onClick:H,template:V})})}):(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!n,children:(0,E.jsx)(C,{events:R,onClick:X,heading:e.heading})})})}),-1==F?(0,E.jsx)(J,{}):(0,E.jsx)(r.Suspense,{children:(0,E.jsx)(f.u,{userInteractionType:T.K.EVENT_VIEW,event:R[F],productList:R[F].products,cta:R[F].cta,triggerFlag:!t&&!n,children:(0,E.jsx)(M,{events:R,index:F,onBack:function(e){(0,l.n2)(W)&&(0,i.MO)("whatmoreAddedToCart")&&(0,v.D)(W,(()=>{}),100,window.location.hostname),Z(-1)},slideDirection:G||"horizontal"===(0,l.e8)(W)?"horizontal":"vertical",eventsStories:B,initialStoryIndex:K,template:V})})})]})};const P=function(e,t,n){const r=(0,i.MO)("whatmoreShopId");var a=t.reduce(((e,t,n)=>(t.products.map((e=>e.client_product_id)).forEach((t=>{t in e||(e[t]=!0)})),e)),{}),s=Object.keys(a);if("60960964855"==r&&"undefined"!=typeof fera&&"function"===typeof fera.getRatings){var o={};fera.getRatings(s,(e=>{new Promise(((t,n)=>{e.forEach((e=>{o[e.external_product_id]={avgRating:e.average,totalRatings:e.count}})),t(o)})).then((e=>n(e)))}))}if("23114481744"==r){const e="1e6MQXxzYR19mpw9Km6Dcm86";o={};fetch("https://api.juniphq.com/v1/products?filter[remote_ids]="+s.toString(),{headers:{"Junip-Store-Key":e}}).then((e=>e.json())).then((e=>(e.products.forEach((e=>{o[e.remote_id]={avgRating:parseFloat(e.rating_average).toFixed(1),totalRatings:e.rating_count}})),o))).then((e=>n(e))).catch((e=>console.error(e)))}};var G=n(3388),W=n(7381),V=n(7376);var k=function(e){const[t,n]=(0,r.useState)(),[s,o]=(0,r.useState)(),{whatmoreIsStoriesTemplate:c}=(0,r.useContext)(m.I),{whatmoreIsCollectionsTemplate:g}=(0,r.useContext)(m.I),{whatmoreIsBannerTemplate:v}=(0,r.useContext)(m.I),[p]=(0,i.j1)("whatmoreShopId"),[f]=(0,i.j1)("whatmoreCollectionId"),S=(0,i.MO)("whatmoreLandingLocationType"),x=(0,i.MO)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:_}=(0,r.useContext)(m.I),{whatmoreCollectionUrl:j}=(0,r.useContext)(m.I),y=(0,l.cZ)(p)?(0,l._u)(p)?j:window.location.href.split(/[?#]/)[0]:f,[w,M]=(0,i.j1)("productRatings");var C=(0,l.ef)(p)?a.Dm+"/v2/events/":a.Gc+"/v2/events/",O=(0,l.ef)(p)?a.Dm+"/get_eventset/":a.Gc+"/get_eventset/",L=(0,l.ef)(p)?a.Dm+"/v2/collection":a.Gc+"/v2/collection",D=(0,l.ef)(p)?a.Dm+"/v2/brand/"+p+"/product-events":a.Gc+"/v2/brand/"+p+"/product-events",k=e.shopId,U="live,upcoming";return(0,r.useEffect)((()=>{(0,u.hb)()}),[]),(0,r.useEffect)((()=>{null==t||0==t.length||s||!(0,d.KE)()||(0,i.MO)("whatmoreVideoPlayerPoolInitiated")||(0,h.b5)(h.UD)}),[t]),(0,r.useEffect)((()=>{var e;if(S.startsWith("product")){var t=(0,i.MO)("whatmoreProductId");t=(0,l.iX)(p)?function(e){return e.split(/[?#]/)[0]}(window.location.href):t,e=D.toString()+"?client_product_id="+t.toString()+"&status="+U.toString()+"&event_type=video"}else if(g||"invalid-url"!==j)e=L.toString()+"?store_id="+k.toString()+"&client_collection_id="+y;else if(v){const t=I.ls,n=(0,I.H1)(S);e=O.toString()+k.toString()+"?eventset_type="+t+"&source="+n+"&source_id="+p}else e=C.toString()+k.toString()+"?status="+U.toString()+"&is_active="+"true".toString()+(c?"&template_type=stories":"");fetch(e).then((e=>e.json())).then((e=>{if(v){const t=I.ls;return(0,G.OC)(e,t)}return(0,G.kW)(e,g||"invalid-url"!==j)})).then((e=>(x&&console.debug("initial received events size : "+e.length),c||v?e:(0,G.e8)(e,k)))).then((e=>(null!=e&&0!=e.length&&(0,l.LU)(p)&&function(e,t,n){const r=setInterval((()=>{null===(0,i.MO)("productRatings")&&P(e,t,n)}),1e3);setTimeout((()=>{clearInterval(r)}),1e4)}(p,e,(e=>{M(e)})),e))).then((e=>{null==e||0==e.length||c||v||(0,l.NO)(k,e),n(e)})).catch((e=>{o(e.message)}))}),[]),(0,r.useEffect)((()=>{"index"===S?t&&t.length>0&&(0,V.PB)({userInteractionType:T.K.HOMEPAGE_VISITED,widgetSourceDetails:_}):"collection"===S&&t&&t.length>0&&(0,V.PB)({userInteractionType:T.K.COLLECTION_PAGE_VISITED,widgetSourceDetails:_})}),[t]),null==t||0==t.length||s?(0,E.jsx)("div",{}):(x&&(0,W.EI)(t),function(e,t){if(null!=e){var n=0;e.forEach((e=>{e.index=n++}))}}(t),x&&console.debug("final transformed events data : "+JSON.stringify(t)),x&&console.debug("valid events size : "+t.length),(0,E.jsx)("div",{children:(0,E.jsx)(b,{heading:e.heading,events:t})},"whatmore-main-coponent"))};var U=function(e){const[t]=(0,i.j1)("isInDesignMode"),[n]=(0,i.j1)("isDemoBrand"),[s]=(0,i.j1)("whatmoreShopId"),[o]=(0,i.j1)("whatmoreHeading"),[c]=(0,i.j1)("whatmorePrimaryColor"),[l]=(0,i.j1)("whatmoreSecondaryColor");return(0,r.useEffect)((()=>{(0,g.ll)(s)}),[]),(0,E.jsx)(E.Fragment,{children:(0,E.jsx)("div",{children:t||n?(0,E.jsx)("div",{children:(0,E.jsx)(k,{heading:o,shopId:a.aA})}):(0,E.jsx)("div",{children:(0,E.jsx)(k,{heading:o,shopId:s})})})})}},499:function(e,t){t.Z={LIVE:{name:"LIVE",color:"gray.600"},UPCOMING:{name:"UPCOMING",color:"gray.600"},DEFAULT:{name:"LIVE EVENT",color:"gray.600"},COMPLETED:{name:"ENDED",color:"gray.600"}}},4897:function(e,t,n){var i=n(499);t.Z=class{static getEventStatus(e){e.time_zone="GMT+5:30";var t=e.start_time+":00",n=e.end_time,r=e.scheduled_date,a=e.status,s=e.time_zone;if(a.toUpperCase()==i.Z.LIVE.name)return{status:i.Z.LIVE,bannerText:" "+i.Z.LIVE.name+" ",timeToStartInMins:0};if(a.toUpperCase()==i.Z.UPCOMING.name){var o=new Date(r+" "+t+" "+s),c=(new Date(r+" "+n+" "+s),function(e){var t=new Date,n=(e.getTime()-t.getTime())/1e3,r=n/60,a=r/60,s=a/24;return n<=0?{status:i.Z.COMPLETED,bannerText:" "+i.Z.COMPLETED.name+" ",timeToStartInMins:0}:n>=1&&n<=30?{status:i.Z.UPCOMING,bannerText:"Starts in "+Math.round(n)+" sec ",timeToStartInMins:n/60}:r<60?{status:i.Z.UPCOMING,bannerText:"Starts in "+Math.round(r)+" min ",timeToStartInMins:r}:a<24?{status:i.Z.UPCOMING,bannerText:"Starts in "+Math.round(a)+" hr ",timeToStartInMins:60*a}:s<7?{status:i.Z.UPCOMING,bannerText:" "+["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()]+" ",timeToStartInMins:60*s*24}:{status:i.Z.UPCOMING,bannerText:"Upcoming",timeToStartInMins:2880}}(o));return{status:c.status,bannerText:c.bannerText,timeToStartInMins:c.timeToStartInMins}}return console.error("invalid status for event :: id : "+e.event_id+", status : "+e.status),{status:i.Z.DEFAULT,bannerText:"live event",timeToStartInMins:2880}}}},3388:function(e,t,n){n.d(t,{OC:function(){return o},e8:function(){return a},kT:function(){return i},kW:function(){return s},xg:function(){return r}});const i=function(e,t){return!((void 0==e.products||0==e.products.length)&&(void 0==e.cta||0==e.cta.length))},r=function(e,t){return!(void 0==e.products||0==e.products.length)},a=function(e,t){if(null!=e)return e.filter((e=>1==i(e)))},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null!=e)return t?e.events[0].events:e.events};const o=function(e,t){var n;if(null==e)return[];if(!("eventsets"in e))return[];const i=null!==(n=e.eventsets[t])&&void 0!==n?n:null;return i?function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{e.events.forEach((e=>{t.push(e)}))})),t}(i):[]}},7376:function(e,t,n){n.d(t,{GF:function(){return r},PB:function(){return o},Z2:function(){return a},y4:function(){return s}});var i=n(733);function r(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o}=e;(0,i.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o})}function a(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o}=e;(0,i.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o})}function s(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o}=e;(0,i.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o})}function o(e){let{userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o}=e;(0,i.s)({userInteractionType:t,userInteractionMetadata:n,widgetSourceDetails:r,event:a,productList:s,ctaList:o})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[986],{1291:function(e,t,n){n.r(t);var r=n(7313),i=n(6090),o=n(7616),l=(n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811),n(9302)),a=n(2575),x=(n(8984),n(8866)),p=n(7753),d=n(7129),s=n(7592),h=n(8631),c=(n(6066),n(9821)),u=n(8782),f=(n(4862),n(6417));const m=(0,a.Z)({key:"whatmore-css-cv"});t.default=function(e){const[t,n,a]=(0,x.Z)(),[g,w,v,j,y]=(0,c.Z)(),C=(0,p.MO)("whatmoreCollectionsTileSize"),b="portrait"==t?0:(0,p.MO)("whatmoreLandscapePadding"),R=(0,p.MO)("whatmoreCollectionsTilesSpacing"),{whatmoreRootId:S}=(0,r.useContext)(s.I),k=e.events,P=e.onClick;delete o.ZP.styles.global;var L=[];for(let r=0;r<k.length;)L.push((0,f.jsx)(h.Z,{event:k[r],onClick:()=>{var e;e=k[r-1],P(e)},removeBorders:!0,borderRadius:"5%"},"collections-tile-"+r)),r+=1;return(0,f.jsx)(l.C,{value:m,children:(0,f.jsx)("div",{children:(0,f.jsx)(i.x,{theme:o.ZP,cssVarsRoot:S,resetCSS:!1,children:(0,f.jsx)(d.V.Provider,{value:{tileTopMargin:0,tileBottomMMargin:0,tileLeftMargin:0,tileRightMargin:0,showPlayButton:!1},children:(0,f.jsx)("div",{style:{marginLeft:b+"px",marginRight:b+"px"},children:(0,f.jsx)(u.P,{renderElement:e=>(0,f.jsx)(f.Fragment,{children:e.eventData}),dataList:L,spacing:R,defaultHeight:g*C*.01+"px",defaultWidth:w*C*.01+"px",retainAlreadyRenderedElements:!0})})})})})})}},7129:function(e,t,n){n.d(t,{V:function(){return r}});const r=(0,n(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},8631:function(e,t,n){var r=n(7313),i=n(9854),o=n(7753),l=(n(9111),n(123),n(9778),n(4892)),a=n(7129),x=n(9821),p=n(6417);t.Z=function(e){var t;const[n,d,s,h,c]=(0,x.Z)(),[u]=(0,o.j1)("whatmorePrimaryFont"),[f]=(0,o.j1)("whatmorePrimaryColor"),[m]=(0,o.j1)("whatmoreSecondaryColor"),[g]=(0,o.j1)("whatmoreShopId"),[w]=(0,o.j1)("whatmoreCollectionsTileSize"),[v,j]=(0,r.useState)(!1),y=(0,i.f6)(g);(0,r.useContext)(a.V);const C=e.event,b=e.onClick,R=e.removeBorders,S=n*w*.01,k=d*w*.01,P=null!==(t=e.borderRadius)&&void 0!==t?t:"0%";return(0,p.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:k+"px",marginLeft:R?"2px":"5px",marginRight:R?"2px":"5px",marginTop:R?"2px":"5px",marginBottom:R?"2px":"5px",cursor:"pointer"},onClick:()=>{j(!0),b(C)},className:[v?"whatmore-scale-on-tap":""].join(" "),children:(0,p.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:P,overflow:"hidden",boxShadow:R?"":"0px 1px 1px 0px "+m+"50, 0px -1px 1px 0px "+y+"50, 1px 0px 1px 0px "+m+"50, -1px 0px 1px 0px "+y+"80, 1px -1px 1px 0px "+m+"80, -1px 1px 1px 0px "+y+"DA, 1px 1px 1px 0px "+m+"DA, -1px -1px 1px 0px "+y+"DA"},children:(0,p.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:S+"px",width:k+"px",borderRadius:P,backgroundColor:"gray",overflow:"hidden"},children:(0,p.jsx)(l.Z,{height:"100%",width:"100%",url:C.thumbnail_image,isPlaying:!0,event:C})})})})}},6066:function(e,t,n){var r=n(7313),i=n(9854),o=n(7753),l=(n(9111),n(123),n(9778),n(4892)),a=n(7129),x=n(9821),p=n(6417);t.Z=function(e){var t;const[n,d,s,h,c]=(0,x.Z)(),[u]=(0,o.j1)("whatmorePrimaryFont"),[f]=(0,o.j1)("whatmorePrimaryColor"),[m]=(0,o.j1)("whatmoreSecondaryColor"),[g]=(0,o.j1)("whatmoreShopId"),[w]=(0,o.j1)("whatmoreCollectionsTileSize"),[v,j]=(0,r.useState)(!1),y=(0,i.f6)(g);(0,r.useContext)(a.V);const C=e.event1,b=e.event2,R=e.onClick,S=.01*w,k=n*S,P=n*S*.5,L=d*S,Z=null!==(t=e.borderRadius)&&void 0!==t?t:"10%",M="15%",B=e.removeBorders;return(0,p.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",flexShrink:0,height:k+"px",width:L+"px",marginLeft:B?"2px":"5px",marginRight:B?"2px":"5px",marginTop:B?"2px":"5px",marginBottom:B?"2px":"5px",cursor:"pointer"},children:(0,p.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:B?"0px":Z,boxShadow:B?"":"0px 1px 1px 0px "+m+"50, 0px -1px 1px 0px "+y+"50, 1px 0px 1px 0px "+m+"50, -1px 0px 1px 0px "+y+"80, 1px -1px 1px 0px "+m+"80, -1px 1px 1px 0px "+y+"DA, 1px 1px 1px 0px "+m+"DA, -1px -1px 1px 0px "+y+"DA"},onClick:()=>{j(!0),R(C)},className:[v?"whatmore-scale-on-tap":""].join(" "),children:[(0,p.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:P+"px",width:L+"px",borderTopLeftRadius:B?"0px":M,borderTopRightRadius:B?"0px":M,borderBottom:"2px solid transparent",backgroundColor:"transparent",overflow:"hidden"},children:(0,p.jsx)(l.Z,{height:"100%",width:"100%",url:C.thumbnail_image,isPlaying:!0,event:C})}),(0,p.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:P+"px",width:L+"px",borderBottomLeftRadius:B?"0px":M,borderBottomRightRadius:B?"0px":M,borderTop:"2px solid transparent",backgroundColor:"transparent",overflow:"hidden"},children:(0,p.jsx)(l.Z,{height:"100%",width:"100%",url:b.thumbnail_image,isPlaying:!0,event:b})})]})})}},8782:function(e,t,n){n.d(t,{P:function(){return x}});var r=n(3933),i=n(8866),o=n(7313),l=(n(123),n(6417));function a(e){const{ref:t,inView:n,entry:i}=(0,r.YD)({triggerOnce:e.retainAlreadyRenderedElements});return(0,l.jsx)("div",{ref:t,children:n?e.renderElement({eventData:e.data}):(0,l.jsx)("div",{style:{minWidth:e.defaultHeight,minHeight:e.defaultWidth}})})}function x(e){var t;const[n,r,x]=(0,i.Z)();return(0,o.useEffect)((()=>{function t(e){e.preventDefault(),e.stopPropagation(),n.scrollLeft+=e.deltaX,n.scrollLeft+=e.deltaY}const n=document.querySelector(".whatmore-carousel-horizontal-flex");return e.isScroll&&(null===n||void 0===n||n.addEventListener("wheel",t)),()=>{document.removeEventListener("wheel",t)}}),[]),(0,l.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",height:"fit-content",width:"100%",gap:null!==(t=e.spacing)&&void 0!==t?t:3,overflowX:"auto"},className:"whatmore-carousel-horizontal-flex",children:e.dataList.map(((t,n)=>(0,l.jsx)(a,{renderElement:e.renderElement,data:t,defaultHeight:e.defaultHeight,defaultWidth:e.defaultWidth,retainAlreadyRenderedElements:e.retainAlreadyRenderedElements},"key-"+n)))})}},9111:function(){},5892:function(){},4444:function(){},1811:function(){},6143:function(){},7850:function(){},9778:function(){}}]);
|