(window.webpackJsonp=window.webpackJsonp||[]).push([[145],{510:function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return f});var i=n(14),a=n.n(i),e=n(15),o=n.n(e),i=n(345),r=n.n(i),e=n(346),c=n.n(e),i=n(347),s=n.n(i),e=n(348),l=n(352),u=n(350),i=n(55),d=n.n(i);function h(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 f=function(t){r()(n,t);var e=h(n);function n(){return a()(this,n),e.apply(this,arguments)}return o()(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),t=document.body.classList.contains("modal-open");e.length&&(t=-1*(t?window.innerHeight:document.body.getBoundingClientRect().top)+window.innerHeight,e.offset().top<=t&&e.filter(":not(.searching)").trigger("click"))}},{key:"load",value:function(e){var t,n,i=this,a=Object(l.a)(this.getAttribute("data-request"),{}),o=this.getAttribute("data-loadComponent")||"results-index",r=this.getAttribute("data-history"),c=this.getAttribute("data-link"),s=Object(l.a)(this.getAttribute("data-audience"),!1);s&&(a.audience={click:{mediaName:s.mediaName}}),"true"===r&&(t=this.getAttribute("data-next"),n=(n="")==location.search?"?next=".concat(t):-1!=location.search.indexOf("next")?location.href.replace(/(next=)(.*N)/g,"next="+t):"".concat(location.href,"&next=").concat(t),history.replaceState(null,null,n)),window.location.search.includes("woutAdivs")?a.native.show=!1:(t=document.querySelector(".results-index.list"),n=Array.from(e.querySelectorAll(".thumbnails-item")).reverse().findIndex(function(t){return t.className.includes("itemAds")}),t&&(a.ads={show:!0,bp:{xs:"native-tudosobre-area"},lastPositionAds:n}));o=c||"".concat(window.Config.servicename,"?loadComponent=").concat(o,"&data=").concat(JSON.stringify(a));this.classList.add("searching"),this.innerHTML="carregando...",Object(u.a)(o,function(t){t=d()(t.body);d()(".results-items",e).append(t.find(".results-items").html()),d()(e).find(".ver-mais").remove(),a.hasNext&&(t.find(".ver-mais").insertAfter(d()(".results-items",e)),i.classList.remove("searching"))})}}]),n}(e.a)}}]);