!function(){var t=navigator.userAgent;if(null!=/.*(MercadoLibre-).*/i.exec(t))return!1;function e(){this.COOKIE_REDIRECT="redirect",this.COOKIE_NOTIF="notif_d",this.COOKIE_VIP_COUNT="vip_c",this.COOKIE_VIP_COUNTER_EXPIRE="vip_cexp",this.COOKIE_ML_COUT="_ml_clout",this.COOKIE_A2HS_REFUSED="refused_a2hs",this.COOKIE_A2HS_ATTEMPTED="attempted_a2hs",this.COOKIE_A2HS_REDIRECT="redirect_a2hs",this.DOWNLOAD_APP_BANNER_CLOSED_COOKIE="nav_dab_closed",this.DOWNLOAD_APP_BANNER_LAST_CLOSED_COOKIE="nav_dab_last_closed",this.ML_CLOUT_WRONG_VALUE=-10,this.ML_CLOUT_ABOUT_TO_GET_BLOCK=2,this.NOTIF_EXPIRE_TIME=15,this.A2HS_REDIRECT_EXPIRE_TIME=365,this.DAYS_TO_RETRY_A2HS=15,this.BANNER_CLOSED_DAYS_THRESHOLD=10,this.BANNER_CLOSED_SESSION_THRESHOLD=1,this.TIMES_BANNER_CAN_BE_CLOSED=3,this.NOTIF_HIDE_EXPIRE=this.calculateDays(this.NOTIF_EXPIRE_TIME),this.BANNER_NOTIF_CONFLICT_EXPIRE=this.calculateMinutes(15),this.COUNTER_EXPIRE=this.calculateDays(2),this.BANNER_DOWNLOAD_DATE=this.getCookie(this.COOKIE_REDIRECT),this.NOTIF_CLOSE_DATE=this.getCookie(this.COOKIE_NOTIF),this.A2HS_REFUSED=this.getCookie(this.COOKIE_A2HS_REFUSED),this.A2HS_ATTEMPTED=this.getCookie(this.COOKIE_A2HS_ATTEMPTED),this.A2HS_REDIRECT=this.getCookie(this.COOKIE_A2HS_REDIRECT),this.SNACKBAR_HASH_SUCCESS="subscriptionSuccess",this.SNACKBAR_HASH_FAIL="subscriptionFail",this.SNACKBAR_HASH_BLOCKED="subscriptionBlocked",this.SNACKBAR_HASH_DISABLED="subscriptionDisabled",this.A2HS_MODAL_SELECTOR="a2hs-modal",this.A2HS_BUTTON_ALLOW_SELECTOR="accept-a2hs-button",this.A2HS_BUTTON_CANCEL_SELECTOR="refuse-a2hs-button",this.A2HS_BUTTON_CLOSE_SELECTOR="close-a2hs-button",this.A2HS_BUTTON_NOTUNDERSTAND_SELECTOR="not-understand-a2hs-button",this.A2HSclickActionBinded=this.A2HSclickAction.bind(this),this.DEVICE=this.getDevice(),this.NOW=(new Date).getTime(),this.CURRENT_PAGE=this.getCurrentPage(),this.wordings={notifications:{title:{es:"¿Quieres recibir notificaciones?",pt:"Quer receber notificações?"},text:{es:"Te escribiremos solo para avisarte si ocurre algo importante con tus compras y ventas.",pt:"Avisaremos você apenas se ocorrer algo importante com as suas compras e vendas."},accept:{es:"Siguiente",pt:"Próxima"},cancel:{es:"Ahora no",pt:"Agora não"}},snackbar:{success:{es:"¡Listo! Estás suscripto a las notificaciones.",pt:"Pronto! Você receberá notificações das suas negociações."},fail:{es:"Hubo un error, vuelve a intentarlo.",pt:"Ocorreu um erro, tente novamente."},disabled:{es:"Habilita los permisos del navegador para recibir notificaciones.",pt:"Habilite as permissões do navegador para receber notificações."}}},this.styles={newhome:"",base:"",notifications:"",animation:""},this.markup={freeDataDisclaimer:'

Válido para Vivo

',loading:'
',notifications:''},this.excludeSitesBanner=["MLM","MLC","MLA","MLB"],this.isSlowNetwork()||null==this.DEVICE||this.isFbApp()||this.show()}e.prototype.getDevice=function(){var t=navigator.userAgent,e=/.*(android|iphone|ipod).*/i.exec(t);if(null!=e){var i=e[1].toLowerCase();"ipod"!=i&&"iphone"!=i||(i="ios");return null==/.*(windows|nokia).*/i.exec(t)?i.toUpperCase():null}return null},e.prototype.isSupportedBrowserForNotifications=function(){var t=navigator.userAgent.match("Chrome[ /]+[0-9]+(.[0-9]+)*");if(t&&t[0]){var e=t[0].split("/")[1],i=e.split(".")[0];return!(!e||!i)&&parseInt(i,10)>50}return!1},e.prototype.getMarkup=function(t){var e="";return"NOTIF"===t&&(e=this.styles.animation+this.styles.notifications+this.markup.notifications,e=this.isPortuguese()?(e=(e=(e=e.replace("##NOTIF_TITLE##",this.wordings.notifications.title.pt)).replace("##NOTIF_TEXT##",this.wordings.notifications.text.pt)).replace("##NOTIF_ACCEPT##",this.wordings.notifications.accept.pt)).replace("##NOTIF_CANCEL##",this.wordings.notifications.cancel.pt):(e=(e=(e=e.replace("##NOTIF_TITLE##",this.wordings.notifications.title.es)).replace("##NOTIF_TEXT##",this.wordings.notifications.text.es)).replace("##NOTIF_ACCEPT##",this.wordings.notifications.accept.es)).replace("##NOTIF_CANCEL##",this.wordings.notifications.cancel.es)),e},e.prototype.addEvent=function(t,e,i){var n=document.getElementById(t);n&&n.addEventListener(e,(function(t){i(),t.stopPropagation(),t.preventDefault()}))},e.prototype.freezeBody=function(){document.body.classList?document.body.classList.add("freeze"):document.body.className+=" freeze"},e.prototype.unfreezeBody=function(){document.body.classList?document.body.classList.remove("freeze"):document.body.className=document.body.className.replace(new RegExp("(^|\\b)freeze(\\b|$)","gi")," ")},e.prototype.isFbApp=function(){var t=navigator.userAgent;return null!=/.*(FBForIphone|FBAN|FB4A).*/i.exec(t)},e.prototype.showNotificationsBanner=function(t,e){var i=document.getElementById("splash"),n=document.getElementById("banner"),o=document.getElementById("notif-banner");if(null===i&&null===n&&null===o){var s=this.getMarkup(t);setTimeout(function(){var t=document.createElement("div");t.id="notif-banner",t.innerHTML=this.styles.newhome+this.styles.base+s,document.body&&(document.body.insertBefore(t,document.body.firstChild),meli_ga("send","event","NOTIFICATIONS","PUSH_SHOW",e)),this.addEvent("accept-notif","click",function(){this.goToNotificationsCenter(e)}.bind(this)),this.addEvent("cancel-notif","click",function(){this.setCancelCookieAndCloseNotif(e)}.bind(this))}.bind(this),5)}},e.prototype.getTemplateBullets=function(){var t=this.getSiteId(),e="MLB"===t||"MPT"===t?"pt":"es",i=window.navigator.userLanguage||window.navigator.language,n={title:{es:"Prueba Mercado Libre Lite,
nuestra app hecha más liviana",pt:"Use o novo app Lite do
Mercado Livre"},bullet1:{es:"Ocupa solo 1 MB.",pt:"Ocupa apenas 1 MB."},bullet2:{es:"Es más rápida.",pt:"Navega mais rápido."},cancelButton:{es:"Ahora no",pt:"Agora não"},notUnderstandButton:{es:"Quiero saber más",pt:"Quero saber mais"}},o="Añadir",s=o+" la app Lite";function a(){var t=navigator.userAgent;return t.indexOf("Android")>=0&&parseFloat(t.slice(t.indexOf("Android")+8))}return"es-US"===i||"es-419"===i&&a()&&a()<7?s=(o="Agregar")+" la app Lite":0===i.indexOf("en")?s=(o="Add")+" app Lite":0===i.indexOf("pt")&&(s=(o="Adicionar")+" o app Lite"),"

'+n.title[e]+'

  • '+n.bullet1[e]+"
  • "+n.bullet2[e]+'
"},e.prototype.A2HSclickAction=function(t){switch(t.target.className){case this.A2HS_BUTTON_CLOSE_SELECTOR:meli_ga("send","event","PWA","MODAL_DISMISS_AP",this.CURRENT_PAGE),this.setCookie(this.COOKIE_A2HS_REFUSED,1,this.DAYS_TO_RETRY_A2HS),this.hideA2HSModal();break;case this.A2HS_BUTTON_ALLOW_SELECTOR:meli_ga("send","event","PWA","MODAL_TRY_NOW_AP",this.CURRENT_PAGE),this.redirectToA2HSLanding(this.CURRENT_PAGE);break;case this.A2HS_BUTTON_CANCEL_SELECTOR:meli_ga("send","event","PWA","MODAL_NOT_NOW_AP",this.CURRENT_PAGE),this.setCookie(this.COOKIE_A2HS_REFUSED,1,this.DAYS_TO_RETRY_A2HS),this.hideA2HSModal();break;case this.A2HS_BUTTON_NOTUNDERSTAND_SELECTOR:meli_ga("send","event","PWA","MODAL_NOT_UNDERSTAND_AP",this.CURRENT_PAGE),this.setCookie(this.COOKIE_A2HS_REFUSED,1,this.DAYS_TO_RETRY_A2HS),this.redirectToA2HSLanding("NOT_UNDERSTAND");break;default:return!1}},e.prototype.showA2HSModal=function(){document.body.style.overflow="hidden",this.wrapper=document.createElement("div"),this.wrapper.className=this.A2HS_MODAL_SELECTOR,this.wrapper.style.backgroundColor="rgba(0,0,0,0.7)",this.wrapper.style.top="0",this.wrapper.style.position="fixed",this.wrapper.style.height="100%",this.wrapper.style.width="100%",this.wrapper.style.left=0,this.wrapper.style.zIndex=1e3,this.wrapper.innerHTML=this.getTemplateBullets(),document.body.appendChild(this.wrapper),this.wrapper.addEventListener("click",this.A2HSclickActionBinded),this.deleteCookie(this.COOKIE_A2HS_ATTEMPTED),meli_ga("send","event","PWA","SHOW_AP",this.CURRENT_PAGE,{nonInteraction:!0}),this.setCookie(this.COOKIE_A2HS_REDIRECT,1,this.A2HS_REDIRECT_EXPIRE_TIME)},e.prototype.hideA2HSModal=function(){this.wrapper&&this.wrapper.removeEventListener("click",this.A2HSclickActionBinded),document.body.style.overflow="scroll",document.body.removeChild(document.getElementsByClassName(this.A2HS_MODAL_SELECTOR)[0])},e.prototype.redirectToA2HSLanding=function(t){var e=window.location.host.replace(/^.*?\./,"");window.location.href="https://www."+e+"/pwa?origin="+encodeURIComponent(t)},e.prototype.isPortuguese=function(){var t=this.getSiteId();return"MLB"===t||"MPT"===t},e.prototype.getSiteId=function(){var t=window.location.host;return-1!=t.indexOf(".com.ar")?"MLA":-1!=t.indexOf(".com.br")?"MLB":-1!=t.indexOf(".com.uy")?"MLU":-1!=t.indexOf(".com.ec")?"MEC":-1!=t.indexOf(".com.pe")?"MPE":-1!=t.indexOf(".co.cr")?"MCR":-1!=t.indexOf(".com.mx")?"MLM":-1!=t.indexOf(".com.do")?"MRD":-1!=t.indexOf(".com.pa")?"MPA":-1!=t.indexOf(".com.co")?"MCO":-1!=t.indexOf(".com.ve")?"MLV":-1!=t.indexOf(".cl")?"MLC":-1!=t.indexOf(".pt")?"MPT":null},e.prototype.getCurrentPage=function(){var t=window.location.host,e=window.location.pathname;return"test.mercadolibre.com.ar:3000"==t&&"/"==e?"HOME":"test.mercadolibre.com.ar:3000"==t&&"/ml/vip"==e?"VIP":"test.mercadolibre.com.ar:3000"==t&&"/ml/search"==e?"SEARCH":null!=/^(home|www)\..*/i.exec(t)||"/"==e?"HOME":null!=/^\/([A-Z]{3})-([0-9]+)-.*\_JM$/i.exec(e)?"VIP":"SEARCH"},e.prototype.getIsUserIdentified=function(){var t=this.getCookie("orguserid");return t&&t.length>2},e.prototype.getNotificationsValidationUrl=function(){return"https://www."+this.getDomain()+"/gz/notifications/dialog/question"},e.prototype.getNotificationsCenterUrl=function(t){return"https://www."+this.getDomain()+"/gz/notifications/center?track_tag="+encodeURIComponent(t)+"&from="+encodeURIComponent(window.location.href)},e.prototype.getDomain=function(){var t=window.location.hostname,e=t.split(".")[0];return t.slice(e.length+1)},e.prototype.getAmountVisit=function(){var t=this.getCookie(this.COOKIE_VIP_COUNT);return null==t&&(t=0),t},e.prototype.countVisit=function(){var t=this.getCurrentPage(),e=this.getAmountVisit(),i=this.getCookie(this.COOKIE_VIP_COUNTER_EXPIRE);"VIP"==t&&((null==i||this.NOW-i>this.COUNTER_EXPIRE)&&(e=0,this.setCookie(this.COOKIE_VIP_COUNTER_EXPIRE,this.NOW,30)),e++,this.setCookie(this.COOKIE_VIP_COUNT,e,30))},e.prototype.show=function(t){var e=this.getPushAction();e!==this.SNACKBAR_HASH_FAIL&&e!==this.SNACKBAR_HASH_SUCCESS&&e!==this.SNACKBAR_HASH_DISABLED?(e===this.SNACKBAR_HASH_BLOCKED&&this.setCookie(this.COOKIE_NOTIF,(new Date).getTime(),this.NOTIF_EXPIRE_TIME),this.countVisit(),this.haveToShowNotificationsBanner(this.NOTIF_HIDE_EXPIRE)?this.isIncognito(function(t){t||this.validateNotificationStatus()}.bind(this)):this.haveToShowA2HS()?this.showA2HSModal():this.hideIfPresent()):this.showSnackbar(e)},e.prototype.getPushAction=function(){for(var t="",e=window&&window.location.search.replace("?","").split("&"),i=0;i=this.ML_CLOUT_ABOUT_TO_GET_BLOCK)&&(null==this.NOTIF_CLOSE_DATE||this.NOW-this.NOTIF_CLOSE_DATE>t)))},e.prototype.isNewDownloadAppBannerShow=function(){if(!this.wasNewBannerAlreadyShown())return!0;if(this.didXDaysPassSinceNewBannerWasClosed(this.BANNER_CLOSED_SESSION_THRESHOLD)){if(!this.wasNewBannerClosedMoreThanXTimes(this.TIMES_BANNER_CAN_BE_CLOSED))return!0;if(this.didXDaysPassSinceNewBannerWasClosed(this.BANNER_CLOSED_DAYS_THRESHOLD))return!0}return!1},e.prototype.wasNewBannerAlreadyShown=function(){return!!this.getCookie(this.DOWNLOAD_APP_BANNER_CLOSED_COOKIE)},e.prototype.haveXDaysPassBetweenDates=function(t,e,i){return this.daysPassedBetweenDates(t,e)>=i},e.prototype.daysPassedBetweenDates=function(t,e){var i=e-t,n=(i>=0?i:-1*i)/1e3/60/60/24;return Math.floor(n)},e.prototype.didXDaysPassSinceNewBannerWasClosed=function(t){var e=Date.now(),i=this.getCookie(this.DOWNLOAD_APP_BANNER_LAST_CLOSED_COOKIE),n=parseInt(i,10);return!isNaN(n)&&this.haveXDaysPassBetweenDates(n,e,t)},e.prototype.wasNewBannerClosedMoreThanXTimes=function(t){var e=this.getCookie(this.DOWNLOAD_APP_BANNER_CLOSED_COOKIE),i=parseInt(e,10);return!isNaN(i)&&i>t},e.prototype.haveToShowA2HS=function(){var t=navigator?navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./):null;return!!(t&&parseInt(t[2],10)<68&&-1!==["SEARCH"].indexOf(this.CURRENT_PAGE)&&this.BANNER_DOWNLOAD_DATE&&this.NOW-this.BANNER_DOWNLOAD_DATE>this.BANNER_NOTIF_CONFLICT_EXPIRE&&!this.A2HS_REDIRECT&&this.A2HS_ATTEMPTED)},e.prototype.isIncognito=function(t){var e=window.RequestFileSystem||window.webkitRequestFileSystem;e?e(window.TEMPORARY,100,(function(){t(!1)}),(function(){t(!0)})):t(!1)},e.prototype.goToNotificationsCenter=function(t){meli_ga("send","event","NOTIFICATIONS","PUSH_OPT_IN",t),window.location=this.getNotificationsCenterUrl(t)},e.prototype.setCancelCookieAndCloseNotif=function(t){var e=document.getElementById("notif-banner"),i=e.querySelector(".banner-notifications");setTimeout((function(){i.classList.remove("animation-slide--active"),i.classList.add("animation-slide--inactive")}),100),this.setCookie(this.COOKIE_NOTIF,(new Date).getTime(),this.NOTIF_EXPIRE_TIME),meli_ga("send","event","NOTIFICATIONS","PUSH_NOT_NOW",t),setTimeout((function(){e.parentNode.removeChild(e)}),650),this.unfreezeBody()},e.prototype.validateNotificationStatus=function(){var t=this.getNotificationsValidationUrl(),e=this.handleNotificationStatus.bind(this);t.trim()&&fetch(t,{method:"GET",credentials:"include"}).then((function(t){return t.json()})).then(e)},e.prototype.handleNotificationStatus=function(t){if(t&&t.showModal){var e="BANNER_BUYING_FLOW";this.prefetchNotificationCenter(e),this.showNotificationsBanner("NOTIF",e)}},e.prototype.prefetchNotificationCenter=function(t){var e=document.createElement("link");e.setAttribute("rel","prefetch"),e.setAttribute("as","html"),e.setAttribute("href",this.getNotificationsCenterUrl(t)),document.getElementsByTagName("head")[0].appendChild(e)},e.prototype.hideIfPresent=function(){var t=document.getElementById("splash"),e=document.getElementById("banner"),i=document.getElementById("notif-banner");null!=e&&e.parentNode.removeChild(e),null!=t&&t.parentNode.removeChild(t),null!=i&&i.parentNode.removeChild(i)},e.prototype.removeHash=function(){"function"==typeof history.pushState?history.pushState("",document.title,window.location.pathname):location.hash=""},e.prototype.supportsNotifications=function(){return"serviceWorker"in navigator&&"PushManager"in window&&"showNotification"in ServiceWorkerRegistration.prototype&&this.isSupportedBrowserForNotifications()},e.prototype.isSlowNetwork=function(){return"connection"in navigator&&"cellular"==navigator.connection.type&&"downlinkMax"in navigator.connection&&!(navigator.connection.downlinkMax>=2)},e.prototype.calculateMinutes=function(t){return 6e4*(t||1)},e.prototype.calculateHours=function(t){var e=t||1;return this.calculateMinutes(60)*e},e.prototype.calculateDays=function(t){var e=t||1;return this.calculateHours(24)*e},e.prototype.getCookie=function(t){for(var e=document.cookie.split(";"),i=0;i