cuwebframework 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- function F(){const o=["u-theme-dark","u-theme-light"],e=document.documentElement,t=document.getElementById("tgl-theme");if(!t){console.warn('Toggle-Button mit ID "tgl-theme" nicht gefunden.');return}t.addEventListener("click",()=>{const n=e.classList.contains("u-theme-dark")?"u-theme-light":"u-theme-dark";e.classList.remove(...o),e.classList.add(n),e.setAttribute("color-scheme",n==="u-theme-dark"?"dark":"light");try{localStorage.setItem("theme",n)}catch(s){}})}function V(){const o=document.body,e=document.documentElement;["u-brand-bos","u-brand-cu"].forEach(r=>{o.classList.contains(r)&&(o.classList.remove(r),e.classList.add(r))}),o.classList.length===0&&o.removeAttribute("class")}function x(){var f,m;if(!window.gsap)return;const o=window.gsap,e=document.getElementById("g_nav_menu_toggle"),t=document.querySelector('label[for="g_nav_menu_toggle"]'),r=document.querySelector(".g_nav_menu"),n=(f=t==null?void 0:t.querySelector("use"))!=null?f:null;if(!e||!t||!n)return;const s=l=>{t.setAttribute("aria-label",l?"Menü schließen":"Menü öffnen"),t.setAttribute("aria-expanded",l?"true":"false")},a=l=>{n.setAttribute("href",l?"#icon-x-lg":"#icon-menu")},i=l=>{document.body.classList.toggle("u-overflow-hidden",l)},d=l=>{r&&o.to(r,l?{display:"block",height:"calc(100vh - var(--global-nav--height))",opacity:1,duration:.3,ease:"power2.out"}:{display:"none",height:0,opacity:0,duration:.25,ease:"power2.in"})},u=()=>{const l=!!e.checked;s(l),a(l),d(l),i(l)};document.documentElement.classList.add("js-nav");const c=(m=o.matchMedia)==null?void 0:m.call(o);c&&typeof c.add=="function"?c.add("(max-width: 1040px)",()=>{o.set(r,{height:0,opacity:0,display:"none"}),u(),e.addEventListener("change",u)}):(u(),e.addEventListener("change",u))}function R(){if(!window.gsap||!window.ScrollTrigger)return;const o=window.gsap,e=document.querySelector(".g_nav"),t=document.querySelector(".global_header"),r=t==null?void 0:t.querySelector(".g_banner");if(!e)return;let n="shown";const s=50,a=350,i=()=>{n!=="shown"&&(t&&o.to(t,{y:0,duration:.25,ease:"power2.out",overwrite:!0}),n="shown")},d=()=>{if(n==="hidden"||!e)return;const c=e.offsetHeight;t&&o.to(t,{y:-c,duration:.25,ease:"power2.out",overwrite:!0}),n="hidden"},u=()=>{e&&e.querySelectorAll("details[open]").forEach(c=>{c.dispatchEvent(new CustomEvent("details:request-close",{bubbles:!0}))})};window.ScrollTrigger.create({start:0,end:document.body.scrollHeight,onUpdate(c){if(c.scroll()<=s){r&&(r.style.display="none"),i();return}r&&(r.style.display=""),!(Math.abs(c.getVelocity())<a)&&(c.direction===1?(u(),d()):i())}}),window.ScrollTrigger.addEventListener("refresh",()=>{window.scrollY<=s&&i()}),window.scrollY<=s?(i(),r&&(r.style.display="none")):(d(),r&&(r.style.display=""))}function M(){if(!window.gsap)return;const e=n=>n==null?!0:window.innerWidth>n,t=(n,s,a)=>{var d,u;const i=(u=(d=n.dataset)==null?void 0:d[s])!=null?u:void 0;return i===void 0?a:i==="true"},r=(n,s,a)=>{var u,c;const i=(c=(u=n.dataset)==null?void 0:u[s])!=null?c:void 0;if(i===void 0||i==="")return a;const d=parseInt(i,10);return Number.isNaN(d)?a:d};document.querySelectorAll("details").forEach(n=>{var k;const s=n.querySelector("summary"),a=s==null?void 0:s.nextElementSibling;if(!s||!a)return;const i=Array.from(a.children),d=t(n,"hover",!1),u=r(n,"hoverMinWidth",null),c=(k=r(n,"hoverDelay",750))!=null?k:750,f=t(n,"animate",!0);let m=!1,l=!1,p=null;const g=()=>{p!=null&&(clearTimeout(p),p=null)};let E=null;const C=t(n,"autoclose",!1),b=()=>{!C||E||(E=h=>{var P,N;if(!n.open)return;const I=(N=(P=h.composedPath)==null?void 0:P.call(h))!=null?N:[];if(I.length){if(I.includes(s)||I.includes(a))return;L();return}const O=h.target;!!(O&&(s.contains(O)||a.contains(O)))||L()},document.addEventListener("pointerdown",E,{capture:!0}))},S=()=>{E&&(document.removeEventListener("pointerdown",E,{capture:!0}),E=null)},_=f;let w=null;const v={open:()=>{n.open=!0},close:()=>{n.open=!1}};if(_){const h=window.gsap;h.set(a,{height:0,overflow:"hidden"}),i.length>0&&h.set(i,{opacity:0}),w=h.timeline({paused:!0,defaults:{duration:.35,ease:"power2.out"},onReverseComplete:()=>{n.open=!1,S()}}),w.set(n,{attr:{open:""}},0),w.to(a,{height:()=>a.scrollHeight}),w.set(a,{clearProps:"height"}),i.length>0&&w.to(i,{opacity:1,stagger:.04,duration:.38},"-=0.25"),v.open=()=>{w.invalidate().play(0),b()},v.close=()=>{w.reverse()}}function T(){v.open(),_||b()}function L(){v.close(),_||S()}n.addEventListener("details:request-close",h=>{h.stopPropagation(),n.open&&L()}),s.addEventListener("click",h=>{if(h.preventDefault(),!n.open)T();else{if(m&&l){b();return}L()}}),d&&(n.addEventListener("mouseenter",()=>{e(u)&&(n.open||(m=!0,l=!0,g(),p=window.setTimeout(()=>{l=!1},c),T()))}),n.addEventListener("mouseleave",()=>{m&&(m=!1,l=!1,g(),n.open&&L())}))})}function j(){document.querySelectorAll('[cu-list-sort="abc"]').forEach(e=>{const t=Array.from(e.children);t.sort((r,n)=>r.textContent.trim().localeCompare(n.textContent.trim(),"de",{sensitivity:"base"})),t.forEach(r=>e.appendChild(r))})}function z(){const o=String(new Date().getFullYear()),e=document.querySelectorAll('time[datetime="currentYear"]');e.length!==0&&e.forEach(t=>{t.setAttribute("datetime",o),t.textContent=o})}function $(){const o=(e,t=100)=>{let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>e(...n),t)}};document.querySelectorAll(".horizontal_slider_container").forEach(e=>{const t=e.querySelector('[data-slider="content"]'),r=e.querySelector('[data-slider="btn-right"]'),n=e.querySelector('[data-slider="btn-left"]'),s=e.querySelector(".button_group_wrapper"),a=r==null?void 0:r.closest(".button_main_wrap"),i=n==null?void 0:n.closest(".button_main_wrap"),d=()=>t.querySelectorAll('[data-slider="item"]').length?Array.from(t.querySelectorAll('[data-slider="item"]')):Array.from(t.children),u=p=>{const g=d();p<0||p>=g.length||g[p].scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})},c=()=>{const p=d(),g=t.getBoundingClientRect().left+t.clientWidth/2;let E=0,C=1/0;return p.forEach((b,S)=>{const _=b.getBoundingClientRect(),w=_.left+_.width/2,v=Math.abs(w-g);v<C&&(C=v,E=S)}),E},f=()=>u(c()+1),m=()=>u(c()-1),l=()=>{const p=t.scrollLeft,g=t.scrollWidth-t.clientWidth,E=p<=0,C=p>=g-1;if(!(t.scrollWidth>t.clientWidth)){s==null||s.style.setProperty("display","none"),i==null||i.style.setProperty("display","none"),a==null||a.style.setProperty("display","none");return}s==null||s.style.setProperty("display","flex"),i==null||i.style.setProperty("display",E?"none":"flex"),a==null||a.style.setProperty("display",C?"none":"flex")};r==null||r.addEventListener("click",f),n==null||n.addEventListener("click",m),t==null||t.addEventListener("scroll",o(l)),window.addEventListener("resize",o(l,150)),setTimeout(l,200)})}const B={};function y(o,e){B[o]=e}function Z(){document.addEventListener("click",o=>{const e=o.target;if(!e)return;const t=e.getAttribute("data-action");if(!t)return;const r=B[t];if(!r){console.warn(`Keine Action für data-action="${t}" registriert`);return}o.preventDefault(),r(e,o)})}const A={UC_CMP:"H1Vl5NidjWX",CLOUDFRONT:"BJ_ocNjds-X",JSDELIVR:"F-REmjGq7",VIDEOASK:"VtnVCeUzx",WEBFLOW:"BJ0H5NjOjWX",TIKTOK:"Z0TcXjY0P",FACEBOOK_PIXEL:"ko1w5PpFl",FACEBOOK_SOCIAL_PLUGIN:"XYQZBUojc",YOUTUBE_VIDEO:"BJz7qNsdj-7",GOOGLE_TAG_MANAGER:"BJ59EidsWQ",GOOGlE_ANALYTICS:"HkocEodjb7",GOOGLE_FONTS:"HkPBYFofN",GOOGLE_AJAX:"H1PKqNodoWQ",GOOGLE_PLAY:"rw4DyFQcg6s3-W",RECAPTCHA:"Hko_qNsui-Q",CLICKCEASE:"jgGgfqxe0",TYPEFORM:"r1PkZcEs_iWQ",DOUBLECLICK_AD:"9V8bg4D63"},K={YOUTUBE_VIDEO:["RECAPTCHA","GOOGLE_AJAX","GOOGLE_FONTS","GOOGLE_PLAY","DOUBLECLICK_AD"],VIDEOASK:["TYPEFORM","CLICKCEASE","FACEBOOK_PIXEL","FACEBOOK_SOCIAL_PLUGIN","GOOGLE_TAG_MANAGER","GOOGlE_ANALYTICS","TYPEFORM","TIKTOK"]};function X(){y("showSecondLayer",()=>{var o;(o=window.__ucCmp)==null||o.showSecondLayer()}),y("showServiceDetails",o=>{var r;const e=o.closest("[data-uc-id]"),t=e==null?void 0:e.getAttribute("data-uc-id");if(!e||!t){console.warn("Ungültiges Element oder fehlende data-uc-id");return}(r=window.__ucCmp)==null||r.showServiceDetails(t)}),y("updateServicesConsents",async o=>{var i,d,u;const e=o.closest("[data-uc-id]"),t=e==null?void 0:e.dataset.ucId;if(!t){console.warn("Für die Action 'updateServicesConsents' wurde kein 'data-uc-id' im Elternelement gefunden.");return}const r=Object.keys(A).find(c=>A[c]===t);if(!r){console.warn(`Kein Service-Key für die ID '${t}' gefunden.`);return}const n=(i=K[r])!=null?i:[],s=new Set([r,...n]),a=Array.from(s).map(c=>{const f=A[c];return f?{id:f,consent:!0}:(console.warn(`(updateServicesConsents) Unbekannter Service-Key: ${c}`),null)}).filter(c=>c!==null);a.length>0&&(console.log("Service-Consents, die gesetzt werden:",a),await((d=window.__ucCmp)==null?void 0:d.updateServicesConsents(a)),(u=window.__ucCmp)==null||u.saveConsents())})}function J(o,e){return e.every(t=>{const r=o.services[t];return(r==null?void 0:r.consent.given)===!0})}const Q="modulepreload",ee=function(o){return"/"+o},q={},H=function(e,t,r){let n=Promise.resolve();if(t&&t.length>0){let u=function(c){return Promise.all(c.map(f=>Promise.resolve(f).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};var a=u;document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),d=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));n=u(t.map(c=>{if(c=ee(c),c in q)return;q[c]=!0;const f=c.endsWith(".css"),m=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${m}`))return;const l=document.createElement("link");if(l.rel=f?"stylesheet":Q,f||(l.as="script"),l.crossOrigin="",l.href=c,d&&l.setAttribute("nonce",d),document.head.appendChild(l),f)return new Promise((p,g)=>{l.addEventListener("load",p),l.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(i){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=i,window.dispatchEvent(d),!d.defaultPrevented)throw i}return n.then(i=>{for(const d of i||[])d.status==="rejected"&&s(d.reason);return e().catch(s)})};function Y(o){const e=document.createElement("div");e.className="u-text-align-center u-vflex-center-top u-gap-3 u-background-color-auto u-overflow-auto u-p-small";const t=document.createElement("p");t.innerHTML=`Dieser Inhalt kann nur angezeigt werden, wenn die <span class="u-text-color-primary">${o}</span> Cookies erlaubt sind.
2
- `;const r=document.createElement("button");r.type="button",r.className="u-text-link-color-brand-inv u-text-decoration-underline u-p-small",r.innerText="Cookies akzeptieren und Medien Laden",r.setAttribute("data-action","updateServicesConsents");const n=document.createElement("button");return n.type="button",n.className="u-text-link-color-brand-inv u-p-small",n.innerText="Details",n.setAttribute("data-action","showServiceDetails"),e.appendChild(t),e.appendChild(r),e.appendChild(n),e}async function te(o,e,t,r){const n=o.dataset.embedLoaded==="true";if(t&&e){if(!n){if(o.dataset.embedLoaded="true",!r.fn){const s=await H(()=>import("./ytLoader-DLd5o3iy.js"),[]);r.fn=s.ytLoader1}r.fn&&o.replaceChildren(r.fn(e))}}else o.replaceChildren(Y("YouTube Video")),o.dataset.embedLoaded="false"}async function ne(o,e,t,r){const n=o.dataset.embedLoaded==="true";if(t&&e){if(!n){if(o.dataset.embedLoaded="true",!r.fn){const s=await H(()=>import("./VideoAskLoader-xM3qhhQB.js"),[]);r.fn=s.videoAskLoader}r.fn&&o.replaceChildren(r.fn(e))}}else o.replaceChildren(Y("Videoask")),o.dataset.embedLoaded="false"}function oe(o){var r;const e=new Set([o]);return((r=K[o])!=null?r:[]).forEach(n=>e.add(n)),Array.from(e).map(n=>A[n]).filter(n=>!!n)}async function D(o){const e=document.querySelectorAll("[data-uc-id]");if(!e.length)return;const t={fn:null},r={fn:null};for(const n of e){const s=n.getAttribute("data-uc-id"),a=n.getAttribute("data-embed-src"),i=Object.keys(A).find(c=>A[c]===s);if(!i)continue;const d=oe(i),u=o?J(o,d):!0;switch(i){case"YOUTUBE_VIDEO":{await te(n,a,u,t);break}case"VIDEOASK":{await ne(n,a,u,r);break}}}}function re(o=200){return new Promise(e=>{let t=!1;const r=s=>{t||(t=!0,e(s))};if(window.__ucCmp){r(window.__ucCmp);return}const n=()=>{var s;window.removeEventListener("UC_UI_INITIALIZED",n),r((s=window.__ucCmp)!=null?s:null)};window.addEventListener("UC_UI_INITIALIZED",n),setTimeout(()=>{var s;window.removeEventListener("UC_UI_INITIALIZED",n),r((s=window.__ucCmp)!=null?s:null)},o)})}let G=!1;async function se(){if(G)return;G=!0;const o=await re();if(!o){await D();return}try{if(typeof o.getConsentDetails=="function"){const e=await o.getConsentDetails();await D(e)}else console.warn("Usercentrics vorhanden, aber getConsentDetails() ist nicht verfügbar – Embeds bleiben blockiert.")}catch(e){console.warn("Fehler beim Laden der ConsentDetails oder Zugriff auf __ucCmp.getConsentDetails():",e)}window.addEventListener("UC_CONSENT",e=>{const t=e.detail;D(t)})}function ie(){const o=document.querySelectorAll("[data-banner]");o.length!==0&&o.forEach(e=>{const t=e.getAttribute("data-banner");if(!t)return;const r=e.getAttribute("data-banner-close-area");let n;r==="global"?n=`bannerClosed:${t}`:n=`bannerClosed:${location.pathname}:${t}`,localStorage.getItem(n)==="true"||e.classList.toggle("u-display-none")})}function ce(){y("closeGlobalBanner",o=>{const e=o.closest("[data-banner]");if(!e){console.error("Global banner element not found.",o);return}const t=e.getAttribute("data-banner");if(!t)return;const r=e.getAttribute("data-banner-close-area");if(e.classList.add("u-display-none"),!r)return;let n;r==="global"?n=`bannerClosed:${t}`:n=`bannerClosed:${location.pathname}:${t}`,localStorage.setItem(n,"true")})}function ae(){y("openModalWindow",o=>{const e=o.getAttribute("data-modal-id");if(!e)return;const t=document.querySelector(`#${e}`);t==null||t.showModal()})}function le(){y("closeModalWindow",o=>{const e=o.closest("dialog");e==null||e.close()})}function de(){y("openZendeskChat",()=>{window.zE&&window.zE("messenger","open")})}function W(o=20){if(window.zE){window.zE("messenger:on","open",function(){console.log("You have opened the messaging Web Widget")}),console.log("Zendesk open listener registered");return}if(o<=0){console.warn("Zendesk zE not available – listener not registered");return}setTimeout(()=>W(o-1),250)}function ue(){Z(),F(),V(),x(),R(),M(),j(),z(),$(),ce(),ie(),ae(),le(),W(),de()}function fe(){X(),se()}function U(){ue(),fe()}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",U,{once:!0}):U();
1
+ function F(){const o=["u-theme-dark","u-theme-light"],e=document.documentElement,n=document.getElementById("tgl-theme");if(!n){console.warn('Toggle-Button mit ID "tgl-theme" nicht gefunden.');return}n.addEventListener("click",()=>{const t=e.classList.contains("u-theme-dark")?"u-theme-light":"u-theme-dark";e.classList.remove(...o),e.classList.add(t),e.setAttribute("color-scheme",t==="u-theme-dark"?"dark":"light");try{localStorage.setItem("theme",t)}catch(s){}})}function V(){const o=document.body,e=document.documentElement;["u-brand-bos","u-brand-cu"].forEach(r=>{o.classList.contains(r)&&(o.classList.remove(r),e.classList.add(r))}),o.classList.length===0&&o.removeAttribute("class")}function x(){var f,m;if(!window.gsap)return;const o=window.gsap,e=document.getElementById("g_nav_menu_toggle"),n=document.querySelector('label[for="g_nav_menu_toggle"]'),r=document.querySelector(".g_nav_menu"),t=(f=n==null?void 0:n.querySelector("use"))!=null?f:null;if(!e||!n||!t)return;const s=l=>{n.setAttribute("aria-label",l?"Menü schließen":"Menü öffnen"),n.setAttribute("aria-expanded",l?"true":"false")},a=l=>{t.setAttribute("href",l?"#icon-x-lg":"#icon-menu")},i=l=>{document.body.classList.toggle("u-overflow-hidden",l)},d=l=>{r&&o.to(r,l?{display:"block",height:"calc(100vh - var(--global-nav--height))",opacity:1,duration:.3,ease:"power2.out"}:{display:"none",height:0,opacity:0,duration:.25,ease:"power2.in"})},u=()=>{const l=!!e.checked;s(l),a(l),d(l),i(l)};document.documentElement.classList.add("js-nav");const c=(m=o.matchMedia)==null?void 0:m.call(o);c&&typeof c.add=="function"?c.add("(max-width: 1040px)",()=>{o.set(r,{height:0,opacity:0,display:"none"}),u(),e.addEventListener("change",u)}):(u(),e.addEventListener("change",u))}function R(){if(!window.gsap||!window.ScrollTrigger)return;const o=window.gsap,e=document.querySelector(".g_nav"),n=document.querySelector(".global_header"),r=n==null?void 0:n.querySelector(".g_banner");if(!e)return;let t="shown";const s=50,a=350,i=()=>{t!=="shown"&&(n&&o.to(n,{y:0,duration:.25,ease:"power2.out",overwrite:!0}),t="shown")},d=()=>{if(t==="hidden"||!e)return;const c=e.offsetHeight;n&&o.to(n,{y:-c,duration:.25,ease:"power2.out",overwrite:!0}),t="hidden"},u=()=>{e&&e.querySelectorAll("details[open]").forEach(c=>{c.dispatchEvent(new CustomEvent("details:request-close",{bubbles:!0}))})};window.ScrollTrigger.create({start:0,end:document.body.scrollHeight,onUpdate(c){if(c.scroll()<=s){r&&(r.style.display="none"),i();return}r&&(r.style.display=""),!(Math.abs(c.getVelocity())<a)&&(c.direction===1?(u(),d()):i())}}),window.ScrollTrigger.addEventListener("refresh",()=>{window.scrollY<=s&&i()}),window.scrollY<=s?(i(),r&&(r.style.display="none")):(d(),r&&(r.style.display=""))}function M(){if(!window.gsap)return;const e=t=>t==null?!0:window.innerWidth>t,n=(t,s,a)=>{var d,u;const i=(u=(d=t.dataset)==null?void 0:d[s])!=null?u:void 0;return i===void 0?a:i==="true"},r=(t,s,a)=>{var u,c;const i=(c=(u=t.dataset)==null?void 0:u[s])!=null?c:void 0;if(i===void 0||i==="")return a;const d=parseInt(i,10);return Number.isNaN(d)?a:d};document.querySelectorAll("details").forEach(t=>{var k;const s=t.querySelector("summary"),a=s==null?void 0:s.nextElementSibling;if(!s||!a)return;const i=Array.from(a.children),d=n(t,"hover",!1),u=r(t,"hoverMinWidth",null),c=(k=r(t,"hoverDelay",750))!=null?k:750,f=n(t,"animate",!0);let m=!1,l=!1,h=null;const E=()=>{h!=null&&(clearTimeout(h),h=null)};let g=null;const C=n(t,"autoclose",!1),b=()=>{!C||g||(g=p=>{var P,N;if(!t.open)return;const I=(N=(P=p.composedPath)==null?void 0:P.call(p))!=null?N:[];if(I.length){if(I.includes(s)||I.includes(a))return;L();return}const O=p.target;!!(O&&(s.contains(O)||a.contains(O)))||L()},document.addEventListener("pointerdown",g,{capture:!0}))},S=()=>{g&&(document.removeEventListener("pointerdown",g,{capture:!0}),g=null)},_=f;let w=null;const v={open:()=>{t.open=!0},close:()=>{t.open=!1}};if(_){const p=window.gsap;p.set(a,{height:0,overflow:"hidden"}),i.length>0&&p.set(i,{opacity:0}),w=p.timeline({paused:!0,defaults:{duration:.35,ease:"power2.out"},onReverseComplete:()=>{t.open=!1,S()}}),w.set(t,{attr:{open:""}},0),w.to(a,{height:()=>a.scrollHeight}),w.set(a,{clearProps:"height"}),i.length>0&&w.to(i,{opacity:1,stagger:.04,duration:.38},"-=0.25"),v.open=()=>{w.invalidate().play(0),b()},v.close=()=>{w.reverse()}}function T(){v.open(),_||b()}function L(){v.close(),_||S()}t.addEventListener("details:request-close",p=>{p.stopPropagation(),t.open&&L()}),s.addEventListener("click",p=>{if(p.preventDefault(),!t.open)T();else{if(m&&l){b();return}L()}}),d&&(t.addEventListener("mouseenter",()=>{e(u)&&(t.open||(m=!0,l=!0,E(),h=window.setTimeout(()=>{l=!1},c),T()))}),t.addEventListener("mouseleave",()=>{m&&(m=!1,l=!1,E(),t.open&&L())}))})}function j(){document.querySelectorAll('[cu-list-sort="abc"]').forEach(e=>{const n=Array.from(e.children);n.sort((r,t)=>r.textContent.trim().localeCompare(t.textContent.trim(),"de",{sensitivity:"base"})),n.forEach(r=>e.appendChild(r))})}function z(){const o=String(new Date().getFullYear()),e=document.querySelectorAll('time[datetime="currentYear"]');e.length!==0&&e.forEach(n=>{n.setAttribute("datetime",o),n.textContent=o})}function $(){const o=(e,n=100)=>{let r;return(...t)=>{clearTimeout(r),r=setTimeout(()=>e(...t),n)}};document.querySelectorAll(".horizontal_slider_container").forEach(e=>{const n=e.querySelector('[data-slider="content"]'),r=e.querySelector('[data-slider="btn-right"]'),t=e.querySelector('[data-slider="btn-left"]'),s=e.querySelector(".button_group_wrapper"),a=r==null?void 0:r.closest(".button_main_wrap"),i=t==null?void 0:t.closest(".button_main_wrap"),d=()=>n.querySelectorAll('[data-slider="item"]').length?Array.from(n.querySelectorAll('[data-slider="item"]')):Array.from(n.children),u=h=>{const E=d();h<0||h>=E.length||E[h].scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})},c=()=>{const h=d(),E=n.getBoundingClientRect().left+n.clientWidth/2;let g=0,C=1/0;return h.forEach((b,S)=>{const _=b.getBoundingClientRect(),w=_.left+_.width/2,v=Math.abs(w-E);v<C&&(C=v,g=S)}),g},f=()=>u(c()+1),m=()=>u(c()-1),l=()=>{const h=n.scrollLeft,E=n.scrollWidth-n.clientWidth,g=h<=0,C=h>=E-1;if(!(n.scrollWidth>n.clientWidth)){s==null||s.style.setProperty("display","none"),i==null||i.style.setProperty("display","none"),a==null||a.style.setProperty("display","none");return}s==null||s.style.setProperty("display","flex"),i==null||i.style.setProperty("display",g?"none":"flex"),a==null||a.style.setProperty("display",C?"none":"flex")};r==null||r.addEventListener("click",f),t==null||t.addEventListener("click",m),n==null||n.addEventListener("scroll",o(l)),window.addEventListener("resize",o(l,150)),setTimeout(l,200)})}const B={};function y(o,e){B[o]=e}function Z(){document.addEventListener("click",o=>{const e=o.target,n=e==null?void 0:e.closest("[data-action]");if(!n)return;const r=n.dataset.action;if(!r)return;const t=B[r];if(!t){console.warn(`Keine Action für data-action="${r}" registriert`);return}o.preventDefault(),t(n,o)})}const A={UC_CMP:"H1Vl5NidjWX",CLOUDFRONT:"BJ_ocNjds-X",JSDELIVR:"F-REmjGq7",VIDEOASK:"VtnVCeUzx",WEBFLOW:"BJ0H5NjOjWX",TIKTOK:"Z0TcXjY0P",FACEBOOK_PIXEL:"ko1w5PpFl",FACEBOOK_SOCIAL_PLUGIN:"XYQZBUojc",YOUTUBE_VIDEO:"BJz7qNsdj-7",GOOGLE_TAG_MANAGER:"BJ59EidsWQ",GOOGlE_ANALYTICS:"HkocEodjb7",GOOGLE_FONTS:"HkPBYFofN",GOOGLE_AJAX:"H1PKqNodoWQ",GOOGLE_PLAY:"rw4DyFQcg6s3-W",RECAPTCHA:"Hko_qNsui-Q",CLICKCEASE:"jgGgfqxe0",TYPEFORM:"r1PkZcEs_iWQ",DOUBLECLICK_AD:"9V8bg4D63"},K={YOUTUBE_VIDEO:["RECAPTCHA","GOOGLE_AJAX","GOOGLE_FONTS","GOOGLE_PLAY","DOUBLECLICK_AD"],VIDEOASK:["TYPEFORM","CLICKCEASE","FACEBOOK_PIXEL","FACEBOOK_SOCIAL_PLUGIN","GOOGLE_TAG_MANAGER","GOOGlE_ANALYTICS","TYPEFORM","TIKTOK"]};function X(){y("showSecondLayer",()=>{var o;(o=window.__ucCmp)==null||o.showSecondLayer()}),y("showServiceDetails",o=>{var r;const e=o.closest("[data-uc-id]"),n=e==null?void 0:e.getAttribute("data-uc-id");if(!e||!n){console.warn("Ungültiges Element oder fehlende data-uc-id");return}(r=window.__ucCmp)==null||r.showServiceDetails(n)}),y("updateServicesConsents",async o=>{var i,d,u;const e=o.closest("[data-uc-id]"),n=e==null?void 0:e.dataset.ucId;if(!n){console.warn("Für die Action 'updateServicesConsents' wurde kein 'data-uc-id' im Elternelement gefunden.");return}const r=Object.keys(A).find(c=>A[c]===n);if(!r){console.warn(`Kein Service-Key für die ID '${n}' gefunden.`);return}const t=(i=K[r])!=null?i:[],s=new Set([r,...t]),a=Array.from(s).map(c=>{const f=A[c];return f?{id:f,consent:!0}:(console.warn(`(updateServicesConsents) Unbekannter Service-Key: ${c}`),null)}).filter(c=>c!==null);a.length>0&&(console.log("Service-Consents, die gesetzt werden:",a),await((d=window.__ucCmp)==null?void 0:d.updateServicesConsents(a)),(u=window.__ucCmp)==null||u.saveConsents())})}function J(o,e){return e.every(n=>{const r=o.services[n];return(r==null?void 0:r.consent.given)===!0})}const Q="modulepreload",ee=function(o){return"/"+o},q={},H=function(e,n,r){let t=Promise.resolve();if(n&&n.length>0){let u=function(c){return Promise.all(c.map(f=>Promise.resolve(f).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};var a=u;document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),d=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));t=u(n.map(c=>{if(c=ee(c),c in q)return;q[c]=!0;const f=c.endsWith(".css"),m=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${m}`))return;const l=document.createElement("link");if(l.rel=f?"stylesheet":Q,f||(l.as="script"),l.crossOrigin="",l.href=c,d&&l.setAttribute("nonce",d),document.head.appendChild(l),f)return new Promise((h,E)=>{l.addEventListener("load",h),l.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(i){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=i,window.dispatchEvent(d),!d.defaultPrevented)throw i}return t.then(i=>{for(const d of i||[])d.status==="rejected"&&s(d.reason);return e().catch(s)})};function W(o){const e=document.createElement("div");e.className="u-text-align-center u-vflex-center-top u-gap-3 u-background-color-auto u-overflow-auto u-p-small";const n=document.createElement("p");n.innerHTML=`Dieser Inhalt kann nur angezeigt werden, wenn die <span class="u-text-color-primary">${o}</span> Cookies erlaubt sind.
2
+ `;const r=document.createElement("button");r.type="button",r.className="u-text-link-color-brand-inv u-text-decoration-underline u-p-small",r.innerText="Cookies akzeptieren und Medien Laden",r.setAttribute("data-action","updateServicesConsents");const t=document.createElement("button");return t.type="button",t.className="u-text-link-color-brand-inv u-p-small",t.innerText="Details",t.setAttribute("data-action","showServiceDetails"),e.appendChild(n),e.appendChild(r),e.appendChild(t),e}async function te(o,e,n,r){const t=o.dataset.embedLoaded==="true";if(n&&e){if(!t){if(o.dataset.embedLoaded="true",!r.fn){const s=await H(()=>import("./ytLoader-DLd5o3iy.js"),[]);r.fn=s.ytLoader1}r.fn&&o.replaceChildren(r.fn(e))}}else o.replaceChildren(W("YouTube Video")),o.dataset.embedLoaded="false"}async function ne(o,e,n,r){const t=o.dataset.embedLoaded==="true";if(n&&e){if(!t){if(o.dataset.embedLoaded="true",!r.fn){const s=await H(()=>import("./VideoAskLoader-xM3qhhQB.js"),[]);r.fn=s.videoAskLoader}r.fn&&o.replaceChildren(r.fn(e))}}else o.replaceChildren(W("Videoask")),o.dataset.embedLoaded="false"}function oe(o){var r;const e=new Set([o]);return((r=K[o])!=null?r:[]).forEach(t=>e.add(t)),Array.from(e).map(t=>A[t]).filter(t=>!!t)}async function D(o){const e=document.querySelectorAll("[data-uc-id]");if(!e.length)return;const n={fn:null},r={fn:null};for(const t of e){const s=t.getAttribute("data-uc-id"),a=t.getAttribute("data-embed-src"),i=Object.keys(A).find(c=>A[c]===s);if(!i)continue;const d=oe(i),u=o?J(o,d):!0;switch(i){case"YOUTUBE_VIDEO":{await te(t,a,u,n);break}case"VIDEOASK":{await ne(t,a,u,r);break}}}}function re(o=200){return new Promise(e=>{let n=!1;const r=s=>{n||(n=!0,e(s))};if(window.__ucCmp){r(window.__ucCmp);return}const t=()=>{var s;window.removeEventListener("UC_UI_INITIALIZED",t),r((s=window.__ucCmp)!=null?s:null)};window.addEventListener("UC_UI_INITIALIZED",t),setTimeout(()=>{var s;window.removeEventListener("UC_UI_INITIALIZED",t),r((s=window.__ucCmp)!=null?s:null)},o)})}let G=!1;async function se(){if(G)return;G=!0;const o=await re();if(!o){await D();return}try{if(typeof o.getConsentDetails=="function"){const e=await o.getConsentDetails();await D(e)}else console.warn("Usercentrics vorhanden, aber getConsentDetails() ist nicht verfügbar – Embeds bleiben blockiert.")}catch(e){console.warn("Fehler beim Laden der ConsentDetails oder Zugriff auf __ucCmp.getConsentDetails():",e)}window.addEventListener("UC_CONSENT",e=>{const n=e.detail;D(n)})}function ie(){const o=document.querySelectorAll("[data-banner]");o.length!==0&&o.forEach(e=>{const n=e.getAttribute("data-banner");if(!n)return;const r=e.getAttribute("data-banner-close-area");let t;r==="global"?t=`bannerClosed:${n}`:t=`bannerClosed:${location.pathname}:${n}`,localStorage.getItem(t)==="true"||e.classList.toggle("u-display-none")})}function ce(){y("closeGlobalBanner",o=>{const e=o.closest("[data-banner]");if(!e){console.error("Global banner element not found.",o);return}const n=e.getAttribute("data-banner");if(!n)return;const r=e.getAttribute("data-banner-close-area");if(e.classList.add("u-display-none"),!r)return;let t;r==="global"?t=`bannerClosed:${n}`:t=`bannerClosed:${location.pathname}:${n}`,localStorage.setItem(t,"true")})}function ae(){y("openModalWindow",o=>{const e=o.getAttribute("data-modal-id");if(!e)return;const n=document.querySelector(`#${e}`);n==null||n.showModal()})}function le(){y("closeModalWindow",o=>{const e=o.closest("dialog");e==null||e.close()})}function de(){y("openZendeskChat",()=>{window.zE&&window.zE("messenger","open")})}function Y(o=20){if(window.zE){window.zE("messenger:on","open",function(){console.log("You have opened the messaging Web Widget")}),console.log("Zendesk open listener registered");return}if(o<=0){console.warn("Zendesk zE not available – listener not registered");return}setTimeout(()=>Y(o-1),250)}function ue(){Z(),F(),V(),x(),R(),M(),j(),z(),$(),ce(),ie(),ae(),le(),Y(),de()}function fe(){X(),se()}function U(){ue(),fe()}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",U,{once:!0}):U();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cuwebframework",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Lightweight web framework by Copteruni",
5
5
  "type": "module",
6
6
  "main": "dist/scripts/main.built.j∆ºs",