1var b=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function v(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function g(){this.timeoutDefault=5e3,this.fetchWithTimeout=(e,r={},l=this.timeoutDefault)=>{const c=new AbortController,s={...r,signal:c.signal};return setTimeout(()=>{c.abort()},l),fetch(e,s).then(i=>i).catch(i=>{throw i.name==="AbortError"?new Error("Response timed out"):new Error(i.message)})},this.getCollection=(e,r)=>this.fetchWithTimeout("/api/cwb/"+e+"-html?"+this.buildQueryString(r),{headers:{Accept:"application/json"}}),this.getYoutubeLivestream=e=>this.fetchWithTimeout("/api/cwb/youtube-livestream?"+this.buildQueryString(e),{headers:{Accept:"application/json"}}),this.buildQueryString=e=>{let r=new URLSearchParams;for(const l in e)r.append(l,e[l]);return r.toString()}}const w={init:function(){return new g}};function y(e,r,l=null){let c=document.createElement("div"),s=w.init();const i=l==="next";function h(){document.currentScript.insertAdjacentElement("afterend",c),f()}function f(){s.getYoutubeLivestream({channel_id:e,visible_from:r,preview:i}).then(t=>t.json()).then(t=>{if(t.error){d(t.error);return}t.video_id?p(t.video_id):m()}).catch(t=>{d("network_error")})}function m(){i?u("Kein geplanter Livestream","Es ist aktuell kein Livestream geplant."):u()}function d(t){const o={channel_not_found:{headline:"Kanal nicht gefunden",text:"Die Kanal-ID konnte nicht gefunden werden."},invalid_api_key:{headline:"Konfigurationsfehler",text:"Der YouTube API-Key ist nicht korrekt konfiguriert."},quota_exceeded:{headline:"API-Limit erreicht",text:"Das YouTube API-Limit wurde erreicht. Bitte später erneut versuchen."},network_error:{headline:"Verbindungsfehler",text:"Die YouTube API ist derzeit nicht erreichbar."}}[t]||{};u(o.headline,o.text)}function p(t){const n=document.createElement("iframe");n.src=`https://www.youtube-nocookie.com/embed/${t}`,n.width="100%",n.allowFullscreen=!0,n.allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen",n.referrerPolicy="strict-origin-when-cross-origin",n.title="YouTube Livestream",c.replaceChildren(n)}function u(t,n){t=t||"Kein Livestream Video verfügbar",n=n||"Derzeit sind in deinem Kanal keine aktiven, angekündigten oder vergangenen Livestreams sichtbar. Sobald sich dies ändert, wird hier eine Vorschau angezeigt.";const o=document.createElement("div");if(o.classList.add("external-service-placeholder","external-service-placeholder--empty"),t){const a=document.createElement("h3");a.classList.add("external-service-placeholder__headline"),a.textContent=t,o.appendChild(a)}if(n){const a=document.createElement("div");a.classList.add("external-service-placeholder__text"),a.textContent=n,o.appendChild(a)}c.replaceChildren(o)}h()}export{w as a,b as c,v as g,y as w};
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.