kollapsminoriteten/wp-content/themes/blocksy/static/bundle/321.8dafdd70f3a10f77c60a.js

1 line
9.8 KiB
JavaScript
Raw Normal View History

2025-08-27 08:44:30 +02:00
"use strict";(self.blocksyJsonP=self.blocksyJsonP||[]).push([[321],{9679:function(e,t,n){n.d(t,{$0:function(){return i},Kz:function(){return r},Vz:function(){return a},pF:function(){return l},r:function(){return s},v3:function(){return c},zT:function(){return o}});const o=function(e){e.closest(".ct-media-container, .ct-dynamic-media").dataset.state="playing"},i=function(e){e&&(e.matches('iframe[src*="youtu"]')?e.contentWindow.postMessage(JSON.stringify({event:"command",func:"mute"}),"*"):e.matches('iframe[src*="vimeo"]')&&e.contentWindow.postMessage(JSON.stringify({method:"setMuted",value:!0}),"*"))},r=function(e){e&&(e.matches("video")?e.play():e.matches('iframe[src*="youtu"]')?e.contentWindow.postMessage(JSON.stringify({event:"command",func:"playVideo"}),"*"):e.matches('iframe[src*="vimeo"]')&&e.contentWindow.postMessage(JSON.stringify({method:"play"}),"*"))},c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};e&&(e.matches("video[autoplay]")||e.matches('iframe[src*="youtu"][src*="autoplay=1"]')||e.matches('iframe[src*="vimeo"][src*="autoplay=1"]')?(t(),r(e)):n())},a=function(e){e.closest(".ct-media-container, .ct-dynamic-media").dataset.state="paused"},s=function(e){if(e)if(e.matches("video"))e.pause();else if(e.matches('iframe[src*="youtu"]'))e.contentWindow.postMessage(JSON.stringify({event:"command",func:"pauseVideo"}),"*");else if(e.matches('iframe[src*="vimeo"]'))e.contentWindow.postMessage(JSON.stringify({method:"pause"}),"*");else if(e.matches("iframe")){const t=e.src;e.src="",e.src=t}},l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if(e)return e.matches("video")?(t("ready"),e.addEventListener("play",(function(){return t("play")})),void e.addEventListener("pause",(function(){return t("pause")}))):e.matches('iframe[src*="youtu"]')?(window.addEventListener("message",(function(n){if(n.data&&n.source===e.contentWindow)try{const e=JSON.parse(n.data);"onStateChange"===e.event&&(1===e.info&&t("play"),2===e.info&&t("pause"))}catch(n){}})),void e.addEventListener("load",(function(){e.contentWindow.postMessage(JSON.stringify({event:"listening",id:1,channel:"widget"}),"*"),e.contentWindow.postMessage(JSON.stringify({event:"command",func:"addEventListener",args:["onStateChange"],id:1,channel:"widget"}),"*"),t("ready")}))):void(e.matches('iframe[src*="vimeo"]')&&window.addEventListener("message",(function(n){if(n.data&&n.source===e.contentWindow)try{const o=JSON.parse(n.data);"ready"===o.event&&(e.contentWindow.postMessage(JSON.stringify({method:"addEventListener",value:"pause"}),"*"),e.contentWindow.postMessage(JSON.stringify({method:"addEventListener",value:"play"}),"*"),t(o.event)),"pause"!==o.event&&"play"!==o.event||t(o.event)}catch(n){}})))}},5321:function(e,t,n){n.r(t),n.d(t,{mount:function(){return l}});var o=n(2194),i=n.n(o),r=n(9679);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l=function(e,t){let{event:o}=t;const c=window.PhotoSwipe&&document.querySelector(".woocommerce-product-gallery__trigger"