kollapsminoriteten/wp-content/themes/blocksy/static/bundle/41.55886ca4400f518a1b3a.js

9 lines
20 KiB
JavaScript
Raw Normal View History

2025-12-12 13:14:39 +01:00
(globalThis.blocksyJsonP=globalThis.blocksyJsonP||[]).push([[41],{977:function(t){var e,n;e=this,n=function(t){let e={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){let n=t.indexOf(e);-1!=n&&t.splice(n,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){let e="on"+t.type;this[e]&&this[e](t)},filterFindElements:function(t,n){return(t=e.makeArray(t)).filter(t=>t instanceof HTMLElement).reduce((t,e)=>{if(!n)return t.push(e),t;e.matches(n)&&t.push(e);let i=e.querySelectorAll(n);return t=t.concat(...i)},[])},debounceMethod:function(t,e,n){n=n||100;let i=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){clearTimeout(this[o]);let t=arguments;this[o]=setTimeout(()=>{i.apply(this,t),delete this[o]},n)}},docReady:function(t){let 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,n){return e+"-"+n}).toLowerCase()}},n=t.console;return e.htmlInit=function(i,o){e.docReady(function(){let s="data-"+e.toDashed(o),r=document.querySelectorAll(`[${s}]`),l=t.jQuery;[...r].forEach(t=>{let e,r=t.getAttribute(s);try{e=r&&JSON.parse(r)}catch(e){return void(n&&n.error(`Error parsing ${s} on ${t.className}: ${e}`))}let c=new i(t,e);l&&l.data(t,o,c)})})},e},t.exports?t.exports=n(e):e.fizzyUIUtils=n(e)},2137:function(t){var e,n;e="undefined"!=typeof window?window:this,n=function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let n=this._events=this._events||{},i=n[t]=n[t]||[];return i.includes(e)||i.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let n=this._onceEvents=this._onceEvents||{};return(n[t]=n[t]||{})[e]=!0,this},e.off=function(t,e){let n=this._events&&this._events[t];if(!n||!n.length)return this;let i=n.indexOf(e);return-1!=i&&n.splice(i,1),this},e.emitEvent=function(t,e){let n=this._events&&this._events[t];if(!n||!n.length)return this;n=n.slice(0),e=e||[];let i=this._onceEvents&&this._onceEvents[t];for(let o of n)i&&i[o]&&(this.off(t,o),delete i[o]),o.apply(this,e);return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t},t.exports?t.exports=n():e.EvEmitter=n()},2863:function(t,e,n){!function(e,i){t.exports?t.exports=i(e,n(8830)):i(e,e.InfiniteScroll)}(window,function(t,e){let n=e.prototype;Object.assign(e.defaults,{loadOnScroll:!0,checkLastPage:!0,responseBody:"text",domParseResponse:!0}),e.create.pageLoad=function(){this.canLoad=!0,this.on("scrollThreshold",this.onScrollThresholdLoad),this.on("load",this.checkLastPage),this.options.outlayer&&this.on("append",this.onAppendOutlayer)},n.onScrollThresholdLoad=function(){this.options.loadOnScroll&&this.loadNextPage()};let i=new DOMParser;function o(t){let e=document.createDocumentFragment();return t&&e.append(...t),e}return n.loadNextPage=function(){if(this.isLoading||!this.canLoad)return;let{responseBody:t,domParseResponse:e,fetchOptions:n}=this.options,o=this.getAbsolutePath();this.isLoading=!0,"function"==typeof n&&(n=n());let s=fetch(o,n).then(n=>{if(!n.ok){let t=new Error(n.statusText);return this.onPageError(t,o,n),{response:n}}return n[t]().then(s=>("text"==t&&e&&(s=i.parseFromString(s,"text/html")),204==n.status?(this.lastPageReached(s,o),{body:s,response:n}):this.onPageLoad(s,o,n)))}).catch(t=>{this.onPageError(t,o)});return this.dispatchEvent("request",null,[o,s]),s},n.onPageLoad=function(t,e,n){return this.options.append||(this.isLoading=!1),this.pageIndex++,this.loadCount++,this.dispatchEvent("load",null,[t,e,n]),this.appendNextPage(t,e,n)},n.appendNextPage=function(t,e,n){let{append:i,responseBody:s,domParseResponse:r}=this.options;if(!("text"==s&&r)||!i)return{body:t,response:n};let l=t.querySelectorAll(i),c={body:t,r
/*!
* Infinite Scroll v5.0.0
* Automatically add next page
* MIT License
* https://infinite-scroll.com
* Copyright 2018-2025 Metafizzy
*/
var i;window,t.exports&&(t.exports=(i=n(8830),n(2863),n(4170),n(8181),n(4397),n(9347),i))},4170:function(t,e,n){!function(e,i){t.exports?t.exports=i(e,n(8830),n(977)):i(e,e.InfiniteScroll,e.fizzyUIUtils)}(window,function(t,e,n){let i=e.prototype;return Object.assign(e.defaults,{scrollThreshold:400}),e.create.scrollWatch=function(){this.pageScrollHandler=this.onPageScroll.bind(this),this.resizeHandler=this.onResize.bind(this);let t=this.options.scrollThreshold;(t||0===t)&&this.enableScrollWatch()},e.destroy.scrollWatch=function(){this.disableScrollWatch()},i.enableScrollWatch=function(){this.isScrollWatching||(this.isScrollWatching=!0,this.updateMeasurements(),this.updateScroller(),this.on("last",this.disableScrollWatch),this.bindScrollWatchEvents(!0))},i.disableScrollWatch=function(){this.isScrollWatching&&(this.bindScrollWatchEvents(!1),delete this.isScrollWatching)},i.bindScrollWatchEvents=function(e){let n=e?"addEventListener":"removeEventListener";this.scroller[n]("scroll",this.pageScrollHandler),t[n]("resize",this.resizeHandler)},i.onPageScroll=e.throttle(function(){this.getBottomDistance()<=this.options.scrollThreshold&&this.dispatchEvent("scrollThreshold")}),i.getBottomDistance=function(){let e,n;return this.options.elementScroll?(e=this.scroller.scrollHeight,n=this.scroller.scrollTop+this.scroller.clientHeight):(e=this.top+this.element.clientHeight,n=t.scrollY+this.windowHeight),e-n},i.onResize=function(){this.updateMeasurements()},n.debounceMethod(e,"onResize",150),e})},4397:function(t,e,n){!function(e,i){t.exports?t.exports=i(e,n(8830),n(977)):i(e,e.InfiniteScroll,e.fizzyUIUtils)}(window,function(t,e,n){class i{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(){let t=n.getQueryElement(this.options.button);t&&(this.button=new i(t,this))},e.destroy.button=function(){this.button&&this.button.destroy()},e.Button=i,e})},8041:function(t,e,n){"use strict";n.r(e),n.d(e,{mount:function(){return u}});var i=n(4705),o=n(3833),s=n.n(o),r=n(5747),l=n(2151),c=n.n(l);function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}const h=function(t){const e=["active","ct-active","wpgb-enabled","e-lazyloaded"];let n=[],i=t;for(;i&&i!==document;i=i.parentNode)i.matches(".yit-wcan-container")||n.push(i);return n=n.reverse(),n.filter(function(t){return!t.matches("body, html")}).map(function(n){if(n===document.body)return"body";let i=n.tagName;if(n!==t&&(i+=""!=n.id?"#"+n.id:"",i+=n.dataset.target?`[data-target="${n.dataset.target}"]`:""),n.className){const t=n.className.split(/\s/);for(let n=0;n<t.length;n++)t[n]&&-1===e.indexOf(t[n])&&(i+="."+t[n])}if(n===t){const t=[...n.parentNode.children].indexOf(n);t>-1&&(i+=`:nth-child(${t+1})`)}return i}).join(" > ")};s().imagesLoaded=function(t,e){return e()},s().Button.prototype.hide=function(){},s().prototype.onPageScroll=s().throttle(function(){let t=this.getBottomDistance();t<=this.options.scrollThreshold&&t>-this.options.scrollThreshold&&this.dispatchEvent("scrollThreshold")});const u=function(t){let e=[...t.parentNode.children].reduce(function(t,e){return[...t,...e.children]},[...t.parentNode.children]).find(function(t){return t.classList.contains("products")||t.classList.contains("entries")||t.classList.contains("ct-query-template-grid")||t.classList.contains("ct-query-template-default")});if(!t)return;let n=t.dataset.pagination;if(n.indexOf("simple")>-1)return;if(n.indexOf("next_prev")>-1)return;