whatmore-react-assets 1.0.1261 → 1.0.1262
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/static/css/926.36fbef9a.chunk.css +1 -0
- package/static/css/atc-with-form.4dd2fc0f.chunk.css +1 -0
- package/static/css/banner-template-a.646138cd.chunk.css +2 -0
- package/static/css/carousel-template-a.1471d6e3.chunk.css +2 -0
- package/static/css/carousel-template-b.42b647f6.chunk.css +2 -0
- package/static/css/carousel-template-f.740de75c.chunk.css +2 -0
- package/static/css/carousel-template-feed.e325bb93.chunk.css +2 -0
- package/static/css/carousel-template-g.1471d6e3.chunk.css +2 -0
- package/static/css/carousel-template-h.1471d6e3.chunk.css +2 -0
- package/static/css/carousel-template-view-more.e325bb93.chunk.css +2 -0
- package/static/css/collections-template-a.55d08668.chunk.css +2 -0
- package/static/css/collections-template-b.55d08668.chunk.css +2 -0
- package/static/css/collections-template-c.55d08668.chunk.css +2 -0
- package/static/css/collections-template-stories.55d08668.chunk.css +2 -0
- package/static/css/event-click-main.35f97ebb.chunk.css +2 -0
- package/static/css/event-click-product.4dd2fc0f.chunk.css +1 -0
- package/static/css/event-click-spotlight.4dd2fc0f.chunk.css +1 -0
- package/static/css/product-page-view.4c845eb0.chunk.css +2 -0
- package/static/css/spotlight-view.4c845eb0.chunk.css +2 -0
- package/static/css/stories-template-a.6f769dad.chunk.css +2 -0
- package/static/js/13.f1f86e40.chunk.js +1 -0
- package/static/js/210.e86cb1a7.chunk.js +1 -0
- package/static/js/240.b51848e0.chunk.js +2 -0
- package/static/js/348.3fed8cf7.chunk.js +1 -0
- package/static/js/561.95fd0242.chunk.js +1 -0
- package/static/js/576.4ab6f670.chunk.js +1 -0
- package/static/js/731.9b254ccb.chunk.js +1 -0
- package/static/js/751.4c7e70cb.chunk.js +1 -0
- package/static/js/766.358a68aa.chunk.js +1 -0
- package/static/js/772.866ea60c.chunk.js +1 -0
- package/static/js/819.0610382e.chunk.js +2 -0
- package/static/js/824.28d1bbc2.chunk.js +2 -0
- package/static/js/858.cba56466.chunk.js +2 -0
- package/static/js/app-main.2cd5f86a.chunk.js +1 -0
- package/static/js/banner-template-a.0b8aa822.chunk.js +1 -0
- package/static/js/{carousel-template-a.97c5542d.chunk.js → carousel-template-a.62fd1af8.chunk.js} +1 -1
- package/static/js/carousel-template-b.a03cff14.chunk.js +1 -0
- package/static/js/carousel-template-f.1335587b.chunk.js +1 -0
- package/static/js/carousel-template-feed.21972e60.chunk.js +1 -0
- package/static/js/carousel-template-g.83d71046.chunk.js +1 -0
- package/static/js/carousel-template-h.34c19f87.chunk.js +1 -0
- package/static/js/carousel-template-view-more.00b3611e.chunk.js +1 -0
- package/static/js/collections-template-a.7e18c6fa.chunk.js +1 -0
- package/static/js/collections-template-b.0ceae9c0.chunk.js +1 -0
- package/static/js/collections-template-c.91c5038b.chunk.js +1 -0
- package/static/js/collections-template-stories.c1ba9565.chunk.js +1 -0
- package/static/js/event-click-main.e9e26fc2.chunk.js +1 -0
- package/static/js/homepage-carousel-view.2e7a342e.chunk.js +1 -0
- package/static/js/product-page-view.d2cd8d98.chunk.js +1 -0
- package/static/js/recommended-carousel.3085fb1d.chunk.js +2 -0
- package/static/js/spotlight-view.fc27442e.chunk.js +1 -0
- package/static/js/stories-template-a.a3806a7c.chunk.js +1 -0
- package/whatmore.js +2 -2
- package/static/css/926.a9bfc3e2.chunk.css +0 -1
- package/static/css/atc-with-form.1c72edff.chunk.css +0 -1
- package/static/css/banner-template-a.4e431eee.chunk.css +0 -2
- package/static/css/carousel-template-a.59976cb2.chunk.css +0 -2
- package/static/css/carousel-template-b.1672d707.chunk.css +0 -2
- package/static/css/carousel-template-f.599c1ca5.chunk.css +0 -2
- package/static/css/carousel-template-feed.e2240c87.chunk.css +0 -2
- package/static/css/carousel-template-g.59976cb2.chunk.css +0 -2
- package/static/css/carousel-template-h.59976cb2.chunk.css +0 -2
- package/static/css/carousel-template-view-more.e2240c87.chunk.css +0 -2
- package/static/css/collections-template-a.dc868ab3.chunk.css +0 -2
- package/static/css/collections-template-b.dc868ab3.chunk.css +0 -2
- package/static/css/collections-template-c.dc868ab3.chunk.css +0 -2
- package/static/css/collections-template-stories.dc868ab3.chunk.css +0 -2
- package/static/css/event-click-main.3373f4ca.chunk.css +0 -2
- package/static/css/event-click-product.1c72edff.chunk.css +0 -1
- package/static/css/event-click-spotlight.1c72edff.chunk.css +0 -1
- package/static/css/product-page-view.87a3bb51.chunk.css +0 -2
- package/static/css/spotlight-view.87a3bb51.chunk.css +0 -2
- package/static/css/stories-template-a.ff6f5f73.chunk.css +0 -2
- package/static/js/13.b216da25.chunk.js +0 -1
- package/static/js/145.afb3e08e.chunk.js +0 -1
- package/static/js/210.d4c6f9a4.chunk.js +0 -1
- package/static/js/240.9c510ae9.chunk.js +0 -2
- package/static/js/249.8d06733c.chunk.js +0 -1
- package/static/js/381.1d8dde8b.chunk.js +0 -1
- package/static/js/548.835e0a00.chunk.js +0 -1
- package/static/js/577.646fa55d.chunk.js +0 -1
- package/static/js/745.107e7775.chunk.js +0 -2
- package/static/js/766.c37f46b9.chunk.js +0 -1
- package/static/js/818.5a28f9db.chunk.js +0 -117
- package/static/js/819.c2077f1e.chunk.js +0 -2
- package/static/js/824.a6b7822c.chunk.js +0 -2
- package/static/js/app-main.1fcf0d4d.chunk.js +0 -1
- package/static/js/banner-template-a.a8db0e9c.chunk.js +0 -1
- package/static/js/carousel-template-b.acc24e67.chunk.js +0 -1
- package/static/js/carousel-template-f.e200c4ba.chunk.js +0 -1
- package/static/js/carousel-template-feed.7a431655.chunk.js +0 -15
- package/static/js/carousel-template-g.ee551976.chunk.js +0 -1
- package/static/js/carousel-template-h.4ec81ba7.chunk.js +0 -1
- package/static/js/carousel-template-view-more.432badc1.chunk.js +0 -45
- package/static/js/collections-template-a.a32aa9b7.chunk.js +0 -1
- package/static/js/collections-template-b.fe4cdbbf.chunk.js +0 -1
- package/static/js/collections-template-c.660b920a.chunk.js +0 -1
- package/static/js/collections-template-stories.407b3524.chunk.js +0 -1
- package/static/js/event-click-main.11e4c84a.chunk.js +0 -1
- package/static/js/homepage-carousel-view.e3f74b20.chunk.js +0 -1
- package/static/js/product-page-view.94a7a83c.chunk.js +0 -1
- package/static/js/recommended-carousel.9a69fdec.chunk.js +0 -2
- package/static/js/spotlight-view.98eb3966.chunk.js +0 -1
- package/static/js/stories-template-a.22d425e4.chunk.js +0 -1
@@ -0,0 +1,2 @@
|
|
1
|
+
/*! For license information please see recommended-carousel.3085fb1d.chunk.js.LICENSE.txt */
|
2
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[258],{5824:function(e,t,o){o.r(t),o.d(t,{default:function(){return z}});var r=o(7313),a=o(3366),n=o(7462),s=o(1921),i=o(3061),l=o(8564),c=o(3530),u=o(2298),m=o(7430);function d(e){return(0,u.Z)("MuiImageList",e)}(0,m.Z)("MuiImageList",["root","masonry","quilted","standard","woven"]);var f=r.createContext({}),p=o(6417);const g=["children","className","cols","component","rowHeight","gap","style","variant"],h=(0,l.ZP)("ul",{name:"MuiImageList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.variant]]}})((e=>{let{ownerState:t}=e;return(0,n.Z)({display:"grid",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch"},"masonry"===t.variant&&{display:"block"})}));var v=r.forwardRef((function(e,t){const o=(0,c.Z)({props:e,name:"MuiImageList"}),{children:l,className:u,cols:m=2,component:v="ul",rowHeight:y="auto",gap:w=4,style:x,variant:b="standard"}=o,Z=(0,a.Z)(o,g),S=r.useMemo((()=>({rowHeight:y,gap:w,variant:b})),[y,w,b]);r.useEffect((()=>{0}),[]);const C="masonry"===b?(0,n.Z)({columnCount:m,columnGap:w},x):(0,n.Z)({gridTemplateColumns:"repeat(".concat(m,", 1fr)"),gap:w},x),I=(0,n.Z)({},o,{component:v,gap:w,rowHeight:y,variant:b}),j=(e=>{const{classes:t,variant:o}=e,r={root:["root",o]};return(0,s.Z)(r,d,t)})(I);return(0,p.jsx)(h,(0,n.Z)({as:v,className:(0,i.default)(j.root,j[b],u),ref:t,style:C,ownerState:I},Z,{children:(0,p.jsx)(f.Provider,{value:S,children:l})}))})),y=(o(478),o(7816));function w(e){return(0,u.Z)("MuiImageListItem",e)}var x=(0,m.Z)("MuiImageListItem",["root","img","standard","woven","masonry","quilted"]);const b=["children","className","cols","component","rows","style"],Z=(0,l.ZP)("li",{name:"MuiImageListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[{["& .".concat(x.img)]:t.img},t.root,t[o.variant]]}})((e=>{let{ownerState:t}=e;return(0,n.Z)({display:"block",position:"relative"},"standard"===t.variant&&{display:"flex",flexDirection:"column"},"woven"===t.variant&&{height:"100%",alignSelf:"center","&:nth-of-type(even)":{height:"70%"}},{["& .".concat(x.img)]:(0,n.Z)({objectFit:"cover",width:"100%",height:"100%",display:"block"},"standard"===t.variant&&{height:"auto",flexGrow:1})})}));var S=r.forwardRef((function(e,t){const o=(0,c.Z)({props:e,name:"MuiImageListItem"}),{children:l,className:u,cols:m=1,component:d="li",rows:g=1,style:h}=o,v=(0,a.Z)(o,b),{rowHeight:x="auto",gap:S,variant:C}=r.useContext(f);let I="auto";"woven"===C?I=void 0:"auto"!==x&&(I=x*g+S*(g-1));const j=(0,n.Z)({},o,{cols:m,component:d,gap:S,rowHeight:x,rows:g,variant:C}),k=(e=>{const{classes:t,variant:o}=e,r={root:["root",o],img:["img"]};return(0,s.Z)(r,w,t)})(j);return(0,p.jsx)(Z,(0,n.Z)({as:d,className:(0,i.default)(k.root,k[C],u),ref:t,style:(0,n.Z)({height:I,gridColumnEnd:"masonry"!==C?"span ".concat(m):void 0,gridRowEnd:"masonry"!==C?"span ".concat(g):void 0,marginBottom:"masonry"===C?S:void 0},h),ownerState:j},v,{children:r.Children.map(l,(e=>r.isValidElement(e)?"img"===e.type||(0,y.Z)(e,["Image"])?r.cloneElement(e,{className:(0,i.default)(k.img,e.props.className)}):e:null))}))})),C=o(564),I=o(3649),j=o(3019),k=o(3103);const N=["sx"];function M(e){const{sx:t}=e,o=(0,a.Z)(e,N),{systemProps:r,otherProps:s}=(e=>{const t={systemProps:{},otherProps:{}};return Object.keys(e).forEach((o=>{k.Gc[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]})),t})(o);let i;return i=Array.isArray(t)?[r,...t]:"function"===typeof t?function(){const e=t(...arguments);return(0,j.P)(e)?(0,n.Z)({},r,e):r}:(0,n.Z)({},r,t),(0,n.Z)({},s,{sx:i})}var P=o(4647);const R=["className","component"];var E=o(1271);const H=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{defaultTheme:t,defaultClassName:o="MuiBox-root",generateClassName:s,styleFunctionSx:l=I.Z}=e,c=(0,C.ZP)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(l),u=r.forwardRef((function(e,r){const l=(0,P.Z)(t),u=M(e),{className:m,component:d="div"}=u,f=(0,a.Z)(u,R);return(0,p.jsx)(c,(0,n.Z)({as:d,ref:r,className:(0,i.default)(m,s?s(o):o),theme:l},f))}));return u}({defaultTheme:(0,o(1341).Z)(),defaultClassName:"MuiBox-root",generateClassName:E.Z.generate});var L=H,_=o(2248);var B=o(5290),O=o(6159);var z=e=>{let{imageUrls:t,onBack:o,mode:a,showCloseOverlay:n}=e;const[s,i]=(0,r.useState)(null),[l,c]=(0,r.useState)(0),[u,m]=(0,r.useState)(!1),d=(0,P.Z)(_.Z),f=t.slice(0,6),g=f.length%2!==0,h=window.location.hostname;(0,r.useEffect)((()=>{if("portrait"===a&&!u){const e=setInterval((()=>{c((e=>(e+1)%f.length))}),2e3);return()=>clearInterval(e)}}),[a,u,f.length]);const y=()=>{"portrait"!==a&&i(null)};return(0,p.jsxs)(L,{sx:{position:"relative",padding:d.spacing(1),maxWidth:"100vw",overflow:"hidden"},children:[("portrait"==a||n)&&(0,p.jsx)(L,{sx:{position:"fixed",top:d.spacing(1),right:d.spacing(1),zIndex:2e3},children:(0,p.jsx)(O.Z,{onCloseCallback:o})}),(0,p.jsx)(v,{cols:2,gap:d.spacing(1),sx:{marginBottom:d.spacing(2),height:2===f.length?"100vh":"auto",maxHeight:"100vh",overflow:"hidden"},children:f.map(((e,t)=>(0,p.jsxs)(S,{cols:g&&t===f.length-1?2:1,sx:{position:"relative",overflow:"hidden",height:"auto",display:"flex",justifyContent:"center",alignItems:"center"},onMouseEnter:()=>(e=>{"portrait"!==a&&i(e)})(t),onMouseLeave:y,onClick:()=>(e=>{m(!0),c(e)})(t),children:[(0,p.jsx)(B.E.img,{src:e.featured_image.split("?")[0],style:{width:"100%",height:"100%",objectFit:"cover",cursor:"pointer",borderRadius:d.shape.borderRadius}}),(s===t||"portrait"===a&&l===t)&&(0,p.jsx)(B.E.div,{initial:{opacity:0},animate:{opacity:.8},transition:{duration:.3},style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.7)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:10},children:(0,p.jsx)(B.E.a,{href:"https://".concat(h).concat(e.url),target:"_blank",rel:"noopener noreferrer",style:{padding:d.spacing(1,1.5),fontSize:"0.9rem",borderRadius:d.shape.borderRadius,backgroundColor:"rgba(255, 255, 255, 0.7)",color:d.palette.text.primary,textDecoration:"none",cursor:"pointer",textAlign:"center",transform:4===t||5===t?"translateY(-240%)":"none"},whileHover:{backgroundColor:"rgba(255, 255, 255, 0.9)"},children:"SHOP NOW"})})]},t)))})]})}},5436:function(e,t){var o,r=Symbol.for("react.element"),a=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.server_context"),m=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen");function v(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case n:case i:case s:case d:case f:return e;default:switch(e=e&&e.$$typeof){case u:case c:case m:case g:case p:case l:return e;default:return t}}case a:return t}}}o=Symbol.for("react.module.reference")},478:function(e,t,o){o(5436)}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[312],{3388:function(e,t,n){n.d(t,{OC:function(){return l},e8:function(){return r},kT:function(){return i},kW:function(){return a},xg:function(){return o}});const i=function(e,t){return!((void 0==e.products||0==e.products.length)&&(void 0==e.cta||0==e.cta.length))},o=function(e,t){return!(void 0==e.products||0==e.products.length)},r=function(e,t){if(null!=e)return e},a=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 l=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):[]}},5380:function(e,t,n){n.d(t,{Z:function(){return g}});var i=n(4959),o=n(7313),r=n(4892),a=n(6805),l=n(7753),s=n(9821);var d=function(e){const[t,n,i,o,r]=(0,s.Z)(),[d]=(0,l.j1)("whatmoreEmbedAppVideoPlayerSizePortrait"),[c]=(0,l.j1)("whatmoreEmbedAppVideoPlayerSizeLandscape"),h=r[a.YP]===a.$w?c/100:d/100*1.2;return[t*h,n*h,r]},c=n(9723),h=n(9461),u=n.n(h),p=n(1195),f=n(7108),m=(n(7244),n(123),n(9854)),x=n(6417);var g=function(e){var t;const n=o.useRef(null);var[s,h,g]=d();const v=(0,l.MO)("whatmoreUITheme"),[w]=(0,l.j1)("whatmoreEmbedAppVideoTitle"),[j]=(0,l.j1)("whatmoreEmbedAppPositionPortrait"),[b]=(0,l.j1)("whatmoreEmbedAppHorizontalPaddingPortrait"),[y]=(0,l.j1)("whatmoreEmbedAppVerticalPaddingPortrait"),[E]=(0,l.j1)("whatmoreEmbedAppPositionLandscape"),[S]=(0,l.j1)("whatmoreEmbedAppHorizontalPaddingLandscape"),[I]=(0,l.j1)("whatmoreEmbedAppVerticalPaddingLandscape"),P=(0,l.MO)("whatmoreShopId");var z=j,_=b,L=y;g[a.YP]===a.$w&&(z=E,_=S,L=I);const[A,C]=(0,o.useState)(["initial",window.pageYOffset]),[k,O]=(0,o.useState)(!1),M=null!==(t=e.isSpotlight)&&void 0!==t&&t,T=g[a.YP]===a.$w?.7*(0,m.zGA)(P):(0,m.zGA)(P),V=M?T:1;s*=V,h*=V;const Y=M?(0,m.G0o)(P):z,Z=M?(0,m.X8j)(P):(0,m.lVn)(P),[D,$]=(0,o.useState)(!M&&(0,m.eXi)(P));function F(e,t){C(e),e[1]<=100?O(!1):t!=k&&(O(t),$(!1))}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const n=()=>{const n=window.pageYOffset;Math.abs(n-e)<100||(F([n>e?"scrolled-down":"scrolled-up",n],!0),e=n>0?n:0),t=!1},i=()=>{t||(window.requestAnimationFrame(n),t=!0)};return window.addEventListener("scroll",i),()=>window.removeEventListener("scroll",i)}),[A]),(0,i.O3)({ref:n,handler:()=>{F(["scrolled-up",A[1]],!0)}});const R=e.event,N=e.inVideoClick,K=e.closeClick,W=.3*h,B=.6*h,G=.1*h,H=.1*(.5*h),U="round"==v?"10px":"0px",X=(0,m.Z$A)(P);var q=!1,J=0,Q=0;function ee(e){q=e}return(0,x.jsx)("div",{children:D&&!Z?(0,x.jsx)(x.Fragment,{}):k&&Z?(0,x.jsx)("div",{style:"left"===Y?{left:"1px",bottom:M?(0,m.vnu)(P)+"px":L+"px",position:"fixed",zIndex:X}:{right:"5px",bottom:M?(0,m.vnu)(P)+"px":L+"px",position:"fixed",zIndex:X},children:(0,x.jsxs)("div",{onClick:()=>{F(["initial",A[1]],!1)},style:{margin:"1px",width:h+"px",height:s+"px"},className:"left"===Y?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,x.jsx)("div",{style:{overflow:"hidden"},children:(0,x.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,x.jsx)(r.Z,{url:R.thumbnail_image,isPlaying:!1,event:R})})}),(0,x.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,x.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,x.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,x.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",children:(0,x.jsx)(p.Z,{sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:W+"px"},style:{position:"relative",zIndex:1,left:H+"px",bottom:H+"px"},onClick:K})})}),(0,x.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,x.jsx)(f.Z,{sx:{color:"white",fontSize:2*W+"px",filter:"drop-shadow(0 0 2px black);"}})})]})})]})}):(0,x.jsx)(u(),{nodeRef:n,cancel:".activate-button,.close-btn",defaultClassName:"whatmore-react-draggable",defaultClassNameDragging:"whatmore-react-draggable-dragging",defaultClassNameDragged:"whatmore-react-draggable-dragged",bounds:"html",onStart:(e,t)=>{var n,i;n=t.x,i=t.y,J=n,Q=i},onDrag:(e,t)=>{ee(!0)},onStop:(e,t)=>{q&&(Math.abs(t.x-J)>5||Math.abs(t.y-Q)>5)?ee(!1):N(R)},children:(0,x.jsx)("div",{ref:n,style:"left"===Y?{left:M?(0,m.$II)(P)+"px":_+"px",bottom:M?(0,m.vnu)(P)+"px":L+"px",position:"fixed",zIndex:X}:{right:M?(0,m.$II)(P)+"px":_+"px",bottom:M?(0,m.vnu)(P)+"px":L+"px",position:"fixed",zIndex:X},children:(0,x.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:e.isSpotlight&&"60122562760"==P?s+"px":h+"px",height:e.isSpotlight&&"60122562760"==P?h+"px":s+"px"}),className:"left"===Y?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,x.jsx)("div",{style:{overflow:"hidden",position:"relative"},children:(0,x.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:e.isSpotlight&&"60122562760"==P?16/9:9/16},children:(0,x.jsx)(r.Z,{url:R.thumbnail_image,isMuted:!0,isPlaying:!0,event:R})})}),(0,x.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,x.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%"},children:[(0,x.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,x.jsx)(p.Z,{className:"close-btn",sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:W+"px"},onClick:K,style:{position:"relative",zIndex:1,left:G+"px",bottom:G+"px"}})}),(0,x.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,x.jsx)(c.Z,{sx:{color:(0,m.Ya_)(P),fontSize:B+"px",filter:"drop-shadow(0 0 2px black);"}})}),(0,x.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:U,borderBottomRightRadius:U,backgroundImage:w?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))":""},children:(0,x.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",w]})})]})})]})})})})}},2209:function(e,t,n){n.r(t);var i=n(7313),o=n(9854),r=n(2860),a=n(7753),l=n(5160),s=n(6967),d=n(5380),c=n(58),h=n(8984),u=n(4669),p=n(513),f=n(9302),m=n(7381),x=n(2575),g=n(7300),v=n(6524),w=n(3388),j=n(7643),b=n(778),y=n(364),E=n(6417);const S=(0,x.Z)({key:"whatmore-css-wsv"}),I=i.lazy((()=>Promise.all([n.e(819),n.e(210),n.e(576),n.e(858),n.e(926),n.e(824),n.e(348),n.e(311)]).then(n.bind(n,6348))));t.default=function(e){const[t,n]=(0,i.useState)(),[x,P]=(0,i.useState)(),[z]=(0,a.j1)("isInDesignMode"),[_]=(0,a.j1)("isDemoBrand"),[L,A]=(0,i.useState)(-2),[C]=(0,a.j1)("whatmoreShopId"),k=(0,a.MO)("isLandingSharedLink"),O=(0,a.MO)("whatmoreShareTemplateId"),M=((0,a.MO)("whatmoreShareStoryId"),(0,a.MO)("whatmoreShareEventId")),T=(0,a.MO)("whatmoreLandingLocationType"),V=(0,a.MO)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:Y}=(0,i.useContext)(y.I);var Z=(0,o.efR)(C)?r.Dm+"/get_eventset/":r.Gc+"/get_eventset/";(0,i.useEffect)((()=>{(0,s.hb)()}),[]),(0,i.useEffect)((()=>{(0,u.ll)(C)}),[]),(0,i.useEffect)((()=>{null==t||0==t.length||x||!(0,h.KE)()||(0,a.MO)("whatmoreVideoPlayerPoolInitiated")||(0,c.b5)(c.UD)}),[t]),(0,i.useEffect)((()=>{A(-1);const e=v.NX,t=(0,v.H1)(T),i=Z.toString()+C.toString()+"?eventset_type="+e+"&source="+t+"&source_id="+C;fetch(i).then((e=>e.json())).then((t=>(0,w.OC)(t,e))).then((e=>(n(e),e))).catch((e=>{P(e.message)}))}),[]),(0,i.useEffect)((()=>{A(-2)}),[t]),(0,i.useEffect)((()=>{null==t||0==t.length||x||k&&"template-embed"==(0,v.zv)(O)&&null!=M&&t.forEach(((e,t)=>{M==e.event_id&&F(e,!0,t)}))}),[t]);const D=Y.landingLocationType,$=Y.templateType,F=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if((0,h.KE)()&&!t&&(0,c.QV)(),(0,g.B6)(e)||(0,g.WJ)(e))return z||_||(async()=>{const t=(0,v.NY)(D)+(0,v.dS)($)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,l.wh)(e),(0,u.Tc)(C,r.h7,r.dU),(0,s.H4)(e.event_id,e.products,"spotlight","video_popup",t)})(),void A(n)};function R(){return(0,E.jsx)(E.Fragment,{})}return null==t||0==t.length||x?(0,E.jsx)("div",{}):(V&&(0,m.EI)(t),(0,o.B$L)(C)&&L<0&&null!==localStorage.getItem("_whatmore_spotlight_viewed")?(0,E.jsx)(E.Fragment,{}):(localStorage.setItem("_whatmore_spotlight_viewed",!0),(0,E.jsx)(f.C,{value:S,children:-1===L||0===t.length?(0,E.jsx)(R,{}):-2===L&&t.length>0?(0,E.jsx)("div",{children:(0,E.jsx)(j.u,{userInteractionType:b.K.SPOTLIGHT_WIDGET_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!z&&!_,children:(0,E.jsx)(d.Z,{event:t[0],inVideoClick:F,closeClick:e=>{e.stopPropagation(),A(-1)},isSpotlight:!0})})}):(0,E.jsx)("div",{children:(0,E.jsx)(i.Suspense,{children:(0,E.jsx)(j.u,{userInteractionType:b.K.EVENT_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!z&&!_,children:(0,E.jsx)(I,{events:t,index:L,onBack:function(){(0,o.n2L)(C)&&(0,a.MO)("whatmoreAddedToCart")&&(0,p.D)(C,(()=>{}),100,window.location.hostname),A(-2)},template:"template-embed"})})})})})))}},6805:function(e,t,n){n.d(t,{$I:function(){return l},$w:function(){return d},AK:function(){return r},AL:function(){return a},YP:function(){return o},me:function(){return i},rE:function(){return s}});const i="device_type",o="device_mode",r="mobile",a="tablet",l="desktop",s="portrait",d="landscape"},9821:function(e,t,n){var i=n(7753),o=n(8866),r=n(6805),a=n(9854);t.Z=function(e){const[t,n,l]=(0,o.Z)(),[s]=(0,i.j1)("whatmoreLandscapePadding"),[d]=(0,i.j1)("whatmoreShopId"),[c]=(0,i.j1)("whatmoreVideoTileSize"),[h]=(0,i.j1)("whatmoreVideoTileSizePortrait"),u=l>=1025,p="portrait"==t?h:c,f=!("portrait"!=t||!(l>=481)),m=p/100*1.3*.5,x=p/100;var g=Math.min(l,n),[v,w,j,b]=[.6*g*(16/9),.6*g,1.4,0];function y(e){return Math.round(10*e)/10}var E={DEVICE_TYPE:r.AK,DEVICE_MODE:r.rE};if(u){const e=w*m,t=v*m;[v,w,j,b]=[t,e,(l-2*s-2*(0,a.mZU)(d))/(1.1*e),s],E[r.me]=r.$I,E[r.YP]=r.$w}else if(f){var S=.8*w,I=.8*v;"portrait"==t?(S*=x,I*=x,[v,w,j,b]=[I,S,y(l/(1.2*S)),0],E[r.me]=r.AL,E[r.YP]=r.rE):([v,w,j,b]=[I,S,(l-2*s)/(1.1*S),s],E[r.me]=r.AL,E[r.YP]=r.$w)}else{S=w,I=v;"portrait"==t?(S=S*x*.9,I=I*x*.9,[v,w,j,b]=[I,S,y(l/(1.15*S)),0],E[r.me]=r.AK,E[r.YP]=r.rE):(S=.7*w,I=.7*v,[v,w,j,b]=[I,S,(l-2*s)/(1.1*S),s],E[r.me]=r.AK,E[r.YP]=r.$w)}return[v,w,j,b,E]}},7244:function(){}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[441],{3580:function(t,e,r){r.r(e),r.d(e,{default:function(){return x}});var o=r(7313),n=r(8866),i=r(7753),l=(r(9111),r(123),r(9778),r(9854)),s=r(868),a=r(9363),c=r(4892),p=r(6417);var d=function(t){var e,r;const n=(0,i.MO)("whatmorePrimaryFont"),d=(0,i.MO)("whatmoreSecondaryColor"),u=(0,i.MO)("whatmoreShopId"),[h,f]=(0,o.useState)(!1),x=t.storyId,m=(0,s.V)(t.imageUrl),v=t.title,g=t.onClick,w=t.template,y=(0,l.f63)(u),b="template-stories-a"===w?"50%":"30%",j=Math.floor(t.tileSize),S=.12*j*(0,l.LM2)(u),k=null!==(e=(0,l.QaQ)(u))&&void 0!==e?e:n,C=null!==(r=(0,l.u2W)(u))&&void 0!==r?r:[d,y,d,y,d],F=(0,o.useRef)(0),_=(0,o.useRef)(null),R=(0,o.useRef)(null);return(0,o.useEffect)((()=>{R.current&&R.current.play()}),[]),(0,o.useEffect)((()=>{const t=_.current,e=new IntersectionObserver(((t,e)=>{t.forEach((t=>{if(t.isIntersecting){const r=t.target;r.src=r.dataset.src,e.unobserve(r)}}))}),{rootMargin:"0px 100px 0px 0px",threshold:0});return t&&e.observe(t),()=>{t&&e.unobserve(t)}}),[m]),(0,p.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignItems:"center",flexShrink:0,height:"fit-content",width:j*(0,l.jJ6)(u)+"px",marginLeft:"10px",marginRight:"10px",marginTop:"10px",marginBottom:"10px",cursor:"pointer"},onClick:()=>{f(!0),g(x)},className:[h?"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:b,boxShadow:"0px 2px 1px 0px "+C[0]+"50, 0px -2px 1px 0px "+C[1]+"50, 2px 0px 1px 0px "+C[2]+"50, -2px 0px 1px 0px "+C[3]+"80, 2px -2px 1px 0px "+C[4]+"80, -2px 2px 1px 0px "+C[0]+"DA, 2px 2px 1px 0px "+C[1]+"DA, -2px -2px 1px 0px "+C[2]+"DA"},children:(0,p.jsx)("div",{className:"whatmore-story-thumbnail-wrapper",style:{flexShrink:0,objectFit:"cover",height:j+"px",width:j+"px",borderRadius:b,border:"3px solid white",backgroundColor:"#343434"===d?"#d3d3d3":d,overflow:"hidden"},children:"video"==(0,a.$)(m)?(0,p.jsx)(c.Z,{height:"100%",width:"100%",url:m,isPlaying:!0,event:{event_type:"video"},borderRadius:b}):(0,p.jsx)("img",{ref:_,className:"whatmore-story-thumbnail","data-src":m.startsWith("https://cdn.shopify.com")?m.split("?")[0]+"?width=400&height=400":m,loading:"lazy",style:{objectFit:"cover",height:j+"px",width:j+"px",backgroundColor:"white"},alt:"story",onError:function(){if(F.current<3){let e=(0,s.V)(t.imageUrl);_.current.src="",_.current.src=e,F.current=F.current+1}else console.log("Failed to load image after several attempts"),_.current.src="https://d2oouab8j9eigo.cloudfront.net/background_white.png"}})})}),(0,p.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"100%",marginTop:"10px"},children:(0,p.jsx)("p",{ref:t=>{t&&t.style.setProperty("font-size",S+"px","important")},style:{textAlign:"center",color:(0,l.WS3)(u),fontFamily:k,fontWeight:"normal",lineHeight:"110%",margin:0,padding:0,overflow:"hidden",textOverflow:"ellipsis",width:"auto"},children:null===v||void 0===v?void 0:v.substring(0,24)})})]})},u=r(32),h=r(9302);const f=(0,r(2575).Z)({key:"whatmore-stories-css"});var x=function(t){const[e,r,s]=(0,n.Z)(),[a]=(0,i.j1)("whatmoreStoryTileSize"),[c]=(0,i.j1)("whatmoreStoryTileSizeDesktop"),[x]=(0,i.j1)("whatmoreShopId"),[m,v]=(0,o.useState)("portrait"===e?"flex-start":"center"),g=(0,o.useRef)(null);var w=t.eventsStories;const y=t.onClick,b=t.template;(0,o.useEffect)((()=>{u.IR.forEach((t=>{var e;if(!(null!==(e=t.querySelector('.whatmore-template-type[data-wh="template-stories-a"]'))&&void 0!==e?e:t.querySelector('.whatmore-template-type[data="template-stories-a"]')))return;t&&(t.style.minHeight="0px")}))}),[]);const j=t=>{if(g.current){const e="left"===t?4*-C:4*C;g.current.scrollBy({left:e,behavior:"smooth"})}};(0,o.useEffect)((()=>{!function(){if(g.current){const t=g.current.scrollWidth,e=g.current.offsetWidth;v(t>e?"flex-start":"center")}}()}),[m,s]);const[S,k]=(0,o.useState)([]);(0,o.useEffect)((()=>{k(w.map((t=>t.storyset_dynamic_thumbnail?Math.floor(Math.random()*(t.events.length-1)):0)))}),[]);const C="landscape"===e?r*(c/100)*.3:s*(a/100)*.5;return(0,p.jsx)(h.C,{value:f,children:"landscape"==e&&!(0,l.DF0)(x)||"portrait"==e&&!(0,l.JaA)(x)?(0,p.jsx)(p.Fragment,{}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:m,height:"fit-content",width:"100%"},className:"whatmore-story-horizontal-flex",ref:g,children:w.map(((t,e)=>{var r,o,n,i,s;const a=t.storyset_dynamic_thumbnail?null!==(r=null===(o=t.events[S[e]])||void 0===o?void 0:o.poster_image)&&void 0!==r?r:t.thumbnail_image:null!==(n=t.thumbnail_image)&&void 0!==n?n:null===t||void 0===t||null===(i=t.events)||void 0===i||null===(s=i[0])||void 0===s?void 0:s.thumbnail_image;return(0,p.jsx)(d,{storyId:t.id,tileSize:(0,l.OFP)(x)?100:C,onClick:t=>{y(e)},template:b,imageUrl:a,fallbackUrl:t.thumbnail_image,title:t.title},"whatmore-story-"+t.id)}))}),"landscape"===e&&(0,l.sMW)(x)&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("button",{onClick:()=>j("left"),style:{borderRadius:"4px",backgroundColor:"rgba(0, 0, 0, 0.4)",position:"absolute",top:"40%",transform:"translateY(-50%)",left:0},children:(0,p.jsx)("p",{style:{fontSize:"22px",color:"white",padding:"8px"},children:"<"})}),(0,p.jsx)("button",{onClick:()=>j("right"),style:{borderRadius:"4px",backgroundColor:"rgba(0, 0, 0, 0.4)",position:"absolute",top:"40%",transform:"translateY(-50%)",right:0},children:(0,p.jsx)("p",{style:{fontSize:"22px",color:"white",padding:"8px"},children:">"})})]})]})})}},9363:function(t,e,r){r.d(e,{$:function(){return l},s:function(){return i}});var o=r(9854),n=r(7753);function i(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=(0,n.MO)("whatmoreShopId");return"shopify"!=(0,o.Ipo)(r)?"STRNV8MHJTF"==r?t+"?format=webp":t:t+e}function l(t){var e;if(null!==t&&void 0!==t&&t.includes("https://w-media.b-cdn.net/process-media"))return"image";const r=null===t||void 0===t||null===(e=t.trim())||void 0===e?void 0:e.split("?")[0],o=/\.(jpeg|jpg|gif|png|svg|webp)$/i,n=/\.(mp4|mov|wmv|avi|flv|mkv)$/i;return null!==o&&void 0!==o&&o.test(r)?"image":null!==n&&void 0!==n&&n.test(r)?"video":void 0}},9111:function(){},9778:function(){}}]);
|