You are on page 1of 8

function pollHash(){var e=window.location.hash.replace("#","");e!

=purchasesGlobalValues.recentHash&&""!
=purchasesGlobalValues.recentHash&&(sale.parseAndSaveFiltersFromUrlHash(e),sale.exe
cuteSearch(e))}function findPos(e){var t=0;if(e.offsetParent){do t+=e.offsetTop-
25;while(e=e.offsetParent);return[t]}}function desplegableMenu(){$
(window).width()<1025?($("#myml-menu").removeClass("mymlMenu"),($
("html").hasClass("ie7")||$("html").hasClass("ie8"))&&$("#myml-
menu").addClass("mymlMenu"),$(".titleCateg").hasClass("active")||
desplegable.addClass("ch-hide")):(desplegable.removeClass("ch-hide"),$("#myml-
menu").addClass("mymlMenu"))}var
ua=navigator.userAgent.toLowerCase(),isSafari=ua.indexOf("safari")>=0&&ua.indexOf("
chrome")<0,purchasesGlobalValues={orderId:"",recentHash:"",previousHash:null,search
XHR:null,paginationTotalItems:0,paginationOffset:0,paginationLimit:50,searchFilterL
ist:null,showCalif:!0,msgProp:
{timeMsg:"",configTime:1e4},modal:"",modalVoc:"",modalQuestion:"",domain:$
("#domain").text(),siteId:$("#siteId").text(),searchUri:$
("#searchUri").text()},sale={controlBarTop:function(e,t){function a(){void 0!
=filterBarOffset&&($(window).scrollTop()>=filterBarOffset.top?($
(e).css({position:"fixed",top:"0","z-index":"999"}),$
(e).addClass("active"),filterBarPosition=$(e).css("position"),$
("#itemResultList").css("margin-top",filterBarHeight)):($
(e).css("position","static"),$(e).removeClass("active"),filterBarPosition=$
(e).css("position"),$("#itemResultList").css("margin-top","0")))}function i()
{widthTotal=$("main").width()-215,$(e).css("width",widthTotal),screenWindows=$
(window).width(),screenWindows<1025?($("#itemsList").removeClass(),widthTotal=$
("main").width(),$(e).css("width",widthTotal)):screenWindows<806?($
("#itemsList").removeClass().addClass("item-small"),widthTotal=$("main").width(),$
(e).css("width",widthTotal),widthCol=645):$
("#itemsList").removeClass(),widthTotal<770?$
("#itemsList").removeClass().addClass("item-small"):widthTotal<960?($
("#itemsList").removeClass().addClass("item-medium"),widthCol=590):($
("#itemsList").removeClass(),widthCol=645)}filterBarOffset=$
(e).offset(),filterBarPosition=$(e).css("position"),filterBarHeight=$
(e).css("height"),isMobile.any()||($(window).scroll(function(){a(),i()}),$
(window).resize(function(){i()})),a(),i()},loginCheck:function(e)
{return"undefined"==typeof SessionGlobalValues?!
1:e==SessionGlobalValues.expireSession?
(window.location.replace(SessionGlobalValues.loginUrl),!
0):e==SessionGlobalValues.invalidScopes?(window.location="operatorScopesError",!
0):!1},controlMsg:function(e,t){function a(){$(window).scrollTop()>=e?$
("#boxMsg").css("top",74):$("#boxMsg").css("top",t-$(window).scrollTop())}function
i(){$("#boxMsg").css("width",$("main").width()-215)}$("#message-
alert").length&&(t=$("#message-alert").height()+t+10),$(window).scroll(function()
{a(),i()}),$(window).resize(function(){i()}),a(),i()},hideRow:function(e){$
("#"+e).fadeOut("slow")},showMsgVop:function(e,t,a){$("#"+e+"
p").removeClass().addClass(a).html(t),$
("#"+e).slideToggle("fast")},showMsg:function(e,t){$("#boxMsg
p").removeClass().addClass("ch-message "+t).html(e).fadeIn("fast"),$("#boxMsg
p").css("margin-left",$("#boxMsg p").width()/-
2),purchasesGlobalValues.msgProp.timeMsg=window.setInterval("sale.hideMsg()",purcha
sesGlobalValues.msgProp.configTime)},highLightItemRows:function(e){$
("#itemsList").find(".active").removeClass("active"),$
("#theItemRow"+e).addClass("active")},hideMsg:function(e)
{window.clearInterval(purchasesGlobalValues.msgProp.timeMsg),$
("#itemsList").find(".active").removeClass("active"),null==e?$("#boxMsg
p").fadeOut("fast"):$(e+" p").fadeOut("fast")},showMsgError:function(e){$
("#boxMsgError p").fadeIn("fast"),$("#boxMsgError p").css("margin-left",$
("#boxMsgError p").width()/-
2),purchasesGlobalValues.msgProp.timeMsg=window.setInterval("sale.hideMsg('#boxMsgE
rror')",purchasesGlobalValues.msgProp.configTime)},tabOnOff:function(e){$("#tab-
recent").removeClass("ch-tab-trigger-on"),$("#tab-archived").removeClass("ch-tab-
trigger-on"),$("#tab-"+e).addClass("ch-tab-trigger-
on")},selectFilterTab:function(e){sale.tabOnOff(e),sale.applyStatusFilter(e),$
(".megaFilter").append('<div class="loadingBlock" id="loadingBlock"></div>'),h=$
("#mfControl").height()+$("#message-alert").height(),$
("#loadingBlock").css("width",$
("#itemsList").width()).css("height",h)},applyStatusFilter:function(e)
{sale.cleanFilters(),$('input[name="_search"]').val(""),$
('input[name="_order"]').val(""),$
('input[name="_type"]').val(e),sale.executeSearch()},placeHolder:function(){($
(".ie7").length||$(".ie8").length||$(".ie9").length)&&($
("#search").focus(function(){$("#iePlaceHolder").is(":visible")&&$
("#iePlaceHolder").hide()}).blur(function(){""==$(this).val()?$
("#iePlaceHolder").show():$("#iePlaceHolder").hide()}),$
("#iePlaceHolder").click(function(){$("#search").focus()}),$
("#search").blur())},copyClipboard:function(){var
e=document.querySelectorAll(".copyEmail"),a=new
Clipboard(e);a.on("success",function(e){sale.showMsg($
("#copyClipboardOk").text(),"ch-box-ok")}),$(".datesSeller, .contenedor-
listDatos").hover(function(){icoCopy=$(this).find(".ch-icon-
copy"),icoCopy.show().addClass("hover"),t="<p>"+$(".textCopyEmail:first").text()
+"</p>",icoCopy.layer({content:t,points:"ct cb",offset:"5px
10px"})}).mouseenter(function()
{icoCopy.show().addClass("hover")}).mouseleave(function()
{icoCopy.fadeOut("fast",function(){$
(this).removeClass("active").removeClass("hover")})})},executeCalif:function(e)
{if(1==purchasesGlobalValues.showCalif){var t=null;if(e&&e.split("califOk=")
[1]&&e.split("califOk=")[1].split("&")[0]&&(t=e.split("califOk=")[1].split("&")
[0].split("|")),t){for(var a=0;a<t.length;a++){var i="#itemRow"+t[a];$
(i).addClass("active")}$.ajax({type:"GET",data:
{califOk:"true",n:t.length},url:"/purchases/getText",cache:!1,success:function(e)
{sale.showMsg(e,"ch-box-ok"),purchasesGlobalValues.showCalif=!
1},error:function(e,t,a){sale.loginCheck(e.responseText)||
sale.showErrorPage()}})}}},initSecondaryActions:function(e){var t;t=e&&""!=e&&null!
=e?$("#"+e):$(".saleSecondaryActions");var a=t.dropdown({points:"rt
rb",onShow:function(){$
(this.element).parent().parent().addClass("upDropDown")},onHide:function(){$
(this.element).parent().parent().removeClass("upDropDown")}});return
a},executeSearch:function(e){if(0===$("#wrongsite").length){null!
=purchasesGlobalValues.searchXHR&&purchasesGlobalValues.searchXHR.abort();var
t=e;null!=t&&""!=t||
(t=sale.generateSearchUrl()),window.location.hash=t,purchasesGlobalValues.recentHas
h=window.location.hash.replace("#",""),sale.actionsOnItemListReloading(),purchasesG
lobalValues.searchXHR=$.ajax({url:"/purchases/search",data:t,cache:!
1,success:function(t){var a=$("#listCont");$
(a).html(t),sale.refreshAllControlsAndListeners(a),purchasesGlobalValues.searchXHR=
null;var
i=sale.getTopOfList();sale.hideLoadingImageModal(i),fillCalifUrl(),masiveCheck(),sa
le.executeCalif(e)},error:function(e,t,a)
{sale.hideLoadingImageModal(),sale.loginCheck(e.responseText)||
sale.showErrorPage(),purchasesGlobalValues.searchXHR=null}})}},getTopOfList:functio
n(){var e=!0,t=window.location.href;if(-1==t.indexOf("vop")&&-1!
=t.indexOf("orderId=")){purchasesGlobalValues.orderId=t.split("orderId=")
[1].split("&")[0];var
a=document.getElementById("itemRow"+purchasesGlobalValues.orderId);null!
=a&&(window.scroll(0,findPos(a)),e=!1)}return
e},refreshAllControlsAndListeners:function(e)
{if(sale.initDefaultPageControlListeners(e),$
(".saleDropdownMassiveActions").dropdown(),$(".orderDrop > ul").removeClass("ch-
hide"),$(".orderDrop").dropdown(),startScroll=210,topObj=210,""!=$(".coupon-
msg").text()&&(startScroll+=70,topObj+=70),sale.controlBarTop("#mfControl",startScr
oll),sale.controlMsg(startScroll,topObj),sale.placeHolder(),$
("#boxCp4").length&&(loaderTop=328+parseInt($("#boxMsg").css("height")),$
("#boxMsg").css("top",loaderTop),startScroll=256+parseInt($
("#boxCp4").css("height")),sale.controlBarTop("#mfControl",startScroll)),t="<p>"+$
("#textConcretada").text()+"</p>",$(".vopState").find(".ch-icon-question-
sign").layer({content:t,points:"lt lb"}),"undefined"!=$(".ico-
timeExcededForFeedback-help")){var a="<p>"+$("#didnotProvideFeedback-help").text()
+"</p>";$(".ico-timeExcededForFeedback-
help").layer({content:a,event:"click",points:"rt rb",offset:"-10 12",width:217})}$
("#linkQueEsEmail").length&&sale.tooltipEmail(),isSafari||
sale.copyClipboard()},initDefaultPageControlListeners:function(e)
{sale.initMassiveActionControls(e),sale.initFiltersMenuListeners(e)},initMassiveAct
ionControls:function(e){$('input[name="itemCheckAll"]',e).change(function()
{sale.toggleCheckAllItems($(this).prop("checked"),!
0)})},toggleCheckAllItems:function(e,t){$
('input[name="itemCheckAll"]').prop("checked",e),t&&$
(sale.getAllEnabledItemChecks()).prop("checked",e)},getAllEnabledItemChecks:functio
n(){return $('input[name="as_choose"]:enabled')},califMasive:function(e,t)
{e.target="";for(var a=!1,i=0;i<e.elements.length;i+
+)"as_choose"==e.elements[i].name&&1==e.elements[i].checked&&(a=!
0,e.elements[i].value=sale.replace_bs(e.elements[i].value));var
n="https://www.mercadolibre.com.ar/jm/calif?urlfrom=";null==t&&""==t||
(n=t),e.action=n+encodeURIComponent(window.location),e.act.value="califnow",e.subAc
t.value="calif",a&&e.submit()},replace_bs:function(e){try{for(i=0;i<e.length;i+
+)"b"==e.charAt(i)&&"s"==e.charAt(i+1)&&(e=e.replace("bs","b s"));return e}catch(t)
{}},initFiltersMenuListeners:function(e){$("body >
dd.mfFilters").remove(),purchasesGlobalValues.searchFilterList&&purchasesGlobalValu
es.searchFilterList.hide(),$
("#opFilters").find("ul.o").removeClass("o"),purchasesGlobalValues.searchFilterList
=$("#opFilters",e).dropdown({onShow:function()
{sale.hideMsg(),sale.refreshFiltersMenuListeners("order.status");var
e=this.element;tw=e.offsetWidth,tw>120&&$(e.children[1]).width(tw)}}),$
("#opFilters2").find("ul.o").removeClass("o"),purchasesGlobalValues.searchFilterLis
t=$("#opFilters2",e).dropdown({onShow:function()
{sale.hideMsg(),sale.refreshFiltersMenuListeners("shipping.status");var
e=this.element;tw=e.offsetWidth,tw>120&&$(e.children[1]).width(tw)}}),$
("#opFilters3").find("ul.o").removeClass("o"),purchasesGlobalValues.searchFilterLis
t=$("#opFilters3",e).dropdown({onShow:function()
{sale.hideMsg(),sale.refreshFiltersMenuListeners("feedback.status");var
e=this.element;tw=e.offsetWidth,tw>120&&$
(e.children[1]).width(tw)}}),purchasesGlobalValues.searchFilterList&&purchasesGloba
lValues.searchFilterList.on("contentError",function(e,t,a)
{sale.loginCheck(t.jqXHR.responseText)||
sale.showErrorPopulateElementsMsg()})},tooltipEmail:function(){faq=$
("#linkQueEsEmail").tooltip({onShow:function(){$(".ch-
close").one("click",function(){faq.hide()})}}),$
("#linkQueEsEmail").unbind("mouseenter").unbind("mouseleave"),$
("#linkQueEsEmail").click(function(){faq.show().width("280")}),faq.content($
("#faqMsgEmail").html())},refreshFiltersMenuListeners:function(e){$(".opFilters >
ul");$(".filtersDiv").load("./loadSearchFilters?
facetId="+e+"&"+sale.generateSearchUrl(),"",function(e,t,a)
{"error"==t&&(sale.loginCheck(e)||
sale.showErrorPopulateElementsMsg())})},refreshMassiveActionMenuPosition:function(e
){if(null!=e)for(var t=0;t<e.length;t+
+)e[t].position("refresh")},refreshPartialControlsAndListeners:function(e)
{if("undefined"!=$(".ico-timeExcededForFeedback-help")){var t="<p>"+$
("#didnotProvideFeedback-help").text()+"</p>";$(".ico-timeExcededForFeedback-
help").layer({content:t,points:"rt
rb"})}sale.copyClipboard()},generateSearchUrl:function(){var e=($
('input[name="_type"]').val(),$('input[name="_orderStatus"]').val()),t=$
('input[name="_feedbackStatus"]').val(),a=$('input[name="_tags"]').val(),i=$
('input[name="_shippingStatus"]').val(),n=e+t+i+a,o=$
('input[name="_search"]').val(),s=$('input[name="_order"]').val(),l="";return null!
=n&&""!=n&&(null!=e&&""!=e&&(l+=""!=l?"&":"",l+=e),null!=t&&""!=t&&(l+=""!
=l?"&":"",l+=t),null!=i&&""!=i&&(l+=""!=l?"&":"",l+=i),null!=a&&""!=a&&(l+=""!
=l?"&":"",l+=a)),null!=o&&""!=o&&(l+=""!=l?"&search=":"search=",l+=o),null!=s&&""!
=s&&(l+="&sortList="+$
('input[name="_order"]').val()),l},applySearchFilters:function(){$
('input[name="_orderStatus"]').val($
('input[name="orderstatus"]:checked').serialize()),$
('input[name="_feedbackStatus"]').val($
('input[name="feedbackstatus"]:checked').serialize()),$
('input[name="_shippingStatus"]').val($
('input[name="shippingstatus"]:checked').serialize()),$
('input[name="_tags"]').val($
('input[name="tags"]:checked').serialize()),sale.executeSearch()},applySearchFilter
Id:function(e,t){$('input[name="_tags"]').val(""),$
('input[name="_feedbackStatus"]').val(""),"tags"==e&&("all"==t?$
('input[name="_tags"]').val(""):$
('input[name="_tags"]').val("tags="+t)),"feedback.status"==e&&("all"==t?$
('input[name="_feedbackStatus"]').val(""):$
('input[name="_feedbackStatus"]').val("feedbackStatus="+t)),sale.executeSearch()},a
ctionsAfterPagination:function(e)
{sale.setCurrentPageParamToUrl(),sale.hideLoadingImageModal(),sale.refreshPartialCo
ntrolsAndListeners(e),fillCalifUrl(),masiveCheck()},setCurrentPageParamToUrl:functi
on(){var
e=purchasesGlobalValues.paginationOffset/purchasesGlobalValues.paginationLimit+1,t=
window.location.hash.replace("#",""),a=t.indexOf("page=");-1!=a?
window.location.hash=t.replace(t.substring(a,t.length),"page="+e):window.location.h
ash=t+"&page="+e,purchasesGlobalValues.recentHash=window.location.hash.replace("#",
"")},hideLoadingImageModal:function(e){sale.hideMsg();var t=null==e?!0:e;t&&$
(window).scrollTop($("body").position().top)},actionsOnItemListReloading:function()
{sale.showLoadingImage($("#itemResultList"),"div",null,"loadingAdj",!
0)},showLoadingImage:function(e,t,a,i,n){a||(a="");var o='<div class="loading
'+a+'"/>';if(t){var s="<";s+=i?t+' class="'+i+'"':t,s+=">"+o+"</"+t+">",o=s}n?
(sale.showMsg("<span class='ch-loading-small'></span> "+$
("#wordCargando").text(),"ch-load"),$("#itemResultList").append('<div
class="loadingBlock"></div>'),$(".loadingBlock").css("width",$
("#itemsList").width()).css("height",$
("#itemsList").height())):e.html(o)},searchQuery:function(){sale.cleanFilters(),$
('input[name="_search"]').val(encodeURIComponent($
('input[name="search"]').val())),sale.executeSearch()},applyOrderSelected:function(
e){$('input[name="_order"]').val(e),sale.executeSearch()},cleanFilters:function(){$
('input[name="_orderStatus"]').val(""),$('input[name="_feedbackStatus"]').val(""),$
('input[name="_shippingStatus"]').val(""),$
('input[name="_tags"]').val("")},parseAndSaveFiltersFromUrlHash:function(e){var
t="",a="",i="",n="",o="",s="",l=e.split("&");if("vop"!=l[0]){for(var r=!
1,c=0;c<l.length;c++){var
u=l[c].split("=");"orderstatus"==u[0]?"confirmed"==u[1]||"payment_in_process"==u[1]
||"paid"==u[1]?$('input[name="_orderStatus"]').val(l[c]):(""!
=t&&(t+="&"),t+=l[c]):"tags"==u[0]?"not_paid"==u[1]?$
('input[name="_tags"]').val(l[c]):(""!
=t&&(t+="&"),t+=l[c]):"shippingstatus"==u[0]?"to_be_agreed"==u[1]||"pending"==u[1]|
|"shipped"==u[1]||" delivered"==u[1]||" not_delivered"==u[1]||"handling"==u[1]||"
cancelled"==u[1]?$('input[name="_shippingStatus"]').val(l[c]):(""!
=a&&(a+="&"),a+=l[c]):"feedbackStatus"==u[0]?"pending"==u[1]||"waiting_buyer"==u[1]
||"waiting_seller"==u[1]?$('input[name="_feedbackStatus"]').val(l[c]):(""!
=i&&(i+="&"),i+=l[c]):"sortList"==u[0]?o=u[1]:"type"==u[0]?
(s=u[1],sale.tabOnOff(s),r=!0):"search"==u[0]&&(n=u[1])}r||sale.tabOnOff("recent"),
$('input[name="_order"]').val(o),$('input[name="_search"]').val(n),$
('input[name="_type"]').val(s)}},addFinalSlashToUrlIfMissing:function(e){-1!
=e.indexOf("list")&&-
1==e.indexOf("list/")&&(e=e.replace("list","list/"),window.location.href=e)},showEr
rorPage:function(){$.ajax({url:"/errors/partialErrorPage",cache:!
1,success:function(e,t){""!=e&&$("#listContainer").html(e)},error:function(e,t,a)
{sale.loginCheck(e.responseText)||
items.showErrorPopulateElementsMsg()}})},showModalCanBack:function(){var e=$
("#modalCanBack").modal({width:"515px",height:"280px",cache:!1});e.content("<iframe
id='iframeEnc' scrolling='no' class='iframeEnc' src='/purchases/modal' width='510'
height='250'></iframe><div id='loadingSalesOld' class='ch-loading
loadingModalIframe'></div>")},formVocModal:function()
{purchasesGlobalValues.modalVoc=$(".modal-voc").modal({width:"500px",cache:!
1}),null==purchasesGlobalValues.orderId&&(purchasesGlobalValues.orderId=$
('input[name="_orderId"]').val());var e=$
('input[name="_feedback_type"]').val();purchasesGlobalValues.modalVoc.content("/pur
chases/formVocModal?
orderId="+purchasesGlobalValues.orderId+"&feedback_type="+e).show()},hideModalCanBa
ck:function(){$("#iframeEnc").hide()},initModal:function(e){var t="525px";""!
=e&&(t=e),purchasesGlobalValues.modal=$
("#modal").modal({width:t,height:"230px",cache:!1,onHide:function(){$
(this).remove(),$(".ch-validation").hide(),$("body").removeClass("stop-
scrolling")}}),purchasesGlobalValues.modal.content("<span class='ch-
loading'></span>"),purchasesGlobalValues.modal.show(),altoModal=$(".ch-modal-
content").height()+65,altoWin=$(window).height()-
130,altoModal>altoWin&&(altoModal=altoWin),purchasesGlobalValues.modal.height(altoM
odal)},hideLoadingModal:function(){$(".ch-modal-content").html($
("#modal").html()),altoModal=$(".ch-modal-content").height(),altoWin=$
(window).height()-
130,altoModal>altoWin&&(altoModal=altoWin),purchasesGlobalValues.modal.height(altoM
odal)},hideModal:function()
{purchasesGlobalValues.modal.hide()},hideModalQuestion:function()
{purchasesGlobalValues.modalQuestion.hide()},initModalBankInfo:function()
{purchasesGlobalValues.modalQuestion=$
("#modalBankTransfer").modal({width:"550px",height:"240px",cache:!
1,onHide:function(){$(this).remove(),$(".ch-
validation").hide()}}),purchasesGlobalValues.modalQuestion.content($
("#modalBankTransfer").html()),purchasesGlobalValues.modalQuestion.show()},getTotal
Messages:function(e){null!
=purchasesGlobalValues.searchXHR&&purchasesGlobalValues.searchXHR.abort(),jQuery.aj
ax({type:"GET",data:{sellers:e},url:"/purchases/messages/get",cache:!
1,success:function(e,t){for(var a=0;a<e.length;a++)
{messages=e[a],id=messages.sellerId;var i=messages.text;$
(".totalMsgRow"+id).html(i)}},error:function(e,t,a){}})},changeTextDate:function(e)
{switch($("#shippingTextDateSingular").hide(),$
("#shippingTextDatePlural").hide(),e){case"0":break;case"1":$
("#shippingTextDateSingular").show();break;default:$
("#shippingTextDatePlural").show()}},wOpen:function(e,t,a,i,n,o,s)
{xLeft=screen.width?(screen.width-a)/2:0,xTop=screen.height?(screen.height-
i)/2:0,xSettings="height="+i+",width="+a+",top="+xTop+",left="+xLeft+",scrollbars="
+n+s,hwnd=window.open(e,t,xSettings),hwnd.window.focus&&hwnd.window.focus(),""!
=o&&hwnd.document.write(o)},callOAS:function(){$("#oasTOP").html('<div
class="publi">'+$("#textPublicidad").text()+'</div><iframe
src="'+window.location.protocol+"//"+window.location.host+'/purchases/banner/oas"
width="100%" height="100%" scrolling="no" frameborder="0"
/>')},loadHeader:function(){window.meliAsync=function()
{meli.init({siteId:purchasesGlobalValues.siteId,domain:purchasesGlobalValues.domain
}),meli.login.init({state:"authenticated"}),meli.menu.init(),meli.search.init({uri:
purchasesGlobalValues.searchUri+"/$query",txt:{lastSearch:$
("#lastSearchText").text(),hideSuggest:$("#hideSuggestText").text()},secure:!
0}),window.bookmarksAsync=function(){},meli.execute("login",function()
{null==document.getElementById("notification-init-frame")&&!function(e){var
t=document.createElement("iframe");(t.frameElement||t).style.cssText="width: 0;
height: 0; border: 0; position:
absolute",t.src="javascript:false",t.id="notification-init-frame";var
a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(t,a);var
i=t.contentWindow.document;i.open().write("<body onload=\"window.inDapIF = true;var
initNotifications = function(){var js = document.createElement('script');js.src =
'"+e+"';document.body.appendChild(js);};setTimeout(initNotifications,0);\">"),i.clo
se()}
("//www."+purchasesGlobalValues.domain+"/notifications/js/notif.min.js")}),window.n
otifAsyncInit=function(){meli.notifications.init()}}}};$(document).ready(function()
{-1!
=window.location.hash.indexOf("utm_")&&(window.location.hash="");var
e=window.location.href;-1==e.indexOf("list/#")&&-1==e.indexOf("list#")&&-
1==e.indexOf("list/")&&-1==e.indexOf("list")||
(purchasesGlobalValues.recentHash=window.location.hash.replace("#",""),sale.parseAn
dSaveFiltersFromUrlHash(purchasesGlobalValues.recentHash),sale.executeSearch(purcha
sesGlobalValues.recentHash)),sale.refreshAllControlsAndListeners(),$(".myml-menu-
navigation").removeClass("pre-load-menu");var t="4#3",a=$("#siteId").text();"MRD"!
=a&&"MPA"!=a&&"MPT"!=a&&"MGT"!=a&&"MBO"!=a&&"MPY"!=a||(t="3#3"),$("#myml-
menu").menu({selected:t,icon:!0});var e=window.location.href;-1==e.indexOf("vop")||
(purchasesGlobalValues.orderId=$
('input[name="_orderId"]').val()),desplegableMenu(),$(window).resize(function()
{desplegableMenu()}),$(".titleCateg").click(function(){$
(this).toggleClass("active"),$(this).hasClass("active")?
desplegable.removeClass("ch-hide"):desplegable.addClass("ch-hide")}),$(".modal-
voc").click(function(){sale.formVocModal()})}),$(window).load(function()
{setInterval(pollHash,500);try{loadGa()}catch(e)
{}sale.loadHeader(),window.meliAsync(),window.bookmarksAsync(),sale.callOAS()});var
desplegable=$(".listCategs"),isMobile={Android:function(){return
navigator.userAgent.match(/Android/i)},BlackBerry:function(){return
navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return
navigator.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return
navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return
navigator.userAgent.match(/IEMobile/i)},any:function(){return isMobile.Android()||
isMobile.BlackBerry()||isMobile.iOS()||isMobile.Opera()||isMobile.Windows()}};!
function(e,t){"use strict";function a(t){i(n,function(a){e.$
(t).trigger(a.data.type,a.data.value)})}var i=e.addEventListener||
e.attachEvent,n=i===e.attachEvent?"onmessage":"message";e.Seamless=a,function(){var
e=t.querySelectorAll("[seamless]"),i=e.length,n=0;for(n;i>n;n+=1)new a(e[n])}()}
(window,document);var sales={refresh:function()
{$.ajax({url:"/purchases/list",data:url,success:function(e){$
("#listContainer").html(e)}})}};!function(e){if("object"==typeof
exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof
define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?
window:"undefined"!=typeof global?global:"undefined"!=typeof self?
self:this,t.Clipboard=e()}}(function(){return function e(t,a,i){function n(s,l)
{if(!a[s]){if(!t[s]){var r="function"==typeof require&&require;if(!l&&r)return
r(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw
c.code="MODULE_NOT_FOUND"}var u=a[s]={exports:{}};t[s]
[0].call(u.exports,function(e){var a=t[s][1][e];return n(a?
a:e)},u,u.exports,e,t,a,i)}return a[s].exports}for(var o="function"==typeof
require&&require,s=0;s<i.length;s++)n(i[s]);return n}({1:[function(e,t,a){var
i=e("matches-selector");t.exports=function(e,t,a){for(var n=a?e:e.parentNode;n&&n!
==document;){if(i(n,t))return n;n=n.parentNode}}},{"matches-selector":2}],2:
[function(e,t,a){function i(e,t){if(o)return o.call(e,t);for(var
a=e.parentNode.querySelectorAll(t),i=0;i<a.length;++i)if(a[i]==e)return!0;return!
1}var n=Element.prototype,o=n.matchesSelector||n.webkitMatchesSelector||
n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector;t.exports=i},{}],3:
[function(e,t,a){function i(e,t,a,i){var o=n.apply(this,arguments);return
e.addEventListener(a,o),{destroy:function(){e.removeEventListener(a,o)}}}function
n(e,t,a,i){return function(a){a.delegateTarget=o(a.target,t,!
0),a.delegateTarget&&i.call(e,a)}}var o=e("closest");t.exports=i},{closest:1}],4:
[function(e,t,a){a.node=function(e){return void 0!==e&&e instanceof
HTMLElement&&1===e.nodeType},a.nodeList=function(e){var
t=Object.prototype.toString.call(e);return void 0!==e&&("[object
NodeList]"===t||"[object HTMLCollection]"===t)&&"length"in e&&(0===e.length||
a.node(e[0]))},a.string=function(e){return"string"==typeof e||e instanceof
String},a["function"]=function(e){var
t=Object.prototype.toString.call(e);return"[object Function]"===t}},{}],5:
[function(e,t,a){function i(e,t,a){if(!e&&!t&&!a)throw new Error("Missing required
arguments");if(!l.string(t))throw new TypeError("Second argument must be a
String");if(!l["function"](a))throw new TypeError("Third argument must be a
Function");if(l.node(e))return n(e,t,a);if(l.nodeList(e))return
o(e,t,a);if(l.string(e))return s(e,t,a);throw new TypeError("First argument must be
a String, HTMLElement, HTMLCollection, or NodeList")}function n(e,t,a){return
e.addEventListener(t,a),{destroy:function(){e.removeEventListener(t,a)}}}function
o(e,t,a){return Array.prototype.forEach.call(e,function(e)
{e.addEventListener(t,a)}),{destroy:function()
{Array.prototype.forEach.call(e,function(e){e.removeEventListener(t,a)})}}}function
s(e,t,a){return r(document.body,e,t,a)}var
l=e("./is"),r=e("delegate");t.exports=i},{"./is":4,delegate:3}],6:[function(e,t,a)
{function i(e){var
t;if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName)e.focus(),e.setSelectionRange(0,
e.value.length),t=e.value;else{e.hasAttribute("contenteditable")&&e.focus();var
a=window.getSelection(),i=document.createRange();i.selectNodeContents(e),a.removeAl
lRanges(),a.addRange(i),t=a.toString()}return t}t.exports=i},{}],7:[function(e,t,a)
{function i(){}i.prototype={on:function(e,t,a){var i=this.e||
(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:a}),this},once:function(e,t,a)
{function i(){n.off(e,i),t.apply(a,arguments)}var n=this;return
i._=t,this.on(e,i,a)},emit:function(e){var
t=[].slice.call(arguments,1),a=((this.e||(this.e={}))[e]||
[]).slice(),i=0,n=a.length;for(i;n>i;i++)a[i].fn.apply(a[i].ctx,t);return
this},off:function(e,t){var a=this.e||(this.e={}),i=a[e],n=[];if(i&&t)for(var
o=0,s=i.length;s>o;o++)i[o].fn!==t&&i[o].fn._!==t&&n.push(i[o]);return n.length?
a[e]=n:delete a[e],this}},t.exports=i},{}],8:[function(e,t,a){"use strict";function
i(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof
t))throw new TypeError("Cannot call a class as a function")}a.__esModule=!0;var
o=function(){function e(e,t){for(var a=0;a<t.length;a++){var
i=t[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!
0),Object.defineProperty(e,i.key,i)}}return function(t,a,i){return
a&&e(t.prototype,a),i&&e(t,i),t}}(),s=e("select"),l=i(s),r=function(){function e(t)
{n(this,e),this.resolveOptions(t),this.initSelection()}return
e.prototype.resolveOptions=function(){var e=arguments.length<=0||void
0===arguments[0]?
{}:arguments[0];this.action=e.action,this.emitter=e.emitter,this.target=e.target,th
is.text=e.text,this.trigger=e.trigger,this.selectedText=""},e.prototype.initSelecti
on=function(){if(this.text&&this.target)throw new Error('Multiple attributes
declared, use either "target" or "text"');if(this.text)this.selectFake();else{if(!
this.target)throw new Error('Missing required attributes, use either "target" or
"text"');this.selectTarget()}},e.prototype.selectFake=function(){var
e=this;this.removeFake(),this.fakeHandler=document.body.addEventListener("click",fu
nction(){return
e.removeFake()}),this.fakeElem=document.createElement("textarea"),this.fakeElem.sty
le.position="absolute",this.fakeElem.style.left="-
9999px",this.fakeElem.style.top=(window.pageYOffset||
document.documentElement.scrollTop)
+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,docum
ent.body.appendChild(this.fakeElem),this.selectedText=l["default"]
(this.fakeElem),this.copyText()},e.prototype.removeFake=function()
{this.fakeHandler&&(document.body.removeEventListener("click"),this.fakeHandler=nul
l),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)},e.
prototype.selectTarget=function(){this.selectedText=l["default"]
(this.target),this.copyText()},e.prototype.copyText=function(){var e=void
0;try{e=document.execCommand(this.action)}catch(t){e=!
1}this.handleResult(e)},e.prototype.handleResult=function(e){e?
this.emitter.emit("success",
{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this
.clearSelection.bind(this)}):this.emitter.emit("error",
{action:this.action,trigger:this.trigger,clearSelection:this.clearSelection.bind(th
is)})},e.prototype.clearSelection=function()
{this.target&&this.target.blur(),window.getSelection().removeAllRanges()},e.prototy
pe.destroy=function(){this.removeFake()},o(e,[{key:"action",set:function(){var
e=arguments.length<=0||void
0===arguments[0]?"copy":arguments[0];if(this._action=e,"copy"!
==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use
either "copy" or "cut"')},get:function(){return this._action}},
{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!=typeof e||1!
==e.nodeType)throw new Error('Invalid "target" value, use a valid
Element');this._target=e}},get:function(){return this._target}}]),e}
();a["default"]=r,t.exports=a["default"]},{select:6}],9:[function(e,t,a){"use
strict";function i(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e
instanceof t))throw new TypeError("Cannot call a class as a function")}function
o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must
either be null or a function, not "+typeof
t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!
1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?
Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t){var a="data-
clipboard-"+e;return t.hasAttribute(a)?t.getAttribute(a):void 0}a.__esModule=!0;var
l=e("./clipboard-action"),r=i(l),c=e("tiny-emitter"),u=i(c),d=e("good-
listener"),h=i(d),f=function(e){function t(a,i)
{n(this,t),e.call(this),this.resolveOptions(i),this.listenClick(a)}return
o(t,e),t.prototype.resolveOptions=function(){var e=arguments.length<=0||void
0===arguments[0]?{}:arguments[0];this.action="function"==typeof e.action?
e.action:this.defaultAction,this.target="function"==typeof e.target?
e.target:this.defaultTarget,this.text="function"==typeof
e.text?e.text:this.defaultText},t.prototype.listenClick=function(e){var
t=this;this.listener=h["default"](e,"click",function(e){return
t.onClick(e)})},t.prototype.onClick=function(e){var t=e.delegateTarget||
e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAct
ion=new r["default"]
({action:this.action(t),target:this.target(t),text:this.text(t),trigger:t,emitter:t
his})},t.prototype.defaultAction=function(e){return
s("action",e)},t.prototype.defaultTarget=function(e){var t=s("target",e);return t?
document.querySelector(t):void 0},t.prototype.defaultText=function(e){return
s("text",e)},t.prototype.destroy=function()
{this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this
.clipboardAction=null)},t}(u["default"]);a["default"]=f,t.exports=a["default"]},
{"./clipboard-action":8,"good-listener":5,"tiny-emitter":7}]},{},[9])(9)});

You might also like