  def('bootstrap/alert', function(){ def("alert",function(){$("body").on("click",".alert-open",function(e){e.preventDefault(),$(this).next(".alert").toggleClass("show")}),$("body").on("click",".alert-close",function(e){e.preventDefault(),$(this).parent(".alert").toggleClass("show")})}); });    def('bootstrap/forms', function(){ function FormFilter(e){var t,n,l=this,r={onOpen:!1,onClose:!1,onSelect:!1};function i(){var e=[].slice.call(arguments),t=e.shift();return e.unshift(this.element),"function"==typeof r[t]?r[t].apply(this,e):null}this.element=e,this.template=function(t,n,r){var i=n?new RegExp("("+n.join("|")+")","gim"):null,s=e.querySelector(".target");l.list||(l.list=t||[]),s.innerHTML=(t||l.list).map(function(e){return{text:e[1]||e[0],attrs:e[2]}}).reduce(function(e,t,n){if(i){var l=t.text.replace(/<[^>]+>/g,"").trim();i.test(l)&&(t.text=t.text.replace(l,l.replace(i,'<span class="result-highlight">$&</span>')))}var s="";if(t.attrs)for(var o=t.attrs.length-1;o>=0;o--)s+=t.attrs[o].name+"='"+t.attrs[o].value+"' ";return e+'<li class="select-option '+(r==n?"selected-term":"")+'" '+s+" >"+t.text+"</li>"},"");var o=s.querySelector(".selected-term");s.scrollTop=o?o.offsetTop-o.offsetHeight-18:0},this.config=function(e){$.extend(r,e)},t=null,(n=$(l.element)).off().on("click",".final-term, .svg-icon, .btn-close",function(e){e.preventDefault(),l.list&&l.template(l.list),toggleListResult.call(this)}).on("keyup",".input-term",function(e){var n;t&&(t=clearTimeout(t)),l.list||(l.list=(n=Array.prototype.slice.call(l.element.querySelectorAll(".select-option"))).length?n.reduce(function(e,t){return e.push([t.innerText,t.innerHTML,t.attributes]),e},[]):[]);var r=this;t=setTimeout(function(){inputKey.call(r,e,l)},120)}).on("click",".select-option",getText.bind(l)),n.on("form-filter-open",function(){i.call(l,"onOpen")}).on("form-filter-close",function(){i.call(l,"onClose")}).on("form-filter-select",function(e,t){i.call(l,"onSelect",e,t)})}function preventScroll(e,t){if(!t&&-1==!t.indexOf(lib.breakpoints.breakpoint.name)){var n,l=$("body"),r=$("html");e?(n=window.pageYOffset,r.css({overflow:"hidden"}),l.css({position:"fixed",top:-n})):(n=-parseInt(l.css("top")),r.css({overflow:""}),l.css({position:"",top:""}),window.scrollTo(0,n))}}function inputKey(e,t){var n=this.value,l=t.list;if(l)if("selected"in l||(l.selected=0),27==e.keyCode)t.template(l),toggleListResult();else if(n){var r=n.split(" ");if(38==e.keyCode)l.selected=l.selected>0?l.selected-1:l.indexes.length-1;else if(40==e.keyCode)l.selected=l.selected+1<l.indexes.length?l.selected+1:0;else{if(13==e.keyCode)return $(this).parents(".form-filter").find(".selected-term").trigger("click"),t.template(l),void toggleListResult();37!=e.keyCode&&39!=e.keyCode&&(l.selected=0,l.indexes=l.filter(function(e){return r.length==r.filter(function(t){return-1!=lib.string.slug(e[0]).indexOf(lib.string.slug(t))}).length}))}t.template(l.indexes,r,l.selected)}else t.template(l)}function toggleListResult(){var e=$(this).closest(".form-filter"),t=$(".form-filter").not(e).addClass("closed");t.find(".svg-icon > use")?t.find(".svg-icon > use").attr("xlink:href","#svg-single-arrow-down"):t.find("i").removeClass("icon-single-arrow-up").addClass("icon-single-arrow-down");var n=e.toggleClass("closed");if(n.find(".svg-icon > use")){const e="#svg-single-arrow-up";n.find(".svg-icon > use").attr("xlink:href",function(t,n){return n==e?"#svg-single-arrow-down":e})}else n.find("i").toggleClass("icon-single-arrow-down icon-single-arrow-up");$(".form-filter").not(e).each(function(){var e=$(this);e.hasClass("closed")||(e.addClass("closed").find("i").removeClass("icon-single-arrow-up").addClass("icon-single-arrow-down"),e.triggerHandler("form-filter-close"),preventScroll(!1,["xs"]))}),e.length&&e.hasClass("closed")?(e.triggerHandler("form-filter-open"),preventScroll(!0,["xs"])):e.length&&(e.triggerHandler("form-filter-close"),preventScroll(!1,["xs"])),e.find(".input-term").focus().val("")}function getText(e){var t=$(e.currentTarget),n=t.closest(".form-filter");n.find(".final-term").html(t.html()),toggleListResult(),this.list&&(this.list.selected=t.index()),n.triggerHandler("form-filter-select",t.data())}expose.selector=".form-filter",expose.init=function(){this.FormFilter=new FormFilter(this.dom),$(this.dom).data("formFilter",this.FormFilter)},0==$(document).find(".form-filter").length&&0==$(document).find(".lazy-component").length||$(document).mouseup(function(e){0==$(e.target).closest(".form-filter").length&&toggleListResult()}),$(".drop-select").off().on("click",".drop-item",function(){var e=$(this),t=e.parents(".drop-select"),n=t.find(".selector").children("span"),l=null,r=parseInt(t.attr("data-open")),i=(parseInt(t.attr("data-selected")),e.prop("tagName").toLowerCase());r?t.attr("data-open",0):t.attr("data-open",1);if(t.find("p.selector").find("use").attr("xlink:href",function(e,t){return"#svg-single-arrow-up"==t?"#svg-single-arrow-down":"#svg-single-arrow-up"}),"label"==i){e.attr("data-default")?(l="0",t.find("input:checkbox").removeAttr("checked")):l="1",t.attr("data-selected",l);var s=e.children("span").html();n.html(s),t.find(".drop-item").removeClass("selected"),e.addClass("selected")}return!1}),0!=$(document).find(".drop-select[data-open=1]").length&&$(document).mouseup(function(e){var t=$(".drop-select[data-open=1]");t.is(e.target)||0!==t.has(e.target).length||(1==t.attr("data-open")&&t.attr("data-close-metric")&&hitAudience.countClick(t.attr("data-close-metric")),t.attr("data-open",0),t.find("p.selector").find("use").attr("xlink:href","#svg-single-arrow-down"))}); });    def('bootstrap/photo', function(){ def("photo",function(){expose.pinit=function(){var t=$(this.dom),i=navigator.userAgent||"";t.each(function(){var t=$(this),n="uol_"+Date.now(),e=$('<a class="pinit-btn" href="javascript:void(0)"><img width="56" height="28" src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_red_28.png" /></a>'),o=t[0].classList.contains("img-placeholder")?" placeholder":"";t.wrap('<div class="pinit-wraper'+o+'"></div>'),e.insertAfter(t),e.on("click",function(){var i="https://br.pinterest.com/pin/create/button/?url="+location.protocol+"//"+location.host+location.pathname+"&media="+(t.attr("data-src")||t.attr("src-pin"))+"&description="+document.title;hitAudience.countClick({component:"pinterest-on-images",reference:"compartilhe_pinterest",action:"clique"}),window.open(i,n,"height=550, width=750")}),i.match(/Windows Phone/i)?t.parent().on("click",function(){e.toggle()}):(t.parent().on("mouseover",function(){e.show()}),t.parent().on("mouseout",function(){e.hide()}))})},expose.init=function(){window.lazyload(this.dom,this.pinit.bind(this))},expose.selector=".pinit-img"}); });    def('bootstrap/read-more', function(){ def("read-more",function(){"use strict";include("breakpoints"),expose.flag=!1,expose.update=function(t){var s=this.parse(this.dom.getAttribute("data-height"),{}),e=this.breakpoints.sortOptions(Object.keys(s),!0,!1),i=$(this.dom).find(".calc-height").length>0?$(this.dom).find(".calc-height"):$(this.dom);$(this.dom).removeClass("btn-hide").addClass("btn-show"),e&&0!=s[e].close&&s[e]["min-height"]<i.outerHeight()?this.flag||this.change(s[e].close+"px"):($(this.dom).addClass("btn-hide").removeClass("btn-show"),this.show(!1))},expose.scrollTop=function(t){var s=$(t).parents(".read-more").offset().top;s-=50,$("html,body").animate({scrollTop:s+"px"})},expose.hide=function(){this.flag=!1,this.update()},expose.show=function(t){!1!==t&&(this.flag=!0),this.change("auto")},expose.change=function(t){var s=$(this.dom);s.removeClass("auto"==t?"closed":"opened").addClass("auto"==t?"opened":"closed"),"auto"==t?s.removeAttr("style"):s.height(t)},expose.isOpen=function(){return this.flag},expose.toggle=function(){this.isOpen()?this.hide():this.show()},expose.init=function(){var t=this;if(this.update(),this.breakpoints.change(this,function(){setTimeout(function(){t.update()},500)}),!this.dom.querySelector(".read-more-btn")){$(this.dom).append('<div class="read-more-btn"><button class="btn btn-primary btn-large btn-first">Ver mais <svg class="svg-icon-view-box-small right-icon"><use xlink:href="#svg-single-arrow-down" /></svg></button><button class="btn btn-primary btn-large btn-last hide">Ver menos <svg class="svg-icon-view-box-small right-icon"><use xlink:href="#svg-single-arrow-up" /></svg></button></div>')}$(this.dom).on("click",".read-more-btn:last > .btn, .read-more-btn:last .btn-divisor",function(s){$(this).hasClass("btn-last")&&t.scrollTop(this,$(this).parent(".read-more")),t.toggle.call(t),$(this).parent().find(".btn").toggleClass("hide")})}}); });    def('modal', function(){ instances.modal=[];var bodyTopPosition=0;expose.create=function(){return new this.Modal},expose.open=function(e,o,t,s,n){var c=this.create();return o&&c.setMode.apply(c,o.split(":").reverse()),t&&c.setStyle(t),s&&c.setEvents(s),c.setContent(e,!0),-1==document.body.className.indexOf("modal-open")&&(n?(bodyTopPosition=document.body.scrollTop||document.documentElement.scrollTop,$("body").addClass("googleCaptcha")):document.body.style.top="-"+(document.body.scrollTop||document.documentElement.scrollTop)+"px"),document.body.className+=" modal-open",c},expose.Modal=function(){this.buildStructure(),this.enableUIControl(),this.enableEscClose(),this.enableClickClose(),"function"==typeof crazyloadinit&&this.addScrollEvent(crazyloadinit),instances.modal.push(this),$(this.dom).parent().prepend('<svg width="70px" height="70px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="loading uil-ring"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><defs><filter id="uil-ring-shadow" x="-100%" y="-100%" width="300%" height="300%"><feOffset result="offOut" in="SourceGraphic" dx="0" dy="0"></feOffset><feGaussianBlur result="blurOut" in="offOut" stdDeviation="0"></feGaussianBlur><feBlend in="SourceGraphic" in2="blurOut" mode="normal"></feBlend></filter></defs><path d="M10,50c0,0,0,0.5,0.1,1.4c0,0.5,0.1,1,0.2,1.7c0,0.3,0.1,0.7,0.1,1.1c0.1,0.4,0.1,0.8,0.2,1.2c0.2,0.8,0.3,1.8,0.5,2.8 c0.3,1,0.6,2.1,0.9,3.2c0.3,1.1,0.9,2.3,1.4,3.5c0.5,1.2,1.2,2.4,1.8,3.7c0.3,0.6,0.8,1.2,1.2,1.9c0.4,0.6,0.8,1.3,1.3,1.9 c1,1.2,1.9,2.6,3.1,3.7c2.2,2.5,5,4.7,7.9,6.7c3,2,6.5,3.4,10.1,4.6c3.6,1.1,7.5,1.5,11.2,1.6c4-0.1,7.7-0.6,11.3-1.6 c3.6-1.2,7-2.6,10-4.6c3-2,5.8-4.2,7.9-6.7c1.2-1.2,2.1-2.5,3.1-3.7c0.5-0.6,0.9-1.3,1.3-1.9c0.4-0.6,0.8-1.3,1.2-1.9 c0.6-1.3,1.3-2.5,1.8-3.7c0.5-1.2,1-2.4,1.4-3.5c0.3-1.1,0.6-2.2,0.9-3.2c0.2-1,0.4-1.9,0.5-2.8c0.1-0.4,0.1-0.8,0.2-1.2 c0-0.4,0.1-0.7,0.1-1.1c0.1-0.7,0.1-1.2,0.2-1.7C90,50.5,90,50,90,50s0,0.5,0,1.4c0,0.5,0,1,0,1.7c0,0.3,0,0.7,0,1.1 c0,0.4-0.1,0.8-0.1,1.2c-0.1,0.9-0.2,1.8-0.4,2.8c-0.2,1-0.5,2.1-0.7,3.3c-0.3,1.2-0.8,2.4-1.2,3.7c-0.2,0.7-0.5,1.3-0.8,1.9 c-0.3,0.7-0.6,1.3-0.9,2c-0.3,0.7-0.7,1.3-1.1,2c-0.4,0.7-0.7,1.4-1.2,2c-1,1.3-1.9,2.7-3.1,4c-2.2,2.7-5,5-8.1,7.1 c-0.8,0.5-1.6,1-2.4,1.5c-0.8,0.5-1.7,0.9-2.6,1.3L66,87.7l-1.4,0.5c-0.9,0.3-1.8,0.7-2.8,1c-3.8,1.1-7.9,1.7-11.8,1.8L47,90.8 c-1,0-2-0.2-3-0.3l-1.5-0.2l-0.7-0.1L41.1,90c-1-0.3-1.9-0.5-2.9-0.7c-0.9-0.3-1.9-0.7-2.8-1L34,87.7l-1.3-0.6 c-0.9-0.4-1.8-0.8-2.6-1.3c-0.8-0.5-1.6-1-2.4-1.5c-3.1-2.1-5.9-4.5-8.1-7.1c-1.2-1.2-2.1-2.7-3.1-4c-0.5-0.6-0.8-1.4-1.2-2 c-0.4-0.7-0.8-1.3-1.1-2c-0.3-0.7-0.6-1.3-0.9-2c-0.3-0.7-0.6-1.3-0.8-1.9c-0.4-1.3-0.9-2.5-1.2-3.7c-0.3-1.2-0.5-2.3-0.7-3.3 c-0.2-1-0.3-2-0.4-2.8c-0.1-0.4-0.1-0.8-0.1-1.2c0-0.4,0-0.7,0-1.1c0-0.7,0-1.2,0-1.7C10,50.5,10,50,10,50z" filter="url(#uil-ring-shadow)"></path></svg>')},expose.Modal.prototype={mode:"normal",upmode:"",fx:{name:"fade",speed:200},visible:!1,onshow:function(){},onbeforeshow:function(){},onhide:function(){},onclose:function(e){if(e&&e.category){var o=e&&this.audienceObject(e);o&&hitAudience.countClick(o)}},audienceObject:function(e,o){return o=o||"","click"==e.type&&-1!=e.target.className.indexOf("icon-close")?o="fechar-modal":"click"==e.type&&-1!=e.target.className.indexOf("no-load")?o="fechar-clique-fora":"keyup"==e.type&&-1!=e.target.className.indexOf("modal-open")&&(o="fechar-esc-keyup"),e={reference:o,category:"login-"+e.category,action:"clique"}},onbeforeclose:function(){$("body").hasClass("googleCaptcha")&&(document.body.style.top=-1*bodyTopPosition+"px",$("body").removeClass("googleCaptcha"),$("body").removeClass("modal-open"))},visible_:!1,esc_:!1,click_:!1,queue_:[],setMode:function(e,o,t){t?this.fx.name=t:e&&(this.fx.name=e),e&&(this.closure.className+=" modal-mode-"+(this.mode=e)),void 0!==o&&(this.upmode&&(document.body.className=document.body.className.replace(" modal-"+this.upmode,"")),this.upmode=o,document.body.className+=" modal-"+this.upmode)},setEvents:function(e){for(var o in e)this[o]=e[o]},setStyle:function(e){$(this.dom).css(e)},setContent:function(e,o){if(!0===o&&(o=this.show),e instanceof jQuery&&(e=e.get(0)),e instanceof Node&&(e=e.outerHTML),"object"==typeof e){var t=(Config||{}).servicename!=undefined?Config.servicename:"/service/",s=(e.path||t)+"?json&loadComponent="+e.type+"&data="+encodeURIComponent(JSON.stringify(e.args))+"&configPath="+(e.configPath||Config.configPath);this.setMode(null,e.type),def.prototype.getjson.call(this,s,function(e){this.dom.innerHTML=e.body,o&&o.call(this),render()})}else-1==e.indexOf("\n")&&/^(https?:)?\/+[a-z0-9]|\..{2,4}$/.test(e)?def.prototype.getjson.call(this,e,function(e){this.dom.innerHTML=e.body,o&&o.call(this),render()}):(this.dom.innerHTML=e,o&&o.call(this),render())},show:function(e){if(this.visible=!0,this.closure.className=this.closure.className.replace(/\s+hide/,""),0==this.onbeforeshow())return!1;var o=this;"left"==this.fx.name?$(this.dom).animate({left:"0"},"normal",function(){e&&e.call(o),o.onshow(),render(),$(o.closure).addClass("no-load")}):"fade"==this.fx.name?$(this.dom).hide().fadeIn(this.fx.speed,function(){e&&e.call(o),o.onshow(),render(),$(o.closure).addClass("no-load")}):(e&&e.call(o),this.onshow(),$(o.closure).addClass("no-load"))},hide:function(e){this.visible=!1;var o=this;"left"==this.fx.name?($(this.closure).fadeOut(),$(this.dom).animate({left:"-100%"},"normal",function(){o.closure.className+=" hide",e&&e.call(o),o.onhide()})):"fade"==this.fx.name?$(this.dom).show().fadeOut(this.fx.speed,function(){o.closure.className+=" hide",e&&e.call(o),o.onhide()}):(this.closure.className+=" hide",e&&e.call(this),this.onhide()),this.upmode&&(document.body.className=document.body.className.replace(" modal-"+this.upmode,""));e:{for(var t=instances.modal.length;t--;)if(instances.modal[t].visible)break e;var s=Math.abs(parseInt(document.body.style.top));document.body.className=document.body.className.replace(/\smodal-open/g,""),document.body.removeAttribute("style"),window.scrollTo(0,s)}},enableUIControl:function(){var e=this;$(this.closure).on("click",".modal-close",function(o){o.preventDefault(),e.close(o);var t=$("head meta[name=viewport]"),s=t.attr("content");t.remove(),$("head").prepend('<meta name="viewport" content="'+s+'" />')})},enableEscClose:function(){this.esc_=!0},disableEscClose:function(){this.esc_=!1},enableClickClose:function(){this.click_=!0},disableClickClose:function(){this.click_=!1},addButtonClose:function(e,o,t){const s=o||"fechar-modal",n=t?',"paywallType": "'+t+'"':"";$(this.dom).prepend('<button class="btn modal-close" data-audience-click=\'{"reference":"'+s+'","component":"'+e+'"'+n+'}\'><i class="icon-close-2"></i></button>')},addHeader:function(e,o){var t="",s=this.dom;"object"==typeof e?(t=e.html,s=e.closure?this.closure:s):(e&&(t+="<h4>"+e+"</h4>"),o&&(t+='<p class="node"><small>'+o+"</small></p>")),t='<div class="modal-header">'+t+"</div>",$(".modal-header",this.dom).remove(),"BUTTON"==(this.dom.firstElementChild||{}).nodeName?$(this.dom.firstElementChild).after(t):$(s).prepend(t)},addScrollEvent:function(e){var o=this;$(this.dom).on("scroll",function(){e.apply(o,arguments)})},standalone:function(){for(var e=instances.modal.length;e--;){var o=instances.modal[e];o!==this&&(o.visible_=o.visible,o.visible&&o.hide(),this.queue_.push(instances.modal.splice(e,1)[0]))}},close:function(e){if(!1!==this.onbeforeclose()){e&&document.getElementsByClassName("modal-mode-babel-login").length&&(e.category=document.getElementsByClassName("modal-mode-babel-login")[0].dataset.category);for(var o=instances.modal.length;o--&&instances.modal[o]!==this;);if(-1!=o){for(var t=instances.modal.length;--t>o;)instances.modal.splice(t,1)[0].close();instances.modal.splice(o,1)}this.hide(function(){if(this.closure.parentNode.removeChild(this.closure),this.close=function(){},this.onclose(e),this.queue_.length){for(var o=this.queue_.length;o--;)this.queue_[o].visible_&&this.queue_[o].show();instances.modal=this.queue_}})}},buildStructure:function(){this.closure=document.createElement("div"),this.closure.className="modal",this.dom=document.createElement("div"),this.dom.className="modal-wrapper",this.closure.appendChild(this.dom),document.body.appendChild(this.closure)},unique:function(){for(var e=instances.modal.length;e--;)instances.modal[e]!==this&&instances.modal[e].close()}},window.addEventListener("keyup",function(e){switch(e.which||e.keyCode){case 27:const o=2===document.getElementsByClassName("modal modal-mode-left no-load").length;modal=o?new Array(instances.modal[instances.modal.length-1]):instances.modal&&instances.modal.slice(-1)[0],modal&&modal.esc_&&modal.close(e)}}),window.addEventListener("click",function(e){var o=[];if((o=2===document.getElementsByClassName("modal modal-mode-left no-load").length?new Array(instances.modal[instances.modal.length-1]):instances.modal&&instances.modal.slice(-1)[0])&&o.click_){for(var t=window.SVGElementInstance&&e.target instanceof SVGElementInstance?e.target.correspondingUseElement:e.target;t&&("object"==typeof t.className||!t.className||-1==t.className.indexOf("modal-wrapper")&&-1==t.className.indexOf("loginbox"));)t=t.parentNode;t||o.close(e)}document.querySelector(".wrapper-header")&&document.querySelector(".wrapper-header").classList.remove("positioning")},!0); });    def('babel', function(){ "use strict";function like(e){action.call(this,"like",e)}function dislike(e){action.call(this,"dislike",e)}function action(e,i){return e?i?void lib["babel-login"].login().then(function(o){o.token&&lib["babel-service"].get({type:"message",service:e,id:i,params:{token:o.token}}).then(function(e){if(e.error)return alert(e.error),!1})}):(console.log("Informe o ID do comentário."),!1):(console.error("Informe o tipo da ação (like/dislike)."),!1)}expose.like=like,expose.dislike=dislike; });    def('babel-login', function(){ def("babel-login",["widget-profile","babel-service","babel","modal"],function(){"use strict";var e="babel.user.",o={opener:".babel-login, .pill.not-logged",modal:".modal",user:"#loginUser",password:"#loginPassword",login:"#login",logout:".logout, .pill.logged",message:"label.error",social:".login .loginWith a",changeView:".login .backToLogin a"};function t(){return window.widgetProfile&&widgetProfile.Login.isUserLoggedIn()}function n(){var o=this;0==document.getElementsByClassName("open-comments").length&&"object"==typeof widgetProfile&&widgetProfile.reloadWidget();var t="object"==typeof widgetProfile&&widgetProfile.Settings.getAuth();events.emit(e+"login.success",null,["Usuário checado",t]),o.checkStatus().then(function(o){200==+o.code&&o.result&&o.result.user?5!=o.result.user.userStatus&&7!=o.result.user.userStatus||events.emit(e+"needNickname",null,["Usuário necessita um apelido"]):(events.emit(e+"login.checked",null,["Usuário checado",o]),events.emit("contauol.login.revalidate",null,null))},function(e){console.error("Babel Error:",e),setTimeout(function(){n.call(o)},1e3)})}function i(){var e,o=this,t=$.Deferred();return(e={product:"noticias",source:"UOL",auto_import:!0},console.debug("checkLogin ",e),lib["babel-service"].get({type:"user",service:"login",params:e||{}})).then(function(e){if(e&&"code"in e&&(200==+e.code||401==+e.code||428==+e.code)&&"result"in e&&"isLogged"in e.result)o.session=e.result,o.session.code=+e.code,t.resolve(o.session);else{if(e&&500==+e.code)return o.whereAmI().then(e=>{200==+e.code&&(e.result.isLogged=!0,o.session=e.result,t.resolve(o.session))});t.reject({type:"error",msg:"Houve um problema na autenticação do usuário. Tente novamente."})}}),t.promise()}function s(o){o="function"==typeof o?o:function(){};var t=this;widgetProfile&&widgetProfile.Login.doLogout(!1,function(){t.session=!1;try{instances.header[0].showItens(0)}catch(s){console.error("[widget-profile] A função instances.header[0].showItens() não existe!")}events.emit(e+"logout.success",null,"Deslogado com sucesso!"),document.querySelector(".header, .bbolp-2014").querySelector("#uol-mail-link").querySelector(".mail-notification").innerHTML="";var n=document.querySelector(".news-notice .girouol #subscriber-cmp1"),i=!1;typeof n!==undefined&&null!==n&&(i=!0),i&&(n.value=""),o()})}function a(e){var o="",t=e.separator||"&";return e.separator&&delete e.separator,jQuery.each(e,function(e,n){o+=(o.length?t:"")+encodeURIComponent(e)+"="+encodeURIComponent(n)}),o}function r(e){if("boolean"==typeof e.isLogged&&localStorage.getItem("porteira-login")){var o=e.isLogged?"login-success":"login-failure",t=JSON.parse(localStorage.getItem("porteira-login"));localStorage.removeItem("porteira-login"),e={category:t.component,reference:t.network,action:o},"undefined"!=t.component&&hitAudience.countEvent(e)}else if("string"==typeof e){var n=document.getElementsByClassName("modal-wrapper")[0].dataset.category;localStorage.setItem("porteira-login",JSON.stringify({network:e,component:n}))}}expose.session=!1;var l={fields:o.user+","+o.password+","+o.login,inputs:o.user+","+o.password,enabled:function(e){$(l.fields).attr("disabled",!e)},hasFocus:function(){$(this).closest("label")["focusin"==event.type||"focus"==event.type?"addClass":"removeClass"]("focus")},changeView:function(e){e.preventDefault(),$(".login .modal-body").toggleClass("alternative")}},c={login:function(e){var o={network:{facebook:{sn:1,source:"FACEBOOK"},twitter:{sn:5,source:"TWITTER"}}[(e=$.extend(!0,{type:"login",network:"facebook"},e)).network].sn,type:e.type,url:location.protocol+"//"+location.host+'/service/?loadComponent=babel-login&data={"closeWindow":true}'};r(e.network),l.enabled(!1);var t=window.open("","socialLogin",a({separator:",",width:600,height:600,scrolling:"no",statusbar:"no",resizeable:"no"}));lib["babel-service"].get({type:"user",service:"socialStart",params:{sn:o.network,social_auth_type:o.type,url_callback:o.url}}).then(function(e){var n={separator:"&",sn:o.network,"x-uol-social-tk":e.result.socialtoken};t.location.href="https://social.api.uol.com.br/oauth?"+a(n)})},select:function(e){e.preventDefault(),c.login({network:$(this).text().trim().toLowerCase()})},attempts:0,callback:function(e){var o=lib["babel-login"];if(e.success){var t=function(){i.call(o).then(function(e){!e.isLogged&&c.attempts<=1?(c.attempts++,setTimeout(t,1e3)):(c.attempts=0,u.instance&&u.newWindow&&u.close&&u.close(),events.emit("babel.user.login.success",null,["Logado com sucesso!",u]),o.loginRegister({isLogged:e.isLogged}))},function(){setTimeout(function(){c.callback.call(null,e)},1e3)})};setTimeout(t,100)}else g.error("Ocorreu um erro na autenticação por Rede Social. Tente novamente mais tarde!"),o.loginRegister({isLogged:!1})}},u={template:null,instance:null,newWindow:!0,getTemplate:function(e,o){if(u.template)u.template=u.template.replace(/(:"login)(-\w+)*/gi,"$1-"+o),e();else{var t={type:"babel-login",args:{page:window.location.href.replace(/#.*/,""),category:o}},n=new XMLHttpRequest;n.open("GET","/service/?loadComponent="+t.type+"&data="+encodeURIComponent(JSON.stringify(t.args))),n.onload=function(){u.template=n.responseText,e()},n.send()}},open:function(o){o.preventDefault();var n=o.currentTarget.dataset.category||"undefined",i=$.Deferred(),s={action:"open"};if("undefined"!=n&&(s={action:"open",loginStyle:{hideOutdoor:!1,title:"Acesse sua conta",subtitle:"Para dar sua opinião, participar do debate e interagir com os demais leitores, faça seu login no UOL."},metrics:{category:n}}),n&&window.widgetCustom[n]){var a=window.widgetCustom[n]||{};s.loginStyle={hideOutdoor:!1,title:a.titulo,subtitle:a.texto}}var r=function(){widgetProfile.View.widgetModal(s,function(){console.debug("OPEN to login! - modal.open",n)})};401===lib["babel-login"].session.code&&lib["babel-login"].isLogged()||428===lib["babel-login"].session.code?lib["babel-login"].logout(r):r();var l=o.data&&o.data.instance||{};if(!!t.apply(l)){var c=$(this).data("config")||{};events.emit(e+"logged",null,["Usuário logado!",c])}return i.promise()},close:function(){u.instance.close&&u.instance.close()}},g={login:function(o){var t=o.data.instance;t.loginRegister("uol"),t.session=!1,t.login().then(function(o){o.type&&"error"==o.type?(g.error(o.msg),t.loginRegister({isLogged:"error"!=o.type})):(console.debug("self.login else",o),t.loginRegister({isLogged:!0}),events.emit(e+"login.success",null,["Logado com sucesso!",u]))})},logout:function(o){var t=o.data.instance;s.call(t),events.emit(e+"logout.success",null,"Deslogado com sucesso!"),"object"==typeof widgetProfile&&widgetProfile.reloadWidget()},error:function(o){$(".login .form").addClass("hasError").find(".error").text(o).removeClass("hidden").end().find("input").filter(function(){return""==this.value}).first().focus(),l.enabled(!0),r({islogged:!1}),events.emit(e+"login.fail",null,o)}};$("body").on("close",o.modal,u.close).on("click",o.opener,{instance:expose},u.open).on("click",o.login,{instance:expose},g.login).on("click",o.logout,{instance:expose},g.logout).on("click",o.social,c.select).on("click",o.changeView,l.changeView).on("focusin focusout",l.inputs,l.hasFocus),expose.login=function(){var e=$.Deferred();return this.isLogged()?(events.emit("babel.user.login.success",null,["Logado com sucesso!",u]),e.resolve(this.session)):function t(){var e=this,n=$.Deferred(),i=$(o.user).val(),s=$(o.password).val();if($(o.message).html(""),console.debug("doLogin"),!i||!s){var a=i?"Informe a senha.":"Informe o usuário.";return n.resolve({type:"error",msg:a})}return $.ajaxFrame({url:lib["babel-service"].routes.url.auth,data:{user:i,pass:s},callback:function(){e.checkStatus().then(function(e){n.resolve(e.isLogged?e:{type:"error",msg:"Email ou senha informados estão incorretos."})},function(){console.error("Babel Error:",data),setTimeout(function(){t.call(e)},1e3)})}}),n.promise()}.call(this)},expose.logout=s,expose.modalLogin=u.open,expose.isLogged=t,expose.socialLogin=c.login,expose.whereAmI=function(){return lib["babel-service"].get({type:"user",service:"socialSimpleWhereAmI"})},expose.setSession=n,expose.checkStatus=i,expose.loginRegister=r,window.callbackSocialLogin=c.callback,window.onfocus=function(e){var o=lib["babel-login"];if(window.widgetProfile&&e.currentTarget===window&&o){var t=o.isLogged(),i=function(){for(var e=document.cookie.split(";"),o=0;o<e.length;o++){for(var t=e[o];" "==t.charAt(0);)t=t.substring(1);if(0==t.indexOf("JS_SESS="))return t.substring("JS_SESS=".length,t.length)}return"eos"}();(!t&&"eos"!=i||t&&"eos"==i)&&n.call(o)}};var d=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream;"xs"==lib.breakpoints.breakpoint.name&&d&&document.addEventListener("widgetNotifyModalLogin",function(e){var o=e.detail;"modal-open"===o.action?$(".header").addClass("modal-login-ios"):"modal-close"===o.action&&$(".header").removeClass("modal-login-ios")},!0),jQuery.ajaxFrame=function(e){var o,t,n;e=jQuery.extend({data:{},dataType:"post",callback:jQuery.noop},e);var i="ajax-frame-"+(new Date).getTime(),s=jQuery('<iframe scrolling="no" frameborder="0" name="'+i+'"></iframe>');for(n in o='<form action="'+e.url+'" method="'+e.dataType+'" target="'+i+'">',e.data)e.data.hasOwnProperty(n)&&(o+='<input type="hidden" name="'+n+'" value="'+e.data[n]+'"/>');o+="</form>",t=jQuery(o),s.hide().appendTo("body"),t.appendTo("body").hide(),window.setTimeout(function(){s.load(function(){window.setTimeout(function(){s.remove()},500),t.remove(),e.callback.apply(this,arguments)}),t.submit()},500)}}); });    def('contauol-login', function(){ def("contauol-login",function(){"use strict";var n=lib["babel-login"],o=".contauol-login, .pill.not-logged",e=window.location.href.split("?")[0],t="comentarios";e.indexOf("economia.uol.com.br/mais")>-1&&(t="economia-mais");var i={popup:`https://conta.uol.com.br/login?t=${t}&dest=${e}/?loadComponent=contauol-login`,productVerification:"https://n.comentarios.uol.com.br/ws/v4/user/login?auto_import=true&product=noticias&source=UOL&theme_id=538"};expose.session=null,expose.isAuthByV4=!1,expose.delay=0;var u=function(n){if(n){try{n.close()}catch(o){}try{n.close()}catch(o){}}window.focus()};expose.validUser=function(o){var e=$.Deferred(),t=this;return clearTimeout(t.delay),events.emit("contauol.login.running",null,!0),t.delay=setTimeout(function(){$.ajax({url:i.productVerification,method:"GET",xhrFields:{withCredentials:!0},success:function(i){var u=(n.session||{}).user||{};t.session=i.result,t.isAuthByV4=null!==i.result&&null!==i.result.user,e.resolve(t.isAuthByV4),u&&u.socialNetwork&&"uol"!=u.socialNetwork.toLowerCase()&&o?document.location.reload():(events.emit("contauol.login.check",null,t.isAuthByV4),events.emit("contauol.login.running",null,!1))},error:function(n){t.session=null,e.reject(!1),events.emit("contauol.login.check",null,t.isAuthByV4),events.emit("contauol.login.running",null,!1)}})},650),e.promise()},expose.binds=function(){var e=this,t=!1,l=15,s=function(){var n=function(n){for(var o=n+"=",e=document.cookie.split(";"),t=0;t<e.length;t++){for(var i=e[t];" "==i.charAt(0);)i=i.substring(1,i.length);if(0==i.indexOf(o))return i.substring(o.length,i.length)}return null}("JS_SESS");return null!==n&&n!==undefined},c=function(){var n=function(){t.closed||s()?e.validUser(!0).then(function(){u(s()?t:undefined)},function(){u(s()?t:undefined)}):setTimeout(n,50)};n()},r=function(){s()&&l>0?setTimeout(function(){r(),l--},300):l&&(t=window.open(i.popup,"popup","height= 600px, width= 780px"),c())};$("body").on("click",o,{instance:expose},function(){var o=n,u=(n.session||{}).user||{};e.isAuthByV4||"UOL"!=u.socialNetwork?(t=window.open(i.popup,"popup","height= 600px, width= 780px"),c()):(o.logout(),r())}),events.push("contauol.login.revalidate",null,function(){e.validUser(!1).then(function(){},function(){})})}}); });    def('babel-service', function(){ def("babel-service",["/exposejs/jsonp-promise"],function(){"use strict";var e="https://n.comentarios.uol.com.br/",o={url:{auth:"https://acesso.uol.com.br/login.html?skin=comentarios&dest=REDIR|"+location.protocol+"//www3.uol.com.br/interacao/comentarios/blank.htm"},messages:{subject:"v1/messages/subject/{id}",editor:"v1/messages/editor-recommended/{id}",likesBySubject:"v1/users/likes-by-subject/{id}",parent:"parent/{id}"},subject:{retrieve:"ws/v1/subject/retrieve/{id}",simpleRetrieve:"ws/v1/subject/simple-retrieve/"},user:{login:"ws/v2/user/login",logout:"ws/v1/user/logout",create:"ws/v2/user/create",update:"ws/v2/user/update",ping:"ws/v1/user/ping",updateNotification:"ws/v1/user/update/reply-notification",updateNotificationType:"ws/v1/user/update/reply-notification-type",socialStart:"ws/v1/user/social/start-session",socialSimpleWhereAmI:"ws/v1/user/social/simple-where-am-i",socialWhereAmI:"ws/v1/user/social/where-am-i"},message:{create:"ws/v2/message/create",preview:"ws/v1/message/preview",del:"ws/v1/message/delete/{id}",edit:"ws/v2/message/edit/{id}",createSubject:"ws/v2/message/create/subject",pin:"ws/v1/message/pin/{id}/{id}",unpin:"ws/v1/messager/unpin/{id}",like:"ws/v1/message/like/{id}",dislike:"ws/v1/message/dislike/{id}"}};expose.get=function(s){var a;if(a={user:e,message:e,messages:"https://view.comentarios.uol.com.br/",subject:"https://view.comentarios.uol.com.br/"}[s.type]+function(e){return o[e.type][e.service].replace(/{id}/,e.id)}(s),s.params){var i;for(i in s.params)s.params.hasOwnProperty(i)&&"sort"!==i&&(s.params[i]=encodeURIComponent(s.params[i]));a+="?"+$.param(s.params)}return lib["jsonp-promise"]&&lib["jsonp-promise"].jsonp(a,s.service).error(function(e){var o="Ocorreu uma falha na requisição de dados.",a=s.root&&s.root.dom||!1;a?events.emit("babel.service.feedback",a,o):events.emit("babel.service.feedback",null,o)})},expose.routes=o,expose.messageHandler=function(e){if(!e)return console.log("Sem param"),!1;var o={api:{423:"Assunto inativo",425:"Usuário não encontrado",426:"Assunto não encontrado",427:"Mensagem não encontrada",428:"Você já avaliou esta mensagem",431:"Token de autenticação inválido",432:"Proteção antiflood",433:"Json inválido",434:"Critério de avaliação inválido",435:"Critério de avaliação não encontrado",436:"Usuário não tem permissão",440:"Falha na autenticação",444:"Tema não encontrado",446:"Falha na autorização",451:"Turing inválido",458:"Avaliação e comentários obrigatórios",500:"Operação não realizada, verifique os dados*"},friendlyMessage:{200:{message:{create:"Seu comentário foi enviado com sucesso.",del:"Seu comentário foi removido com sucesso.",preview:"",edit:"",createSubject:"",pin:"",unpin:"",like:"",dislike:""}},423:"Esta discussão foi encerrada",425:"Usuário não encontrado",426:"Assunto não encontrado",427:"Mensagem não encontrada",428:"Você já avaliou esta mensagem",431:"Token de autenticação inválido",432:"Ops!\n Aguarde alguns instantes antes de publicar seu novo comentário",433:"Json inválido",434:"Critério de avaliação inválido",435:"Critério de avaliação não encontrado",436:"Usuário não tem permissão",440:"Tempo para responder foi excedido.\n Por favor, faça novamente o login.",444:"Tema não encontrado",446:"Falha na autorização",451:"Turing inválido",458:"Avaliação e comentários obrigatórios",500:"Operação não realizada, verifique os dados*"},events:{200:"babel:success",400:"babel:invalid-parameter",422:"babel:subject:invalid-size",431:"babel:user:nickname",423:"babel:subject:close",432:"babel:user:anti-flood",436:"babel:user:not-allowed",440:"babel:session-expired"}},s={},a="Seu comentário foi enviado com sucesso.",i=+e.data.code,r=e.data.callback||jQuery.noop;if(!i)throw"Erro na API";200===i?(s=e.data.result,o.friendlyMessage[i][e.type]&&(a=o.friendlyMessage[i][e.type][e.service]),+s.pending_messages&&+s.user_pending_messages&&(a={badword_disapproved:"Seu comentário contém URL ou palavras de abuso. \nEscreva novamente seu comentário em <var>15</var> segundos",pending:"Seu comentário foi enviado com sucesso para moderação. \nHá "+s.pending_messages+" "+(1==s.pending_messages?"comentário":"comentários")+" na fila de moderação. "+s.user_pending_messages+" "+(1==s.user_pending_messages?"foi enviado":"foram enviados")+" por você."}[s.moderation_status.toLowerCase()],"badword_disapproved"==s.moderation_status.toLowerCase()&&(i=432))):a=o.friendlyMessage[i][e.type]?o.friendlyMessage[i][e.type][e.service]:o.friendlyMessage[i];var n={msg:a,code:i,callback:r};return e.root.dom?(n.button=e.button,events.emit("babel.service.feedback",e.root.dom,n)):events.emit("babel.service.feedback",null,n),a}}); });    def('suggest', function(){ instances.suggest=[],expose.create=function(e,t){var s=new this.Suggest;if(e instanceof jQuery)e=e[0];return s.dom=e,s.input=s.dom&&s.dom.querySelector(".suggest[data-args]"),t&&s.setEvents(t),s.events.call(s),s},expose.Suggest=function(){instances.suggest.push(this)},expose.Suggest.prototype.fired=!1,expose.Suggest.prototype.storage={},expose.Suggest.prototype.lastRequest=function(){},expose.Suggest.prototype.onSuccess=function(){},expose.Suggest.prototype.onCancel=function(){},expose.Suggest.prototype.onEmpty=function(){},expose.Suggest.prototype.onBeforeSearch=function(){},expose.Suggest.prototype.setEvents=function(e){for(key in e)this[key]=e[key]},expose.Suggest.prototype.search=function(e,t){if(e.getAttribute("data-search")&&"false"!=$(e).attr("changepage")){this.onBeforeSearch.call(this);var s=$(e).closest(".input-box").find(".suggest-list li");s.attr("data-link")?location.href=s.attr("data-link"):location.href=e.getAttribute("data-search")+encodeURIComponent(e.value)}},expose.Suggest.prototype.events=function(){var e=this;this.input&&$(this.input).on("keyup",function(t){var s=this.value,o=this.getAttribute("data-length");if(clearTimeout(e.lastRequest),(""==s||o&&s.length<=o||!o&&s.length<=3||27==t.keyCode)&&e.fired)return e.fired=!1,27==t.keyCode&&(this.value=""),void e.onCancel.call(e);if(!o&&s.length>=3||o&&s.length>=o){var n="request",a=$(this).parent().find(".suggest-list li");13==t.keyCode&&a.length>0&&a.first().attr("data-link")&&(n="search"),e[n].call(e,this,t)}}),this.dom&&$(this.dom).on("click","[data-search-suggest]",function(t){t.preventDefault();var s=this.innerHTML||this.text;e.input.value=s,e.search.call(e,e.input,t)})},expose.Suggest.prototype.request=function(e,t){var s=this;this.lastRequest=setTimeout(function(){var t=e.getAttribute("data-args"),o=JSON.parse(t).slugify?lib.string.slug(e.value):e.value,n=location.origin+Config.servicename+"?loadComponent=suggest&data="+encodeURIComponent(t.replace(/<<value>>/g,o));$.get(n,function(e){"empty result"==e.message?s.onEmpty.call(s):s.onSuccess.call(s,e.data),s.lastRequest=function(){},s.fired=!0})},1e3)}; });    def('ads', function(){ !function(){"use strict";include("breakpoints"),expose.update=function(){var e=this.parse(this.dom.getAttribute("data-ads"),{}),i=this.parse(this.dom.getAttribute("data-position")),t=this.dom.getAttribute("data-tag"),s=!0;if(e.push!==undefined){s=e.push;delete e.push}var a=[],n=Object.keys(e);for(var d in n)if(n.hasOwnProperty(d)){var o=n[d];o&&o.match(/(xs|sm|md|lg)/)&&a.push(o)}for(var r=this.breakpoints.sortOptions(a),h=0;h<r.length;h++)if(this.breakpoints.checkin(r[h],!!e[r[h]])){if(e[r[h]])var l=r[h];break}if($(this.dom).children().hide().removeClass("visible"),l){if($(this.dom).show().children().each(function(){this.id.match(e[l])&&$(this).show().addClass("visible")}),!$(this.dom).children(".visible").length){var p=document.createElement("div"),u=document.querySelectorAll("[id*=banner-"+e[l]+"]").length+1;if("120x35-area"!=e[l]&&"120x35-area-2"!=e[l]&&"120x35-3-area"!=e[l]&&"120x35-2-area"!=e[l]?p.id="banner-"+e[l]+"-"+u:p.id="banner-"+e[l],-1!=e[l].indexOf("120x35")&&(p.style.display="none"),p.setAttribute("data-ads-text",this.dom.getAttribute("data-text")||""),"banner-responsive-vertical-1"==p.id&&0==document.querySelectorAll("[id*=banner-responsive-top-vertical-1]").length&&(p.id="banner-responsive-top-vertical-1"),""!=i&&-1!=p.id.indexOf("banner-300x250-area-")&&(p.id="banner-300x250-area-"+i),this.dom.appendChild(p),-1!=p.id.indexOf("banner-responsive-middle-2-horizontal-area-")&&-1!=p.id.indexOf("banner-responsive-middle-2-horizontal-area-2"))s=!1;if(s&&!$("body").hasClass("modal-open")){const e=$(this.dom).attr("data-adsisconfig");e&&""!=e?(universal_variable.aud&&universal_variable.aud.tags,console.log("[#ADS]",p.id),window.pushAds&&window.pushAds.push(p.id),console.log("[#pushAds]",window.pushAds)):t?window[window.adsType].push({id:p.id,customTargetings:{tags:t}}):window[window.adsType]&&window[window.adsType].push({id:p.id})}}}else this.dom.style.display="none"},expose.init=function(){this.update(),this.breakpoints.change(this,function(){this.update()}),window.location.search.includes("woutAdivs")&&$(this.dom).parent().hide()}}(); });    def('collection', function(){ include("session-blacklist","storage"),expose.items=[],expose.loadItemLocked=!1,expose.initialItem={url:location.href,title:document.title,actualUrl:location.href},expose.index=-1,expose.viewRatio=1.5,expose.permanenceTime=2e3,expose.permanenceIndex=0,expose.permanenceTimer,expose.onscroll=function(){this.checkItemsToLoad(),this.checkViewport()},expose.current=function(){return-1!=this.index&&this.allItems[this.index]},expose.updateHistory=function(){},expose.enablePushState=function(){this.updateHistory=function(){var e=this.current(),t=this.initialItem,i=(e.getAttribute("data-url")||"").replace(/https?:/,location.protocol).replace(".br",".br:"+location.port)||"";if(-1==i.search(/external-content/)){if(!i)return document.title=t.title,void history.replaceState(null,document.title,t.url);document.title=((e.uol||{}).metatags||{}).title||Audience.mediaTitle,document.title=$("<textarea>").html(document.title).val(),history.replaceState(null,document.title,i),window.pSUPERFLY&&pSUPERFLY.virtualPage(e.getAttribute("data-url").replace(/https?:\/\/.*?(\/.*)/,"$1"),document.title),t.actualUrl=i}}},expose.startPermanenceControl=function(){var e=this;this.permanenceTimer&&clearTimeout(this.permanenceTimer),this.permanenceTimer=setTimeout(function(){e.permanenceIndex!=e.index&&(e.permanenceIndex=e.index,e.permanenceCallback())},this.permanenceTime)},expose.permanenceCallback=function(){Audience.firstView&&(hitAudience.countMetrics(this.current().uol&&this.current().uol.audience||Audience),delete Audience.firstView)},expose.contentUpdated=function(){this.items=this.dom.querySelectorAll(".collection-item:not([data-loaded])")},expose.checkViewport=function(){for(var e=window.innerHeight/2,t=0;t<this.allItems.length;t++){var i=this.allItems[t].getBoundingClientRect();i.top<e&&i.bottom>e&&this.index!=t&&this.updateIndex(t)}},expose.autoClick=function(){var e=!(!this.current()||-1==this.current().className.indexOf("collection-first-item"))&&this.current().querySelector(".btn[data-open]");e&&$(window).on("scroll",function(){var t=[$(e).offset().top,$(this).scrollTop()+$(this).height(),50];t[1]>t[0]-t[2]&&$(e).is(":visible")&&e.click()})},expose.updateIndex=function(e){this.index=e,this.updateHistory(),this.startPermanenceControl()},expose.checkItemsToLoad=function(){for(var e=0;e<this.items.length;e++){var t=this.items[e],i=t.getBoundingClientRect();window.innerHeight*this.viewRatio>Math.abs(i.top)&&!this.loadItemLocked&&(this.loadItemLocked=!0,this.loadItem(t,this.checkItemsToLoad))}},expose.loadItem=function(e,t){var i,o,n=this,l=this.parse(e.getAttribute("data-service"),{});if(l.hasOwnProperty("url")&&l.isBlog)o=l.url;else{if(i=Config.servicename+"?loadComponent=collection-item&data=",l.hasOwnProperty("url")&&(l.url=escape(l.url)),e.getAttribute("data-component"))if(l.path=Collection.path,"headline-content"==e.getAttribute("data-component"))l.blacklist=this.sessionStorage.getList("collection");else if(-1!=e.getAttribute("data-component").indexOf("chapter-synopsis")){var a=location.search.slice(1),c=a.split("&"),s={};""!=a&&c.length>0&&c.forEach(function(e){var t=e.split("="),i=t[0],o=t[1];s[i]=o}),s.titulo=Collection.titulo,s["tags-id-collection"]=Collection.search.tags,l.compData=s}o=i+JSON.stringify(l)}function r(i){e.setAttribute("data-loaded",i),this.loadItemLocked=!1,this.contentUpdated(),$(".collection-loading").hide(),t&&t.call(this)}$(".collection-loading").show(),this.getjson(o.replace(/https?:/g,location.protocol),function(t){if(t.hasOwnProperty("body")&&t.body.trim().length>0)if($(e).html(t.body),(t.audience||{}).string&&delete t.audience.string,$(e).hasClass("collection-module")){if(e.uol={type:"modulo-cruzado",metatags:t.metatags,audience:{collection:Collection.titulo,channel:Collection.channel,central:Collection.central,mediaType:t.type,mediaName:"Módulo Cruzado",mediaTitle:"Módulo Cruzado"}},(Component[t.type]||{}).audience)for(var i in Component[t.type].audience)e.uol.audience[i]=Component[t.type].audience[i];t.blacklist.map(function(t){"headline-content"==e.getAttribute("data-component")&&n.sessionStorage.addItem("collection",t)})}else t.audience.collection=Collection.titulo,t.audience.channel=Collection.channel,t.audience.central=Collection.central,e.uol={type:t.type,metatags:t.metatags,audience:t.audience};else{const e=this.allItems[0];e.parentNode.removeChild(e.nextSibling)}r.call(this,"loaded")},function(){r.call(this,"error")})},expose.init=function(){var e=this;this.sessionStorage=new this["session-blacklist"],this.allItems=this.dom.querySelectorAll(".collection-item"),this.contentUpdated(),this.checkItemsToLoad(),this.updateIndex(0),$(window).on("scroll.collection",function(){e.onscroll.call(e)}),window.Collection!=undefined&&Collection.collectionIndex||(-1==location.search.search(/nopush/)&&this.enablePushState(),window.addEventListener("beforeunload",function(){document.title=e.initialItem.title,history.replaceState(null,document.title,e.initialItem.url)})),"scrollRestoration"in history&&(history.scrollRestoration="manual")},expose.selector="body"; });  