window.JSON||(window.JSON={}); (function(){function b(a){return 10>a?"0"+a:a}function a(a){d.lastIndex=0;return d.test(a)?'"'+a.replace(d,function(a){var b=m[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function c(b,d){var g=e,f=d[b];f&&"object"===typeof f&&"function"===typeof f.toJSON&&(f=f.toJSON(b));"function"===typeof l&&(f=l.call(d,b,f));switch(typeof f){case "string":return a(f);case "number":return isFinite(f)?String(f):"null";case "boolean":case "null":return String(f);case "object":if(!f)return"null"; e+=h;var k=[];if("[object Array]"===Object.prototype.toString.apply(f)){var p=f.length;for(b=0;b
>18&63;e=m>>12&63;h=m>>6&63;m&=63;g[c++]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d".charAt(d)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d".charAt(e)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d".charAt(h)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d".charAt(m)}while(a< b.length);a=g.join("");b=b.length%3;return(b?a.slice(0,b-3):a)+"\x3d\x3d\x3d".slice(b||3)}function setJsuuid(){return new Promise(function(b){try{if(window.localStorage){var a=localStorage.getItem("ml_jsuuid");a&&"undefined"!=typeof Promise?getNextJsuuid(a).then(function(c){c||(c=a);setLocalStorage(a,c);b()}):(setLocalStorage(a,"b0925d10-3c77-4897-9f50-1bce1029cb75-1751568420070"),b())}}catch(c){window.jsuuid=null,b()}})} function getNextJsuuid(b){return new Promise(function(a){var c=new XMLHttpRequest;c.responseType="json";var g=getUrlNextJsuuid(b);c.open("GET",g);c.withCredentials=!1;c.setRequestHeader("X-Site-Id","undefined");c.onload=function(){200==this.status?a(c.response.jsuuid):a(null)};c.send()})} function getUrlNextJsuuid(b){var a=document.location.host.match(".*.mercado(libre|livre|pago).(com|cl|co).*"),c=navigator.userAgent,g=c.includes("CriOS/"),d=c.includes("Chrome/")||c.includes("Chromium/")||c.includes("CriOS/"),e=c.includes("Firefox/")||c.includes("FxiOS/"),h=c.includes("Edg/")||c.includes("Edge/")||c.includes("EdgiOS/")||c.includes("EdgA/");c=!d&&!e&&!h&&c.includes("Safari/")&&c.includes("Version/");return a&&(g||c)?"https://"+document.location.host+"/jms/lgz/background/jsuuid?current\x3d"+ b:"https://www.mercadolibre.com/jms/lgz/background/jsuuid?current\x3d"+b}function setLocalStorage(b,a){if(b==a)window.jsuuid=b;else try{localStorage.setItem("ml_jsuuid",a),window.jsuuid=a}catch(c){window.jsuuid=null}}function supportIndexedDB(){window.indexedDB=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB;window.support_idb=!!window.indexedDB;return!!window.indexedDB} function getStoreValue(b,a){return new Promise(function(c){var g=b.target.result,d=g.transaction("dp","readwrite").objectStore("dp").get("uuid");d.onsuccess=function(){"undefined"==typeof d.result?(setStoreValue(g,a),window.idbuuid=a):window.idbuuid=d.result.value;c()};d.onerror=function(a){c()}})}function setStoreValue(b,a){a={name:"uuid",value:a};b.transaction("dp","readwrite").objectStore("dp").add(a)} function setIdbuuid(){return new Promise(function(b){if(supportIndexedDB()){var a=window.indexedDB.open("db",getVersionIDB());a.onsuccess=function(a){getStoreValue(a,"38450004-9e2c-4ddd-9a3c-3163923db8e6-1751568420070").then(function(){b()})};a.onerror=function(a){b()};a.onupgradeneeded=function(a){a=a.target.result.createObjectStore("dp",{keyPath:"name"});a.createIndex("name","name",{unique:!0});a.createIndex("value","value",{unique:!0})}}})} function getUrl(){var b={};b.jsuuid=window.jsuuid_time;b.idbuuid=window.idbuuid_time;b=JSON.stringify({jsuuid:window.jsuuid,support_idb:window.support_idb,idbuuid:window.idbuuid,time:b});b=base64Encode(b);b={msg:b};b=JSON.stringify(b);var a=getCrossDomainUrl();return a+="?_method\x3dPUT\x26_body\x3d"+encodeURIComponent(b)} function getVersionIDB(){var b=document.location.host.match(".*.mercado(libre|livre|pago).(com|cl|co).*"),a=navigator.userAgent,c=a.includes("CriOS/"),g=a.includes("Chrome/")||a.includes("Chromium/")||a.includes("CriOS/"),d=a.includes("Firefox/")||a.includes("FxiOS/"),e=a.includes("Edg/")||a.includes("Edge/")||a.includes("EdgiOS/")||a.includes("EdgA/");a=!g&&!d&&!e&&a.includes("Safari/")&&a.includes("Version/");return b&&(c||a)?2:1} function getCrossDomainUrl(){var b=document.location.host.match(".*.mercado(libre|livre|pago).(com|cl|co).*"),a=navigator.userAgent,c=a.includes("CriOS/"),g=a.includes("Chrome/")||a.includes("Chromium/")||a.includes("CriOS/"),d=a.includes("Firefox/")||a.includes("FxiOS/"),e=a.includes("Edg/")||a.includes("Edge/")||a.includes("EdgiOS/")||a.includes("EdgA/");a=!g&&!d&&!e&&a.includes("Safari/")&&a.includes("Version/");return b&&(c||a)?"https://"+document.location.host+"/jms/lgz/background/session/armor.41b8c0e7140af865a86194fc1e10af52eb9372c3301ce8441b50129e06e629324af5767f9baa81dba994f571458fc85498d232571c9a64014b64465aeb8db02424a1b3004a475ccc635427af7c5e5e0f04a1114da133c35e64d4a25580d09d44.6da13c3648a36511f25dd1d12d4d437a/cross_domain/jsonp": "https://www.mercadolibre.com/jms/lgz/background/session/armor.41b8c0e7140af865a86194fc1e10af52eb9372c3301ce8441b50129e06e629324af5767f9baa81dba994f571458fc85498d232571c9a64014b64465aeb8db02424a1b3004a475ccc635427af7c5e5e0f04a1114da133c35e64d4a25580d09d44.6da13c3648a36511f25dd1d12d4d437a/cross_domain/jsonp"}function doProfile(){var b=Date.now();Promise.all([setIdbuuid().then(function(){window.idbuuid_time=Date.now()-b}),new Promise(function(a){b=Date.now();a(setJsuuid())})]).then(function(){window.jsuuid_time=Date.now()-b;window.dp_jsonp.xhr(getUrl())})}"complete"===document.readyState?doProfile():window.addEventListener?window.addEventListener("load",doProfile,!1):window.attachEvent&&window.attachEvent("onload",doProfile);