PageSourceSearch

https://www.maximal-radio.de/wp-content/themes/cmms-theme-maximal_radio/assets/dist/1.56/SocialEmbed.js

js maximal-radio.de collected 2026-10-10 00:52:25 UTC 5,117 bytes, 1 lines download raw bytes

1import{_ as g,U as s,x as r,y as d,z as h,B as c,D as u,E as f,F as v,G as _}from"./app.js";import"./swiper.js";const E=window.Vue.nextTick,S={name:"SoylentSocialEmbed",props:["element"],data:function(){return{agreed:!1,forceManualFallback:!1}},computed:{provider(){return this.element.data.provider},identifier(){return this.element.data.identifier},embedCall(){return this.element.data.embedCall},providerEmbed(){return this.element.data.embedHtml},url(){return this.element.data.url},usercentricsServices(){return _(this.element.data.usercentricsServices)},usercentricsAvailable(){var e,t;return(t=(e=this.element.data)==null?void 0:e.usercentrics_available)!=null?t:!1},consentKey(){return this.consentIdentifier},configuredConsentMode(){return v({consentNeeded:this.element.data.consent_needed,usercentricsAvailable:this.usercentricsAvailable,usercentricsServices:this.usercentricsServices})},activeConsentMode(){return this.configuredConsentMode===r?r:this.forceManualFallback?d:this.configuredConsentMode},needsConsent(){return this.element.data.consent_needed===1},canLoad:function(){return!this.needsConsent||this.agreed},consentButtonLabel:function(){return this.element.data.blocker_button_label?this.element.data.blocker_button_label:f(this.activeConsentMode).buttonLabel},consentText:function(){return this.element.data.blocker_text?this.element.data.blocker_text:f(this.activeConsentMode).text},consentIdentifier:function(){return this.element.data.provider+"_consent"},containerId:function(){return"container_"+this.identifier},iframeId:function(){return"iframe_"+this.identifier},iframeSrc:function(){return this.shouldUseIframe?"/cmms-api-v2/soylent/embed/".concat(this.provider,"?u=").concat(encodeURIComponent(this.url),"&id=").concat(this.identifier):null},shouldUseIframe:function(){return this.element.data.useIframe}},methods:{handleIframeMessage(e){if(e.data.type==="social-embed-height"){const t=document.getElementById(this.iframeId);if(t&&e.data.id===this.iframeId){const i=parseInt(e.data.height)||0;if(i>=50&&i<=2e3){const l=parseInt(t.style.height)||0;Math.abs(i-l)>1&&(t.style.height=i+"px",t.style.transition="height 0.2s ease-out")}}}},agree(){if(this.activeConsentMode===c){const e=s.getServiceState(this.usercentricsServices);if(e==="missing")this.forceManualFallback=!0;else if(e==="matched"){s.acceptServices(this.usercentricsServices).then(t=>{if(t){this.refreshConsentState(),this.initEmbedIfNeeded();return}this.forceManualFallback=!0,this.agreed=!0,u(this.consentKey),this.initEmbedIfNeeded()});return}else{s.openPrivacySettings();return}}if(this.activeConsentMode===d){this.agreed=!0,u(this.consentKey),this.initEmbedIfNeeded();return}this.activeConsentMode===r&&(this.agreed=!0,this.initEmbedIfNeeded())},onConsentChanged(e){var t;if(this.activeConsentMode!==c){const i=(t=e==null?void 0:e.detail)==null?void 0:t.identifier;if(i&&i!==this.consentIdentifier)return}this.refreshConsentState(),this.initEmbedIfNeeded()},refreshConsentState(){if(this.activeConsentMode===r){this.agreed=!0;return}if(this.activeConsentMode===d){this.agreed=h(this.consentKey);return}if(this.activeConsentMode===c){const e=s.getServiceState(this.usercentricsServices);if(e==="missing"){this.forceManualFallback=!0,this.agreed=h(this.consentKey);return}if(e==="unknown"){this.agreed=!1;return}this.agreed=s.hasConsent(this.usercentricsServices);return}},loadEmbed(){var t;if(!this.embedCall||!this.identifier)return!1;const e=(t=window.soylentSocialEmbed)==null?void 0:t.render;if(typeof e!="function")throw new Error("soylentSocialEmbed.render is not available");return e(this.embedCall,this.identifier,this.element.data.providerConfig)},initEmbedIfNeeded(){!this.canLoad||this.shouldUseIframe||E(()=>{this.loadEmbed()})}},watch:{canLoad(e,t){e&&!t&&this.initEmbedIfNeeded()}},beforeUnmount(){s.offConsentChanged(this.onConsentChanged),window.removeEventListener("consent-changed",this.onConsentChanged),window.removeEventListener("message",this.handleIframeMessage)},mounted(){s.onConsentChanged(this.onConsentChanged),window.addEventListener("consent-changed",this.onConsentChanged),window.addEventListener("message",this.handleIframeMessage),this.refreshConsentState(),this.initEmbedIfNeeded()}},a=window.Vue.openBlock,o=window.Vue.createElementBlock;window.Vue.createCommentVNode;const m=window.Vue.toDisplayString,b=window.Vue.createElementVNode,w=["id"],p=["src","id"],M=["innerHTML"],I={key:1,class:"social-embed-consent-wrapper"},y={class:"consent-text"};function k(e,t,i,l,N,n){return n.canLoad?(a(),o("div",{key:0,id:n.containerId,class:"social-embed"},[n.shouldUseIframe?(a(),o("iframe",{key:0,src:n.iframeSrc,id:n.iframeId,class:"social-embed-iframe",sandbox:"allow-scripts allow-same-origin allow-popups",loading:"lazy",style:{border:"0",width:"100%",height:"100%",display:"block",overflow:"hidden"}},null,8,p)):(a(),o("div",{key:1,innerHTML:n.providerEmbed},null,8,M))],8,w)):(a(),o("div",I,[b("p",y,m(n.consentText),1),b("a",{class:"consent-button",onClick:t[0]||(t[0]=(...C)=>n.agree&&n.agree(...C))},m(n.consentButtonLabel),1)]))}const T=g(S,[["render",k]]);export{T as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.