summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/_inc/build/infinite-scroll/infinity.min.js')
-rw-r--r--plugins/jetpack/_inc/build/infinite-scroll/infinity.min.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins/jetpack/_inc/build/infinite-scroll/infinity.min.js b/plugins/jetpack/_inc/build/infinite-scroll/infinity.min.js
index acc12100..e33c7c49 100644
--- a/plugins/jetpack/_inc/build/infinite-scroll/infinity.min.js
+++ b/plugins/jetpack/_inc/build/infinite-scroll/infinity.min.js
@@ -1,3 +1 @@
-/* Do not modify this file directly. It is compiled from other files. */
-/* globals infiniteScroll, _wpmejsSettings, ga, _gaq, WPCOM_sharing_counts */
-!function($){var Scroller,ajaxurl,stats,type,text,totop,isIE=-1!=navigator.userAgent.search("MSIE");if(isIE){var IEVersion=navigator.userAgent.match(/MSIE\s?(\d+)\.?\d*;/);IEVersion=parseInt(IEVersion[1])}function fullscreenState(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?1:0}"https:"==document.location.protocol&&(infiniteScroll.settings.ajaxurl=infiniteScroll.settings.ajaxurl.replace("http://","https://")),Scroller=function(e){var t=this;this.id=e.id,this.body=$(document.body),this.window=$(window),this.element=$("#"+e.id),this.wrapperClass=e.wrapper_class,this.ready=!0,this.disabled=!1,this.page=1,this.offset=e.offset,this.currentday=e.currentday,this.order=e.order,this.throttle=!1,this.handle='<div id="infinite-handle"><span><button>'+text.replace("\\","")+"</button></span></div>",this.click_handle=e.click_handle,this.google_analytics=e.google_analytics,this.history=e.history,this.origURL=window.location.href,this.pageCache={},this.footer=$("#infinite-footer"),this.footer.wrap=e.footer,this.wpMediaelement=null,"scroll"==type?(this.window.bind("scroll.infinity",function(){this.throttle=!0}),t.gotop(),setInterval(function(){this.throttle&&(this.throttle=!1,t.thefooter(),t.refresh(),t.determineURL())},250),t.ensureFilledViewport(),this.body.bind("post-load",{self:t},t.checkViewportOnLoad)):"click"==type&&(this.click_handle&&this.element.append(this.handle),this.body.delegate("#infinite-handle","click.infinity",function(){t.click_handle&&$("#infinite-handle").remove(),t.refresh()})),this.body.bind("post-load",{self:t},t.initializeMejs)},Scroller.prototype.check=function(){var e=this.element.offset();return"object"==typeof e&&this.window.scrollTop()+this.window.height()>e.top+this.element.outerHeight(!1)-2*this.window.height()},Scroller.prototype.render=function(e){this.body.addClass("infinity-success"),this.element.append(e.html),this.body.trigger("post-load",e),this.ready=!0},Scroller.prototype.query=function(){return{page:this.page+this.offset,currentday:this.currentday,order:this.order,scripts:window.infiniteScroll.settings.scripts,styles:window.infiniteScroll.settings.styles,query_args:window.infiniteScroll.settings.query_args,query_before:window.infiniteScroll.settings.query_before,last_post_date:window.infiniteScroll.settings.last_post_date}},Scroller.prototype.gotop=function(){var e=$("#infinity-blog-title");e.attr("title",totop),e.bind("click",function(e){$("html, body").animate({scrollTop:0},"fast"),e.preventDefault()})},Scroller.prototype.thefooter=function(){var e;"string"===$.type(this.footer.wrap)&&(e=$("body #"+this.footer.wrap).outerWidth(!1))>479&&this.footer.find(".container").css("width",e),this.window.scrollTop()>=350?this.footer.animate({bottom:0},"fast"):this.window.scrollTop()<350&&this.footer.animate({bottom:"-50px"},"fast")},Scroller.prototype.refresh=function(){var self=this,query,jqxhr,load,loader,color,customized;if(!this.disabled&&this.ready&&this.check()){if(this.ready=!1,this.click_handle){loader='<span class="infinite-loader"></span>',this.element.append(loader),loader=this.element.find(".infinite-loader"),color=loader.css("color");try{loader.spin("medium-left",color)}catch(e){}}return query=$.extend({action:"infinite_scroll"},this.query()),"undefined"!=typeof wp&&wp.customize&&wp.customize.settings.theme&&(customized={},query.wp_customize="on",query.theme=wp.customize.settings.theme.stylesheet,wp.customize.each(function(e){e._dirty&&(customized[e.id]=e())}),query.customized=JSON.stringify(customized),query.nonce=wp.customize.settings.nonce.preview),jqxhr=$.post(infiniteScroll.settings.ajaxurl,query),jqxhr.fail(function(){self.click_handle&&loader.hide(),self.ready=!0}),jqxhr.done(function(response){if(self.click_handle&&loader.hide(),response&&response.type&&"success"==response.type&&(response.scripts&&$(response.scripts).each(function(){var e=this.footer?"body":"head";if(window.infiniteScroll.settings.scripts.push(this.handle),this.extra_data){var t=document.createElement("script"),i=document.createTextNode("//<![CDATA[ \n"+this.extra_data+"\n//]]>");t.type="text/javascript",t.appendChild(i),document.getElementsByTagName(e)[0].appendChild(t)}var s=document.createElement("script");s.type="text/javascript",s.src=this.src,s.id=this.handle,"wp-mediaelement"===this.handle&&self.body.unbind("post-load",self.initializeMejs),"wp-mediaelement"===this.handle&&"undefined"==typeof mejs?(self.wpMediaelement={},self.wpMediaelement.tag=s,self.wpMediaelement.element=e,setTimeout(self.maybeLoadMejs.bind(self),250)):document.getElementsByTagName(e)[0].appendChild(s)}),response.styles&&$(response.styles).each(function(){window.infiniteScroll.settings.styles.push(this.handle);var style=document.createElement("link");style.rel="stylesheet",style.href=this.src,style.id=this.handle+"-css",!this.conditional||isIE&&eval(this.conditional.replace(/%ver/g,IEVersion))||(style=!1),style&&document.getElementsByTagName("head")[0].appendChild(style)}),self.pageCache[self.page+self.offset]=response,self.page++,stats&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?"+stats+"&post=0&baba="+Math.random()),"object"==typeof response.postflair&&"object"==typeof WPCOM_sharing_counts&&(WPCOM_sharing_counts=$.extend(WPCOM_sharing_counts,response.postflair)),self.render.apply(self,arguments),"click"==type?response.lastbatch?self.click_handle?($("#infinite-handle").remove(),self.body.addClass("infinity-end").removeClass("infinity-success")):self.body.trigger("infinite-scroll-posts-end"):self.click_handle?self.element.append(self.handle):self.body.trigger("infinite-scroll-posts-more"):response.lastbatch&&(self.disabled=!0,self.body.addClass("infinity-end").removeClass("infinity-success")),response.currentday&&(self.currentday=response.currentday),self.google_analytics)){var ga_url=self.history.path.replace(/%d/,self.page);"object"==typeof _gaq&&_gaq.push(["_trackPageview",ga_url]),"function"==typeof ga&&ga("send","pageview",ga_url)}}),jqxhr}},Scroller.prototype.maybeLoadMejs=function(){null!==this.wpMediaelement&&("undefined"==typeof mejs?setTimeout(this.maybeLoadMejs,250):(document.getElementsByTagName(this.wpMediaelement.element)[0].appendChild(this.wpMediaelement.tag),this.wpMediaelement=null,this.body.bind("post-load",{self:this},this.initializeMejs)))},Scroller.prototype.initializeMejs=function(e,t){!t.html||-1===t.html.indexOf("wp-audio-shortcode")&&-1===t.html.indexOf("wp-video-shortcode")||"undefined"!=typeof mejs&&$(function(){var e={};"undefined"!=typeof _wpmejsSettings&&(e.pluginPath=_wpmejsSettings.pluginPath),e.success=function(e){var t=e.attributes.autoplay&&"false"!==e.attributes.autoplay;"flash"===e.pluginType&&t&&e.addEventListener("canplay",function(){e.play()},!1)},$(".wp-audio-shortcode, .wp-video-shortcode").not(".mejs-container").mediaelementplayer(e)})},Scroller.prototype.ensureFilledViewport=function(){var e=this.window.height(),t=this.element.height(),i=0,s=0;0!==t||($(this.element.selector+" > li").each(function(){t+=$(this).height()}),0!==t)?($("."+this.wrapperClass).each(function(){i+=$(this).height(),s++}),s>0?i/=s:i=0,t<e&&t+i<e?(this.ready=!0,this.refresh()):this.body.unbind("post-load",this.checkViewportOnLoad)):this.body.unbind("post-load",this.checkViewportOnLoad)},Scroller.prototype.checkViewportOnLoad=function(e){e.data.self.ensureFilledViewport()};var previousFullScrenState=fullscreenState();Scroller.prototype.determineURL=function(){var e=this,t=$(window).scrollTop(),i=t+$(window).height(),s=i-t,o=[],n=[],l=!1,r=fullscreenState();if(previousFullScrenState^r)previousFullScrenState=r;else{if(previousFullScrenState=r,$("."+e.wrapperClass).each(function(){var e,s=$(this).attr("id"),l=$(this).offset().top,r=$(this).outerHeight(!1),a=$(this).data("page-num");0===r&&$("> *",this).each(function(){r+=$(this).outerHeight(!1)}),e=l+r,l<t&&e>i?o.push({id:s,top:l,bottom:e,pageNum:a}):l>t&&l<i?o.push({id:s,top:l,bottom:e,pageNum:a}):e>t&&e<i?o.push({id:s,top:l,bottom:e,pageNum:a}):n.push({id:s,top:l,bottom:e,pageNum:a})}),$.each(n,function(){var t=$("#"+this.id);t.hasClass("is--replaced")||(e.pageCache[this.pageNum].html=t.html(),t.css("min-height",this.bottom-this.top+"px").addClass("is--replaced").empty())}),$.each(o,function(){var t=$("#"+this.id);t.hasClass("is--replaced")&&(t.css("min-height","").removeClass("is--replaced"),this.pageNum in e.pageCache&&(t.html(e.pageCache[this.pageNum].html),e.body.trigger("post-load",e.pageCache[this.pageNum])))}),0==o.length)l=-1;else if(1==o.length){var a=o.pop();l=(i-a.top)/s<.5?-1:a.pageNum}else{var c=0;$.each(o,function(e,o){var n=0,r=0,a=0;o.top>t&&o.top<i&&(n=(i-o.top)/s),o.bottom>t&&o.bottom<i&&(r=(o.bottom-t)/s),n>=r?a=n:r>=n&&(a=r),a>c&&(l=o.pageNum,c=a)})}"number"==typeof l&&e.updateURL(l)}},Scroller.prototype.updateURL=function(e){if(window.history.pushState){var t=this.origURL;-1!==e&&(t=window.location.protocol+"//"+this.history.host+this.history.path.replace(/%d/,e)+this.history.parameters),window.location.href!=t&&history.pushState(null,null,t)}},Scroller.prototype.pause=function(){this.disabled=!0},Scroller.prototype.resume=function(){this.disabled=!1},$(document).ready(function(){if("object"==typeof infiniteScroll){if($(document.body).addClass(infiniteScroll.settings.body_class),ajaxurl=infiniteScroll.settings.ajaxurl,stats=infiniteScroll.settings.stats,type=infiniteScroll.settings.type,text=infiniteScroll.settings.text,totop=infiniteScroll.settings.totop,infiniteScroll.scroller=new Scroller(infiniteScroll.settings),"click"==type){var e=null;$(window).bind("scroll",function(){e||(e=setTimeout(function(){infiniteScroll.scroller.determineURL(),e=null},250))})}"undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh&&(wp.customize.selectiveRefresh.bind("partial-content-rendered",function(e){var t;"string"==typeof e.addedContent?t=e.addedContent:e.container&&(t=$(e.container).html()),t&&$(document.body).trigger("post-load",{html:t})}),"undefined"==typeof MutationObserver&&$(document.body).on("post-load",function(e,t){var i=null;t.html&&-1!==t.html.indexOf("data-customize-partial")&&(infiniteScroll.settings.id&&(i=$("#"+infiniteScroll.settings.id)),wp.customize.selectiveRefresh.addPartials(i))}))}})}(jQuery); \ No newline at end of file
+(function(){var __webpack_exports__={};(function(){var Scroller,ajaxurl,stats,type,text,totop,loading_text,isIE=-1!=navigator.userAgent.search("MSIE");if(isIE){var IEVersion=navigator.userAgent.match(/MSIE\s?(\d+)\.?\d*;/);IEVersion=parseInt(IEVersion[1])}function fullscreenState(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?1:0}"https:"==document.location.protocol&&(infiniteScroll.settings.ajaxurl=infiniteScroll.settings.ajaxurl.replace("http://","https://")),Scroller=function(e){var t=this;this.id=e.id,this.body=document.body,this.window=window,this.element=document.getElementById(e.id),this.wrapperClass=e.wrapper_class,this.ready=!0,this.disabled=!1,this.page=1,this.offset=e.offset,this.currentday=e.currentday,this.order=e.order,this.throttle=!1,this.click_handle=e.click_handle,this.google_analytics=e.google_analytics,this.history=e.history,this.origURL=window.location.href,this.handle=document.createElement("div"),this.handle.setAttribute("id","infinite-handle"),this.handle.innerHTML="<span><button>"+text.replace("\\","")+"</button></span>",this.footer={el:document.getElementById("infinite-footer"),wrap:e.footer},this.checkViewportOnLoadBound=t.checkViewportOnLoad.bind(this),this.wpMediaelement=null,"scroll"==type?(this.window.addEventListener("scroll",(function(){t.throttle=!0})),t.gotop(),setInterval((function(){t.throttle&&(t.throttle=!1,t.thefooter(),t.refresh(),t.determineURL())}),250),t.ensureFilledViewport(),this.body.addEventListener("is.post-load",t.checkViewportOnLoadBound)):"click"==type&&(this.click_handle&&this.element.appendChild(this.handle),this.handle.addEventListener("click",(function(){t.click_handle&&t.handle.parentNode.removeChild(t.handle),t.refresh()}))),this.body.addEventListener("is.post-load",t.initializeMejs)},Scroller.prototype.getScrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},Scroller.prototype.extend=function(e){e=e||{};for(var t=1;t<arguments.length;t++)if(arguments[t])for(var n in arguments[t])arguments[t].hasOwnProperty(n)&&(e[n]=arguments[t][n]);return e},Scroller.prototype.check=function(){return this.measure(this.element,[this.wrapperClass]).bottom<2*this.window.innerHeight},Scroller.prototype.render=function(e){var t=Array.prototype.slice.call(e.fragment.childNodes);for(this.body.classList.add("infinity-success");t.length>0;){var n=t.shift();this.element.appendChild(n)}this.trigger(this.body,"is.post-load",{jqueryEventName:"post-load",data:e}),this.ready=!0},Scroller.prototype.query=function(){return{page:this.page+this.offset,currentday:this.currentday,order:this.order,scripts:window.infiniteScroll.settings.scripts,styles:window.infiniteScroll.settings.styles,query_args:window.infiniteScroll.settings.query_args,query_before:window.infiniteScroll.settings.query_before,last_post_date:window.infiniteScroll.settings.last_post_date}},Scroller.prototype.animate=function(e,t){var n=performance.now();requestAnimationFrame((function i(o){var r=Math.min(1,(o-n)/t);e(r),r<1&&requestAnimationFrame(i)}))},Scroller.prototype.gotop=function(){var e=document.getElementById("infinity-blog-title"),t=this;e&&(e.setAttribute("title",totop),e.addEventListener("click",(function(e){var n=t.window.pageYOffset;e.preventDefault(),t.animate((function(e){var t=n-n*e;document.documentElement.scrollTop=document.body.scrollTop=t}),200)})))},Scroller.prototype.thefooter=function(){var e,t,n,i,o=this;if(this.footer&&this.footer.el){if("string"==typeof this.footer.wrap){try{t=(t=document.getElementById(this.footer.wrap).getBoundingClientRect()).width}catch(e){t=0}t>479&&(e=this.footer.el.querySelector(".container"))&&(e.style.width=t+"px")}n=parseInt(o.footer.el.style.bottom||-50,10),i=this.window.pageYOffset>=350?0:-50,n!==i&&o.animate((function(e){var t=n+(i-n)*e;o.footer.el.style.bottom=t+"px",1===e&&(n=i)}),200)}},Scroller.prototype.urlEncodeJSON=function(e,t){var n,i,o=[];for(var r in e)n=encodeURIComponent(r),i=t?t+"["+n+"]":n,"object"==typeof e[r]?!Array.isArray(e[r])||e[r].length>0?o.push(this.urlEncodeJSON(e[r],i)):o.push(i+"[]="):o.push(i+"="+encodeURIComponent(e[r]));return o.join("&")},Scroller.prototype.refresh=function(){var self=this,query,xhr,loader,customized;if(!this.disabled&&this.ready&&this.check())return this.ready=!1,this.click_handle&&(loader||(document.getElementById("infinite-aria").textContent=loading_text,loader=document.createElement("div"),loader.classList.add("infinite-loader"),loader.setAttribute("role","progress"),loader.innerHTML='<div class="spinner"><div class="spinner-inner"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div></div>'),this.element.appendChild(loader)),query=self.extend({action:"infinite_scroll"},this.query()),"undefined"!=typeof wp&&wp.customize&&wp.customize.settings.theme&&(customized={},query.wp_customize="on",query.theme=wp.customize.settings.theme.stylesheet,wp.customize.each((function(e){e._dirty&&(customized[e.id]=e())})),query.customized=JSON.stringify(customized),query.nonce=wp.customize.settings.nonce.preview),xhr=new XMLHttpRequest,xhr.open("POST",infiniteScroll.settings.ajaxurl,!0),xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),xhr.send(self.urlEncodeJSON(query)),xhr.onerror=function(){self.click_handle&&loader.parentNode.removeChild(loader),self.ready=!0},xhr.onload=function(){var response=JSON.parse(xhr.responseText),httpCheck=xhr.status>=200&&xhr.status<300,responseCheck=void 0!==response.html;if(response&&httpCheck&&responseCheck){if(self.click_handle&&loader.parentNode.removeChild(loader),response.scripts&&Array.isArray(response.scripts)&&response.scripts.forEach((function(e){var t=e.footer?"body":"head";window.infiniteScroll.settings.scripts.push(e.handle),e.extra_data&&self.appendInlineScript(e.extra_data,t),e.before_handle&&self.appendInlineScript(e.before_handle,t);var n=document.createElement("script");n.type="text/javascript",n.src=e.src,n.id=e.handle,n.async=!1,e.after_handle&&(n.onload=function(){self.appendInlineScript(e.after_handle,t)}),"wp-mediaelement"===e.handle&&self.body.removeEventListener("is.post-load",self.initializeMejs),"wp-mediaelement"===e.handle&&"undefined"==typeof mejs?(self.wpMediaelement={},self.wpMediaelement.tag=n,self.wpMediaelement.element=t,setTimeout(self.maybeLoadMejs.bind(self),250)):document.getElementsByTagName(t)[0].appendChild(n)})),response.styles&&Array.isArray(response.styles)&&response.styles.forEach((function(item){window.infiniteScroll.settings.styles.push(item.handle);var style=document.createElement("link");style.rel="stylesheet",style.href=item.src,style.id=item.handle+"-css",!item.conditional||isIE&&eval(item.conditional.replace(/%ver/g,IEVersion))||(style=!1),style&&document.getElementsByTagName("head")[0].appendChild(style)})),response.fragment=document.createElement("div"),response.fragment.innerHTML=response.html,self.page++,stats&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?"+stats+"&post=0&baba="+Math.random()),"object"==typeof response.postflair&&"object"==typeof WPCOM_sharing_counts&&(WPCOM_sharing_counts=self.extend(WPCOM_sharing_counts,response.postflair)),self.render.call(self,response),"click"==type?(infiniteScroll.settings.wrapper&&document.querySelector("#infinite-view-"+(self.page+self.offset-1)+" a:first-of-type").focus({preventScroll:!0}),response.lastbatch?self.click_handle?(self.body.classList.add("infinity-end"),self.body.classList.remove("infinity-success")):self.trigger(this.body,"infinite-scroll-posts-end"):self.click_handle?self.element.appendChild(self.handle):self.trigger(this.body,"infinite-scroll-posts-more")):response.lastbatch&&(self.disabled=!0,self.body.classList.add("infinity-end"),self.body.classList.remove("infinity-success")),response.currentday&&(self.currentday=response.currentday),self.google_analytics){var ga_url=self.history.path.replace(/%d/,self.page);"object"==typeof _gaq&&_gaq.push(["_trackPageview",ga_url]),"function"==typeof ga&&ga("send","pageview",ga_url)}}else self.click_handle&&loader.parentNode.removeChild(loader)},xhr},Scroller.prototype.appendInlineScript=function(e,t){var n=document.createElement("script"),i=document.createTextNode("//<![CDATA[ \n"+e+"\n//]]>");n.type="text/javascript",n.appendChild(i),document.getElementsByTagName(t)[0].appendChild(n)},Scroller.prototype.maybeLoadMejs=function(){null!==this.wpMediaelement&&("undefined"==typeof mejs?setTimeout(this.maybeLoadMejs.bind(this),250):(document.getElementsByTagName(this.wpMediaelement.element)[0].appendChild(this.wpMediaelement.tag),this.wpMediaelement=null,this.body.addEventListener("is.post-load",this.initializeMejs)))},Scroller.prototype.initializeMejs=function(e){if(e.detail&&e.detail.html&&(-1!==e.detail.html.indexOf("wp-audio-shortcode")||-1!==e.detail.html.indexOf("wp-video-shortcode"))&&"undefined"!=typeof mejs){var t,n={};"undefined"!=typeof _wpmejsSettings&&(n.pluginPath=_wpmejsSettings.pluginPath),n.success=function(e){var t=e.attributes.autoplay&&"false"!==e.attributes.autoplay;"flash"===e.pluginType&&t&&e.addEventListener("canplay",(function(){e.play()}),!1)},t=document.querySelectorAll(".wp-audio-shortcode, .wp-video-shortcode"),t=(t=Array.prototype.slice.call(t)).filter((function(e){for(;e.parentNode;){if(e.classList.contains("mejs-container"))return!1;e=e.parentNode}return!0}));for(var i=0;i<t.length;i++)new MediaElementPlayer(t[i],n)}},Scroller.prototype.measure=function(e,t){t=t||[];for(var n,i,o,r=Array.prototype.slice.call(e.children),s=Number.MAX_VALUE,l=0;r.length>0;){for(n=r.shift(),o=0;o<t.length;o++)if(n.classList.contains(t[o])){r=r.concat(Array.prototype.slice.call(n.children));break}i=n.getBoundingClientRect(),s=Math.min(s,i.top),l=Math.max(l,i.bottom)}var a=Math.round(window.innerHeight/2),d=s<=a&&l>=a;return{top:s,bottom:l,height:l-s,factor:(Math.min(l,a)-Math.max(s,0))/a,isActive:d}},Scroller.prototype.ensureFilledViewport=function(){var e=this,t=e.window.innerHeight,n=e.measure(e.element,[e.wrapperClass]);e.body.removeEventListener("is.post-load",e.checkViewportOnLoadBound),n.bottom<t&&(e.ready=!0,e.refresh())},Scroller.prototype.checkViewportOnLoad=function(){this.ensureFilledViewport()};var previousFullScrenState=fullscreenState();Scroller.prototype.determineURL=function(){var e,t=this,n=-1,i=fullscreenState(),o=0;if(previousFullScrenState^i)previousFullScrenState=i;else{previousFullScrenState=i,e=document.querySelectorAll("."+t.wrapperClass);for(var r=0;r<e.length;r++){var s=t.measure(e[r]);if(s.isActive){n=parseInt(e[r].dataset.pageNum,10);break}s.factor>o&&(n=parseInt(e[r].dataset.pageNum,10),o=s.factor)}t.updateURL(n)}},Scroller.prototype.updateURL=function(e){if(window.history.pushState){var t=this,n=t.origURL;-1!==e&&(n=window.location.protocol+"//"+t.history.host+t.history.path.replace(/%d/,e)+t.history.parameters),window.location.href!=n&&history.pushState(null,null,n)}},Scroller.prototype.pause=function(){this.disabled=!0},Scroller.prototype.resume=function(){this.disabled=!1},Scroller.prototype.trigger=function(e,t,n){var i;(n=n||{}).jqueryEventName&&"undefined"!=typeof jQuery&&jQuery(e).trigger(n.jqueryEventName,n.data||null);try{i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n.data||null})}catch(e){(i=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,n.data||null)}e.dispatchEvent(i)};var jetpackInfinityModule=function(){var e=infiniteScroll.settings.body_class.split(" ");if("object"==typeof infiniteScroll&&(e.forEach((function(e){e&&document.body.classList.add(e)})),ajaxurl=infiniteScroll.settings.ajaxurl,stats=infiniteScroll.settings.stats,type=infiniteScroll.settings.type,text=infiniteScroll.settings.text,totop=infiniteScroll.settings.totop,loading_text=infiniteScroll.settings.loading_text,infiniteScroll.scroller=new Scroller(infiniteScroll.settings),"click"==type)){var t=null;window.addEventListener("scroll",(function(){t||(t=setTimeout((function(){infiniteScroll.scroller.determineURL(),t=null}),250))}))}};"interactive"===document.readyState||"complete"===document.readyState?jetpackInfinityModule():document.addEventListener("DOMContentLoaded",jetpackInfinityModule)})()})(); \ No newline at end of file