(window.webpackJsonp=window.webpackJsonp||[]).push([[129],{493:function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return h});var i=n(15),a=n.n(i),e=n(16),r=n.n(e),i=n(341),o=n.n(i),e=n(342),c=n.n(e),i=n(343),s=n.n(i),e=n(344),l=n(349),u=n(346),i=n(54),d=n.n(i);function f(n){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=s()(n);return e=i?(t=s()(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),c()(this,e)}}var h=function(t){o()(n,t);var e=f(n);function n(){return a()(this,n),e.apply(this,arguments)}return r()(n,[{key:"onCreate",value:function(){var t=this.dom,e=this.load,n=this.scrollLoad;window.crazyload(),d()(t).on("click",".btn-search:not(.searching)",function(){e.call(this,t)}),d()(".btn-search",t).attr("data-scroll-load")&&window.addEventListener("scroll",function(){n.call(this,t)})}},{key:"scrollLoad",value:function(t){var e=d()(".btn-search",t);e.length&&(t=-1*document.body.getBoundingClientRect().top+window.innerHeight,e.offset().top<=t&&e.filter(":not(.searching)").trigger("click"))}},{key:"load",value:function(e){var n=this,i=Object(l.a)(this.getAttribute("data-request"),{}),t=this.getAttribute("data-loadComponent")||"results-index",a=this.getAttribute("data-history"),r=this.getAttribute("data-link"),o=Object(l.a)(this.getAttribute("data-audience"),!1);o&&(i.audience={click:{mediaName:o.mediaName}}),"true"===a&&(c=this.getAttribute("data-next"),s=(s="")==location.search?"?next=".concat(c):-1!=location.search.indexOf("next")?location.href.replace(/(next=)(.*N)/g,"next="+c):"".concat(location.href,"&next=").concat(c),history.replaceState(null,null,s));var c=document.querySelector(".results-index.list"),s=Array.from(e.querySelectorAll(".thumbnails-item")).reverse().findIndex(function(t){return t.className.includes("itemAds")});c&&(i.ads={show:!0,bp:{xs:"native-tudosobre-area"},lastPositionAds:s});t=r||"".concat(window.Config.servicename,"?loadComponent=").concat(t,"&data=").concat(JSON.stringify(i));this.classList.add("searching"),this.innerHTML="carregando...",Object(u.a)(t,function(t){t=d()(t.body);d()(".results-items",e).append(t.find(".results-items").html()),d()(e).find(".ver-mais").remove(),i.hasNext&&(t.find(".ver-mais").insertAfter(d()(".results-items",e)),n.classList.remove("searching"))})}}]),n}(e.a)}}]);