1!function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t){if(null!=t){var a=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],o=0;if(a)return a.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}}}throw new TypeError(e(t)+" is not iterable")}function a(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function l(a,n,i,r){var l=n&&n.prototype instanceof c?n:c,d=Object.create(l.prototype);return o(d,"_invoke",function(a,o,n){var i,r,l,c=0,d=n||[],u=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,a){return i=t,r=0,l=e,p.n=a,s}};function h(a,o){for(r=a,l=o,t=0;!u&&c&&!n&&t<d.length;t++){var n,i=d[t],h=p.p,f=i[2];a>3?(n=f===o)&&(l=i[(r=i[4])?5:(r=3,3)],i[4]=i[5]=e):i[0]<=h&&((n=a<2&&h<i[1])?(r=0,p.v=o,p.n=i[1]):h<f&&(n=a<3||i[0]>o||o>f)&&(i[4]=a,i[5]=o,p.n=f,r=0))}if(n||a>1)return s;throw u=!0,o}return function(n,d,f){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&h(d,f),r=d,l=f;(t=r<2?e:l)||!u;){i||(r?r<3?(r>1&&(p.n=-1),h(r,l)):p.n=l:p.v=l);try{if(c=2,i){if(r||(n="next"),t=i[n]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,r<2&&(r=0)}else 1===r&&(t=i.return)&&t.call(i),r<2&&(l=TypeError("The iterator does not provide a '"+n+"' method"),r=1);i=e}else if((t=(u=p.n<0)?l:a.call(o,p))!==s)break}catch(t){i=e,r=1,l=t}finally{c=1}}return{value:t,done:u}}}(a,i,r),!0),d}var s={};function c(){}function d(){}function u(){}t=Object.getPrototypeOf;var p=[][i]?t(t([][i]())):(o(t={},i,function(){return this}),t),h=u.prototype=c.prototype=Object.create(p);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,o(e,r,"GeneratorFunction")),e.prototype=Object.create(h),e}return d.prototype=u,o(h,"constructor",u),o(u,"constructor",d),d.displayName="GeneratorFunction",o(u,r,"GeneratorFunction"),o(h),o(h,r,"Generator"),o(h,i,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(a=function(){return{w:l,m:f}})()}function o(e,t,a,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}o=function(e,t,a,n){function r(t,a){o(e,t,function(e){return this._invoke(t,a,e)})}t?i?i(e,t,{value:a,enumerable:!n,configurable:!n,writable:!n}):e[t]=a:(r("next",0),r("throw",1),r("return",2))},o(e,t,a,n)}function n(e,t,a,o,n,i,r){try{var l=e[i](r),s=l.value}catch(e){return void a(e)}l.done?t(s):Promise.resolve(s).then(o,n)}function i(e){return function(){var t=this,a=arguments;return new Promise(function(o,i){var r=e.apply(t,a);function l(e){n(r,o,i,l,s,"next",e)}function s(e){n(r,o,i,l,s,"throw",e)}l(void 0)})}}jQuery(document).ready(function(e){var o,n={init:function(){this.menuScripts(),this.menuCountries(),this.openModalSites(),this.validateCookies(),this.btnScrollTop(),this.openExternalLinks(),this.shareSocialNetworks(),this.handleColorMixContactForm()},menuScripts:function(){e('a[href="#"]').on("click",function(e){e.preventDefault()}),e(".toogle-menu").on("click",function(){e(".menu-principal-container").toggleClass("open-menu-mobile")}),e(".menu-item-has-children").on("click",function(t){var a=e(t.currentTarget);a.hasClass("open-menu")?a.removeClass("open-menu"):(e(".menu-item-has-children").removeClass("open-menu"),a.addClass("open-menu"))}),e(document).on("click",function(t){!e(".menu-item-has-children a").is(t.target)&&e(".menu-item-has-children").hasClass("open-menu")&&e(".menu-item-has-children").removeClass("open-menu")})},menuCountries:function(){e("#menu-paises .menu-item-home").on("click",function(t){t.preventDefault(),e("#menu-paises").toggleClass("open-menu")}),e(document).click(function(t){var a=e(t.target).parent().parent();e(a).is("#menu-paises")||e("#menu-paises").removeClass("open-menu")})},openModalSites:function(){e("#menu-menu-top .icon-house a, #menu-menu-top-industria .icon-house a").on("click",function(t){t.preventDefault(),e("#swModal").modal("show")})},openModalCookies:function(){e("#cookieModal").modal("show"),e("body").removeClass("modal-open"),e(".modal-backdrop").removeClass("modal-backdrop"),n.setCookie("SHERWIN_PRIVACY_MODAL_LOADED",1,365),e("#cookieModal .close").click(function(){n.setCo
1okie("SHERWIN_PRIVACY_Cookies",0,365),n.setCookie("SHERWIN_PRIVACY_MODAL_VIEWED",1,365)}),e("#cookieModal .modal-body #btn_ok").click(function(){n.setCookie("SHERWIN_PRIVACY_Cookies",1,365),n.setCookie("SHERWIN_PRIVACY_MODAL_VIEWED",1,365)})},validateCookies:function(){n.getCookie("SHERWIN_PRIVACY_Cookies")||n.openModalCookies()},setCookie:function(e,t,a){var o=new Date;o.setTime(o.getTime()+24*a*60*60*1e3);var n="expires="+o.toUTCString();document.cookie=e+"="+t+";"+n+";path=/"},getCookie:function(e){for(var t=e+"=",a=decodeURIComponent(document.cookie).split(";"),o=0;o<a.length;o++){for(var n=a[o];" "==n.charAt(0);)n=n.substring(1);if(0==n.indexOf(t))return n.substring(t.length,n.length)}return""},btnScrollTop:function(){e("#up").click(function(){return console.log("up"),e("html, body").animate({scrollTop:0},"slow"),!1})},openExternalLinks:function(){var t=new RegExp(location.host+"|"+location.host+"/#/i|#|sherwin.com.ar|sherwin.com.uy|sherwin.cl|sherwin.com.br|sherwin.com.mx|southerncone.flywheelsites|/wp-content|sherwin-williams.com|tel:|paintdocs.com|luxuriant-shock|/industria|javascript:;|swlatamstg.wpenginepowered.com|swlatamprd.wpenginepowered.com|swlatamdev.wpenginepowered.com");e("a").each(function(a){t.test(e(this).attr("href"))||e(this).hasClass("internal-link")||e(this).addClass("external-link")}),e("a").on("click",function(t){var a=e(t.currentTarget);if(a.hasClass("external-link")){t.preventDefault();var o=a.attr("href");e("#externalSW .btn-blue").attr("href",o),e("#externalSW").modal("show")}}),e("#externalSW .btn-blue").on("click",function(){e("#externalSW").modal("hide")})},shareSocialNetworks:function(){if(e("body").hasClass("single-post")||e("body").hasClass("single-producto")){var t=window.location.href;e("#facebook").click(function(){window.open("https://www.facebook.com/sharer.php?u="+encodeURIComponent(t),"_blank")}),e("#twitter").click(function(){window.open("https://twitter.com/intent/tweet?url="+encodeURIComponent(t),"_blank")}),e("#pinterest").click(function(){window.open("https://www.pinterest.com/pin/create/button/?url="+encodeURIComponent(t),"_blank")}),e("#whatsapp").click(function(){window.open("https://api.whatsapp.com/send?text="+encodeURIComponent(t),"_blank")}),e("#email").click(function(){if(e("body").hasClass("single-post")&&e("body").hasClass("brasil")){var a=e(".single-post.brasil .title-post").text();a="Conheça sobre "+a,window.open("mailto:?subject="+a+"&body= Veja este artigo! "+encodeURIComponent(t),"_blank")}else if(e("body").hasClass("single-post")){var o=e(".single-post.brasil .title-post").text();o="Conoce sobre "+o,window.open("mailto:?subject="+o+"&body= ¡Mira este artÃculo! "+encodeURIComponent(t),"_blank")}else if(e("body").hasClass("single-producto")&&e("body").hasClass("brasil")){var n=e(".single-producto.brasil .title-product").text();n="Conheça nosso produto "+n,window.open("mailto:?subject="+n+"&body= Conheça este produto! "+encodeURIComponent(t),"_blank")}else if(e("body").hasClass("single-producto")){var i=e(".single-producto .title-product").text();i="Conoce nuestro producto "+i,window.open("mailto:?subject="+i+"&body= ¡Mira este producto! "+encodeURIComponent(t),"_blank")}})}},handleColorMixContactForm:function(){document.addEventListener("wpcf7mailsent",function(e){var t=e.target;if(t){var a=t.querySelector(".form-lp-colormix"),o=t.querySelector("#form-lp-colormix__link-acessar");a&&o&&(a.style.display="none",o.style.display="block")}},!1)}},r={init:function(){this.sliderHome({})}
1,sliderHome:function(){e("body").hasClass("brasil")?e("main .sliders").slick({dots:!0,autoplay:!0,autoplaySpeed:9500,easing:"ease"}):e("main .sliders").slick({dots:!0,autoplay:!0,autoplaySpeed:4500,easing:"ease"})}},l={init:function(){this.stylesFilter(),this.accordionFilter()},stylesFilter:function(){e(".styles .style-grid").on("click",function(t){var a=e(".list-products");a.hasClass("rows")&&a.removeClass("rows")}),e(".styles .style-rows").on("click",function(t){var a=e(".list-products");a.hasClass("rows")||a.addClass("rows")})},accordionFilter:function(){if(e(".list-filter h4").on("click",function(t){t.preventDefault();var a=e(t.currentTarget);a.toggleClass("active"),a.parent(".list-filter").find(".wrapper-filters").slideToggle("fast")}),e(".list-filter h5, .list-filter h6").on("click",function(t){t.preventDefault();var a=e(t.currentTarget);a.toggleClass("active"),a.next("ul").slideToggle("fast")}),e("[data-id='".concat(window.localStorage.getItem("filterProductFromProduct"),"']")).length>0){var t=e("[data-id='".concat(window.localStorage.getItem("filterProductFromProduct"),"']"));t.hasClass("list-lvl3")?(t.parent(".level-3").parent(".2").slideToggle("fast"),t.parent(".level-3").parent(".2").prev("h6").addClass("active"),t.parent(".level-3").parent(".2").parent(".level-2.first-sublevel").parent("ul").slideToggle("fast"),t.parent(".level-3").parent(".2").parent(".level-2.first-sublevel").parent("ul").prev("h5").addClass("active"),t.parent(".level-3").parent(".2").parent(".level-2.first-sublevel").parent("ul").parent(".sub-filters").parent(".wrapper-filters").slideToggle("fast"),t.parent(".level-3").parent(".2").parent(".level-2.first-sublevel").parent("ul").parent(".sub-filters").parent(".wrapper-filters").prev("h4").addClass("active")):t.hasClass("list-lvl2")&&(t.parent(".level-2").parent("ul").hasClass("sub-filters")?(t.parent(".level-2").parent("ul.sub-filters").parent(".wrapper-filters").slideToggle("fast"),t.parent(".level-2").parent("ul.sub-filters").parent(".wrapper-filters").prev("h4").addClass("active")):(t.parent(".level-2").parent("ul").slideToggle("fast"),t.parent(".level-2").parent("ul").prev("h5").addClass("active"),t.parent(".level-2").parent("ul").parent(".sub-filters").parent(".wrapper-filters").slideToggle("fast")))}e("h4.line-retail-title").on("click",function(){e(".list-filter.types").slideToggle(400),e(".list-filter.use-aplication").slideToggle(400)})}},s={init:function(){this.ajaxFilter(),this.preFilter(),this.getFilters()},categoriesSelected:[],categoriesID:[],typesSelected:[],typesID:[],getFilters:function(){var t,a=window.location.search.substring(1).split("&"),o=e(".list-filter").find(".list-item");for(iFilter=0;iFilter<o.length;iFilter++){var n=o[iFilter];for(iVariable=0;iVariable<a.length;iVariable++)t=a[iVariable],n.dataset.id==t&&n.click()}},ajaxFilter:function(){e(".list-item").on("click",function(t){var a,o,n,i,r;t.preventDefault(),e(this).hasClass("active")?(e(this).removeClass("active"),a=s.categoriesSelected.indexOf(e(this).data("slug")),o=s.typesSelected.indexOf(e(this).data("slug")),n=s.categoriesID.indexOf(e(this).data("id")),i=s.typesID.indexOf(e(this).data("id")),a>-1&&s.categoriesSelected.splice(a,1),o>-1&&s.typesSelected.splice(o,1),n>-1&&s.categoriesID.splice(n,1),i>-1&&s.typesID.splice(i,1)):(e(this).addClass("active"),e(this).parents("#filter-uses-title").length?(s.categoriesSelected.push(e(this).data("slug")),s.categoriesID.push(e(this).data("id"))):e(this).parents("#filter-types-title").length&&(s.categoriesID.push(e(this).data("id")),s.typesSelected.push(e(this).data("slug")),s.typesID.push(e(this).data("id")))),r=s.categoriesID.join("&"),history.pushState(s.categoriesID,"Productos","?"+r),e.ajax({type:"GET",url:"/wp-admin/admin-ajax.php",dataType:"html",data:{action:"filter_products",category:s.categoriesSelected,type:s.typesSelected},success:function(t){HtmlSanitizer.AllowedAttributes.class=!0;var a=HtmlSanitizer.SanitizeHtml(t);e(".section-product").empty().append(a);var o=e(".list-products .product").length,n=Math.ceil(o/9);e(".list-products .product:gt(8)").hide(),o>0?e(".filter-pagination ul").append('<li class="current-page active"><a href="javascript:void(0)">1</a></li>'):e(".section-with-column.section-product .list-products").append('<h2 class="not-results">No se han encontrado productos con el criterio de búsqueda</h2>');for(var i=2;i<=n;i++)e(".filter-pagination ul").append('<li class="current-page"><a href="javascript:void(0)">'+i+"</a></li>");o>
19&&(e("body").hasClass("brasil")?e(".filter-pagination ul").append('<li class="btn-next-page"><a href="javascript:void(0)" class="next page-numbers">Seguinte »</a></li>'):e(".filter-pagination ul").append('<li class="btn-next-page"><a href="javascript:void(0)" class="next page-numbers">Siguiente »</a></li>')),e(".filter-pagination li.current-page").on("click",function(t){var a=e(t.currentTarget),o=a.index();if(a.hasClass("active"))return!1;e(".filter-pagination li").removeClass("active"),a.addClass("active"),e(".list-products .product").hide();for(var n=9*o,i=n-9;i<n;i++)e(".list-products .product:eq("+i+")").show()}),e(".filter-pagination li").on("click",function(t){var a=e(t.currentTarget).index();1==a?(e(".btn-prev-page").hide(),e(".btn-next-page").show()):a>1&&a<n?(e(".btn-prev-page").show(),e(".btn-next-page").show()):a==n&&(e(".btn-prev-page").show(),e(".btn-next-page").hide())}),e(".btn-next-page").on("click",function(t){var a=e(".filter-pagination li.active").index();if(a===n)return!1;a++,e(".filter-pagination li").removeClass("active"),e(".list-products .product").hide();for(var o=9*a,i=o-9;i<o;i++)e(".list-products .product:eq("+i+")").show();e(".filter-pagination li.current-page:eq("+(a-1)+")").addClass("active")}),e(".btn-prev-page").on("click",function(t){var a=e(".filter-pagination li.active").index();if(1===a)return!1;a--,e(".filter-pagination li").removeClass("active"),e(".list-products .product").hide();for(var o=9*a,n=o-9;n<o;n++)e(".list-products .product:eq("+n+")").show();e(".filter-pagination li.current-page:eq("+(a-1)+")").addClass("active")})}})})},preFilter:function(){var t=localStorage.getItem("filterProduct"),a=localStorage.getItem("filterProductFromProduct");null===t&&null===a||(e(".list-filter").find("[data-slug='"+t+"']").click(),localStorage.removeItem("filterProduct"),localStorage.removeItem("filterProductFromProduct"))}},c={init:function(){this.goToFilters(),this.sliderColors(),this.moreInformation(),this.mixColorants()},goToFilters:function(){e(".list-item").on("click",function(t){t.preventDefault(),e("body").hasClass("brasil")?window.location.href="/produtos?"+e(this).data("id"):window.location.href="/productos?"+e(this).data("id"),window.localStorage.setItem("filterProductFromProduct",e(this).data("id"))})},moreInformation:function(){e(".open-information").on("click",function(t){var a=e(t.currentTarget);a.toggleClass("open-active"),a.next(".content").toggleClass("open-content")})},sliderColors:function(){e(".single-producto .list-colors").hasClass("slider-desktop")?e(".single-producto .list-colors.slider-
1desktop").slick({prevArrow:'<i class="fas fa-chevron-left slick-prev"></i>',nextArrow:'<i class="fas fa-chevron-right slick-next"></i>',easing:"ease",slidesToShow:4,slidesToScroll:1,variableWidth:!0,responsive:[{breakpoint:992,settings:{slidesToShow:7,slidesToScroll:1}},{breakpoint:550,settings:{slidesToShow:6,slidesToScroll:1}},{breakpoint:480,settings:{slidesToShow:4,slidesToScroll:1}}]}):e(".single-producto .list-colors").slick({prevArrow:'<i class="fas fa-chevron-left slick-prev"></i>',nextArrow:'<i class="fas fa-chevron-right slick-next"></i>',easing:"ease",slidesToShow:4,slidesToScroll:1,variableWidth:!0,responsive:[{breakpoint:5e3,settings:"unslick"},{breakpoint:992,settings:{slidesToShow:7,slidesToScroll:1}},{breakpoint:550,settings:{slidesToShow:6,slidesToScroll:1}},{breakpoint:480,settings:{slidesToShow:4,slidesToScroll:1}}]})},mixColorants:function(){e(".list-colors.slider-desktop").on("click","li",function(t){t.preventDefault();var a=e(t.currentTarget),o="";e(".list-colors.slider-desktop li").removeClass("active"),a.addClass("active"),a.find(".base-corante").each(function(){var t=e(this).find("[data-title-corante]").data("titleCorante"),a=e(this).find("[data-hex-corante]").data("hexCorante"),n=e(this).find("[data-unit3l-corante]").data("unit3lCorante"),i=e(this).find("[data-3l-corante]").data("3lCorante"),r=e(this).find("[data-unit15l-corante]").data("unit15lCorante"),l=e(this).find("[data-15l-corante]").data("15lCorante");void 0!==a&&void 0!==t||(a="#e7e7e7",t=""),o+='<div class="block-colorant"><div class="info-formula"><div class="header header-3l">Formula para 3L</div><div class="header header-15l">Formula para 15L</div></div><div class="list-colorants"><div class="row-colorant"><div class="colorant-base"><svg version = "1.1" xmlns = "http://www.w3.org/2000/svg" xmlns: xlink = "http://www.w3.org/1999/xlink" x = "0px" y = "0px" viewBox = "0 0 75.26 75.75" xml: space = "preserve"><path class="bg-colorant" style="fill:'+a+'" d="M40.22,75.07c-4.52,0-32.65-1.08-32.65-5.06V41.41L0.9,31.52V5.11c2.83-6.13,71.32-5.68,73.46,0v26.13 L67.7,41.41v28.61C67.7,73.9,44.01,75.07,40.22,75.07L40.22,75.07z M37.62,10.93c18.44,0,33.47-1.91,33.47-4.27 c0-2.35-15.02-4.26-33.47-4.26c-18.41,0-33.43,1.91-33.43,4.26C4.19,9.02,19.21,10.93,37.62,10.93L37.62,10.93z"/><g style="fill:#ffffff;opacity:0.25;"><path class="st2" d="M25.06,78.82c1.49,0,3.01,0,4.5,0V42.54c-1.53-0.03-3.04-0.08-4.5-0.13V78.82z"/><path class="st2" d="M31.82,78.82h5.17V42.64c-1.76,0-3.49-0.01-5.17-0.03V78.82z"/><path class="st2" d="M66.83,78.82h1.81V40.79c-0.58,0.09-1.19,0.18-1.81,0.27V78.82z"/><path class="st2" d="M63.18,78.82c0.84,0,1.68,0,2.48,0V41.21c-0.78,0.09-1.62,0.19-2.48,0.28V78.82z"/><path class="st2" d="M58.28,78.82c1.05,0,2.11,0,3.17,0V41.66c-1.04,0.08-2.09,0.18-3.17,0.26V78.82z"/><path class="st2" d="M52.73,78.82c1.29,0,2.54,0,3.85,0V42.04c-1.25,0.08-2.53,0.14-3.85,0.22V78.82z"/><path class="st2" d="M45.93,78.82c1.5,0,3.01,0,4.52,0V42.4c-1.48,0.06-2.98,0.09-4.52,0.13V78.82z"/><path class="st2" d="M38.5,78.82h5.17V42.58c-1.68,0.04-3.41,0.06-5.17,0.06V78.82z"/><path class="st2" d="M41.03,32.66c-5.95,0-42.95-0.58-42.95-2.71v2.52c0,0.71,4.06,1.24,9.69,1.64l3.27,7.26 c-0.41-0.05-0.81-0.1-1.21-0.14v37.59c0.82,0,1.65,0,2.49,0V41.86c0.57,0.06,1.15,0.12,1.74,0.18v36.78c1.05,0,2.11,0,3.14,0 v-36.5c0.56,0.05,1.14,0.09,1.72,0.14v36.36c1.28,0,2.55,0,3.83,0V42.29c-0.09-0.01-0.18-0.01-0.28-0.02l-3.65-7.6 c9.54,0.36,19.37,0.49,22.2,0.49c5,0,36.15-0.62,36.15-2.7v-2.52C77.18,32.02,46.03,32.66,41.03,32.66z M19.87,42.12 c-0.25-0.02-0.51-0.03-0.76-0.05l-3.62-7.54c0.33,0.01,0.66,0.03,1,0.04L19.87,42.12z"/></g></svg><span>'+t+'</span></div><div class="value value-3l">'+i+" "+n+'</div><div class="value value-15l">'+l+" "+r+"</div></div></div></div>"}),e(".results-mix-colorants .containers-colorants").empty().html(o),e("html, body").animate({scrollTop:e(".results-mix-colorants").offset().top-200},500),e(".results-mix-colorants").addClass("open")})}},d={init:function(){this.calculatorForm()},calculatorForm:function(){e("form.calculadora").submit(function(){var t=e(this).find("#altura").val(),a=e(this).find("#ancho").val(),o=e(this).find("#d1").val(),n=e(this).find("#d2").val(),i=e(this).find("#d3").val(),r=e(this).find("#w1").val(),l=e(this).find("#w2").val(),s=e(this).find("#w3").val(),c=parseFloat(t)*parseFloat(a);if(isNaN(c))e("#resultOperation").html(0);
1else{resultD1=1.6*o,resultD2=3.2*n,resultD3=4.8*i,resultW1=.66*r,resultW2=1.65*l,resultW3=1.98*s;var d=2*new Number(c/parseFloat(e(this).data("rendimiento"))).toFixed(1);(d=d-resultD1-resultD2-resultD3-resultW1-resultW2-resultW3)>=0?D.hasClass("brasil")?e("#resultText").show().find("#resultOperation").html("<span class='text-decoration'> "+d+"</span> litros são necessários para 2 mãos"):e("#resultText").show().find("#resultOperation").html("Se necesitan <span class='text-decoration'> "+d+"</span> litros para 2 manos"):D.hasClass("brasil")?e("#resultText").show().find("#resultOperation").html("Mais área é necessária para calcular o número de litros de tinta"):e("#resultText").show().find("#resultOperation").html("Se necesita más area para calcular la cantidad de litros de pintura"),e("#area").val(c)}return!1})}},u={init:function(){this.calculatorFormCl()},calculatorFormCl:function(){e("form.calculadora").submit(function(){var t=e(this).find("#altura").val(),a=e(this).find("#ancho").val(),o=e(this).find("#d1").val(),n=e(this).find("#d2").val(),i=e(this).find("#d3").val(),r=e(this).find("#w1").val(),l=e(this).find("#w2").val(),s=e(this).find("#w3").val(),c=parseFloat(t)*parseFloat(a);if(isNaN(c))e("#resultOperation").html(0);else{resultD1=1.6*o,resultD2=3.2*n,resultD3=4.8*i,resultW1=.66*r,resultW2=1.65*l,resultW3=1.98*s;var d=parseFloat(e(this).data("manos")),u=parseFloat(e(this).data("rendimiento")),p=c-resultD1-resultD2-resultD3-resultW1-resultW2-resultW3,h=new Number(p/u)*d,f=new String(h)+"";(f=f.split("."))[1]>3?f=f[0]+","+f[1].substring(0,3):(f[0],f[1]),h>=0?1==h?e("#resultText").show().find("#resultOperation").html("Se necesita <span class='text-decoration'> ".concat(f,"</span> galón para ").concat(d," manos")):e("#resultText").show().find("#resultOperation").html("Se necesitan <span class='text-decoration'> ".concat(f,"</span> galones para ").concat(d," manos")):e("#resultText").show().find("#resultOperation").html("Se necesita más area para calcular la cantidad de galones de pintura"),e("#area").val(c)}return!1})}},p=function(){document.getElementById("retailLineMX").classList.contains("active")&&D.addClass("retailLineMX"),e(".retailLineMX .header-logo a").on("click",function(e){return e.preventDefault(),!1})},h=function(){document.getElementById("retailLineCL").classList.contains("active")&&D.attr("id","linea-retail-cl"),e("#linea-retail-cl .header-logo a").on("click",function(e){return e.preventDefault(),!1})},f=function(){document.getElementById("RexparProducts").classList.contains("active")&&(D.addClass(" rexpar-products "),D.attr("id","rexpar-products"))},m={init:function(){this.YtApi(),this.TabLinks()},YtApi:function(){var t=document.querySelector("#single-product-xadrez-tinta-acrilica").querySelector("#single-product__video"),a=t.querySelector("#videoID");if(t&&a){var o=function(){r=new YT.Player("player",{videoId:n,playerVars:{autoplay:1,mute:1,controls:0,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1,cc_load_policy:0,fs:0,end:0,enablejsapi:1},events:{onReady:function(e){t.addEventListener("click",function(){e.target.playVideo()})},onStateChange:function(t){t.data===YT.PlayerState.ENDED&&(e(".replay-video").show(),e(".replay-video").on("click",function(t){r.seekTo(0),r.playVideo(),e(".replay-video").delay(1500).hide()}))}}})},n=a.textContent,i=document.createElement("script");i.src="https://www.youtube.com/iframe_api";var r,l=document.getElementsByTagName("script")[0];l.parentNode.insertBefore(i,l),setTimeout(function(){o()},1600)}},TabLinks:function(){if(document.querySelector("#single-product-xadrez-tinta-acrilica").querySelector("#single-product__tabs")){var e=function(e){var o=e.currentTarget.getAttribute("data-tabname");a.forEach(function(e){e.style.display="none",e.classList.add("d-none")}),t.forEach(function(e){e.classList.remove("active")});var n=document.getElementById(o);n.style.display="block",n.classList.remove("d-none"),e.currentTarget.classList.add("active")},t=document.querySelectorAll(".tablinks"),a=document.querySelectorAll(".tabcontent");t.forEach(function(t){t.addEventListener("click",e)}),a.forEach(function(e){e.style.display="none",e.classList.add("d-none")});var o=document.getElementById("inspirese");o.style.display="block",o.classList.remove("d-none"),t[0].classList.add("active")}}},v={init:function(){this.modalOutSherwin()},clickModal:function(){e(".box-color").on("click",function(){var t=e(this).attr("data-modal-color"),a=e(this).attr("codigo-hexa");e(".modal-content-color2").attr("style",t);var o=e(this).attr("title-name");e(".color-info .modal-color-name").text(o),e(".color-info .modal-color-hexa").text(a)})},modalOutSherwin:function(){e("#paleta-sherwin-williams .wp-block-button__link").on("click",function(t){t.preventDefault();var a=e(t.currentTarget).attr("href");e("#outSW").modal("show"),e("#outSW .btn-blue").on("click",function(e){e.preventDefault(),window.open(a,"_blank")})})}},g={init:function(){this.tabColor()},tabColor:function(){var e=document.querySelectorAll(".li1"),t=document.querySelectorAll(".li2"),a=document.querySelectorAll(".li3"),o=document.querySelectorAll(".li4"),n=document.querySelectorAll(".bloque1"),i=document.querySelectorAll(".bloque2"),r=document.querySelectorAll(".bloque3"),l=document.querySelectorAll(".bloque4"),s=document.querySelectorAll(".contenedor"),c=1;
1s.forEach(function(e,t){c+=t,s[t].classList.add("contenedor"+c)}),e.forEach(function(t,a){e[a].addEventListener("click",function(){e.forEach(function(t,a){e[a].classList.remove("activo"),n[a].classList.remove("activo")}),e[a].classList.add("activo"),n[a].classList.add("activo")})}),t.forEach(function(e,a){t[a].addEventListener("click",function(){t.forEach(function(e,a){t[a].classList.remove("activo"),i[a].classList.remove("activo")}),t[a].classList.add("activo"),i[a].classList.add("activo")})}),a.forEach(function(e,t){a[t].addEventListener("click",function(){a.forEach(function(e,t){a[t].classList.remove("activo"),r[t].classList.remove("activo")}),a[t].classList.add("activo"),r[t].classList.add("activo")})}),o.forEach(function(e,t){o[t].addEventListener("click",function(){o.forEach(function(e,t){o[t].classList.remove("activo"),l[t].classList.remove("activo")}),o[t].classList.add("activo"),l[t].classList.add("activo")})});var d=document.querySelectorAll(".li-redirect");d.forEach(function(e,t){var a;a=urlredirect[t],d[t].addEventListener("click",function(){window.location.href=a})})}},b={init:function(){this.loadScripts()},loadScripts:function(){window.PRISM.embed(document.getElementById("prism-embed-root"),{bindCallback:function(e){e.publish,e.subscribe}})}},w={init:function(){this.sliderCustomerOpinion(),this.scrollToForm(),this.formValidations()},sliderCustomerOpinion:function(){e(".info-customer-opinion").slick({prevArrow:'<button class="slick-prev slick-arrow" aria-label="Previous" type="button" style><i class="fas fa-chevron-left slick-prev"></i></button>',nextArrow:'<button class="slick-next slick-arrow" aria-label="Next" type="button" style><i class="fas fa-chevron-right slick-next"></i></button>',dots:!1,infinite:!0,slidesToShow:4,slidesToScroll:1,responsive:[{breakpoint:920,settings:{slidesToShow:3,slidesToScroll:1}},{breakpoint:600,settings:{slidesToShow:2,slidesToScroll:1}},{breakpoint:480,settings:{slidesToShow:1,slidesToScroll:1}}]})},scrollToForm:function(){e(".cta-form").on("click",function(t){t.preventDefault(),e("html, body").animate({scrollTop:e(".form-section").offset().top-30},500)})},formValidations:function(){e(".form-section .wpcf7-tel").on("click",function(t){e(this).val("+569 ")}),D.hasClass("color-consultation")&&(e(".email-input").on("paste",function(e){return e.preventDefault(),!1}),e(".email-input").on("copy",function(e){return e.preventDefault(),!1}),e(".email-input").on("cut",function(e){return e.preventDefault(),!1}),e(".email-input").on("contextmenu",function(e){return!1})),e(".nombre-input").keypress(function(t){var a=t.which?t.which:event.keyCode;return!String.fromCharCode(a).match(/[^a-zA-Z\u00C0-\u017F\s]+$/)&&(!(e(this).val().length>50)&&void 0)}),e(".apellido-input").keypress(function(t){var a=t.which?t.which:event.keyCode;return!String.fromCharCode(a).match(/[^a-zA-Z\u00C0-\u017F\s]+$/)&&(!(e(this).val().length>50)&&void 0)}),e(".telefono-input").keypress(function(t){var a=t.which?t.which:event.keyCode;return!String.fromCharCode(a).match(/[^0-9]/)&&(!(e(this).val().length>14)&&void 0)}),e(".email-input").keypress(function(t){var a=t.which?t.which:event.keyCode;return!String.fromCharCode(a).match(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/)&&(!(e(this).val().length>64)&&void 0)})}},y={init:function(){this.accordionRegulations()},accordionRegulations:function(){e(".open-regulations").on("click",function(t){e(".regulations-list").toggleClass("open")})}},C={init:function(){this.sliderCards()},sliderCards:function(){e(".slider-colorsnap").slick({prevArrow:'<i class="fas fa-chevron-left slick-prev"></i>',nextArrow:'<i class="fas fa-chevron-right slick-next"></i>',dots:!0,autoplay:!0,autoplaySpeed:15e3,adaptiveHeight:!0,easing:"ease"})}},k={init:function(){this.ColorScroll(),this.ColorGallery(),this.ChangeTitle()},ColorScroll:function(){var t=e(window).scrollTop();e(".breadcrumbs").offset().top<t?e(".color-year").addClass("active-color"):e(".color-year").removeClass("active-color"),e(window).scroll(function(){var t=e(window).scrollTop();e(".breadcrumbs").offset().top<t?e(".color-year").addClass("active-color"):e(".color-year").removeClass("active-color")}
1),e(".section-presentation .chip-color").click(function(){return e("html, body").animate({scrollTop:e(".environments").offset().top},1e3),!1})},ColorGallery:function(){e(".btn-mobile .btn-color").on("click",function(t){var a=e(t.currentTarget),o=a.data("color"),n=a.css("background-color");e(".btn-mobile .btn-color").addClass("clicked"),e(".cards-color .card-color").removeClass("active"),e(".cards-color .card-color").hide(),setTimeout(function(){e(".cards-color").css("background-color",n)},1e3),e(".cards-color .card-color").each(function(){e(this).data("color")==o&&(e(this).show(),e(this).addClass("active"))})}),e(".cards-color .card-color").on("click",function(t){if(e(window).width()>991){var a=e(t.currentTarget);e(".cards-color .card-color").addClass("clicked"),e(".cards-color .card-color").removeClass("active"),a.addClass("active")}})},ChangeTitle:function(){if(D.hasClass("color-2023")){var t=e("title").text().replace("Color 2023","Color del Año 2023");e("title").text(t)}}},_={init:function(){this.customJS(),this.browserStores()},customJS:function(){if(e("body").hasClass("brasil")){e(".wpgmza-marker-listing-category-filter > span").html("Filtrar por:");var t=setInterval(function(){e(".wpgmza_map").length>0&&(e(".wpgmza-inner .wpgmza-search .wpgmza-search").val("Pesquisar"),e(".wpgmza-inner .wpgmza-reset .wpgmza-reset").val("Reinicialização"),clearInterval(t))},500),a=setInterval(function(){e(".wpgmza_marker_holder .dataTables_wrapper").length>0&&(e(".dataTables_filter label").prepend("<span>Encontre sua Loja</span>"),e(".dataTable #wpgmza_map_list_title").html("Loja"),e(".dataTable #wpgmza_map_list_address").html("Endereço"),clearInterval(a))},500)}else{e(".wpgmza-marker-listing-category-filter > span").html("Filtrar por:");var o=setInterval(function(){e(".wpgmza_map .wpgmza-inner").length>0&&(e(".wpgmza-inner .wpgmza-search .wpgmza-search").val("Buscar"),e(".wpgmza-inner .wpgmza-reset .wpgmza-reset").val("Restaurar"),clearInterval(o))},500),n=setInterval(function(){e(".wpgmza_marker_holder .dataTables_wrapper").length>0&&(e(".dataTable #wpgmza_map_list_title").html("Tiendas"),e(".dataTable #wpgmza_map_list_address").html("Dirección"),clearInterval(n))},500)}},browserStores:function(){if(e("body").hasClass("argentina"))var t=setInterval(function(){1==e("#wpgmza_table_1_filter label input").length&&(e("#wpgmza_table_1_filter label input").addClass("searchFinal"),e("#wpgmza_table_1_filter label input").hide(),e("#wpgmza_table_1_filter label").append("<input type='text' class='input-search'/>"),e("#wpgmza_table_1_filter").append("<button type='submit' class='buttonSearch' id='buttonSearch'> Buscar </button>"),clearInterval(t))},500),a=setInterval(function(){if(1==e("#wpgmza_table_1_filter .buttonSearch").length){var t=document.getElementById("buttonSearch");e(".input-search").keypress(function(t){"13"==(t.keyCode?t.keyCode:t.which)&&e("#buttonSearch").click()}),t.addEventListener("click",function(t){var a=e("#wpgmza_table_1_filter label .input-search").val();e("#wpgmza_table_1_filter label .searchFinal").val(a);var o=setInterval(function(){e("#wpgmza_table_1_filter label .searchFinal").val().length>0&&(e("#wpgmza_table_1_filter label .input-search").remove(),e("#wpgmza_table_1_filter label .searchFinal").show(),document.querySelector(".searchFinal").dispatchEvent(new Event("input")),e("#buttonSearch").prop("disabled",!0),clearInterval(o))},500),n=setInterval(function(){0==e("#wpgmza_table_1_filter label .searchFinal").val().length&&(e("#wpgmza_table_1_filter label input").hide(),0==e("#wpgmza_table_1_filter label .input-search").length&&(e("#wpgmza_table_1_filter label").append("<input type='text' class='input-search'/>"),e("#buttonSearch").removeAttr("disabled"),e(".input-search").keypress(function(t){"13"==(t.keyCode?t.keyCode:t.which)&&e("#buttonSearch").click()})),clearInterval(n))},500)}),clearInterval(a)}},500);else if(e("body").hasClass("brasil"))var o=setInterval(function(){1==e("#wpgmza_table_4_filter label input").length&&(e("#wpgmza_table_4_filter label input").addClass("searchFinal"),e("#wpgmza_table_4_filter label input").hide(),e("#wpgmza_table_4_filter label").append("<input type='text' class='input-search'/>"),e("#wpgmza_table_4_filter").append("<button type='submit' class='buttonSearch' id='buttonSearch'> Pesquisar </button>"),clearInterval(o))},500),n=setInterval(function(){if(1==e("#wpgmza_table_4_filter .buttonSearch").length){var t=document.getElementById("buttonSearch");e(".input-search").keypress(function(t){"13"==(t.keyCode?t.keyCode:t.which)&&e("#buttonSearch").click()}),t.addEventListener("click",function(t){var a=e("#wpgmza_table_4_filter label .input-search").val();e("#wpgmza_table_4_filter label .searchFinal").val(a);var o=setInterval(function(){e("#wpgmza_table_4_filter label .searchFinal").val().length>0&&(e("#wpgmza_table_4_filter label .input-search").remove(),e("#wpgmza_table_4_filter label .searchFinal").show(),document.querySelector(".searchFinal").dispatchEvent(new Event("input")),e("#buttonSearch").prop("disabled",!0),clearInterval(o))},500),n=setInterval(function(){0==e("#wpgmza_table_4_filter label .searchFinal").val().length&&(e("#wpgmza_table_4_filter label input").hide(),0==e("#wpgmza_table_4_filter label .input-search").length&&(e("#wpgmza_table_4_filter label").append("<input type='text' class='input-search'/>"),e("#buttonSearch").removeAttr("disabled"),e(".input-search").keypress(function(t){"13"==(t.keyCode?t.keyCode:t.which)&&e("#buttonSearch").click()})),clearInterval(n))},500)}),clearInterval(n)}},500)}}
1,S={init:function(){this.eventsCalendar()},eventsCalendar:function(){e(".large-region").on("change",function(){var t=e(".large-region").find(":selected").data("provincia");e(".card-body .event").show(),e(".card-body .event").removeClass("show hidden"),e(".small-region").prop("selectedIndex",0),e(".small-region option").hide(),e(".small-region option[data-localidad='"+t+"']").show()}),e(".small-region").on("change",function(){var t=e(".small-region").find(":selected").attr("value");e(".card-body .event").show(),e(".card-body .event").removeClass("show hidden"),e(".card-body .event").each(function(){e(this).data("event-location")!=t?e(this).hide().toggleClass("hidden"):e(this).toggleClass("show")})})}},x={init:function(){this.anchorsMenu(),this.sliderSwPro(),this.getCodeFormRegister(),this.initSelect2()},anchorsMenu:function(){var t=location.hash.replace(/^#/,"");t&&e('.nav-tabs a[href="#'+t+'"]').tab("show"),e(".nav-tabs a").on("shown.bs.tab",function(e){window.location.hash=e.target.hash})},sliderSwPro:function(){if(e("body").hasClass("chile")){var t=e(".sliders"),a=t.find(".slider-content").length,o={autoplay:!0,autoplaySpeed:9500,easing:"ease"};o.dots=!(a<=1),t.slick(o)}},getCodeFormRegister:function(){e(".telefono-form-chile").each(function(){}),e('.wpcf7-form-control-wrap[data-name="swpro-tel"]').addClass("tel-base"),e(".telefono-form-chile").keypress(function(t){var a=t.which?t.which:t.keyCode;return!String.fromCharCode(a).match(/[^0-9]/)&&(!(e(this).val().length>7)&&void 0)}).bind("copy paste","input",function(e){e.preventDefault()}),document.addEventListener("wpcf7mailsent",function(t){var a=document.getElementById("modalPro"),o=document.getElementsByClassName("close")[0],n=document.getElementById("custom_code"),i=document.getElementById("download-code");o.onclick=function(){a.style.display="none",location.reload(!0)},window.onclick=function(e){e.target==a&&(a.style.display="none")},e.post({dataType:"json",url:SITE_API.api_url,data:{action:"get_promo_code",nonce:SITE_API.api_nonce},success:function(e){n.innerText=e.code,a.style.display="flex",i.addEventListener("click",function(){var e=document.querySelector(".code_print");html2canvas(e).then(function(e){var t=document.createElement("a");t.href=e.toDataURL("image/png"),t.download="SW-CUPON.png",t.click()})})}})},!1),document.addEventListener("wpcf7submit",function(t){var a=e(".wpcf7-submit[disabled]"),o=a.attr("data-value");a.prop("disabled",!1),a.val(o)},!1),e("form.wpcf7-form").on("submit",function(){var t=e(this).find("input[type=submit]"),a=t.val();t.attr("data-value",a),t.prop("disabled",!0),t.val("Enviando...")})},initSelect2:function(){e(".select-comuna-form").select2({language:{noResults:function(){return"No hay resultados"},searching:function(){return"Buscando.."}}})}},T={init:function(){this.toolHelper({})},toolHelper:function(){e(".tools .choice").on("change",function(t){e(t.currentTarget).addClass("empty")})}},I={init:function(){jQuery(".colors-wrapper").each(function(){var e=jQuery(this).data("palette");I.getTotalColors(e)}),jQuery(document).on("click",".pagination-link",function(e){e.preventDefault();var t=jQuery(this).data("page"),a=jQuery(this).data("palette");I.loadColorsPage(a,t);var o=document.getElementById("colors-container-"+a);window.innerWidth<=768&&o.scrollIntoView({behavior:"smooth"})})},getTotalColors:function(e){var t=jQuery("#colors-container-".concat(e)).closest("[data-post-id]").data("post-id")||0;jQuery.ajax({url:SITE_API.api_url,type:"POST",data:{action:"get_total_colors",palette_id:e,post_id:t},success:function(t){var a=parseInt(t);isNaN(a)&&(console.error("Invalid total colors received:",t),a=0);
1I.initPalette(e,a,12)},error:function(t,a,o){console.error("Error getting total colors:",a,o);I.initPalette(e,0,12)}})},loadColorsPage:function(e,t){var a=jQuery("#colors-container-".concat(e)).closest("[data-post-id]").data("post-id")||0;jQuery.ajax({url:SITE_API.api_url,type:"POST",data:{action:"load_palette_colors",palette_id:e,page:t,post_id:a},beforeSend:function(){jQuery("#colors-container-".concat(e," .colors-list")).html('<div class="colors-wrapper__loader-container"><div class="colors-wrapper__loader"><span>Loading colors...</span></div></div>')},success:function(t){jQuery("#colors-container-".concat(e," .colors-list")).html(t)},error:function(t,a,o){console.error("AJAX Error:",a,o),jQuery("#colors-container-".concat(e," .colors-list")).html('<div class="colors-wrapper__error"><p>Error loading colors...</p></div>')}})},generatePagination:function(e,t,a,o){for(var n=Math.ceil(a/o),i='<div class="pagination">',r=1;r<=n;r++)i+='<a href="#" class="pagination-link" data-page="'.concat(r,'" data-palette="').concat(e,'">').concat(r,"</a>");i+="</div>",jQuery("#colors-container-".concat(e," .pagination-container")).html(i),jQuery("#colors-container-".concat(e," .pagination-link")).on("click",function(t){t.preventDefault();var a=jQuery(this).data("page");I.loadColorsPage(e,a),jQuery("#colors-container-".concat(e," .pagination-link")).removeClass("active"),jQuery(this).addClass("active")})},initPalette:function(e,t,a){var o=jQuery("#colors-container-".concat(e)).closest("[data-post-id]").data("post-id")||0,n=1===jQuery("#colors-container-".concat(e)).data("use-paginator");t>12&&n&&I.generatePagination(e,o,t,a),I.loadColorsPage(e,1),jQuery("#colors-container-".concat(e,' .pagination-link[data-page="1"]')).addClass("active")}},E={init:function(){this.openImageModal()},openImageModal:function(){e(".timeline .image img").on("click",function(t){t.preventDefault();var a=e(t.currentTarget);e("#swModalImage .modal-body").empty(),a.clone().appendTo("#swModalImage .modal-body"),e("#swModalImage").modal("show")})}},z={init:function(){this.optionalField(),this.validationInputs()},optionalField:function(){e(".curso .first input").change(function(){this.checked?(e(".optional-field").hide(),e(".optional-field .last input").prop("checked",!0)):(e(".optional-field").show(),e(".optional-field .last input").prop("checked",!1))}),e(".curso .last input").change(function(){this.checked&&(e(".optional-field").show(),e(".optional-field .last input").prop("checked",!1))})},validationInputs:function(){e(".nombre-form, .apellido-form, .text-without-special-characters").on("input",function(){this.value=this.value.replace(/[^A-Za-zÃÃÃÃÃáéÃóúÃñ\s]/g,""),e(this).val().length>50&&e(this).val(e(this).val().substring(0,50))}),e(".telefono-form").on("input",function(){this.value=this.value.replace(/[^0-9]/g,""),e(this).val().length>14&&e(this).val(e(this).val().substring(0,14))}),e(".email-form").on("input",function(){this.value=this.value.replace(/[^a-zA-Z0-9@._-]/g,""),e(this).val().length>64&&e(this).val(e(this).val().substring(0,64))})}},L={init:function(){this.getPromoCode(),window.addEventListener("load",function(){var e="promo-24h-notification"===document.body.id,t=document.getElementById("location-search-results");e&&t&&window.scrollTo({top:0,left:0,behavior:"smooth"})})},getPromoCode:function(){e.post({dataType:"json",url:SITE_API.api_url,data:{action:"get_promo_code_chile",nonce:SITE_API.api_nonce},success:function(e){L.renderPromoCode(e)}})},renderPromoCode:function(t){var o=t.code,n=t.created_at,r=document.createElement("div");r.classList.add("promo-code-container");var l=document.createElement("div");l.classList.add("promo-code-text");var s=document.createElement("span");s.textContent=o;var c=document.createTextNode("CUPÃN ÃNICO: ");l.appendChild(c),l.appendChild(document.createElement("br")),l.appendChild(s);var d=document.createElement("div");d.classList.add("promo-code-date","hidden-for-front");var u=document.createTextNode("Fecha: ");d.appendChild(u);var p=document.createElement("span");p.textContent=n,d.appendChild(p),r.appendChild(l),r.appendChild(d);var h=document.createElement("div");h.classList.add("promo-code-buttons","print-omit");var f=document.createElement("button");f.classList.add("promo-code-button-download"),f.textContent="Descargar Cupón",f.addEventListener("click",i(a().m(function e(){var t;return a().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,f.textContent="Descargando...",e.n=1,L.downloadPromoCode();
1case 1:f.textContent="Descargar Cupón",e.n=3;break;case 2:e.p=2,t=e.v,f.textContent="Descargar Cupón",console.error("Ocurrió un error al descargar la imagen:",t);case 3:return e.a(2)}},e,null,[[0,2]])})));var m=document.createElement("a");m.classList.add("promo-code-link-terms"),m.textContent="Ver Términos",m.href="#terms",h.appendChild(f),h.appendChild(m),r.appendChild(h);var v=e(".container-block.top-banner"),g=document.querySelector(".section-general-page"),b=f.cloneNode(!0);b.addEventListener("click",i(a().m(function e(){var t;return a().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,b.textContent="Descargando...",e.n=1,L.downloadPromoCode();case 1:b.textContent="Descargar Cupón",e.n=3;break;case 2:e.p=2,t=e.v,b.textContent="Descargar Cupón",console.error("Ocurrió un error al descargar la imagen:",t);case 3:return e.a(2)}},e,null,[[0,2]])})));var w=document.createElement("div");w.classList.add("promo-download-below"),w.appendChild(b),g&&g.appendChild(w),v.length?(v.attr("id","banner-container"),v.append(r)):console.warn("Element with Class '.container-block.top-banner' not found.")},downloadPromoCode:(o=i(a().m(function e(){var o,n,i,r,l,s,c,d,u,p,h,f,m,v,g;return a().w(function(e){for(;;)switch(e.n){case 0:o=["banner-container","terms"],n=[],i=[],r=a().m(function e(){var t,o,r,c,d,u,p,h,f,m,v,g,b;return a().w(function(e){for(;;)switch(e.n){case 0:if(t=s[l],!(o=document.getElementById(t))){e.n=4;break}return r=[],(c=document.createElement("div")).style.position="fixed",c.style.left="0",c.style.width="1200px",c.style.backgroundColor="#ffffff",c.style.boxSizing="border-box",c.style.fontSize="22px",c.style.fontFamily='"Arial", sans-serif',c.style.lineHeight="1.35",c.style.color="#333333",c.style.fontWeight="400",c.style.marginTop="0",c.innerHTML=o.innerHTML,document.body.appendChild(c),c.querySelectorAll("picture").forEach(function(e){e.style.width="100%",e.style.display="block",e.style.maxWidth="none"}),c.querySelectorAll("picture img").forEach(function(e){e.style.width="100%",e.style.height="auto",e.style.maxWidth="none",e.style.display="block",e.style.objectFit="cover"}),c.querySelectorAll("img").forEach(function(e){e.closest("picture")||(e.style.width="100%",e.style.height="auto",e.style.maxWidth="none",e.style.display="block")}),"terms"===t&&(c.querySelectorAll("ul, ol").forEach(function(e){e.style.listStyle="none",e.style.paddingLeft="0"}),c.querySelectorAll("li").forEach(function(e){e.style.position="relative",e.style.paddingLeft="15px",e.style.marginInline="10px",e.style.fontSize="22px",e.style.fontFamily='"Arial", sans-serif',e.style.fontWeight="400",e.style.lineHeight="1.6",e.style.color="#333333";var t=document.createElement("span");t.textContent="â¢",t.style.cssText="\n position: absolute !important;\n left: 0px !important;\n top: 0.4em !important;\n font-size: 20px !important;\n line-height: 1 !important;\n color: black !important;\n width: 15px !important;\n height: 20px !important;\n display: block !important;\n z-index: 999 !important;\n ",e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)})),"banner-container"===t&&((d=c.querySelector(".promo-code-text"))&&(d.style.fontSize="47px",d.style.fontWeight="bold",d.style.lineHeight="1.2",(u=d.querySelector("span"))&&(u.style.fontSize="53px",u.style.fontWeight="bold",u.style.display="block",u.style.marginTop="10px")),(p=c.querySelector(".promo-code-date"))&&(p.style.fontSize="19px",p.style.lineHeight="1.5",p.style.marginTop="15px"),(h=c.querySelector(".promo-code-container"))&&(h.style.paddingBottom="28px")),c.offsetHeight,e.n=1,new Promise(function(e){return setTimeout(e,3
100)});case 1:return c.offsetHeight,c.scrollTop=0,f=c.scrollHeight,m=f+10,"banner-container"===t&&(m=Math.max(m-900,580)),v=c.getBoundingClientRect(),c.querySelectorAll("a").forEach(function(e){var t=e.getBoundingClientRect(),a=t.left-v.left,o=t.top-v.top;r.push({url:e.href,x:Math.round(a),y:Math.round(o),width:Math.round(t.width),height:Math.round(t.height)})}),c.offsetHeight,e.n=2,new Promise(function(e){return setTimeout(e,100)});case 2:return e.n=3,html2canvas(c,{ignoreElements:function(e){return e.classList.contains("print-omit")},scale:1,useCORS:!0,allowTaint:!0,backgroundColor:"#ffffff",width:1200,height:m,scrollX:0,scrollY:0,windowWidth:1200,windowHeight:m+100,logging:!1});case 3:g=e.v,b=g.toDataURL("image/png"),n.push({imgData:b,height:g.height,width:g.width}),i.push(r),document.body.removeChild(c);case 4:return e.a(2)}},e)}),l=0,s=o;case 1:if(!(l<s.length)){e.n=3;break}return e.d(t(r()),2);case 2:l++,e.n=1;break;case 3:c=new window.jspdf.jsPDF({orientation:"portrait",unit:"pt",format:"a4"}),d=c.internal.pageSize.getWidth(),u=c.internal.pageSize.getHeight(),h=d-40,f=p=20,m=!0,v=a().m(function e(){var t,o,r,l,s,d,v;return a().w(function(e){for(;;)switch(e.n){case 0:t=n[g],o=t.imgData,r=t.height,l=t.width,s=Math.min(h/l,1),d=l*s,v=r*s,!m&&f+v>u-p&&(c.addPage(),f=p),c.addImage(o,"PNG",p,f,d,v),i[g].forEach(function(e){var t=p+e.x*s,a=f+e.y*s,o=e.width*s,n=e.height*s;c.link(t+1,a-2,o+3,n+4,{url:e.url,newWindow:!0})}),f+=v+10,m=!1;case 1:return e.a(2)}},e)}),g=0;case 4:if(!(g<n.length)){e.n=6;break}return e.d(t(v()),5);case 5:g++,e.n=4;break;case 6:c.save("Cupon-promo.pdf");case 7:return e.a(2)}},e)})),function(){return o.apply(this,arguments)})};n.init();var D=e("body");D.hasClass("home")&&r.init(),(D.hasClass("productos")||D.hasClass("produtos")||D.hasClass("single-producto")||D.hasClass("single-produto"))&&l.init(),(D.hasClass("productos")||D.hasClass("produtos"))&&s.init(),(D.hasClass("single-producto")||D.hasClass("single-produto"))&&c.init(),D.hasClass("single-producto")&&!D.hasClass("chile")&&d.init(),D.hasClass("single-producto")&&D.hasClass("chile")&&u.init(),D.hasClass("productos mexico")&&p(),D.hasClass("productos argentina")&&f(),D.hasClass("productos chile")&&h(),D.hasClass("xadrez-tinta-acrilica")&&m.init(),D.hasClass("colores")&&v.init(),D.hasClass("cores")&&g.init(),(D.hasClass("digital-color-wall")||D.hasClass("colorsnap-visualizer-web"))&&b.init(),D.hasClass("color-consultation")&&w.init(),D.hasClass("a-sua-cor")&&y.init(),D.hasClass("colorsnap-visualizer-app")&&C.init(),(D.hasClass("color-2023")||D.hasClass("cor-do-ano-2023")||D.hasClass("color-2024")||D.hasClass("cor-do-ano-2024")||D.hasClass("capsula-de-cores-do-ano-2025")||D.hasClass("color-2025")||D.hasClass("color-2026")||D.hasClass("cor-do-ano-2025")||D.hasClass("cor-do-ano-2026")||D.hasClass("page-template-page-color-year")||D.hasClass("capsula-de-cores-do-ano-2025"))&&k.init(),"wpgomaps"==D.attr("id")&&_.init(),D.hasClass("calendario")&&S.init(),(D.hasClass("sw-pro")||D.hasClass("sw-pro-pintor")||D.hasClass("sherwin-williams-pro")||D.hasClass("sw-pro-app"))&&x.init(),D.hasClass("servicio-tecnico")&&T.init(),D.hasClass("single-color-collection")&&I.init(),(D.hasClass("nuestra-historia")&&D.hasClass("conozca-sherwin")||D.hasClass("nossa-historia")&&D.hasClass("conheca-a-sherwin"))&&E.init(),(D.hasClass("registro")||D.hasClass("contactenos")||D.hasClass("contactanos")||D.hasClass("contacto"))&&z.init(),D.is("#promo-24h-notification")&&L.init()})}(); 2//# sourceMappingURL=app.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.