/* portal-ui - vv1.20.7 */(function(){var hasGtm,portalContext,storedTrackers;window.vtex=window.vtex||{},window.vtex.events=window.vtex.events||{},window.vtex.events=function(){var debounce,listeners;return listeners=vtex.events.listeners||{},debounce=function(fn,delay){var timer;return timer=null,function(){var args,context;return context=this,args=arguments,clearTimeout(timer),timer=setTimeout(function(){return fn.apply(context,args)},delay)}},{addEvent:function(name,eventType,data){var _this=this;if("string"==typeof eventType?data=data||{}:(data=eventType||{},eventType="click"),window.$)return $("body").on(eventType,"[data-event="+name+"]",function(event){var key,variables;variables={};for(key in data)variables[key]=data[key](event.target);return _this.sendEvent(name,variables)})},sendEvent:function(name,variables){var id,_results;variables=variables||{},_results=[];for(id in listeners)_results.push(listeners[id].callback(name,variables));return _results},addData:function(variables){if("object"==typeof variables)return this.sendEvent(null,variables)},actions:{onHashChange:function(callback){if(window.$)return $(window).on("hashchange",debounce(function(event){var newUrl;return newUrl=event.originalEvent.newURL||window.location.href,callback(newUrl)},200))}},subscribe:function(id,callback,options){return options=options||{},listeners[id]={callback:callback,whitelist:options.whitelist||[],blacklist:options.blacklist||[]}},unsubscribe:function(id){return delete listeners[id]}}}(),portalContext=vtex.portal&&vtex.portal.context,vtex.portal=vtex.events,vtex.portal.context=portalContext,window.eventData=function(attributeName){return{closest:function(sender){if(window.$)return $(sender).closest("[data-"+attributeName+"]").attr("data-"+attributeName)}}},window.vtex=window.vtex||{},(hasGtm=null==window.vtex.gtmId||window.vtex.gtmId)&&(storedTrackers=0,vtex.events.actions.onHashChange(function(newUrl){var path,tracker,_i,_len,_ref,_results;if(path=newUrl.substring(newUrl.indexOf(location.pathname)),window.ga&&ga(function(){var index,tracker,trackersLength,_i,_len,_ref;for(trackersLength=ga.getAll().length,_ref=ga.getAll(),index=_i=0,_len=_ref.length;_i<_len;index=++_i)tracker=_ref[index],index+1>storedTrackers&&ga(tracker.get("name")+".send","pageview",path);return storedTrackers=trackersLength}),window._gat){for(_ref=_gat._getTrackers(),_results=[],_i=0,_len=_ref.length;_i<_len;_i++)tracker=_ref[_i],_results.push(tracker._trackPageview(path));return _results}}))}).call(this),function(){window.vtex=window.vtex||{},vtex.events&&vtex.events.subscribe("dataLayer",function(name,variables){var key,newVariables;if(variables=variables||{},window.dataLayer=window.dataLayer||[],null!==name&&(variables.event=name),"adobe"in variables){newVariables={};for(key in variables)"adobe"!==key&&(newVariables[key]=variables[key]);return window.dataLayer.push(newVariables)}return window.dataLayer.push(variables)})}.call(this),function(){window.vtex=window.vtex||{},vtex.events&&vtex.events.subscribe("adobeDataLayer",function(name,variables){if(variables=variables||{},window.adobeDataLayer=window.adobeDataLayer||[],variables.adobe)return null!==name&&(variables.adobe.event=name),window.adobeDataLayer.push(variables.adobe)})}.call(this);