function initializeFilters(t){if(!t.hasClass("load")){t.addClass("load");var a=t.find("> p").text(),e=t.find("> div label"),o=Promart.pages.listado.getPageDataAttrIds();if(t.hasClass("refino-precio"))return void Promart.pages.listado.filterPriceInput();if("Vendido por"!==t.find("p").text()){t.find("> div").html("");var r={},s=e.filter((t,a)=>!r.hasOwnProperty(a.textContent)&&(r[a.textContent]=!0));s=s.sort((function(t,a){return t.textContent.localeCompare(a.textContent,"es",{numeric:!0})})),t.find("> div").append(s)}e=t.find("> div label"),$.each(e,(function(t,r){var s=$(this).text(),i=$(this).text().replace(/\([0-9]+\)/gi,""),n=$(this).find("input");n.attr("autocomplete","off").attr("data-link_category","UI :: Category").attr("data-link_label","Filtros :: "+a+" :: "+i).attr("data-link_action",o),null!=s.match(/\([0-9]+\)/gi)&&$(this).text("").prepend(n).append(""+i+'
'+/\(([0-9]*)\)/.exec(s.match(/\([0-9]+\)/gi).toString())[1]+"
");const l=$(this).find("em");if(l.length>0){if($(this).closest("fieldset").hasClass("Tipo-entrega")){let t=l.text().trim().replace(/^\d+-/,"").trim();t.toLowerCase().includes("despachoprogramado")?t=t.replace(/despachoprogramado/gi,"Despacho Programado"):t.toLowerCase().includes("retiroentienda")&&(t=t.replace(/retiroentienda/gi,"Retiro en Tienda")),l.text(t)}}4==t?e.length>8&&$(r).after('
'):t>4&&($(r).addClass("item-filter"),$(r).parent().find(".box-filters-hidden").append($(r)))}))}}window.Promart=window.Promart||{},Promart.pages={},Promart.components={},Promart.modules={},Promart.services={},Promart.data={},Promart.init=function(){Promart.pages.common.initEvents(),$.each(Promart.pages,(function(){$("body").hasClass(this.pageClass)&&this.hasOwnProperty("init")&&this.init()})),Promart.pages.common.init()},Promart.constructor={},Promart.constructor.page=function(t){this.pageClass=t,this.DOMReady=function(){},this.winLoad=function(){},this.ajaxStop=function(){},this.common=function(){},this._winLoad=function(){var t=this;$(window).load((function(){t.winLoad()}))},this._DOMReady=function(){var t=this;$(document).ready((function(){t.common(),t.DOMReady()}))},this._common=function(){this.common()},this.init=function(){this._DOMReady(),this._winLoad()}},Promart.components.footer={},Promart.components.footer.uiEvents=function(){$(document).on("click",".js-ac-footer",(function(){return $(this).hasClass("open")?($(this).removeClass("open"),$(this).next().removeClass("open").slideToggle("slow")):$(this).addClass("open").next().addClass("open").slideToggle("slow"),!1})),$(document).on("click",".js-submit-s3",Promart.components.footer.newsletter),$(document).on("click",".js-calendario-boleta",Promart.components.footer.calendarioBoleta),$(document).on("click",".close-popup",Promart.components.footer.closePopUp),$(document).on("click",".js-confirmar-boleta",Promart.components.footer.actionBoleta),Promart.components.footer.tooltipSuscripción()},Promart.components.footer.tooltipSuscripción=function(){var t;$("body").on("mouseenter","footer .onesignal-customlink-container button",(function(){t=setTimeout(()=>{$(".onesignal-cnt-tooltip").length||$(this).parent().append('
Activa las notificaciones para recibir ofertas, descuentos y cupones exclusivos para ti
'),$(this).parent().find(".onesignal-cnt-tooltip").show()},500)})),$("body").on("mouseleave","footer .onesignal-customlink-container button",(function(){$(this).parent().find(".onesignal-cnt-tooltip").hide(),clearTimeout(t)}))},Promart.components.footer.newsletter=function(){var t=$(this),a=t.parents("form.formNewsletterS3"),e=a.find(".js-emailNewsletter").val(),o=e.split("@")[0];$validator=a.validator(),$check=t.parents().find("input[name=checkNewsS3]").parent(),$check.parents().find(".text-check").removeAttr("style"),$check.parents().find(".text-check a").removeAttr("style"),$validator?$.ajax({url:"/no-cache/Newsletter.aspx",type:"POST",data:{newsletterClientName:o,newsletterClientEmail:e,newsInternalPage:"_",newsInternalPart:"newsletter",newsInternalCampaign:"newsletter:opt-in"},beforeSend:function(){t.parents(".suscribete").append("
")},success:function(t){var o={email:e,nameCampaign:"Newsletter"};$.ajax({url:"/api/dataentities/CS/documents/",type:"POST",cache:!1,async:!1,headers:{Accept:"application/vnd.vtex.ds.v10+json","Content-Type":"application/json"},data:JSON.stringify(o),beforeSend:function(){},success:function(t){Promart.modules.utils.dataLayerSuscripcion("Footer"),$(".suscribete .s-news").fadeIn(400,(function(){setTimeout((function(){$(".s-news").fadeOut(400),$(".load_sty1").hide(),a.find(".js-emailNewsletter").val(""),a.find("#stlCheckquedfS3").prop("checked",!1),$(".wp-nw").show()}),1e3)}));Promart.components.footer.tratamientoDatos(e,!0,!1,!1,!1,{ch_campanas_suscripcion:!0}),setTimeout((function(){a.find(".js-emailNewsletter").val(""),a.find("#stlCheckquedfS3").prop("checked",!1)}),3e3)}})}}):$check.hasClass("val_error")&&($check.parent().find(".text-check").css({color:"red","font-weight":"bold"}),$check.parent().find(".text-check a").css({color:"red","font-weight":"bold"}))},Promart.components.footer.tratamientoDatos=function(t,a,e,o,r,s){var i=new Date,n=i.getHours();23==n?n=0:n++;var l=i.getMonth()+1+"/"+i.getDate()+"/"+i.getFullYear()+" "+n+":"+i.getMinutes()+":"+i.getSeconds(),c={type:"GET",url:"/api/dataentities/TD/search?_fields=id,ch_campanas_suscripcion,ch_politica_datos_personales,ch_politica_datos_personales_contac,ch_tratamiento_datos_personales,email&_where=(email="+t+")",headers:{Accept:"application/vnd.vtex.ds.v10+json","Content-Type":"application/json"},cache:!1};$.when(Promart.modules.utils.promesa(c)).done((function(i){if(i.length){var n={type:"PATCH",url:"/api/dataentities/TD/documents/"+i[0].id,headers:{Accept:"application/vnd.vtex.ds.v10+json","Content-Type":"application/json"},data:JSON.stringify(s),cache:!1};Promart.modules.utils.promesa(n).done((function(t){}))}else{var c={ch_campanas_suscripcion:a,ch_politica_datos_personales:e,ch_tratamiento_datos_personales:o,ch_politica_datos_personales_contac:r,email:t,fecha_hora:l},d={type:"POST",url:"/api/dataentities/TD/documents/",headers:{Accept:"application/vnd.vtex.ds.v10+json","Content-Type":"application/json"},cache:!1,async:!1,data:JSON.stringify(c)};Promart.modules.utils.promesa(d).done((function(t){}))}}))},Promart.components.footer.calendarioBoleta=function(t){t.preventDefault();var a=$(t.target).hasClass("oriente");$(".js-modal-boleta").addClass("active"),a&&$(".js-modal-boleta").addClass("oriente"),$(".cnt-win-boleta, .win-boleta").addClass("open")},Promart.components.footer.closePopUp=function(){$(".js-modal-boleta").removeClass("active"),$(".cnt-win-boleta, .win-boleta").removeClass("open"),$(".js-modal-boleta").removeClass("oriente")},Promart.components.footer.actionBoleta=function(t){t.preventDefault();var a=$(".js-modal-boleta").hasClass("oriente"),e=new Date("2024-06-18");console.log(e);var o=$("#boleta-date").val();""!==o?(new Date(o)45&&t>a?($(".js-mnus-f").addClass("scroll"),$(".logo-scroll").addClass("active"),$(".multi-cintillo-wrap").addClass("bannerHide"),Promart.components.header.menuDesktop()):($(".js-mnus-f").removeClass("scroll"),$(".logo-scroll").removeClass("active"),$(".section-menu").removeClass("active"),$(".multi-cintillo-wrap").removeClass("bannerHide"));var o=$(window).width()<=768?".cintillo-wrap-header":".linkBrands, .cintillo-wrap-header";e<=10?$(o).css("display","block"):$(o).css("display","none")})),$(document).on("click","body .login",Promart.components.header.loginPopup),$(document).on("click","body a.logged",Promart.components.header.login),Promart.components.header.loginModal(),Promart.components.header.activeMenuCyber(),$(document).on("click","body a.logout",Promart.components.header.logout),$(document).on("click","#vtexIdContainer .vtexIdUI-close",Promart.components.header.cerrarLogin),$(document).on("keyup",".vtexIdUI .vtexIdUI-classic-login-control input",Promart.components.header.evalInputLogin),$(document).on("change",".vtexIdUI #vtexIdUI-email-confirmation #acceptTerms",Promart.components.header.acitvateBtnSnd),$(document).on("click",".vtexIdUI a.pull-right",Promart.components.header.createCheck),$(document).on("click",".vtexIdUI .vtexIdUI-back-link",Promart.components.header.pullLeftChecks),$(document).ajaxStop((function(){$(".ajax-content-loader").find("#login").length>0?$("body").addClass("logout").removeClass("logged"):$("body").addClass("logged").removeClass("logout")})),$(document).on("click",".js-minicart",Promart.components.header.minicartPopup),$(document).on("change","#dep",Promart.components.header.changeSelectDepartment),$(document).on("change","#prov",Promart.components.header.changeSelectProvince),$(document).on("click",".cd-p",Promart.components.header.buttonLocationCity),$(document).on("click",".ciudad-d",Promart.components.header.selectCityPopup),$(document).on("click",".win-despacho .close-popup, .js-dp-close",Promart.components.header.closedp),Promart.components.header.selectCiudadDespacho(),$(document).on("click",".js-confirmar",Promart.components.header.confirmar),$(document).on("click",".link-int",Promart.components.header.toggleOfertasBoxWrap),$(document).on("click",".box-ofertas a, .box-releases a",Promart.components.header.preventOfertasBoxBubble),$(document).on("click","body",Promart.components.header.hideOfertasBoxWrap),window.addEventListener("appinstalled",t=>{console.log("INSTALL: Success"),window.dataLayer=window.dataLayer||[],dataLayer.push({event:"PwaInstallSuccess"})}),window.addEventListener("beforeinstallprompt",t=>{t.preventDefault()}),Promart.components.header.callCenter()},Promart.components.header.hideOfertasBoxWrap=function(){$(".link-int").removeClass("active"),$(".box-ofertas").removeClass("active"),$(".box-releases").removeClass("active"),$(".box-houses").removeClass("active")},Promart.components.header.preventOfertasBoxBubble=function(t){t.stopPropagation()},Promart.components.header.toggleOfertasBoxWrap=function(t){Promart.components.header.preventOfertasBoxBubble(t),$(this).hasClass("active")||($(".link-int").next().removeClass("active"),$(".link-int").removeClass("active")),$(this).toggleClass("active"),$(this).next().toggleClass("active")},Promart.components.header.changeSelectDepartment=function(){var t,a=$("#dep option:selected").data("name");if((t=__citySpreadSheet__[a]).length){prov=Promart.modules.utils.reduce(t,"gsx$province");var e="",o='';for(var r in prov)prov.hasOwnProperty(r)&&(o+='");$(".-stl4-select.prov").html('"),$(".-stl4-select.prov").addClass("active"),$(".-stl4-select.dist").html(''),$(".-stl4-select.dist").addClass("active")}},Promart.components.header.changeSelectProvince=function(){var t=$("#prov option:selected").data("name"),a=prov[t],e="",o="",r="",s=Promart.modules.cookies.getCookie(Promart.data.locate);null==(s=decodeURIComponent(s))&&""==s||(o=s.split("-")[2]);for(var i=0;i"+itemDist+""}""!=o&&itemDist==o&&Promart.components.header.validateProvinceSC(itemSC)}$(".-stl4-select.dist").html('")},Promart.components.header.validateProvinceSC=function(t){Promart.modules.cookies.getCookie("PromartSc")!=t&&(Promart.modules.cookies.deleteCookie("PromartSc"),Promart.modules.cookies.setCookie("PromartSc",t,365),Promart.modules.cookies.deleteCookie("VTEXSC"),Promart.modules.cookies.setCookie("VTEXSC","sc="+t,365),Promart.modules.minicart.refreshUI())},Promart.components.header.closeModal=function(){$(".bg-modal, .js-modal-despacho").removeClass("active"),$(".js-open-menu").removeClass("disable").addClass("enable"),$(".js-menus").removeClass("disable").addClass("enable"),$(".-col.-wf").hasClass("active")&&($(".-col.-wf").removeClass("active"),$(".-col.-wf").removeAttr("style"),$("#content, body, .-col.-wf").removeAttr("style"),$("body").hasClass("listado")?$("html,body").css({overflow:"initial"}):$("html,body").css({overflow:"auto"}),$("body").removeClass("g-pop")),$(".js-cj-search").hasClass("open")&&($(".js-cj-search").removeClass("open"),$(".js-txtSearch").val("")),$(".js-bgModal").hasClass("active")||($("header .js-txtSearch").val(""),$(".tb-cell.-tvam.h-icon").removeClass("active")),$(".search").hasClass("active")&&$(".search").removeClass("active"),$(".logo-scroll").hasClass("open")&&$(".logo-scroll").removeClass("open"),$(".gh-popup-suscribete").hasClass("open")&&$(".gh-popup-suscribete").removeClass("open"),$(".gh-popup-cyber").hasClass("open")&&$(".gh-popup-cyber").removeClass("open"),$(".gh-popup-nxm-tag").hasClass("open")&&$(".gh-popup-nxm-tag").removeClass("open"),$(".popup-ficha-detail").hasClass("active")&&$(".bg-modal").addClass("active"),$(".js-modal-despacho").hasClass("odp")&&Promart.components.header.closedp(),$("header .menu-icon, .low-hd .menu-icon").removeClass("open"),$(".gh-close-modal,.login,.menu-icon,.js-minicart-mbl").removeClass("active"),$(".section-menu").removeClass("active"),$(".menu-home").removeClass("re-position"),$(".-txt").text("MENU"),$(".titulo_depar").find("span i").removeClass("up"),$("body").removeClass("g-pop"),$(".gh-close-modal").removeClass("open"),$("body").css("overflow","auto"),$(".js-addtocart").removeClass("add"),Promart.pages.listado.checkValidate()},Promart.components.header.menuMobile=function(t){t.preventDefault(),$("header .menu-icon").hasClass("open")?($(".section-menu").removeClass("active"),$(this).addClass("active"),$(".user-header-mobile").css("z-index","9"),$("body").css("overflow","auto")):($(".section-menu").addClass("active"),$(this).removeClass("active"),$(".user-header-mobile").css("z-index","10"),$("body").css("overflow","hidden"))},Promart.components.header.menuDesktop=function(){$(".menu-home").hasClass("open")&&$(".js-mnus-f").hasClass("scroll")&&$(".section-menu").addClass("active"),$(".js-mnus-f").hasClass("scroll")&&$(".section-menu").hasClass("active")&&$(".menu-icon").addClass("open")},Promart.components.header.loginPopup=function(t){t.preventDefault(),$(this).hasClass("open")?($(this).removeClass("open"),$(".win-userinfo").removeClass("open"),$(".bg-modal").removeClass("active"),$(this).addClass("load"),$(this).hasClass("load")||Promart.modules.historial.createLinkInMenu()):($(".gh-close-modal,.login,.menu-icon").removeClass("open").removeClass("active"),$(".titulo_depar").find("span i").removeClass("up"),$(this).addClass("open"),$(".win-userinfo").addClass("open"),$(".bg-modal").addClass("active"),$(".js-ciudad_despacho").hasClass("open")&&Promart.components.header.closedp())},Promart.components.header.login=function(t){vtexid.start({returnUrl:"/",userEmail:"",locale:"es-PE",forceReload:!1}),$("body .login").removeClass("open"),$(".win-userinfo").removeClass("open"),$(".bg-modal").removeClass("active"),Promart.components.header.tagModalLogin()},Promart.components.header.loginModal=function(){-1!=window.location.pathname.indexOf("/login")&&Promart.components.header.tagModalLogin()},Promart.components.header.activeMenuCyber=function(){Promart.modules.utils.itemVisible("07-04-2025 00:00:00","13-04-2025 23:59:59",!0)&&($(".active-cyber").show(),$(".m-agora").hide())},Promart.components.header.tagModalLogin=function(){setTimeout((function(){$("#vtexIdUI-classic-login form button[type=submit]").attr({"data-link_category":"UI :: Login","data-link_action":"Iniciar sesion","data-link_label":"Ingresar"}),$(".vtexIdUI .vtexIdUI-classic-login-control label a").attr({"data-link_category":"UI :: Login","data-link_action":"Iniciar sesion","data-link_label":"¿Olvidaste tu contraseña?"}),$(".vtexIdUI .vtexIdUI-classic-login-control > a").attr({"data-link_category":"UI :: Login","data-link_action":"Iniciar sesion","data-link_label":"Registrarme"}),$(".vtexIdUI #vtexIdUI-facebook").attr({"data-link_category":"UI :: Login","data-link_action":"Iniciar sesion","data-link_label":"Facebook"}),$(".vtexIdUI #vtexIdUI-google-plus").attr({"data-link_category":"UI :: Login","data-link_action":"Iniciar sesion","data-link_label":"Google"}),$(".vtexIdUI #vtexIdUI-facebook > p").attr({"data-link_category":"UI :: Login","data-link_action":"Iniciar sesion","data-link_label":"Facebook"}),$(".vtexIdUI #vtexIdUI-google-plus > p").attr({"data-link_category":"UI :: Login","data-link_action":"Iniciar sesion","data-link_label":"Google"}),$(".vtexIdUI #vtexIdUI-facebook > p .vtexIdUI-providers-name").attr({"data-link_category":"UI :: Login","data-link_action":"Iniciar sesion","data-link_label":"Facebook"}),$(".vtexIdUI #vtexIdUI-google-plus > p .vtexIdUI-providers-name").attr({"data-link_category":"UI :: Login","data-link_action":"Iniciar sesion","data-link_label":"Google"}),$(".vtexIdUI #loginWithAccessKeyBtn, .vtexIdUI #loginWithAccessKeyBtn > span").attr({"data-link_category":"UI :: Login","data-link_action":"Iniciar sesion","data-link_label":"Recibir clave de acceso rápido"})}),3e3)},Promart.components.header.logout=function(t){t.preventDefault(),$.get("/no-cache/user/logout",(function(t){})).done((function(){0==window.location.pathname.indexOf("/_secure/account")?window.location.href="/":window.location.href=window.location.href}))},Promart.components.header.isUserLogged=function(){setTimeout(()=>{if(void 0!==vtexjs.checkout.orderForm&&vtexjs.checkout.orderForm.loggedIn){const o=vtexjs.checkout.orderForm.clientProfileData;var t=void 0!==o.firstName&&""!=o.firstName&&null!=o.firstName?o.firstName:o.email.split("@")[0].split(".")[0].split("-")[0].split("_")[0];if($(".grt .txt-user .user-name").html(" "+t),void 0!==o.firstName&&""!=o.firstName&&null!=o.firstName&&"undefined"!=typeof OneSignal){var a=o.firstName.split(" "),e="";for(let t=0;t"+t+"")}else $(".info-icon.orders #count").remove()},1e3)},Promart.components.header.minicartPopup=async function(t){t.preventDefault(),await Promart.modules.minicart.refreshUI(),$(".js-minicart").hasClass("open")?($(".js-minicart").removeClass("open"),$(".minicart-cnt").removeClass("open"),$(".bg-modal").removeClass("active")):($(".gh-close-modal,.login,.menu-icon").removeClass("open").removeClass("active"),$(".titulo_depar").find("span i").removeClass("up"),$(".js-minicart").addClass("open"),$(".minicart-cnt").addClass("open"),$(".bg-modal").addClass("active"),$(".js-ciudad_despacho").hasClass("open")&&Promart.components.header.closedp())},Promart.components.header.buttonLocationCity=function(t){t.preventDefault(),$(".js-modal-despacho").addClass("active"),$(".cnt-win-despacho").addClass("open"),$(".win-despacho").addClass("open")},Promart.components.header.selectCityPopup=function(t){t.preventDefault(),$(".bg-modal").removeClass("active"),$(".gh-close-modal").removeClass("open"),$(".js-modal-despacho").addClass("active"),$(".cnt-win-despacho, .win-despacho").addClass("open")},Promart.components.header.closedp=function(){Promart.modules.utils.setLocalStorage("actionRefresh",""),$(".js-addtocart, .js-addtocartProy").removeClass("add"),$("body.pr-landing .js-addtocart").removeClass("addToCart"),$(".cnt-win-despacho, .win-despacho").removeClass("open"),$(".js-modal-despacho").removeClass("active")},Promart.components.header.messageConfirmation=function(t,a,e,o){$(".txt-cd-s").text("Ubicación"),$(".block-store .cd-s").text(a+", "+e),void 0===o||void 0===a||void 0===e?($(".js-confirmar").removeClass("load"),$(".msg-alert-confirmar").css("display","block"),setTimeout((function(){$(".msg-alert-confirmar").css("display","none")}),1e3)):($(".js-confirmar").addClass("load"),Promart.components.header.checkstore(t,a,e,o))},Promart.components.header.confirmar=function(){var t=$("#dep option:selected"),a=$("#prov option:selected"),e=$("#dist option:selected");if(""!=t.data("name")&&""!==e.data("name")){var o=t.data("name"),r=a.data("name"),s=e.data("name");Promart.components.header.messageConfirmation(o,r,s,e.val())}},Promart.components.header.selectCokkie=function(t,a){var e=Promart.modules.cookies.getCookie("VTEXSC");e=e.replace("sc=",""),Promart.modules.cookies.deleteCookie(Promart.data.locate),Promart.modules.cookies.setCookie(Promart.data.locate,encodeURIComponent(a),365),Promart.modules.cookies.deleteCookie("PromartSc"),Promart.modules.cookies.setCookie("PromartSc",t,365),Promart.modules.cookies.deleteCookie("VTEXSC"),Promart.modules.cookies.setCookie("VTEXSC","sc="+t,365),Promart.components.header.lction(t)},Promart.components.header.checkstore=function(t,a,e,o){var r=$("#dist option:selected").data("ubigeo"),s=t+"-"+a+"-"+e,i=a+", "+e;vtexjs.checkout.getOrderForm().done((function(t){var a=t.items;void 0!==t.salesChannel&&t.salesChannel!=o&&"1"!=t.salesChannel&&a.length?Promart.modules.availability.simulation(o,a,r,i,s):Promart.components.header.selectCokkie(o,s)}))},Promart.components.header.lction=function(t,a){var e=Promart.modules.cookies.getCookie("VTEXSC");if("sc="+t!=e&&e.length){var o,r=Promart.components.header.getParams();o=null!=r?Object.keys(r).length:0;var s=location.href;0==o?(t="?sc="+t,s=s.replace("?",""),location.href=s+t):(s=Promart.components.header.replaceUrlParam(s,"sc",t),location.href=s)}else if(!a){s="checkout"==window.location.pathname.split("/")[1]?location.href:location.href.replace(location.hash,"");s=Promart.components.header.replaceUrlParam(s,"sc",t),location.href=s}},Promart.components.header.replaceUrlParam=function(t,a,e){null==e&&(e="");var o=new RegExp("\\b("+a+"=).*?(&|$)");return t.search(o)>=0?t.replace(o,"$1"+e+"$2"):t+(t.indexOf("?")>0?"&":"?")+a+"="+e},Promart.components.header.actionRefresh=function(){var t=Promart.modules.utils.getLocalStorage("actionRefresh");if(t.length){switch((t=JSON.parse(t)).action){case"addtocart":vtexjs.checkout.getOrderForm().done((function(){$(".controllers-seller .js-addtocart").removeClass("add"),Promart.modules.minicart.tempData=void 0!==t.extGarantia?t:null,Promart.modules.minicart.addCartData(t.data.item,Promart.modules.cookies.sc,t.data.element,t.data.pop,t.data.btn)}))}Promart.modules.utils.setLocalStorage("actionRefresh","")}},Promart.components.header.selectCiudadDespacho=function(){$("body").addClass("not-express");var t=this.getSC();null==t&&""==(t=Promart.modules.cookies.getCookie("PromartSc"))&&(t=Promart.modules.cookies.getCookie("VTEXSC").replace("sc=","")),"undefined"===Promart.modules.cookies.getCookie("VTEXSC").replace("sc=","")&&(Promart.modules.cookies.deleteCookie("VTEXSC"),Promart.modules.cookies.setCookie("VTEXSC","sc=2",365));var a=Promart.modules.cookies.getCookie(Promart.data.locate);if("Lima-Lima"!=(a=decodeURIComponent(a))&&"Lima-Lima-Lima"!=a||(a="Lima-Lima-Cercado de Lima",Promart.modules.cookies.deleteCookie(Promart.data.locate),Promart.modules.cookies.setCookie(Promart.data.locate,encodeURIComponent(a),365)),null===a||""===a){""!==Promart.modules.cookies.getCookie("PromartSc")&&Promart.modules.cookies.deleteCookie("PromartSc"),$('#dep option[value="0"]').prop("selected",!0)}else{Promart.modules.cookies.setCookie("PromartSc",t,15),Promart.modules.cookies.sc=t;var e=a.split("-"),o=e[0],r=e[1],s=e[2];if(void 0!==s){$(".js-modal-despacho").addClass("odp");var i=r+", "+s;$(".txt-cd-s").text("Ubicación"),$(".cd-s").text(i),Promise.all([Promart.components.header.citySpreadSheet()]).then(t=>{$('#dep option[data-name="'+o+'"]').attr("selected","selected").trigger("change"),$('#prov option[data-name="'+r+'"]').attr("selected","selected").trigger("change"),$('#dist option[data-name="'+s+'"]').attr("selected","selected");var e=$('#dist option[data-name="'+s+'"]').data("exp");e=!(null==typeof e||!e),Promart.components.header.validateExpress(a,e)})}else Promart.modules.cookies.deleteCookie(Promart.data.locate)}Promart.components.header.actionRefresh()},Promart.components.header.getParams=function(t){var a=document.location.href,e={};if(a.indexOf("?")>0){for(var o=a.split("?")[1].split("&").filter((function(t){return 0!=t.length})),r=0,s=o.length;r{$("#vtex-callcenter__user-email").length&&$("body").addClass("callCenter")},1e3)},Promart.components.header.citySpreadSheet=function(){return new Promise((t,a)=>{localStorage.removeItem("stateDep23"),localStorage.removeItem("stateDep22"),localStorage.removeItem("state");var e=Promart.modules.utils.getLocalStorage(Promart.data.lstorage);e.length?(__citySpreadSheet__=Promart.modules.utils.reduceFormatSheet(e,"Department",0),Promart.data.citiesDispatch=__citySpreadSheet__.Lima,Promart.components.header.validateCookieCity(Promart.data.citiesDispatch),t(!0)):Promart.modules.utils.getSheetV4("1wLj65Q2SPnFtxIrHiSpc4ys0lDmrAhhwFm3ym5FOTgo","DESPACHO").then((function(a){Promart.modules.utils.setLocalStorage(Promart.data.lstorage,a),__citySpreadSheet__=Promart.modules.utils.reduceFormatSheet(a,"Department",0),Promart.data.citiesDispatch=__citySpreadSheet__.Lima,Promart.components.header.validateCookieCity(Promart.data.citiesDispatch),t(!0)}))})},Promart.components.header.validateCookieCity=function(t){var a=Promart.modules.cookies.getCookie(Promart.data.locate);if((a=decodeURIComponent(a)).indexOf("**")>-1){var e=a.split("-")[1].toLowerCase();void 0!==e&&t.forEach((function(t){var a=t.gsx$district.$t,o=a.toLowerCase();if(o=o.substring(0,3)+o.substring(3).replace(/[a-z]/g,"*"),e==o){var r="Lima-"+a;Promart.modules.cookies.deleteCookie(Promart.data.locate),Promart.modules.cookies.setCookie(Promart.data.locate,encodeURIComponent(r),365)}}))}},Promart.components.header.cookieCity=function(){var t=Promart.modules.cookies.getCookie(Promart.data.locate);return null!==(t=decodeURIComponent(t))&&""!==t||($(".gh-close-modal .js-close-gh-popup").click(),$(".js-modal-despacho").addClass("active"),$(".cnt-win-despacho, .win-despacho").addClass("open"),!1)},Promart.components.header.validateExpress=function(t,a){if($("body").addClass("not-express"),null!==t||""!==t){var e=(new Date).getDay(),o=(new Date).getHours();e>0&&0<=o&&o<13&&a&&$("body").removeClass("not-express")}},Promart.components.header.init=function(){Promart.components.header.citySpreadSheet(),Promart.components.header.uiEvents(),Promart.modules.smartHistorial.clearSkusAccesories(),Promart.components.header.isUserLogged()},Promart.components.menu={},Promart.components.menu.data={},Promart.components.menu.uiBindEvents=function(){$(document).on("click",".dept-name:not(.link)",Promart.components.menu.openMenu),$(document).on("click",".js-open-menu, .js-menus",Promart.components.menu.openMegaMenu),$(document).on("click",".js-open-subcat",Promart.components.menu.openSubcat),$(document).on("click",".js-open-cat-mb",Promart.components.menu.openCatMobile),$(document).on("click",".link-cat, .link-sub-cat, .src-img-cat, .title-dpt a",Promart.components.menu.dataAttribute),$(".js-open-cat-mb").parent().prev().slideToggle("slow"),$(".js-open-menu").addClass("enable"),$(".js-menus").addClass("enable"),Promart.components.header.width_actual'+$subCat.name+"";s+='"}o+=r='',$(window).width()<1127&&$(".content-placeholder-menu-home .item-dept[data-index="+t[e].index+"]").append('
'+r+"
")}a+=o}$(".js-open-menu, .js-menus").addClass("first"),$(".js-menu-section .content-placeholder-menu-content").append(a)},Promart.components.menu.openMegaMenu=function(){if($(".desp-popup.js-dp").removeClass("open"),$(".js-open-menu").hasClass("first")&&$(".js-menus").hasClass("first")||($(".js-menu-data").find("ul.dept > li").appendTo(".js-menu-section .content-placeholder-menu-home"),void 0!==Promart.components.menu.data.JSON?Promart.components.menu.dataMenu(Promart.components.menu.data.JSON):Promart.modules.utils.request("/files/RDPromart-Departamento_v1.json").then((function(t){Promart.components.menu.data.JSON=t,Promart.components.menu.dataMenu(t)}))),$(".menu-home").hasClass("open"))$(this).removeClass("disable"),$(this).addClass("enable"),$(".menu-home").removeClass("open"),$(".menu-home").removeClass("re-position"),$(".menu-icon").removeClass("open"),$(".js-mnus-f").removeClass("active"),$(".bg-modal").removeClass("active"),$(".-txt").text("MENÚ");else{var t=$("header .logo-scroll").eq(0).hasClass("active"),a=$(".multi-cintillo-wrap").hasClass("set-close"),e=$(".multi-cintillo-wrap").hasClass("hide-cintillo");!t||a||e||$(".menu-home").addClass("re-position"),$(this).addClass("disable"),$(this).removeClass("enable"),$(".gh-close-modal").removeClass("open"),$(".menu-home").addClass("open"),$(".menu-icon").addClass("open"),$(".js-mnus-f").addClass("active"),$(".bg-modal").addClass("active"),$(".-txt").text("CERRAR")}$(".content-placeholder-menu-content").toggleClass("open"),$(".titulo_depar").find("span i").toggleClass("up"),$(".menu-content").hasClass("open")&&$(".menu-content").removeClass("open")},Promart.components.menu.openMenu=function(t){value=$(this).parent().data("index");var a=Promart.components.header.width_actual,e=Promart.components.header.width_tablet;ae&&($(".menu-content[data-index="+value+"]").hasClass("open")?($(".menu-content[data-index="+value+"]").removeClass("open"),$(this).parent().removeClass("selected")):($(".menu-content").removeClass("open"),$(".item-dept").removeClass("selected"),$(this).parent().addClass("selected"),$(".menu-content[data-index="+value+"]").addClass("open")))},Promart.components.menu.openSubcat=function(){$(this).toggleClass("up"),$(this).hasClass("up")?$(this).html("Ver menos"):$(this).html("Ver mas"),$(this).parent().siblings(".subcat-hidden").slideToggle("slow")},Promart.components.menu.openCatMobile=function(){$(this).next().slideToggle("slow"),$(this).toggleClass("down-arrow")},Promart.components.menu.openSubCatMobile=function(){$(this).next().slideToggle("slow"),$(this).toggleClass("selected")},Promart.components.menu.dataAttribute=function(){var t=$(this).closest(".menu-content").attr("data-link_category"),a=$(this).closest(".menu-content").attr("data-link_action"),e=$(this).attr("data-link_label");void 0!==e&&(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"menuCategorias","data-link_category":t,"data-link_action":a,"data-link_label":e}))},Promart.components.menu.init=function(){-1==window.location.href.indexOf("/checkout")&&Promart.components.menu.uiBindEvents()},Promart.components.popupCookie={},Promart.components.popupCookie.creationInfoPoliticaCookies=function(){$(this).closest(".gh-info").addClass("close"),$(".ficha-seller .controllers-seller").css({transition:"0.8s ease all",bottom:"0"}),$(".ficha-seller .controllers-seller").css({transition:"0.8s ease all",bottom:"0"}),$(".calculator-mc.fixed").css({bottom:"93px",transition:"all 0.8s ease 0s"}),setTimeout((function(){$(".gh-info-bottom").hide(),$(".js-ficha-cookie, .widget-container").removeClass("open"),$(window).width()<769&&$(".controllers-seller.ficha.fixed").length?$(".widget-container").css({bottom:"150px"}):$(".ficha-whatsapp").length?$(".widget-container").css({bottom:"75px"}):$(".widget-container").css("bottom","13px")}),1e3),Promart.modules.cookies.setCookie("promart_cookie_consent","true",360)},Promart.components.popupCookie.openInfoPoliticaCookies=function(){$("body").find(".gh-info-bottom").length||($("body").append("
"),$(".gh-info-bottom").removeClass("close"),$(".js-ficha-cookie, .widget-container").addClass("open")),$(".ficha-whatsapp").length||($(window).width()<769?$(".widget-container").css("bottom","150px"):$(".widget-container").css("bottom","80px"))},Promart.components.popupCookie.positionMobilePdp=function(){$(window).width()<=767&&$("body").hasClass("produto")&&$(".ficha-bread-crumb").before($(".gh-info.gh-info-bottom"));$(window).width()<=767&&$("body").hasClass("produto")&&$(window).on("scroll",(function(){var t=$(window).scrollTop(),a=$(".multi-cintillo-wrap.cintillo-wrap-header.gh-gtm"),e=a.hasClass("closed")||a.hasClass("set-closed")?"70px":"133px";t>50?$(".gh-info.gh-info-bottom").css({position:"fixed",top:e,"z-index":"100"}):t<=20&&($(".gh-info.gh-info-bottom").css({position:"static",top:"auto"}),$(".ficha-bread-crumb").before($(".gh-info.gh-info-bottom")))}))},Promart.components.popupCookie.setCookiePopup=function(t,a){"true"!=Promart.modules.cookies.getCookie(t)&&a()},Promart.components.popupCookie.uiEvents=function(){$(document).on("click",".gh-info-bottom .js-close-gh-popup-info",Promart.components.popupCookie.creationInfoPoliticaCookies)},Promart.components.popupCookie.init=function(){Promart.components.popupCookie.setCookiePopup("promart_cookie_consent",Promart.components.popupCookie.openInfoPoliticaCookies),Promart.components.popupCookie.uiEvents(),Promart.components.popupCookie.positionMobilePdp()},Promart.components.popup={},Promart.components.popup.uiEvents=function(){$(document).on("click",".js-close-gh-popup",Promart.components.popup.closePopup),$(document).on("click",".js-location",Promart.components.popup.openPopupStore),$(document).on("click",".js-btn-form-cyber",Promart.components.popup.registerCyberhome),$(document).on("click",".js-bgModal-sp",Promart.components.popup.removePopup),$(document).on("click",".js-add-without-exg",Promart.components.popup.addWithNoGarantee),$(document).on("click","#extra-garantia",Promart.components.popup.addWithNoGarantee),$(document).on("click",".js-add-exg",Promart.components.popup.addWithGarantee),$(document).on("click","#extra-garantia .g-popup-inner",(function(t){t.stopPropagation()})),Promart.components.popup.timerShowPopup(),window.location.pathname,Promart.components.popup.intervalPopup=!1},Promart.components.popup.openModalExtraG=function(){$(".g-popup#extra-garantia").addClass("active")},Promart.components.popup.closeModalExtraG=function(){$(".g-popup#extra-garantia").removeClass("active")},Promart.components.popup.buildInputExtraGarantia=function(t){var a='

Debes seleccionar una opción

';t.reverse().forEach((function(t){var e=(parseFloat(t.price)/100).toFixed(2);a+='
',a+='',a+='",a+="
"})),$("#extra-garantia .g-popup-controllers").html(a)},Promart.components.popup.addWithNoGarantee=function(){Promart.components.popup.closeModalExtraG(),Promart.components.header.cookieCity()&&Promart.components.header.actionRefresh()},Promart.components.popup.addWithGarantee=function(){var t=$("#extra-garantia"),a=t.find(".garantia-btn input:checked"),e=t.find(".g-popup-controllers .error");if(a.length){var o=Promart.modules.utils.getLocalStorage("actionRefresh");(o=JSON.parse(o)).extGarantia=a.val(),o.extGarantiaText=a.closest(".garantia-btn").find("p").text(),Promart.modules.utils.setLocalStorage("actionRefresh",JSON.stringify(o)),Promart.components.popup.closeModalExtraG(),Promart.components.header.cookieCity()&&Promart.components.header.actionRefresh()}else e.addClass("active")},Promart.components.popup.init=function(){Promart.components.popup.uiEvents()},Promart.components.popup.removePopup=function(){$(this).removeClass("active"),$(".gh-popup").removeClass("open"),$("body").removeClass("g-pop"),$("body").attr("style","overflow:auto;"),Promart.components.popup.intervalPopup=!0},Promart.components.popup.pauseableTimeout=function(t,a){var e,o,r=a;this.pause=function(){window.clearTimeout(e),r-=Date.now()-o},this.resume=function(){o=Date.now(),window.clearTimeout(e),e=window.setTimeout(t,r)},this.resume()},Promart.components.popup.nameCampaign="Newsletter",Promart.components.popup.closePopup=function(){$(this).closest(".gh-popup").removeClass("open"),$(this).closest(".gh-popup-seller").removeClass("open"),$(".js-bgModal-sp, .js-bgModal").removeClass("active"),$("body").removeClass("g-pop, exg"),$("body").attr("style","overflow:auto;")},Promart.components.popup.openPopupStore=function(){$("body").addClass("g-pop"),$(".js-bgModal").addClass("active"),$(".gh-popup-location").addClass("open"),$("body").attr("style","overflow:hidden;")},Promart.components.popup.creationSuscriptionCookieTen=function(){Promart.modules.cookies.setCookie("suscriptionCookie","true",10)},Promart.components.popup.popupSuscribete=function(){$("header").after('
Cupón suscríbete
'),Promart.components.popup.timer=new Promart.components.popup.pauseableTimeout(Promart.components.popup.openPopup,3e4)},Promart.components.popup.popupInformative=function(){$("header").eq(0).after(''),Promart.components.popup.openPopup()},Promart.components.popup.popupRTienda=function(){$(".gh-popup-rtienda").length||$("header").eq(0).after('
Retiro en tienda
'),$("body").addClass("g-pop"),$(".js-bgModal-sp").addClass("active"),$(".gh-popup-rtienda").addClass("open")},Promart.components.popup.openPopup=function(){$("body").addClass("g-pop"),$(".js-bgModal-sp").addClass("active"),$(".gh-popup-suscribete").addClass("open")},Promart.components.popup.creationCookieBySuscripcion=function(){Promart.modules.cookies.setCookie("registered","true",30)},Promart.components.popup.getPopupCyberhome=function(){$("header").eq(0).after('
')},Promart.components.popup.openPopup1=function(){"/suscribete"!=window.location.pathname&&"/capacitacion-online"!=window.location.pathname&&($("body").addClass("g-pop"),$(".js-bgModal-sp").addClass("active"),$(".gh-popup-cyber").addClass("open"),Promart.modules.gtm.promotionViewImages($(".gh-popup.gh-popup-cyber.gh-gtm"),[]))},Promart.components.popup.registerCyberhome=function(){var t=$(this),a=t.closest("form.form-cyber"),e=a.find(".js-email-form").val(),o=e.split("@"),r=(o[0],a.validator()),s=t.parents().find("input[name=checkCyber]").parent();if(r){s.next().find(".check-text-form").removeAttr("style");var i={email:e,nameCampaign:Promart.components.popup.nameCampaign};$.ajax({url:"/api/dataentities/CS/documents/",type:"POST",cache:!1,async:!1,headers:{Accept:"application/vnd.vtex.ds.v10+json","Content-Type":"application/json"},data:JSON.stringify(i),beforeSend:function(){},success:function(t){$(".popup-effect-revert").addClass("success-form");Promart.components.footer.tratamientoDatos(e,!0,!0,!1,!1,{ch_campanas_suscripcion:!0}),Promart.modules.utils.dataLayerSuscripcion("Popup"),Promart.components.popup.creationCookieBySuscripcion(),setTimeout((function(){a.find(".js-email-form").val(""),a.find("#checkedCyber").prop("checked",!1)}),3e3)},error:function(){}})}else s.hasClass("val_error")&&(o.length<2?$(".error-text-form").show("slow"):2==o.length&&$(".error-text-form").hide("slow"),s.next().find(".check-text-form").css({color:"#FF101C"}))},Promart.components.popup.checkEmailMD=function(t){return new Promise((a,e)=>{$.ajax({type:"GET",url:"/api/dataentities/CS/search?_where=(email="+t+")",headers:{Accept:"application/vnd.vtex.ds.v10+json","Content-Type":"application/json"},cache:!1,async:!1,success:function(t){a(t)},error:function(){res="error"}})})},Promart.components.popup.pauseTimer=function(t){Promart.components.popup.intervalPopup||"true"!=Promart.modules.cookies.getCookie("registered")&&setTimeout((function(){Promart.components.popup.timer.pause()}),300)},Promart.components.popup.resumeTimer=function(t){Promart.components.popup.intervalPopup||"true"!=Promart.modules.cookies.getCookie("registered")&&Promart.components.popup.timer.resume()},Promart.components.popup.iframe=function(t,a,e){if(null!=e)var o="onload='"+e+"();'";var r='"},Promart.components.popup.iframeListados=function(){$("#iframe-app").contents().find("body").addClass("gh-body-iframe"),$("#iframe-app").contents().find("body").addClass("gh-scroll-iframe"),$(".ventana-iframe").addClass("open")},Promart.components.popup.openPopupExg=function(){$("body").addClass("exg").addClass("g-pop"),$(".js-bgModal").addClass("active"),$(".gh-popup-exg").addClass("open"),$("body").attr("style","overflow:hidden;")},Promart.components.popup.timerShowPopup=function(){$(document).on("click",".js-service-exg-popup",Promart.components.popup.openPopupExg)},Promart.components.seo={},Promart.components.seo.uiBindEvents=function(){$(document).on("click",".js-ver-mas",Promart.components.seo.openText)},Promart.components.seo.openText=function(){var t=$(this).parent().prev();t.hasClass("show-seo")?t.removeClass("show-seo"):t.addClass("show-seo"),$(".bg-difuminado").toggleClass("hidden-bg"),$(".text-ver-mas").toggleClass("text-ver-menos"),$(".text-ver-mas").find(".close-seo").toggleClass("active"),$(".text-ver-mas").find(".open-seo").toggleClass("active")},Promart.components.seo.init=function(){Promart.components.seo.uiBindEvents()},Promart.modules.banner={},Promart.modules.banner.principal=function(){const t=__globalSpreadSheet__.bannerPrincipal;let a=0,e="";$.each(t,(function(t,o){if(Promart.modules.utils.itemVisible(o.gsx$inicio.$t,o.gsx$fin.$t,o.gsx$visible.$t)&&Promart.modules.utils.scVisible(o.gsx$saleschannel.$t)){o.gsx$urlmobile.$t=""!==o.gsx$urlmobile.$t?o.gsx$urlmobile.$t:"javascript:;";const t={urls:[o.gsx$url1.$t,o.gsx$url2.$t,o.gsx$url3.$t,o.gsx$url4.$t,o.gsx$url5.$t].filter(t=>""!==t),title:o.gsx$title.$t,id:a,imgdesktop:o.gsx$imgdesktop.$t,imgmobile:o.gsx$imgmobile.$t,alt:o.gsx$alt.$t,urlMobile:o.gsx$urlmobile.$t,terminos:o.gsx$terminos.$t,creativeSlot:o.gsx$creativeslot.$t,promoCategory:o.gsx$promocategory.$t,classCollage:o.gsx$collage.$t,class:o.gsx$express.$t?"gh-express":"",dataName:o.gsx$dataname.$t,dataPosition:o.gsx$dataposition.$t},r=0===a,s=r?"":"lazy-picture",i=r?"srcset":"data-srcset",n=r?"src":"data-src",l=r?'fetchpriority="high"':'loading="lazy"';let c="";for(let a=0;a\n ${a>0?'':""}\n ${a>0?``:""}\n `;const d=`\n `;r?$(".content-placeholder-sliders").append(d):e+=d,a++}})),$(".content-placeholder-sliders").append(e),Promart.modules.utils.carrouselSlick(".content-placeholder-sliders",1,!0,!1,8e3,!0,!0,!0,!0,!0,1,!1,"","ondemand"),Promart.pages.common.lazyLoadImages(".lazy-picture picture"),$(".content-placeholder-sliders .link").hover((function(){$(this).find(".link_btn").addClass("visible"),$(this).addClass("hover")}),(function(){$(this).find(".link_btn").removeClass("visible"),$(this).removeClass("hover")})),Promart.modules.gtm.promotionViewcarrousel($(".gh-gtm-carrousel"),"",$(".gh-gtm-carrousel").data("position"))},Promart.modules.bombaSemana={},Promart.modules.bombaSemana.principal=function(){var t=__globalSpreadSheet__.bombaSemana,a=$(".bomba-semana__component");$.each(t,(function(t,e){if(Promart.modules.utils.itemVisible(e.gsx$inicio.$t,e.gsx$fin.$t,e.gsx$visible.$t)){bombaItem={sectionTitle:""!=e.gsx$sectiontitle.$t?e.gsx$sectiontitle.$t:"",title:e.gsx$title.$t,detail:e.gsx$description.$t,icons:e.gsx$tipo.$t,url:e.gsx$url1.$t,blank:e.gsx$targetblank.$t,textButton:e.gsx$textbutton.$t,imgdesktop:e.gsx$imgdesktop.$t,imageAlt:e.gsx$alt.$t,dataName:e.gsx$dataname.$t,dataPosition:e.gsx$dataposition.$t,videoDesktop:e.gsx$videodesktop.$t,dataCreativeSlot:e.gsx$creativeslot.$t,dataPromoCategory:e.gsx$promocategory.$t};var o=`

${bombaItem.sectionTitle}

\n
\n
\n
\n ${""!==bombaItem.icons?`bomba-icons`:""}\n
\n ${""!==bombaItem.title?`

${bombaItem.title}

`:""}\n ${""!==bombaItem.detail?`

${bombaItem.detail}

`:""}\n
\n ${""!==bombaItem.url?`${bombaItem.textButton}`:""}\n
\n
\n
\n
\n
`;a.append(o),a.find(".bomba-semana__video").append(`
\n ${bombaItem.imageAlt}\n `)}else a.hide(),$(".bomba-semana[data-execfn='bombaSemana']").hide()}))},Promart.modules.buyTogether={},Promart.modules.buyTogether.principal=function(){},Promart.modules.buyTogether.renderPriceBuyTogether=function(t,a){let e=Promart.modules.prices.typePromo(a),o=void 0!==e&&Number(e.priceTOH)&&e.priceTOH0){e=t-a/100*t}return e},Promart.modules.buyTogether.renderHtmlCard=function(t,a,e,o,r){const s=null!==a?a:0,i="main"===o?r:s,n=(Promart.modules.buyTogether.buyTogetherWithDescount(t.price,"0"),Promart.modules.buyTogether.buyTogetherWithDescount(t.price,s)),l=(Promart.modules.buyTogether.buyTogetherWithDescount(t.listPrice,s),t.tohPrice>0?Promart.modules.buyTogether.buyTogetherWithDescount(t.tohPrice,s):0),c="main"===o?"main-product":"suggested-product",d=l>0?`data-pricetoh="${l}"`:"",p="main"!==o?`\n
\n \n \n
\n `:"";return`\n
\n
\n ${p}\n
\n \n ${"main"===o?"Lleve este producto":""}\n
\n ${"main"===o?`\n
\n
\n \n
\n
\n \n \n \n
\n El 2do producto con hasta\n
${i}%
\n descuento\n
`:`\n
\n
\n - ${s}% DSCTO\n
\n
\n \n
\n
\n \n \n

P. Oferta:

${Promart.modules.utils.formatMoneda(n)}\n

\n
\n
\n\n ${l>0?`\n
\n \n

P. Tarjeta

${Promart.modules.utils.formatMoneda(l)}

\n
\n
\n \n `:""}\n
\n
`}\n
\n
\n `},Promart.modules.buyTogether.templateProductHorizontal=function(t,a,e){let o=Promart.modules.buyTogether.renderPriceBuyTogether(t,a),r="";return"main"==e&&(r+=Promart.modules.buyTogether.renderHtmlCard(o,t[0].descuento1,t[0].unidades,"main",t[0].descuento2)),"list"==e&&(r+=Promart.modules.buyTogether.renderHtmlCard(o,t[0].descuento2,1,"list",t[0].descuento2)),r},Promart.modules.buyTogether.listProductsPromo=function(t,a){var e=Promart.modules.cookies.getCookie("VTEXSC")?Promart.modules.cookies.getCookie("VTEXSC").split("sc=")[1]:2;let o="";t.forEach(t=>{t.lista2.forEach(t=>{o+="skuId:"+t+","})}),Promart.modules.utils.getProduct2(o,e).then(()=>{let e="";if(t.forEach(t=>{t.lista2.slice().sort((a,e)=>{Promart.data.products[String(a)],Promart.data.products[String(e)];const o=Number(t.descuento2)||0;return(Number(t.descuento2)||0)-o}).forEach((o,r)=>{let s=Promart.data.products[String(o)];void 0!==s&&s.items[0].sellers[0].commertialOffer.AvailableQuantity>0&&(e+=Promart.modules.buyTogether.templateProductHorizontal([t],s,a))})}),""!==e){$("#list-products-promo").append(e);const t=$("#list-products-promo .product-main_box").first();t.addClass("product-main_box-checked"),t.find(".product-radio").addClass("product-radio-checked"),t.find(".product-selector").prop("checked",!0),Promart.modules.buyTogether.buyTogetherResult()}else $("#buy-together").remove();let o=0;$(".buy-together_item.product").each((function(){const t=Number($(this).data("discount"))||0;t>o&&(o=t)})),$("#buy-together_product-main .promo div").text(o+"%")})},Promart.modules.buyTogether.getBuyTogether=function(){return new Promise((t,a)=>{Promart.services.request.get("/files/promocombo.json").done(a=>{let e=Promart.pages.ficha.prodSku;const o=a.items.filter(t=>t.lista1.includes(e));o.length&&(o[0].lista1=[e],t(o)),t([])})})},Promart.modules.buyTogether.buyTogether=function(){let t=Promart.data.products[Promart.pages.ficha.prodSku],a=t.items[0].sellers[0].commertialOffer.BuyTogether.length;if(Promart.pages.ficha.amount>0&&a){const a='\n `)}$("#list-products-promo").slick("slickGetOption","infinite")?$("#pagination_prev-btn").removeClass("slick-disabled"):$("#pagination_prev-btn").addClass("slick-disabled"),Promart.modules.buyTogether.buyTogetherResult(),$("#list-products-promo").on("afterChange",(function(t,t,a){Promart.modules.buyTogether.buyTogetherResult(),$("#list-products-promo .slick-prev").hasClass("slick-disabled")?$("#pagination_prev-btn").addClass("slick-disabled"):$("#pagination_prev-btn").removeClass("slick-disabled"),$("#list-products-promo .slick-next").hasClass("slick-disabled")?$("#pagination_next-btn").addClass("slick-disabled"):$("#pagination_next-btn").removeClass("slick-disabled");let e=a+1;$("#page_initial").text(e),$("#dropdown-options div").removeClass("active"),$('#dropdown-options > div[data-value="'+e+'"]').addClass("active")}))},Promart.modules.buyTogether.uiEvents=function(){$(document).on("click","#btn-down",Promart.modules.buyTogether.downQuantity),$(document).on("click","#btn-up",Promart.modules.buyTogether.upQuantity),$(document).on("click","#buy-together_add-cart",Promart.modules.buyTogether.addCartBuyTogether),$(document).on("click",".icon-close",(function(){$(".content-buy-together-variant").hide()})),$(document).on("change",".product-selector",(function(){$(".product-selector").not(this).prop("checked",!1),Promart.modules.buyTogether.buyTogetherResult()})),$(document).on("click",".suggested-product .product-main_box",(function(t){if($(t.target).closest("a").length)return;$(".product-selector").prop("checked",!1),$(".product-main_box").removeClass("product-main_box-checked"),$(".product-radio").removeClass("product-radio-checked");$(this).find(".product-selector").prop("checked",!0),$(this).addClass("product-main_box-checked"),$(this).find(".product-radio").addClass("product-radio-checked"),Promart.modules.buyTogether.buyTogetherResult()})),$(document).on("change",".product-selector",(function(){const t=$(this).closest(".product-main_box");$(".product-selector").not(this).prop("checked",!1),$(".product-main_box").removeClass("checked"),$(".product-radio").removeClass("product-radio-checked"),t.addClass("checked"),$(this).closest(".product-radio").addClass("product-radio-checked"),Promart.modules.buyTogether.buyTogetherResult()})),$(document).on("change","#input-number",(function(){Promart.modules.buyTogether.buyTogetherResult()})),$(document).on("click",".content-BuyTogether",(function(t){t.preventDefault(),$(".content-buy-together-variant").show();let a,e=$(".buy-together_products-list");e.find(".product").removeAttr("data-impression"),Promart.modules.gtm.productArrayCarrouselScroll(e,".product"),e.on("scroll",(function(){a&&clearTimeout(a),a=setTimeout(()=>{e.find(".product").each((function(){const t=$(this),a=t[0].getBoundingClientRect(),e=Math.max(document.documentElement.clientHeight,window.innerHeight);a.top>=0&&a.bottom<=e||t.removeAttr("data-impression")})),Promart.modules.gtm.productArrayCarrouselScroll(e,".product")},100)}))})),$(document).on("click",(function(t){const a=$(".content-buy-together-variant");!a.is(":visible")||$(t.target).closest(".buy-together").length||$(t.target).closest(".content-BuyTogether").length||(a.hide(),$(".buy-together_products-list").off("scroll"))})),$(document).on("click",".buy-together",(function(t){t.stopPropagation()}))},Promart.modules.buyTogether.init=function(){},Promart.modules.calculatorMc={},Promart.modules.calculatorMc.openCalculater=function(){$(this).hasClass("active")?($(this).removeClass("active"),$(this).siblings().slideUp(),$(window).width()<768&&($(".js-bgModal").removeClass("active"),$("body").attr("style","overflow:auto;"),$(".calculator-mc").css("height","auto"))):($(this).addClass("active").siblings().stop().slideDown(),$(window).width()<768&&($(".js-bgModal").addClass("active"),$("body").css("overflow","hidden"),$(".cnt-calculatorMc").hasClass("scroll")&&$(".calculator-mc").css("height","calc(100% - 35%)")))},Promart.modules.calculatorMc.removeTooltip=function(){$(".js-cnt-txtCalculator").removeClass("active"),$(".js-cnt-txtCalculator").siblings().slideUp(),$(".js-bgModal").removeClass("active"),$("body").attr("style","overflow:auto;"),$(".calculator-mc").css("height","auto")},Promart.modules.calculatorMc.scrollMv=function(){$(".tooltip").removeClass("active");var t=$(".cnt-calculatorMc-item").length>7;$(window).width()<768&&t?$(".cnt-calculatorMc").addClass("scroll"):$(".cnt-calculatorMc").removeClass("scroll"),$(".cnt-calculatorMc").hasClass("scroll")?$(".calculator-mc").css("height","calc(100% - 35%)"):$(".calculator-mc").css("height","auto")},Promart.modules.calculatorMc.showTooltip=function(){$(this).closest(".addArea").find(".tooltip").show()},Promart.modules.calculatorMc.Area=function(){var t=2==$(this).data("id")?"space":"",a='
';a+='

Área: '+($(".cnt-calculatorMc-item").length+1)+"

",a+='
',a+='
',a+='x',a+='',a+="
",a+='
',a+='',a+="
",a+="
",a+='
Cambiar a m2',a+="
",a+='
',$(".cnt-calculatorMc-area").append(a);var e=$(".cnt-calculatorMc-item");1==e.length?e.addClass("first"):e.removeClass("first")},Promart.modules.calculatorMc.totalLineal=function(t){var a=0;a+=Promart.pages.ficha.widthProduct;var e=Math.ceil(t/a),o=($(".ficha-seller").data("price")*e).toFixed(2),r=0;void 0!==$(".ficha-seller").data("pricetoh")&&(r=(r=($(".ficha-seller").data("pricetoh")*e).toFixed(2)).toFixed(2)),t>0?(Promart.modules.calculatorMc.summary(e,a,t,o,r),$(".cnt-text-calculatorMc").hasClass("linealMetre")&&Promart.modules.calculatorMc.warning(),$(".ficha-seller").find(".js-cantProdFichaMC").val(e),$(".ficha-seller").find(".js-cantProdFicha").val(e),$(".cnt-calculatorMc-summary").show(),$(".cnt-calculatorMc-warning").show(),$(window).width()<768?($(".calculator-mc ~ .controllers-seller.ficha.fixed").css("box-shadow","0px -5px 10.399999618530273px 0px rgba(0, 0, 0, 0.25)"),".cnt-calculatorMc-summary-line".length&&$(".tooltip").css("bottom","178px")):".cnt-calculatorMc-summary-line".length&&$(".tooltip").css("bottom","123px")):($(".cnt-calculatorMc-summary").hide(),$(".cnt-calculatorMc-warning").hide(),$(".tooltip").css("bottom","44px"),$(".calculator-mc ~ .controllers-seller.ficha.fixed").css("box-shadow","none"),$(".ficha-seller").find(".js-cantProdFichaMC").val(1),$(".ficha-seller .js-tooltip_mc").find(".cant_caja").html("1 Caja"))},Promart.modules.calculatorMc.totalMC=function(t){var a=0,e=Math.ceil(t/Promart.pages.ficha.mc);a+=Promart.pages.ficha.mc*e;var o=($(".ficha-seller").data("price")*Promart.pages.ficha.mc).toFixed(2)*e;o=o.toFixed(2);var r=0;void 0!==$(".ficha-seller").data("pricetoh")&&(r=(r=($(".ficha-seller").data("pricetoh")*Promart.pages.ficha.mc).toFixed(2)*e).toFixed(2)),t>0?(Promart.modules.calculatorMc.summary(e,a,t,o,r),$(".cnt-text-calculatorMc").hasClass("linealMetre")&&Promart.modules.calculatorMc.warning(),$(".ficha-seller").find(".js-cantProdFichaMC").val(a),$(".ficha-seller").find(".js-cantProdFicha").val(e),$(".ficha-seller .js-tooltip_mc").find(".cant_caja").html(e+(e>1?" Cajas":" Caja")),$(".cnt-calculatorMc-summary").show(),$(".cnt-calculatorMc-warning").show(),$(window).width()<768?($(".calculator-mc ~ .controllers-seller.ficha.fixed").css("box-shadow","0px -5px 10.399999618530273px 0px rgba(0, 0, 0, 0.25)"),".cnt-calculatorMc-summary-line".length&&$(".tooltip").css("bottom","178px")):".cnt-calculatorMc-summary-line".length&&$(".tooltip").css("bottom","123px")):($(".cnt-calculatorMc-summary").hide(),$(".cnt-calculatorMc-warning").hide(),$(".tooltip").css("bottom","44px"),$(".calculator-mc ~ .controllers-seller.ficha.fixed").css("box-shadow","none"),$(".ficha-seller").find(".js-cantProdFichaMC").val(1),$(".ficha-seller .js-tooltip_mc").find(".cant_caja").html("1 Caja")),Promart.modules.sugeridos.updateSugeridos(),Promart.modules.sugeridos.calculateSubTotal()},Promart.modules.calculatorMc.total=function(){var t=$(".cnt-calculatorMc-item"),a=0;for(let o=0;o1?" Cajas":" Caja")),$(".js-cantProdFichaMC").val(Promart.pages.ficha.mc*t),$(".cnt-text-calculatorMc").hasClass("linealMetre")?Promart.modules.calculatorMc.totalLineal(t*Promart.pages.ficha.widthProduct):Promart.modules.calculatorMc.totalMC(t*Promart.pages.ficha.mc),a?$("#cbox1").attr("checked",!1):$("#cbox1").attr("checked",!0)},Promart.modules.calculatorMc.summary=function(t,a,e,o,r){$(".cnt-calculatorMc-summary").html("");var s=t>1?"Cajas":"Caja",i=a>1?"lineales":"lineal";if($(".cnt-text-calculatorMc").hasClass("linealMetre")){var n='
';n+='

Necesitarás: '+t+"m. "+i+" para cubrir "+e+" m2

",n+='

Precio: s/ '+o+"

",n+=r>0?' s/ '+r+"":"",n+="
",n+='

*Ancho de rollo: '+Promart.pages.ficha.widthProduct+" metros

"}else{n='
';n+='

Necesitas: '+t+" "+s+'

',n+=''+a.toFixed(2)+' m2',n+=' s/ '+o+" ",n+=r>0?' s/ '+r+"":"",n+="
",n+='

Sé prevenido, añade un 10% para zócalos perdidas y rupturas.

',n+=""}$(".cnt-calculatorMc-summary").append(n)},Promart.modules.calculatorMc.warning=function(){$(".cnt-calculatorMc-warning").html("");$(".cnt-calculatorMc-warning").append('

Importante: Recuerda que este producto se vende por corte y no se aceptan devoluciones

')},Promart.modules.calculatorMc.areaChange=function(){var t=$(this).data("id"),a=$(this).closest(".cnt-calculatorMc-item");2==t?(a.find(".cnt-calculatorMc-type").addClass("space"),$(this).html("Cambiar a largo x ancho"),$(this).attr("data-link_label","Cambiar a largo x ancho"),$(this).data("id",1)):(a.find(".cnt-calculatorMc-type").removeClass("space"),$(this).attr("data-link_label","Cambiar a m2"),$(this).html("Cambiar a m2"),$(this).data("id",2))},Promart.modules.calculatorMc.areaDelete=function(){$(this).closest(".cnt-calculatorMc-item").remove();var t=$(".cnt-calculatorMc-item");for(let a=0;a input",Promart.modules.calculatorMc.total),$(document).on("click",".tooltip-txt",Promart.modules.calculatorMc.scrollMv),$(document).on("click",".tooltip-txt",Promart.modules.calculatorMc.Area),$(document).on("click",".optionMc",Promart.modules.calculatorMc.areaChange),$(document).on("click",".cnt-calculatorMc-closed",Promart.modules.calculatorMc.areaDelete),$(document).on("click",".cnt-calculatorMc-summary-chk",Promart.modules.calculatorMc.check)},Promart.modules.calculatorMc.init=function(){Promart.modules.calculatorMc.uiBindEvents(),Promart.modules.calculatorMc.Area()},Promart.modules.campanasEspeciales={},Promart.modules.campanasEspeciales.principal=function(){const t=__globalSpreadSheet__.campanaEspecial,a=$(".campanas-especiales-container");$.each(t,(function(t,e){if(!Promart.modules.utils.itemVisible(e.gsx$inicio.$t,e.gsx$fin.$t,e.gsx$visible.$t))return $(".campanas-especiales").remove(),!1;campanaEspecial={tipo:e.gsx$tipo.$t,title:e.gsx$title.$t,imgdesktop:e.gsx$imgdesktop.$t,imgmobile:e.gsx$imgmobile.$t,imageAlt:e.gsx$alt.$t,url:e.gsx$url1.$t,dataName:e.gsx$dataname.$t,dataPosition:e.gsx$dataposition.$t,dataCreativeSlot:e.gsx$creativeslot.$t,dataPromoCategory:e.gsx$promocategory.$t,targetBlank:e.gsx$targetblank.$t?"target='_blank'":""},$("body").hasClass("resultado-busca")&&(campanaEspecial.dataPosition=campanaEspecial.dataPosition.replace(/^Home/,"Buscavazia")),"primario"==campanaEspecial.tipo?a.find(".campanas-especiales__primario").append(`\n ${campanaEspecial.imageAlt}\n `):"secundario"==campanaEspecial.tipo&&a.find(".campanas-especiales__secundario").append(`\n ${campanaEspecial.imageAlt}\n `)}))},Promart.modules.card={},Promart.modules.card.principal=function(){},Promart.modules.card.isValidTag=function(t,a,e,o){const r=o.find(a=>a.text.toLowerCase()===t.toLowerCase());let s=r&&r.days.includes(a)&&e>=r.startHour&&e{const o=t.match(e);return o&&o[0]===a})},Promart.modules.card.template=function(t,a=!0){let e={},o="";const r=""!=t.m2?t.m2:1,s="TRUE"==t.m2||""!=t.m2,i=t.tohPay>0?t.tohPay:t.tohPrice>0?t.tohPrice:0;let n=s?'x m2':"";n="m"==t.ml?'x m':n;var l="string"==typeof t.listPrice?t.listPrice.replace(",","")/r:t.listPrice/r,c="string"==typeof t.bestPrice?t.bestPrice.replace(",","")/r:t.bestPrice/r,d="string"==typeof i?i.replace(",","")/r:i/r,p=1;c>0&&p++,d>0&&p++;let m=`
\n ${t.percentTeaser>0?`

-${t.percentTeaser}%

`:""}\n ${t.percentDiscount>0?`
-${t.percentDiscount}%
`:""}\n
`;const u=a?JSON.stringify(t.tag).toLowerCase():t.tag;let h=0===t.availableQuantity?"soldout":"";t.color?o="color":s?o="-metroCuadrado":"m"==t.ml&&(o="proveedor");const g=[{text:"retira hoy",priority:1,startHour:0,endHour:17,days:[1,2,3,4,5,6]},{text:"retira mañana",priority:2,startHour:0,endHour:23,days:[1,2,3,4,5,6]},{text:"llega hoy",priority:1,startHour:0,endHour:15,days:[1,2,3,4,5,6]},{text:"llega mañana",priority:2,startHour:0,endHour:23,days:[0,1,2,3,4,5]}];if(void 0!==u){const a=new Date,o=a.getDay(),r=a.getHours(),s=[];g.forEach(a=>{const e=a.text.replace(/\s+/g,"-");if(Object.values(t.tag).find(t=>{const a=t.match(/^(\d+)-(.*)/);if(a){const t=a[1];return a[2].toLowerCase().replace(/\s+/g,"-")===e&&t===Promart.data.sc}return!1})&&Promart.modules.card.isValidTag(a.text,o,r,g)){const t=Promart.modules.card.capitalizeFirstLetter(a.text);s.push({text:t,priority:a.priority,type:a.text.includes("retira")?"retiro":"despacho"})}});const i={};s.forEach(t=>{(!i[t.type]||t.priority{n+=``});const l=Promart.data.tags.filter((function(t){if(u.includes(t.name))return t})),c=void 0!==t.availableQuantity?t.availableQuantity:"",d=[...Object.values(i).map(t=>({name:t.text,type:t.type,priority:t.priority,variant:"texto",content:{text:t.text,background:"#464646",color:"#FFFFFF",borderColor:"#464646"}})),...l];e=Promart.modules.product.returnHtmlFlags(d,2,c,t.tag)}else e.omni="",e.all="";""!=Promart.data.blproducts&&-1!=Promart.data.blproducts.indexOf(t.sku)&&(o="blacklist",h="soldout",m="",c=l,l=0,d=0);var f=`
0?"price__size--underline":""}">\n ${l>0?Promart.modules.utils.formatMonedaHtml(l.toFixed(2))+n:""}\n
`;p>1&&p--;var v=`
0?"":"price__size--black"}">\n ${c>0?Promart.modules.utils.formatMonedaHtml(c.toFixed(2))+n:""}\n
`;p>1&&p--;const $=`
\n ${f}\n ${v}\n ${`
\n ${d>0?Promart.modules.utils.formatMonedaHtml(d.toFixed(2))+n:""}\n \n
`}\n
`,P=(s?`
${r} m2
`:"")+" ",b=s?"mc--boxes":"";var y=Promart.modules.card.discountPriceNxM(t);const C=a?`data-id="${t.productId}" data-sku="${t.sku}" data-name='${t.productName}' data-seller="${t.seller}" ${t.listPrice>0?'data-list-price="'+t.listPrice+'"':""} data-best-price="${t.bestPrice}" ${i>0?'data-pricetoh="'+i+'"':""} ${void 0!==t.availableQuantity?'data-availableQuantity="'+t.availableQuantity+'"':""} ${s?'data-mc="'+r+'"':""} data-categories="${t.categories}" `:`data-name='${t.dataName}' data-position="${t.dataPosition}" data-creative-slot="${t.dataCreativeSlot}" data-promo-category="${t.dataPromoCategory}"`,k=t.images.sort((t,a)=>t.index-a.index).slice(0,4).reverse().map(a=>`${t.sku}`).join("");return`
\n ${a?``:""}\n
\n ${""!=e.omni?e.omni:""}\n ${m}\n \n
\n ${k}\n
\n
\n
\n
${""!=e.all?`
${e.all}
`:""}
\n

${t.productName}

\n
\n
${t.brand}
\n
${t.sku}
\n
\n ${$}\n
\n \n ${a?`
\n ${"soldout"===h?`Ver stock en tiendas`:`
\n \n \n ${P} \n
\n ${""!=b?'
Caja
':""}\n ${"m"===t.ml?'
m
':""}\n `}\n
`:""}\n
\n
`},Promart.modules.card.hoverEffect=function(t){const a=t.find("img");let e,o=0;function r(){a.removeClass("is-active is-previous");const t=0===o?a.length-1:o-1;a.eq(o).addClass("is-active"),a.eq(t).addClass("is-previous"),o=(o+1)%a.length}a.removeClass("is-active is-previous"),a.eq(0).addClass("is-active"),a.eq(1).addClass("is-previous"),e||(e=setInterval(r,500)),t.on("mouseleave",(function(){clearInterval(e),e=null,a.removeClass("is-active is-previous")}))},Promart.modules.card.templateSheet=function(t){let a=Number(t.bestPrice),e=Number(t.listPrice),o=t.tohPay>0?t.tohPay:t.tohPrice>0?t.tohPrice:0,r=o>0?Math.floor((100*(1-Number(o)/(a{const a=t.imageUrl;if(a){const t=/\/(\d+)\//.exec(a);if(t)return a.replace(t[1],t[1]+"-190-190").replace(".jpg",".webp")}return""}),n={productName:t.productName,brand:t.brand,link:t.link,productId:t.productId,tag:t.clusterHighlights,categories:t.categories[0],categoriesIds:t.categoriesIds[0],sku:o.itemId,imageUrl:o.images[0].imageUrl,seller:s.sellerId,bestPrice:s.price,listPrice:s.price0){const a=t.items[0].sellers[0].commertialOffer.PromotionTeasers,e=a.findIndex(t=>/^(\d+x\d+)/i.test(t.Name));if(-1!==e){const t=/^(\d+x\d+)/i,o=a[e].Name.match(t);if(o){const t=o[1];n.tag={...n.tag,[e]:t}}}}return Promart.modules.card.template(n)},Promart.modules.card.templateBanner=function(t){$("body").hasClass("resultado-busca")&&(t.position=t.position.replace(/^Home/,"Buscavazia"));let a='",a},Promart.modules.card.discountPriceNxM=function(t){const a=t.tag,e=/(?:OH-)?(\d+[xX]\d+)/;for(const o in a){const t=a[o];if(e.test(t)){const a=t.match(e)[1].split(/x|X/),o=parseInt(a[0]),r=parseInt(a[1]);return[`NxM ${o}x${r}`,`${o}x${r}`]}}return["",""]},Promart.modules.card.uiBindEvents=function(){$(window).width()>640&&$(document).on("mouseenter",".images__wrap",(function(){const t=$(this);Promart.modules.card.hoverEffect(t)}))},Promart.modules.card.init=function(){Promart.modules.card.uiBindEvents()},Promart.modules.carrouselIconos={},Promart.modules.carrouselIconos.principal=function(){null!=__globalSpreadSheet__&&void 0!==__globalSpreadSheet__.carouselIcono&&(nresp=__globalSpreadSheet__.carouselIcono,$.each(nresp,(function(t,a){if(Promart.modules.utils.itemVisible(a.gsx$inicio.$t,a.gsx$fin.$t,a.gsx$visible.$t)){var e={};e={title:a.gsx$title.$t,imgdesktop:a.gsx$imgdesktop.$t,alt:a.gsx$alt.$t,urls:a.gsx$url1.$t,dataName:a.gsx$dataname.$t,dataPosition:a.gsx$dataposition.$t,creativeSlot:a.gsx$creativeslot.$t,promoCategory:a.gsx$promocategory.$t,dataIndex:a.gsx$dataindex.$t},$("body").hasClass("resultado-busca")&&(e.dataPosition=e.dataPosition.replace(/^Home/,"Buscavazia")),$(".content-placeholder-sliders2").append('Departamento '+e.alt+'')}})),$(".carousel-icons-item").length>0?$(window).width()>640&&Promart.modules.utils.carrouselSlick(".content-placeholder-sliders2",11,!1,!1,8e3,!0,!0,!1,!0,!0,1,!1,"","ondemand",1):$(".carousel-iconos").hide())},Promart.modules.carouselToh={},Promart.modules.carouselToh.principal=async function(){var t=$('section[data-execfn="carouselToh"]');await Promart.modules.product.jsonTagsPromart(),Promart.modules.smartHistorial.buildLoadingCards($(".carrousel-products-oh .carrousel-products")),Promart.modules.carouselToh.sliderProducts(t)},Promart.modules.carouselToh.interleaveResponses=function(t){let a="",e=Math.max(...t.map(t=>t.length));for(let o=0;o{t[o]&&(a+=Promart.modules.card.templateShelve(t[o]))});return a},Promart.modules.carouselToh.sliderProducts=async function(t){const a=Promart.modules.utils.getLocalStorage("categoryHistorial");var e=$(t);if(Promart.data.sc=Promart.modules.cookies.getCookie("VTEXSC")?Promart.modules.cookies.getCookie("VTEXSC").split("sc=")[1]:2,a.length>0){let t="",o=a.slice(-1)[0].catID,r=o.split("/")[1];Promart.modules.utils.getProductSearch("fq=H:2778&fq=C:"+o+"&fq=P:[100TO3000]&fq=sellerId:1&O=OrderByBestDiscountDESC",Promart.data.sc,14).then((function(a){if(a.length>0){for(let e=0;e3?Promart.modules.utils.getProductSearch("fq=H:2778&fq=C:/"+r+"/&fq=P:[100TO3000]&fq=sellerId:1&O=OrderByBestDiscountDESC",Promart.data.sc,14).then((function(a){if(a.length){for(let e=0;e{const a=Promart.modules.carouselToh.interleaveResponses(t);Promart.modules.carouselToh.loadData(e,a)})},Promart.modules.carouselToh.loadData=function(t,a){$(t).show(),$(t).find(".js-ver-seen").attr("href","/ofertas-oh");var e=t.find(".carrousel-products");e.append("
"+a+"
"),t.find(".js-loading").remove(),$(window).width()>768&&Promart.modules.utils.carrouselSlick(e.find(".js-prod > div"),5,!1,!0,8e3,!0,!1,!0,!0,!1,3,!1)},Promart.modules.cartcarrousel={},Promart.modules.cartcarrousel.categories=function(t,a){var e=t.split("/");return"/"+a[e[1]]+"/"+a[e[2]]+"/"+a[e[3]]+"/"},Promart.modules.cartcarrousel.principal=function(){const t=vtexjs.checkout.orderForm;var a="",e="",o=$(".carrousel-cart-home-right"),r=$("body").hasClass("home-redisign")?"Home_C-Carrito-abandonado":"Producto_Carrito-abandonado";if(void 0!==t&&void 0!==t.items&&t.items.length){const n=t.items.reverse();$(".carrousel-cart-home").removeClass("gh-preload"),n.map((function(t,o){var s=Promart.modules.cartcarrousel.categories(t.productCategoryIds,t.productCategories);const i=t.additionalInfo?t.additionalInfo.brandName:"",l=t.price?t.price/100:0,c=t.listPrice?t.listPrice/100:0,d=c>l?c-l:0;if(o>9)return;const p=Promart.modules.utils.getResizedImage(t.imageUrl,167,167);if(9===o&&n.length>10)e+='

+'+(n.length-o)+'

Ir a mi carrito

'+t.name+"

";else{var m="";m+='

'+t.name+"

",a+=m}}));const l="¡Tu carrito te espera!",c="Ir a mi carrito",d="Ir al checkout";var s=$(".cnt-carrousel-cart"),i=`
\n

${l}

${d} ${c} \n
`;s.html(i),$(".carrousel-cart-home").addClass("bg-orange"),o.append("
"+a+e+"
"),$(window).width()>820&&n.length>5&&Promart.modules.utils.carrouselSlick(o.find(" > div"),5,!1,!1,8e3,!0,!0,!0,!0,!1,4,!1,"","","",4),o.find(".product.product-see-more-button").on("click",(function(){$(".product-see-more-button").data("name","Ir a mi carrito")})),n.length>2&&(o.addClass("more-items"),o.find("> div").addClass("more-items"))}else $(".carrousel-cart-home").remove()},Promart.modules.categorias={},Promart.modules.categorias.principal=function(){var t=__globalSpreadSheet__.categorias;Promart.modules.categorias.sectionCategoria(t)},Promart.modules.categorias.sectionCategoria=function(t){var a=!1,e="";t=t.filter(Boolean);for(var o=0;o0?t[o].gsx$sectiontitle.$t:"",title:t[o].gsx$title.$t,imgObject:t[o].gsx$imgdesktop.$t,imgLogo:t[o].gsx$imgmobile.$t,url:t[o].gsx$url1.$t,alt:t[o].gsx$alt.$t,dataName:t[o].gsx$dataname.$t,dataPosition:t[o].gsx$dataposition.$t,creativeSlot:t[o].gsx$creativeslot.$t,promoCategory:t[o].gsx$promocategory.$t,dataIndex:t[o].gsx$dataindex.$t},!a&&r.sectionTitle&&(e='

'+r.sectionTitle+"

",a=!0);var s=`\n
\n ${r.alt} \n ${r.title}\n
\n
\n
${r.title}
\n
\n
`;e&&$(".categorias-home-title").html(e),$(".content-placeholder-categorias-home").append(s)}},Promart.modules.cintilloDinamico={},Promart.modules.cintilloDinamico.IntervalFn=null,Promart.modules.cintilloDinamico.contadorCintilloHeader=function(){if($(".js-cintillo-tiempo-rest").length&&"function"==typeof $(".js-cintillo-tiempo-rest").countdown){var t=$(".js-cintillo-tiempo-rest").data("date");$(".js-cintillo-tiempo-rest").countdown(t,(function(t){$(this).html(t.strftime('
%D

%!D:Día,Días;

%H

%!H:Hrs.,Hrs.;

%M

%!M:Min.,Min.;

%S

%!S:Seg.,Seg.;

'))})),$(".js-cintillo-tiempo-rest").removeClass("hide"),$(".js-cargando").addClass("hide")}},Promart.modules.cintilloDinamico.cerrarCintilloHeader=function(){$("header .multi-cintillo-wrap.cintillo-wrap-header").addClass("set-closed"),$(".menu-destacados, .gh-info.gh-info-bottom").addClass("closed-cin"),$(".wp-content").removeClass("cintilloHeaderOn"),$(".menu-home, .js-n-menu").removeClass("cintilloHeaderOn"),$(".low-hd").removeClass("cintilloHeaderOn"),document.cookie="cintilloIsClosedHeader=true;path=/;"},Promart.modules.cintilloDinamico.cintilloHeaderExists=function(t){var a=$(t).length,e=Promart.modules.cookies.getCookie("cintilloIsClosedHeader");a&&""==e&&(Promart.modules.cintilloDinamico.setIntervalCintillo(t),$(".multi-cintillo-wrap.cintillo-wrap-header").removeClass("set-closed"),$(".filtros-ord").addClass("cintilloHeaderOn"),$(".wp-content").addClass("cintilloHeaderOn"),$(".menu-home, .js-n-menu").addClass("cintilloHeaderOn"),$(".low-hd").addClass("cintilloHeaderOn"),$(".menu-destacados").removeClass("closed-cin"),setTimeout(()=>{void 0===Promart.modules.gtm||$("body").hasClass("produto")||Promart.modules.gtm.promotionViewImages($(".multi-cintillo-wrap.gh-gtm"))},1e3))},Promart.modules.cintilloDinamico.clearInterval=function(t){clearInterval(Promart.modules.cintilloDinamico.IntervalFn)},Promart.modules.cintilloDinamico.setIntervalCintillo=function(t){var a=$(t),e=a.length;e>1&&(a.not(0).addClass("no-showing"),a.eq(0).addClass("showing"),Promart.modules.cintilloDinamico.IntervalFn=setInterval((function(){var o=$(t+".showing").index();o=o==e-1?0:o+1,a.eq(o-1).removeClass("showing").addClass("no-showing"),a.eq(o).removeClass("no-showing").addClass("showing")}),4e3))},Promart.modules.cintilloDinamico.uiEvents=function(){$(document).on("click",".cintillo-wrap-header .js-close-cintillo",Promart.modules.cintilloDinamico.cerrarCintilloHeader)},Promart.modules.cintilloDinamico.init=function(){""==Promart.modules.cookies.getCookie("cintilloIsClosedHeader")&&$("header .multi-cintillo-wrap.cintillo-wrap-header .cintillo-wrap").length&&(Promart.modules.cintilloDinamico.contadorCintilloHeader(),Promart.modules.cintilloDinamico.cintilloHeaderExists("header .multi-cintillo-wrap.cintillo-wrap-header .cintillo-wrap"),$(document).on("click",".cintillo-wrap-header .terms-conds",Promart.modules.cintilloDinamico.clearInterval)),Promart.modules.cintilloDinamico.uiEvents()},Promart.modules.cintilloSeccion={},Promart.modules.cintilloSeccion.principal=function(){var t={},a=__globalSpreadSheet__.cintilloSeccion;$.each(a,(function(a,e){if(Promart.modules.utils.itemVisible(e.gsx$inicio.$t,e.gsx$fin.$t,e.gsx$visible.$t)){t={tipo:e.gsx$tipo.$t,title:e.gsx$title.$t,imgdesktop:e.gsx$imgdesktop.$t,imgmobile:e.gsx$imgmobile.$t,alt:e.gsx$alt.$t,url:e.gsx$url1.$t,dataName:e.gsx$dataname.$t,dataIndex:e.gsx$dataindex.$t,dataPosition:e.gsx$dataposition.$t,dataCreativeSlot:e.gsx$creativeslot.$t,dataPromoCategory:e.gsx$promocategory.$t,targetBlank:e.gsx$targetblank.$t?"target='_blank'":""};var o=$(".cintillo-seccion-"+(a+1)),r=``;o.append(r)}}))},Promart.modules.cookies={},Promart.modules.cookies.sc=2,Promart.modules.cookies.getCookie=function(t){for(var a="",e=t+"=",o=document.cookie.split(";"),r=0;r${a.gsx$title.$t}`,"true"===a.gsx$visiblebutton.$t.toLowerCase()&&(l+=`Ver todo ${a.gsx$title.$t}`),void 0!==d&&($.each(d,(function(t,a){Promart.modules.utils.itemVisible(a.gsx$inicio.$t,a.gsx$fin.$t,a.gsx$visible.$t)&&(""!=a.gsx$bgimagen.$t?(o={bgimagen:a.gsx$bgimagen.$t,link:a.gsx$urlproducto.$t,name:a.gsx$dataname.$t,position:a.gsx$dataposition.$t,creative:a.gsx$datacreative.$t,creativeSlot:a.gsx$creativeslot.$t,promoCategory:a.gsx$promocategory.$t},c+=Promart.modules.card.templateBanner(o)):(o={sku:a.gsx$sku.$t,productName:a.gsx$nombre.$t,brand:a.gsx$marca.$t,imageUrl:a.gsx$urlimagen.$t,images:a.gsx$imagehover.$t,bgimagen:a.gsx$bgimagen.$t,link:a.gsx$urlproducto.$t,bestPrice:a.gsx$precio.$t,listPrice:a.gsx$preciolista.$t,tohPrice:a.gsx$preciotoh.$t,tohPay:a.gsx$preciotohpay.$t,tAgoraClub:a.gsx$precioagoraclub.$t,m2:a.gsx$metro2.$t,tag:a.gsx$tag.$t,dataName:a.gsx$dataname.$t,dataPosition:a.gsx$dataposition.$t,dataCreative:a.gsx$datacreative.$t,dataCreativeSlot:a.gsx$creativeslot.$t,dataPromoCategory:a.gsx$promocategory.$t,seller:a.gsx$seller.$t},c+=Promart.modules.card.templateSheet(o)))})),i+=`
${c}
${l}
`))}$(`.destacados-home[data-type="${t}"]`).append(`
    ${s}
${i}
`)},Promart.modules.destacados.menuTab=function(t){t.preventDefault();let a=$(this).attr("id"),e=$(this).closest(".destacados-home");e.find("#tabs-container li, .content_container__cards").removeClass("active"),e.find(this).addClass("active"),e.find("#tab_"+a).addClass("active"),Promart.modules.gtm.promotionViewImages(e.find("#tab_"+a))},Promart.modules.destacados.loadingTabs=function(t){$(t).append('
    \n
  • \n
    \n
    \n
  • \n
');var a=$(t).find(".js-loading-tabs");if(a.length){for(var e=a.find("li.js-wait-item-tab"),o=0,r="";o<5;o++)r+=e.clone().prop("outerHTML");a.append(r)}},Promart.modules.destacados.uiEvents=function(){$(document).on("click","#tabs-container li",Promart.modules.destacados.menuTab)},Promart.modules.dropdown={},Promart.modules.dropdown.init=function(){Promart.modules.dropdown.uiEvents()},Promart.modules.dropdown.uiEvents=function(){$(document).on("click","#action-dropdown-pagination",Promart.modules.dropdown.pagination),$(document).on("click",Promart.modules.dropdown.isActiveDropdown),Promart.modules.dropdown.scrollPopupPagination()},Promart.modules.dropdown.scrollPopupPagination=function(){$actionDropdown=$("#action-dropdown-pagination"),$actionDropdown.length&&(window.onscroll=function(){$paginationDropdown=$("#dropdown-pagination"),$arrowDropdown=$("#dropdown-arrow");let t=$paginationDropdown.height(),a=$("header")[0].offsetHeight+t,e=$actionDropdown[0].getBoundingClientRect().bottom,o=$actionDropdown.height()+10;e\n
\n
\n
\n
\n
\n \n \n `),$(".widget-container").hide(),"true"!==sessionStorage.getItem("widgetClosed")&&o){var r,s=!1;$(window).on("scroll",(function(){if("true"!==sessionStorage.getItem("widgetClosed")){var t=$(this).scrollTop(),a=.2*window.innerHeight,e=window.matchMedia("(max-width: 768px)").matches;t>a&&!s&&($(".widget-container").fadeIn(),s=!0),t=0;s--)r+=$(o[s]).length?$(o[s]).prop("outerHTML"):"";t.find(".js-loading").remove(),a.html(`
\n
\n ${r}\n
\n
`),t.addClass("active"),t.find(".js-ver-seen").attr("href","/busca?"+e.url),Promart.modules.smartHistorial.carruselProducts(a)}else t.remove()}))):t.remove()},Promart.modules.historial.setUpHtmlSlider=function(t){var a=$("").html(t);return a.find(".helperComplement").remove(),a.find(".product.soldout").closest("li").remove(),a.find('.flag[class*="solotiendacorte"]').closest("li").remove(),a.find(".insert-sku-quantity").removeAttr("id"),a.find(".productImage img").attr("width","193").attr("height","193").attr("loading","lazy"),a},Promart.modules.historial.getSkuHistorial=function(t){var a=localStorage.getItem("skusHistorial"),e={url:"",order:[],ids:[]},o="";if(a){var r=JSON.parse(a).reverse();t=r.lengtht.productId===n&&t.productCategoryIds===l)&&(t=!0);t||null==n||(i!=n?(o+="&fq=skuId:"+i+"&fq=skuId:"+n,e.order.push(i+"&"+n)):(o+="&fq=skuId:"+i,e.order.push(i+"")),e.ids.push(l))}}return e.url=o,e},Promart.modules.historial.addSkuHistorialFromFicha=function(){if($("body").hasClass("prod-resign")){var t=$("#___rc-p-id").val(),a=$("#___rc-p-sku-ids").val()||t,e=Promart.data.products[vtxctx.skus].categoriesIds[0],o=Promart.modules.utils.getLocalStorage("skusHistorial"),r=Promart.modules.utils.getIndexOfItemInLocalData(a,"sku",o),s=Promart.modules.utils.getDateTimeForJSON();if(-1!=r){var i=o[r];i.date=s,o.push(i),o.splice(r,1)}else o.push({sku:a,prodID:t,ids:e,date:s});var n=Promart.modules.utils.resizeLocalData2ItsLimit(28,o);Promart.modules.utils.setLocalStorage("skusHistorial",n)}},Promart.modules.historial.createLinkInMenu=function(){var t=Promart.modules.historial.getSkuHistorial(28),a=$(".win-userinfo .last-seen");t.order.length&&(a.attr("href","/busca?"+t.url),a.removeAttr("style"))},Promart.modules.historial.getProductsCard=function(t,a,e,o){return new Promise((function(r,s){var i=`${t}&O=${a}`;a.length?Promart.modules.utils.getProductSearch("&fq="+i,e,""+(o-1)).then((function(t){r(t.map(t=>$("").html(Promart.modules.card.templateShelve(t)).find(".product")[0]))})):r("empty")}))},Promart.modules.inspirate={},Promart.modules.inspirate.principal=function(){const t=__globalSpreadSheet__.inspirate;Promart.modules.inspirate.sectionInspirate(t)},Promart.modules.inspirate.sectionInspirate=function(t){let a=!1,e="",o={};$.each(t,(function(t,r){if("boton"!==r.gsx$tipo.$t){const t={sectionTitle:r.gsx$sectiontitle.$t.length>0?r.gsx$sectiontitle.$t:"",title:r.gsx$title.$t,detail:r.gsx$description.$t,textButton:r.gsx$textbutton.$t,imgdesktop:r.gsx$imgdesktop.$t,imageAlt:r.gsx$alt.$t,videoDesktop:r.gsx$videodesktop.$t,videoSku:r.gsx$videosku.$t,videoUrl:r["gsx$videourl button"].$t,videoButton:r.gsx$videobutton.$t,url:r.gsx$url1.$t,dataName:r.gsx$dataname.$t,dataPosition:r.gsx$dataposition.$t,dataCreativeSlot:r.gsx$creativeslot.$t,dataCreative:r.gsx$datacreative.$t,dataPromoCategory:r.gsx$promocategory.$t,dataIndex:r.gsx$dataindex.$t};!a&&t.sectionTitle&&(e='

'+t.sectionTitle+"

",a=!0);const o=`
\n
\n \n
\n ${t.imageAlt}\n ${t.videoDesktop?`
\n
\n
`:""}\n
\n \n
\n
\n
\n ${t.title}\n
\n
\n ${t.detail}\n
\n
\n \n
\n ${t.videoDesktop?`\n ${t.textButton}\n `:`${t.textButton}`}\n
\n
\n
\n
`;e&&$(".insp-home-title").html(e),$(".content-placeholder-insp-home").append(o)}else o={visible:r.gsx$visiblebutton.$t,text:r.gsx$textbutton.$t,target:r.gsx$targetblank.$t,url:r.gsx$url1.$t,dataName:r.gsx$dataname.$t,dataPosition:r.gsx$dataposition.$t,promocategory:r.gsx$promocategory.$t}}));const r=$(".content-placeholder-insp-home").find(".insp-home-box-container");if(r.length>4&&$(window).width()>768){$(".content-placeholder-insp-home").addClass("slickActive");const t=r.map((function(){return""+$(this).prop("outerHTML")})).get().join("");$(".content-placeholder-insp-home").html(`
${t}
`),Promart.modules.utils.carrouselSlick(".content-placeholder-insp-home .insp-home-slick",4,!1,!1,8e3,!0,!0,!0,!0,!0,3,!1,"","",1,4)}else $(".insp-link").addClass("gh-gtm-img");$(".content-placeholder-insp-home").addClass("i6"),"TRUE"===o.visible&&$(".cnt-insp-home").append(`${o.text}`)},Promart.modules.lastVisitedCategories={},Promart.modules.lastVisitedCategories.principal=async function(){const t=Promart.modules.utils.getLocalStorage("categoryHistorial");if(t.length>0){const a=Promart.modules.lastVisitedCategories.processCategories(t),e=a.length,o=await Promart.modules.lastVisitedCategories.readExcelToJson();e>=1?await a.map((async function(t){const a=Promart.modules.lastVisitedCategories.filterByField(o,"categoryID",t.categoryID);if(a.length>0){const e=a[0];let o=a[0].categoryImg,r=t.subcategoryID.slice(-3);if(r.length<3){Promart.modules.lastVisitedCategories.processAutoSubCategoriesTop(a,r)}const s=await r.reduce((function(t,e){const o=Promart.modules.lastVisitedCategories.findByField(a,"subcategoryID",e);return t+`\n ${"#N/A"===o.subcategoryImg?'
':`${o.subcategoryAlt}`}\n
`}),"");let i=`
\n \n ${e.categoryName}\n

${e.categoryName}

\n
\n
\n ${s}\n
\n
`;$(".content-body-last-visited").append(i)}})):($(".section-last-visited-categories").hide(),$(".section-last-visited-categories .gh-title-section").hide())}else $(".section-last-visited-categories").hide(),$(".section-last-visited-categories .gh-title-section").hide()},Promart.modules.lastVisitedCategories.processAutoSubCategoriesTop=function(t,a){let e=a,o=3-a.length;const r=Promart.modules.lastVisitedCategories.removeObjFilterByField(t,"subcategoryID",a);return Promart.modules.lastVisitedCategories.sortBySubcategoryTop(r).slice(0,o).forEach(t=>{e.push(t.subcategoryID)}),e},Promart.modules.lastVisitedCategories.sortBySubcategoryTop=function(t){return t.sort((function(t,a){return(parseInt(t.subcategoryTop)||1/0)-(parseInt(a.subcategoryTop)||1/0)}))},Promart.modules.lastVisitedCategories.processCategories=function(t){const a=t.map((function(t){return t.catID})).filter((function(t,a,e){return e.indexOf(t)===a})).filter((function(t){return t.split("/").length>=4})).map((function(t){const a=t.split("/");return{departamentID:a[1],categoryID:a[2],subcategoryID:a[3]}}));return Promart.modules.lastVisitedCategories.groupSubCategories(a).slice(-3)},Promart.modules.lastVisitedCategories.groupSubCategories=function(t){const a={};t.forEach(t=>{const e=`${t.categoryID}-${t.departamentID}`;a[e]||(a[e]={categoryID:t.categoryID,departamentID:t.departamentID,subcategoryID:[]}),""!=t.subcategoryID&&(a[e].subcategoryID.includes(t.subcategoryID)||a[e].subcategoryID.push(t.subcategoryID))});return Object.values(a)},Promart.modules.lastVisitedCategories.readExcelToJson=async function(){if(Promart.modules.utils.getLocalStorage("topCategories").length>0){return Promart.modules.utils.getLocalStorage("topCategories")}{const t=await Promart.modules.utils.getSheetV4("1wib22p3Wn6nvuJUnqn5XjYPy50Q0dyhl4g5tNf1Vo14","Top Categorias").then((function(t){if(t.length>0){if(t.length<2)return[];const a=t[0],e=[];for(let o=1;ot[a]===e)||null},Promart.modules.lastVisitedCategories.filterByField=function(t,a,e){return t.filter(t=>t[a]===e)||null},Promart.modules.lastVisitedCategories.removeObjFilterByField=function(t,a,e){return t.filter(t=>!e.includes(t[a]))||null},Promart.modules.minicart={},Promart.modules.minicart.tempData=null,Promart.modules.minicart.addCart=function(t){const a=$(this);a.addClass("add"),(a.closest(".item-pr").length||a.closest(".n-prod-slider").length)&&a.addClass("addToCart");const e=$(this).closest(".product");let o=e.find("a[class*=buy-button-]");o.length||(o=e.find("a[class*=buy-button]"));const r=o.attr("href");let s=Promart.modules.utils.getParameterByName("sku",r)||Promart.modules.utils.getParameterByName("idSku",r)||e.data("sku");function i(t,a){const e=function(){const t=localStorage.getItem("historyProductData");return t?JSON.parse(t):{}}();var o;e[t]||(e[t]={pageCategory:a.pageCategory,pageDepartment:a.pageDepartment,categoryName:a.productCategory,subCategoryName:a.productSubCategory,"landing-page-category":a["landing-page-category"]||"","landing-page-department":a["landing-page-department"]||"","landing-category-name":a["landing-product-category"]||"","landing-sub-category-name":a["landing-product-sub-category"]||""}),o=e,localStorage.setItem("historyProductData",JSON.stringify(o))}null!=s&&(s=s.toString()),function(){const t=localStorage.getItem("content-grouping");if(t){const a=JSON.parse(t);i(s,a)}}();const n=Promart.modules.utils.getParameterByName("seller",r)||e.data("seller");let l=e.find(".cantidad input, .item__amount input").val()||Promart.modules.utils.getParameterByName("qty",r);const c=Promart.modules.cookies.getCookie,d=""!=c("PromartSc")?c("PromartSc"):""!=c("VTEXSC")?c("VTEXSC").split("sc=")[1]:2,p=$("#dist option:selected").data("ubigeo"),m=void 0===p?Promart.pages.ficha.ubigeoInit[d]:p,u=e.data("id"),h=e.data("mc")||"",g=e.closest(".gh-gtm-impression").data("list");if(e.hasClass("color")||e.hasClass("proveedor")||e.hasClass("NxM")||!a.hasClass("js-agregarpor")||(l=Promart.modules.minicart.calcularMmc(e,h),Promart.modules.sugeridos.qtyProducto=l,Promart.modules.sugeridos.updateSugeridos(),Promart.modules.sugeridos.calculateSubTotal()),!a.hasClass("-pu")&&!e.find(".cnt-calculatorMc-summary-line").length&&(e.hasClass("-metroCuadrado")||e.hasClass("mc")))return t.preventDefault(),e.closest(".ficha-seller-wrap").length&&$(".js-bgModal").addClass("active"),e.find(".popupaddm2.js-popupaddm2").addClass("active"),Promart.modules.product.popUp("-metroCuadrado",e),!1;if(!a.hasClass("-pu")&&e.hasClass("color"))return t.preventDefault(),e.closest(".ficha-seller-wrap").length&&$(".js-bgModal").addClass("active"),e.find(".popupaddm3.js-popupaddm2").addClass("active"),Promart.modules.product.popUp("color",e),!1;if(!a.hasClass("-pu")&&(e.hasClass("proveedor")||e.hasClass("ml"))&&!e.find(".cnt-calculatorMc-summary-line").length)return t.preventDefault(),e.closest(".ficha-seller-wrap").length&&$(".js-bgModal").addClass("active"),e.find(".popupaddm4.js-popupaddm2").addClass("active"),Promart.modules.product.popUp("proveedor",e),!1;if(a.hasClass("solo-prod")&&e.find(".popupaddm3").hasClass("active"))return e.find(".js-popupaddm2").removeClass("active"),$(".js-bgModal").removeClass("active"),$("body").removeClass("g-pop"),$(".js-addtocart").removeClass("add"),$(".js-addtocart").removeClass("addToCart"),!1;if(a.hasClass("solo-prod")&&e.find(".popupaddm4").hasClass("active"))return e.find(".js-popupaddm2").removeClass("active"),$(".js-bgModal").removeClass("active"),$("body").removeClass("g-pop"),$(".js-addtocart").removeClass("add"),!1;if(!a.hasClass("-pu")&&e.hasClass("NxM")&&Promart.modules.minicart.validPopupNxM(e,l))return t.preventDefault(),e.closest(".ficha-seller-wrap").length&&$(".js-bgModal").addClass("active"),Promart.modules.minicart.popupNxM(e,l,!1),Promart.modules.product.popUp("NxM",e),!1;e.hasClass("NxM")&&a.hasClass("js-agregarpor")&&(a.hasClass("solo-prod")||(l=Promart.modules.minicart.popupNxM(e,l,!0)),e.find(".js-popup-add-mxn").removeClass("active"));let f=!0;a.closest(".controllers-seller.ficha").length&&(f=!1);const v={id:s,quantity:l,seller:n,productId:u};let P=!1;a.closest(".item-pr").length||a.closest(".n-popup-slider").length||a.closest(".crosselling-checkout-slider").length||(P=!0),a.closest(".slider-products-home").hasClass("mb-rediseno")&&(P=!1),Promart.services.Simulation.post(d,[{id:s,quantity:"1",seller:n}],m).then((function(t){let o=Promart.modules.utils.getLocalStorage("dataListItems");const r=e.data("list-name");o instanceof Array&&(o={});const i=null!=g?g:r||void 0;o[s]=i||"",Promart.modules.utils.setLocalStorage("dataListItems",o);let n=sessionStorage.getItem("selectPromotionData"),l=Promart.modules.utils.getLocalStorage("selectPromotionItems");l=l instanceof Array?{}:JSON.parse(l),n=n?JSON.parse(n):"",l[s]=n,Promart.modules.utils.setLocalStorage("selectPromotionItems",JSON.stringify(l));const c=Promart.modules.minicart.hasServiceByName(t,"extragarantia");let p=!0;const m=t.logisticsInfo[0].deliveryChannels,u=t.logisticsInfo[0].slas,h=m.some(t=>"delivery"===t.id);var b=[];if(Array.isArray(u)&&(b=u.map((function(t){return t.pickupStoreInfo&&t.pickupStoreInfo.friendlyName})).filter((function(t){return t}))),p=!h,"1"===t.sellers[0].id&&p){var y=t.items[0].id,C=Promart.data.products[y],k=[];const e=Promart.modules.utils.getLocalStorage("historyProductData");e[s].onlyPickUp=u,Promart.modules.utils.setLocalStorage("historyProductData",e),k.push({id:C.items[0].itemId,url:C.items[0].images[0].imageUrl,slas:u,availableStore:u?u.map((function(t){return t.pickupStoreInfo&&t.pickupStoreInfo.friendlyName?t.pickupStoreInfo.friendlyName:null})).filter((function(t){return null!==t})):[]}),vtexjs.checkout.orderForm.items.forEach((function(t,a){if(t.imageUrl&&(!k.find((function(a){return a.id===t.id}))&&void 0!==e[t.id]&&void 0!==e[t.id].onlyPickUp)){itemSlas=e[t.id].onlyPickUp;var o=[];itemSlas&&Array.isArray(itemSlas)&&(o=itemSlas.map((function(t){return t.pickupStoreInfo&&t.pickupStoreInfo.friendlyName?t.pickupStoreInfo.friendlyName:null})).filter((function(t){return null!==t}))),k.push({id:t.id,url:t.imageUrl,slas:itemSlas,availableStore:o})}})),k=k.filter((function(t){return!(!t.slas||!Array.isArray(t.slas))&&t.slas.every((function(t){return"pickup-in-point"===t.deliveryChannel}))}));var x=sessionStorage.getItem("selectStore"),_=[],w=new Set;let o=!1;return k.forEach((function(t){t.slas&&Array.isArray(t.slas)&&t.slas.forEach((function(t){t.pickupStoreInfo&&t.pickupStoreInfo.friendlyName&&!w.has(t.pickupStoreInfo.friendlyName)&&(w.add(t.pickupStoreInfo.friendlyName),_.push(t))}))})),(b.includes(x)||null===x||"null"===x)&&(o=!0),Promart.modules.popupVariant.principal(C,_,k,x,o,c),void Promart.modules.minicart.setCartData(d,[v],f,P,a.closest(".product"))}if(null===Promart.modules.minicart.tempData&&c.length)return e.find(".js-popupaddm2.popupaddm4").removeClass("active"),a.length&&!a.closest(".n-popup-slider").length&&($(".js-bgModal").removeClass("active"),$("body").removeClass("g-pop")),Promart.modules.minicart.serviceExtraGarantia(c,a),void Promart.modules.minicart.setCartData(d,[v],f,P,a.closest(".product"));a.closest(".ficha-venta-proyecto").length?(P=!1,a.hide()):P=!0,""!=s&&Promart.components.header.cookieCity()?(Promart.modules.minicart.addCartData([v],d,f,P,a,""),e.find(".js-popupaddm2").removeClass("active"),a.closest(".n-popup-slider").length||a.closest(".ficha-venta-proyecto.listado").length||($(".js-bgModal").removeClass("active"),$("body").removeClass("g-pop"))):Promart.modules.minicart.setCartData(d,[v],f,P,a,"")}))},Promart.modules.minicart.serviceExtraGarantia=function(t){Promart.components.popup.openModalExtraG(),Promart.components.popup.buildInputExtraGarantia(t)},Promart.modules.minicart.setCartData=function(t,a,e,o,r){const s={action:"addtocart",data:{item:a,sc:t,element:e,pop:o,btn:r}};Promart.modules.utils.setLocalStorage("actionRefresh",JSON.stringify(s))},Promart.modules.minicart.addCartData=function(t,a,e,o,r,s){Promart.modules.utils.setLocalStorage("actionRefresh",""),r=e?$(".prod-"+t[0].productId).eq(0).find(".prod-bottom button, .js-addtocart"):$(".ficha-seller[data-id="+t[0].productId+"]").find(".controllers-seller-cnt .gh-btn"),vtexjs.checkout.addToCart(t,null,a).done((function(a){t.forEach((function(t){const e=a.items.find((function(a){return a.id===t.id}));e&&(t.name=e.name,t.categories=e.productCategoryIds,t.img=e.imageUrl,t.listPrice=e.price/100,t.sellingPrice=e.sellingPrice/100,t.availability=e.availability)})),$(".prod-"+t[0].id).find(".item__controls").addClass("add"),o?Promart.modules.minicart.openPopupAddToCart(t,e,s):$(".prod-"+t[0].id).find("button.js-addtocart, .js-addToCartPopup").addClass("checkAdd"),$(".js-addtocart, .js-addToCartPopup, .js-addtocartProy, #buy-together_add-cart").removeClass("add").removeClass("addToCart"),r.length&&($("body").hasClass("prod-resign")||null!=Promart.modules.minicart.tempData?Promart.pages.addServiceMiniCart(t[0].id,a.items.length-1,r,a,t[0]):Promart.modules.gtm.addProductCart(r,null,a,t[0])),Promart.modules.minicart.updateCantidad(),Promart.modules.minicart.refreshUI(),1===t.length&&Promart.modules.smartHistorial.saveAccesoriesSku(t[0].id);let i=Promart.modules.cookies.getCookie("IPS");if(""!==i){i="?"+i;const t=Promart.modules.utils.getParameterByName("Parceiro",i),a=Promart.modules.utils.getParameterByName("Midia",i),e=Promart.modules.utils.getParameterByName("Campanha",i),o=vtexjs.checkout.orderForm.marketingData;if("callCenterOperator"!=vtexjs.checkout.orderForm.userType&&(null===o||t!=o.utmSource||a!=o.utmMedium||e!=o.utmCampaign)){const o={utmSource:t,utmMedium:a,utmCampaign:e,utmipage:"",utmiPart:"",utmiCampaign:"",coupon:null,marketingTags:[]};return vtexjs.checkout.sendAttachment("marketingData",o)}}const n=a.items.find((function(a){return a.id===t[0].id}));Promart.modules.minicart.setOneSignalState(n)}))},Promart.modules.minicart.hasServiceByName=function(t,a){const e=t.items[0].offerings;let o=0;const r=e.length,s=[];for(a=a.toLowerCase();o1?"Cajas":"Caja";return t.find(".js-cantidad, .js-cantProdFicha").val(o),t.find(".js-cantProdFichaMC").val(a.toFixed(2)),t.find(".js-mcdValue").text(a.toFixed(2)),t.find(".js-tooltip_mc .cant_caja, .js-cantCaj").text(o+" "+e),o}return o},Promart.modules.minicart.updateCantidad=function(){$(".js-minicart").addClass("add"),vtexjs.checkout.getOrderForm().done((function(t){const a=t.items;let e=0;a.length>0&&$.each(a,(function(t,a){e+=a.quantity})),$(".js-amount-produc").html(e);const o=a.length?"Con producto":"Sin producto";$(".js-minicart.attr-goog").attr("data-link_label",o),$(".cart-icon.attr-goog").attr("data-link_label",o)}))},Promart.modules.minicart.refreshUI=function(){if(-1!=window.location.href.indexOf("/checkout"))return!1;$(".js-minicart").addClass("add");const t=vtexjs.checkout.orderForm.items;if(t.length>0){Promart.modules.minicart.total=0,Promart.modules.minicart.totalTOH=0;const a=Promart.modules.cookies.getCookie("VTEXSC")?Promart.modules.cookies.getCookie("VTEXSC").split("sc=")[1]:2;$(".minicart-inner").empty(),t.length>0?Promart.modules.minicart.minicartHtml(t,a):(Promart.modules.minicart.total=0,Promart.modules.minicart.totalTOH=0,$(".js-amount-produc").html(0),$(".minicart-vacio").show(),$(".minicart-resumen,.minicart-inner,.minicart-header").hide())}else Promart.modules.minicart.total=0,Promart.modules.minicart.totalTOH=0,$(".js-amount-produc").html(0),$(".minicart-vacio").show(),$(".minicart-resumen,.minicart-inner,.minicart-header").hide(),$(".js-minicart.attr-goog").attr("data-link_label","Sin producto"),$(".cart-icon.attr-goog").attr("data-link_label","Sin producto")},Promart.modules.minicart.minicartHtml=function(t,a){let e=0,o="";for(let r=0;r{if(t.length>0){const a=t.length;$.each(t,(function(t,o){void 0!==Promart.data.products[o.id]&&(Promart.modules.minicart.cartItem(t,o,a,Promart.data.products[o.id]),Promart.modules.minicart.cartService(t,o),Promart.modules.minicart.total+=o.quantity*o.sellingPrice,e+=o.quantity)})),$(".minicart-vacio").hide(),$(".minicart-resumen,.minicart-inner,.minicart-header").show(),setTimeout((function(){$(".js-minicart").removeClass("add")}),1e3),$(".m-total .price").html(Promart.modules.utils.formatMoneda(Promart.modules.minicart.total/100)),$(".js-amount-produc").html(e),$(".js-minicart.attr-goog").attr("data-link_label","Con producto"),$(".cart-icon.attr-goog").attr("data-link_label","Con producto"),$(".minicart-cnt .js-amount-produc").html(e+(e>1?" productos agregados a tu carrito":" producto agregado a tu carrito")),Promart.modules.minicart.totalTOH===Promart.modules.minicart.total/100?$(".minicart-cnt").addClass("n-toh"):($(".m-promo .price").html(Promart.modules.utils.formatMoneda(Promart.modules.minicart.totalTOH)),$(".minicart-cnt").removeClass("n-toh"))}else Promart.modules.minicart.total=0,Promart.modules.minicart.totalTOH=0,$(".js-amount-produc").html(0),$(".minicart-vacio").show(),$(".minicart-resumen,.minicart-inner,.minicart-header").hide(),$(".js-minicart.attr-goog").attr("data-link_label","Sin producto"),$(".cart-icon.attr-goog").attr("data-link_label","Sin producto")})},Promart.modules.minicart.cartItem=function(t,a,e,o){const r=Promart.modules.prices.typePromo(o),s=void 0!==r?r.priceTOH:0;let i={};i={sku:a.id,seller:a.seller,quantity:a.quantity,img:Promart.modules.utils.getResizedImage(a.imageUrl,75,75),name:a.name,url:a.detailUrl,listPrice:a.sellingPrice!=a.listPrice?Promart.modules.utils.formatMoneda(a.listPrice/100):"",price:Promart.modules.utils.formatMoneda(a.sellingPrice/100),index:t,brand:o.brand,productId:o.productId,categories:o.categories[0]},void 0!==s&&0!=s&&r.priceTOH0&&$(l).addClass("mcAddToh"),Promart.modules.prices.validateCategories(o.categoriesIds[0],$(".minicart-item").eq(t),n)},Promart.modules.minicart.cartItemTemplate=function(t,a){return'
'+t.name+'
'+t.quantity+'
'+t.name+'
'+t.listPrice+''+t.price+'
'+(void 0!==t.tohPrice?t.tohPrice:"")+'
'},Promart.modules.minicart.cartService=function(t,a){if(a.offerings.length)for(let e=0;e{a.push({index:e,quantity:o}),vtexjs.checkout.removeItems(a).done((function(a){Promart.modules.gtm.removeProductCart(t,a.items),s(Promart.modules.minicart.refreshUI()),Promart.modules.gtm.removeProductCart(t,a.items,r),a.items.length>0?Promart.modules.minicart.setOneSignalState(a.items[a.items.length-1]):(Promart.modules.minicart.setOneSignalState(null),window.dataLayer=window.dataLayer||[],dataLayer.push({event:"removeAllFromCart"}))}))})},Promart.modules.minicart.validatePeruChamps=function(t,a){let e=[];const o=$("."+t+"[data-seller='1']").not("[data-sku='"+a+"']"),r=[10045436,10075120,10075121,10075122,10075123,10075124,10075131,10075134,10075143,10045427,10045428,10045429,10045430,10045431,10045432,10045433,10045434,10045435];let s=o.length;for(let i=0;i0&&(e=[]),e},Promart.modules.minicart.getAddedProdInfo=async function(t,a){const e=[],o=[];for(let s=0;s=1?"no-promotion":""}],g=Promart.modules.minicart.highligthExtGarantia();Promart.modules.minicart.renderAddToContent(h,g,0)},Promart.modules.minicart.renderAddToContent=function(t,a,e){let o="";$(".layer-add-to-cart .cnt-added-prod, .layer-add-to-cart .title").html(""),$(".layer-add-to-cart .cnt-added-total").remove();let r=0,s=0;for(let n=0;n\n ${e.tarjetaOh}\n `:"",c=""!=e.listPrice&&null!=e.listPrice?`\n `:""!=e.bestPrice&&null!=e.bestPrice?``:"";o+='
'+e.cant+'
'+c+l+"
"+a+"
"}if($(".layer-add-to-cart .added-prod").before('
'),$(".layer-add-to-cart .added-prod").remove(),$(".layer-add-to-cart .cnt-added-prod").append(o),"no-promotion"==i&&null==t[0].categories||Promart.modules.prices.validateCategories(t[0].categories,$(".added-prod"),t[0].clusterHighlights),t.length>1)if($(".layer-add-to-cart .title").html('Se agregaron los siguientes productos a tu carrito'),e>0){s=s>0&&s

Subtotal Combo

'+Promart.modules.utils.formatMoneda(r)+"

"+t+"

"+(s>0&&s

Subototal Combo Tarjeta

'+Promart.modules.utils.formatMoneda(s)+"

"+a+"

":"")+"")}else $(".layer-add-to-cart .cnt-added-prod").after('

Subtotal productos

'+Promart.modules.utils.formatMoneda(r)+"
"+(s>0&&s

Subtotal con tarjeta

'+Promart.modules.utils.formatMoneda(s)+"
":"")+"");else $(".layer-add-to-cart .title").html('Producto agregado a tu carrito');$("body").attr("style","overflow:auto;"),$(".js-bgModal, .gh-close-modal").removeClass("active"),$(".layer-add-to-cart").addClass("active"),$(".item__popUp").css("display","none"),1===t.length&&Promart.modules.minicart.sliderCrossSellingAddToCart(t[0])},Promart.modules.minicart.highligthExtGarantia=function(){const t=Promart.modules.minicart.tempData;if(null!=t){const a=t.extGarantiaText.split("S/");a[0],a[1]}return""},Promart.modules.minicart.getCarrusel=function(t,a,e){Promart.services.Search.get(t,"15","9a05b36c-ef0d-42b4-9918-53a53fef756c","OrderByTopSaleDESC",a).then((function(a){$(".carrusel-holder .cnt-carrousel-products-top").html('

Completa tu proyecto

'),Promart.modules.minicart.sliderCrossSellingAddToCartProduct(a,t,e)}))},Promart.modules.minicart.sliderCrossSellingAddToCart=function(t){const a="/api/catalog_system/pub/products/crossselling/similars/"+t.sku;$(".layer-add-to-cart .slider-products-home").html("");const e=Promart.modules.cookies.getCookie("VTEXSC")?Promart.modules.cookies.getCookie("VTEXSC").split("sc=")[1]:2;void 0!==Promart.pages.ficha.carruselVentaProyecto&&""!=Promart.pages.ficha.carruselVentaProyecto?Promart.pages.ficha.isCarruselVentaProyectoPiso?($(".layer-add-to-cart .carrusel").show(),Promart.modules.minicart.getProject(Promart.pages.ficha.carruselVentaProyecto,e,!0)):($(".layer-add-to-cart .carrusel-loading").show(),$(".layer-add-to-cart .carrusel").show(),Promart.modules.minicart.getCarrusel(Promart.pages.ficha.carruselVentaProyecto,e,!0)):void 0!==Promart.pages.ficha.carruselCompletaTuCompra&&""!=Promart.pages.ficha.carruselCompletaTuCompra?($(".layer-add-to-cart .carrusel-loading").show(),$(".layer-add-to-cart .carrusel").show(),Promart.modules.minicart.getCarrusel(Promart.pages.ficha.carruselCompletaTuCompra,e,!0)):1===t.seller?$.when(Promart.modules.utils.request(a)).done((function(t){if(void 0!==t&&t.length>0){$(".layer-add-to-cart .carrusel-loading").show(),$(".layer-add-to-cart .carrusel").show();const a=Promart.modules.minicart.getskusUrl(t);a.length&&void 0!==t&&t.length>0&&Promart.modules.minicart.getCarrusel(a,e,!1)}else Promart.modules.minicart.sliderCrossSellingAddToCartCleaning(e)})):Promart.modules.minicart.sliderCrossSellingAddToCartCleaning(e)},Promart.modules.minicart.sliderCrossSellingAddToCartCleaning=function(t){setTimeout((function(){$(".layer-add-to-cart .carrusel-loading").show(),$(".layer-add-to-cart .carrusel").show(),$(".ficha_title.v2").css("display","block"),Promart.services.Search.get("fq=H:3829","10","9a05b36c-ef0d-42b4-9918-53a53fef756c","OrderByTopSaleDESC",t).then((function(t){Promart.modules.minicart.sliderCrossSellingAddToCartProduct(t,"",!1)}))}),1)},Promart.modules.minicart.sliderCrossSellingAddToCartProduct=function(t,a,e){if(t.length){const o='';$(".layer-add-to-cart .slider-products-home").html(o);const r=$("").html(t);r.find(".productImage img").attr("loading","lazy"),r.find(".helperComplement").remove(),r.find("div.product.soldout").parent().parent().remove();let s=r.find(".js-prod > ul").html();if(e){s="",s+="";const t=a.split("&fq=productId:");for(let a=1;a ul > li .product[data-id='"+t[a]+"']");e.length&&(s+="
  • "+e.closest("li").html()+"
  • ")}}$(".layer-add-to-cart .js-accesorios-cross-selling").html("
      "+s+"
    "),$(".layer-add-to-cart .js-accesorios-cross-selling").find(".js-prod > ul > li.helperComplement").remove();const i=Promart.modules.prices.listPrices(".layer-add-to-cart .js-accesorios-cross-selling"),n=$(".layer-add-to-cart .js-accesorios-cross-selling");$.when(i,n).then((function(){$(".layer-add-to-cart .carrusel-loading").hide(),$(".layer-add-to-cart .js-accesorios-cross-selling").show(),Promart.modules.gtm.productArrayCarrouselMobile(".gh-gtm-impression .slider-products-home .js-accesorios-cross-selling",".js-prod > ul li")})),$(window).width()>768&&Promart.modules.utils.carrouselSlick($(".layer-add-to-cart .gh-gtm-impression .slider-products-home .js-prod > ul"),5,!1,!1,1e3,!0,!1,!0,!0,!1,3,!1)}else setTimeout((function(){$(".layer-add-to-cart .carrusel").hide()}),1e3)},Promart.modules.minicart.getskusUrl=function(t){let a="";return $.each(t,(function(t,e){Promart.pages.ficha.prodId!=e.productId&&(a+=(t>0?"&":"")+"fq=productId:"+e.productId)})),a},Promart.modules.minicart.openPopupAddToCart=function(t,a,e){!$("body").hasClass("produto")&&!$("body").hasClass("prod-resign")||a?$("body").hasClass("home")?Promart.modules.minicart.getAddedProdInfoCard(t,e):Promart.modules.minicart.getAddedProdInfo(t,e):Promart.modules.minicart.getAddedProdInfoFicha(t)},Promart.modules.minicart.closePopupAddToCart=function(){$(".layer-add-to-cart").removeClass("active"),$(".layer-add-to-cart .services-inner").remove(),$(".layer-add-to-cart .carrusel").hide()},Promart.modules.minicart.popupNxM=function(t,a,e){const o=parseInt(t.data("flag").substring(0,1)),r=parseInt(a),s=o-1;let i=0,n=0;const l=[];for(let c=s;c>0;c--)l.push(c);if(i=parseInt(r%o),n=l[i-1],e)return t.find(".cantidad input, .item__amount input").val(r+n),r+n;{const a=r+n===o?s:(r+n)/o*s,e=1===n?"falta "+n+" producto ":"faltan "+n+" productos ";if(t.find(".js-text-add-mxn").html(e),t.find(".js-text-mxn").html("Si agregas "+(r+n)+" unidades a tu carrito pagarás solo "+a+"."),t.find(".gh-popup-add.js-popup-add-mxn").addClass("active"),t.closest(".layer-add-to-cart").length){const e="Te falta agregar "+n+" productos a tu carrito para acceder a la promo "+(r+n)+"x"+a+".";t.find(".flag").text(r+n+"x"+a),t.find(".js-popup-add-mxn").find(".text2").append(e)}return!1}},Promart.modules.minicart.validPopupNxM=function(t,a){const e=parseInt(t.data("flag").substring(0,1));return!!(parseInt(a)%e)},Promart.modules.minicart.uiEvents=function(){$(document).on("click",".js-addtocart:not(.sold-out), .js-agregarpor:not(.sold-out), .js-agregarpor1:not(.sold-out), .js-addToCartPopup",Promart.modules.minicart.addCart),$(document).on("click",".js-delete",Promart.modules.minicart.deleteCart),$(document).on("click",".layer-add-to-cart , .layer-add-to-cart .close, .layer-add-to-cart .lnk1",Promart.modules.minicart.closePopupAddToCart),$(document).on("click",".layer-add-to-cart .add-content",(function(t){t.stopPropagation()}))},Promart.modules.minicart.init=function(){"localhost"!=location.href&&Promart.modules.minicart.updateCantidad(),Promart.modules.minicart.uiEvents()},Promart.modules.minicart.setOneSignalState=function(t){"undefined"!=typeof OneSignal&&null!=OneSignal.User.PushSubscription.token&&OneSignalDeferred.push((function(a){const e=Math.floor(Date.now()/1e3);a.User.addTags({cart_update:t?e:"",product_name:t?t.name:"",product_image:t?t.imageUrl.replace("-55-55","-500-250"):""})}))},Promart.modules.minicart.getProject=function(t,a,e){Promart.services.Search.get(t,"15","9a05b36c-ef0d-42b4-9918-53a53fef756c","OrderByTopSaleDESC",a).then((function(a){Promart.modules.minicart.projectCrossSellingAddToCartProducts(a,t,e)}))},Promart.modules.minicart.projectCrossSellingAddToCartProducts=function(t,a,e){if(t.length){$(".layer-add-to-cart .carrusel-loading").hide(),$(".layer-add-to-cart .carrusel").show(),$(".carrusel-holder .addtocart-proy-comp.js-accesorios-cross-selling").show(),$(".carrusel-holder .addtocart-proy-comp.js-accesorios-cross-selling").css("display","block"),$(".carrusel-holder").html('
    \n
    \n

    ¡Agrega el proyecto completo con un click!

    \n

    Estos son los complementos y cantidades que necesitarás para instalar este producto.

    \n
    \n
    \n
    \n \n
    \n
    \n
    \n

    Subtotal proyecto:

    \n
    \n \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n
    \n
    \n

    Podrás modificar las cantidades en la página de carrito.

    \n
    \n
    ');const a=$("").html(t);a.find(".productImage img").attr("loading","lazy"),a.find(".helperComplement").remove(),a.find("div.product.soldout").parent().parent().remove();let e=$(".ficha-seller.product").attr("data-id"),o=$(".layer-add-to-cart .cnt-added-prod .added-prod").filter((function(t,a){return $(a).find(".prd-sku").text().includes(e)})),r=a.find(".js-prod > ul li"),s=r.filter((function(t,a){let e=$(a).find(".product").attr("data-name");if(e)return/fragua/i.test(e)})),i=s.first().find(".product");s.each((function(t,a){let e=$(a).find(".product"),o=e.data("best-price");parseFloat(o.replace("S/","").replace(/\s/g,""))${d?"."+d:""}`),$(".addtocart-proy__prices .ficha-price-toh").html(`\n \n ${u}\n ${m?"."+m:""}`)},Promart.modules.minicart.calcularQty=function(t,a){var e=parseFloat(Promart.modules.sugeridos.areaProducto)*a;a=1;if(null==e)return a;if(/fragua/i.test(t)||/pegamento/i.test(t))a=Math.ceil(e/3);else if(/cruceta/i.test(t)||/rodotop/i.test(t)){var o=t.match(/(\d+)\s*(un|piezas)/i);o&&(a=Math.ceil(6*e/parseInt(o[1],10)))}return a},Promart.modules.popupVariant={},Promart.modules.popupVariant.closeModal=function(){const t=$(".container-popup").closest(".popup-variant-overlay");t.removeClass("active"),setTimeout(()=>{t.remove(),$(document).trigger("popupVariantClosed"),$(".gh-btn.js-addtocart").removeClass("add")},300)},Promart.modules.popupVariant.principal=function(t,a,e,o,r,s){const i=`\n \n `;$("body").append(i);const n=$(".popup-variant-overlay");n[0].offsetHeight,n.addClass("active"),n.find(".item").each((function(){const t=$(this),a=t.find(".notProduct").length>0;t.find(".warning").toggleClass("warningActive",a)}));let l=!1;n.find(".item").on("click",(function(){n.find(".radiobutton").removeClass("checked"),$(this).find(".radiobutton").addClass("checked");const a=$(this).find(".storage span:first").text(),o=e.some(e=>e.id===t.items[0].itemId&&e.availableStore&&e.availableStore.includes(a));l=!o})),n.find(".item.available").length?n.find(".item.available").trigger("click"):n.find(".item:first").trigger("click"),n.find(".close, .back").on("click",(function(t){Promart.modules.utils.setLocalStorage("actionRefresh",""),Promart.modules.popupVariant.closeModal()})),n.on("click",(function(t){$(t.target).hasClass("popup-variant-overlay")&&Promart.modules.popupVariant.closeModal()})),n.find(".store").on("click",(function(){if(Promart.components.header.cookieCity()){const a=n.find(".radiobutton.checked").closest(".item");if(a.length){const o=a.find(".storage span:first").text();sessionStorage.setItem("selectStore",o),vtexjs.checkout.getOrderForm().then((function(a){const r=[];a.items.forEach((t,a)=>{const s=e.find(a=>a.id===t.id);!s||s.availableStore&&s.availableStore.includes(o)||r.push({index:a,quantity:t.quantity})});const i=e.some(a=>a.id===t.items[0].itemId&&a.availableStore&&a.availableStore.includes(o));r.length>0?vtexjs.checkout.removeItems(r).then(()=>{Promart.modules.popupVariant.processItem(i,s)}):Promart.modules.popupVariant.processItem(i,s)}))}else Promart.modules.utils.setLocalStorage("actionRefresh",""),Promart.modules.popupVariant.closeModal()}}))},Promart.modules.popupVariant.processItem=function(t,a){t?a.length?Promart.modules.minicart.serviceExtraGarantia(a):Promart.components.header.actionRefresh():Promart.modules.utils.setLocalStorage("actionRefresh",""),Promart.modules.popupVariant.closeModal()},Promart.modules.popupVariant.init=function(){},Promart.modules.availability={},Promart.modules.availability.products=[],Promart.modules.availability.simulation=function(t,a,e,o,r){var s=[],i="",n="",l=[];a.forEach((function(t){var a={id:t.id,quantity:t.quantity,seller:t.seller};s.push(a),l[t.id]={name:t.name,img:t.imageUrl}})),Promart.services.Simulation.post(t,s,e).then((function(a){for(var e=0;e
    '+l[a.items[e].id].name+"
    ",s.splice(e,1)):n+='
    '+l[a.items[e].id].name+"
    ";for(var c=0;c
    '+l[d].name+"
    ",s.filter((function(t,a){t.id==d&&s.splice(a,1)}))}Promart.modules.availability.products=s,""!=i?(Promart.modules.availability.popupHtml(i,n,o,t,r),Promart.modules.availability.hidePopupLoading()):Promart.modules.availability.updateSCMinicart(t,r)}))},Promart.modules.availability.showPopupLoading=function(){$("div[class*='popup-loading']").addClass("active"),$("body").css("overflow","hidden !important")},Promart.modules.availability.hidePopupLoading=function(){$("div[class*='popup-loading']").removeClass("active"),$("body").css("overflow","auto !important")},Promart.modules.availability.popupHtml=function(t,a,e,o,r){var s="",i="",n="Retirar productos y continuar",l="Algunos productos";""!=a?s='

    '+($(a).length>1?"Productos disponibles:":"Producto disponible:")+'

    '+a+"
    ":(l="Los productos",n="Retirar producto"+($(t).length>1?"s":"")+" y continuar",i="hg");var c='';$("header").eq(0).after(c),$("div#header").after(c),$("body").addClass("g-pop"),$(".gh-popup").removeClass("open"),$(".cnt-win-despacho, .win-despacho").removeClass("open"),$(".popup-availability").not(".popup-not-express").addClass("open")},Promart.modules.availability.closePopup=function(){if($(".js-confirmar").removeClass("load"),$(".gh-popup.popup-availability").not(".popup-not-express").remove(),$(".gh-popup.popup-not-express").removeClass("open"),$(".js-bgModal-sp").removeClass("active"),$(".cnt-win-despacho, .win-despacho").addClass("open"),$("body").removeClass("g-pop"),$("body").attr("style","overflow:auto;"),-1!=window.location.href.indexOf("/checkout")){var t=$("#ship-neighborhood").eq(0);t.length&&(t=t.val(),$(".ship-neighborhood-cloned").val(t),$(".ship-neighborhood-cloned option[value='"+t+"']").prop("selected",!0))}},Promart.modules.availability.updateSCMinicart=function(t,a){-1!=window.location.href.indexOf("checkout")&&(window._reloadAfterSetLocation=!0,Promart.modules.availability.showPopupLoading()),vtexjs.checkout.removeAllItems().done((function(){Promart.modules.availability.products.length?vtexjs.checkout.addToCart(Promart.modules.availability.products,null,t).done((function(e){Promart.components.header.selectCokkie(t,a)})):Promart.components.header.selectCokkie(t,a)}))},Promart.modules.availability.addProdDisponibles=function(){var t=$(this).data("sc"),a=$(this).data("ls");$(".js-add-confirmar").addClass("load"),Promart.modules.availability.updateSCMinicart(t,a)},Promart.modules.availability.uiEvents=function(){$(document).on("click",".js-close-ava",Promart.modules.availability.closePopup),$(document).on("click",".js-add-confirmar",Promart.modules.availability.addProdDisponibles)},Promart.modules.availability.uiEvents(),Promart.modules.popupstock={},Promart.modules.popupstock.sc=Promart.modules.cookies.getCookie("VTEXSC")?Promart.modules.cookies.getCookie("VTEXSC").split("sc=")[1]:2,Promart.modules.popupstock.sucursalIDs={1:504,2:15,3:507,4:509,5:520,6:14,7:511,8:402,9:401,10:403,11:510,12:519,13:8,14:521,15:505,17:515,18:522,22:526,23:404,24:527,25:15,26:15,27:544,28:15},Promart.modules.popupstock.coorMap={514:"https://www.google.com/maps?q=-13.5203727,-71.9582916&output=embed",403:"https://www.google.com/maps?q=-5.727837,-78.796177&output=embed",402:"https://www.google.com/maps?q=-9.9202341,-76.2452591&output=embed",519:"https://www.google.com/maps?q=-13.71128,-76.194986&output=embed",503:"https://www.google.com/maps?q=-12.01594,-76.88705&output=embed",524:"https://www.google.com/maps?q=-12.274917,-76.873778&output=embed",501:"https://www.google.com/maps?q=-12.171967,-76.992895&output=embed",510:"https://www.google.com/maps?q=-12.067157,-75.20491&output=embed",523:"https://www.google.com/maps?q=-12.18001,-76.942342&output=embed",521:"https://www.google.com/maps?q=-17.187143,-70.937549&output=embed",511:"https://www.google.com/maps?q=-78.504583,-7.154194&output=embed",518:"https://www.google.com/maps?q=-13.5419394,-71.8998582&output=embed",502:"https://www.google.com/maps?q=-11.939714,-77.068949&output=embed",504:"https://www.google.com/maps?q=-8.132726,-79.030045&output=embed",505:"https://www.google.com/maps?q=-15.4940479,-70.134469&output=embed",515:"https://www.google.com/maps?q=-9.1255575,-78.5378279&output=embed",522:"https://www.google.com/maps?q=-14.0759552,-75.7376055&output=embed",506:"https://www.google.com/maps?q=-6.778425,-79.83314&output=embed",520:"https://www.google.com/maps?q=-4.5873783,-81.2609997&output=embed",517:"https://www.google.com/maps?q=-12.058154,-76.963302&output=embed",512:"https://www.google.com/maps?q=-12.0657722,-77.0539314&output=embed",509:"https://www.google.com/maps?q=-4.917643,-80.696609&output=embed",516:"https://www.google.com/maps?q=-12.0903669,-77.0516356&output=embed",401:"https://www.google.com/maps?q=-8.3853164,-74.556069&output=embed",507:"https://www.google.com/maps?q=-5.184016,-80.642134&output=embed",528:"https://www.google.com/maps?q=-12.0099676,-77.0624249&output=embed"},Promart.modules.popupstock.salesChannelData={1:"trujillo",2:"lima",3:"piura",4:"sullana",5:"talara",6:"chiclayo",7:"cajamarca",8:"huanuco-hpo",9:"pucallpa-hpo",10:"jaen-hpo",11:"huancayo",12:"pisco",13:"cusco",14:"moquegua",15:"juliaca",17:"chimbote",18:"ica",22:"arequipa",23:"tarapoto",24:"tumbes",25:"lima",26:"lima",27:"lima",28:"lima"},Promart.modules.popupstock.hideMap=function(){$(this).removeClass("active"),$("#popup-stock.popup-gs .holder .stock-box").removeClass("active"),$("#store-map").html(""),$("#popup-stock.popup-gs .holder .map").addClass("hide-map"),$("#popup-stock.popup-gs .holder .see-map").removeClass("active"),$(".popup-gs .header-gs h2").text("Consultar stock")},Promart.modules.popupstock.seeMap=function(t){t.preventDefault(),$(".popup-gs .header-gs h2").text("Ver mapa");var a=$(this).attr("href");if($("#popup-stock.popup-gs .holder .see-map").removeClass("active"),$("#popup-stock.popup-gs #hide-map").addClass("active"),$(this).parent().addClass("active"),$(".stock-physical-store .stock-box").hasClass("active")){var e=$(".stock-box.active").html();$("#store-map").html(e)}$("#stock-map").attr("src",Promart.modules.popupstock.coorMap[a]),$("#popup-stock.popup-gs .holder .map").removeClass("hide-map")},Promart.modules.popupstock.closePopupGS=function(){var t=$("#popup-stock.popup-gs");$("body , html").css("overflow","auto"),$(".popup-gs").fadeOut(200,(function(){t.css("opacity","0"),t.find(".centered").addClass("inactive"),t.find(".wrapper .body-gs .loading.gs").show(1)}))},Promart.modules.popupstock.openPopupGS=function(t){$("body , html").css("overflow","hidden"),$("#popup-stock.popup-gs .holder").hasClass("active")||($("#"+t+" .loading-gs").show(1),$("#"+t+" .holder").removeClass("active")),$("#"+t).css("display","flex").animate({opacity:"1"},200,(function(){$("#"+t+" .centered").removeClass("inactive")}))},Promart.modules.popupstock.sellerAndKitsDisplay=function(t=!1){var a=Promart.pages.ficha.amount,e="
    ";$(".body-gs").addClass("-h"),e+=t?"
    Producto Exclusivo Online
    Unid.

    Promart.pe

    ":"
    Producto Exclusivo Online
    Unid.
    ",e+="
    ",Promart.modules.popupstock.stockAjaxDisplay(-1,e)},Promart.modules.popupstock.stockAjaxDisplay=function(t,a=null){var e=null!=a?a:["
    ¡Oh no!Hemos tenido un error. Vuelva a intentar mas tarde por favor.
    ","
    ¡!.
    ","
    ¡!.
    ","
    ¡PRODUCTO EXCLUSIVO ONLINE!Este producto es exclusivamente para la venta online.
    "][t];$(".popup-gs section.body-gs .holder").addClass("active"),$(".popup-gs section.body-gs .loading-gs").css("display","none"),$(".popup-gs section.body-gs .holder .bottom").append(e),$(".stock-header .btn-map").each((function(t){Number(this.text.length)>3&&$(this).addClass("lg")}))},Promart.modules.popupstock.popupStockTiendas=function(){var t=$(this).closest(".product").attr("data-seller");if(Promart.components.header.cookieCity())Promart.modules.popupstock.verStockTiendas(t);else{var a={action:"popupStockTiendas",data:{itemSeller:t}};Promart.modules.utils.setLocalStorage("actionRefresh",JSON.stringify(a))}},Promart.modules.popupstock.verStockTiendas=function(t){Promart.modules.utils.setLocalStorage("actionRefresh","");var a=$(".flag-wrapper.ficha").find(".hp-integracionlongtailproveedor"),e=$(".flag-wrapper.ficha").find(".hp-integracionlongtailpromart");if($("#popup-stock").length){if(Promart.modules.popupstock.openPopupGS("popup-stock"),$("#popup-stock.popup-gs .holder").hasClass("active"))return;var o=$(".modulo.precio .skuBestPrice").text(),r=$(".modulo.info .price-oh-wrapper .price-oh").text(),s=r.length?"":"",i=$(".modulo.info .pn .fn.productName").text(),n=$("#___rc-p-sku-ids").val(),l=$("#show .thumbs li").eq(0).find("img").attr("src").replace("-55-55","-75-75"),c=Promart.modules.cookies.getCookie("VTEXSC");c=c.replace("sc=","");var d=Promart.modules.popupstock.sucursalIDs[c],p=new Date,m=Promart.modules.utils.getDate(),u=p.getHours(),h=String((new Date).getDate()).padStart(2,"0"),g=String((new Date).getMonth()+1).padStart(2,"0"),f=(new Date).getFullYear(),v=0<=u&&u>7?m:h-1+"/"+g+"/"+f,P="https://product-prd.cc.cloudintercorpretail.pe/api/customer-care/v1/hpsa/products/stock/"+n+"?offset=1&limit=100";if($(".popup-gs section.body-gs .holder .p-price").html(o+""+r+" "+s+""),$(".popup-gs section.body-gs .holder .p-name").html(i),$(".popup-gs section.body-gs .holder .p-sku").html("SKU: "+n+"La cantidad de stock es referencial y puede variar al momento de tu compraStock actualizado al: "+v+" 7:00am"),$(".popup-gs section.body-gs .holder .img img").attr("src",l),"Promart"!==t&&"promart"!==t&&"1"!==t)return void Promart.modules.popupstock.sellerAndKitsDisplay();if("99"==n.substring(0,2)&&n.length>5&&("Promart"==t||"promart"==t||"1"==t))return void Promart.modules.popupstock.sellerAndKitsDisplay(!0);!e.length>0&&!a.length>0?$.ajax({url:P,type:"GET",headers:{"Content-Type":"application/json"},success:function(t){var a=Promart.modules.popupstock.getStoresStock(t,d);switch(a){case-1:Promart.modules.popupstock.stockAjaxDisplay(0);break;case 0:Promart.modules.popupstock.getStockFromAte();break;default:Promart.modules.popupstock.stockAjaxDisplay(-1,a)}},error:function(){Promart.modules.popupstock.stockAjaxDisplay(0)}}):Promart.modules.popupstock.getStockFromLongtailPromart(n)}},Promart.modules.popupstock.getStockFromLongtailPromart=function(t){var a=Number(Promart.pages.ficha.amount),e="
    ";e+="PRODUCTO DE VENTA ONLINE Y POR CATÁLOGO",e+="Producto para la venta online y por catálogo en tiendas físicas. El stock es referencial y puede variar al momento de tu compra.",e+="Stock disponible online: "+(a>10?"+10":a)+"",e+="
    ",Promart.modules.popupstock.stockAjaxDisplay(-1,e)},Promart.modules.popupstock.getStockFromAte=function(){var t=Promart.modules.popupstock.salesChannelData[Promart.modules.popupstock.sc],a=Promart.pages.ficha.amount,e="";e+='
    ',e+='
    ',e+='

    Promart '+(t=t.charAt(0).toUpperCase()+t.slice(1))+"

    ",e+='
    ',e+='0',e+="
    ",e+="
    ";var o="
    Stock para compras online
    Unid.

    Promart.pe

    ";(e+="
    ").length&&(o+="
    Stock para compras en tienda física
    "+e+"
    "),Promart.modules.popupstock.stockAjaxDisplay(-1,o)},Promart.modules.popupstock.getStoresStock=function(t,a){var e="",o="";if(-1!=t.code){if(2!=t.code){var r=t.data.product.lstStock;return r.sort((function(t,a){return a.availableStock-t.availableStock})),r.forEach((function(t,o){!t.departamento||t.storeCode!=a&&t.departamento.id!=a||t.store.includes("Cd")||t.store&&t.address&&t.storeCode&&t.availableStock&&(e+='
    ',e+='
    ',e+='

    Promart '+t.store+"

    ",e+='",e+="
    ",e+="

    "+t.address+"

    ",e+='Ver Mapa',e+="
    ")})),o="",e.length&&(o+="
    Stock para compras en tienda física
    "+e+"
    "),o}return 0}return-1},Promart.modules.popupstock.uiEvents=function(){$(document).on("click",".js-aval-stock",Promart.modules.popupstock.popupStockTiendas),$(document).on("click",".popup-gs",Promart.modules.popupstock.closePopupGS),$(document).on("click",".popup-gs .close-popup",Promart.modules.popupstock.closePopupGS),$(document).on("click","#popup-stock.popup-gs .holder .see-map",Promart.modules.popupstock.seeMap),$(document).on("click","#popup-stock.popup-gs #hide-map",Promart.modules.popupstock.hideMap),$(document).on("click",".popup-gs .wrapper",(function(t){t.stopPropagation()}))},Promart.modules.popupstock.init=function(){Promart.modules.popupstock.uiEvents()},Promart.modules.prices={},Promart.modules.prices.promotionTeasersFilter=function(t,a,e){let o={name:"Name",conditions:"Conditions",effects:"Effects",value:"Value",parameters:"Parameters"};const r={};return t.filter((function(t){if(void 0===t[o.name]&&(o=r),void 0!==t[o.name]){const r=t[o.name].toLowerCase();return e?a.some((function(t){return r.includes(t)})):!a.some((function(t){return r.includes(t)}))}return!1}))},Promart.modules.prices.logicItems=function(t,a,e,o,r,s){const i=1==t[a.effects][a.parameters].length?t[a.effects][a.parameters][0][a.name]:t[a.effects][a.parameters][1][a.name];let n=1==t[a.effects][a.parameters].length?t[a.effects][a.parameters][0][a.value]:t[a.effects][a.parameters][1][a.value],l="",c="";switch(i){case"PercentualDiscount":l="P",c=o*(1-n/100);break;case"MaximumUnitPriceDiscount":l="F",n.length>0&&n.length<3?n/=100:n=parseFloat(n.slice(0,-2)+"."+n.slice(-2)),c=n;break;case"PromotionalPriceTableItemsDiscount":"1"!=r&&"PlazaVea"!=r&&"oechsle"!=r&&(s=o),l="T",n=s>0?s-parseFloat(n):e-parseFloat(n),c=n;break;default:l="N",c=o-parseFloat(n)}if(!(c>=o))return{type:l,priceTOH:c}},Promart.modules.prices.promotionTeasersItems=function(t,a,e,o,r){const s=[],i={name:"Name",conditions:"Conditions",effects:"Effects",value:"Value",parameters:"Parameters"};return $.each(t,(function(t,n){if(void 0!==n[i.name]){const t=n[i.name].toLowerCase();if(t.indexOf("oh-r-")>=0&&(e=a),"oh-3x2"!=t&&n[i.effects][i.parameters].length>=1){const t=n[i.conditions][i.parameters][0][i.value];if("203"==t||"501"==t){const t=Promart.modules.prices.logicItems(n,i,a,e,o,r);s.push(t)}else{const t=Promart.modules.prices.logicItems(n,i,a,e,o,r);s.push(t)}}}})),s},Promart.modules.prices.typePromo=function(t,a){const e=[];Promart.data.products[t.items[0].itemId]=t;for(let o=0;o0){let o,d,p=0,m=0,u="";const h=s.commertialOffer.PromotionTeasers,g=Promart.modules.prices.promotionTeasersFilter(h,["oh-pay-"],!0),f=Promart.modules.prices.promotionTeasersFilter(h,["oh-pay-","agoraclub-"],!1);if(g.length?(o=g,d="priceTOHPay"):f.length&&(o=f,d="priceTOH"),void 0!==o){const t=Promart.modules.prices.promotionTeasersItems(o,n,i,r.sellerId,c);r[d]=Promart.modules.prices.bestPromo(t),m=Math.floor((100*(1-Number(r[d])/(ivoid 0!==t)){const a=t.sort((function(t,a){return t.priceTOH>a.priceTOH?1:t.priceTOHS/ ","S/").replace(""," ").replace("",""),e=Promart.modules.utils.formatMoneda(o.price).replace("S/ ","S/").replace(""," ").replace("","");$(t).find(".product").attr("data-list-price",a),$(t).find(".product").attr("data-best-price",e),$(t).find(".bestPrice").append('
    '+Promart.modules.utils.formatMoneda(o.listPrice)+"
    "),$(t).find(".bestPrice").append('
    '+Promart.modules.utils.formatMoneda(o.price)+"
    "),""===o.listPrice&&$(t).find(".js-bestPrice .price ").css("color","#000")}let m="",u=p;""!=a&&(m=' x m2',u=p/a),e&&(m=' x m'),$(t).find(".product").hasClass("soldout")||$(t).find(".js-tarjetaOH").addClass("active").find(".js-pp").html(Promart.modules.utils.formatMoneda(u)+m),"TOHPAY"===d&&$(t).find(".js-tarjetaOH").find("i.dummie").addClass("dummie-oh-pay"),"TOH-TOHPAY"===d&&$(t).find(".js-tarjetaOH").find("i.dummie").addClass("dummie-oh-and-oh-pay"),$(t).find(".js-tarjetaOH").find(".js-tohmc").html(Promart.modules.utils.formatMoneda(p)),$(t).find(".product").attr("data-pricetoh",p),$(t).find(".precios").addClass("hasPriceOh"),$(t).find(".product").hasClass("soldout")||(l.length&&r.length?(s=(100*(1-p/n)).toFixed(2),i="v2"):s=(100*(1-p/c)).toFixed(2),$($(t).find('.flag[class*="oh-"]').not('.flag[class*="oh-3x2"]').not('.flag[class*="oh-2x1"]')[0]).addClass("active").addClass(i).append("-"+parseInt(s.split(".")[0])+"%"),l.length&&$(t).find(".js-bestPrice").addClass("tam")),$(t).find(".js-tarjetaOH .tit-toh").append(''),$(t).find(".precios").hasClass("hasPriceOh")&&$(t).find(".listPrice .price.js-pp").addClass("listPriceSize")},Promart.modules.prices.listPrices=async function(t,a=!0){const e=Promart.modules.cookies.getCookie("VTEXSC")?Promart.modules.cookies.getCookie("VTEXSC").split("sc=")[1]:2;let o=$(t).find(".js-prod > ul > li").not(".helperComplement"),r="",s=0;o=o.length>0?o:$(t).find(" > li").length?$(t).find(" > li"):$(t).find(".slick-track > li"),$(t).find(".js-prod > ul > li.helperComplement").remove(),$(window).width()>768&&$(t).removeClass("mb-rediseno"),o.each((function(t,a){const e=$(a).find(".sku-selector").find("input.insert-sku-checkbox").attr("rel");e&&(s=$(a).find(".getNumberMetraje").find("ul li").eq(0).text(),$(a).find(".product").attr("data-sku",e),void 0!==Promart.data.products&&void 0!==Promart.data.products[e]||(r+="skuId:"+e+","),Promart.modules.product.formatPriceSinToh(a,e,s))})),""==Promart.data.tags&&await Promart.modules.product.jsonTagsPromart(),a&&await Promart.modules.utils.getProduct2(r,e),o.each((function(t,a){const e=$(a).find(".product").data("sku");if(e){const t=Promart.data.products[e],o=$(a).find(".js-listPrice"),r=$(a).find(".js-bestPrice"),s=o.find(".sin-fto").text().replace("S/","").replace(",","");let i=r.find(".sin-fto").text().replace("S/","").replace(",",""),n=0;const l=0,c=t.clusterHighlights||{},d=$(a).find(".getNumberMetraje").find("ul li").eq(0).text(),p=t.items[0].measurementUnit,m=t.items[0].sellers[0].commertialOffer.AvailableQuantity;let u=!1;if("m"===p&&(u=!0,Promart.modules.product.formatPriceSinTohMetroLineal(a,u)),void 0!==t&&void 0!==t.items){$(a).find(".product").attr("data-availablequantity",m),$(a).find(".product").attr("data-categories",t.categoriesIds[0]),$(a).find(".product").attr("data-brand",t.brand),$(a).find(".product").attr("data-seller",t.items[0].sellers[0].sellerId),$(a).find(".product").attr("data-measurementUnit",t.items[0].measurementUnit),Promart.modules.prices.attrCategories(t.categories[0],$(a).find(".product")),Promart.modules.prices.validateCategories(t.categoriesIds[0],$(a).find(".product"),c);const e=Promart.modules.prices.typePromo(t),p="";i=i.replace(/\s/g,""),e.price>=e.listPrice&&(e.listPrice=""),void 0!==e&&(void 0!==e.priceTOH&&void 0===e.priceTOHPay?Promart.modules.prices.valideVisualTOHOrOHPay(a,d,u,e,o,l,p,s,r,i,"TOH"):void 0!==e.priceTOH&&void 0!==e.priceTOHPay?Number(e.priceTOH)===Number(e.priceTOHPay)&&Promart.modules.prices.valideVisualTOHOrOHPay(a,d,u,e,o,l,p,s,r,i,"TOH-TOHPAY"):void 0===e.priceTOH&&void 0!==e.priceTOHPay&&Promart.modules.prices.valideVisualTOHOrOHPay(a,d,u,e,o,l,p,s,r,i,"TOH-TOHPAY")),r.length&&o.length?($(a).find(".js-bestPrice").addClass("second-price"),n=(100*(1-i/s)).toFixed(2),!$(a).find(".flag.linea-blanca-tag > p").length&&parseInt(n.split(".")[0])>=1?$(a).find(".flag-wrapper, .item__discountTag").append('
    -'+parseInt(n.split(".")[0])+"%
    "):$($(a).find('.flag[class*="oh-"]').not('.flag[class*="oh-3x2"]').not('.flag[class*="oh-2x1"]')[0]).removeClass("v2")):void 0!==e.price&&$(a).find(".product").hasClass("soldout")&&Promart.modules.prices.valideVisualTOHOrOHPay(a,d,u,e,o,l,p,s,r,i,"SOLDOUT")}Promart.modules.product.tags(a,Promart.data.tags,m,data.clusterHighlights)}})),Promart.modules.product.checkForProductsOnlyInStore($(t).find("li .product"),!0)},Promart.modules.prices.attrCategories=function(t,a){if(void 0!==t){const e=t.split("/");$(a).attr("data-category",e[2]),$(a).attr("data-subcategory",e[3])}},Promart.modules.prices.validateCategories=function(t,a,e){if(void 0!==t){const o=t.split("/"),r=o[1],s=o[3];void 0!==e&&("599"!=r&&"804"!=r&&void 0===e[3978]||$(a).addClass("no-promotion"),"627"!=s&&"585"!=s&&"626"!=s&&void 0===e[3896]||$(a).removeClass("no-promotion"))}},Promart.modules.product={},Promart.modules.product.tooltip=function(t){var a=(t=$(this).closest(".product")).find(".tooltip-stock");$(t).find(".tooltip-stock").length?a.show():$(t).find(".item__controls").append('
    Has alcanzado el límite disponible para este producto.
    '),setTimeout((function(){a.fadeOut("slow")}),4e3)},Promart.modules.product.findProductIndex=function(t){return vtexjs.checkout.orderForm.items.findIndex((function(a){return parseInt(a.productId)===t}))},Promart.modules.product.updateDownButtonState=function(t){var a=t.find("input.js-cantidad"),e=t.find("span.js-down");(parseInt(a.val(),10)||1)<=1?e.addClass("js-down--disabled"):e.removeClass("js-down--disabled")},Promart.modules.product.updateCartWithDebounce=function(t,a){var e={index:t,quantity:a};vtexjs.checkout.updateItems([e],null,!1).then((function(){Promart.modules.minicart.refreshUI(),$(".item__amount").each((function(){Promart.modules.product.updateDownButtonState($(this))}))}))},Promart.modules.product.changeUp=function(t){t.preventDefault();var a,e=$(this).closest(".product");a=e.find(".item__controls input, .item__amount input"),val=parseInt(a.val()),stock=parseInt(e.data("availablequantity")),id=e.data("id"),limit=Promart.services.data.stockLimit[e.data("id")];var o=Promart.modules.product.findProductIndex(e.data("id"));Promart.modules.product.updateDownButtonState(a.closest(".item__amount")),stock=limit||stock,val===stock-1&&a.closest(".item__amount").find(".js-up").addClass("js-up--disabled"),val1?a.closest(".item__amount").find(".js-down").removeClass("js-down--disabled"):a.closest(".item__amount").find(".js-down").addClass("js-down--min")):Promart.modules.product.tooltip(e);var r=$(this).closest(".product.-metroCuadrado");if(r.length){var s=parseFloat(r.find(".getNumberMetraje ul li").eq(0).text())||r.data("mc"),i=val>1?"Cajas":"Caja";r.find(".js-cantCaj").text(val+" "+i);var n=(s*val).toFixed(2);r.hasClass("container__item--product")?(r.find(".js-mcdValue").html(n+'x m2'),r.find(".item__mc").html(i)):r.find(".js-mcdValue").text(n)}return Promart.modules.product.updateCartWithDebounce(o,val),!1},Promart.modules.product.syncAddToCartButtons=function(){vtexjs.checkout.getOrderForm().done((function(t){$(".ficha-venta-proyecto .js-addtocart").show(),t.items.forEach((function(t){$(".ficha-venta-proyecto .prod-"+t.id).each((function(){$(this).closest(".ficha-venta-proyecto").length&&($(this).find(".js-addtocart").hide(),$(this).find("input.js-cantidad").val(t.quantity))}))}))}))},Promart.modules.product.changeDown=function(t){t.preventDefault();var a=$(this).closest(".product"),e=a.find(".cantidad input, .item__amount input");val=parseInt(a.find(".cantidad input, .item__amount input").val()),stock=parseInt(a.data("availablequantity"));a.data("id");var o=Promart.modules.product.findProductIndex(a.data("id"));if(Promart.modules.product.updateDownButtonState(e.closest(".item__amount")),1===val){var r=a.data("id");return Promart.modules.minicart.deleteItem(r,[],o,0,a).then((function(){a.find(".item__controls").removeClass("add"),a.closest(".ficha-venta-proyecto").length&&a.find(".js-addtocart").show(),Promart.modules.product.syncAddToCartButtons()})),!1}val--,val<=0&&(val=1),1===val&&e.closest(".item__amount").find(".js-down").addClass("js-down--disabled"),val1?"Cajas":"Caja";s.find(".js-cantCaj").text(val+" "+n);var l=(i*val).toFixed(2);s.hasClass("container__item--product")?(s.find(".js-mcdValue").html(l+'x m2'),s.find(".item__mc").html(n)):s.find(".js-mcdValue").text(l)}return Promart.modules.product.updateCartWithDebounce(o,val),!1},Promart.modules.product.changeInput=function(t){var a=$(this).closest(".product"),e=parseInt(a.data("availablequantity")),o=Promart.services.data.stockLimit[a.data("id")];this.value=this.value.replace(/[^0-9]/g,""),""!=$(this).val()&&0!=$(this).val()||$(this).val(1),Promart.modules.product.updateDownButtonState($(this).closest(".item__amount")),(e=o||(e>1e3?1e3:e))<$(this).val()&&($(this).val(e),Promart.modules.product.tooltip(a)),e<$(this).val()&&$(this).val(e)},Promart.modules.product.popUp=function(t,a){var e=a.data("flag");if("color"==t){var o='
    ';o+='
    ',o+='
    ',o+='Importante:',o+='Este producto cuenta con variantes de color y/o diseño que será seleccionado aleatroriamente en base a su disponibilidad.
    ',o+='
    ',o+='Aceptar',o+='Cancelar
    '}else if("-metroCuadrado"==t){o='
    ';o+='
    ',o+='
    ',o+='Sé prevenido, añade un 10%',o+='Añadir 10% para zócalos, perdidas y rupturas.
    ',o+='
    '}else if("NxM"==t){o='
    ';o+='
    ',o+='
    ',o+='Aprovecha el '+e+"",o+='Te faltan 1 productos para acceder a la promoción. Si agregas 3 unidades a tu carrito pagarás solo 2.',o+='
    '}else if("proveedor"==t){o='
    ';o+='
    ',o+='
    ',o+='Importante:',o+='Recuerda que este producto se vende por corte y no se aceptan cambios ni devoluciones.',o+='
    ',o+='Aceptar',o+='Cancelar'}!$(a).find(".item__popUp").length&&a.hasClass("container__item--product")&&$(a).append(o),$(a).find(".item__popUp").addClass("active")},Promart.modules.product.filterTypeFlag=function(t,a,e){var o=e,r=t.filter((function(t){return t.type===a})).sort((function(t,a){return t.priority-a.priority}));"omnicanal"===a&&(r=Promart.modules.product.filterDeleteRepeat(r));var s=r.filter((function(t){return t.options&&t.options.conditions}));return s.length>0&&(r=Array.from(new Set(r.concat(s))).sort((function(t,a){return t.priority-a.priority})),o+=s.length),r.slice(0,o)},Promart.modules.product.htmlTags=function(t){let a="";return t.map((function(t){if(!0===t.onlyPDP&&!$("body").hasClass("produto"))return;let e=t.content.background,o=t.content.color,r=t.content.borderColor;void 0===t.content.background&&(e="#464646"),void 0===t.content.color&&(o="#FFFFFF"),void 0===t.content.borderColor&&(r="#464646"),"imagen"===t.variant&&(a+=``);let s=!1;if("texto"===t.variant&&(a+=``),"texto-imagen"===t.variant||"imagen"===t.variant){let i,n=t.content.positionImage,l="";if(t.content.size){const a=t.content.size.split(" ");i=`width: ${a[0]};`,l=`height: ${a[1]};`}let c=`${t.content.text}`;void 0===t.content.text&&(c="");let d="",p="",m="";void 0===t.content.positionImage&&(n="right"),"imagen"===t.variant&&(e="initial",o="initial",r="initial",d="padding: 0 !important;",p="content-variant-imagen",m="variant-imagen");const u=``;a+=``}})),a},Promart.modules.product.limitTypesTag=function(){return{retiro:1,despacho:1,atributo:2}},Promart.modules.product.filterDeleteRepeat=function(t){var a=[];return t.forEach(t=>{let e=t.name;0===a.filter(t=>t.name.includes(e)).length&&a.push(t)}),a},Promart.modules.product.returnHtmlFlags=function(t,a,e="",o){let r="",s="",i=[];void 0!==e&&""!==e&&1===(e=parseInt(e))&&(i={name:"ultima-unidad",type:"atributo",priority:1,variant:"texto-imagen",content:{text:"Última unidad",background:"#FF0200",borderColor:"#FF0200",position:"-130px -99px",size:"11px 14px",positionImage:"left"}}),Promart.modules.product.normalizeText=function(t){return t.toLowerCase().replace(/ñ/g,"n").replace(/[áàäâ]/g,"a").replace(/[éèëê]/g,"e").replace(/[íìïî]/g,"i").replace(/[óòöô]/g,"o").replace(/[úùüû]/g,"u")},Promart.modules.product.capitalizeText=function(t){return t.split(" ").map((function(t){return 0===t.length?t:t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()})).join(" ")},Promart.modules.product.isValidLocationForLlegaHoy=function(){if(void 0===Promart.modules.cookies||"function"!=typeof Promart.modules.cookies.getCookie)return!1;const t=Promart.modules.cookies.getCookie("locateCities");if(!t)return!1;const a=decodeURIComponent(t);return["Lima-Lima-Barranco","Lima-Lima-Chorrillos","Lima-Lima-La Molina","Lima-Lima-Jesus Maria","Lima-Lima-Miraflores","Lima-Lima-San Isidro","Lima-Lima-San Borja","Lima-Lima-Santa Anita","Lima-Lima-Surquillo","Lima-Lima-Santiago de Surco","Lima-Lima-Lima","Lima-Lima-Breña","Lima-Lima-Independencia","Lima-Lima-El Agustino","Lima-Lima-La Victoria","Lima-Lima-Los Olivos","Lima-Lima-Lince","Lima-Lima-Pueblo Libre","Lima-Lima-Magdalena del Mar","Lima-Lima-Rimac","Lima-Lima-San Miguel","Lima-Lima-San Luis","Lima-Lima-San Martin de Porres","Piura-Piura-Piura","Piura-Piura-Castilla","Lambayeque-Chiclayo-Chiclayo","La Libertad-Trujillo-El Porvenir","La Libertad-Trujillo-Florencia de Mora","La Libertad-Trujillo-Trujillo","La Libertad-Trujillo-La Esperanza","La Libertad-Trujillo-Victor Larco Herrera","Cusco-Cusco-Cusco","Cusco-Cusco-San Jeronimo","Cusco-Cusco-San Sebastian","Cusco-Cusco-Santiago","Cusco-Cusco-Wanchaq","Arequipa-Arequipa-Cayma","Arequipa-Arequipa-Cerro Colorado","Arequipa-Arequipa-Sachaca","Arequipa-Arequipa-Yanahuara","Anchash-Santa-Chimbote","Anchash-Santa-Nuevo Chimbote"].includes(a)};const n=[{text:"retira hoy",priority:1,startHour:0,endHour:17,days:[1,2,3,4,5,6]},{text:"retira mañana",priority:2,startHour:0,endHour:23,days:[1,2,3,4,5,6]},{text:"llega hoy",priority:1,startHour:0,endHour:15,days:[1,2,3,4,5,6]},{text:"llega mañana",priority:2,startHour:0,endHour:23,days:[0,1,2,3,4,5]}],l=new Date,c=l.getHours(),d=l.getDay(),p=Promart.modules.product.limitTypesTag(),m=$("body").hasClass("produto");let u=$(".seller-name a").text().trim();if(m&&"promart"!==u.toLowerCase()){t.some(t=>"exclusivas-online"===t.name)||t.push({name:"exclusivas-online",onlyPDP:!0,priority:16,type:"atributo",variant:"texto",content:{text:"Exclusivo para venta web"}})}if(Array.isArray(o)&&o.length>0&&o.forEach((function(a){const e=a.match(/^(\d+)-(.*)$/);if(e){const a=e[1],o=e[2];if(parseInt(a)===parseInt(Promart.data.sc)){const a=o.replace(/-/g," ").toLowerCase(),e=Promart.modules.product.normalizeText(a),r=n.find(t=>Promart.modules.product.normalizeText(t.text)===e);if(r){const a=Promart.modules.product.capitalizeText(r.text),e=r.days.includes(d),s=c>=r.startHour&&cPromart.modules.product.normalizeText(t.name)===Promart.modules.product.normalizeText(a))){const e={name:a,type:o.includes("retira")?"retiro":"despacho",priority:r.priority,variant:"texto",content:{text:a,background:"#464646",color:"#FFFFFF",borderColor:"#464646"}};t.push(e)}}}}}})),t.length>0){const a=Promart.modules.product.filterTypeFlag(t,"retiro",p.retiro),e=t.filter(t=>"despacho"===t.type);let o=[];if(e.length>0){o=[e.sort((t,a)=>t.priority-a.priority)[0]]}const i=Promart.modules.product.filterTypeFlag(t,"atributo",p.atributo),n=Promart.modules.product.filterTypeFlag(t,"omnicanal",1);if(n.length>0&&(s="",n.forEach((function(t){if("imagen"===t.variant){const a="alternative"===t.alternative?` data-alternative="${t.name}"`:"",{position:e}=t.content;s+=`
    `}}))),a.length>0||o.length>0||i.length>0){let t=[];a.length>0&&(t=t.concat(a)),o.length>0&&(t=t.concat(o)),i.length>0&&(t=t.concat(i)),r=Promart.modules.product.htmlTags(t)}}return{all:r,omni:s}},Promart.modules.product.hideTagsLimitWidth=function(t){const a=t.find(".tag-container"),e=a.find(".style-tag"),o=a.width();let r=0;e.each((function(){r+=$(this).outerWidth(!0),r>o&&$(this).hide()}))},Promart.modules.product.loadTags=function(){Promart.modules.product.eventHoverTags()},Promart.modules.product.jsonTagsPromart=async function(){if(""==Promart.data.tags){const t=sessionStorage.getItem("jsonTagsPromart16");if(t)Promart.data.tags=JSON.parse(t);else{const t=await Promart.modules.utils.promesa("/files/tags_promart.json");sessionStorage.setItem("jsonTagsPromart16",JSON.stringify(t)),Promart.data.tags=t}}if(void 0===Promart.data.blproducts||""==Promart.data.blproducts){const t=await Promart.modules.utils.request("https://www.googleapis.com/storage/v1/b/hpsa-website-files/o/mipp-promart%2fblacklist.json");Promart.data.blproducts=t.metadata[Promart.data.sc].replace("[","").replace("]","")||""}return Promart.data.tags},Promart.modules.product.optionsReadyTags=function(t){const a=Promart.modules.product.limitTypesTag();var e=Promart.modules.cookies.getCookie("locateCities")?Promart.modules.cookies.getCookie("locateCities").split("-")[0]:"";$(document).ready((function(){$(".tag-container .content-tag").length>0&&($(".tag-container .content-tag").each((function(){let a=$(this).data("name"),o=$(this).data("option"),r=($(this).data("type"),$(this));if(o){let o=t.find((function(t){return t.name===a}));void 0!==o&&void 0!==o.options&&void 0!==o.options.conditions&&o.options.conditions.map((function(t){"show"===t.for&&("exist-class"===t.type&&$(t.expression).length>0&&(r.removeClass("hide"),r.addClass("show")),"not-exist-class"===t.type&&0===$(t.expression).length&&(r.removeClass("hide"),r.addClass("show")),"select-city-lima"===t.type&&e===t.expression&&(r.removeClass("hide"),r.addClass("show")))}))}})),$(".tag-container .content-tag").each((function(){let t=$(this).data("type");$(this).hasClass("hide")||$(this).hasClass("show")||($(this).closest(".tag-container").find('.content-tag[data-type="'+t+'"]').not(".hide").hide(),$(this).closest(".tag-container").find('.content-tag[data-type="'+t+'"]').not(".hide").sort((function(t,a){return $(t).data("priority")-$(a).data("priority")})).slice(0,a[t]).show())})))}))},Promart.modules.product.eventHoverTags=function(){$(document).ready((function(){$("body").on("mouseenter",".tag-container",(function(){const t=$(this);t.data("isScrolling")||(!function(t){const a=t.find(".list-tags"),e=t.find(".gradient-overlay");if(a.length>0){let o;o=setInterval((function(){const t=a.scrollLeft();a.scrollLeft(t+1);const r=a[0].scrollWidth-a.width(),s=1-a.scrollLeft()/r;e.css("opacity",s),t===a.scrollLeft()&&clearInterval(o)}),20),t.data("scrollInterval",o)}}(t),t.data("isScrolling",!0))})),$("body").on("mouseleave",".tag-container",(function(){const t=$(this);t.data("isScrolling")&&(!function(t){const a=t.find(".list-tags"),e=t.find(".gradient-overlay"),o=t.data("scrollInterval");clearInterval(o),a.animate({scrollLeft:0},500,(function(){e.css("opacity",1)}))}(t),t.data("isScrolling",!1))}))}))},Promart.modules.product.tags=function(t,a,e=""){var o=$(t);const r=a.filter((function(t){let a=t.name.trim().toLowerCase().replace(/\s+/g,"-");return o.find(`.flag[class*='${a}']`).length})),s=new Set;o.find(".flag[class*='retira-hoy'], .flag[class*='retira-manana'], .flag[class*='llega-hoy'], .flag[class*='llega-manana']").each((function(){const t=$(this).attr("class").match(/(\d+)-(retira-hoy|retira-manana|llega-hoy|llega-manana)/i);t&&s.add(t[0])}));const i=Promart.modules.product.returnHtmlFlags(r,100,e,Array.from(s));o.find(".prod-cnt-right").prepend('
    ');const n=a=>`
    \n ${a}\n
    \n ${".ficha-seller"===t?"":'
    '}`;""!=i.omni&&(o.find(".product").prepend(i.omni),".ficha-seller"===t&&o.find(".price-seller-cnt").after(i.omni)),""==i.all||o.find(".product").hasClass("soldout")||(o.find(".tag-container").prepend(n(i.all)),".ficha-seller"!==t||o.hasClass("soldout")||($(window).width()<=768?$('
    '+n(i.all)+"
    ").insertBefore(".ficha-main-img.gh-gtm"):o.before(`
    ${n(i.all)}
    `))),Promart.modules.product.optionsReadyTags(a)},Promart.modules.product.hideButtons=function(t,a){$(t).addClass("product-sold-out"),$(t).find(".js-cantProdFicha, .js-cantidad").val("0"),$(t).find(".js-cantProdFicha, .js-cantidad").attr("disabled","true"),$(t).find(".js-addtocart, .ctrl-menosmas").addClass("sold-out gh-outside-popup"),$(t).find(".js-addtocart em").text("Agotado"),$(t).find(".js-addtocart em").attr("id","btn-agotado"),$(t).closest(".product").attr("data-availablequantity","0"),"1"!=$(t).closest(".product").attr("data-seller")&&$(t).closest(".product").find(".aval-stock").addClass("sold-out"),a||(Promart.pages.ficha.amount=0,$(".content-alert-pdp-available").hide())},Promart.modules.product.removePrices=function(t){$(t).find("a[class*=buy-button]").remove(),$(t).find('.flag.linea-blanca-tag, .flag[class*="oh-"]').remove(),$(t).find(".second-price").length&&($(t).find(".second-price").hide(),$(t).find(".second-price").parent().prepend('
    '),$(t).find(".precios .listPrice").addClass("bestPrice").removeClass("listPrice")),$(t).find(".price-seller .lp, .second-price, .js-tarjetaOH, .js-price-toh").remove(),$(t).find(".price-seller .listprice").addClass("price").removeClass("listprice").addClass("tam")},Promart.modules.product.checkForProductsOnlyInStore=async function(t,a){var e=$(t);if(void 0===Promart.data.blproducts||""==Promart.data.blproducts){var o=await Promart.modules.utils.request("https://www.googleapis.com/storage/v1/b/hpsa-website-files/o/mipp-promart%2fblacklist.json");Promart.data.blproducts=o.metadata[Promart.data.sc].replace("[","").replace("]","")||""}for(var r=0;rVer stock en tiendas";$(t).find(".prod-bottom").html(e),$(t).find(".eof.js-eof").html("EXCLUSIVO EN TIENDAS")}else $("body, .ficha-seller").addClass("solo-tienda"),Promart.pages.ficha.logisticsNoDisp();else a||Promart.pages.ficha.availability()},Promart.modules.product.formatPriceSinToh=function(t,a,e){const o=$(t).find(".js-listPrice"),r=$(t).find(".js-bestPrice");$(t).find(".js-skmt").html("
    SKU: "+a+"
    ");let s="",i="";""!=e?($(t).find(".product").addClass("-metroCuadrado"),r.find(".js-pp").html(Promart.modules.utils.formatMonedaHtml((r.find(".sin-fto").text().replace("S/","")/e).toFixed(2))+' x m2'),r.find(".js-ppcm").html(r.find(".sin-fto").text()),s=(o.find(".sin-fto").text().replace("S/","")/e).toFixed(2),i=(r.find(".sin-fto").text().replace("S/","")/e).toFixed(2),o.length&&s>i?o.find(".js-pp").html(Promart.modules.utils.formatMonedaHtml((o.find(".sin-fto").text().replace("S/","")/e).toFixed(2))+' x m2'):r.find(".js-pp").css("color","black"),$(t).find(".js-mcd").html("
    "+e+"
    m2")):(s=Promart.modules.utils.formatMonedaHtml(o.find(".sin-fto").text()),i=Promart.modules.utils.formatMonedaHtml(r.find(".sin-fto").text()),$(t).find(".product").hasClass("soldout")||(o.find(".js-pp").html(s),r.find(".js-pp").html(i)),i.length&&$(t).find(".precios").addClass("has-bestPrice"))},Promart.modules.product.formatPriceSinTohMetroLineal=function(t,a){var e=$(t).find(".js-listPrice"),o=$(t).find(".js-bestPrice");a&&($(t).find(".product").addClass("-metroLineal"),xm=' x m',e.find(".js-pp").append(xm),o.find(".js-pp").append(xm))},Promart.modules.product.getNxM=function(t,a){var e=["2x1","3x2","4x3","5x4","6x5"],o="";return $(".flag-wrapper.ficha").find(".flag-txt.js-flag-text").length>1?($(".flag-wrapper.ficha .flag-txt.js-flag-text").first().remove(),$(".flag-txt.js-flag-text").css("opacity","1")):$(".flag-txt.js-flag-text").css("opacity","1"),$(t+a).each((function(){for(var a=$(this).attr("class").split(" ")[1],r=0;r-1){o=e[r]+" NxM",$(t).find(".js-popup-add-mxn .text1 p").addClass($(this).attr("class")),$(this).closest(".flag-wrapper.ficha").length&&a.indexOf(e[r])<4&&($(".container-flag-omnicanal").append("
    ¿Cómo funciona la promoción "+e[r]+"?
    "),$("body, .ficha-seller").addClass(o),$(".ficha-seller").data("flag",o),Promart.modules.product.textFichaNxM($(this).attr("class"),e[r]));var s=$(t).find(".js-popup-add-mxn .gtexto");"oh"!=a.split("-")[0]||s.find(".text-oh").length||s.append("La promo aplicará cuando selecciones Tarjeta oh! al momento de pagar.")}})),o},Promart.modules.product.textFichaNxM=function(t,a){var e=Handlebars.compile($("#tmpl-popup-nxm-ficha").html()),o={tag:t,itemN:a.split("x")[0],itemM:a.split("x")[1]};$(".gh-popup-nxm-tag").append(e(o))},Promart.modules.product.tooltipOH=function(){var t,a=".tit-toh";$("body").on("mouseenter",a,(function(){t=setTimeout(()=>{var t;t=$(this),$(t).closest(".js-tarjetaOH, .js-price-toh, tr.promo").find(".tooltip-toh").show()},500)})),$("body").on("mouseleave",a,(function(){$(".tooltip-toh").hide(),clearTimeout(t)}))},Promart.modules.product.proveedor=function(t,a,e){"m"==$(t).attr("data-measurementUnit")&&(a?$(t).addClass("proveedor"):$("body, .ficha-seller").addClass("proveedor"))},Promart.modules.product.uiEvents=function(){$(document).on("click",".js-up",Promart.modules.product.changeUp),$(document).on("click",".js-down",Promart.modules.product.changeDown),$(document).on("input",".js-cantidad",Promart.modules.product.changeInput),Promart.modules.product.tooltipOH(),Promart.modules.product.loadTags()},Promart.modules.product.init=function(){Promart.modules.product.uiEvents()},Promart.modules.push={},Promart.modules.push.principal=function(){OneSignal.User&&OneSignal.User.PushSubscription&&OneSignal.User.PushSubscription.token&&fetch("/files/push_notifications_categories.json").then(t=>{if(!t.ok)throw new Error("Network response was not ok");return t.json()}).then(t=>{this.checkSubscriptionAndSendNotifications(t)})},Promart.modules.push.checkSubscriptionAndSendNotifications=function(t){const a=window.location.href,e=(new Date).toISOString().slice(0,10),o=(new Date).getTime();t.forEach(t=>{if(a===t.url){const a=t.idTemplate;if(!a)return;const r=`notification_sent_${a}_${e}`,s=localStorage.getItem(r);if(s){const{timestamp:t}=JSON.parse(s);if(o-t<864e5)return;localStorage.removeItem(r)}const i=t.hoursToAdd||0,n=t.minutesToAdd||0,l={app_id:"fc50de15-3974-4c03-b1df-2ed6ea133454",delayed_option:"timezone",delivery_time_of_day:new Date(o+36e5*i+6e4*n).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}),include_subscription_ids:[OneSignal.User.PushSubscription.id],template_id:a,target_channel:"push"};Promart.modules.push.sendNotification(l),localStorage.setItem(r,JSON.stringify({sent:!0,timestamp:o}))}})},Promart.modules.push.sendNotification=function(t){const a="&00YWM4#$1ZTkyZjEtZWY#$1zNS00ZTU0LTlkMDAtN&00WMxMDAwZmExYTc4&00".replace(/#\$1/g,"").replace(/&00/g,"");return function(t){fetch("https://api.onesignal.com/notifications",{method:"POST",headers:{"Content-Type":"application/json",Authorization:a},body:JSON.stringify(t)}).then(t=>{if(!t.ok)throw new Error("Error en el envío de la notificación");return t.json()})}}(),Promart.modules.push.init=function(){this.principal()},Promart.modules.search={},Promart.components.header.searchClean=function(t){$("header .js-txtSearch").val(""),$(".icons-buscar").css("color","#989898"),$(".icon-cerrar").hide(),$(".js-txtSearch").focus(),Promart.components.header.showPreviousSearch()},Promart.components.header.searchTermCustom=function(){var t="",a=sessionStorage.getItem("objectTextSearch");if(null===a)t=vtxctx.searchTerm;else{var e=JSON.parse(a),o=e.textSearchConvert,r=e.textSearchOrigin,s=window.location.href,i=new URL(s).searchParams.get("ft");t=i===o.trim()||i===r.trim()?r:vtxctx.searchTerm}return t},Promart.components.header.changeSearch=function(){if($("body").hasClass("search")&&""!=window.location.search){if(void 0!==vtxctx.searchTerm){var t=Promart.components.header.searchTermCustom();$(".js-txtSearch").val(t)}}else if(window.location.pathname.includes("buscavazia")){t=new URLSearchParams(window.location.search).get("ft")||"";$(".js-txtSearch").val(t)}},Promart.components.header.closeSearchMobile=function(){Promart.components.header.searchClean(),$("header.-hd .h-left").removeClass("open"),$("header.-hd .search").removeClass("active"),$("header.-hd .js-minicart-mbl").removeClass("active"),$(".tb-cell.-tvam.h-icon").removeClass("active"),$(".js-cj-search").removeClass("open"),$(".bg-modal").removeClass("active"),$(".icons-buscar").css("color","#989898")},Promart.components.header.clearSearch=function(){$(".js-txtSearch").attr("placeholder","Buscar")},Promart.components.header.showPreviousSearch=function(){var t=Promart.components.header.getLastSearchProducts().desktop,a=$(".js-cj-search .js-txtSearch").val();$(".icons-buscar").css("color","#FF6E00"),t.length&&!a.length&&($(".gh-close-modal,.login,.menu-icon").removeClass("open").removeClass("active"),$(".titulo_depar").find("span i").removeClass("up"),$(".section-menu").removeClass("active"),$("header.-hd .h-left").addClass("open"),$("header.-hd .search").addClass("active"),$("header.-hd .js-minicart-mbl").addClass("active"),$(".tb-cell.-tvam.h-icon").addClass("active"),$(".js-bgModal").addClass("active"),$(".js-cj-search").addClass("open"),$(".mini-cart").addClass("active"),$(".js-resultSearch").html('
    Últimos productos visitados:'+t+'
    Limpiar historial
    '))},Promart.components.header.replaceSpecialCharacters=function(t){const a={"á":"a","é":"e","í":"i","ó":"o","ú":"u","ü":"u","ñ":"n","Á":"A","É":"E","Í":"I","Ó":"O","Ú":"U","Ü":"U","Ñ":"N"};let e=t.replace(/[áéíóúüñÁÉÍÓÚÜÑ]/g,t=>a[t]||t);e=e.replace(/[{}"']/g,"").trim();return["para","y","de","a","ante","bajo","cabe","con","contra","desde","durante","en","entre","hacia","hasta","mediante","y","por","según","so","sobre","tras","versus","vía","precio","precios","barato","baratos","economico","economicos","del","el","la","marca","marcas","sku","mas","o","costo","costos","mejor"].forEach(t=>{e=e.replace(new RegExp(`\\b${t}\\b`,"gi"),"")}),e=e.replace(/\s+/g," "),e},Promart.components.header.showSearchResult=function(t){$(".cid-desp-dsk .desp-popup").removeClass("open"),$(".gh-close-modal,.login,.menu-icon").removeClass("open").removeClass("active"),$(".titulo_depar").find("span i").removeClass("up"),$(".section-menu").removeClass("active"),$(".js-mnus-f .-txt").text("MENÚ");var a=$.trim($(this).val().replace(/\'|\"/,"").replace(/("|')/g,""));a=a.replace(/[{}"']/g,"").trim();var e=Promart.components.header.replaceSpecialCharacters(a),o=$(this).val().replace(/\'|\"/,"");if(13==(t.keyCode?t.keyCode:t.which)&&""!=e){var r={textSearchOrigin:a,textSearchConvert:e};sessionStorage.setItem("objectTextSearch",JSON.stringify(r));var s="/busca?ft="+e;location.href=s}o.length>=1?($(".mini-cart").addClass("active"),$(".js-bgModal").addClass("active"),$("header.-hd .h-left").addClass("open"),$("header.-hd .js-minicart-mbl").addClass("active"),$(".tb-cell.-tvam.h-icon").addClass("active"),$(".js-cj-search").addClass("open"),$(".js-txtSearch").css("border","none"),Promart.components.header.searchProd(o)):($(".js-bgModal").removeClass("active"),$(".js-cj-search").removeClass("open"),$("header.-hd .h-left").removeClass("open"),$("header.-hd .js-minicart-mbl").removeClass("active"),$(".tb-cell.-tvam.h-icon").removeClass("active"),$(".js-minicart-mbl.gh-close-modal.home-mbl-only-1126").hide()),$(".js-bgModal").click((function(){$(".icons-buscar").css("color","#989898"),$(".icon-cerrar").hide()})),$(".js-txtSearch").keyup("input",(function(){""!==$(".js-txtSearch").val()?($(".js-txtSearch").css("border","none"),$(".icon-cerrar").css("display","block"),$(".icons-buscar").css("color","#FF6E00")):($(".icons-buscar").css("color","#989898"),$(".icon-cerrar").hide())}))},Promart.components.header.searchProd=function(t){var a=$.trim(t.replace(/\'|\"/,""));if(a.length>1&&Promart.components.header.lastSearch!=a){Promart.components.header.lastSearch=a;a.match(/^[a-n o-záéíóú \-]+$/i);var e="/api/catalog_system/pub/products/search/?sc="+Promart.modules.cookies.sc+"&ft="+encodeURIComponent(a);a&&Promart.modules.utils.delayrd((function(){$.ajax({url:e,type:"GET",beforeSend:function(){$(".js-resultSearch").html("
    ")},success:function(a){if(a.length){$(".js-resultSearch .load_sty1").remove();for(var o="",r="",s=0,i=Promart.components.header.width_actual',o+='',o+='
    ',o+='

    '+u+"

    ",o+="
    ",o+="",Promart.components.header.getSearchFromSeenProds(h)&&s<=3&&(r+='',s++),d

    ",g+=r,g+="

    "):(g+="",g+="Ver todos los resultados"),g+="
    ",$(".js-resultSearch").html('
    '+o+"
    "),$(".js-resultSearch").append(g);var f=[];$(a).each((function(){e=this.categories.length-1,n=this.categories[e],l=n.replace(/\//g,""),-1==$.inArray(n,f)&&(f.push(n),c='Buscar '+$("header .search .wp-inp .js-txtSearch").val()+" en "+l+"",$(".js-resultSearch .js-vertodos").append(c))}))}else{var v=Promart.components.header.getSavedSearchFromStorage(t);v.desktop.length?($(".js-resultSearch").html('
    '+v.desktop+"
    "),$(".js-resultSearch .load_sty1").remove()):($(".resul.js-resultSearch").html(),$(".cj-search.js-cj-search.gh-close-modal").removeClass("open"))}}})}),750)}},Promart.components.header.searchIcons=function(t){$(".js-txtSearch").attr("placeholder","¿Qué estás buscando?"),$(".icon-cerrar").hide(),""!==$(".js-txtSearch").val()&&($(".js-txtSearch").css("border","none"),$(".icon-cerrar").css("display","block"),$(".icons-buscar").css("color","#FF6E00"))},Promart.components.header.buscarPal=function(t){t.preventDefault();var a=$(".js-txtSearch").val();if($.trim(a.replace(/\'|\"/,"")).length>0&&""!==a){var e="/busca?ft="+a;location.href=e,$(".js-txtSearch").css("border","none"),$(".icons-buscar").css("color","#FF6E00")}},Promart.components.header.insertSearchIntoStorage=function(t,a,e,o){var r=JSON.parse(localStorage.getItem("searchStorage"))||[];if(-1==Promart.components.header.verifySearchFromStorage(r,t)){var s=e.replace("https://promart.vteximg.com.br",""),i=t.normalize("NFD").replace(/[\u0300-\u036f]/g,"");r.push({n:i,p:a,i:s,k:o}),r=Promart.components.header.keepSearchLimitStorage(r,160),localStorage.setItem("searchStorage",JSON.stringify(r))}},Promart.components.header.insertHistorialSearchIntoStorage=function(t){t.preventDefault();var a=$(this).attr("href"),e=$(this).data("catid"),o=$(this).find(".productName").text(),r=$(this).find("img").attr("src"),s=JSON.parse(localStorage.getItem("previousSearch"))||[],i=Promart.components.header.verifySearchFromStorage(s,o),n=Promart.modules.utils.getDateTimeForJSON();-1!=i?(s.push(s[i]),s.splice(i,1)):(s.push({n:o,p:a,skuStr:r,catId:e,dt:n}),s=Promart.components.header.keepSearchLimitStorage(s,100)),localStorage.setItem("previousSearch",JSON.stringify(s)),window.location.href=a},Promart.components.header.verifySearchFromStorage=function(t,a){var e=t.length;if(e)for(var o=0;oa&&t.splice(0,1),t},Promart.components.header.getCatFromUserSearch=function(){var t=[],a=JSON.parse(localStorage.getItem("previousSearch"))||[];if(a.length>5)for(var e=a.length,o=0;oe[a]?1:0})):[]},Promart.components.header.getSavedSearchFromStorage=function(t){var a=JSON.parse(localStorage.getItem("searchStorage"))||[],e=a.length,o={desktop:"",mobile:""},r="",s="",i=0;if(e){for(;i',r+='',r+='
    ',r+='

    '+a[i].n+"

    ",r+="
    ",r+="",s+=''+a[i].n+"");o.desktop=r,o.mobile=s}return o},Promart.components.header.getSearchFromSeenProds=function(t){var a=JSON.parse(localStorage.getItem("skusHistorial"))||[],e=a.length;if(e)for(var o=0;o15?a-15:0;if(a){for(var i=a-1;s<=i;i--)o+='',o+='
    ',o+='

    '+t[i].n+"

    ",o+="
    ",r+=''+t[i].n+"";e.desktop=o,e.mobile=r}return e},Promart.components.header.clearHistoryStorage=function(){localStorage.removeItem("previousSearch"),location.reload()},Promart.modules.search.uiBindEvents=function(){$(document).on("keyup",".js-txtSearch",Promart.components.header.showSearchResult).on("focus",".js-txtSearch",Promart.components.header.showPreviousSearch).on("blur",".js-txtSearch",Promart.components.header.clearSearch).on("click",".js-resultSearch a.item",Promart.components.header.insertHistorialSearchIntoStorage).on("click",".search-close",Promart.components.header.closeSearchMobile).on("click",".clean-search",Promart.components.header.searchClean).on("click",".js-buscarProd",Promart.components.header.buscarPal).on("click",".clear-history",Promart.components.header.clearHistoryStorage),Promart.components.header.changeSearch()},Promart.modules.search.init=function(){Promart.modules.search.uiBindEvents(),Promart.components.header.searchIcons()},Promart.modules.servicios={},Promart.modules.servicios.principal=function(){var t=__globalSpreadSheet__.servicios,a=0,e={},o="",r="",s=!1;($.each(t,(function(t,i){Promart.modules.utils.itemVisible(i.gsx$inicio.$t,i.gsx$fin.$t,i.gsx$visible.$t)&&(a+=1,e={sectionTitle:""!=i.gsx$sectiontitle.$t?i.gsx$sectiontitle.$t:"",title:i.gsx$title.$t,description:i.gsx$description.$t,url:i.gsx$url1.$t,textbutton:i.gsx$textbutton.$t,dataName:i.gsx$dataname.$t,dataPosition:i.gsx$dataposition.$t,creativeSlot:i.gsx$creativeslot.$t,promoCategory:i.gsx$promocategory.$t,classIcon:i.gsx$imgdesktop.$t,targetBlank:i.gsx$targetblank.$t?"target='_blank'":"",class:i.gsx$express.$t?"gh-express":""},!s&&e.sectionTitle&&(r+='

    '+e.sectionTitle+"

    ",s=!0),o+=``)})),""!=o)?($(".content-servicios").append('
    '+o+"
    "),$(".content-servicio").prepend(r),a>5&&$(window).width()>768?Promart.modules.utils.carrouselSlick("#servicios-landing",5,!1,!1,8e3,!0,!0,!1,!0,!0,3,!1,"","",1,4):($(".content-servicio").addClass("no-slick"),$(".servicios-destacados .content-servicios .servicio-item-container .servicio-item-detalle h3").each((function(){if($(this).height()<38){var t=$(this).html().split(" ");if(t.length<2)$(this).css("word-break","break-all");else{t[t.length-2]+="
    ";var a=t.join(" ");$(this).html(a)}}})))):$(".servicios-destacados").remove()},Promart.modules.shopTheLook={},Promart.modules.shopTheLook.timer=null,Promart.modules.shopTheLook.items=[],Promart.modules.shopTheLook.principal=async function(){Promart.modules.shopTheLook.uiBindEvents();var t=__globalSpreadSheet__.shopTheLook[0];if(null==__skusSpreadSheet__){const t="undefined"==typeof __homeSpreadSheet__?"10qw1r_pVhfJNjVKTFdaEW4j8eBvgY_0IpCGjrKSK3RE":__homeSpreadSheet__;var a=await Promart.modules.utils.getSheetV4(t,"SKUS","AIzaSyDzy902vOqhKk4buuwZO4mc0coD2M3jpA0");__skusSpreadSheet__=Promart.modules.utils.reduceFormatSheet(a,"SECCION",0)}var e=__skusSpreadSheet__.shopTheLook,o="",r="",s=!1;if(Promart.modules.utils.itemVisible(t.gsx$inicio.$t,t.gsx$fin.$t,t.gsx$visible.$t))var i={imgdesktop:t.gsx$imgdesktop.$t,imgmobile:t.gsx$imgmobile.$t,alt:t.gsx$alt.$t,url:t.gsx$url1.$t,dataName:t.gsx$dataname.$t,dataPosition:t.gsx$dataposition.$t,dataCreativeSlot:t.gsx$creativeslot.$t,dataPromoCategory:t.gsx$promocategory.$t,targetBlank:t.gsx$targetblank.$t?"target='_blank'":"",textButton:t.gsx$textbutton.$t},n=`${i.alt}\n `;var l=$(".shop-the-look");l.addClass("gh-gtm-impression"),l.attr("data-list","Home_Espacios-unicos-STL"),$(".shop-the-look__comp").addClass("js-products-generico"),$(".shop-the-look__visual").addClass("js-prod"),$(".shop-the-look__visual").append(n),window.innerWidth<768&&(s=!0),$.each(e,(function(t,a){if(Promart.modules.utils.itemVisible(a.gsx$inicio.$t,a.gsx$fin.$t,a.gsx$visible.$t)){var e={sku:a.gsx$sku.$t,productId:a.gsx$sku.$t,productName:a.gsx$nombre.$t,brand:a.gsx$marca.$t,imageUrl:a.gsx$urlimagen.$t,images:a.gsx$imagehover.$t,bgimagen:a.gsx$bgimagen.$t,link:a.gsx$urlproducto.$t,bestPrice:a.gsx$precio.$t,listPrice:a.gsx$preciolista.$t,tohPrice:a.gsx$preciotoh.$t,tohPay:a.gsx$preciotohpay.$t,tAgoraClub:a.gsx$precioagoraclub.$t,m2:a.gsx$metro2.$t,tag:a.gsx$tag.$t,dataName:a.gsx$dataname.$t,dataPosition:a.gsx$dataposition.$t,dataCreative:a.gsx$datacreative.$t,dataCreativeSlot:a.gsx$creativeslot.$t,dataPromoCategory:a.gsx$promocategory.$t,dataCategories:a.gsx$datacategories.$t,posx:a.gsx$posx.$t,posy:a.gsx$posy.$t,seller:a.gsx$seller.$t};o+=Promart.modules.card.templateSheet(e),Promart.modules.shopTheLook.items.push({id:e.sku,productId:e.sku,quantity:"1",seller:e.seller});const t=e.tohPay>0?e.tohPay:e.tohPrice>0?e.tohPrice:0,i=`
    \n
    \n ${e.listPrice>0?Promart.modules.utils.formatMonedaHtml(e.listPrice):""}\n
    \n
    \n ${Promart.modules.utils.formatMonedaHtml(e.bestPrice)}\n
    \n ${t>0?`
    \n ${Promart.modules.utils.formatMonedaHtml(t)}\n \n
    `:""}\n
    `;r+=` `}})),$(".shop-the-look__products").append(o),$(".shop-the-look__visual").append(r),Promart.modules.shopTheLook.observer.observe($(".shop-the-look__visual")[0])},Promart.modules.shopTheLook.closeTooltips=function(t){$(".shop-the-look__tooltip__product").removeClass("active"),$(".shop-the-look__tooltip").removeClass("active")},Promart.modules.shopTheLook.clickTooltip=function(t){var a=$(t.target).closest(".shop-the-look__div").data("id");if($(".stl-prod-"+a).hasClass("active"))return clearTimeout(Promart.modules.shopTheLook.timer),$(".stl-prod-"+a).removeClass("active"),$(".stl-prod-tooltip-"+a).removeClass("active"),void $(`.shop-the-look__div[data-id=${a}]`).removeClass("active");clearTimeout(Promart.modules.shopTheLook.timer),$(".shop-the-look__tooltip__product").removeClass("active"),$(".shop-the-look__tooltip").removeClass("active"),$(".stl-prod-tooltip-"+a).toggleClass("active"),$(".stl-prod-"+a).toggleClass("active"),$(`.shop-the-look__div[data-id=${a}]`).addClass("active"),$(".stl-prod-"+a).hasClass("active")&&(Promart.modules.shopTheLook.timer=setTimeout((function(){$(".stl-prod-"+a).removeClass("active"),$(".stl-prod-tooltip-"+a).removeClass("active"),$(`.shop-the-look__div[data-id=${a}]`).removeClass("active")}),2e4))},Promart.modules.shopTheLook.addAllProducts=function(t){t.preventDefault(),Promart.modules.shopTheLook.items.length&&(Promart.components.header.cookieCity()?Promart.modules.minicart.addCartData(Promart.modules.shopTheLook.items,Promart.data.sc,[],!0,""):Promart.modules.minicart.setCartData(Promart.data.sc,Promart.modules.shopTheLook.items,[],!0,""))},Promart.modules.shopTheLook.maintainTooltip=function(t){var a=$(t.target),e=a.closest(".shop-the-look__div").data("id");clearTimeout(Promart.modules.shopTheLook.timer),$(".stl-prod-tooltip-"+e).addClass("active"),$(".stl-prod-"+e).addClass("active"),$(`.shop-the-look__div[data-id=${e}]`).addClass("active"),a.addClass("active")},Promart.modules.shopTheLook.removeTooltip=function(t){var a=$(t.target).closest(".shop-the-look__div").data("id");Promart.modules.shopTheLook.timer=setTimeout((function(){$(".stl-prod-"+a).removeClass("active"),$(".stl-prod-tooltip-"+a).removeClass("active"),$(`.shop-the-look__div[data-id=${a}]`).removeClass("active")}),2e4)},Promart.modules.shopTheLook.uiBindEvents=function(){$(document).on("click",".js-shop-the-look-tooltip",Promart.modules.shopTheLook.clickTooltip),$(document).on("click",".js-close-stl-tooltips",Promart.modules.shopTheLook.closeTooltips),$(document).on("click",".js-stl-add-all-products",Promart.modules.shopTheLook.addAllProducts),$(document).on("click",".js-stl-add-all-products",Promart.modules.gtm.addProductCartVentaProyecto),$(document).on("mouseenter",".shop-the-look__tooltip__product",Promart.modules.shopTheLook.maintainTooltip),$(document).on("mouseleave",".shop-the-look__tooltip__product",Promart.modules.shopTheLook.removeTooltip),setTimeout((function(){Promart.modules.shopTheLook.updateTooltipPositions()}),3e3)},Promart.modules.shopTheLook.adjustTooltipsPosition=function(t,a){var e=375*parseInt(t)/100,o=429*parseInt(a)/100;return{top:e=e+63+30>375?-68:30,left:o=o+249>429?429-(o+249)-10:0}},Promart.modules.shopTheLook.updateTooltipPositions=function(){$(".shop-the-look__tooltip__product").each((function(){var t=$(this).closest(".shop-the-look__visual").children(".shop-the-look__img"),a=t.width(),e=t.height(),o=$(this).closest(".shop-the-look__div").position().top,r=$(this).closest(".shop-the-look__div").position().left;r=r+249>a?a-(r+249)-10:0,o=o+63+35>e?-68:35,$(this).css({top:o,left:r})}))},Promart.modules.shopTheLook.observer=new IntersectionObserver((t,a)=>{t.forEach(t=>{t.isIntersecting&&($(".shop-the-look__tooltip").addClass("hover"),setTimeout((function(){$(".shop-the-look__tooltip").removeClass("hover")}),2e3),a.disconnect())})},{root:null,rootMargin:"0px",threshold:.3}),Promart.modules.smartHistorial={},Promart.modules.smartHistorial.shelfTemplate="3dfc2a1e-3b52-4d11-9dbd-48bf2b008386",Promart.modules.smartHistorial.shelfFilter="OrderByTopSaleDESC",Promart.modules.smartHistorial.sc=Promart.modules.cookies.getCookie("VTEXSC")?Promart.modules.cookies.getCookie("VTEXSC").split("sc=")[1]:2,Promart.modules.smartHistorial.shelfAmount=15,Promart.modules.smartHistorial.extraCardsHTML=[],Promart.modules.smartHistorial.requestPending=!1,Promart.modules.smartHistorial.principal=function(){Promart.modules.smartHistorial.sliderProductos()},Promart.modules.smartHistorial.sliderProductos=async function(){await Promart.modules.product.jsonTagsPromart(),Promart.modules.smartHistorial.buildLoadingCards($(".carrousel-products-seen .carrousel-products"));var t=$(".carrousel-products-seen[data-execfn='smartHistorial']"),a=t.find(".carrousel-products"),e=Promart.modules.historial.getSkuHistorial(28),o=Promart.modules.utils.getLocalStorage("categoryHistorial"),r=e.order.length,s=o.length;if(r||s){var i=[...new Set(o.map(t=>t.catID))].reverse().slice(0,3);Promise.all([Promart.modules.smartHistorial.createCategories(i,r),Promart.modules.smartHistorial.createSkusAjax(e)]).then((function(o){var s=o[0],i=o[1];if(s&&i&&s){if(r){var n=Promart.modules.smartHistorial.arrangeArray(i,e.order);Promart.modules.smartHistorial.extraCardsHTML.push(n.slice(15,n.length));var l=Promart.modules.smartHistorial.convertArrayToStr(n,15);a.append("
    "+l+"
    "),Promart.modules.smartHistorial.extraCardsHTML.push(s)}if(!r){Promart.modules.smartHistorial.extraCardsHTML.push(s.slice(15,s.length));l=Promart.modules.smartHistorial.convertArrayToStr(s,15);a.append("
    "+l+"
    ")}var c=Promart.modules.smartHistorial.extraCardsHTML;c=Promart.modules.smartHistorial.createSingleArrayV2(c),Promart.modules.smartHistorial.extraCardsHTML=c,Promart.modules.smartHistorial.autoCompleteSlider(a),Promart.modules.smartHistorial.carruselProducts(a),t.find(".carrousel-products .js-loading").remove()}else t.hide()}))}else t.hide()},Promart.modules.smartHistorial.arrangeArray=function(t,a){var e=[];return a.forEach((function(a){a.split("&").forEach((function(a){for(var o=t.length,r=0;r\n
  • \n
    \n
    \n
  • \n ');var a=$(t).find(".js-loading");if(a.length){for(var e=a.find("li.temp"),o=$(window).width()>768?4:3,r=0,s="";r1?Promart.modules.smartHistorial.shelfAmount-1:1)).then((function(t){a(t.map(t=>Promart.modules.card.templateShelve(t)))}))}))},Promart.modules.smartHistorial.createCategories=function(t,a){return Promart.modules.smartHistorial.shelfAmount=Math.ceil((Promart.modules.smartHistorial.shelfAmount-a)/(t.length>0?t.length:1)),Promise.all(t.map((function(t){return Promart.modules.smartHistorial.createCategory(t)}))).then((function(a){var e={},o=[];a.forEach((function(a,o){e[t[o]]={products:a,order:o}}));let r=Math.max(...a.map(t=>t.length));for(let t=0;t{o.push(Promart.modules.card.templateShelve(t))})}return o},Promart.modules.smartHistorial.convertArrayToStr=function(t,a=null){for(var e="",o=null==a?t.length:a,r=0;r div").append(n)}else o+s==0&&t.hide(),e=!e},Promart.modules.smartHistorial.carruselProducts=function(t){var a=$(t).find(".js-prod > div"),e=a.find(".product").length;$(window).width()>768&&Promart.modules.utils.carrouselSlick(a,5,!1,!0,8e3,!0,!1,e>5,!0,!1,3,!1)},Promart.modules.smartHistorial.shuffleArrayV2=function(t){for(let a=t.length-1;a>0;a--){const e=Math.floor(Math.random()*(a+1));[t[a],t[e]]=[t[e],t[a]]}return t},Promart.modules.smartHistorial.createSingleArrayV2=function(t){for(var a=[],e=0;ePromart.modules.card.templateShelve(t)).join("")+"
    ";t.find(".js-loading").remove(),t.append(e),$(window).width()>768&&Promart.modules.utils.carrouselSlick(t.find(".js-prod > div"),5,!1,!0,8e3,!0,!1,!0,!0,!1,3,!1)}else t.closest(".cnt-slider-prod").hide()})))},Promart.modules.smartHistorial.saveAccesoriesSku=function(t){setTimeout((function(){var a="/api/catalog_system/pub/products/crossselling/accessories/"+t,e=Promart.modules.utils.getLocalStorage("accessoriesSku"),o={id:t,skus:[]},r=0,s=Promart.modules.utils.getIndexOfItemInLocalData(t,"id",e);if(-1==s)$.get(a).then((function(t){t.length&&(t.forEach((function(t){r<9&&o.skus.push(t.productId),r++})),e.push(o),Promart.modules.utils.setLocalStorage("accessoriesSku",e)),Promart.modules.smartHistorial.clearSkusAccesories()}));else{var i=e[s];e.splice(s,1),e.push(i),Promart.modules.utils.setLocalStorage("accessoriesSku",e)}}),5)},Promart.modules.smartHistorial.removeAccesoriesSku=function(t){setTimeout((function(){var a=Promart.modules.utils.getLocalStorage("accessoriesSku").filter((function(a){if(a.id!=t)return a}));Promart.modules.utils.setLocalStorage("accessoriesSku",a),Promart.modules.smartHistorial.clearSkusAccesories()}),5)},Promart.modules.smartHistorial.clearSkusAccesories=function(){setTimeout((function(){var t=vtexjs.checkout.orderForm;if(t){var a=t.items;if(a.length){var e=Promart.modules.utils.getLocalStorage("accessoriesSku").filter((function(t){for(var e=0;e\n \n
    \n
    \n
    \n

    ${o.title}

    \n ${"VERDADERO"==t.gsx$contador.$t||"TRUE"==t.gsx$contador.$t?'\n
    \n
    \n
    Cargando...
    \n
    \n
    \n
    0
    \n
    0
    \n
    \n
    :
    \n
    \n
    0
    \n
    0
    \n
    \n
    :
    \n
    \n
    0
    \n
    0
    \n
    \n
    \n
    \n
    ':""}\n ${o.buttonTitle}\n\n
    \n \n
    \n
    \n ${e}\n
    \n
    \n
    `;$(".cont-productos").append(r),Promart.modules.soloPorHoy.timer(o.time)}})):$(".cont-productos").remove())}else setTimeout(()=>{$('.cont-productos[data-execfn="soloPorHoy"]').addClass("in-viewport")},100)},Promart.modules.soloPorHoy.timer=function(t){var a=t,e=a.split(" ")[1],o=a.split(" ")[0],r=o.split("-")[0],s=o.split("-")[1],i=o.split("-")[2];"function"==typeof $(".js-cont-timer").countdown&&($(".js-cont-timer").countdown(i+"/"+s+"/"+r+" "+e).on("update.countdown",(function(t){var a=t.offset.seconds,e=t.offset.minutes,o=t.offset.hours;function r(t){return t%10}function s(t){return(t-t%10)/10}$(this).html(t.strftime(`
    \n
    ${s(o)}${r(o)}
    \n
    \n
    :
    \n
    \n
    ${s(e)}${r(e)}
    \n
    \n
    :
    \n
    \n
    ${s(a)}${r(a)}
    \n
    `))})).on("finish.countdown",(function(t){$(".cont-productos").remove()})),$(".js-cont-timer").removeClass("active"),$(".js-loadtimer").addClass("active"))},Promart.modules.sugeridos={},Promart.modules.sugeridos.areaProducto=null,Promart.modules.sugeridos.qtyProducto=1,Promart.modules.sugeridos.cnsProd=function(t,a){$(a).removeClass("gh-preload");var e="";let o="";$.each(t,(function(a,r){Promart.pages.ficha.prodId!=r.productId&&(Promart.data.products[r.productId]=r,e+=(a>0?"&":"")+"fq=productId:"+r.productId,o+=Promart.modules.card.templateShelve(t[a]))})),Promart.modules.sugeridos.productLoadDataSimilares(e,a,o)},Promart.modules.sugeridos.productLoadDataSimilares=async function(t,a,e,o=!1){if(""!=t){if(o&&"js-sugeridos"===a){const e=$(".ficha-bread-crumb .bread-crumb li.last a").first().attr("href");$(".ver-"+a).attr("href",e||"/busca?"+t)}else $(".ver-"+a).attr("href","/busca?"+t);$("."+a).removeClass("gh-preload"),$("."+a).find(".js-loading").remove(),$("."+a+" .slider-products-home").append("
    "+e+"
    ");let r=$("."+a).find(".carrousel-products");$(window).width()>768&&Promart.modules.utils.carrouselSlick(r.find(".js-prod > div"),5,!1,!0,8e3,!0,!1,!0,!0,!1,3,!1)}},Promart.modules.sugeridos.productosCompletaTuCompra=async function(){const t=Promart.pages.ficha.seller,a="js-completa-tu-compra";if("1"!==t){var e=Promart.data.products[Promart.pages.ficha.prodSku].categoriesIds[0].split("/")[3];const r=await Promart.modules.sugeridos.jsonCrossMarketplaceSubCategorias(),s=r.sellers,i=r.listing;if(void 0!==i.find(t=>t.idSubCategory==e)){let r=!1;s.map(t=>t.name).includes(t)&&(r=!0);let n=await Promart.modules.sugeridos.recorrerComplementario(i,e,t,r);if(""!=n.htmls){if($("."+a).find(".js-loading").remove(),$(".ver-js-completa_tu-compra").attr("href","/busca?"+n.link),Promart.pages.ficha.carruselCompletaTuCompra=n.link,$("."+a).show(),$("."+a).find(".js-prod > div").length>0)return void $("."+a).find(".js-loading").remove();$("."+a).show();var o=$("."+a).find(".carrousel-products");o.append("
    "+n.htmls+"
    "),$("."+a).find(".js-loading").remove(),$(window).width()>768&&Promart.modules.utils.carrouselSlick(o.find(".js-prod > div"),5,!1,!0,8e3,!0,!1,!0,!0,!1,3,!1)}else Promart.modules.sugeridos.ocultarCarrusel(a)}else Promart.modules.sugeridos.ocultarCarrusel(a)}else Promart.modules.sugeridos.ocultarCarrusel(a)},Promart.modules.sugeridos.ocultarCarrusel=function(t){$("."+t).remove()},Promart.modules.sugeridos.recorrerComplementario=async function(t,a,e,o){const r=t.find(t=>t.idSubCategory==a);if(void 0!==r){const t=r.complementary;return await Promart.modules.sugeridos.recorrerProductos(t,e,o)}return{htmls:"",link:""}},Promart.modules.sugeridos.recorrerProductos=async function(t,a,e){let o="",r="";for(let s=0;s0)for(let a=0;a0){const t=await JSON.parse(o[0].data);return sessionStorage.setItem("jsonCrossMarketplaceSubcategorias2",JSON.stringify(t)),t}}catch(a){throw console.error("Error al consultar json Cross marketplace:",a),a}},Promart.modules.sugeridos.dataAttributesButtonsCarrousel=function(){$("body.produto .js-carrousel-products-seen-home button.slick-prev").attr("data-link_category","UI :: Producto").attr("data-link_action","Cross-selling :: Lo ultimo que viste").attr("data-link_label","Previo"),$("body.produto .js-carrousel-products-seen-home button.slick-next").attr("data-link_category","UI :: Producto").attr("data-link_action","Cross-selling :: Lo ultimo que viste").attr("data-link_label","Siguiente"),$(".js-sugeridos button.slick-prev").attr("data-link_category","UI :: Producto").attr("data-link_action","Cross-selling :: Similares").attr("data-link_label","Previo"),$(".js-sugeridos button.slick-next").attr("data-link_category","UI :: Producto").attr("data-link_action","Cross-selling :: Similares").attr("data-link_label","Siguiente"),$(".js-interesar button.slick-prev").attr("data-link_category","UI :: Producto").attr("data-link_action","Cross-selling :: Proyecto soft").attr("data-link_label","Previo"),$(".js-interesar button.slick-next").attr("data-link_category","UI :: Producto").attr("data-link_action","Cross-selling :: Proyecto soft").attr("data-link_label","Siguiente")},Promart.modules.sugeridos.sliderProductosSugeridos=function(t,a){return $productosSugeridos=$("."+t+" .slider-products-home"),!!$productosSugeridos.find("ul li").length&&($productosSugeridos.removeClass("gh-preload"),Promart.modules.prices.listPrices("."+t+" .slider-products-home",a).then((function(){$("."+t+" .slider-products-home").find('.product[data-availablequantity="0"]').closest("li").remove(),$("."+t+" .slider-products-home").find(".product").length>0?$(window).width()>768&&(Promart.modules.utils.carrouselSlick($("."+t+" .slider-products-home .js-prod > ul"),5,!1,!0,8e3,!0,!1,!0,!0,!1,3,!1),Promart.modules.sugeridos.dataAttributesButtonsCarrousel()):$("."+t).remove()})),!0)},Promart.modules.sugeridos.productosInteresar=async function(){var t="/api/catalog_system/pub/products/crossselling/similars/"+Promart.pages.ficha.prodId+"?sc="+Promart.data.sc,a=await Promart.modules.utils.request(t);void 0!==a&&a.length>0?Promart.modules.sugeridos.cnsProd(a,"js-interesar"):$(".js-interesar").remove()},Promart.modules.sugeridos.productosAccesorios=async function(){if(1==Promart.pages.ficha.seller){var t="/api/catalog_system/pub/products/crossselling/accessories/"+Promart.pages.ficha.prodId+"?sc="+Promart.data.sc,a=await Promart.modules.utils.request(t);void 0!==a&&a.length>0?(Promart.modules.sugeridos.cnsProd(a,"js-complementarios"),$(window).width()<=768&&$(".slider-products-home").removeClass("gh-internas")):$(".js-complementarios").remove()}else $(".js-complementarios").remove()},Promart.modules.sugeridos.dataProyectoAPP=async function(t){let a="";var e=[];let o=0;for(let r=0;r0){if(i.subtype=t[r].descripcion,i.priority=t[r].skus[a].prioridad,e.push(i),/fragua/i.test(i.productName)&&o++,o>=3)break;if(!/fragua/i.test(i.productName))break}}o=0}return e},Promart.modules.sugeridos.productosVentaProyecto=async function(){var t=Promart.pages.ficha.prodSku;if($(".ficha-seller.product").find('.flag[class*="solotiendacorte"]').length<=0){var a,e="";const r=Promart.data.products[Promart.pages.ficha.prodSku].categories[0].split("/")[3],s={url:"https://prod-hpbi-vproy-crun-usct1-prom61-zyjfop5eca-uc.a.run.app/venta_proyecto/sku?skus="+t,method:"GET",headers:{"x-token":"appkey-promart-prod-XL3X1z"}},i=await Promart.modules.utils.promesa(s);if(i&&i.length>0){var o=i[0].flagEstado;Promart.pages.ficha.isCarruselVentaProyectoPiso="1"===o}else Promart.pages.ficha.isCarruselVentaProyectoPiso=!1;if(622==vtxctx.categoryId||814==vtxctx.categoryId){$(".js-proyecto-tecnico").attr("data-list","Producto_Proyecto-tecnico-Cat_"+r);const t="/api/catalog_system/pub/products/crossselling/suggestions/"+Promart.pages.ficha.prodId+"?sc="+Promart.data.sc;a=await Promart.modules.utils.promesa(t)}else if(i.length){const t=i[0].items.sort((t,a)=>t.prioridadLinea-a.prioridadLinea);a=await Promart.modules.sugeridos.dataProyectoAPP(t),e="-v2",$(".js-proyecto-tecnico").attr("data-list","Producto_Proyecto-tecnico-v2-Cat_"+r)}else{$(".js-proyecto-tecnico").attr("data-list","Producto_Proyecto-tecnico-Cat_"+r);const t="/api/catalog_system/pub/products/crossselling/suggestions/"+Promart.pages.ficha.prodId+"?sc="+Promart.data.sc;a=await Promart.modules.utils.promesa(t)}Promart.pages.ficha.carruselVentaProyecto=a}Promart.modules.sugeridos.sliderProductoProyecto(a,e)},Promart.modules.sugeridos.sliderProductoProyecto=function(t,a){Promart.pages.ficha.proyPrice=0,Promart.pages.ficha.proyPriceTOH=0,Promart.pages.ficha.proyAvailable=0,Promart.pages.ficha.carruselVentaProyecto="";var e=[];if(e[0]=Promart.data.products[Promart.pages.ficha.prodSku],void 0!==t&&t.length>0&&void 0===Promart.pages.ficha.ml){var o=Promart.modules.sugeridos.onlyInstallationProducts(t);let r=skuJson.available;if($(".ficha-venta-proyecto").removeClass("gh-preload"),o)return void Promart.modules.sugeridos.buildInstallationProject(t);$(".ficha-venta-proyecto").append('
    '),$(".ficha-proyecto-inner").after(""+(o?"":'Ver más ')),$(".ficha-proyecto-inner").append(`
    \n

    ${o?"¡Completa tu proyecto de instalación! ":"¡Completa tu compra!"}

    \n
    \n
    `);const s=$(window).width()>768?4:3;$(".ficha-proyecto-cnt").append(`\n
    \n ${Promart.modules.sugeridos.htmlItem(t.slice(0,s),!1)}\n
    \n `),t.length>3&&$(window).width()>1024?$("#ficha-proy-slide").slick({autoplay:!1,autoplaySpeed:5e3,dots:!0,arrows:!0,infinite:!1,slidesToShow:3,slidesToScroll:3,responsive:[{breakpoint:1127,settings:{infinite:!1,slidesToShow:1,slidesToScroll:1,arrows:!1,dots:!0}}]}):$(".ficha-venta-proyecto").find(".ficha-proy-item").addClass("slick-active"),!r&&$("#ficha-proy-slide").addClass("nomargin-arrows"),$(".inner-fichaproduct").append('

    ¡Completa tu compra!

    '),$(".ficha-venta-proyecto.listado .ficha-proyecto-cnt").append("
    "+Promart.modules.sugeridos.htmlItem(e,!0,!0)+'
    '+Promart.modules.sugeridos.htmlItem(t,!0)),Promart.pages.ficha.proyPrice=Promart.pages.ficha.proyPrice/2,Promart.pages.ficha.proyPriceTOH=Promart.pages.ficha.proyPriceTOH/2,$(".ficha-venta-proyecto.listado .ficha-proyecto-inner").append('
    Precio total

    '+Promart.modules.utils.formatMoneda(Promart.pages.ficha.proyPrice)+'

    '),Promart.pages.ficha.proyPriceTOH0){Promart.modules.sugeridos.areaProducto=void 0!==r.mc&&""!==r.mc?r.mc:Promart.modules.sugeridos.areaProducto,void 0===r.mc&&Promart.modules.sugeridos.areaProducto&&(i=Promart.modules.sugeridos.calcularQty(t[n]));var l=r.listPrice>r.price,c=void 0!==r.priceTOH,d="";a&&("j",d='',e||(Promart.pages.ficha.carruselVentaProyecto+="&fq=productId:"+t[n].productId)),(0==Promart.pages.ficha.proyAvailable||r.availableQuantity\n \n
    \n ${t[n].productName}\n
    \n
    \n \n
    \n ${t[n].productName}\n
    \n
    \n ${d}\n
    \n \n
    \n ${r.price>0?"

    P. Oferta:

    S/ "+Promart.modules.utils.formatPrice(i*r.price,",",".")+"

    ":""}\n
    \n
    \n ${c?'

    P. Tarjeta

    S/'+Promart.modules.utils.formatPrice(i*r.priceTOH,",",".")+'

    ':""}\n
    \n
    \n
    \n
    \n \n \n \n
    \n \n \n \n
    `,o+=" \n \n
    ",Promart.pages.ficha.proyPrice+=r.price,Promart.pages.ficha.proyPriceTOH+=c?Number(r.priceTOH):r.price}return o},Promart.modules.sugeridos.toogleDetailProyecto=function(t){t.preventDefault();var a=$(this).closest(".ficha-proy-item");$(this).hasClass("active")?($(this).removeClass("active"),a.find(".ficha-proy-detail").stop().slideUp()):($(this).addClass("active"),a.find(".ficha-proy-detail").stop().slideDown())},Promart.modules.sugeridos.detailProyectoListado=function(t){t.preventDefault(),$("body").addClass("g-pop"),$("body").attr("style","overflow:hidden;"),$(".js-bgModal").addClass("active"),$(".ficha-venta-proyecto.listado").addClass("active"),setTimeout(()=>{Promart.modules.gtm.productArrayCarrouselScroll($(".gh-gtm-impression.ficha-venta-proyecto.listado"),".ficha-proyecto-cnt .ficha-proy-item"),$(document).find(".gh-gtm-impression.ficha-venta-proyecto.listado .ficha-proyecto-inner").on("scroll",(function(){setTimeout(()=>{Promart.modules.gtm.productArrayCarrouselScroll(".gh-gtm-impression.ficha-venta-proyecto.listado",".ficha-proy-item")},100)}))},500)},Promart.modules.sugeridos.updateTotalProyecto=function(t){var a=t.data("best-price"),e=t.data("pricetoh");e=void 0!==e?Number(e):a,t.find(".ficha-check input").is(":checked")?(Promart.pages.ficha.proyPrice+=a,Promart.pages.ficha.proyPriceTOH+=e):(Promart.pages.ficha.proyPrice-=a,Promart.pages.ficha.proyPriceTOH-=e);var o=Promart.pages.ficha.proyPrice.toFixed(2),r=Promart.pages.ficha.proyPriceTOH.toFixed(2);$(".js-proy-sub-price-oh").html(Promart.modules.utils.formatMoneda(r)),$(".js-proy-sub-price").html(Promart.modules.utils.formatMoneda(o)),0==o?$(".ficha-proy-resumen").hide():$(".ficha-proy-resumen").show(),r1?Promart.modules.sugeridos.qtyProducto+" Cajas":Promart.modules.sugeridos.qtyProducto+" Caja");var a=$(".js-cantProdFichaMC").val();$(".ficha-proy-info .js-cantProdFicha").text(a),$(".ficha-proyecto-product-main .ficha-proy-item").find(".ficha-proy-cant").html(""+Promart.modules.sugeridos.qtyProducto),$(".ficha-proy-info .controllers-seller-cnt .input_cant").val(Promart.modules.sugeridos.qtyProducto),$(".ficha-proy-item ").each((function(t,a){var e=$(a);if(!e.parent().hasClass("ficha-proyecto-product-main")){var o=Promart.modules.sugeridos.calcularQty(e.data("name"));e.find(".ficha-proy-cant").text(o)}}))}},Promart.modules.sugeridos.buildInstallationProject=function(t){var a=[];a[0]=Promart.data.products[Promart.pages.ficha.prodSku];var e=Promart.modules.prices.typePromo(a[0]);Promart.modules.sugeridos.areaProducto=void 0!==e.mc?e.mc:Promart.modules.sugeridos.areaProducto,$(".ficha-venta-proyecto").addClass("ficha-venta-proyecto--installation"),$(".ficha-venta-proyecto").append('
    '),$(".ficha-proyecto-inner").append("
    \n

    ¡Agrega el proyecto completo con un click!

    \n

    Estos son los complementos y cantidades que necesitarás para instalar este producto.

    \n
    \n
    \n
    ");const o=t.filter(t=>/pegamento/i.test(t.productName)),r=t.filter(t=>/fragua/i.test(t.productName)),s=t.filter(t=>/rodotop/i.test(t.productName)||/cruceta/i.test(t.productName));r.sort((t,a)=>t.items[0].sellers[0].commertialOffer.ListPrice-a.items[0].sellers[0].commertialOffer.ListPrice);parseFloat(Promart.modules.sugeridos.areaProducto).toFixed(2);const i=`
    \n ${Promart.modules.sugeridos.htmlItemProject(r,!1)}\n
    \n
    \n
    \n \n \n
    \n
    \n

    No deseo fragua

    \n
    \n
    `;$(".ficha-proyecto-cnt").append(`
    \n
    \n ${Promart.modules.sugeridos.htmlItemProject(a,!1,!0)} \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n ${Promart.modules.sugeridos.htmlItemProject(o,!1)}\n
    \n
    \n ${i}\n
    \n
    \n ${Promart.modules.sugeridos.htmlItemProject(s,!1)}\n
    \n
    `),$(".ficha-proyecto-cnt").append('
    \n '),Promart.modules.sugeridos.calculateSubTotal()},Promart.modules.sugeridos.calculateSubTotal=function(){var t=0,a=0;$(".ficha-proyecto-content .ficha-proy-item").each((function(e,o){var r=$(o),s=r.data("best-price"),i=r.data("pricetoh"),n=r.find(".ficha-proy-cant").text();i=void 0!==i?Number(i):s,r.find(".ficha-check input").is(":checked")&&(t+=s*parseInt(n),a+=i*parseInt(n))}));var e=Promart.modules.utils.formatMoneda(t),o=Promart.modules.utils.formatMoneda(a),r=e.split(".")[1],s=e.split(".")[0],i=o.split(".")[1],n=o.split(".")[0];$(".ficha-proy-footer .ficha-proy-subtotal .ficha-proy-price").html(`\n ${s}\n ${r?"."+r:""}`),$(".ficha-proy-footer .ficha-proy-subtotal .ficha-price-toh").html(`\n \n ${n}\n ${i?"."+i:""}`)},Promart.modules.sugeridos.htmlItemProject=function(t,a,e=!1){var o="",r="",s=$(".ficha-seller .js-tooltip_mc").find(".cant_caja").text();Promart.modules.sugeridos.qtyProducto=parseInt(s.match(/\d+/));return t.map((function(t,s){if(void 0!==(r=Promart.modules.prices.typePromo(t))&&r.availableQuantity>0){void 0!==r.mc&&""!==r.mc&&(Promart.modules.sugeridos.areaProducto=r.mc);var i=/fragua/i.test(t.productName),n=!0,l=r.listPrice>r.price,c=void 0!==r.priceTOH,d="",p="";a&&(el="j",p='',d=``),(0==Promart.pages.ficha.proyAvailable||r.availableQuantity\n
    \n ${i?``:`0?"checked='checked'":""} id="i-${r.sku}" class="ficha-proy-add__input--checkbox">`} \n \n
    \n
    `;o+=`
    \n ${m}\n \n
    \n ${t.productName}\n
    \n
    \n 1\n
    \n
    \n ${e?"
    ":""}\n \n
    \n ${t.productName}\n
    \n
    \n ${e?"":p}\n
    \n \n
    \n ${r.price>0?"S/ "+Promart.modules.utils.formatPrice(1*r.price,",","."):""}\n
    \n
    \n ${c?"S/ "+Promart.modules.utils.formatPrice(1*r.priceTOH,",",".")+'':""}\n
    \n
    \n ${e?"
    ":""}\n ${d}\n
    `,n&&(n=!1),Promart.pages.ficha.proyPrice+=r.price,Promart.pages.ficha.proyPriceTOH+=c?Number(r.priceTOH):r.price}})),o},Promart.modules.tpt={},Promart.modules.tpt.uiBindEvents=function(){$(document).on("click",".js-popup-video",Promart.modules.tpt.openVideo),$(document).on("click",".js-popup-video-v2",Promart.modules.tpt.openVideoHtml5),$(document).on("click",".js-close-iframe",Promart.modules.tpt.closeVideo)},Promart.modules.tpt.objectData=function(t){var a=!!t.gsx$videodesktop.$t.length,e=$(window).width()>640?t.gsx$videodesktop.$t:""!=t.gsx$videomobile.$t?t.gsx$videomobile.$t:"";return{title:t.gsx$title.$t,contenido:t.gsx$description.$t,imgDesktop:t.gsx$imgdesktop.$t,alt:t.gsx$alt.$t,url:t.gsx$url1.$t,button:t.gsx$textbutton.$t,idVideo:e,video:a,videoButton:t.gsx$videobutton.$t,videoSku:t.gsx$videosku.$t,videoUrl:t["gsx$videourl button"].$t,dataName:t.gsx$dataname.$t,dataPosition:t.gsx$dataposition.$t,dataIndex:t.gsx$dataindex.$t}},Promart.modules.tpt.loadIframeYoutube=function(t,a,e){var o,r;(Promart.modules.tpt.IframeVideo=void 0,void 0===Promart.modules.tpt.IframeVideo)?(Promart.components.header.width_actual<=Promart.components.header.mobile?(o=screen.width,r=Math.round(r/16*9)):(o="100%",r=329),Promart.modules.tpt.IframeVideo=new YT.Player(a,{height:r,width:o,videoId:t,playerVars:{autoplay:e}})):(Promart.modules.tpt.IframeVideo.stopVideo(),Promart.modules.tpt.IframeVideo.playVideo())},Promart.modules.tpt.openVideo=function(){$("#iframe-video").length||$(".content-popup-home").prepend("
    "),$(".product-iframe").remove(),$(".button-iframe").remove();var t=$(this).data("id-video"),a=$(this).data("sku"),e=$(this).data("url-video"),o=$(this).data("text-button"),r=""!=a&&void 0!==a;""!=a&&void 0!==a?(Promart.modules.tpt.getSkuIframe(a,o,r),$("#iframe-video-home").removeClass("v2")):(Promart.modules.tpt.getButtonDefault(e,o,r),$("#iframe-video-home").addClass("v2")),$("#iframe-video-home").addClass("active"),Promart.modules.tpt.loadIframeYoutube(t,"iframe-video",!0)},Promart.modules.tpt.openVideoHtml5=function(){$("#iframe-video").length||$(".content-popup-home").prepend("
    ");var t=$(this).data("id-video");$("#iframe-video-home").addClass("active"),$("#iframe-video").addClass("video-terraza");var a;a='',$("#iframe-video").append(a)},Promart.modules.tpt.closeVideo=function(){void 0!==Promart.modules.tpt.IframeVideo&&(Promart.modules.tpt.IframeVideo.stopVideo(),$(this).closest("#iframe-video-home").removeClass("active"),Promart.modules.tpt.IframeVideo=void 0,$("#iframe-video").remove()),$("body").hasClass("home-terraza")&&($("#iframe-video-home").removeClass("active"),$("#iframe-video").remove())},Promart.modules.tpt.getSkuIframe=function(t,a,e){Promart.services.Search.getProduct(t).then((function(t){var o=Handlebars.compile($("#tmpl-iframe-video-home").html()),r={productName:t[0].productName,productBrand:t[0].brand,productLink:t[0].link,productImage:t[0].items[0].images[0].imageUrl,textButton:a,isProduct:e};$(".content-placeholder-iframe-sku").append(o(r))}))},Promart.modules.tpt.getButtonDefault=function(t,a,e){var o=Handlebars.compile($("#tmpl-iframe-video-home").html()),r={urlButton:t,visibleButton:""!=t&&void 0!==t,textButton:a,isProduct:e};$(".content-placeholder-iframe-sku").append(o(r))},Promart.modules.tpt.init=function(){Promart.modules.tpt.uiBindEvents()},Promart.modules.utils={},Promart.modules.utils.promesa=function(t){return $.Deferred((function(){var a=this;$.ajax(t).done((function(t){a.resolve(t)})).fail((function(t){a.reject(t)}))})).promise()},Promart.modules.utils.arrayUnique=function(t){return t.filter((function(t,a,e){return e.indexOf(t)===a}))},Promart.modules.utils.getPriceWithStock=function(t){if("items"in("string"==typeof t?new String(t):t)){for(var a,e=t.items,o=0;o0&&r.Price>0){a=e[o];break}}return a}},Promart.modules.utils.formatPrice=function(t,a,e,o,r){var s="\\d(?=(\\d{3})+"+((o="number"!=typeof o?2:o)>0?"\\D":"$")+")";return(r=this.currency?this.currency:"string"==typeof r?r:"")+(t=(1*t).toFixed(Math.max(0,~~o))).replace(".00","").replace(".",e||",").replace(new RegExp(s,"g"),"$&"+(a||"."))},Promart.modules.utils.formatMoneda=function(t){if(t>0){var a=(t=Promart.modules.utils.formatPrice(t,",",".")).split(".")[0],e=t.split(".")[1];return"S/ "+a+""+(e=void 0!==e?"00"!=e?"."+e:"":"")}return""},Promart.modules.utils.formatMonedaHtml=function(t){var a=(t=t.replace("S/ ","").replace("S/","").trim().toString()).slice(0,t.toString().length-3),e=t.toString().slice(t.toString().length-2);return e="00"!=e?"."+e:"",a.length>=4&&(a=a.replace(/\B(?=(\d{3})+(?!\d))/g,",")),"S/"+a+""+e+""},Promart.modules.utils.formatDate=function(t){var a=new Date(t);return["domingo","lunes","martes","miércoles","jueves","viernes","sábado"][a.getDay()]+", "+(a.getDate()<10?"0"+a.getDate():a.getDate())+" de "+["enero","febrero","marzo","abril","mayo","junio","julio","agosto","setiembre","octubre","noviembre","diciembre"][a.getMonth()]},Promart.modules.utils.getDate=function(){return String((new Date).getDate()).padStart(2,"0")+"/"+String((new Date).getMonth()+1).padStart(2,"0")+"/"+(new Date).getFullYear()},Promart.modules.utils.getParameterByName=function(t,a){var e=RegExp("[?&]"+t+"=([^&]*)").exec(a);return e&&decodeURIComponent(e[1].replace(/\+/g," "))},Promart.modules.utils.fullyDecodeURI=function(t){for(;Promart.modules.utils.isEncoded(t);)t=decodeURIComponent(t);return t},Promart.modules.utils.isEncoded=function(t){return(t=t||"")!==decodeURIComponent(t)},Promart.modules.utils.getSearchTotalItems=function(t,a,e,o=0){var r=$.Deferred();return $.ajax({url:"/api/catalog_system/pub/products/search/?isAvailablePerSalesChannel_"+a+":1&sc="+a+"&"+t+"&_from="+o+"&_to="+e,type:"GET",success:function(t,a,e){const o=e.getResponseHeader("resources"),s=o?o.split("/").pop():null;r.resolve({response:t,cantidad:s})},error:function(){r.reject()}}),r.promise()},Promart.modules.utils.removeQueryStringParameter=function(t,a){var e=a.split("#"),o=new RegExp("([?&])"+t+"=.*?(&|#|$)","i");return e[0].match(o)&&(a=(a=e[0].replace(o,"$1")).replace(/([?&])$/,""),void 0!==e[1]&&null!==e[1]&&(a+="#"+e[1])),a},Promart.modules.utils.omitirAcentos=function(t){for(var a="ÃÀÁÄÂÈÉËÊÌÍÏÎÒÓÖÔÙÚÜÛãàáäâèéëêìíïîòóöôùúüûÑñÇç",e=0;e0?a[0]:void 0,e.resolve(a[0])},error:function(){Promart.data.products[t]=void 0,e.reject()}})})).promise()},Promart.modules.utils.getProduct2=async function(t,a){return new Promise((e,o)=>{Promart.modules.utils.getCatalogSearch(t,Promart.data.sc||a).then(t=>{for(var a=0;a{""!=t?$.ajax({url:"/api/catalog_system/pub/products/search/?isAvailablePerSalesChannel_"+a+":1&sc="+a+"&fq="+t,dataType:"json",async:!0,headers:{resources:"0-28"},success:function(t){e(t)}}):e(!0)})},Promart.modules.utils.redirectSuscripcion=function(t){Promart.modules.cookies.setCookie("emailUser",t,15),window.location.href=window.location.origin+"/suscribete"+window.location.search},Promart.modules.utils.getResizedImage=function(t,a,e){return"string"!=typeof t?t:(t=t.replace(/(?:ids\/[0-9]+)-([0-9]+)-([0-9]+)\//,(function(t,o,r){return t.replace("-"+o+"-"+r,"-"+a+"-"+e)}))).replace(/(ids\/[0-9]+)\//,"$1-"+a+"-"+e+"/")},Promart.modules.utils.itemVisible=function(t,a,e){if(""!=t&&""!=a&&""!=e){var o=t.split(" "),r=a.split(" "),s=o[0].split("-"),i=o[1].split(":"),n=r[0].split("-"),l=r[1].split(":"),c=new Date(s[2],s[1]-1,s[0],i[0],i[1],i[2]),d=new Date(n[2],n[1]-1,n[0],l[0],l[1],l[2]);if((new Date).getTime()>=c.getTime()&&(new Date).getTime()<=d.getTime()&&"true"==e.toString().toLowerCase())return!0}return!1},Promart.modules.utils.scVisible=function(t){var a=""!=Promart.modules.cookies.getCookie("PromartSc")?Promart.modules.cookies.getCookie("PromartSc"):2;return""==t||!!(t=(t=t.trim().split(",")).filter((function(t){if(t==a)return t}))).length},Promart.modules.utils.carrouselSlick=function(t,a,e,o,r,s,i,n,l,c,d,p,m,u,h,g){var f=$(t),v={autoplay:e,autoplaySpeed:r,dots:n,arrows:l,infinite:s,slidesToShow:a,slidesToScroll:a,fade:p,cssEase:m,adaptiveHeight:!0,responsive:[{breakpoint:1201,settings:{autoplay:o,infinite:s,slidesToShow:g,slidesToScroll:g,arrows:c,dots:i}},{breakpoint:821,settings:{autoplay:o,infinite:s,slidesToShow:d,slidesToScroll:d,arrows:c,dots:i}}]};void 0!==h&&""!=h&&(v.slidesToScroll=h),f.slick(v)},Promart.modules.utils.stopSlider=function(t,a){$(t).on("click",(function(){$(t).slick("slickPause")})),$(t).on("swipe",(function(){$(t).slick("slickPause")}))},Promart.modules.utils.isVisible=function(t){if(t.length){var a=t.get(0).getBoundingClientRect();return a.top>=0&&a.left>=0&&a.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&a.right<=(window.innerWidth||document.documentElement.clientWidth)}},Promart.modules.utils.getLocalStorage=function(t){return JSON.parse(localStorage.getItem(t))||[]},Promart.modules.utils.setLocalStorage=function(t,a){localStorage.setItem(t,JSON.stringify(a))},Promart.modules.utils.getLocalStorageWithExpiry=function(t){const a=localStorage.getItem(t);if(!a)return[];const e=JSON.parse(a);return(new Date).getTime()>e.expiry?(localStorage.removeItem(t),[]):e.value},Promart.modules.utils.setLocalStorageWithExpiry=function(t,a,e){const o={value:a,expiry:(new Date).getTime()+60*e*1e3};localStorage.setItem(t,JSON.stringify(o))},Promart.modules.utils.getSessionStorage=function(t){return JSON.parse(sessionStorage.getItem(t))||[]},Promart.modules.utils.setSessionStorage=function(t,a){sessionStorage.setItem(t,JSON.stringify(a))},Promart.modules.utils.getDateTimeForJSON=function(){function t(t){return t>=0&&t<10?"0"+t:t+""}var a=new Date,e=t(a.getDate()),o=t(a.getMonth()+1),r=t(a.getHours()),s=t(a.getMinutes());return a.getFullYear()+"-"+o+"-"+e+"T"+r+":"+s},Promart.modules.utils.setDataLocal=function(t,a){return new Promise((e,o)=>{var r=Promart.modules.utils.getLocalStorage(t);r.length?e(JSON.parse(r)):$.get(a).done((function(a){Promart.modules.utils.setLocalStorage(t,JSON.stringify(a)),e(a)}))})},Promart.modules.utils.setDataSession=function(t,a){return new Promise((e,o)=>{var r=Promart.modules.utils.getSessionStorage(t);r.length?e(JSON.parse(r)):$.get(a).done((function(a){Promart.modules.utils.setSessionStorage(t,JSON.stringify(a)),e(a)}))})},Promart.modules.utils.resizeLocalData2ItsLimit=function(t,a){return a.length>t&&a.splice(0,1),a},Promart.modules.utils.getIndexOfItemInLocalData=function(t,a,e){var o=e.length;if(o)for(var r=0;ra?t.slice(Math.max(t.length-a,0)):t},Promart.modules.utils.getMostRepeatedItemInArray=function(t){if(!t.length)return null;t.reverse();for(var a=t[0],e={},o=1,r=0;ro&&(a=s,o=e[s])}return a},Promart.modules.utils.delayrd=function(){var t=0;return function(a,e){clearTimeout(t),t=setTimeout(a,e)}}(),Promart.modules.utils.resizable=function(t,a){var e=Number(a)||7.7;function o(){t.style.width=(t.value.length+1)*e+"px"}var r="keyup,keypress,focus,blur,change".split(",");for(var s in r)t.addEventListener(r[s],o,!1);o()},Promart.modules.utils.getSheet=function(t,a){return new Promise((e,o)=>{$.getJSON("https://spreadsheets.google.com/feeds/list/"+t+"/"+a+"/public/values?alt=json").done((function(t){e(t.feed.entry)}))})},Promart.modules.utils.getSheetV4=function(t,a,e="AIzaSyCCwcJM5cEYmZNs-KjSDAvcJz5JKy_9RYc"){return new Promise((o,r)=>{$.getJSON("https://sheets.googleapis.com/v4/spreadsheets/"+t+"/values/"+a+"?key="+e).done((function(t){o(t.values)}))})},Promart.modules.utils.getSheetJson=function(t){return new Promise((a,e)=>{$.getJSON(t).done((function(t){a(t.feed.entry)}))})},Promart.modules.utils.idCollectionListado=function(){var t=$(".resultItemsWrapper").find("script").eq(0).html(),a=/\/buscapagina\?.+&PageNumber=/i.exec(t),e=Promart.modules.utils.fullyDecodeURI(a[0]);return e=Promart.modules.utils.removeQueryStringParameter("sl",e.replace("/buscapagina?fq=","")),e=Promart.modules.utils.removeQueryStringParameter("cc",e),e=Promart.modules.utils.removeQueryStringParameter("sm",e),e=Promart.modules.utils.removeQueryStringParameter("PageNumber",e),e=Promart.modules.utils.removeQueryStringParameter("PS",e)},Promart.modules.utils.idBrandListado=function(){var t=$(".resultItemsWrapper").find("script").eq(0).html(),a=/\/buscapagina\?.+&PageNumber=/i.exec(t);return Promart.modules.utils.fullyDecodeURI(a[0]).split("&")[1].replace("fq=","")},Promart.modules.utils.reduce=function(t,a,e){return t.reduce((function(t,o){var r=o[a].$t;return t[r]=t[r]||[],(void 0===e||Promart.modules.utils.itemVisible(o.gsx$inicio.$t,o.gsx$fin.$t,o.gsx$visible.$t))&&t[r].push(o),t}),[])},Promart.modules.utils.reduceFormatSheet=function(t,a,e){return t.reduce((function(t,o){var r=a,s=o[e];t[s]=t[s]||[];var i=[],n=t[r];if(void 0!==n)if(n.length)for(var l=n[0],c=0;co&&(o="0"+o),10>r&&(r="0"+r),t.call(null,new Date(i))}})},Promart.modules.utils.dataLayerSuscripcion=function(t){""!=t&&(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"suscripcionCompleta","data-link_category":"UI :: Suscripcion","data-link_action":"Newsletter","data-link_label":t}))},Promart.modules.utils.sortAndRemoveDuplicatesSellers=function(t){const a=["promart","oechsle","plazavea"],e=new Set(t),o=Array.from(e);return o.sort((t,e)=>{const o=a.indexOf(t),r=a.indexOf(e);return-1===o&&-1===r?0:-1===o?1:-1===r?-1:o-r}),o},Promart.modules.utils.formatCamelCase=function(t){return t.replace(/[^a-zA-Z0-9 ]/g,"").split(/\s+/).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join("")},Promart.modules.utils.businessDay=function(t,a){const e=["2025-01-01","2025-04-17","2025-04-18","2025-05-01","2025-06-07","2025-06-29","2025-07-23","2025-07-28","2025-07-29","2025-07-06","2025-08-30","2025-10-08","2025-11-01","2025-12-08","2025-12-09","2025-12-25"];let o=new Date(t),r=0;for(;r=2){let t=a[1].trim().toLowerCase();return"callao"===t||"lima"===t}return!1},Promart.modules.utils.createSkuUrl=function(t){return t.reduce((t,a)=>t+"&fq=skuId:"+a.order,"")},Promart.modules.whatsapp={},Promart.modules.whatsapp.principal=function(t,a,e){let o=$(t),r=o.attr("href"),s=$("body");if(o.attr("href",e),""==e){if($("body").hasClass("categoria")&&!$("body").hasClass("search")){let t=vtxctx.categoryName;o.attr("href",r+t+" ¿Podrías asistirme?")}if($("body").hasClass("search")&&$("body").hasClass("categoria")&&""==!vtxctx.searchTerm){let t=vtxctx.searchTerm;o.attr("href",r+t+" ¿Podrías asistirme?")}if(""==vtxctx.searchTerm&&$("body").hasClass("search")){let t=r.split("text=")[1],a=r.split("&")[0];o.attr("href",a+"&text="+t.replace("Hola!%20Estoy%20buscando%20el%20producto%20","Hola! Quisiera realizar una compra"))}if($("body").hasClass("listado")&&$("body").hasClass("landing-collec")){let t=r.split("text=")[0],a="Hola! Estoy interesado en comprar productos de "+window.location.href+" ¿Podrías asistirme?";o.attr("href",t+"text="+encodeURIComponent(a))}}if(o.show(),o.append('"),$(window).width()>768){let a;$(s).on("mouseover",t,(function(){a=setTimeout(()=>{var a;a=$(this),$(a).closest(t).find(".tooltip-wts").show()},500)})),$(s).on("mouseleave",t,(function(){$(".tooltip-wts").hide(),clearTimeout(a)}))}},Promart.modules.whatsapp.init=function(t,a,e){Promart.modules.whatsapp.principal(t,a,e)},Promart.pages.colecc=new Promart.constructor.page("landing-collec"),Promart.pages.colecc.uiBindEvents=function(){$(document).on("click",".landing-collec a.item-n0.item",Promart.pages.colecc.onProductos),$(document).on("click",".js-open-tooltip",Promart.pages.colecc.opentooltip),$(document).on("click",".js-dp-close",Promart.pages.colecc.closePopupSoldOut),$(document).on("click",Promart.pages.colecc.outsidePopup)},Promart.pages.colecc.opentooltip=function(t){$(".banner-item-dsp.exp").append('')},Promart.pages.colecc.closePopupSoldOut=function(){$(".banner-item-dsp.exp").find(".popup-ficha-sold-out").remove()},Promart.pages.colecc.outsidePopup=function(t){var a=$(".js-open-tooltip");a.is(t.target)||0!==a.has(t.target).length||Promart.pages.colecc.closePopupSoldOut()},Promart.pages.colecc.onProductos=function(t){t.preventDefault();var a,e=$(this),o=0;$(".landing-collec a.item-n0.item").removeClass("active"),e.addClass("active"),Promart.pages.listado.data.shelfOptions.filterActive=!0,gNumPag=1,void 0!==Promart.pages.colecc.categorias&&(a=Promart.pages.colecc.categorias);var r=e.attr("href");if(e.data("url"))o=parseInt(e.data("cantprod"));else{"holstein"==window.location.href.split("/")[3]&&(partialSearchUrl="/busca?fq=H%3a1503&PS=28&");var s=partialSearchUrl.replace("/busca?fq=H%3a",""),i=partialSearchUrl.replace("/busca?",""),n=(s=s.replace("&PS=28&","")).replace(/[&]PS=[0-9]*[&]$/,"");n=Promart.modules.utils.removeQueryStringParameter("O",n);var l=(r=(r=r.replace(window.location.origin+"/","")).replace("/"+s,"")).indexOf("?"),c=(r=r.substr(0,l)).split("/"),d="fq=C:/";if(c[0]&&""!=c[0])for(var p=a.length,m="",u=0,h=0;h-1?Promart.pages.listado.data.activeFilters.collection=a.replace("/busca?",""):Promart.pages.listado.data.activeFilters.collection="fq=H:"+a,Promart.pages.listado.data.activeFilters.collection=Promart.pages.listado.data.activeFilters.collection.replace(/%3a/g,":").replace(/%5b/g,"[").replace(/%5d/g,"]").replace(/%20/g," ").replace(/\+/g," ")),Promart.pages.listado.data.activeFilters.categoria=t,Promart.pages.listado.listToggleFilter()},Promart.pages.colecc.DOMReady=function(){$.ajax({async:!0,crossDomain:!0,url:"/api/catalog_system/pub/category/tree/2/",method:"GET",headers:{"content-type":"application/json"},processData:!1}).done((function(t){Promart.pages.colecc.categorias=t})),Promart.pages.colecc.uiBindEvents()},Promart.pages.common=new Promart.constructor.page("common"),Promart.pages.common.lazyLoadImages=function(t){const a=document.querySelectorAll(t),e=new IntersectionObserver(t=>{t.forEach(t=>{if(t.isIntersecting){if("PICTURE"===t.target.tagName){t.target.querySelectorAll("source").forEach(t=>{const a=t.getAttribute("data-srcset");t.setAttribute("srcset",a)}),t.target.parentNode.classList.add("loaded")}else{let a=t.target;const e=a.getAttribute("data-src");a.setAttribute("src",e),a.classList.add("loaded")}e.unobserve(t.target)}})});a.forEach(t=>{e.observe(t)})},Promart.pages.common.pageView=function(){"undefined"!=typeof dataLayer&&dataLayer.push({event:"fizzmodLoaded"})},Promart.pages.common.uiEvents=function(){Promart.modules.tpt.init()},Promart.pages.common.initEvents=function(){let t=Promart.modules.utils.getParameterByName("sc",window.location.href);Promart.data.sc=null!=t&&""!=t?t:Promart.modules.cookies.getCookie("VTEXSC")?Promart.modules.cookies.getCookie("VTEXSC").split("sc=")[1]:2,Promart.data.blproducts="",Promart.data.lstorage="stateDep25",Promart.data.locate="locateCities",Promart.data.tags="",Promart.data.products={},Promart.modules.cintilloDinamico.init(),Promart.modules.floatingWidget.init(),Promart.components.popupCookie.init(),Promart.modules.popupVariant.init()},Promart.pages.common.DOMReady=function(){Promart.pages.common.uiEvents(),Promart.components.header.init(),Promart.modules.search.init(),Promart.modules.minicart.init(),Promart.components.menu.init(),Promart.modules.product.init(),Promart.modules.card.init(),Promart.components.popup.init(),Promart.components.footer.init(),Promart.pages.common.lazyLoadImages(".lazy-load")},Promart.pages.ficha=new Promart.constructor.page("prod-resign"),Promart.pages.ficha.ubigeoInit={1:"130101",2:"150130",3:"200101",4:"200601",5:"200701",6:"140101",7:"060101",8:"100101",9:"250101",10:"060801",11:"120101",12:"110501",13:"080101",14:"180101",15:"211101",17:"021801",18:"110101",22:"040101",23:"220901",24:"240101",25:"150110",26:"150113",27:"150103",28:"150108"},Promart.pages.ficha.dataSellerCenter,Promart.pages.ficha.dataSelector,Promart.pages.ficha.cnsDetalle=function(){let t=$("#___rc-p-sku-ids").val();""!=t&&(t=t.split(",")[0]),this.prodSku=t,$(".ficha_sku").html("SKU: "+this.prodSku),this.prodId=$("#___rc-p-id").val(),this.skuKit=$("#___rc-p-kit-ids").val()},Promart.pages.ficha.saveCategoryVisited=function(){const t=Promart.data.products[vtxctx.skus];if(void 0!==t){const a=t.categoriesIds[0],e=Promart.modules.utils.getLocalStorage("categoryHistorial");e.push({catID:a});const o=Promart.modules.utils.resizeLocalData2ItsLimit(32,e);Promart.modules.utils.setLocalStorage("categoryHistorial",o)}},Promart.pages.ficha.OpenPopupVolDesk=function(){$(this).parent().find(".tooltip").addClass("active"),$(this).parent().addClass("active")},Promart.pages.ficha.ClosePopupVolDesk=function(){$(".cont-vol-popup").removeClass("open"),$(".tooltip").removeClass("active")},Promart.pages.ficha.openPopupVol=function(){$(window).width()<768&&($(this).parent().find(".cont-vol-popup").addClass("open"),$(this).parent().addClass("active"))},Promart.pages.ficha.outsideElemetVol=function(t){const a=$(".ctrl-box-vol");a.is(t.target)||0!==a.has(t.target).length||(a.removeClass("active"),$(".cont-vol-popup").removeClass("open"))},Promart.pages.ficha.lazyLoadComponent=function(t){const a=document.querySelectorAll(t),e=new IntersectionObserver(t=>{t.forEach(t=>{if(t.isIntersecting){const a=t.target,o=a.getAttribute("data-execfn");"historial"==o||"cartcarrousel"==o?Promart.modules[o].principal():"buyTogether"==o||Promart.modules.sugeridos[o](),a.classList.remove("in-viewport"),e.unobserve(t.target)}})},{rootMargin:"300px"});a.forEach(t=>{e.observe(t)})},Promart.pages.ficha.listDetalle=async function(){this.cnsDetalle(),""==Promart.data.tags&&await Promart.modules.product.jsonTagsPromart(),Promart.pages.ficha.images();const t="2025/07/18 00:00:00",a=new Date(t),e=new Date;$(".ficha-seller p.flag.cyber-wow").length&&a>e?($(window).width()<=768&&(Promart.modules.product.tags(".ficha-seller",Promart.data.tags),Promart.pages.ficha.tagUltimoProducto(".ficha-seller-wrap")),Promart.pages.ficha.priceContador(t)):(Promart.modules.product.tags(".ficha-seller",Promart.data.tags),Promart.pages.ficha.tagUltimoProducto(".ficha-seller-wrap"));const o=this.prodSku;Promart.modules.utils.getProduct(o,Promart.data.sc).then(t=>{Promart.pages.ficha.prices(t),Promart.pages.ficha.pageView(t.categories[0],t.categoriesIds[0]),Promart.pages.ficha.cintilloColleccion(t.productClusters),Promart.pages.ficha.pricesToh(t),Promart.pages.ficha.loadMetroLineal(t),Promart.pages.ficha.getDataTypeProduct(),Promart.pages.ficha.sellers(),Promart.pages.ficha.unavailable=!1,Promart.pages.ficha.disabled=!1,Promart.modules.buyTogether.buyTogetherButton(),Promart.modules.buyTogether.buyTogether(),Promart.modules.historial.addSkuHistorialFromFicha(),Promart.pages.ficha.saveCategoryVisited(),Promart.modules.sugeridos.productosVentaProyecto(),Promart.pages.ficha.lazyLoadComponent(".in-viewport"),Promart.pages.ficha.listEspecif(),Promart.pages.ficha.ratingSellers(),Promart.pages.ficha.newSubcategory()})},Promart.pages.ficha.pageView=function(t,a){const e=t.split("/"),o=a.split("/"),r={productCategoryId:parseInt(o[2]),productCategoryName:e[2],productSubcategoryId:parseInt(o[3]),productSubcategoryName:e[3]};dataLayer.push(r),Promart.pages.common.pageView(),Promart.modules.gtm.promotionViewImages($(".multi-cintillo-wrap.gh-gtm"))},Promart.pages.ficha.cintilloColleccion=function(t){const a=$("#cnt-cintillo-colleccion .cintillo-inner");let e=!1;for(let o=0;o x m2

    Precio por caja: S/ '+t+"

    ",s=' x m2

    Precio por caja: S/ '+o+"

    ",t=(t/e).toFixed(2),o=(o/e).toFixed(2),$(".calculator-mc").show(),Promart.modules.calculatorMc.init()),$(".ficha-seller").attr("data-price",t),t>0){let a="Precio online";if(o!=t){const a=parseInt((100*(1-t/o)).toFixed(2).split(".")[0]);$(".ficha-seller").attr("data-listprice",o),$(".js-price-listprice").append("Precio lista"+Promart.modules.utils.formatMoneda(o)+" "+s),$(".js-price-price").addClass("lp"),$(".ficha-main-img .flag-wrapper").append(`

    \n \n -${a}%\n \n

    `),$(".js-price-price").append('-'+a+"%")}else $(".js-price-listprice").remove(),a="Precio lista";$(".js-price-price").addClass("tam").append(""+a+""+Promart.modules.utils.formatMoneda(t)+" "+r)}else $(".price-seller,.controllers-seller").hide(),$(".js-price-price").remove()}else $(".price-seller").remove();this.amount>0?Promart.pages.ficha.pdpAvailable(this.amount):$(".tipo-seller, .shipping-methods-seller").hide(),"1"==this.seller&&$(".payment-seller").show(),$(".ficha-seller").attr("data-availablequantity",this.amount),$(".ficha-seller").attr("data-id",this.prodId)},Promart.pages.ficha.priceContador=function(t){const a=new Date(t);function e(){const t=new Date,e=a-t;if(e>0){const t=Math.floor(e/1e3),a=Math.floor(t/3600),o=Math.floor(t%3600/60),r=t%60;$(".js-price-contador .contador__horas").text(a.toString().padStart(2,"0")),$(".js-price-contador .contador__minutos").text(o.toString().padStart(2,"0")),$(".js-price-contador .contador__segundos").text(r.toString().padStart(2,"0"))}else $(".js-price-contador .contador__horas").text("00"),$(".js-price-contador .contador__minutos").text("00"),$(".js-price-contador .contador__segundos").text("00"),clearInterval(o)}$(".price-seller").before('\n
    \n
    00
    :\n
    00
    :\n
    00
    \n
    \n '),e();const o=setInterval(e,1e3)},Promart.pages.ficha.showTOHOrTOHPay=function(t,a,e,o){$(".js-price-price").removeClass("tam");let r=t.priceTOH,s=t.listPrice,i="",n="";"TOHPAY"!==a&&"TOH-TOHPAY"!==a||(r=t.priceTOHPay),"AGORACLUB"===a&&(r=t.priceAgoraClub),Promart.pages.ficha.calculatorTOH(r,!0);const l=(100*(1-r/s)).toFixed(2).split(".")[0];void 0!==e&&""!=e&&(i='

    Precio por caja: S/ '+r+"

    ",r=(r/e).toFixed(2),s=(s/e).toFixed(2),$(".price-seller-cnt").addClass("toh"),n=' x m2',$(".price-toh.js-price-toh").after(i)),o&&($(".price-seller-cnt").addClass("toh"),n=' x m');let c="";"TOHPAY"===a&&(c="dummie-tohpay"),"TOH-TOHPAY"===a&&(c="dummie-toh-tohpay"),"AGORACLUB"===a?(c="dummie-agoraclub",$(".js-price-toh").addClass("s-agoraclub"),$(".js-price-toh").append(`\n \n
    \n \n \n
    \n
    `+Promart.modules.utils.formatMoneda(r)+" "+n+'-'+l+"%"),$(".js-price-toh").find(".tit-toh").append('\n \n '),void 0!==e&&($(".js-price-toh").addClass("s-agoraclub-mc"),$(".js-price-price").addClass("s-agoraclub-mc")),o&&($(".js-price-toh").addClass("s-agoraclub-ml"),$(".js-price-price").addClass("s-agoraclub-ml"))):($(".ficha-main-img .flag-wrapper").append(`

    \n \n -${parseInt(l)}%\n \n

    `),$(".js-price-toh").append('Tarjeta'+Promart.modules.utils.formatMoneda(r)+" "+n+'-'+l+"%"),$(".js-price-toh").find(".tit-toh").append('')),$(".ficha-seller").attr("data-pricetoh",r)},Promart.pages.ficha.loadMetroLineal=function(t){if("m"===t.items[0].measurementUnit){this.ml=!0;let t=this.price,a=this.listPrice,e="",o="";$("body,.ficha-seller").addClass("ml"),e=' x m',o=' x m',t=t.toFixed(2),a=a.toFixed(2),t>0&&(a!=t&&$(".js-price-listprice").append(" "+o),$(".js-price-price").addClass("tam").append(" "+e)),$(".wp_mc").find(".t_m2").html("m")}},Promart.pages.ficha.pricesToh=function(t){if(void 0!==t["Servicios-sc"]&&(Promart.pages.ficha.servicesSc=t["Servicios-sc"][0]),Promart.pages.ficha.amount>0){const a=Promart.modules.prices.typePromo(t,!0),e=this.mc,o=a[this.seller];let r=!1;const s=t.items[0].measurementUnit,i=t.clusterHighlights||{},n=[140357,142113,142106,12871,135406,135396,135405,155697,145910,145912,145907,145914,145906,147719,147720,147722,147724,147726,147727,147728,147721,147725,147718,155125,155134,155135,145911,145909,147723,142318,124850,76572,76573,36449];if("m"===s&&void 0!==t["Ancho Del Producto"])if(r=!0,Promart.pages.ficha.widthProduct=(t["Ancho Del Producto"][0].replace(" cm","")/100).toFixed(2),void 0!==i[4743]){$(".calculator-mc").show(),$(".cnt-text-calculatorMc").html("");let t='';t+="Calcula aquí cuántos metros lineales necesitas para tu proyecto",t+='',$(".cnt-text-calculatorMc").addClass("linealMetre"),$(".cnt-text-calculatorMc").append(t),$(".ficha-seller .js-tooltip_mc").show(),$(".ficha-seller .js-tooltip_mc").find(".cant_caja").html("Metro lineal"),Promart.modules.calculatorMc.init()}else n.includes(Number(t.productId))&&($(".ficha-seller .js-tooltip_mc").show(),$(".ficha-seller .js-tooltip_mc").find(".cant_caja").html("Metro lineal"));else n.includes(Number(t.productId))&&($(".ficha-seller .js-tooltip_mc").show(),$(".ficha-seller .js-tooltip_mc").find(".cant_caja").html("Metro lineal"),$(".ficha-seller.product").addClass("ml"));$(".ficha-seller").attr("data-categories",t.categoriesIds[0]),Promart.modules.prices.validateCategories(t.categoriesIds[0],".ficha-seller-wrap .product",i),$(".ficha-seller").attr("data-measurementUnit",t.items[0].measurementUnit),!$(".ficha-seller").hasClass("no-promotion")&&$(".ficha-main-img .flag-wrapper").addClass("flag-wraper--promotion"),void 0!==o?void 0!==o.priceAgoraClub?Promart.pages.ficha.showTOHOrTOHPay(o,"AGORACLUB",e,r):void 0!==o.priceTOH&&void 0===o.priceTOHPay?Promart.pages.ficha.showTOHOrTOHPay(o,"TOH",e,r):void 0!==o.priceTOH&&void 0!==o.priceTOHPay?Number(o.priceTOH)===Number(o.priceTOHPay)&&Promart.pages.ficha.showTOHOrTOHPay(o,"TOH-TOHPAY",e,r):void 0===o.priceTOH&&void 0!==o.priceTOHPay?Promart.pages.ficha.showTOHOrTOHPay(o,"TOH-TOHPAY",e,r):Promart.pages.ficha.calculatorTOH(o.price):($(".js-price-toh").remove(),void 0!==o&&Promart.pages.ficha.calculatorTOH(o.price)),Promart.pages.ficha.validateInfoAgora(t.categoriesIds),Promart.pages.ficha.validateInfoAgoraClub(t)}Promart.modules.gtm.detailProductFicha()},Promart.pages.ficha.pdpAvailable=function(t){if(void 0!==t&&t<10)if(0===t)$(".content-alert-pdp-available").hide();else{let a="quedan "+t+" unidades disponibles";1===t&&(a="queda "+t+" unidad disponible");const e="Solo "+a+" de stock online";$(".content-alert-pdp-available").show(),$(".js-text-pdp-available").html(e)}},Promart.pages.ficha.tagUltimoProducto=function(t){const a=$(t).find(".product").attr("data-availablequantity");if(void 0!==a){if(1===parseInt(a)){const a=[{name:"ultima-unidad",type:"atributo",priority:1,variant:"texto-imagen",content:{text:"Última unidad",background:"#FF0200",borderColor:"#FF0200",position:"-130px -99px",size:"11px 14px",positionImage:"left"}}],e=Promart.modules.product.htmlTags(a);$(t).find(".tag-container .list-tags").length>0?$(t).find(".tag-container .list-tags").prepend(e):$(t).find(".tag-container").prepend('
    '+e+"
    ")}}},Promart.pages.ficha.zoomImg=function(){if($(window).width()>640&&$(".image-zoom").length>0){const t={preloadText:"",title:!1};$(".image-zoom").jqzoom(t)}else $(".image-zoom").each((function(){new RTP.PinchZoom($(this),{})}))},Promart.pages.ficha.sliderDots=function(){function t(t,a){"default"===a&&t.find("ul.slick-dots li").eq(4).addClass("n-small-1")}const a=$("#image");a.on("init",(function(a,e){$(this).find("ul.slick-dots").wrap("
    "),$(this).find("ul.slick-dots li").each((function(t){$(this).addClass("dot-index-"+t)})),$(this).find("ul.slick-dots").css("transform","translateX(0)"),t($(this),"default")}));let e=0,o=0;a.on("beforeChange",(function(a,r,s,i){if($(this).find(".slick-dots li").length>5)if(i>s){if($(this).find("ul.slick-dots li.dot-index-"+i).hasClass("n-small-1")&&!$(this).find("ul.slick-dots li:last-child").hasClass("n-small-1")){e+=-23,$(this).find("ul.slick-dots li.dot-index-"+i).removeClass("n-small-1"),o=i+1,$(this).find("ul.slick-dots li.dot-index-"+o).addClass("n-small-1"),$(this).find("ul.slick-dots").css("transform","translateX("+e+"px)");const t=i-3,a=t-1;$(this).find("ul.slick-dots li").eq(a).removeClass("p-small-1"),$(this).find("ul.slick-dots li").eq(t).addClass("p-small-1")}}else{if($(this).find("ul.slick-dots li.dot-index-"+i).hasClass("p-small-1")&&!$(this).find("ul.slick-dots li:first-child").hasClass("p-small-1")){e+=23,$(this).find("ul.slick-dots li.dot-index-"+i).removeClass("p-small-1"),o=i-1,$(this).find("ul.slick-dots li.dot-index-"+o).addClass("p-small-1"),$(this).find("ul.slick-dots").css("transform","translateX("+e+"px)");const t=s+3,a=t-1;$(this).find("ul.slick-dots li").eq(t).removeClass("n-small-1"),$(this).find("ul.slick-dots li").eq(a).addClass("n-small-1")}0==i&&($(this).find("ul.slick-dots").css("transform","translateX(0)"),$(this).find("ul.slick-dots li").eq(1).removeClass("p-small-1"),t($(this),"default"),$(this).find("ul.slick-dots li:last-child").removeClass("n-small-1"),e=0)}})),a.on("afterChange",(function(t,a,e){$(window).width()<640&&(1==e?$("#demoup-buttons-container").css("display","block"):$("#demoup-buttons-container").css("display","none"))}))},Promart.pages.ficha.sliderImg=function(t){Promart.pages.ficha.sliderDots(),$("#image").slick({autoplay:!1,autoplaySpeed:5e3,dots:!0,arrows:!0,infinite:!0,slidesToShow:1,slidesToScroll:1,lazyLoad:"ondemand",asNavFor:"#show .thumbs"}),$("#show .thumbs").slick({slidesToShow:6,slidesToScroll:t,vertical:!0,dots:!1,arrows:!0,infinite:!1,centerMode:!1,focusOnSelect:!0,asNavFor:"#image"})},Promart.pages.ficha.images=function(){let t=$("#itemscope-wrap .getIdVideo ul li").eq(0).text();t=""!=t&&t;const a=$(".thumbs li");let e="";for(let o=0;o0?$(window).width()>640?e+='
    ':e+='
    ':$(".image-zoom").eq(0).wrap("
    "),a.eq(o).find("a").remove(),a.eq(o).append(t)}if($("#image").append(e),$(window).width()<640&&$(".zoomWindow").remove(),t&&Promart.pages.ficha.createIframeVideo(t),$(".thumbs li").length>1){const t=$(".thumbs li").length>6?1:6;Promart.pages.ficha.sliderImg(t),$(".main-img-dsk button.slick-prev").attr("data-link_category","UI :: Producto").attr("data-link_action","Fotos").attr("data-link_label","Previo"),$(".main-img-dsk button.slick-next").attr("data-link_category","UI :: Producto").attr("data-link_action","Fotos").attr("data-link_label","Siguiente");const a=$(".main-img-dsk .thumbs li img");for(let e=0;e"+this.sellerName+"")},Promart.pages.ficha.orderAttributes=function(t){for(let a=0;aa.order?1:t.order

    '+t[i].title+"

    "+t[i].description+"

    ":e+='

    '+t[i].title+"

    "+t[i].description+"

    ";return o+='
    '+a+"
    ",o+='
    '+e+"
    ",o},Promart.pages.ficha.listEspecif=function(){const t=Promart.data.products[this.prodSku];Promart.data.products.list={product:{}};const a=$(".ficha_especificaciones .ficha_esp_cnt");if(a.html(""),void 0!==t.DescriptionBrand&&""!=t.DescriptionBrand){a.append('

    Descripción

    '+t.DescriptionBrand+'
    Ver descripción completa
    Ocultar descripción
    ');document.getElementById("heightDesBrand").offsetHeight<=450&&($(".ficha_gradient.active").css("display","none"),$(".ficha_descrip_brand").css("margin","0px"))}else void 0!==t.description&&""!=t.description&&a.append('

    Descripción

    '+t.description+"
    ");"1"!==Promart.pages.ficha.seller&&"PlazaVea"!==Promart.pages.ficha.seller&&"oechsle"!==Promart.pages.ficha.seller||(a.find('.ficha_esp_item[data-link_action="Descripcion"]').find(".ficha_eitem_title").removeClass("active"),a.find('.ficha_esp_item[data-link_action="Descripcion"]').find(".ficha_eitem_det").hide());const e=t["Características"],o=t.brand.toLowerCase(),r=t.Landing,s=Promart.data.products[vtxctx.skus].Modelo?Promart.data.products[vtxctx.skus].Modelo[0]:null,i={NEXXT:"NEXXT_CONNECTIVITY",Primus:"PRIMUS",Xtech:"XTECH",Forza:"FORZA","Klip Xtreme":"KLIPEXTREME"}[Promart.data.products[vtxctx.skus].brand];if(void 0!==r&&""!=r){a.append('');const t=document.createElement("iframe");t.setAttribute("src",r);document.getElementById("landing-iframe").appendChild(t),t.onload=function(t){const a=$($($("#landing-iframe iframe")[0].contentDocument)[0].children)[0].children[1];$(a).find("header").remove(),$(a).find("footer").remove(),$(a).find(".lower-header").remove(),$(a).find(".wp-content").css("padding-top",0),$(".ficha_esp_item.caract").show(300)}}if("samsung"==o||"lg"==o||"philips"==o){a.append('

    Características

    ');const e=t.Modelo,r=$("head")[0],s=document.createElement("script");$("