13 lines
11 KiB
JavaScript
13 lines
11 KiB
JavaScript
;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="722601c3-889a-3af2-69b1-fbc7746400cd")}catch(e){}}();
|
|
module.exports=[81870,a=>{"use strict";var b=a.i(526156),c=a.i(841757),d=a.i(5423);function e({mobile:a=!1,isSolidMode:e=!1}){let f=(0,d.usePathname)()||"/",g=f.startsWith("/en")?"en":"de",h=a=>{let b=f.replace(/^\/(en|de)/,"");return`/${a}${""===b?"":b}`},i=[{code:"de",label:"DE",fullLabel:"Deutsch",flag:"🇩🇪"},{code:"en",label:"EN",fullLabel:"English",flag:"🇬🇧"}];return a?(0,b.jsx)("div",{className:"flex flex-col gap-3",children:i.map(a=>(0,b.jsxs)(c.default,{href:h(a.code),className:`flex items-center gap-3 px-5 py-3 rounded-xl text-lg font-semibold transition-all duration-300 ${g===a.code?"bg-primary/10 text-primary border border-primary/20":"text-text-secondary hover:bg-neutral-50 border border-transparent"}`,children:[(0,b.jsx)("span",{className:"text-2xl","aria-hidden":"true",children:a.flag}),(0,b.jsx)("span",{children:a.fullLabel}),g===a.code&&(0,b.jsx)("svg",{className:"w-5 h-5 ml-auto text-primary",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,b.jsx)("polyline",{points:"20 6 9 17 4 12"})})]},a.code))}):(0,b.jsx)("div",{className:`flex items-center rounded-full p-0.5 border ${e?"bg-neutral-100 border-neutral-200":"bg-white/10 backdrop-blur-sm border-white/10"} transition-colors duration-300`,children:i.map(a=>{let d=g===a.code,f="";return f=d?"bg-white text-primary shadow-sm":e?"text-text-secondary hover:text-primary":"text-white/70 hover:text-white",(0,b.jsxs)(c.default,{href:h(a.code),className:`flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-bold uppercase tracking-wider transition-all duration-300 ${f}`,"aria-label":`Switch to ${a.fullLabel}`,children:[(0,b.jsx)("span",{className:"text-sm","aria-hidden":"true",children:a.flag}),(0,b.jsx)("span",{children:a.label})]},a.code)})})}a.s(["LanguageSwitcher",()=>e])},581631,a=>{"use strict";var b=a.i(526156),c=a.i(150765),d=a.i(841757),e=a.i(110644),f=a.i(5423),g=a.i(608986),h=a.i(766165),i=a.i(205640),j=a.i(427402),k=a.i(976523),l=a.i(604682),m=c,n=a.i(937051);function o(a,b){if("function"==typeof a)return a(b);null!=a&&(a.current=b)}class p extends m.Component{getSnapshotBeforeUpdate(a){let b=this.props.childRef.current;if((0,l.isHTMLElement)(b)&&a.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let a=b.offsetParent,c=(0,l.isHTMLElement)(a)&&a.offsetWidth||0,d=(0,l.isHTMLElement)(a)&&a.offsetHeight||0,e=getComputedStyle(b),f=this.props.sizeRef.current;f.height=parseFloat(e.height),f.width=parseFloat(e.width),f.top=b.offsetTop,f.left=b.offsetLeft,f.right=c-f.width-f.left,f.bottom=d-f.height-f.top}return null}componentDidUpdate(){}render(){return this.props.children}}function q({children:a,isPresent:d,anchorX:e,anchorY:f,root:g,pop:h}){let i=(0,m.useId)(),j=(0,m.useRef)(null),k=(0,m.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=(0,m.useContext)(n.MotionConfigContext),q=function(...a){return c.useCallback(function(...a){return b=>{let c=!1,d=a.map(a=>{let d=o(a,b);return c||"function"!=typeof d||(c=!0),d});if(c)return()=>{for(let b=0;b<d.length;b++){let c=d[b];"function"==typeof c?c():o(a[b],null)}}}}(...a),a)}(j,a.props?.ref??a?.ref);return(0,m.useInsertionEffect)(()=>{let{width:a,height:b,top:c,left:m,right:n,bottom:o}=k.current;if(d||!1===h||!j.current||!a||!b)return;let p="left"===e?`left: ${m}`:`right: ${n}`,q="bottom"===f?`bottom: ${o}`:`top: ${c}`;j.current.dataset.motionPopId=i;let r=document.createElement("style");l&&(r.nonce=l);let s=g??document.head;return s.appendChild(r),r.sheet&&r.sheet.insertRule(`
|
|
[data-motion-pop-id="${i}"] {
|
|
position: absolute !important;
|
|
width: ${a}px !important;
|
|
height: ${b}px !important;
|
|
${p}px !important;
|
|
${q}px !important;
|
|
}
|
|
`),()=>{j.current?.removeAttribute("data-motion-pop-id"),s.contains(r)&&s.removeChild(r)}},[d]),(0,b.jsx)(p,{isPresent:d,childRef:j,sizeRef:k,pop:h,children:!1===h?a:m.cloneElement(a,{ref:q})})}let r=({children:a,initial:d,isPresent:e,onExitComplete:f,custom:g,presenceAffectsLayout:h,mode:j,anchorX:l,anchorY:m,root:n})=>{let o=(0,i.useConstant)(s),p=(0,c.useId)(),r=!0,t=(0,c.useMemo)(()=>(r=!1,{id:p,initial:d,isPresent:e,custom:g,onExitComplete:a=>{for(let b of(o.set(a,!0),o.values()))if(!b)return;f&&f()},register:a=>(o.set(a,!1),()=>o.delete(a))}),[e,o,f]);return h&&r&&(t={...t}),(0,c.useMemo)(()=>{o.forEach((a,b)=>o.set(b,!1))},[e]),c.useEffect(()=>{e||o.size||!f||f()},[e]),a=(0,b.jsx)(q,{pop:"popLayout"===j,isPresent:e,anchorX:l,anchorY:m,root:n,children:a}),(0,b.jsx)(k.PresenceContext.Provider,{value:t,children:a})};function s(){return new Map}var t=a.i(831404);let u=a=>a.key||"";function v(a){let b=[];return c.Children.forEach(a,a=>{(0,c.isValidElement)(a)&&b.push(a)}),b}let w=({children:a,custom:d,initial:e=!0,onExitComplete:f,presenceAffectsLayout:g=!0,mode:k="sync",propagate:l=!1,anchorX:m="left",anchorY:n="top",root:o})=>{let[p,q]=(0,t.usePresence)(l),s=(0,c.useMemo)(()=>v(a),[a]),w=l&&!p?[]:s.map(u),x=(0,c.useRef)(!0),y=(0,c.useRef)(s),z=(0,i.useConstant)(()=>new Map),A=(0,c.useRef)(new Set),[B,C]=(0,c.useState)(s),[D,E]=(0,c.useState)(s);(0,j.useIsomorphicLayoutEffect)(()=>{x.current=!1,y.current=s;for(let a=0;a<D.length;a++){let b=u(D[a]);w.includes(b)?(z.delete(b),A.current.delete(b)):!0!==z.get(b)&&z.set(b,!1)}},[D,w.length,w.join("-")]);let F=[];if(s!==B){let a=[...s];for(let b=0;b<D.length;b++){let c=D[b],d=u(c);w.includes(d)||(a.splice(b,0,c),F.push(c))}return"wait"===k&&F.length&&(a=F),E(v(a)),C(s),null}let{forceRender:G}=(0,c.useContext)(h.LayoutGroupContext);return(0,b.jsx)(b.Fragment,{children:D.map(a=>{let c=u(a),h=(!l||!!p)&&(s===D||w.includes(c));return(0,b.jsx)(r,{isPresent:h,initial:(!x.current||!!e)&&void 0,custom:d,presenceAffectsLayout:g,mode:k,root:o,onExitComplete:h?void 0:()=>{if(A.current.has(c)||!z.has(c))return;A.current.add(c),z.set(c,!0);let a=!0;z.forEach(b=>{b||(a=!1)}),a&&(G?.(),E(y.current),l&&q?.(),f&&f())},anchorX:m,anchorY:n,children:a},c)})})};var x=a.i(81870),y=a.i(912466);function z({navLinks:a}){let[h,i]=c.useState(!1),[j,k]=c.useState(!1),[l,m]=c.useState(!1),n=(0,f.usePathname)()||"/",o=n.startsWith("/en")?"en":"de";c.useEffect(()=>{let a=()=>{i(window.scrollY>20)};window.addEventListener("scroll",a);let b=()=>{m("true"===document.body.getAttribute("data-force-solid-header"))};b();let c=new MutationObserver(b);return c.observe(document.body,{attributes:!0,attributeFilter:["data-force-solid-header"]}),b(),()=>{window.removeEventListener("scroll",a),c.disconnect()}},[n]),c.useEffect(()=>{k(!1)},[n]);let p=h||l;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("header",{className:`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ease-in-out ${p?"bg-neutral-light/90 backdrop-blur-md shadow-sm py-4":"bg-transparent py-6"}`,children:(0,b.jsxs)("div",{className:"container flex items-center justify-between",children:[(0,b.jsx)(d.default,{href:`/${o}`,className:"relative flex items-center h-12 w-48 z-50",children:(0,b.jsx)(e.default,{src:p||j?"/assets/logo.png":"/assets/logo-white.png",alt:"E-TIB Gruppe",fill:!0,className:"object-contain object-left",priority:!0,sizes:"192px"})}),(0,b.jsxs)("nav",{className:"hidden md:flex items-center gap-10",children:[a&&a.length>0&&a.map(a=>{let c=a.url.startsWith("/")&&!a.url.match(/^\/(en|de)/)?`/${o}${a.url}`:a.url;return(0,b.jsx)(d.default,{href:c,className:`font-semibold text-sm uppercase tracking-widest transition-all duration-300 ${p?"text-text-primary hover:text-primary":"text-neutral-light hover:text-primary-light"}`,children:a.label},a.url)}),(0,b.jsx)("div",{className:`h-4 w-px mx-2 transition-colors duration-300 ${p?"bg-neutral-300":"bg-white/20"}`}),(0,b.jsx)(x.LanguageSwitcher,{isSolidMode:p}),(0,b.jsx)(y.Button,{href:`/${o}/${"de"===o?"kontakt":"contact"}`,variant:"primary",className:"px-8",children:"de"===o?"Kontakt":"Contact"})]}),(0,b.jsx)("button",{className:"md:hidden z-50 text-primary p-2",onClick:()=>k(!j),"aria-label":"Toggle menu",children:(0,b.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:p||j?"currentColor":"white",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:j?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,b.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("line",{x1:"3",x2:"21",y1:"6",y2:"6"}),(0,b.jsx)("line",{x1:"3",x2:"21",y1:"12",y2:"12"}),(0,b.jsx)("line",{x1:"3",x2:"21",y1:"18",y2:"18"})]})})})]})}),(0,b.jsx)(w,{children:j&&(0,b.jsx)(g.motion.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.2},className:"fixed inset-0 z-40 bg-white md:hidden pt-32 pb-8 px-6 overflow-y-auto",children:(0,b.jsxs)("nav",{className:"flex flex-col gap-6",children:[a&&a.length>0&&a.map(a=>{let c=a.url.startsWith("/")&&!a.url.match(/^\/(en|de)/)?`/${o}${a.url}`:a.url;return(0,b.jsx)(d.default,{href:c,className:"text-2xl font-heading font-bold text-neutral-dark border-b border-neutral-100 pb-4",children:a.label},a.url)}),(0,b.jsx)(d.default,{href:`/${o}/${"de"===o?"kontakt":"contact"}`,className:"text-2xl font-heading font-bold text-primary border-b border-neutral-100 pb-4",children:"de"===o?"Kontakt":"Contact"}),(0,b.jsxs)("div",{className:"mt-8 pt-6",children:[(0,b.jsx)("p",{className:"text-text-secondary text-sm font-bold uppercase tracking-widest mb-4",children:"Sprache wählen"}),(0,b.jsx)(x.LanguageSwitcher,{mobile:!0})]})]})})})]})}a.s(["Header",()=>z],581631)},909381,a=>{"use strict";var b=a.i(526156),c=a.i(603836);function d(){let a=(0,c.useTranslations)("Navigation");return(0,b.jsx)("a",{href:"#main-content",className:"fixed -top-full left-4 z-[100] px-6 py-3 bg-white text-primary-dark font-bold rounded-lg shadow-xl outline-none ring-2 ring-accent transition-all duration-300 focus:top-4",children:a("skipToContent")})}a.s(["default",()=>d])},905651,a=>{"use strict";var b=a.i(526156),c=a.i(411487),d=a.i(150765);let e=(0,c.default)(async()=>{},{loadableGenerated:{modules:[565071]},ssr:!1}),f=(0,c.default)(async()=>{},{loadableGenerated:{modules:[248785]},ssr:!1}),g=(0,c.default)(async()=>{},{loadableGenerated:{modules:[950648]},ssr:!1});function h(){let[a,c]=(0,d.useState)(!1);return((0,d.useEffect)(()=>{if("true"!==process.env.NEXT_PUBLIC_CI){let a=setTimeout(()=>c(!0),2500);return()=>clearTimeout(a)}},[]),a)?(0,b.jsxs)(d.Suspense,{fallback:null,children:[(0,b.jsx)(e,{}),(0,b.jsx)(f,{}),(0,b.jsx)(g,{})]}):null}a.s(["default",()=>h])},650766,a=>{"use strict";var b=a.i(268200),c=a.i(526156);function d({locale:a,...d}){if(!a)throw Error(void 0);return(0,c.jsx)(b.IntlProvider,{locale:a,...d})}a.s(["default",()=>d])},894447,a=>{"use strict";var b=a.i(526156);let c=(0,a.i(411487).default)(async()=>{},{loadableGenerated:{modules:[566137]},ssr:!1});function d({feedbackEnabled:a}){return a?(0,b.jsx)(c,{}):null}a.s(["default",()=>d])}];
|
|
|
|
//# debugId=722601c3-889a-3af2-69b1-fbc7746400cd
|
|
//# sourceMappingURL=_c3cb4fd0._.js.map
|