/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/infinite-scroller@0.0.11/src/infinite-scroller.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";function InfiniteScroller(e,n){var t,i,o=!1,r=null,s={placeholderClass:"placeholder",request:function(e){return new Promise((function(e,n){e("<p>Please override <code>options.request</code> when instantiating this plugin</p>")}))},processResults:function(e){}};for(var c in s)s.hasOwnProperty(c)&&(s[c]=n[c]);function l(){t=0,i={pages:{}},e.innerHTML="",u()}function u(){d().then((function(){p()&&u()}))}function d(){var n=++t;o=!0;var i=document.createElement("div");i.classList.add(s.placeholderClass),e.appendChild(i);var r=a(n).then((function(n){s.processResults(n),e.replaceChild(n,i),o=!1}));return a(++n),r}function a(e){return new Promise((function(n,t){i.pages[e]?n(i.pages[e]):s.request(e).then((function(t){var o=document.createDocumentFragment(),r=document.createElement("div");for(r.innerHTML=t;r.hasChildNodes();)o.appendChild(r.removeChild(r.firstChild));i.pages[e]=o,n(o)}))}))}function f(e){clearTimeout(r),r=setTimeout((function(){!o&&p()&&d()}),100)}function p(){return e.getBoundingClientRect().top+e.clientHeight+window.pageYOffset-50<window.pageYOffset+window.innerHeight}return{init:function(){l(),window.addEventListener("scroll",f)},reset:l,destroy:function(){window.removeEventListener("scroll",f)}}}"undefined"!=typeof module&&module.exports?module.exports=InfiniteScroller:window.InfiniteScroller=InfiniteScroller;
//# sourceMappingURL=/sm/d626a7390c49c68b352db00a4fb1e6fd5dc2e2dbe30fc507f2bfdb93467a0524.map