whatmore-react-assets 1.0.308 → 1.0.309

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whatmore-react-assets",
3
- "version": "1.0.308",
3
+ "version": "1.0.309",
4
4
  "description": "public repo for all whatmore js and css assets",
5
5
  "main": "whatmore.js",
6
6
  "scripts": {
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[642],{51:function(e,t,n){n.d(t,{Z:function(){return i}});n(7313);var r=n(6417);var i=function(e){return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("span",{className:"whatmore-loading-indicator"})})}},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})},3175:function(e,t,n){var r=n(208),i=n(51),o=n(6417);t.Z=function(e){var t,n;const a=null!==(t=e.height)&&void 0!==t?t:"100%",s=null!==(n=e.width)&&void 0!==n?n:"100%";return(0,o.jsxs)("div",{style:{width:s,height:a,overflow:"hidden"},children:[(0,o.jsx)(r.Od,{height:"100%",width:"100%",speed:0,startColor:"#202020",endColor:"#606060"}),(0,o.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,o.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",width:"100%",height:"fit-content"},children:(0,o.jsx)(i.Z,{})})})]})}},2887:function(e,t,n){var r=n(7313),i=(n(6422),n(3175)),o=n(6417);t.Z=function(e){var t,n,a;const[s,d]=(0,r.useState)(!1),l=r.useRef(0),u=(0,r.useRef)(null),c=null!==(t=e.timeUpdateCallback)&&void 0!==t?t:()=>{},h=null!==(n=e.height)&&void 0!==n?n:"100%",p=null!==(a=e.width)&&void 0!==a?a:"100%";return(0,r.useEffect)((()=>{l.current=0;const e=setInterval((()=>{l.current=l.current+.03,u.current&&c(l.current,5),l.current>=5&&(l.current=0)}),30);return()=>{clearInterval(e)}}),[e.isPlaying]),(0,o.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:p,height:h,overflow:"hidden"},children:[(0,o.jsx)("div",{style:{width:s?"100%":"0px",height:s?"100%":"0px"},children:(0,o.jsx)("img",{ref:u,src:e.url,style:{objectFit:"cover",height:h,width:p,backgroundColor:"white"},alt:"image player",onLoad:()=>{d(!0)}})}),s?(0,o.jsx)(o.Fragment,{}):(0,o.jsx)(i.Z,{width:"100%",height:"100%"})]})}},4892:function(e,t,n){n.d(t,{Z:function(){return c}});var r=n(7313),i=n(3933),o=n(868),a=n(8984),s=n(7300),d=(n(6422),n(2887)),l=n(6417);var u=function(e){var t,n;const o=(0,r.useRef)(null),[a,s,d]=(0,i.YD)({triggerOnce:!0}),u=null!==(t=e.height)&&void 0!==t?t:"100%",c=null!==(n=e.width)&&void 0!==n?n:"100%";return(0,r.useEffect)((()=>{o.current&&(e.isPlaying?o.current.play():o.current.pause())}),[e.isPlaying,s]),(0,l.jsx)("div",{ref:a,style:{width:u,height:c,overflow:"hidden"},children:s?(0,l.jsx)("video",{ref:o,className:"whatmore-video-player",width:c,height:u,preload:"auto",loop:!0,playsInline:!0,muted:!0,autoPlay:!0,src:e.url,style:{backgroundColor:"white"}}):(0,l.jsx)("div",{width:c,height:u,ref:e=>{e&&e.style.setProperty("display","block","important")}})})};var c=function(e){var t,n,c;const[h,p,x]=(0,i.YD)({triggerOnce:!0});if((0,s.WJ)(e.event))return(0,l.jsx)(d.Z,{height:e.height,width:e.width,url:e.url,isPlaying:e.isPlaying,timeUpdateCallback:e.timeUpdateCallback});const f=null!==(t=e.pauseFromPlayTimeInMs)&&void 0!==t?t:200;if((0,a.KE)())return(0,l.jsx)(u,{height:"100%",width:"100%",url:(0,o.V)(e.url),isPlaying:e.isPlaying,pauseFromPlayTimeInMs:f});const w=(0,r.useRef)(null),m=null!==(n=e.height)&&void 0!==n?n:"100%",v=null!==(c=e.width)&&void 0!==c?c:"100%";return(0,r.useEffect)((()=>{w.current&&(e.isPlaying?w.current.play():w.current.pause())}),[e.isPlaying,p]),(0,l.jsx)("div",{ref:h,style:{width:m,height:v,overflow:"hidden"},children:p?(0,l.jsx)("video",{ref:w,className:"whatmore-video-player",width:v,height:m,preload:"auto",loop:!0,playsInline:!0,muted:!0,src:(0,o.V)(e.url),style:{backgroundColor:"white"}}):(0,l.jsx)("div",{width:v,height:m,ref:e=>{e&&e.style.setProperty("display","block","important")}})})}},8631:function(e,t,n){var r=n(7313),i=n(9854),o=n(7753),a=(n(9111),n(123),n(9778),n(4892)),s=n(7129),d=n(9821),l=n(6417);t.Z=function(e){var t;const[n,u,c,h,p]=(0,d.Z)(),[x]=(0,o.j1)("whatmorePrimaryFont"),[f]=(0,o.j1)("whatmorePrimaryColor"),[w]=(0,o.j1)("whatmoreSecondaryColor"),[m]=(0,o.j1)("whatmoreShopId"),[v]=(0,o.j1)("whatmoreCollectionsTileSize"),[g,y]=(0,r.useState)(!1),j=(0,i.f6)(m);(0,r.useContext)(s.V);const b=e.event,C=e.onClick,k=e.removeBorders,P=n*v*.01,E=u*v*.01,R=null!==(t=e.borderRadius)&&void 0!==t?t:"0%";return(0,l.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:E+"px",marginLeft:k?"2px":"5px",marginRight:k?"2px":"5px",marginTop:k?"2px":"5px",marginBottom:k?"2px":"5px",cursor:"pointer"},onClick:()=>{y(!0),C(b)},className:[g?"whatmore-scale-on-tap":""].join(" "),children:(0,l.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:R,overflow:"hidden",boxShadow:k?"":"0px 1px 1px 0px "+w+"50, 0px -1px 1px 0px "+j+"50, 1px 0px 1px 0px "+w+"50, -1px 0px 1px 0px "+j+"80, 1px -1px 1px 0px "+w+"80, -1px 1px 1px 0px "+j+"DA, 1px 1px 1px 0px "+w+"DA, -1px -1px 1px 0px "+j+"DA"},children:(0,l.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:P+"px",width:E+"px",borderRadius:R,backgroundColor:"gray",overflow:"hidden"},children:(0,l.jsx)(a.Z,{height:"100%",width:"100%",url:b.thumbnail_image,isPlaying:!0,event:b})})})})}},6066:function(e,t,n){var r=n(7313),i=n(9854),o=n(7753),a=(n(9111),n(123),n(9778),n(4892)),s=n(7129),d=n(9821),l=n(6417);t.Z=function(e){var t;const[n,u,c,h,p]=(0,d.Z)(),[x]=(0,o.j1)("whatmorePrimaryFont"),[f]=(0,o.j1)("whatmorePrimaryColor"),[w]=(0,o.j1)("whatmoreSecondaryColor"),[m]=(0,o.j1)("whatmoreShopId"),[v]=(0,o.j1)("whatmoreCollectionsTileSize"),[g,y]=(0,r.useState)(!1),j=(0,i.f6)(m);(0,r.useContext)(s.V);const b=e.event1,C=e.event2,k=e.onClick,P=.01*v,E=n*P,R=n*P*.5,S=u*P,z=null!==(t=e.borderRadius)&&void 0!==t?t:"10%",Z="15%",A=e.removeBorders;return(0,l.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",flexShrink:0,height:E+"px",width:S+"px",marginLeft:A?"2px":"5px",marginRight:A?"2px":"5px",marginTop:A?"2px":"5px",marginBottom:A?"2px":"5px",cursor:"pointer"},children:(0,l.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"center",flexShrink:0,height:"fit-content",width:"fit-content",borderRadius:A?"0px":z,boxShadow:A?"":"0px 1px 1px 0px "+w+"50, 0px -1px 1px 0px "+j+"50, 1px 0px 1px 0px "+w+"50, -1px 0px 1px 0px "+j+"80, 1px -1px 1px 0px "+w+"80, -1px 1px 1px 0px "+j+"DA, 1px 1px 1px 0px "+w+"DA, -1px -1px 1px 0px "+j+"DA"},onClick:()=>{y(!0),k(b)},className:[g?"whatmore-scale-on-tap":""].join(" "),children:[(0,l.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:R+"px",width:S+"px",borderTopLeftRadius:A?"0px":Z,borderTopRightRadius:A?"0px":Z,borderBottom:"2px solid transparent",backgroundColor:"transparent",overflow:"hidden"},children:(0,l.jsx)(a.Z,{height:"100%",width:"100%",url:b.thumbnail_image,isPlaying:!0,event:b})}),(0,l.jsx)("div",{style:{flexShrink:0,objectFit:"cover",height:R+"px",width:S+"px",borderBottomLeftRadius:A?"0px":Z,borderBottomRightRadius:A?"0px":Z,borderTop:"2px solid transparent",backgroundColor:"transparent",overflow:"hidden"},children:(0,l.jsx)(a.Z,{height:"100%",width:"100%",url:C.thumbnail_image,isPlaying:!0,event:C})})]})})}},8782:function(e,t,n){n.d(t,{P:function(){return s}});var r=n(3933),i=n(8866),o=(n(123),n(6417));function a(e){const{ref:t,inView:n,entry:i}=(0,r.YD)({triggerOnce:e.retainAlreadyRenderedElements});return(0,o.jsx)("div",{ref:t,children:n?e.renderElement({eventData:e.data}):(0,o.jsx)("div",{style:{minWidth:e.defaultHeight,minHeight:e.defaultWidth}})})}function s(e){var t;const[n,r,s]=(0,i.Z)();return(0,o.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"landscape"===n?"center":"flex-start",height:"fit-content",width:"100%",gap:null!==(t=e.spacing)&&void 0!==t?t:"0.5%"},className:"whatmore-carousel-horizontal-flex",children:e.dataList.map(((t,n)=>(0,o.jsx)(a,{renderElement:e.renderElement,data:t,defaultHeight:e.defaultHeight,defaultWidth:e.defaultWidth,retainAlreadyRenderedElements:e.retainAlreadyRenderedElements},"key-"+n)))})}},868:function(e,t,n){n.d(t,{V:function(){return s}});var r=n(9854),i=n(7753);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.MO)("whatmoreShopId");if(e.startsWith("https://cdn.shopify.com"))return e;if("AWSCDN"==(0,r.zp)(t))return e;if("AZURECDN"==(0,r.zp)(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,r.zp)(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}},6805:function(e,t,n){n.d(t,{$I:function(){return s},$w:function(){return l},AK:function(){return o},AL:function(){return a},YP:function(){return i},me:function(){return r},rE:function(){return d}});const r="device_type",i="device_mode",o="mobile",a="tablet",s="desktop",d="portrait",l="landscape"},6422:function(e,t,n){var r=n(7313),i=n(7753);t.Z=function(e){const[t,n]=(0,i.j1)("muted");return(0,r.useEffect)((()=>{}),[]),[t,n]}},8866:function(e,t,n){var r=n(7313);function i(){return[window.innerHeight,window.innerWidth]}t.Z=function(e){var[t,n]=i();const[o,a]=(0,r.useState)(["portrait",t,n]);return(0,r.useLayoutEffect)((()=>{function e(){var[e,t]=i();a(e>t?["portrait",e,t]:["landscape",e,t])}return window.addEventListener("resize",e),window.addEventListener("orientationchange",e),screen.orientation&&screen.orientation.addEventListener("change",e),e(),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e),screen.orientation&&screen.orientation.removeEventListener("change",e)}}),[]),o}},9821:function(e,t,n){var r=n(6367),i=n(7753),o=n(8866),a=n(6805);t.Z=function(e){const[t,n,s]=(0,o.Z)(),[d]=(0,i.j1)("whatmoreLandscapePadding"),[l]=(0,i.j1)("whatmoreVideoTileSize"),u=(0,r.useMediaQuery)({query:"(min-width: 1025px)"}),c=(0,r.useMediaQuery)({query:"(min-width: 481px)"}),h=!("portrait"!=t||!c),p=l/100*1.3*.5,x=l/100;var f=Math.min(s,n),[w,m,v,g]=[.6*f*(16/9),.6*f,1.4,0];function y(e){return Math.round(10*e)/10}var j={DEVICE_TYPE:a.AK,DEVICE_MODE:a.rE};if(u){const e=m*p,t=w*p;[w,m,v,g]=[t,e,(s-2*d)/(1.1*e),d],j[a.me]=a.$I,j[a.YP]=a.$w}else if(h){var b=.8*m,C=.8*w;"portrait"==t?(b*=x,C*=x,[w,m,v,g]=[C,b,y(s/(1.2*b)),0],j[a.me]=a.AL,j[a.YP]=a.rE):([w,m,v,g]=[C,b,(s-2*d)/(1.1*b),d],j[a.me]=a.AL,j[a.YP]=a.$w)}else{b=m,C=w;"portrait"==t?(b*=x,C*=x,[w,m,v,g]=[C,b,y(s/(1.15*b)),0],j[a.me]=a.AK,j[a.YP]=a.rE):(b=.7*m,C=.7*w,[w,m,v,g]=[C,b,(s-2*d)/(1.1*b),d],j[a.me]=a.AK,j[a.YP]=a.$w)}return[w,m,v,g,j]}},9111:function(){},123:function(){},7244:function(){},5892:function(){},4444:function(){},1811:function(){},6143:function(){},7850:function(){},9778:function(){}}]);