whatmore-react-assets 1.0.1637 → 1.0.1639
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/static/js/262.4724036b.chunk.js +1 -0
- package/static/js/413.a37d75e4.chunk.js +127 -0
- package/static/js/988.f25d4f2e.chunk.js +1 -0
- package/static/js/carousel-template-a.ba8a94e9.chunk.js +1 -0
- package/static/js/{carousel-template-b.2e550617.chunk.js → carousel-template-b.dc5dc194.chunk.js} +1 -1
- package/static/js/carousel-template-f.0f07f331.chunk.js +41 -0
- package/static/js/carousel-template-h.a334544b.chunk.js +1 -0
- package/static/js/carousel-template-i.9519224f.chunk.js +1 -0
- package/static/js/product-page-view.e73f4e12.chunk.js +1 -0
- package/static/js/{spotlight-view.1758a8e1.chunk.js → spotlight-view.b0ad0b09.chunk.js} +1 -1
- package/static/js/whatmore-root.28aa8b9c.chunk.js +1 -0
- package/whatmore.js +2 -2
- package/static/js/176.e1494954.chunk.js +0 -127
- package/static/js/852.62635cf8.chunk.js +0 -1
- package/static/js/988.370f90ec.chunk.js +0 -1
- package/static/js/carousel-template-a.541979bb.chunk.js +0 -1
- package/static/js/carousel-template-f.9bfd9d30.chunk.js +0 -41
- package/static/js/carousel-template-h.70efb640.chunk.js +0 -1
- package/static/js/carousel-template-i.e3d5453c.chunk.js +0 -1
- package/static/js/product-page-view.5e8ffb1a.chunk.js +0 -1
- package/static/js/whatmore-root.467877bb.chunk.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[852],{852:function(t,e,n){n.r(e),n.d(e,{initiateCartSliderEvent:function(){return a}});const o=function(){fetch("/cart.json").then((t=>t.json())).then((t=>{fetch("/cart?view=item").then((t=>t.text())).then((e=>{const n=(new DOMParser).parseFromString(e,"text/html").getElementById("CartDrawer"),o=document.getElementById("CartDrawer");n&&o&&(o.innerHTML=n.innerHTML);const r=document.querySelector("cart-drawer");r&&r.classList.remove("is-empty");const a=document.querySelector("cart-drawer-items");a&&a.classList.remove("is-empty");const c=document.getElementById("cart-icon-bubble");if(c.querySelector(".cart-count-bubble")){c.querySelectorAll('.cart-count-bubble span[aria-hidden="true"]').forEach((e=>{e.textContent=t.item_count}))}else{const e=document.createElement("div");e.className="cart-count-bubble",e.innerHTML=`\n <span aria-hidden="true">${t.item_count}</span>\n <span class="visually-hidden">${t.item_count} items</span>\n `,c.appendChild(e)}c.click();document.getElementById("CartDrawer-Overlay").addEventListener("click",(()=>{const t=document.querySelector("cart-drawer");t&&t.classList.remove("active"),document.body.classList.remove("overflow-hidden")}))})).catch((t=>{}))})).catch((t=>{console.log(t)}))},r=t=>{try{const e=document.querySelector("#halo-cart-sidebar .halo-sidebar-wrapper .previewCart-wrapper"),n='\n <div class="loading-overlay loading-overlay--custom">\n <div class="loading-overlay__spinner">\n <svg aria-hidden="true" focusable="false" role="presentation" class="spinner" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg">\n <circle class="path" fill="none" stroke-width="6" cx="33" cy="33" r="30"></circle>\n </svg>\n </div>\n </div>\n ',o="is-loading";e.classList.add(o),e.insertAdjacentHTML("afterbegin",n),fetch(window.routes.root+"/cart?view=ajax_side_cart",{method:"GET",cache:"no-cache"}).then((t=>t.text())).then((t=>{const n=(new DOMParser).parseFromString(t,"text/html");e.innerHTML=n.body.innerHTML,e.classList.remove(o)})).finally((()=>{document.body.querySelector("[data-cart-count]").textContent=cart.item_count,document.dispatchEvent(new CustomEvent("cart-update",{detail:t}));document.getElementById("cart-icon-bubble").click()})).catch((t=>{}))}catch(e){}},a=async function(t,e,n,a,c=""){if("STRNV8MHJTF"!=t&&"STR6HU283UZ"!=t&&"STR9T3LLEJB"!=t&&"STRWJMIOJNX"!=t&&"STRUDQ36YAC"!=t&&"STR1D5ONOZX"!=t){var i=await fetch("https://"+window.location.hostname+"/cart.js",{cache:"reload"}).then((t=>t.json()));if("57939755089"==t||"27358003275"==t||"63748341981"==t||"68237558034"==t||"63046287536"==t||"9734029408"==t||"83411075365"==t||"36300750986"==t||"16957273"==t||"9483952"==t||"57265094752"==t||"58538459329"==t||"80266658086"==t||"46784020646"==t||"52982579389"==t||"76291703063"==t||"68546691304"==t)document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0,detail:{cart:i,openMiniCart:!0}}));else if("19506115"==t)window.PXUTheme.jsAjaxCart.showDrawer(),window.PXUTheme.jsAjaxCart.updateView();else if("54465429691"==t||"41096085665"==t)refreshCart(i),window.setTimeout((function(){$.fancybox.close(),$(".cart-button").click()}),500);else if("25427564"==t||"4243849314"==t||"57708314789"==t||"86986621247"==t||"58745159727"==t){(new theme.CartDrawer).open()}else if("62602182872"==t||"57362710572"==t)CartJS.getCart(),$(".block-cart").addClass("active");else if("58767048885"==t||"55820812447"==t||"83096174866"==t||"63791857821"==t||"50529403072"==t||"70963003672"==t||"20157815"==t||"60492578980"==t||"12183765088"==t||"58546946211"==t||"42070737058"==t||"71321583919"==t||"68492624171"==t||"74541891876"==t||"21187677"==t||"74021110038"==t||"58193838255"==t||"25151799349"==t||"72651899165"==t||"52022313149"==t||"64983957725"==t||"69610111257"==t||"61209641060"==t||"87043703105"==t||"69699436842"==t)document.documentElement.dispatchEvent(new CustomEvent("ajaxProduct:added",{bubbles:!0,detail:{}})),document.documentElement.dispatchEvent(new CustomEvent("cart:open",{bubbles:!0,detail:{}}));else if("2665447536"==t||"51364757670"==t||"45740720296"==t||"66229010609"==t)fetch("/?section_id=cart-drawer").then((t=>t.text())).then((t=>{const e=(new DOMParser).parseFromString(t,"text/html").getElementById("cart-drawer").innerHTML;$("#cart-drawer").html(e),$('[aria-controls="cart-drawer"]')[0].click(),$(".header__cart-count .count-bubble ").html(d.item_count).css("opacity",1)}));else if("57824805033"==t||"59504656436"==t||"58112966749"==t||"9989358"==t||"26958037078"==t)o();else if("80856187185"==t||"71256211737"==t)fetch("/cart?section_id=mini-cart").then((t=>t.text())).then((t=>{const e=(new DOMParser).parseFromString(t,"text/html").querySelector(".mini-cart__inner").innerHTML;$(".mini-cart__inner").html(e).addClass("active__drawer")})).catch((t=>{console.error(t)})),o();else if("61094723750"==t||"45034766485"==t)SLIDECART&&(SLIDECART_UPDATE(),SLIDECART_OPEN());else if("10272035"==t){const t=document.querySelector(".cart-drawer"),e=t.parentNode;e.classList.add("menu-opening"),e.setAttribute("open","open"),t.style.visibility="visible",t.style.transform="translate(0)"}else if("1972174947"==t||"55194878152"==t||"49198989466"==t)document.documentElement.dispatchEvent(new CustomEvent("cart:refresh:opend",{bubbles:!0,detail:{}}));else if("64463667449"==t||"63897370681"==t||"81998840121"==t||"70964478228"==t)document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0})),document.documentElement.dispatchEvent(new CustomEvent("cart:updated",{bubbles:!0,detail:{cart:i}})),document.getElementById("mini-cart").open=!0;else if("81545986363"==t)document.dispatchEvent(new CustomEvent("theme:cartchanged",{bubbles:!0})),document.dispatchEvent(new CustomEvent("theme:open-cart-drawer",{bubbles:!0}));else if("41346334884"==t||"74448077083"==t||"26562420"==t||"26759856318"==t)document.dispatchEvent(new CustomEvent("dispatch:cart-drawer:refresh")),document.dispatchEvent(new CustomEvent("dispatch:cart-drawer:open"));else if("6873415750"==t)document.dispatchEvent(new CustomEvent("cart:change",{bubbles:!0,detail:{cart:i}})),document.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0}));else if("59547517063"==t||"59612954814"==t)(()=>{try{var t=document.querySelector("cart-notification")||document.querySelector("cart-drawer"),e=window.location.origin?window.location.origin+"/":window.location.protocol+"//"+window.location.host+"/";Shopify.locale.length>0&&(e+=Shopify.locale+"/"),null!==t&&"function"===typeof t.renderContents&&fetch(e+"cart?sections=cart-drawer,cart-icon-bubble",{method:"GET",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"}}).then((function(e){var n=document.querySelector("cart-drawer.drawer.is-empty");null!==n&&n.classList.remove("is-empty");try{return e.clone().json().then((function(e){try{var n={sections:e};t.renderContents(n)}catch(o){console.error(o)}}))}catch(o){console.error(o)}})).catch((t=>{}))}catch(n){}})();else if("61086662810"==t)(()=>{try{var t=document.querySelector("mini-cart")||document.querySelector("cart-drawer")||document.querySelector("product-form"),e=window.location.origin?window.location.origin+"/":window.location.protocol+"//"+window.location.host+"/";if(Shopify.locale.length>0&&(e+=Shopify.locale+"/"),null!==t&&"function"===typeof t.renderContents){var n=t.getSectionsToRender().map((t=>t.id));fetch(e+"cart?sections="+n.toString(),{method:"GET",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"}}).then((function(e){try{return e.clone().json().then((function(e){try{var n={sections:e};t.renderContents(n)}catch(o){console.error(o)}}))}catch(n){console.error(n)}})).catch((t=>{}))}}catch(o){console.error(o)}})();else if("5827756145"==t){let t=document.getElementById("cart-config");t=JSON.parse(t.innerHTML||"{}"),"undefined"!==typeof window.Shopify&&"undefined"!==typeof window.Shopify.theme&&"undefined"!==typeof window.Shopify.theme.ajaxCart&&"function"===typeof window.Shopify.theme.ajaxCart.updateView&&(Shopify.theme.ajaxCart.updateView({cart_url:"/cart"},i),Shopify.theme.ajaxCart.showDrawer(t))}else if("73454354741"==t)0!==Object.keys(i).length&&r(i);else if("71830962487"==t)"undefined"!==typeof window.Shopify&&"function"===typeof window.Shopify.onCartUpdate&&-1===Shopify.onCartUpdate.toString().indexOf("There are now")&&window.Shopify.onCartUpdate(i,!0);else if("81516986679"==t||"1293622"==t||"73143124251"==t)document.documentElement.dispatchEvent(new CustomEvent("apps:product-added-to-cart",{bubbles:!0}));else if("78232846646"==t){const t=await fetch("/?section_id=cart-drawer"),e=await t.text(),n=document.createElement("div");n.innerHTML=e;const o=n.querySelector(".cart-drawer").innerHTML;document.querySelector(".cart-drawer").innerHTML=o,document.querySelector(".cart-drawer").classList.add("cart-drawer--active")}else if("50529403072"==t){new theme.Drawers("CartDrawer","cart").open()}else if("66789277933"==t){var d=await fetch("/?section_id=ajax-cart-drawer"),l=await d.text();const t=(new DOMParser).parseFromString(l,"text/html").getElementById("shopify-section-ajax-cart-drawer"),e=t.innerHTML;let n,o=document.querySelector("[data-cart-drwaer-body]"),r=0;t.querySelector("[data-cart-wrapper]")&&(r=parseInt(t.querySelector("[data-cart-wrapper]").getAttribute("data-item-count")),n=t.querySelector("[data-cart-wrapper]").getAttribute("data-item-total")),o.innerHTML=e,r>0&&getQuantityElement(o),cartCountUpdate(r),cartNoteUpdate();let a=document.querySelector("#ajax-cart-drawer[data-side-drawer]");document.querySelector("[data-cart-wrapper]").querySelectorAll("[data-add-to-cart]");getCartItemRemoveElements(a),cartGiftWrapElement(a),cartTermhandlerClick(),cartTermsHandler()}else if("83103121690"==t||"90617479486"==t)document.querySelector(".cart-count").click();else if("19827331"==t){const t=document.getElementById("main-cart-items");if(t){const e=await fetch("/cart"),n=await e.text(),o=(new DOMParser).parseFromString(n,"text/html").getElementById("main-cart-items");o&&(t.innerHTML=o.innerHTML)}$jq(".slider").removeClass("hidden-block").addClass("show-cart-slider")}else if("829620282"==t)try{$.get("/?view=cart",(t=>{const e=document.getElementById("osc-main-wrapper");e.innerHTML=t,updateQty(),removeQty(),$("#osc-icon-span").click(osCloseCart);const n=e.querySelector("#osc-total");calculateProgressBar(n.dataset.totalPrice),osOpenCart()})),document.getElementById("os-pp-error").innerHTML="";const t=parseInt(document.getElementById("osh-cart-bubble").innerHTML)+parseInt(1);$("#osh-cart-bubble").css("display","flex"),$("#osh-cart-bubble").text(t)}catch(h){console.log(h)}else if("24366857"==t||"68234805419"==t||"86879863060"==t){var s,u;if(!c)return;let t=document.querySelector("product-form");const e=t.querySelector("form");if(e){const t=e.querySelector('input[name="id"]');t&&(t.value=c)}null===t||void 0===t||null===(s=t.handleFormSubmit)||void 0===s||s.call(t,{preventDefault:()=>{}}),null===t||void 0===t||null===(u=t.onSubmitHandler)||void 0===u||u.call(t,{preventDefault:()=>{}})}else{if("58273038492"==t&&$("#cart-drawer").toggleClass("active"),"62335516854"==t)(new theme.CartDrawer).open();"59993653290"==t&&$("body").toggleClass("show-cart-summary").hasClass("show-cart-summary"),document.documentElement.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{}})),document.documentElement.dispatchEvent(new CustomEvent("cart:refresh:opend",{bubbles:!0,detail:{}})),function(t){var e,n;try{var o=t.item_count;if($("[data-cart-item-count]").html(o),$(".header__cart-count").html(o),$(".site-header__cart-count span[data-cart-count]").html(o),$("#CartCount [data-cart-count]").length>0?$("#CartCount [data-cart-count]").html(o):$("#CartCount").length>0&&$("#CartCount").html($("#CartCount").html().replace(/(\d+)/,t.item_count)),$("#CartCount.hide").length>0&&$("#CartCount.hide").removeClass("hide"),$("#site-cart-handle .count-holder .count").length>0&&$("#site-cart-handle .count-holder .count").html($("#site-cart-handle .count-holder .count").html().replace(/(\d+)/,t.item_count)),$("#minicart .count.cart-target").length>0&&$("#minicart .count.cart-target").html($("#minicart .count.cart-target").html().replace(/(\d+)/,t.item_count)),$("#sidebar #meta .count").length>0&&$("#sidebar #meta .count").html($("#sidebar #meta .count").html().replace(/(\d+)/,t.item_count)),document.querySelectorAll(".js-drawer-open-cart").length>0&&document.querySelectorAll(".js-drawer-open-cart")[0].click(),$(".site-header__cart .site-header__cart-indicator").length>0&&($(".site-header__cart .site-header__cart-indicator").html($(".site-header__cart .site-header__cart-indicator").html().replace(/(\d+)/,t.item_count)),t.item_count>0&&$(".site-header__cart .site-header__cart-indicator").removeClass("hide")),$(".cart-count").length>0&&$(".cart-count").html($(".cart-count").html().replace(/(\d+)/,t.item_count)),$(".cartCount[data-cart-count]").length>0&&$(".cartCount[data-cart-count]").html($(".cartCount[data-cart-count]").html().replace(/(\d+)/,t.item_count)),$("[data-js-cart-count-desktop]").length>0&&($("[data-js-cart-count-desktop]").html(t.item_count),$("[data-js-cart-count-desktop]").attr("data-js-cart-count-desktop",t.item_count)),$(".cart-item-count-header").length>0){var r=$(".cart-item-count-header").first();!0===r.hasClass("cart-item-count-header--total")?r.find(".money").length&&(r=r.find(".money").first()).html(bndlr.formatPrice(t.items_subtotal_price)):r.html(r.html().replace(/(\d+)/,t.item_count))}if($("#CartCost").length>0&&"undefined"!==typeof theme&&"undefined"!==typeof theme.moneyFormat){var a=utils.formatMoney(t.items_subtotal_price,theme.moneyFormat);$("#CartCost").html(a)}if("function"==typeof refreshCart&&refreshCart(t),"undefined"!==typeof slate&&"undefined"!==typeof slate.cart&&"function"==typeof slate.cart.updateCart&&slate.cart.updateCart(),"undefined"!==typeof ajaxCart&&"function"===typeof ajaxCart.load&&ajaxCart.load(),$(".mega-nav-count.nav-main-cart-amount.count-items").length>0&&($(".mega-nav-count.nav-main-cart-amount.count-items").html($(".mega-nav-count.nav-main-cart-amount.count-items").html().replace(/(\d+)/,t.item_count)),$(".mega-nav-count.nav-main-cart-amount.count-items.hidden").removeClass("hidden")),$("#cart-icon-bubble").length>0){var c='#cart-icon-bubble .cart-count-bubble span[aria-hidden="true"]';$(c).length>0?$(c).html($(c).html().replace(/(\d+)/,t.item_count)):$("#cart-icon-bubble").append('<div class="cart-count-bubble"><span aria-hidden="true">'+t.item_count+"</span></div>")}"undefined"!==typeof Shopify&&"undefined"!==typeof Shopify.updateQuickCart&&Shopify.updateQuickCart(t),"undefined"!==typeof bcActionList&&"function"===typeof bcActionList.atcBuildMiniCartSlideTemplate&&(bcActionList.atcBuildMiniCartSlideTemplate(t),"function"===typeof openMiniCart&&openMiniCart()),$(".custom-cart-eye-txt").length>0&&$(".custom-cart-eye-txt").html($(".custom-cart-eye-txt").html().replace(/(\d+)/,t.item_count)),$(".cart_count").length>0&&$(".cart_count").each((function(e,n){$(n).html($(n).html().replace(/(\d+)/,t.item_count))})),document.querySelector(".cart-count")&&(document.querySelector(".cart-count").innerHTML=document.querySelector(".cart-count").innerHTML.replace(/(\d+)/,t.item_count)),$(".cart-count-bubble [data-cart-count]").length>0&&$(".cart-count-bubble [data-cart-count]").html($(".cart-count-bubble [data-cart-count]").html().replace(/(\d+)/,t.item_count)),$(".cart-count-bubble span.visually-hidden").length>0&&$(".cart-count-bubble span.visually-hidden").html($(".cart-count-bubble span.visually-hidden").html().replace(/(\d+)/,t.item_count)),$(".header-cart-count .cart_count_val").length>0&&($(".header-cart-count .cart_count_val").html(t.item_count),$(".header-cart-count").removeClass("empty_cart_count")),"undefined"!==typeof Shopify&&"undefined"!==typeof Shopify.updateCartInfo&&$(".top-cart-holder .cart-target form .cart-info .cart-content").length>0&&Shopify.updateCartInfo(t,".top-cart-holder .cart-target form .cart-info .cart-content");var i=new CustomEvent("wetheme-toggle-right-drawer",{detail:{type:"cart",forceOpen:void 0,params:{cart:t}}});document.documentElement.dispatchEvent(i),"undefined"!==typeof window.vndHlp&&"function"===typeof window.vndHlp.refreshCart&&window.vndHlp.refreshCart(t);try{"function"===typeof window.renderCart&&(window.renderCart(t),t.items.length>0&&$(".mini-cart.is-empty").removeClass("is-empty"))}catch(h){}try{"undefined"!==typeof window.SATCB&&"undefined"!==typeof window.SATCB.Helpers&&"function"===typeof window.SATCB.Helpers.openCartSlider&&window.SATCB.Helpers.openCartSlider()}catch(h){}try{document.dispatchEvent(new CustomEvent("theme:cart:change",{detail:{cart:t,cartCount:t.item_count},bubbles:!0}))}catch(h){}if("undefined"!==typeof window.cartStore&&"function"===typeof window.cartStore.setState&&window.cartStore.setState({justAdded:{},popupActive:!0,item_count:t.item_count,items:t.items,cart:t}),"undefined"!==typeof window.Shopify&&"function"===typeof window.Shopify.onCartUpdate&&-1===Shopify.onCartUpdate.toString().indexOf("There are now")&&window.Shopify.onCartUpdate(t,!0),"undefined"!==typeof theme&&"undefined"!==typeof theme.Cart&&"function"===typeof theme.Cart.setCurrentData&&theme.Cart.setCurrentData(t),"undefined"!==typeof window.halo&&"function"===typeof window.halo.updateSidebarCart){window.halo.updateSidebarCart(t);var d=$("[data-cart-sidebar]");d.length>0&&d[0].click()}if("undefined"!==typeof window.Shopify&&"undefined"!==typeof window.Shopify.theme&&"undefined"!==typeof window.Shopify.theme.ajaxCart&&"function"===typeof window.Shopify.theme.ajaxCart.updateView&&Shopify.theme.ajaxCart.updateView({cart_url:"/cart"},t),"undefined"!==typeof window.theme&&"undefined"!==typeof window.theme.cart&&"function"===typeof window.theme.cart.updateAllHtml)try{window.theme.cart.updateAllHtml(),window.theme.cart.updateTotals(t),document.querySelector(".header--cart-toggle").click()}catch(h){}if("function"===typeof monster_setCartItems)try{monster_setCartItems(t.items)}catch(h){console.error(h)}try{"undefined"!==typeof window.refreshCartContents&&window.refreshCartContents(t)}catch(h){}$(".header-actions [data-header-cart-count]").length>0&&$(".header-actions [data-header-cart-count]").html(t.item_count),window.dispatchEvent(new Event("update_cart")),"undefined"!==typeof clientSpecifics&&"undefined"!==typeof clientSpecifics.update_cart&&clientSpecifics.update_cart.trigger(t)}catch(h){console.log(h)}try{var l=document.querySelector(".minicart__outerbox"),s=window.location.origin?window.location.origin+"/":window.location.protocol+"//"+window.location.host+"/";Shopify.locale.length>0&&(s+=Shopify.locale+"/"),null!==l&&"function"===typeof window.cartContentUpdate&&(sectionsToRender=l.dataset.section,fetch(s+"cart?sections="+sectionsToRender,{method:"GET",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"}}).then((function(e){try{return e.clone().json().then((function(e){t.sections=e,window.cartContentUpdate(t,l,sectionsToRender)}))}catch(h){console.error(h)}})))}catch(h){console.error(h)}if("undefined"!==typeof window.SLIDECART_UPDATE)try{window.SLIDECART_UPDATE()}catch(h){console.log(h)}if("undefined"!==typeof window.SLIDECART_OPEN&&setTimeout((function(){try{window.SLIDECART_OPEN()}catch(h){console.log(h)}}),500),"undefined"!==typeof Shopify&&"undefined"!==typeof Shopify.theme&&"undefined"!==typeof Shopify.theme.jsAjaxCart&&"function"===typeof Shopify.theme.jsAjaxCart.updateView&&Shopify.theme.jsAjaxCart.updateView(),"undefined"!==typeof CartJS&&"function"===typeof CartJS.getCart)try{CartJS.getCart()}catch(h){console.log(h)}try{$(".sp-cart .sp-dropdown-toggle").length&&"undefined"!==typeof Shopify&&"function"===typeof Shopify.getCart&&Shopify.getCart(),$("form.cart-drawer").length>0&&($(".cart-drawer input").first().trigger("blur"),setTimeout((function(){$(".cart-drawer input").first().trigger("input")}),350))}catch(h){console.log(h)}try{var u=document.querySelector("m-cart-drawer");null!==u&&"function"===typeof u.onCartDrawerUpdate&&(u.onCartDrawerUpdate(),"function"===typeof u.open&&u.open())}catch(h){console.log(h)}try{document.dispatchEvent(new CustomEvent("cart:refresh"))}catch(h){}try{document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0}))}catch(h){}if("undefined"!==typeof window.HsCartDrawer&&"function"===typeof window.HsCartDrawer.updateSlideCart&&debounce("hscartdrawer",(function(){try{HsCartDrawer.updateSlideCart()}catch(h){console.log(h)}}),100),"function"===typeof window.HS_SLIDE_CART_UPDATE&&debounce("hscartdrawer2",(function(){try{window.HS_SLIDE_CART_UPDATE()}catch(h){console.log(h)}}),100),"undefined"!==typeof window.HS_SLIDE_CART_OPEN&&"function"===typeof window.HS_SLIDE_CART_OPEN&&debounce("hscartdraweropen",(function(){try{window.HS_SLIDE_CART_OPEN()}catch(h){console.log(h)}}),100),"undefined"!==typeof theme&&"undefined"!==typeof theme.Cart&&"function"===typeof theme.Cart.updateCart&&theme.Cart.updateCart(),"undefined"!==typeof window.cart&&"function"===typeof window.cart.getCart&&window.cart.getCart(),"function"===typeof window.updateMiniCartContents)try{window.updateMiniCartContents()}catch(h){}if("function"===typeof window.loadEgCartDrawer)try{window.loadEgCartDrawer()}catch(h){}try{document.dispatchEvent(new CustomEvent("cart:build"))}catch(h){}try{document.dispatchEvent(new CustomEvent("obsidian:upsell:refresh")),document.dispatchEvent(new CustomEvent("obsidian:upsell:open"))}catch(h){}var m=document.getElementById("site-cart");if(null!==m)try{m.show()}catch(h){}if("undefined"!==typeof window.theme&&"function"===typeof window.theme.updateCartSummaries)try{window.theme.updateCartSummaries()}catch(h){}if("undefined"!==typeof window.CD_REFRESHCART)try{window.CD_REFRESHCART()}catch(h){console.log(h)}if("undefined"!==typeof window.CD_OPENCART&&setTimeout((function(){try{window.CD_OPENCART()}catch(h){console.log(h)}}),500),"function"===typeof window.buildCart)try{window.buildCart()}catch(h){console.log(h)}if("undefined"!==typeof window.PXUTheme&&"undefined"!==typeof window.PXUTheme.jsAjaxCart&&"function"===typeof window.PXUTheme.jsAjaxCart.updateView)try{window.PXUTheme.jsAjaxCart.updateView()}catch(h){}if("undefined"!==typeof window.theme&&"function"===typeof window.theme.addedToCartHandler)try{window.theme.addedToCartHandler({})}catch(h){}try{i=new Event("tcustomizer-event-cart-change"),document.dispatchEvent(i)}catch(h){}try{document.dispatchEvent(new CustomEvent("dispatch:cart-drawer:refresh",{bubbles:!0})),setTimeout((function(){document.dispatchEvent(new CustomEvent("dispatch:cart-drawer:open"))}),500)}catch(h){}try{var p=document.querySelector("cart-notification")||document.querySelector("cart-drawer");s=window.location.origin?window.location.origin+"/":window.location.protocol+"//"+window.location.host+"/",Shopify.locale.length>0&&(s+=Shopify.locale+"/"),null!==p&&"function"===typeof p.renderContents&&fetch(s+"cart?sections=cart-drawer,cart-icon-bubble",{method:"GET",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"}}).then((function(t){var e=document.querySelector("cart-drawer.drawer.is-empty");null!==e&&e.classList.remove("is-empty");try{return t.clone().json().then((function(t){try{var e={sections:t};p.renderContents(e)}catch(h){console.error(h)}}))}catch(h){console.error(h)}}))}catch(h){console.error(h)}try{var f=document.querySelector("mini-cart")||document.querySelector("cart-drawer")||document.querySelector("product-form");if(s=window.location.origin?window.location.origin+"/":window.location.protocol+"//"+window.location.host+"/",Shopify.locale.length>0&&(s+=Shopify.locale+"/"),null!==f&&"function"===typeof f.renderContents){var w=f.getSectionsToRender().map((t=>t.id));fetch(s+"cart?sections="+w.toString(),{method:"GET",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"}}).then((function(t){try{return t.clone().json().then((function(t){try{var e={sections:t};f.renderContents(e)}catch(h){console.error(h)}}))}catch(h){console.error(h)}}))}}catch(h){console.error(h)}try{f=document.querySelector("mini-cart")||document.querySelector("cart-drawer")||document.querySelector("product-form"),s=window.location.origin?window.location.origin+"/":window.location.protocol+"//"+window.location.host+"/",null!==f&&"function"===typeof f.renderContents&&(w=f.getSectionsToRender().map((t=>null===t||void 0===t?void 0:t.section)),fetch(s+"cart?sections="+w.toString(),{method:"GET",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"}}).then((function(t){try{return t.clone().json().then((function(t){try{var e={sections:t};f.renderContents(e)}catch(h){console.error(h)}}))}catch(h){console.error(h)}})))}catch(h){console.error(h)}null===(e=document)||void 0===e||null===(n=e.documentElement)||void 0===n||n.dispatchEvent(new CustomEvent("cart:refresh:opend",{bubbles:!0,detail:{}})),console.log("entered")}(i)}setTimeout(e,n)}else{console.log("Executing cart refresh script..");document.getElementById("whatsmorecart").value=Math.random()}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[988],{22:function(t,e,o){o.d(e,{$S:function(){return a},_:function(){return i},b4:function(){return n},dl:function(){return r},nN:function(){return d},tn:function(){return s},vF:function(){return l}});const i="device_type",r="device_mode",n="mobile",l="tablet",a="desktop",s="portrait",d="landscape"},932:function(t,e,o){var i=o(5830),r=o(1941),n=o(22),l=o(1348);e.A=function(t){const[e,o,a]=(0,r.A)(),[s]=(0,i.QN)("whatmoreLandscapePadding"),[d]=(0,i.QN)("whatmoreShopId"),[p]=(0,i.QN)("whatmoreVideoTileSize"),[c]=(0,i.QN)("whatmoreVideoTileSizePortrait"),u=a>=1025,y="portrait"==e?c:p,m=!("portrait"!=e||!(a>=481)),v=y/100*1.3*.5,h=y/100;var f=Math.min(a,o),[x,w,g,P]=[.6*f*(16/9),.6*f,1.4,0];function b(t){return Math.round(10*t)/10}var N={DEVICE_TYPE:n.b4,DEVICE_MODE:n.tn};if(u){const t=w*v,e=x*v;[x,w,g,P]=[e,t,(a-2*s-2*(0,l.$du)(d))/(1.1*t),s],N[n._]=n.$S,N[n.dl]=n.nN}else if(m){var _=.8*w,j=.8*x;"portrait"==e?(_*=h,j*=h,[x,w,g,P]=[j,_,b(a/(1.2*_)),0],N[n._]=n.vF,N[n.dl]=n.tn):([x,w,g,P]=[j,_,(a-2*s)/(1.1*_),s],N[n._]=n.vF,N[n.dl]=n.nN)}else{_=w,j=x;"portrait"==e?(_=_*h*.9,j=j*h*.9,[x,w,g,P]=[j,_,b(a/(1.15*_)),0],N[n._]=n.b4,N[n.dl]=n.tn):(_=.7*w,j=.7*x,[x,w,g,P]=[j,_,(a-2*s)/(1.1*_),s],N[n._]=n.b4,N[n.dl]=n.nN)}return[x,w,g,P,N]}},1957:function(t,e,o){var i=o(9950),r=o(932),n=(o(4826),o(5830)),l=o(9879),a=o(7509),s=o(22),d=o(1348),p=o(5551),c=o(6594),u=o(8538),y=o(8149),m=o(5727),v=o(7740),h=o(4414);e.A=function(t){var e,o,f,x,w,g,P,b,N,_,j,C,S,M,z,k,F;const[I,$,A,O,R]=(0,r.A)(),T=.5*$;(0,i.useContext)(a.h);const D=(0,n.Xd)("whatmoreUITheme"),W=(0,n.Xd)("whatmoreShopId"),E=(0,n.Xd)("whatmorePrimaryFont"),B=(0,n.Xd)("whatmoreSecondaryColor"),U=t.onClick,V=null===(e=t.isOnFocus)||void 0===e||e,X=null!==(o=t.playOnUnfocus)&&void 0!==o&&o,Y=null!==(f=t.animateOnFocus&&(0,d.n5O)(W))&&void 0!==f&&f,H="portrait"===R[s.dl],K=(H?1.076*$*(0,d.HWj)(W):$*(0,d.N_4)(W))+"px",Q=(H?1.076*$*(0,d.HWj)(W):$*(0,d.N_4)(W))+"px",L=(H?.965*$*(0,d.HWj)(W):.859*$*(0,d.N_4)(W))+"px",G=(0,d.VYo)(W),{whatmoreIsPreviewMode:Z}=(0,i.useContext)(p.B),q=.25*$,J=q+"px",tt=1.25*q+"px",[et,ot]=(0,i.useState)(t.event),[it,rt]=(0,i.useState)(),nt=null!==(x=null===(w=et.products)||void 0===w?void 0:w.find((t=>"active"==t.product_status)))&&void 0!==x?x:null===(g=et.products)||void 0===g?void 0:g[0],lt=Math.round(+(null===nt||void 0===nt?void 0:nt.price)),at=Math.round(+(null===nt||void 0===nt?void 0:nt.compare_price)),st=at&&0!=at&&at>lt?Math.round((at-lt)/at*100):NaN,[dt,pt]=(0,i.useState)(st),[ct,ut]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{(0,d.w4b)(W)?(0,c.fu)(et,(0,d.NCy)(W),W).then((t=>{var e,o,i;ot(t);const r=Math.round(null===(e=t.products)||void 0===e||null===(o=e[0])||void 0===o?void 0:o.price),n=Math.round(null===t||void 0===t||null===(i=t.products[0])||void 0===i?void 0:i.compare_price),l=n&&0!=n&&n>r?Math.round((n-r)/n*100):NaN;pt(l),ut(!0)})):(async()=>{const t=await(0,y.M)(nt,(0,d.NCy)(W),W);rt(t),ut(!0)})()}),[]),(0,h.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top","12px"),t.style.setProperty("margin-bottom","12px"))},className:Y&&!H?V?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",style:{width:$,margin:"0 auto",cursor:"pointer"},onClick:()=>{U(et)},children:["video"===et.event_type&&"55076552858"===W&&!H&&(0,h.jsx)("div",{className:"video-event-tile",style:{position:"fixed",marginTop:1.2*T,marginLeft:T/2},children:(0,h.jsx)(m.A,{sx:{color:(0,d.KFN)(et.whatmoreShopId)+" !important",opacity:.8,fontSize:T,filter:"drop-shadow(0 0 15px black);"}})}),(0,h.jsx)("div",{style:{width:$,height:H&&V?"STR2FOC6KG9"==W||"STRDOIDF6O7"==W?I:1.1*I:I,borderRadius:"round"==D?"5px":"0px",boxShadow:"round"==D?G:null,borderWidth:(0,d.YcK)(W),borderColor:(0,d.Fwt)(W),overflow:"hidden"},children:(0,h.jsx)(l.A,{height:(0,d.u06)(W)+" !important",width:"100%",url:et.thumbnail_image,isPlaying:V||X,event:et})}),(0,h.jsxs)("div",{style:{cursor:"pointer",display:"flex",gap:"6px",padding:"12px 4px"},children:[(Z?(0,d.Tr1)(W):(0,d.UmS)(W))&&(null===et||void 0===et||null===(P=et.products)||void 0===P?void 0:P.length)>0&&(0,h.jsx)("div",{style:{maxHeight:tt,maxWidth:J,minWidth:null!==nt&&void 0!==nt&&nt.thumbnail_image?J:"0",overflow:"hidden"},children:(0,h.jsx)("img",{ref:t=>{t&&t.style.setProperty("object-fit",(0,d.KZe)(W),"important")},style:{height:"100%"},src:(null===nt||void 0===nt||null===(b=nt.thumbnail_image)||void 0===b||null===(N=b.split("?"))||void 0===N?void 0:N[0])+"?width=400&height=400",alt:"thumbnail"})}),(0,h.jsxs)("div",{className:"wht-prod-info",style:{display:"flex",flexDirection:"column",gap:"5px"},children:[(0,h.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,d.m5c)(W),"important"),t.style.setProperty("font-size",K,"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",E,"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"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},children:(0,u.v)(null===nt||void 0===nt?void 0:nt.title)}),ct&&(0,d.Nzx)(W)&&(0,h.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px",flexDirection:(0,d.vw2)(W)?"row":"row-reverse",justifyContent:(0,d.vw2)(W)?"flex-start":"flex-end"},children:[(0,h.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,d.m5c)(W),"important"),t.style.setProperty("font-size",Q,"important"),t.style.setProperty("font-family",E,"important"),t.style.setProperty("white-space","nowrap","important"),t.style.setProperty("width","fit-content","important"))},style:{textAlign:"left",fontWeight:"normal"==(0,d.i6j)(W)?"normal":"bold"},children:(0,c.Sb)(parseFloat((0,v.U)()?(null!==(_=null===it||void 0===it||null===(j=it.variants)||void 0===j||null===(C=j[0])||void 0===C?void 0:C.price)&&void 0!==_?_:null===it||void 0===it?void 0:it.price)/100:null===nt||void 0===nt?void 0:nt.price)," ",W,null===(S=et.products[0])||void 0===S?void 0:S.currency)}),!isNaN(at)&&at>lt&&(0,h.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,d.gld)(W),"important"),t.style.setProperty("font-size",Q,"important"),t.style.setProperty("font-family",E,"important"),t.style.setProperty("width","fit-content","important"),t.style.setProperty("white-space","nowrap","important"))},style:{textDecoration:"line-through"},children:(0,c.Sb)(parseFloat((0,v.U)()?(null!==(M=null===it||void 0===it||null===(z=it.variants)||void 0===z||null===(k=z[0])||void 0===k?void 0:k.compare_at_price)&&void 0!==M?M:null===it||void 0===it?void 0:it.compare_at_price)/100:null===nt||void 0===nt?void 0:nt.compare_price)," ",W,null===(F=et.products[0])||void 0===F?void 0:F.currency)}),"56352899156"==W&&(0,d.Nzx)(W)&&ct&&!isNaN(dt)&&0!=dt&&(0,h.jsx)("div",{style:{display:"flex",backgroundColor:"green"==(0,d.ub$)(W)?"#343434"==B?(0,d.ub$)(W):B:(0,d.ub$)(W),alignItems:"center",borderRadius:(0,d.v8m)(W)+"px",width:"fit-content",padding:"3px 4px"},children:(0,h.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,d.BRY)(W),"important"),t.style.setProperty("font-size",L,"important"),t.style.setProperty("font-family",E,"important"),t.style.setProperty("width","fit-content","important"),t.style.setProperty("white-space","nowrap","important"))},children:`${dt}% off`})})]}),(0,d.Nzx)(W)&&ct&&!isNaN(dt)&&0!=dt&&(0,h.jsx)("div",{style:{display:"flex",backgroundColor:"green"==(0,d.ub$)(W)?"#343434"==B?(0,d.ub$)(W):B:(0,d.ub$)(W),alignItems:"center",borderRadius:(0,d.v8m)(W)+"px",width:"fit-content",padding:(0,d.Cf)(W)?"3px 6px":"0px"},children:(0,d.Cf)(W)?(0,h.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,d.BRY)(W),"important"),t.style.setProperty("font-size",L,"important"),t.style.setProperty("font-family",E,"important"))},children:`${dt}% Off`}):(0,h.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,d._zx)(W),"important"),t.style.setProperty("font-size",L,"important"),t.style.setProperty("font-family",(0,d.ogW)(W),"important"))},children:(0,d.rsz)(W)})})]})]})]})}},4669:function(){},4826:function(){},6042:function(){},7136:function(t,e,o){var i=o(9950),r=o(932),n=o(7509),l=o(5830),a=o(4414);e.A=function(t){var[e,o]=(0,r.A)();(0,i.useContext)(n.h);const s=(0,l.Xd)("whatmoreShopId");return t.event,(0,a.jsx)("div",{style:{margin:"0 auto",width:"8968077397"==s?void 0:o,aspectRatio:"8968077397"==s?9/16:void 0,height:"8968077397"==s?"100%":e,overflow:"hidden"}})}},7229:function(){},7509:function(t,e,o){o.d(e,{h:function(){return i}});const i=(0,o(9950).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},9130:function(){},9733:function(){}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[474],{2375:function(e,t,n){var i=n(4994);t.A=void 0;var o=i(n(9526)),r=n(4414);t.A=(0,o.default)((0,r.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.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility")},3590:function(e,t,n){var i=n(2375),o=n(1348),r=n(5830),s=n(4414);function l(e){return e<1e3?e:e<1e5?(e/1e3).toFixed(0)+"K":(e/1e5).toFixed(0)+"L"}t.A=function(e){const t=(0,r.Xd)("whatmoreUITheme"),n=(0,r.Xd)("whatmoreShopId"),a=(0,r.Xd)("whatmorePrimaryFont"),c=e.event,d=e.fontSize;if(c.total_views<=0)return(0,s.jsx)(s.Fragment,{});const h=(0,o.FVo)(n);return"template-icon"==h?(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,o.sIk)(n),color:"white",borderRadius:"round"==t?"5px":"0px",borderWidth:(0,o.YcK)(n),borderColor:(0,o.Fwt)(n)},children:(0,s.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:[(0,s.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,s.jsx)(i.A,{sx:{color:(0,o.s0t)(n)+" !important",fontSize:d,fontWeight:"normal"}})}),(0,s.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,s.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,o.s0t)(n),"important"),e.style.setProperty("line-height","120%","important"),e.style.setProperty("font-family",a,"important"),e.style.setProperty("font-size",d,"important"),e.style.setProperty("min-height","0","important"),e.style.setProperty("display","inline","important"),e.style.setProperty("width","auto","important"))},style:{fontWeight:"normal"},children:" "+l(c.total_views)+" "})})]})})}):"template-text"==h?(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{style:{width:"fit-content",padding:"2px",paddingLeft:"6px",paddingRight:"6px",backgroundColor:(0,o.sIk)(n),color:"white",borderRadius:"round"==t?"5px":"0px",borderWidth:(0,o.YcK)(n),borderColor:(0,o.Fwt)(n)},children:(0,s.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"center",gap:"3px",alignItems:"center"},children:(0,s.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,s.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,o.s0t)(n),"important"),e.style.setProperty("line-height","120%","important"),e.style.setProperty("font-family",a,"important"))},style:{fontSize:d,fontWeight:"bold"},children:" "+l(c.total_views)+" views"})})})})}):void 0}},6945:function(e,t,n){n.r(t);var i=n(9950),o=n(340),r=n(5089),s=n(5873),l=(n(3997),n(9130),n(4669),n(9733),n(4365),n(7229),n(6042),n(572)),a=n(8603),c=n(9946),d=n(9094),h=n(932),p=n(1941),u=n(5491),m=n.n(u),f=n(5830),y=n(7509),g=n(7136),x=n(1348),v=n(5551),w=n(5620),j=n(1351),C=n(6157),S=n(6641),I=n(1957),P=n(4414);const F=(0,a.A)({key:"whatmore-css-hv"});function A(e){const[t,n,o]=(0,h.A)(),[r,s,l]=(0,p.A)(),a=(0,f.Xd)("whatmoreShopId"),d=e.events,u=e.onClick,m=o*(0,x.kcl)(a),y=(0,x.cbh)(a),[S,F]=(0,i.useState)(y?d.length:m),{whatmoreWidgetSourceDetails:A}=(0,i.useContext)(v.B);return(0,i.useEffect)((()=>{S<=m&&F((e=>e+m))}),[m]),(0,P.jsx)("div",{className:"whatmore-events-carousel-portrait",style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,P.jsx)("div",{style:{width:"8968077397"===a&&d.length<4?"200px":l,height:"fit-content"},children:(0,P.jsx)(c.RC,{slidesPerView:d.length>1?"51394281658"==a||"55820812447"==a?2:m:1,initialSlide:d.length>1&&"51394281658"!=a&&"55820812447"!=a?1:0,centeredSlides:"51394281658"!=a&&"55820812447"!=a,centeredSlidesBounds:!1,watchSlidesProgress:!0,touchRatio:"51394281658"==a?1:.5,onSlideChange:e=>{(0,j.UM)({userInteractionType:C.O.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:A}),e.realIndex>e.previousIndex&&F((e=>e+m))},loop:y&&d.length>2,children:d.map(((e,t)=>t<=S&&(0,P.jsx)(c.qr,{children:({isActive:t,isPrev:n,isNext:i,isVisible:o})=>n||i||t?(0,x.DmD)(a)?(0,P.jsx)(I.A,{isOnFocus:t&&o,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{u(e)}}):(0,P.jsx)(w.A,{isOnFocus:("51394281658"==a||"55820812447"==a||t)&&o,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{u(e)}}):(0,P.jsx)(g.A,{})},"whatmore-event-tile-portrait-"+e.index)))})})})}function b(e){const[t,n,o,r]=(0,h.A)(),[s,l]=(0,i.useState)(-1),a=(0,f.Xd)("whatmoreShopId"),p=e.onClick,u=e.events,y=(0,x.cbh)(a),[S,F]=(0,i.useState)(y?u.length:o),A="8968077397"==a||"19501891"==a?Math.floor(Math.min(o,u.length)):Math.min(o,u.length),b=Math.floor(Math.min(4,u.length)),{whatmoreWidgetSourceDetails:k}=(0,i.useContext)(v.B),O=(0,i.useRef)(null);return(0,i.useEffect)((()=>{if(O.current){const e="8968077397"===a&&u.length>=4?.7:(0,x.fHt)(a),t=n*A*e+"px";u.length<4||"8968077397"===a?O.current.style.setProperty("width",t,"important"):O.current.style.width=t}}),[n,A,a,S,u.length]),(0,i.useEffect)((()=>{S<=o&&F((e=>e+o))}),[o]),(0,P.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",paddingLeft:r+"px",paddingRight:r+"px"},className:"whatmore-events-carousel-landscape",children:(0,P.jsx)("div",{ref:O,style:{height:"100%"},children:(0,P.jsx)(c.RC,{slidesPerView:"8968077397"==a?b:A,watchSlidesProgress:!0,modules:[d.Vx],navigation:!0,slidesPerGroup:"8968077397"==a||"19501891"==a?Math.min(2,u.length):parseInt(A),onSlideChange:e=>{(0,j.UM)({userInteractionType:C.O.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:k}),e.realIndex>e.previousIndex&&F((e=>e+o))},spaceBetween:0,loop:(y||"8968077397"==a||"19501891"==a)&&u.length>4,style:{height:"100%"},children:u.map(((e,t)=>{const n=m()((()=>l(t)),300);return t<=S&&(0,P.jsx)(c.qr,{onMouseEnter:()=>{n()},onMouseLeave:()=>{n.cancel(),l(-1)},style:{height:"100%"},children:({isActive:n,isPrev:i,isNext:o,isVisible:r})=>r||"8968077397"==a||"19501891"==a&&(i||o)?(0,x.DmD)(a)?(0,P.jsx)(I.A,{isOnFocus:t==s,playOnUnfocus:!(0,x.aO7)(a)||t==parseInt(A/2)&&-1==s,animateOnFocus:!0,event:e,onClick:()=>{p(e)}}):(0,P.jsx)(w.A,{isOnFocus:t==s,playOnUnfocus:!(0,x.aO7)(a)||t==parseInt(A/2)&&-1==s,animateOnFocus:!0,event:e,onClick:()=>{p(e)}}):(0,P.jsx)(g.A,{})},"whatmore-event-tile-landscape-"+e.index)}))})})})}t.default=function(e){const[t,n,a]=(0,p.A)(),[c]=(0,f.QN)("whatmoreShopId"),[d]=(0,f.QN)("whatmorePrimaryColor"),[h]=(0,f.QN)("whatmoreTitleFont"),u="portrait"==t?(0,f.Xd)("whatmoreTitleFontSizePortrait"):(0,f.Xd)("whatmoreTitleFontSize"),{whatmoreRootId:m}=(0,i.useContext)(v.B),g=(0,f.Xd)("whatmoreCollectionHeading"),{whatmoreIsCollectionsTemplate:w}=(0,i.useContext)(v.B),j=e.events,C=e.onClick,I=h;function k(e){C(e)}return(0,i.useEffect)((()=>{(0,S.Fk)("Video shopping powered by Whatmore!")}),[]),(0,i.useEffect)((()=>{s.Sn.forEach((e=>{var t;const n=null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-a"]');if(!n)return;n&&e&&(e.style.minHeight="0px")}))}),[]),delete r.Ay.styles.global,(0,P.jsx)(l.C,{value:F,children:(0,P.jsx)("div",{className:"whatmore-carousel-events",style:{height:"100%"},children:(0,P.jsx)(o.s,{theme:r.Ay,cssVarsRoot:m,resetCSS:!1,children:(0,P.jsxs)(y.h.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[e.heading.trim().length>0||w?(0,P.jsx)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:(0,P.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-family",I,"important"),e.style.setProperty("font-size",u+"px","important"))},style:{color:d,backgroundClip:"text",textAlign:"center",fontWeight:(0,x.Odx)(c),lineHeight:(0,x.L0y)(c),letterSpacing:(0,x.l3V)(c)},children:w?"W"!==g?g:"":e.heading})}):(0,P.jsx)(P.Fragment,{}),"landscape"===t?(0,P.jsx)(b,{events:j,onClick:k}):(0,P.jsx)(A,{events:j,onClick:k})]})})})})}},7973:function(e,t,n){n.d(t,{B:function(){return s},b:function(){return r}});var i=n(1348),o=n(5830);function r(e,t=""){const n=(0,o.Xd)("whatmoreShopId");return"shopify"!=(0,i.NCy)(n)?"STRNV8MHJTF"==n?e+"?format=webp":e:e+t}function s(e){var t;if(null!==e&&void 0!==e&&e.includes("https://w-media.b-cdn.net/process-media"))return"image";const n=null===e||void 0===e||null===(t=e.trim())||void 0===t?void 0:t.split("?")[0],i=/\.(jpeg|jpg|gif|png|svg|webp)$/i,o=/\.(mp4|mov|wmv|avi|flv|mkv)$/i;return null!==i&&void 0!==i&&i.test(n)?"image":null!==o&&void 0!==o&&o.test(n)?"video":void 0}}}]);
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[485],{22:function(t,e,o){o.d(e,{$S:function(){return l},_:function(){return n},b4:function(){return i},dl:function(){return r},nN:function(){return d},tn:function(){return s},vF:function(){return a}});const n="device_type",r="device_mode",i="mobile",a="tablet",l="desktop",s="portrait",d="landscape"},932:function(t,e,o){var n=o(5830),r=o(1941),i=o(22),a=o(1348);e.A=function(t){const[e,o,l]=(0,r.A)(),[s]=(0,n.QN)("whatmoreLandscapePadding"),[d]=(0,n.QN)("whatmoreShopId"),[c]=(0,n.QN)("whatmoreVideoTileSize"),[p]=(0,n.QN)("whatmoreVideoTileSizePortrait"),u=l>=1025,h="portrait"==e?p:c,m=!("portrait"!=e||!(l>=481)),f=h/100*1.3*.5,v=h/100;var x=Math.min(l,o),[y,g,w,j]=[.6*x*(16/9),.6*x,1.4,0];function b(t){return Math.round(10*t)/10}var C={DEVICE_TYPE:i.b4,DEVICE_MODE:i.tn};if(u){const t=g*f,e=y*f;[y,g,w,j]=[e,t,(l-2*s-2*(0,a.$du)(d))/(1.1*t),s],C[i._]=i.$S,C[i.dl]=i.nN}else if(m){var S=.8*g,M=.8*y;"portrait"==e?(S*=v,M*=v,[y,g,w,j]=[M,S,b(l/(1.2*S)),0],C[i._]=i.vF,C[i.dl]=i.tn):([y,g,w,j]=[M,S,(l-2*s)/(1.1*S),s],C[i._]=i.vF,C[i.dl]=i.nN)}else{S=g,M=y;"portrait"==e?(S=S*v*.9,M=M*v*.9,[y,g,w,j]=[M,S,b(l/(1.15*S)),0],C[i._]=i.b4,C[i.dl]=i.tn):(S=.7*g,M=.7*y,[y,g,w,j]=[M,S,(l-2*s)/(1.1*S),s],C[i._]=i.b4,C[i.dl]=i.nN)}return[y,g,w,j,C]}},4063:function(t,e,o){var n=o(9950),r=o(3247),i=o(3731),a=o(5830),l=o(5144),s=o(4414);e.A=function(t){var e,o;const[d,c]=(0,n.useState)(!1),[p,u]=(0,n.useState)(!1),[h]=(0,a.QN)("whatmoreSecondaryColor"),[m]=(0,a.QN)("whatmoreSecondaryColorShade600"),[f]=(0,a.QN)("whatmoreSecondaryColorShade300"),[v]=(0,a.QN)("whatmorePrimaryFont"),x=t.onClick,y=t.icon,g=null!==(e=t.borderRadius)&&void 0!==e?e:"sm",w=null!==(o=t.baseFontSize)&&void 0!==o?o:12;return(0,s.jsxs)(r.az,{display:"flex",alignItems:"center",width:"fit-content",height:"fit-content",boxShadow:"lg",borderRadius:g,backgroundColor:d?f:h,animation:p?l.jd:null,padding:"6px 12px",cursor:"pointer",gap:"6px",onClick:t=>{t.stopPropagation(),u(!0),x()},onMouseEnter:()=>{c(!0)},onMouseLeave:()=>{c(!1)},children:[(0,s.jsx)(i.E,{fontSize:w+"px !important",fontWeight:"normal",sx:{fontFamily:v+" !important",color:"white !important"},children:"VIEW MORE"}),y]})}},4669:function(){},4826:function(){},5144:function(t,e,o){o.d(e,{jd:function(){return r},so:function(){return i}});var n=o(8283);const r=`\n ${n.i7`
|
|
2
|
-
0% { transform: scale(1); }
|
|
3
|
-
50%, { transform: scale(0.95); }
|
|
4
|
-
100% { transform: scale(1); }
|
|
5
|
-
`} 0.2s linear;\n`,i=(n.i7`
|
|
6
|
-
100% {
|
|
7
|
-
-webkit-transform: rotate(360deg);
|
|
8
|
-
transform:rotate(360deg);
|
|
9
|
-
}
|
|
10
|
-
`,n.i7`
|
|
11
|
-
0% {
|
|
12
|
-
opacity: 1;
|
|
13
|
-
transform: translateY(100%);
|
|
14
|
-
}
|
|
15
|
-
10%{
|
|
16
|
-
transform: translateY(0%);
|
|
17
|
-
}
|
|
18
|
-
12%{
|
|
19
|
-
transform: translateY(-5%);
|
|
20
|
-
}
|
|
21
|
-
20%{
|
|
22
|
-
transform: translateY(0%);
|
|
23
|
-
}
|
|
24
|
-
95%{
|
|
25
|
-
opacity: 1;
|
|
26
|
-
transform: scale(1);
|
|
27
|
-
}
|
|
28
|
-
100%{
|
|
29
|
-
opacity: 0;
|
|
30
|
-
}
|
|
31
|
-
`,`\n ${n.i7`
|
|
32
|
-
0% {
|
|
33
|
-
transform: scale(0.3);
|
|
34
|
-
}
|
|
35
|
-
70% {
|
|
36
|
-
transform: scale(1.05);
|
|
37
|
-
}
|
|
38
|
-
100% {
|
|
39
|
-
transform: scale(1);
|
|
40
|
-
}
|
|
41
|
-
`} 0.3s ease-in-out;\n`)},7136:function(t,e,o){var n=o(9950),r=o(932),i=o(7509),a=o(5830),l=o(4414);e.A=function(t){var[e,o]=(0,r.A)();(0,n.useContext)(i.h);const s=(0,a.Xd)("whatmoreShopId");return t.event,(0,l.jsx)("div",{style:{margin:"0 auto",width:"8968077397"==s?void 0:o,aspectRatio:"8968077397"==s?9/16:void 0,height:"8968077397"==s?"100%":e,overflow:"hidden"}})}},7229:function(){},7509:function(t,e,o){o.d(e,{h:function(){return n}});const n=(0,o(9950).createContext)({tileTopMargin:10,tileBottomMMargin:10,tileLeftMargin:10,tileRightMargin:10,showPlayButton:!0})},9418:function(t,e,o){o.r(e),o.d(e,{default:function(){return O}});var n=o(9950),r=(o(4826),o(340)),i=o(5873),a=o(5089),l=(o(3997),o(4669),o(9733),o(4365),o(7229),o(572)),s=o(8603),d=o(932),c=o(1941),p=o(5491),u=o.n(p),h=o(5830),m=o(7509),f=o(7136),v=o(1348),x=o(5551),y=o(1351),g=o(6157),w=o(9879),j=o(8538),b=o(6594),C=o(22),S=o(6613),M=o(8149),P=o(7740),N=o(4414);var k=function(t){var e,o,r,i,a,l,s,c,p,u,f,x,y,g;const[k,I,_,E,A]=(0,d.A)(),F=(0,h.Xd)("whatmoreShopId"),O=(0,h.Xd)("whatmoreLandingLocationType"),z="portrait"===A[C.dl],R=(z?1.076*I*(0,v.HWj)(F):I*(0,v.N_4)(F))+"px",T=(z?1.076*I*(0,v.HWj)(F):I*(0,v.N_4)(F))+"px",X=(z?.965*I*(0,v.HWj)(F):.859*I*(0,v.N_4)(F))+"px",[D,W]=(0,n.useState)(t.event),Y=(0,h.Xd)("whatmoreSecondaryColor");var L=(0,n.useContext)(m.h);const $=null===(e=t.isOnFocus)||void 0===e||e,Q=null!==(o=t.playOnUnfocus)&&void 0!==o&&o,B=t.onClick,U=(0,h.Xd)("whatmoreUITheme"),H=null!==(r=t.animateOnFocus&&(0,v.n5O)(F))&&void 0!==r&&r,[V,q]=(0,n.useState)(!1),G=(0,h.Xd)("whatmorePrimaryFont"),J=null!==(i=null===(a=D.products)||void 0===a?void 0:a.find((t=>"active"==t.product_status)))&&void 0!==i?i:null===(l=D.products)||void 0===l?void 0:l[0],K=Math.round(+(null===J||void 0===J?void 0:J.price)),Z=Math.round(+(null===J||void 0===J?void 0:J.compare_price)),tt=Z&&0!=Z&&Z>K?Math.round((Z-K)/Z*100):NaN,[et,ot]=(0,n.useState)(tt),[nt,rt]=(0,n.useState)();return(0,n.useEffect)((()=>{(0,v.w4b)(F)&&(0,b.fu)(D,(0,v.NCy)(F),F).then((t=>{var e,o,n;W(t),(null===t||void 0===t||null===(e=t.products)||void 0===e||null===(o=e[0])||void 0===o?void 0:o.discount)&&ot(null===t||void 0===t||null===(n=t.products[0])||void 0===n?void 0:n.discount),q(!0)}));(async()=>{const t=await(0,M.M)(J,(0,v.NCy)(F),F);rt(t),q(!0)})()}),[]),(0,N.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top",L.tileTopMargin+"px"),t.style.setProperty("margin-bottom",L.tileBottomMMargin+"px"))},className:H&&!z?$?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",style:{margin:"0 auto",cursor:"pointer",width:I},onClick:()=>{B(D)},children:[(0,N.jsx)("div",{style:{borderRadius:"round"==U?"5%":"0px",boxShadow:"round"==U?"0px 0px 5px 0px #B0B0B0":null,height:k,borderWidth:(0,v.YcK)(F),borderColor:(0,v.Fwt)(F),overflow:"hidden"},children:(0,N.jsx)(w.A,{height:(0,v.u06)(F)+" !important",width:"100%",url:D.thumbnail_image,isPlaying:$||Q||(0,S.At)(),event:D})}),(0,N.jsxs)("div",{className:"wht-prod-info",style:{display:(0,v.AmR)(F)?"flex":"none",flexDirection:"column",padding:"12px 4px",gap:"5px",alignItems:"flex-start"},children:[(0,N.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,v.m5c)(F),"important"),t.style.setProperty("font-size","45034766485"==F&&"product"==O?"9px":R),t.style.setProperty("line-height","120%"),t.style.setProperty("font-family",G,"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"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},children:(0,j.v)(null===J||void 0===J?void 0:J.title)}),V&&(0,v.Nzx)(F)&&(0,N.jsxs)("div",{style:{display:"flex",gap:"12px",flexDirection:(0,v.vw2)(F)?"row":"row-reverse",justifyContent:(0,v.vw2)(F)?"flex-start":"flex-end"},children:[(0,N.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,v.m5c)(F),"important"),t.style.setProperty("font-size","45034766485"==F&&"product"==O?"8px":T),t.style.setProperty("font-family",G,"important"),t.style.setProperty("overflow","hidden","important"))},style:{textAlign:"left",fontWeight:"normal"==(0,v.i6j)(F)?"normal":"bold"},children:(0,b.Sb)(parseFloat((0,P.U)()?(null!==(s=null===nt||void 0===nt||null===(c=nt.variants)||void 0===c||null===(p=c[0])||void 0===p?void 0:p.price)&&void 0!==s?s:null===nt||void 0===nt?void 0:nt.price)/100:(null===J||void 0===J?void 0:J.price)>0?null===J||void 0===J?void 0:J.price:null===J||void 0===J?void 0:J.price_max)," ",F,null===(u=D.products[0])||void 0===u?void 0:u.currency)}),!isNaN(Z)&&Z>K&&(0,N.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,v.gld)(F),"important"),t.style.setProperty("font-size",T),t.style.setProperty("font-family",G,"important"),t.style.setProperty("overflow","hidden","important"))},style:{textDecoration:"line-through"},children:(0,b.Sb)(parseFloat((0,P.U)()?(null!==(f=null===nt||void 0===nt||null===(x=nt.variants)||void 0===x||null===(y=x[0])||void 0===y?void 0:y.compare_at_price)&&void 0!==f?f:null===nt||void 0===nt?void 0:nt.compare_at_price)/100:null===J||void 0===J?void 0:J.compare_price)," ",F,null===(g=D.products[0])||void 0===g?void 0:g.currency)})]}),(0,v.Nzx)(F)&&!isNaN(et)&&0!=et&&V&&(0,N.jsx)("div",{style:{display:(0,v.QNr)(F)?"flex":"none",backgroundColor:"green"===(0,v.ub$)(F)?"#343434"===Y?(0,v.ub$)(F):Y:(0,v.ub$)(F),alignItems:"center",borderRadius:(0,v.v8m)(F)+"px",width:"fit-content",padding:(0,v.Cf)(F)?"3px 6px":"0px"},children:(0,v.Cf)(F)?(0,N.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,v.BRY)(F),"important"),t.style.setProperty("font-size",X,"important"),t.style.setProperty("font-family",G,"important"),t.style.setProperty("font-weight","normal","important"))},children:`${et}% Off`}):(0,N.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,v._zx)(F),"important"),t.style.setProperty("font-size",X,"important"),t.style.setProperty("font-family",(0,v.ogW)(F),"important"))},children:(0,v.rsz)(F)})})]})]})},I=o(6641),_=o(4063);const E=(0,s.A)({key:"whatmore-css-hv"});function A(t){const[e,o,r]=(0,d.A)(),i=(0,h.Xd)("whatmoreShopId"),a=(0,h.Xd)("whatmoreLandingLocationType"),l=t.events,s=t.onClick,{whatmoreWidgetSourceDetails:c}=(0,n.useContext)(x.B),p=Math.ceil(r),u=2*p,[m,w]=(0,n.useState)(u),[j,b]=(0,n.useState)(2*p),C=0===(0,v.If9)(i)?24:(0,v.If9)(i),[S,M]=(0,n.useState)({touchX:0,touchY:0}),P=()=>(0,N.jsx)("div",{className:"navigation-button-next-container",style:{width:"50px",borderRadius:"50%",height:"50px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,N.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-right-portrait"})}),I=()=>(0,N.jsx)("div",{className:"navigation-button-prev-container",style:{width:"50px",borderRadius:"50%",height:"50px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,N.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-left-portrait"})}),_=t=>{if("next"===t){const t=2;b((t=>Math.min(t+Math.floor(r),l.length+p+1))),w((e=>Math.min(e+t,l.length+p+1)))}else b((t=>Math.max(t-Math.floor(r),u)));(0,y.UM)({userInteractionType:g.O.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:c})};return(0,N.jsxs)("div",{className:"whatmore-events-carousel-portrait",style:{display:"flex",justifyContent:"45034766485"==i&&"product"==a?"center":"flex-start",paddingLeft:"12px",overflow:"hidden",position:"relative"},onTouchStart:t=>{M({touchX:t.touches[0].clientX,touchY:t.touches[0].clientY})},onTouchEnd:t=>{var e,o,n,r;const i=(null===(e=t.changedTouches)||void 0===e||null===(o=e[0])||void 0===o?void 0:o.clientX)-S.touchX,a=(null===(n=t.changedTouches)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.clientY)-S.touchY;Math.sqrt(i**2+a**2)>10&&Math.abs(i)>Math.abs(a)&&_(i>0?"prev":"next")},children:[(0,v.JSQ)(i)&&(0,N.jsxs)(N.Fragment,{children:[j<=l.length+p&&(0,N.jsx)("div",{onClick:()=>_("next"),style:{position:"absolute",zIndex:1,top:"50%",right:"0",transform:"translateY(-100%)"},children:(0,N.jsx)(P,{})}),j>2*p&&(0,N.jsx)("div",{onClick:()=>_("prev"),style:{position:"absolute",left:"0",zIndex:1,top:"50%",transform:"translateY(-100%)"},children:(0,N.jsx)(I,{})})]}),(0,N.jsx)("div",{style:{display:"flex",gap:C,transform:`translateX(-${(j-u)*(o+C)}px)`,transition:"transform 0.4s ease-in-out"},children:l.map(((t,e)=>e<m?(0,N.jsx)("div",{children:(0,N.jsx)(k,{isOnFocus:e<=j-p-1&&e>=Math.max(0,j-u),playOnUnfocus:!1,animateOnFocus:!0,event:t,onClick:()=>s(t)})},`whatmore-carousel-tile-${e}`):(0,N.jsx)(f.A,{})))})]})}function F(t){const[e,o,r,i]=(0,d.A)(),[a,l]=(0,n.useState)(-1),s=(0,h.Xd)("whatmoreShopId"),[c,p]=(0,n.useState)("next"),m=t.onClick,f=t.events,{whatmoreWidgetSourceDetails:w}=(0,n.useContext)(x.B),j=Math.min(Math.ceil(r),f.length),[b,C]=(0,n.useState)(0),S=0===(0,v.If9)(s)?24:(0,v.If9)(s),M=()=>(0,N.jsx)("div",{children:(0,N.jsx)("button",{onClick:E,style:{width:"50px",borderRadius:"6px",height:"100px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,N.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-right"})})}),P=()=>(0,N.jsx)("div",{children:(0,N.jsx)("button",{onClick:_,style:{width:"50px",borderRadius:"6px",height:"100px",backgroundColor:"rgba(0, 0, 0, 0.3)"},children:(0,N.jsx)("div",{style:{display:"flex"},className:"whatmore-arrow-left"})})});(0,n.useEffect)((()=>{b<=j&&C((t=>t+j))}),[j]);const I=()=>{l(-1)},_=()=>{b!==j&&(p("prev"),C((t=>Math.max(Math.ceil(t-r),j))),(0,y.UM)({userInteractionType:g.O.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:w}))},E=()=>{b>f.length+r||(p("next"),C((t=>Math.floor(t+r))),(0,y.UM)({userInteractionType:g.O.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:w}))},A=b>f.length?f.length-j+1:b-j,F=b>=f.length?f.length:A+j,O=f.slice(A,F);return(0,N.jsxs)("div",{className:"whatmore-events-carousel-landscape",style:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:`${i}px`,paddingRight:`${i}px`},children:[b!==j&&(0,N.jsx)("div",{style:{position:"absolute",left:i+"px",zIndex:1,top:"50%",transform:"translateY(-65%)"},children:(0,N.jsx)(P,{})}),(0,N.jsx)("div",{className:"wht-hide-scrollbar",style:{display:"flex",gap:S+"px",width:o*r*(0,v.fHt)(s)+"px",justifyContent:f.length>j?"flex-start":"center",overflow:"auto"},children:O.map(((t,e)=>{const o=`whatmore-event-tile-landscape-${t.index}${e===j-1?"-last":""}`,n=e===a;return(0,N.jsx)("div",{className:"whatmore-event-tile-horizontal-swipe-animation-"+("next"===c?"next":"prev"),onMouseEnter:()=>(t=>{const e=u()((()=>l(t)),300);return e(),e.cancel})(e),onMouseLeave:I,children:(0,N.jsx)(k,{isOnFocus:n,playOnUnfocus:!(0,v.aO7)(s)||e==parseInt(j/2)&&-1==a,animateOnFocus:!0,event:t,onClick:()=>(t=>{m(t)})(t)})},o)}))}),b<f.length&&(0,N.jsx)("div",{style:{position:"absolute",zIndex:1,top:"50%",right:i+"px",transform:"translateY(-65%)"},children:(0,N.jsx)(M,{})})]})}var O=function(t){const[e,o,s]=(0,c.A)(),[d]=(0,h.QN)("whatmoreShopId"),[p]=(0,h.QN)("whatmorePrimaryColor"),[u]=(0,h.QN)("whatmoreSecondaryColor"),[f]=(0,h.QN)("whatmoreTitleFont"),y="portrait"==e?(0,h.Xd)("whatmoreTitleFontSizePortrait"):(0,h.Xd)("whatmoreTitleFontSize"),{whatmoreRootId:g}=(0,n.useContext)(x.B),w=((0,h.Xd)("isInDesignMode"),(0,h.Xd)("whatmoreCollectionHeading")),{whatmoreIsCollectionsTemplate:j}=(0,n.useContext)(x.B),b=t.events,C=t.onClick,S=f;function M(t){C(t)}return(0,n.useEffect)((()=>{(0,I.Fk)("Video shopping powered by Whatmore!")}),[]),(0,n.useEffect)((()=>{i.Sn.forEach((t=>{var e;const o=null!==(e=t.querySelector('.whatmore-template-type[data-wh="template-f"]'))&&void 0!==e?e:t.querySelector('.whatmore-template-type[data="template-f"]');if(!o)return;o&&t&&(t.style.minHeight="0px")}))}),[]),delete a.Ay.styles.global,(0,N.jsx)(l.C,{value:E,children:(0,N.jsx)("div",{className:"whatmore-carousel-events",children:(0,N.jsx)(r.s,{theme:a.Ay,cssVarsRoot:g,resetCSS:!1,children:(0,N.jsxs)(m.h.Provider,{value:{tileTopMargin:25,tileBottomMMargin:10,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[t.heading.trim().length>0||j?(0,N.jsx)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"62636458233"==d?"flex-start":"center"},children:(0,N.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-family",S,"important"),t.style.setProperty("font-size",y+"px"))},style:{color:p,backgroundClip:"text",textAlign:"center",fontWeight:(0,v.Odx)(d),lineHeight:(0,v.L0y)(d),letterSpacing:(0,v.l3V)(d)},children:j?"W"!==w?w:"":t.heading})}):(0,N.jsx)(N.Fragment,{}),"landscape"===e?(0,N.jsx)(F,{events:b,onClick:M}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(A,{events:"45034766485"==d?b.slice(0,5):b,onClick:M}),"45034766485"==d&&(0,N.jsx)("div",{className:"wht-tf-view-cta",style:{display:"flex",justifyContent:"center",margin:"8px 0px"},children:(0,N.jsx)(_.A,{baseFontSize:.5*y,onClick:()=>M(null===b||void 0===b?void 0:b[5])})})]})]})})})})}},9733:function(){}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[891],{7178:function(e,t,n){n.r(t);var i=n(9950),s=n(340),r=n(5089),l=n(5873),o=(n(3997),n(9130),n(4669),n(9733),n(4365),n(7229),n(6042),n(572)),a=n(8603),c=n(9946),h=n(9094),d=n(932),u=n(1941),p=n(5491),m=n.n(p),g=n(5830),x=n(7509),f=n(7136),y=n(1348),w=n(5551),v=n(1351),S=n(6157),C=n(6641),j=n(1957),A=n(4414);const I=(0,a.A)({key:"whatmore-css-hv"});function P(e){const[t,n,s]=(0,d.A)(),[r,l,o]=(0,u.A)(),a=(0,g.Xd)("whatmoreShopId"),h=e.events,p=e.onClick,m=s*(0,y.kcl)(a),x=(0,y.cbh)(a),[C,I]=(0,i.useState)(x?h.length:m),{whatmoreWidgetSourceDetails:P}=(0,i.useContext)(w.B);return(0,i.useEffect)((()=>{C<=m&&I((e=>e+m))}),[m]),(0,A.jsx)("div",{className:"whatmore-events-carousel-portrait",style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,A.jsx)("div",{style:{width:o,height:"fit-content"},children:(0,A.jsx)(c.RC,{slidesPerView:h.length>1?m:1,initialSlide:h.length>1?1:0,centeredSlides:!0,centeredSlidesBounds:!1,watchSlidesProgress:!0,touchRatio:.5,onSlideChange:e=>{(0,v.UM)({userInteractionType:S.O.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:P}),e.realIndex>e.previousIndex&&I((e=>e+m))},loop:x,children:h.map(((e,t)=>t<=C&&(0,A.jsx)(c.qr,{children:({isActive:t,isPrev:n,isNext:i,isVisible:s})=>n||i||t?(0,A.jsx)(j.A,{isOnFocus:t&&s,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{p(e)}}):(0,A.jsx)(f.A,{})},"whatmore-event-tile-portrait-"+e.index)))})})})}function k(e){const[t,n,s,r]=(0,d.A)(),[l,o]=(0,i.useState)(-1),a=(0,g.Xd)("whatmoreShopId"),u=e.onClick,p=e.events,x=(0,y.cbh)(a),[C,I]=(0,i.useState)(x?p.length:s),P=Math.min(s,p.length),{whatmoreWidgetSourceDetails:k}=(0,i.useContext)(w.B),E=(0,i.useRef)(null);return(0,i.useEffect)((()=>{if(E.current){const e=n*P*(0,y.fHt)(a)+"px";p.length<4?E.current.style.setProperty("width",e,"important"):E.current.style.width=e}}),[n,P,a,C,p.length]),(0,i.useEffect)((()=>{C<=s&&I((e=>e+s))}),[s]),(0,A.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",paddingLeft:r+"px",paddingRight:r+"px"},className:"whatmore-events-carousel-landscape",children:(0,A.jsx)("div",{ref:E,style:{height:"100%"},children:(0,A.jsx)(c.RC,{slidesPerView:P,watchSlidesProgress:!0,modules:[h.Vx],navigation:!0,slidesPerGroup:parseInt(P),onSlideChange:e=>{(0,v.UM)({userInteractionType:S.O.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:k}),e.realIndex>e.previousIndex&&I((e=>e+s))},spaceBetween:0,loop:x&&p.length>4,style:{height:"100%"},children:p.map(((e,t)=>{const n=m()((()=>o(t)),300);return t<=C&&(0,A.jsx)(c.qr,{onMouseEnter:()=>{n()},onMouseLeave:()=>{n.cancel(),o(-1)},style:{height:"100%"},children:({isActive:n,isPrev:i,isNext:s,isVisible:r})=>r||i||s?(0,A.jsx)(j.A,{isOnFocus:t==l,playOnUnfocus:!(0,y.aO7)(a)||t==parseInt(P/2)&&-1==l,animateOnFocus:!0,event:e,onClick:()=>{u(e)}}):(0,A.jsx)(f.A,{})},"whatmore-event-tile-landscape-"+e.index)}))})})})}t.default=function(e){const[t,n,a]=(0,u.A)(),[c]=(0,g.QN)("whatmoreShopId"),[h]=(0,g.QN)("whatmorePrimaryColor"),[d]=(0,g.QN)("whatmoreTitleFont"),p="portrait"==t?(0,g.Xd)("whatmoreTitleFontSizePortrait"):(0,g.Xd)("whatmoreTitleFontSize"),{whatmoreRootId:m}=(0,i.useContext)(w.B),f=(0,g.Xd)("whatmoreCollectionHeading"),{whatmoreIsCollectionsTemplate:v}=(0,i.useContext)(w.B),S=e.events,j=e.onClick,E=d;function O(e){j(e)}return(0,i.useEffect)((()=>{(0,C.Fk)("Video shopping powered by Whatmore!")}),[]),(0,i.useEffect)((()=>{l.Sn.forEach((e=>{var t;const n=null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-h"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-h"]');if(!n)return;n&&e&&(e.style.minHeight="0px")}))}),[]),delete r.Ay.styles.global,(0,A.jsx)(o.C,{value:I,children:(0,A.jsx)("div",{className:"whatmore-carousel-events",style:{height:"100%"},children:(0,A.jsx)(s.s,{theme:r.Ay,cssVarsRoot:m,resetCSS:!1,children:(0,A.jsxs)(x.h.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[e.heading.trim().length>0||v?(0,A.jsx)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:(0,A.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-family",E,"important"),e.style.setProperty("font-size",p+"px","important"))},style:{color:h,backgroundClip:"text",textAlign:"center",fontWeight:(0,y.Odx)(c),lineHeight:(0,y.L0y)(c),letterSpacing:(0,y.l3V)(c)},children:v?"W"!==f?f:"":e.heading})}):(0,A.jsx)(A.Fragment,{}),"landscape"===t?(0,A.jsx)(k,{events:S,onClick:O}):(0,A.jsx)(P,{events:S,onClick:O})]})})})})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[306,907],{2209:function(t,e,o){var i=o(4994);e.A=void 0;var r=i(o(9526)),n=o(4414);e.A=(0,r.default)((0,n.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel")},2835:function(t,e,o){var i=o(7891),r=o(8454),n=o(3781),l=o(5830),s=o(4414);e.A=function(t){var e;const o=(0,l.Xd)("whatmoreUITheme"),[a]=(0,l.QN)("whatmoreSecondaryColor"),[d,p]=(0,l.QN)("productRatings"),c=(0,l.Xd)("whatmorePrimaryFont"),u=t.productId,y=t.fontSize,h=null!==(e=t.fontColor)&&void 0!==e?e:"gray";if(null===d||"undefined"==typeof d||!(u in d)||d[u].avgRating>5)return(0,s.jsx)(s.Fragment,{});const v=d[u].avgRating,m=d[u].totalRatings;return(0,s.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center"},children:(0,s.jsxs)("div",{style:{display:"flex",flexFlow:"row nowrap",width:"100%",height:"fit-content",justifyContent:"flex-start",alignItems:"center",gap:"0px"},children:[[...Array(Math.floor(v))].map(((t,e)=>(0,s.jsx)(i.A,{sx:{color:a,fontSize:y+"px"}},"star-icon"+e))),v-Math.floor(v)>.2?(0,s.jsx)(r.A,{sx:{color:a,fontSize:y+"px"}},"star-half-icon"):v-Math.floor(v)==0?(0,s.jsx)(s.Fragment,{}):(0,s.jsx)(n.A,{sx:{color:a,fontSize:y+"px"}},"star-outline-icon"),[...Array(Math.floor(5-v))].map(((t,e)=>(0,s.jsx)(n.A,{sx:{color:a,fontSize:y+"px"}},"star-outline-icon-"+e))),(0,s.jsx)("div",{children:(0,s.jsx)("div",{width:"2px"})}),(0,s.jsx)("div",{children:(0,s.jsx)("div",{style:{backgroundColor:a,borderRadius:"round"==o?"2px":"0px",padding:"1px",overflow:"hidden"},children:(0,s.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color","white","important"),t.style.setProperty("font-size",.8*y+"px","important"),t.style.setProperty("font-family",c,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"medium"},children:["\xa0",v,"\xa0"]})})}),(0,s.jsx)("div",{children:(0,s.jsxs)("p",{ref:t=>{t&&(t.style.setProperty("color",h,"important"),t.style.setProperty("font-size",.8*y+"px","important"),t.style.setProperty("font-family",c,"important"),t.style.setProperty("-webkit-line-clamp",2,"important"),t.style.setProperty("line-clamp",2,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"medium"},children:["\xa0","("+m+")"]})})]})})}},3330:function(t,e,o){o.d(e,{initializeGA:function(){return u},sendVideoViewEventToGA:function(){return y}});var i,r=o(2595),n=o(7732),l=o(1348);const s="Whatmore Video Shopping",a=null!==(i="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==i&&i,d={video_view:"Video View",add_to_cart:"Add to Cart",buy_now:"Buy Now"},p={carousel:"Carousel",stories:"Stories",video_popup:"Video Popup"},c={homepage:"Home Page",product_page:"Product Page"};async function u(t){if((0,l.M$H)(t)&&null!==(0,l.xIo)(t)&&(n.Ay.initialize((0,l.xIo)(t)),a&&console.debug("Whatmore: initialized GA4")),(0,l.B6P)(t)&&null!==(0,l.jWS)(t)){const e=(0,l.Gc6)(t);r.Ay.initialize((0,l.jWS)(t),{useExistingGa:e}),a&&console.debug("Whatmore: initialized GA3")}}async function y(t,e,o){(0,l.B6P)(t)&&null!==(0,l.jWS)(t)&&(r.Ay.event({category:s,action:d.video_view,label:c[e]+":"+p[o]}),a&&console.debug("Whatmore: pushed view event to GA3")),(0,l.M$H)(t)&&null!==(0,l.xIo)(t)&&(n.Ay.event({category:s,action:d.video_view+":"+c[e]+":"+p[o],value:1,nonInteraction:!1}),a&&console.debug("Whatmore: pushed view event to GA4"))}},3781:function(t,e,o){var i=o(4994);e.A=void 0;var r=i(o(9526)),n=o(4414);e.A=(0,r.default)((0,n.jsx)("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28z"}),"StarOutline")},7458:function(t,e,o){o.d(e,{P:function(){return i}});const i=function(t,e){return!(isNaN(e)||!e||("string"===typeof e||e instanceof String)&&!e.trim().length)&&!(parseInt(e)<=parseInt(t))}},7891:function(t,e,o){var i=o(4994);e.A=void 0;var r=i(o(9526)),n=o(4414);e.A=(0,r.default)((0,n.jsx)("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star")},7973:function(t,e,o){o.d(e,{B:function(){return l},b:function(){return n}});var i=o(1348),r=o(5830);function n(t,e=""){const o=(0,r.Xd)("whatmoreShopId");return"shopify"!=(0,i.NCy)(o)?"STRNV8MHJTF"==o?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 o=null===t||void 0===t||null===(e=t.trim())||void 0===e?void 0:e.split("?")[0],i=/\.(jpeg|jpg|gif|png|svg|webp)$/i,r=/\.(mp4|mov|wmv|avi|flv|mkv)$/i;return null!==i&&void 0!==i&&i.test(o)?"image":null!==r&&void 0!==r&&r.test(o)?"video":void 0}},8454:function(t,e,o){var i=o(4994);e.A=void 0;var r=i(o(9526)),n=o(4414);e.A=(0,r.default)((0,n.jsx)("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28z"}),"StarHalf")},9406:function(t,e,o){o.r(e),o.d(e,{default:function(){return R}});var i=o(9950),r=o(340),n=o(5089),l=o(5873),s=(o(3997),o(9130),o(4669),o(9733),o(4365),o(7229),o(6042),o(572)),a=o(8603),d=o(9946),p=o(9094),c=o(1941),u=o(5830),y=o(7509),h=o(7136),v=o(1348),m=o(5551),f=o(1351),x=o(6157),g=o(6641),w=o(3080),P=o(932),j=(o(4826),o(22)),b=o(6594),S=o(7740),A=o(8538),C=o(8149),N=o(3771),z=o(3936),k=o(4414);var I=function(t){var e,o,r,n,l,s,a,d,p,c,y,h,f,x,g,w,I,_,M,[F,W,R,V,O]=(0,P.A)();W*=null!==(e=t.scaleFactor)&&void 0!==e?e:1,F*=null!==(o=t.scaleFactor)&&void 0!==o?o:1;const B=(0,u.Xd)("whatmoreUITheme"),H=(0,u.Xd)("whatmoreShopId"),L=(0,u.Xd)("whatmorePrimaryFont"),T=(0,u.Xd)("whatmoreSecondaryColor"),E=t.onClick,$=null===(r=t.isOnFocus)||void 0===r||r,X=null!==(n=t.playOnUnfocus)&&void 0!==n&&n,G="portrait"===O[j.dl],U=(G?1.076*W*(0,v.HWj)(H):W*(0,v.N_4)(H))+"px",D=(G?1.076*W*(0,v.HWj)(H):W*(0,v.N_4)(H))+"px",Q=(G?.965*W*(0,v.HWj)(H):.859*W*(0,v.N_4)(H))+"px",q=(0,v.VYo)(H),{whatmoreIsPreviewMode:Y}=(0,i.useContext)(m.B),J=.25*W,K=J+"px",Z=1.25*J+"px",[tt,et]=(0,i.useState)(t.event),[ot,it]=(0,i.useState)(),rt=null!==(l=null===(s=tt.products)||void 0===s?void 0:s.find((t=>"active"==t.product_status)))&&void 0!==l?l:null===(a=tt.products)||void 0===a?void 0:a[0],nt=Math.round(+(null===rt||void 0===rt?void 0:rt.price)),lt=Math.round(+(null===rt||void 0===rt?void 0:rt.compare_price)),st=lt&&0!=lt&<>nt?Math.round((lt-nt)/lt*100):NaN,[at,dt]=(0,i.useState)(st),[pt,ct]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{(0,v.w4b)(H)?(0,b.fu)(tt,(0,v.NCy)(H),H).then((t=>{var e,o,i;et(t);const r=Math.round(null===(e=t.products)||void 0===e||null===(o=e[0])||void 0===o?void 0:o.price),n=Math.round(null===t||void 0===t||null===(i=t.products[0])||void 0===i?void 0:i.compare_price),l=n&&0!=n&&n>r?Math.round((n-r)/n*100):NaN;dt(l),ct(!0)})):(async()=>{const t=await(0,C.M)(rt,(0,v.NCy)(H),H);it(t),ct(!0)})()}),[]),(0,k.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top","24px"),t.style.setProperty("margin-bottom","12px"))},style:{width:W,margin:"0 auto",cursor:"pointer",filter:$||t.isActive?void 0:"blur(2.5px) drop-shadow(0 0 20px rgba(0, 0, 0, 0.2))"},onClick:()=>{E(tt)},children:[(0,k.jsxs)("div",{style:{position:"relative",width:W,height:F,borderRadius:"round"==B?"5px":"0px",boxShadow:"round"==B?q:null,borderWidth:(0,v.YcK)(H),borderColor:(0,v.Fwt)(H),overflow:"hidden"},children:[(0,k.jsx)("div",{onClick:t=>t.stopPropagation(),style:{display:$||t.isActive?"block":"none",position:"absolute",right:6,top:6,zIndex:10},children:(0,k.jsx)(z.A,{})}),(0,k.jsx)(N.A,{height:"100%",width:"100%",url:null!==(d=null===tt||void 0===tt?void 0:tt.event_hls_url)&&void 0!==d?d:null===tt||void 0===tt?void 0:tt.thumbnail_image,isPlaying:$||X,event:tt})]}),(0,k.jsxs)("div",{style:{cursor:"pointer",display:"flex",gap:"6px",padding:"12px 4px"},children:[(Y?(0,v.Tr1)(H):(0,v.UmS)(H))&&(null===tt||void 0===tt||null===(p=tt.products)||void 0===p?void 0:p.length)>0&&(0,k.jsx)("div",{style:{maxHeight:Z,maxWidth:K,minWidth:null!==rt&&void 0!==rt&&rt.thumbnail_image?K:"0",overflow:"hidden"},children:(0,k.jsx)("img",{ref:t=>{t&&t.style.setProperty("object-fit",(0,v.KZe)(H),"important")},style:{height:"100%"},src:(null===rt||void 0===rt||null===(c=rt.thumbnail_image)||void 0===c||null===(y=c.split("?"))||void 0===y?void 0:y[0])+"?width=400&height=400",alt:"thumbnail"})}),(0,k.jsxs)("div",{className:"wht-prod-info",style:{display:"flex",flexDirection:"column",gap:"5px"},children:[(0,k.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,v.m5c)(H),"important"),t.style.setProperty("font-size",U,"important"),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",L,"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"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},children:(0,A.v)(null===rt||void 0===rt?void 0:rt.title)}),pt&&(0,v.Nzx)(H)&&(0,k.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px",flexDirection:(0,v.vw2)(H)?"row":"row-reverse",justifyContent:(0,v.vw2)(H)?"flex-start":"flex-end"},children:[(0,k.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,v.m5c)(H),"important"),t.style.setProperty("font-size",D,"important"),t.style.setProperty("font-family",L,"important"),t.style.setProperty("white-space","nowrap","important"),t.style.setProperty("width","fit-content","important"))},style:{textAlign:"left",fontWeight:"normal"==(0,v.i6j)(H)?"normal":"bold"},children:(0,b.Sb)(parseFloat((0,S.U)()?(null!==(h=null===ot||void 0===ot||null===(f=ot.variants)||void 0===f||null===(x=f[0])||void 0===x?void 0:x.price)&&void 0!==h?h:null===ot||void 0===ot?void 0:ot.price)/100:null===rt||void 0===rt?void 0:rt.price)," ",H,null===(g=tt.products[0])||void 0===g?void 0:g.currency)}),!isNaN(lt)&<>nt&&(0,k.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,v.gld)(H),"important"),t.style.setProperty("font-size",D,"important"),t.style.setProperty("font-family",L,"important"),t.style.setProperty("width","fit-content","important"),t.style.setProperty("white-space","nowrap","important"))},style:{textDecoration:0!==nt?"line-through":"none"},children:(0,b.Sb)(parseFloat((0,S.U)()?(null!==(w=null===ot||void 0===ot||null===(I=ot.variants)||void 0===I||null===(_=I[0])||void 0===_?void 0:_.compare_at_price)&&void 0!==w?w:null===ot||void 0===ot?void 0:ot.compare_at_price)/100:null===rt||void 0===rt?void 0:rt.compare_price)," ",H,null===(M=tt.products[0])||void 0===M?void 0:M.currency)}),"56352899156"==H&&(0,v.Nzx)(H)&&pt&&!isNaN(at)&&0!=at&&(0,k.jsx)("div",{style:{display:"flex",backgroundColor:"green"==(0,v.ub$)(H)?"#343434"==T?(0,v.ub$)(H):T:(0,v.ub$)(H),alignItems:"center",borderRadius:(0,v.v8m)(H)+"px",width:"fit-content",padding:"3px 4px"},children:(0,k.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,v.BRY)(H),"important"),t.style.setProperty("font-size",Q,"important"),t.style.setProperty("font-family",L,"important"),t.style.setProperty("width","fit-content","important"),t.style.setProperty("white-space","nowrap","important"))},children:`${at}% off`})})]}),($||t.isActive)&&(0,v.Nzx)(H)&&pt&&!isNaN(at)&&0!=at&&(0,k.jsx)("div",{style:{display:"flex",backgroundColor:"green"==(0,v.ub$)(H)?"#343434"==T?(0,v.ub$)(H):T:(0,v.ub$)(H),alignItems:"center",borderRadius:(0,v.v8m)(H)+"px",width:"fit-content",padding:(0,v.Cf)(H)?"3px 6px":"0px"},children:(0,v.Cf)(H)?(0,k.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,v.BRY)(H),"important"),t.style.setProperty("font-size",Q,"important"),t.style.setProperty("font-family",L,"important"))},children:`${at}% Off`}):(0,k.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color",(0,v._zx)(H),"important"),t.style.setProperty("font-size",Q,"important"),t.style.setProperty("font-family",(0,v.ogW)(H),"important"))},children:(0,v.rsz)(H)})})]})]})]})},_=o(1957);const M=(0,a.A)({key:"whatmore-css-hv"});function F(t){const[e,o,r]=(0,P.A)(),[n,l,s]=(0,c.A)(),a=(0,u.Xd)("whatmoreShopId"),p=t.events,y=t.onClick,g=r*(0,v.kcl)(a),w=(0,v.cbh)(a),[j,b]=(0,i.useState)(w?p.length:g),{whatmoreWidgetSourceDetails:S}=(0,i.useContext)(m.B);return(0,i.useEffect)((()=>{j<=g&&b((t=>t+g))}),[g]),(0,k.jsx)("div",{className:"whatmore-events-carousel-portrait",style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,k.jsx)("div",{style:{width:s,height:"fit-content"},children:(0,k.jsx)(d.RC,{slidesPerView:p.length>1?g:1,initialSlide:p.length>1?1:0,centeredSlides:!0,centeredSlidesBounds:!1,watchSlidesProgress:!0,touchRatio:.5,onSlideChange:t=>{(0,f.UM)({userInteractionType:x.O.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:S}),t.realIndex>t.previousIndex&&b((t=>t+g))},loop:w,children:p.map(((t,e)=>e<=j&&(0,k.jsx)(d.qr,{children:({isActive:e,isPrev:o,isNext:i,isVisible:r})=>o||i||e?(0,k.jsx)(_.A,{isOnFocus:e&&r,playOnUnfocus:!1,animateOnFocus:!0,event:t,onClick:()=>{y(t)}}):(0,k.jsx)(h.A,{})},"whatmore-event-tile-portrait-"+t.index)))})})})}function W(t){var[e,o,r,n]=(0,w.A)();const l=t.onClick,s=t.index,a=t.events,[u,y]=(0,i.useState)(6),[v,m,f]=(0,c.A)();return(0,k.jsx)("div",{className:"wht-3d-temp",style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,k.jsx)("div",{style:{width:f,height:"fit-content"},children:(0,k.jsx)(d.RC,{effect:"coverflow",slidesPerView:a.length>=5?5:a.length,slidesPerGroup:1,initialSlide:a.length>=5?2:Math.floor(a.length/2),centeredSlides:!0,onSlideChange:t=>{t.realIndex>t.previousIndex&&y((t=>t+1))},mousewheel:{forceToAxis:!0,thresholdDelta:10},modules:[p.t9,p.Vx,p.FJ],watchSlidesProgress:!0,navigation:!0,loop:!0,coverflowEffect:{rotate:0,stretch:Math.floor(.21*n),depth:100,scale:.8,modifier:1,slideShadows:!1},children:a.map(((t,e)=>e<=u&&(0,k.jsx)(d.qr,{children:({isActive:e,isPrev:o,isNext:i,isVisible:r})=>r?(0,k.jsx)(I,{isOnFocus:e&&s<0,isActive:e,playOnUnfocus:!1,animateOnFocus:!0,event:t,scaleFactor:1.3,onClick:()=>{l(t)}}):(0,k.jsx)(h.A,{})},"whatmore-event-tile-portr-"+t.index)))})})})}var R=function(t){const[e,o,a]=(0,c.A)(),[d]=(0,u.QN)("whatmoreShopId"),[p]=(0,u.QN)("whatmorePrimaryColor"),[h]=(0,u.QN)("whatmoreTitleFont"),f="portrait"==e?(0,u.Xd)("whatmoreTitleFontSizePortrait"):(0,u.Xd)("whatmoreTitleFontSize"),{whatmoreRootId:x}=(0,i.useContext)(m.B),w=(0,u.Xd)("whatmoreCollectionHeading"),{whatmoreIsCollectionsTemplate:P}=(0,i.useContext)(m.B),j=t.events,b=t.onClick,S=h;function A(t){b(t)}return(0,i.useEffect)((()=>{(0,g.Fk)("Video shopping powered by Whatmore!")}),[]),(0,i.useEffect)((()=>{l.Sn.forEach((t=>{var e;const o=null!==(e=t.querySelector('.whatmore-template-type[data-wh="template-a"]'))&&void 0!==e?e:t.querySelector('.whatmore-template-type[data="template-a"]');if(!o)return;o&&t&&(t.style.minHeight="0px")})),(0,u.t2)("muted",!0)}),[]),delete n.Ay.styles.global,(0,k.jsx)(s.C,{value:M,children:(0,k.jsx)("div",{className:"whatmore-carousel-events",style:{height:"100%"},children:(0,k.jsx)(r.s,{theme:n.Ay,cssVarsRoot:x,resetCSS:!1,children:(0,k.jsxs)(y.h.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[t.heading.trim().length>0||P?(0,k.jsx)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:(0,k.jsx)("p",{ref:t=>{t&&(t.style.setProperty("font-family",S,"important"),t.style.setProperty("font-size",f+"px","important"))},style:{color:p,backgroundClip:"text",textAlign:"center",fontWeight:(0,v.Odx)(d),lineHeight:(0,v.L0y)(d),letterSpacing:(0,v.l3V)(d)},children:P?"W"!==w?w:"":t.heading})}):(0,k.jsx)(k.Fragment,{}),"landscape"===e?(0,k.jsx)(W,{index:t.index,events:j,onClick:A}):(0,k.jsx)(F,{index:t.index,events:j,onClick:A})]})})})})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[774,907],{22:function(e,t,n){n.d(t,{$S:function(){return d},_:function(){return i},b4:function(){return r},dl:function(){return o},nN:function(){return s},tn:function(){return c},vF:function(){return a}});const i="device_type",o="device_mode",r="mobile",a="tablet",d="desktop",c="portrait",s="landscape"},69:function(e,t,n){n.d(t,{Ij:function(){return r},bi:function(){return a}});let i,o=!1;function r(){return i?i.play().then((()=>{o=!0,console.debug("iOS autoplay restrictions bypassed."),i.pause()})).catch((e=>{console.error("Failed to bless videos:",e.message)})):Promise.reject(new Error("Blessing video not initialized."))}function a(){i||(i=document.createElement("video"),i.src="https://whatmore-other-assets.b-cdn.net/whatmore/dummy_for_video_pool_3s_muted_11kb.mp4",i.muted=!0,i.playsInline=!0,i.style.display="none",document.body.appendChild(i));const e=()=>{o||r()};document.addEventListener("click",e,{once:!0}),document.addEventListener("touchstart",e,{once:!0})}},932:function(e,t,n){var i=n(5830),o=n(1941),r=n(22),a=n(1348);t.A=function(e){const[t,n,d]=(0,o.A)(),[c]=(0,i.QN)("whatmoreLandscapePadding"),[s]=(0,i.QN)("whatmoreShopId"),[l]=(0,i.QN)("whatmoreVideoTileSize"),[u]=(0,i.QN)("whatmoreVideoTileSizePortrait"),p=d>=1025,v="portrait"==t?u:l,h=!("portrait"!=t||!(d>=481)),m=v/100*1.3*.5,f=v/100;var w=Math.min(d,n),[g,_,x,b]=[.6*w*(16/9),.6*w,1.4,0];function y(e){return Math.round(10*e)/10}var E={DEVICE_TYPE:r.b4,DEVICE_MODE:r.tn};if(p){const e=_*m,t=g*m;[g,_,x,b]=[t,e,(d-2*c-2*(0,a.$du)(s))/(1.1*e),c],E[r._]=r.$S,E[r.dl]=r.nN}else if(h){var S=.8*_,I=.8*g;"portrait"==t?(S*=f,I*=f,[g,_,x,b]=[I,S,y(d/(1.2*S)),0],E[r._]=r.vF,E[r.dl]=r.tn):([g,_,x,b]=[I,S,(d-2*c)/(1.1*S),c],E[r._]=r.vF,E[r.dl]=r.nN)}else{S=_,I=g;"portrait"==t?(S=S*f*.9,I=I*f*.9,[g,_,x,b]=[I,S,y(d/(1.15*S)),0],E[r._]=r.b4,E[r.dl]=r.tn):(S=.7*_,I=.7*g,[g,_,x,b]=[I,S,(d-2*c)/(1.1*S),c],E[r._]=r.b4,E[r.dl]=r.nN)}return[g,_,x,b,E]}},1351:function(e,t,n){n.d(t,{PG:function(){return d},kz:function(){return c},UM:function(){return l},yP:function(){return u},DG:function(){return s}});var i=n(1348),o=n(6157);function r(e,t,n={},i){var r;const a=d[e];if(!a)return;const c=a.isActionEnabled(),s=null===i||void 0===i||null===(r=i.meta_actions)||void 0===r?void 0:r[a.customAction];(c||s)&&"function"==typeof fbq&&(async()=>{const i={id:null===t||void 0===t?void 0:t.client_product_id,product_url:null===t||void 0===t?void 0:t.product_link,...e===o.O.VIDEO_PLAYBACK&&{watch_time:n.watch_time,video_duration:n.video_duration}};fbq("trackCustom",a.action,i),s&&setTimeout((()=>{null===s||void 0===s||s.forEach((e=>{fbq("trackCustom",e,i)}))}),500)})()}var a=n(7145);const d={[o.O.EVENT_VIEW]:{isActionEnabled:i.NFF,action:"whatmore_video_click_event",customAction:"video_clicked"},[o.O.VIDEO_PLAYBACK]:{isActionEnabled:i.Eel,action:"whatmore_video_watch_event",customAction:"video_watched"},[o.O.VIDEO_LIKED]:{isActionEnabled:i.Mz3,action:"whatmore_video_like_event",customAction:"video_liked"},[o.O.VIDEO_SHARE_CTA_CLICKED]:{isActionEnabled:i.OLZ,action:"whatmore_video_share_event",customAction:"video_shared"},[o.O.SHOPNOW_ATC_CLICKED]:{isActionEnabled:i.T9r,action:"whatmore_video_atc_event",customAction:"video_atc_clicked"},[o.O.PRODUCT_TILE_ATC_CLICKED]:{isActionEnabled:i.T9r,action:"whatmore_video_atc_event",customAction:"video_atc_clicked"},[o.O.SHOPNOW_CLICKED]:{isActionEnabled:i.nEf,action:"whatmore_product_tile_click_event",customAction:"video_product_tile_clicked"},[o.O.PRODUCT_TILE_SHOPNOW_CLICKED]:{isActionEnabled:i.nEf,action:"whatmore_product_tile_click_event",customAction:"video_product_tile_clicked"}};function c({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:c}){var s;(0,a.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:c}),e in d&&r(e,null!==(s=null===o||void 0===o?void 0:o[1])&&void 0!==s?s:null===o||void 0===o?void 0:o[0],t,i)}function s({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:c}){var s;(0,a.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:c}),e in d&&r(e,null!==(s=null===o||void 0===o?void 0:o[1])&&void 0!==s?s:null===o||void 0===o?void 0:o[0],t,i)}function l({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:r}){(0,a.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:r})}function u({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:r}){(0,a.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:r})}},3330:function(e,t,n){n.d(t,{initializeGA:function(){return p},sendVideoViewEventToGA:function(){return v}});var i,o=n(2595),r=n(7732),a=n(1348);const d="Whatmore Video Shopping",c=null!==(i="true"==localStorage.getItem("whatmoreActivateLogs"))&&void 0!==i&&i,s={video_view:"Video View",add_to_cart:"Add to Cart",buy_now:"Buy Now"},l={carousel:"Carousel",stories:"Stories",video_popup:"Video Popup"},u={homepage:"Home Page",product_page:"Product Page"};async function p(e){if((0,a.M$H)(e)&&null!==(0,a.xIo)(e)&&(r.Ay.initialize((0,a.xIo)(e)),c&&console.debug("Whatmore: initialized GA4")),(0,a.B6P)(e)&&null!==(0,a.jWS)(e)){const t=(0,a.Gc6)(e);o.Ay.initialize((0,a.jWS)(e),{useExistingGa:t}),c&&console.debug("Whatmore: initialized GA3")}}async function v(e,t,n){(0,a.B6P)(e)&&null!==(0,a.jWS)(e)&&(o.Ay.event({category:d,action:s.video_view,label:u[t]+":"+l[n]}),c&&console.debug("Whatmore: pushed view event to GA3")),(0,a.M$H)(e)&&null!==(0,a.xIo)(e)&&(r.Ay.event({category:d,action:s.video_view+":"+u[t]+":"+l[n],value:1,nonInteraction:!1}),c&&console.debug("Whatmore: pushed view event to GA4"))}},3389:function(e,t,n){n.r(t);var i=n(9950),o=n(1348),r=n(964),a=n(5830),d=n(140),c=n(4533),s=n(5901),l=n(1085),u=n(6613),p=n(3330),v=n(852),h=n(572),m=n(8603),f=n(2039),w=n(4833),g=n(5551),_=n(1351),x=n(6157),b=n(2979),y=n(6641),E=n(8945),S=n(9821),I=n(69),A=n(4414);const j=(0,m.A)({key:"whatmore-css-ppv"}),P=i.lazy((()=>Promise.all([n.e(304),n.e(946),n.e(437),n.e(451),n.e(987),n.e(669),n.e(176),n.e(592)]).then(n.bind(n,6176)))),L=i.lazy((()=>n.e(374).then(n.bind(n,5100))));function C(e){return e.split(/[?#]/)[0]}t.default=function(e){const[t,n]=(0,i.useState)(),[m,N]=(0,i.useState)(),[T]=(0,a.QN)("isInDesignMode"),[O]=(0,a.QN)("isDemoBrand"),[D]=(0,a.QN)("whatmoreEmbedAppUseVariant"),[k,z]=(0,i.useState)(-2),[V]=(0,a.QN)("whatmoreVariantId"),[M]=(0,a.QN)("whatmoreShopId");var[Q]=(0,a.QN)("whatmoreProductId");const W=(0,a.Xd)("isLandingSharedLink"),F=(0,a.Xd)("whatmoreShareTemplateId"),R=(0,a.Xd)("whatmoreShareEventId"),B=W&&"template-embed"===(0,w.Mm)(F),[$,G]=(0,i.useState)(B);Q=(0,o.BcY)(M)?"STRR72TX6AT"==M?function(){var e;const t=null===(e=window.location.pathname)||void 0===e?void 0:e.split("/");return t[t.length-1]}():C(window.location.href):Q;const[K,H]=(0,i.useState)((()=>"true"===D?V:Q));var U=r.$$+"/v2/brand/"+M+"/product-events";const{whatmoreWidgetSourceDetails:X}=(0,i.useContext)(g.B);(0,i.useEffect)((()=>{(0,p.initializeGA)(M),(0,y.Fk)("Video shopping powered by Whatmore!"),(0,c.wm)()}),[]),(0,i.useEffect)((()=>{null==t||0==t.length||m||!(0,u.MN)()||(0,a.Xd)("whatmoreVideoPlayerPoolInitiated")||((0,S._)()?(0,l.Pc)(l.F5):(0,I.bi)())}),[t]),(0,i.useEffect)((()=>{if(z(-1),(0,o.WH1)(M)){const e=`${r.$$}/v2/brand/${M}/product-events/recommendation`,t=(0,o.buK)(M);fetch(`${e}?client_product_id=${K}&limit=10&recommended=${!t}&origin=${window.location.hostname}&status=live,upcoming&event_type=video`).then((e=>e.json())).then((e=>{const i=null===e||void 0===e?void 0:e.events;if((null===i||void 0===i?void 0:i.length)>0){var o;const r=t?null===e||void 0===e?void 0:e.all_events:null===e||void 0===e||null===(o=e.related_events)||void 0===o?void 0:o.map((e=>({...e,isRelatedEvent:!0})));n([...i,...r])}else n([])})).catch((e=>N(e.message)))}else fetch(U.toString()+"?client_product_id="+K.toString()+"&status="+"upcoming".toString()+"&event_type=video").then((e=>e.json())).then((e=>e.events)).then((e=>(null!=e&&0!=e.length&&(0,o.vfi)(M)&&(0,o.YOR)(e),n(e),e))).then((e=>((0,o.Uht)(M)&&function(e,t){setTimeout((async()=>{const n=e.reduce(((e,t)=>[...e,...t.products]),[]).filter((e=>e.client_product_id==t))[0];if(!n||n.product_link==C(window.location.href))return;const i={product_id:n.product_id,product_link:C(window.location.href)};fetch(r.$$+"/product",{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)})}),500)}(e,K),e))).catch((e=>{N(e.message)}))}),[K]),(0,i.useEffect)((()=>{var e,n;z(-2),(t&&t.length>0||(0,o.WKl)(M))&&(0,_.yP)({userInteractionType:x.O.PDP_VISITED,widgetSourceDetails:X,event:null===t||void 0===t?void 0:t[0],productList:null===t||void 0===t||null===(e=t[0])||void 0===e?void 0:e.products,ctaList:null===t||void 0===t||null===(n=t[0])||void 0===n?void 0:n.cta})}),[t]),(0,i.useEffect)((()=>{const e=C(window.location.href);let t=history.pushState;history.pushState=function(){let e=t.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),e};let n=history.replaceState;history.replaceState=function(){let e=n.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),e},window.addEventListener("popstate",(()=>{window.dispatchEvent(new Event("locationchange"))})),window.addEventListener("locationchange",(function(){if("24950997070"==M&&window.location.origin+window.location.pathname!=e&&fetch(window.location.origin+window.location.pathname+".json").then((e=>e.json())).then((e=>{var t;return H(null===e||void 0===e||null===(t=e.product)||void 0===t?void 0:t.id)})),"true"===D){const e=function(e){for(var t=window.location.search.substring(1).split("&"),n=0;n<t.length;n++){var i=t[n].split("=");if(i[0]==e)return i[1]}return!1}("variant");e&&""!==e&&H(e)}}))}),[]),(0,i.useEffect)((()=>{if(null!=t&&0!==t.length&&!m&&B&&((0,E.H)("whatmore-video-player",(()=>{G(!1)})),null!=R)){const e=t.find((e=>R==e.event_id));if(e)return void J(e,!0,t.indexOf(e))}}),[t]);const Y=X.landingLocationType,q=X.templateType,J=async(e,t=!1,n=0)=>{if((0,u.MN)()&&!t&&await((0,S._)()?(0,l.bo)():(0,I.bi)()),(0,f.ij)(e)||(0,f.Il)(e))return T||O||(async()=>{const t=(0,w.Wd)(Y)+(0,w.gf)(q)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,d.lB)(e),(0,p.sendVideoViewEventToGA)(M,r.DK,r.K1),(0,c.Ch)(e.event_id,e.products,"product_page","video_popup",t)})(),void z(n)};function Z(){return(0,A.jsx)(A.Fragment,{})}return null==t||0==t.length||m||(0,w.Ig)(X.templateType)?(0,A.jsx)("div",{}):(0,A.jsxs)(h.C,{value:j,children:[$&&(0,A.jsx)(L,{}),"no-product"===K||-1===k||0===t.length?(0,A.jsx)(Z,{}):-2===k&&t.length>0?(0,A.jsx)("div",{children:(0,A.jsx)(b.S,{userInteractionType:x.O.PDP_POPUP_WIDGET_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!T&&!O,children:(0,A.jsx)(s.A,{event:t[0],inVideoClick:J,closeClick:e=>{var n;e.stopPropagation(),z(-1),(0,_.kz)({userInteractionType:x.O.PDP_POPUP_CLOSED,widgetSourceDetails:X,event:null===t||void 0===t?void 0:t[0],productList:null===t||void 0===t||null===(n=t[0])||void 0===n?void 0:n.products})}})})}):(0,A.jsx)("div",{children:(0,A.jsx)(i.Suspense,{children:(0,A.jsx)(b.S,{userInteractionType:x.O.EVENT_VIEW,event:t[0],productList:t[0].products,cta:t[0].cta,triggerFlag:!T&&!O,children:(0,A.jsx)(P,{events:t,index:k,onBack:function(){(0,o.ei)(M)&&(0,a.Xd)("whatmoreAddedToCart")&&(0,v.initiateCartSliderEvent)(M,(()=>{}),100,window.location.hostname),z(-2),G(!1)},template:"template-product-page"})})})})]})}},5901:function(e,t,n){n.d(t,{A:function(){return w}});var i=n(1005),o=n(9950),r=n(9879),a=n(22),d=n(5830),c=n(932);var s=function(e){const[t,n,i,o,r]=(0,c.A)(),[s]=(0,d.QN)("whatmoreEmbedAppVideoPlayerSizePortrait"),[l]=(0,d.QN)("whatmoreEmbedAppVideoPlayerSizeLandscape"),u=r[a.dl]===a.nN?l/100:s/100*1.2;return[t*u,n*u,r]},l=n(5727),u=n(1628),p=n.n(u),v=n(2209),h=n(6702),m=(n(9733),n(4365),n(1348)),f=n(4414);var w=function(e){var t;const n=o.useRef(null);var[c,u,w]=s();const g=(0,d.Xd)("whatmoreUITheme"),[_]=(0,d.QN)("whatmoreEmbedAppVideoTitle"),[x]=(0,d.QN)("whatmoreEmbedAppPositionPortrait"),[b]=(0,d.QN)("whatmoreEmbedAppHorizontalPaddingPortrait"),[y]=(0,d.QN)("whatmoreEmbedAppVerticalPaddingPortrait"),[E]=(0,d.QN)("whatmoreEmbedAppPositionLandscape"),[S]=(0,d.QN)("whatmoreEmbedAppHorizontalPaddingLandscape"),[I]=(0,d.QN)("whatmoreEmbedAppVerticalPaddingLandscape"),A=(0,d.Xd)("whatmoreShopId"),j=(0,d.Xd)("isWhatmorePreviewMode");var P=x,L=b,C=y;w[a.dl]===a.nN&&(P=E,L=S,C=I);const[N,T]=(0,o.useState)(["initial",window.pageYOffset]),[O,D]=(0,o.useState)(!1),k=null!==(t=e.isSpotlight)&&void 0!==t&&t,z=w[a.dl]===a.nN?.7*(0,m.O86)(A):(0,m.O86)(A),V=k?z:1;c*=V,u*=V;const M=k?(0,m.LrK)(A):P,Q=k?(0,m._2D)(A):(0,m.GSq)(A),[W,F]=(0,o.useState)(!k&&(0,m.n8Q)(A));function R(e,t){T(e),e[1]<=100?D(!1):t!=O&&(D(t),F(!1))}(0,o.useEffect)((()=>{let e=window.pageYOffset,t=!1;const n=()=>{const n=window.pageYOffset;Math.abs(n-e)<100||(R([n>e?"scrolled-down":"scrolled-up",n],!0),e=n>0?n:0),t=!1},i=()=>{t||(window.requestAnimationFrame(n),t=!0)};return window.addEventListener("scroll",i),()=>window.removeEventListener("scroll",i)}),[N]),(0,i.j)({ref:n,handler:()=>{R(["scrolled-up",N[1]],!0)}});const B=e.event,$=e.inVideoClick,G=e.closeClick,K=.3*u,H=.6*u,U=.1*u,X=.1*(.5*u),Y="round"==g?"10px":"0px",q=(0,m.GvQ)(A);var J=!1,Z=0,ee=0;function te(e){J=e}return(0,f.jsx)("div",{className:"wht-popup",children:W&&!Q?(0,f.jsx)(f.Fragment,{}):O&&Q?(0,f.jsx)("div",{style:"left"===M?{left:"1px",bottom:k?(0,m.pUQ)(A)+"px":C+"px",position:"fixed",zIndex:q}:{right:"5px",bottom:k?(0,m.pUQ)(A)+"px":C+"px",position:"fixed",zIndex:q},children:(0,f.jsxs)("div",{onClick:()=>{R(["initial",N[1]],!1)},style:{margin:"1px",width:u+"px",height:c+"px"},className:"left"===M?"whatmore-ultraminimized-video-view-left":"whatmore-ultraminimized-video-view-right",children:[(0,f.jsx)("div",{style:{overflow:"hidden"},children:(0,f.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:9/16},children:(0,f.jsx)(r.A,{url:B.thumbnail_image,isPlaying:!1,event:B})})}),(0,f.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,f.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",height:"100%"},children:[(0,f.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,f.jsx)("div",{className:"whatmore-ultraminimized-content-scale-out",children:(0,f.jsx)(v.A,{sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:K+"px"},style:{position:"relative",zIndex:1,left:X+"px",bottom:X+"px"},onClick:G})})}),(0,f.jsx)("div",{style:{height:"100%",display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"center"},children:(0,f.jsx)(h.A,{sx:{color:"white",fontSize:2*K+"px",filter:"drop-shadow(0 0 2px black);"}})})]})})]})}):(0,f.jsx)(p(),{nodeRef:n,cancel:".activate-button,.close-btn",bounds:j?"parent":"html",defaultClassName:"whatmore-react-draggable",defaultClassNameDragging:"whatmore-react-draggable-dragging",defaultClassNameDragged:"whatmore-react-draggable-dragged",onStart:(e,t)=>{var n,i;n=t.x,i=t.y,Z=n,ee=i},onDrag:(e,t)=>{te(!0)},onStop:(e,t)=>{J&&(Math.abs(t.x-Z)>5||Math.abs(t.y-ee)>5)?te(!1):$(B)},children:(0,f.jsx)("div",{ref:n,style:"left"===M?{left:k?(0,m.D2A)(A)+"px":L+"px",bottom:k?(0,m.pUQ)(A)+"px":C+"px",position:"fixed",zIndex:q}:{right:k?(0,m.D2A)(A)+"px":L+"px",bottom:k?(0,m.pUQ)(A)+"px":C+"px",position:"fixed",zIndex:q},children:(0,f.jsxs)("div",{style:Object.assign({},{boxSizing:"border-box",margin:"1px",width:e.isSpotlight&&"60122562760"==A?c+"px":u+"px",height:e.isSpotlight&&"60122562760"==A?u+"px":c+"px"}),className:"left"===M?"whatmore-minimized-video-view-left":"whatmore-minimized-video-view-right",children:[(0,f.jsx)("div",{style:{overflow:"hidden",position:"relative"},children:(0,f.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:e.isSpotlight&&"60122562760"==A?16/9:9/16},children:(0,f.jsx)(r.A,{url:B.thumbnail_image,isMuted:!0,isPlaying:!0,event:B})})}),(0,f.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",width:"100%",height:"100%"},children:(0,f.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",height:"100%"},children:[(0,f.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",justifyContent:"flex-end",width:"100%",height:"fit-content"},children:(0,f.jsx)(v.A,{className:"close-btn",sx:{filter:"drop-shadow(0 0 2px black);",color:"white",fontSize:K+"px"},onClick:G,style:{position:"relative",zIndex:1,left:U+"px",bottom:U+"px"}})}),(0,f.jsx)("div",{style:{marginLeft:"auto",marginRight:"auto"},children:(0,f.jsx)(l.A,{sx:{color:(0,m.KFN)(A),fontSize:H+"px",filter:"drop-shadow(0 0 2px black);"}})}),(0,f.jsx)("div",{style:{paddingLeft:"2px",paddingRight:"2px",borderBottomLeftRadius:Y,borderBottomRightRadius:Y,backgroundImage:_?"linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0.6))":""},children:(0,f.jsxs)("p",{style:{textAlign:"center",color:"white",fontFamily:"Sans-serif",fontWeight:"semi-bold",fontSize:.4*K+"px",margin:0,padding:0,lineHeight:"110%"},children:["\xa0",_]})})]})})]})})})})}},6649:function(e,t,n){var i=n(9950);t.A=({triggerOnce:e=!1,root:t=null,rootMargin:n="0px",threshold:o=0}={})=>{const[r,a]=(0,i.useState)(!1),[d,c]=(0,i.useState)(null),s=(0,i.useRef)(null);return(0,i.useEffect)((()=>{const i=new IntersectionObserver(((t,n)=>{t.forEach((t=>{c(t),t.isIntersecting?(a(!0),e&&n.disconnect()):e||a(!1)}))}),{root:t,rootMargin:n,threshold:o});return s.current&&i.observe(s.current),()=>{i.disconnect()}}),[e,t,n,o]),[s,r,d]}},8945:function(e,t,n){function i(e,t){let n=0;let i=new MutationObserver((function(){document.querySelector("."+e)?(t(),i.disconnect()):0==n&&(n=1,setTimeout((()=>{t(),i.disconnect()}),8e3))}));i.observe(document.body,{childList:!0,subtree:!0})}n.d(t,{H:function(){return i}})},9733:function(){}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[199],{1351:function(e,t,n){n.d(t,{PG:function(){return r},kz:function(){return s},UM:function(){return d},yP:function(){return u},DG:function(){return c}});var i=n(1348),o=n(6157);function a(e,t,n={},i){var a;const l=r[e];if(!l)return;const s=l.isActionEnabled(),c=null===i||void 0===i||null===(a=i.meta_actions)||void 0===a?void 0:a[l.customAction];(s||c)&&"function"==typeof fbq&&(async()=>{const i={id:null===t||void 0===t?void 0:t.client_product_id,product_url:null===t||void 0===t?void 0:t.product_link,...e===o.O.VIDEO_PLAYBACK&&{watch_time:n.watch_time,video_duration:n.video_duration}};fbq("trackCustom",l.action,i),c&&setTimeout((()=>{null===c||void 0===c||c.forEach((e=>{fbq("trackCustom",e,i)}))}),500)})()}var l=n(7145);const r={[o.O.EVENT_VIEW]:{isActionEnabled:i.NFF,action:"whatmore_video_click_event",customAction:"video_clicked"},[o.O.VIDEO_PLAYBACK]:{isActionEnabled:i.Eel,action:"whatmore_video_watch_event",customAction:"video_watched"},[o.O.VIDEO_LIKED]:{isActionEnabled:i.Mz3,action:"whatmore_video_like_event",customAction:"video_liked"},[o.O.VIDEO_SHARE_CTA_CLICKED]:{isActionEnabled:i.OLZ,action:"whatmore_video_share_event",customAction:"video_shared"},[o.O.SHOPNOW_ATC_CLICKED]:{isActionEnabled:i.T9r,action:"whatmore_video_atc_event",customAction:"video_atc_clicked"},[o.O.PRODUCT_TILE_ATC_CLICKED]:{isActionEnabled:i.T9r,action:"whatmore_video_atc_event",customAction:"video_atc_clicked"},[o.O.SHOPNOW_CLICKED]:{isActionEnabled:i.nEf,action:"whatmore_product_tile_click_event",customAction:"video_product_tile_clicked"},[o.O.PRODUCT_TILE_SHOPNOW_CLICKED]:{isActionEnabled:i.nEf,action:"whatmore_product_tile_click_event",customAction:"video_product_tile_clicked"}};function s({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:s}){var c;(0,l.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:s}),e in r&&a(e,null!==(c=null===o||void 0===o?void 0:o[1])&&void 0!==c?c:null===o||void 0===o?void 0:o[0],t,i)}function c({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:s}){var c;(0,l.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:s}),e in r&&a(e,null!==(c=null===o||void 0===o?void 0:o[1])&&void 0!==c?c:null===o||void 0===o?void 0:o[0],t,i)}function d({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:a}){(0,l.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:a})}function u({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:a}){(0,l.B)({userInteractionType:e,userInteractionMetadata:t,widgetSourceDetails:n,event:i,productList:o,ctaList:a})}},3350:function(e,t,n){n.r(t),n.d(t,{default:function(){return V}});var i=n(9950),o=n(964),a=n(140),l=n(5830),r=n(1348),s=n(4533),c=n(6613),d=n(1085),u=n(5551),v=n(2039),m=n(4833),p=n(2979),h=n(6157),g=n(8945),_=n(9821),S=n(4414);const y=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(946),n.e(340),n.e(571),n.e(987),n.e(669),n.e(665)]).then(n.bind(n,7206)))),w=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(437),n.e(571),n.e(516),n.e(620),n.e(116)]).then(n.bind(n,7144)))),I=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(879),n.e(571),n.e(987),n.e(703),n.e(423)]).then(n.bind(n,517)))),f=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(879),n.e(571),n.e(987),n.e(703),n.e(412)]).then(n.bind(n,7646)))),E=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(879),n.e(571),n.e(987),n.e(703),n.e(221)]).then(n.bind(n,5451)))),x=i.lazy((()=>Promise.all([n.e(317),n.e(59),n.e(571),n.e(491)]).then(n.bind(n,4295)))),O=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(946),n.e(57),n.e(571),n.e(987),n.e(669),n.e(988),n.e(620),n.e(474)]).then(n.bind(n,6945)))),T=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(475),n.e(571),n.e(669),n.e(485)]).then(n.bind(n,9418)))),C=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(946),n.e(571),n.e(987),n.e(676)]).then(n.bind(n,3369)))),b=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(946),n.e(57),n.e(571),n.e(987),n.e(669),n.e(988),n.e(891)]).then(n.bind(n,7178)))),D=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(946),n.e(437),n.e(286),n.e(451),n.e(57),n.e(571),n.e(987),n.e(669),n.e(852),n.e(176),n.e(988),n.e(306)]).then(n.bind(n,9406)))),j=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(437),n.e(571),n.e(669),n.e(516),n.e(933)]).then(n.bind(n,6989)))),L=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(946),n.e(437),n.e(286),n.e(451),n.e(438),n.e(571),n.e(987),n.e(669),n.e(852),n.e(176),n.e(806)]).then(n.bind(n,3278)))),q=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(879),n.e(571),n.e(987),n.e(1)]).then(n.bind(n,4596)))),P=i.lazy((()=>Promise.all([n.e(317),n.e(304),n.e(59),n.e(946),n.e(437),n.e(286),n.e(451),n.e(571),n.e(987),n.e(669),n.e(852),n.e(176),n.e(906)]).then(n.bind(n,6176)))),A=i.lazy((()=>n.e(374).then(n.bind(n,5100))));var W=function(e){var t,W;const[k]=(0,l.QN)("isInDesignMode"),[$]=(0,l.QN)("isDemoBrand"),[N]=(0,l.QN)("whatmoreTopBottomPadding"),[G]=(0,l.QN)("whatmoreStoriesTopBottomPadding"),{whatmoreIsStoriesTemplate:V}=(0,i.useContext)(u.B),[B]=(0,l.QN)("whatmoreShopId"),{whatmoreEventsBrowsingTemplate:F}=(0,i.useContext)(u.B),M=(0,l.Xd)("isLandingSharedLink"),z=(0,l.Xd)("whatmoreShareTemplateId"),R=(0,l.Xd)("whatmoreShareStoryId"),K=(0,l.Xd)("whatmoreShareEventId"),{whatmoreWidgetSourceDetails:H,whatmoreUserInfo:U}=(0,i.useContext)(u.B),J=M&&F===(0,m.Mm)(z),[Q,X]=(0,i.useState)(J),[Z,Y]=(0,i.useState)(-1),[ee,te]=(0,i.useState)(null);let ne=e.events;const ie=e.allEvents;var oe=null;V&&!oe&&(oe=function(e){var t=e.reduce(((e,t,n)=>{var i,o=t.storyset_id;return o in e?(e[o].total_events=e[o].total_events+1,e[o].events.push(t)):e[o]={id:t.storyset_id,title:t.storyset_name,thumbnail_image:t.storyset_thumbnail_image,total_events:1,start_event_index:n,storyset_dynamic_thumbnail:null!==(i=null===t||void 0===t?void 0:t.storyset_dynamic_thumbnail)&&void 0!==i&&i,events:[t]},e}),{}),n=Object.values(t);return n.sort(((e,t)=>e.start_event_index-t.start_event_index)),n}(ne));const ae=H.landingLocationType,le=H.templateType;function re(e,t=!1,i=null){(0,c.MN)()&&(0,_._)()&&!t&&(0,d.bo)(),k||$||(async()=>{const{initializeGA:t,sendVideoViewEventToGA:i}=await Promise.all([n.e(286),n.e(907)]).then(n.bind(n,3330));t();const l=oe[e].events[0],r=(0,m.Wd)(ae)+(0,m.gf)(le)+(null!==l&&void 0!==l&&l.isRelatedEvent?"R":"E")+"_"+(null===l||void 0===l?void 0:l.event_id);(0,a.lB)(l),i(B,o.TB,o.OL),(0,s.Ch)(l.event_id,l.products,"homepage","stories",r,null===l||void 0===l?void 0:l.location,null===U||void 0===U?void 0:U.userType)})();var l=0;null!=i&&oe[e].events.map(((e,t)=>{e.event_id==i&&(l=t)})),Y(l),te(e)}async function se(e,t=!1){(0,c.MN)()&&(0,_._)()&&!t&&await(0,d.bo)(),Y(e.index),((0,v.ij)(e)||(0,v.Il)(e))&&(k||$||(async()=>{const{initializeGA:t,sendVideoViewEventToGA:i}=await Promise.all([n.e(286),n.e(907)]).then(n.bind(n,3330));t();const l=(0,m.Wd)(ae)+(0,m.gf)(le)+(null!==e&&void 0!==e&&e.isRelatedEvent?"R":"E")+"_"+(null===e||void 0===e?void 0:e.event_id);(0,a.lB)(e),i(B,o.TB,o.Dk),(0,s.Ch)(e.event_id,e.products,"homepage","carousel",l)})())}function ce(e){return(0,S.jsx)(S.Fragment,{})}return(0,i.useEffect)((()=>{if(J)if((0,g.H)("whatmore-video-player",(()=>{X(!1)})),null!=R&&V){const e=oe.find((e=>R==e.id));if(e)return void re(oe.indexOf(e),!0,K)}else if(null!=K){const e=ne.find((e=>K==e.event_id));if(e)return void se(e,!0)}}),[]),(0,S.jsxs)(S.Fragment,{children:[Q&&(0,S.jsx)(A,{}),-1==Z||-2==Z?(0,S.jsx)(ce,{}):(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(p.S,{userInteractionType:h.O.EVENT_VIEW,event:ne[Z],productList:null===(t=ne[Z])||void 0===t?void 0:t.products,cta:null===(W=ne[Z])||void 0===W?void 0:W.cta,triggerFlag:!k&&!$,children:(0,S.jsx)(P,{events:ie,index:Z,onBack:async function(){if((0,r.ei)(B)&&(0,l.Xd)("whatmoreAddedToCart")){(await n.e(852).then(n.bind(n,852)).then((e=>e.initiateCartSliderEvent)))(B,(()=>{}),100,window.location.hostname)}Y(-1),X(!1)},slideDirection:V||"horizontal"===(0,r.br0)(B)?"horizontal":"vertical",eventsStories:oe,initialStoryIndex:ee,template:F})})}),(0,S.jsx)("div",{className:"whatmore-widget-container",style:{height:"100%",marginTop:(V?G:N)+"px",marginBottom:(V?G:N)+"px"},children:"template-b"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(p.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(y,{events:ne,onClick:se,heading:e.heading})})}):"template-a-1"===F||"template-collections-a-1"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(w,{events:ne,onClick:se,heading:e.heading})}):"template-feed-a"===F||"template-collections-feed-a"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(j,{events:ne,onClick:se,heading:e.heading})}):"template-collections-a"===F||"template-c"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(p.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(I,{events:ne,index:Z,setScreen:Y,onClick:se,heading:e.heading})})}):"template-collections-b"===F||"template-d"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(p.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(f,{events:ne,index:Z,setScreen:Y,onClick:se,heading:e.heading})})}):"template-collections-c"===F||"template-e"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(p.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(E,{events:ne,index:Z,setScreen:Y,onClick:se,heading:e.heading})})}):"template-collections-d"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(p.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(y,{events:ne,index:Z,setScreen:Y,onClick:se,heading:e.heading})})}):"template-collections-e"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(p.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(O,{events:ne,index:Z,setScreen:Y,onClick:se,heading:e.heading})})}):"template-collections-stories"===F||"template-stories"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(p.S,{userInteractionType:h.O.COLLECTION_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(q,{events:ne,index:Z,setScreen:Y,onClick:se,heading:e.heading})})}):"template-f"===F||"template-collections-f"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(p.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(T,{events:ne,onClick:se,heading:e.heading})})}):"template-g"===F||"template-collections-g"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(p.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(C,{events:ne,onClick:se,heading:e.heading})})}):"template-h"===F||"template-collections-h"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(p.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(b,{events:ne,onClick:se,heading:e.heading})})}):"template-i"===F||"template-collections-i"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(p.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(D,{index:Z,events:ne,onClick:se,heading:e.heading})})}):"template-banner-a"===F?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(p.S,{userInteractionType:h.O.BANNER_WIDGET_VIEW,event:ne[0],triggerFlag:!k&&!$,children:(0,S.jsx)(L,{events:ne})})}):V?(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(p.S,{userInteractionType:h.O.STORIES_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(x,{eventsStories:oe,onClick:re,template:F})})}):(0,S.jsx)(i.Suspense,{children:(0,S.jsx)(p.S,{userInteractionType:h.O.HOMEPAGE_CAROUSEL_WIDGET_VIEW,triggerFlag:!k&&!$,children:(0,S.jsx)(O,{events:ne,onClick:se,heading:e.heading})})})})]})},k=n(7802),$=n(6641),N=n(1351),G=n(5873);var V=function(e){const[t,a]=(0,i.useState)(),[v,p]=(0,i.useState)(),[g,y]=(0,i.useState)(),{whatmoreIsStoriesTemplate:w}=(0,i.useContext)(u.B),{whatmoreIsCollectionsTemplate:I}=(0,i.useContext)(u.B),{whatmoreIsBannerTemplate:f}=(0,i.useContext)(u.B),[E]=(0,l.QN)("whatmoreShopId"),[x]=(0,l.QN)("whatmoreCollectionId"),O=(0,l.Xd)("whatmoreLandingLocationType"),T=(0,l.Xd)("whatmoreLoggingActive"),{whatmoreWidgetSourceDetails:C}=(0,i.useContext)(u.B),{whatmoreUserInfo:b,whatmoreIsPreviewMode:D}=(0,i.useContext)(u.B),j=(0,l.Xd)("whatmoreCollectionUrl"),[L]=(0,l.QN)("isInDesignMode"),[q]=(0,l.QN)("isDemoBrand"),P=(0,r.mJ$)(E)?(0,r.jLA)(E)?j:window.location.href.split(/[?#]/)[0]:x,[A,V]=(0,l.QN)("productRatings"),[B,F]=(0,i.useState)(!1);var M=(0,r.SOt)(E)?o.aD+"/v2/events/":o.$$+"/v2/events/",z=(0,r.SOt)(E)?o.aD+"/v3/events/":o.$$+"/v3/events/",R=(0,r.SOt)(E)?o.aD+"/v4/events/":o.$$+"/v4/events/",K=(0,r.SOt)(E)?o.aD+"/v5/events/":o.$$+"/v5/events/",H=((0,r.SOt)(E)?o.aD:o.$$,(0,r.SOt)(E)?o.aD+"/get_eventset/":o.$$+"/get_eventset/"),U=(0,r.SOt)(E)?o.aD+"/v2/collection":o.$$+"/v2/collection",J=(0,r.SOt)(E)?o.aD+"/v3/collection":o.$$+"/v3/collection",Q=(0,r.SOt)(E)?o.aD+"/v4/collection":o.$$+"/v4/collection",X=(0,r.SOt)(E)?o.aD+"/v2/brand/"+E+"/product-events":o.$$+"/v2/brand/"+E+"/product-events",Z=e.shopId,Y="live,upcoming",ee="true";return(0,i.useEffect)((()=>{null!=t&&0!=t.length&&!g&&(0,c.MN)()&&!(0,l.Xd)("whatmoreVideoPlayerPoolInitiated")&&(0,_._)()&&(0,d.Pc)(d.F5)}),[t]),(0,i.useEffect)((()=>{var e,t,i,c;if((0,s.wm)(),O.startsWith("product")){var d=(0,l.Xd)("whatmoreProductId");if(d=(0,r.BcY)(E)?function(e,t){return"STRQMPNF7QK"==t?encodeURIComponent(e):e.split(/[?#]/)[0]}(window.location.href,E):d,(0,r.vvU)(E))c=M.toString()+Z.toString()+"?status="+Y.toString()+"&is_active="+ee.toString()+(w?"&template_type=stories":"");else if((0,r.WH1)(E)){c=`${c=`${o.$$}/v2/brand/${E}/product-events/recommendation`}?client_product_id=${d}&limit=10&recommended=${!(0,r.buK)(E)}&origin=${window.location.hostname}&status=live,upcoming&event_type=video`}else c=X.toString()+"?client_product_id="+d.toString()+"&status="+Y.toString()+"&event_type=video"}else if(I||"invalid-url"!==j)c=(0,r.JwJ)(E)?`${J.toString()}?store_id=${Z.toString()}&client_collection_id=${"index"==O&&(0,r.FKG)(E).length>0?(0,r.FKG)(E)[0]:P}`:"78232846646"==E?`${Q.toString()}?store_id=${Z.toString()}&client_collection_id=${"index"==O&&(0,r.FKG)(E).length>0?(0,r.FKG)(E)[0]:P}`:`${U.toString()}?store_id=${Z.toString()}&client_collection_id=${"index"==O&&(0,r.FKG)(E).length>0?(0,r.FKG)(E)[0]:P}`;else if(f){const e=m.Jh,t=(0,m.t6)(O);c=H.toString()+Z.toString()+"?eventset_type="+e+"&source="+t+"&source_id="+E}else{var u,v,h,g;if(("72201044272"==E||"2665447536"==E&&D)&&!w)c=z.toString()+Z.toString()+"?status="+Y.toString()+"&is_active="+ee.toString()+"&latitude="+(null!==(u=null===(v=JSON.parse(localStorage.getItem("_user_wh_lc")))||void 0===v?void 0:v.latitude)&&void 0!==u?u:"")+"&longitude="+(null!==(h=null===(g=JSON.parse(localStorage.getItem("_user_wh_lc")))||void 0===g?void 0:g.longitude)&&void 0!==h?h:"")+"&user_type="+(null!==b&&void 0!==b&&b.userType?"olduser":"newuser");else c=(0,r.JwJ)(E)&&!w?R.toString()+Z.toString()+"?status="+Y.toString()+"&is_active="+ee.toString():"78232846646"!=E||w?M.toString()+Z.toString()+"?status="+Y.toString()+"&is_active="+ee.toString()+(w?"&template_type=stories":""):K.toString()+Z.toString()+"?status="+Y.toString()+"&is_active="+ee.toString()}const _=null===(e=window)||void 0===e||null===(t=e.whatmore)||void 0===t||null===(i=t.storyEvents)||void 0===i?void 0:i.events;w&&O.startsWith("index")&&"object"==typeof _&&(null===_||void 0===_?void 0:_.length)>0?(a(_),p(_),F(!0)):fetch(c).then((e=>e.json())).then((e=>{var t;if(f){const t=m.Jh;return(0,k.Po)(e,t)}return(0,r.JwJ)(E)&&(null===e||void 0===e||null===(t=e.questions)||void 0===t?void 0:t.length)>0&&(null==localStorage.getItem("_whatmore_qview_index")&&localStorage.setItem("_whatmore_qview_index",0),(0,s.d3)(null===e||void 0===e?void 0:e.questions)),(0,k.Np)(e,I||"invalid-url"!==j)})).then((e=>{var t,n;T&&console.debug("initial received events size : "+e.length);let i=[...null===e||void 0===e?void 0:e.events,...null===e||void 0===e?void 0:e.all_events];i=(0,r.xku)(E)?(0,k.d8)(i):(0,k.Zf)(i),p(i);const o=null!==(t=null===e||void 0===e||null===(n=e.events)||void 0===n?void 0:n.length)&&void 0!==t?t:0;return i.slice(0,o)})).then((e=>{if((q||L)&&(null==e||e&&0==(null===e||void 0===e?void 0:e.length))){const e=async()=>{const{eventsData:e,storiesData:t,bannerData:i}=await n.e(365).then(n.bind(n,6018));a(w?t:f?i:e)};e()}else a(e);F(!0)})).catch((e=>{y(e.message),F(!0)}))}),[]),(0,i.useEffect)((()=>{"index"===O?t&&t.length>0&&(0,N.yP)({userInteractionType:h.O.HOMEPAGE_VISITED,widgetSourceDetails:C}):"collection"===O?(t&&t.length>0||(0,r.BZ$)(E))&&(0,N.yP)({userInteractionType:h.O.COLLECTION_PAGE_VISITED,widgetSourceDetails:C}):"product"===O&&(t&&t.length>0||(0,r.WKl)(E))&&(0,N.yP)({userInteractionType:h.O.PDP_VISITED,widgetSourceDetails:C})}),[t]),B&&(null==t||0==t.length||g)&&G.Sn.forEach((e=>{var t,n,i,o;const a=null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-stories-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-stories-a"]'),l=null!==(n=e.querySelector('.whatmore-template-type[data-wh="template-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-feed-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-b"]')||e.querySelector('.whatmore-template-type[data-wh="template-f"]')||e.querySelector('.whatmore-template-type[data-wh="template-stories"]')||e.querySelector('.whatmore-template-type[data-wh="template-e"]')||e.querySelector('.whatmore-template-type[data-wh="template-a-1"]')||e.querySelector('.whatmore-template-type[data-wh="template-g"]')||e.querySelector('.whatmore-template-type[data-wh="template-h"]'))&&void 0!==n?n:e.querySelector('.whatmore-template-type[data="template-a"]')||e.querySelector('.whatmore-template-type[data="template-b"]')||e.querySelector('.whatmore-template-type[data="template-f"]')||e.querySelector('.whatmore-template-type[data="template-stories"]')||e.querySelector('.whatmore-template-type[data="template-e"]')||e.querySelector('.whatmore-template-type[data="template-a-1"]')||e.querySelector('.whatmore-template-type[data="template-g"]')||e.querySelector('.whatmore-template-type[data="template-h"]'),r=null!==(i=e.querySelector('.whatmore-template-type[data-wh="template-collections-a"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-b"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-c"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-stories"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-d"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-e"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-f"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-g"]')||e.querySelector('.whatmore-template-type[data-wh="template-collections-h"]'))&&void 0!==i?i:e.querySelector('.whatmore-template-type[data="template-collections-a"]')||e.querySelector('.whatmore-template-type[data="template-collections-b"]')||e.querySelector('.whatmore-template-type[data="template-collections-c"]')||e.querySelector('.whatmore-template-type[data="template-collections-stories"]')||e.querySelector('.whatmore-template-type[data="template-collections-e"]')||e.querySelector('.whatmore-template-type[data="template-collections-d"]')||e.querySelector('.whatmore-template-type[data="template-collections-f"]')||e.querySelector('.whatmore-template-type[data="template-collections-g"]')||e.querySelector('.whatmore-template-type[data="template-collections-h"]'),s=null!==(o=e.querySelector('.whatmore-template-type[data-wh="template-banner-a"]'))&&void 0!==o?o:e.querySelector('.whatmore-template-type[data="template-banner-a"]'),c=e;if(w){const t=e.querySelector(".whatmore-shimmer-stories");t&&(t.style.display="none")}else if(!I){const t=e.querySelector(".loading-skeleton-wrapper");t&&(t.style.display="none")}(s||r||l||a)&&(l&&c||a&&c||s&&c||r&&c)&&(c.style.minHeight="0px")})),null==t||0==t.length||g?(0,S.jsx)("div",{}):(T&&(0,$.xv)(t),T&&console.debug("final transformed events data : "+JSON.stringify(t)),T&&console.debug("valid events size : "+t.length),(0,S.jsx)(W,{heading:e.heading,events:t,allEvents:v}))}},7802:function(e,t,n){n.d(t,{Hl:function(){return o},Np:function(){return l},Po:function(){return r},Z_:function(){return i},Zf:function(){return c},d8:function(){return s},zJ:function(){return a}});const i=function(e,t){return!((void 0==e.products||0==e.products.length)&&(void 0==e.cta||0==e.cta.length))},o=function(e,t){return!(void 0==e.products||0==e.products.length)},a=function(e){if(null!=e)return e.filter((e=>{var t;return null===(t=null===e||void 0===e?void 0:e.in_stock)||void 0===t||t}))},l=function(e,t=!1){var n,i;if(null!=e)return t?{events:e.events[0].events,all_events:null!==(i=null===e||void 0===e?void 0:e.all_events)&&void 0!==i?i:[]}:{events:null===e||void 0===e?void 0:e.events,all_events:null!==(n=null===e||void 0===e?void 0:e.all_events)&&void 0!==n?n:[]}};const r=function(e,t){var n,i;let o=[];if(null==e)return[];if("eventsets"in e&&e.eventsets[t]){const n=function(e){if(null==e||0==e.length)return[];let t=[];return e.forEach((e=>{t=t.concat(e.events)})),t}(e.eventsets[t]);o=[...n]}return{events:o,all_events:null!==(n=null===(i=o)||void 0===i?void 0:i.all_events)&&void 0!==n?n:[]}};function s(e){if(null!=e){var t=0;return e.forEach((e=>{e.index=t++})),e}}function c(e){if(null==e)return;let t=0;return e.reduce(((e,n)=>{var i;return(null===(i=null===n||void 0===n?void 0:n.in_stock)||void 0===i||i)&&(n.index=t++,e.push(n)),e}),[])}},8945:function(e,t,n){function i(e,t){let n=0;let i=new MutationObserver((function(){document.querySelector("."+e)?(t(),i.disconnect()):0==n&&(n=1,setTimeout((()=>{t(),i.disconnect()}),8e3))}));i.observe(document.body,{childList:!0,subtree:!0})}n.d(t,{H:function(){return i}})}}]);
|