site_oueb_2/wp-content/themes/oceanwp/assets/js/ow-infinite-scroll.min.js

1 line
24 KiB
JavaScript
Executable File

!function n(o,r,s){function l(e,t){if(!r[e]){if(!o[e]){var i="function"==typeof require&&require;if(!t&&i)return i(e,!0);if(a)return a(e,!0);throw(i=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",i}i=r[e]={exports:{}},o[e][0].call(i.exports,function(t){return l(o[e][1][t]||t)},i,i.exports,n,o,r,s)}return r[e].exports}for(var a="function"==typeof require&&require,t=0;t<s.length;t++)l(s[t]);return l}({1:[function(t,e,i){"use strict";var n=t("@babel/runtime/helpers/interopRequireDefault"),o=n(t("@babel/runtime/helpers/defineProperty")),r=n(t("@babel/runtime/helpers/classCallCheck")),s=n(t("@babel/runtime/helpers/classPrivateFieldSet")),l=n(t("@babel/runtime/helpers/classPrivateFieldGet")),a=n(t("infinite-scroll")),c=n(t("responsive-auto-height"));function u(e,t){var i,n=Object.keys(e);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(e),t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)),n}function h(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?u(Object(i),!0).forEach(function(t){(0,o.default)(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):u(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function d(){var t=this;(0,r.default)(this,d),f.set(this,{writable:!0,value:{infiniteScrollNav:document.querySelector(".infinite-scroll-nav")}}),p.set(this,{writable:!0,value:void 0}),g.set(this,{writable:!0,value:function(){(0,s.default)(t,f,h(h({},(0,l.default)(t,f)),{},{infiniteScrollWrapper:document.querySelector(".infinite-scroll-wrap")}))}}),y.set(this,{writable:!0,value:function(){(0,s.default)(t,p,new a.default((0,l.default)(t,f).infiniteScrollWrapper,{path:".older-posts a",append:".item-entry",status:".scroller-status",hideNav:".infinite-scroll-nav",history:!1,prefill:!0,scrollThreshold:500}))}}),m.set(this,{writable:!0,value:function(){(0,l.default)(t,p).on("load",function(t,e,i){var o=this,r=t.querySelectorAll(".item-entry");imagesLoaded(r,function(){var t,e,i,n;o.element.classList.contains("blog-masonry-grid")&&(null===(t=oceanwp)||void 0===t||null!==(t=t.blogMasonry)&&void 0!==t&&t.isotop.appended(r),o.element.querySelector(".gallery-format")&&setTimeout(function(){var t;null===(t=oceanwp)||void 0===t||null!==(t=t.blogMasonry)&&void 0!==t&&t.isotop.layout()},601)),document.body.classList.contains("no-carousel")||null===(e=oceanwp)||void 0===e||null!==(i=e.owSlider)&&void 0!==i&&i.start(o.element.querySelectorAll(".gallery-format, .product-entry-slider")),document.body.classList.contains("no-lightbox")||(null===(i=oceanwp)||void 0===i||null!==(n=i.owLightbox)&&void 0!==n&&n.initSingleImageLightbox(),null===(n=oceanwp)||void 0===n||null!==(n=n.owLightbox)&&void 0!==n&&n.initGalleryLightbox()),r.forEach(function(t){null!==(t=t.querySelectorAll("img"))&&void 0!==t&&t.forEach(function(t){t.outerHTML=t.outerHTML})})})}),(0,l.default)(t,p).on("append",function(t,e,i,n){imagesLoaded(i,function(){var t;document.body.classList.contains("no-matchheight")||0<(t=(t=Array.from(i).map(function(t){if(t.id)return"#".concat(t.id," .blog-entry-inner")})).filter(function(t){return void 0!==t})).length&&new c.default(t.join(","))})})}}),(0,l.default)(this,f).infiniteScrollNav&&(0,l.default)(this,f).infiniteScrollNav.querySelector(".older-posts a")&&((0,l.default)(this,g).call(this),(0,l.default)(this,y).call(this),(0,l.default)(this,m).call(this))}var f=new WeakMap,p=new WeakMap,g=new WeakMap,y=new WeakMap,m=new WeakMap;window.oceanwp=window.oceanwp||{},document.addEventListener("DOMContentLoaded",function(){oceanwp.owInfiniteScroll=new d})},{"@babel/runtime/helpers/classCallCheck":4,"@babel/runtime/helpers/classPrivateFieldGet":6,"@babel/runtime/helpers/classPrivateFieldSet":7,"@babel/runtime/helpers/defineProperty":8,"@babel/runtime/helpers/interopRequireDefault":9,"infinite-scroll":13,"responsive-auto-height":19}],2:[function(t,e,i){e.exports=function(t,e){return e.get?e.get.call(t):e.value},e.exports.default=e.exports,e.exports.__esModule=!0},{}],3:[function(t,e,i){e.exports=function(t,e,i){if(e.set)e.set.call(t,i);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=i}},e.exports.default=e.exports,e.exports.__esModule=!0},{}],4:[function(t,e,i){e.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},{}],5:[function(t,e,i){e.exports=function(t,e,i){if(!e.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return e.get(t)},e.exports.default=e.exports,e.exports.__esModule=!0},{}],6:[function(t,e,i){var n=t("./classApplyDescriptorGet.js"),o=t("./classExtractFieldDescriptor.js");e.exports=function(t,e){return e=o(t,e,"get"),n(t,e)},e.exports.default=e.exports,e.exports.__esModule=!0},{"./classApplyDescriptorGet.js":2,"./classExtractFieldDescriptor.js":5}],7:[function(t,e,i){var n=t("./classApplyDescriptorSet.js"),o=t("./classExtractFieldDescriptor.js");e.exports=function(t,e,i){return e=o(t,e,"set"),n(t,e,i),i},e.exports.default=e.exports,e.exports.__esModule=!0},{"./classApplyDescriptorSet.js":3,"./classExtractFieldDescriptor.js":5}],8:[function(t,e,i){e.exports=function(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t},e.exports.default=e.exports,e.exports.__esModule=!0},{}],9:[function(t,e,i){e.exports=function(t){return t&&t.__esModule?t:{default:t}},e.exports.default=e.exports,e.exports.__esModule=!0},{}],10:[function(t,e,i){var n,o;n=window,o=function(t,e,i){class n{constructor(t,e){this.element=t,this.infScroll=e,this.clickHandler=this.onClick.bind(this),this.element.addEventListener("click",this.clickHandler),e.on("request",this.disable.bind(this)),e.on("load",this.enable.bind(this)),e.on("error",this.hide.bind(this)),e.on("last",this.hide.bind(this))}onClick(t){t.preventDefault(),this.infScroll.loadNextPage()}enable(){this.element.removeAttribute("disabled")}disable(){this.element.disabled="disabled"}hide(){this.element.style.display="none"}destroy(){this.element.removeEventListener("click",this.clickHandler)}}return e.create.button=function(){var t=i.getQueryElement(this.options.button);t&&(this.button=new n(t,this))},e.destroy.button=function(){this.button&&this.button.destroy()},e.Button=n,e},"object"==typeof e&&e.exports?e.exports=o(0,t("./core"),t("fizzy-ui-utils")):o(0,n.InfiniteScroll,n.fizzyUIUtils)},{"./core":11,"fizzy-ui-utils":18}],11:[function(t,e,i){var n,o;n=window,o=function(e,t,n){let o=e.jQuery,r={};function s(e,i){var t=n.getQueryElement(e);if(t){if((e=t).infiniteScrollGUID){let t=r[e.infiniteScrollGUID];return t.option(i),t}this.element=e,this.options={...s.defaults},this.option(i),o&&(this.$element=o(this.element)),this.create()}else console.error("Bad element for InfiniteScroll: "+(t||e))}s.defaults={},s.create={},s.destroy={};let i=s.prototype;Object.assign(i,t.prototype);let l=0;i.create=function(){var t=this.guid=++l;if(this.element.infiniteScrollGUID=t,(r[t]=this).pageIndex=1,this.loadCount=0,this.updateGetPath(),this.getPath&&this.getPath())for(var e in this.updateGetAbsolutePath(),this.log("initialized",[this.element.className]),this.callOnInit(),s.create)s.create[e].call(this);else console.error("Disabling InfiniteScroll")},i.option=function(t){Object.assign(this.options,t)},i.callOnInit=function(){let t=this.options.onInit;t&&t.call(this,this)},i.dispatchEvent=function(i,n,t){this.log(i,t);var e=n?[n].concat(t):t;if(this.emitEvent(i,e),o&&this.$element){let e=i+=".infiniteScroll";if(n){let t=o.Event(n);t.type=i,e=t}this.$element.trigger(e,t)}};let a={initialized:t=>`on ${t}`,request:t=>`URL: ${t}`,load:(t,e)=>`${t.title||""}. URL: ${e}`,error:(t,e)=>`${t}. URL: ${e}`,append:(t,e,i)=>`${i.length} items. URL: ${e}`,last:(t,e)=>`URL: ${e}`,history:(t,e)=>`URL: ${e}`,pageIndex:function(t,e){return`current page determined to be: ${t} from ${e}`}};i.log=function(i,n){if(this.options.debug){let t=`[InfiniteScroll] ${i}`,e=a[i];e&&(t+=". "+e.apply(this,n)),console.log(t)}},i.updateMeasurements=function(){this.windowHeight=e.innerHeight;var t=this.element.getBoundingClientRect();this.top=t.top+e.scrollY},i.updateScroller=function(){var t=this.options.elementScroll;if(t){if(this.scroller=!0===t?this.element:n.getQueryElement(t),!this.scroller)throw new Error(`Unable to find elementScroll: ${t}`)}else this.scroller=e},i.updateGetPath=function(){let t=this.options.path;var e;t?"function"!=(e=typeof t)?"string"==e&&t.match("{{#}}")?this.updateGetPathTemplate(t):this.updateGetPathSelector(t):this.getPath=t:console.error(`InfiniteScroll path option required. Set as: ${t}`)},i.updateGetPathTemplate=function(e){this.getPath=()=>{var t=this.pageIndex+1;return e.replace("{{#}}",t)};var t=e.replace(/(\\\?|\?)/,"\\?").replace("{{#}}","(\\d\\d?\\d?)"),t=new RegExp(t),t=location.href.match(t);t&&(this.pageIndex=parseInt(t[1],10),this.log("pageIndex",[this.pageIndex,"template string"]))};let c=[/^(.*?\/?page\/?)(\d\d?\d?)(.*?$)/,/^(.*?\/?\?page=)(\d\d?\d?)(.*?$)/,/(.*?)(\d\d?\d?)(?!.*\d)(.*?$)/],u=s.getPathParts=function(t){if(t)for(var e of c){var i=t.match(e);if(i){var[,n,e,i]=i;return{begin:n,index:e,end:i}}}};i.updateGetPathSelector=function(t){let e=document.querySelector(t);if(e){var i=e.getAttribute("href"),n=u(i);if(n){let{begin:t,index:e,end:i}=n;this.isPathSelector=!0,this.getPath=()=>t+(this.pageIndex+1)+i,this.pageIndex=parseInt(e,10)-1,this.log("pageIndex",[this.pageIndex,"next link"])}else console.error(`InfiniteScroll unable to parse next link href: ${i}`)}else console.error(`Bad InfiniteScroll path option. Next link not found: ${t}`)},i.updateGetAbsolutePath=function(){let i=this.getPath();if(i.match(/^http/)||i.match(/^\//))this.getAbsolutePath=this.getPath;else{let{pathname:t}=location;var n=i.match(/^\?/),o=t.substring(0,t.lastIndexOf("/"));let e=n?t:o+"/";this.getAbsolutePath=()=>e+this.getPath()}},s.create.hideNav=function(){let t=n.getQueryElement(this.options.hideNav);t&&(t.style.display="none",this.nav=t)},s.destroy.hideNav=function(){this.nav&&(this.nav.style.display="")},i.destroy=function(){for(var t in this.allOff(),s.destroy)s.destroy[t].call(this);delete this.element.infiniteScrollGUID,delete r[this.guid],o&&this.$element&&o.removeData(this.element,"infiniteScroll")},s.throttle=function(n,o){o=o||200;let r,s;return function(){let t=+new Date,e=arguments;var i=()=>{r=t,n.apply(this,e)};r&&t<r+o?(clearTimeout(s),s=setTimeout(i,o)):i()}},s.data=function(t){t=(t=n.getQueryElement(t))&&t.infiniteScrollGUID;return t&&r[t]},s.setJQuery=function(t){o=t},n.htmlInit(s,"infinite-scroll"),i._init=function(){};let{jQueryBridget:h}=e;return o&&h&&h("infiniteScroll",s,o),s},"object"==typeof e&&e.exports?e.exports=o(n,t("ev-emitter"),t("fizzy-ui-utils")):n.InfiniteScroll=o(n,n.EvEmitter,n.fizzyUIUtils)},{"ev-emitter":17,"fizzy-ui-utils":18}],12:[function(t,e,i){var n,o;n=window,o=function(n,t,e){let i=t.prototype;Object.assign(t.defaults,{history:"replace"});let o=document.createElement("a");return t.create.history=function(){this.options.history&&(o.href=this.getAbsolutePath(),(o.origin||o.protocol+"//"+o.host)==location.origin?this.options.append?this.createHistoryAppend():this.createHistoryPageLoad():console.error("[InfiniteScroll] cannot set history with different origin: "+`${o.origin} on ${location.origin} . History behavior disabled.`))},i.createHistoryAppend=function(){this.updateMeasurements(),this.updateScroller(),this.scrollPages=[{top:0,path:location.href,title:document.title}],this.scrollPage=this.scrollPages[0],this.scrollHistoryHandler=this.onScrollHistory.bind(this),this.unloadHandler=this.onUnload.bind(this),this.scroller.addEventListener("scroll",this.scrollHistoryHandler),this.on("append",this.onAppendHistory),this.bindHistoryAppendEvents(!0)},i.bindHistoryAppendEvents=function(t){t=t?"addEventListener":"removeEventListener";this.scroller[t]("scroll",this.scrollHistoryHandler),n[t]("unload",this.unloadHandler)},i.createHistoryPageLoad=function(){this.on("load",this.onPageLoadHistory)},t.destroy.history=i.destroyHistory=function(){this.options.history&&this.options.append&&this.bindHistoryAppendEvents(!1)},i.onAppendHistory=function(t,e,i){i&&i.length&&(i=i[0],i=this.getElementScrollY(i),o.href=e,this.scrollPages.push({top:i,path:o.href,title:t.title}))},i.getElementScrollY=function(t){return this.options.elementScroll?t.offsetTop-this.top:t.getBoundingClientRect().top+n.scrollY},i.onScrollHistory=function(){var t=this.getClosestScrollPage();t!=this.scrollPage&&(this.scrollPage=t,this.setHistory(t.title,t.path))},e.debounceMethod(t,"onScrollHistory",150),i.getClosestScrollPage=function(){let t;t=this.options.elementScroll?this.scroller.scrollTop+this.scroller.clientHeight/2:n.scrollY+this.windowHeight/2;let e;for(var i of this.scrollPages){if(i.top>=t)break;e=i}return e},i.setHistory=function(t,e){var i=this.options.history;i&&history[i+"State"]&&(history[i+"State"](null,t,e),this.options.historyTitle&&(document.title=t),this.dispatchEvent("history",null,[t,e]))},i.onUnload=function(){var t;0!==this.scrollPage.top&&(t=n.scrollY-this.scrollPage.top+this.top,this.destroyHistory(),scrollTo(0,t))},i.onPageLoadHistory=function(t,e){this.setHistory(t.title,e)},t},"object"==typeof e&&e.exports?e.exports=o(n,t("./core"),t("fizzy-ui-utils")):o(n,n.InfiniteScroll,n.fizzyUIUtils)},{"./core":11,"fizzy-ui-utils":18}],13:[function(t,e,i){window,"object"==typeof e&&e.exports&&(e.exports=function(t){return t}(t("./core"),(t("./page-load"),t("./scroll-watch"),t("./history"),t("./button"),t("./status"))))},{"./button":10,"./core":11,"./history":12,"./page-load":14,"./scroll-watch":15,"./status":16}],14:[function(t,e,i){var n,o;n=window,o=function(e,o){let t=o.prototype;Object.assign(o.defaults,{loadOnScroll:!0,checkLastPage:!0,responseBody:"text",domParseResponse:!0}),o.create.pageLoad=function(){this.canLoad=!0,this.on("scrollThreshold",this.onScrollThresholdLoad),this.on("load",this.checkLastPage),this.options.outlayer&&this.on("append",this.onAppendOutlayer)},t.onScrollThresholdLoad=function(){this.options.loadOnScroll&&this.loadNextPage()};let r=new DOMParser;function c(t){let e=document.createDocumentFragment();return t&&e.append(...t),e}return t.loadNextPage=function(){if(!this.isLoading&&this.canLoad){let{responseBody:i,domParseResponse:n,fetchOptions:t}=this.options,o=this.getAbsolutePath();this.isLoading=!0,"function"==typeof t&&(t=t());var e=fetch(o,t).then(e=>{if(e.ok)return e[i]().then(t=>{return"text"==i&&n&&(t=r.parseFromString(t,"text/html")),204==e.status?(this.lastPageReached(t,o),{body:t,response:e}):this.onPageLoad(t,o,e)});var t=new Error(e.statusText);return this.onPageError(t,o,e),{response:e}}).catch(t=>{this.onPageError(t,o)});return this.dispatchEvent("request",null,[o,e]),e}},t.onPageLoad=function(t,e,i){return this.options.append||(this.isLoading=!1),this.pageIndex++,this.loadCount++,this.dispatchEvent("load",null,[t,e,i]),this.appendNextPage(t,e,i)},t.appendNextPage=function(t,e,i){var{append:n,responseBody:o,domParseResponse:r}=this.options;if(!("text"==o&&r)||!n)return{body:t,response:i};let s=t.querySelectorAll(n),l={body:t,response:i,items:s};if(!s||!s.length)return this.lastPageReached(t,e),l;let a=c(s);n=()=>(this.appendItems(s,a),this.isLoading=!1,this.dispatchEvent("append",null,[t,e,s,i]),l);return this.options.outlayer?this.appendOutlayerItems(a,n):n()},t.appendItems=function(t,e){t&&t.length&&(function(t){t=t.querySelectorAll("script");for(var e of t){let t=document.createElement("script");var i;for(i of e.attributes)t.setAttribute(i.name,i.value);t.innerHTML=e.innerHTML,e.parentNode.replaceChild(t,e)}}(e=e||c(t)),this.element.appendChild(e))},t.appendOutlayerItems=function(t,i){let n=o.imagesLoaded||e.imagesLoaded;return n?new Promise(function(e){n(t,function(){var t=i();e(t)})}):(console.error("[InfiniteScroll] imagesLoaded required for outlayer option"),void(this.isLoading=!1))},t.onAppendOutlayer=function(t,e,i){this.options.outlayer.appended(i)},t.checkLastPage=function(e,i){var{checkLastPage:n,path:o}=this.options;if(n){if("function"==typeof o)if(!this.getPath())return void this.lastPageReached(e,i);let t;"string"==typeof n?t=n:this.isPathSelector&&(t=o),t&&e.querySelector&&(e.querySelector(t)||this.lastPageReached(e,i))}},t.lastPageReached=function(t,e){this.canLoad=!1,this.dispatchEvent("last",null,[t,e])},t.onPageError=function(t,e,i){return this.isLoading=!1,this.canLoad=!1,this.dispatchEvent("error",null,[t,e,i]),t},o.create.prefill=function(){var t;this.options.prefill&&((t=this.options.append)?(this.updateMeasurements(),this.updateScroller(),this.isPrefilling=!0,this.on("append",this.prefill),this.once("error",this.stopPrefill),this.once("last",this.stopPrefill),this.prefill()):console.error(`append option required for prefill. Set as :${t}`))},t.prefill=function(){var t=this.getPrefillDistance();this.isPrefilling=0<=t,this.isPrefilling?(this.log("prefill"),this.loadNextPage()):this.stopPrefill()},t.getPrefillDistance=function(){return this.options.elementScroll?this.scroller.clientHeight-this.scroller.scrollHeight:this.windowHeight-this.element.clientHeight},t.stopPrefill=function(){this.log("stopPrefill"),this.off("append",this.prefill)},o},"object"==typeof e&&e.exports?e.exports=o(n,t("./core")):o(n,n.InfiniteScroll)},{"./core":11}],15:[function(t,e,i){var n,o;n=window,o=function(i,t,e){let n=t.prototype;return Object.assign(t.defaults,{scrollThreshold:400}),t.create.scrollWatch=function(){this.pageScrollHandler=this.onPageScroll.bind(this),this.resizeHandler=this.onResize.bind(this);var t=this.options.scrollThreshold;!t&&0!==t||this.enableScrollWatch()},t.destroy.scrollWatch=function(){this.disableScrollWatch()},n.enableScrollWatch=function(){this.isScrollWatching||(this.isScrollWatching=!0,this.updateMeasurements(),this.updateScroller(),this.on("last",this.disableScrollWatch),this.bindScrollWatchEvents(!0))},n.disableScrollWatch=function(){this.isScrollWatching&&(this.bindScrollWatchEvents(!1),delete this.isScrollWatching)},n.bindScrollWatchEvents=function(t){t=t?"addEventListener":"removeEventListener";this.scroller[t]("scroll",this.pageScrollHandler),i[t]("resize",this.resizeHandler)},n.onPageScroll=t.throttle(function(){this.getBottomDistance()<=this.options.scrollThreshold&&this.dispatchEvent("scrollThreshold")}),n.getBottomDistance=function(){let t,e;return e=this.options.elementScroll?(t=this.scroller.scrollHeight,this.scroller.scrollTop+this.scroller.clientHeight):(t=this.top+this.element.clientHeight,i.scrollY+this.windowHeight),t-e},n.onResize=function(){this.updateMeasurements()},e.debounceMethod(t,"onResize",150),t},"object"==typeof e&&e.exports?e.exports=o(n,t("./core"),t("fizzy-ui-utils")):o(n,n.InfiniteScroll,n.fizzyUIUtils)},{"./core":11,"fizzy-ui-utils":18}],16:[function(t,e,i){var n,o;n=window,o=function(t,e,i){let n=e.prototype;function o(t){s(t,"none")}function r(t){s(t,"block")}function s(t,e){t&&(t.style.display=e)}return e.create.status=function(){let t=i.getQueryElement(this.options.status);t&&(this.statusElement=t,this.statusEventElements={request:t.querySelector(".infinite-scroll-request"),error:t.querySelector(".infinite-scroll-error"),last:t.querySelector(".infinite-scroll-last")},this.on("request",this.showRequestStatus),this.on("error",this.showErrorStatus),this.on("last",this.showLastStatus),this.bindHideStatus("on"))},n.bindHideStatus=function(t){var e=this.options.append?"append":"load";this[t](e,this.hideAllStatus)},n.showRequestStatus=function(){this.showStatus("request")},n.showErrorStatus=function(){this.showStatus("error")},n.showLastStatus=function(){this.showStatus("last"),this.bindHideStatus("off")},n.showStatus=function(t){r(this.statusElement),this.hideStatusEventElements(),r(this.statusEventElements[t])},n.hideAllStatus=function(){o(this.statusElement),this.hideStatusEventElements()},n.hideStatusEventElements=function(){for(var t in this.statusEventElements)o(this.statusEventElements[t])},e},"object"==typeof e&&e.exports?e.exports=o(0,t("./core"),t("fizzy-ui-utils")):o(0,n.InfiniteScroll,n.fizzyUIUtils)},{"./core":11,"fizzy-ui-utils":18}],17:[function(t,e,i){var n,o;n="undefined"!=typeof window?window:this,o=function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let i=this._events=this._events||{},n=i[t]=i[t]||[];return n.includes(e)||n.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this},e.off=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;e=i.indexOf(e);return-1!=e&&i.splice(e,1),this},e.emitEvent=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;i=i.slice(0),e=e||[];let n=this._onceEvents&&this._onceEvents[t];for(var o of i)n&&n[o]&&(this.off(t,o),delete n[o]),o.apply(this,e);return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t},"object"==typeof e&&e.exports?e.exports=o():n.EvEmitter=o()},{}],18:[function(t,e,i){var n,o;n=this,o=function(e){let l={extend:function(t,e){return Object.assign(t,e)},modulo:function(t,e){return(t%e+e)%e},makeArray:function(t){return Array.isArray(t)?t:null==t?[]:"object"==typeof t&&"number"==typeof t.length?[...t]:[t]},removeFrom:function(t,e){e=t.indexOf(e);-1!=e&&t.splice(e,1)},getParent:function(t,e){for(;t.parentNode&&t!=document.body;)if((t=t.parentNode).matches(e))return t},getQueryElement:function(t){return"string"==typeof t?document.querySelector(t):t},handleEvent:function(t){var e="on"+t.type;this[e]&&this[e](t)},filterFindElements:function(t,i){return(t=l.makeArray(t)).filter(t=>t instanceof HTMLElement).reduce((t,e)=>{if(!i)return t.push(e),t;e.matches(i)&&t.push(e);e=e.querySelectorAll(i);return t=t.concat(...e)},[])},debounceMethod:function(t,e,i){i=i||100;let n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){clearTimeout(this[o]);let t=arguments;this[o]=setTimeout(()=>{n.apply(this,t),delete this[o]},i)}},docReady:function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},toDashed:function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()}},a=e.console;return l.htmlInit=function(r,s){l.docReady(function(){let n="data-"+l.toDashed(s);var t=document.querySelectorAll(`[${n}]`);let o=e.jQuery;[...t].forEach(e=>{var t=e.getAttribute(n);let i;try{i=t&&JSON.parse(t)}catch(t){return void(a&&a.error(`Error parsing ${n} on ${e.className}: ${t}`))}t=new r(e,i);o&&o.data(e,s,t)})})},l},"object"==typeof e&&e.exports?e.exports=o(n):n.fizzyUIUtils=o(n)},{}],19:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(t,e,i){return e&&o(t.prototype,e),i&&o(t,i),t};function o(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var r=t("./util");n(s,[{key:"recalc",value:function(){this.elements=document.querySelectorAll(this.selector),this.run()}},{key:"makeGroups",value:function(t){var e=[];[].forEach.call(t,function(t){t.style.height="1px",t.style.overflow="hidden"});var i=0,n=(0,r.getOffset)(t[0]).top;return e[0]=[],[].forEach.call(t,function(t){(0,r.getOffset)(t).top!==n&&(n=(0,r.getOffset)(t).top,e[i+=1]=[]),e[i].push(t)}),[].forEach.call(t,function(t){t.style.height="",t.style.overflow=""}),e}},{key:"autoHeight",value:function(t){var e=t.map(function(t){var e=getComputedStyle(t);return"border-box"===e.boxSizing?t.offsetHeight:t.offsetHeight-parseFloat(e.paddingTop)-parseFloat(e.paddingBottom)}),i=Math.max.apply(Math,function(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return Array.from(t)}(e));t.forEach(function(t){t.style.height=i+"px"})}},{key:"run",value:function(){var e=this,t=this.elements;this.makeGroups(t).forEach(function(t){e.autoHeight(t)})}}]),n=s;function s(t,e){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),this.selector=t,this.elements="string"==typeof t?document.querySelectorAll(t):t,this.options=e,window.addEventListener("resize",function(){i.run()}),this.run()}i.default=n,e.exports=i.default},{"./util":20}],20:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});i.getOffset=function(t){t=t.getBoundingClientRect();return{top:t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:t.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}},{}]},{},[1]);