whatmore-react-assets 1.0.749 → 1.0.751
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 +1 -1
- package/static/js/218.02edade9.chunk.js +1 -0
- package/static/js/582.2efffea6.chunk.js +1 -0
- package/static/js/{692.15f5b4aa.chunk.js → 692.955aa41a.chunk.js} +1 -1
- package/static/js/74.56f55628.chunk.js +1 -0
- package/whatmore.js +2 -2
- package/static/js/218.24c3de84.chunk.js +0 -1
- package/static/js/582.8d9386cb.chunk.js +0 -1
- package/static/js/74.94791a44.chunk.js +0 -1
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[218],{3218:function(t,e,n){n.r(e),n.d(e,{EventClickComponentContext:function(){return yn},default:function(){return Sn}});var i=n(4897),o=n(499),r=n(7313),l=n(2210),a=n(8486),d=n(5160),s=n(3271),c=n(9854),h=n(7753),u=n(7789),p=n(7053),x=n(1896),v=n(6417);var m=function(t){return(0,v.jsx)(x.Z,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback,event:t.event})},g=n(5098),f=n(3437),w=n(3455),j=n(6422);var C,y,S,b,k=function(t){const[e,n]=(0,j.Z)(),[i,o,r,l]=(0,u.Z)(),a=.08*l;function d(){n(!e)}return(0,v.jsx)(s.M5,{children:(0,v.jsx)(s.Cd,{cursor:"pointer",children:e?(0,v.jsx)(w.Z,{sx:{color:"white",fontSize:a,filter:"drop-shadow(0 0 5px black);"},onClick:()=>{d()}}):(0,v.jsx)(f.Z,{sx:{color:"white",fontSize:a,filter:"drop-shadow(0 0 5px black);"},onClick:()=>{d()}})})})},I=n(168),_=n(8449),F=n(686);const T=(0,F.F4)(C||(C=(0,I.Z)(["\n 0%,10%,15% {\n opacity: 0; \n }\n 25%{\n opacity: 0.25;\n transform: translateY(-25%);\n }\n 50%{\n opacity: 0.5;\n transform: translateY(0%);\n }\n 75% {\n opacity: 0.75;\n transform: translateY(-8%)\n }\n 100%{\n opacity: 1;\n transform: translateY(0%)\n }\n"]))),E="".concat(T," 0.5s linear"),P=(0,F.F4)(y||(y=(0,I.Z)(["\n 30% { transform: scale(1.2); }\n 40%, 60% { transform: rotate(-20deg) scale(1.2); }\n 50% { transform: rotate(20deg) scale(1.2); }\n 70% { transform: rotate(0deg) scale(1.2); }\n 100% { transform: scale(1); }\n"]))),O="\n ".concat(P," 1.5s linear;\n"),L=(0,F.F4)(S||(S=(0,I.Z)(["\n 3% { transform: scale(1.2); }\n 4%, 6% { transform: rotate(-20deg) scale(1.2); }\n 5%,7% { transform: rotate(20deg) scale(1.2); }\n 8% { transform: rotate(0deg) scale(1.2); }\n 10% { transform: scale(1); }\n"]))),z=("\n ".concat(L," 10s linear infinite;\n"),(0,F.F4)(b||(b=(0,I.Z)(["\n 0% { transform: scale(1); }\n 10% { transform: scale(1.2); }\n 20% { transform: scale(1); }\n"]))));"\n ".concat(z," 5s ease-in-out infinite;\n");var R,M=n(4937);const D=(0,F.F4)(R||(R=(0,I.Z)(["\n 0% { \n opacity: 0;\n }\n 10%{\n opacity: 0.5;\n }\n 20%{\n opacity: 1;\n }\n \n"]))),K="\n ".concat(D," ").concat(3,"s ease-in-out;\n");function A(t){const[e,n,i,o]=(0,u.Z)(),[l]=(0,h.j1)("whatmoreSecondaryColor"),[a,d]=(0,r.useState)(0),[p]=(0,h.j1)("whatmoreShopId"),x=t.event,m=t.onClick,f=x.products.length;t.isFirstProductsIconClickDone;(0,r.useEffect)((()=>{const t=setInterval((()=>{d((t=>(t+1)%f))}),3e3);return()=>{clearInterval(t)}}),[]);const w=.24,j=.024;var C=o*w+"px",y=o*w+"px",S=o*j*1.5+"px",b=o*j+"px",k=o*j*1.5+"px";if(void 0==x.products||0==x.products.length)return(0,v.jsx)(v.Fragment,{});var I=x.products;return(0,v.jsx)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",height:"fit-content",width:"fit-content",borderRadius:"lg",children:(0,v.jsxs)(s.xu,{margin:"10px",width:C,height:y,boxShadow:"dark-lg",borderColor:"white",borderWidth:"2px",borderRadius:"lg",overflow:"visible",backgroundColor:"gray.100",animation:E,onClick:()=>m(),children:[(0,v.jsx)(g.Ee,{width:"100%",height:"100%",src:I[a].thumbnail_image,objectFit:"cover",sx:{objectFit:(0,c.yOX)(p)+" !important"},borderRadius:"lg",animation:K},a),(0,v.jsx)(s.xu,{width:"100%",height:"100%",style:{position:"relative",zIndex:2,bottom:"100%"},className:"whatmore-ios-css-relative-fix",borderRadius:"lg",children:(0,v.jsx)(s.Kq,{direction:"column",width:"100%",height:"100%",justifyContent:"flex-end",children:(0,v.jsx)(s.M5,{children:(0,v.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",backgroundColor:l,borderRadius:"lg",marginX:"5px",marginY:"5px",paddingX:"2px",paddingY:"2px",children:[(0,v.jsxs)(s.xv,{noOfLines:1,fontSize:b,fontFamily:"sans-serif",fontWeight:"semibold",textAlign:"center",lineHeight:"100%",sx:{color:"white !important"},children:["\xa0","Shop Now","\xa0"]}),(0,v.jsx)(s.M5,{children:(0,v.jsx)(M.Z,{sx:{color:"white",fontSize:k}})})]})})})}),(0,v.jsx)(s.Kq,{direction:"row",height:"fit-content",width:C,justifyContent:"flex-end",style:{position:"relative",zIndex:3,bottom:"210%",left:"5%"},className:"whatmore-ios-css-relative-fix",children:(0,v.jsx)(s.Ct,{fontSize:S,variant:"subtle",textColor:l,bgColor:"gray.100",borderRadius:"md",boxShadow:"dark-lg",children:f>1?f:""})})]})})}var W=function(t){const[e,n]=(0,h.j1)("isProductSwiperCatalogOpen"),[i,o,l,a]=(0,u.Z)(),[d,c]=(0,r.useState)(!1),p=t.onToggle,x=t.event,m=.07*a;return(0,v.jsx)(s.M5,{children:(0,v.jsx)(s.bK,{style:{marginTop:"10px"},children:e?(0,v.jsx)(_.Z,{sx:{color:"white",fontSize:m,filter:"drop-shadow(0 0 5px black);",position:"relative",zIndex:2},onClick:()=>{p("minimize-button")}}):(0,v.jsx)(A,{event:x,onClick:()=>{p("products-button"),c(!0)},isFirstProductsIconClickDone:d})})})},N=n(2634),q=n(8302);var H,Z,V=function(t){const e=t.onCloseCallback,[n,i,o,r]=(0,u.Z)(),l=.08*r;return(0,v.jsx)(s.M5,{children:(0,v.jsx)(s.Cd,{cursor:"pointer",children:(0,v.jsx)(q.Z,{sx:{boxShadow:3,color:"white",fontSize:l,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),e(t)}})})})},U=n(756),B=n(5428),Y=n(8022);var X=function(t){var e,n;const[i,o,l,a]=(0,u.Z)(),[d,c]=(0,r.useState)(!0),{slideDirection:p}=(0,r.useContext)(yn),x=(0,h.MO)("whatmoreShopId"),m=null!==(e=t.showForSeconds)&&void 0!==e?e:3,g=null!==(n=t.delayInSeconds)&&void 0!==n?n:1;t.swipeUp,(0,r.useEffect)((()=>{const t=setTimeout((()=>{c(!1)}),1e3*m);return()=>{clearTimeout(t)}}),[]);const f=.15*a,w=.07*a,j=(0,F.F4)(H||(H=(0,I.Z)(["\n 0% {\n transform: translateY(0%) rotate(0deg);\n }\n 50% {\n transform: translateY(-100%) translateX(+10%) rotate(+30deg);\n }\n 100% {\n transform: translateY(0%) rotate(0deg);\n }\n "]))),C="".concat(j," infinite 1.5s linear"),y=(0,F.F4)(Z||(Z=(0,I.Z)(["\n 0% {\n transform: translateY(0%) rotate(0deg);\n }\n 50% {\n transform: translateX(30%) translateY(20%) rotate(-30deg);\n }\n 100% {\n transform: translateY(0%) rotate(0deg);\n }\n "]))),S="".concat(y," infinite 1.5s linear");return(0,v.jsx)(U.MT,{unmountOnExit:!0,initialScale:.2,in:d,reverse:!0,delay:g,children:(0,v.jsx)(s.xu,{width:"100%",height:"fit-content",paddingTop:100,borderRadius:"3xl",children:(0,v.jsxs)(s.Kq,{direction:"column",width:"100%",height:"fit-content",justifyContent:"flex-end",children:[(0,v.jsx)(s.M5,{animation:"vertical"===p?C:S,children:"vertical"===p?(0,v.jsx)(B.Z,{sx:{color:"white !important",fontSize:f,filter:"drop-shadow(0 0 20px black);"}}):(0,v.jsx)(Y.Z,{sx:{color:"white !important",fontSize:f,filter:"drop-shadow(0 0 20px black);"}})}),(0,v.jsx)(s.M5,{children:(0,v.jsx)(s.xv,{textShadow:"dark-lg",fontSize:w+"px",fontWeight:"semibold",sx:{color:"white !important",textShadow:"0px 0px 20px black !important;"},children:"56374132799"==x?"Arraste para cima":"swipe for more"})})]})})})};var G=function(t){const[e,n]=(0,h.j1)("isFirstIndicatorRenderDone"),[i]=(0,h.j1)("indicatorRenderSeconds"),o=i,l=t.swipeUp;return(0,r.useEffect)((()=>{const t=setTimeout((()=>{n(!0)}),3e3+1e3*o);return()=>{clearTimeout(t)}}),[]),e?null:(0,v.jsx)(X,{showForSeconds:.8*o,delayInSeconds:3,swipeUp:l})},J=n(5180),$=n(9316),Q=n(5254);const tt="15px";var et=n(7376),nt=n(778),it=n(9852);var ot=function(t){const[e]=(0,h.j1)("isInDesignMode"),[n]=(0,h.j1)("isDemoBrand"),[i]=(0,h.j1)("whatmoreSecondaryColor"),[o]=(0,h.j1)("whatmorePrimaryFont"),[l]=(0,h.j1)("whatmoreShopId"),[a,p,x,m]=(0,u.Z)(),[g,f]=(0,r.useState)(!1),w=t.product,j=t.event,{whatmoreWidgetSourceDetails:C}=(0,r.useContext)(it.I),y=.1*x,S=.95*m,b=.05*m;return(0,v.jsx)(s.Kq,{direction:"row",height:y,justifyContent:"center",aligntItems:"center",alignContent:"center",bgGradient:"linear(to-b, transparent, blackAlpha.400, blackAlpha.600)",children:(0,v.jsx)(s.Kq,{direction:"column",width:"fit-content",height:y,justifyContent:"center",aligntItems:"center",alignContent:"center",children:(0,v.jsx)(s.xu,{width:S+"px",height:"fit-content",padding:"6px",marginTop:tt,backgroundColor:i,borderRadius:"5px",animation:g?$.mT:null,onAnimationEnd:()=>{f(!1)},marginBottom:(0,c.pq5)(l),onClick:()=>{f(!0),function(t,i){e||n||(async()=>{(0,d.wz)(t,i),(0,et.GF)({userInteractionType:nt.K.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:C,event:t,productList:[i],ctaList:t.cta})})()}(j,w),window.location.href=function(t){return(0,c.lj5)(l)?t.product_link+"?"+(0,c.awP)(l)+"&"+(0,c.n9s)(l)+"&"+(0,c.vaK)(l):t.product_link}(w)},_hover:{backgroundColor:(0,Q.lA)(i,8)},cursor:"pointer",children:(0,v.jsx)(s.M5,{children:(0,v.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*b+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:o+" !important",color:"white !important"},children:"Shop Now"})})})})})},rt=n(7009),lt=n(5945),at=n(5456),dt=n(6984),st=n(6227),ct=n(7329);n(9111);function ht(t){var e;const[n]=(0,h.j1)("whatmoreSecondaryColor"),[i]=(0,h.j1)("whatmorePrimaryFont"),[o]=(0,h.j1)("whatmoreShopId"),[l,a]=(0,r.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),u=t.onClick,p=t.width,x=t.height,m=t.title,g=t.showInProgressIcon;return(0,v.jsxs)(s.xu,{display:"flex",width:p,height:x,padding:"2x",boxShadow:"lg",animation:l?$.mT:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:["awaitingVariantSelection"==t.cartState&&(0,v.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",backgroundColor:"white",onClick:e=>{e.stopPropagation(),t.updateCartState("init"),a(!0)},children:(0,v.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:"#343434 !important"},children:["\xa0","Cancel","\xa0"]})}),(0,v.jsxs)(s.Kq,{direction:"row",backgroundColor:g?(0,Q.lA)(n,8):n,width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",onClick:t=>{t.stopPropagation(),u(),a(!0)},children:[(0,v.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:(0,c.KCy)(o)+" !important"},children:["\xa0",m,"\xa0"]}),g?(0,v.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,v.jsx)(ct.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*d+"px"}})}):(0,v.jsx)(v.Fragment,{})]})]})}function ut(t){var e;const[n]=(0,h.j1)("whatmoreSecondaryColor"),[i]=(0,h.j1)("whatmorePrimaryFont"),[o]=(0,h.j1)("whatmoreShopId"),[l,a]=(0,r.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),u=t.onClick,p=t.width,x=t.height;return(0,v.jsx)(s.xu,{width:p,height:x,padding:"2x",boxShadow:"lg",backgroundColor:"56374132799"==o?"#F004B5":n,onClick:t=>{t.stopPropagation(),u(),a(!0)},animation:l?$.mT:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:(0,v.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",children:(0,v.jsx)(s.M5,{children:(0,v.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:(0,c.KCy)(o)+" !important"},children:["\xa0",(0,c.tan)(o),"\xa0"]})})})})}function pt(t){var e;const[n]=(0,h.j1)("whatmorePrimaryFont"),[i]=(0,h.j1)("whatmoreShopId"),o=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),r=t.width,l=t.height;return(0,v.jsx)(s.xu,{width:r,height:l,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:"gray",borderWidth:"1px",onClick:t=>{t.stopPropagation()},children:(0,v.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:(0,v.jsxs)(s.xv,{color:"gray",lineHeight:"100%",fontSize:1.3*o+"px !important",fontWeight:"semibold !important",sx:{fontFamily:n+" !important",color:"gray !important"},children:["\xa0"," Sold Out ","\xa0"]})})})}function xt(t){var e;const[n]=(0,h.j1)("whatmoreSecondaryColor"),[i]=(0,h.j1)("whatmorePrimaryFont"),[o]=(0,h.j1)("whatmoreShopId"),r=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),l=t.onClick,a=t.cartCount,d=t.width,c=t.height,u=t.onCartIconClick;return(0,v.jsx)(s.xu,{width:d,height:c,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:n,borderWidth:"1px",onClick:t=>{t.stopPropagation()},cursor:"pointer",children:(0,v.jsxs)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:[(0,v.jsx)(s.M5,{paddingX:"5px",onClick:()=>{u()},children:(0,v.jsx)(st.Z,{sx:{color:n,fontSize:1.6*r}})}),(0,v.jsx)(s.xv,{color:n,fontSize:1.3*r+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important"},children:a}),(0,v.jsx)(s.M5,{paddingX:"5px",onClick:t=>{t.stopPropagation(),l()},children:(0,v.jsx)(dt.Z,{sx:{color:n,fontSize:1.6*r}})})]})})}var vt=function(t){var e,n,i,o;const[r]=(0,h.j1)("whatmoreShopId"),l=t.event,a=t.product,d=null!==(e=t.baseFontSize)&&void 0!==e?e:10,s=null===(n=t.showAddedToCart)||void 0===n||n,c=t.cartState,u=t.cartCount,p=t.onClickAtc,x=t.onCartIconClick;function m(){p()}const g=null!==(i=t.width)&&void 0!==i?i:"100%",f=null!==(o=t.height)&&void 0!==o?o:"100%";return"errored"==c?(0,v.jsx)(U.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:f,width:g},children:(0,v.jsx)(pt,{event:l,product:a,baseFontSize:d,width:g,height:f})}):"init"==c?0==u?(0,v.jsx)(ut,{onClick:m,event:l,product:a,baseFontSize:d,width:g,height:f}):s?(0,v.jsx)(U.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:f,width:g},children:(0,v.jsx)(xt,{onClick:m,event:l,product:a,baseFontSize:d,cartCount:u,width:g,height:f,onCartIconClick:x})}):(0,v.jsx)(ut,{onClick:m,event:l,product:a,baseFontSize:d,width:g,height:f}):(0,v.jsx)(ht,{onClick:m,cartState:c,updateCartState:t.updateCartState,event:l,product:a,baseFontSize:d,width:g,height:f,title:"awaitingVariantSelection"==c?"Done":"",showInProgressIcon:"atcApiCallInProgress"==c||"productVariantDetailsApiCallInProgress"==c})},mt=n(6967),gt=n(1245),ft=n(4844);const wt=(0,h.MO)("isInDesignMode"),jt=(0,h.MO)("isDemoBrand");async function Ct(t,e,n,i,o,r,l){return"shopify"==n?(0,ft.wW)(t,e,i,l):(wt||jt||(async()=>{(0,mt.FF)(o,r)})(),(0,gt.jg)(t,e,i))}function yt(t,e){return"shopify"==t?(0,ft.JL)(e):(0,gt.TE)(e)}var St=function(t,e,n){const[i]=(0,h.j1)("whatmoreShopId"),[o]=(0,h.j1)("isInDesignMode"),[l]=(0,h.j1)("isDemoBrand"),[a,s]=(0,r.useState)(null),u=(0,r.useRef)(null),{closeClickComponent:x}=(0,r.useContext)(yn),[v,m]=(0,r.useState)({state:"init",cart_count:t});function g(t,e){m({state:t,cart_count:null!==e&&void 0!==e?e:v.cart_count}),"init"!=t&&"errored"!=t?(0,h.bU)("whatmoreAllowAutoSlide",!1):(0,h.bU)("whatmoreAllowAutoSlide",!0)}function f(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}function w(t,r){const a=function(t){const e=u.current.filter((e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]));return 0==e.length?null:e[0].id}(t);if(!a)return void g("init",v.cart_count);g("atcApiCallInProgress",null);Ct(a,1,(0,c.Ipo)(i),i,n,e,r).then((t=>{if(!t.ok)throw new Error(t.status);return t.json()})).then((t=>(function(t,e,n){o||l||(async()=>{(0,d.JX)(t,e,n)})()}(n,e,1),g("init",v.cart_count+1),(0,h.bU)("whatmoreAddedToCart",!0),t))).catch((t=>{g("errored",null),console.error("Error while adding to cart:",t)}))}return[v,g,a,function(){g("productVariantDetailsApiCallInProgress",null),(0,p.p)(e,(0,c.Ipo)(i),i).then((t=>{u.current=t.variants;const e=function(t){var e=[],n=[],i=[];return t.variants.forEach((o=>{var r,l,a;o.option1&&e.push({option:o.option1,available:null===(r=o.available)||void 0===r||r,type:t.options[0].name}),o.option2&&n.push({option:o.option2,available:null===(l=o.available)||void 0===l||l,type:t.options[1].name}),o.option3&&i.push({option:o.option3,available:null===(a=o.available)||void 0===a||a,type:t.options[2].name})})),e=e.reduce(((t,e,n)=>{var i=t.filter((t=>t.option==e.option));return 0==i.length?[...t,e]:(i[0].available=i[0].available|e.available,t)}),[]),n=n.reduce(((t,e,n)=>{var i=t.filter((t=>t.option==e.option));return 0==i.length?[...t,e]:(i[0].available=i[0].available|e.available,t)}),[]),i=i.reduce(((t,e,n)=>{var i=t.filter((t=>t.option==e.option));return 0==i.length?[...t,e]:(i[0].available=i[0].available|e.available,t)}),[]),[e,n,i]}(t);s(e),!function(t){return t[0].length<=1&&t[1].length<=1&&t[2].length<=1}(e)?g("awaitingVariantSelection",null):!function(){if(u.current&&u.current.length>=1)return u.current.filter((t=>t.available)).length>=1;return!1}()?g("errored",null):w([f(e[0]),f(e[1]),f(e[2])])})).catch((t=>{g("errored",null)}))},w,function(t){var e,n;const i=u.current.filter((e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]));return 0==i.length?null:{price:(null!==(e=i[0].price)&&void 0!==e?e:0)/100,compare_price:(null!==(n=i[0].compare_at_price)&&void 0!==n?n:0)/100}},function(){"do_nothing"!==(0,c.v9M)(i)&&("go_to_cart_page"!==(0,c.v9M)(i)?"open_cart_slider"!==(0,c.v9M)(i)||null!==x&&x():yt((0,c.Ipo)(i),i))}]};var bt=function(t){var e,n,i,o;const l=t.productVariantOptions,a=null!==(e=t.width)&&void 0!==e?e:"100%",d=null!==(n=t.height)&&void 0!==n?n:"fit-content",u=null!==(i=t.baseFontSize)&&void 0!==i?i:10,p=t.onOptionSelected,x=null!==(o=t.optionTitleColor)&&void 0!==o?o:"black",[m]=(0,h.j1)("whatmoreSecondaryColor"),[f]=(0,h.j1)("whatmorePrimaryFont"),[w]=(0,h.j1)("whatmoreShopId");function j(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}const[C,y]=(0,r.useState)([j(l[0]),j(l[1]),j(l[2])]);return(0,r.useEffect)((()=>{p(C)}),[C]),(0,v.jsx)(s.Kq,{direction:"column",width:a,height:d,justifyContent:"flex-start",alignItems:"center",spacing:"5px",children:l.map(((e,n)=>{if(0!=e.length)return(0,v.jsxs)(s.Kq,{width:"100%",direction:"column",alignItems:"center",justifyContent:"flex-start",children:[(0,v.jsx)(s.M5,{width:"100%",children:(0,v.jsx)(s.iz,{color:"blackAlpha.500",size:"1px",width:"20%"})}),(0,v.jsxs)(s.xv,{as:"b",fontSize:1.2*u+"px",sx:{color:x+" !important",fontFamily:f+" !important"},align:"center",children:["\xa0",e[0].type,"\xa0"]}),(0,v.jsx)(s.kC,{gap:"6px",wrap:"wrap",justify:"center",children:e.map(((e,i)=>{var o,r,l,a,d;return(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(s.xu,{borderRadius:"Colour"===e.type||"Color"===e.type?"50%":"2px",onClick:t=>{t.stopPropagation(),e.available&&y([0==n?e.option:C[0],1==n?e.option:C[1],2==n?e.option:C[2]])},backgroundColor:e.option==C[n]?m:"white",cursor:"pointer",children:"Colour"!==(null===e||void 0===e?void 0:e.type)&&"Color"!==(null===e||void 0===e?void 0:e.type)&&"COLOR"!==(null===e||void 0===e?void 0:e.type)||!((null===t||void 0===t||null===(o=t.finalArr)||void 0===o?void 0:o.length)>0)||null!==t&&void 0!==t&&null!==(r=t.finalArr)&&void 0!==r&&r.includes(null)?(0,v.jsxs)(s.xv,{as:e.available?"samp":"s",fontSize:u+"px",sx:{color:(e.available?e.option==C[n]?"white":"black":"gray")+" !important",fontFamily:f+" !important"},align:"center",paddingX:(d=e.option,d.length>=3?"0px":.5*u+"px"),children:["\xa0",e.option,"\xa0"]}):(0,v.jsx)(g.Ee,{padding:"2px",borderRadius:(0,c.lmH)(w),width:"58px",height:"58px",style:{cursor:null!==e&&void 0!==e&&e.available?"pointer":"not-allowed",opacity:null!==e&&void 0!==e&&e.available?1:.5,filter:null!==e&&void 0!==e&&e.available?"none":"grayscale(100%)"},src:null===t||void 0===t||null===(l=t.finalArr)||void 0===l||null===(a=l.find((t=>(null===t||void 0===t?void 0:t.color)==(null===e||void 0===e?void 0:e.option))))||void 0===a?void 0:a.src})})})}))},n)]},n)}))})},kt=n(9219),It=n(9363),_t=n(6524);var Ft=function(t){var e,n;const[i]=(0,h.j1)("isInDesignMode"),[o]=(0,h.j1)("isDemoBrand"),[l]=(0,h.j1)("whatmoreSecondaryColor"),a=(0,h.MO)("whatmoreSecondaryColorShade900"),[x]=(0,h.j1)("whatmorePrimaryFont"),[m]=(0,h.j1)("whatmoreShopId"),[f,w,j,C]=(0,u.Z)(),[y,S]=(0,r.useState)(!1),[b,k]=(0,r.useState)(t.product),{whatmoreUITheme:I}=(0,r.useContext)(it.I),{whatmoreWidgetSourceDetails:_}=(0,r.useContext)(it.I),[F,T,E,P,O,L,z]=St(0,b,t.event),[R,M]=(0,r.useState)(null),[D,K]=(0,r.useState)(parseFloat(b.price)),[A,W]=(0,r.useState)(parseFloat(b.compare_price)),[N,q]=(0,r.useState)(b.currency),[H,Z]=(0,r.useState)(null),V=t.event,B=t.productClickHandler,{whatmoreIsPreviewMode:Y}=(0,r.useContext)(it.I),[X,G]=(0,r.useState)(null);(0,r.useEffect)((()=>{(0,c.N8M)(m)&&(0,kt.Rb)(b,(0,c.Ipo)(m),m).then((t=>{k(t),K(parseFloat(t.price)),W(parseFloat(t.compare_price)),q(t.currency)}));(async()=>{const t=await(0,p.p)(b,(0,c.Ipo)(m),m);Z(t)})()}),[]),(0,r.useEffect)((()=>{var t,e;const n=null!==H?null===H||void 0===H||null===(t=H.options)||void 0===t?void 0:t.findIndex((t=>"Color"==(null===t||void 0===t?void 0:t.name)||"Colour"==(null===t||void 0===t?void 0:t.name)||"COLOR"==(null===t||void 0===t?void 0:t.name))):-1,i=-1!==n?null===H||void 0===H||null===(e=H.variants)||void 0===e?void 0:e.map((t=>{var e,i;const o=null===t||void 0===t?void 0:t["option".concat(n+1)];return null!==t&&void 0!==t&&null!==(e=t.featured_image)&&void 0!==e&&e.src?{color:o,src:null===t||void 0===t||null===(i=t.featured_image)||void 0===i?void 0:i.src}:null})):[];G({position:n,finalArr:i})}),[H]);var J=.68*C,ot=.55*J,dt=.4*J,st=J*(.55-.4),ct=J+"px",ht=dt+"px",ut=st+"px",pt=.12*dt;const xt=(0,c.ITD)(m),mt=_.landingLocationType,gt=_.templateType,ft=(0,_t.NY)(mt)+(0,_t.dS)(gt)+"_"+(null===V||void 0===V?void 0:V.event_id);return(0,v.jsxs)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:tt,marginBottom:(0,c.pq5)(m),width:ct,height:"fit-content",boxShadow:"round"==I?"dark-lg":null,onClick:()=>{!function(t,e){i||o||(async()=>{(0,d.wz)(t,e)})(),B(e),S(!0)}(V,b)},backgroundColor:(0,Q.lA)("#ffffff",(0,c.U5_)(m)),animation:y?$.mT:null,borderRadius:"round"==I?"xl":null,overflow:"hidden",onAnimationEnd:()=>{S(!1)},spacing:0,sx:{borderWidth:(0,c.alU)(m),borderColor:(0,c.qPe)(m)},children:[(0,v.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,v.jsx)(s.xu,{height:ht,width:ht,bgColor:a,children:(0,v.jsx)(g.Ee,{width:ht,height:ht,src:(0,It.s)(null!==(e=null===X||void 0===X||null===(n=X.finalArr.find((t=>(null===t||void 0===t?void 0:t.color)==(null===R||void 0===R?void 0:R[null===X||void 0===X?void 0:X.position]))))||void 0===n?void 0:n.src)&&void 0!==e?e:b.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,c.yOX)(m)+" !important"}})}),(0,v.jsxs)(s.xu,{height:ht,width:J-dt+"px",children:[(0,v.jsxs)(s.Kq,{direction:"column",justifyContent:(0,c.Fr)(m)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"4px",paddingY:"10px",children:[(0,v.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",1.1*pt+"px","important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",x,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"),t.style.setProperty("padding","0","important"),t.style.setProperty("margin-bottom","4px","important"),t.style.setProperty("font-weight","normal","important"))},children:(0,lt.s)(null==b.title?"":b.title.toString())}),(0,c.QaY)(m)?(0,v.jsxs)(s.Kq,{direction:(0,c.$zZ)(m)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",borderRadius:"round"==I?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"4px",sx:{margin:"0px !important",marginBottom:"4px !important"},children:[(0,v.jsxs)(s.xv,{noOfLines:1,fontSize:.9*pt*(0,c.Rqt)(m)+"px !important",fontWeight:"semibold !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:x+" !important",color:(0,c.Uyp)(m)+" !important",padding:"0px !important",letterSpacing:"normal !important",margin:"0px !important"},children:["\xa0"," "+(0,kt.jx)(D,"",m,N)," \xa0"]}),(0,at.B)(D,A)?(0,v.jsxs)(s.xv,{noOfLines:1,fontSize:.9*pt*(0,c.Rqt)(m)+"px !important",fontWeight:"medium !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:x+" !important",color:(0,c.kPs)(m)+" !important",margin:"0px !important",letterSpacing:"normal !important",textDecoration:"line-through !important"},children:[" ",(0,kt.jx)(A,"",m,N)]}):(0,v.jsx)(v.Fragment,{})]}):(0,v.jsx)(v.Fragment,{}),(0,v.jsx)(s.xv,{fontSize:.82*pt*(0,c.Rqt)(m)+"px",fontWeight:"medium",lineHeight:"110%",sx:{margin:"0px !important",fontFamily:x+" !important",color:(0,c.eod)(m)+" !important"},children:Y?(0,c.qde)(m):(0,c.aTS)(m)})]}),(0,c.Fr)(m)?(0,v.jsx)(s.Kq,{className:"whatmore-ios-css-relative-fix",style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:"flex-start",height:"100%",width:"100%",children:(0,v.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,v.jsx)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:a,sx:{borderRadius:"round"==I?"5px":"0px",padding:"2px"},spacing:"0px",children:(0,v.jsx)(rt.Z,{sx:{color:l,fontSize:1.3*pt+"px"}})}),(0,v.jsx)(s.xu,{width:"2px"})]})}):(0,v.jsx)(v.Fragment,{})]})]}),(0,v.jsx)(U.Rg,{unmountOnExit:!0,initialScale:.5,in:"awaitingVariantSelection"==F.state,style:{height:"fit-content",width:"100%"},children:"awaitingVariantSelection"==F.state&&null!=E?(0,v.jsx)(s.xu,{width:"100%",height:"fit-content",marginTop:.1*ot+"px",marginBottom:.1*ot+"px",overflowY:"auto",overflowX:"hidden",maxHeight:ot*xt+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,v.jsx)(bt,{width:ct,height:"fit-conten",event:V,product:b,finalArr:null===X||void 0===X?void 0:X.finalArr,productVariantOptions:E,baseFontSize:1.2*pt,onOptionSelected:t=>{!function(t){M(t);const e=L(t);e&&(K(e.price),W(e.compare_price))}(t)}})}):(0,v.jsx)(v.Fragment,{})}),(0,v.jsx)(s.Kq,{direction:"row",width:"100%",height:ut,justifyContent:"center",alignItems:"center",children:(0,v.jsx)(vt,{baseFontSize:.3*st,event:V,product:b,cartState:F.state,cartCount:F.cart_count,updateCartState:T,onClickAtc:t=>{"init"==F.state?(P(),(0,et.GF)({userInteractionType:nt.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:_,event:V,productList:[b],ctaList:V.cta})):"awaitingVariantSelection"==F.state&&O(R,ft),(0,c.IKD)(m)&&setTimeout((()=>function(){const t=window.location.origin+"/cart";window.location.href=t}()),500)},onCartIconClick:()=>{z()}})})]})},Tt=n(3867);var Et=function(t){var e,n,i;const[o]=(0,h.j1)("isInDesignMode"),[r]=(0,h.j1)("isDemoBrand"),[l]=(0,h.j1)("whatmoreSecondaryColor"),[a]=(0,h.j1)("whatmorePrimaryFont"),c=t.event,u=t.product,p=null!==(e=t.baseFontSize)&&void 0!==e?e:10,x=null!==(n=t.width)&&void 0!==n?n:"fit-content",m=null!==(i=t.height)&&void 0!==i?i:"fit-content";return(0,v.jsx)(s.rU,{href:u.product_link,color:l,onClick:()=>{!function(t,e){o||r||(async()=>{(0,d.$L)(t,e)})()}(c,u)},children:(0,v.jsx)(s.xu,{width:x,height:m,padding:"2x",boxShadow:"lg",borderRadius:"md",backgroundColor:"white",children:(0,v.jsxs)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",spacing:"5px",children:[(0,v.jsx)(s.M5,{children:(0,v.jsx)(s.xv,{lineHeight:"100%",fontSize:1.4*p,fontWeight:"semibold",sx:{fontFamily:a+" !important",color:l+" !important"},children:" VIEW MORE "})}),(0,v.jsx)(s.M5,{children:(0,v.jsx)(rt.Z,{sx:{color:l,fontSize:1.4*p}})})]})})})},Pt=n(6163);function Ot(t){var e;const[n]=(0,h.j1)("whatmoreSecondaryColor"),[i]=(0,h.j1)("whatmorePrimaryFont"),[o]=(0,h.j1)("whatmoreShopId"),[l,a]=(0,r.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),u=t.onClick,p=t.width,x=t.height,m=t.title;return(0,v.jsx)(s.xu,{width:p,height:x,padding:"2x",boxShadow:"lg",backgroundColor:n,onClick:t=>{t.stopPropagation(),u(),a(!0)},animation:l?$.mT:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:(0,v.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",children:(0,v.jsxs)(s.xv,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},lineHeight:"100%",fontSize:1.4*d+"px",fontWeight:"semibold",sx:{fontFamily:i+" !important",color:(0,c.KCy)(o)+" !important"},children:["\xa0",m,"\xa0"]})})})}var Lt=function(t){var e,n,i;const[o]=(0,h.j1)("whatmoreShopId"),r=t.event,l=t.product,a=null!==(e=t.baseFontSize)&&void 0!==e?e:10,d=t.onShopNowClick,s=null!==(n=t.width)&&void 0!==n?n:"100%",c=null!==(i=t.height)&&void 0!==i?i:"100%";return(0,v.jsx)(Ot,{onClick:function(){d()},event:r,product:l,baseFontSize:a,width:s,height:c,title:"50529403072"==o?"BUY IT NOW":"SHOP NOW"})};var zt=function(t){var e;const[n]=(0,h.j1)("isInDesignMode"),[i]=(0,h.j1)("isDemoBrand"),[o]=(0,h.j1)("whatmorePrimaryFont"),[l]=(0,h.j1)("whatmoreShopId"),[a,p,x,m]=(0,u.Z)(),[f,w]=(0,r.useState)(!1),[j,C]=(0,r.useState)(t.product),{whatmoreWidgetSourceDetails:y}=(0,r.useContext)(it.I),[S,b,k,I,_,F,T]=St(0,j,t.event),[E,P]=(0,r.useState)(null),[O,L]=(0,r.useState)(parseFloat(j.price)),[z,R]=(0,r.useState)(parseFloat(j.compare_price)),[M,D]=(0,r.useState)(j.currency),K=t.event,A=t.productClickHandler,W=null!==(e=t.tileWidthFactor)&&void 0!==e?e:1;(0,r.useEffect)((()=>{(0,c.N8M)(l)&&(0,kt.Rb)(j,brandDomainContext(l),l).then((t=>{C(t),L(parseFloat(t.price)),R(parseFloat(t.compare_price)),D(t.currency)}))}),[]);var N=m*W,q=.3*N,H=N+"px",Z=.7*q,V=.9*Z,B=.12*q;const Y=(0,c.ITD)(l);function X(t,e){n||i||(async()=>{(0,d.wz)(t,e)})(),A(e),w(!0)}return(0,v.jsx)(s.Kq,{direction:"row",width:H,height:"fit-content",justifyContent:"center",children:(0,v.jsx)(s.xu,{marginTop:tt,marginBottom:(0,c.pq5)(l),width:H,onClick:t=>{},animation:f?$.mT:null,borderRadius:"lg",onAnimationEnd:()=>{w(!1)},children:(0,v.jsxs)(s.Kq,{direction:"column",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",spacing:"0px",children:[(0,v.jsxs)(s.Kq,{direction:"row",width:"100%",height:"70%",justifyContent:"space-around",alignItems:"center",borderTopRadius:"lg",overflow:"hidden",onClick:()=>{X(K,j)},children:[(0,v.jsx)(s.xu,{height:Z+"px",width:Z+"px",children:(0,v.jsx)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",children:(0,v.jsx)(s.xu,{height:V+"px",width:V+"px",borderRadius:"lg",bgColor:"gray.100",overflow:"hidden",children:(0,v.jsx)(g.Ee,{width:V+"px",height:V+"px",src:j.thumbnail_image,objectFit:"cover"})})})}),(0,v.jsx)(s.xu,{height:Z+"px",width:N-Z+"px",children:(0,v.jsxs)(s.Kq,{direction:"column",justifyContent:"space-between",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingY:"10px",spacing:"2px",children:[(0,v.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*B+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:o+" !important",color:"white !important"},children:(0,lt.s)(j.title.toString())}),(0,v.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",aligntItems:"center",marginTop:"5px",children:[(0,c.QaY)(l)?(0,v.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"flex-start",aligntItems:"center",borderRadius:"lg",backgroundColor:"blackAlpha.500",paddingX:"10px",paddingY:"5px",children:[(0,v.jsxs)(s.xv,{noOfLines:1,fontSize:1*B+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:o+" !important",color:"white !important"},children:["\xa0"," ",(0,kt.jx)(parseFloat(O),"",l,M)," \xa0"]}),(0,v.jsx)(s.M5,{children:(0,at.B)(j.price,j.compare_price)?(0,v.jsxs)(s.xv,{noOfLines:1,fontSize:.8*B+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:o+" !important",color:"#F9F6EE !important",textDecoration:"line-through !important"},children:[" ",(0,kt.jx)(parseFloat(z),"",l,M)]}):(0,v.jsx)(v.Fragment,{})})]}):(0,v.jsx)(v.Fragment,{}),(0,v.jsx)(s.M5,{children:(0,v.jsx)(Tt.Z,{storeId:l,productId:j.client_product_id,productLink:j.product_link,fontSize:1*B,fontColor:"white"})})]})]})})]}),(0,v.jsx)(U.Rg,{unmountOnExit:!0,initialScale:.5,in:"awaitingVariantSelection"==S.state,style:{height:"fit-content",width:"100%"},children:"awaitingVariantSelection"==S.state&&null!=k?(0,v.jsx)(s.xu,{width:"100%",height:"fit-content",marginTop:.1*q+"px",marginBottom:.1*q+"px",overflowY:"auto",overflowX:"hidden",maxHeight:q*Y+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,v.jsx)(bt,{width:H,height:"fit-content",event:K,product:j,productVariantOptions:k,baseFontSize:1*B,onOptionSelected:t=>{!function(t){P(t);const e=F(t);e&&(L(e.price),R(e.compare_price))}(t)},optionTitleColor:"white"})}):(0,v.jsx)(v.Fragment,{})}),(0,v.jsxs)(s.Kq,{direction:"row",width:"100%",height:"30%",justifyContent:"center",alignItems:"center",paddingBottom:"2px",paddingLeft:"2px",paddingRight:"2px",children:[(0,v.jsx)(s.xu,{width:"100%",height:"100%",children:(0,v.jsx)(Et,{baseFontSize:.8*B,event:K,product:j,width:"100%",height:"100%"})}),(0,v.jsx)(s.xu,{width:"100%",height:"100%",borderRadius:"md",overflow:"hidden",children:(0,c.Ib9)(l)?(0,v.jsx)(Lt,{baseFontSize:.8*B,event:K,product:j,borderRadius:"md",onShopNowClick:t=>{X(K,j)}}):(0,v.jsx)(v.Fragment,{children:"form"===(0,c._5p)(l)?(0,v.jsx)(Pt.default,{baseFontSize:.8*B,event:K,product:j,width:"100%",height:"100%",showAddedToCart:!0}):(0,v.jsx)(vt,{baseFontSize:.8*B,event:K,product:j,cartState:S.state,cartCount:S.cart_count,borderRadius:"md",onClickAtc:t=>{"init"==S.state?(I(),(0,et.GF)({userInteractionType:nt.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:y,event:K,productList:[j],ctaList:K.cta})):"awaitingVariantSelection"==S.state&&_(E)},onCartIconClick:()=>{T()}})})})]})]})})})};var Rt=function(t){const[e]=(0,h.j1)("isInDesignMode"),[n]=(0,h.j1)("isDemoBrand"),[i]=(0,h.j1)("whatmoreSecondaryColor"),o=(0,h.MO)("whatmoreSecondaryColorShade900"),[l]=(0,h.j1)("whatmorePrimaryFont"),[a]=(0,h.j1)("whatmoreShopId"),[p,x,m,f]=(0,u.Z)(),[w,j]=(0,r.useState)(!1),[C,y]=(0,r.useState)(t.product),{whatmoreUITheme:S}=(0,r.useContext)(it.I),[b,k]=(0,r.useState)(!(0,c.N8M)(a)),[I,_]=(0,r.useState)(parseFloat(C.price)),[F,T]=(0,r.useState)(parseFloat(C.compare_price)),[E,P]=(0,r.useState)(C.currency),O=t.event;t.productClickHandler,(0,r.useEffect)((()=>{(0,c.N8M)(a)&&(0,kt.Rb)(C,(0,c.Ipo)(a),a).then((t=>{y(t),_(parseFloat(t.price)),T(parseFloat(t.compare_price)),P(t.currency),k(!0)}))}),[]);var L=.68*f,z=.4*L,R=L+"px",M=z+"px",D=L*(.55-.4)+"px",K=.12*z;(0,c.ITD)(a);const{whatmoreWidgetSourceDetails:A}=(0,r.useContext)(it.I);function W(t){return(0,c.lj5)(a)?t.product_link+"?"+(0,c.awP)(a)+"&"+(0,c.n9s)(a)+"&"+(0,c.vaK)(a):t.product_link}function N(t,i){e||n||(async()=>{(0,d.wz)(t,i),(0,et.GF)({userInteractionType:nt.K.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:A,event:t,productList:[i],ctaList:t.cta})})(),j(!0)}return(0,v.jsxs)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:tt,marginBottom:(0,c.pq5)(a),width:R,height:"fit-content",boxShadow:"round"==S?"dark-lg":null,onClick:()=>{N(O,C),window.location.href=W(C)},backgroundColor:(0,Q.lA)("#ffffff",(0,c.U5_)(a)),animation:w?$.mT:null,borderRadius:"round"==S?"xl":null,overflow:"hidden",onAnimationEnd:()=>{j(!1)},spacing:0,sx:{borderWidth:(0,c.alU)(a),borderColor:(0,c.qPe)(a)},children:[(0,v.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,v.jsx)(s.xu,{height:M,width:M,bgColor:o,children:(0,v.jsx)(g.Ee,{width:M,height:M,src:(0,It.s)(C.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,c.yOX)(a)+" !important"}})}),(0,v.jsxs)(s.xu,{height:M,width:L-z+"px",children:[(0,v.jsxs)(s.Kq,{direction:"column",justifyContent:(0,c.Fr)(a)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingTop:"10px",paddingBottom:"16px",children:[(0,v.jsx)(s.xv,{as:"p",ref:t=>{t&&(t.style.setProperty("min-height","0","important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("-webkit-box-orient","vertical","important"))},sx:{paddingLeft:"8px",fontFamily:l+" !important",color:"black !important",lineHeight:"120% !important",fontWeight:"medium !important",fontSize:1.1*K+"px !important"},children:(0,lt.s)(null==C.title?"":C.title.toString())}),(0,c.QaY)(a)?(0,v.jsxs)(s.Kq,{direction:(0,c.$zZ)(a)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",marginTop:"5px",borderRadius:"round"==S?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"5px",children:[b&&(0,v.jsxs)(s.xv,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},noOfLines:1,fontSize:.9*K+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:l+" !important",color:(0,c.Uyp)(a)+" !important",margin:"0px !important"},children:[" "+(0,kt.jx)(I,"",a,E)," \xa0"]}),(0,at.B)(I,F)&&b?(0,v.jsxs)(s.xv,{as:"s",style:{minHeight:0,textDecoration:"line-through"},noOfLines:1,fontSize:.9*K+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:l+" !important",color:(0,c.kPs)(a)+" !important",margin:"0px !important"},children:[" ",(0,kt.jx)(F,"",a,E)]}):(0,v.jsx)(v.Fragment,{})]}):(0,v.jsx)(v.Fragment,{}),""!=(0,c.sG7)(a)&&(0,v.jsxs)(s.xv,{noOfLines:1,fontSize:.9*K+"px",lineHeight:"100%",paddingTop:"6px",sx:{fontFamily:(0,c.V3Y)(a)+" !important",color:(0,c.aUT)(a)+" !important",margin:"0px !important"},children:["\xa0",(0,c.sG7)(a)," \xa0"]})]}),(0,c.Fr)(a)?(0,v.jsx)(s.Kq,{className:"whatmore-ios-css-relative-fix",style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:"flex-start",height:"100%",width:"100%",children:(0,v.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,v.jsx)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:o,sx:{borderRadius:"round"==S?"5px":"0px",padding:"2px"},spacing:"0px",children:(0,v.jsx)(rt.Z,{sx:{color:i,fontSize:1.3*K+"px"}})}),(0,v.jsx)(s.xu,{width:"2px"})]})}):(0,v.jsx)(v.Fragment,{})]})]}),(0,c.pp3)(a)&&(0,v.jsx)(s.Kq,{direction:"row",width:"100%",height:D,justifyContent:"center",alignItems:"center",children:(0,v.jsx)(Lt,{baseFontSize:.8*K,event:O,product:C,borderRadius:"md",onShopNowClick:t=>{N(O,C),window.location.href=W(C)}})})]})};var Mt=function(t){const[e]=(0,h.j1)("whatmoreShopId"),n=(0,c.eyg)(e),i=t.event,o=t.product;return"broad-tile"==n?(0,v.jsx)(Ft,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"broad-tile-no-cta"==n?(0,v.jsx)(Rt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"link_only"==n?(0,v.jsx)(ot,{product:t.product,event:t.event}):"narrow-tile"==n?(0,v.jsx)(zt,{event:i,product:o,productClickHandler:t.productClickHandler,tileWidthFactor:i.products.length>1?.68:void 0}):(0,v.jsx)(Ft,{product:t.product,event:t.event,productClickHandler:t.productClickHandler})},Dt=n(6119),Kt=n(3388),At=n(7643);var Wt=function(t){const[e,n,i,o]=(0,u.Z)(),[r]=(0,h.j1)("whatmoreShopId"),d=(0,h.MO)("isInDesignMode"),p=(0,h.MO)("isDemoBrand"),x=t.event,m=t.productClickHandler,g=(0,c.eyg)(r);if(!(0,Kt.kT)(x))return(0,v.jsx)(v.Fragment,{});if(1==x.products.length&&(void 0==x.cta||0==x.cta.length)){const t=x.products[0];return(0,c.rnv)(r)?(0,v.jsx)(s.Kq,{direction:"horizontal",width:o,height:"fit-content",justifyContent:"center",backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))",children:(0,v.jsx)(At.u,{userInteractionType:nt.K.PRODUCT_CTA_VIEW,event:x,productList:[t],triggerFlag:!d&&!p,children:(0,v.jsx)(s.M5,{children:(0,v.jsx)(zt,{event:x,product:t,productClickHandler:m},x.event_id+t.product_id)})})}):(0,v.jsx)(s.Kq,{direction:"horizontal",width:o,height:"fit-content",justifyContent:"center",backgroundImage:"narrow-tile"==g?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))":null,children:(0,v.jsx)(s.M5,{children:(0,v.jsx)(At.u,{userInteractionType:nt.K.PRODUCT_CTA_VIEW,event:x,productList:[t],triggerFlag:!d&&!p,children:(0,v.jsx)(Mt,{event:x,product:t,productClickHandler:m},x.event_id+t.product_id)})})})}return(0,v.jsx)(s.M5,{children:(0,v.jsx)("div",{onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,v.jsx)(s.xu,{width:o+"px",backgroundImage:"narrow-tile"==g?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4), rgba(0,0,0,0.6), rgba(0,0,0,0.8))":null,children:(0,v.jsxs)(l.tq,{className:"product-tile swiper-slide",slidesPerView:1==x.products.length?1:1.4,initialSlide:x.products.length<=2||(0,c.VqZ)(r)?0:1,centeredSlides:!(0,c.VqZ)(r),modules:[a.Gk],mousewheel:{invert:!1,thresholdDelta:20},nested:!0,children:[x.products.map((t=>"oos"!=t.product_status&&(0,v.jsx)(l.o5,{children:(0,v.jsx)(At.u,{userInteractionType:nt.K.PRODUCT_CTA_VIEW,event:x,productList:[t],triggerFlag:!d&&!p,children:(0,v.jsx)(s.Kq,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",alignItems:"center",children:(0,v.jsx)(Mt,{event:x,product:t,productClickHandler:m},x.event_id+t.product_id)})})},x.event_id+t.product_id))),(0,c.pp3)(r)&&void 0!=x.cta&&x.cta.map((t=>(0,v.jsx)(l.o5,{children:(0,v.jsx)(s.Kq,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",alignItems:"center",children:(0,v.jsx)(Dt.Z,{event:x,cta:t},x.event_id+t.cta_id)})},x.event_id+t.cta_id)))]})})})})};var Nt=function(t){const[e,n]=(0,h.j1)("isProductSwiperCatalogOpen"),i=t.event,o=t.productClickHandler;return(0,r.useContext)(yn).isIOS&&e?(0,v.jsx)(Wt,{event:i,productClickHandler:o},i.event_id):(0,v.jsx)(U.MT,{unmountOnExit:!0,initialScale:.2,in:e,children:(0,v.jsx)(Wt,{event:i,productClickHandler:o},i.event_id)})};function qt(t){const e=t.event,[n,i,o,r]=(0,u.Z)(),[l]=(0,h.j1)("whatmorePrimaryFont");return(0,v.jsx)(s.xu,{width:"fit-content",height:"fit-content",padding:"5px",children:(0,v.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",children:[(0,v.jsx)(s.M5,{children:(0,v.jsx)(s.Cd,{overflow:"hidden",size:.15*r+"px",children:(0,v.jsx)(g.Ee,{width:"100%",height:"100%",src:e.thumbnail_image})})}),(0,v.jsx)(s.xu,{width:"fit-content",height:"fit-content",children:(0,v.jsxs)(s.Kq,{direction:"column",width:"fit-content",height:"fit-content",children:[(0,v.jsx)(s.xv,{color:"white",fontSize:.05*r+"px",fontWeight:"bold",fontFamily:"sans-serif",align:"left",sx:{fontFamily:l+" !important"},children:e.presenter_name.substring(0,15)}),(0,v.jsx)(N.Z,{event:e,fontSize:.03*r+"px"})]})})]})})}var Ht,Zt=function(t){const[e]=(0,h.j1)("isInDesignMode"),[n]=(0,h.j1)("isDemoBrand"),[i,o]=(0,h.j1)("isProductSwiperCatalogOpen"),[l,a]=(0,j.Z)(),[d,u]=(0,h.j1)("isFirstIndicatorRenderDone"),p=(0,r.useContext)(yn),[x]=(0,h.j1)("whatmoreShopId"),m=t.event,g=t.isLast,f=t.onCloseCallback,w=t.focusRef,C=t.productClickHandler;return(0,v.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",children:(0,v.jsxs)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,v.jsx)(s.xu,{width:"full",margin:"2px",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:(0,v.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"space-between",paddingRight:"10px",paddingLeft:"10px",children:[(0,v.jsx)(qt,{event:m}),(0,v.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,v.jsx)(k,{focusRef:w}),(0,v.jsx)(V,{event:m,onCloseCallback:f})]})]})}),(0,v.jsx)(s.xu,{width:"100%",height:"100%",onClick:()=>{a(!l)}}),(0,v.jsxs)(s.xu,{width:"full",height:"fit-content",children:[p.totalEvents>1&&!d&&p.showSwipeIndicator?(0,v.jsx)(s.xu,{width:"full",margin:"2px",children:(0,v.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,v.jsx)(G,{swipeUp:!g})})}):null,void 0!=m.products&&m.products.length>0?(0,v.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(x)?(0,v.jsx)(s.xu,{w:"100%",children:(0,v.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,v.jsx)(W,{event:m,onToggle:t=>{o("minimize-button"!==t)}})})}):(0,v.jsx)(v.Fragment,{}),(0,v.jsx)(s.xu,{display:"flex",width:"100%",height:"fit-content",children:(0,v.jsx)(Nt,{event:m,productClickHandler:C})})]}):(0,v.jsx)("div",{})]})]})})};function Vt(t){const[e,n,i,o]=(0,u.Z)(),[l]=(0,h.j1)("whatmorePrimaryFont"),[a]=(0,h.j1)("whatmoreShopId"),[d,p]=(0,r.useState)(""),x=t.data,m=(t.event,t.product,t.setShowOptionsChart);var f=.4*o*.8*.13;(0,r.useEffect)((()=>{let t="vanyaclothing.myshopify.com";"1972174947"===a&&(t="vanyaclothing.myshopify.com");const e="https://app.kiwisizing.com/api/getSizingChart?shop=".concat(t,"&product=").concat(null===x||void 0===x?void 0:x.id,"&title=").concat(null===x||void 0===x?void 0:x.title,"&tags=&cacheSettingsUpdateAt=2020-08-11T15%3A19%3A49.000Z&settingsVersion=19");fetch(e).then((t=>{if(!t.ok)throw new Error("HTTP error! Status: ".concat(t.status));return t.json()})).then((t=>{p(t.sizings[0].layout.data[0].data.url)})).catch((t=>{console.error("Error fetching data:",t)}))}),[]);const w=(0,F.F4)(Ht||(Ht=(0,I.Z)(["\n 0% {\n transform: translateY(100%);\n }\n "]))),j="".concat(w," 0.5s");return(0,v.jsx)(s.Kq,{bg:"black",height:"100%",opacity:"100%",width:"100%",borderTopRadius:"xl",animation:j,justifyContent:"center",alignItems:"center",children:(0,v.jsxs)(s.xu,{width:"100%",height:"100%",children:[(0,v.jsx)(g.Ee,{width:"100%",height:"auto",src:(0,c.Zb8)(a)?d:(0,c.KM)(a),objectFit:"contain",borderTopRadius:"xl"}),(0,v.jsx)(s.Kq,{width:"100%",height:"100%",direction:"column",justifyContent:"flex-start",style:{position:"relative",zIndex:1,bottom:"90%"},className:"whatmore-ios-css-relative-fix",children:(0,v.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",onClick:t=>{t.stopPropagation(),m(!1)},cursor:"pointer",padding:"4px",children:(0,v.jsx)(q.Z,{sx:{boxShadow:3,color:"white !important",fontSize:1.6*f,filter:"drop-shadow(0 0 5px black);"}})})})]})})}var Ut=n(9748),Bt=n(5630),Yt=(n(1332),n(6665)),Xt=n(7605);function Gt(t){var e;const[n,i]=(0,r.useState)(null),o=t.product;return(0,r.useEffect)((()=>{(0,ft.bN)(o).then((t=>{i(t.variants)}))}),[]),null==n?(0,v.jsx)(v.Fragment,{}):(0,v.jsx)("div",{style:{width:null!==(e=t.width)&&void 0!==e?e:"100%",borderRadius:"6px",height:1.5*t.height,backgroundColor:"white"},children:(0,v.jsxs)("form",{method:"post",action:"/cart/add","accept-charset":"UTF-8",class:"shopify-product-form",enctype:"multipart/form-data",is:"product-form",children:[(0,v.jsx)("input",{type:"hidden",name:"form_type",value:"product"}),(0,v.jsx)("input",{type:"hidden",name:"utf8",value:"\u2713"}),(0,v.jsx)("input",{type:"hidden",name:"id",value:t.variantId}),(0,v.jsx)("input",{type:"hidden",value:t.product.product_link,name:"productUrl"}),(0,v.jsx)("div",{class:"shiprocket-headless","data-type":"product"}),(0,v.jsx)("textarea",{"data-variant-json":"",class:"hide","aria-hidden":"true","aria-label":"Product JSON",children:JSON.stringify(n).toString()})]})})}function Jt(t){const e=(0,h.MO)("whatmoreShopId"),n=t.product;return"63748341981"==e||"55845847231"==e||"47837511839"==e?(0,v.jsx)(Gt,{product:n,variantId:t.variantId,height:t.height,width:t.width}):(0,v.jsx)(v.Fragment,{})}var $t=n(513);function Qt(t){var e,n;const[i]=(0,h.j1)("isInDesignMode"),[o]=(0,h.j1)("isDemoBrand"),[l]=(0,h.j1)("whatmoreShopId"),[a]=(0,h.j1)("whatmorePrimaryFont"),[u]=(0,h.j1)("whatmoreSecondaryColor"),{whatmoreUITheme:p}=(0,r.useContext)(it.I),{whatmoreWidgetSourceDetails:x}=(0,r.useContext)(it.I),[m,g]=(0,r.useState)(!1),{closeClickComponent:f}=(0,r.useContext)(yn),[w,j]=(0,r.useState)(!1),C=t.FONT_SIZE,y=t.data,S=t.event,b=t.selectedVariantId,k=t.product,I=t.itemQuantity,_=t.PRODUCT_TILE_WIDTH,F=t.cartItemCount,T=t.addToCartFlag,E=t.setAddToCartFlag,P=t.soldOutFlag,L=t.setSoldOutFlag,z=x.landingLocationType,R=x.templateType,M=(0,_t.NY)(z)+(0,_t.dS)(R)+(null===S||void 0===S?void 0:S.event_id);const D=async t=>{var e,n,r;if(t.stopPropagation(),g(!0),function(t,e,n){i||o||(async()=>{(0,d.JX)(t,e,n)})()}(S,k,I),(0,et.GF)({userInteractionType:nt.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:x,event:S,productList:[k],ctaList:S.cta}),void 0===b)return void console.log("ERROR ! Select the option.");const a=void 0!==b?b:null===y||void 0===y||null===(e=y.variants)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.id,s=null===(r=y.variants.filter((t=>t.id==a)))||void 0===r?void 0:r.price;Ct(a,I,(0,c.Ipo)(l),l,S,k,M).then((t=>{if(!t.ok)throw new Error(t.status);return g(!1),E(!0),t.json()})).then((t=>((0,h.bU)("whatmoreAddedToCart",!0),(0,c.kad)(l)&&(i||(async()=>{const t=await(0,ft.Mj)().then((t=>t.json())).catch((t=>{console.error("Whatmore :: Error while fetching cart_token for initiateOrderTrackingEvent.",t)}));(0,Xt.a)(l,window.location.hostname,"",S.event_id,k.product_id,a,s,I,"add-to-cart",t.token)})()),t))).then((()=>{"2665447536"==l&&A()})).catch((t=>{g(!1),L(!0),console.error("Error:",t)}))},K=t=>{var e,n;(function(t,e){i||o||(async()=>{(0,d.$L)(t,e)})()}(S,k),"buy-now"==t)&&(!function(t,e,n,i,o){"shopify"==n?(0,ft.bj)(t,e,i,o):(0,gt.rY)(t,e,i)}(void 0!==b?b:null===y||void 0===y||null===(e=y.variants)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.id,I,(0,c.Ipo)(l),l,M),(0,et.GF)({userInteractionType:nt.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:x,event:S,productList:[k],ctaList:S.cta}));"view-more"==t&&(window.location.href=k.product_link+"?"+(0,c.awP)(l)+"&"+(0,c.n9s)(l)+"&"+(0,c.vaK)(l)+((0,c.C0m)(l)?"¤cy="+k.currency:""))},A=()=>{(0,c.n2L)(l)&&(0,h.MO)("whatmoreAddedToCart")&&(0,$t.D)(l,(()=>{}),100,window.location.hostname)};return(0,v.jsxs)(s.Kq,{boxShadow:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px",position:t.position,bg:"#D3D3D3",borderRadius:"10px",bottom:"10px",left:"50%",zIndex:"1",transform:"translateX(-50%)",direction:"row",width:"95%",paddingX:"20px",paddingTop:"15px",paddingBottom:"15px",spacing:"15px",fontSize:.9*C,children:[" ",P?(0,v.jsx)(Ut.zx,{width:"90%",bg:"#252324",variant:"outline",opacity:4,_hover:{bg:"#252324"},height:2.5*C,disabled:!0,sx:{borderRadius:"round"==p?"5px":"0px",borderWidth:(0,c.alU)(l),borderColor:(0,c.qPe)(l)},children:(0,v.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:"white !important",fontFamily:a+" !important"},children:"Sold Out"})}):(0,v.jsxs)(s.Kq,{direction:"vertical"==(0,c.rc3)(l)?"column":"row",width:"100%",spacing:"15px",fontSize:.9*C,justifyContent:"center",children:[(0,c.$bv)(l)?(0,v.jsx)(Ut.zx,{width:"90%",height:2.5*C,onClick:D,sx:{paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:"#343434"===(0,c.FdS)(l)?u+" !important":(0,c.FdS)(l)+" !important",borderRadius:"round"==p?"5px":"0px",borderWidth:(0,c.p5R)(l),borderColor:"#343434"===(0,c.yxc)(l)?u:(0,c.yxc)(l),_hover:{backgroundColor:"transparent !important",borderWidth:(0,c.p5R)(l),borderColor:"#343434"===(0,c.yxc)(l)?u:(0,c.yxc)(l)}},children:m?(0,v.jsx)(Bt.$,{display:"flex !important",color:"white"}):(0,v.jsx)(s.xv,{fontWeight:"extrabold !important",sx:{color:(0,c.eSJ)(l)+" !important",fontFamily:a+" !important"},fontSize:C+"px !important",children:(0,c.tan)(l)})}):(0,v.jsx)(v.Fragment,{}),(0,c.cDD)(l)?(0,v.jsx)(v.Fragment,{children:(0,c.H$w)(l)?(0,v.jsx)(Jt,{variantId:void 0!==b?b:null===y||void 0===y||null===(e=y.variants)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.id,product:k,height:2.5*C,width:"90%",fontSize:C,fontFamily:a}):(0,v.jsx)(v.Fragment,{children:(0,c.Stj)(l)?(0,v.jsx)(Ut.zx,{width:"90%",variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*C,onClick:()=>K("view-more"),sx:{backgroundColor:"white !important",borderRadius:"round"==p?"5px":"0px",borderWidth:(0,c.alU)(l),borderColor:(0,c.qPe)(l)},children:(0,v.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:u+"!important",fontFamily:a+" !important"},fontSize:C,children:(0,c.Z59)(l)})}):(0,v.jsx)(Ut.zx,{width:"90%",variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*C,onClick:t=>{"2665447536"==l?D(t):K("buy-now")},sx:{backgroundColor:(0,c.IIW)(l)+" !important",borderRadius:"round"==p?"5px":"0px",borderWidth:(0,c.p5R)(l),borderColor:"#343434"===(0,c.yxc)(l)?u:(0,c.yxc)(l),_hover:{backgroundColor:"transparent !important"}},children:(0,v.jsx)(s.xv,{fontWeight:"extrabold !important",sx:{color:"#343434"===(0,c.iKW)(l)?u+" !important":(0,c.iKW)(l)+" !important",fontFamily:a+" !important"},fontSize:C+"px !important",children:(0,c.ZuH)(l)})})})}):(0,v.jsx)(v.Fragment,{})]}),(0,v.jsx)(v.Fragment,{children:(0,c.$bv)(l)?(0,v.jsx)(v.Fragment,{children:w?(0,v.jsx)(s.kC,{width:"10%",spacing:"0",right:0,children:(0,v.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,v.jsx)(Yt.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*C}})})}):(0,v.jsxs)(s.kC,{animation:T?O:"none",onAnimationEnd:()=>E(!1),width:"10%",spacing:"0",right:0,onClick:()=>{"do_nothing"!==(0,c.v9M)(l)&&("go_to_cart_page"!==(0,c.v9M)(l)?(j(!0),function(t){"open_cart_slider"!==(0,c.v9M)(t)||null!==f&&f()}(l)):yt((0,c.Ipo)(l),l))},cursor:"pointer",children:[(0,v.jsx)(st.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*C}}),F>0?(0,v.jsx)(s.Cd,{padding:"2px",bg:"white",size:1.1*C,top:.03*-_,verticalAlign:"top",position:"relative",left:.11*-_,zIndex:"1",children:(0,v.jsx)(s.xv,{sx:{color:"black !important",fontFamily:a+" !important"},fontWeight:"bold !important",fontSize:.7*C+"px !important",children:F})}):(0,v.jsx)(v.Fragment,{})]})}):(0,v.jsx)(v.Fragment,{})})]})}function te(t){const[e]=(0,h.j1)("whatmorePrimaryFont"),n=(0,h.MO)("whatmoreShopId"),i=t.setOpenShopNow,o=t.FONT_SIZE,r=t.setLockSwiper,l="56374132799"==n?"Produto Exclusivo":"Shop Now";return(0,v.jsxs)(s.kC,{justifyContent:"center",paddingTop:"10px",paddingBottom:"8px",width:"100%",children:[(0,v.jsx)(s.kC,{width:"10%",display:"flex !important"}),(0,v.jsx)(s.kC,{width:"90%",justifyContent:"center",children:(0,v.jsx)(s.xv,{align:"center",fontSize:1.25*o,fontWeight:"semibold",sx:{color:"black !important",fontFamily:e+" !important"},as:"b",children:l})}),(0,v.jsx)(s.kC,{justifyContent:"center",width:"10%",alignItems:"center",onClick:t=>{t.stopPropagation(),i(!1),r(!1)},cursor:"pointer",children:(0,v.jsx)(q.Z,{sx:{boxShadow:3,color:"black !important",fontSize:1.2*o,filter:"drop-shadow(0 0 5px black);"}})})]})}function ee(t){var e;const[n]=(0,h.j1)("whatmorePrimaryFont"),i=(0,h.MO)("whatmoreShopId"),o=t.FONT_SIZE,r=t.data;return(0,v.jsxs)(s.Kq,{direction:"column",paddingX:"20px",height:"fit-content",children:[(0,v.jsx)(s.Kq,{children:(0,v.jsx)(s.xv,{fontSize:o+"px !important",fontWeight:"bold !important",justifyContent:"center",sx:{color:"black !important",fontFamily:n+" !important"},children:"56374132799"==i?"Descri\xe7\xe3o":"Description"})}),(0,v.jsx)(s.Kq,{children:(0,v.jsx)(s.xu,{overflowY:"auto",scrollBehavior:"smooth",sx:{"::-webkit-scrollbar":{display:"none"}},children:(0,v.jsx)(s.xv,{fontSize:.8*o+"px !important",justifyContent:"normal",fontWeight:"normal !important",dangerouslySetInnerHTML:{__html:(l=null!==(e=null===r||void 0===r?void 0:r.description)&&void 0!==e?e:null===r||void 0===r?void 0:r.body_html,l.replace(/style="[^"]*color[^"]*"/gi,""))},sx:{fontFamily:n+" !important",lineHeight:"140% !important"}})})})]});var l}const ne=t=>{let{iconSize:e}=t;return(0,v.jsx)("div",{style:{color:"black",paddingTop:"2px"},children:(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-box-arrow-up-right",viewBox:"0 0 16 16",style:{stroke:"black",strokeWidth:"0.4"},children:[(0,v.jsx)("path",{"fill-rule":"evenodd",d:"M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5"}),(0,v.jsx)("path",{"fill-rule":"evenodd",d:"M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0z"})]})})};var ie=n(5416);function oe(t){var e;const[n,i]=(0,r.useState)(t.product),[o]=(0,h.j1)("whatmorePrimaryFont"),[l]=(0,h.j1)("whatmoreShopId"),[a]=(0,h.j1)("whatmoreSecondaryColor");(0,r.useEffect)((()=>{(0,c.N8M)(l)&&(0,kt.Rb)(n,(0,c.Ipo)(l),l).then((t=>{i(t)}))}),[]);const d=t.FONT_SIZE,u=t.data,p=t.itemPrice;const x=null===u||void 0===u||null===(e=u.variants.find((e=>e.id==t.selectedVariantId)))||void 0===e?void 0:e.compare_at_price,m=x&&0!=x&&x>p?Math.round((x-p)/x*100):NaN;return(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)(s.kC,{direction:"column",paddingLeft:"20px",paddingRight:"20px",paddingY:"5px",children:[(0,v.jsx)(s.rU,{href:function(t){return(0,c.lj5)(l)?t.product_link+"?"+(0,c.awP)(l)+"&"+(0,c.n9s)(l)+"&"+(0,c.vaK)(l)+((0,c.C0m)(l)?"¤cy="+t.currency:""):t.product_link+((0,c.C0m)(l)?"?currency="+t.currency:"")}(n),color:"white",width:"fit-content",target:"58937278618"==l?"_blank":"",children:(0,v.jsxs)(s.kC,{sx:{display:"flex",gap:"6px"},children:[(0,v.jsx)(s.xv,{isTruncated:!0,noOfLines:2,padding:"2px",fontSize:d,sx:{color:"black !important",lineHeight:"140% !important",fontFamily:o+" !important"},as:"b",children:null===u||void 0===u?void 0:u.title}),(0,v.jsx)(ne,{iconSize:1.1*d})]})}),(0,v.jsxs)(s.kC,{direction:"row",gap:"6px",paddingTop:"4px",children:[x&&x>p&&(0,v.jsx)(s.xv,{as:"s",padding:"2px",fontSize:1.2*d,fontWeight:"semibold",sx:{color:"gray !important",fontFamily:o+" !important"},children:(0,kt.jx)(parseFloat((0,ie.G)()?x/100:x)," ",l,n.currency,!0)}),(0,v.jsx)(s.xv,{as:"b",padding:"2px",fontSize:1.2*d,fontWeight:"semibold !important",sx:{color:"black !important",fontFamily:o+" !important"},children:(0,kt.jx)(parseFloat((0,ie.G)()?p/100:p)," ",l,n.currency,!0)}),!isNaN(m)&&0!=m&&(0,v.jsx)(s.xu,{display:"flex",backgroundColor:"green"==(0,c.ZJm)(l)?"#343434"==a?(0,c.ZJm)(l):a:(0,c.ZJm)(l),alignItems:"center",borderRadius:"4px",width:"fit-content",px:"6px",children:(0,v.jsx)(s.xv,{fontSize:(0,c.sTg)(l)?"14px !important":1.1*d,fontWeight:"normal !important",sx:{color:(0,c.mso)(l)+" !important",fontFamily:o+" !important"},children:(0,c.sTg)(l)?"".concat(m,"% off"):"Save ".concat((0,kt.jx)(parseFloat(x/100-p/100)," ",l,n.currency))})})]})]})})}function re(t){var e,n;const[i]=(0,h.j1)("whatmorePrimaryFont"),[o]=(0,h.j1)("whatmoreShopId"),{setShowOptionsChart:l}=(0,r.useContext)(ve),[a,d]=(0,r.useState)({}),u=(0,h.MO)("whatmoreSecondaryColorShade300"),p=t.setSelectedColor,x=t.selectOptionFirstHandler,m=t.selectOptionSecondHandler,f=t.selectOptionThirdHandler,w=t.FONT_SIZE,j=t.data,C=(t,e)=>{d((n=>({...n,[t]:e})))};(0,r.useEffect)((()=>{d((t=>{var e,n,i,o,r,l,a,d,s,c,h,u;return{...t,[null===j||void 0===j||null===(e=j.options)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.name]:null===j||void 0===j||null===(i=j.variants)||void 0===i||null===(o=i.find((t=>{var e,n,i;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(n=e[0])||void 0===n||null===(i=n.values)||void 0===i?void 0:i.includes(null===t||void 0===t?void 0:t.option1))&&(null===t||void 0===t?void 0:t.available)})))||void 0===o?void 0:o.option1,[null===j||void 0===j||null===(r=j.options)||void 0===r||null===(l=r[1])||void 0===l?void 0:l.name]:null===j||void 0===j||null===(a=j.variants)||void 0===a||null===(d=a.find((t=>{var e,n,i;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(n=e[1])||void 0===n||null===(i=n.values)||void 0===i?void 0:i.includes(null===t||void 0===t?void 0:t.option2))&&(null===t||void 0===t?void 0:t.available)})))||void 0===d?void 0:d.option2,[null===j||void 0===j||null===(s=j.options)||void 0===s||null===(c=s[2])||void 0===c?void 0:c.name]:null===j||void 0===j||null===(h=j.variants)||void 0===h||null===(u=h.find((t=>{var e,n,i;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(n=e[2])||void 0===n||null===(i=n.values)||void 0===i?void 0:i.includes(null===t||void 0===t?void 0:t.option3))&&(null===t||void 0===t?void 0:t.available)})))||void 0===u?void 0:u.option3}}))}),[]);return(0,v.jsx)(s.kC,{direction:"row",paddingLeft:"20px",paddingRight:"20px",paddingY:"10px",children:(null===j||void 0===j||null===(e=j.options)||void 0===e?void 0:e.length)>0&&(0,v.jsx)(s.kC,{direction:"column",width:"100%",gap:"4px",children:null===j||void 0===j||null===(n=j.options)||void 0===n?void 0:n.map(((e,n)=>{var r,d,h,y,S;return(0,v.jsx)(v.Fragment,{children:((null===e||void 0===e||null===(r=e.values)||void 0===r?void 0:r.length)>1||"Color"===(null===e||void 0===e?void 0:e.name)||"Colour"===(null===e||void 0===e?void 0:e.name)||"COLOR"===(null===e||void 0===e?void 0:e.name)||1==(null===e||void 0===e||null===(d=e.values)||void 0===d?void 0:d.length)&&(null===e||void 0===e?void 0:e.position)==(null===j||void 0===j||null===(h=j.options)||void 0===h?void 0:h.length))&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(s.kC,{justifyContent:"space-between",alignItems:"center",children:[(0,v.jsx)(s.xv,{fontSize:1*w+"px !important",sx:{color:"black !important",fontFamily:i+" !important",fontWeight:"bold !important"},children:null===e||void 0===e?void 0:e.name}),"Size"===e.name&&(0,c.Ip6)(o)?(0,v.jsx)(s.kC,{marginTop:"4px",whiteSpace:"nowrap",cursor:"pointer",children:(0,v.jsx)(s.xv,{fontSize:.7*w,as:"u",sx:{color:"black !important",fontFamily:i+" !important"},onClick:()=>{null!==l&&l(!0)},children:(0,c.meb)(o)})}):(0,v.jsx)(v.Fragment,{})]}),(0,v.jsx)(s.Ug,{spacing:0,flexWrap:"wrap",alignContent:"flex-start",alignItems:"center",justifyContent:"flex-start",children:null===e||void 0===e||null===(y=e.values)||void 0===y?void 0:y.map(((r,l)=>{var d,h,y,S,b;const k=((t,e)=>{var n,i,o,r,l,d,s,c;if(null!==j&&void 0!==j&&j.options&&(null===j||void 0===j||null===(n=j.options)||void 0===n?void 0:n.length)>0)switch(null===j||void 0===j||null===(i=j.options)||void 0===i?void 0:i.length){case 1:return null===j||void 0===j||null===(o=j.variants)||void 0===o||null===(r=o.find((e=>(null===e||void 0===e?void 0:e.option1)===t)))||void 0===r?void 0:r.available;case 2:return 0==e||(null===j||void 0===j||null===(l=j.variants)||void 0===l||null===(d=l.find((e=>{var n,i;return(null===e||void 0===e?void 0:e.option2)===t&&(null===e||void 0===e?void 0:e.option1)===a[null===j||void 0===j||null===(n=j.options)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.name]})))||void 0===d?void 0:d.available);case 3:return 0==e||1==e||(null===j||void 0===j||null===(s=j.variants)||void 0===s||null===(c=s.find((e=>{var n,i,o,r;return(null===e||void 0===e?void 0:e.option3)===t&&(null===e||void 0===e?void 0:e.option1)===a[null===j||void 0===j||null===(n=j.options)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.name]&&(null===e||void 0===e?void 0:e.option2)===a[null===j||void 0===j||null===(o=j.options)||void 0===o||null===(r=o[1])||void 0===r?void 0:r.name]})))||void 0===c?void 0:c.available);default:return!0}})(r,n);return"Color"!==(null===e||void 0===e?void 0:e.name)&&"Colour"!==(null===e||void 0===e?void 0:e.name)&&"COLOR"!==(null===e||void 0===e?void 0:e.name)||!((null===t||void 0===t||null===(d=t.finalArr)||void 0===d?void 0:d.length)>0)||null!==t&&void 0!==t&&null!==(h=t.finalArr)&&void 0!==h&&h.includes(null)?(0,v.jsx)(s.kC,{paddingBottom:"8px",paddingRight:"8px",children:(0,v.jsx)(Ut.zx,{isDisabled:!k,size:"sm",px:"8px !important",bg:a[null===e||void 0===e?void 0:e.name]===r&&k?(null!==(b=(0,c.CPm)(o))&&void 0!==b?b:u)+" !important":(0,c.bC3)(o)+" !important",width:"fit-content !important",onClick:()=>{C(null===e||void 0===e?void 0:e.name,r),0===n&&x(r),1===n&&m(r),2===n&&f(r)},children:(0,v.jsx)(s.xv,{as:k?"p":"s",fontSize:.9*w+"px !important",sx:{fontFamily:i+" !important",fontWeight:"normal !important",color:a[null===e||void 0===e?void 0:e.name]===r&&k?(0,c.cY_)(o)+" !important":(0,c.FbM)(o)+" !important"},children:r})})},r):(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(s.kC,{paddingBottom:"8px",px:"2px",paddingRight:"8px",children:(0,v.jsx)(s.xu,{boxShadow:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px",borderRadius:(0,c.lmH)(o),size:"sm",border:a[null===e||void 0===e?void 0:e.name]===r?"2px solid ".concat((0,c.ua_)(o)," !important"):"",cursor:"pointer",width:"fit-content !important",onClick:()=>{C(null===e||void 0===e?void 0:e.name,r),p(r),0===n&&x(r),1===n&&m(r),2===n&&f(r)},children:(0,v.jsx)(g.Ee,{padding:"2px",borderRadius:(0,c.lmH)(o),width:"58px",height:"58px",src:null===t||void 0===t||null===(y=t.finalArr)||void 0===y||null===(S=y.find((t=>(null===t||void 0===t?void 0:t.color)==r)))||void 0===S?void 0:S.src})})},r)})}))}),n===(null===j||void 0===j||null===(S=j.options)||void 0===S?void 0:S.length)-1&&(0,v.jsx)(s.M5,{paddingTop:"8px",width:"100%",children:(0,v.jsx)(s.iz,{color:t.dividerColor,size:"xs"})})]})})}))})})}var le,ae=n(8782);function de(t){var e,n,i,o,l,a,d,p,x,m,f,w,j,C,y,S,b,k,_;const[T,E,P,O]=(0,u.Z)();var L=.4*O*.8,z=L*(16/9)*.6*.8;const R=1.1*L,M=R*(16/9)*.8;var D=.13*L;const[K,A]=(0,r.useState)(!1),W=t.data,N=t.event,q=t.product,H=t.setOpenShopNow,Z=t.setLockSwiper,[V]=(0,h.j1)("whatmoreEmbedAppUseVariant"),[U,B]=(0,r.useState)((()=>{if("true"===V)return he(W,q.client_product_id)})),[Y,X]=(0,r.useState)((()=>{if("true"===V)return ue(W,q.client_product_id)})),[G,$]=(0,r.useState)((()=>{if("true"===V)return pe(W,q.client_product_id)})),[Q,tt]=(0,r.useState)(),[et,nt]=(0,r.useState)(1),[ot,rt]=(0,r.useState)(),[lt,at]=(0,r.useState)(0),[dt,st]=(0,r.useState)(!1),[ct,ht]=(0,r.useState)(!1),[ut,pt]=(0,r.useState)(q.thumbnail_image),xt=(0,r.useContext)(it.I),vt=(0,h.MO)("whatmoreShopId"),mt=(0,r.useCallback)((t=>{B(t)}),[]),wt=(0,r.useCallback)((t=>{X(t)}),[]),jt=(0,r.useCallback)((t=>{$(t)}),[]);(0,r.useEffect)((()=>{const t=se(W,U,Y,G);tt(t),rt(ce(W,t)),nt(1),ht(!1);const e=xe(W,t);null!==e&&pt(e)}),[U,Y,G]),(0,r.useEffect)((()=>{var t,e;const n=void 0===Q?null===W||void 0===W||null===(t=W.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.price:ce(W,Q);rt(n*et)}),[et]),(0,r.useEffect)((()=>{function t(t){const e=document.getElementById("whatmore-shopnow-view"),n=document.getElementById("whatmore-size-chart");n&&n.contains(t.target)||!e||e.contains(t.target)||(H(!1),Z(!1))}function e(t){t.preventDefault(),t.stopPropagation(),n.scrollTop+=t.deltaY}document.addEventListener("click",t);const n=document.getElementById("whatmore-shopnow-view");return null===n||void 0===n||n.addEventListener("wheel",e),()=>{document.removeEventListener("click",t),document.removeEventListener("wheel",e)}}),[]),(0,r.useEffect)((()=>{const t=async function(t,e){return"shopify"==t?(0,ft.Bi)():(0,gt.OM)(e)}((0,c.Ipo)(vt),vt);t.then((t=>t.json())).then((t=>{at(t.item_count)})).catch((t=>{console.error("Cart Add Error:",t)}))}),[dt]);const Ct=(0,F.F4)(le||(le=(0,I.Z)(["\n 0% {\n transform: translateY(100%);\n }\n "]))),yt="".concat(Ct," 0.5s"),St=null===W||void 0===W||null===(e=W.options)||void 0===e?void 0:e.findIndex((t=>"Color"==(null===t||void 0===t?void 0:t.name)||"Colour"==(null===t||void 0===t?void 0:t.name)||"COLOR"==(null===t||void 0===t?void 0:t.name))),[bt,kt]=(0,r.useState)(-1!==St?null===(n=W.options)||void 0===n||null===(i=n[St])||void 0===i||null===(o=i.values)||void 0===o?void 0:o[0]:""),[_t,Ft]=(0,r.useState)({});(0,r.useEffect)((()=>{-1!==St&&async function(){const t=await(0,ft.m3)(q);Ft(t)}()}),[]);let Tt=-1,Et=-1!==St&&null!==_t&&void 0!==_t&&_t.product&&(null===_t||void 0===_t||null===(l=_t.product)||void 0===l||null===(a=l.images)||void 0===a?void 0:a.length)>=(null===_t||void 0===_t||null===(d=_t.product)||void 0===d||null===(p=d.options)||void 0===p||null===(x=p[St])||void 0===x||null===(m=x.values)||void 0===m?void 0:m.length)?null===_t||void 0===_t||null===(f=_t.product)||void 0===f||null===(w=f.images)||void 0===w?void 0:w.map((t=>{var e,n,i,o,r,l,a,d,s,c,h,u,p,x;const v=null===_t||void 0===_t||null===(e=_t.product)||void 0===e||null===(n=e.options)||void 0===n?void 0:n.findIndex((t=>"Color"==(null===t||void 0===t?void 0:t.name)||"Colour"==(null===t||void 0===t?void 0:t.name)||"COLOR"==(null===t||void 0===t?void 0:t.name)));return{color:(null===t||void 0===t?void 0:t.variant_ids.length)>0?null===_t||void 0===_t||null===(i=_t.product)||void 0===i||null===(o=i.options)||void 0===o||null===(r=o[v])||void 0===r||null===(l=r.values)||void 0===l?void 0:l[Math.min(++Tt,(null===_t||void 0===_t||null===(a=_t.product)||void 0===a||null===(d=a.options)||void 0===d||null===(s=d[St])||void 0===s||null===(c=s.values)||void 0===c?void 0:c.length)-1)]:null===_t||void 0===_t||null===(h=_t.product)||void 0===h||null===(u=h.options)||void 0===u||null===(p=u[v])||void 0===p||null===(x=p.values)||void 0===x?void 0:x[Math.max(0,Tt)],src:null===t||void 0===t?void 0:t.src}})):[];return Tt+1<(null===_t||void 0===_t||null===(j=_t.product)||void 0===j||null===(C=j.options)||void 0===C||null===(y=C[St])||void 0===y||null===(S=y.values)||void 0===S?void 0:S.length)&&(Et=[]),(0,v.jsxs)(s.kC,{sx:{"&::-webkit-scrollbar":{width:"0px"}},id:"whatmore-shopnow-view",position:"relative",maxHeight:"75vh",overflowY:"scroll",direction:"column",bg:"#FFF",height:"fit-content",opacity:"100%",borderTopRadius:"round"==(null===xt||void 0===xt?void 0:xt.whatmoreUITheme)?"xl":null,animation:yt,children:[(0,v.jsx)(te,{setOpenShopNow:H,setLockSwiper:Z,FONT_SIZE:D}),(0,v.jsx)(s.M5,{marginBottom:"10px",px:"20px",py:"5px",children:(0,v.jsx)(s.kC,{bg:"whiteAlpha.900",width:"fit-content",height:"fit-content",borderRadius:"round"==(null===xt||void 0===xt?void 0:xt.whatmoreUITheme)?"lg":null,overflow:"hidden",sx:{borderWidth:(0,c.alU)(vt),borderColor:(0,c.qPe)(vt)},children:(0,v.jsx)(s.kC,{width:"100%",children:(0,v.jsx)(ae.P,{renderElement:t=>(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(s.xu,{width:R+"px",height:M+"px",children:(0,v.jsx)(g.Ee,{width:R+"px",height:M+"px",borderRadius:"round"==(null===xt||void 0===xt?void 0:xt.whatmoreUITheme)?"lg":null,src:(0,It.s)(t.eventData.src,"&width=400&height=400"),alt:q.handle,sx:{objectFit:(0,c.yOX)(vt)+" !important"},fallback:(0,v.jsx)(J.Z,{width:R+"px",height:M+"px",borderRadius:"round"==(null===xt||void 0===xt?void 0:xt.whatmoreUITheme)?"10px":"0px"})})})}),dataList:Et.length>0&&!Et.includes(null)?null===(b=Et)||void 0===b?void 0:b.filter((t=>(null===t||void 0===t?void 0:t.color)==bt)):null===W||void 0===W||null===(k=W.images)||void 0===k?void 0:k.map((t=>({src:t.includes("https")?t:"https:"+t}))),spacing:10,defaultHeight:R+"px",defaultWidth:M+"px",retainAlreadyRenderedElements:!0,isScroll:!0})})})}),(0,v.jsx)(oe,{data:W,product:q,PRODUCT_TILE_HEIGHT:z,PRODUCT_TILE_WIDTH:L,FONT_SIZE:D,getVariantPrice:ce,selectedVariantId:Q,itemPrice:ot,itemQuantity:et,setItemQuantity:nt,thumbnailImage:ut}),(null===W||void 0===W||null===(_=W.variants)||void 0===_?void 0:_.length)>0&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(s.M5,{paddingTop:"4px",width:"100%",children:(0,v.jsx)(s.iz,{color:(0,c.W8U)(vt),size:"xs",width:"90%"})}),(0,v.jsx)(re,{data:W,dividerColor:(0,c.W8U)(vt),setSelectedColor:kt,finalArr:Et,product:q,PRODUCT_TILE_HEIGHT:z,PRODUCT_TILE_WIDTH:L,FONT_SIZE:D,selectOptionFirstHandler:mt,selectOptionSecondHandler:wt,selectOptionThirdHandler:jt,getVariantPrice:ce,selectedOptionFirst:U,selectedOptionSecond:Y,selectedOptionThird:G,selectedVariantId:Q})]}),c.$2G&&((null===W||void 0===W?void 0:W.description)||(null===W||void 0===W?void 0:W.body_html))&&(0,v.jsx)(ee,{PRODUCT_TILE_HEIGHT:z,FONT_SIZE:D,data:W,handleToggle:()=>A(!K),show:K}),(0,v.jsx)(s.xu,{sx:{pointerEvents:"none"},paddingTop:"20px",opacity:0,children:(0,v.jsx)(Qt,{position:"relative",data:W,FONT_SIZE:D,product:q})}),(0,v.jsx)(Qt,{position:"fixed",selectedVariantId:Q,data:W,FONT_SIZE:D,PRODUCT_TILE_WIDTH:L,product:q,itemQuantity:et,cartItemCount:lt,addToCartFlag:dt,setAddToCartFlag:st,soldOutFlag:ct,setSoldOutFlag:ht,event:N})]})}const se=(t,e,n,i)=>{var o,r,l,a,d,s,c,h,u,p;if(void 0===e&&void 0===n&&void 0===i)return null===t||void 0===t||null===(o=t.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.id;if(void 0===i&&void 0===n)return null===(l=t.variants.find((t=>t.option1===e)))||void 0===l?void 0:l.id;if(void 0===i&&void 0===e)return null===(a=t.variants.find((t=>t.option2===n)))||void 0===a?void 0:a.id;if(void 0===n&&void 0===e)return null===(d=t.variants.find((t=>t.option3===i)))||void 0===d?void 0:d.id;if(void 0===n)return null===(s=t.variants.find((t=>t.option1===e&&t.option3===i)))||void 0===s?void 0:s.id;if(void 0===i)return null===(c=t.variants.find((t=>t.option1===e&&t.option2===n)))||void 0===c?void 0:c.id;if(void 0===e)return null===(h=t.variants.find((t=>t.option2===n&&t.option3===i)))||void 0===h?void 0:h.id;const x=null===t||void 0===t?void 0:t.variants.find((t=>t.option1===e&&t.option2===n&&t.option3===i));return void 0===x?null===t||void 0===t||null===(u=t.variants)||void 0===u||null===(p=u[0])||void 0===p?void 0:p.id:x.id},ce=(t,e)=>{var n;return null===t||void 0===t||null===(n=t.variants.find((t=>t.id===e)))||void 0===n?void 0:n.price},he=(t,e)=>{var n;return null===t||void 0===t||null===(n=t.variants.find((t=>t.id.toString()===e)))||void 0===n?void 0:n.option1},ue=(t,e)=>{var n;return null===t||void 0===t||null===(n=t.variants.find((t=>t.id.toString()===e)))||void 0===n?void 0:n.option2},pe=(t,e)=>{var n;return null===t||void 0===t||null===(n=t.variants.find((t=>t.id.toString()===e)))||void 0===n?void 0:n.option3},xe=(t,e)=>{var n;const i=null===t||void 0===t||null===(n=t.variants)||void 0===n?void 0:n.find((t=>t.id==e));return void 0===i?null:null===i||void 0===i||null===(o=i.featured_image)||void 0===o?void 0:o.src;var o},ve=(0,r.createContext)({setShowOptionsChart:null});var me=function(t){const e=t.event,n=t.data,i=t.currentProduct,o=t.setOpenShopNow,l=t.setLockSwiper,[a,d]=(0,r.useState)(!1);return(0,v.jsx)(ve.Provider,{value:{setShowOptionsChart:d},children:(0,v.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[(0,v.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",children:(0,v.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,v.jsx)(de,{data:n,event:e,product:i,setOpenShopNow:o,setLockSwiper:l})})}),a?(0,v.jsx)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",style:{position:"relative",zIndex:1,bottom:"100%"},className:"whatmore-ios-css-relative-fix",id:"whatmore-size-chart",children:(0,v.jsx)(s.xu,{width:"full",height:"fit-content",children:(0,v.jsx)(Vt,{data:n,event:e,product:i,setShowOptionsChart:()=>{d(!1)}})})}):(0,v.jsx)(v.Fragment,{})]})})};var ge=function(t){var e,[n,i,o,l]=(0,u.Z)();const[a,d]=(0,r.useState)(!1),[x,g]=(0,r.useState)(),[f,w]=(0,r.useState)(),j=(0,h.MO)("whatmoreShopId"),C=t.event,y=t.onBack,S=r.useRef(),b=t.isPlaying,k=t.isLast,I=t.setLockSwiper,_=t.selectedVariantId,F=null===(e=t.showOverlay)||void 0===e||e,T="center";return(0,v.jsx)(s.M5,{children:(0,v.jsxs)(s.xu,{width:l,height:o,sx:{overflow:"hidden"},children:[(0,v.jsx)(s.Kq,{direction:"column",justifyContent:T,height:"full",width:"full",children:(0,v.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,v.jsx)(s.oM,{width:"full",ratio:l/o,children:(0,v.jsx)(m,{height:"100%",width:"100%",url:C.event_hls_url,isPlaying:b,event:C})})})}),F?(0,v.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:T,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,v.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,v.jsx)(Zt,{focusRef:S,event:t.event,isLast:k,onCloseCallback:y,productClickHandler:async t=>{const e=await(0,p.p)(t,(0,c.Ipo)(j),j);w(t),g(e),d(!0),I(!0)}})})}):(0,v.jsx)(v.Fragment,{}),!0===a?(0,v.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:T,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,v.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,v.jsx)(me,{focusRef:S,event:t.event,isLast:k,onCloseCallback:()=>y(),setLockSwiper:I,data:x,currentProduct:f,setOpenShopNow:d,selectedVariantId:_})})}):(0,v.jsx)("div",{})]})})};const fe=function(t,e){return isNaN(t)||isNaN(e)||e<=0||t>e?0:Math.ceil(t/e*100)};function we(t){var e,n,[i,o,r,l]=(0,u.Z)();const[a]=(0,h.j1)("whatmoreSecondaryColor"),[d]=(0,h.j1)("whatmoreSecondaryColorShade900"),c=t.progress,p=null!==(e=t.totalSiblings)&&void 0!==e?e:1,x=null!==(n=t.indexAmongSiblings)&&void 0!==n?n:0;return(0,v.jsx)(s.Kq,{width:"96%",height:"fit-content",direction:"row",justifyContent:"center",alignItems:"center",spacing:"1px",children:[...Array(p).keys()].map((t=>(0,v.jsx)(s.Kq,{width:"100%",height:.004*r+"px",backgroundColor:t<x?a:d+"99",borderRightRadius:"lg",borderLeftRadius:"lg",direction:"row",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",sx:{display:"block !important"},children:t==x?(0,v.jsx)(s.xu,{height:"100%",width:c+"%",bgColor:a,borderRightRadius:"lg",borderLeftRadius:"lg",sx:{display:"block !important"}}):(0,v.jsx)(v.Fragment,{})},"event-progress-bar-slab-"+t)))})}var je=n(868),Ce=n(2630);const ye=t=>t>=1e3?(t/1e3).toFixed(1)+"k":t;var Se=n(4862);var be=function(t){var e,n,i,o=t.whatmoreShareTemplateId;const l=t.whatmoreShareStoryId,a=t.whatmoreShareEventId,p=t.event,x=null===(e=t.showShareText)||void 0===e||e,m=null!==(n=t.shareButtonBottomMargin)&&void 0!==n?n:0,g=(0,h.MO)("whatmoreShopId"),f=(0,h.MO)("isInDesignMode"),w=(0,h.MO)("isDemoBrand"),j=(0,h.MO)("whatmorePrimaryFont"),{whatmoreWidgetSourceDetails:C}=(0,r.useContext)(it.I),[y,S,b,k]=(0,u.Z)(),I=null!==(i=t.iconSize)&&void 0!==i?i:.1*k;function _(){const e=(0,h.MO)("whatmoreLandingLocationType");var n;!function(t){f||w||(async()=>{(0,d.x0)(t)})()}(p),(e.startsWith("product")||"embed"===e)&&(o="te"),n="event_product_link"===(0,c.EEC)(g)?p.products[0].product_link||"":window.location.pathname,n=("event_product_link"===(0,c.EEC)(g)?"":window.location.hostname)+n+"?wtt="+o+"&wsid="+l+"&weid="+a,(0,c.lj5)(g)&&(n=n+"&"+(0,c.awP)(g)+"&utm_campaign=video-share&utm_medium="+e);const i={title:(0,c.JNF)(g),text:"".concat((0,c.Qa8)(g)," \n ").concat(n," ").concat("41096085665"==g?"":"\n \n -via Whatmore")};navigator.share&&!Se.nI?navigator.share(i):(t.setIsModalOpen(!0),t.setShareText([i,n]))}return(0,v.jsx)(s.M5,{children:(0,v.jsx)(s.Cd,{cursor:"pointer",style:{marginBottom:m+"px"},children:(0,v.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[(0,v.jsx)(Ce.Z,{sx:{boxShadow:3,transform:"scaleX(-1)",color:"white",fontSize:I,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),_(),(0,et.GF)({userInteractionType:nt.K.VIDEO_SHARE_CTA_CLICKED,widgetSourceDetails:C,event:p,productList:p.products,ctaList:p.cta})}}),x&&(0,c.u8S)(g)?(0,v.jsxs)(s.xv,{fontSize:.3*I+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:j+" !important",color:"white !important",paddingRight:"10%"},children:["\xa0",p.total_share>(0,c.LWl)(g)?ye(p.total_share):"56374132799"==g?"Enviar":"Share","\xa0"]}):(0,v.jsx)(v.Fragment,{})]})})})},ke=n(7933),Ie=n(2785);var _e=function(t){var e;const n=(0,h.MO)("whatmoreShopId"),i=(0,h.MO)("whatmorePrimaryFont"),o=(0,h.MO)("whatmoreLikedEvents"),l=((0,h.MO)("whatmoreSecondaryColor"),(0,h.MO)("isInDesignMode")),a=(0,h.MO)("isDemoBrand"),{whatmoreWidgetSourceDetails:p}=(0,r.useContext)(it.I),x=t.event,[m,g]=(0,r.useState)(null!==(e=o[x.event_id])&&void 0!==e&&e),[f,w,j,C]=(0,u.Z)(),y=.1*C;function S(t,e){l||a||(async()=>{(0,d.Z6)(t,e)})()}function b(){(0,h.bU)("whatmoreLikedEvents",{...o,[x.event_id]:!m}),m?(S(x,-1),(0,et.GF)({userInteractionType:nt.K.VIDEO_UNLIKED,widgetSourceDetails:p,event:x,productList:x.products,ctaList:x.cta})):(S(x,1),(0,et.GF)({userInteractionType:nt.K.VIDEO_LIKED,widgetSourceDetails:p,event:x,productList:x.products,ctaList:x.cta})),g(!m)}const k=x.total_like+(m?1:0);return(0,v.jsx)(s.M5,{children:(0,v.jsx)(s.Cd,{cursor:"pointer",children:(0,v.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"fit-content",width:"fit-content",children:[m?(0,v.jsx)(Ie.Z,{sx:{boxShadow:3,color:(0,c.dmX)(n),fontSize:y,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),b()}}):(0,v.jsx)(ke.Z,{sx:{boxShadow:3,color:"white",fontSize:y,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{t.stopPropagation(),b()}}),(0,v.jsx)(v.Fragment,{children:(0,c.CEM)(n)?(0,v.jsxs)(s.xv,{fontSize:.3*y+"px !important",fontWeight:"semibold !important",align:"center",sx:{fontFamily:i+" !important",color:"white !important",position:"relative",bottom:"5px"},children:["\xa0",k>=(0,c.zKg)(n)?ye(k):"56374132799"==n?"Curtir":"Like","\xa0"]}):(0,v.jsx)(v.Fragment,{})})]})})})};const Fe=t=>{let{iconSize:e}=t;return(0,v.jsx)("div",{style:{backgroundColor:"#25D366",borderRadius:"50%",padding:.3*e},children:(0,v.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"white",class:"bi bi-whatsapp",viewBox:"0 0 16 16",children:(0,v.jsx)("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})})})};var Te=n(8866);const Ee=t=>{let{iconSize:e}=t;return(0,v.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,v.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-twitter-x",viewBox:"0 0 16 16",children:(0,v.jsx)("path",{d:"M12.6.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867-5.07-4.425 5.07H.316l5.733-6.57L0 .75h5.063l3.495 4.633L12.601.75Zm-.86 13.028h1.36L4.323 2.145H2.865z"})})})},Pe=t=>{let{iconSize:e}=t;return(0,v.jsx)("div",{style:{backgroundColor:"#fff",borderRadius:"50%",padding:.3*e},children:(0,v.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-copy",viewBox:"0 0 16 16",children:(0,v.jsx)("path",{"fill-rule":"evenodd",d:"M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z"})})})};var Oe=t=>{const e=t.shareText,[n,i]=(0,r.useState)("Copy link"),[o,l]=(0,r.useState)("");return(0,v.jsx)(v.Fragment,{children:t.isModalOpen&&(0,v.jsxs)("div",{className:"modal-overlay",style:{backgroundColor:"white",borderRadius:"10px",padding:"12px 12px 20px 12px"},children:[(0,v.jsxs)("div",{style:{cursor:"pointer",display:"flex",justifyContent:"space-between",paddingBottom:"6px"},children:[(0,v.jsx)("img",{onClick:()=>{window.location.href="https://whatmore.ai"},src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",backgroundColor:"transparent",borderRadius:"0px",width:Math.min(t.iconSize,28)+"px"}}),(0,v.jsx)(q.Z,{onClick:e=>{e.stopPropagation(),t.setIsModalOpen(!1)}})]}),(0,v.jsx)("div",{}),(0,v.jsx)(s.iz,{color:"blackAlpha.500",size:"1px",width:"100%"}),(0,v.jsxs)("div",{className:"social-icons",style:{display:"flex",gap:"20px",justifyContent:"center",paddingTop:"12px"},children:[(0,v.jsxs)("div",{onClick:t=>{var n;t.stopPropagation();const i=encodeURIComponent(null===(n=e[0])||void 0===n?void 0:n.text);window.open("https://wa.me/?text=".concat(i),"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,v.jsx)(Fe,{iconSize:Math.min(t.iconSize,30)}),(0,v.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"Whatsapp"})]}),(0,v.jsxs)("div",{onClick:t=>{var n;t.stopPropagation();const i=encodeURIComponent(null===(n=e[0])||void 0===n?void 0:n.text);window.open("https://twitter.com/intent/tweet?text=".concat(i),"_blank")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,v.jsx)(Ee,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,v.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14)},children:"X"})]}),(0,v.jsxs)("div",{onClick:t=>{t.stopPropagation(),navigator.clipboard.writeText(e[1]),i("Link copied"),l("green")},style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:"4px",alignItems:"center"},children:[(0,v.jsx)(Pe,{iconSize:Math.min(t.iconSize,30),style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,v.jsx)("p",{style:{fontSize:Math.min(t.iconSize,14),color:o},children:n})]})]})]})})};function Le(t){var e;const n=t.event,[i,o,l,a]=(0,u.Z)(),[d]=(0,h.j1)("whatmorePrimaryFont"),{whatmoreIsStoriesTemplate:p}=(0,r.useContext)(it.I),[x]=(0,h.j1)("whatmoreSecondaryColor"),[m]=(0,h.j1)("whatmoreShopId"),g=(0,c.f63)(m),f=null!==(e=(0,c.u2W)(m))&&void 0!==e?e:[x,g,x,g,x];return(0,v.jsx)(v.Fragment,{children:p?(0,v.jsx)(s.xu,{width:"100%",height:"fit-content",padding:"5px",children:(0,v.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-start",children:[(0,v.jsx)(s.M5,{children:(0,v.jsx)(s.Cd,{overflow:"hidden",size:.14*a+"px",sx:{boxShadow:"0px 2px 1px 0px "+f[0]+"50, 0px -2px 1px 0px "+f[1]+"50, 2px 0px 1px 0px "+f[2]+"50, -2px 0px 1px 0px "+f[3]+"80, 2px -2px 1px 0px "+f[4]+"80, -2px 2px 1px 0px "+f[0]+"DA, 2px 2px 1px 0px "+f[1]+"DA, -2px -2px 1px 0px "+f[2]+"DA"},children:(0,v.jsx)("img",{src:(0,je.V)(n.storyset_thumbnail_image),style:{objectFit:"cover",height:"100%",width:"100%",backgroundColor:"white"}})})}),(0,v.jsx)(s.M5,{children:(0,v.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:.05*a+"px",fontWeight:"medium",lineHeight:"100%",sx:{fontFamily:d+" !important",color:"white !important",textShadow:"0px 0px 4px black !important;"},children:n.storyset_name})})]})}):(0,v.jsx)(v.Fragment,{})})}var ze=function(t){const[e,n,i]=(0,Te.Z)(),[o]=(0,h.j1)("isInDesignMode"),[l]=(0,h.j1)("isDemoBrand"),[a,p]=(0,h.j1)("isProductSwiperCatalogOpen"),[x,m]=(0,h.j1)("isFirstIndicatorRenderDone"),[g]=(0,h.j1)("whatmoreShopId"),f=(0,r.useContext)(yn),{whatmoreEventsBrowsingTemplate:w}=(0,r.useContext)(it.I),[j,C,y,S]=(0,u.Z)(),b=(0,h.MO)("whatmorePrimaryFont"),I=t.event,_=t.storySetId,F=t.isLast,T=t.onCloseCallback,E=t.focusRef,P=t.productClickHandler,O=t.videoPlayingData,L=t.totalSiblingEvents,z=t.indexAmongSiblings,R=t.leftOpenSpaceClickHandler,M=t.midOpenSpaceClickHandler,D=t.rightOpenSpaceClickHandler,{whatmoreWidgetSourceDetails:K}=(0,r.useContext)(it.I),A=.1*S,[N,q]=(0,r.useState)(!1),[H,Z]=(0,r.useState)([]),U=t=>{B.current&&!B.current.contains(t.target)&&q(!1)},B=(0,r.useRef)(null);return(0,r.useEffect)((()=>(N?document.addEventListener("click",U):document.removeEventListener("click",U),()=>{document.removeEventListener("click",U)})),[N]),(0,v.jsxs)(s.xu,{width:"full",height:"full",borderRadius:"md",children:[N&&(0,v.jsx)("div",{ref:B,className:"whatmore-share-modal",style:{zIndex:100,position:"absolute",boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.6)",width:"75%",top:"45%",left:"50%",transform:"translateX(-50%) translateY(-50%)"},children:(0,v.jsx)(Oe,{shareText:H,setShareText:Z,iconSize:A,isModalOpen:N,setIsModalOpen:q})}),(0,v.jsxs)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,v.jsxs)(s.Kq,{width:"full",height:"fit-content",direction:"column",justifyContent:"flex-start",alignItems:"center",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:[f.showVideoPlayingData?(0,v.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",marginTop:"5px",justifyContent:"center",children:(0,v.jsx)(we,{progress:fe(O.current_time,O.video_duration),totalSiblings:L,indexAmongSiblings:z})}):(0,v.jsx)(v.Fragment,{}),(0,v.jsx)(s.xu,{width:"full",margin:"2px",marginTop:"5px",children:(0,v.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",paddingRight:"10px",paddingLeft:"10px",children:[(0,v.jsx)(Le,{event:I}),(0,v.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,_t.ZK)(w)?(0,v.jsx)(be,{whatmoreShareTemplateId:(0,_t.QN)(w),whatmoreShareStoryId:_,whatmoreShareEventId:I.event_id,event:I,showShareText:!1,iconSize:.07*S,shareButtonBottomMargin:6,setIsModalOpen:q,setShareText:Z}):(0,v.jsx)(v.Fragment,{}),(0,v.jsx)(k,{focusRef:E}),("landscape"!==e||t.showCloseOverlay)&&(0,v.jsx)(V,{event:I,onCloseCallback:T})]})]})})]}),(0,v.jsxs)(s.Kq,{width:"100%",height:"100%",direction:"row",justifyContent:"center",children:[(0,v.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{R()},sx:{display:"block !important"}}),(0,v.jsx)(s.xu,{width:"34%",height:"100%",onClick:()=>{M()},sx:{display:"block !important"}}),(0,v.jsx)(s.xu,{width:"33%",height:"100%",onClick:()=>{D()},sx:{display:"block !important"}})]}),(0,v.jsxs)(s.xu,{width:"full",height:"fit-content",children:[f.totalEvents>1&&!x&&f.showSwipeIndicator?(0,v.jsx)(s.xu,{width:"full",margin:"2px",children:(0,v.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,v.jsx)(G,{swipeUp:!F})})}):null,(0,v.jsxs)(s.xu,{width:"fit-content",height:"fit-content",position:"absolute",right:0,bottom:"25%",children:[(0,c.slY)(g)&&!(0,_t.ZK)(w)?(0,v.jsx)(s.xu,{ml:"auto",width:"fit-content",paddingY:"12px",paddingX:"8px",children:(0,v.jsxs)(s.Kq,{gap:"4px",direction:"column",alignItems:"center",cursor:"pointer",onClick:function(){var t;o||l||(async()=>{(0,d.lY)(I,1)})(),(0,et.GF)({userInteractionType:nt.K.WHATSAPP_ICON_CLICKED,widgetSourceDetails:K,event:I,productList:null===I||void 0===I?void 0:I.products,ctaList:null===I||void 0===I?void 0:I.cta});const e=I.products.map((t=>"".concat(t.product_link," \n"))),n=(0,c.gtK)(g),i="Hey, I am interested in ".concat(I.products.length>1?"these products":"this product"," I saw on ").concat(null===(t=I.products[0])||void 0===t?void 0:t.brand," store: \n").concat(e,". Could you please help me with some queries?");window.open(n+"&text=".concat(i,"&type=phone_number"),"_blank")},children:[(0,v.jsx)(Fe,{iconSize:.7*A,style:{boxShadow:"8px 0px 8px rgba(0, 0, 0, 0.4)"}}),(0,v.jsx)(s.xv,{fontSize:A*(0,c.Xod)(g)+"px",fontWeight:"bold",align:"center",style:{marginTop:0},sx:{fontFamily:b+" !important",color:"white !important"},children:(0,c.UiZ)(g)})]})}):(0,v.jsx)(v.Fragment,{}),(0,c.jY3)(g)?(0,v.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",children:(0,v.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,v.jsx)(_e,{event:I})})}):(0,v.jsx)(v.Fragment,{}),(0,c.ROU)(g)&&!(0,_t.ZK)(w)?(0,v.jsx)(s.xu,{width:"full",height:"fit-content",paddingX:"12px",children:(0,v.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,v.jsx)(be,{whatmoreShareTemplateId:(0,_t.QN)(w),whatmoreShareStoryId:_,whatmoreShareEventId:I.event_id,event:I,setIsModalOpen:q,setShareText:Z})})}):(0,v.jsx)(v.Fragment,{})]}),(0,Kt.kT)(I)?(0,v.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(g)?(0,v.jsx)(s.xu,{w:"100%",children:(0,v.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,v.jsx)(W,{event:I,onToggle:t=>{p("minimize-button"!==t)}})})}):(0,v.jsx)(v.Fragment,{}),(0,v.jsx)(s.xu,{display:"flex",width:"100%",height:"fit-content",children:(0,v.jsx)(Nt,{event:I,productClickHandler:P})})]}):(0,v.jsx)(v.Fragment,{})]})]})]})},Re=n(2279),Me=n.n(Re),De=n(342);var Ke=function(t){var e,n,i,o,l,a,[d,m,g,f]=(0,u.Z)();const[w,j]=(0,r.useState)(!1),[C,y]=(0,r.useState)(),[S,b]=(0,r.useState)(),[k,I]=(0,r.useState)({current_time:0,video_duration:0,is_video_ended:!1}),_=(0,h.MO)("whatmoreShopId"),F=t.event,T=t.storyId,E=t.onBack,P=r.useRef(),O=t.isPlaying,L=t.isLast,z=t.setLockSwiper,R=t.onVideoEndedCallback,M=t.progressUpdateCallback,D=null!==(e=t.totalSiblingEvents)&&void 0!==e?e:0,K=null!==(n=t.indexAmongSiblings)&&void 0!==n?n:0,A=null===(i=t.showOverlay)||void 0===i||i,W=null!==(o=t.leftOpenSpaceClickHandler)&&void 0!==o?o:()=>{},N=null!==(l=t.midOpenSpaceClickHandler)&&void 0!==l?l:()=>{},q=null!==(a=t.rightOpenSpaceClickHandler)&&void 0!==a?a:()=>{},{whatmoreWidgetSourceDetails:H}=(0,r.useContext)(it.I),Z="center";let V;try{V=Me()((()=>{R()}),1e3,{leading:!0,trailing:!1})}catch(U){console.log(U)}return(0,v.jsx)(s.M5,{children:(0,v.jsxs)(s.xu,{width:f,height:g,sx:{overflow:"hidden"},children:[(0,v.jsx)(s.Kq,{direction:"column",justifyContent:Z,height:"full",width:"full",children:(0,v.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,v.jsx)(s.oM,{width:"full",ratio:f/g,children:(0,v.jsx)(x.Z,{height:"100%",width:"100%",url:(0,je.V)((0,De.uv)(F)),isPlaying:O,timeUpdateCallback:function(t,e){const n=fe(t,e);M(n);const i=k.is_video_ended;n>=99&&O&&!i?(V(),I({current_time:t,video_duration:e,is_video_ended:!0})):I({current_time:t,video_duration:e,is_video_ended:i})},event:F,source:t.source})})})}),A?(0,v.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:Z,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,v.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,v.jsx)(ze,{focusRef:P,event:t.event,isLast:L,onCloseCallback:()=>{E(),(0,et.Z2)({userInteractionType:nt.K.VIDEO_PLAYBACK,userInteractionMetadata:{watch_time:k.current_time},widgetSourceDetails:H,event:F,productList:F.products,ctaList:F.cta})},productClickHandler:async t=>{const e=await(0,p.p)(t,(0,c.Ipo)(_),_);b(t),y(e),j(!0),z(!0),(0,et.GF)({userInteractionType:nt.K.SHOPNOW_CLICKED,widgetSourceDetails:H,event:F,productList:F.products,ctaList:F.cta}),(0,h.bU)("whatmoreAllowAutoSlide",!1)},videoPlayingData:k,totalSiblingEvents:D,indexAmongSiblings:K,leftOpenSpaceClickHandler:W,midOpenSpaceClickHandler:N,rightOpenSpaceClickHandler:q,storySetId:T,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay})})}):(0,v.jsx)(v.Fragment,{}),!0===w?(0,v.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"200%"},direction:"column",justifyContent:Z,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,v.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",children:(0,v.jsx)(me,{focusRef:P,event:t.event,isLast:L,onCloseCallback:()=>E(),setLockSwiper:z,data:C,currentProduct:S,setOpenShopNow:t=>{j(t),(0,h.bU)("whatmoreAllowAutoSlide",!t)}})})}):(0,v.jsx)("div",{})]})})},Ae=n(7300),We=n(8984),Ne=n(58),qe=n(9723);var He=function(t){var[e,n,i,o]=(0,u.Z)();const r=(0,h.MO)("whatmoreShopId"),l=t.event,a=t.isPlaying,d="center";return(0,v.jsx)(s.M5,{children:(0,v.jsxs)(s.xu,{width:o,height:i,sx:{overflow:"hidden"},children:[(0,v.jsx)(s.Kq,{direction:"column",justifyContent:d,height:"full",width:"full",children:(0,v.jsx)(s.xu,{borderRadius:"md",backgroundColor:"white",children:(0,v.jsx)(s.oM,{width:"full",ratio:o/i,children:(0,v.jsx)(x.Z,{height:"100%",width:"100%",url:(0,je.V)((0,De.uv)(l)),isPlaying:a,timeUpdateCallback:function(t,e){},event:l,source:t.source})})})}),(0,v.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:d,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,v.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",width:"100%",height:"100%",backdropFilter:"auto",backdropBlur:"10px",onClick:t=>{(0,Ne.QV)()},children:(0,v.jsxs)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"full",width:"full",children:[(0,v.jsx)(qe.Z,{sx:{boxShadow:3,color:(0,c.Ya_)(r),fontSize:.4*o,filter:"drop-shadow(0 0 5px black);"},onClick:t=>{(0,Ne.QV)()}}),(0,v.jsx)(s.xv,{color:"white",fontSize:.05*o+"px",fontWeight:"bold",align:"left",children:"Please click to play video.."})]})})})]})})},Ze=n(3433);var Ve=function(t){var e,n;const r=t.event,l=null===(e=t.isPlaying)||void 0===e||e,a=t.onBack,d=t.isLast,s=t.setLockSwiper,c=(t.heightFactor,t.widthFactor,t.onVideoEndedCallback),u=t.progressUpdateCallback,[p,x]=(0,j.Z)(),[m]=(0,h.j1)("whatmoreVideoPlayerPoolBlessed"),g=null===(n=t.showOverlay)||void 0===n||n;function f(){x(!p)}if((0,We.KE)()&&0==m)return(0,v.jsx)(He,{event:r,onBack:a,isPlaying:l,isLast:d,setLockSwiper:s,onVideoEndedCallback:c,progressUpdateCallback:u,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{f()},midOpenSpaceClickHandler:()=>{f()},rightOpenSpaceClickHandler:()=>{f()},showOverlay:g,source:Ze.j.CAROUSEL_EVENT_OPENED},"shopping-video-view"+r.event_id);if((0,Ae.B6)(r)||(0,Ae.WJ)(r))return(0,v.jsx)(Ke,{event:r,onBack:a,isPlaying:l,isLast:d,setLockSwiper:s,onVideoEndedCallback:c,progressUpdateCallback:u,totalSiblingEvents:1,indexAmongSiblings:0,leftOpenSpaceClickHandler:()=>{f()},midOpenSpaceClickHandler:()=>{f()},rightOpenSpaceClickHandler:()=>{f()},showOverlay:g,source:Ze.j.CAROUSEL_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+r.event_id);if((0,Ae.yC)(r)){var{status:w,bannerText:C,timeToStartInMins:y}=i.Z.getEventStatus(r);if(w.name===o.Z.LIVE.name)return(0,v.jsx)(ge,{event:r,onBack:a,isPlaying:l,isLast:d,showOverlay:g},"shopping-live-view"+r.event_id)}return console.error("Can't render event which is neither video or a currently-live-event"),(0,v.jsx)("div",{})},Ue=n(9284),Be=n.n(Ue),Ye=n(7463),Xe=n(2154);function Ge(t){var e;const[n,i]=(0,r.useState)(!1),o=t.onClick,l=null!==(e=t.fontSize)&&void 0!==e?e:50;return(0,v.jsx)("div",{style:{height:"fit-content",width:"fit-content",backgroundColor:"black",opacity:.4,borderRadius:"50%"},className:[n?"whatmore-scale-on-tap":""].join(" "),children:"left"===t.type?(0,v.jsx)(Xe.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{i(!0),setTimeout((()=>{i(!1)}),500),o(t,"up")}}):(0,v.jsx)(Ye.Z,{sx:{color:"white",fontSize:l+"px",filter:"drop-shadow(0 0 5px black);"},onClick:t=>{i(!0),setTimeout((()=>{i(!1)}),500),o(t,"down")}})})}var Je=function(t){var e,n,i;const o=null!==(e=t.relativeBottomPercentage)&&void 0!==e?e:"30%",r=null!==(n=t.width)&&void 0!==n?n:"100%",l=null!==(i=t.fontSize)&&void 0!==i?i:50,a=t.handleClick;return(0,v.jsx)("div",{style:{position:"relative",zIndex:1,bottom:o,width:"100%",height:"fit-content",display:"flex",flexFlow:"row nowrap",justifyContent:"center"},id:"here",children:(0,v.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:r,height:"fit-content",paddingRight:"5px",paddingLeft:"5px",paddingTop:"5px",paddingBottom:"5px",justifyContent:"space-between",alignContent:"center"},children:[(0,v.jsx)(Ge,{type:"left",onClick:a,fontSize:l}),(0,v.jsx)(Ge,{type:"right",onClick:a,fontSize:l})]})})},$e=n(2860),Qe=n(4669);var tn=function(t,e){function n(t,e){return 1==e?0:t<0?e+t:t>=e?t-e:t}const i=(0,r.useRef)({prevIndex:n(t-1,e),activeIndex:t,nextIndex:n(t+1,e)});return[function(){return i.current},function(t){i.current="right"==t?{prevIndex:n(i.current.activeIndex,e),activeIndex:n(i.current.activeIndex+1,e),nextIndex:n(i.current.activeIndex+2,e)}:{prevIndex:n(i.current.activeIndex-2,e),activeIndex:n(i.current.activeIndex-1,e),nextIndex:n(i.current.activeIndex,e)}},function(t){return n(i.current.activeIndex+t)}]};var en=function(t,e){const n=(0,r.useRef)({clientX:0,clientY:0});return[function(t){n.current.clientX=t.changedTouches[0].clientX,n.current.clientY=t.changedTouches[0].clientY},function(i){const o=n.current.clientX,r=n.current.clientY;var l=o-i.changedTouches[0].clientX,a=r-i.changedTouches[0].clientY;return"vertical"==t&&Math.abs(a)>e||"horizontal"==t&&Math.abs(l)>e?"vertical"==t?a>0?"right":"left":l>0?"right":"left":null}]};var nn=function(t,e){const n=(0,r.useRef)(Me()(((t,e)=>{t(e)}),300,{leading:!0,trailing:!1}));return[function(i,o){var r=0;if(r="vertical"==t?i.deltaY:i.deltaX,Math.abs(r)<=e)return;const l=r>0?"right":"left";n.current(o,l)}]},on=n(5173);var rn=function(t){const e=t.events,n=t.eventIndex,i=t.onBack;var[o,p,x,m]=(0,u.Z)();const[g]=(0,h.j1)("isInDesignMode"),[f]=(0,h.j1)("isDemoBrand"),[w,j]=(0,r.useState)(!0),[C,y]=(0,h.j1)("isFirstIndicatorRenderDone"),[S,b]=(0,r.useState)(!1),{setCloseClickComponent:k}=(0,r.useContext)(yn),{slideDirection:I}=(0,r.useContext)(yn),[_]=(0,h.j1)("whatmoreShopId"),[F]=(0,h.j1)("whatmoreLandingLocationType"),[T,E]=tn(n,e.length),[P,O]=en(I,50),[L]=nn("vertical",30),[z,R]=(0,r.useState)(!1),[M,D]=(0,r.useState)(null),{whatmoreWidgetSourceDetails:K}=(0,r.useContext)(it.I);function A(){R(!1)}function W(){A(),setTimeout((()=>{i()}),500)}(0,r.useEffect)((()=>(R(!0),()=>{})),[]);const N=K.landingLocationType,q=K.templateType;function H(){(0,h.MO)("whatmoreAllowAutoSlide")&&(E("right"),M.slideNext())}function Z(t,e){E(e),function(t,e){M&&("left"===e?M.slidePrev():M.slideNext())}(0,e)}k(W);const V=Math.round(.05*x);return(0,v.jsx)(Be(),{isOpen:z,onAfterOpen:function(){},onRequestClose:A,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,v.jsx)(on.Z,{children:(0,v.jsxs)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:(0,Q.lA)("#000000",13)},onTouchStart:t=>{P(t)},onTouchEnd:t=>{const e=O(t);e&&Z(0,e)},onWheel:t=>{L(t,(t=>{Z(0,t)}))},children:[(0,v.jsx)(l.tq,{speed:400,threshold:V,slidesPerView:1,direction:I,modules:[a.tl,a.Gk],initialSlide:n,loop:1!=e.length,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,allowSlideNext:!S,allowSlidePrev:!S,allowTouchMove:!1,onSwiper:t=>{D(t)},onSlideChange:t=>{var n;w?j(!1):(C||y(!0),n=e[T().activeIndex],g||f||(async()=>{const t=(0,_t.NY)(N)+(0,_t.dS)(q)+"_"+(null===n||void 0===n?void 0:n.event_id);(0,d.wh)(n),"index"===F?((0,Qe.Tc)(_,$e.Xh,$e.pR),(0,mt.H4)(n.event_id,n.products,$e.Xh,$e.pR,t)):F.startsWith("product")||"embed"===F?((0,Qe.Tc)(_,$e.h7,$e.dU),(0,mt.H4)(n.event_id,n.products,$e.h7,$e.dU,t)):F.startsWith("collection")?((0,Qe.Tc)(_,$e.U$,$e.Pk),(0,mt.H4)(n.event_id,n.products,$e.U$,$e.Pk,t)):((0,Qe.Tc)(_,$e.Xh,$e.pR),(0,mt.H4)(n.event_id,n.products,$e.Xh,$e.pR,t))})(),(0,et.y4)({userInteractionType:nt.K.EVENT_VIEW,widgetSourceDetails:K,event:e[T().activeIndex],productList:e[T().activeIndex].products}))},children:[...Array(Math.min(e.length,3)).keys()].map((n=>(0,v.jsx)(l.o5,{children:n=>{let{isActive:i,isPrev:o,isNext:r,isVisible:l,isDuplicate:a}=n;const d=i?"activeIndex":o?"prevIndex":"nextIndex";return(0,v.jsx)(s.Kq,{direction:"column",height:window.innerHeight,justifyContent:"center",children:(0,v.jsx)(Ve,{event:e[T()[d]],onBack:W,isPlaying:1==e.length||i&&l,isLast:!1,setLockSwiper:b,onVideoEndedCallback:H,progressUpdateCallback:t=>{},showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay})})}},"event-vertical-scroll-slide-"+n)))}),e.length>1&&!S&&(0,c.h6H)(_)&&"horizontal"===(0,c.e8z)(_)&&"horizontal"===I?(0,v.jsx)(Je,{relativeBottomPercentage:"50%",width:m,handleClick:(t,e)=>{Z(0,"down"==e?"right":"left")},fontSize:parseInt(.12*m)}):(0,v.jsx)(v.Fragment,{})]})})})},ln=n(1168);n(6143),n(7850),n(4444),n(7244),n(123),n(5892),n(1811);const an=t=>{let{children:e,customClass:n,show:i,closeCallback:o}=t;return ln.createPortal((0,v.jsxs)("div",{className:"whatmore-landscape-modal whatmore-root ".concat(n),style:{display:i?"block":"none"},children:[(0,v.jsx)("div",{className:"whatmore-landscape-modal-overlay",onClick:o}),(0,v.jsx)("div",{className:"whatmore-landscape-modal-content",children:e})]}),document.body)};an.defaultProps={children:(0,v.jsx)("div",{children:"Empty Modal"}),customClass:"",show:!1,closeCallback:()=>!1};var dn=an;var sn=function(t){var e;const n=(0,h.MO)("whatmorePrimaryFont"),i=(0,h.MO)("whatmoreShopId"),o=null!==(e=t.fontSize)&&void 0!==e?e:"8";return(0,v.jsx)(s.rU,{href:"https://www.whatmore.ai",isExternal:!0,children:(0,c.XFt)(i)&&(0,v.jsxs)(s.Kq,{direction:"row",justifyContent:"flex-start",alignItems:"center",width:"fit-content",spacing:"2px",paddingLeft:"2px",paddingRight:"2px",paddingBottom:"2px",marginBottom:"2px",children:[(0,v.jsx)("p",{style:{textAlign:"center",color:"white",fontFamily:n,fontWeight:"normal",fontSize:1.1*o+"px",margin:0,padding:0,lineHeight:"110%"},children:"powered by Whatmore"}),(0,v.jsx)(s.xu,{width:"10px"}),(0,v.jsx)("img",{src:"https://whatmore-other-assets.b-cdn.net/whatmore/new_whatmore_logo.png",style:{objectFit:"contain",width:1.7*o,backgroundColor:"transparent",borderRadius:"0px"}})]})})};var cn=function(t){var[e,n,i,o]=(0,u.Z)();const[p]=(0,h.j1)("isInDesignMode"),[x]=(0,h.j1)("isDemoBrand"),[m,g]=(0,h.j1)("isFirstIndicatorRenderDone"),[f,w]=(0,r.useState)(0!=t.eventIndex),{setCloseClickComponent:j}=(0,r.useContext)(yn),[C,y]=(0,r.useState)(!1),[S]=(0,h.j1)("whatmoreShopId"),[b]=(0,h.j1)("whatmoreLandingLocationType"),{whatmoreUITheme:k}=(0,r.useContext)(it.I),{whatmoreWidgetSourceDetails:I}=(0,r.useContext)(it.I),[_,F]=(0,r.useState)(!1),[T,E]=(0,r.useState)(null);function P(){F(!1)}const O=t.events,L=t.eventIndex,z=t.onBack,R=O.concat(O),M=O.length,D=(0,r.useRef)(0);function K(){P(),setTimeout((()=>{z()}),500)}function A(){T&&!T.isEnd&&(0,h.MO)("whatmoreAllowAutoSlide")&&T.slideNext()}(0,r.useEffect)((()=>(F(!0),()=>{})),[]),j(K);const W=I.landingLocationType,N=I.templateType,q=parseInt(Math.min(5,O.length));return(0,v.jsx)(dn,{show:_,closeCallback:P,customClass:"whatmore-landscape-modal-swipe-view",children:(0,v.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",aligntItems:"center",backgroundColor:(0,Q.lA)("#000000",13),children:[(0,v.jsx)(s.M5,{children:(0,v.jsx)(s.xu,{height:"fit-content",width:o*q,children:(0,v.jsxs)(l.tq,{onInit:t=>{E(t)},slidesPerView:q,centeredSlides:!0,allowTouchMove:!1,initialSlide:L,modules:[a.lI,a.W_,a.Gk,a.pt,a.tl],navigation:q>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*i),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:o*q,watchSlidesProgress:!0,onSlideChange:t=>{var e;f?w(!1):(m||g(!0),e=O[t.activeIndex],p||x||(async()=>{const t=(0,_t.NY)(W)+(0,_t.dS)(N)+"_"+(null===e||void 0===e?void 0:e.event_id);(0,d.wh)(e),"index"===b?((0,Qe.Tc)(S,$e.Xh,$e.pR),(0,mt.H4)(e.event_id,e.products,$e.Xh,$e.pR,t)):b.startsWith("product")||"embed"===b?((0,Qe.Tc)(S,$e.h7,$e.dU),(0,mt.H4)(e.event_id,e.products,$e.h7,$e.dU,t)):b.startsWith("collection")?((0,Qe.Tc)(S,$e.U$,$e.Pk),(0,mt.H4)(e.event_id,e.products,$e.U$,$e.Pk,t)):((0,Qe.Tc)(S,$e.Xh,$e.pR),(0,mt.H4)(e.event_id,e.products,$e.Xh,$e.pR,t))})(),(0,et.y4)({userInteractionType:nt.K.EVENT_VIEW,widgetSourceDetails:I,event:O[t.activeIndex],productList:O[t.activeIndex].products,ctaList:O[t.activeIndex].cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[O.length>2&&(0,v.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,v.jsx)(V,{onCloseCallback:z})}),R.slice(L,O.length+L).map(((t,e)=>(0,v.jsx)(l.o5,{children:t=>{let{isActive:n,isPrev:r,isNext:l,isVisible:a,isDuplicate:d}=t;if(n)return(0,v.jsx)(s.Kq,{direction:"column",height:i,width:1*o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,v.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==k?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,v.jsx)(Ve,{event:O[e%M],onBack:K,isPlaying:!0,isLast:e%M===O.length-1,setLockSwiper:y,widthFactor:1,heightFactor:1,onVideoEndedCallback:A,progressUpdateCallback:t=>{},showCloseOverlay:(null===O||void 0===O?void 0:O.length)<=2})})});if(l)return(0,v.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{T.slideTo(e%M,300)},children:(0,v.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==k?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,v.jsx)(Ve,{event:O[e%M],onBack:K,isPlaying:!1,isLast:e%M===O.length-1,setLockSwiper:y,widthFactor:1,heightFactor:1,onVideoEndedCallback:A,progressUpdateCallback:t=>{},showOverlay:!1})})});if(r&&1===D.current)return(0,v.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{T.slideTo(e%M,300)},children:(0,v.jsx)(s.xu,{overflow:"hidden",sx:{borderRadius:"round"==k?"10px":"0px",borderWidth:(0,c.alU)(S),borderColor:(0,c.qPe)(S)},children:(0,v.jsx)(Ve,{event:O[e%M],onBack:K,isPlaying:!1,isLast:e%M===O.length-1,setLockSwiper:y,widthFactor:1,heightFactor:1,onVideoEndedCallback:A,progressUpdateCallback:t=>{},showOverlay:!1})})});try{L+e>=M-1&&(D.current=1)}catch(h){console.log(h)}return(0,v.jsx)(v.Fragment,{})}},"event-horizontal-scroll-slide"+t.event_id)))]})})}),(0,v.jsx)(s.M5,{children:(0,v.jsx)(sn,{height:.04*i,width:.1*o,fontSize:.02*i})})]})})},hn=n(6090),un=n(7616),pn=n(9302),xn=n(2575);var vn=function(t){const[e,n,i,o]=(0,u.Z)(),[r]=(0,h.j1)("whatmorePrimaryColor"),[l]=(0,h.j1)("whatmoreSecondaryColor"),a="flex-end";return(0,v.jsx)(s.M5,{children:(0,v.jsxs)(s.xu,{width:o,height:i,backgroundColor:"whiteAlpha.200",backdropBlur:"10px",children:[(0,v.jsx)(s.Kq,{direction:"column",justifyContent:a,height:"full",width:"full",children:(0,v.jsx)(s.xu,{borderRadius:"md",backgroundColor:"transparent",children:(0,v.jsx)(s.oM,{width:"full",ratio:o/i,children:(0,v.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+r+", gray, "+l+")"})})})}),(0,v.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:a,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,v.jsx)(s.xu,{padding:"2px",margin:"5px",borderRadius:"md",backgroundColor:"transparent",children:(0,v.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,v.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",backdropFilter:"auto",backdropBlur:"5px"})})})})]})})};var mn=function(t){var e;const n=t.stories,i=t.onBack,o=t.onStoryCompleteCallback,a=t.isActive,c=null!==(e=t.initialEventIndex)&&void 0!==e?e:0,p=n.events;var[x,m,g,f]=(0,u.Z)();const[w,C]=(0,j.Z)(),[y]=(0,h.j1)("isInDesignMode"),[S]=(0,h.j1)("isDemoBrand"),[b]=(0,h.j1)("whatmoreShopId"),[k,I]=(0,r.useState)(!0),[_,F]=(0,h.j1)("isFirstIndicatorRenderDone"),[T,E]=(0,r.useState)(null),[P,O]=(0,r.useState)(!1),{whatmoreWidgetSourceDetails:L}=(0,r.useContext)(it.I),[z,R]=tn(c,p.length);function M(){i()}const D=L.landingLocationType,K=L.templateType;function A(){if(!(0,h.MO)("whatmoreAllowAutoSlide"))return;z().activeIndex+1>=p.length?o("right"):(R("right"),T&&T.slideNext())}function W(t){const e=z().activeIndex;"right"==t&&e+1>=p.length||"left"==t&&e-1<0?o(t):(R(t),T&&("left"==t?T.slidePrev():T.slideNext()))}return p[z().activeIndex],(0,v.jsx)("div",{children:(0,v.jsx)(l.tq,{speed:1,slidesPerView:1,direction:"horizontal",initialSlide:0,loop:!0,height:g,width:f,watchSlidesProgress:!0,allowTouchMove:!1,onSwiper:t=>{E(t)},onSlideChange:t=>{k?I(!1):(_||F(!0),function(t){const e=(0,_t.NY)(D)+(0,_t.dS)(K)+"_"+(null===t||void 0===t?void 0:t.event_id);y||S||(async()=>{(0,d.wh)(t),(0,Qe.Tc)(b,$e.Xh,$e.OW),(0,mt.H4)(t.event_id,t.products,"homepage","stories",e)})()}(p[z().activeIndex]),(0,et.GF)({userInteractionType:nt.K.EVENT_VIEW,widgetSourceDetails:L,event:p[z().activeIndex],productList:p[z().activeIndex].products,ctaList:p[z().activeIndex].cta}))},children:[...Array(Math.min(p.length,3)).keys()].map((e=>(0,v.jsx)(l.o5,{children:e=>{let{isActive:i,isPrev:o,isNext:r,isVisible:l,isDuplicate:d}=e;if(a){const e=i?"activeIndex":o?"prevIndex":"nextIndex",r=p[z()[e]];return(0,v.jsx)(s.Kq,{direction:"column",height:g,justifyContent:"center",children:(0,Ae.B6)(r)||(0,Ae.WJ)(r)?(0,v.jsx)(Ke,{event:r,totalSiblingEvents:p.length,indexAmongSiblings:z()[e],onBack:M,isPlaying:a&&i&&l,isLast:!1,setLockSwiper:O,onVideoEndedCallback:A,progressUpdateCallback:t=>{},leftOpenSpaceClickHandler:()=>{W("left")},midOpenSpaceClickHandler:()=>{C(!w)},rightOpenSpaceClickHandler:()=>{W("right")},storyId:n.id,source:Ze.j.STORY_EVENT_OPENED,showCloseOverlay:null===t||void 0===t?void 0:t.showCloseOverlay},"shopping-video-view"+r.event_id):(0,v.jsx)(v.Fragment,{})})}return(0,v.jsx)(s.Kq,{direction:"column",height:x,justifyContent:"center",children:(0,v.jsx)(vn,{})})}},"event-story-view-slide-"+e)))})})};var gn=function(t){const e=t.onBack,n=t.eventsStories,i=t.initialStoryIndex;var[o,c,p,x]=(0,u.Z)();const[m]=(0,h.j1)("isInDesignMode"),[g]=(0,h.j1)("isDemoBrand"),[f,w]=(0,r.useState)(!0),[j,C]=(0,h.j1)("isFirstIndicatorRenderDone"),[y,S]=(0,r.useState)(!1),{setCloseClickComponent:b}=(0,r.useContext)(yn),{slideDirection:k}=(0,r.useContext)(yn),[I]=(0,h.j1)("whatmoreShopId"),[_,F]=tn(i,n.length),[T,E]=en("horizontal",50),[P]=nn("vertical",30),O=t.eventIndex,[L,z]=(0,r.useState)(!1),[R,M]=(0,r.useState)(null),{whatmoreWidgetSourceDetails:D}=(0,r.useContext)(it.I);function K(){z(!1)}function A(){K(),setTimeout((()=>{e()}),500)}(0,r.useEffect)((()=>(z(!0),()=>{})),[]),b(A);const W=D.landingLocationType,N=D.templateType;function q(t){R&&(0,h.MO)("whatmoreAllowAutoSlide")&&(F(t),"right"==t?R.slideNext():R.slidePrev())}function H(t,e){q(e)}return(0,v.jsx)(Be(),{isOpen:L,onAfterOpen:function(){},onRequestClose:K,overlayClassName:"whatmore-modal",className:"whatmore-modal-content",ariaHideApp:!1,children:(0,v.jsx)("div",{style:{height:window.innerHeight,width:window.innerWidth,backgroundColor:"#00000088"},onTouchStart:t=>{T(t)},onTouchEnd:t=>{const e=E(t);e&&H(0,e)},onWheel:t=>{P(t,(t=>{H(0,t)}))},children:(0,v.jsx)(l.tq,{speed:1,slidesPerView:1,direction:"horizontal",modules:[a.SH,a.Gk],initialSlide:i,loop:n.length>1,height:window.innerHeight,width:window.innerWidth,watchSlidesProgress:!0,onSwiper:t=>{M(t)},onSlideChange:t=>{var e,i;f?w(!1):(!function(t){const e=(0,_t.NY)(W)+(0,_t.dS)(N)+"_"+(null===t||void 0===t?void 0:t.event_id);m||g||(async()=>{(0,d.wh)(t),(0,Qe.Tc)(I,$e.Xh,$e.OW),(0,mt.H4)(t.event_id,t.products,"homepage","stories",e)})()}(n[_().activeIndex].events[0]),(0,et.GF)({userInteractionType:nt.K.EVENT_VIEW,widgetSourceDetails:D,event:n[_().activeIndex].events[0],productList:null===(e=n[_().activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(i=n[_().activeIndex].events[0])||void 0===i?void 0:i.cta}))},allowTouchMove:!1,cubeEffect:{shadow:!0,slideShadows:!0,shadowOffset:20,shadowScale:.94},children:[...Array(Math.min(n.length,3)).keys()].map((t=>(0,v.jsx)(l.o5,{children:t=>{let{isActive:e,isPrev:r,isNext:l,isVisible:a,isDuplicate:d}=t;const c=e?"activeIndex":r?"prevIndex":"nextIndex";return(0,v.jsx)(s.Kq,{direction:"column",height:o,justifyContent:"center",children:(0,v.jsx)(mn,{stories:n[_()[c]],onBack:A,isActive:e&&a,isNext:l,isPrev:r,onStoryCompleteCallback:q,nextStories:n[_().nextIndex],prevStories:n[_().prevIndex],initialEventIndex:i==_()[c]?O:0},"event-story-view-"+n[_()[c]].id)})}},"event-vertical-scroll-slide-"+t)))})})})},fn=n(4892);var wn=function(t){var e,n,i,[o,l,a,d]=(0,u.Z)();const[c]=(0,h.j1)("whatmorePrimaryColor"),[p]=(0,h.j1)("whatmoreSecondaryColor"),x=t.event,m=(t.onBack,r.useRef(),null!==(e=t.showPausedVideo)&&void 0!==e&&e),f=null!==(n=t.heightFactor)&&void 0!==n?n:1,w="flex-end";return d*=null!==(i=t.widthFactor)&&void 0!==i?i:1,a*=f,(0,v.jsx)(s.M5,{children:(0,v.jsxs)(s.xu,{width:d,height:a,children:[(0,v.jsx)(s.Kq,{direction:"column",justifyContent:w,height:"full",width:"full",children:(0,v.jsx)(s.xu,{children:(0,v.jsx)(s.oM,{width:"full",ratio:9/16,children:m?(0,Ae.B6)(x)||(0,Ae.WJ)(x)?(0,v.jsx)(fn.Z,{height:"100%",width:"100%",url:x.thumbnail_image,isPlaying:!1,pauseFromPlayTimeInMs:1e3,event:x}):(0,v.jsx)(g.Ee,{width:"full",height:"full",src:x.thumbnail_image,objectFit:"cover",borderRadius:"lg"}):(0,v.jsx)(s.xu,{w:"100%",h:"100%",bgGradient:"linear(to-br, "+c+", gray, "+p+")"})})})}),(0,v.jsx)(s.Kq,{style:{position:"relative",zIndex:1,bottom:"100%"},direction:"column",justifyContent:w,height:"full",width:"full",className:"whatmore-ios-css-relative-fix",children:(0,v.jsx)(s.xu,{children:(0,v.jsx)(s.oM,{width:"full",ratio:9/16,children:(0,v.jsx)(s.xu,{width:"full",height:"full",backgroundColor:"blackAlpha.400"})})})})]})})};var jn=function(t){var[e,n,i,o]=(0,u.Z)();const[c]=(0,h.j1)("isInDesignMode"),[p]=(0,h.j1)("isDemoBrand"),[x,m]=(0,h.j1)("isFirstIndicatorRenderDone"),[g,f]=(0,r.useState)(0!=t.eventIndex),{setCloseClickComponent:w}=(0,r.useContext)(yn),[j,C]=(0,r.useState)(!1),[y]=(0,h.j1)("whatmoreShopId"),{whatmoreWidgetSourceDetails:S}=(0,r.useContext)(it.I),[b,k]=(0,r.useState)(!1),[I,_]=(0,r.useState)(null);function F(){k(!1)}t.events;const T=t.eventIndex,E=t.onBack,P=t.eventsStories,O=t.initialStoryIndex;function L(){F(),setTimeout((()=>{E()}),500)}(0,r.useEffect)((()=>(k(!0),()=>{})),[]),w(L);const z=S.landingLocationType,R=S.templateType;function M(t){I&&!I.isEnd&&("right"==t?I.slideNext():I.slidePrev())}const D=parseInt(Math.min(5,P.length));return(0,v.jsx)(dn,{show:b,closeCallback:F,customClass:"whatmore-landscape-modal-stories-view",children:(0,v.jsxs)(s.Kq,{direction:"column",width:window.innerWidth,height:window.innerHeight,justifyContent:"center",aligntItems:"center",backgroundColor:"blackAlpha.800",children:[(0,v.jsx)(s.M5,{children:(0,v.jsx)(s.xu,{height:"fit-content",width:o*D,children:(0,v.jsxs)(l.tq,{onInit:t=>{_(t)},slidesPerView:D,centeredSlides:!0,allowTouchMove:!1,initialSlide:O,modules:[a.lI,a.W_,a.Gk],navigation:D>=5,effect:"coverflow",coverflowEffect:{rotate:-8,stretch:Math.floor(.22*i),depth:100,scale:.7,modifier:1,slideShadows:!1},height:"fit-content",width:o*D,watchSlidesProgress:!0,onSlideChange:t=>{var e,n;g?f(!1):(x||m(!0),function(t){const e=(0,_t.NY)(z)+(0,_t.dS)(R)+"_"+(null===t||void 0===t?void 0:t.event_id);c||p||(async()=>{(0,d.wh)(t),(0,Qe.Tc)(y,$e.Xh,$e.OW),(0,mt.H4)(t.event_id,t.products,"homepage","stories",e)})()}(P[t.activeIndex].events[0]),(0,et.GF)({userInteractionType:nt.K.EVENT_VIEW,widgetSourceDetails:S,event:P[t.activeIndex].events[0],productList:null===(e=P[t.activeIndex].events[0])||void 0===e?void 0:e.products,ctaList:null===(n=P[t.activeIndex].events[0])||void 0===n?void 0:n.cta}))},mousewheel:{invert:!1,thresholdDelta:20},children:[P.length>2&&(0,v.jsx)("div",{className:"whatmore-shopping-close-button",children:(0,v.jsx)(V,{onCloseCallback:E})}),P.map(((t,e)=>(0,v.jsx)(l.o5,{children:n=>{let{isActive:r,isPrev:l,isNext:a,isVisible:d,isDuplicate:c}=n;if(r){const n=1;return(0,v.jsx)(s.Kq,{direction:"column",height:i,width:o*n,justifyContent:"center",marginLeft:"auto",marginRight:"auto",children:(0,v.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,v.jsx)(mn,{stories:t,onBack:L,isActive:r&&d,isNext:!1,isPrev:!1,onStoryCompleteCallback:M,initialEventIndex:O==e?T:0,showCloseOverlay:(null===P||void 0===P?void 0:P.length)<=2},"event-story-view-"+t.id)})})}return l||a?(0,v.jsx)(s.Kq,{direction:"column",height:i,width:o,justifyContent:"center",marginLeft:"auto",marginRight:"auto",onClick:t=>{I.slideTo(e,300)},children:(0,v.jsx)(s.xu,{borderRadius:"xl",overflow:"hidden",backgroundColor:"transparent",boxShadow:"dark-lg",children:(0,v.jsx)(wn,{showPausedVideo:!0,event:P[e].events[0],onBack:L,isPlaying:!1,setLockSwiper:C})})}):(0,v.jsx)(v.Fragment,{})}},"event-horizontal-scroll-slide-"+e)))]})})}),(0,v.jsx)(s.M5,{children:(0,v.jsx)(sn,{height:.04*i,width:.1*o,fontSize:.02*i})})]})})};const Cn=(0,xn.Z)({key:"whatmore-css-sv"}),yn=(0,r.createContext)({isIOS:!1,totalEvents:0,closeClickComponent:null,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:"vertical",showSwipeIndicator:!0});var Sn=function(t){var e,n;const[i,o,l]=(0,Te.Z)(),[a]=(0,h.j1)("whatmoreShopId"),{whatmoreRootId:d}=(0,r.useContext)(it.I),{whatmoreIsStoriesTemplate:s}=(0,r.useContext)(it.I);var u=t.events,p=t.index,x=t.onBack,m=t.eventsStories,g=t.initialStoryIndex,f=(0,c.cX2)(a),w=(u[p],"portrait"===i?null!==(e=t.slideDirection)&&void 0!==e?e:"vertical":null!==(n=t.slideDirection)&&void 0!==n?n:u.length>1?"horizontal":"vertical"),j="portrait"===i?!(0,c.h6H)(a)&&!s:(0,c.n89)(a);return u[p],(0,r.useLayoutEffect)((()=>{(0,c.TLG)(a)&&(window.location.href.includes(f)?history.replaceState(null,"","#"+f):history.pushState(null,"","#"+f),window.addEventListener("popstate",(()=>{window.location.href.includes(f)||x()})))}),[]),delete un.ZP.styles.global,s?(0,v.jsx)(pn.C,{value:Cn,children:(0,v.jsx)(hn.x,{theme:un.ZP,cssVarsRoot:d,resetCSS:!1,children:(0,v.jsx)(yn.Provider,{value:{isIOS:(0,We.KE)(),totalEvents:u.length,closeClickComponent:x,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:w,showSwipeIndicator:j},children:"portrait"===i?(0,v.jsx)(gn,{eventsStories:m,initialStoryIndex:g,onBack:x,eventIndex:p}):(0,c.Bbr)(a)?(0,v.jsx)(jn,{eventsStories:m,initialStoryIndex:g,onBack:x,eventIndex:p}):(0,v.jsx)(gn,{eventsStories:m,initialStoryIndex:g,onBack:x,eventIndex:p})})})}):(0,v.jsx)(pn.C,{value:Cn,children:(0,v.jsx)(hn.x,{theme:un.ZP,cssVarsRoot:d,resetCSS:!1,children:(0,v.jsx)(yn.Provider,{value:{isIOS:(0,We.KE)(),totalEvents:u.length,closeClickComponent:x,setCloseClickComponent:t=>{},showVideoPlayingData:!0,slideDirection:w,showSwipeIndicator:j},children:"portrait"===i?(0,v.jsx)(rn,{events:u,eventIndex:p,onBack:x}):(0,v.jsx)(cn,{events:u,eventIndex:p,onBack:x})})})})}},9316:function(t,e,n){n.d(e,{mT:function(){return s}});var i,o,r,l=n(168),a=n(686);const d=(0,a.F4)(i||(i=(0,l.Z)(["\n 0% { transform: scale(1); }\n 50%, { transform: scale(0.95); }\n 100% { transform: scale(1); }\n"]))),s="\n ".concat(d," 0.2s linear;\n"),c=(0,a.F4)(o||(o=(0,l.Z)(["\n 100% { \n -webkit-transform: rotate(360deg); \n transform:rotate(360deg); \n }\n"]))),h=("\n ".concat(c," 0.5s infinite linear;\n"),(0,a.F4)(r||(r=(0,l.Z)(["\n 0% { \n opacity: 1;\n transform: translateY(100%);\n }\n 10%{\n transform: translateY(0%);\n }\n 12%{\n transform: translateY(-5%);\n }\n 20%{\n transform: translateY(0%);\n }\n 95%{\n opacity: 1;\n transform: scale(1);\n }\n 100%{\n opacity: 0;\n }\n"]))));"\n ".concat(h," ").concat(3,"s ease-in-out;\n")},6163:function(t,e,n){n.r(e),n.d(e,{default:function(){return w}});var i=n(3271),o=n(5427),r=n(7313),l=n(7753),a=n(756),d=(n(4844),n(5160));var s=n(9316),c=n(9748),h=n(3218),u=n(9854),p=(n(7605),n(7053)),x=n(9852),v=n(7376),m=n(778),g=n(6417);function f(t){var e;const[n]=(0,l.j1)("whatmoreSecondaryColor"),[r]=(0,l.j1)("whatmorePrimaryFont"),a=null!==(e=t.baseFontSize)&&void 0!==e?e:10,d=t.width,s=t.height;return(0,g.jsx)(i.xu,{width:d,height:s,padding:"0px",boxShadow:"lg",borderRadius:"md",backgroundColor:"white",borderColor:n,borderWidth:"1px",children:(0,g.jsxs)(i.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"2px",justifyContent:"center",children:[(0,g.jsxs)(i.xv,{color:n,fontSize:1.3*a,fontWeight:"semibold",sx:{fontFamily:r+" !important"},children:["\xa0"," In Cart ","\xa0"]}),(0,g.jsx)(i.M5,{paddingX:"5px",children:(0,g.jsx)(o.Z,{sx:{color:n,fontSize:1.5*a}})})]})})}var w=function(t){var e,n,o,w;const[j]=(0,l.j1)("whatmorePrimaryFont"),[C]=(0,l.j1)("isInDesignMode"),[y]=(0,l.j1)("isDemoBrand"),[S,b]=(0,l.j1)("appCartData"),[k]=(0,l.j1)("whatmoreShopId"),[I]=[(0,u.hmr)(k)],_=(0,u.hmr)(k),[F,T]=(0,r.useState)(!1),[E,P]=(0,r.useState)({state:"initial"}),[O,L]=(0,r.useState)({loaded:!1,client_product_id:"",variant_id:"",variant_price:""}),{closeClickComponent:z}=(0,r.useContext)(h.EventClickComponentContext),{whatmoreWidgetSourceDetails:R}=(0,r.useContext)(x.I),M=t.event,D=t.product,K=null!==(e=t.baseFontSize)&&void 0!==e?e:10;function A(t,e,n){C||y||(async()=>{(0,d.JX)(t,e,n)})()}(0,r.useEffect)((()=>{!async function(){var t,e,n,i;const o=await(0,p.p)(D,(0,u.Ipo)(k),k);L({loaded:!0,client_product_id:D.client_product_id,variant_id:null===o||void 0===o||null===(t=o.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.id,variant_price:null===o||void 0===o||null===(n=o.variants)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.price})}()}),[]);const W=null!==(n=t.width)&&void 0!==n?n:"fit-content",N=null!==(o=t.height)&&void 0!==o?o:"fit-content",q=(null!==(w=(0,u.Jb1)(k))&&void 0!==w?w:2)+"px";return O.loaded?(0,g.jsx)("div",{style:{width:W,height:N},children:(0,g.jsx)("a",{href:"javascript:void(0)","data-variant-id":O.variant_id,"data-action-atc":"",rel:"nofollow","aria-describedby":"a11y-external-message",children:(0,g.jsx)(c.zx,{type:"submit",className:(0,u.Sl8)(k),sx:{width:W,height:N,minHeight:N},onClick:t=>{T(!0),A(M,D,1),(0,v.GF)({userInteractionType:m.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:R,event:M,productList:[D],ctaList:M.cta}),null!==z&&setTimeout((()=>{z()}),2e3)},children:"initial"===E.state?(0,g.jsx)(a.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:N,width:W},children:(0,g.jsx)(i.xu,{width:"100%",height:"100%",padding:q,boxShadow:"lg",borderRadius:"md",backgroundColor:_,borderColor:_,borderWidth:"1px",animation:F?s.mT:null,onAnimationEnd:()=>{T(!1)},children:(0,g.jsx)(i.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",children:(0,g.jsx)(i.M5,{children:(0,g.jsxs)(i.xv,{lineHeight:"100%",fontSize:1.3*K,fontWeight:"semibold",sx:{fontFamily:j+" !important",color:(0,u.KCy)(k)+" !important"},children:["\xa0"," ADD TO CART ","\xa0"]})})})})}):(0,g.jsx)(a.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:N,width:W},children:(0,g.jsx)(f,{event:M,product:D,baseFontSize:K,cartState:E,width:W,height:N})})})})}):(0,g.jsx)(g.Fragment,{})}},2634:function(t,e,n){var i=n(3271),o=n(4897),r=n(499),l=n(6417);e.Z=function(t){var e,n=t.event,a=t.fontSize,d=null!==(e=t.maxWidth)&&void 0!==e?e:"100%",{status:s,bannerText:c,timeToStartInMins:h}=o.Z.getEventStatus(n);return s.name===r.Z.LIVE.name?(0,l.jsx)(i.xu,{maxWidth:d,width:"fit-content",borderRadius:"md",paddingLeft:"2px",paddingRight:"2px",backgroundColor:"tomato",color:s.color,children:(0,l.jsx)(i.Kq,{direction:"row",justifyContent:"flex-start",width:"fit-content",alignContent:"center",paddingLeft:"2px",paddingRight:"2px",children:(0,l.jsx)(i.xv,{fontSize:a,fontWeight:"bold",color:"white",children:c})})}):(0,l.jsx)(i.xu,{maxWidth:d,borderRadius:"md",paddingLeft:"2px",paddingRight:"2px",backgroundColor:"white",color:s.color,children:(0,l.jsx)(i.Kq,{direction:"row",justifyContent:"flex-start",width:"fit-content",alignContent:"center",children:(0,l.jsx)(i.xv,{fontSize:a,fontWeight:"medium",children:c})})})}},7605:function(t,e,n){n.d(e,{a:function(){return i}});n(5160);const i=async function(t,e,n,i,o,r,l,a,d,s){}},1896:function(t,e,n){n.d(e,{Z:function(){return w}});var i=n(7313),o=n(7300),r=n(6422),l=n(3218),a=n(3175),d=n(2887),s=n(7753),c=n(58),h=n(3433),u=n(9854),p=n(4862),x=(n(8743),n(9852)),v=n(6417);function m(t){var e,n,o;const[l,d]=(0,r.Z)(),[m,g]=(0,i.useState)(i.useRef()),f=t.posterImage,[w,j]=(0,s.j1)("whatmoreVideoPlayerPoolBlessed"),[C,y]=(0,i.useState)(!0),[S,b]=(0,i.useState)(!1),k=t.timeUpdateCallback,{whatmoreIsPreviewMode:I}=(0,i.useContext)(x.I),_=null!==(e=t.isVideoMuted)&&void 0!==e?e:l,F=null!==(n=t.height)&&void 0!==n?n:"100%",T=null!==(o=t.width)&&void 0!==o?o:"100%",E=(0,s.MO)("whatmoreShopId");(0,i.useLayoutEffect)((()=>{var e;m.current&&w&&(0==m.current.children.length?((e=(0,c.Bi)(m.current,t.url,_||!t.isPlaying,t.isPlaying)).addEventListener("loadeddata",(()=>{y(!1)})),k&&e.addEventListener("timeupdate",(t=>{var n,i;e&&k(null!==(n=e.currentTime)&&void 0!==n?n:0,null!==(i=e.duration)&&void 0!==i?i:0)}))):((e=m.current.children[0]).muted=_||!t.isPlaying,t.isPlaying?e.play():(e.pause(),(0,u.dF_)(E)&&t.source==h.j.CAROUSEL_EVENT_OPENED&&(!t.isPlaying&&e.play(),setTimeout((()=>{!t.isPlaying&&e.pause()}),p.G6?1900:800)))))}),[_,t.isPlaying,w,C]),(0,i.useLayoutEffect)((()=>()=>{m.current&&0!=m.current.children.length&&(0,c.P7)(m.current)}),[]);const P=(0,s.MO)("whatmoreLandingLocationType");return(0,v.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:T,height:F,overflow:"hidden",backgroundColor:I?(0,u.WNM)(E):(0,u.Gy3)(E)},children:[(0,v.jsx)("div",{ref:m,style:{width:C?"0px":"100%",height:C?"0px":I?(0,u.Yiq)(E):"40273707171"==E&&"product"==P?"auto":(0,u.MT6)(E)},className:"whatmore-video-player-ios-holder"}),"40273707171"!==E&&C&&S?(0,v.jsx)(v.Fragment,{children:(0,v.jsx)("div",{style:{width:"100%",height:"100%",position:"relative"},children:(0,v.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,v.jsx)("img",{src:f,height:F,width:T,style:{animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})})})}):C&&!S&&(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)("div",{style:{width:"100%",height:"100%",position:"relative"},children:[(0,v.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,v.jsx)("img",{src:f,height:F,width:T,onLoad:()=>{b(!0)},style:{animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})}),(0,v.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,v.jsx)(a.Z,{width:T,height:F,style:{position:"absolute",top:"50%",left:"50%",opacity:"0.6"}})})]})})]})}var g=function(t){var e;return(0,v.jsx)(m,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback,isVideoMuted:null!==(e=t.isVideoMuted)&&void 0!==e?e:null,source:t.source,posterImage:t.posterImage})};function f(t){var e,n,o;const[l,d]=(0,r.Z)(),[c,m]=(0,i.useState)(!1),[g,f]=(0,i.useState)(!1),w=t.setDuration,j=(0,i.useRef)(null),C=(0,s.MO)("whatmoreShopId"),y=t.timeUpdateCallback,{whatmoreIsPreviewMode:S}=(0,i.useContext)(x.I),b=(0,s.MO)("whatmoreLandingLocationType"),k=null!==(e=t.height)&&void 0!==e?e:"100%",I=null!==(n=t.width)&&void 0!==n?n:"100%",_=null!==(o=t.isVideoMuted)&&void 0!==o?o:l,F=null===t||void 0===t?void 0:t.posterImage;return(0,i.useEffect)((()=>{j.current&&(t.isPlaying?j.current.paused&&j.current.play():j.current.pause(),y&&j.current.addEventListener("timeupdate",(t=>{var e,n;j.current&&y(null!==(e=j.current.currentTime)&&void 0!==e?e:0,null!==(n=j.current.duration)&&void 0!==n?n:0)})))}),[t.isPlaying]),(0,v.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:I,height:k,overflow:"hidden",backgroundColor:S?(0,u.WNM)(C):(0,u.Gy3)(C)},children:[(0,v.jsx)("div",{style:{width:c?"100%":"0px",height:c?S?(0,u.Yiq)(C):"40273707171"==C&&"product"==b?"auto":(0,u.MT6)(C):"0px"},children:(0,v.jsx)("video",{ref:j,className:"whatmore-video-player",preload:"auto",loop:!0,playsInline:!0,muted:!(!_&&t.isPlaying),src:t.url,onLoadedData:()=>{m(!0),t.isPlaying&&j.current&&j.current.play(),(0,u.dF_)(C)&&t.source==h.j.CAROUSEL_EVENT_OPENED&&(!t.isPlaying&&j.current&&j.current.play(),setTimeout((()=>{!t.isPlaying&&j.current&&j.current.pause()}),p.G6?1900:800))},onLoadedMetadata:()=>{j.current&&w&&w(j.current.duration)},poster:F})}),"40273707171"!==C&&!c&&g?(0,v.jsx)(v.Fragment,{children:(0,v.jsx)("div",{style:{width:"100%",height:"100%",position:"relative"},children:(0,v.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,v.jsx)("img",{src:F,height:k,width:I,style:{animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})})})}):!c&&!g&&(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)("div",{style:{width:"100%",height:"100%",position:"relative"},children:[(0,v.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,v.jsx)("img",{src:F,height:k,width:I,onLoad:()=>{f(!0)},style:{animation:t.isPlaying?"fadeInFromNoneAnimation 1.5s infinite":""}})}),(0,v.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,v.jsx)(a.Z,{width:I,height:k,style:{position:"absolute",top:"50%",left:"50%",opacity:"0.6"}})})]})})]})}var w=function(t){var e,n,r,a;return(0,o.WJ)(t.event)?(0,v.jsx)(d.Z,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback}):1==(0,i.useContext)(l.EventClickComponentContext).isIOS&&1==(0,s.MO)("whatmoreVideoPlayerPoolBlessed")?(0,v.jsx)(g,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback,isVideoMuted:null!==(r=t.isVideoMuted)&&void 0!==r?r:null,source:t.source,posterImage:null===(a=t.event)||void 0===a?void 0:a.poster_image}):(0,v.jsx)(f,{height:t.height,width:t.width,url:t.url,isPlaying:t.isPlaying,timeUpdateCallback:t.timeUpdateCallback,isVideoMuted:null!==(e=t.isVideoMuted)&&void 0!==e?e:null,setDuration:t.setDuration,source:t.source,posterImage:null===(n=t.event)||void 0===n?void 0:n.poster_image})}},3433:function(t,e,n){n.d(e,{j:function(){return i}});const i={BANNER:"banner",CAROUSEL_EVENT_OPENED:"carousel_event_opened",CAROUSEL_THUMBNAIL_VIEW:"carousel_thumbnail_view",STORY_EVENT_OPENED:"story_event_opened",STORY_THUMBNAIL_VIEW:"story_thumbnail_view"}},6119:function(t,e,n){var i,o=n(168),r=n(3271),l=n(7313),a=n(7789),d=n(7753),s=n(686),c=n(9854),h=n(9852),u=n(5160),p=n(6417);const x=(0,s.F4)(i||(i=(0,o.Z)(["\n 0% { \n opacity: 0;\n }\n 10%{\n opacity: 0.5;\n }\n 20%{\n opacity: 1;\n }\n \n"]))),v=("\n ".concat(x," ").concat(3,"s ease-in-out;\n"),function(t,e){return(0,c.lj5)(e)?t+"?"+(0,c.awP)(e)+"&"+(0,c.n9s)(e)+"&"+(0,c.poG)(e):t});e.Z=function(t){var e;const[n,i,o,s]=(0,a.Z)(),[x,m]=(0,l.useState)(!1),{whatmoreUITheme:g}=(0,l.useContext)(h.I),f=(0,d.MO)("isInDesignMode"),w=(0,d.MO)("isDemoBrand"),j=(0,d.MO)("whatmoreSecondaryColor"),C=(0,d.MO)("whatmoreSecondaryColorShade1200"),y=(0,d.MO)("whatmorePrimaryFont"),S=(0,d.MO)("whatmoreShopId"),b=(t.event,t.cta);if(""==b.cta_title.trim())return(0,p.jsx)(p.Fragment,{});const k=.05*s;return(0,p.jsx)(r.M5,{children:(0,p.jsx)(r.Kq,{direction:"row",height:"fit-content",width:"100%",justifyContent:"center",marginBottom:.03*s+"px",marginTop:.03*s+"px",children:(0,p.jsx)(r.rU,{href:v(b.cta_link,S),color:"white",onClick:()=>{f||w||(async()=>{(0,u.uD)(t)})()},children:(0,p.jsx)(r.xv,{fontSize:k*(null!==(e=t.fontFactor)&&void 0!==e?e:1)+"px",variant:"subtle",textColor:j,bgColor:C,sx:{borderRadius:"round"==g?"5px":"0px",borderWidth:(0,c.p5R)(S),borderColor:"#343434"===(0,c.yxc)(S)?j:(0,c.yxc)(S),fontFamily:y+" !important",textAlign:"center!important",fontWeight:"bold"},paddingY:"8px",paddingX:.05*s+"px",children:b.cta_title})})})})}},8782:function(t,e,n){n.d(e,{P:function(){return a}});var i=n(3933),o=n(7313),r=(n(123),n(6417));function l(t){const{ref:e,inView:n,entry:o}=(0,i.YD)({triggerOnce:t.retainAlreadyRenderedElements});return(0,r.jsx)("div",{ref:e,children:n?t.renderElement({eventData:null===t||void 0===t?void 0:t.data}):(0,r.jsx)("div",{style:{minWidth:t.defaultHeight,minHeight:t.defaultWidth}})})}function a(t){var e,n;return(0,o.useEffect)((()=>{const t=document.querySelector(".whatmore-carousel-horizontal-flex");let e,n=!1;function i(t){t.touches&&(null===t||void 0===t?void 0:t.touches.length)>0?(n=!0,e=t.touches[0].clientX):(n=!0,e=t.clientX)}function o(i){if(!n)return;const o=i.touches?i.touches[0].clientX:i.clientX;t.style.pointerEvents="none";const r=2*(e-o);t.scrollLeft+=r,e=o}function r(e){t.style.pointerEvents="auto",n=!1}return t&&("ontouchstart"in window&&(t.addEventListener("touchstart",i),t.addEventListener("touchmove",o),t.addEventListener("touchend",r)),t.addEventListener("mousedown",i),document.addEventListener("mousemove",o),document.addEventListener("mouseup",r)),()=>{t&&("ontouchstart"in window&&(t.removeEventListener("touchstart",i),t.removeEventListener("touchmove",o),t.removeEventListener("touchend",r)),t.removeEventListener("mousedown",i),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r))}}),[]),(0,r.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",height:"fit-content",width:"100%",gap:null!==(e=t.spacing)&&void 0!==e?e:3},className:"whatmore-carousel-horizontal-flex",children:null===t||void 0===t||null===(n=t.dataList)||void 0===n?void 0:n.map(((e,n)=>(0,r.jsx)(l,{renderElement:t.renderElement,data:e,defaultHeight:t.defaultHeight,defaultWidth:t.defaultWidth,retainAlreadyRenderedElements:t.retainAlreadyRenderedElements},"key-"+n)))})}},342:function(t,e,n){n.d(e,{WN:function(){return o},uv:function(){return i}});const i=function(t){var e;return"event_media_urls"in t?"image"===t.event_type?t.event_media_urls.primary.portrait.content_image_original:"secondary"in t.event_media_urls&&t.event_media_urls.secondary.portrait.content_video_1080p?t.event_media_urls.secondary.portrait.content_video_1080p:null!==(e=t.event_media_urls.primary.portrait.content_video_1080p)&&void 0!==e?e:null:t.event_hls_url},o=function(t){return"event_media_urls"in t?"image"===t.event_type?t.event_media_urls.primary.landscape.content_image_original:"secondary"in t.event_media_urls&&t.event_media_urls.secondary.landscape.content_video_1080p?t.event_media_urls.secondary.landscape.content_video_1080p:t.event_media_urls.primary.landscape.content_video_1080p:t.event_hls_url}},6422:function(t,e,n){var i=n(7313),o=n(7753);e.Z=function(t){const[e,n]=(0,o.j1)("muted");return(0,i.useEffect)((()=>{}),[]),[e,n]}},7789:function(t,e,n){var i=n(8866);e.Z=function(t){const[e,n,o]=(0,i.Z)();var r="landscape"==e?n*(9/16):o;if("landscape"==e){const t=.85;return[n,r,n*t,r*t]}return[n,r,n,r]}},7053:function(t,e,n){n.d(e,{p:function(){return r}});var i=n(1245),o=n(4844);async function r(t,e,n){return"shopify"==e?(0,o.bN)(t):(0,i.ln)(t,n)}},9111:function(){}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[582],{5582:function(e,t,a){a.r(t),a.d(t,{default:function(){return z}});var n=a(7753),i=a(7313),s=a(2860),r=a(499),o=a(4897),l=a(5160),c=a(9854),d=a(6967),u=a(8984),_=a(58),p=a(4669),m=a(513),h=a(9852),v=a(7300),f=a(6524),g=a(7643),y=a(778),w=a(6417);const b=i.lazy((()=>Promise.all([a.e(302),a.e(819),a.e(13),a.e(240),a.e(367),a.e(351),a.e(926),a.e(950),a.e(303),a.e(891)]).then(a.bind(a,4095)))),S=i.lazy((()=>Promise.all([a.e(302),a.e(819),a.e(13),a.e(240),a.e(367),a.e(576),a.e(950),a.e(364),a.e(530)]).then(a.bind(a,5523)))),I=i.lazy((()=>Promise.all([a.e(302),a.e(819),a.e(13),a.e(240),a.e(367),a.e(423),a.e(926),a.e(950),a.e(249),a.e(622)]).then(a.bind(a,3827)))),k=i.lazy((()=>Promise.all([a.e(302),a.e(819),a.e(13),a.e(240),a.e(367),a.e(423),a.e(926),a.e(950),a.e(249),a.e(965)]).then(a.bind(a,6071)))),T=i.lazy((()=>Promise.all([a.e(302),a.e(819),a.e(13),a.e(240),a.e(367),a.e(423),a.e(926),a.e(950),a.e(708)]).then(a.bind(a,1291)))),x=i.lazy((()=>Promise.all([a.e(302),a.e(580)]).then(a.bind(a,3580)))),E=i.lazy((()=>Promise.all([a.e(302),a.e(819),a.e(13),a.e(240),a.e(576),a.e(351),a.e(955),a.e(926),a.e(303),a.e(218),a.e(790)]).then(a.bind(a,3218)))),j=i.lazy((()=>Promise.all([a.e(302),a.e(819),a.e(13),a.e(240),a.e(367),a.e(351),a.e(926),a.e(950),a.e(303),a.e(197)]).then(a.bind(a,1492)))),L=i.lazy((()=>Promise.all([a.e(302),a.e(819),a.e(13),a.e(367),a.e(926),a.e(950),a.e(303),a.e(189)]).then(a.bind(a,9085)))),C=i.lazy((()=>Promise.all([a.e(302),a.e(819),a.e(13),a.e(240),a.e(367),a.e(576),a.e(950),a.e(303),a.e(364),a.e(299)]).then(a.bind(a,4362)))),M=i.lazy((()=>Promise.all([a.e(302),a.e(819),a.e(13),a.e(240),a.e(576),a.e(351),a.e(955),a.e(926),a.e(303),a.e(218),a.e(196)]).then(a.bind(a,4658)))),O=i.lazy((()=>Promise.all([a.e(302),a.e(819),a.e(13),a.e(240),a.e(367),a.e(423),a.e(926),a.e(950),a.e(84)]).then(a.bind(a,8767))));var A=function(e){const[t]=(0,n.j1)("isInDesignMode"),[a]=(0,n.j1)("isDemoBrand"),[A]=(0,n.j1)("whatmoreTopBottomPadding"),[D]=(0,n.j1)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:N}=(0,i.useContext)(h.I),[P]=(0,n.j1)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:R}=(0,i.useContext)(h.I),W=(0,n.MO)("isLandingSharedLink"),q=(0,n.MO)("whatmoreShareTemplateId"),G=(0,n.MO)("whatmoreShareStoryId"),K=(0,n.MO)("whatmoreShareEventId"),{whatmoreWidgetSourceDetails:z}=(0,i.useContext)(h.I),[V,B]=(0,i.useState)(-1),[H,U]=(0,i.useState)(null);let F=e.events,Z=[];if("template-banner-a"!==R){let e=0;for(let t=0;t<(null===F||void 0===F?void 0:F.length);t++){var Y,J,X,Q;const a=(null===F||void 0===F||null===(Y=F[t])||void 0===Y||null===(J=Y.products)||void 0===J?void 0:J.length)>0&&(null===F||void 0===F||null===(X=F[t])||void 0===X||null===(Q=X.products)||void 0===Q?void 0:Q.every((e=>"oos"===(null===e||void 0===e?void 0:e.product_status))));if(!(0,v.B6)(F[t])&&!(0,v.WJ)(F[t])||a){if((0,v.yC)(null===F||void 0===F?void 0:F[t])){var{status:$,bannerText:ee,timeToStartInMins:te}=o.Z.getEventStatus(F[t]);$.name===r.Z.LIVE.name&&(Z.push({...null===F||void 0===F?void 0:F[t],index:e}),e++)}}else Z.push({...null===F||void 0===F?void 0:F[t],index:e}),e++}}var ae=null;N&&!ae&&(ae=function(e){var t=e.reduce(((e,t,a)=>{var n=t.storyset_id;return n in e?(e[n].total_events=e[n].total_events+1,e[n].events.push(t)):e[n]={id:t.storyset_id,title:t.storyset_name,thumbnail_image:t.storyset_thumbnail_image,total_events:1,start_event_index:a,events:[t]},e}),{}),a=Object.values(t);return a.sort(((e,t)=>e.start_event_index-t.start_event_index)),a}(Z));const ne=z.landingLocationType,ie=z.templateType;function se(e){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,u.KE)()&&!n&&(0,_.QV)(),t||a||(async()=>{const t=ae[e].events[0],a=(0,f.NY)(ne)+(0,f.dS)(ie)+"_"+(null===t||void 0===t?void 0:t.event_id);(0,l.wh)(t),(0,p.Tc)(P,s.Xh,s.OW),(0,d.H4)(t.event_id,t.products,"homepage","stories",a)})();var r=0;null!=i&&ae[e].events.map(((e,t)=>{e.event_id==i&&(r=t)})),B(r),U(e)}function re(e){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,u.KE)()&&!n&&(0,_.QV)(),(0,v.B6)(e)||(0,v.WJ)(e))return t||a||(async()=>{const t=(0,f.NY)(ne)+(0,f.dS)(ie)+"_"+(null===e||void 0===e?void 0:e.event_id);(0,l.wh)(e),(0,p.Tc)(P,s.Xh,s.pR),(0,d.H4)(e.event_id,e.products,"homepage","carousel",t)})(),void B(e.index);const i=20;var{status:c,bannerText:m,timeToStartInMins:h}=o.Z.getEventStatus(e);h<=i&&c.name!==r.Z.LIVE.name?console.debug(" TODO : show toast on upcoming live event."):B(e.index)}function oe(e){return(0,w.jsx)(w.Fragment,{})}return(0,i.useEffect)((()=>{W&&R==(0,f.zv)(q)&&(null!=G&&N?ae.forEach(((e,t)=>{G==e.id&&se(t,!0,K)})):null!=K&&Z.forEach(((e,t)=>{K==e.event_id&&re(e,!0)})))}),[]),(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("div",{style:{marginTop:(N?D:A)+"px",marginBottom:(N?D:A)+"px"},children:"template-b"===R?(0,w.jsx)(i.Suspense,{children:(0,w.jsx)(b,{events:Z,onClick:re,heading:e.heading})}):"template-a-1"===R?(0,w.jsx)(i.Suspense,{children:(0,w.jsx)(S,{events:Z,onClick:re,heading:e.heading})}):"template-feed-a"===R?(0,w.jsx)(i.Suspense,{children:(0,w.jsx)(C,{events:Z,onClick:re,heading:e.heading})}):"template-collections-a"===R||"template-c"===R?(0,w.jsx)(i.Suspense,{children:(0,w.jsx)(g.u,{userInteractionType:y.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!a,children:(0,w.jsx)(I,{events:Z,index:V,setScreen:B,onClick:re,heading:e.heading})})}):"template-collections-b"===R||"template-d"===R?(0,w.jsx)(i.Suspense,{children:(0,w.jsx)(g.u,{userInteractionType:y.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!a,children:(0,w.jsx)(k,{events:Z,index:V,setScreen:B,onClick:re,heading:e.heading})})}):"template-collections-c"===R||"template-e"===R?(0,w.jsx)(i.Suspense,{children:(0,w.jsx)(g.u,{userInteractionType:y.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!a,children:(0,w.jsx)(T,{events:Z,index:V,setScreen:B,onClick:re,heading:e.heading})})}):"template-collections-d"===R?(0,w.jsx)(i.Suspense,{children:(0,w.jsx)(g.u,{userInteractionType:y.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!a,children:(0,w.jsx)(b,{events:Z,index:V,setScreen:B,onClick:re,heading:e.heading})})}):"template-collections-e"===R?(0,w.jsx)(i.Suspense,{children:(0,w.jsx)(g.u,{userInteractionType:y.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!a,children:(0,w.jsx)(j,{events:Z,index:V,setScreen:B,onClick:re,heading:e.heading})})}):"template-collections-stories"===R||"template-stories"===R?(0,w.jsx)(i.Suspense,{children:(0,w.jsx)(g.u,{userInteractionType:y.K.COLLECTION_WIDGET_VIEW,triggerFlag:!t&&!a,children:(0,w.jsx)(O,{events:Z,index:V,setScreen:B,onClick:re,heading:e.heading})})}):"template-f"===R||"template-collections-f"===R?(0,w.jsx)(i.Suspense,{children:(0,w.jsx)(g.u,{userInteractionType:y.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!a,children:(0,w.jsx)(L,{events:Z,onClick:re,heading:e.heading})})}):"template-banner-a"===R?(0,w.jsx)(i.Suspense,{children:(0,w.jsx)(g.u,{userInteractionType:y.K.BANNER_WIDGET_VIEW,event:F[0],triggerFlag:!t&&!a,children:(0,w.jsx)(M,{events:F})})}):N?(0,w.jsx)(i.Suspense,{children:(0,w.jsx)(g.u,{userInteractionType:y.K.STORIES_WIDGET_VIEW,triggerFlag:!t&&!a,children:(0,w.jsx)(x,{eventsStories:ae,onClick:se,template:R})})}):(0,w.jsx)(i.Suspense,{children:(0,w.jsx)(g.u,{userInteractionType:y.K.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!t&&!a,children:(0,w.jsx)(j,{events:Z,onClick:re,heading:e.heading})})})}),-1==V||-2==V?(0,w.jsx)(oe,{}):(0,w.jsx)(i.Suspense,{children:(0,w.jsx)(g.u,{userInteractionType:y.K.EVENT_VIEW,event:F[V],productList:F[V].products,cta:F[V].cta,triggerFlag:!t&&!a,children:(0,w.jsx)(E,{events:Z,index:V,onBack:function(e){(0,c.n2L)(P)&&(0,n.MO)("whatmoreAddedToCart")&&(0,m.D)(P,(()=>{}),100,window.location.hostname),B(-1)},slideDirection:N||"horizontal"===(0,c.e8z)(P)?"horizontal":"vertical",eventsStories:ae,initialStoryIndex:H,template:R})})})]})};const D=function(e,t,a){const i=(0,n.MO)("whatmoreShopId");var s=t.reduce(((e,t,a)=>(t.products.map((e=>e.client_product_id)).forEach((t=>{t in e||(e[t]=!0)})),e)),{}),r=Object.keys(s);if("60960964855"==i&&"undefined"!=typeof fera&&"function"===typeof fera.getRatings){var o={};fera.getRatings(r,(e=>{new Promise(((t,a)=>{e.forEach((e=>{o[e.external_product_id]={avgRating:e.average,totalRatings:e.count}})),t(o)})).then((e=>a(e)))}))}if("23114481744"==i){const e="1e6MQXxzYR19mpw9Km6Dcm86";o={};fetch("https://api.juniphq.com/v1/products?filter[remote_ids]="+r.toString(),{headers:{"Junip-Store-Key":e}}).then((e=>e.json())).then((e=>(e.products.forEach((e=>{o[e.remote_id]={avgRating:parseFloat(e.rating_average).toFixed(1),totalRatings:e.rating_count}})),o))).then((e=>a(e))).catch((e=>console.error(e)))}};var N=a(3388),P=a(7381),R=a(7376),W=a(7008);const q=[{event_id:2333,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:204,brand:"whatmore-dev",product_link:"https://www.aachho.com/products/sadabahaar-chanderi-suit-set",client_product_id:"6780183806018",price:"2800.00",currency:"INR",title:"Sadabahaar Chanderi Suit Set",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/2542/7564/products/5_72f81f91-e027-4497-9dfe-20480b862c54.jpg?v=1684509430",compare_price:"6999.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2022-12-27",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_b9c6f02e-6d5e-4250-97f8-71551c18c4e8.mp4",discount_coupon_image:"",event_hls_url:"https://d3syezql093hs1.cloudfront.net/whatmoredev/b9c6f02e-6d5e-4250-97f8-71551c18c4e8.mp4",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:1,event_state:"ready",poster_image:null,total_views:37,total_like:1,total_share:0,total_whatsapp:0},{event_id:2335,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:2108,brand:"whatmore-dev",product_link:"https://www.ordinaree.com/products/grease-black-designer-blackless-long-dress-for-women-online",client_product_id:"7210211311652",price:"5040.00",currency:"INR",title:"Grease Backless Long Dress",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0106/4897/7444/products/DSC_0377_45ee56eb-1240-4a17-9332-841809f132cf.jpg?v=1673001396",compare_price:"5600.00",product_metadata:null,product_status:"active"},{product_id:1955,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/black-anarkali-and-pant-with-dupatta",client_product_id:"7600010723466",price:"4125.00",currency:"INR",title:"BLACK ANARKALI AND PANT WITH DUPATTA",description:"BLACK ANARKALI AND PANT WITH DUPATTA",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/salwarsuitonlineindia-07285.jpg?v=1669434027&width=823",compare_price:"5200.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2022-12-27",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_e433898b-a5ec-4af6-b74f-2153ad609ffb.mp4",discount_coupon_image:"",event_hls_url:"https://d3syezql093hs1.cloudfront.net/whatmoredev/e433898b-a5ec-4af6-b74f-2153ad609ffb.mp4",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:4,event_state:"ready",poster_image:null,total_views:31,total_like:0,total_share:0,total_whatsapp:0},{event_id:2336,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:632,brand:"whatmore-dev",product_link:"https://www.meerasplussizestore.com/products/basil-brick-ajrakh-handblock-printed-kurta",client_product_id:"6864880173194",price:"876.00",currency:"INR",title:"Basil & Brick Ajrakh Handblock Printed Kurta",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0363/0075/0986/products/Dark-Green-Maroon-Pati-Ajrakh-Kurti-SCL_6948.jpg?v=1653729466",compare_price:"2190.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2022-12-27",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_5ddea9a1-4839-4db8-aa1c-843c14dd1cbb.mp4",discount_coupon_image:"",event_hls_url:"https://d3syezql093hs1.cloudfront.net/whatmoredev/5ddea9a1-4839-4db8-aa1c-843c14dd1cbb.mp4",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:5,event_state:"ready",poster_image:null,total_views:21,total_like:0,total_share:0,total_whatsapp:0},{event_id:2338,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:1728,brand:"whatmore-dev",product_link:"https://suta.in/products/ratri-kamal",client_product_id:"6916488003649",price:"4200.00",currency:"INR",title:"Ratri kamal",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0026/6544/7536/products/ratri-kamal-293774.jpg?v=1668084259",compare_price:null,product_metadata:null,product_status:"active"},{product_id:1732,brand:"whatmore-dev",product_link:"https://suta.in/products/kedar-ki-dor-blouse",client_product_id:"6625859502145",price:"4200.00",currency:"INR",title:"Kedar Ki Dor",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0026/6544/7536/files/DSC01009.jpg?v=1712326816",compare_price:null,product_metadata:null,product_status:"active"},{product_id:1736,brand:"whatmore-dev",product_link:"https://suta.in/products/swarna-kamal",client_product_id:"6916483317825",price:"4200.00",currency:"INR",title:"Swarna Kamal",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0026/6544/7536/products/swarna-kamal-472043.jpg?v=1668093054",compare_price:null,product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2022-12-27",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_496a26de-50cd-4823-8731-a97e0757efcf.mp4",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_496a26de-50cd-4823-8731-a97e0757efcf.mp4?v=1677477938",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:6,event_state:"ready",poster_image:null,total_views:28,total_like:0,total_share:0,total_whatsapp:0},{event_id:3255,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:3636,brand:"whatmore-dev",product_link:"https://buysohi.com/products/sohear8383",client_product_id:"7679599771864",price:"543.00",currency:"INR",title:"Gold Plated Pearl Stud",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0626/0218/2872/products/SS22_SOHEAR8383_1.jpg?v=1651755514",compare_price:"1699.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2023-01-24",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_b0045891-f042-47d4-a87a-187c96a1857e.mp4",discount_coupon_image:"",event_hls_url:"https://d3syezql093hs1.cloudfront.net/whatmoredev/b0045891-f042-47d4-a87a-187c96a1857e.mp4",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:7,event_state:"ready",poster_image:null,total_views:36,total_like:1,total_share:3,total_whatsapp:0},{event_id:3877,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:1955,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/black-anarkali-and-pant-with-dupatta",client_product_id:"7600010723466",price:"4125.00",currency:"INR",title:"BLACK ANARKALI AND PANT WITH DUPATTA",description:"BLACK ANARKALI AND PANT WITH DUPATTA",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/salwarsuitonlineindia-07285.jpg?v=1669434027&width=823",compare_price:"5200.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2023-02-03",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_CoH_liSAYOj.mp4",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_CoH_liSAYOj_b1999a62-134d-4301-9808-5d09e64a8979.mp4?v=1677477812",presenter_email:null,presenter_phone:null,room_id:null,event_type:"video",is_active:!0,rank:20,event_state:"ready",poster_image:null,total_views:16,total_like:0,total_share:0,total_whatsapp:0},{event_id:4188,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:4459,brand:"whatmore-dev",product_link:"https://theethnic.co/products/black-ruching-jacket-kurta-set",client_product_id:"8011323769076",price:"7499.00",currency:"INR",title:"Black Ruching Jacket Kurta Set",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0650/7937/8164/products/1_5102cd2e-a419-4682-abf1-d9619e6e96d7.jpg?v=1674275880",compare_price:"9999.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2023-02-07",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_c398aa0e-f0ac-4aba-91f5-4b1bcc5b1d51.mp4",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_7acda7d8-9762-47c7-9ee2-35e14db4c3fb.mp4?v=1677477803",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:23,event_state:"ready",poster_image:null,total_views:8,total_like:0,total_share:1,total_whatsapp:0},{event_id:28701,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[],cta:[{cta_id:364,cta_link:"https://lovechild.in/collections/fragrances",client_cta_id:"https://lovechild.in/collections/fragrances",cta_title:"Explore",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-01-10",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://d2r0bijhs9mx1s.cloudfront.net/whatmoredev/tn_20c05e5e-43cd-45cd-b1a4-5c942fb732d1.mp4",discount_coupon_image:"",event_hls_url:"https://d1zl4k1t5o4s75.cloudfront.net/whatmoredev/1080p_20c05e5e-43cd-45cd-b1a4-5c942fb732d1.mp4",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:57,event_state:"ready",poster_image:null,total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:28767,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:26392,brand:"whatmore-dev",product_link:"https://www.aachho.com/products/shimmering-mustard-sequin-georgette-suit-set",client_product_id:"6981740691522",price:"4199.00",currency:"INR",title:"Shimmering Mustard Sequin Georgette Suit Set",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/2542/7564/files/0H8A1426.jpg?v=1697874844",compare_price:"5999.00",product_metadata:null,product_status:"active"}],cta:[],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-01-11",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_4820fd98-246f-46b7-8af6-be1e949ff0e2.mp4?v=1704973716",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_4820fd98-246f-46b7-8af6-be1e949ff0e2.mp4?v=1704973708",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:58,event_state:"ready",poster_image:null,total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:48,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:24,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/evil-eye-adjustable-ring-gold",client_product_id:"6923301748874",price:"1250.00",currency:"INR",title:"Evil Eye adjustable ring - Gold",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/WhatsAppImage2020-09-21at11.38.01AM_1_700x_c51dd690-b6d8-4059-b3e0-13a2edf3feea.jpg?v=1656673474",compare_price:"1300",product_metadata:null,product_status:"active"},{product_id:23,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/rose-water-200ml",client_product_id:"6923319771274",price:"250.00",currency:"INR",title:"ROSE WATER 200ML",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/RoseWaterFront-01_250x_2x_c4cd34f3-625d-463a-bf36-3b159322b7ed.png?v=1656673764",compare_price:null,product_metadata:null,product_status:"active"},{product_id:21,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/honey-lemon-face-cleanser-200ml-1",client_product_id:"6923307647114",price:"1300.00",currency:"INR",title:"HONEY & LEMON FACE CLEANSER 200ML",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/C5D_9156-01_250x_2x_2f91ab64-e5a4-42f1-baf3-5f3ecffb2b50_1.png?v=1656673584",compare_price:"1340",product_metadata:null,product_status:"active"},{product_id:22,brand:"whatmore-dev",product_link:"https://whatmore-dev.myshopify.com/products/honey-lemon-face-cleanser-200ml-1",client_product_id:"6923317051530",price:"350.00",currency:"INR",title:"HONEY AND ROSE BODY CREAM 200ML",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/products/2_250x_2x_47ffd4b3-4100-4afb-b4c8-a09867e40ddb.png?v=1656673726",compare_price:null,product_metadata:null,product_status:"active"}],cta:[{cta_id:73,cta_link:"https://honeyandspice.in/collections/central-indian",client_cta_id:"https://honeyandspice.in/collections/central-indian",cta_title:"Shop Now",thumbnail_image:"",cta_type:""}],title:"BTS of HoneyAndSpice",description:"",brand:"whatmore-dev",scheduled_date:"2023-08-10",status:"upcoming",start_time:"19:00",end_time:"20:00",actual_start_time:null,actual_end_time:null,presenter_name:"Honey and Spice",thumbnail_image:"https://d28nus7q7qajdn.cloudfront.net/videos/whatmore-video-01942fec-68a5-4417-aa28-a0bff121a3ec.mp4",discount_coupon_image:"",event_hls_url:"https://d28nus7q7qajdn.cloudfront.net/videos/whatmore-video-2f0d18e6-a519-4e70-b8b3-529b90a04c28.mp4",presenter_email:null,presenter_phone:"+919888988889",room_id:null,event_type:"video",is_active:!0,rank:59,event_state:"ready",poster_image:null,total_views:13,total_like:0,total_share:0,total_whatsapp:0},{event_id:33888,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:26392,brand:"whatmore-dev",product_link:"https://www.aachho.com/products/shimmering-mustard-sequin-georgette-suit-set",client_product_id:"6981740691522",price:"4199.00",currency:"INR",title:"Shimmering Mustard Sequin Georgette Suit Set",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/2542/7564/files/0H8A1426.jpg?v=1697874844",compare_price:"5999.00",product_metadata:null,product_status:"active"}],cta:[{cta_id:402,cta_link:"https://custom.com",client_cta_id:"https://custom.com",cta_title:"custom",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-02-26",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_2b78b138-b18f-45e3-b8dc-6ce59075872f.mp4?v=1708937498",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_2b78b138-b18f-45e3-b8dc-6ce59075872f.mp4?v=1708937490",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:60,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_2b78b138-b18f-45e3-b8dc-6ce59075872f.webp?v=1708937505",total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:33890,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[{product_id:26392,brand:"whatmore-dev",product_link:"https://www.aachho.com/products/shimmering-mustard-sequin-georgette-suit-set",client_product_id:"6981740691522",price:"4199.00",currency:"INR",title:"Shimmering Mustard Sequin Georgette Suit Set",description:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/2542/7564/files/0H8A1426.jpg?v=1697874844",compare_price:"5999.00",product_metadata:null,product_status:"active"}],cta:[{cta_id:402,cta_link:"https://custom.com",client_cta_id:"https://custom.com",cta_title:"custom",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-02-26",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_08ec5ed2-3aca-4d32-b51e-d3f88123cca8.mp4?v=1708937809",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_08ec5ed2-3aca-4d32-b51e-d3f88123cca8.mp4?v=1708937801",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:61,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_08ec5ed2-3aca-4d32-b51e-d3f88123cca8.webp?v=1708937816",total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:33947,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[],cta:[{cta_id:403,cta_link:"https://test.com",client_cta_id:"https://test.com",cta_title:"test",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-02-26",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_81844dee-68c7-425e-96bf-d3ac63c664e7.mp4?v=1708947355",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_81844dee-68c7-425e-96bf-d3ac63c664e7.mp4?v=1708947347",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:62,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_81844dee-68c7-425e-96bf-d3ac63c664e7.webp?v=1708947362",total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:41975,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[],cta:[{cta_id:482,cta_link:"https://tests.com",client_cta_id:"https://tests.com",cta_title:"",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-04-25",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_51411814-cff2-491f-aca3-303e84307049.mp4?v=1714033522",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_51411814-cff2-491f-aca3-303e84307049.mp4?v=1714033514",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:69,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_51411814-cff2-491f-aca3-303e84307049.webp?v=1714033531",total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:41976,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[],cta:[{cta_id:481,cta_link:"https://test1231.com",client_cta_id:"https://test1231.com",cta_title:" ",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-04-25",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_c2a47941-cafb-4765-ac6c-d6414679c6bd.mp4?v=1714033522",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_c2a47941-cafb-4765-ac6c-d6414679c6bd.mp4?v=1714033514",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:70,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_c2a47941-cafb-4765-ac6c-d6414679c6bd.webp?v=1714033530",total_views:0,total_like:0,total_share:0,total_whatsapp:0},{event_id:41977,storyset_id:null,storyset_name:null,storyset_thumbnail_image:null,storyset_event_rank:null,products:[],cta:[{cta_id:403,cta_link:"https://test.com",client_cta_id:"https://test.com",cta_title:"test",thumbnail_image:"",cta_type:""}],title:"",description:"",brand:"whatmore-dev",scheduled_date:"2024-04-25",status:"upcoming",start_time:"",end_time:"",actual_start_time:null,actual_end_time:null,presenter_name:"",thumbnail_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_tn_a0f26d1d-462b-4548-848c-806702cf9c95.mp4?v=1714033522",discount_coupon_image:"",event_hls_url:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_1080p_a0f26d1d-462b-4548-848c-806702cf9c95.mp4?v=1714033513",presenter_email:null,presenter_phone:"",room_id:null,event_type:"video",is_active:!0,rank:71,event_state:"ready",poster_image:"https://cdn.shopify.com/s/files/1/0586/6979/3418/files/whatmore_poster_a0f26d1d-462b-4548-848c-806702cf9c95.webp?v=1714033530",total_views:0,total_like:0,total_share:0,total_whatsapp:0}];var G=function(e){const[t,a]=(0,i.useState)(),[r,o]=(0,i.useState)(),{whatmoreIsStoriesTemplate:l}=(0,i.useContext)(h.I),{whatmoreIsCollectionsTemplate:p}=(0,i.useContext)(h.I),{whatmoreIsBannerTemplate:m}=(0,i.useContext)(h.I),[v]=(0,n.j1)("whatmoreShopId"),[g]=(0,n.j1)("whatmoreCollectionId"),b=(0,n.MO)("whatmoreLandingLocationType"),S=(0,n.MO)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:I}=(0,i.useContext)(h.I),{whatmoreCollectionUrl:k}=(0,i.useContext)(h.I),[T]=(0,n.j1)("isInDesignMode"),[x]=(0,n.j1)("isDemoBrand"),E=(0,c.cZT)(v)?(0,c._uv)(v)?k:window.location.href.split(/[?#]/)[0]:g,[j,L]=(0,n.j1)("productRatings"),[C,M]=(0,i.useState)(!1);var O=(0,c.efR)(v)?s.Dm+"/v2/events/":s.Gc+"/v2/events/",G=(0,c.efR)(v)?s.Dm+"/get_eventset/":s.Gc+"/get_eventset/",K=(0,c.efR)(v)?s.Dm+"/v2/collection":s.Gc+"/v2/collection",z=(0,c.efR)(v)?s.Dm+"/v2/brand/"+v+"/product-events":s.Gc+"/v2/brand/"+v+"/product-events",V=e.shopId,B="live,upcoming";return(0,i.useEffect)((()=>{(0,d.hb)();const e=()=>{const e="_whatmore_bulk_events",t=JSON.parse(localStorage.getItem(e))||[];t&&t.length>0&&((0,W.K)(t),localStorage.removeItem(e))};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),[]),(0,i.useEffect)((()=>{null==t||0==t.length||r||!(0,u.KE)()||(0,n.MO)("whatmoreVideoPlayerPoolInitiated")||(0,_.b5)(_.UD)}),[t]),(0,i.useEffect)((()=>{var e;if(b.startsWith("product")){var t=(0,n.MO)("whatmoreProductId");t=(0,c.iXA)(v)?function(e){return e.split(/[?#]/)[0]}(window.location.href):t,e=z.toString()+"?client_product_id="+t.toString()+"&status="+B.toString()+"&event_type=video"}else if(p||"invalid-url"!==k)e="".concat(K.toString(),"?store_id=").concat(V.toString(),"&client_collection_id=").concat("index"==b&&(0,c.igW)(v).length>0?(0,c.igW)(v)[0]:E);else if(m){const t=f.ls,a=(0,f.H1)(b);e=G.toString()+V.toString()+"?eventset_type="+t+"&source="+a+"&source_id="+v}else e=O.toString()+V.toString()+"?status="+B.toString()+"&is_active="+"true".toString()+(l?"&template_type=stories":"");fetch(e).then((e=>e.json())).then((e=>{if(m){const t=f.ls;return(0,N.OC)(e,t)}return(0,N.kW)(e,p||"invalid-url"!==k)})).then((e=>(S&&console.debug("initial received events size : "+e.length),l||p||m?e:(0,N.e8)(e,V)))).then((e=>(null!=e&&0!=e.length&&(0,c.LUY)(v)&&function(e,t,a){const i=setInterval((()=>{null===(0,n.MO)("productRatings")&&D(e,t,a)}),1e3);setTimeout((()=>{clearInterval(i)}),1e4)}(v,e,(e=>{L(e)})),e))).then((e=>{null==e||0==e.length||l||m||(0,c.NOv)(V,e),a((x||T)&&null==e?q:e),M(!0)})).catch((e=>{o(e.message)}))}),[]),(0,i.useEffect)((()=>{"index"===b?t&&t.length>0&&(0,R.PB)({userInteractionType:y.K.HOMEPAGE_VISITED,widgetSourceDetails:I}):"collection"===b&&(t&&t.length>0||(0,c.miB)(v))&&(0,R.PB)({userInteractionType:y.K.COLLECTION_PAGE_VISITED,widgetSourceDetails:I})}),[t]),(C&&(null==t||0==t.length)||r)&&h.$.forEach((e=>{var t,a,n,i;const s=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"]'),r=null!==(a=e.querySelector('.whatmore-template-type[data-wh="template-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-b"]')||e.querySelector('.whatmore-template-type[data-wh="template-f"]')||e.querySelector('.whatmore-template-type[data-wh="template-e"]')||e.querySelector('.whatmore-template-type[data-wh="template-a-1"]'))&&void 0!==a?a:e.querySelector('.whatmore-template-type[data="template-a"]')||e.querySelector('.whatmore-template-type[data="template-b"]')||e.querySelector('.whatmore-template-type[data="template-f"]')||e.querySelector('.whatmore-template-type[data="template-e"]')||e.querySelector('.whatmore-template-type[data="template-a-1"]'),o=null!==(n=e.querySelector('.whatmore-template-type[data-wh="template-collections-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-b"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-c"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-stories"]'))&&void 0!==n?n:e.querySelector('.whatmore-template-type[data="template-collections-a"]')||e.querySelector('.whatmore-template-type[data="template-collections-b"]')||e.querySelector('.whatmore-template-type[data="template-collections-c"]')||e.querySelector('.whatmore-template-type[data="template-collections-stories"]'),l=null!==(i=e.querySelector('.whatmore-template-type[data-wh="template-banner-a"]'))&&void 0!==i?i:e.querySelector('.whatmore-template-type[data="template-banner-a"]'),c=e;(l||o||r||s)&&(r&&c||s&&c||l&&c||o&&c)&&(c.style.minHeight="0px")})),null==t||0==t.length||r?(0,w.jsx)("div",{}):(S&&(0,P.EI)(t),function(e){if(null!=e){var t=0;e.forEach((e=>{e.index=t++}))}}(t),S&&console.debug("final transformed events data : "+JSON.stringify(t)),S&&console.debug("valid events size : "+t.length),(0,w.jsx)(A,{heading:e.heading,events:t}))},K=a(3933);var z=function(e){const[t]=(0,n.j1)("whatmoreShopId"),[a]=(0,n.j1)("whatmoreHeading"),[s,r]=(0,i.useState)(["initial",window.pageYOffset]),[o,l]=(0,i.useState)(!1),d=(0,n.MO)("isLandingSharedLink");(0,i.useEffect)((()=>{if((0,p.ll)(t),!(0,c.wc0)(t))return;let e=window.pageYOffset,a=!1;const n=()=>{const t=window.pageYOffset;var n,i;Math.abs(t-e)<10?a=!1:(i=!0,r(n=[t>e?"scrolled-down":"scrolled-up",t]),n[1]>10&&l(i),e=t>0?t:0,a=!1)},i=()=>{a||(window.requestAnimationFrame(n),a=!0)};return window.addEventListener("scroll",i),()=>window.removeEventListener("scroll",i)}),[]);const[u,_,m]=(0,K.YD)({triggerOnce:!0});return(0,w.jsx)("div",{ref:u,style:{display:"block"},children:o||_||d||!(0,c.wc0)(t)?(0,w.jsx)(G,{heading:a,shopId:t}):(0,w.jsx)("div",{})})}},499:function(e,t){t.Z={LIVE:{name:"LIVE",color:"gray.600"},UPCOMING:{name:"UPCOMING",color:"gray.600"},DEFAULT:{name:"LIVE EVENT",color:"gray.600"},COMPLETED:{name:"ENDED",color:"gray.600"}}},4897:function(e,t,a){var n=a(499);t.Z=class{static getEventStatus(e){e.time_zone="GMT+5:30";var t=e.start_time+":00",a=e.end_time,i=e.scheduled_date,s=e.status,r=e.time_zone;if(s.toUpperCase()==n.Z.LIVE.name)return{status:n.Z.LIVE,bannerText:" "+n.Z.LIVE.name+" ",timeToStartInMins:0};if(s.toUpperCase()==n.Z.UPCOMING.name){var o=new Date(i+" "+t+" "+r),l=(new Date(i+" "+a+" "+r),function(e){var t=new Date,a=(e.getTime()-t.getTime())/1e3,i=a/60,s=i/60,r=s/24;return a<=0?{status:n.Z.COMPLETED,bannerText:" "+n.Z.COMPLETED.name+" ",timeToStartInMins:0}:a>=1&&a<=30?{status:n.Z.UPCOMING,bannerText:"Starts in "+Math.round(a)+" sec ",timeToStartInMins:a/60}:i<60?{status:n.Z.UPCOMING,bannerText:"Starts in "+Math.round(i)+" min ",timeToStartInMins:i}:s<24?{status:n.Z.UPCOMING,bannerText:"Starts in "+Math.round(s)+" hr ",timeToStartInMins:60*s}:r<7?{status:n.Z.UPCOMING,bannerText:" "+["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()]+" ",timeToStartInMins:60*r*24}:{status:n.Z.UPCOMING,bannerText:"Upcoming",timeToStartInMins:2880}}(o));return{status:l.status,bannerText:l.bannerText,timeToStartInMins:l.timeToStartInMins}}return console.error("invalid status for event :: id : "+e.event_id+", status : "+e.status),{status:n.Z.DEFAULT,bannerText:"live event",timeToStartInMins:2880}}}},3388:function(e,t,a){a.d(t,{OC:function(){return o},e8:function(){return s},kT:function(){return n},kW:function(){return r},xg:function(){return i}});const n=function(e,t){return!((void 0==e.products||0==e.products.length)&&(void 0==e.cta||0==e.cta.length))},i=function(e,t){return!(void 0==e.products||0==e.products.length)},s=function(e,t){if(null!=e)return e.filter((e=>1==n(e)))},r=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 o=function(e,t){var a;if(null==e)return[];if(!("eventsets"in e))return[];const n=null!==(a=e.eventsets[t])&&void 0!==a?a:null;return n?function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{e.events.forEach((e=>{t.push(e)}))})),t}(n):[]}},7376:function(e,t,a){a.d(t,{GF:function(){return i},PB:function(){return o},Z2:function(){return s},y4:function(){return r}});var n=a(733);function i(e){let{userInteractionType:t,userInteractionMetadata:a,widgetSourceDetails:i,event:s,productList:r,ctaList:o}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:a,widgetSourceDetails:i,event:s,productList:r,ctaList:o})}function s(e){let{userInteractionType:t,userInteractionMetadata:a,widgetSourceDetails:i,event:s,productList:r,ctaList:o}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:a,widgetSourceDetails:i,event:s,productList:r,ctaList:o})}function r(e){let{userInteractionType:t,userInteractionMetadata:a,widgetSourceDetails:i,event:s,productList:r,ctaList:o}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:a,widgetSourceDetails:i,event:s,productList:r,ctaList:o})}function o(e){let{userInteractionType:t,userInteractionMetadata:a,widgetSourceDetails:i,event:s,productList:r,ctaList:o}=e;(0,n.s)({userInteractionType:t,userInteractionMetadata:a,widgetSourceDetails:i,event:s,productList:r,ctaList:o})}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[692],{3388:function(e,t,i){i.d(t,{OC:function(){return l},e8:function(){return r},kT:function(){return n},kW:function(){return a},xg:function(){return o}});const n=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.filter((e=>1==n(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 i;if(null==e)return[];if(!("eventsets"in e))return[];const n=null!==(i=e.eventsets[t])&&void 0!==i?i:null;return n?function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{e.events.forEach((e=>{t.push(e)}))})),t}(n):[]}},5380:function(e,t,i){i.d(t,{Z:function(){return v}});var n=i(4959),o=i(7313),r=i(4892),a=i(6805),l=i(7753),s=i(9821);var d=function(e){const[t,i,n,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,i*h,r]},c=i(9723),h=i(9461),p=i.n(h),u=i(1195),x=i(7108),f=(i(7244),i(123),i(9854)),g=i(9852),m=i(6417);var v=function(e){var t;const i=o.useRef(null);var[s,h,v]=d();const{whatmoreUITheme:w}=(0,o.useContext)(g.I),[j]=(0,l.j1)("whatmoreEmbedAppVideoTitle"),[b]=(0,l.j1)("whatmoreEmbedAppPositionPortrait"),[y]=(0,l.j1)("whatmoreEmbedAppHorizontalPaddingPortrait"),[S]=(0,l.j1)("whatmoreEmbedAppVerticalPaddingPortrait"),[I]=(0,l.j1)("whatmoreEmbedAppPositionLandscape"),[E]=(0,l.j1)("whatmoreEmbedAppHorizontalPaddingLandscape"),[z]=(0,l.j1)("whatmoreEmbedAppVerticalPaddingLandscape"),
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[692],{3388:function(e,t,i){i.d(t,{OC:function(){return l},e8:function(){return r},kT:function(){return n},kW:function(){return a},xg:function(){return o}});const n=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.filter((e=>1==n(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 i;if(null==e)return[];if(!("eventsets"in e))return[];const n=null!==(i=e.eventsets[t])&&void 0!==i?i:null;return n?function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{e.events.forEach((e=>{t.push(e)}))})),t}(n):[]}},5380:function(e,t,i){i.d(t,{Z:function(){return v}});var n=i(4959),o=i(7313),r=i(4892),a=i(6805),l=i(7753),s=i(9821);var d=function(e){const[t,i,n,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,i*h,r]},c=i(9723),h=i(9461),p=i.n(h),u=i(1195),x=i(7108),f=(i(7244),i(123),i(9854)),g=i(9852),m=i(6417);var v=function(e){var t;const i=o.useRef(null);var[s,h,v]=d();const{whatmoreUITheme:w}=(0,o.useContext)(g.I),[j]=(0,l.j1)("whatmoreEmbedAppVideoTitle"),[b]=(0,l.j1)("whatmoreEmbedAppPositionPortrait"),[y]=(0,l.j1)("whatmoreEmbedAppHorizontalPaddingPortrait"),[S]=(0,l.j1)("whatmoreEmbedAppVerticalPaddingPortrait"),[I]=(0,l.j1)("whatmoreEmbedAppPositionLandscape"),[E]=(0,l.j1)("whatmoreEmbedAppHorizontalPaddingLandscape"),[z]=(0,l.j1)("whatmoreEmbedAppVerticalPaddingLandscape"),_=(0,l.MO)("whatmoreShopId");var C=b,P=y,k=S;v[a.YP]===a.$w&&(C=I,P=E,k=z);const[L,O]=(0,o.useState)(["initial",window.pageYOffset]),[A,T]=(0,o.useState)(!1),M=null!==(t=e.isSpotlight)&&void 0!==t&&t,V=v[a.YP]===a.$w?.7*(0,f.zGA)(_):(0,f.zGA)(_),B=M?V:1;s*=B,h*=B;const F=M?(0,f.G0o)(_):C,R=M?(0,f.X8j)(_):(0,f.lVn)(_),[Z,D]=(0,o.useState)(!M&&(0,f.eXi)(_));function N(e,t){O(e),e[1]<=100?T(!1):t!=A&&(T(t),D(!1))}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const i=()=>{const i=window.pageYOffset;Math.abs(i-e)<100||(N([i>e?"scrolled-down":"scrolled-up",i],!0),e=i>0?i:0),t=!1},n=()=>{t||(window.requestAnimationFrame(i),t=!0)};return window.addEventListener("scroll",n),()=>window.removeEventListener("scroll",n)}),[L]),(0,n.O3)({ref:i,handler:()=>{N(["scrolled-up",L[1]],!0)}});const Y=e.event,W=e.inVideoClick,$=e.closeClick,G=.3*h,H=.6*h,K=.1*h,U=.1*(.5*h),X="round"==w?"10px":"0px",q=(0,f.Z$A)(_);var J=!1,Q=0,ee=0;function te(e){J=e}return(0,m.jsx)("div",{children:Z&&!R?(0,m.jsx)(m.Fragment,{}):A&&R?(0,m.jsx)("div",{style:"left"===F?{left:"1px",bottom:M?(0,f.vnu)(_)+"px":k+"px",position:"fixed",zIndex:q}:{right:"5px",bottom:M?(0,f.vnu)(_)+"px":k+"px",position:"fixed",zIndex:q},children:(0,m.jsxs)("div",{onClick:()=>{N(["initial",L[1]],!1)},style:{margin:"1px",width:h+"px",height:s+"px"},className:"left"===F?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,m.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:X,overflow:"hidden"},children:(0,m.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,m.jsx)(r.Z,{url:Y.thumbnail_image,isPlaying:!1,event:Y})})}),(0,m.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,m.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,m.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",children:(0,m.jsx)(u.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:G+"px"},style:{position:"relative",zIndex:1,left:U+"px",bottom:U+"px"},onClick:$})})}),(0,m.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,m.jsx)(x.Z,{sx:{color:"white",fontSize:2*G+"px",filter:"drop-shadow(0 0 15px black);"}})})]})})]})}):(0,m.jsx)(p(),{nodeRef:i,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 i,n;i=t.x,n=t.y,Q=i,ee=n},onDrag:(e,t)=>{te(!0)},onStop:(e,t)=>{J&&(Math.abs(t.x-Q)>5||Math.abs(t.y-ee)>5)?te(!1):W(Y)},children:(0,m.jsx)("div",{ref:i,style:"left"===F?{left:M?(0,f.$II)(_)+"px":P+"px",bottom:M?(0,f.vnu)(_)+"px":k+"px",position:"fixed",zIndex:q}:{right:M?(0,f.$II)(_)+"px":P+"px",bottom:M?(0,f.vnu)(_)+"px":k+"px",position:"fixed",zIndex:q},children:(0,m.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:h+"px",height:s+"px"}),className:"left"===F?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,m.jsx)("div",{style:{boxShadow:"0px 0px 10px 3px #B0B0B0",borderRadius:X,overflow:"hidden",position:"relative"},children:(0,m.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,m.jsx)(r.Z,{url:Y.thumbnail_image,isMuted:!0,isPlaying:!0,event:Y})})}),(0,m.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,m.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%"},children:[(0,m.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,m.jsx)(u.Z,{className:"close-btn",sx:{filter:"drop-shadow(0 0 15px black);",color:"white",fontSize:G+"px"},onClick:$,style:{position:"relative",zIndex:1,left:K+"px",bottom:K+"px"}})}),(0,m.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,m.jsx)(c.Z,{sx:{color:(0,f.Ya_)(_),fontSize:H+"px",filter:"drop-shadow(0 0 15px black);"}})}),(0,m.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:X,borderBottomRightRadius:X,backgroundImage:j?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))":""},children:(0,m.jsxs)("p",{style:{textAlign:"center",color:"white",fontFamily:"Sans-serif",fontWeight:"semi-bold",fontSize:.4*G+"px",margin:0,padding:0,lineHeight:"110%"},children:["\xa0",j]})})]})})]})})})})}},2209:function(e,t,i){i.r(t);var n=i(7313),o=i(9854),r=i(2860),a=i(7753),l=i(5160),s=i(6967),d=i(5380),c=i(58),h=i(8984),p=i(4669),u=i(513),x=i(9302),f=i(7381),g=i(2575),m=i(7300),v=i(6524),w=i(3388),j=i(7643),b=i(778),y=i(9852),S=i(6417);const I=(0,g.Z)({key:"whatmore-css-wsv"}),E=n.lazy((()=>Promise.all([i.e(819),i.e(576),i.e(351),i.e(955),i.e(926),i.e(303),i.e(218),i.e(62)]).then(i.bind(i,3218))));t.default=function(e){const[t,i]=(0,n.useState)(),[g,z]=(0,n.useState)(),[_]=(0,a.j1)("isInDesignMode"),[C]=(0,a.j1)("isDemoBrand"),[P,k]=(0,n.useState)(-2),[L]=(0,a.j1)("whatmoreShopId"),O=(0,a.MO)("isLandingSharedLink"),A=(0,a.MO)("whatmoreShareTemplateId"),T=((0,a.MO)("whatmoreShareStoryId"),(0,a.MO)("whatmoreShareEventId")),M=(0,a.MO)("whatmoreLandingLocationType"),V=(0,a.MO)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:B}=(0,n.useContext)(y.I);var F=(0,o.efR)(L)?r.Dm+"/get_eventset/":r.Gc+"/get_eventset/";(0,n.useEffect)((()=>{(0,s.hb)()}),[]),(0,n.useEffect)((()=>{(0,p.ll)(L)}),[]),(0,n.useEffect)((()=>{null==t||0==t.length||g||!(0,h.KE)()||(0,a.MO)("whatmoreVideoPlayerPoolInitiated")||(0,c.b5)(c.UD)}),[t]),(0,n.useEffect)((()=>{k(-1);const e=v.NX,t=(0,v.H1)(M),n=F.toString()+L.toString()+"?eventset_type="+e+"&source="+t+"&source_id="+L;fetch(n).then((e=>e.json())).then((t=>(0,w.OC)(t,e))).then((e=>(i(e),e))).catch((e=>{z(e.message)}))}),[]),(0,n.useEffect)((()=>{k(-2)}),[t]),(0,n.useEffect)((()=>{null==t||0==t.length||g||O&&"template-embed"==(0,v.zv)(A)&&null!=T&&t.forEach(((e,t)=>{T==e.event_id&&D(e,!0,t)}))}),[t]);const R=B.landingLocationType,Z=B.templateType,D=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if((0,h.KE)()&&!t&&(0,c.QV)(),(0,m.B6)(e)||(0,m.WJ)(e))return _||C||(async()=>{const t=(0,v.NY)(R)+(0,v.dS)(Z)+"_"+(null===e||void 0===e?void 0:e.event_id);(0,l.wh)(e),(0,p.Tc)(L,r.h7,r.dU),(0,s.H4)(e.event_id,e.products,"spotlight","video_popup",t)})(),void k(i)};function N(){return(0,S.jsx)(S.Fragment,{})}return null==t||0==t.length||g?(0,S.jsx)("div",{}):(V&&(0,f.EI)(t),(0,o.B$L)(L)&&P<0&&null!==localStorage.getItem("_whatmore_spotlight_viewed")?(0,S.jsx)(S.Fragment,{}):(localStorage.setItem("_whatmore_spotlight_viewed",!0),(0,S.jsx)(x.C,{value:I,children:-1===P||0===t.length?(0,S.jsx)(N,{}):-2===P&&t.length>0?(0,S.jsx)("div",{children:(0,S.jsx)(j.u,{userInteractionType:b.K.SPOTLIGHT_WIDGET_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!_&&!C,children:(0,S.jsx)(d.Z,{event:t[0],inVideoClick:D,closeClick:e=>{e.stopPropagation(),k(-1)},isSpotlight:!0})})}):(0,S.jsx)("div",{children:(0,S.jsx)(n.Suspense,{children:(0,S.jsx)(j.u,{userInteractionType:b.K.EVENT_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!_&&!C,children:(0,S.jsx)(E,{events:t,index:P,onBack:function(){(0,o.n2L)(L)&&(0,a.MO)("whatmoreAddedToCart")&&(0,u.D)(L,(()=>{}),100,window.location.hostname),k(-2)},template:"template-embed"})})})})})))}}}]);
|