whatmore-react-assets 1.0.1377 → 1.0.1379
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/static/js/{348.1b7672af.chunk.js → 348.59e19f12.chunk.js} +1 -1
- package/static/js/707.dadb50f5.chunk.js +1 -0
- package/static/js/{733.a1c82e7f.chunk.js → 733.701e966b.chunk.js} +1 -1
- package/static/js/carousel-template-f.cc86fab6.chunk.js +1 -0
- package/static/js/{homepage-carousel-view.4c9ccc86.chunk.js → homepage-carousel-view.aa23f9a7.chunk.js} +1 -1
- package/whatmore.js +2 -2
- package/static/js/800.38fa0179.chunk.js +0 -2
- package/static/js/carousel-template-f.230832d3.chunk.js +0 -1
package/package.json
CHANGED
@@ -65,7 +65,7 @@
|
|
65
65
|
100% {
|
66
66
|
transform: translateY(0%) rotate(0deg);
|
67
67
|
}
|
68
|
-
`} infinite 1.5s linear`;return(0,x.jsx)(O.MT,{unmountOnExit:!0,initialScale:.2,in:d,reverse:!0,delay:m,children:(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",paddingTop:100,borderRadius:"3xl",children:(0,x.jsxs)(s.Kq,{direction:"column",width:"100%",height:"fit-content",justifyContent:"flex-end",children:[(0,x.jsx)(s.M5,{animation:"vertical"===p?w:j,children:"vertical"===p?(0,x.jsx)(z.Z,{sx:{color:"white !important",fontSize:g,filter:"drop-shadow(0 0 20px black);"}}):(0,x.jsx)(L.Z,{sx:{color:"white !important",fontSize:g,filter:"drop-shadow(0 0 20px black);"}})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{textShadow:"dark-lg",fontSize:f+"px",fontWeight:"semibold",sx:{color:"white !important",textShadow:"0px 0px 20px black !important;"},children:"swipe for more"})})]})})})};var M=function(t){const[e,i]=(0,u.j1)("isFirstIndicatorRenderDone"),[o]=(0,u.j1)("indicatorRenderSeconds"),r=o,l=t.swipeUp;return(0,n.useEffect)((()=>{const t=setTimeout((()=>{i(!0)}),3e3+1e3*r);return()=>{clearTimeout(t)}}),[]),e?null:(0,x.jsx)(D,{showForSeconds:.8*r,delayInSeconds:3,swipeUp:l})},R=i(5180),A=i(9316),K=i(5254);const W="15px";var q=i(4522),N=i(778),V=i(364);var Z=function(t){const[e]=(0,u.j1)("isInDesignMode"),[i]=(0,u.j1)("isDemoBrand"),[o]=(0,u.j1)("whatmoreSecondaryColor"),[r]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[d,p,v,m]=(0,h.Z)(),[g,f]=(0,n.useState)(!1),w=t.product,j=t.event,{whatmoreWidgetSourceDetails:y}=(0,n.useContext)(V.I),C=.1*v,b=.95*m,S=.05*m;return(0,x.jsx)(s.Kq,{direction:"row",height:C,justifyContent:"center",alignItems:"center",alignContent:"center",bgGradient:"linear(to-b, transparent, blackAlpha.400, blackAlpha.600)",children:(0,x.jsx)(s.Kq,{direction:"column",width:"fit-content",height:C,justifyContent:"center",alignItems:"center",alignContent:"center",children:(0,x.jsx)(s.xu,{width:b+"px",height:"fit-content",padding:"6px",marginTop:W,backgroundColor:o,borderRadius:"5px",animation:g?A.mT:null,onAnimationEnd:()=>{f(!1)},marginBottom:(0,c.pq5)(a),onClick:()=>{f(!0),function(t,n){e||i||(async()=>{(0,l.wz)(t,n),(0,q.GF)({userInteractionType:N.K.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:y,event:t,productList:[n],ctaList:t.cta})})()}(j,w),window.location.href=function(t){return(0,c.lj5)(a)?t.product_link+"?"+(0,c.awP)(a)+"&"+(0,c.n9s)(a)+"&"+(0,c.vaK)(a):t.product_link}(w)},_hover:{backgroundColor:(0,K.lA)(o,8)},cursor:"pointer",children:(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*S+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:r+" !important",color:"white !important"},children:(0,c.Pvx)(a)})})})})})},H=i(7009),U=i(5945),B=i(5456),Y=i(6984),X=i(6227),G=i(7329),$=(i(9111),i(9748));const Q={en:{add_to_cart:"ADD TO CART",buy_now:"BUY NOW",more_info:"MORE INFO",size:"Size",color:"Color",description:"Description",like:"Like",share:"Share",talk_to_us:"Talk to Us",done:"Done",cancel:"Cancel",view_product:"View Product",go_to_cart:"Go to Cart"},ar:{add_to_cart:"\u0623\u0636\u0641 \u0625\u0644\u0649 \u0627\u0644\u0633\u0644\u0629",buy_now:"\u0627\u0634\u062a\u0631\u0650 \u0627\u0644\u0622\u0646",more_info:"\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a",size:"\u0627\u0644\u062d\u062c\u0645",color:"\u0627\u0644\u0644\u0648\u0646",description:"\u0627\u0644\u0648\u0635\u0641",like:"\u0623\u0639\u062c\u0628\u0646\u064a",share:"\u0645\u0634\u0627\u0631\u0643\u0629",talk_to_us:"\u062a\u062d\u062f\u062b \u0625\u0644\u064a\u0646\u0627",done:"\u062a\u0645",cancel:"\u0625\u0644\u063a\u0627\u0621",view_product:"\u0639\u0631\u0636 \u0627\u0644\u0645\u0646\u062a\u062c",go_to_cart:"\u0627\u0630\u0647\u0628 \u0625\u0644\u0649 \u0627\u0644\u0633\u0644\u0629",watch_and_buy:"\u0634\u0627\u0647\u062f \u0648\u0627\u0634\u062a\u0631\u064a"},da:{add_to_cart:"In den Warenkorb",buy_now:"Jetzt kaufen",more_info:"Mehr Infos",size:"Gr\xf6\xdfe",color:"Farbe",description:"Beschreibung",like:"Gef\xe4llt mir",share:"Teilen",talk_to_us:"Sprechen Sie mit uns",done:"Fertig",cancel:"Abbrechen",view_product:"Produkt ansehen",go_to_cart:"Zum Warenkorb",watch_and_buy:"Ansehen und kaufen"},de:{add_to_cart:"In den Warenkorb",buy_now:"Jetzt kaufen",more_info:"Mehr Infos",size:"Gr\xf6\xdfe",color:"Farbe",description:"Beschreibung",like:"Gef\xe4llt mir",share:"Teilen",talk_to_us:"Sprechen Sie mit uns",done:"Fertig",cancel:"Abbrechen",view_product:"Produkt ansehen",go_to_cart:"Zum Warenkorb",watch_and_buy:"Ansehen und kaufen"},es:{add_to_cart:"A\xf1adir al carrito",buy_now:"Comprar ahora",more_info:"M\xe1s informaci\xf3n",size:"Tama\xf1o",color:"Color",description:"Descripci\xf3n",like:"Me gusta",share:"Compartir",talk_to_us:"Habla con nosotros",done:"Hecho",cancel:"Cancelar",view_product:"Ver producto",go_to_cart:"Ir al carrito",watch_and_buy:"Ver y comprar"},fr:{add_to_cart:"Ajouter au panier",buy_now:"Acheter maintenant",more_info:"Plus d'infos",size:"Taille",color:"Couleur",description:"Description",like:"J'aime",share:"Partager",talk_to_us:"Parlez-nous",done:"Valider",cancel:"Annuler",view_product:"Voir le produit",go_to_cart:"Aller au panier",watch_and_buy:"Regarder et acheter"},ja:{add_to_cart:"\u30ab\u30fc\u30c8\u306b\u8ffd\u52a0",buy_now:"\u4eca\u3059\u3050\u8cfc\u5165",more_info:"\u8a73\u7d30\u60c5\u5831",size:"\u30b5\u30a4\u30ba",color:"\u8272",description:"\u8aac\u660e",like:"\u3044\u3044\u306d",share:"\u5171\u6709",talk_to_us:"\u304a\u554f\u3044\u5408\u308f\u305b",done:"\u5b8c\u4e86",cancel:"\u30ad\u30e3\u30f3\u30bb\u30eb",view_product:"\u5546\u54c1\u3092\u898b\u308b",go_to_cart:"\u30ab\u30fc\u30c8\u306b\u9032\u3080",watch_and_buy:"\u8996\u8074\u3057\u3066\u8cfc\u5165"},nl:{add_to_cart:"Aan winkelwagentje toevoegen",buy_now:"Nu kopen",more_info:"Meer informatie",size:"Maat",color:"Kleur",description:"Beschrijving",like:"Vind ik leuk",share:"Delen",talk_to_us:"Praat met ons",done:"Klaar",cancel:"Annuleren",view_product:"Bekijk product",go_to_cart:"Ga naar winkelwagentje",watch_and_buy:"Kijk en koop"},pt:{add_to_cart:"Adicionar ao carrinho",buy_now:"Comprar agora",more_info:"Mais informa\xe7\xf5es",size:"Tamanho",color:"Cor",description:"Descri\xe7\xe3o",like:"Curtir",share:"Compartilhar",talk_to_us:"Fale conosco",done:"Conclu\xeddo",cancel:"Cancelar",view_product:"Ver produto",go_to_cart:"Ir para o carrinho",watch_and_buy:"Assistir e comprar"},zh:{add_to_cart:"\u52a0\u5165\u8d2d\u7269\u8f66",buy_now:"\u7acb\u5373\u8d2d\u4e70",more_info:"\u66f4\u591a\u4fe1\u606f",size:"\u5c3a\u5bf8",color:"\u989c\u8272",description:"\u63cf\u8ff0",like:"\u559c\u6b22",share:"\u5206\u4eab",talk_to_us:"\u8054\u7cfb\u6211\u4eec",done:"\u5b8c\u6210",cancel:"\u53d6\u6d88",view_product:"\u67e5\u770b\u5546\u54c1",go_to_cart:"\u524d\u5f80\u8d2d\u7269\u8f66",watch_and_buy:"\u89c2\u770b\u5e76\u8d2d\u4e70"}};function J(t){var e,i,o;const[r]=(0,u.j1)("whatmoreSecondaryColor"),[l]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[d,h]=(0,n.useState)(!1),p=null!==(e=t.baseFontSize)&&void 0!==e?e:10,v=t.onClick,m=t.width,g=t.height,f=t.title,w=t.showInProgressIcon;return(0,x.jsxs)(s.xu,{display:"flex",width:m,height:g,padding:"2x",boxShadow:"lg",animation:d?A.mT:null,onAnimationEnd:()=>{h(!1)},cursor:"pointer",children:["awaitingVariantSelection"==t.cartState&&(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",backgroundColor:"white",onClick:e=>{e.stopPropagation(),t.updateCartState("init"),t.setProductVariantTitle(t.productTitle),h(!0)},children:(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*p+"px !important",fontWeight:"semibold !important",sx:{fontFamily:l+" !important",color:"#343434 !important"},children:["\xa0",null!==(i=null===Q||void 0===Q||null===(o=Q[null===t||void 0===t?void 0:t.websiteLanguage])||void 0===o?void 0:o.cancel)&&void 0!==i?i:"Cancel","\xa0"]})}),(0,x.jsxs)(s.Kq,{direction:"row",backgroundColor:w?(0,K.lA)(r,8):r,width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",onClick:t=>{t.stopPropagation(),v(),h(!0)},children:[(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*p+"px !important",fontWeight:"semibold !important",sx:{fontFamily:l+" !important",color:(0,c.KCy)(a)+" !important"},children:["\xa0",f,"\xa0"]}),w?(0,x.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,x.jsx)(G.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*p+"px"}})}):(0,x.jsx)(x.Fragment,{})]})]})}function tt(t){var e,i,o;const[r]=(0,u.j1)("whatmoreSecondaryColor"),[l]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[d,h]=(0,n.useState)(!1),p=null!==(e=t.baseFontSize)&&void 0!==e?e:10,v=t.onClick,m=t.width,g=t.height;return(0,x.jsx)(s.xu,{width:m,height:g,padding:"2x",boxShadow:"lg",backgroundColor:"#000000"==(0,c.hmr)(a)?r:(0,c.hmr)(a),onClick:t=>{t.stopPropagation(),v(),h(!0)},animation:d?A.mT:null,onAnimationEnd:()=>{h(!1)},cursor:"pointer",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",children:(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*p+"px !important",fontWeight:"semibold !important",sx:{fontFamily:l+" !important",color:(0,c.KCy)(a)+" !important"},children:["\xa0","ADD TO CART"!=(0,c.tan)(a)?(0,c.tan)(a):null!==(i=null===Q||void 0===Q||null===(o=Q[null===t||void 0===t?void 0:t.websiteLanguage])||void 0===o?void 0:o.add_to_cart)&&void 0!==i?i:(0,c.tan)(a),"\xa0"]})})})})}function et(t){var e;const[i]=(0,u.j1)("whatmorePrimaryFont"),n=null!==(e=t.baseFontSize)&&void 0!==e?e:10,o=t.width,r=t.height;return(0,x.jsx)(s.xu,{width:o,height:r,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:"gray",borderWidth:"1px",onClick:t=>{t.stopPropagation()},children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:(0,x.jsxs)(s.xv,{color:"gray",lineHeight:"100%",fontSize:1.3*n+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:"gray !important"},children:["\xa0"," Sold Out ","\xa0"]})})})}function it(t){var e;const[i]=(0,u.j1)("whatmoreSecondaryColor"),[n]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),r=null!==(e=t.baseFontSize)&&void 0!==e?e:10,l=t.onClick,a=t.cartCount,d=t.width,h=t.height,p=t.onCartIconClick;return(0,x.jsx)(s.xu,{width:d,height:h,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:i,borderWidth:"1px",onClick:t=>{t.stopPropagation()},cursor:"pointer",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:[(0,x.jsx)(s.M5,{paddingX:"5px",onClick:()=>{p()},children:(0,c.ijd)(o)?(0,x.jsx)($.zx,{size:"sm",_hover:{bg:i},sx:{bg:i},children:(0,x.jsx)(s.xv,{paddingX:"6px",color:"white",sx:{fontSize:.85*r},children:"GO TO CART"})}):(0,x.jsx)(X.Z,{sx:{color:i,fontSize:1.6*r}})}),(0,x.jsx)(s.xv,{color:i,fontSize:1.3*r+"px !important",fontWeight:"semibold !important",sx:{fontFamily:n+" !important"},children:a}),(0,x.jsx)(s.M5,{paddingX:"5px",onClick:t=>{t.stopPropagation(),l()},children:(0,x.jsx)(Y.Z,{sx:{color:i,fontSize:1.6*r}})})]})})}var nt=function(t){var e,i,n,o,r,l,a;const[d]=(0,u.j1)("websiteLanguage"),s=null!==(e=t.baseFontSize)&&void 0!==e?e:10,c=null===(i=t.showAddedToCart)||void 0===i||i,h=t.cartState,p=t.cartCount,v=t.onClickAtc,m=t.onCartIconClick;function g(){v()}const f=null!==(n=t.width)&&void 0!==n?n:"100%",w=null!==(o=t.height)&&void 0!==o?o:"100%";return"errored"==h?(0,x.jsx)(O.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:w,width:f},children:(0,x.jsx)(et,{baseFontSize:s,width:f,height:w})}):"init"==h?0==p?(0,x.jsx)(tt,{onClick:g,baseFontSize:s,width:f,height:w,websiteLanguage:d}):c?(0,x.jsx)(O.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:w,width:f},children:(0,x.jsx)(it,{onClick:g,baseFontSize:s,cartCount:p,width:f,height:w,onCartIconClick:m})}):(0,x.jsx)(tt,{onClick:g,baseFontSize:s,width:f,height:w,websiteLanguage:d}):(0,x.jsx)(J,{onClick:g,setProductVariantTitle:t.setProductVariantTitle,cartState:h,productTitle:null===(r=t.product)||void 0===r?void 0:r.title,updateCartState:t.updateCartState,baseFontSize:s,width:f,height:w,title:"awaitingVariantSelection"==h?null!==(l=null===Q||void 0===Q||null===(a=Q[d])||void 0===a?void 0:a.done)&&void 0!==l?l:"Done":"",showInProgressIcon:"atcApiCallInProgress"==h||"productVariantDetailsApiCallInProgress"==h,websiteLanguage:d})},ot=i(6967),rt=i(873),lt=i(4844);const at=(0,u.MO)("isInDesignMode"),dt=(0,u.MO)("isDemoBrand");async function st(t,e,i,n,o,r,l,a,d){return"shopify"==i?(0,lt.wW)(t,e,n,l,a,d,r):(at||dt||(async()=>{(0,ot.FF)(o,r,l,a,d)})(),(0,rt.jg)(t,e,n))}function ct(t,e){return"shopify"==t?(0,lt.JL)(e):(0,rt.TE)(e)}var ut=i(513);var ht=function(t,e,i){const[o]=(0,u.j1)("whatmoreShopId"),[r]=(0,u.j1)("isInDesignMode"),[a]=(0,u.j1)("isDemoBrand"),[d,s]=(0,n.useState)(null),h=(0,n.useRef)(null),{closeClickComponent:v}=(0,n.useContext)(yi),{whatmoreUserInfo:x}=(0,n.useContext)(V.I),[m,g]=(0,n.useState)({state:"init",cart_count:t});function f(t,e){g({state:t,cart_count:null!==e&&void 0!==e?e:m.cart_count}),"init"!=t&&"errored"!=t?(0,u.bU)("whatmoreAllowAutoSlide",!1):(0,u.bU)("whatmoreAllowAutoSlide",!0)}function w(t){var e=[],i=[],n=[];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&&i.push({option:o.option2,available:null===(l=o.available)||void 0===l||l,type:t.options[1].name}),o.option3&&n.push({option:o.option3,available:null===(a=o.available)||void 0===a||a,type:t.options[2].name})})),e=e.reduce(((t,e,i)=>{var n=t.filter((t=>t.option==e.option));return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)}),[]),i=i.reduce(((t,e,i)=>{var n=t.filter((t=>t.option==e.option));return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)}),[]),n=n.reduce(((t,e,i)=>{var n=t.filter((t=>t.option==e.option));return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)}),[]),[e,i,n]}function j(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}function y(t){return t[0].length<=1&&t[1].length<=1&&t[2].length<=1}function C(){if(h.current&&h.current.length>=1){return h.current.filter((t=>t.available)).length>=1}return!1}function b(t,n){const d=function(t){const e=h.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(!d)return void f("init",m.cart_count);f("atcApiCallInProgress",null);st(d,1,(0,c.Ipo)(o),o,i,e,n,null===i||void 0===i?void 0:i.location,null===x||void 0===x?void 0:x.userType).then((t=>{if(!t.ok)throw new Error(t.status);return t.json()})).then((t=>(function(t,e,i){r||a||(async()=>{(0,l.JX)(t,e,i)})()}(i,e,1),f("init",m.cart_count+1),(0,u.bU)("whatmoreAddedToCart",!0),"72550089015"==o&&(0,u.MO)("whatmoreAddedToCart")&&(0,ut.D)(o,(()=>{}),100,window.location.hostname),(0,c.IKD)(o)&&setTimeout((()=>function(){const t=window.location.origin+"/cart";window.location.href=t}()),500),t))).catch((t=>{f("errored",null),console.error("Error while adding to cart:",t)}))}return[m,f,d,function(t){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];f("productVariantDetailsApiCallInProgress",null),(0,p.p)(e,(0,c.Ipo)(o),o).then((e=>{h.current=e.variants;const n=w(e);s(n),y(n)||i?C()?b([j(n[0]),j(n[1]),j(n[2])],t):f("errored",null):f("awaitingVariantSelection",null)})).catch((t=>{f("errored",null)}))},b,function(t){var e,i,n,r;const l=h.current.filter((e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]));if(0==l.length)return null;const a=null!==(e=l[0].price)&&void 0!==e?e:0,d=null!==(i=l[0].compare_at_price)&&void 0!==i?i:0;return{price:((0,c.Ipo)(o),a),compare_price:((0,c.Ipo)(o),d),title:null!==(n=null===(r=l[0])||void 0===r?void 0:r.title)&&void 0!==n?n:""}},function(){"do_nothing"!==(0,c.v9M)(o)&&("go_to_cart_page"!==(0,c.v9M)(o)?"open_cart_slider"!==(0,c.v9M)(o)||null!==v&&v():ct((0,c.Ipo)(o),o))}]},pt=i(9363);var vt=function(t){var e,i,o,r;const l=t.productVariantOptions,a=null!==(e=t.width)&&void 0!==e?e:"100%",d=null!==(i=t.height)&&void 0!==i?i:"fit-content",c=null!==(o=t.baseFontSize)&&void 0!==o?o:10,h=t.onOptionSelected,p=null!==(r=t.optionTitleColor)&&void 0!==r?r:"black",v=t.data,[m]=(0,u.j1)("whatmorePrimaryFont");function f(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}const[w,j]=(0,n.useState)([f(l[0]),f(l[1]),f(l[2])]);return(0,n.useEffect)((()=>{h(w)}),[w]),(0,x.jsx)(s.Kq,{direction:"column",width:a,height:d,justifyContent:"flex-start",alignItems:"center",spacing:"2px",paddingY:"2px",children:l.map(((e,i)=>{var n;if(0==e.length||"mlveda_country"==(null===e||void 0===e||null===(n=e[0])||void 0===n?void 0:n.type))return;const o=e.every((e=>{var i,n,o,r,l,a;return(null===t||void 0===t||null===(i=t.finalArr)||void 0===i||null===(n=i.finalArr)||void 0===n||null===(o=n.find((t=>(null===t||void 0===t?void 0:t.color)===(null===e||void 0===e?void 0:e.option))))||void 0===o?void 0:o.src)||(null===t||void 0===t||null===(r=t.finalArr)||void 0===r||null===(l=r.finalArrExternal)||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.optionsrc)}));return(0,x.jsxs)(s.Kq,{width:"100%",direction:"column",alignItems:"center",justifyContent:"flex-start",paddingY:"2px",children:[(0,x.jsx)(s.M5,{width:"100%",children:(0,x.jsx)(s.iz,{color:"blackAlpha.500",size:"1px",width:"20%"})}),(0,x.jsxs)(s.xv,{as:"b",fontSize:1.2*c+"px",sx:{color:p+" !important",fontFamily:m+" !important"},align:"center",marginY:"2px",children:["\xa0",e[0].type,"\xa0"]}),(0,x.jsx)(s.kC,{gap:"6px",wrap:"wrap",justify:"center",paddingY:"2px",children:e.map(((e,n)=>{var r,l,a,d,u,h,p,f;return(0==i||(null===v||void 0===v||null===(r=v.variants)||void 0===r?void 0:r.find((t=>t[`option${i}`]==(null===w||void 0===w?void 0:w[i-1])&&t[`option${i+1}`]==(null===e||void 0===e?void 0:e.option)))))&&(0,x.jsxs)(s.xu,{onClick:t=>{t.stopPropagation(),e.available&&function(t,e){if(2==e)j([w[0],w[1],t]);else if(1==e){var i,n;j([w[0],t,null===v||void 0===v||null===(i=v.variants)||void 0===i||null===(n=i.find((e=>(null===e||void 0===e?void 0:e.option2)==t)))||void 0===n?void 0:n.option3])}else{var o,r,l,a,d,s;const e=null===v||void 0===v||null===(o=v.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.option2;j([t,null===v||void 0===v||null===(l=v.variants)||void 0===l||null===(a=l.find((e=>(null===e||void 0===e?void 0:e.option1)==t)))||void 0===a?void 0:a.option2,null===v||void 0===v||null===(d=v.variants)||void 0===d||null===(s=d.find((t=>(null===t||void 0===t?void 0:t.option2)==e)))||void 0===s?void 0:s.option3])}}(e.option,i)},backgroundColor:e.option===w[i]?"rgba(0, 0, 0, 0.7)":"white",border:e.option===w[i]?"1px solid #ffffff":"1px solid black",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:e.option===w[i]?"0 0 8px rgba(0, 0, 0, 0.8)":"none",marginY:"2px",width:"fit-content",padding:o?"0px":"8px",borderRadius:o?"50%":"0",children:[!o&&(0,x.jsxs)(s.xv,{as:e.available?"samp":"s",fontSize:.8*c+"px",sx:{color:e.option===w[i]?"white":(e.available?"black":"gray")+" !important",fontFamily:m+" !important"},align:"center",paddingX:(y=e.option,y.length>=3?"0px":.5*c+"px"),children:["\xa0",e.option,"\xa0"]}),o&&(0,x.jsx)(g.Ee,{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%)",borderRadius:o?"50%":"100%"},src:(0,pt.s)(null!==(l=null===t||void 0===t||null===(a=t.finalArr)||void 0===a||null===(d=a.finalArr)||void 0===d||null===(u=d.find((t=>(null===t||void 0===t?void 0:t.color)==(null===e||void 0===e?void 0:e.option))))||void 0===u?void 0:u.src)&&void 0!==l?l:null===t||void 0===t||null===(h=t.finalArr)||void 0===h||null===(p=h.finalArrExternal)||void 0===p||null===(f=p.find((t=>(null===t||void 0===t?void 0:t.color)==(null===e||void 0===e?void 0:e.option))))||void 0===f?void 0:f.optionsrc,"?width=400&height=400")})]});var y}))},i)]},i)}))})},xt=i(9219),mt=i(6524);var gt=function(t){var e,i,o,r,a,d;const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[f]=(0,u.j1)("whatmoreSecondaryColor"),w=(0,u.MO)("whatmoreSecondaryColorShade900"),[j]=(0,u.j1)("whatmorePrimaryFont"),[y]=(0,u.j1)("whatmoreShopId"),[C,b,S,I]=(0,h.Z)(),[k,_]=(0,n.useState)(!1),[T,F]=(0,n.useState)(t.product),E=(0,u.MO)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:P}=(0,n.useContext)(V.I),[z,L,D,M,R,Z,Y]=ht(0,T,t.event),[X,G]=(0,n.useState)(null),[Q,J]=(0,n.useState)(parseFloat(T.price)),[tt,et]=(0,n.useState)(parseFloat(T.compare_price)),[it,ot]=(0,n.useState)(null===T||void 0===T?void 0:T.title),[rt,lt]=(0,n.useState)(T.currency),[at,dt]=(0,n.useState)(null),st=t.event,ct=t.productClickHandler,{whatmoreIsPreviewMode:ut}=(0,n.useContext)(V.I),[gt,ft]=(0,n.useState)(null),[wt,jt]=(0,n.useState)(!1);(0,n.useEffect)((()=>{(0,c.N8M)(y)&&(0,xt.Rb)(T,(0,c.Ipo)(y),y).then((t=>{F(t),J(parseFloat(t.price)),et(parseFloat(t.compare_price)),lt(t.currency),jt(!0)}));(async()=>{var t,e,i,n,o,r;const l=await(0,p.p)(T,(0,c.Ipo)(y),y);dt(l),J("61916709004"==y&&null!==(t=null===l||void 0===l||null===(e=l.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.price)&&void 0!==t?t:null===l||void 0===l?void 0:l.price),et("61916709004"==y&&null!==(n=null===l||void 0===l||null===(o=l.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.compare_at_price)&&void 0!==n?n:null===l||void 0===l?void 0:l.compare_at_price),jt(!0)})()}),[]),(0,n.useEffect)((()=>{var t,e;const i=null!=at?null===at||void 0===at||null===(t=at.options)||void 0===t?void 0:t.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))})):-1,n=-1!==i?null===at||void 0===at||null===(e=at.variants)||void 0===e?void 0:e.map((t=>{var e,n;const o=null===t||void 0===t?void 0:t[`option${i+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===(n=t.featured_image)||void 0===n?void 0:n.src}:null})):[];let o=[];var r;-1!==i&&(o=null===at||void 0===at||null===(r=at.images)||void 0===r?void 0:r.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc}))));ft({position:i,finalArr:n,finalArrExternal:o})}),[at]);var yt=.68*I,Ct=.55*yt,bt=.4*yt,St=yt*(.55-.4),It=yt+"px",kt=bt+"px",_t=St+"px",Tt=.12*bt;const Ft=(0,c.ITD)(y);function Et(){window.location.href=function(t){return(0,c.lj5)(y)?t.product_link+"?"+(0,c.awP)(y)+"&"+(0,c.n9s)(y)+"&"+(0,c.vaK)(y):t.product_link}(T)}const Pt=P.landingLocationType,Ot=P.templateType,zt=(0,mt.NY)(Pt)+(0,mt.dS)(Ot)+(null!==st&&void 0!==st&&st.isRelatedEvent?"R":"E")+"_"+(null===st||void 0===st?void 0:st.event_id);return(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:W,marginBottom:(0,c.pq5)(y),width:It,height:"fit-content",boxShadow:"round"==E?"dark-lg":null,onClick:()=>{!function(t,e){v||m||(async()=>{(0,l.wz)(t,e)})(),"72550089015"==y?Et():ct(e),_(!0)}(st,T)},backgroundColor:(0,K.lA)("#ffffff",(0,c.U5_)(y)),animation:k?A.mT:null,borderRadius:"round"==E?"xl":null,overflow:"hidden",onAnimationEnd:()=>{_(!1)},spacing:0,sx:{borderWidth:(0,c.alU)(y),borderColor:(0,c.qPe)(y)},children:[(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,x.jsx)(s.xu,{height:kt,width:kt,bgColor:"STRDOIDF6O7"==y?"#f7f7f7":w,children:(0,x.jsx)(g.Ee,{width:kt,height:kt,src:(0,pt.s)(null!==(e=null!==(i=null===gt||void 0===gt||null===(o=gt.finalArr)||void 0===o||null===(r=o.find((t=>(null===t||void 0===t?void 0:t.color)==(null===X||void 0===X?void 0:X[null===gt||void 0===gt?void 0:gt.position]))))||void 0===r?void 0:r.src)&&void 0!==i?i:null===gt||void 0===gt||null===(a=gt.finalArrExternal)||void 0===a||null===(d=a.find((t=>(null===t||void 0===t?void 0:t.color)==(null===X||void 0===X?void 0:X[null===gt||void 0===gt?void 0:gt.position]))))||void 0===d?void 0:d.src)&&void 0!==e?e:T.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,c.yOX)(y)+" !important"}})}),(0,x.jsxs)(s.xu,{height:kt,width:yt-bt+"px",children:[(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:(0,c.Fr)(y)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"4px",paddingY:"10px",children:[(0,x.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",1.1*Tt+"px","important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",j,"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,U.s)(it,"prod-tile")}),(0,c.QaY)(y)?(0,x.jsxs)(s.Kq,{className:"whatmore-product-atc-price",direction:(0,c.$zZ)(y)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",borderRadius:"round"==E?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"4px",sx:{margin:"0px !important",marginBottom:"4px !important"},children:[wt&&(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*Tt*(0,c.Rqt)(y)+"px !important",fontWeight:"semibold !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:j+" !important",color:(0,c.Uyp)(y)+" !important",padding:"0px !important",letterSpacing:"normal !important",margin:"0px !important"},children:["\xa0"," "+(0,xt.jx)(null!==Q&&void 0!==Q?Q:null===T||void 0===T?void 0:T.price,"",y,rt)," \xa0"]}),(0,B.B)(Q,tt)&&wt?(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*Tt*(0,c.Rqt)(y)+"px !important",fontWeight:"medium !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:j+" !important",color:(0,c.kPs)(y)+" !important",margin:"0px !important",letterSpacing:"normal !important",textDecoration:"line-through !important"},children:[" ",(0,xt.jx)(null!==tt&&void 0!==tt?tt:null===T||void 0===T?void 0:T.compare_price,"",y,rt)]}):(0,x.jsx)(x.Fragment,{})]}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xv,{fontSize:.82*Tt*(0,c.Rqt)(y)+"px",fontWeight:"medium",lineHeight:"110%",sx:{margin:"0px !important",fontFamily:j+" !important",color:(0,c.eod)(y)+" !important"},children:ut?(0,c.qde)(y):(0,c.aTS)(y)})]}),(0,c.Fr)(y)?(0,x.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,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,x.jsx)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:w,sx:{borderRadius:"round"==E?"5px":"0px",padding:"2px"},spacing:"0px",children:(0,c.ML$)(y)?(0,x.jsx)($.zx,{size:"sm",_hover:{bg:f},sx:{bg:f},children:(0,x.jsx)(s.xv,{color:"white",paddingX:"6px",fontSize:.8*Tt+"px",children:"VIEW PRODUCT"})}):(0,x.jsx)(H.Z,{sx:{color:f,fontSize:1.3*Tt+"px"}})}),(0,x.jsx)(s.xu,{width:"2px"})]})}):(0,x.jsx)(x.Fragment,{})]})]}),(0,x.jsx)(O.Rg,{unmountOnExit:!0,initialScale:.5,in:"awaitingVariantSelection"==z.state,style:{height:"fit-content",width:"100%"},children:"awaitingVariantSelection"==z.state&&null!=D?(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",marginTop:.1*Ct+"px",marginBottom:.1*Ct+"px",overflowY:"auto",overflowX:"hidden",maxHeight:Ct*Ft+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,x.jsx)(vt,{width:It,height:"fit-content",event:st,product:T,finalArr:gt,data:at,productVariantOptions:D,baseFontSize:1.2*Tt,onOptionSelected:t=>{!function(t){G(t);const e=Z(t);e&&(J(e.price),et(e.compare_price),e.title.includes(" ")&&ot(e.title))}(t)}})}):(0,x.jsx)(x.Fragment,{})}),(0,x.jsx)(s.Kq,{className:"whatmore-add-to-cart",direction:"row",width:"100%",height:_t,justifyContent:"center",alignItems:"center",children:(0,x.jsx)(nt,{baseFontSize:.3*St,setProductVariantTitle:ot,product:T,cartState:z.state,cartCount:z.cart_count,updateCartState:L,onClickAtc:t=>{"init"==z.state?(M(zt),(0,q.GF)({userInteractionType:N.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:P,event:st,productList:[T],ctaList:st.cta})):"awaitingVariantSelection"==z.state&&(R(X,zt),ot(null===T||void 0===T?void 0:T.title))},onCartIconClick:()=>{Y()}})})]})},ft=i(3867);var wt=function(t){var e,i,n;const[o]=(0,u.j1)("isInDesignMode"),[r]=(0,u.j1)("isDemoBrand"),[a]=(0,u.j1)("whatmoreSecondaryColor"),[d]=(0,u.j1)("whatmorePrimaryFont"),c=t.event,h=t.product,p=null!==(e=t.baseFontSize)&&void 0!==e?e:10,v=null!==(i=t.width)&&void 0!==i?i:"fit-content",m=null!==(n=t.height)&&void 0!==n?n:"fit-content";return(0,x.jsx)(s.rU,{href:h.product_link,color:a,onClick:()=>{!function(t,e){o||r||(async()=>{(0,l.$L)(t,e)})()}(c,h)},children:(0,x.jsx)(s.xu,{width:v,height:m,padding:"2x",boxShadow:"lg",borderRadius:"md",backgroundColor:"white",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",spacing:"5px",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{lineHeight:"100%",fontSize:1.4*p,fontWeight:"semibold",sx:{fontFamily:d+" !important",color:a+" !important"},children:" VIEW MORE "})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(H.Z,{sx:{color:a,fontSize:1.4*p}})})]})})})},jt=i(6163);function yt(t){var e;const[i]=(0,u.j1)("whatmoreSecondaryColor"),[o]=(0,u.j1)("whatmorePrimaryFont"),[r]=(0,u.j1)("whatmoreShopId"),[l,a]=(0,n.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),h=t.onClick,p=t.width,v=t.height,m=t.title;return(0,x.jsx)(s.xu,{width:p,height:v,padding:"2x",boxShadow:"lg",backgroundColor:"#000000"==(0,c.hmr)(r)?i:(0,c.hmr)(r),onClick:t=>{t.stopPropagation(),h(),a(!0)},animation:l?A.mT:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",children:(0,x.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:o+" !important",color:(0,c.KCy)(r)+" !important"},children:["\xa0",m,"\xa0"]})})})}var Ct=function(t){var e,i,n;const[o]=(0,u.j1)("whatmoreShopId"),r=t.event,l=t.product,a=null!==(e=t.baseFontSize)&&void 0!==e?e:10,d=t.onShopNowClick,s=null!==(i=t.width)&&void 0!==i?i:"100%",h=null!==(n=t.height)&&void 0!==n?n:"100%";return(0,x.jsx)(yt,{onClick:function(){d()},event:r,product:l,baseFontSize:a,width:s,height:h,title:(0,c.Pvx)(o)})};var bt=function(t){var e;const[i]=(0,u.j1)("isInDesignMode"),[o]=(0,u.j1)("isDemoBrand"),[r]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[d,v,m,f]=(0,h.Z)(),[w,j]=(0,n.useState)(!1),[y,C]=(0,n.useState)(t.product),{whatmoreWidgetSourceDetails:b}=(0,n.useContext)(V.I),[S,I,k,_,T,F,E]=ht(0,y,t.event),[P,z]=(0,n.useState)(null),[L,D]=(0,n.useState)(parseFloat(y.price)),[M,R]=(0,n.useState)(parseFloat(y.compare_price)),[K,Z]=(0,n.useState)(y.currency),[H,Y]=(0,n.useState)(!1),X=t.event,G=t.productClickHandler,$=null!==(e=t.tileWidthFactor)&&void 0!==e?e:1,Q=b.landingLocationType,J=b.templateType,tt=(0,mt.NY)(Q)+(0,mt.dS)(J)+(null!==X&&void 0!==X&&X.isRelatedEvent?"R":"E")+"_"+(null===X||void 0===X?void 0:X.event_id);(0,n.useEffect)((()=>{(0,c.N8M)(a)&&(0,xt.Rb)(y,(0,c.Ipo)(a),a).then((t=>{C(t),D(parseFloat(t.price)),R(parseFloat(t.compare_price)),Z(t.currency)}));(async()=>{const t=await(0,p.p)(y,(0,c.Ipo)(a),a);D(null===t||void 0===t?void 0:t.price),R(null===t||void 0===t?void 0:t.compare_at_price),Y(!0)})()}),[]);var et=f*$,it=.3*et,ot=et+"px",rt=.7*it,lt=.9*rt,at=.12*it;const dt=(0,c.ITD)(a);function st(t,e){i||o||(async()=>{(0,l.wz)(t,e)})(),G(e),j(!0)}return(0,x.jsx)(s.Kq,{direction:"row",width:ot,height:"fit-content",justifyContent:"center",children:(0,x.jsx)(s.xu,{marginTop:W,marginBottom:(0,c.pq5)(a),width:ot,onClick:t=>{},animation:w?A.mT:null,borderRadius:"lg",onAnimationEnd:()=>{j(!1)},children:(0,x.jsxs)(s.Kq,{direction:"column",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",spacing:"0px",children:[(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"70%",justifyContent:"space-around",alignItems:"center",borderTopRadius:"lg",overflow:"hidden",onClick:()=>{st(X,y)},children:[(0,x.jsx)(s.xu,{height:rt+"px",width:rt+"px",children:(0,x.jsx)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",children:(0,x.jsx)(s.xu,{height:lt+"px",width:lt+"px",borderRadius:"lg",bgColor:"gray.100",overflow:"hidden",children:(0,x.jsx)(g.Ee,{width:lt+"px",height:lt+"px",src:y.thumbnail_image,objectFit:"cover"})})})}),(0,x.jsx)(s.xu,{height:rt+"px",width:et-rt+"px",children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"space-between",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingY:"10px",spacing:"2px",children:[(0,x.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*at+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:r+" !important",color:"white !important"},children:(0,U.s)(y.title.toString())}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",marginTop:"5px",children:[(0,c.QaY)(a)?(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignItems:"center",borderRadius:"lg",backgroundColor:"blackAlpha.500",paddingX:"10px",paddingY:"5px",children:[H&&(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:1*at+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:r+" !important",color:"white !important"},children:["\xa0"," "+(0,xt.jx)(null!==L&&void 0!==L?L:null===y||void 0===y?void 0:y.price,"",a,K)," \xa0"]}),(0,x.jsx)(s.M5,{children:(0,B.B)(y.price,y.compare_price)&&H?(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.8*at+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:r+" !important",color:"#F9F6EE !important",textDecoration:"line-through !important"},children:[" ",(0,xt.jx)(null!==M&&void 0!==M?M:null===y||void 0===y?void 0:y.compare_price,"",a,K)]}):(0,x.jsx)(x.Fragment,{})})]}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(ft.Z,{storeId:a,productId:y.client_product_id,productLink:y.product_link,fontSize:1*at,fontColor:"white"})})]})]})})]}),(0,x.jsx)(O.Rg,{unmountOnExit:!0,initialScale:.5,in:"awaitingVariantSelection"==S.state,style:{height:"fit-content",width:"100%"},children:"awaitingVariantSelection"==S.state&&null!=k?(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",marginTop:.1*it+"px",marginBottom:.1*it+"px",overflowY:"auto",overflowX:"hidden",maxHeight:it*dt+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,x.jsx)(vt,{width:ot,height:"fit-content",event:X,product:y,productVariantOptions:k,baseFontSize:1*at,onOptionSelected:t=>{!function(t){z(t);const e=F(t);e&&(D(e.price),R(e.compare_price))}(t)},optionTitleColor:"white"})}):(0,x.jsx)(x.Fragment,{})}),(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"30%",justifyContent:"center",alignItems:"center",paddingBottom:"2px",paddingLeft:"2px",paddingRight:"2px",children:[(0,x.jsx)(s.xu,{width:"100%",height:"100%",children:(0,x.jsx)(wt,{baseFontSize:.8*at,event:X,product:y,width:"100%",height:"100%"})}),(0,x.jsx)(s.xu,{width:"100%",height:"100%",borderRadius:"md",overflow:"hidden",children:(0,c.Ib9)(a)?(0,x.jsx)(Ct,{baseFontSize:.8*at,event:X,product:y,borderRadius:"md",onShopNowClick:t=>{st(X,y)}}):(0,x.jsx)(x.Fragment,{children:"form"===(0,c._5p)(a)?(0,x.jsx)(jt.default,{baseFontSize:.8*at,event:X,product:y,width:"100%",height:"100%",showAddedToCart:!0}):(0,x.jsx)(nt,{baseFontSize:.8*at,event:X,product:y,cartState:S.state,cartCount:S.cart_count,borderRadius:"md",onClickAtc:t=>{"init"==S.state?(_(tt),(0,q.GF)({userInteractionType:N.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:b,event:X,productList:[y],ctaList:X.cta})):"awaitingVariantSelection"==S.state&&T(P,tt)},onCartIconClick:()=>{E()}})})})]})]})})})};var St=function(t){var e,i;const[o]=(0,u.j1)("isInDesignMode"),[r]=(0,u.j1)("isDemoBrand"),[a]=(0,u.j1)("whatmoreSecondaryColor"),d=(0,u.MO)("whatmoreSecondaryColorShade900"),[v]=(0,u.j1)("whatmorePrimaryFont"),[m]=(0,u.j1)("whatmoreShopId"),[f,w,j,y]=(0,h.Z)(),[C,b]=(0,n.useState)(!1),[S,I]=(0,n.useState)(t.product),k=(0,u.MO)("whatmoreUITheme"),[_,T]=(0,n.useState)(!1),[F,E]=(0,n.useState)(parseFloat(S.price)),[P,O]=(0,n.useState)(parseFloat(S.compare_price)),[z,L]=(0,n.useState)(S.currency),D=t.event,[M,R]=(0,n.useState)();(0,n.useEffect)((()=>{(0,c.N8M)(m)&&(0,xt.Rb)(S,(0,c.Ipo)(m),m).then((t=>{I(t),E(parseFloat(t.price)),O(parseFloat(t.compare_price)),L(t.currency),T(!0)}));(async()=>{const t=await(0,p.p)(S,(0,c.Ipo)(m),m);R(t),T(!0)})()}),[]);var Z=.68*y,Y=.4*Z,X=Z+"px",G=Y+"px",$=Z*(.55-.4)+"px",Q=.12*Y;(0,c.ITD)(m);const{whatmoreWidgetSourceDetails:J}=(0,n.useContext)(V.I);function tt(t){return(0,c.lj5)(m)?t.product_link+"?"+(0,c.awP)(m)+"&"+(0,c.n9s)(m)+"&"+(0,c.vaK)(m):t.product_link}function et(t,e){o||r||(async()=>{(0,l.wz)(t,e),(0,q.GF)({userInteractionType:N.K.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:J,event:t,productList:[e],ctaList:t.cta})})(),b(!0)}return(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:W,marginBottom:(0,c.pq5)(m),width:X,height:"fit-content",boxShadow:"round"==k?"dark-lg":null,onClick:()=>{et(D,S),window.location.href=tt(S)},backgroundColor:(0,K.lA)("#ffffff",(0,c.U5_)(m)),animation:C?A.mT:null,borderRadius:"round"==k?"xl":null,overflow:"hidden",onAnimationEnd:()=>{b(!1)},spacing:0,sx:{borderWidth:(0,c.alU)(m),borderColor:(0,c.qPe)(m)},children:[(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,x.jsx)(s.xu,{height:G,width:G,children:(0,x.jsx)(g.Ee,{width:G,height:G,src:(0,pt.s)(S.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,c.yOX)(m)+" !important"}})}),(0,x.jsxs)(s.xu,{height:G,width:Z-Y+"px",children:[(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:(0,c.Fr)(m)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingTop:"10px",paddingBottom:"16px",children:[(0,x.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:v+" !important",color:"black !important",lineHeight:"120% !important",fontWeight:"medium !important",fontSize:1.1*Q+"px !important"},children:(0,U.s)(null==S.title?"":S.title.toString(),"prod-tile")}),(0,c.QaY)(m)?(0,x.jsxs)(s.Kq,{className:"whatmore-product-shopnow-price",direction:(0,c.$zZ)(m)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",marginTop:"5px",borderRadius:"round"==k?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"5px",children:[_&&(0,x.jsxs)(s.xv,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},noOfLines:1,fontSize:.9*Q+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:v+" !important",color:(0,c.Uyp)(m)+" !important",margin:"0px !important"},children:[" "+(0,xt.jx)(null!==(e=null===M||void 0===M?void 0:M.price)&&void 0!==e?e:F,"",m,z)," \xa0"]}),(0,B.B)(F,P)&&_?(0,x.jsxs)(s.xv,{as:"s",style:{minHeight:0,textDecoration:"line-through"},noOfLines:1,fontSize:.9*Q+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:v+" !important",color:(0,c.kPs)(m)+" !important",margin:"0px !important"},children:[" ",(0,xt.jx)(null!==(i=null===M||void 0===M?void 0:M.compare_at_price)&&void 0!==i?i:P,"",m,z)]}):(0,x.jsx)(x.Fragment,{})]}):(0,x.jsx)(x.Fragment,{}),""!=(0,c.sG7)(m)&&(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*Q+"px",lineHeight:"100%",paddingTop:"6px",sx:{fontFamily:(0,c.V3Y)(m)+" !important",color:(0,c.aUT)(m)+" !important",margin:"0px !important"},children:["\xa0",(0,c.sG7)(m)," \xa0"]})]}),(0,c.Fr)(m)?(0,x.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,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,x.jsx)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:d,sx:{borderRadius:"round"==k?"5px":"0px",padding:"2px"},spacing:"0px",children:(0,x.jsx)(H.Z,{sx:{color:a,fontSize:1.3*Q+"px"}})}),(0,x.jsx)(s.xu,{width:"2px"})]})}):(0,x.jsx)(x.Fragment,{})]})]}),(0,c.pp3)(m)&&(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:$,justifyContent:"center",alignItems:"center",children:(0,x.jsx)(Ct,{baseFontSize:.8*Q,event:D,product:S,borderRadius:"md",onShopNowClick:t=>{et(D,S),window.location.href=tt(S)}})})]})};function It(t){var e;const[i]=(0,u.j1)("whatmoreSecondaryColor"),[o]=(0,u.j1)("whatmorePrimaryFont"),[r]=(0,u.j1)("whatmoreShopId"),[l,a]=(0,n.useState)(!1),d=null!==(e=t.baseFontSize)&&void 0!==e?e:10,h=t.onClick,p=t.width,v=t.height,m=t.title,g=t.showInProgressIcon;return"awaitingVariantSelection"==t.cartState||"productVariantDetailsApiCallInProgress"==t.cartState?(0,x.jsx)(kt,{onClick:()=>t.onClick(),event:t.event,product:t.product,baseFontSize:d,width:p,height:v}):(0,x.jsxs)(s.xu,{display:"flex",width:"fit-content",minWidth:"75%",padding:"2x",boxShadow:"lg",animation:l?A.mT:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:["awaitingVariantSelection"==t.cartState&&(0,x.jsx)(s.Kq,{direction:"row",alignItems:"center",justifyContent:"center",paddingY:"2px",backgroundColor:"white",onClick:e=>{e.stopPropagation(),t.updateCartState("init"),a(!0)},children:(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:o+" !important",color:"#343434 !important"},children:["\xa0","63064310011"==r?"Annuler":"Cancel","\xa0"]})}),(0,x.jsxs)(s.Kq,{direction:"row",backgroundColor:g?(0,K.lA)(i,8):i,width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",onClick:t=>{t.stopPropagation(),h(),a(!0)},children:[(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:o+" !important",color:(0,c.KCy)(r)+" !important"},children:["\xa0",m,"\xa0"]}),g?(0,x.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,x.jsx)(G.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*d+"px"}})}):(0,x.jsx)(x.Fragment,{})]})]})}function kt(t){const[e]=(0,u.j1)("whatmoreSecondaryColor"),[i]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),[r,l]=(0,n.useState)(!1),a=t.onClick,d=t.baseFontSize;return(0,x.jsx)(s.Kq,{direction:"row",paddingBottom:"3%",position:"relative",children:(0,x.jsx)(s.xu,{width:"fit-content",minWidth:"75%",boxShadow:"lg",padding:"6px 12px",borderRadius:"6px",backgroundColor:e,onClick:t=>{t.stopPropagation(),a(),l(!0)},animation:r?A.mT:null,onAnimationEnd:()=>{l(!1)},cursor:"pointer",zIndex:"1000",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",children:(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{lineHeight:"100%",fontSize:1.3*d+"px",fontWeight:"semibold",sx:{fontFamily:`${i} !important`,color:`${(0,c.KCy)(o)} !important`},children:(0,c.tan)(o)})})})})})}function _t(t){var e;const[i]=(0,u.j1)("whatmorePrimaryFont"),n=null!==(e=t.baseFontSize)&&void 0!==e?e:10;t.width,t.height;return(0,x.jsx)(s.xu,{width:"fit-content",height:"fit-content !important",minWidth:"75%",boxShadow:"lg",backgroundColor:"white",borderRadius:"6px",borderColor:"gray",borderWidth:"1px",onClick:t=>{t.stopPropagation()},children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",alignItems:"center",paddingX:"4px",paddingY:"3px",justifyContent:"center",children:(0,x.jsxs)(s.xv,{color:"gray",lineHeight:"100%",fontSize:1.2*n+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:"gray !important"},children:["\xa0"," Sold Out ","\xa0"]})})})}function Tt(t){var e;const[i]=(0,u.j1)("whatmoreSecondaryColor"),[n]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.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,t.height,t.onCartIconClick);return(0,x.jsx)(s.xu,{width:"fit-content",minWidth:"75%",borderRadius:"6px",padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:i,borderWidth:"1px",onClick:t=>{t.stopPropagation()},cursor:"pointer",children:(0,x.jsxs)(s.Kq,{direction:"row",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:[(0,x.jsx)(s.M5,{paddingX:"5px",onClick:()=>{d()},children:"1972174947"!=o&&"55194878152"!=o&&"12181504100"!=o?(0,x.jsx)(X.Z,{sx:{color:i,fontSize:1.6*r}}):(0,x.jsx)($.zx,{size:"sm",_hover:{bg:i},sx:{bg:i},children:(0,x.jsx)(s.xv,{paddingX:"6px",color:"white",sx:{fontSize:.85*r},children:"GO TO CART"})})}),(0,x.jsx)(s.xv,{color:i,fontSize:1.3*r+"px !important",fontWeight:"semibold !important",sx:{fontFamily:n+" !important"},children:a}),(0,x.jsx)(s.M5,{paddingX:"5px",onClick:t=>{t.stopPropagation(),l()},children:(0,x.jsx)(Y.Z,{sx:{color:i,fontSize:1.6*r}})})]})})}var Ft=function(t){var e,i,n,o;const[r]=(0,u.j1)("whatmoreShopId"),l=t.event,a=t.product,d=null!==(e=t.baseFontSize)&&void 0!==e?e:10,s=null===(i=t.showAddedToCart)||void 0===i||i,c=t.cartState,h=t.cartCount,p=t.onClickAtc,v=t.onCartIconClick;function m(){p()}const g=null!==(n=t.width)&&void 0!==n?n:"100%",f=null!==(o=t.height)&&void 0!==o?o:"100%";return"errored"==c?(0,x.jsx)(O.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{},children:(0,x.jsx)(_t,{event:l,product:a,baseFontSize:d,width:g,height:f})}):"init"==c?0==h?(0,x.jsx)(kt,{onClick:m,event:l,product:a,baseFontSize:d,width:g,height:f}):s?(0,x.jsx)(O.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,children:(0,x.jsx)(Tt,{onClick:m,event:l,product:a,baseFontSize:d,cartCount:h,width:g,height:f,onCartIconClick:v})}):(0,x.jsx)(kt,{onClick:m,event:l,product:a,baseFontSize:d,width:g,height:f}):(0,x.jsx)(It,{onClick:m,cartState:c,updateCartState:t.updateCartState,event:l,product:a,baseFontSize:d,width:g,height:f,title:"awaitingVariantSelection"==c?"63064310011"==r?"Valider":"Done":"",showInProgressIcon:"atcApiCallInProgress"==c||"productVariantDetailsApiCallInProgress"==c})};var Et=function(t){var e,i,o,r,a,d;const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[f]=(0,u.j1)("whatmorePrimaryFont"),[w]=(0,u.j1)("whatmoreShopId"),[j,y,C,b]=(0,h.Z)(),[S,I]=(0,n.useState)(!1),[k,_]=(0,n.useState)(t.product),T=(0,u.MO)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:F}=(0,n.useContext)(V.I),[E,P,O,z,L,D,M]=ht(0,k,t.event),[R,Z]=(0,n.useState)(null),[H,Y]=(0,n.useState)(parseFloat(k.price)),[X,G]=(0,n.useState)(parseFloat(k.compare_price)),[$,Q]=(0,n.useState)(k.currency),[J,tt]=(0,n.useState)(null),et=t.event,it=t.productClickHandler,[nt,ot]=(0,n.useState)(null),[rt,lt]=(0,n.useState)(!1),at=F.landingLocationType,dt=F.templateType,st=(0,mt.NY)(at)+(0,mt.dS)(dt)+"_"+(null===et||void 0===et?void 0:et.event_id);(0,n.useEffect)((()=>{(0,c.N8M)(w)&&(0,xt.Rb)(k,(0,c.Ipo)(w),w).then((t=>{_(t),Y(parseFloat(t.price)),G(parseFloat(t.compare_price)),Q(t.currency),lt(!0)}));(async()=>{const t=await(0,p.p)(k,(0,c.Ipo)(w),w);tt(t),Y(null===t||void 0===t?void 0:t.price),G(null===t||void 0===t?void 0:t.compare_at_price),lt(!0)})()}),[]),(0,n.useEffect)((()=>{var t,e;const i=null!=J?null===J||void 0===J||null===(t=J.options)||void 0===t?void 0:t.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))})):-1,n=-1!==i?null===J||void 0===J||null===(e=J.variants)||void 0===e?void 0:e.map((t=>{var e,n;const o=null===t||void 0===t?void 0:t[`option${i+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===(n=t.featured_image)||void 0===n?void 0:n.src}:null})):[];let o=[];var r;-1!==i&&(o=null===J||void 0===J||null===(r=J.images)||void 0===r?void 0:r.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc}))));ot({position:i,finalArr:n,finalArrExternal:o})}),[J]);var ct=.72*b,ut=.37*ct,vt=ct*(.48-.37),gt=.95*ct+"px",ft=ut+"px",wt=.12*ut;function jt(){window.location.href=function(t){return(0,c.lj5)(w)?t.product_link+"?"+(0,c.awP)(w)+"&"+(0,c.n9s)(w)+"&"+(0,c.vaK)(w):t.product_link}(k)}return(0,x.jsx)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:W,marginBottom:"24px",width:gt,boxShadow:"round"==T?"dark-lg":null,onClick:()=>{!function(t,e){v||m||(async()=>{(0,l.wz)(t,e)})(),"72550089015"==w?jt():it(e),I(!0)}(et,k)},backgroundColor:(0,K.lA)("#ffffff",(0,c.U5_)(w)),animation:S?A.mT:null,borderRadius:"round"==T?"xl":null,overflow:"hidden",onAnimationEnd:()=>{I(!1)},spacing:0,sx:{borderWidth:(0,c.alU)(w),borderColor:(0,c.qPe)(w)},children:(0,x.jsxs)(s.Kq,{display:"flex",direction:"row",width:"full",height:"fit-content",justifyContent:"center",alignContent:"center",cursor:"pointer",alignItems:"center",gap:"8px",children:[(0,x.jsx)(s.xu,{height:ft,width:ft,children:(0,x.jsx)(g.Ee,{width:"100%",height:"100%",src:(0,pt.s)(null!==(e=null!==(i=null===nt||void 0===nt||null===(o=nt.finalArr)||void 0===o||null===(r=o.find((t=>(null===t||void 0===t?void 0:t.color)==(null===R||void 0===R?void 0:R[null===nt||void 0===nt?void 0:nt.position]))))||void 0===r?void 0:r.src)&&void 0!==i?i:null===nt||void 0===nt||null===(a=nt.finalArrExternal)||void 0===a||null===(d=a.find((t=>(null===t||void 0===t?void 0:t.color)==(null===R||void 0===R?void 0:R[null===nt||void 0===nt?void 0:nt.position]))))||void 0===d?void 0:d.src)&&void 0!==e?e:k.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,c.yOX)(w)+" !important"}})}),(0,x.jsx)(s.xu,{height:ft,width:ct-ut+"px",children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"flex-start",height:"100%",gap:"4px",paddingTop:"12px",width:"100%",children:[(0,x.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",wt+"px","important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",f,"important"),t.style.setProperty("white-space","nowrap","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"),t.style.setProperty("padding","0","important"),t.style.setProperty("font-weight","normal","important"))},children:(0,U.s)(null==k.title?"":k.title.toString())}),(0,c.QaY)(w)?(0,x.jsxs)(s.Kq,{direction:(0,c.$zZ)(w)?"row":"row-reverse",sx:{margin:"0px !important",minHeight:1.1*wt+"px"},children:[rt&&(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*wt*(0,c.Rqt)(w)+"px !important",lineHeight:"100%",sx:{fontFamily:f+" !important",color:(0,c.Uyp)(w)+" !important",fontWeight:"bold"},children:[" "+(0,xt.jx)(null!==H&&void 0!==H?H:null===k||void 0===k?void 0:k.price,"",w,$)," \xa0"]}),(0,B.B)(H,X)&&rt?(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*wt*(0,c.Rqt)(w)+"px !important",fontWeight:"medium !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:f+" !important",color:(0,c.kPs)(w)+" !important",margin:"0px !important",letterSpacing:"normal !important",textDecoration:"line-through !important"},children:[" ",(0,xt.jx)(null!==X&&void 0!==X?X:null===k||void 0===k?void 0:k.compare_price,"",w,$)]}):(0,x.jsx)(x.Fragment,{})]}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(Ft,{baseFontSize:.3*vt,event:et,product:k,cartState:E.state,cartCount:E.cart_count,updateCartState:P,onClickAtc:t=>{"init"===E.state?(z(st,!0),(0,q.GF)({userInteractionType:N.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:F,event:et,productList:[k],ctaList:et.cta})):"awaitingVariantSelection"===E.state&&it(k)},onCartIconClick:t=>{M()}})]})})]})})};var Pt=function(t){const[e]=(0,u.j1)("whatmoreShopId"),[i]=(0,u.j1)("isWhatmoreWebsite"),n=(0,c.eyg)(e),o=t.event,r=t.product;return i?(0,x.jsx)(St,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"broad-tile"==n?(0,x.jsx)(gt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"broad-tile-no-cta"==n?(0,x.jsx)(St,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"broad-tile-new-atc"==n?(0,x.jsx)(Et,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"link_only"==n?(0,x.jsx)(Z,{product:t.product,event:t.event}):"narrow-tile"==n?(0,x.jsx)(bt,{event:o,product:r,productClickHandler:t.productClickHandler,tileWidthFactor:o.products.length>1?.68:void 0}):(0,x.jsx)(x.Fragment,{})},Ot=i(6119),zt=i(3388),Lt=i(7643);var Dt=function(t){const[e,i,n,l]=(0,h.Z)(),[a]=(0,u.j1)("whatmoreShopId"),d=(0,u.MO)("isInDesignMode"),p=(0,u.MO)("isDemoBrand"),v=t.event,m=t.productClickHandler,g=(0,c.eyg)(a);if(!(0,zt.kT)(v))return(0,x.jsx)(x.Fragment,{});if(1==v.products.length&&(void 0==v.cta||0==v.cta.length)){const t=v.products[0];return(0,c.rnv)(a)?(0,x.jsx)(s.Kq,{direction:"horizontal",width:l,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,x.jsx)(Lt.u,{userInteractionType:N.K.PRODUCT_CTA_VIEW,event:v,productList:[t],triggerFlag:!d&&!p,children:(0,x.jsx)(s.M5,{children:(0,x.jsx)(bt,{event:v,product:t,productClickHandler:m},v.event_id+t.product_id)})})}):(0,x.jsx)(s.Kq,{direction:"horizontal",width:l,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,x.jsx)(s.M5,{children:(0,x.jsx)(Lt.u,{userInteractionType:N.K.PRODUCT_CTA_VIEW,event:v,productList:[t],triggerFlag:!d&&!p,children:(0,x.jsx)(Pt,{event:v,product:t,productClickHandler:m},v.event_id+t.product_id)})})})}return(0,x.jsx)(s.M5,{children:(0,x.jsx)("div",{onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,x.jsx)(s.xu,{width:l+"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,x.jsxs)(o.tq,{className:"product-tile swiper-slide",slidesPerView:1==v.products.length?1:1.4,initialSlide:v.products.length<=2||(0,c.VqZ)(a)?0:1,centeredSlides:!(0,c.VqZ)(a),modules:[r.Gk],mousewheel:{invert:!1,thresholdDelta:20},nested:!0,children:[("STRDOIDF6O7"===a?[v.products[0]]:v.products).map((t=>"oos"!=t.product_status&&(0,x.jsx)(o.o5,{children:(0,x.jsx)(Lt.u,{userInteractionType:N.K.PRODUCT_CTA_VIEW,event:v,productList:[t],triggerFlag:!d&&!p,children:(0,x.jsx)(s.Kq,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",alignItems:"center",children:(0,x.jsx)(Pt,{event:v,product:t,productClickHandler:m},v.event_id+t.product_id)})})},v.event_id+t.product_id))),(0,c.pp3)(a)&&void 0!=v.cta&&v.cta.map((t=>(0,x.jsx)(x.Fragment,{children:""!==t.cta_title.trim()&&(0,x.jsx)(o.o5,{children:(0,x.jsx)(s.Kq,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",paddingBottom:"12px",alignItems:"center",children:(0,x.jsx)(Ot.Z,{fontFactor:.75,cta:t},v.event_id+t.cta_id)})},v.event_id+t.cta_id)})))]})})})})};var Mt=function(t){const[e,i]=(0,u.j1)("isProductSwiperCatalogOpen"),o=t.event,r=t.productClickHandler;return(0,n.useContext)(yi).isIOS&&e?(0,x.jsx)(Dt,{event:o,productClickHandler:r},o.event_id):(0,x.jsx)(O.MT,{unmountOnExit:!0,initialScale:.2,in:e,children:(0,x.jsx)(Dt,{event:o,productClickHandler:r},o.event_id)})};function Rt(t){const e=t.event,[i,n,o,r]=(0,h.Z)(),[l]=(0,u.j1)("whatmorePrimaryFont");return(0,x.jsx)(s.xu,{width:"fit-content",height:"fit-content",padding:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{overflow:"hidden",size:.15*r+"px",children:(0,x.jsx)(g.Ee,{width:"100%",height:"100%",src:e.thumbnail_image})})}),(0,x.jsx)(s.xu,{width:"fit-content",height:"fit-content",children:(0,x.jsxs)(s.Kq,{direction:"column",width:"fit-content",height:"fit-content",children:[(0,x.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,x.jsx)(E.Z,{event:e,fontSize:.03*r+"px"})]})})]})})}var At=function(t){const[e]=(0,u.j1)("isInDesignMode"),[i]=(0,u.j1)("isDemoBrand"),[o,r]=(0,u.j1)("isProductSwiperCatalogOpen"),[l,a]=(0,j.Z)(),[d,h]=(0,u.j1)("isFirstIndicatorRenderDone"),p=(0,n.useContext)(yi),[v]=(0,u.j1)("whatmoreShopId"),m=t.event,g=t.isLast,f=t.onCloseCallback,w=t.focusRef,C=t.productClickHandler;return(0,x.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",children:(0,x.jsxs)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,x.jsx)(s.xu,{width:"full",margin:"2px",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"space-between",paddingRight:"10px",paddingLeft:"10px",children:[(0,x.jsx)(Rt,{event:m}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,x.jsx)(y,{focusRef:w}),(0,x.jsx)(P.Z,{event:m,onCloseCallback:f})]})]})}),(0,x.jsx)(s.xu,{width:"100%",height:"100%",onClick:()=>{a(!l)}}),(0,x.jsxs)(s.xu,{width:"full",height:"fit-content",children:[p.totalEvents>1&&!d&&p.showSwipeIndicator?(0,x.jsx)(s.xu,{width:"full",margin:"2px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,x.jsx)(M,{swipeUp:!g})})}):null,void 0!=m.products&&m.products.length>0?(0,x.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(v)?(0,x.jsx)(s.xu,{w:"100%",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(F,{event:m,onToggle:t=>{r("minimize-button"!==t)}})})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{display:"flex",width:"100%",height:"fit-content",children:(0,x.jsx)(Mt,{event:m,productClickHandler:C})})]}):(0,x.jsx)("div",{})]})]})})},Kt=i(8302);function Wt(t){const[e,i,o,r]=(0,h.Z)(),[l]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[d,p]=(0,n.useState)(""),v=t.data,m=(t.event,t.product,t.setShowOptionsChart);var f=.4*r*.8*.13;(0,n.useEffect)((()=>{let t="vanyaclothing.myshopify.com";"1972174947"===a?t="vanyaclothing.myshopify.com":"57415434338"===a&&(t="usvanya.myshopify.com");const e=`https://app.kiwisizing.com/api/getSizingChart?shop=${t}&product=${null===v||void 0===v?void 0:v.id}&title=${null===v||void 0===v?void 0:v.title}&tags=&cacheSettingsUpdateAt=2020-08-11T15%3A19%3A49.000Z&settingsVersion=19`;fetch(e).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>{var e,i,n,o,r,l;p(null===t||void 0===t||null===(e=t.sizings)||void 0===e||null===(i=e[0])||void 0===i||null===(n=i.layout)||void 0===n||null===(o=n.data)||void 0===o||null===(r=o[0])||void 0===r||null===(l=r.data)||void 0===l?void 0:l.url)})).catch((t=>{console.error("Error fetching data:",t)}))}),[]);const w=`${b.F4`
|
68
|
+
`} infinite 1.5s linear`;return(0,x.jsx)(O.MT,{unmountOnExit:!0,initialScale:.2,in:d,reverse:!0,delay:m,children:(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",paddingTop:100,borderRadius:"3xl",children:(0,x.jsxs)(s.Kq,{direction:"column",width:"100%",height:"fit-content",justifyContent:"flex-end",children:[(0,x.jsx)(s.M5,{animation:"vertical"===p?w:j,children:"vertical"===p?(0,x.jsx)(z.Z,{sx:{color:"white !important",fontSize:g,filter:"drop-shadow(0 0 20px black);"}}):(0,x.jsx)(L.Z,{sx:{color:"white !important",fontSize:g,filter:"drop-shadow(0 0 20px black);"}})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{textShadow:"dark-lg",fontSize:f+"px",fontWeight:"semibold",sx:{color:"white !important",textShadow:"0px 0px 20px black !important;"},children:"swipe for more"})})]})})})};var M=function(t){const[e,i]=(0,u.j1)("isFirstIndicatorRenderDone"),[o]=(0,u.j1)("indicatorRenderSeconds"),r=o,l=t.swipeUp;return(0,n.useEffect)((()=>{const t=setTimeout((()=>{i(!0)}),3e3+1e3*r);return()=>{clearTimeout(t)}}),[]),e?null:(0,x.jsx)(D,{showForSeconds:.8*r,delayInSeconds:3,swipeUp:l})},R=i(5180),A=i(9316),K=i(5254);const W="15px";var q=i(4522),N=i(778),V=i(364);var Z=function(t){const[e]=(0,u.j1)("isInDesignMode"),[i]=(0,u.j1)("isDemoBrand"),[o]=(0,u.j1)("whatmoreSecondaryColor"),[r]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[d,p,v,m]=(0,h.Z)(),[g,f]=(0,n.useState)(!1),w=t.product,j=t.event,{whatmoreWidgetSourceDetails:y}=(0,n.useContext)(V.I),C=.1*v,b=.95*m,S=.05*m;return(0,x.jsx)(s.Kq,{direction:"row",height:C,justifyContent:"center",alignItems:"center",alignContent:"center",bgGradient:"linear(to-b, transparent, blackAlpha.400, blackAlpha.600)",children:(0,x.jsx)(s.Kq,{direction:"column",width:"fit-content",height:C,justifyContent:"center",alignItems:"center",alignContent:"center",children:(0,x.jsx)(s.xu,{width:b+"px",height:"fit-content",padding:"6px",marginTop:W,backgroundColor:o,borderRadius:"5px",animation:g?A.mT:null,onAnimationEnd:()=>{f(!1)},marginBottom:(0,c.pq5)(a),onClick:()=>{f(!0),function(t,n){e||i||(async()=>{(0,l.wz)(t,n),(0,q.GF)({userInteractionType:N.K.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:y,event:t,productList:[n],ctaList:t.cta})})()}(j,w),window.location.href=function(t){return(0,c.lj5)(a)?t.product_link+"?"+(0,c.awP)(a)+"&"+(0,c.n9s)(a)+"&"+(0,c.vaK)(a):t.product_link}(w)},_hover:{backgroundColor:(0,K.lA)(o,8)},cursor:"pointer",children:(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*S+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:r+" !important",color:"white !important"},children:(0,c.Pvx)(a)})})})})})},H=i(7009),U=i(5945),B=i(5456),Y=i(6984),X=i(6227),G=i(7329),$=(i(9111),i(9748));const Q={en:{add_to_cart:"ADD TO CART",buy_now:"BUY NOW",more_info:"MORE INFO",size:"Size",color:"Color",description:"Description",like:"Like",share:"Share",talk_to_us:"Talk to Us",done:"Done",cancel:"Cancel",view_product:"View Product",go_to_cart:"Go to Cart"},ar:{add_to_cart:"\u0623\u0636\u0641 \u0625\u0644\u0649 \u0627\u0644\u0633\u0644\u0629",buy_now:"\u0627\u0634\u062a\u0631\u0650 \u0627\u0644\u0622\u0646",more_info:"\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a",size:"\u0627\u0644\u062d\u062c\u0645",color:"\u0627\u0644\u0644\u0648\u0646",description:"\u0627\u0644\u0648\u0635\u0641",like:"\u0623\u0639\u062c\u0628\u0646\u064a",share:"\u0645\u0634\u0627\u0631\u0643\u0629",talk_to_us:"\u062a\u062d\u062f\u062b \u0625\u0644\u064a\u0646\u0627",done:"\u062a\u0645",cancel:"\u0625\u0644\u063a\u0627\u0621",view_product:"\u0639\u0631\u0636 \u0627\u0644\u0645\u0646\u062a\u062c",go_to_cart:"\u0627\u0630\u0647\u0628 \u0625\u0644\u0649 \u0627\u0644\u0633\u0644\u0629",watch_and_buy:"\u0634\u0627\u0647\u062f \u0648\u0627\u0634\u062a\u0631\u064a"},da:{add_to_cart:"In den Warenkorb",buy_now:"Jetzt kaufen",more_info:"Mehr Infos",size:"Gr\xf6\xdfe",color:"Farbe",description:"Beschreibung",like:"Gef\xe4llt mir",share:"Teilen",talk_to_us:"Sprechen Sie mit uns",done:"Fertig",cancel:"Abbrechen",view_product:"Produkt ansehen",go_to_cart:"Zum Warenkorb",watch_and_buy:"Ansehen und kaufen"},de:{add_to_cart:"In den Warenkorb",buy_now:"Jetzt kaufen",more_info:"Mehr Infos",size:"Gr\xf6\xdfe",color:"Farbe",description:"Beschreibung",like:"Gef\xe4llt mir",share:"Teilen",talk_to_us:"Sprechen Sie mit uns",done:"Fertig",cancel:"Abbrechen",view_product:"Produkt ansehen",go_to_cart:"Zum Warenkorb",watch_and_buy:"Ansehen und kaufen"},es:{add_to_cart:"A\xf1adir al carrito",buy_now:"Comprar ahora",more_info:"M\xe1s informaci\xf3n",size:"Tama\xf1o",color:"Color",description:"Descripci\xf3n",like:"Me gusta",share:"Compartir",talk_to_us:"Habla con nosotros",done:"Hecho",cancel:"Cancelar",view_product:"Ver producto",go_to_cart:"Ir al carrito",watch_and_buy:"Ver y comprar"},fr:{add_to_cart:"Ajouter au panier",buy_now:"Acheter maintenant",more_info:"Plus d'infos",size:"Taille",color:"Couleur",description:"Description",like:"J'aime",share:"Partager",talk_to_us:"Parlez-nous",done:"Valider",cancel:"Annuler",view_product:"Voir le produit",go_to_cart:"Aller au panier",watch_and_buy:"Regarder et acheter"},ja:{add_to_cart:"\u30ab\u30fc\u30c8\u306b\u8ffd\u52a0",buy_now:"\u4eca\u3059\u3050\u8cfc\u5165",more_info:"\u8a73\u7d30\u60c5\u5831",size:"\u30b5\u30a4\u30ba",color:"\u8272",description:"\u8aac\u660e",like:"\u3044\u3044\u306d",share:"\u5171\u6709",talk_to_us:"\u304a\u554f\u3044\u5408\u308f\u305b",done:"\u5b8c\u4e86",cancel:"\u30ad\u30e3\u30f3\u30bb\u30eb",view_product:"\u5546\u54c1\u3092\u898b\u308b",go_to_cart:"\u30ab\u30fc\u30c8\u306b\u9032\u3080",watch_and_buy:"\u8996\u8074\u3057\u3066\u8cfc\u5165"},nl:{add_to_cart:"Aan winkelwagentje toevoegen",buy_now:"Nu kopen",more_info:"Meer informatie",size:"Maat",color:"Kleur",description:"Beschrijving",like:"Vind ik leuk",share:"Delen",talk_to_us:"Praat met ons",done:"Klaar",cancel:"Annuleren",view_product:"Bekijk product",go_to_cart:"Ga naar winkelwagentje",watch_and_buy:"Kijk en koop"},pt:{add_to_cart:"Adicionar ao carrinho",buy_now:"Comprar agora",more_info:"Mais informa\xe7\xf5es",size:"Tamanho",color:"Cor",description:"Descri\xe7\xe3o",like:"Curtir",share:"Compartilhar",talk_to_us:"Fale conosco",done:"Conclu\xeddo",cancel:"Cancelar",view_product:"Ver produto",go_to_cart:"Ir para o carrinho",watch_and_buy:"Assistir e comprar"},zh:{add_to_cart:"\u52a0\u5165\u8d2d\u7269\u8f66",buy_now:"\u7acb\u5373\u8d2d\u4e70",more_info:"\u66f4\u591a\u4fe1\u606f",size:"\u5c3a\u5bf8",color:"\u989c\u8272",description:"\u63cf\u8ff0",like:"\u559c\u6b22",share:"\u5206\u4eab",talk_to_us:"\u8054\u7cfb\u6211\u4eec",done:"\u5b8c\u6210",cancel:"\u53d6\u6d88",view_product:"\u67e5\u770b\u5546\u54c1",go_to_cart:"\u524d\u5f80\u8d2d\u7269\u8f66",watch_and_buy:"\u89c2\u770b\u5e76\u8d2d\u4e70"}};function J(t){var e,i,o;const[r]=(0,u.j1)("whatmoreSecondaryColor"),[l]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[d,h]=(0,n.useState)(!1),p=null!==(e=t.baseFontSize)&&void 0!==e?e:10,v=t.onClick,m=t.width,g=t.height,f=t.title,w=t.showInProgressIcon;return(0,x.jsxs)(s.xu,{display:"flex",width:m,height:g,padding:"2x",boxShadow:"lg",animation:d?A.mT:null,onAnimationEnd:()=>{h(!1)},cursor:"pointer",children:["awaitingVariantSelection"==t.cartState&&(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",backgroundColor:"white",onClick:e=>{e.stopPropagation(),t.updateCartState("init"),t.setProductVariantTitle(t.productTitle),h(!0)},children:(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*p+"px !important",fontWeight:"semibold !important",sx:{fontFamily:l+" !important",color:"#343434 !important"},children:["\xa0",null!==(i=null===Q||void 0===Q||null===(o=Q[null===t||void 0===t?void 0:t.websiteLanguage])||void 0===o?void 0:o.cancel)&&void 0!==i?i:"Cancel","\xa0"]})}),(0,x.jsxs)(s.Kq,{direction:"row",backgroundColor:w?(0,K.lA)(r,8):r,width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",onClick:t=>{t.stopPropagation(),v(),h(!0)},children:[(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*p+"px !important",fontWeight:"semibold !important",sx:{fontFamily:l+" !important",color:(0,c.KCy)(a)+" !important"},children:["\xa0",f,"\xa0"]}),w?(0,x.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,x.jsx)(G.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*p+"px"}})}):(0,x.jsx)(x.Fragment,{})]})]})}function tt(t){var e,i,o;const[r]=(0,u.j1)("whatmoreSecondaryColor"),[l]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[d,h]=(0,n.useState)(!1),p=null!==(e=t.baseFontSize)&&void 0!==e?e:10,v=t.onClick,m=t.width,g=t.height;return(0,x.jsx)(s.xu,{width:m,height:g,padding:"2x",boxShadow:"lg",backgroundColor:"#000000"==(0,c.hmr)(a)?r:(0,c.hmr)(a),onClick:t=>{t.stopPropagation(),v(),h(!0)},animation:d?A.mT:null,onAnimationEnd:()=>{h(!1)},cursor:"pointer",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",children:(0,x.jsx)(s.M5,{children:(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*p+"px !important",fontWeight:"semibold !important",sx:{fontFamily:l+" !important",color:(0,c.KCy)(a)+" !important"},children:["\xa0","ADD TO CART"!=(0,c.tan)(a)?(0,c.tan)(a):null!==(i=null===Q||void 0===Q||null===(o=Q[null===t||void 0===t?void 0:t.websiteLanguage])||void 0===o?void 0:o.add_to_cart)&&void 0!==i?i:(0,c.tan)(a),"\xa0"]})})})})}function et(t){var e;const[i]=(0,u.j1)("whatmorePrimaryFont"),n=null!==(e=t.baseFontSize)&&void 0!==e?e:10,o=t.width,r=t.height;return(0,x.jsx)(s.xu,{width:o,height:r,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:"gray",borderWidth:"1px",onClick:t=>{t.stopPropagation()},children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:(0,x.jsxs)(s.xv,{color:"gray",lineHeight:"100%",fontSize:1.3*n+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:"gray !important"},children:["\xa0"," Sold Out ","\xa0"]})})})}function it(t){var e;const[i]=(0,u.j1)("whatmoreSecondaryColor"),[n]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),r=null!==(e=t.baseFontSize)&&void 0!==e?e:10,l=t.onClick,a=t.cartCount,d=t.width,h=t.height,p=t.onCartIconClick;return(0,x.jsx)(s.xu,{width:d,height:h,padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:i,borderWidth:"1px",onClick:t=>{t.stopPropagation()},cursor:"pointer",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:[(0,x.jsx)(s.M5,{paddingX:"5px",onClick:()=>{p()},children:(0,c.ijd)(o)?(0,x.jsx)($.zx,{size:"sm",_hover:{bg:i},sx:{bg:i},children:(0,x.jsx)(s.xv,{paddingX:"6px",color:"white",sx:{fontSize:.85*r},children:"GO TO CART"})}):(0,x.jsx)(X.Z,{sx:{color:i,fontSize:1.6*r}})}),(0,x.jsx)(s.xv,{color:i,fontSize:1.3*r+"px !important",fontWeight:"semibold !important",sx:{fontFamily:n+" !important"},children:a}),(0,x.jsx)(s.M5,{paddingX:"5px",onClick:t=>{t.stopPropagation(),l()},children:(0,x.jsx)(Y.Z,{sx:{color:i,fontSize:1.6*r}})})]})})}var nt=function(t){var e,i,n,o,r,l,a;const[d]=(0,u.j1)("websiteLanguage"),s=null!==(e=t.baseFontSize)&&void 0!==e?e:10,c=null===(i=t.showAddedToCart)||void 0===i||i,h=t.cartState,p=t.cartCount,v=t.onClickAtc,m=t.onCartIconClick;function g(){v()}const f=null!==(n=t.width)&&void 0!==n?n:"100%",w=null!==(o=t.height)&&void 0!==o?o:"100%";return"errored"==h?(0,x.jsx)(O.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:w,width:f},children:(0,x.jsx)(et,{baseFontSize:s,width:f,height:w})}):"init"==h?0==p?(0,x.jsx)(tt,{onClick:g,baseFontSize:s,width:f,height:w,websiteLanguage:d}):c?(0,x.jsx)(O.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{height:w,width:f},children:(0,x.jsx)(it,{onClick:g,baseFontSize:s,cartCount:p,width:f,height:w,onCartIconClick:m})}):(0,x.jsx)(tt,{onClick:g,baseFontSize:s,width:f,height:w,websiteLanguage:d}):(0,x.jsx)(J,{onClick:g,setProductVariantTitle:t.setProductVariantTitle,cartState:h,productTitle:null===(r=t.product)||void 0===r?void 0:r.title,updateCartState:t.updateCartState,baseFontSize:s,width:f,height:w,title:"awaitingVariantSelection"==h?null!==(l=null===Q||void 0===Q||null===(a=Q[d])||void 0===a?void 0:a.done)&&void 0!==l?l:"Done":"",showInProgressIcon:"atcApiCallInProgress"==h||"productVariantDetailsApiCallInProgress"==h,websiteLanguage:d})},ot=i(6967),rt=i(873),lt=i(4844);const at=(0,u.MO)("isInDesignMode"),dt=(0,u.MO)("isDemoBrand");async function st(t,e,i,n,o,r,l,a,d){return"shopify"==i?(0,lt.wW)(t,e,n,l,a,d,r):(at||dt||(async()=>{(0,ot.FF)(o,r,l,a,d)})(),(0,rt.jg)(t,e,n))}function ct(t,e){return"shopify"==t?(0,lt.JL)(e):(0,rt.TE)(e)}var ut=i(513);var ht=function(t,e,i){const[o]=(0,u.j1)("whatmoreShopId"),[r]=(0,u.j1)("isInDesignMode"),[a]=(0,u.j1)("isDemoBrand"),[d,s]=(0,n.useState)(null),h=(0,n.useRef)(null),{closeClickComponent:v}=(0,n.useContext)(yi),{whatmoreUserInfo:x}=(0,n.useContext)(V.I),[m,g]=(0,n.useState)({state:"init",cart_count:t});function f(t,e){g({state:t,cart_count:null!==e&&void 0!==e?e:m.cart_count}),"init"!=t&&"errored"!=t?(0,u.bU)("whatmoreAllowAutoSlide",!1):(0,u.bU)("whatmoreAllowAutoSlide",!0)}function w(t){var e=[],i=[],n=[];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&&i.push({option:o.option2,available:null===(l=o.available)||void 0===l||l,type:t.options[1].name}),o.option3&&n.push({option:o.option3,available:null===(a=o.available)||void 0===a||a,type:t.options[2].name})})),e=e.reduce(((t,e,i)=>{var n=t.filter((t=>t.option==e.option));return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)}),[]),i=i.reduce(((t,e,i)=>{var n=t.filter((t=>t.option==e.option));return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)}),[]),n=n.reduce(((t,e,i)=>{var n=t.filter((t=>t.option==e.option));return 0==n.length?[...t,e]:(n[0].available=n[0].available|e.available,t)}),[]),[e,i,n]}function j(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}function y(t){return t[0].length<=1&&t[1].length<=1&&t[2].length<=1}function C(){if(h.current&&h.current.length>=1){return h.current.filter((t=>t.available)).length>=1}return!1}function b(t,n){const d=function(t){const e=h.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(!d)return void f("init",m.cart_count);f("atcApiCallInProgress",null);st(d,1,(0,c.Ipo)(o),o,i,e,n,null===i||void 0===i?void 0:i.location,null===x||void 0===x?void 0:x.userType).then((t=>{if(!t.ok)throw new Error(t.status);return t.json()})).then((t=>(function(t,e,i){r||a||(async()=>{(0,l.JX)(t,e,i)})()}(i,e,1),f("init",m.cart_count+1),(0,u.bU)("whatmoreAddedToCart",!0),"72550089015"==o&&(0,u.MO)("whatmoreAddedToCart")&&(0,ut.D)(o,(()=>{}),100,window.location.hostname),(0,c.IKD)(o)&&setTimeout((()=>function(){const t=window.location.origin+"/cart";window.location.href=t}()),500),t))).catch((t=>{f("errored",null),console.error("Error while adding to cart:",t)}))}return[m,f,d,function(t){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];f("productVariantDetailsApiCallInProgress",null),(0,p.p)(e,(0,c.Ipo)(o),o).then((e=>{h.current=e.variants;const n=w(e);s(n),y(n)||i?C()?b([j(n[0]),j(n[1]),j(n[2])],t):f("errored",null):f("awaitingVariantSelection",null)})).catch((t=>{f("errored",null)}))},b,function(t){var e,i,n,r;const l=h.current.filter((e=>e.option1==t[0]&&e.option2==t[1]&&e.option3==t[2]));if(0==l.length)return null;const a=null!==(e=l[0].price)&&void 0!==e?e:0,d=null!==(i=l[0].compare_at_price)&&void 0!==i?i:0;return{price:((0,c.Ipo)(o),a),compare_price:((0,c.Ipo)(o),d),title:null!==(n=null===(r=l[0])||void 0===r?void 0:r.title)&&void 0!==n?n:""}},function(){"do_nothing"!==(0,c.v9M)(o)&&("go_to_cart_page"!==(0,c.v9M)(o)?"open_cart_slider"!==(0,c.v9M)(o)||null!==v&&v():ct((0,c.Ipo)(o),o))}]},pt=i(9363);var vt=function(t){var e,i,o,r;const l=t.productVariantOptions,a=null!==(e=t.width)&&void 0!==e?e:"100%",d=null!==(i=t.height)&&void 0!==i?i:"fit-content",c=null!==(o=t.baseFontSize)&&void 0!==o?o:10,h=t.onOptionSelected,p=null!==(r=t.optionTitleColor)&&void 0!==r?r:"black",v=t.data,[m]=(0,u.j1)("whatmorePrimaryFont");function f(t){if(0==t.length)return null;const e=t.filter((t=>t.available));return 0==e.length?null:e[0].option}const[w,j]=(0,n.useState)([f(l[0]),f(l[1]),f(l[2])]);return(0,n.useEffect)((()=>{h(w)}),[w]),(0,x.jsx)(s.Kq,{direction:"column",width:a,height:d,justifyContent:"flex-start",alignItems:"center",spacing:"2px",paddingY:"2px",children:l.map(((e,i)=>{var n;if(0==e.length||"mlveda_country"==(null===e||void 0===e||null===(n=e[0])||void 0===n?void 0:n.type))return;const o=e.every((e=>{var i,n,o,r,l,a;return(null===t||void 0===t||null===(i=t.finalArr)||void 0===i||null===(n=i.finalArr)||void 0===n||null===(o=n.find((t=>(null===t||void 0===t?void 0:t.color)===(null===e||void 0===e?void 0:e.option))))||void 0===o?void 0:o.src)||(null===t||void 0===t||null===(r=t.finalArr)||void 0===r||null===(l=r.finalArrExternal)||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.optionsrc)}));return(0,x.jsxs)(s.Kq,{width:"100%",direction:"column",alignItems:"center",justifyContent:"flex-start",paddingY:"2px",children:[(0,x.jsx)(s.M5,{width:"100%",children:(0,x.jsx)(s.iz,{color:"blackAlpha.500",size:"1px",width:"20%"})}),(0,x.jsxs)(s.xv,{as:"b",fontSize:1.2*c+"px",sx:{color:p+" !important",fontFamily:m+" !important"},align:"center",marginY:"2px",children:["\xa0",e[0].type,"\xa0"]}),(0,x.jsx)(s.kC,{gap:"6px",wrap:"wrap",justify:"center",paddingY:"2px",children:e.map(((e,n)=>{var r,l,a,d,u,h,p,f;return(0==i||(null===v||void 0===v||null===(r=v.variants)||void 0===r?void 0:r.find((t=>t[`option${i}`]==(null===w||void 0===w?void 0:w[i-1])&&t[`option${i+1}`]==(null===e||void 0===e?void 0:e.option)))))&&(0,x.jsxs)(s.xu,{onClick:t=>{t.stopPropagation(),e.available&&function(t,e){if(2==e)j([w[0],w[1],t]);else if(1==e){var i,n;j([w[0],t,null===v||void 0===v||null===(i=v.variants)||void 0===i||null===(n=i.find((e=>(null===e||void 0===e?void 0:e.option2)==t)))||void 0===n?void 0:n.option3])}else{var o,r,l,a,d,s;const e=null===v||void 0===v||null===(o=v.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.option2;j([t,null===v||void 0===v||null===(l=v.variants)||void 0===l||null===(a=l.find((e=>(null===e||void 0===e?void 0:e.option1)==t)))||void 0===a?void 0:a.option2,null===v||void 0===v||null===(d=v.variants)||void 0===d||null===(s=d.find((t=>(null===t||void 0===t?void 0:t.option2)==e)))||void 0===s?void 0:s.option3])}}(e.option,i)},backgroundColor:e.option===w[i]?"rgba(0, 0, 0, 0.7)":"white",border:e.option===w[i]?"1px solid #ffffff":"1px solid black",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:e.option===w[i]?"0 0 8px rgba(0, 0, 0, 0.8)":"none",marginY:"2px",width:"fit-content",padding:o?"0px":"8px",borderRadius:o?"50%":"0",children:[!o&&(0,x.jsxs)(s.xv,{as:e.available?"samp":"s",fontSize:.8*c+"px",sx:{color:e.option===w[i]?"white":(e.available?"black":"gray")+" !important",fontFamily:m+" !important"},align:"center",paddingX:(y=e.option,y.length>=3?"0px":.5*c+"px"),children:["\xa0",e.option,"\xa0"]}),o&&(0,x.jsx)(g.Ee,{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%)",borderRadius:o?"50%":"100%"},src:(0,pt.s)(null!==(l=null===t||void 0===t||null===(a=t.finalArr)||void 0===a||null===(d=a.finalArr)||void 0===d||null===(u=d.find((t=>(null===t||void 0===t?void 0:t.color)==(null===e||void 0===e?void 0:e.option))))||void 0===u?void 0:u.src)&&void 0!==l?l:null===t||void 0===t||null===(h=t.finalArr)||void 0===h||null===(p=h.finalArrExternal)||void 0===p||null===(f=p.find((t=>(null===t||void 0===t?void 0:t.color)==(null===e||void 0===e?void 0:e.option))))||void 0===f?void 0:f.optionsrc,"?width=400&height=400")})]});var y}))},i)]},i)}))})},xt=i(9219),mt=i(6524);var gt=function(t){var e,i,o,r,a,d;const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[f]=(0,u.j1)("whatmoreSecondaryColor"),w=(0,u.MO)("whatmoreSecondaryColorShade900"),[j]=(0,u.j1)("whatmorePrimaryFont"),[y]=(0,u.j1)("whatmoreShopId"),[C,b,S,I]=(0,h.Z)(),[k,_]=(0,n.useState)(!1),[T,F]=(0,n.useState)(t.product),E=(0,u.MO)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:P}=(0,n.useContext)(V.I),[z,L,D,M,R,Z,Y]=ht(0,T,t.event),[X,G]=(0,n.useState)(null),[Q,J]=(0,n.useState)(parseFloat(T.price)),[tt,et]=(0,n.useState)(parseFloat(T.compare_price)),[it,ot]=(0,n.useState)(null===T||void 0===T?void 0:T.title),[rt,lt]=(0,n.useState)(T.currency),[at,dt]=(0,n.useState)(null),st=t.event,ct=t.productClickHandler,{whatmoreIsPreviewMode:ut}=(0,n.useContext)(V.I),[gt,ft]=(0,n.useState)(null),[wt,jt]=(0,n.useState)(!1);(0,n.useEffect)((()=>{(0,c.N8M)(y)&&(0,xt.Rb)(T,(0,c.Ipo)(y),y).then((t=>{F(t),J(parseFloat(t.price)),et(parseFloat(t.compare_price)),lt(t.currency),jt(!0)}));(async()=>{var t,e,i,n,o,r;const l=await(0,p.p)(T,(0,c.Ipo)(y),y);dt(l),J("61916709004"==y&&null!==(t=null===l||void 0===l||null===(e=l.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.price)&&void 0!==t?t:null===l||void 0===l?void 0:l.price),et("61916709004"==y&&null!==(n=null===l||void 0===l||null===(o=l.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.compare_at_price)&&void 0!==n?n:null===l||void 0===l?void 0:l.compare_at_price),jt(!0)})()}),[]),(0,n.useEffect)((()=>{var t,e;const i=null!=at?null===at||void 0===at||null===(t=at.options)||void 0===t?void 0:t.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))})):-1,n=-1!==i?null===at||void 0===at||null===(e=at.variants)||void 0===e?void 0:e.map((t=>{var e,n;const o=null===t||void 0===t?void 0:t[`option${i+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===(n=t.featured_image)||void 0===n?void 0:n.src}:null})):[];let o=[];var r;-1!==i&&(o=null===at||void 0===at||null===(r=at.images)||void 0===r?void 0:r.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc}))));ft({position:i,finalArr:n,finalArrExternal:o})}),[at]);var yt=.68*I,Ct=.55*yt,bt=.4*yt,St=yt*(.55-.4),It=yt+"px",kt=bt+"px",_t=St+"px",Tt=.12*bt;const Ft=(0,c.ITD)(y);function Et(){window.location.href=function(t){return(0,c.lj5)(y)?t.product_link+"?"+(0,c.awP)(y)+"&"+(0,c.n9s)(y)+"&"+(0,c.vaK)(y):t.product_link}(T)}const Pt=P.landingLocationType,Ot=P.templateType,zt=(0,mt.NY)(Pt)+(0,mt.dS)(Ot)+(null!==st&&void 0!==st&&st.isRelatedEvent?"R":"E")+"_"+(null===st||void 0===st?void 0:st.event_id);return(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:W,marginBottom:(0,c.pq5)(y),width:It,height:"fit-content",boxShadow:"round"==E?"dark-lg":null,onClick:()=>{!function(t,e){v||m||(async()=>{(0,l.wz)(t,e)})(),"72550089015"==y?Et():ct(e),_(!0)}(st,T)},backgroundColor:(0,K.lA)("#ffffff",(0,c.U5_)(y)),animation:k?A.mT:null,borderRadius:"round"==E?"xl":null,overflow:"hidden",onAnimationEnd:()=>{_(!1)},spacing:0,sx:{borderWidth:(0,c.alU)(y),borderColor:(0,c.qPe)(y)},children:[(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,x.jsx)(s.xu,{height:kt,width:kt,bgColor:"STRDOIDF6O7"==y?"#f7f7f7":w,children:(0,x.jsx)(g.Ee,{width:kt,height:kt,src:(0,pt.s)(null!==(e=null!==(i=null===gt||void 0===gt||null===(o=gt.finalArr)||void 0===o||null===(r=o.find((t=>(null===t||void 0===t?void 0:t.color)==(null===X||void 0===X?void 0:X[null===gt||void 0===gt?void 0:gt.position]))))||void 0===r?void 0:r.src)&&void 0!==i?i:null===gt||void 0===gt||null===(a=gt.finalArrExternal)||void 0===a||null===(d=a.find((t=>(null===t||void 0===t?void 0:t.color)==(null===X||void 0===X?void 0:X[null===gt||void 0===gt?void 0:gt.position]))))||void 0===d?void 0:d.src)&&void 0!==e?e:T.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,c.yOX)(y)+" !important"}})}),(0,x.jsxs)(s.xu,{height:kt,width:yt-bt+"px",children:[(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:(0,c.Fr)(y)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"4px",paddingY:"10px",children:[(0,x.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",1.1*Tt+"px","important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",j,"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,U.s)(it,"prod-tile")}),(0,c.QaY)(y)?(0,x.jsxs)(s.Kq,{className:"whatmore-product-atc-price",direction:(0,c.$zZ)(y)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",borderRadius:"round"==E?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"4px",sx:{margin:"0px !important",marginBottom:"4px !important"},children:[wt&&(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*Tt*(0,c.Rqt)(y)+"px !important",fontWeight:"semibold !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:j+" !important",color:(0,c.Uyp)(y)+" !important",padding:"0px !important",letterSpacing:"normal !important",margin:"0px !important"},children:["\xa0"," "+(0,xt.jx)(null!==Q&&void 0!==Q?Q:null===T||void 0===T?void 0:T.price,"",y,rt)," \xa0"]}),(0,B.B)(Q,tt)&&wt?(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*Tt*(0,c.Rqt)(y)+"px !important",fontWeight:"medium !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:j+" !important",color:(0,c.kPs)(y)+" !important",margin:"0px !important",letterSpacing:"normal !important",textDecoration:"line-through !important"},children:[" ",(0,xt.jx)(null!==tt&&void 0!==tt?tt:null===T||void 0===T?void 0:T.compare_price,"",y,rt)]}):(0,x.jsx)(x.Fragment,{})]}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xv,{fontSize:.82*Tt*(0,c.Rqt)(y)+"px",fontWeight:"medium",lineHeight:"110%",sx:{margin:"0px !important",fontFamily:j+" !important",color:(0,c.eod)(y)+" !important"},children:ut?(0,c.qde)(y):(0,c.aTS)(y)})]}),(0,c.Fr)(y)?(0,x.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,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,x.jsx)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:w,sx:{borderRadius:"round"==E?"5px":"0px",padding:"2px"},spacing:"0px",children:(0,c.ML$)(y)?(0,x.jsx)($.zx,{size:"sm",_hover:{bg:f},sx:{bg:f},children:(0,x.jsx)(s.xv,{color:"white",paddingX:"6px",fontSize:.8*Tt+"px",children:"VIEW PRODUCT"})}):(0,x.jsx)(H.Z,{sx:{color:f,fontSize:1.3*Tt+"px"}})}),(0,x.jsx)(s.xu,{width:"2px"})]})}):(0,x.jsx)(x.Fragment,{})]})]}),(0,x.jsx)(O.Rg,{unmountOnExit:!0,initialScale:.5,in:"awaitingVariantSelection"==z.state,style:{height:"fit-content",width:"100%"},children:"awaitingVariantSelection"==z.state&&null!=D?(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",marginTop:.1*Ct+"px",marginBottom:.1*Ct+"px",overflowY:"auto",overflowX:"hidden",maxHeight:Ct*Ft+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,x.jsx)(vt,{width:It,height:"fit-content",event:st,product:T,finalArr:gt,data:at,productVariantOptions:D,baseFontSize:1.2*Tt,onOptionSelected:t=>{!function(t){G(t);const e=Z(t);e&&(J(e.price),et(e.compare_price),e.title.includes(" ")&&ot(e.title))}(t)}})}):(0,x.jsx)(x.Fragment,{})}),(0,x.jsx)(s.Kq,{className:"whatmore-add-to-cart",direction:"row",width:"100%",height:_t,justifyContent:"center",alignItems:"center",children:(0,x.jsx)(nt,{baseFontSize:.3*St,setProductVariantTitle:ot,product:T,cartState:z.state,cartCount:z.cart_count,updateCartState:L,onClickAtc:t=>{"init"==z.state?(M(zt),(0,q.GF)({userInteractionType:N.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:P,event:st,productList:[T],ctaList:st.cta})):"awaitingVariantSelection"==z.state&&(R(X,zt),ot(null===T||void 0===T?void 0:T.title))},onCartIconClick:()=>{Y()}})})]})},ft=i(3867);var wt=function(t){var e,i,n;const[o]=(0,u.j1)("isInDesignMode"),[r]=(0,u.j1)("isDemoBrand"),[a]=(0,u.j1)("whatmoreSecondaryColor"),[d]=(0,u.j1)("whatmorePrimaryFont"),c=t.event,h=t.product,p=null!==(e=t.baseFontSize)&&void 0!==e?e:10,v=null!==(i=t.width)&&void 0!==i?i:"fit-content",m=null!==(n=t.height)&&void 0!==n?n:"fit-content";return(0,x.jsx)(s.rU,{href:h.product_link,color:a,onClick:()=>{!function(t,e){o||r||(async()=>{(0,l.$L)(t,e)})()}(c,h)},children:(0,x.jsx)(s.xu,{width:v,height:m,padding:"2x",boxShadow:"lg",borderRadius:"md",backgroundColor:"white",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",spacing:"5px",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{lineHeight:"100%",fontSize:1.4*p,fontWeight:"semibold",sx:{fontFamily:d+" !important",color:a+" !important"},children:" VIEW MORE "})}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(H.Z,{sx:{color:a,fontSize:1.4*p}})})]})})})},jt=i(6163);function yt(t){var e;const[i]=(0,u.j1)("whatmoreSecondaryColor"),[o]=(0,u.j1)("whatmorePrimaryFont"),[r]=(0,u.j1)("whatmoreShopId"),[l,a]=(0,n.useState)(!1),d=(t.event,t.product,null!==(e=t.baseFontSize)&&void 0!==e?e:10),h=t.onClick,p=t.width,v=t.height,m=t.title;return(0,x.jsx)(s.xu,{width:p,height:v,padding:"2x",boxShadow:"lg",backgroundColor:"#000000"==(0,c.hmr)(r)?i:(0,c.hmr)(r),onClick:t=>{t.stopPropagation(),h(),a(!0)},animation:l?A.mT:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",children:(0,x.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:o+" !important",color:(0,c.KCy)(r)+" !important"},children:["\xa0",m,"\xa0"]})})})}var Ct=function(t){var e,i,n;const[o]=(0,u.j1)("whatmoreShopId"),r=t.event,l=t.product,a=null!==(e=t.baseFontSize)&&void 0!==e?e:10,d=t.onShopNowClick,s=null!==(i=t.width)&&void 0!==i?i:"100%",h=null!==(n=t.height)&&void 0!==n?n:"100%";return(0,x.jsx)(yt,{onClick:function(){d()},event:r,product:l,baseFontSize:a,width:s,height:h,title:(0,c.Pvx)(o)})};var bt=function(t){var e;const[i]=(0,u.j1)("isInDesignMode"),[o]=(0,u.j1)("isDemoBrand"),[r]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[d,v,m,f]=(0,h.Z)(),[w,j]=(0,n.useState)(!1),[y,C]=(0,n.useState)(t.product),{whatmoreWidgetSourceDetails:b}=(0,n.useContext)(V.I),[S,I,k,_,T,F,E]=ht(0,y,t.event),[P,z]=(0,n.useState)(null),[L,D]=(0,n.useState)(parseFloat(y.price)),[M,R]=(0,n.useState)(parseFloat(y.compare_price)),[K,Z]=(0,n.useState)(y.currency),[H,Y]=(0,n.useState)(!1),X=t.event,G=t.productClickHandler,$=null!==(e=t.tileWidthFactor)&&void 0!==e?e:1,Q=b.landingLocationType,J=b.templateType,tt=(0,mt.NY)(Q)+(0,mt.dS)(J)+(null!==X&&void 0!==X&&X.isRelatedEvent?"R":"E")+"_"+(null===X||void 0===X?void 0:X.event_id);(0,n.useEffect)((()=>{(0,c.N8M)(a)&&(0,xt.Rb)(y,(0,c.Ipo)(a),a).then((t=>{C(t),D(parseFloat(t.price)),R(parseFloat(t.compare_price)),Z(t.currency)}));(async()=>{const t=await(0,p.p)(y,(0,c.Ipo)(a),a);D(null===t||void 0===t?void 0:t.price),R(null===t||void 0===t?void 0:t.compare_at_price),Y(!0)})()}),[]);var et=f*$,it=.3*et,ot=et+"px",rt=.7*it,lt=.9*rt,at=.12*it;const dt=(0,c.ITD)(a);function st(t,e){i||o||(async()=>{(0,l.wz)(t,e)})(),G(e),j(!0)}return(0,x.jsx)(s.Kq,{direction:"row",width:ot,height:"fit-content",justifyContent:"center",children:(0,x.jsx)(s.xu,{marginTop:W,marginBottom:(0,c.pq5)(a),width:ot,onClick:t=>{},animation:w?A.mT:null,borderRadius:"lg",onAnimationEnd:()=>{j(!1)},children:(0,x.jsxs)(s.Kq,{direction:"column",width:"100%",height:"100%",justifyContent:"center",alignItems:"center",spacing:"0px",children:[(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"70%",justifyContent:"space-around",alignItems:"center",borderTopRadius:"lg",overflow:"hidden",onClick:()=>{st(X,y)},children:[(0,x.jsx)(s.xu,{height:rt+"px",width:rt+"px",children:(0,x.jsx)(s.Kq,{direction:"column",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",children:(0,x.jsx)(s.xu,{height:lt+"px",width:lt+"px",borderRadius:"lg",bgColor:"gray.100",overflow:"hidden",children:(0,x.jsx)(g.Ee,{width:lt+"px",height:lt+"px",src:y.thumbnail_image,objectFit:"cover"})})})}),(0,x.jsx)(s.xu,{height:rt+"px",width:et-rt+"px",children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"space-between",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingY:"10px",spacing:"2px",children:[(0,x.jsx)(s.xv,{style:{overflow:"hidden",textOverflow:"ellipsis"},noOfLines:1,fontSize:1.2*at+"px",fontWeight:"medium",lineHeight:"120%",sx:{fontFamily:r+" !important",color:"white !important"},children:(0,U.s)(y.title.toString())}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",marginTop:"5px",children:[(0,c.QaY)(a)?(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignItems:"center",borderRadius:"lg",backgroundColor:"blackAlpha.500",paddingX:"10px",paddingY:"5px",children:[H&&(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:1*at+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:r+" !important",color:"white !important"},children:["\xa0"," "+(0,xt.jx)(null!==L&&void 0!==L?L:null===y||void 0===y?void 0:y.price,"",a,K)," \xa0"]}),(0,x.jsx)(s.M5,{children:(0,B.B)(y.price,y.compare_price)&&H?(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.8*at+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:r+" !important",color:"#F9F6EE !important",textDecoration:"line-through !important"},children:[" ",(0,xt.jx)(null!==M&&void 0!==M?M:null===y||void 0===y?void 0:y.compare_price,"",a,K)]}):(0,x.jsx)(x.Fragment,{})})]}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.M5,{children:(0,x.jsx)(ft.Z,{storeId:a,productId:y.client_product_id,productLink:y.product_link,fontSize:1*at,fontColor:"white"})})]})]})})]}),(0,x.jsx)(O.Rg,{unmountOnExit:!0,initialScale:.5,in:"awaitingVariantSelection"==S.state,style:{height:"fit-content",width:"100%"},children:"awaitingVariantSelection"==S.state&&null!=k?(0,x.jsx)(s.xu,{width:"100%",height:"fit-content",marginTop:.1*it+"px",marginBottom:.1*it+"px",overflowY:"auto",overflowX:"hidden",maxHeight:it*dt+"px",overscrollBehavior:"contain",onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,x.jsx)(vt,{width:ot,height:"fit-content",event:X,product:y,productVariantOptions:k,baseFontSize:1*at,onOptionSelected:t=>{!function(t){z(t);const e=F(t);e&&(D(e.price),R(e.compare_price))}(t)},optionTitleColor:"white"})}):(0,x.jsx)(x.Fragment,{})}),(0,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"30%",justifyContent:"center",alignItems:"center",paddingBottom:"2px",paddingLeft:"2px",paddingRight:"2px",children:[(0,x.jsx)(s.xu,{width:"100%",height:"100%",children:(0,x.jsx)(wt,{baseFontSize:.8*at,event:X,product:y,width:"100%",height:"100%"})}),(0,x.jsx)(s.xu,{width:"100%",height:"100%",borderRadius:"md",overflow:"hidden",children:(0,c.Ib9)(a)?(0,x.jsx)(Ct,{baseFontSize:.8*at,event:X,product:y,borderRadius:"md",onShopNowClick:t=>{st(X,y)}}):(0,x.jsx)(x.Fragment,{children:"form"===(0,c._5p)(a)?(0,x.jsx)(jt.default,{baseFontSize:.8*at,event:X,product:y,width:"100%",height:"100%",showAddedToCart:!0}):(0,x.jsx)(nt,{baseFontSize:.8*at,event:X,product:y,cartState:S.state,cartCount:S.cart_count,borderRadius:"md",onClickAtc:t=>{"init"==S.state?(_(tt),(0,q.GF)({userInteractionType:N.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:b,event:X,productList:[y],ctaList:X.cta})):"awaitingVariantSelection"==S.state&&T(P,tt)},onCartIconClick:()=>{E()}})})})]})]})})})};var St=function(t){var e,i;const[o]=(0,u.j1)("isInDesignMode"),[r]=(0,u.j1)("isDemoBrand"),[a]=(0,u.j1)("whatmoreSecondaryColor"),d=(0,u.MO)("whatmoreSecondaryColorShade900"),[v]=(0,u.j1)("whatmorePrimaryFont"),[m]=(0,u.j1)("whatmoreShopId"),[f,w,j,y]=(0,h.Z)(),[C,b]=(0,n.useState)(!1),[S,I]=(0,n.useState)(t.product),k=(0,u.MO)("whatmoreUITheme"),[_,T]=(0,n.useState)(!1),[F,E]=(0,n.useState)(parseFloat(S.price)),[P,O]=(0,n.useState)(parseFloat(S.compare_price)),[z,L]=(0,n.useState)(S.currency),D=t.event,[M,R]=(0,n.useState)();(0,n.useEffect)((()=>{(0,c.N8M)(m)&&(0,xt.Rb)(S,(0,c.Ipo)(m),m).then((t=>{I(t),E(parseFloat(t.price)),O(parseFloat(t.compare_price)),L(t.currency),T(!0)}));(async()=>{const t=await(0,p.p)(S,(0,c.Ipo)(m),m);R(t),T(!0)})()}),[]);var Z=.68*y,Y=.4*Z,X=Z+"px",G=Y+"px",$=Z*(.55-.4)+"px",Q=.12*Y;(0,c.ITD)(m);const{whatmoreWidgetSourceDetails:J}=(0,n.useContext)(V.I);function tt(t){return(0,c.lj5)(m)?t.product_link+"?"+(0,c.awP)(m)+"&"+(0,c.n9s)(m)+"&"+(0,c.vaK)(m):t.product_link}function et(t,e){o||r||(async()=>{(0,l.wz)(t,e),(0,q.GF)({userInteractionType:N.K.PRODUCT_TILE_SHOPNOW_CLICKED,widgetSourceDetails:J,event:t,productList:[e],ctaList:t.cta})})(),b(!0)}return(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:W,marginBottom:(0,c.pq5)(m),width:X,height:"fit-content",boxShadow:"round"==k?"dark-lg":null,onClick:()=>{et(D,S),window.location.href=tt(S)},backgroundColor:(0,K.lA)("#ffffff",(0,c.U5_)(m)),animation:C?A.mT:null,borderRadius:"round"==k?"xl":null,overflow:"hidden",onAnimationEnd:()=>{b(!1)},spacing:0,sx:{borderWidth:(0,c.alU)(m),borderColor:(0,c.qPe)(m)},children:[(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-start",alignContent:"center",cursor:"pointer",children:[(0,x.jsx)(s.xu,{height:G,width:G,children:(0,x.jsx)(g.Ee,{width:G,height:G,src:(0,pt.s)(S.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,c.yOX)(m)+" !important"}})}),(0,x.jsxs)(s.xu,{height:G,width:Z-Y+"px",children:[(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:(0,c.Fr)(m)?"flex-end":"center",alignContent:"center",width:"fit-content",height:"100%",paddingX:"10px",paddingTop:"10px",paddingBottom:"16px",children:[(0,x.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:v+" !important",color:"black !important",lineHeight:"120% !important",fontWeight:"medium !important",fontSize:1.1*Q+"px !important"},children:(0,U.s)(null==S.title?"":S.title.toString(),"prod-tile")}),(0,c.QaY)(m)?(0,x.jsxs)(s.Kq,{className:"whatmore-product-shopnow-price",direction:(0,c.$zZ)(m)?"row":"row-reverse",width:"fit-content",height:"fit-content",justifyContent:"flex-start",alignContent:"center",marginTop:"5px",borderRadius:"round"==k?"lg":null,backgroundColor:"white",paddingX:"8px",paddingY:"5px",children:[_&&(0,x.jsxs)(s.xv,{as:"p",ref:t=>{t&&t.style.setProperty("min-height","0","important")},noOfLines:1,fontSize:.9*Q+"px",fontWeight:"semibold",lineHeight:"100%",textAlign:"center",sx:{fontFamily:v+" !important",color:(0,c.Uyp)(m)+" !important",margin:"0px !important"},children:[" "+(0,xt.jx)((null===M||void 0===M?void 0:M.price)>0?null===M||void 0===M?void 0:M.price:null!==(e=null===M||void 0===M?void 0:M.price_max)&&void 0!==e?e:F,"",m,z)," \xa0"]}),(0,B.B)(F,P)&&_?(0,x.jsxs)(s.xv,{as:"s",style:{minHeight:0,textDecoration:"line-through"},noOfLines:1,fontSize:.9*Q+"px",fontWeight:"medium",lineHeight:"100%",textAlign:"center",sx:{fontFamily:v+" !important",color:(0,c.kPs)(m)+" !important",margin:"0px !important"},children:[" ",(0,xt.jx)(null!==(i=null===M||void 0===M?void 0:M.compare_at_price)&&void 0!==i?i:P,"",m,z)]}):(0,x.jsx)(x.Fragment,{})]}):(0,x.jsx)(x.Fragment,{}),""!=(0,c.sG7)(m)&&(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*Q+"px",lineHeight:"100%",paddingTop:"6px",sx:{fontFamily:(0,c.V3Y)(m)+" !important",color:(0,c.aUT)(m)+" !important",margin:"0px !important"},children:["\xa0",(0,c.sG7)(m)," \xa0"]})]}),(0,c.Fr)(m)?(0,x.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,x.jsxs)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",marginTop:"5px",backgroundColor:"transparent",children:[(0,x.jsx)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",justifyContent:"center",alignItems:"center",backgroundColor:d,sx:{borderRadius:"round"==k?"5px":"0px",padding:"2px"},spacing:"0px",children:(0,x.jsx)(H.Z,{sx:{color:a,fontSize:1.3*Q+"px"}})}),(0,x.jsx)(s.xu,{width:"2px"})]})}):(0,x.jsx)(x.Fragment,{})]})]}),(0,c.pp3)(m)&&(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:$,justifyContent:"center",alignItems:"center",children:(0,x.jsx)(Ct,{baseFontSize:.8*Q,event:D,product:S,borderRadius:"md",onShopNowClick:t=>{et(D,S),window.location.href=tt(S)}})})]})};function It(t){var e;const[i]=(0,u.j1)("whatmoreSecondaryColor"),[o]=(0,u.j1)("whatmorePrimaryFont"),[r]=(0,u.j1)("whatmoreShopId"),[l,a]=(0,n.useState)(!1),d=null!==(e=t.baseFontSize)&&void 0!==e?e:10,h=t.onClick,p=t.width,v=t.height,m=t.title,g=t.showInProgressIcon;return"awaitingVariantSelection"==t.cartState||"productVariantDetailsApiCallInProgress"==t.cartState?(0,x.jsx)(kt,{onClick:()=>t.onClick(),event:t.event,product:t.product,baseFontSize:d,width:p,height:v}):(0,x.jsxs)(s.xu,{display:"flex",width:"fit-content",minWidth:"75%",padding:"2x",boxShadow:"lg",animation:l?A.mT:null,onAnimationEnd:()=>{a(!1)},cursor:"pointer",children:["awaitingVariantSelection"==t.cartState&&(0,x.jsx)(s.Kq,{direction:"row",alignItems:"center",justifyContent:"center",paddingY:"2px",backgroundColor:"white",onClick:e=>{e.stopPropagation(),t.updateCartState("init"),a(!0)},children:(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:o+" !important",color:"#343434 !important"},children:["\xa0","63064310011"==r?"Annuler":"Cancel","\xa0"]})}),(0,x.jsxs)(s.Kq,{direction:"row",backgroundColor:g?(0,K.lA)(i,8):i,width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",onClick:t=>{t.stopPropagation(),h(),a(!0)},children:[(0,x.jsxs)(s.xv,{lineHeight:"100%",fontSize:1.4*d+"px !important",fontWeight:"semibold !important",sx:{fontFamily:o+" !important",color:(0,c.KCy)(r)+" !important"},children:["\xa0",m,"\xa0"]}),g?(0,x.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,x.jsx)(G.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*d+"px"}})}):(0,x.jsx)(x.Fragment,{})]})]})}function kt(t){const[e]=(0,u.j1)("whatmoreSecondaryColor"),[i]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.j1)("whatmoreShopId"),[r,l]=(0,n.useState)(!1),a=t.onClick,d=t.baseFontSize;return(0,x.jsx)(s.Kq,{direction:"row",paddingBottom:"3%",position:"relative",children:(0,x.jsx)(s.xu,{width:"fit-content",minWidth:"75%",boxShadow:"lg",padding:"6px 12px",borderRadius:"6px",backgroundColor:e,onClick:t=>{t.stopPropagation(),a(),l(!0)},animation:r?A.mT:null,onAnimationEnd:()=>{l(!1)},cursor:"pointer",zIndex:"1000",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"5px",children:(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.xv,{lineHeight:"100%",fontSize:1.3*d+"px",fontWeight:"semibold",sx:{fontFamily:`${i} !important`,color:`${(0,c.KCy)(o)} !important`},children:(0,c.tan)(o)})})})})})}function _t(t){var e;const[i]=(0,u.j1)("whatmorePrimaryFont"),n=null!==(e=t.baseFontSize)&&void 0!==e?e:10;t.width,t.height;return(0,x.jsx)(s.xu,{width:"fit-content",height:"fit-content !important",minWidth:"75%",boxShadow:"lg",backgroundColor:"white",borderRadius:"6px",borderColor:"gray",borderWidth:"1px",onClick:t=>{t.stopPropagation()},children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",alignItems:"center",paddingX:"4px",paddingY:"3px",justifyContent:"center",children:(0,x.jsxs)(s.xv,{color:"gray",lineHeight:"100%",fontSize:1.2*n+"px !important",fontWeight:"semibold !important",sx:{fontFamily:i+" !important",color:"gray !important"},children:["\xa0"," Sold Out ","\xa0"]})})})}function Tt(t){var e;const[i]=(0,u.j1)("whatmoreSecondaryColor"),[n]=(0,u.j1)("whatmorePrimaryFont"),[o]=(0,u.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,t.height,t.onCartIconClick);return(0,x.jsx)(s.xu,{width:"fit-content",minWidth:"75%",borderRadius:"6px",padding:"2x",boxShadow:"lg",backgroundColor:"white",borderColor:i,borderWidth:"1px",onClick:t=>{t.stopPropagation()},cursor:"pointer",children:(0,x.jsxs)(s.Kq,{direction:"row",alignItems:"center",paddingX:"4px",paddingY:"5px",justifyContent:"center",children:[(0,x.jsx)(s.M5,{paddingX:"5px",onClick:()=>{d()},children:"1972174947"!=o&&"55194878152"!=o&&"12181504100"!=o?(0,x.jsx)(X.Z,{sx:{color:i,fontSize:1.6*r}}):(0,x.jsx)($.zx,{size:"sm",_hover:{bg:i},sx:{bg:i},children:(0,x.jsx)(s.xv,{paddingX:"6px",color:"white",sx:{fontSize:.85*r},children:"GO TO CART"})})}),(0,x.jsx)(s.xv,{color:i,fontSize:1.3*r+"px !important",fontWeight:"semibold !important",sx:{fontFamily:n+" !important"},children:a}),(0,x.jsx)(s.M5,{paddingX:"5px",onClick:t=>{t.stopPropagation(),l()},children:(0,x.jsx)(Y.Z,{sx:{color:i,fontSize:1.6*r}})})]})})}var Ft=function(t){var e,i,n,o;const[r]=(0,u.j1)("whatmoreShopId"),l=t.event,a=t.product,d=null!==(e=t.baseFontSize)&&void 0!==e?e:10,s=null===(i=t.showAddedToCart)||void 0===i||i,c=t.cartState,h=t.cartCount,p=t.onClickAtc,v=t.onCartIconClick;function m(){p()}const g=null!==(n=t.width)&&void 0!==n?n:"100%",f=null!==(o=t.height)&&void 0!==o?o:"100%";return"errored"==c?(0,x.jsx)(O.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,style:{},children:(0,x.jsx)(_t,{event:l,product:a,baseFontSize:d,width:g,height:f})}):"init"==c?0==h?(0,x.jsx)(kt,{onClick:m,event:l,product:a,baseFontSize:d,width:g,height:f}):s?(0,x.jsx)(O.Rg,{unmountOnExit:!0,in:!0,initialScale:.5,children:(0,x.jsx)(Tt,{onClick:m,event:l,product:a,baseFontSize:d,cartCount:h,width:g,height:f,onCartIconClick:v})}):(0,x.jsx)(kt,{onClick:m,event:l,product:a,baseFontSize:d,width:g,height:f}):(0,x.jsx)(It,{onClick:m,cartState:c,updateCartState:t.updateCartState,event:l,product:a,baseFontSize:d,width:g,height:f,title:"awaitingVariantSelection"==c?"63064310011"==r?"Valider":"Done":"",showInProgressIcon:"atcApiCallInProgress"==c||"productVariantDetailsApiCallInProgress"==c})};var Et=function(t){var e,i,o,r,a,d;const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[f]=(0,u.j1)("whatmorePrimaryFont"),[w]=(0,u.j1)("whatmoreShopId"),[j,y,C,b]=(0,h.Z)(),[S,I]=(0,n.useState)(!1),[k,_]=(0,n.useState)(t.product),T=(0,u.MO)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:F}=(0,n.useContext)(V.I),[E,P,O,z,L,D,M]=ht(0,k,t.event),[R,Z]=(0,n.useState)(null),[H,Y]=(0,n.useState)(parseFloat(k.price)),[X,G]=(0,n.useState)(parseFloat(k.compare_price)),[$,Q]=(0,n.useState)(k.currency),[J,tt]=(0,n.useState)(null),et=t.event,it=t.productClickHandler,[nt,ot]=(0,n.useState)(null),[rt,lt]=(0,n.useState)(!1),at=F.landingLocationType,dt=F.templateType,st=(0,mt.NY)(at)+(0,mt.dS)(dt)+"_"+(null===et||void 0===et?void 0:et.event_id);(0,n.useEffect)((()=>{(0,c.N8M)(w)&&(0,xt.Rb)(k,(0,c.Ipo)(w),w).then((t=>{_(t),Y(parseFloat(t.price)),G(parseFloat(t.compare_price)),Q(t.currency),lt(!0)}));(async()=>{const t=await(0,p.p)(k,(0,c.Ipo)(w),w);tt(t),Y(null===t||void 0===t?void 0:t.price),G(null===t||void 0===t?void 0:t.compare_at_price),lt(!0)})()}),[]),(0,n.useEffect)((()=>{var t,e;const i=null!=J?null===J||void 0===J||null===(t=J.options)||void 0===t?void 0:t.findIndex((t=>{var e;return"Colour"==(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t||null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes("color"))})):-1,n=-1!==i?null===J||void 0===J||null===(e=J.variants)||void 0===e?void 0:e.map((t=>{var e,n;const o=null===t||void 0===t?void 0:t[`option${i+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===(n=t.featured_image)||void 0===n?void 0:n.src}:null})):[];let o=[];var r;-1!==i&&(o=null===J||void 0===J||null===(r=J.images)||void 0===r?void 0:r.map((t=>({color:t.color,src:t.src,optionsrc:t.optionsrc}))));ot({position:i,finalArr:n,finalArrExternal:o})}),[J]);var ct=.72*b,ut=.37*ct,vt=ct*(.48-.37),gt=.95*ct+"px",ft=ut+"px",wt=.12*ut;function jt(){window.location.href=function(t){return(0,c.lj5)(w)?t.product_link+"?"+(0,c.awP)(w)+"&"+(0,c.n9s)(w)+"&"+(0,c.vaK)(w):t.product_link}(k)}return(0,x.jsx)(s.Kq,{direction:"column",justifyContent:"flex-start",alignContent:"center",marginTop:W,marginBottom:"24px",width:gt,boxShadow:"round"==T?"dark-lg":null,onClick:()=>{!function(t,e){v||m||(async()=>{(0,l.wz)(t,e)})(),"72550089015"==w?jt():it(e),I(!0)}(et,k)},backgroundColor:(0,K.lA)("#ffffff",(0,c.U5_)(w)),animation:S?A.mT:null,borderRadius:"round"==T?"xl":null,overflow:"hidden",onAnimationEnd:()=>{I(!1)},spacing:0,sx:{borderWidth:(0,c.alU)(w),borderColor:(0,c.qPe)(w)},children:(0,x.jsxs)(s.Kq,{display:"flex",direction:"row",width:"full",height:"fit-content",justifyContent:"center",alignContent:"center",cursor:"pointer",alignItems:"center",gap:"8px",children:[(0,x.jsx)(s.xu,{height:ft,width:ft,children:(0,x.jsx)(g.Ee,{width:"100%",height:"100%",src:(0,pt.s)(null!==(e=null!==(i=null===nt||void 0===nt||null===(o=nt.finalArr)||void 0===o||null===(r=o.find((t=>(null===t||void 0===t?void 0:t.color)==(null===R||void 0===R?void 0:R[null===nt||void 0===nt?void 0:nt.position]))))||void 0===r?void 0:r.src)&&void 0!==i?i:null===nt||void 0===nt||null===(a=nt.finalArrExternal)||void 0===a||null===(d=a.find((t=>(null===t||void 0===t?void 0:t.color)==(null===R||void 0===R?void 0:R[null===nt||void 0===nt?void 0:nt.position]))))||void 0===d?void 0:d.src)&&void 0!==e?e:k.thumbnail_image,"&width=400&height=400"),sx:{objectFit:(0,c.yOX)(w)+" !important"}})}),(0,x.jsx)(s.xu,{height:ft,width:ct-ut+"px",children:(0,x.jsxs)(s.Kq,{direction:"column",justifyContent:"flex-start",height:"100%",gap:"4px",paddingTop:"12px",width:"100%",children:[(0,x.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",wt+"px","important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",f,"important"),t.style.setProperty("white-space","nowrap","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"),t.style.setProperty("padding","0","important"),t.style.setProperty("font-weight","normal","important"))},children:(0,U.s)(null==k.title?"":k.title.toString())}),(0,c.QaY)(w)?(0,x.jsxs)(s.Kq,{direction:(0,c.$zZ)(w)?"row":"row-reverse",sx:{margin:"0px !important",minHeight:1.1*wt+"px"},children:[rt&&(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*wt*(0,c.Rqt)(w)+"px !important",lineHeight:"100%",sx:{fontFamily:f+" !important",color:(0,c.Uyp)(w)+" !important",fontWeight:"bold"},children:[" "+(0,xt.jx)(null!==H&&void 0!==H?H:null===k||void 0===k?void 0:k.price,"",w,$)," \xa0"]}),(0,B.B)(H,X)&&rt?(0,x.jsxs)(s.xv,{noOfLines:1,fontSize:.9*wt*(0,c.Rqt)(w)+"px !important",fontWeight:"medium !important",lineHeight:"100%",textAlign:"center",sx:{fontFamily:f+" !important",color:(0,c.kPs)(w)+" !important",margin:"0px !important",letterSpacing:"normal !important",textDecoration:"line-through !important"},children:[" ",(0,xt.jx)(null!==X&&void 0!==X?X:null===k||void 0===k?void 0:k.compare_price,"",w,$)]}):(0,x.jsx)(x.Fragment,{})]}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(Ft,{baseFontSize:.3*vt,event:et,product:k,cartState:E.state,cartCount:E.cart_count,updateCartState:P,onClickAtc:t=>{"init"===E.state?(z(st,!0),(0,q.GF)({userInteractionType:N.K.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:F,event:et,productList:[k],ctaList:et.cta})):"awaitingVariantSelection"===E.state&&it(k)},onCartIconClick:t=>{M()}})]})})]})})};var Pt=function(t){const[e]=(0,u.j1)("whatmoreShopId"),[i]=(0,u.j1)("isWhatmoreWebsite"),n=(0,c.eyg)(e),o=t.event,r=t.product;return i?(0,x.jsx)(St,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"broad-tile"==n?(0,x.jsx)(gt,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"broad-tile-no-cta"==n?(0,x.jsx)(St,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"broad-tile-new-atc"==n?(0,x.jsx)(Et,{product:t.product,event:t.event,productClickHandler:t.productClickHandler}):"link_only"==n?(0,x.jsx)(Z,{product:t.product,event:t.event}):"narrow-tile"==n?(0,x.jsx)(bt,{event:o,product:r,productClickHandler:t.productClickHandler,tileWidthFactor:o.products.length>1?.68:void 0}):(0,x.jsx)(x.Fragment,{})},Ot=i(6119),zt=i(3388),Lt=i(7643);var Dt=function(t){const[e,i,n,l]=(0,h.Z)(),[a]=(0,u.j1)("whatmoreShopId"),d=(0,u.MO)("isInDesignMode"),p=(0,u.MO)("isDemoBrand"),v=t.event,m=t.productClickHandler,g=(0,c.eyg)(a);if(!(0,zt.kT)(v))return(0,x.jsx)(x.Fragment,{});if(1==v.products.length&&(void 0==v.cta||0==v.cta.length)){const t=v.products[0];return(0,c.rnv)(a)?(0,x.jsx)(s.Kq,{direction:"horizontal",width:l,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,x.jsx)(Lt.u,{userInteractionType:N.K.PRODUCT_CTA_VIEW,event:v,productList:[t],triggerFlag:!d&&!p,children:(0,x.jsx)(s.M5,{children:(0,x.jsx)(bt,{event:v,product:t,productClickHandler:m},v.event_id+t.product_id)})})}):(0,x.jsx)(s.Kq,{direction:"horizontal",width:l,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,x.jsx)(s.M5,{children:(0,x.jsx)(Lt.u,{userInteractionType:N.K.PRODUCT_CTA_VIEW,event:v,productList:[t],triggerFlag:!d&&!p,children:(0,x.jsx)(Pt,{event:v,product:t,productClickHandler:m},v.event_id+t.product_id)})})})}return(0,x.jsx)(s.M5,{children:(0,x.jsx)("div",{onTouchStart:t=>{t.stopPropagation()},onTouchEnd:t=>{t.stopPropagation()},children:(0,x.jsx)(s.xu,{width:l+"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,x.jsxs)(o.tq,{className:"product-tile swiper-slide",slidesPerView:1==v.products.length?1:1.4,initialSlide:v.products.length<=2||(0,c.VqZ)(a)?0:1,centeredSlides:!(0,c.VqZ)(a),modules:[r.Gk],mousewheel:{invert:!1,thresholdDelta:20},nested:!0,children:[("STRDOIDF6O7"===a?[v.products[0]]:v.products).map((t=>"oos"!=t.product_status&&(0,x.jsx)(o.o5,{children:(0,x.jsx)(Lt.u,{userInteractionType:N.K.PRODUCT_CTA_VIEW,event:v,productList:[t],triggerFlag:!d&&!p,children:(0,x.jsx)(s.Kq,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",alignItems:"center",children:(0,x.jsx)(Pt,{event:v,product:t,productClickHandler:m},v.event_id+t.product_id)})})},v.event_id+t.product_id))),(0,c.pp3)(a)&&void 0!=v.cta&&v.cta.map((t=>(0,x.jsx)(x.Fragment,{children:""!==t.cta_title.trim()&&(0,x.jsx)(o.o5,{children:(0,x.jsx)(s.Kq,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-end",paddingBottom:"12px",alignItems:"center",children:(0,x.jsx)(Ot.Z,{fontFactor:.75,cta:t},v.event_id+t.cta_id)})},v.event_id+t.cta_id)})))]})})})})};var Mt=function(t){const[e,i]=(0,u.j1)("isProductSwiperCatalogOpen"),o=t.event,r=t.productClickHandler;return(0,n.useContext)(yi).isIOS&&e?(0,x.jsx)(Dt,{event:o,productClickHandler:r},o.event_id):(0,x.jsx)(O.MT,{unmountOnExit:!0,initialScale:.2,in:e,children:(0,x.jsx)(Dt,{event:o,productClickHandler:r},o.event_id)})};function Rt(t){const e=t.event,[i,n,o,r]=(0,h.Z)(),[l]=(0,u.j1)("whatmorePrimaryFont");return(0,x.jsx)(s.xu,{width:"fit-content",height:"fit-content",padding:"5px",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",height:"fit-content",children:[(0,x.jsx)(s.M5,{children:(0,x.jsx)(s.Cd,{overflow:"hidden",size:.15*r+"px",children:(0,x.jsx)(g.Ee,{width:"100%",height:"100%",src:e.thumbnail_image})})}),(0,x.jsx)(s.xu,{width:"fit-content",height:"fit-content",children:(0,x.jsxs)(s.Kq,{direction:"column",width:"fit-content",height:"fit-content",children:[(0,x.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,x.jsx)(E.Z,{event:e,fontSize:.03*r+"px"})]})})]})})}var At=function(t){const[e]=(0,u.j1)("isInDesignMode"),[i]=(0,u.j1)("isDemoBrand"),[o,r]=(0,u.j1)("isProductSwiperCatalogOpen"),[l,a]=(0,j.Z)(),[d,h]=(0,u.j1)("isFirstIndicatorRenderDone"),p=(0,n.useContext)(yi),[v]=(0,u.j1)("whatmoreShopId"),m=t.event,g=t.isLast,f=t.onCloseCallback,w=t.focusRef,C=t.productClickHandler;return(0,x.jsx)(s.xu,{width:"full",height:"full",borderRadius:"md",children:(0,x.jsxs)(s.Kq,{direction:"column",width:"full",height:"full",justifyContent:"space-between",children:[(0,x.jsx)(s.xu,{width:"full",margin:"2px",bgGradient:"linear(to-t, transparent, whiteAlpha.100, blackAlpha.200, blackAlpha.400, blackAlpha.800)",children:(0,x.jsxs)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"space-between",paddingRight:"10px",paddingLeft:"10px",children:[(0,x.jsx)(Rt,{event:m}),(0,x.jsxs)(s.Kq,{direction:"row",width:"fit-content",justifyContent:"end",paddingLeft:"10px",children:[(0,x.jsx)(y,{focusRef:w}),(0,x.jsx)(P.Z,{event:m,onCloseCallback:f})]})]})}),(0,x.jsx)(s.xu,{width:"100%",height:"100%",onClick:()=>{a(!l)}}),(0,x.jsxs)(s.xu,{width:"full",height:"fit-content",children:[p.totalEvents>1&&!d&&p.showSwipeIndicator?(0,x.jsx)(s.xu,{width:"full",margin:"2px",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"center",children:(0,x.jsx)(M,{swipeUp:!g})})}):null,void 0!=m.products&&m.products.length>0?(0,x.jsxs)(s.xu,{width:"full",children:[(0,c.Jm1)(v)?(0,x.jsx)(s.xu,{w:"100%",children:(0,x.jsx)(s.Kq,{direction:"row",width:"full",height:"fit-content",justifyContent:"flex-end",children:(0,x.jsx)(F,{event:m,onToggle:t=>{r("minimize-button"!==t)}})})}):(0,x.jsx)(x.Fragment,{}),(0,x.jsx)(s.xu,{display:"flex",width:"100%",height:"fit-content",children:(0,x.jsx)(Mt,{event:m,productClickHandler:C})})]}):(0,x.jsx)("div",{})]})]})})},Kt=i(8302);function Wt(t){const[e,i,o,r]=(0,h.Z)(),[l]=(0,u.j1)("whatmorePrimaryFont"),[a]=(0,u.j1)("whatmoreShopId"),[d,p]=(0,n.useState)(""),v=t.data,m=(t.event,t.product,t.setShowOptionsChart);var f=.4*r*.8*.13;(0,n.useEffect)((()=>{let t="vanyaclothing.myshopify.com";"1972174947"===a?t="vanyaclothing.myshopify.com":"57415434338"===a&&(t="usvanya.myshopify.com");const e=`https://app.kiwisizing.com/api/getSizingChart?shop=${t}&product=${null===v||void 0===v?void 0:v.id}&title=${null===v||void 0===v?void 0:v.title}&tags=&cacheSettingsUpdateAt=2020-08-11T15%3A19%3A49.000Z&settingsVersion=19`;fetch(e).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>{var e,i,n,o,r,l;p(null===t||void 0===t||null===(e=t.sizings)||void 0===e||null===(i=e[0])||void 0===i||null===(n=i.layout)||void 0===n||null===(o=n.data)||void 0===o||null===(r=o[0])||void 0===r||null===(l=r.data)||void 0===l?void 0:l.url)})).catch((t=>{console.error("Error fetching data:",t)}))}),[]);const w=`${b.F4`
|
69
69
|
0% {
|
70
70
|
transform: translateY(100%);
|
71
71
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[707],{9723:function(e,t,r){var o=r(5318);t.Z=void 0;var n=o(r(5045)),i=r(6417),a=(0,n.default)((0,i.jsx)("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82z"}),"PlayArrowRounded");t.Z=a},9212:function(e,t,r){var o=r(5318);t.Z=void 0;var n=o(r(5045)),i=r(6417),a=(0,n.default)([(0,i.jsx)("path",{d:"M18 20H6V8h2v2c0 .55.45 1 1 1s1-.45 1-1V8h4v2c0 .55.45 1 1 1s1-.45 1-1V8h2v12z",opacity:".3"},"0"),(0,i.jsx)("path",{d:"M18 6h-2c0-2.21-1.79-4-4-4S8 3.79 8 6H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-6-2c1.1 0 2 .9 2 2h-4c0-1.1.9-2 2-2zm6 16H6V8h2v2c0 .55.45 1 1 1s1-.45 1-1V8h4v2c0 .55.45 1 1 1s1-.45 1-1V8h2v12z"},"1")],"ShoppingBagTwoTone");t.Z=a},237:function(e,t,r){var o=r(5318);t.Z=void 0;var n=o(r(5045)),i=r(6417),a=(0,n.default)((0,i.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility");t.Z=a},8134:function(e,t,r){r(8021)},8021:function(e,t,r){var o=r(7313),n=r(6417),i=(r(1168),Object.defineProperty),a=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0,configurable:!0,set:e=>t[r]=()=>e})};if("function"!==typeof o.createContext){throw new Error(['Remotion requires React.createContext, but it is "undefined".','If you are in a React Server Component, turn it into a client component by adding "use client" at the top of the file.',"","Before:",' import {useCurrentFrame} from "remotion";',"","After:",' "use client";',' import {useCurrentFrame} from "remotion";'].join("\n"))}function s(){return["NOD","E_EN","V"].join("")}var u=()=>["e","nv"].join(""),l=()=>{const e="undefined"!==typeof window&&window.remotion_isPlayer,t="undefined"!==typeof window&&"undefined"!==typeof window.process&&"undefined"!==typeof window.process.env&&("test"===window.process[u()][s()]||"production"===window.process[u()][s()]&&"undefined"!==typeof window&&"undefined"!==typeof window.remotion_puppeteerTimeout);return{isStudio:"undefined"!==typeof window&&window.remotion_isStudio,isRendering:t,isPlayer:e,isReadOnlyStudio:"undefined"!==typeof window&&window.remotion_isReadOnlyStudio}},d=o.createElement,c=[],m=()=>{if(!l().isStudio)return;const e=new Proxy(d,{apply(e,t,r){if(c.includes(r[0])){const[o,n,...i]=r,a={...n??{},stack:(new Error).stack};return Reflect.apply(e,t,[o,a,...i])}return Reflect.apply(e,t,r)}});o.createElement=e},f=e=>{c.push(e),m()},p=(0,o.createContext)(!1),h=()=>(0,o.useContext)(p);function w(e){return Boolean(e)}var v="4.0.240",y=(0,o.forwardRef)(((e,t)=>{const{style:r,...i}=e,a=(0,o.useMemo)((()=>({position:"absolute",top:0,left:0,right:0,bottom:0,width:"100%",height:"100%",display:"flex",flexDirection:"column",...r})),[r]);return(0,n.jsx)("div",{ref:t,style:a,...i})})),g=(0,o.createContext)(null),b=o.createContext({registerSequence:()=>{throw new Error("SequenceManagerContext not initialized")},unregisterSequence:()=>{throw new Error("SequenceManagerContext not initialized")},sequences:[]}),E=o.createContext({hidden:{},setHidden:()=>{throw new Error("SequenceVisibilityToggle not initialized")}}),F=(0,o.createContext)({getNonce:()=>0,fastRefreshes:0}),T=()=>{const e=(0,o.useContext)(F),[t,r]=(0,o.useState)((()=>e.getNonce())),n=(0,o.useRef)(e);return(0,o.useEffect)((()=>{n.current!==e&&(n.current=e,r(e.getNonce))}),[e]),t},R={};a(R,{useTimelineSetFrame:()=>Z,useTimelinePosition:()=>J,usePlayingState:()=>G,persistCurrentFrame:()=>U,getInitialFrameState:()=>Y,getFrameForComposition:()=>H,TimelineContext:()=>O,SetTimelineContext:()=>z});var C=(0,o.createContext)({compositions:[],registerComposition:()=>{},unregisterComposition:()=>{},registerFolder:()=>{},unregisterFolder:()=>{},setCurrentCompositionMetadata:()=>{},updateCompositionDefaultProps:()=>{},folders:[],currentCompositionMetadata:null,canvasContent:null,setCanvasContent:()=>{}}),x=(0,o.createContext)({props:{},updateProps:()=>{throw new Error("Not implemented")},resetUnsaved:()=>{throw new Error("Not implemented")}}),k=(o.createRef(),{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";"}),I={},S=e=>e.startsWith("/")?S(e.substring(1)):e,$=e=>{if(null===e)throw new TypeError("null was passed to staticFile()");if("undefined"===typeof e)throw new TypeError("undefined was passed to staticFile()");if(e.startsWith("http://")||e.startsWith("https://"))throw new TypeError(`staticFile() does not support remote URLs - got "${e}". Instead, pass the URL without wrapping it in staticFile(). See: https://remotion.dev/docs/staticfile-remote-urls`);if(e.startsWith("..")||e.startsWith("./"))throw new TypeError(`staticFile() does not support relative paths - got "${e}". Instead, pass the name of a file that is inside the public/ folder. See: https://remotion.dev/docs/staticfile-relative-paths`);if(e.startsWith("/Users")||e.startsWith("/home")||e.startsWith("/tmp")||e.startsWith("/etc")||e.startsWith("/opt")||e.startsWith("/var")||e.startsWith("C:")||e.startsWith("D:")||e.startsWith("E:"))throw new TypeError(`staticFile() does not support absolute paths - got "${e}". Instead, pass the name of a file that is inside the public/ folder. See: https://remotion.dev/docs/staticfile-relative-paths`);if(e.startsWith("public/"))throw new TypeError(`Do not include the public/ prefix when using staticFile() - got "${e}". See: https://remotion.dev/docs/staticfile-relative-paths`);const t=(e=>{for(const t of Object.keys(k))if(e.includes(t))return{containsHex:!0,hexCode:t};return{containsHex:!1}})(e);var r;t.containsHex&&(r=`WARNING: You seem to pass an already encoded path (path contains ${t.hexCode}). Since Remotion 4.0, the encoding is done by staticFile() itself. You may want to remove a encodeURIComponent() wrapping.`,I[r]||(console.warn(r),I[r]=!0));const o=(e=>e.split("/").map((e=>encodeURIComponent(e))).join("/"))(e),n=(e=>{if("undefined"!==typeof window&&window.remotion_staticBase){if(e.startsWith(window.remotion_staticBase))throw new Error(`The value "${e}" is already prefixed with the static base ${window.remotion_staticBase}. You don't need to call staticFile() on it.`);return`${window.remotion_staticBase}/${S(e)}`}return`/${S(e)}`})(o);return n.startsWith("/")?n:`/${n}`},N="remotion-date:",M="remotion-file:",P=e=>JSON.parse(e,((e,t)=>"string"===typeof t&&t.startsWith(N)?new Date(t.replace(N,"")):"string"===typeof t&&t.startsWith(M)?$(t.replace(M,"")):t)),A=!1,_=()=>{if("undefined"===typeof window)return A||(A=!0,console.warn("Called `getInputProps()` on the server. This function is not available server-side and has returned an empty object."),console.warn("To hide this warning, don't call this function on the server:"),console.warn(" typeof window === 'undefined' ? {} : getInputProps()")),{};if(l().isPlayer)throw new Error("You cannot call `getInputProps()` from a <Player>. Instead, the props are available as React props from component that you passed as `component` prop.");const e=window.remotion_inputProps;if(!e)return{};return P(e)};function V(e,t,r){if("number"!==typeof e)throw new Error(`The "${t}" prop ${r} must be a number, but you passed a value of type ${typeof e}`);if(isNaN(e))throw new TypeError(`The "${t}" prop ${r} must not be NaN, but is NaN.`);if(!Number.isFinite(e))throw new TypeError(`The "${t}" prop ${r} must be finite, but is ${e}.`);if(e%1!==0)throw new TypeError(`The "${t}" prop ${r} must be an integer, but is ${e}.`);if(e<=0)throw new TypeError(`The "${t}" prop ${r} must be positive, but got ${e}.`)}function D(e,t){const{allowFloats:r,component:o}=t;if("undefined"===typeof e)throw new Error(`The "durationInFrames" prop ${o} is missing.`);if("number"!==typeof e)throw new Error(`The "durationInFrames" prop ${o} must be a number, but you passed a value of type ${typeof e}`);if(e<=0)throw new TypeError(`The "durationInFrames" prop ${o} must be positive, but got ${e}.`);if(!r&&e%1!==0)throw new TypeError(`The "durationInFrames" prop ${o} must be an integer, but got ${e}.`);if(!Number.isFinite(e))throw new TypeError(`The "durationInFrames" prop ${o} must be finite, but got ${e}.`)}function L(e,t,r){if("number"!==typeof e)throw new Error(`"fps" must be a number, but you passed a value of type ${typeof e} ${t}`);if(!Number.isFinite(e))throw new Error(`"fps" must be a finite, but you passed ${e} ${t}`);if(isNaN(e))throw new Error(`"fps" must not be NaN, but got ${e} ${t}`);if(e<=0)throw new TypeError(`"fps" must be positive, but got ${e} ${t}`);if(r&&e>50)throw new TypeError("The FPS for a GIF cannot be higher than 50. Use the --every-nth-frame option to lower the FPS: https://remotion.dev/docs/render-as-gif")}var j=(0,o.createContext)(null),B=((0,o.createRef)(),e=>Boolean(e.calculateMetadata)),W=e=>{const t=(0,o.useContext)(j),{props:r}=(0,o.useContext)(x),{compositions:n,canvasContent:i,currentCompositionMetadata:a}=(0,o.useContext)(C),s="composition"===(null===i||void 0===i?void 0:i.type)?i.compositionId:null,u=e??s,d=n.find((e=>e.id===u)),c=(0,o.useMemo)((()=>d?r[d.id]??{}:{}),[r,d]);return(0,o.useMemo)((()=>d?a?{type:"success",result:{...a,id:d.id,props:a.props,defaultProps:d.defaultProps??{},defaultCodec:a.defaultCodec}}:B(d)?t[d.id]?t[d.id]:null:(D(d.durationInFrames,{allowFloats:!1,component:`in <Composition id="${d.id}">`}),L(d.fps,`in <Composition id="${d.id}">`,!1),V(d.width,"width",`in <Composition id="${d.id}">`),V(d.height,"height",`in <Composition id="${d.id}">`),{type:"success",result:{width:d.width,height:d.height,fps:d.fps,id:d.id,durationInFrames:d.durationInFrames,defaultProps:d.defaultProps??{},props:{...d.defaultProps??{},...c??{},..."undefined"===typeof window||l().isPlayer?{}:_()??{}},defaultCodec:null}}):null),[d,t,a,c])},q=()=>{const{canvasContent:e,compositions:t,currentCompositionMetadata:r}=(0,o.useContext)(C),n=t.find((t=>"composition"===(null===e||void 0===e?void 0:e.type)&&t.id===e.compositionId)),i=W((null===n||void 0===n?void 0:n.id)??null);return(0,o.useMemo)((()=>i?"error"===i.type||"loading"===i.type?null:n?{...i.result,defaultProps:n.defaultProps??{},id:n.id,...r??{},component:n.component}:null:null),[r,i,n])},O=(0,o.createContext)({frame:{},playing:!1,playbackRate:1,rootId:"",imperativePlaying:{current:!1},setPlaybackRate:()=>{throw new Error("default")},audioAndVideoTags:{current:[]}}),z=(0,o.createContext)({setFrame:()=>{throw new Error("default")},setPlaying:()=>{throw new Error("default")}}),U=e=>{localStorage.setItem("remotion.time-all",JSON.stringify(e))},Y=()=>{const e=localStorage.getItem("remotion.time-all")??"{}";return JSON.parse(e)},H=e=>{const t=localStorage.getItem("remotion.time-all")??"{}",r=JSON.parse(t);return void 0!==r[e]?Number(r[e]):"undefined"===typeof window?0:window.remotion_initialFrame??0},J=()=>{const e=q(),t=(0,o.useContext)(O);if(!e)return"undefined"===typeof window?0:window.remotion_initialFrame??0;const r=t.frame[e.id]??(l().isPlayer?0:H(e.id));return Math.min(e.durationInFrames-1,r)},Z=()=>{const{setFrame:e}=(0,o.useContext)(z);return e},G=()=>{const{playing:e,imperativePlaying:t}=(0,o.useContext)(O),{setPlaying:r}=(0,o.useContext)(z);return(0,o.useMemo)((()=>[e,r,t]),[t,e,r])},K=(0,o.createContext)(!1),Q=()=>{const e=(0,o.useContext)(g),t=(null===e||void 0===e?void 0:e.width)??null,r=(null===e||void 0===e?void 0:e.height)??null,n=(null===e||void 0===e?void 0:e.durationInFrames)??null,i=q();return(0,o.useMemo)((()=>{if(!i)return null;const{id:e,durationInFrames:o,fps:a,height:s,width:u,defaultProps:l,props:d,defaultCodec:c}=i;return{id:e,width:t??u,height:r??s,fps:a,durationInFrames:n??o,defaultProps:l,props:d,defaultCodec:c}}),[n,r,t,i])},X=()=>{const e=Q(),t=(0,o.useContext)(K),r=h();if(!e){if("undefined"!==typeof window&&window.remotion_isPlayer||r)throw new Error(["No video config found. Likely reasons:","- You are probably calling useVideoConfig() from outside the component passed to <Player />. See https://www.remotion.dev/docs/player/examples for how to set up the Player correctly.","- You have multiple versions of Remotion installed which causes the React context to get lost."].join("-"));throw new Error("No video config found. You are probably calling useVideoConfig() from a component which has not been registered as a <Composition />. See https://www.remotion.dev/docs/the-fundamentals#defining-compositions for more information.")}if(!t)throw new Error("Called useVideoConfig() outside a Remotion composition.");return e},ee=()=>{if(!(0,o.useContext)(K)){if(l().isPlayer)throw new Error("useCurrentFrame can only be called inside a component that was passed to <Player>. See: https://www.remotion.dev/docs/player/examples");throw new Error("useCurrentFrame() can only be called inside a component that was registered as a composition. See https://www.remotion.dev/docs/the-fundamentals#defining-compositions")}const e=J(),t=(0,o.useContext)(g);return e-(t?t.cumulatedFrom+t.relativeFrom:0)},te=e=>{let{frame:t,children:r,active:i=!0}=e;const a=ee(),s=X();if("undefined"===typeof t)throw new Error("The <Freeze /> component requires a 'frame' prop, but none was passed.");if("number"!==typeof t)throw new Error("The 'frame' prop of <Freeze /> must be a number, but is of type "+typeof t);if(Number.isNaN(t))throw new Error("The 'frame' prop of <Freeze /> must be a real number, but it is NaN.");if(!Number.isFinite(t))throw new Error(`The 'frame' prop of <Freeze /> must be a finite number, but it is ${t}.`);const u=(0,o.useMemo)((()=>"boolean"===typeof i?i:"function"===typeof i?i(a):void 0),[i,a]),l=(0,o.useContext)(O),d=(0,o.useContext)(g),c=(null===d||void 0===d?void 0:d.relativeFrom)??0,m=(0,o.useMemo)((()=>u?{...l,playing:!1,imperativePlaying:{current:!1},frame:{[s.id]:t+c}}:l),[u,l,s.id,t,c]);return(0,n.jsx)(O.Provider,{value:m,children:r})},re=(0,o.forwardRef)(((e,t)=>{let{from:r=0,durationInFrames:i=1/0,children:a,name:s,height:u,width:d,showInTimeline:c=!0,_remotionInternalLoopDisplay:m,_remotionInternalStack:f,_remotionInternalPremountDisplay:p,...h}=e;const{layout:w="absolute-fill"}=h,[v]=(0,o.useState)((()=>String(Math.random()))),F=(0,o.useContext)(g),{rootId:R}=(0,o.useContext)(O),C=F?F.cumulatedFrom+F.relativeFrom:0,x=T();if("absolute-fill"!==w&&"none"!==w)throw new TypeError(`The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: ${w}`);if("none"===w&&"undefined"!==typeof h.style)throw new TypeError('If layout="none", you may not pass a style.');if("number"!==typeof i)throw new TypeError(`You passed to durationInFrames an argument of type ${typeof i}, but it must be a number.`);if(i<=0)throw new TypeError(`durationInFrames must be positive, but got ${i}`);if("number"!==typeof r)throw new TypeError(`You passed to the "from" props of your <Sequence> an argument of type ${typeof r}, but it must be a number.`);if(!Number.isFinite(r))throw new TypeError(`The "from" prop of a sequence must be finite, but got ${r}.`);const k=J(),I=X(),S=F?Math.min(F.durationInFrames-r,i):i,$=Math.max(0,Math.min(I.durationInFrames-r,S)),{registerSequence:N,unregisterSequence:M}=(0,o.useContext)(b),{hidden:P}=(0,o.useContext)(E),A=(0,o.useMemo)((()=>(null===F||void 0===F?void 0:F.premounting)??Boolean(h._remotionInternalIsPremounting)),[h._remotionInternalIsPremounting,null===F||void 0===F?void 0:F.premounting]),_=(0,o.useMemo)((()=>({cumulatedFrom:C,relativeFrom:r,durationInFrames:$,parentFrom:(null===F||void 0===F?void 0:F.relativeFrom)??0,id:v,height:u??(null===F||void 0===F?void 0:F.height)??null,width:d??(null===F||void 0===F?void 0:F.width)??null,premounting:A})),[C,r,$,F,v,u,d,A]),V=(0,o.useMemo)((()=>s??""),[s]);(0,o.useEffect)((()=>{if(l().isStudio)return N({from:r,duration:$,id:v,displayName:V,parent:(null===F||void 0===F?void 0:F.id)??null,type:"sequence",rootId:R,showInTimeline:c,nonce:x,loopDisplay:m,stack:f??null,premountDisplay:p??null}),()=>{M(v)}}),[i,v,s,N,V,M,null===F||void 0===F?void 0:F.id,$,R,r,c,x,m,f,p]);const D=Math.ceil(C+r+i-1),L=k<C+r||k>D?null:a,j="none"===h.layout?void 0:h.style,B=(0,o.useMemo)((()=>({flexDirection:void 0,...d?{width:d}:{},...u?{height:u}:{},...j??{}})),[u,j,d]);if(null!==t&&"none"===w)throw new TypeError('It is not supported to pass both a `ref` and `layout="none"` to <Sequence />.');return P[v]??!1?null:(0,n.jsx)(g.Provider,{value:_,children:null===L?null:"none"===h.layout?L:(0,n.jsx)(y,{ref:t,style:B,className:h.className,children:L})})})),oe=(0,o.forwardRef)(((e,t)=>{const r=ee();if("none"===e.layout)throw new Error('`<Sequence>` with `premountFor` prop does not support layout="none"');const{style:i,from:a=0,premountFor:s=0,...u}=e,l=r<a&&r>=a-s,d=(0,o.useMemo)((()=>({...i,opacity:l?0:1,pointerEvents:l?"none":(null===i||void 0===i?void 0:i.pointerEvents)??void 0})),[l,i]);return(0,n.jsx)(te,{frame:a,active:l,children:(0,n.jsx)(ne,{ref:t,from:a,style:d,_remotionInternalPremountDisplay:s,_remotionInternalIsPremounting:l,...u})})})),ne=(0,o.forwardRef)(((e,t)=>"none"!==e.layout&&e.premountFor&&!l().isRendering?(0,n.jsx)(oe,{...e,ref:t}):(0,n.jsx)(re,{...e,ref:t}))),ie=(0,o.createContext)({registerRenderAsset:()=>{},unregisterRenderAsset:()=>{},renderAssets:[]}),ae=e=>"undefined"===typeof window?e:new URL(e,window.origin).href,se=e=>{let{endAt:t,mediaDuration:r,playbackRate:o,startFrom:n}=e,i=r;"undefined"!==typeof t&&(i=t),"undefined"!==typeof n&&(i-=n);const a=i/o;return Math.floor(a)};function ue(e){let t;throw(e=>e instanceof Error||null!==e&&"object"===typeof e&&"stack"in e&&"string"===typeof e.stack&&"message"in e&&"string"===typeof e.message)(e)?(t=e,t.stack||(t.stack=new Error(t.message).stack)):t="string"===typeof e?Error(e):Error("Rendering was cancelled"),window.remotion_cancelledError=t.stack,t}var le=(0,o.createContext)(null),de=e=>{let{durationInFrames:t,times:r=1/0,children:i,name:a,...s}=e;const u=ee(),{durationInFrames:l}=X();if(D(t,{component:"of the <Loop /> component",allowFloats:!0}),"number"!==typeof r)throw new TypeError(`You passed to "times" an argument of type ${typeof r}, but it must be a number.`);if(r!==1/0&&r%1!==0)throw new TypeError(`The "times" prop of a loop must be an integer, but got ${r}.`);if(r<0)throw new TypeError(`The "times" prop of a loop must be at least 0, but got ${r}`);const d=Math.ceil(l/t),c=Math.min(d,r),m="none"===s.layout?void 0:s.style,f=t*(c-1),p=Math.floor(u/t)*t,h=Math.min(p,f),w=(0,o.useMemo)((()=>({numberOfTimes:c,startOffset:-h,durationInFrames:t})),[c,t,h]),v=(0,o.useMemo)((()=>({iteration:Math.floor(u/t),durationInFrames:t})),[u,t]);return(0,n.jsx)(le.Provider,{value:v,children:(0,n.jsx)(ne,{durationInFrames:t,from:h,name:a??"<Loop>",_remotionInternalLoopDisplay:w,layout:s.layout,style:m,children:i})})};de.useLoop=()=>o.useContext(le);var ce=(0,o.createContext)({}),me=e=>(0,o.useContext)(ce)[e]??e,fe=(e,t)=>{if("number"!==typeof e.volume&&"function"!==typeof e.volume&&"undefined"!==typeof e.volume)throw new TypeError(`You have passed a volume of type ${typeof e.volume} to your <${t} /> component. Volume must be a number or a function with the signature '(frame: number) => number' undefined.`);if("number"===typeof e.volume&&e.volume<0)throw new TypeError(`You have passed a volume below 0 to your <${t} /> component. Volume must be between 0 and 1`);if("number"!==typeof e.playbackRate&&"undefined"!==typeof e.playbackRate)throw new TypeError(`You have passed a playbackRate of type ${typeof e.playbackRate} to your <${t} /> component. Playback rate must a real number or undefined.`);if("number"===typeof e.playbackRate&&(isNaN(e.playbackRate)||!Number.isFinite(e.playbackRate)||e.playbackRate<=0))throw new TypeError(`You have passed a playbackRate of ${e.playbackRate} to your <${t} /> component. Playback rate must be a real number above 0.`)},pe=(e,t)=>{if("undefined"!==typeof e){if("number"!==typeof e)throw new TypeError(`type of startFrom prop must be a number, instead got type ${typeof e}.`);if(isNaN(e)||e===1/0)throw new TypeError("startFrom prop can not be NaN or Infinity.");if(e<0)throw new TypeError(`startFrom must be greater than equal to 0 instead got ${e}.`)}if("undefined"!==typeof t){if("number"!==typeof t)throw new TypeError(`type of endAt prop must be a number, instead got type ${typeof t}.`);if(isNaN(t))throw new TypeError("endAt prop can not be NaN.");if(t<=0)throw new TypeError(`endAt must be a positive number, instead got ${t}.`)}if(t<e)throw new TypeError("endAt prop must be greater than startFrom prop.")},he=(0,o.createContext)({durations:{},setDurations:()=>{throw new Error("context missing")}});function we(e){let t=e+1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296}var ve=(e,t)=>{if(void 0!==t)throw new TypeError("random() takes only one argument");if(null===e)return Math.random();if("string"===typeof e)return we(function(e){let t=0,r=0,o=0;for(t=0;t<e.length;t++)r=e.charCodeAt(t),o=(o<<5)-o+r,o|=0;return o}(e));if("number"===typeof e)return we(1e10*e);throw new Error("random() argument must be a number or a string")},ye=()=>{const e=(0,o.useContext)(g);return Math.min(0,(null===e||void 0===e?void 0:e.relativeFrom)??0)},ge=e=>{const t=de.useLoop(),r=ee(),o=ye();return"repeat"===e||null===t?r+o:r+o+t.durationInFrames*t.iteration},be=e=>{if(/data:|blob:/.test(e.substring(0,5)))return"Data URL";const t=e.split("/").map((e=>e.split("\\"))).flat(1);return t[t.length-1]},Ee=(e,t,r)=>{const{current:o}=e;if(!o)return;const n=o.play();n.catch&&n.catch((e=>{if(o&&!e.message.includes("request was interrupted by a call to pause")&&!e.message.includes("The operation was aborted.")&&!e.message.includes("The fetching process for the media resource was aborted by the user agent")&&!e.message.includes("request was interrupted by a new load request")&&!e.message.includes("because the media was removed from the document")&&(!e.message.includes("user didn't interact with the document")||!o.muted)&&(console.log(`Could not play ${t} due to following error: `,e),!o.muted)){if(r)return void r();console.log("The video will be muted and we'll retry playing it."),"video"===t&&l().isPlayer&&console.log("Use onAutoPlayError() to handle this error yourself."),o.muted=!0,o.play()}}))},Fe=e=>{let{frame:t,volume:r,mediaVolume:o=1,allowAmplificationDuringRender:n}=e;const i=n?1/0:1;if("number"===typeof r)return Math.min(i,r*o);if("undefined"===typeof r)return Number(o);const a=r(t)*o;if("number"!==typeof a)throw new TypeError(`You passed in a a function to the volume prop but it did not return a number but a value of type ${typeof a} for frame ${t}`);if(Number.isNaN(a))throw new TypeError(`You passed in a function to the volume prop but it returned NaN for frame ${t}.`);if(!Number.isFinite(a))throw new TypeError(`You passed in a function to the volume prop but it returned a non-finite number for frame ${t}.`);return Math.max(0,Math.min(i,a))},Te={},Re=e=>{let{volume:t,mediaVolume:r,mediaRef:n,src:i,mediaType:a,playbackRate:s,displayName:u,id:d,stack:c,showInTimeline:m,premountDisplay:f,onAutoPlayError:p,isPremounting:h}=e;const w=X(),{rootId:v,audioAndVideoTags:y}=(0,o.useContext)(O),E=(0,o.useContext)(g),F=E?E.relativeFrom+E.cumulatedFrom:0,{imperativePlaying:R}=(0,o.useContext)(O),C=ye(),{registerSequence:x,unregisterSequence:k}=(0,o.useContext)(b),[I]=(0,o.useState)((()=>t)),S=T(),$=E?Math.min(E.durationInFrames,w.durationInFrames):w.durationInFrames,N="function"===typeof t,M=(0,o.useMemo)((()=>"number"===typeof t?t:new Array(Math.floor(Math.max(0,$+C))).fill(!0).map(((e,o)=>Fe({frame:o+C,volume:t,mediaVolume:r,allowAmplificationDuringRender:!1}))).join(",")),[$,C,t,r]);(0,o.useEffect)((()=>{var e;"number"===typeof t&&t!==I&&(Te[e=`Remotion: The ${a} with src ${i} has changed it's volume. Prefer the callback syntax for setting volume to get better timeline display: https://www.remotion.dev/docs/using-audio/#controlling-volume`]||(console.warn(e),Te[e]=!0))}),[I,a,i,t]),(0,o.useEffect)((()=>{var e,t;if(n.current){if(!i)throw new Error("No src passed");if((l().isStudio||"test"===(null===(e=window.process)||void 0===e||null===(t=e.env)||void 0===t?void 0:t.NODE_ENV))&&m)return x({type:a,src:i,id:d,duration:$,from:0,parent:(null===E||void 0===E?void 0:E.id)??null,displayName:u??be(i),rootId:v,volume:M,showInTimeline:!0,nonce:S,startMediaFrom:0-C,doesVolumeChange:N,loopDisplay:void 0,playbackRate:s,stack:c,premountDisplay:f}),()=>{k(d)}}}),[F,$,d,E,i,x,v,k,w,M,N,S,n,a,C,s,u,c,m,f]),(0,o.useEffect)((()=>{const e={id:d,play:()=>{if(R.current&&!h)return Ee(n,a,p)}};return y.current.push(e),()=>{y.current=y.current.filter((e=>e.id!==d))}}),[y,d,n,a,p,R,h])},Ce=o.createContext(null),xe=()=>{const e=(0,o.useContext)(Ce),t=e?e.addBlock:null;return(0,o.useMemo)((()=>({delayPlayback:()=>{if(!t)throw new Error("Tried to enable the buffering state, but a Remotion context was not found. This API can only be called in a component that was passed to the Remotion Player or a <Composition>. Or you might have experienced a version mismatch - run `npx remotion versions` and ensure all packages have the same version. This error is thrown by the buffer state https://remotion.dev/docs/player/buffer-state");const{unblock:e}=t({id:String(Math.random())});return{unblock:e}}})),[t])};function ke(e,t){if(t.length<2)throw new Error(e+" must have at least 2 elements");for(const r of t){if("number"!==typeof r)throw new Error(`${e} must contain only numbers`);if(!Number.isFinite(r))throw new Error(`${e} must contain only finite numbers, but got [${t.join(",")}]`)}}function Ie(e,t,r,o){if("undefined"===typeof e)throw new Error("input can not be undefined");if("undefined"===typeof t)throw new Error("inputRange can not be undefined");if("undefined"===typeof r)throw new Error("outputRange can not be undefined");if(t.length!==r.length)throw new Error("inputRange ("+t.length+") and outputRange ("+r.length+") must have the same length");ke("inputRange",t),ke("outputRange",r),function(e){for(let t=1;t<e.length;++t)if(!(e[t]>e[t-1]))throw new Error(`inputRange must be strictly monotonically increasing but got [${e.join(",")}]`)}(t);const n=(null===o||void 0===o?void 0:o.easing)??(e=>e);let i="extend";void 0!==(null===o||void 0===o?void 0:o.extrapolateLeft)&&(i=o.extrapolateLeft);let a="extend";if(void 0!==(null===o||void 0===o?void 0:o.extrapolateRight)&&(a=o.extrapolateRight),"number"!==typeof e)throw new TypeError("Cannot interpolate an input which is not a number");const s=function(e,t){let r;for(r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}(e,t);return function(e,t,r,o){const{extrapolateLeft:n,extrapolateRight:i,easing:a}=o;let s=e;const[u,l]=t,[d,c]=r;if(s<u){if("identity"===n)return s;if("clamp"===n)s=u;else if("wrap"===n){const e=l-u;s=((s-u)%e+e)%e+u}}if(s>l){if("identity"===i)return s;if("clamp"===i)s=l;else if("wrap"===i){const e=l-u;s=((s-u)%e+e)%e+u}}return d===c?d:(s=(s-u)/(l-u),s=a(s),s=s*(c-d)+d,s)}(e,[t[s],t[s+1]],[r[s],r[s+1]],{easing:n,extrapolateLeft:i,extrapolateRight:a})}var Se=e=>{let{frame:t,playbackRate:r,startFrom:o}=e;return Ie(t,[-1,o,o+1],[-1,o,o+r])},$e=e=>{let{fps:t,frame:r,playbackRate:o,startFrom:n}=e;return Se({frame:r,playbackRate:o,startFrom:n})*(1e3/t)/1e3},Ne=(e,t)=>Math.round(e/t*100)/100,Me=()=>{if("undefined"===typeof window)return!1;const e=/iP(ad|od|hone)/i.test(window.navigator.userAgent),t=/AppleWebKit/.test(window.navigator.userAgent);return e&&t},Pe=e=>{let{actualFrom:t,fps:r}=e;return Ne(Math.max(0,-t),r)},Ae=e=>{let{duration:t,fps:r}=e;return Ne(t,r)},_e=e=>{let{actualSrc:t,actualFrom:r,duration:o,fps:n}=e;if((e=>Me()&&e.startsWith("blob:"))(t))return t;if(t.startsWith("data:"))return t;if(Boolean(new URL(t,("undefined"===typeof window?null:window.location.href)??"http://localhost:3000").hash))return t;if(!Number.isFinite(r))return t;const i=`${t}#t=${Pe({actualFrom:r,fps:n})}`;return Number.isFinite(o)?`${i},${Ae({duration:o,fps:n})}`:i},Ve=e=>{let{actualSrc:t,actualFrom:r,duration:n,fps:i}=e;const a=(0,o.useRef)(r),s=(0,o.useRef)(n),u=(0,o.useRef)(t);(e=>{let{prevStartFrom:t,newStartFrom:r,prevDuration:o,newDuration:n,fps:i}=e;const a=Pe({actualFrom:t,fps:i}),s=Pe({actualFrom:r,fps:i}),u=Ae({duration:o,fps:i}),l=Ae({duration:n,fps:i});return!(s<a)&&!(l>u)})({prevStartFrom:a.current,newStartFrom:r,prevDuration:s.current,newDuration:n,fps:i})&&t===u.current||(a.current=r,s.current=n,u.current=t);return _e({actualSrc:u.current,actualFrom:a.current,duration:s.current,fps:i})},De={},Le=.45,je=(e,t)=>{if(!e.current)return;const r=Me()?Number(t.toFixed(1)):t;e.current.currentTime=r},Be=e=>{let{mediaRef:t,src:r,mediaType:n,playbackRate:i,onlyWarnForMediaSeekingError:a,acceptableTimeshift:s,pauseWhenBuffering:u,isPremounting:l,debugSeeking:d,onAutoPlayError:c}=e;const{playbackRate:m}=(0,o.useContext)(O),f=ee(),p=J(),[h]=G(),w=(0,o.useContext)(Ce),{fps:v}=X(),y=ye(),g=(0,o.useRef)(null),b=(0,o.useRef)(null);if(!w)throw new Error("useMediaPlayback must be used inside a <BufferingContext>");const E=(0,o.useRef)({}),F=(0,o.useCallback)((()=>{r&&(d&&console.log(`Detected ${r} as a variable FPS video. Disabling buffering while seeking.`),E.current[r]=!0)}),[d,r]),T=(e=>{let{mediaRef:t,mediaType:r,lastSeek:n,onVariableFpsVideoDetected:i}=e;const a=(0,o.useRef)(null);return(0,o.useEffect)((()=>{const{current:e}=t;if(!e)return void(a.current=null);if(a.current=e.currentTime,"video"!==r)return void(a.current=null);const o=e;if(!o.requestVideoFrameCallback)return;let s=()=>{};const u=()=>{if(!o)return;const e=o.requestVideoFrameCallback(((e,t)=>{if(null!==a.current){const e=Math.abs(a.current-t.mediaTime),r=Math.abs(null===n.current?1/0:t.mediaTime-n.current);e>.5&&r>.5&&t.mediaTime>a.current&&i()}a.current=t.mediaTime,u()}));s=()=>{o.cancelVideoFrameCallback(e),s=()=>{}}};return u(),()=>{s()}}),[n,t,r,i]),a})({mediaRef:t,mediaType:n,lastSeek:b,onVariableFpsVideoDetected:F}),R=$e({frame:f,playbackRate:i,startFrom:-y,fps:v}),C=(e=>{let{element:t,shouldBuffer:r,isPremounting:n}=e;const i=xe(),[a,s]=(0,o.useState)(!1);return(0,o.useEffect)((()=>{let e=[];const{current:o}=t;if(!o)return;if(!r)return;if(n)return void(o.readyState<o.HAVE_FUTURE_DATA&&(navigator.userAgent.includes("Firefox/")||o.load()));const a=()=>{e.forEach((e=>e())),e=[],s(!1)},u=()=>{s(!0);const{unblock:t}=i.delayPlayback(),r=()=>{a(),l()},n=()=>{a(),l()};o.addEventListener("canplay",r,{once:!0}),e.push((()=>{o.removeEventListener("canplay",r)})),o.addEventListener("error",n,{once:!0}),e.push((()=>{o.removeEventListener("error",n)})),e.push((()=>{t()}))},l=()=>{o.readyState<o.HAVE_FUTURE_DATA?(u(),navigator.userAgent.includes("Firefox/")||o.load()):(o.addEventListener("waiting",u),e.push((()=>{o.removeEventListener("waiting",u)})))};return l(),()=>{a()}}),[i,t,n,r]),a})({element:t,shouldBuffer:u,isPremounting:l}),{bufferUntilFirstFrame:x,isBuffering:k}=(e=>{let{mediaRef:t,mediaType:r,onVariableFpsVideoDetected:n,pauseWhenBuffering:i}=e;const a=(0,o.useRef)(!1),{delayPlayback:s}=xe(),u=(0,o.useCallback)((e=>{if("video"!==r)return;if(!i)return;const o=t.current;if(!o)return;if(!o.requestVideoFrameCallback)return;a.current=!0;const u=s(),l=()=>{u.unblock(),o.removeEventListener("ended",l,{once:!0}),o.removeEventListener("pause",l,{once:!0}),a.current=!1},d=()=>{l()};o.requestVideoFrameCallback(((t,r)=>{Math.abs(r.mediaTime-e)>.5&&n(),l()})),o.addEventListener("ended",d,{once:!0}),o.addEventListener("pause",d,{once:!0}),o.addEventListener("canplay",d,{once:!0})}),[s,t,r,n,i]);return(0,o.useMemo)((()=>({isBuffering:()=>a.current,bufferUntilFirstFrame:u})),[u])})({mediaRef:t,mediaType:n,onVariableFpsVideoDetected:F,pauseWhenBuffering:u}),I=i*m,S=(()=>{var e;return null!==(e=t.current)&&void 0!==e&&e.duration?Math.min(t.current.duration,s??Le):s})(),$=(e=>{const[t,r]=(0,o.useState)(e.buffering.current);return(0,o.useEffect)((()=>(e.listenForBuffering((()=>{r(!0)})),e.listenForResume((()=>{r(!1)})),()=>{e.listenForBuffering((()=>{})),e.listenForResume((()=>{}))})),[e]),t})(w);(0,o.useEffect)((()=>{var e;if(!h)return void(null===(e=t.current)||void 0===e||e.pause());const r=C||k();var o;$&&!r&&(null===(o=t.current)||void 0===o||o.pause())}),[k,C,$,t,h]),(0,o.useEffect)((()=>{const e="audio"===n?"<Audio>":"<Video>";if(!t.current)throw new Error(`No ${n} ref found`);if(!r)throw new Error(`No 'src' attribute was passed to the ${e} element.`);const o=Math.max(0,I);t.current.playbackRate!==o&&(t.current.playbackRate=o);const{duration:i}=t.current,s=!Number.isNaN(i)&&Number.isFinite(i)?Math.min(i,R):R,u=t.current.currentTime,l=T.current??null,m=E.current[r],f=Math.abs(s-u),v=l?Math.abs(s-l):null,y=v&&!m?v:f;if(d&&console.log({mediaTagTime:u,rvcTime:l,shouldBeTime:s,state:t.current.readyState,playing:!t.current.paused,isVariableFpsVideo:m}),y>S&&g.current!==s)return d&&console.log("Seeking",{shouldBeTime:s,isTime:u,rvcTime:l,timeShift:y,isVariableFpsVideo:m}),je(t,s),b.current=s,g.current=s,h&&!m&&(I>0&&x(s),t.current.paused&&Ee(t,n,c)),void(a||((e,t)=>{if(null===e)return;if(0===e.seekable.length)return;if(e.seekable.length>1)return;if(De[e.src])return;const r=e.seekable.start(0),o=e.seekable.end(0);if(0===r&&0===o){const r=[`The media ${e.src} cannot be seeked. This could be one of few reasons:`,"1) The media resource was replaced while the video is playing but it was not loaded yet.","2) The media does not support seeking.","3) The media was loaded with security headers prventing it from being included.","Please see https://remotion.dev/docs/non-seekable-media for assistance."].join("\n");if("console-error"===t)console.error(r);else{if("console-warning"!==t)throw new Error(r);console.warn(`The media ${e.src} does not support seeking. The video will render fine, but may not play correctly in the Remotion Studio and in the <Player>. See https://remotion.dev/docs/non-seekable-media for an explanation.`)}De[e.src]=!0}})(t.current,a?"console-warning":"console-error"));const F=h?.15:1e-5,$=Math.abs(t.current.currentTime-s)>F,N=C||k(),M=w.buffering.current&&!N;h&&!M?(t.current.paused&&!t.current.ended||0===p)&&($&&(je(t,s),b.current=s),Ee(t,n,c),m||I>0&&x(s)):$&&(je(t,s),b.current=s)}),[p,S,x,w.buffering,T,d,R,k,C,t,n,a,I,h,r,c])},We=e=>{const[t,r]=(0,o.useState)(1);return(0,o.useEffect)((()=>{const t=e.current;if(!t)return;const o=()=>{r(t.volume)};return t.addEventListener("volumechange",o),()=>t.removeEventListener("volumechange",o)}),[e]),(0,o.useEffect)((()=>{const o=e.current;o&&o.volume!==t&&r(o.volume)}),[t,e]),t},qe=(e,t)=>Math.abs(e-t)<1e-5,Oe=e=>{let{volumePropFrame:t,actualVolume:r,volume:n,mediaVolume:i,mediaRef:a}=e;(0,o.useEffect)((()=>{const e=Fe({frame:t,volume:n,mediaVolume:i,allowAmplificationDuringRender:!1});!qe(e,r)&&a.current&&(a.current.volume=e)}),[r,t,a,n,i])},ze=(0,o.createContext)({mediaMuted:!1,mediaVolume:1}),Ue=(0,o.createContext)({setMediaMuted:()=>{throw new Error("default")},setMediaVolume:()=>{throw new Error("default")}}),Ye=()=>{const{mediaVolume:e}=(0,o.useContext)(ze),{setMediaVolume:t}=(0,o.useContext)(Ue);return(0,o.useMemo)((()=>[e,t]),[e,t])},He=()=>{const{mediaMuted:e}=(0,o.useContext)(ze),{setMediaMuted:t}=(0,o.useContext)(Ue);return(0,o.useMemo)((()=>[e,t]),[e,t])},Je=(0,o.createContext)(null),Ze=(0,o.forwardRef)(((e,t)=>{const[r]=(0,o.useState)(e.shouldPreMountAudioTags);if(e.shouldPreMountAudioTags!==r)throw new Error("Cannot change the behavior for pre-mounting audio tags dynamically.");const{volume:i,muted:a,playbackRate:s,shouldPreMountAudioTags:u,src:l,onDuration:d,acceptableTimeShiftInSeconds:c,_remotionInternalNeedsDurationCalculation:m,_remotionInternalNativeLoopPassed:f,_remotionInternalStack:p,_remotionDebugSeeking:h,allowAmplificationDuringRender:w,name:v,pauseWhenBuffering:y,showInTimeline:b,loopVolumeCurveBehavior:F,stack:T,...R}=e,[C]=Ye(),[x]=He(),k=ge(F??"repeat"),{hidden:I}=(0,o.useContext)(E);if(!l)throw new TypeError("No 'src' was passed to <Audio>.");const S=me(l),$=(0,o.useContext)(g),[N]=(0,o.useState)((()=>String(Math.random()))),M=I[N]??!1,P=Fe({frame:k,volume:i,mediaVolume:C,allowAmplificationDuringRender:!1}),A=(0,o.useMemo)((()=>({muted:a||x||M||P<=0,src:S,loop:f,...R})),[f,M,x,a,R,S,P]),_=((e,t)=>{const r=(0,o.useContext)(Je),[n]=(0,o.useState)((()=>r&&r.numberOfAudioTags>0?r.registerAudio(e,t):{el:o.createRef(),id:Math.random(),props:e,audioId:t})),i=o.useInsertionEffect??o.useLayoutEffect;return"undefined"!==typeof document&&(i((()=>{r&&r.numberOfAudioTags>0&&r.updateAudio({id:n.id,aud:e,audioId:t})}),[e,r,n.id,t]),i((()=>()=>{r&&r.numberOfAudioTags>0&&r.unregisterAudio(n.id)}),[r,n.id])),n})(A,(0,o.useMemo)((()=>`audio-${ve(l??"")}-${null===$||void 0===$?void 0:$.relativeFrom}-${null===$||void 0===$?void 0:$.cumulatedFrom}-${null===$||void 0===$?void 0:$.durationInFrames}-muted:${e.muted}-loop:${e.loop}`),[l,null===$||void 0===$?void 0:$.relativeFrom,null===$||void 0===$?void 0:$.cumulatedFrom,null===$||void 0===$?void 0:$.durationInFrames,e.muted,e.loop])).el,V=We(_);Oe({volumePropFrame:k,actualVolume:V,volume:i,mediaVolume:C,mediaRef:_}),Re({volume:i,mediaVolume:C,mediaRef:_,src:l,mediaType:"audio",playbackRate:s??1,displayName:v??null,id:N,stack:p,showInTimeline:b,premountDisplay:null,onAutoPlayError:null,isPremounting:Boolean(null===$||void 0===$?void 0:$.premounting)}),Be({mediaRef:_,src:l,mediaType:"audio",playbackRate:s??1,onlyWarnForMediaSeekingError:!1,acceptableTimeshift:c??Le,isPremounting:Boolean(null===$||void 0===$?void 0:$.premounting),pauseWhenBuffering:y,debugSeeking:h,onAutoPlayError:null}),(0,o.useImperativeHandle)(t,(()=>_.current),[_]);const D=(0,o.useRef)(d);return D.current=d,(0,o.useEffect)((()=>{const{current:e}=_;if(!e)return;var t;if(e.duration)return void(null===(t=D.current)||void 0===t||t.call(D,e.src,e.duration));const r=()=>{var t;null===(t=D.current)||void 0===t||t.call(D,e.src,e.duration)};return e.addEventListener("loadedmetadata",r),()=>{e.removeEventListener("loadedmetadata",r)}}),[_,l]),r?null:(0,n.jsx)("audio",{ref:_,preload:"metadata",...A})}));"undefined"!==typeof window&&(window.remotion_renderReady=!1);var Ge=[];"undefined"!==typeof window&&(window.remotion_delayRenderTimeouts={});var Ke="The delayRender was called:",Qe=(e,t)=>{var r;if("string"!==typeof e&&"undefined"!==typeof e)throw new Error("The label parameter of delayRender() must be a string or undefined, got: "+JSON.stringify(e));const o=Math.random();Ge.push(o);const n=(null===(r=Error().stack)||void 0===r?void 0:r.replace(/^Error/g,""))??"";if(l().isRendering){const r=((null===t||void 0===t?void 0:t.timeoutInMilliseconds)??("undefined"===typeof window?3e4:window.remotion_puppeteerTimeout??3e4))-2e3;if("undefined"!==typeof window){const i=((null===t||void 0===t?void 0:t.retries)??0)-(window.remotion_attempt-1);window.remotion_delayRenderTimeouts[o]={label:e??null,timeout:setTimeout((()=>{const t=["A delayRender()",e?`"${e}"`:null,`was called but not cleared after ${r}ms. See https://remotion.dev/docs/timeout for help.`,i>0?"Retries left: "+i:null,i>0?"- Rendering the frame will be retried.":null,Ke,n].filter(w).join(" ");ue(Error(t))}),r)}}}return"undefined"!==typeof window&&(window.remotion_renderReady=!1),o},Xe=e=>{if("undefined"===typeof e)throw new TypeError("The continueRender() method must be called with a parameter that is the return value of delayRender(). No value was passed.");if("number"!==typeof e)throw new TypeError("The parameter passed into continueRender() must be the return value of delayRender() which is a number. Got: "+JSON.stringify(e));0===(Ge=Ge.filter((t=>t!==e||(l().isRendering&&(clearTimeout(window.remotion_delayRenderTimeouts[e].timeout),delete window.remotion_delayRenderTimeouts[e]),!1)))).length&&"undefined"!==typeof window&&(window.remotion_renderReady=!0)},et=(0,o.forwardRef)(((e,t)=>{const r=(0,o.useRef)(null),{volume:i,playbackRate:a,allowAmplificationDuringRender:s,onDuration:u,toneFrequency:l,_remotionInternalNeedsDurationCalculation:d,_remotionInternalNativeLoopPassed:c,acceptableTimeShiftInSeconds:m,name:f,onError:p,delayRenderRetries:h,delayRenderTimeoutInMilliseconds:w,loopVolumeCurveBehavior:v,pauseWhenBuffering:y,...b}=e,E=J(),F=ge(v??"repeat"),T=ee(),R=(0,o.useContext)(g),{registerRenderAsset:C,unregisterRenderAsset:x}=(0,o.useContext)(ie),k=(0,o.useMemo)((()=>`audio-${ve(e.src??"")}-${null===R||void 0===R?void 0:R.relativeFrom}-${null===R||void 0===R?void 0:R.cumulatedFrom}-${null===R||void 0===R?void 0:R.durationInFrames}`),[e.src,null===R||void 0===R?void 0:R.relativeFrom,null===R||void 0===R?void 0:R.cumulatedFrom,null===R||void 0===R?void 0:R.durationInFrames]),I=Fe({volume:i,frame:F,mediaVolume:1,allowAmplificationDuringRender:s??!1});(0,o.useImperativeHandle)(t,(()=>r.current),[]),(0,o.useEffect)((()=>{if(!e.src)throw new Error("No src passed");if(window.remotion_audioEnabled&&!e.muted&&!(I<=0))return C({type:"audio",src:ae(e.src),id:k,frame:E,volume:I,mediaFrame:T,playbackRate:e.playbackRate??1,allowAmplificationDuringRender:s??!1,toneFrequency:l??null,audioStartFrame:Math.max(0,-((null===R||void 0===R?void 0:R.relativeFrom)??0))}),()=>x(k)}),[e.muted,e.src,C,E,k,x,I,F,T,a,e.playbackRate,s,l,null===R||void 0===R?void 0:R.relativeFrom]);const{src:S}=e,$=t||d;return(0,o.useLayoutEffect)((()=>{var e,t;if("test"===(null===(e=window.process)||void 0===e||null===(t=e.env)||void 0===t?void 0:t.NODE_ENV))return;if(!$)return;const o=Qe("Loading <Audio> duration with src="+S,{retries:h??void 0,timeoutInMilliseconds:w??void 0}),{current:n}=r,i=()=>{null!==n&&void 0!==n&&n.duration&&u(n.src,n.duration),Xe(o)};return null!==n&&void 0!==n&&n.duration?(u(n.src,n.duration),Xe(o)):null===n||void 0===n||n.addEventListener("loadedmetadata",i,{once:!0}),()=>{null===n||void 0===n||n.removeEventListener("loadedmetadata",i),Xe(o)}}),[S,u,$,h,w]),$?(0,n.jsx)("audio",{ref:r,...b}):null})),tt=(0,o.forwardRef)(((e,t)=>{const r=(0,o.useContext)(Je),{startFrom:i,endAt:a,name:s,stack:u,pauseWhenBuffering:d,showInTimeline:c,_remotionDebugSeeking:m,...f}=e,{loop:p,...h}=e,{fps:w}=X(),v=l(),{durations:y,setDurations:g}=(0,o.useContext)(he);if("string"!==typeof e.src)throw new TypeError(`The \`<Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(e.src)} instead.`);const b=me(e.src),E=(0,o.useCallback)((e=>{console.log(e.currentTarget.error);const t=`Could not play audio with src ${b}: ${e.currentTarget.error}. See https://remotion.dev/docs/media-playback-error for help.`;p?ue(new Error(t)):console.warn(t)}),[p,b]),F=(0,o.useCallback)(((e,t)=>{g({type:"got-duration",durationInSeconds:t,src:e})}),[g]),T=y[ae(b)]??y[ae(e.src)];if(p&&void 0!==T){if(!Number.isFinite(T))return(0,n.jsx)(tt,{...h,ref:t,_remotionInternalNativeLoopPassed:!0});const r=T*w;return(0,n.jsx)(de,{layout:"none",durationInFrames:se({endAt:a,mediaDuration:r,playbackRate:e.playbackRate??1,startFrom:i}),children:(0,n.jsx)(tt,{...h,ref:t,_remotionInternalNativeLoopPassed:!0})})}if("undefined"!==typeof i||"undefined"!==typeof a){pe(i,a);const e=i??0,r=a??1/0;return(0,n.jsx)(ne,{layout:"none",from:0-e,showInTimeline:!1,durationInFrames:r,name:s,children:(0,n.jsx)(tt,{_remotionInternalNeedsDurationCalculation:Boolean(p),pauseWhenBuffering:d??!1,...f,ref:t})})}return fe(e,"Audio"),v.isRendering?(0,n.jsx)(et,{onDuration:F,...e,ref:t,onError:E,_remotionInternalNeedsDurationCalculation:Boolean(p)}):(0,n.jsx)(Ze,{_remotionInternalNativeLoopPassed:e._remotionInternalNativeLoopPassed??!1,_remotionDebugSeeking:m??!1,_remotionInternalStack:u??null,shouldPreMountAudioTags:null!==r&&r.numberOfAudioTags>0,...e,ref:t,onError:E,onDuration:F,pauseWhenBuffering:d??!1,_remotionInternalNeedsDurationCalculation:Boolean(p),showInTimeline:c??!0})}));f(tt);String(/^([a-zA-Z0-9-\u4E00-\u9FFF])+$/g),(0,o.createContext)({folderName:null,parentName:null}),String(/^([a-zA-Z0-9-\u4E00-\u9FFF])+$/g),o.createRef();(0,o.forwardRef)(((e,t)=>{let{onLoad:r,onError:i,delayRenderRetries:a,delayRenderTimeoutInMilliseconds:s,...u}=e;const[l]=(0,o.useState)((()=>Qe(`Loading <IFrame> with source ${u.src}`,{retries:a??void 0,timeoutInMilliseconds:s??void 0}))),d=(0,o.useCallback)((e=>{Xe(l),null===r||void 0===r||r(e)}),[l,r]),c=(0,o.useCallback)((e=>{Xe(l),i?i(e):console.error("Error loading iframe:",e,"Handle the event using the onError() prop to make this message disappear.")}),[l,i]);return(0,n.jsx)("iframe",{...u,ref:t,onError:c,onLoad:d})}));(0,o.forwardRef)(((e,t)=>{let{onError:r,maxRetries:i=2,src:a,pauseWhenLoading:s,delayRenderRetries:u,delayRenderTimeoutInMilliseconds:l,onImageFrame:d,...c}=e;const m=(0,o.useRef)(null),f=(0,o.useRef)({}),{delayPlayback:p}=xe(),h=(0,o.useContext)(g);if(!a)throw new Error('No "src" prop was passed to <Img>.');(0,o.useImperativeHandle)(t,(()=>m.current),[]);const w=me(a),v=(0,o.useCallback)((e=>{if(!m.current)return;const t=m.current.src;setTimeout((()=>{var e;if(!m.current)return;const r=null===(e=m.current)||void 0===e?void 0:e.src;r===t&&(m.current.removeAttribute("src"),m.current.setAttribute("src",r))}),e)}),[]),y=(0,o.useCallback)((e=>{var t,o,n,a,s;if(f.current)if(f.current[null===(t=m.current)||void 0===t?void 0:t.src]=(f.current[null===(o=m.current)||void 0===o?void 0:o.src]??0)+1,r&&(f.current[null===(n=m.current)||void 0===n?void 0:n.src]??0)>i)r(e);else{if((f.current[null===(a=m.current)||void 0===a?void 0:a.src]??0)<=i){var u,l;const e=1e3*2**((f.current[null===(u=m.current)||void 0===u?void 0:u.src]??0)-1);return console.warn(`Could not load image with source ${null===(l=m.current)||void 0===l?void 0:l.src}, retrying again in ${e}ms`),void v(e)}ue("Error loading image with src: "+(null===(s=m.current)||void 0===s?void 0:s.src))}}),[i,r,v]);if("undefined"!==typeof window){const e=Boolean(null===h||void 0===h?void 0:h.premounting);(0,o.useLayoutEffect)((()=>{var t,r;if("test"===(null===(t=window.process)||void 0===t||null===(r=t.env)||void 0===r?void 0:r.NODE_ENV))return void(m.current&&(m.current.src=w));const{current:o}=m;if(!o)return;const n=Qe("Loading <Img> with src="+w,{retries:u??void 0,timeoutInMilliseconds:l??void 0}),i=s&&!e?p().unblock:()=>{};let a=!1;const c=()=>{var e;if(a)Xe(n);else{var t,r;if((f.current[null===(e=m.current)||void 0===e?void 0:e.src]??0)>0)delete f.current[null===(t=m.current)||void 0===t?void 0:t.src],console.info(`Retry successful - ${null===(r=m.current)||void 0===r?void 0:r.src} is now loaded`);o&&(null===d||void 0===d||d(o)),i(),Xe(n)}};if(m.current)return o.src=w,o.complete?c():o.decode().then(c).catch((e=>{console.warn(e),o.complete?c():o.addEventListener("load",c)})),()=>{a=!0,o.removeEventListener("load",c),i(),Xe(n)};c()}),[w,p,u,l,s,e,d])}return(0,n.jsx)("img",{...c,ref:m,onError:y})}));var rt={};a(rt,{makeDefaultPreviewCSS:()=>at,injectCSS:()=>nt,OFFTHREAD_VIDEO_CLASS_NAME:()=>it});var ot={},nt=e=>{if("undefined"===typeof document)return;if(ot[e])return;const t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.appendChild(document.createTextNode(e)),t.prepend(r),ot[e]=!0},it="__remotion_offthreadvideo",at=(e,t)=>e?`\n ${e} * {\n box-sizing: border-box;\n }\n ${e} *:-webkit-full-screen {\n width: 100%;\n height: 100%;\n }\n ${e} .${it} {\n object-fit: contain;\n }\n `:`\n * {\n box-sizing: border-box;\n }\n body {\n margin: 0;\n\t background-color: ${t};\n }\n .${it} {\n object-fit: contain;\n }\n `;o.createContext(null),(0,o.createContext)({setSize:()=>{},size:{size:"auto",translation:{x:0,y:0}}});var st=(0,o.createContext)(!1),ut=e=>{let{children:t}=e;return(0,n.jsx)(st.Provider,{value:!1,children:t})},lt=(0,o.forwardRef)(((e,t)=>{let{children:r}=e;return(()=>{if(!o.useContext(st))throw new Error("This component must be inside a <Series /> component.")})(),(0,n.jsx)(ut,{children:r})}));f(lt);new Map;var dt=(0,o.forwardRef)(((e,t)=>{const r=(0,o.useRef)(null),{volume:i,muted:a,playbackRate:s,onlyWarnForMediaSeekingError:u,src:l,onDuration:d,acceptableTimeShift:c,acceptableTimeShiftInSeconds:m,toneFrequency:f,name:p,_remotionInternalNativeLoopPassed:h,_remotionInternalStack:w,_remotionDebugSeeking:v,style:y,pauseWhenBuffering:b,showInTimeline:F,loopVolumeCurveBehavior:T,onError:R,onAutoPlayError:C,onVideoFrame:x,crossOrigin:k,...I}=e,S=ge(T??"repeat"),{fps:$,durationInFrames:N}=X(),M=(0,o.useContext)(g),{hidden:P}=(0,o.useContext)(E),[A]=(0,o.useState)((()=>String(Math.random()))),_=P[A]??!1;if("undefined"!==typeof c)throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");const V=We(r),[D]=Ye(),[L]=He();Re({mediaRef:r,volume:i,mediaVolume:D,mediaType:"video",src:l,playbackRate:e.playbackRate??1,displayName:p??null,id:A,stack:w,showInTimeline:F,premountDisplay:null,onAutoPlayError:C??null,isPremounting:Boolean(null===M||void 0===M?void 0:M.premounting)}),Oe({volumePropFrame:S,actualVolume:V,volume:i,mediaVolume:D,mediaRef:r}),Be({mediaRef:r,src:l,mediaType:"video",playbackRate:e.playbackRate??1,onlyWarnForMediaSeekingError:u,acceptableTimeshift:m??Le,isPremounting:Boolean(null===M||void 0===M?void 0:M.premounting),pauseWhenBuffering:b,debugSeeking:v,onAutoPlayError:C??null});const j=M?M.relativeFrom:0,B=M?Math.min(M.durationInFrames,N):N,W=Ve({actualSrc:me(l),actualFrom:j,duration:B,fps:$});(0,o.useImperativeHandle)(t,(()=>r.current),[]),(0,o.useEffect)((()=>{const{current:e}=r;if(!e)return;const t=()=>{if(e.error){var t;if(console.error("Error occurred in video",null===e||void 0===e?void 0:e.error),R){const t=new Error(`Code ${e.error.code}: ${e.error.message}`);return void R(t)}throw new Error(`The browser threw an error while playing the video ${l}: Code ${e.error.code} - ${null===e||void 0===e||null===(t=e.error)||void 0===t?void 0:t.message}. See https://remotion.dev/docs/media-playback-error for help. Pass an onError() prop to handle the error.`)}if(!R)throw new Error("The browser threw an error while playing the video");{const e=new Error(`The browser threw an error while playing the video ${l}`);R(e)}};return e.addEventListener("error",t,{once:!0}),()=>{e.removeEventListener("error",t)}}),[R,l]);const q=(0,o.useRef)(d);q.current=d,(e=>{let{ref:t,onVideoFrame:r}=e;(0,o.useEffect)((()=>{const{current:e}=t;if(!e)return;if(!r)return;let o=0;const n=()=>{t.current&&(r(t.current),o=t.current.requestVideoFrameCallback(n))};return n(),()=>{e.cancelVideoFrameCallback(o)}}),[r,t])})({ref:r,onVideoFrame:x}),(0,o.useEffect)((()=>{const{current:e}=r;if(!e)return;var t;if(e.duration)return void(null===(t=q.current)||void 0===t||t.call(q,l,e.duration));const o=()=>{var t;null===(t=q.current)||void 0===t||t.call(q,l,e.duration)};return e.addEventListener("loadedmetadata",o),()=>{e.removeEventListener("loadedmetadata",o)}}),[l]),(0,o.useEffect)((()=>{const{current:e}=r;e&&(Me()?e.preload="metadata":e.preload="auto")}),[]);const O=(0,o.useMemo)((()=>({...y,opacity:_?0:(null===y||void 0===y?void 0:y.opacity)??1})),[_,y]),z=k??(x?"anonymous":void 0);return(0,n.jsx)("video",{ref:r,muted:a||L,playsInline:!0,src:W,loop:h,style:O,disableRemotePlayback:!0,crossOrigin:z,...I})})),ct=e=>Math.round(1e5*e)/1e5,mt=(e,t)=>{if(qe(e.currentTime,t))return{wait:Promise.resolve(t),cancel:()=>{}};let r;e.currentTime=t;let o=null;const n=new Promise((t=>{r=e.requestVideoFrameCallback(((e,r)=>{const o=r.expectedDisplayTime-e;o<=0?t(r.mediaTime):setTimeout((()=>{t(r.mediaTime)}),o+150)}))})),i=new Promise((t=>{const r=()=>{t()};e.addEventListener("seeked",r,{once:!0}),o=()=>{e.removeEventListener("seeked",r)}}));return{wait:Promise.all([n,i]).then((e=>{let[t]=e;return t})),cancel:()=>{var t;null===(t=o)||void 0===t||t(),e.cancelVideoFrameCallback(r)}}},ft=(0,o.forwardRef)(((e,t)=>{let{onError:r,volume:i,allowAmplificationDuringRender:a,playbackRate:s,onDuration:u,toneFrequency:d,name:c,acceptableTimeShiftInSeconds:m,delayRenderRetries:f,delayRenderTimeoutInMilliseconds:p,loopVolumeCurveBehavior:h,...w}=e;const v=J(),y=ee(),b=ge(h??"repeat"),E=Q(),F=(0,o.useRef)(null),T=(0,o.useContext)(g),R=ye(),C=l(),{registerRenderAsset:x,unregisterRenderAsset:k}=(0,o.useContext)(ie),I=(0,o.useMemo)((()=>`video-${ve(w.src??"")}-${null===T||void 0===T?void 0:T.cumulatedFrom}-${null===T||void 0===T?void 0:T.relativeFrom}-${null===T||void 0===T?void 0:T.durationInFrames}`),[w.src,null===T||void 0===T?void 0:T.cumulatedFrom,null===T||void 0===T?void 0:T.relativeFrom,null===T||void 0===T?void 0:T.durationInFrames]);if(!E)throw new Error("No video config found");const S=Fe({volume:i,frame:b,mediaVolume:1,allowAmplificationDuringRender:a??!1});(0,o.useEffect)((()=>{if(!w.src)throw new Error("No src passed");if(!w.muted&&!(S<=0)&&window.remotion_audioEnabled)return x({type:"video",src:ae(w.src),id:I,frame:v,volume:S,mediaFrame:y,playbackRate:s??1,allowAmplificationDuringRender:a??!1,toneFrequency:d??null,audioStartFrame:Math.max(0,-((null===T||void 0===T?void 0:T.relativeFrom)??0))}),()=>k(I)}),[w.muted,w.src,x,I,k,S,y,v,s,a,d,null===T||void 0===T?void 0:T.relativeFrom]),(0,o.useImperativeHandle)(t,(()=>F.current),[]),(0,o.useEffect)((()=>{var e,t;if(!window.remotion_videoEnabled)return;const{current:o}=F;if(!o)return;const n=$e({frame:y,playbackRate:s||1,startFrom:-R,fps:E.fps}),i=Qe(`Rendering <Video /> with src="${w.src}" at time ${n}`,{retries:f??void 0,timeoutInMilliseconds:p??void 0});if("test"===(null===(e=window.process)||void 0===e||null===(t=e.env)||void 0===t?void 0:t.NODE_ENV))return void Xe(i);if(qe(o.currentTime,n)){if(o.readyState>=2)return void Xe(i);const e=()=>{Xe(i)};return o.addEventListener("loadeddata",e,{once:!0}),()=>{o.removeEventListener("loadeddata",e)}}const a=()=>{Xe(i)},u=((e,t,r)=>{const o=1/r/2;let n=()=>{};return Number.isFinite(e.duration)&&e.currentTime>=e.duration&&t>=e.duration?{prom:Promise.resolve(),cancel:()=>{}}:{prom:new Promise(((r,i)=>{const a=mt(e,t+o);a.wait.then((a=>{if(Math.abs(t-a)<=o)return r();const s=mt(e,a+o*(t>a?1:-1));n=s.cancel,s.wait.then((a=>{const s=Math.abs(t-a);if(ct(s)<=ct(o))return r();const u=mt(e,t+o);return n=u.cancel,u.wait.then((()=>{r()})).catch((e=>{i(e)}))})).catch((e=>{i(e)}))})),n=a.cancel})),cancel:()=>{n()}}})(o,n,E.fps);u.prom.then((()=>{Xe(i)})),o.addEventListener("ended",a,{once:!0});const l=()=>{if(null!==o&&void 0!==o&&o.error){var e;if(console.error("Error occurred in video",null===o||void 0===o?void 0:o.error),r)return;throw new Error(`The browser threw an error while playing the video ${w.src}: Code ${o.error.code} - ${null===o||void 0===o||null===(e=o.error)||void 0===e?void 0:e.message}. See https://remotion.dev/docs/media-playback-error for help. Pass an onError() prop to handle the error.`)}throw new Error("The browser threw an error")};return o.addEventListener("error",l,{once:!0}),()=>{u.cancel(),o.removeEventListener("ended",a),o.removeEventListener("error",l),Xe(i)}}),[b,w.src,s,E.fps,y,R,r,f,p]);const{src:$}=w;return C.isRendering&&(0,o.useLayoutEffect)((()=>{var e,t;if("test"===(null===(e=window.process)||void 0===e||null===(t=e.env)||void 0===t?void 0:t.NODE_ENV))return;const r=Qe("Loading <Video> duration with src="+$,{retries:f??void 0,timeoutInMilliseconds:p??void 0}),{current:o}=F,n=()=>{null!==o&&void 0!==o&&o.duration&&u($,o.duration),Xe(r)};return null!==o&&void 0!==o&&o.duration?(u($,o.duration),Xe(r)):null===o||void 0===o||o.addEventListener("loadedmetadata",n,{once:!0}),()=>{null===o||void 0===o||o.removeEventListener("loadedmetadata",n),Xe(r)}}),[$,u,f,p]),(0,n.jsx)("video",{ref:F,disableRemotePlayback:!0,...w})})),pt=(0,o.forwardRef)(((e,t)=>{const{startFrom:r,endAt:i,name:a,pauseWhenBuffering:s,stack:u,_remotionInternalNativeLoopPassed:d,showInTimeline:c,onAutoPlayError:m,...f}=e,{loop:p,_remotionDebugSeeking:h,...w}=e,{fps:v}=X(),y=l(),{durations:g,setDurations:b}=(0,o.useContext)(he);if("string"===typeof t)throw new Error("string refs are not supported");if("string"!==typeof e.src)throw new TypeError(`The \`<Video>\` tag requires a string for \`src\`, but got ${JSON.stringify(e.src)} instead.`);const E=me(e.src),F=(0,o.useCallback)(((e,t)=>{b({type:"got-duration",durationInSeconds:t,src:e})}),[b]),T=(0,o.useCallback)((()=>{}),[]),R=g[ae(E)]??g[ae(e.src)];if(p&&void 0!==R){if(!Number.isFinite(R))return(0,n.jsx)(pt,{...w,ref:t,_remotionInternalNativeLoopPassed:!0});const o=R*v;return(0,n.jsx)(de,{durationInFrames:se({endAt:i,mediaDuration:o,playbackRate:e.playbackRate??1,startFrom:r}),layout:"none",name:a,children:(0,n.jsx)(pt,{...w,ref:t,_remotionInternalNativeLoopPassed:!0})})}if("undefined"!==typeof r||"undefined"!==typeof i){pe(r,i);const e=r??0,o=i??1/0;return(0,n.jsx)(ne,{layout:"none",from:0-e,showInTimeline:!1,durationInFrames:o,name:a,children:(0,n.jsx)(pt,{pauseWhenBuffering:s??!1,...f,ref:t})})}return fe(e,"Video"),y.isRendering?(0,n.jsx)(ft,{onDuration:F,onVideoFrame:T??null,...f,ref:t}):(0,n.jsx)(dt,{onlyWarnForMediaSeekingError:!1,...f,ref:t,onVideoFrame:null,pauseWhenBuffering:s??!1,onDuration:F,_remotionInternalStack:u??null,_remotionInternalNativeLoopPassed:d??!1,_remotionDebugSeeking:h??!1,showInTimeline:c??!0,onAutoPlayError:m??void 0})}));f(pt),(()=>{if("undefined"===typeof globalThis)return;const e=()=>{globalThis.remotion_imported=v,"undefined"!==typeof window&&(window.remotion_imported=v)},t=globalThis.remotion_imported||"undefined"!==typeof window&&window.remotion_imported;if(t){if(t===v)return;if("string"===typeof t&&t.includes("webcodecs"))return void e();throw new TypeError(`\ud83d\udea8 Multiple versions of Remotion detected: ${[v,"string"===typeof t?t:"an older version"].filter(w).join(" and ")}. This will cause things to break in an unexpected way.\nCheck that all your Remotion packages are on the same version. If your dependencies depend on Remotion, make them peer dependencies. You can also run \`npx remotion versions\` from your terminal to see which versions are mismatching.`)}e()})();var ht=new Proxy({},{get:(e,t)=>"Bundling"===t||"Rendering"===t||"Log"===t||"Puppeteer"===t||"Output"===t?ht:()=>{console.warn("\u26a0\ufe0f The CLI configuration has been extracted from Remotion Core."),console.warn("Update the import from the config file:"),console.warn(),console.warn("- Delete:"),console.warn('import {Config} from "remotion";'),console.warn("+ Replace:"),console.warn('import {Config} from "@remotion/cli/config";'),console.warn(),console.warn("For more information, see https://www.remotion.dev/docs/4-0-migration."),process.exit(1)}});f(ne)}}]);
|