whatmore-react-assets 1.0.1371 → 1.0.1372

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whatmore-react-assets",
3
- "version": "1.0.1371",
3
+ "version": "1.0.1372",
4
4
  "description": "public repo for all whatmore js and css assets",
5
5
  "main": "whatmore.js",
6
6
  "scripts": {
@@ -69,7 +69,7 @@
69
69
  0% {
70
70
  transform: translateY(100%);
71
71
  }
72
- `} 0.5s`;return(0,x.jsx)(s.Kq,{bg:"black",height:"100%",opacity:"100%",width:"100%",borderTopRadius:"xl",animation:w,justifyContent:"center",alignItems:"center",children:(0,x.jsxs)(s.xu,{width:"100%",height:"100%",children:[(0,x.jsx)(g.Ee,{width:"100%",height:"auto",src:(0,c.Zb8)(a)?d:(0,c.KM)(a),objectFit:"contain",borderTopRadius:"xl"}),(0,x.jsx)(s.Kq,{width:"100%",height:"100%",direction:"column",justifyContent:"flex-start",style:{position:"relative",zIndex:1,bottom:"90%"},className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",onClick:t=>{t.stopPropagation(),m(!1)},cursor:"pointer",padding:"4px",children:(0,x.jsx)(Kt.Z,{sx:{boxShadow:3,color:"white !important",fontSize:1.6*f,filter:"drop-shadow(0 0 5px black);"}})})})]})})}var qt=i(5630),Nt=i(6665);function Vt(t){var e;const[i,o]=(0,n.useState)(null),r=t.product;return(0,n.useEffect)((()=>{(0,lt.bN)(r).then((t=>{o(t.variants)}))}),[]),null==i?(0,x.jsx)(x.Fragment,{}):(0,x.jsx)("div",{style:{width:null!==(e=t.width)&&void 0!==e?e:"100%",borderRadius:"6px",height:1.5*t.height,backgroundColor:"white"},children:(0,x.jsxs)("form",{method:"post",action:"/cart/add","accept-charset":"UTF-8",class:"shopify-product-form",enctype:"multipart/form-data",is:"product-form",children:[(0,x.jsx)("input",{type:"hidden",name:"form_type",value:"product"}),(0,x.jsx)("input",{type:"hidden",name:"utf8",value:"\u2713"}),(0,x.jsx)("input",{type:"hidden",name:"id",value:t.variantId}),(0,x.jsx)("input",{type:"hidden",value:t.product.product_link,name:"productUrl"}),(0,x.jsx)("div",{class:"shiprocket-headless","data-type":"product"}),(0,x.jsx)("textarea",{"data-variant-json":"",class:"hide","aria-hidden":"true","aria-label":"Product JSON",children:JSON.stringify(i).toString()})]})})}function Zt(t){const e=t.product;return(0,x.jsx)(Vt,{product:e,variantId:t.variantId,height:t.height,width:t.width})}function Ht(t){var e,i,o,r,a,d,h,p;const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[g]=(0,u.j1)("whatmoreShopId"),[f]=(0,u.j1)("whatmorePrimaryFont"),[w]=(0,u.j1)("whatmoreSecondaryColor"),[j]=(0,u.j1)("websiteLanguage"),y=(0,u.MO)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:C,whatmoreUserInfo:b}=(0,n.useContext)(V.I),[S,k]=(0,n.useState)(!1),{closeClickComponent:_}=(0,n.useContext)(yi),[T,F]=(0,n.useState)(!1),E=t.FONT_SIZE,P=t.data,O=t.event,z=t.selectedVariantId,L=t.product,D=t.itemQuantity,M=t.PRODUCT_TILE_WIDTH,R=t.cartItemCount,A=t.addToCartFlag,K=t.setAddToCartFlag,W=t.soldOutFlag,Z=t.setSoldOutFlag,H=C.landingLocationType,U=C.templateType,B=(0,mt.NY)(H)+(0,mt.dS)(U)+(null!==O&&void 0!==O&&O.isRelatedEvent?"R":"E")+"_"+(null===O||void 0===O?void 0:O.event_id);const Y=t=>{var e,i;(function(t,e){v||m||(async()=>{(0,l.$L)(t,e)})()}(O,L),"buy-now"==t)&&(!function(t,e,i,n,o,r,l){"shopify"==i?(0,lt.bj)(t,e,n,o,r,l):(0,rt.rY)(t,e,n)}(void 0!==z?z:null===P||void 0===P||null===(e=P.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.id,D,(0,c.Ipo)(g),g,B,null===O||void 0===O?void 0:O.location,null===b||void 0===b?void 0:b.userType),(0,q.GF)({userInteractionType:N.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:C,event:O,productList:[L],ctaList:O.cta}));"view-more"==t&&((0,c.lj5)(g)?window.location.href=L.product_link+"?"+(0,c.awP)(g)+"&"+(0,c.n9s)(g)+"&"+(0,c.vaK)(g)+((0,c.C0m)(g)?"&currency="+L.currency:""):window.location.href=L.product_link+((0,c.C0m)(g)?"?currency="+L.currency:""))};return(0,x.jsxs)(s.Kq,{boxShadow:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.2) 0px 4px 6px -2px",position:t.position,bg:"27951333450"==g?"#fff":"#D3D3D3",borderRadius:"10px",bottom:"10px",left:"50%",zIndex:"1",transform:"translateX(-50%)",direction:"row",width:"95%",paddingX:"20px",paddingTop:"15px",paddingBottom:"15px",spacing:"15px",fontSize:.9*E,children:[" ",W?(0,x.jsx)($.zx,{width:"90%",bg:"#252324",variant:"outline",opacity:4,_hover:{bg:"#252324"},height:2.5*E,disabled:!0,sx:{borderRadius:"round"==y?"5px":"0px",borderWidth:(0,c.alU)(g),borderColor:(0,c.qPe)(g)},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:"white !important",fontFamily:f+" !important"},children:"Sold Out"})}):(0,x.jsxs)(s.Kq,{direction:"vertical"==(0,c.rc3)(g)?"column":"row",width:"100%",spacing:"15px",fontSize:.9*E,justifyContent:"center",children:[(0,c.$bv)(g)?(0,x.jsx)($.zx,{width:"fit-content",height:2.5*E,onClick:async t=>{var e,i;t.stopPropagation(),k(!0),function(t,e,i){v||m||(async()=>{(0,l.JX)(t,e,i)})()}(O,L,D),(0,q.GF)({userInteractionType:N.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:C,event:O,productList:[L],ctaList:O.cta});const n=null!==z&&void 0!==z?z:null===P||void 0===P||null===(e=P.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.id;if(!n)return console.log("ERROR! No variants available."),void k(!1);st(n,D,(0,c.Ipo)(g),g,O,L,B,null===O||void 0===O?void 0:O.location,null===b||void 0===b?void 0:b.userType).then((t=>{if(!t.ok)throw new Error(t.status);return t.json()})).then((t=>(k(!1),K(!0),(0,u.bU)("whatmoreAddedToCart",!0),(0,c.kad)(g)&&(v||(async()=>{await(0,lt.Mj)().then((t=>t.json())).catch((t=>{console.error("Whatmore :: Error while fetching cart_token for initiateOrderTrackingEvent.",t)}))})()),t))).catch((t=>{k(!1),Z(!0),console.error("Error:",t)}))},sx:{minWidth:"50%",paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:"#343434"===(0,c.hmr)(g)?w+" !important":(0,c.hmr)(g)+" !important",borderRadius:"round"==y?"27951333450"==g?"50px":"5px":"0px",borderWidth:(0,c.p5R)(g),borderColor:"#343434"===(0,c.hmr)(g)?w:(0,c.hmr)(g),_hover:{backgroundColor:"transparent !important",borderWidth:(0,c.p5R)(g),borderColor:"#343434"===(0,c.yxc)(g)?w:(0,c.yxc)(g)}},children:S?(0,x.jsx)(qt.$,{display:"flex !important",color:"white"}):(0,x.jsx)(s.xv,{fontWeight:"extrabold !important",sx:{color:(0,c.KCy)(g)+" !important",fontFamily:f+" !important"},fontSize:E+"px !important",children:"ADD TO CART"!=(0,c.tan)(g)?(0,c.tan)(g):null!==(e=null===Q||void 0===Q||null===(i=Q[j])||void 0===i?void 0:i.add_to_cart)&&void 0!==e?e:(0,c.tan)(g)})}):(0,x.jsx)(x.Fragment,{}),(0,c.cDD)(g)?(0,x.jsx)(x.Fragment,{children:(0,c.H$w)(g)?(0,x.jsx)(Zt,{variantId:void 0!==z?z:null===P||void 0===P||null===(o=P.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.id,product:L,height:2.5*E,width:"90%",fontSize:E,fontFamily:f}):(0,x.jsx)(x.Fragment,{children:(0,c.Stj)(g)?(0,x.jsx)($.zx,{variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*E,onClick:()=>Y("view-more"),sx:{width:"fit-content",minWidth:"50%",paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:(0,c.IIW)(g)+" !important",borderRadius:"round"==y?"27951333450"==g?"50px":"5px":"0px",borderWidth:(0,c.alU)(g),borderColor:(0,c.qPe)(g)},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:"#343434"===(0,c.iKW)(g)?w+" !important":(0,c.iKW)(g)+" !important",fontFamily:f+" !important"},fontSize:E,children:"MORE INFO"!=(0,c.Z59)(g)?(0,c.Z59)(g):null!==(a=null===Q||void 0===Q||null===(d=Q[j])||void 0===d?void 0:d.more_info)&&void 0!==a?a:(0,c.Z59)(g)})}):(0,x.jsx)($.zx,{variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*E,onClick:t=>{Y("buy-now")},sx:{width:"fit-content",minWidth:"50%",paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:(0,c.IIW)(g)+" !important",borderRadius:"round"==y?"27951333450"==g?"50px":"5px":"0px",borderWidth:(0,c.p5R)(g),borderColor:"#343434"===(0,c.yxc)(g)?w:(0,c.yxc)(g),_hover:{backgroundColor:"transparent !important"}},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold !important",sx:{color:"#343434"===(0,c.iKW)(g)?w+" !important":(0,c.iKW)(g)+" !important",fontFamily:f+" !important"},fontSize:E+"px !important",children:"BUY NOW"!=(0,c.ZuH)(g)?(0,c.ZuH)(g):null!==(h=null===Q||void 0===Q||null===(p=Q[j])||void 0===p?void 0:p.buy_now)&&void 0!==h?h:(0,c.ZuH)(g)})})})}):(0,x.jsx)(x.Fragment,{})]}),(0,x.jsx)(x.Fragment,{children:(0,c.$bv)(g)?(0,x.jsx)(x.Fragment,{children:T?(0,x.jsx)(s.kC,{width:"10%",spacing:"0",right:0,children:(0,x.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,x.jsx)(Nt.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*E}})})}):(0,x.jsxs)(s.kC,{animation:A?I:"none",onAnimationEnd:()=>K(!1),width:"10%",spacing:"0",right:0,onClick:()=>{"do_nothing"!==(0,c.v9M)(g)&&("go_to_cart_page"!==(0,c.v9M)(g)?(F(!0),function(t){"open_cart_slider"!==(0,c.v9M)(t)||null!==_&&_()}(g)):ct((0,c.Ipo)(g),g))},cursor:"pointer",children:[(0,x.jsx)(X.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*E}}),R>0?(0,x.jsx)(s.Cd,{padding:"2px",bg:"white",size:1.1*E,top:.03*-M,verticalAlign:"top",position:"relative",left:.11*-M,zIndex:"1",children:(0,x.jsx)(s.xv,{sx:{color:"black !important",fontFamily:f+" !important"},fontWeight:"bold !important",fontSize:.7*E+"px !important",children:R})}):(0,x.jsx)(x.Fragment,{})]})}):(0,x.jsx)(x.Fragment,{})})]})}function Ut(t){const[e]=(0,u.j1)("whatmorePrimaryFont"),i=((0,u.MO)("whatmoreShopId"),t.setOpenShopNow),n=t.FONT_SIZE,o=t.setLockSwiper;return(0,x.jsxs)(s.kC,{justifyContent:"center",paddingTop:"10px",paddingBottom:"8px",width:"100%",children:[(0,x.jsx)(s.kC,{width:"10%",display:"flex !important"}),(0,x.jsx)(s.kC,{width:"90%",justifyContent:"center",children:(0,x.jsx)(s.xv,{align:"center",fontSize:1.25*n,fontWeight:"semibold",sx:{color:"black !important",fontFamily:e+" !important"},as:"b",children:"Shop Now"})}),(0,x.jsx)(s.kC,{justifyContent:"center",width:"10%",alignItems:"center",onClick:t=>{t.stopPropagation(),i(!1),o(!1)},cursor:"pointer",children:(0,x.jsx)(Kt.Z,{sx:{boxShadow:3,color:"black !important",fontSize:1.2*n,filter:"drop-shadow(0 0 5px black);"}})})]})}function Bt(t){var e;const[i]=(0,u.j1)("whatmorePrimaryFont"),n=((0,u.MO)("whatmoreShopId"),t.FONT_SIZE),o=t.data;return(0,x.jsxs)(s.Kq,{direction:"column",paddingX:"20px",height:"fit-content",children:[(0,x.jsx)(s.Kq,{children:(0,x.jsx)(s.xv,{fontSize:n+"px !important",fontWeight:"bold !important",justifyContent:"center",sx:{color:"black !important",fontFamily:i+" !important"},children:"Description"})}),(0,x.jsx)(s.Kq,{children:(0,x.jsx)(s.xu,{overflowY:"auto",scrollBehavior:"smooth",sx:{"::-webkit-scrollbar":{display:"none"}},children:(0,x.jsx)(s.xv,{fontSize:.8*n+"px !important",justifyContent:"normal",fontWeight:"normal !important",dangerouslySetInnerHTML:{__html:(r=null!==(e=null===o||void 0===o?void 0:o.description)&&void 0!==e?e:null===o||void 0===o?void 0:o.body_html,r.replace(/style="[^"]*color[^"]*"/gi,""))},sx:{fontFamily:i+" !important",lineHeight:"140% !important"}})})})]});var r}const Yt=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{color:"black",paddingTop:"2px"},children:(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-box-arrow-up-right",viewBox:"0 0 16 16",style:{stroke:"black",strokeWidth:"0.4"},children:[(0,x.jsx)("path",{"fill-rule":"evenodd",d:"M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5"}),(0,x.jsx)("path",{"fill-rule":"evenodd",d:"M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0z"})]})})};function Xt(t){var e,i,o;const[r,l]=(0,n.useState)(t.product),[a]=(0,u.j1)("whatmorePrimaryFont"),[d]=(0,u.j1)("whatmoreShopId"),[h]=(0,u.j1)("whatmoreSecondaryColor");(0,n.useEffect)((()=>{(0,c.N8M)(d)&&(0,xt.Rb)(r,(0,c.Ipo)(d),d).then((t=>{l(t)}))}),[]);const p=t.FONT_SIZE,v=t.data,m=t.itemPrice;let g,f,w;var j,y,C;"STRDOIDF6O7"==d&&(g=null===v||void 0===v||null===(j=v.variants)||void 0===j?void 0:j.find((e=>e.id==t.selectedVariantId)),f=null===(y=g)||void 0===y?void 0:y.title,w=null===(C=g)||void 0===C?void 0:C.productLink);const b=null===v||void 0===v||null===(e=v.variants)||void 0===e||null===(i=e.find((e=>e.id==t.selectedVariantId)))||void 0===i?void 0:i.compare_at_price,S=b&&0!=b&&b>m?Math.round((b-m)/b*100):NaN;return(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)(s.kC,{direction:"column",paddingLeft:"20px",paddingRight:"20px",paddingY:"5px",children:[(0,x.jsx)(s.rU,{href:function(t){return(0,c.lj5)(d)?("STRDOIDF6O7"==d?w:t.product_link)+"?"+(0,c.awP)(d)+"&"+(0,c.n9s)(d)+"&"+(0,c.vaK)(d)+((0,c.C0m)(d)?"&currency="+t.currency:""):("STRDOIDF6O7"==d?w:t.product_link)+((0,c.C0m)(d)?"?currency="+t.currency:"")}(r),color:"white",width:"fit-content",children:(0,x.jsxs)(s.kC,{sx:{display:"flex",gap:"6px"},children:[(0,x.jsx)(s.xv,{isTruncated:!0,noOfLines:2,padding:"2px",fontSize:p,sx:{color:"black !important",lineHeight:"140% !important",fontFamily:a+" !important"},as:"b",children:"STRDOIDF6O7"==d&&null!==(o=f)&&void 0!==o?o:null===v||void 0===v?void 0:v.title}),(0,x.jsx)(Yt,{iconSize:1.1*p})]})}),(0,x.jsxs)(s.kC,{direction:"row",gap:"6px",paddingTop:"4px",children:[b&&b>m&&(0,x.jsx)(s.xv,{as:"s",padding:"2px",fontSize:1.2*p,fontWeight:"semibold",sx:{color:"gray !important",fontFamily:a+" !important"},children:(0,xt.jx)(parseFloat(b)," ",d,r.currency,!0)}),(0,x.jsx)(s.xv,{as:"b",padding:"2px",fontSize:1.2*p,fontWeight:"semibold !important",sx:{color:"black !important",fontFamily:a+" !important"},children:(0,xt.jx)(parseFloat(m)," ",d,r.currency,!0)}),!isNaN(S)&&0!=S&&(0,x.jsx)(s.xu,{display:"flex",backgroundColor:"green"==(0,c.ZJm)(d)?"#343434"==h?(0,c.ZJm)(d):h:(0,c.ZJm)(d),alignItems:"center",borderRadius:"4px",width:"fit-content",px:"6px",children:(0,x.jsx)(s.xv,{fontSize:(0,c.sTg)(d)?"14px !important":1.1*p,fontWeight:"normal !important",sx:{color:(0,c.mso)(d)+" !important",fontFamily:a+" !important"},children:(0,c.sTg)(d)?`${S}% off`:`Save ${(0,xt.jx)(parseFloat(b/100-m/100)," ",d,r.currency)}`})})]})]})})}function Gt(t){var e,i;const[o]=(0,u.j1)("whatmorePrimaryFont"),[r]=(0,u.j1)("whatmoreShopId"),{setShowOptionsChart:l}=(0,n.useContext)(re),[a,d]=(0,n.useState)({}),h=(0,u.MO)("whatmoreSecondaryColorShade300"),p=t.setSelectedColor,v=t.selectOptionFirstHandler,m=t.selectOptionSecondHandler,f=t.selectOptionThirdHandler,w=t.FONT_SIZE,j=t.data,y=(t,e,i)=>{if(2==i)d((i=>({...i,[t]:e})));else if(1==i)d((i=>{var n,o,r,l;return{...i,[t]:e,[null===j||void 0===j||null===(n=j.options)||void 0===n||null===(o=n[2])||void 0===o?void 0:o.name]:null===j||void 0===j||null===(r=j.variants)||void 0===r||null===(l=r.find((t=>(null===t||void 0===t?void 0:t.option2)==e)))||void 0===l?void 0:l.option3}}));else{var n,o;const i=null===j||void 0===j||null===(n=j.variants)||void 0===n||null===(o=n.find((t=>(null===t||void 0===t?void 0:t.option1)==e)))||void 0===o?void 0:o.option2;d((n=>{var o,r,l,a,d,s,c,u;return{...n,[null===j||void 0===j||null===(o=j.options)||void 0===o||null===(r=o[1])||void 0===r?void 0:r.name]:null===j||void 0===j||null===(l=j.variants)||void 0===l||null===(a=l.find((t=>(null===t||void 0===t?void 0:t.option1)==e)))||void 0===a?void 0:a.option2,[null===j||void 0===j||null===(d=j.options)||void 0===d||null===(s=d[2])||void 0===s?void 0:s.name]:null===j||void 0===j||null===(c=j.variants)||void 0===c||null===(u=c.find((t=>(null===t||void 0===t?void 0:t.option2)==i)))||void 0===u?void 0:u.option3,[t]:e}}))}};(0,n.useEffect)((()=>{d((t=>{var e,i,n,o,r,l,a,d,s,c,u,h;return{...t,[null===j||void 0===j||null===(e=j.options)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.name]:null===j||void 0===j||null===(n=j.variants)||void 0===n||null===(o=n.find((t=>{var e,i,n;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(i=e[0])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option1))&&(null===t||void 0===t?void 0:t.available)})))||void 0===o?void 0:o.option1,[null===j||void 0===j||null===(r=j.options)||void 0===r||null===(l=r[1])||void 0===l?void 0:l.name]:null===j||void 0===j||null===(a=j.variants)||void 0===a||null===(d=a.find((t=>{var e,i,n;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(i=e[1])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option2))&&(null===t||void 0===t?void 0:t.available)})))||void 0===d?void 0:d.option2,[null===j||void 0===j||null===(s=j.options)||void 0===s||null===(c=s[2])||void 0===c?void 0:c.name]:null===j||void 0===j||null===(u=j.variants)||void 0===u||null===(h=u.find((t=>{var e,i,n;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(i=e[2])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option3))&&(null===t||void 0===t?void 0:t.available)})))||void 0===h?void 0:h.option3}}))}),[]);return(0,x.jsx)(s.kC,{direction:"row",paddingLeft:"20px",paddingRight:"20px",paddingY:"10px",children:(null===j||void 0===j||null===(e=j.options)||void 0===e?void 0:e.length)>0&&(0,x.jsx)(s.kC,{direction:"column",width:"100%",gap:"4px",children:null===j||void 0===j||null===(i=j.options)||void 0===i?void 0:i.map(((e,i)=>{var n,d,u,C,b,S;return(0,x.jsx)(x.Fragment,{children:"mlveda_country"!==(null===e||void 0===e?void 0:e.name)&&((null===e||void 0===e||null===(n=e.values)||void 0===n?void 0:n.length)>1||"Colour"===(null===e||void 0===e?void 0:e.name)||(null===e||void 0===e||null===(d=e.name)||void 0===d?void 0:d.toLowerCase().includes("color"))||1==(null===e||void 0===e||null===(u=e.values)||void 0===u?void 0:u.length)&&(null===e||void 0===e?void 0:e.position)>1&&(null===e||void 0===e?void 0:e.position)==(null===j||void 0===j||null===(C=j.options)||void 0===C?void 0:C.length))&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(s.kC,{justifyContent:"space-between",alignItems:"center",children:[(0,x.jsx)(s.xv,{fontSize:1*w+"px !important",sx:{color:"black !important",fontFamily:o+" !important",fontWeight:"bold !important"},children:null===e||void 0===e?void 0:e.name}),"Size"===e.name&&(0,c.Ip6)(r)?(0,x.jsx)(s.kC,{marginTop:"4px",whiteSpace:"nowrap",cursor:"pointer",children:(0,x.jsx)(s.xv,{fontSize:.7*w,as:"u",sx:{color:"black !important",fontFamily:o+" !important"},onClick:()=>{null!==l&&l(!0)},children:(0,c.meb)(r)})}):(0,x.jsx)(x.Fragment,{})]}),(0,x.jsx)(s.Ug,{spacing:0,flexWrap:"wrap",alignContent:"flex-start",alignItems:"center",justifyContent:"flex-start",children:null===e||void 0===e||null===(b=e.values)||void 0===b?void 0:b.map((n=>{var l,d,u,C,b,S,I,k,_;const T=((t,e)=>{var i,n,o,r,l,d,s,c,u,h;if(null===j||void 0===j||null===(i=j.options)||void 0===i||!i.length)return!1;const p=null===j||void 0===j||null===(n=j.options)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.name,v=null===j||void 0===j||null===(r=j.options)||void 0===r||null===(l=r[1])||void 0===l?void 0:l.name;switch(null===j||void 0===j||null===(d=j.options)||void 0===d||null===(s=d[2])||void 0===s||s.name,null===j||void 0===j||null===(c=j.options)||void 0===c?void 0:c.length){case 1:return null===j||void 0===j||null===(u=j.variants)||void 0===u?void 0:u.some((e=>e.option1===t&&e.available));case 2:var x;return 0===e?null===j||void 0===j||null===(x=j.variants)||void 0===x?void 0:x.some((e=>e.option1===t&&e.available)):null===j||void 0===j||null===(h=j.variants)||void 0===h?void 0:h.some((e=>e.option2===t&&e.option1===a[p]&&e.available));case 3:var m,g,f;if(0===e)return null===j||void 0===j||null===(m=j.variants)||void 0===m?void 0:m.some((e=>e.option1===t&&e.available));if(1===e)return null===j||void 0===j||null===(g=j.variants)||void 0===g?void 0:g.some((e=>e.option2===t&&e.option1===a[p]&&e.available));if(2===e)return null===j||void 0===j||null===(f=j.variants)||void 0===f?void 0:f.some((e=>e.option3===t&&e.option1===a[p]&&e.option2===a[v]&&e.available));default:return!1}})(n,i),F=0==i||j.variants.find((t=>{var e,o;return t[`option${i}`]==(null===(e=Object.entries(a))||void 0===e||null===(o=e[i-1])||void 0===o?void 0:o[1])&&t[`option${i+1}`]==n}));return("Colour"===(null===e||void 0===e?void 0:e.name)||null!==e&&void 0!==e&&e.name.toLowerCase().includes("color"))&&F&&((null===t||void 0===t||null===(l=t.finalArr)||void 0===l?void 0:l.length)>0&&(null===t||void 0===t||null===(d=t.finalArr)||void 0===d||!d.includes(null))||(null===t||void 0===t||null===(u=t.finalArrExternal)||void 0===u?void 0:u.length)>0)?(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(s.kC,{paddingBottom:"8px",px:"2px",paddingRight:"8px",children:(0,x.jsx)(s.xu,{boxShadow:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px",borderRadius:(0,c.lmH)(r),size:"sm",border:a[null===e||void 0===e?void 0:e.name]===n?`2px solid ${(0,c.ua_)(r)} !important`:"",cursor:"pointer",width:"fit-content !important",onClick:()=>{y(null===e||void 0===e?void 0:e.name,n,i),p(n),0===i&&v(n),1===i&&m(n),2===i&&f(n)},children:(0,x.jsx)(g.Ee,{padding:"2px",borderRadius:(0,c.lmH)(r),width:"58px",height:"58px",src:(0,pt.s)(null!==(C=null===t||void 0===t||null===(b=t.finalArr)||void 0===b||null===(S=b.find((t=>(null===t||void 0===t?void 0:t.color)==n)))||void 0===S?void 0:S.src)&&void 0!==C?C:null===t||void 0===t||null===(I=t.finalArrExternal)||void 0===I||null===(k=I.find((t=>(null===t||void 0===t?void 0:t.color)==n)))||void 0===k?void 0:k.optionsrc,"?width=400&height=400")})})},n)}):F&&(0,x.jsx)(s.kC,{paddingBottom:"8px",paddingRight:"8px",children:(0,x.jsx)($.zx,{isDisabled:!T,size:"sm",px:"8px !important",bg:a[null===e||void 0===e?void 0:e.name]===n&&T?(null!==(_=(0,c.CPm)(r))&&void 0!==_?_:h)+" !important":(0,c.bC3)(r)+" !important",width:"fit-content !important",onClick:()=>{"76408193304"!=r||"Size"!=(null===e||void 0===e?void 0:e.name)||"Customize"!=n?(y(null===e||void 0===e?void 0:e.name,n,i),0===i&&v(n),1===i&&m(n),2===i&&f(n)):window.location.href=t.product.product_link},children:(0,x.jsx)(s.xv,{as:T?"p":"s",textDecoration:T?"none":"line-through",fontSize:.9*w+"px !important",sx:{fontFamily:o+" !important",fontWeight:"normal !important",color:a[null===e||void 0===e?void 0:e.name]===n&&T?(0,c.cY_)(r)+" !important":(0,c.FbM)(r)+" !important"},children:n})})},n)}))}),i===(null===j||void 0===j||null===(S=j.options)||void 0===S?void 0:S.length)-1&&(0,x.jsx)(s.M5,{paddingTop:"8px",width:"100%",children:(0,x.jsx)(s.iz,{color:t.dividerColor,size:"xs"})})]})})}))})})}var $t=i(8782);function Qt(t){var e,i,o,r,l,a,d,p,v,m,f,w,j,y,C,S,I,k,_,T,F;const[E,P,O,z]=(0,h.Z)();var L=.4*z*.8,D=L*(16/9)*.6*.8;const M=1.1*L,A=M*(16/9)*.8;var K=.12*L;const[W,q]=(0,n.useState)(!1),N=t.data,V=t.event,Z=t.product,H=t.setOpenShopNow,U=t.setLockSwiper,[B]=(0,u.j1)("whatmoreEmbedAppUseVariant"),[Y,X]=(0,n.useState)((()=>{if("true"===B)return ee(N,Z.client_product_id)})),[G,$]=(0,n.useState)((()=>{if("true"===B)return ie(N,Z.client_product_id)})),[Q,J]=(0,n.useState)((()=>{if("true"===B)return ne(N,Z.client_product_id)})),[tt,et]=(0,n.useState)(),[it,nt]=(0,n.useState)(1),[ot,at]=(0,n.useState)(),[dt,st]=(0,n.useState)(0),[ct,ut]=(0,n.useState)(!1),[ht,vt]=(0,n.useState)(!1),[xt,mt]=(0,n.useState)(Z.thumbnail_image),gt=(0,u.MO)("whatmoreUITheme"),ft=(0,u.MO)("whatmoreShopId"),wt=(0,n.useCallback)((t=>{X(t)}),[]),jt=(0,n.useCallback)((t=>{$(t)}),[]),yt=(0,n.useCallback)((t=>{J(t)}),[]);(0,n.useEffect)((()=>{var t,e;const i=Jt(N,Y,G,Q);et(null!==i&&void 0!==i?i:null===N||void 0===N||null===(t=N.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.id),at(te(N,i)),nt(1),vt(!1);const n=oe(N,i);null!==n&&mt(n)}),[Y,G,Q]),(0,n.useEffect)((()=>{var t,e;const i=void 0===tt?null===N||void 0===N||null===(t=N.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.price:te(N,tt);at(i*it)}),[it]),(0,n.useEffect)((()=>{function t(t){const e=document.getElementById("whatmore-shopnow-view"),i=document.getElementById("whatmore-size-chart");i&&i.contains(t.target)||!e||e.contains(t.target)||(H(!1),U(!1))}function e(t){t.stopPropagation(),i.scrollTop+=t.deltaY}document.addEventListener("click",t);const i=document.getElementById("whatmore-shopnow-view");return null===i||void 0===i||i.addEventListener("wheel",e),()=>{document.removeEventListener("click",t),i.removeEventListener("wheel",e)}}),[]),(0,n.useEffect)((()=>{const t=async function(t,e){return"shopify"==t?(0,lt.Bi)():(0,rt.OM)(e)}((0,c.Ipo)(ft),ft);t.then((t=>t.json())).then((t=>{st(t.item_count)})).catch((t=>{console.error("Cart Add Error:",t)}))}),[ct]);const Ct=`${b.F4`
72
+ `} 0.5s`;return(0,x.jsx)(s.Kq,{bg:"black",height:"100%",opacity:"100%",width:"100%",borderTopRadius:"xl",animation:w,justifyContent:"center",alignItems:"center",children:(0,x.jsxs)(s.xu,{width:"100%",height:"100%",children:[(0,x.jsx)(g.Ee,{width:"100%",height:"auto",src:(0,c.Zb8)(a)?d:(0,c.KM)(a),objectFit:"contain",borderTopRadius:"xl"}),(0,x.jsx)(s.Kq,{width:"100%",height:"100%",direction:"column",justifyContent:"flex-start",style:{position:"relative",zIndex:1,bottom:"90%"},className:"whatmore-ios-css-relative-fix",children:(0,x.jsx)(s.Kq,{direction:"row",width:"100%",height:"fit-content",justifyContent:"flex-end",alignItems:"center",onClick:t=>{t.stopPropagation(),m(!1)},cursor:"pointer",padding:"4px",children:(0,x.jsx)(Kt.Z,{sx:{boxShadow:3,color:"white !important",fontSize:1.6*f,filter:"drop-shadow(0 0 5px black);"}})})})]})})}var qt=i(5630),Nt=i(6665);function Vt(t){var e;const[i,o]=(0,n.useState)(null),r=t.product;return(0,n.useEffect)((()=>{(0,lt.bN)(r).then((t=>{o(t.variants)}))}),[]),null==i?(0,x.jsx)(x.Fragment,{}):(0,x.jsx)("div",{style:{width:null!==(e=t.width)&&void 0!==e?e:"100%",borderRadius:"6px",height:1.5*t.height,backgroundColor:"white"},children:(0,x.jsxs)("form",{method:"post",action:"/cart/add","accept-charset":"UTF-8",class:"shopify-product-form",enctype:"multipart/form-data",is:"product-form",children:[(0,x.jsx)("input",{type:"hidden",name:"form_type",value:"product"}),(0,x.jsx)("input",{type:"hidden",name:"utf8",value:"\u2713"}),(0,x.jsx)("input",{type:"hidden",name:"id",value:t.variantId}),(0,x.jsx)("input",{type:"hidden",value:t.product.product_link,name:"productUrl"}),(0,x.jsx)("div",{class:"shiprocket-headless","data-type":"product"}),(0,x.jsx)("textarea",{"data-variant-json":"",class:"hide","aria-hidden":"true","aria-label":"Product JSON",children:JSON.stringify(i).toString()})]})})}function Zt(t){const e=t.product;return(0,x.jsx)(Vt,{product:e,variantId:t.variantId,height:t.height,width:t.width})}function Ht(t){var e,i,o,r,a,d,h,p;const[v]=(0,u.j1)("isInDesignMode"),[m]=(0,u.j1)("isDemoBrand"),[g]=(0,u.j1)("whatmoreShopId"),[f]=(0,u.j1)("whatmorePrimaryFont"),[w]=(0,u.j1)("whatmoreSecondaryColor"),[j]=(0,u.j1)("websiteLanguage"),y=(0,u.MO)("whatmoreUITheme"),{whatmoreWidgetSourceDetails:C,whatmoreUserInfo:b}=(0,n.useContext)(V.I),[S,k]=(0,n.useState)(!1),{closeClickComponent:_}=(0,n.useContext)(yi),[T,F]=(0,n.useState)(!1),E=t.FONT_SIZE,P=t.data,O=t.event,z=t.selectedVariantId,L=t.product,D=t.itemQuantity,M=t.PRODUCT_TILE_WIDTH,R=t.cartItemCount,A=t.addToCartFlag,K=t.setAddToCartFlag,W=t.soldOutFlag,Z=t.setSoldOutFlag,H=C.landingLocationType,U=C.templateType,B=(0,mt.NY)(H)+(0,mt.dS)(U)+(null!==O&&void 0!==O&&O.isRelatedEvent?"R":"E")+"_"+(null===O||void 0===O?void 0:O.event_id);const Y=t=>{var e,i;(function(t,e){v||m||(async()=>{(0,l.$L)(t,e)})()}(O,L),"buy-now"==t)&&(!function(t,e,i,n,o,r,l){"shopify"==i?(0,lt.bj)(t,e,n,o,r,l):(0,rt.rY)(t,e,n)}(void 0!==z?z:null===P||void 0===P||null===(e=P.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.id,D,(0,c.Ipo)(g),g,B,null===O||void 0===O?void 0:O.location,null===b||void 0===b?void 0:b.userType),(0,q.GF)({userInteractionType:N.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:C,event:O,productList:[L],ctaList:O.cta}));"view-more"==t&&((0,c.lj5)(g)?window.location.href=L.product_link+"?"+(0,c.awP)(g)+"&"+(0,c.n9s)(g)+"&"+(0,c.vaK)(g)+((0,c.C0m)(g)?"&currency="+L.currency:""):window.location.href=L.product_link+((0,c.C0m)(g)?"?currency="+L.currency:""))};return(0,x.jsxs)(s.Kq,{boxShadow:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.2) 0px 4px 6px -2px",position:t.position,bg:"27951333450"==g?"#fff":"#D3D3D3",borderRadius:"10px",bottom:"10px",left:"50%",zIndex:"1",transform:"translateX(-50%)",direction:"row",width:"95%",paddingX:"20px",paddingTop:"15px",paddingBottom:"15px",spacing:"15px",fontSize:.9*E,children:[" ",W?(0,x.jsx)($.zx,{width:"90%",bg:"#252324",variant:"outline",opacity:4,_hover:{bg:"#252324"},height:2.5*E,disabled:!0,sx:{borderRadius:"round"==y?"5px":"0px",borderWidth:(0,c.alU)(g),borderColor:(0,c.qPe)(g)},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:"white !important",fontFamily:f+" !important"},children:"Sold Out"})}):(0,x.jsxs)(s.Kq,{direction:"vertical"==(0,c.rc3)(g)?"column":"row",width:"100%",spacing:"15px",fontSize:.9*E,justifyContent:"center",children:[(0,c.$bv)(g)?(0,x.jsx)($.zx,{width:"fit-content",height:2.5*E,onClick:async t=>{var e,i;t.stopPropagation(),k(!0),function(t,e,i){v||m||(async()=>{(0,l.JX)(t,e,i)})()}(O,L,D),(0,q.GF)({userInteractionType:N.K.SHOPNOW_ATC_CLICKED,widgetSourceDetails:C,event:O,productList:[L],ctaList:O.cta});const n=null!==z&&void 0!==z?z:null===P||void 0===P||null===(e=P.variants)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.id;if(!n)return console.log("ERROR! No variants available."),void k(!1);st(n,D,(0,c.Ipo)(g),g,O,L,B,null===O||void 0===O?void 0:O.location,null===b||void 0===b?void 0:b.userType).then((t=>{if(!t.ok)throw new Error(t.status);return t.json()})).then((t=>(k(!1),K(!0),(0,u.bU)("whatmoreAddedToCart",!0),(0,c.kad)(g)&&(v||(async()=>{await(0,lt.Mj)().then((t=>t.json())).catch((t=>{console.error("Whatmore :: Error while fetching cart_token for initiateOrderTrackingEvent.",t)}))})()),t))).catch((t=>{k(!1),Z(!0),console.error("Error:",t)}))},sx:{minWidth:"50%",paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:"#343434"===(0,c.hmr)(g)?w+" !important":(0,c.hmr)(g)+" !important",borderRadius:"round"==y?"27951333450"==g?"50px":"5px":"0px",borderWidth:(0,c.p5R)(g),borderColor:"#343434"===(0,c.hmr)(g)?w:(0,c.hmr)(g),_hover:{backgroundColor:"transparent !important",borderWidth:(0,c.p5R)(g),borderColor:"#343434"===(0,c.yxc)(g)?w:(0,c.yxc)(g)}},children:S?(0,x.jsx)(qt.$,{display:"flex !important",color:"white"}):(0,x.jsx)(s.xv,{fontWeight:"extrabold !important",sx:{color:(0,c.KCy)(g)+" !important",fontFamily:f+" !important"},fontSize:E+"px !important",children:"ADD TO CART"!=(0,c.tan)(g)?(0,c.tan)(g):null!==(e=null===Q||void 0===Q||null===(i=Q[j])||void 0===i?void 0:i.add_to_cart)&&void 0!==e?e:(0,c.tan)(g)})}):(0,x.jsx)(x.Fragment,{}),(0,c.cDD)(g)?(0,x.jsx)(x.Fragment,{children:(0,c.H$w)(g)?(0,x.jsx)(Zt,{variantId:void 0!==z?z:null===P||void 0===P||null===(o=P.variants)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.id,product:L,height:2.5*E,width:"90%",fontSize:E,fontFamily:f}):(0,x.jsx)(x.Fragment,{children:(0,c.Stj)(g)?(0,x.jsx)($.zx,{variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*E,onClick:()=>Y("view-more"),sx:{width:"fit-content",minWidth:"50%",paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:(0,c.IIW)(g)+" !important",borderRadius:"round"==y?"27951333450"==g?"50px":"5px":"0px",borderWidth:(0,c.alU)(g),borderColor:(0,c.qPe)(g)},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold",sx:{color:"#343434"===(0,c.iKW)(g)?w+" !important":(0,c.iKW)(g)+" !important",fontFamily:f+" !important"},fontSize:E,children:"MORE INFO"!=(0,c.Z59)(g)?(0,c.Z59)(g):null!==(a=null===Q||void 0===Q||null===(d=Q[j])||void 0===d?void 0:d.more_info)&&void 0!==a?a:(0,c.Z59)(g)})}):(0,x.jsx)($.zx,{variant:"outline",_hover:{bg:"#E9DCC9"},height:2.5*E,onClick:t=>{Y("buy-now")},sx:{width:"fit-content",minWidth:"50%",paddingLeft:"5px !important",paddingRight:"5px !important",backgroundColor:(0,c.IIW)(g)+" !important",borderRadius:"round"==y?"27951333450"==g?"50px":"5px":"0px",borderWidth:(0,c.p5R)(g),borderColor:"#343434"===(0,c.yxc)(g)?w:(0,c.yxc)(g),_hover:{backgroundColor:"transparent !important"}},children:(0,x.jsx)(s.xv,{fontWeight:"extrabold !important",sx:{color:"#343434"===(0,c.iKW)(g)?w+" !important":(0,c.iKW)(g)+" !important",fontFamily:f+" !important"},fontSize:E+"px !important",children:"BUY NOW"!=(0,c.ZuH)(g)?(0,c.ZuH)(g):null!==(h=null===Q||void 0===Q||null===(p=Q[j])||void 0===p?void 0:p.buy_now)&&void 0!==h?h:(0,c.ZuH)(g)})})})}):(0,x.jsx)(x.Fragment,{})]}),(0,x.jsx)(x.Fragment,{children:(0,c.$bv)(g)?(0,x.jsx)(x.Fragment,{children:T?(0,x.jsx)(s.kC,{width:"10%",spacing:"0",right:0,children:(0,x.jsx)("div",{className:"whatmore-rotate-indefinitely",children:(0,x.jsx)(Nt.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*E}})})}):(0,x.jsxs)(s.kC,{animation:A?I:"none",onAnimationEnd:()=>K(!1),width:"10%",spacing:"0",right:0,onClick:()=>{"do_nothing"!==(0,c.v9M)(g)&&("go_to_cart_page"!==(0,c.v9M)(g)?(F(!0),function(t){"open_cart_slider"!==(0,c.v9M)(t)||null!==_&&_()}(g)):ct((0,c.Ipo)(g),g))},cursor:"pointer",children:[(0,x.jsx)(X.Z,{sx:{filter:"drop-shadow(0 0 15px black);",color:"#F5F5F5",fontSize:2.5*E}}),R>0?(0,x.jsx)(s.Cd,{padding:"2px",bg:"white",size:1.1*E,top:.03*-M,verticalAlign:"top",position:"relative",left:.11*-M,zIndex:"1",children:(0,x.jsx)(s.xv,{sx:{color:"black !important",fontFamily:f+" !important"},fontWeight:"bold !important",fontSize:.7*E+"px !important",children:R})}):(0,x.jsx)(x.Fragment,{})]})}):(0,x.jsx)(x.Fragment,{})})]})}function Ut(t){const[e]=(0,u.j1)("whatmorePrimaryFont"),i=((0,u.MO)("whatmoreShopId"),t.setOpenShopNow),n=t.FONT_SIZE,o=t.setLockSwiper;return(0,x.jsxs)(s.kC,{justifyContent:"center",paddingTop:"10px",paddingBottom:"8px",width:"100%",children:[(0,x.jsx)(s.kC,{width:"10%",display:"flex !important"}),(0,x.jsx)(s.kC,{width:"90%",justifyContent:"center",children:(0,x.jsx)(s.xv,{align:"center",fontSize:1.25*n,fontWeight:"semibold",sx:{color:"black !important",fontFamily:e+" !important"},as:"b",children:"Shop Now"})}),(0,x.jsx)(s.kC,{justifyContent:"center",width:"10%",alignItems:"center",onClick:t=>{t.stopPropagation(),i(!1),o(!1)},cursor:"pointer",children:(0,x.jsx)(Kt.Z,{sx:{boxShadow:3,color:"black !important",fontSize:1.2*n,filter:"drop-shadow(0 0 5px black);"}})})]})}function Bt(t){var e;const[i]=(0,u.j1)("whatmorePrimaryFont"),n=((0,u.MO)("whatmoreShopId"),t.FONT_SIZE),o=t.data;return(0,x.jsxs)(s.Kq,{direction:"column",paddingX:"20px",height:"fit-content",children:[(0,x.jsx)(s.Kq,{children:(0,x.jsx)(s.xv,{fontSize:n+"px !important",fontWeight:"bold !important",justifyContent:"center",sx:{color:"black !important",fontFamily:i+" !important"},children:"Description"})}),(0,x.jsx)(s.Kq,{children:(0,x.jsx)(s.xu,{overflowY:"auto",scrollBehavior:"smooth",sx:{"::-webkit-scrollbar":{display:"none"}},children:(0,x.jsx)(s.xv,{fontSize:.8*n+"px !important",justifyContent:"normal",fontWeight:"normal !important",dangerouslySetInnerHTML:{__html:(r=null!==(e=null===o||void 0===o?void 0:o.description)&&void 0!==e?e:null===o||void 0===o?void 0:o.body_html,r.replace(/style="[^"]*color[^"]*"/gi,""))},sx:{fontFamily:i+" !important",lineHeight:"140% !important"}})})})]});var r}const Yt=t=>{let{iconSize:e}=t;return(0,x.jsx)("div",{style:{color:"black",paddingTop:"2px"},children:(0,x.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:"currentColor",class:"bi bi-box-arrow-up-right",viewBox:"0 0 16 16",style:{stroke:"black",strokeWidth:"0.4"},children:[(0,x.jsx)("path",{"fill-rule":"evenodd",d:"M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5"}),(0,x.jsx)("path",{"fill-rule":"evenodd",d:"M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0z"})]})})};function Xt(t){var e;const[i,o]=(0,n.useState)(t.product),[r]=(0,u.j1)("whatmorePrimaryFont"),[l]=(0,u.j1)("whatmoreShopId"),[a]=(0,u.j1)("whatmoreSecondaryColor");(0,n.useEffect)((()=>{(0,c.N8M)(l)&&(0,xt.Rb)(i,(0,c.Ipo)(l),l).then((t=>{o(t)}))}),[]);const d=t.FONT_SIZE,h=t.data,p=t.itemPrice;let v,m,g;var f,w,j;"STRDOIDF6O7"==l&&(v=null===h||void 0===h||null===(f=h.variants)||void 0===f?void 0:f.find((e=>e.id==t.selectedVariantId)),m=null===(w=v)||void 0===w?void 0:w.title,g=null===(j=v)||void 0===j?void 0:j.productLink);const y=(()=>{var e;const i=null===h||void 0===h||null===(e=h.variants)||void 0===e?void 0:e.find((e=>e.id==t.selectedVariantId));return null!==i&&void 0!==i&&i.compare_at_price&&parseFloat(i.compare_at_price)>0?i.compare_at_price:null})(),C=y&&0!=y&&y>p?Math.round((y-p)/y*100):NaN;return(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)(s.kC,{direction:"column",paddingLeft:"20px",paddingRight:"20px",paddingY:"5px",children:[(0,x.jsx)(s.rU,{href:function(t){return(0,c.lj5)(l)?("STRDOIDF6O7"==l?g:t.product_link)+"?"+(0,c.awP)(l)+"&"+(0,c.n9s)(l)+"&"+(0,c.vaK)(l)+((0,c.C0m)(l)?"&currency="+t.currency:""):("STRDOIDF6O7"==l?g:t.product_link)+((0,c.C0m)(l)?"?currency="+t.currency:"")}(i),color:"white",width:"fit-content",children:(0,x.jsxs)(s.kC,{sx:{display:"flex",gap:"6px"},children:[(0,x.jsx)(s.xv,{isTruncated:!0,noOfLines:2,padding:"2px",fontSize:d,sx:{color:"black !important",lineHeight:"140% !important",fontFamily:r+" !important"},as:"b",children:"STRDOIDF6O7"==l&&null!==(e=m)&&void 0!==e?e:null===h||void 0===h?void 0:h.title}),(0,x.jsx)(Yt,{iconSize:1.1*d})]})}),(0,x.jsxs)(s.kC,{direction:"row",gap:"6px",paddingTop:"4px",children:[y&&y>p&&(0,x.jsx)(s.xv,{as:"s",padding:"2px",fontSize:1.2*d,fontWeight:"semibold",sx:{color:"gray !important",fontFamily:r+" !important"},children:(0,xt.jx)(parseFloat(y)," ",l,i.currency,!0)}),(0,x.jsx)(s.xv,{as:"b",padding:"2px",fontSize:1.2*d,fontWeight:"semibold !important",sx:{color:"black !important",fontFamily:r+" !important"},children:(0,xt.jx)(parseFloat(p),"",l,i.currency,!0)}),!isNaN(C)&&0!=C&&(0,x.jsx)(s.xu,{display:"flex",backgroundColor:"green"==(0,c.ZJm)(l)?"#343434"==a?(0,c.ZJm)(l):a:(0,c.ZJm)(l),alignItems:"center",borderRadius:"4px",width:"fit-content",px:"6px",children:(0,x.jsx)(s.xv,{fontSize:(0,c.sTg)(l)?"14px !important":1.1*d,fontWeight:"normal !important",sx:{color:(0,c.mso)(l)+" !important",fontFamily:r+" !important"},children:(0,c.sTg)(l)?`${C}% off`:`Save ${(0,xt.jx)(parseFloat(y/100-p/100)," ",l,i.currency)}`})})]})]})})}function Gt(t){var e,i;const[o]=(0,u.j1)("whatmorePrimaryFont"),[r]=(0,u.j1)("whatmoreShopId"),{setShowOptionsChart:l}=(0,n.useContext)(re),[a,d]=(0,n.useState)({}),h=(0,u.MO)("whatmoreSecondaryColorShade300"),p=t.setSelectedColor,v=t.selectOptionFirstHandler,m=t.selectOptionSecondHandler,f=t.selectOptionThirdHandler,w=t.FONT_SIZE,j=t.data,y=(t,e,i)=>{if(2==i)d((i=>({...i,[t]:e})));else if(1==i)d((i=>{var n,o,r,l;return{...i,[t]:e,[null===j||void 0===j||null===(n=j.options)||void 0===n||null===(o=n[2])||void 0===o?void 0:o.name]:null===j||void 0===j||null===(r=j.variants)||void 0===r||null===(l=r.find((t=>(null===t||void 0===t?void 0:t.option2)==e)))||void 0===l?void 0:l.option3}}));else{var n,o;const i=null===j||void 0===j||null===(n=j.variants)||void 0===n||null===(o=n.find((t=>(null===t||void 0===t?void 0:t.option1)==e)))||void 0===o?void 0:o.option2;d((n=>{var o,r,l,a,d,s,c,u;return{...n,[null===j||void 0===j||null===(o=j.options)||void 0===o||null===(r=o[1])||void 0===r?void 0:r.name]:null===j||void 0===j||null===(l=j.variants)||void 0===l||null===(a=l.find((t=>(null===t||void 0===t?void 0:t.option1)==e)))||void 0===a?void 0:a.option2,[null===j||void 0===j||null===(d=j.options)||void 0===d||null===(s=d[2])||void 0===s?void 0:s.name]:null===j||void 0===j||null===(c=j.variants)||void 0===c||null===(u=c.find((t=>(null===t||void 0===t?void 0:t.option2)==i)))||void 0===u?void 0:u.option3,[t]:e}}))}};(0,n.useEffect)((()=>{d((t=>{var e,i,n,o,r,l,a,d,s,c,u,h;return{...t,[null===j||void 0===j||null===(e=j.options)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.name]:null===j||void 0===j||null===(n=j.variants)||void 0===n||null===(o=n.find((t=>{var e,i,n;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(i=e[0])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option1))&&(null===t||void 0===t?void 0:t.available)})))||void 0===o?void 0:o.option1,[null===j||void 0===j||null===(r=j.options)||void 0===r||null===(l=r[1])||void 0===l?void 0:l.name]:null===j||void 0===j||null===(a=j.variants)||void 0===a||null===(d=a.find((t=>{var e,i,n;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(i=e[1])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option2))&&(null===t||void 0===t?void 0:t.available)})))||void 0===d?void 0:d.option2,[null===j||void 0===j||null===(s=j.options)||void 0===s||null===(c=s[2])||void 0===c?void 0:c.name]:null===j||void 0===j||null===(u=j.variants)||void 0===u||null===(h=u.find((t=>{var e,i,n;return(null===j||void 0===j||null===(e=j.options)||void 0===e||null===(i=e[2])||void 0===i||null===(n=i.values)||void 0===n?void 0:n.includes(null===t||void 0===t?void 0:t.option3))&&(null===t||void 0===t?void 0:t.available)})))||void 0===h?void 0:h.option3}}))}),[]);return(0,x.jsx)(s.kC,{direction:"row",paddingLeft:"20px",paddingRight:"20px",paddingY:"10px",children:(null===j||void 0===j||null===(e=j.options)||void 0===e?void 0:e.length)>0&&(0,x.jsx)(s.kC,{direction:"column",width:"100%",gap:"4px",children:null===j||void 0===j||null===(i=j.options)||void 0===i?void 0:i.map(((e,i)=>{var n,d,u,C,b,S;return(0,x.jsx)(x.Fragment,{children:"mlveda_country"!==(null===e||void 0===e?void 0:e.name)&&((null===e||void 0===e||null===(n=e.values)||void 0===n?void 0:n.length)>1||"Colour"===(null===e||void 0===e?void 0:e.name)||(null===e||void 0===e||null===(d=e.name)||void 0===d?void 0:d.toLowerCase().includes("color"))||1==(null===e||void 0===e||null===(u=e.values)||void 0===u?void 0:u.length)&&(null===e||void 0===e?void 0:e.position)>1&&(null===e||void 0===e?void 0:e.position)==(null===j||void 0===j||null===(C=j.options)||void 0===C?void 0:C.length))&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(s.kC,{justifyContent:"space-between",alignItems:"center",children:[(0,x.jsx)(s.xv,{fontSize:1*w+"px !important",sx:{color:"black !important",fontFamily:o+" !important",fontWeight:"bold !important"},children:null===e||void 0===e?void 0:e.name}),"Size"===e.name&&(0,c.Ip6)(r)?(0,x.jsx)(s.kC,{marginTop:"4px",whiteSpace:"nowrap",cursor:"pointer",children:(0,x.jsx)(s.xv,{fontSize:.7*w,as:"u",sx:{color:"black !important",fontFamily:o+" !important"},onClick:()=>{null!==l&&l(!0)},children:(0,c.meb)(r)})}):(0,x.jsx)(x.Fragment,{})]}),(0,x.jsx)(s.Ug,{spacing:0,flexWrap:"wrap",alignContent:"flex-start",alignItems:"center",justifyContent:"flex-start",children:null===e||void 0===e||null===(b=e.values)||void 0===b?void 0:b.map((n=>{var l,d,u,C,b,S,I,k,_;const T=((t,e)=>{var i,n,o,r,l,d,s,c,u,h;if(null===j||void 0===j||null===(i=j.options)||void 0===i||!i.length)return!1;const p=null===j||void 0===j||null===(n=j.options)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.name,v=null===j||void 0===j||null===(r=j.options)||void 0===r||null===(l=r[1])||void 0===l?void 0:l.name;switch(null===j||void 0===j||null===(d=j.options)||void 0===d||null===(s=d[2])||void 0===s||s.name,null===j||void 0===j||null===(c=j.options)||void 0===c?void 0:c.length){case 1:return null===j||void 0===j||null===(u=j.variants)||void 0===u?void 0:u.some((e=>e.option1===t&&e.available));case 2:var x;return 0===e?null===j||void 0===j||null===(x=j.variants)||void 0===x?void 0:x.some((e=>e.option1===t&&e.available)):null===j||void 0===j||null===(h=j.variants)||void 0===h?void 0:h.some((e=>e.option2===t&&e.option1===a[p]&&e.available));case 3:var m,g,f;if(0===e)return null===j||void 0===j||null===(m=j.variants)||void 0===m?void 0:m.some((e=>e.option1===t&&e.available));if(1===e)return null===j||void 0===j||null===(g=j.variants)||void 0===g?void 0:g.some((e=>e.option2===t&&e.option1===a[p]&&e.available));if(2===e)return null===j||void 0===j||null===(f=j.variants)||void 0===f?void 0:f.some((e=>e.option3===t&&e.option1===a[p]&&e.option2===a[v]&&e.available));default:return!1}})(n,i),F=0==i||j.variants.find((t=>{var e,o;return t[`option${i}`]==(null===(e=Object.entries(a))||void 0===e||null===(o=e[i-1])||void 0===o?void 0:o[1])&&t[`option${i+1}`]==n}));return("Colour"===(null===e||void 0===e?void 0:e.name)||null!==e&&void 0!==e&&e.name.toLowerCase().includes("color"))&&F&&((null===t||void 0===t||null===(l=t.finalArr)||void 0===l?void 0:l.length)>0&&(null===t||void 0===t||null===(d=t.finalArr)||void 0===d||!d.includes(null))||(null===t||void 0===t||null===(u=t.finalArrExternal)||void 0===u?void 0:u.length)>0)?(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(s.kC,{paddingBottom:"8px",px:"2px",paddingRight:"8px",children:(0,x.jsx)(s.xu,{boxShadow:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px",borderRadius:(0,c.lmH)(r),size:"sm",border:a[null===e||void 0===e?void 0:e.name]===n?`2px solid ${(0,c.ua_)(r)} !important`:"",cursor:"pointer",width:"fit-content !important",onClick:()=>{y(null===e||void 0===e?void 0:e.name,n,i),p(n),0===i&&v(n),1===i&&m(n),2===i&&f(n)},children:(0,x.jsx)(g.Ee,{padding:"2px",borderRadius:(0,c.lmH)(r),width:"58px",height:"58px",src:(0,pt.s)(null!==(C=null===t||void 0===t||null===(b=t.finalArr)||void 0===b||null===(S=b.find((t=>(null===t||void 0===t?void 0:t.color)==n)))||void 0===S?void 0:S.src)&&void 0!==C?C:null===t||void 0===t||null===(I=t.finalArrExternal)||void 0===I||null===(k=I.find((t=>(null===t||void 0===t?void 0:t.color)==n)))||void 0===k?void 0:k.optionsrc,"?width=400&height=400")})})},n)}):F&&(0,x.jsx)(s.kC,{paddingBottom:"8px",paddingRight:"8px",children:(0,x.jsx)($.zx,{isDisabled:!T,size:"sm",px:"8px !important",bg:a[null===e||void 0===e?void 0:e.name]===n&&T?(null!==(_=(0,c.CPm)(r))&&void 0!==_?_:h)+" !important":(0,c.bC3)(r)+" !important",width:"fit-content !important",onClick:()=>{"76408193304"!=r||"Size"!=(null===e||void 0===e?void 0:e.name)||"Customize"!=n?(y(null===e||void 0===e?void 0:e.name,n,i),0===i&&v(n),1===i&&m(n),2===i&&f(n)):window.location.href=t.product.product_link},children:(0,x.jsx)(s.xv,{as:T?"p":"s",textDecoration:T?"none":"line-through",fontSize:.9*w+"px !important",sx:{fontFamily:o+" !important",fontWeight:"normal !important",color:a[null===e||void 0===e?void 0:e.name]===n&&T?(0,c.cY_)(r)+" !important":(0,c.FbM)(r)+" !important"},children:n})})},n)}))}),i===(null===j||void 0===j||null===(S=j.options)||void 0===S?void 0:S.length)-1&&(0,x.jsx)(s.M5,{paddingTop:"8px",width:"100%",children:(0,x.jsx)(s.iz,{color:t.dividerColor,size:"xs"})})]})})}))})})}var $t=i(8782);function Qt(t){var e,i,o,r,l,a,d,p,v,m,f,w,j,y,C,S,I,k,_,T,F;const[E,P,O,z]=(0,h.Z)();var L=.4*z*.8,D=L*(16/9)*.6*.8;const M=1.1*L,A=M*(16/9)*.8;var K=.12*L;const[W,q]=(0,n.useState)(!1),N=t.data,V=t.event,Z=t.product,H=t.setOpenShopNow,U=t.setLockSwiper,[B]=(0,u.j1)("whatmoreEmbedAppUseVariant"),[Y,X]=(0,n.useState)((()=>{if("true"===B)return ee(N,Z.client_product_id)})),[G,$]=(0,n.useState)((()=>{if("true"===B)return ie(N,Z.client_product_id)})),[Q,J]=(0,n.useState)((()=>{if("true"===B)return ne(N,Z.client_product_id)})),[tt,et]=(0,n.useState)(),[it,nt]=(0,n.useState)(1),[ot,at]=(0,n.useState)(),[dt,st]=(0,n.useState)(0),[ct,ut]=(0,n.useState)(!1),[ht,vt]=(0,n.useState)(!1),[xt,mt]=(0,n.useState)(Z.thumbnail_image),gt=(0,u.MO)("whatmoreUITheme"),ft=(0,u.MO)("whatmoreShopId"),wt=(0,n.useCallback)((t=>{X(t)}),[]),jt=(0,n.useCallback)((t=>{$(t)}),[]),yt=(0,n.useCallback)((t=>{J(t)}),[]);(0,n.useEffect)((()=>{var t,e;const i=Jt(N,Y,G,Q);et(null!==i&&void 0!==i?i:null===N||void 0===N||null===(t=N.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.id),at(te(N,i)),nt(1),vt(!1);const n=oe(N,i);null!==n&&mt(n)}),[Y,G,Q]),(0,n.useEffect)((()=>{var t,e;const i=void 0===tt?null===N||void 0===N||null===(t=N.variants)||void 0===t||null===(e=t[0])||void 0===e?void 0:e.price:te(N,tt);at(i*it)}),[it]),(0,n.useEffect)((()=>{function t(t){const e=document.getElementById("whatmore-shopnow-view"),i=document.getElementById("whatmore-size-chart");i&&i.contains(t.target)||!e||e.contains(t.target)||(H(!1),U(!1))}function e(t){t.stopPropagation(),i.scrollTop+=t.deltaY}document.addEventListener("click",t);const i=document.getElementById("whatmore-shopnow-view");return null===i||void 0===i||i.addEventListener("wheel",e),()=>{document.removeEventListener("click",t),i.removeEventListener("wheel",e)}}),[]),(0,n.useEffect)((()=>{const t=async function(t,e){return"shopify"==t?(0,lt.Bi)():(0,rt.OM)(e)}((0,c.Ipo)(ft),ft);t.then((t=>t.json())).then((t=>{st(t.item_count)})).catch((t=>{console.error("Cart Add Error:",t)}))}),[ct]);const Ct=`${b.F4`
73
73
  0% {
74
74
  transform: translateY(100%);
75
75
  }
@@ -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)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[733],{1092:function(t,e,i){var n=i(237),o=i(9854),r=i(7753),l=i(6417);function s(t){return t<1e3?t:t<1e5?(t/1e3).toFixed(0)+"K":(t/1e5).toFixed(0)+"L"}e.Z=function(t){const e=(0,r.MO)("whatmoreUITheme"),i=(0,r.MO)("whatmoreShopId"),a=(0,r.MO)("whatmorePrimaryFont"),d=t.event,p=t.fontSize;if(d.total_views<=0)return(0,l.jsx)(l.Fragment,{});const c=(0,o.S_M)(i);return"template-icon"==c?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,o.XCH)(i),color:"white",borderRadius:"round"==e?"5px":"0px",borderWidth:(0,o.alU)(i),borderColor:(0,o.qPe)(i)},children:(0,l.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:[(0,l.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,l.jsx)(n.Z,{sx:{color:(0,o.aLw)(i)+" !important",fontSize:p,fontWeight:"normal"}})}),(0,l.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,l.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,o.aLw)(i),"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",a,"important"),t.style.setProperty("font-size",p,"important"),t.style.setProperty("min-height","0","important"),t.style.setProperty("display","inline","important"),t.style.setProperty("width","auto","important"))},style:{fontWeight:"normal"},children:" "+s(d.total_views)+" "})})]})})}):"template-text"==c?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,o.XCH)(i),color:"white",borderRadius:"round"==e?"5px":"0px",borderWidth:(0,o.alU)(i),borderColor:(0,o.qPe)(i)},children:(0,l.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:(0,l.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,l.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,o.aLw)(i),"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",a,"important"))},style:{fontSize:p,fontWeight:"bold"},children:" "+s(d.total_views)+" views"})})})})}):void 0}},7129:function(t,e,i){i.d(e,{V:function(){return n}});const n=(0,i(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},8390:function(t,e,i){var n=i(7313),o=i(7753),r=i(9821),l=i(5945),s=(i(3439),i(9854)),a=i(9363),d=i(6417);e.Z=function(t){var e,i,p,c,[h,m]=(0,r.Z)();const x=(0,o.MO)("whatmoreUITheme"),[f]=(0,o.j1)("whatmorePrimaryFont"),[y,u]=(0,n.useState)(0),w=(0,o.MO)("whatmoreShopId"),g=t.event;if(0==g.products.length)return(0,d.jsx)(d.Fragment,{});const v=.3*m,j=v+"px",b=v+"px",P=.07*m,C=P+"px";return(0,d.jsx)("div",{style:{width:m+"px",height:"fit-content",backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0.3)"},children:(0,d.jsxs)("div",{ref:t=>{t&&t.style.setProperty("height","fit-content","important")},style:{display:"flex",flexFlow:"row nowrap",width:"100%",justifyContent:"space-between",alignItems:"center",paddingLeft:"5px",paddingRight:"5px",paddingTop:"5px",paddingBottom:"5px",gap:"5px"},className:"whatmore-event-tile-product-scale-in-and-out-animation",children:[(0,d.jsx)("div",{ref:t=>{t&&t.style.setProperty("height",b,"important")},style:{width:(0,s.uNj)(w)?j:"auto",boxShadow:"round"==x?"0px 0px 5px 2px #B0B0B0":null,borderRadius:"round"==x?"5px":"0px",borderWidth:(0,s.alU)(w),borderColor:(0,s.qPe)(w),overflow:"hidden",backgroundColor:"rgb(220, 220, 220, 1)"},children:(0,d.jsx)("img",{ref:t=>{t&&(t.style.setProperty("object-fit",(0,s.yOX)(w),"important"),t.style.setProperty("max-width",j,"important"))},src:(0,a.s)(g.products[y].thumbnail_image,"&width=400&height=400"),style:{width:"100%",height:"100%",borderRadius:"round"==x?"5px":"0px"},alt:"product image"})}),(0,d.jsxs)("div",{style:{width:m-5-v+"px",height:"100%",borderRadius:"round"==x?"5px":"0px",overflow:"visible"},children:[(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"fit-content",justifyContent:"center",alignItems:"center",paddingBottom:"4px"},children:(0,d.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","white","important"),t.style.setProperty("font-size",C,"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",f,"important"),t.style.setProperty("-webkit-line-clamp",3,"important"),t.style.setProperty("line-clamp",3,"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"))},style:{textAlign:"left",fontWeight:"normal"},children:(0,l.s)(g.products[y].title)})}),(null===(e=g.products[y])||void 0===e||null===(i=e.product_metadata)||void 0===i?void 0:i.product_type)&&(0,d.jsx)("div",{style:{display:"flex",opacity:.8,width:"fit-content",maxWidth:m-5-v+"px",padding:"3px 6px",backgroundColor:"#D3D3D3",borderRadius:"round"==x?"3px":"0"},children:(0,d.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","#000","important"),t.style.setProperty("maxWidth",m-5-v+"px","important"),t.style.setProperty("font-size",.7*P+"px","important"),t.style.setProperty("font-family",f,"important"),t.style.setProperty("font-weight","bold","important"),t.style.setProperty("text-overflow","ellipsis","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("-webkit-line-clamp",1,"important"),t.style.setProperty("line-clamp",1,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"))},children:null===(p=g.products[y])||void 0===p||null===(c=p.product_metadata)||void 0===c?void 0:c.product_type})})]})]},y)})}},2891:function(t,e,i){i.d(e,{Z:function(){return v}});var n=i(7313),o=i(9821),r=(i(3439),i(9723)),l=i(7753),s=i(4892),a=i(7129),d=i(6805),p=i(9854),c=i(1092),h=i(8390),m=i(6775),x=i(8984),f=i(9212),y=(i(3169),i(123),i(6417));function u(t){var e,[i,s]=(0,o.Z)();const[d]=(0,l.j1)("whatmoreShopId"),[c,f,u]=(0,m.Z)({triggerOnce:!0});var w=(0,n.useContext)(a.V);const g=t.event,v=null!==(e=t.unfocusedDisplay)&&void 0!==e&&e,j=.5*s,b=(0,x.gE)()?t.isOnFocus:f;return(0,y.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"200%",overflow:"hidden",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,y.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",alignItems:"center",height:"100%",width:"100%"},children:[(0,y.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,y.jsx)("p",{children:" "})}),w.showPlayButton&&!v?(0,y.jsx)("div",{style:{position:"relative",top:"10%",overflow:"hidden",marginLeft:"5px",marginRight:"5px",width:"100%"},children:(0,y.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",alignItems:"center"},children:(0,y.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:"video"==g.event_type&&(0,y.jsx)(r.Z,{sx:{color:(0,p.Ya_)(d)+" !important",opacity:.8,fontSize:j,filter:"drop-shadow(0 0 15px black);"}})})})}):(0,y.jsx)(y.Fragment,{}),(0,y.jsx)("div",{ref:c,children:b&&(0,p.PWD)(d)?(0,y.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,y.jsx)(h.Z,{event:g})}):(0,y.jsx)("div",{height:"20px"})})]})})}function w(t){var[e,i]=(0,o.Z)();const[n]=(0,l.j1)("whatmorePrimaryFont"),r=t.event;return r.title.trim().length?(0,y.jsx)("div",{style:{width:"100%",height:"fit-content",backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))"},children:(0,y.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"flex-end",alignContent:"center",width:"100%",height:"100%"},children:(0,y.jsx)("div",{style:{width:"100%",padding:"2px"},children:(0,y.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",alignItems:"flex-start",marginLeft:"5px",marginRight:"5px",marginBottom:"2px"},children:[(0,y.jsx)("p",{style:{color:"white",fontSize:.08*i+"px",fontWeight:"normal",textAlign:"left"},children:" "}),(0,y.jsx)("p",{ref:t=>{t&&t.style.setProperty("font-family",n,"important")},style:{color:"white",fontSize:.08*i+"px",fontWeight:"normal",textAlign:"left"},children:r.title.substring(0,60)})]})})})}):(0,y.jsx)(y.Fragment,{})}function g(t){const[e,i,n,r,s]=(0,o.Z)(),[a]=(0,l.j1)("whatmoreShowViews"),h=(0,l.MO)("whatmoreShopId"),m=t.event,x=t.isOnFocus;return(0,y.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",overflow:"hidden",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,y.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-between",alignItems:"center"},children:[(0,y.jsx)("div",{style:{width:"100%",backgroundImage:"linear-gradient(to top, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0.3))"},children:(0,y.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",alignItems:"center"},children:["show"===a&&"show"===(0,p.qcC)(h)?(0,y.jsx)("div",{style:{width:"100%",marginLeft:"5px",marginRight:"5px",marginTop:"10px"},children:(0,y.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",paddingLeft:"5px",width:"fit-content",height:"fit-content",justifyContent:"space-between",alignItems:"center"},children:(0,y.jsx)(c.Z,{event:m,fontSize:.07*i+"px"})})}):(0,y.jsx)(y.Fragment,{}),!1]})}),d.$w===s[d.YP]?(0,y.jsx)(y.Fragment,{}):x?(0,y.jsx)("div",{className:"whatmore-event-tile-component-fade-out-animation",children:(0,y.jsx)(w,{event:m})}):(0,y.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,y.jsx)(w,{event:m})})]})})}var v=function(t){var e,i,r;const[c,h,m,x,w]=(0,o.Z)();var v=(0,n.useContext)(a.V);const j=(0,l.MO)("whatmoreUITheme"),b=(0,l.MO)("whatmoreShopId"),[P]=(0,l.MO)("whatmorePrimaryFont"),C=t.event,I=t.onClick,F=null===(e=t.isOnFocus)||void 0===e||e,k=null!==(i=t.playOnUnfocus)&&void 0!==i&&i,S=null!==(r=t.animateOnFocus&&(0,p.iWI)(b))&&void 0!==r&&r,M=(0,p.nzC)(b);return(0,y.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top",v.tileTopMargin+"px"),t.style.setProperty("margin-bottom",v.tileBottomMMargin+"px"))},style:{margin:"0 10px",width:"8968077397"==b||"19501891"==b?void 0:h,aspectRatio:"8968077397"==b||"19501891"==b?9/16:void 0,height:"8968077397"==b||"19501891"==b?"100%":c,borderRadius:"round"==j?"5px":"0px",boxShadow:"round"==j||"61187850326"==b||"19501891"==b?M:null,borderWidth:(0,p.alU)(b),borderColor:(0,p.qPe)(b),overflow:"hidden",cursor:"pointer",position:"relative"},className:S?F?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",onClick:()=>{I(C)},children:[(0,y.jsx)(s.Z,{height:(0,p.dXm)(b)+" !important",width:"100%",url:C.thumbnail_image,isPlaying:F||k,event:C}),"51394281658"===b?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("div",{style:{position:"absolute",bottom:"4%",left:"50%",transform:"translateX(-50%)",color:"white",padding:"0.5rem 0rem 0rem 0.5rem",zIndex:1,fontSize:"1.4rem",fontWeight:"600",width:"90%",maxWidth:"100%",wordWrap:"break-word",textShadow:"2px 2px 4px rgba(0, 0, 0, 0.5)",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,overflow:"hidden",textOverflow:"ellipsis",fontFamily:P+" !important"},children:null===C||void 0===C?void 0:C.title}),(0,y.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",zIndex:2},children:(0,y.jsx)(f.Z,{sx:{color:"white",fontSize:"1.3rem",filter:"drop-shadow(0 0 5px black)"}})})]}):(0,p.wxm)(b)&&(0,y.jsxs)("div",{style:{width:h,height:c},children:[(0,y.jsx)(g,{event:C,isOnFocus:F}),"87043703105"===b||"76467011883"===b||!F&&d.$w!==w[d.YP]?null:(0,y.jsx)(u,{event:C,unfocusedDisplay:!F,isOnFocus:F})]})]})}},9363:function(t,e,i){i.d(e,{$:function(){return l},s:function(){return r}});var n=i(9854),o=i(7753);function r(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const i=(0,o.MO)("whatmoreShopId");return"shopify"!=(0,n.Ipo)(i)?"STRNV8MHJTF"==i?t+"?format=webp":t:t+e}function l(t){var e;if(null!==t&&void 0!==t&&t.includes("https://w-media.b-cdn.net/process-media"))return"image";const i=null===t||void 0===t||null===(e=t.trim())||void 0===e?void 0:e.split("?")[0],n=/\.(jpeg|jpg|gif|png|svg|webp)$/i,o=/\.(mp4|mov|wmv|avi|flv|mkv)$/i;return null!==n&&void 0!==n&&n.test(i)?"image":null!==o&&void 0!==o&&o.test(i)?"video":void 0}},6805:function(t,e,i){i.d(e,{$I:function(){return s},$w:function(){return d},AK:function(){return r},AL:function(){return l},YP:function(){return o},me:function(){return n},rE:function(){return a}});const n="device_type",o="device_mode",r="mobile",l="tablet",s="desktop",a="portrait",d="landscape"},9821:function(t,e,i){var n=i(7753),o=i(8866),r=i(6805),l=i(9854);e.Z=function(t){const[e,i,s]=(0,o.Z)(),[a]=(0,n.j1)("whatmoreLandscapePadding"),[d]=(0,n.j1)("whatmoreShopId"),[p]=(0,n.j1)("whatmoreVideoTileSize"),[c]=(0,n.j1)("whatmoreVideoTileSizePortrait"),h=s>=1025,m="portrait"==e?c:p,x=!("portrait"!=e||!(s>=481)),f=m/100*1.3*.5,y=m/100;var u=Math.min(s,i),[w,g,v,j]=[.6*u*(16/9),.6*u,1.4,0];function b(t){return Math.round(10*t)/10}var P={DEVICE_TYPE:r.AK,DEVICE_MODE:r.rE};if(h){const t=g*f,e=w*f;[w,g,v,j]=[e,t,(s-2*a-2*(0,l.mZU)(d))/(1.1*t),a],P[r.me]=r.$I,P[r.YP]=r.$w}else if(x){var C=.8*g,I=.8*w;"portrait"==e?(C*=y,I*=y,[w,g,v,j]=[I,C,b(s/(1.2*C)),0],P[r.me]=r.AL,P[r.YP]=r.rE):([w,g,v,j]=[I,C,(s-2*a)/(1.1*C),a],P[r.me]=r.AL,P[r.YP]=r.$w)}else{C=g,I=w;"portrait"==e?(C=C*y*.9,I=I*y*.9,[w,g,v,j]=[I,C,b(s/(1.15*C)),0],P[r.me]=r.AK,P[r.YP]=r.rE):(C=.7*g,I=.7*w,[w,g,v,j]=[I,C,(s-2*a)/(1.1*C),a],P[r.me]=r.AK,P[r.YP]=r.$w)}return[w,g,v,j,P]}},3439:function(){},7244:function(){}}]);
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[733],{1092:function(t,e,i){var n=i(237),o=i(9854),r=i(7753),l=i(6417);function s(t){return t<1e3?t:t<1e5?(t/1e3).toFixed(0)+"K":(t/1e5).toFixed(0)+"L"}e.Z=function(t){const e=(0,r.MO)("whatmoreUITheme"),i=(0,r.MO)("whatmoreShopId"),a=(0,r.MO)("whatmorePrimaryFont"),d=t.event,p=t.fontSize;if(d.total_views<=0)return(0,l.jsx)(l.Fragment,{});const c=(0,o.S_M)(i);return"template-icon"==c?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,o.XCH)(i),color:"white",borderRadius:"round"==e?"5px":"0px",borderWidth:(0,o.alU)(i),borderColor:(0,o.qPe)(i)},children:(0,l.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:[(0,l.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,l.jsx)(n.Z,{sx:{color:(0,o.aLw)(i)+" !important",fontSize:p,fontWeight:"normal"}})}),(0,l.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,l.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,o.aLw)(i),"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",a,"important"),t.style.setProperty("font-size",p,"important"),t.style.setProperty("min-height","0","important"),t.style.setProperty("display","inline","important"),t.style.setProperty("width","auto","important"))},style:{fontWeight:"normal"},children:" "+s(d.total_views)+" "})})]})})}):"template-text"==c?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,o.XCH)(i),color:"white",borderRadius:"round"==e?"5px":"0px",borderWidth:(0,o.alU)(i),borderColor:(0,o.qPe)(i)},children:(0,l.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:(0,l.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,l.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,o.aLw)(i),"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",a,"important"))},style:{fontSize:p,fontWeight:"bold"},children:" "+s(d.total_views)+" views"})})})})}):void 0}},7129:function(t,e,i){i.d(e,{V:function(){return n}});const n=(0,i(7313).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},8390:function(t,e,i){var n=i(7313),o=i(7753),r=i(9821),l=i(5945),s=(i(3439),i(9854)),a=i(9363),d=i(6417);e.Z=function(t){var e,i,p,c,[h,m]=(0,r.Z)();const x=(0,o.MO)("whatmoreUITheme"),[f]=(0,o.j1)("whatmorePrimaryFont"),[y,u]=(0,n.useState)(0),w=(0,o.MO)("whatmoreShopId"),g=t.event;if(0==g.products.length)return(0,d.jsx)(d.Fragment,{});const v=.3*m,j=v+"px",b=v+"px",P=.07*m,C=P+"px";return(0,d.jsx)("div",{style:{width:m+"px",height:"fit-content",backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0.3)"},children:(0,d.jsxs)("div",{ref:t=>{t&&t.style.setProperty("height","fit-content","important")},style:{display:"flex",flexFlow:"row nowrap",width:"100%",justifyContent:"space-between",alignItems:"center",paddingLeft:"5px",paddingRight:"5px",paddingTop:"5px",paddingBottom:"5px",gap:"5px"},className:"whatmore-event-tile-product-scale-in-and-out-animation",children:[(0,d.jsx)("div",{ref:t=>{t&&t.style.setProperty("height",b,"important")},style:{width:(0,s.uNj)(w)?j:"auto",boxShadow:"round"==x?"0px 0px 5px 2px #B0B0B0":null,borderRadius:"round"==x?"5px":"0px",borderWidth:(0,s.alU)(w),borderColor:(0,s.qPe)(w),overflow:"hidden",backgroundColor:"rgb(220, 220, 220, 1)"},children:(0,d.jsx)("img",{ref:t=>{t&&(t.style.setProperty("object-fit",(0,s.yOX)(w),"important"),t.style.setProperty("max-width",j,"important"))},src:(0,a.s)(g.products[y].thumbnail_image,"&width=400&height=400"),style:{width:"100%",height:"100%",borderRadius:"round"==x?"5px":"0px"},alt:"product image"})}),(0,d.jsxs)("div",{style:{width:m-5-v+"px",height:"100%",borderRadius:"round"==x?"5px":"0px",overflow:"visible"},children:[(0,d.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"fit-content",justifyContent:"center",alignItems:"center",paddingBottom:"4px"},children:(0,d.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","white","important"),t.style.setProperty("font-size",C,"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",f,"important"),t.style.setProperty("-webkit-line-clamp",3,"important"),t.style.setProperty("line-clamp",3,"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"))},style:{textAlign:"left",fontWeight:"normal"},children:(0,l.s)(g.products[y].title)})}),(null===(e=g.products[y])||void 0===e||null===(i=e.product_metadata)||void 0===i?void 0:i.product_type)&&(0,d.jsx)("div",{style:{display:"flex",opacity:.8,width:"fit-content",maxWidth:m-5-v+"px",padding:"3px 6px",backgroundColor:"#D3D3D3",borderRadius:"round"==x?"3px":"0"},children:(0,d.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","#000","important"),t.style.setProperty("maxWidth",m-5-v+"px","important"),t.style.setProperty("font-size",.7*P+"px","important"),t.style.setProperty("font-family",f,"important"),t.style.setProperty("font-weight","bold","important"),t.style.setProperty("text-overflow","ellipsis","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("-webkit-line-clamp",1,"important"),t.style.setProperty("line-clamp",1,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"))},children:null===(p=g.products[y])||void 0===p||null===(c=p.product_metadata)||void 0===c?void 0:c.product_type})})]})]},y)})}},2891:function(t,e,i){i.d(e,{Z:function(){return v}});var n=i(7313),o=i(9821),r=(i(3439),i(9723)),l=i(7753),s=i(4892),a=i(7129),d=i(6805),p=i(9854),c=i(1092),h=i(8390),m=i(6775),x=i(8984),f=i(9212),y=(i(8134),i(123),i(6417));function u(t){var e,[i,s]=(0,o.Z)();const[d]=(0,l.j1)("whatmoreShopId"),[c,f,u]=(0,m.Z)({triggerOnce:!0});var w=(0,n.useContext)(a.V);const g=t.event,v=null!==(e=t.unfocusedDisplay)&&void 0!==e&&e,j=.5*s,b=(0,x.gE)()?t.isOnFocus:f;return(0,y.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"200%",overflow:"hidden",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,y.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",alignItems:"center",height:"100%",width:"100%"},children:[(0,y.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,y.jsx)("p",{children:" "})}),w.showPlayButton&&!v?(0,y.jsx)("div",{style:{position:"relative",top:"10%",overflow:"hidden",marginLeft:"5px",marginRight:"5px",width:"100%"},children:(0,y.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",alignItems:"center"},children:(0,y.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:"video"==g.event_type&&(0,y.jsx)(r.Z,{sx:{color:(0,p.Ya_)(d)+" !important",opacity:.8,fontSize:j,filter:"drop-shadow(0 0 15px black);"}})})})}):(0,y.jsx)(y.Fragment,{}),(0,y.jsx)("div",{ref:c,children:b&&(0,p.PWD)(d)?(0,y.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,y.jsx)(h.Z,{event:g})}):(0,y.jsx)("div",{height:"20px"})})]})})}function w(t){var[e,i]=(0,o.Z)();const[n]=(0,l.j1)("whatmorePrimaryFont"),r=t.event;return r.title.trim().length?(0,y.jsx)("div",{style:{width:"100%",height:"fit-content",backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))"},children:(0,y.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"flex-end",alignContent:"center",width:"100%",height:"100%"},children:(0,y.jsx)("div",{style:{width:"100%",padding:"2px"},children:(0,y.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",alignItems:"flex-start",marginLeft:"5px",marginRight:"5px",marginBottom:"2px"},children:[(0,y.jsx)("p",{style:{color:"white",fontSize:.08*i+"px",fontWeight:"normal",textAlign:"left"},children:" "}),(0,y.jsx)("p",{ref:t=>{t&&t.style.setProperty("font-family",n,"important")},style:{color:"white",fontSize:.08*i+"px",fontWeight:"normal",textAlign:"left"},children:r.title.substring(0,60)})]})})})}):(0,y.jsx)(y.Fragment,{})}function g(t){const[e,i,n,r,s]=(0,o.Z)(),[a]=(0,l.j1)("whatmoreShowViews"),h=(0,l.MO)("whatmoreShopId"),m=t.event,x=t.isOnFocus;return(0,y.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",overflow:"hidden",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,y.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-between",alignItems:"center"},children:[(0,y.jsx)("div",{style:{width:"100%",backgroundImage:"linear-gradient(to top, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0.3))"},children:(0,y.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",alignItems:"center"},children:["show"===a&&"show"===(0,p.qcC)(h)?(0,y.jsx)("div",{style:{width:"100%",marginLeft:"5px",marginRight:"5px",marginTop:"10px"},children:(0,y.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",paddingLeft:"5px",width:"fit-content",height:"fit-content",justifyContent:"space-between",alignItems:"center"},children:(0,y.jsx)(c.Z,{event:m,fontSize:.07*i+"px"})})}):(0,y.jsx)(y.Fragment,{}),!1]})}),d.$w===s[d.YP]?(0,y.jsx)(y.Fragment,{}):x?(0,y.jsx)("div",{className:"whatmore-event-tile-component-fade-out-animation",children:(0,y.jsx)(w,{event:m})}):(0,y.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,y.jsx)(w,{event:m})})]})})}var v=function(t){var e,i,r;const[c,h,m,x,w]=(0,o.Z)();var v=(0,n.useContext)(a.V);const j=(0,l.MO)("whatmoreUITheme"),b=(0,l.MO)("whatmoreShopId"),[P]=(0,l.MO)("whatmorePrimaryFont"),C=t.event,I=t.onClick,F=null===(e=t.isOnFocus)||void 0===e||e,k=null!==(i=t.playOnUnfocus)&&void 0!==i&&i,S=null!==(r=t.animateOnFocus&&(0,p.iWI)(b))&&void 0!==r&&r,M=(0,p.nzC)(b);return(0,y.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top",v.tileTopMargin+"px"),t.style.setProperty("margin-bottom",v.tileBottomMMargin+"px"))},style:{margin:"0 10px",width:"8968077397"==b||"19501891"==b?void 0:h,aspectRatio:"8968077397"==b||"19501891"==b?9/16:void 0,height:"8968077397"==b||"19501891"==b?"100%":c,borderRadius:"round"==j?"5px":"0px",boxShadow:"round"==j||"61187850326"==b||"19501891"==b?M:null,borderWidth:(0,p.alU)(b),borderColor:(0,p.qPe)(b),overflow:"hidden",cursor:"pointer",position:"relative"},className:S?F?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",onClick:()=>{I(C)},children:[(0,y.jsx)(s.Z,{height:(0,p.dXm)(b)+" !important",width:"100%",url:C.thumbnail_image,isPlaying:F||k,event:C}),"51394281658"===b?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("div",{style:{position:"absolute",bottom:"4%",left:"50%",transform:"translateX(-50%)",color:"white",padding:"0.5rem 0rem 0rem 0.5rem",zIndex:1,fontSize:"1.4rem",fontWeight:"600",width:"90%",maxWidth:"100%",wordWrap:"break-word",textShadow:"2px 2px 4px rgba(0, 0, 0, 0.5)",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,overflow:"hidden",textOverflow:"ellipsis",fontFamily:P+" !important"},children:null===C||void 0===C?void 0:C.title}),(0,y.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",zIndex:2},children:(0,y.jsx)(f.Z,{sx:{color:"white",fontSize:"1.3rem",filter:"drop-shadow(0 0 5px black)"}})})]}):(0,p.wxm)(b)&&(0,y.jsxs)("div",{style:{width:h,height:c},children:[(0,y.jsx)(g,{event:C,isOnFocus:F}),"87043703105"===b||"76467011883"===b||!F&&d.$w!==w[d.YP]?null:(0,y.jsx)(u,{event:C,unfocusedDisplay:!F,isOnFocus:F})]})]})}},9363:function(t,e,i){i.d(e,{$:function(){return l},s:function(){return r}});var n=i(9854),o=i(7753);function r(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const i=(0,o.MO)("whatmoreShopId");return"shopify"!=(0,n.Ipo)(i)?"STRNV8MHJTF"==i?t+"?format=webp":t:t+e}function l(t){var e;if(null!==t&&void 0!==t&&t.includes("https://w-media.b-cdn.net/process-media"))return"image";const i=null===t||void 0===t||null===(e=t.trim())||void 0===e?void 0:e.split("?")[0],n=/\.(jpeg|jpg|gif|png|svg|webp)$/i,o=/\.(mp4|mov|wmv|avi|flv|mkv)$/i;return null!==n&&void 0!==n&&n.test(i)?"image":null!==o&&void 0!==o&&o.test(i)?"video":void 0}},6805:function(t,e,i){i.d(e,{$I:function(){return s},$w:function(){return d},AK:function(){return r},AL:function(){return l},YP:function(){return o},me:function(){return n},rE:function(){return a}});const n="device_type",o="device_mode",r="mobile",l="tablet",s="desktop",a="portrait",d="landscape"},9821:function(t,e,i){var n=i(7753),o=i(8866),r=i(6805),l=i(9854);e.Z=function(t){const[e,i,s]=(0,o.Z)(),[a]=(0,n.j1)("whatmoreLandscapePadding"),[d]=(0,n.j1)("whatmoreShopId"),[p]=(0,n.j1)("whatmoreVideoTileSize"),[c]=(0,n.j1)("whatmoreVideoTileSizePortrait"),h=s>=1025,m="portrait"==e?c:p,x=!("portrait"!=e||!(s>=481)),f=m/100*1.3*.5,y=m/100;var u=Math.min(s,i),[w,g,v,j]=[.6*u*(16/9),.6*u,1.4,0];function b(t){return Math.round(10*t)/10}var P={DEVICE_TYPE:r.AK,DEVICE_MODE:r.rE};if(h){const t=g*f,e=w*f;[w,g,v,j]=[e,t,(s-2*a-2*(0,l.mZU)(d))/(1.1*t),a],P[r.me]=r.$I,P[r.YP]=r.$w}else if(x){var C=.8*g,I=.8*w;"portrait"==e?(C*=y,I*=y,[w,g,v,j]=[I,C,b(s/(1.2*C)),0],P[r.me]=r.AL,P[r.YP]=r.rE):([w,g,v,j]=[I,C,(s-2*a)/(1.1*C),a],P[r.me]=r.AL,P[r.YP]=r.$w)}else{C=g,I=w;"portrait"==e?(C=C*y*.9,I=I*y*.9,[w,g,v,j]=[I,C,b(s/(1.15*C)),0],P[r.me]=r.AK,P[r.YP]=r.rE):(C=.7*g,I=.7*w,[w,g,v,j]=[I,C,(s-2*a)/(1.1*C),a],P[r.me]=r.AK,P[r.YP]=r.$w)}return[w,g,v,j,P]}},3439:function(){},7244:function(){}}]);