kollapsminoriteten/wp-content/themes/blocksy/static/bundle/308.6362eb44cd1ed91853d5.js

9 lines
21 KiB
JavaScript
Raw Normal View History

2025-08-27 08:44:30 +02:00
(self.blocksyJsonP=self.blocksyJsonP||[]).push([[308],{6308:function(t,e,n){"use strict";n.r(e),n.d(e,{mount:function(){return h}});var i=n(48),o=n.n(i),s=n(9139),r=n(1601),l=n.n(r);function c(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}function a(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}o().imagesLoaded=function(t,e){return e()},o().Button.prototype.hide=function(){},o().prototype.onPageScroll=o().throttle((function(){let t=this.getBottomDistance();t<=this.options.scrollThreshold&&t>-this.options.scrollThreshold&&this.dispatchEvent("scrollThreshold")}));const h=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;if(!t.querySelector(".next"))return;if(t.infiniteScroll)return;const i=u(e,{toAppend:".ct-pagination"})||".ct-pagination",r=t.querySelector(".next");let c=`${i} .next`;if(r&&r.href&&r.href.indexOf("paged=")>-1){const t=new URL(r.href);t.searchParams.set("paged","{{#}}"),c=decodeURIComponent(t.toString())}let a=new(o())(e,{checkLastPage:`${i} .next`,path:c,append:u(e),button:"load_more"===n?t.querySelector(".ct-load-more"):null,outlayer:null,scrollThreshold:"infinite_scroll"===n&&400,onInit(){this.on("load",(function(e){t.querySelector(".ct-load-more-helper").classList.remove("ct-loading"),setTimeout((function(){l().trigger("ct:infinite-scroll:load"),l().trigger("blocksy:frontend:init"),l().trigger("blocksy:parallax:init"),window.jQuery&&jQuery(document.body).trigger("wc_price_based_country_ajax_geolocation"),document.dispatchEvent(new CustomEvent("cfvswVariationLoad",{detail:{}}))}),100)})),this.on("append",(function(){(0,s.Z)(e),[...e.querySelectorAll("[srcset]")].forEach((function(t){const e=t.srcset;t.srcset="",t.srcset=e}))})),this.on("request",(function(){t.querySelector(".ct-load-more-helper").classList.add("ct-loading")})),this.on("last",(function(){t.classList.add(t.querySelector(".ct-last-page-text")?"ct-last-page":"ct-last-page-no-info")}))}});t.infiniteScroll=a};function u(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({toAppend:"default"},e);const n=[...t.parentNode.parentNode.children].indexOf(t.parentNode);if(t.closest(".ct-posts-shortcode"))return t.classList.contains("products")?`.ct-posts-shortcode:nth-child(${n+1}) ${"default"===e.toAppend?".products > li":e.toAppend}`:`.ct-posts-shortcode:nth-child(${n+1}) ${"default"===e.toAppend?".entries > *":e.toAppend}`;if(t.closest(".wp-block-blocksy-query")){const n=`.wp-block-blocksy-query[data-id="${t.closest(".wp-block-blocksy-query").dataset.id}"]`;return`${n} ${"default"===e.toAppend?`[class*="ct-query-template"] > *, ${n} .entries > *`:e.toAppend}`}if(t.classList.contains("products")){const n=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(
/*!
* 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(6717),n(2484),n(3610),n(9774),n(8163),n(7792),i))},2484:function(t,e,n){!function(e,i){t.exports?t.exports=i(e,n(6717)):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,response:n,items:l};if(!l||!l.length)return this.lastPageReached(t,e),c;let a=o(l),h=()=>(this.appendItems(l,a),this.isLoading=!1,this.dispatchEvent("append",null,[t,e,l,n]),c);return this.options.outlayer?this.appendOutlayerItems(a,h):h()},n.appendItems=function(t,e){t&&t.length&&(function(t){let e=t.querySelectorAll("script");for(let t of e){let e=document.createElement("script"),n=t.attributes;for(let t of n)e.setAttribute(t.name,t.value);e.innerHTML=t.innerHTML,t.parentNode.replaceChild(e,t)}}(e=e||o(t)),this.element.appendChild(e))},n.appendOutlayerItems=function(n,i){let o=e.imagesLoaded||t.imagesLoaded;return o?new Promise((function(t){o(n,(function(){let e=i();t(e)}))})):(console.error("[InfiniteScroll] imagesLoaded required for outlayer option"),void(this.isLoading=!1))},n.onAppendOutlayer=function(t,e,n){this.options.outlayer.appended(n)},n.checkLastPage=function(t,e){let n,{checkLastPage:i,path:o}=this.options;if(i){if("function"==typeof o){if(!this.getPath())return void this.lastPageReached(t,e)}"string"==typeof i?n=i:this.isPathSelector&&(n=o),n&&t.querySelector&&(t.querySelector(n)||this.lastPageReached(t,e))}},n.lastPageReached=function(t,e){this.canLoad=!1,this.dispatchEvent("last",null,[t,e])},n.onPageError=function(t,e,n){return this.isLoading=!1,this.canLoad=!1,this.dispatchEvent("error",null,[t,e,n]),t},e.create.prefill=function(){if(!this.options.prefill)return;let t=this.options.append;t?(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}`)},n.prefill=function(){let t=this.getPrefillDistance();this.isPrefilling=t>=0,this.isPrefilling?(this.log("prefill"),this.loadNextPage()):this.stopPrefill()},n.getPrefillDistance=function(){return this.options.elementScroll?this.scroller.clientHeight-this.scroller.scrollHeight:this.windowHeight-this.element.clientHeight},n.stopPrefill=function(){this.log("stopPrefill"),this.off("append",this.prefill)},e}))},3610:function(t,e,n){!function(e,i){t.exports?t.exports=i(e,n(6717),n(9047)):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.opti