whatmore-react-assets 1.0.943 → 1.0.945

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.943",
3
+ "version": "1.0.945",
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([[436],{1492:function(e,t,o){o.r(t),o.d(t,{default:function(){return _}});var i=o(7313),n=o(6090),r=o(7616),l=o(5572),s=(o(6143),o(7850),o(4444),o(7244),o(123),o(5892),o(1811),o(9302)),a=o(2575),d=o(2210),p=o(8486),c=o(9821),u=o(8866),h=o(2279),m=o.n(h),y=o(7753),v=o(7129),x=o(1855),f=o(9854),g=o(4920),w=o(4522),P=o(778),j=o(7381),C=(o(3439),o(4892)),S=o(6805),I=o(9219),O=o(5945),M=o(7053),b=o(6417);var k=function(e){var t,o,n,r,s,a,d,p,u,h,m,x,g,w,P,j,k,E,F;const[Z,_,W,N,U]=(0,c.Z)();var z=(0,i.useContext)(v.V);const{whatmoreUITheme:D}=(0,i.useContext)(l.I),R=(0,y.MO)("whatmoreShopId"),T=(0,y.MO)("whatmorePrimaryFont"),V=(0,y.MO)("whatmoreSecondaryColor"),H=e.onClick,A=null===(t=e.isOnFocus)||void 0===t||t,$=null!==(o=e.playOnUnfocus)&&void 0!==o&&o,G=null!==(n=e.animateOnFocus&&(0,f.iWI)(R))&&void 0!==n&&n,q="portrait"===U[S.YP],B=(q?1.076*_*(0,f.pEd)(R):_*(0,f.H4g)(R))+"px",L=(q?1.076*_*(0,f.pEd)(R):_*(0,f.H4g)(R))+"px",Y=(q?.965*_*(0,f.pEd)(R):.859*_*(0,f.H4g)(R))+"px",K=(0,f.nzC)(R),{whatmoreIsPreviewMode:X}=(0,i.useContext)(l.I),J=.25*_,Q=J+"px",ee=1.1*J+"px",[te,oe]=(0,i.useState)(e.event),[ie,ne]=(0,i.useState)(),re=Math.round(+(null===(r=te.products)||void 0===r||null===(s=r[0])||void 0===s?void 0:s.price)),le=Math.round(+(null===te||void 0===te||null===(a=te.products[0])||void 0===a?void 0:a.compare_price)),se=le&&0!=le&&le>re?Math.round((le-re)/le*100):NaN,[ae,de]=(0,i.useState)(se);return(0,i.useEffect)((()=>{(0,f.N8M)(R)&&(0,I.p_)(te,(0,f.Ipo)(R),R).then((e=>{var t,o,i,n;oe(e),(null===e||void 0===e||null===(t=e.products)||void 0===t||null===(o=t[0])||void 0===o?void 0:o.discount)&&de(null===e||void 0===e||null===(i=e.products)||void 0===i||null===(n=i[0])||void 0===n?void 0:n.discount)}));(async()=>{var e;const t=await(0,M.p)(null===te||void 0===te||null===(e=te.products)||void 0===e?void 0:e[0],(0,f.Ipo)(R),R);ne(t)})()}),[]),(0,b.jsxs)("div",{ref:e=>{e&&(e.style.setProperty("margin-top",z.tileTopMargin+"px","important"),e.style.setProperty("margin-bottom",z.tileBottomMMargin+"px","important"))},children:[(0,b.jsx)("div",{style:{margin:"0 auto",width:_,height:q&&A?"STR2FOC6KG9"==R?Z:1.1*Z:Z,borderRadius:"round"==D?"5px":"0px",boxShadow:"round"==D?K:null,borderWidth:(0,f.alU)(R),borderColor:(0,f.qPe)(R),overflow:"hidden",cursor:"pointer"},className:G?A?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",onClick:()=>{H(te)},children:(0,b.jsx)(C.Z,{height:"100%",width:"100%",url:te.thumbnail_image,isPlaying:A||$,event:te})}),(0,b.jsxs)("div",{onClick:()=>{H(te)},style:{cursor:"pointer",display:"flex",gap:"6px",padding:"14px 8px"},children:[(X?(0,f.uU$)(R):(0,f.EIj)(R))&&(0,b.jsx)("div",{ref:e=>{e&&e.style.setProperty("height",ee,"important")},style:{maxWidth:Q,minWidth:null!==(d=te.products)&&void 0!==d&&null!==(p=d[0])&&void 0!==p&&p.thumbnail_image?Q:"0",borderRadius:"round"==D?"5px":"0px",overflow:"hidden",backgroundColor:"rgb(220, 220, 220, 1)"},children:(0,b.jsx)("img",{ref:e=>{e&&e.style.setProperty("object-fit",(0,f.yOX)(R),"important")},src:null===(u=te.products)||void 0===u||null===(h=u[0])||void 0===h?void 0:h.thumbnail_image})}),(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"5px"},children:[(0,b.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-size",B,"important"),e.style.setProperty("line-height","120%","important"),e.style.setProperty("font-family",T,"important"),e.style.setProperty("-webkit-line-clamp",1,"important"),e.style.setProperty("line-clamp",1,"important"),e.style.setProperty("-webkit-box-orient","vertical","important"),e.style.setProperty("display","-webkit-box","important"),e.style.setProperty("overflow","hidden","important"),e.style.setProperty("text-overflow","ellipsis","important"))},children:(0,O.s)(null===(m=te.products[0])||void 0===m?void 0:m.title)}),(0,f.QaY)(R)&&(0,b.jsxs)("div",{style:{display:"flex",gap:"12px",flexDirection:(0,f.$zZ)(R)?"row":"row-reverse",justifyContent:(0,f.$zZ)(R)?"flex-start":"flex-end"},children:[(0,b.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.Uyp)(R),"important"),e.style.setProperty("font-size",L,"important"),e.style.setProperty("font-family",T,"important"),e.style.setProperty("overflow","hidden","important"))},style:{textAlign:"left",fontWeight:"normal"==(0,f.rPP)(R)?"normal":"bold"},children:(0,I.jx)(parseFloat(null!==(x=null===ie||void 0===ie?void 0:ie.price)&&void 0!==x?x:null===te||void 0===te||null===(g=te.products)||void 0===g||null===(w=g[0])||void 0===w?void 0:w.price)," ",R,null===(P=te.products[0])||void 0===P?void 0:P.currency)}),!isNaN(le)&&le>re&&(0,b.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.kPs)(R),"important"),e.style.setProperty("font-size",L,"important"),e.style.setProperty("font-family",T,"important"),e.style.setProperty("overflow","hidden","important"))},style:{textDecoration:"line-through"},children:(0,I.jx)(parseFloat(null!==(j=null===ie||void 0===ie?void 0:ie.compare_at_price)&&void 0!==j?j:null===te||void 0===te||null===(k=te.products)||void 0===k||null===(E=k[0])||void 0===E?void 0:E.compare_price)," ",R,null===(F=te.products[0])||void 0===F?void 0:F.currency)})]}),(0,f.QaY)(R)&&!isNaN(ae)&&0!=ae&&(0,b.jsx)("div",{style:{display:"flex",backgroundColor:"green"==(0,f.ZJm)(R)?"#343434"==V?(0,f.ZJm)(R):V:(0,f.ZJm)(R),alignItems:"center",borderRadius:(0,f.CF_)(R)+"px",width:"fit-content",padding:(0,f.Spx)(R)?"3px 6px":"0px"},children:(0,f.Spx)(R)?(0,b.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.mso)(R),"important"),e.style.setProperty("font-size",Y,"important"),e.style.setProperty("font-family",T,"important"))},children:"".concat(ae,"% Off")}):(0,b.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.aUT)(R),"important"),e.style.setProperty("font-size",Y,"important"),e.style.setProperty("font-family",(0,f.V3Y)(R),"important"))},children:(0,f.sG7)(R)})})]})]})]})};const E=(0,a.Z)({key:"whatmore-css-hv"});function F(e){const[t,o,n]=(0,c.Z)(),r=(0,y.MO)("whatmoreShopId"),s=e.events,a=e.onClick,u=n*(0,f.u6l)(r),h="32365904011"==r,[m,v]=(0,i.useState)(h?s.length:u),{whatmoreWidgetSourceDetails:j}=(0,i.useContext)(l.I);return(0,i.useEffect)((()=>{m<=u&&v((e=>e+u))}),[u]),(0,b.jsx)("div",{className:"whatmore-events-carousel-portrait",style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,b.jsx)("div",{style:{width:window.innerWidth,height:"fit-content"},children:(0,b.jsx)(d.tq,{slidesPerView:s.length>1?u:1,initialSlide:s.length>1?1:0,centeredSlides:!0,centeredSlidesBounds:!1,watchSlidesProgress:!0,touchRatio:.5,onSlideChange:e=>{(0,w.y4)({userInteractionType:P.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:j}),e.realIndex>e.previousIndex&&v((e=>e+u))},loop:h,navigation:h,modules:[p.W_],children:s.map(((e,t)=>t<=m&&(0,b.jsx)(d.o5,{children:t=>{let{isActive:o,isPrev:i,isNext:n,isVisible:l}=t;return i||n||o?(0,f.$X$)(r)?(0,b.jsx)(k,{isOnFocus:o&&l,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{a(e)}}):(0,b.jsx)(g.Z,{isOnFocus:o&&l,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{a(e)}}):(0,b.jsx)(x.Z,{})}},"whatmore-event-tile-portrait-"+e.index)))})})})}function Z(e){const[t,o,n,r]=(0,c.Z)(),[s,a]=(0,i.useState)(-1),u=(0,y.MO)("whatmoreShopId"),h=e.onClick,v=e.events,j="32365904011"==u,[C,S]=(0,i.useState)(j?v.length:n),I=Math.min(n,v.length),{whatmoreWidgetSourceDetails:O}=(0,i.useContext)(l.I);return(0,i.useEffect)((()=>{C<=n&&S((e=>e+n))}),[n]),(0,b.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:r+"px",paddingRight:r+"px"},className:"whatmore-events-carousel-landscape",children:(0,b.jsx)("div",{style:{width:o*I*(0,f.Su5)(u)+"px"},children:(0,b.jsx)(d.tq,{slidesPerView:I,watchSlidesProgress:!0,modules:[p.W_],navigation:!0,slidesPerGroup:parseInt(I),onSlideChange:e=>{(0,w.y4)({userInteractionType:P.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:O}),e.realIndex>e.previousIndex&&S((e=>e+n))},spaceBetween:(0,f.WGf)(u),loop:j,children:v.map(((e,t)=>{const o=m()((()=>a(t)),300);return t<=C&&(0,b.jsx)(d.o5,{onMouseEnter:()=>{o()},onMouseLeave:()=>{o.cancel(),a(-1)},children:o=>{let{isActive:i,isPrev:n,isNext:r,isVisible:l}=o;return l?(0,f.$X$)(u)?(0,b.jsx)(k,{isOnFocus:t==s,playOnUnfocus:!0,animateOnFocus:!0,event:e,onClick:()=>{h(e)}}):(0,b.jsx)(g.Z,{isOnFocus:t==s,playOnUnfocus:!(0,f.dHy)(u)||t==parseInt(I/2)&&-1==s,animateOnFocus:!0,event:e,onClick:()=>{h(e)}}):(0,b.jsx)(x.Z,{})}},"whatmore-event-tile-landscape-"+e.index)}))})})})}var _=function(e){const[t,o,a]=(0,u.Z)(),[d]=(0,y.j1)("whatmoreShopId"),[p]=(0,y.j1)("whatmorePrimaryColor"),[c]=(0,y.j1)("whatmoreTitleFont"),h="portrait"==t?(0,y.MO)("whatmoreTitleFontSizePortrait"):(0,y.MO)("whatmoreTitleFontSize"),{whatmoreRootId:m}=(0,i.useContext)(l.I),x=((0,y.MO)("isInDesignMode"),(0,y.MO)("whatmoreCollectionHeading")),{whatmoreIsCollectionsTemplate:g}=(0,i.useContext)(l.I),w=e.events,P=e.onClick,C=c;function S(e){P(e)}return(0,i.useEffect)((()=>{(0,j.Oo)("Video shopping powered by Whatmore!")}),[]),(0,i.useEffect)((()=>{l.$.forEach((e=>{var t;const o=null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-a"]');if(!o)return;o&&e&&(e.style.minHeight="0px")}))}),[]),delete r.ZP.styles.global,(0,b.jsx)(s.C,{value:E,children:(0,b.jsx)("div",{className:"whatmore-carousel-events",children:(0,b.jsx)(n.x,{theme:r.ZP,cssVarsRoot:m,resetCSS:!1,children:(0,b.jsxs)(v.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[e.heading.trim().length>0||g?(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:(0,b.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-family",C,"important"),e.style.setProperty("font-size",h+"px","important"))},style:{color:p,backgroundClip:"text",textAlign:"center",fontWeight:(0,f.wOV)(d),lineHeight:(0,f.vY4)(d),letterSpacing:(0,f.X2K)(d)},children:g?"W"!==x?x:"":e.heading})}):(0,b.jsx)(b.Fragment,{}),"landscape"===t?(0,b.jsx)(Z,{events:w,onClick:S}):(0,b.jsx)(F,{events:w,onClick:S})]})})})})}},1855:function(e,t,o){var i=o(7313),n=o(9821),r=o(7129),l=o(6417);t.Z=function(e){var[t,o]=(0,n.Z)();return(0,i.useContext)(r.V),e.event,(0,l.jsx)("div",{style:{margin:"0 auto",width:o,height:t,overflow:"hidden"}})}},5892:function(){},4444:function(){},1811:function(){},7850:function(){}}]);