whatmore-react-assets 1.0.1262 → 1.0.1263

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. package/package.json +1 -1
  2. package/whatmore.js +0 -2
  3. package/static/css/926.36fbef9a.chunk.css +0 -1
  4. package/static/css/atc-with-form.4dd2fc0f.chunk.css +0 -1
  5. package/static/css/banner-template-a.646138cd.chunk.css +0 -2
  6. package/static/css/carousel-template-a.1471d6e3.chunk.css +0 -2
  7. package/static/css/carousel-template-b.42b647f6.chunk.css +0 -2
  8. package/static/css/carousel-template-f.740de75c.chunk.css +0 -2
  9. package/static/css/carousel-template-feed.e325bb93.chunk.css +0 -2
  10. package/static/css/carousel-template-g.1471d6e3.chunk.css +0 -2
  11. package/static/css/carousel-template-h.1471d6e3.chunk.css +0 -2
  12. package/static/css/carousel-template-view-more.e325bb93.chunk.css +0 -2
  13. package/static/css/collections-template-a.55d08668.chunk.css +0 -2
  14. package/static/css/collections-template-b.55d08668.chunk.css +0 -2
  15. package/static/css/collections-template-c.55d08668.chunk.css +0 -2
  16. package/static/css/collections-template-stories.55d08668.chunk.css +0 -2
  17. package/static/css/event-click-main.35f97ebb.chunk.css +0 -2
  18. package/static/css/event-click-product.4dd2fc0f.chunk.css +0 -1
  19. package/static/css/event-click-spotlight.4dd2fc0f.chunk.css +0 -1
  20. package/static/css/product-page-view.4c845eb0.chunk.css +0 -2
  21. package/static/css/spotlight-view.4c845eb0.chunk.css +0 -2
  22. package/static/css/stories-template-a.6f769dad.chunk.css +0 -2
  23. package/static/js/13.f1f86e40.chunk.js +0 -1
  24. package/static/js/210.e86cb1a7.chunk.js +0 -1
  25. package/static/js/240.b51848e0.chunk.js +0 -2
  26. package/static/js/302.41f7dffe.chunk.js +0 -1
  27. package/static/js/348.3fed8cf7.chunk.js +0 -1
  28. package/static/js/423.4d5ac85a.chunk.js +0 -1
  29. package/static/js/561.95fd0242.chunk.js +0 -1
  30. package/static/js/576.4ab6f670.chunk.js +0 -1
  31. package/static/js/731.9b254ccb.chunk.js +0 -1
  32. package/static/js/751.4c7e70cb.chunk.js +0 -1
  33. package/static/js/766.358a68aa.chunk.js +0 -1
  34. package/static/js/772.866ea60c.chunk.js +0 -1
  35. package/static/js/819.0610382e.chunk.js +0 -2
  36. package/static/js/824.28d1bbc2.chunk.js +0 -2
  37. package/static/js/858.cba56466.chunk.js +0 -2
  38. package/static/js/app-main.2cd5f86a.chunk.js +0 -1
  39. package/static/js/atc-with-form.c6e794f2.chunk.js +0 -1
  40. package/static/js/banner-template-a.0b8aa822.chunk.js +0 -1
  41. package/static/js/carousel-template-a.62fd1af8.chunk.js +0 -1
  42. package/static/js/carousel-template-b.a03cff14.chunk.js +0 -1
  43. package/static/js/carousel-template-f.1335587b.chunk.js +0 -1
  44. package/static/js/carousel-template-feed.21972e60.chunk.js +0 -1
  45. package/static/js/carousel-template-g.83d71046.chunk.js +0 -1
  46. package/static/js/carousel-template-h.34c19f87.chunk.js +0 -1
  47. package/static/js/carousel-template-view-more.00b3611e.chunk.js +0 -1
  48. package/static/js/collections-template-a.7e18c6fa.chunk.js +0 -1
  49. package/static/js/collections-template-b.0ceae9c0.chunk.js +0 -1
  50. package/static/js/collections-template-c.91c5038b.chunk.js +0 -1
  51. package/static/js/collections-template-stories.c1ba9565.chunk.js +0 -1
  52. package/static/js/event-click-main.e9e26fc2.chunk.js +0 -1
  53. package/static/js/event-click-product.60b5a8fa.chunk.js +0 -1
  54. package/static/js/event-click-spotlight.929fb915.chunk.js +0 -1
  55. package/static/js/homepage-carousel-view.2e7a342e.chunk.js +0 -1
  56. package/static/js/location-details.c0431f85.chunk.js +0 -1
  57. package/static/js/product-page-view.d2cd8d98.chunk.js +0 -1
  58. package/static/js/recommended-carousel.3085fb1d.chunk.js +0 -2
  59. package/static/js/spotlight-view.fc27442e.chunk.js +0 -1
  60. package/static/js/stories-template-a.a3806a7c.chunk.js +0 -1
@@ -1 +0,0 @@
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(){}}]);
@@ -1 +0,0 @@
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(){}}]);