whatmore-react-assets 1.0.1589 → 1.0.1590

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.
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[491],{3319:function(e,t,r){r.r(t),r.d(t,{default:function(){return f}});var n=r(9950),i=r(1941),o=r(5830),a=(r(6125),r(4365),r(6614),r(1348)),s=r(3788),l=r(7973),d=r(9879),m=r(4414);var u=function(e){var t,r;const i=(0,o.Xd)("whatmorePrimaryFont"),u=(0,o.Xd)("whatmoreSecondaryColor"),c=(0,o.Xd)("whatmoreShopId"),[h,p]=(0,n.useState)(!1),f=e.storyId,g=(0,s.s)(e.imageUrl),v=e.title,$=e.onClick,b=e.template,x=(0,a.ivI)(c),y="template-stories-a"===b?"50%":"30%",w=Math.floor(e.tileSize),_=.12*w*(0,a.cYm)(c),j=null!==(t=(0,a.Pjz)(c))&&void 0!==t?t:i;let C=null!==(r=(0,a.qAx)(c))&&void 0!==r?r:[u,x,u,x,u];Array.isArray(C)||(C=Array(5).fill(C));const k=(0,n.useRef)(0),S=(0,n.useRef)(null),A=(0,n.useRef)(null);return(0,n.useEffect)((()=>{A.current&&A.current.play()}),[]),(0,n.useEffect)((()=>{const e=S.current,t=new IntersectionObserver(((e,t)=>{e.forEach((e=>{if(e.isIntersecting){const r=e.target;r.src=r.dataset.src,t.unobserve(r)}}))}),{rootMargin:"0px 100px 0px 0px",threshold:0});return e&&t.observe(e),()=>{e&&t.unobserve(e)}}),[g]),(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignItems:"center",flexShrink:0,height:"fit-content",width:w*(0,a.rMH)(c)+"px",marginLeft:"10px",marginRight:"10px",marginTop:"10px",marginBottom:"10px",cursor:"pointer"},onClick:()=>{p(!0),$(f)},className:[h?"whatmore-scale-on-tap":""].join(" "),children:[(0,m.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:y,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,m.jsx)("div",{className:"whatmore-story-thumbnail-wrapper",style:{flexShrink:0,objectFit:"cover",height:w+"px",width:w+"px",borderRadius:y,border:"3px solid white",backgroundColor:"#343434"===u?"#d3d3d3":u,overflow:"hidden"},children:"video"==(0,l.B)(g)?(0,m.jsx)(d.A,{height:"100%",width:"100%",url:g,isPlaying:!0,event:{event_type:"video"},borderRadius:y}):(0,m.jsx)("img",{ref:S,className:"whatmore-story-thumbnail","data-src":g.startsWith("https://cdn.shopify.com")?g.split("?")[0]+"?width=400&height=400":g,loading:"lazy",style:{objectFit:"cover",width:"100%",height:"100%",backgroundColor:"white"},alt:"story",onError:function(){if(k.current<3){let t=(0,s.s)(e.imageUrl);S.current.src="",S.current.src=t,k.current=k.current+1}else console.log("Failed to load image after several attempts"),S.current.src="https://d2oouab8j9eigo.cloudfront.net/background_white.png"}})})}),(0,m.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"100%",marginTop:"10px"},children:(0,m.jsx)("p",{ref:e=>{e&&e.style.setProperty("font-size",_+"px","important")},style:{textAlign:"center",color:(0,a.o9q)(c),fontFamily:j,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)})})]})},c=r(5873),h=r(572);const p=(0,r(8603).A)({key:"whatmore-stories-css"});var f=function(e){const[t,r,s]=(0,i.A)(),[l]=(0,o.QN)("whatmoreStoryTileSize"),[d]=(0,o.QN)("whatmoreStoryTileSizeDesktop"),[f]=(0,o.QN)("whatmoreShopId"),[g,v]=(0,n.useState)("portrait"===t?"flex-start":"center"),$=(0,n.useRef)(null);var b=e.eventsStories;const x=e.onClick,y=e.template;(0,n.useEffect)((()=>{c.Sn.forEach((e=>{var t;if(!(null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-stories-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-stories-a"]')))return;e&&(e.style.minHeight="0px")}))}),[]);const w=e=>{if($.current){const t="left"===e?4*-C:4*C;$.current.scrollBy({left:t,behavior:"smooth"})}};(0,n.useEffect)((()=>{!function(){if($.current){const e=$.current.scrollWidth,t=$.current.offsetWidth;v(e>t?"flex-start":"center")}}()}),[g,s]);const[_,j]=(0,n.useState)([]);(0,n.useEffect)((()=>{j(b.map((e=>e.storyset_dynamic_thumbnail?Math.floor(Math.random()*(e.events.length-1)):0)))}),[]);const C="landscape"===t?r*(d/100)*.3:s*(l/100)*.5;return(0,m.jsx)(h.C,{value:p,children:"landscape"==t&&!(0,a.AFg)(f)||"portrait"==t&&!(0,a.rC6)(f)?(0,m.jsx)(m.Fragment,{}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:g,height:"fit-content",width:"100%"},className:"whatmore-story-horizontal-flex",ref:$,children:b.map(((e,t)=>{var r,n,i,o,s;const l=e.storyset_dynamic_thumbnail?null!==(r=null===(n=e.events[_[t]])||void 0===n?void 0:n.poster_image)&&void 0!==r?r:e.thumbnail_image:null!==(i=e.thumbnail_image)&&void 0!==i?i:null===e||void 0===e||null===(o=e.events)||void 0===o||null===(s=o[0])||void 0===s?void 0:s.thumbnail_image;return(0,m.jsx)(u,{storyId:e.id,tileSize:(0,a.VFf)(f)?100:C,onClick:e=>{x(t)},template:y,imageUrl:l,fallbackUrl:e.thumbnail_image,title:e.title},"whatmore-story-"+e.id)}))}),"landscape"===t&&(0,a.lDJ)(f)&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("button",{onClick:()=>w("left"),style:{borderRadius:"4px",backgroundColor:"rgba(0, 0, 0, 0.4)",position:"absolute",top:"40%",transform:"translateY(-50%)",left:0},children:(0,m.jsx)("p",{style:{fontSize:"22px",color:"white",padding:"8px"},children:"<"})}),(0,m.jsx)("button",{onClick:()=>w("right"),style:{borderRadius:"4px",backgroundColor:"rgba(0, 0, 0, 0.4)",position:"absolute",top:"40%",transform:"translateY(-50%)",right:0},children:(0,m.jsx)("p",{style:{fontSize:"22px",color:"white",padding:"8px"},children:">"})})]})]})})}},16:function(e,t,r){r.d(t,{A:function(){return d}});var n=r(9950),i=(r(5410),r(5830)),o=r(4459),a=r(4414);var s=function(e){return(0,n.useEffect)((()=>{const e=(0,o.E2)((0,i.Xd)("whatmoreSecondaryColor"));!function(e,t,r,n){const i=`rgba(${e},${t},${r},${n})`,o=`\n @keyframes whatmore-loading-indicator-keyframe {\n 0%,\n 100% {\n box-shadow: 0em -2.6em 0em 0em ${i}, 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.5), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.7);\n }\n 12.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${r}, 0.7), 1.8em -1.8em 0 0em ${i}, 2.5em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.5);\n }\n 25% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${r}, 0.5), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.7), 2.5em 0em 0 0em ${i}, 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2);\n }\n 37.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${r}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.5), 2.5em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.7), 1.75em 1.75em 0 0em ${i}, 0em 2.5em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2);\n }\n 50% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${r}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.5), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${r}, 0.7), 0em 2.5em 0 0em ${i}, -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2);\n }\n 62.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${r}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${r}, 0.5), 0em 2.5em 0 0em rgba(${e}, ${t}, ${r}, 0.7), -1.8em 1.8em 0 0em ${i}, -2.6em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2);\n }\n 75% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${r}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${r}, 0.5), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.7), -2.6em 0em 0 0em ${i}, -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2);\n }\n 87.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${r}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.5), -2.6em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.7), -1.8em -1.8em 0 0em ${i};\n }\n }\n `,a=document.createElement("style");a.type="text/css",a.innerHTML=o,document.head.appendChild(a)}(e[0],e[1],e[2],.2)}),[]),(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("span",{className:"whatmore-loading-indicator"})})},l=r(8781);var d=function(e){var t,r;const n=null!==(t=e.height)&&void 0!==t?t:"100%",i=null!==(r=e.width)&&void 0!==r?r:"100%";return(0,a.jsxs)("div",{style:{width:i,height:n,overflow:"hidden",minHeight:n,minWidth:i},children:[(0,a.jsx)(l.A,{height:n,width:i}),(0,a.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignContent:"center",width:"100%",height:"100%",position:"relative",zIndex:1,bottom:"100%",className:"whatmore-ios-css-relative-fix"},children:(0,a.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",width:"100%",height:"fit-content"},children:(0,a.jsx)(s,{})})})]})}},8781:function(e,t,r){var n=r(4414);t.A=function(e){var t,r,i;const o=null!==(t=e.height)&&void 0!==t?t:"100%",a=null!==(r=e.width)&&void 0!==r?r:"100%",s=null!==(i=e.borderRadius)&&void 0!==i?i:"10px";return(0,n.jsx)("div",{style:{height:o,width:o,borderRadius:s,overflow:"hidden",minHeight:o,minWidth:a,maxHeight:o,maxWidth:a},children:(0,n.jsx)("div",{style:{minHeight:o,minWidth:a},height:"100%",width:"100%",className:"whatmore-shimmer"})})}},4033:function(e,t,r){r.d(t,{n:function(){return n}});const n=()=>{if("undefined"!==typeof window){const e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")&&navigator.vendor.includes("Apple")}return!1}},9098:function(e,t,r){var n=r(9950),i=r(16),o=r(4414);t.A=function(e){var t,r,a;const[s,l]=(0,n.useState)(!1),d=n.useRef(0),m=(0,n.useRef)(null),u=null!==(t=e.timeUpdateCallback)&&void 0!==t?t:()=>{},c=null!==(r=e.height)&&void 0!==r?r:"100%",h=null!==(a=e.width)&&void 0!==a?a:"100%";return(0,n.useEffect)((()=>{d.current=0;const e=setInterval((()=>{d.current=d.current+.03,m.current&&u(d.current,5),d.current>=5&&(d.current=0)}),30);return()=>{clearInterval(e)}}),[e.isPlaying]),(0,o.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:h,height:"100%",overflow:"hidden"},children:[(0,o.jsx)("div",{style:{width:s?"100%":"0px",height:s?"100%":"0px"},children:(0,o.jsx)("img",{ref:m,src:e.url,style:{objectFit:"cover",height:"100%",width:h,backgroundColor:"white"},alt:"image player",onLoad:()=>{l(!0)}})}),s?(0,o.jsx)(o.Fragment,{}):(0,o.jsx)(i.A,{width:h,height:c})]})}},9879:function(e,t,r){r.d(t,{A:function(){return p}});var n=r(9950),i=r(6649),o=r(3788),a=r(6613),s=r(2039),l=r(9098),d=r(4033),m=r(5830),u=r(6493),c=r(4414);var h=function(e){var t,r,o,s;const l=(0,n.useRef)(null),[h,p,f]=(0,i.A)({triggerOnce:!0}),g=(0,m.Xd)("whatmoreShopId"),v=null!==(t=e.height)&&void 0!==t?t:"100%",$=null!==(r=e.width)&&void 0!==r?r:"100%";return(0,n.useEffect)((()=>{l.current&&(e.isPlaying?l.current.play():(((0,d.n)()||(0,a.At)())&&l.current.play(),"57939755089"==g?setTimeout((()=>{l.current.pause()}),300):l.current.pause()))}),[e.isPlaying,p]),(0,c.jsx)("div",{ref:h,style:{width:v,height:$,overflow:"hidden",display:"flex",alignItems:"center"},children:p||"51394281658"==g||"8968077397"==g?(0,c.jsxs)("video",{ref:l,className:"whatmore-video-player-muted",width:$,height:v,preload:"metadata",loop:!0,playsInline:!0,poster:e.isPlaying&&1!=(null===(o=e.event)||void 0===o?void 0:o.index)&&"STRTFEDEDAP"!==g&&"STRY2V4XO5L"!==g?e.url:e.poster,muted:null===(s=e.isVideoMuted)||void 0===s||s,style:{backgroundColor:"white",borderRadius:e.borderRadius,objectFit:"cover"},children:[(0,c.jsx)("source",{src:e.url,type:"video/mp4"}),(0,c.jsx)("source",{src:(0,u.yD)(e.url),type:"video/mp4"})]}):(0,c.jsx)("div",{width:$,height:v,ref:e=>{e&&e.style.setProperty("display","block","important")}})})};var p=function(e){var t,r,d,p,f,g,v,$,b;const[x,y,w]=(0,i.A)({triggerOnce:!0}),_=(0,m.Xd)("whatmoreShopId"),j=(0,n.useRef)(null);if((0,n.useEffect)((()=>{j.current&&(e.isPlaying?j.current.play():j.current.pause())}),[e.isPlaying,y]),(0,s.Il)(e.event))return(0,c.jsx)(l.A,{height:e.height,width:e.width,url:e.url,isPlaying:e.isPlaying,timeUpdateCallback:e.timeUpdateCallback});const C=null!==(t=e.pauseFromPlayTimeInMs)&&void 0!==t?t:200,k=null!==e&&void 0!==e&&null!==(r=e.event)&&void 0!==r&&null!==(d=r.poster_image)&&void 0!==d&&d.startsWith("https://cdn.shopify.com")?(null===e||void 0===e||null===(p=e.event)||void 0===p||null===(f=p.poster_image)||void 0===f?void 0:f.split("?")[0])+"?width=400&height=400":null===e||void 0===e||null===(g=e.event)||void 0===g?void 0:g.poster_image;if((0,a.MN)())return(0,c.jsx)(h,{isVideoMuted:e.isVideoMuted,event:null===e||void 0===e?void 0:e.event,borderRadius:e.borderRadius,height:"100%",width:"100%",poster:k,url:(0,o.s)(e.url),isPlaying:e.isPlaying,pauseFromPlayTimeInMs:C});const S=null!==(v=e.height)&&void 0!==v?v:"100%",A=null!==($=e.width)&&void 0!==$?$:"100%";return(0,c.jsx)("div",{ref:x,style:{width:S,height:A,overflow:"hidden",display:"flex",alignItems:"center"},children:y||"51394281658"==_||"8968077397"==_?(0,c.jsxs)("video",{ref:j,className:"whatmore-video-player-muted",width:A,height:S,preload:"metadata",loop:!0,playsInline:!0,muted:null===(b=e.isVideoMuted)||void 0===b||b,poster:"57939755089"==_?"":k,style:{backgroundColor:"white",objectFit:"cover"},children:[(0,c.jsx)("source",{src:(0,o.s)(e.url),type:"video/mp4"}),(0,c.jsx)("source",{src:(0,u.yD)(e.url),type:"video/mp4"})]}):(0,c.jsx)("div",{width:A,height:S,ref:e=>{e&&e.style.setProperty("display","block","important")}})})}},3788:function(e,t,r){r.d(t,{s:function(){return s}});var n=r(1348),i=r(5830);const o={"https://d3syezql093hs1.cloudfront.net":"https://whatmore-brand-video-assets.azureedge.net","https://d2r0bijhs9mx1s.cloudfront.net":"https://whatmore-brand-thumbnail-video-assets.azureedge.net","https://d2oouab8j9eigo.cloudfront.net":"https://whatmore-brand-story-assets.azureedge.net","https://d28nus7q7qajdn.cloudfront.net":"https://whatmore-video-assets.azureedge.net","https://d1zl4k1t5o4s75.cloudfront.net":"https://whatmore-brand-video-assets-720p.azureedge.net"},a={"https://d3syezql093hs1.cloudfront.net":"https://whatmore-brand-video-assets.b-cdn.net","https://d2r0bijhs9mx1s.cloudfront.net":"https://whatmore-brand-thumbnail-video-assets.b-cdn.net","https://d2oouab8j9eigo.cloudfront.net":"https://whatmore-brand-story-assets.b-cdn.net","https://d28nus7q7qajdn.cloudfront.net":"https://whatmore-video-assets-old.b-cdn.net","https://d1zl4k1t5o4s75.cloudfront.net":"https://whatmore-brand-video-assets-720p.b-cdn.net"},s=function(e){const t=(0,i.Xd)("whatmoreShopId");if(!e)return e;if(e.startsWith("https://cdn.shopify.com"))return e;if("AWSCDN"==(0,n.CfJ)(t))return e;if("AZURECDN"==(0,n.CfJ)(t)){if(e.includes(".azureedge.net"))return e;if(e.includes(".cloudfront.net")){for(const t of Object.keys(o))if(e.includes(t))return e.replace(t,o[t]);return e}}if("BUNNYCDN"==(0,n.CfJ)(t)){if(e.includes(".b-cdn.net"))return e;if(e.includes(".cloudfront.net")){for(const t of Object.keys(a))if(e.includes(t))return e.replace(t,a[t]);return e}}return e}},6493:function(e,t,r){r.d(t,{Cr:function(){return s},cb:function(){return a},lP:function(){return o},yD:function(){return l}});var n=r(1348);const i=(0,r(5830).Xd)("whatmoreShopId"),o=function(e){var t,r;return"event_media_urls"in e?"image"===e.event_type?e.event_media_urls.primary.portrait.content_image_original:"secondary"in e.event_media_urls&&e.event_media_urls.secondary.portrait.content_video_1080p?e.event_media_urls.secondary.portrait.content_video_1080p:null!==(t=e.event_media_urls.primary.portrait.content_video_1080p)&&void 0!==t?t:null===(r=e.event_media_urls.primary.landscape)||void 0===r?void 0:r.content_video_1080p:e.event_hls_url},a=function(e){var t;return"event_media_urls"in e?"image"===e.event_type?e.event_media_urls.primary.landscape.content_image_original:"secondary"in e.event_media_urls&&e.event_media_urls.secondary.landscape.content_video_1080p?e.event_media_urls.secondary.landscape.content_video_1080p:null!==(t=e.event_media_urls.primary.landscape.content_video_1080p)&&void 0!==t?t:e.event_media_urls.primary.portrait.content_video_1080p:e.event_hls_url},s=function(e){if(e.startsWith("https://cdn.shopify.com")&&e.includes("whatmore_")){const t=(0,n.ath)(i);if(!t)return e;return`https://whatmore-brand-video-assets-720p.b-cdn.net/${t}/${e.split("whatmore_")[1].split("?")[0]}`}return e},l=function(e){if(e.startsWith("https://cdn.shopify.com")&&e.includes("whatmore_")){const t=(0,n.ath)(i);if(!t)return e;return`https://whatmore-brand-thumbnail-video-assets.b-cdn.net/${t}/${e.split("whatmore_")[1].split("?")[0]}`}return e}},7973:function(e,t,r){r.d(t,{B:function(){return a},b:function(){return o}});var n=r(1348),i=r(5830);function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=(0,i.Xd)("whatmoreShopId");return"shopify"!=(0,n.NCy)(r)?"STRNV8MHJTF"==r?e+"?format=webp":e:e+t}function a(e){var t;if(null!==e&&void 0!==e&&e.includes("https://w-media.b-cdn.net/process-media"))return"image";const r=null===e||void 0===e||null===(t=e.trim())||void 0===t?void 0:t.split("?")[0],n=/\.(jpeg|jpg|gif|png|svg|webp)$/i,i=/\.(mp4|mov|wmv|avi|flv|mkv)$/i;return null!==n&&void 0!==n&&n.test(r)?"image":null!==i&&void 0!==i&&i.test(r)?"video":void 0}},5410:function(){},6125:function(){},4365:function(){},6614:function(){}}]);
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[491],{3319:function(e,t,r){r.r(t),r.d(t,{default:function(){return f}});var n=r(9950),i=r(1941),o=r(5830),a=(r(6125),r(4365),r(6614),r(1348)),s=r(3788),l=r(7973),d=r(9879),m=r(4414);var u=function(e){var t,r;const i=(0,o.Xd)("whatmorePrimaryFont"),u=(0,o.Xd)("whatmoreSecondaryColor"),c=(0,o.Xd)("whatmoreShopId"),[h,p]=(0,n.useState)(!1),f=e.storyId,g=(0,s.s)(e.imageUrl),v=e.title,$=e.onClick,b=e.template,x=(0,a.ivI)(c),y="template-stories-a"===b?"50%":"30%",w=Math.floor(e.tileSize),_=.12*w*(0,a.cYm)(c),j=null!==(t=(0,a.Pjz)(c))&&void 0!==t?t:i;let C=null!==(r=(0,a.qAx)(c))&&void 0!==r?r:[u,x,u,x,u];Array.isArray(C)||(C=Array(5).fill(C));const k=(0,n.useRef)(0),S=(0,n.useRef)(null),A=(0,n.useRef)(null);return(0,n.useEffect)((()=>{A.current&&A.current.play()}),[]),(0,n.useEffect)((()=>{const e=S.current,t=new IntersectionObserver(((e,t)=>{e.forEach((e=>{if(e.isIntersecting){const r=e.target;r.src=r.dataset.src,t.unobserve(r)}}))}),{rootMargin:"0px 100px 0px 0px",threshold:0});return e&&t.observe(e),()=>{e&&t.unobserve(e)}}),[g]),(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignItems:"center",flexShrink:0,height:"fit-content",width:w*(0,a.rMH)(c)+"px",marginLeft:"10px",marginRight:"10px",marginTop:"10px",marginBottom:"10px",cursor:"pointer"},onClick:()=>{p(!0),$(f)},className:[h?"whatmore-scale-on-tap":""].join(" "),children:[(0,m.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:y,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,m.jsx)("div",{className:"whatmore-story-thumbnail-wrapper",style:{flexShrink:0,objectFit:"cover",height:w+"px",width:w+"px",borderRadius:y,border:"3px solid white",backgroundColor:"#343434"===u?"#d3d3d3":u,overflow:"hidden"},children:"video"==(0,l.B)(g)?(0,m.jsx)(d.A,{height:"100%",width:"100%",url:g,isPlaying:!0,event:{event_type:"video"},borderRadius:y}):(0,m.jsx)("img",{ref:S,className:"whatmore-story-thumbnail","data-src":g.startsWith("https://cdn.shopify.com")?g.split("?")[0]+"?width=400&height=400":g,loading:"lazy",style:{objectFit:"cover",width:"100%",height:"100%",backgroundColor:"white"},alt:"story",onError:function(){if(k.current<3){let t=(0,s.s)(e.imageUrl);S.current.src="",S.current.src=t,k.current=k.current+1}else console.log("Failed to load image after several attempts"),S.current.src="https://d2oouab8j9eigo.cloudfront.net/background_white.png"}})})}),(0,m.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"100%",marginTop:"10px"},children:(0,m.jsx)("p",{ref:e=>{e&&e.style.setProperty("font-size",_+"px","important")},style:{textAlign:"center",color:(0,a.o9q)(c),fontFamily:j,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)})})]})},c=r(5873),h=r(572);const p=(0,r(8603).A)({key:"whatmore-stories-css"});var f=function(e){const[t,r,s]=(0,i.A)(),[l]=(0,o.QN)("whatmoreStoryTileSize"),[d]=(0,o.QN)("whatmoreStoryTileSizeDesktop"),[f]=(0,o.QN)("whatmoreShopId"),[g,v]=(0,n.useState)("portrait"===t?"flex-start":"center"),$=(0,n.useRef)(null);var b=e.eventsStories;const x=e.onClick,y=e.template;(0,n.useEffect)((()=>{c.Sn.forEach((e=>{var t;if(!(null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-stories-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-stories-a"]')))return;e&&(e.style.minHeight="0px")}))}),[]);const w=e=>{if($.current){const t="left"===e?4*-C:4*C;$.current.scrollBy({left:t,behavior:"smooth"})}};(0,n.useEffect)((()=>{!function(){if($.current){const e=$.current.scrollWidth,t=$.current.offsetWidth;v(e>t?"flex-start":"center")}}()}),[g,s]);const[_,j]=(0,n.useState)([]);(0,n.useEffect)((()=>{j(b.map((e=>e.storyset_dynamic_thumbnail?Math.floor(Math.random()*(e.events.length-1)):0)))}),[]);const C="landscape"===t?r*(d/100)*.3:s*(l/100)*.5;return(0,m.jsx)(h.C,{value:p,children:"landscape"==t&&!(0,a.AFg)(f)||"portrait"==t&&!(0,a.rC6)(f)?(0,m.jsx)(m.Fragment,{}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:g,height:"fit-content",width:"100%"},className:"whatmore-story-horizontal-flex",ref:$,children:b.map(((e,t)=>{var r,n,i,o,s;const l=e.storyset_dynamic_thumbnail?null!==(r=null===(n=e.events[_[t]])||void 0===n?void 0:n.poster_image)&&void 0!==r?r:e.thumbnail_image:null!==(i=e.thumbnail_image)&&void 0!==i?i:null===e||void 0===e||null===(o=e.events)||void 0===o||null===(s=o[0])||void 0===s?void 0:s.thumbnail_image;return(0,m.jsx)(u,{storyId:e.id,tileSize:(0,a.VFf)(f)?100:C,onClick:e=>{x(t)},template:y,imageUrl:l,fallbackUrl:e.thumbnail_image,title:e.title},"whatmore-story-"+e.id)}))}),"landscape"===t&&(0,a.lDJ)(f)&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("button",{onClick:()=>w("left"),style:{borderRadius:"4px",backgroundColor:"rgba(0, 0, 0, 0.4)",position:"absolute",top:"40%",transform:"translateY(-50%)",left:0},children:(0,m.jsx)("p",{style:{fontSize:"22px",color:"white",padding:"8px"},children:"<"})}),(0,m.jsx)("button",{onClick:()=>w("right"),style:{borderRadius:"4px",backgroundColor:"rgba(0, 0, 0, 0.4)",position:"absolute",top:"40%",transform:"translateY(-50%)",right:0},children:(0,m.jsx)("p",{style:{fontSize:"22px",color:"white",padding:"8px"},children:">"})})]})]})})}},16:function(e,t,r){r.d(t,{A:function(){return d}});var n=r(9950),i=(r(5410),r(5830)),o=r(4459),a=r(4414);var s=function(e){return(0,n.useEffect)((()=>{const e=(0,o.E2)((0,i.Xd)("whatmoreSecondaryColor"));!function(e,t,r,n){const i=`rgba(${e},${t},${r},${n})`,o=`\n @keyframes whatmore-loading-indicator-keyframe {\n 0%,\n 100% {\n box-shadow: 0em -2.6em 0em 0em ${i}, 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.5), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.7);\n }\n 12.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${r}, 0.7), 1.8em -1.8em 0 0em ${i}, 2.5em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.5);\n }\n 25% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${r}, 0.5), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.7), 2.5em 0em 0 0em ${i}, 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2);\n }\n 37.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${r}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.5), 2.5em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.7), 1.75em 1.75em 0 0em ${i}, 0em 2.5em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2);\n }\n 50% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${r}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.5), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${r}, 0.7), 0em 2.5em 0 0em ${i}, -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -2.6em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2);\n }\n 62.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${r}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${r}, 0.5), 0em 2.5em 0 0em rgba(${e}, ${t}, ${r}, 0.7), -1.8em 1.8em 0 0em ${i}, -2.6em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2);\n }\n 75% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${r}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${r}, 0.5), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.7), -2.6em 0em 0 0em ${i}, -1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2);\n }\n 87.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(${e}, ${t}, ${r}, 0.2), 1.8em -1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 2.5em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 1.75em 1.75em 0 0em rgba(${e}, ${t}, ${r}, 0.2), 0em 2.5em 0 0em rgba(${e}, ${t}, ${r}, 0.2), -1.8em 1.8em 0 0em rgba(${e}, ${t}, ${r}, 0.5), -2.6em 0em 0 0em rgba(${e}, ${t}, ${r}, 0.7), -1.8em -1.8em 0 0em ${i};\n }\n }\n `,a=document.createElement("style");a.type="text/css",a.innerHTML=o,document.head.appendChild(a)}(e[0],e[1],e[2],.2)}),[]),(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("span",{className:"whatmore-loading-indicator"})})},l=r(8781);var d=function(e){var t,r;const n=null!==(t=e.height)&&void 0!==t?t:"100%",i=null!==(r=e.width)&&void 0!==r?r:"100%";return(0,a.jsxs)("div",{style:{width:i,height:n,overflow:"hidden",minHeight:n,minWidth:i},children:[(0,a.jsx)(l.A,{height:n,width:i}),(0,a.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",alignContent:"center",width:"100%",height:"100%",position:"relative",zIndex:1,bottom:"100%",className:"whatmore-ios-css-relative-fix"},children:(0,a.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",width:"100%",height:"fit-content"},children:(0,a.jsx)(s,{})})})]})}},8781:function(e,t,r){var n=r(4414);t.A=function(e){var t,r,i;const o=null!==(t=e.height)&&void 0!==t?t:"100%",a=null!==(r=e.width)&&void 0!==r?r:"100%",s=null!==(i=e.borderRadius)&&void 0!==i?i:"10px";return(0,n.jsx)("div",{style:{height:o,width:o,borderRadius:s,overflow:"hidden",minHeight:o,minWidth:a,maxHeight:o,maxWidth:a},children:(0,n.jsx)("div",{style:{minHeight:o,minWidth:a},height:"100%",width:"100%",className:"whatmore-shimmer"})})}},4033:function(e,t,r){r.d(t,{n:function(){return n}});const n=()=>{if("undefined"!==typeof window){const e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")&&navigator.vendor.includes("Apple")}return!1}},9098:function(e,t,r){var n=r(9950),i=r(16),o=r(4414);t.A=function(e){var t,r,a;const[s,l]=(0,n.useState)(!1),d=n.useRef(0),m=(0,n.useRef)(null),u=null!==(t=e.timeUpdateCallback)&&void 0!==t?t:()=>{},c=null!==(r=e.height)&&void 0!==r?r:"100%",h=null!==(a=e.width)&&void 0!==a?a:"100%";return(0,n.useEffect)((()=>{d.current=0;const e=setInterval((()=>{d.current=d.current+.03,m.current&&u(d.current,5),d.current>=5&&(d.current=0)}),30);return()=>{clearInterval(e)}}),[e.isPlaying]),(0,o.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:h,height:"100%",overflow:"hidden"},children:[(0,o.jsx)("div",{style:{width:s?"100%":"0px",height:s?"100%":"0px"},children:(0,o.jsx)("img",{ref:m,src:e.url,style:{objectFit:"cover",height:"100%",width:h,backgroundColor:"white"},alt:"image player",onLoad:()=>{l(!0)}})}),s?(0,o.jsx)(o.Fragment,{}):(0,o.jsx)(i.A,{width:h,height:c})]})}},9879:function(e,t,r){r.d(t,{A:function(){return p}});var n=r(9950),i=r(6649),o=r(3788),a=r(6613),s=r(2039),l=r(9098),d=r(4033),m=r(5830),u=r(6493),c=r(4414);var h=function(e){var t,r,o,s,l;const h=(0,n.useRef)(null),[p,f,g]=(0,i.A)({triggerOnce:!0}),v=(0,m.Xd)("whatmoreShopId"),$=null!==(t=e.height)&&void 0!==t?t:"100%",b=null!==(r=e.width)&&void 0!==r?r:"100%";return(0,n.useEffect)((()=>{h.current&&(e.isPlaying?h.current.play():(((0,d.n)()||(0,a.At)())&&h.current.play(),"57939755089"==v?setTimeout((()=>{h.current.pause()}),300):h.current.pause()))}),[e.isPlaying,f]),(0,c.jsx)("div",{ref:p,style:{width:$,height:b,overflow:"hidden",display:"flex",alignItems:"center"},children:f||"51394281658"==v||"8968077397"==v?(0,c.jsxs)("video",{ref:h,className:"whatmore-video-player-muted",width:b,height:$,preload:"metadata",loop:!0,playsInline:!0,poster:e.isPlaying&&1!=(null===(o=e.event)||void 0===o?void 0:o.index)&&"STRTFEDEDAP"!==v&&"STRY2V4XO5L"!==v?e.url:null!==(s=e.poster)&&void 0!==s?s:e.url,muted:null===(l=e.isVideoMuted)||void 0===l||l,style:{backgroundColor:"white",borderRadius:e.borderRadius,objectFit:"cover"},children:[(0,c.jsx)("source",{src:e.url,type:"video/mp4"}),(0,c.jsx)("source",{src:(0,u.yD)(e.url),type:"video/mp4"})]}):(0,c.jsx)("div",{width:b,height:$,ref:e=>{e&&e.style.setProperty("display","block","important")}})})};var p=function(e){var t,r,d,p,f,g,v,$,b;const[x,y,w]=(0,i.A)({triggerOnce:!0}),_=(0,m.Xd)("whatmoreShopId"),j=(0,n.useRef)(null);if((0,n.useEffect)((()=>{j.current&&(e.isPlaying?j.current.play():j.current.pause())}),[e.isPlaying,y]),(0,s.Il)(e.event))return(0,c.jsx)(l.A,{height:e.height,width:e.width,url:e.url,isPlaying:e.isPlaying,timeUpdateCallback:e.timeUpdateCallback});const C=null!==(t=e.pauseFromPlayTimeInMs)&&void 0!==t?t:200,k=null!==e&&void 0!==e&&null!==(r=e.event)&&void 0!==r&&null!==(d=r.poster_image)&&void 0!==d&&d.startsWith("https://cdn.shopify.com")?(null===e||void 0===e||null===(p=e.event)||void 0===p||null===(f=p.poster_image)||void 0===f?void 0:f.split("?")[0])+"?width=400&height=400":null===e||void 0===e||null===(g=e.event)||void 0===g?void 0:g.poster_image;if((0,a.MN)())return(0,c.jsx)(h,{isVideoMuted:e.isVideoMuted,event:null===e||void 0===e?void 0:e.event,borderRadius:e.borderRadius,height:"100%",width:"100%",poster:k,url:(0,o.s)(e.url),isPlaying:e.isPlaying,pauseFromPlayTimeInMs:C});const S=null!==(v=e.height)&&void 0!==v?v:"100%",A=null!==($=e.width)&&void 0!==$?$:"100%";return(0,c.jsx)("div",{ref:x,style:{width:S,height:A,overflow:"hidden",display:"flex",alignItems:"center"},children:y||"51394281658"==_||"8968077397"==_?(0,c.jsxs)("video",{ref:j,className:"whatmore-video-player-muted",width:A,height:S,preload:"metadata",loop:!0,playsInline:!0,muted:null===(b=e.isVideoMuted)||void 0===b||b,poster:"57939755089"==_?"":k,style:{backgroundColor:"white",objectFit:"cover"},children:[(0,c.jsx)("source",{src:(0,o.s)(e.url),type:"video/mp4"}),(0,c.jsx)("source",{src:(0,u.yD)(e.url),type:"video/mp4"})]}):(0,c.jsx)("div",{width:A,height:S,ref:e=>{e&&e.style.setProperty("display","block","important")}})})}},3788:function(e,t,r){r.d(t,{s:function(){return s}});var n=r(1348),i=r(5830);const o={"https://d3syezql093hs1.cloudfront.net":"https://whatmore-brand-video-assets.azureedge.net","https://d2r0bijhs9mx1s.cloudfront.net":"https://whatmore-brand-thumbnail-video-assets.azureedge.net","https://d2oouab8j9eigo.cloudfront.net":"https://whatmore-brand-story-assets.azureedge.net","https://d28nus7q7qajdn.cloudfront.net":"https://whatmore-video-assets.azureedge.net","https://d1zl4k1t5o4s75.cloudfront.net":"https://whatmore-brand-video-assets-720p.azureedge.net"},a={"https://d3syezql093hs1.cloudfront.net":"https://whatmore-brand-video-assets.b-cdn.net","https://d2r0bijhs9mx1s.cloudfront.net":"https://whatmore-brand-thumbnail-video-assets.b-cdn.net","https://d2oouab8j9eigo.cloudfront.net":"https://whatmore-brand-story-assets.b-cdn.net","https://d28nus7q7qajdn.cloudfront.net":"https://whatmore-video-assets-old.b-cdn.net","https://d1zl4k1t5o4s75.cloudfront.net":"https://whatmore-brand-video-assets-720p.b-cdn.net"},s=function(e){const t=(0,i.Xd)("whatmoreShopId");if(!e)return e;if(e.startsWith("https://cdn.shopify.com"))return e;if("AWSCDN"==(0,n.CfJ)(t))return e;if("AZURECDN"==(0,n.CfJ)(t)){if(e.includes(".azureedge.net"))return e;if(e.includes(".cloudfront.net")){for(const t of Object.keys(o))if(e.includes(t))return e.replace(t,o[t]);return e}}if("BUNNYCDN"==(0,n.CfJ)(t)){if(e.includes(".b-cdn.net"))return e;if(e.includes(".cloudfront.net")){for(const t of Object.keys(a))if(e.includes(t))return e.replace(t,a[t]);return e}}return e}},6493:function(e,t,r){r.d(t,{Cr:function(){return s},cb:function(){return a},lP:function(){return o},yD:function(){return l}});var n=r(1348);const i=(0,r(5830).Xd)("whatmoreShopId"),o=function(e){var t,r;return"event_media_urls"in e?"image"===e.event_type?e.event_media_urls.primary.portrait.content_image_original:"secondary"in e.event_media_urls&&e.event_media_urls.secondary.portrait.content_video_1080p?e.event_media_urls.secondary.portrait.content_video_1080p:null!==(t=e.event_media_urls.primary.portrait.content_video_1080p)&&void 0!==t?t:null===(r=e.event_media_urls.primary.landscape)||void 0===r?void 0:r.content_video_1080p:e.event_hls_url},a=function(e){var t;return"event_media_urls"in e?"image"===e.event_type?e.event_media_urls.primary.landscape.content_image_original:"secondary"in e.event_media_urls&&e.event_media_urls.secondary.landscape.content_video_1080p?e.event_media_urls.secondary.landscape.content_video_1080p:null!==(t=e.event_media_urls.primary.landscape.content_video_1080p)&&void 0!==t?t:e.event_media_urls.primary.portrait.content_video_1080p:e.event_hls_url},s=function(e){if(e.startsWith("https://cdn.shopify.com")&&e.includes("whatmore_")){const t=(0,n.ath)(i);if(!t)return e;return`https://whatmore-brand-video-assets-720p.b-cdn.net/${t}/${e.split("whatmore_")[1].split("?")[0]}`}return e},l=function(e){if(e.startsWith("https://cdn.shopify.com")&&e.includes("whatmore_")){const t=(0,n.ath)(i);if(!t)return e;return`https://whatmore-brand-thumbnail-video-assets.b-cdn.net/${t}/${e.split("whatmore_")[1].split("?")[0]}`}return e}},7973:function(e,t,r){r.d(t,{B:function(){return a},b:function(){return o}});var n=r(1348),i=r(5830);function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=(0,i.Xd)("whatmoreShopId");return"shopify"!=(0,n.NCy)(r)?"STRNV8MHJTF"==r?e+"?format=webp":e:e+t}function a(e){var t;if(null!==e&&void 0!==e&&e.includes("https://w-media.b-cdn.net/process-media"))return"image";const r=null===e||void 0===e||null===(t=e.trim())||void 0===t?void 0:t.split("?")[0],n=/\.(jpeg|jpg|gif|png|svg|webp)$/i,i=/\.(mp4|mov|wmv|avi|flv|mkv)$/i;return null!==n&&void 0!==n&&n.test(r)?"image":null!==i&&void 0!==i&&i.test(r)?"video":void 0}},5410:function(){},6125:function(){},4365:function(){},6614:function(){}}]);