(()=>{"use strict";jQuery(document).ready((function(a){var t=2,e=!1,o=!1,n=a("#post-container"),i=a(".loading-wrap"),s=a(".loading-wrap").find(".text").text();function r(){e||o||(e=!0,a.ajax({url:ajaxObj.ajaxUrl,type:"POST",dataType:"json",data:{action:"load_more_posts",page:t,security:ajaxObj.security,postsPerPage:ajaxObj.postsPerPage,plugin_wp_query_vars:ajaxObj.plugin_wp_query_vars,plugin_wp_query:ajaxObj.plugin_wp_query,plugin_wp_post_type:ajaxObj.plugin_wp_post_type},beforeSend:function(){i.show(),i.find(".text").text(ajaxObj.loadingText)},complete:function(){i.find(".text").text(s)},success:function(s){s.success?(s.data.posts.forEach((function(t){n.append(t),ajaxObj.isBlog.activeMasonry&&a("#post-container").masonry("reload")})),t++,e=!1,s.data.has_more||(o=!0,i.hide())):console.log("Error:",s.data)}}))}a("#loading-message").on("click",(function(a){a.preventDefault(),r()})),ajaxObj.isBlog.activeInfiniteScroll&&a(window).scroll((function(){var t=a(window).height();a(window).scrollTop()+t>=n.offset().top+n.outerHeight()&&r()}))}))})();